From fda563d606cd7a39153f12dc71182a3c1de40b48 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 13 Sep 2017 14:09:48 +0200 Subject: [PATCH] Update dependencies --- Gopkg.lock | 74 +- vendor/cloud.google.com/go/README.md | 49 +- .../cloud.google.com/go/bigquery/copy_test.go | 30 +- .../go/bigquery/create_table_test.go | 12 + .../cloud.google.com/go/bigquery/dataset.go | 78 +- .../go/bigquery/examples_test.go | 72 +- .../go/bigquery/extract_test.go | 15 +- .../go/bigquery/integration_test.go | 280 +- .../cloud.google.com/go/bigquery/iterator.go | 6 +- vendor/cloud.google.com/go/bigquery/job.go | 26 +- vendor/cloud.google.com/go/bigquery/load.go | 2 + .../cloud.google.com/go/bigquery/load_test.go | 16 +- vendor/cloud.google.com/go/bigquery/query.go | 15 +- .../go/bigquery/query_test.go | 38 +- .../cloud.google.com/go/bigquery/service.go | 146 +- .../go/bigquery/service_test.go | 24 + vendor/cloud.google.com/go/bigquery/table.go | 24 +- vendor/cloud.google.com/go/bigtable/admin.go | 7 + .../cloud.google.com/go/bigtable/bigtable.go | 14 +- .../go/bigtable/bigtable_test.go | 22 +- .../go/bigtable/bttest/inmem.go | 24 +- .../go/bigtable/cmd/loadtest/loadtest.go | 8 +- .../go/bigtable/export_test.go | 4 +- .../go/cmd/go-cloud-debug-agent/debuglet.go | 2 +- .../cloud.google.com/go/datastore/client.go | 118 + .../go/datastore/datastore.go | 128 +- .../go/datastore/integration_test.go | 3 + .../go/debugger/apiv2/controller2_client.go | 27 +- .../go/debugger/apiv2/debugger2_client.go | 8 +- .../cloud.google.com/go/debugger/apiv2/doc.go | 3 +- .../go/dlp/apiv2beta1/dlp_client.go | 8 +- .../cloud.google.com/go/dlp/apiv2beta1/doc.go | 3 +- .../go/errorreporting/apiv1beta1/doc.go | 5 +- .../apiv1beta1/error_group_client.go | 18 +- .../apiv1beta1/error_stats_client.go | 15 +- .../apiv1beta1/report_errors_client.go | 18 +- .../go/errorreporting/error_logging_test.go | 215 + .../go/errorreporting/errors.go | 456 + .../go/errorreporting/errors_test.go | 212 + .../go/errorreporting/stack_test.go | 118 + .../go/errors/error_logging_test.go | 9 + vendor/cloud.google.com/go/errors/errors.go | 25 +- .../go/iam/admin/apiv1/doc.go | 3 +- .../go/iam/admin/apiv1/iam_client.go | 72 +- .../go/internal/kokoro/build.sh | 2 +- .../go/internal/optional/optional.go | 14 + .../apiv1/AnalyzeSentiment_smoke_test.go | 71 + .../cloud.google.com/go/language/apiv1/doc.go | 3 +- .../go/language/apiv1/language_client.go | 6 +- .../go/language/apiv1/mock_test.go | 28 +- .../apiv1beta2/AnalyzeSentiment_smoke_test.go | 71 + .../go/language/apiv1beta2/doc.go | 3 +- .../go/language/apiv1beta2/language_client.go | 6 +- .../go/language/apiv1beta2/mock_test.go | 36 +- .../go/logging/apiv2/config_client.go | 44 +- .../cloud.google.com/go/logging/apiv2/doc.go | 3 +- .../go/logging/apiv2/logging_client.go | 32 +- .../go/logging/apiv2/metrics_client.go | 30 +- .../go/logging/logadmin/logadmin.go | 2 + .../go/logging/logadmin/sinks.go | 3 +- .../go/logging/logadmin/sinks_test.go | 4 +- vendor/cloud.google.com/go/logging/logging.go | 14 +- .../go/longrunning/autogen/doc.go | 3 +- .../longrunning/autogen/operations_client.go | 14 +- .../go/monitoring/apiv3/doc.go | 3 +- .../go/monitoring/apiv3/group_client.go | 40 +- .../go/monitoring/apiv3/metric_client.go | 55 +- .../cloud.google.com/go/profiler/profiler.go | 165 +- .../go/profiler/profiler_example_test.go | 8 +- .../go/profiler/profiler_test.go | 129 +- vendor/cloud.google.com/go/pubsub/acker.go | 159 - .../cloud.google.com/go/pubsub/acker_test.go | 262 - .../cloud.google.com/go/pubsub/apiv1/doc.go | 3 +- .../go/pubsub/apiv1/mock_test.go | 152 + .../go/pubsub/apiv1/publisher_client.go | 61 +- .../apiv1/publisher_client_example_test.go | 18 + .../go/pubsub/apiv1/subscriber_client.go | 140 +- .../apiv1/subscriber_client_example_test.go | 18 + .../go/pubsub/example_test.go | 12 + .../cloud.google.com/go/pubsub/fake_test.go | 2 +- .../go/pubsub/integration_test.go | 86 +- vendor/cloud.google.com/go/pubsub/iterator.go | 375 +- .../go/pubsub/iterator_test.go | 338 - .../cloud.google.com/go/pubsub/keepalive.go | 182 - .../go/pubsub/keepalive_test.go | 319 - .../go/pubsub/loadtest/benchmark_test.go | 6 +- vendor/cloud.google.com/go/pubsub/pubsub.go | 4 + vendor/cloud.google.com/go/pubsub/puller.go | 115 - .../cloud.google.com/go/pubsub/puller_test.go | 154 - .../go/pubsub/streaming_pull_test.go | 21 - .../go/pubsub/subscription.go | 47 +- vendor/cloud.google.com/go/pubsub/topic.go | 14 +- vendor/cloud.google.com/go/run-tests.sh | 4 +- .../database/apiv1/database_admin_client.go | 56 +- .../go/spanner/admin/database/apiv1/doc.go | 3 +- .../go/spanner/admin/instance/apiv1/doc.go | 3 +- .../instance/apiv1/instance_admin_client.go | 142 +- .../cloud.google.com/go/spanner/apiv1/doc.go | 44 + .../go/spanner/apiv1/mock_test.go | 853 ++ .../go/spanner/apiv1/spanner_client.go | 392 + .../apiv1/spanner_client_example_test.go | 229 + .../spanner/internal/testutil/mockclient.go | 6 +- .../cloud.google.com/go/spanner/key_test.go | 40 +- .../cloud.google.com/go/spanner/protoutils.go | 2 +- vendor/cloud.google.com/go/spanner/row.go | 12 +- .../go/spanner/session_test.go | 5 + .../go/spanner/spanner_test.go | 235 +- vendor/cloud.google.com/go/spanner/value.go | 231 +- .../go/spanner/value_benchmarks_test.go | 214 + .../cloud.google.com/go/spanner/value_test.go | 141 +- .../go/speech/apiv1/Recognize_smoke_test.go | 78 + .../cloud.google.com/go/speech/apiv1/doc.go | 3 +- .../go/speech/apiv1/speech_client.go | 12 +- .../go/speech/apiv1beta1/doc.go | 3 +- .../go/speech/apiv1beta1/speech_client.go | 12 +- vendor/cloud.google.com/go/storage/bucket.go | 170 +- .../go/storage/example_test.go | 26 + .../go/storage/go110.go.pending | 30 + .../go/storage/integration_test.go | 36 +- vendor/cloud.google.com/go/storage/invoke.go | 9 +- .../cloud.google.com/go/storage/not_go110.go | 40 + vendor/cloud.google.com/go/storage/reader.go | 6 + vendor/cloud.google.com/go/storage/storage.go | 22 +- .../go/storage/storage_test.go | 83 + vendor/cloud.google.com/go/storage/writer.go | 2 + vendor/cloud.google.com/go/trace/apiv1/doc.go | 3 +- vendor/cloud.google.com/go/trace/trace.go | 2 +- .../go/videointelligence/apiv1beta1/doc.go | 5 +- .../apiv1beta1/video_intelligence_client.go | 14 +- .../go/videointelligence/apiv1beta2/doc.go | 40 + .../videointelligence/apiv1beta2/mock_test.go | 190 + .../apiv1beta2/video_intelligence_client.go | 224 + .../video_intelligence_client_example_test.go | 56 + .../videointelligence/apiv1beta2/whitelist.go | 16 + .../cloud.google.com/go/vision/apiv1/doc.go | 3 +- .../Azure/azure-sdk-for-go/.travis.yml | 12 +- .../Azure/azure-sdk-for-go/CHANGELOG.md | 32 + .../Azure/azure-sdk-for-go/Gododir/gen.go | 660 +- .../github.com/Azure/azure-sdk-for-go/NOTICE | 5 + .../azure-sdk-for-go/arm/advisor/version.go | 6 +- .../arm/analysisservices/version.go | 6 +- .../arm/appinsights/version.go | 6 +- .../arm/authorization/version.go | 6 +- .../arm/automation/version.go | 6 +- .../azure-sdk-for-go/arm/batch/version.go | 6 +- .../azure-sdk-for-go/arm/billing/version.go | 6 +- .../Azure/azure-sdk-for-go/arm/cdn/version.go | 6 +- .../azure-sdk-for-go/arm/commerce/version.go | 6 +- .../azure-sdk-for-go/arm/compute/version.go | 6 +- .../arm/consumption/version.go | 6 +- .../arm/containerinstance/client.go | 51 + .../arm/containerinstance/containergroups.go | 512 + .../arm/containerinstance/containerlogs.go | 109 + .../arm/containerinstance/models.go | 223 + .../arm/containerinstance/version.go | 28 + .../arm/containerregistry/version.go | 6 +- .../arm/containerservice/version.go | 6 +- .../azure-sdk-for-go/arm/cosmos-db/version.go | 6 +- .../arm/customer-insights/version.go | 6 +- .../arm/datalake-analytics/account/version.go | 6 +- .../arm/datalake-store/account/version.go | 6 +- .../arm/devtestlabs/version.go | 6 +- .../Azure/azure-sdk-for-go/arm/dns/version.go | 6 +- .../azure-sdk-for-go/arm/eventgrid/client.go | 51 + .../arm/eventgrid/eventsubscriptions.go | 1040 ++ .../azure-sdk-for-go/arm/eventgrid/models.go | 292 + .../arm/eventgrid/operations.go | 96 + .../azure-sdk-for-go/arm/eventgrid/topics.go | 602 + .../arm/eventgrid/topictypes.go | 222 + .../azure-sdk-for-go/arm/eventgrid/version.go | 28 + .../azure-sdk-for-go/arm/eventhub/version.go | 6 +- .../azure-sdk-for-go/arm/graphrbac/version.go | 6 +- .../azure-sdk-for-go/arm/hdinsight/version.go | 6 +- .../azure-sdk-for-go/arm/intune/version.go | 6 +- .../azure-sdk-for-go/arm/iothub/version.go | 6 +- .../azure-sdk-for-go/arm/keyvault/version.go | 6 +- .../azure-sdk-for-go/arm/logic/version.go | 6 +- .../commitmentplans/version.go | 6 +- .../machinelearning/webservices/version.go | 6 +- .../arm/mediaservices/version.go | 6 +- .../arm/mobileengagement/version.go | 6 +- .../azure-sdk-for-go/arm/monitor/version.go | 6 +- .../azure-sdk-for-go/arm/mysql/version.go | 6 +- .../azure-sdk-for-go/arm/network/version.go | 6 +- .../arm/notificationhubs/version.go | 6 +- .../arm/postgresql/version.go | 6 +- .../arm/powerbiembedded/version.go | 6 +- .../arm/recoveryservices/version.go | 6 +- .../arm/recoveryservicesbackup/version.go | 6 +- .../recoveryservicessiterecovery/version.go | 6 +- .../azure-sdk-for-go/arm/redis/version.go | 6 +- .../azure-sdk-for-go/arm/relay/version.go | 6 +- .../arm/resourcehealth/version.go | 6 +- .../arm/resources/features/version.go | 6 +- .../arm/resources/links/version.go | 6 +- .../arm/resources/locks/version.go | 6 +- .../resources/managedapplications/version.go | 6 +- .../arm/resources/policy/version.go | 6 +- .../arm/resources/resources/version.go | 6 +- .../arm/resources/subscriptions/version.go | 6 +- .../azure-sdk-for-go/arm/scheduler/version.go | 6 +- .../azure-sdk-for-go/arm/search/version.go | 6 +- .../arm/servermanagement/version.go | 6 +- .../arm/service-map/version.go | 6 +- .../arm/servicebus/version.go | 6 +- .../arm/servicefabric/version.go | 6 +- .../Azure/azure-sdk-for-go/arm/sql/version.go | 9 +- .../azure-sdk-for-go/arm/storage/version.go | 6 +- .../arm/storageimportexport/version.go | 6 +- .../arm/storsimple8000series/version.go | 6 +- .../arm/streamanalytics/version.go | 6 +- .../arm/trafficmanager/version.go | 6 +- .../Azure/azure-sdk-for-go/arm/web/version.go | 6 +- .../Azure/azure-sdk-for-go/buildTerraform.sh | 36 - .../datalake-store/filesystem/version.go | 6 +- .../dataplane/keyvault/version.go | 6 +- .../Azure/azure-sdk-for-go/glide.lock | 8 +- .../Azure/azure-sdk-for-go/glide.yaml | 2 +- .../azure-sdk-for-go/management/README.md | 2 + .../management/affinitygroup/client.go | 2 + .../management/affinitygroup/entities.go | 2 + .../azure-sdk-for-go/management/client.go | 2 + .../azure-sdk-for-go/management/errors.go | 2 + .../management/errors_test.go | 2 + .../management/hostedservice/client.go | 2 + .../management/hostedservice/entities.go | 2 + .../Azure/azure-sdk-for-go/management/http.go | 2 + .../management/location/client.go | 2 + .../management/location/entities.go | 2 + .../management/networksecuritygroup/client.go | 2 + .../networksecuritygroup/entities.go | 2 + .../azure-sdk-for-go/management/operations.go | 2 + .../management/osimage/client.go | 2 + .../management/osimage/entities.go | 2 + .../management/publishSettings.go | 2 + .../azure-sdk-for-go/management/sql/client.go | 2 + .../management/sql/entities.go | 2 + .../management/storageservice/client.go | 2 + .../management/storageservice/entities.go | 2 + .../storageservice/entities_test.go | 2 + .../management/testutils/managementclient.go | 2 + .../Azure/azure-sdk-for-go/management/util.go | 2 + .../azure-sdk-for-go/management/version.go | 4 +- .../management/virtualmachine/client.go | 2 + .../management/virtualmachine/entities.go | 2 + .../virtualmachine/entities_test.go | 2 + .../virtualmachine/resourceextensions.go | 2 + .../virtualmachine/resourceextensions_test.go | 2 + .../management/virtualmachinedisk/client.go | 2 + .../management/virtualmachinedisk/entities.go | 2 + .../management/virtualmachineimage/client.go | 2 + .../virtualmachineimage/entities.go | 2 + .../virtualmachineimage/entities_test.go | 2 + .../management/virtualnetwork/client.go | 2 + .../management/virtualnetwork/entities.go | 2 + .../management/vmutils/configurationset.go | 2 + .../management/vmutils/datadisks.go | 2 + .../management/vmutils/deployment.go | 2 + .../management/vmutils/extensions.go | 2 + .../management/vmutils/extensions_test.go | 2 + .../management/vmutils/integration_test.go | 2 + .../management/vmutils/network.go | 2 + .../management/vmutils/rolesize.go | 2 + .../management/vmutils/rolestate.go | 2 + .../management/vmutils/vmutils.go | 2 + .../management/vmutils/vmutils_test.go | 2 + .../azure-sdk-for-go/storage/authorization.go | 11 +- .../storage/authorization_test.go | 41 +- .../azure-sdk-for-go/storage/blobsasuri.go | 8 +- .../storage/blobsasuri_test.go | 11 + .../Azure/azure-sdk-for-go/storage/client.go | 7 +- .../Azure/azure-sdk-for-go/storage/file.go | 2 +- .../TestBlobSASURICorrectness.yaml | 55 +- .../storage/table_batch_test.go | 2 + .../azure-sdk-for-go/storage/util_1.7.go | 12 + .../azure-sdk-for-go/storage/util_1.8.go | 18 + .../github.com/Azure/go-autorest/.travis.yml | 4 +- .../Azure/go-autorest/autorest/adal/token.go | 6 + .../go-autorest/autorest/adal/token_test.go | 61 + .../go-autorest/autorest/authorization.go | 110 + .../autorest/authorization_test.go | 37 + .../Azure/go-autorest/autorest/client.go | 1 + .../autorest/date/unixtime_test.go | 2 + .../Azure/go-autorest/autorest/error.go | 4 + .../go-autorest/autorest/retriablerequest.go | 63 +- .../autorest/retriablerequest_1.7.go | 44 + .../autorest/retriablerequest_1.8.go | 56 + .../Azure/go-autorest/autorest/sender.go | 21 +- .../Azure/go-autorest/autorest/sender_test.go | 30 + .../autorest/validation/validation.go | 15 +- .../autorest/validation/validation_test.go | 18 +- .../github.com/cpuguy83/go-md2man/Dockerfile | 8 + .../github.com/cpuguy83/go-md2man/Gopkg.lock | 15 + .../github.com/cpuguy83/go-md2man/Gopkg.toml | 26 + .../cpuguy83/go-md2man/md2man/roff.go | 35 +- .../cpuguy83/go-md2man/md2man/roff_test.go | 83 + .../github.com/cpuguy83/go-md2man/vendor.yml | 5 - .../github.com/dustin/go-humanize/.gitignore | 6 + .../go-humanize}/.travis.yml | 7 +- vendor/github.com/dustin/go-humanize/LICENSE | 21 + .../dustin/go-humanize/README.markdown | 92 + vendor/github.com/dustin/go-humanize/big.go | 31 + .../github.com/dustin/go-humanize/bigbytes.go | 173 + .../dustin/go-humanize/bigbytes_test.go | 220 + vendor/github.com/dustin/go-humanize/bytes.go | 143 + .../dustin/go-humanize/bytes_test.go | 146 + vendor/github.com/dustin/go-humanize/comma.go | 108 + .../dustin/go-humanize/comma_test.go | 136 + .../github.com/dustin/go-humanize/commaf.go | 40 + .../dustin/go-humanize/commaf_test.go | 44 + .../dustin/go-humanize/common_test.go | 18 + vendor/github.com/dustin/go-humanize/ftoa.go | 23 + .../dustin/go-humanize/ftoa_test.go | 55 + .../github.com/dustin/go-humanize/humanize.go | 8 + .../github.com/dustin/go-humanize/number.go | 192 + .../dustin/go-humanize/number_test.go | 79 + .../github.com/dustin/go-humanize/ordinals.go | 25 + .../dustin/go-humanize/ordinals_test.go | 22 + vendor/github.com/dustin/go-humanize/si.go | 113 + .../github.com/dustin/go-humanize/si_test.go | 101 + vendor/github.com/dustin/go-humanize/times.go | 117 + .../dustin/go-humanize/times_test.go | 113 + .../elithrar/simple-scrypt/compositor.json | 80 - vendor/github.com/go-ini/ini/.travis.yml | 10 +- vendor/github.com/go-ini/ini/ini.go | 63 +- vendor/github.com/go-ini/ini/struct.go | 5 +- vendor/github.com/golang/protobuf/.travis.yml | 1 + vendor/github.com/golang/protobuf/README.md | 1 + .../golang/protobuf/jsonpb/jsonpb.go | 125 +- .../golang/protobuf/jsonpb/jsonpb_test.go | 90 +- .../protoc-gen-go/descriptor/Makefile | 1 + .../protoc-gen-go/descriptor/descriptor.pb.go | 332 +- .../protoc-gen-go/descriptor/descriptor.proto | 837 ++ .../protobuf/protoc-gen-go/plugin/Makefile | 1 + .../protoc-gen-go/plugin/plugin.proto | 166 + .../golang/protobuf/ptypes/any/any.pb.go | 32 +- .../protobuf/ptypes/duration/duration.pb.go | 34 +- .../golang/protobuf/ptypes/empty/empty.pb.go | 30 +- .../golang/protobuf/ptypes/regen.sh | 37 +- .../protobuf/ptypes/struct/struct.pb.go | 60 +- .../protobuf/ptypes/timestamp/timestamp.pb.go | 34 +- .../protobuf/ptypes/wrappers/wrappers.pb.go | 44 +- vendor/github.com/kurin/blazer/base/base.go | 6 + .../kurin/blazer/base/integration_test.go | 119 +- .../kurin/blazer/internal/blog/blog.go | 2 +- vendor/github.com/minio/minio-go/.travis.yml | 8 +- .../github.com/minio/minio-go/MAINTAINERS.md | 21 +- vendor/github.com/minio/minio-go/README.md | 33 +- .../minio/minio-go/api-compose-object.go | 2 +- .../minio/minio-go/api-get-object.go | 18 +- .../minio/minio-go/api-presigned.go | 26 +- .../minio/minio-go/api-put-object-common.go | 23 - .../minio-go/api-put-object-encrypted.go | 2 +- .../minio-go/api-put-object-multipart.go | 52 +- .../minio-go/api-put-object-streaming.go | 4 +- .../minio/minio-go/api-put-object.go | 120 +- vendor/github.com/minio/minio-go/api-stat.go | 10 +- vendor/github.com/minio/minio-go/api.go | 50 +- .../minio/minio-go/api_functional_v2_test.go | 1470 -- .../minio/minio-go/api_functional_v4_test.go | 2410 ---- .../minio/minio-go/api_unit_test.go | 44 + vendor/github.com/minio/minio-go/appveyor.yml | 1 + .../github.com/minio/minio-go/bucket-cache.go | 44 +- vendor/github.com/minio/minio-go/core_test.go | 154 +- vendor/github.com/minio/minio-go/docs/API.md | 69 +- .../minio-go/examples/s3/composeobject.go | 21 +- .../minio/minio-go/examples/s3/copyobject.go | 5 +- .../examples/s3/presignedheadobject.go | 53 + .../examples/s3/putobject-progress.go | 4 +- .../examples/s3/putobject-s3-accelerate.go | 2 +- .../minio/minio-go/functional_tests.go | 4912 +++++++ .../s3signer/request-signature-streaming.go | 2 +- .../pkg/s3signer/request-signature-v2.go | 4 +- .../minio/minio-go/pkg/s3signer/utils_test.go | 7 + .../minio/minio-go/pkg/s3utils/utils.go | 10 +- .../minio/minio-go/pkg/s3utils/utils_test.go | 4 + .../minio/minio-go/test-utils_test.go | 4 +- vendor/github.com/minio/minio-go/transport.go | 48 + .../minio/minio-go/transport_1_5.go | 39 + .../minio/minio-go/transport_1_6.go | 40 + vendor/github.com/ncw/swift/auth_v3.go | 3 +- vendor/github.com/ncw/swift/swift.go | 5 + .../ncw/swift/swift_internal_test.go | 1 + vendor/github.com/ncw/swift/swift_test.go | 11 + .../github.com/ncw/swift/swifttest/server.go | 19 +- vendor/github.com/pkg/sftp/client.go | 32 +- vendor/github.com/pkg/sftp/example_test.go | 16 +- vendor/github.com/pkg/sftp/packet-manager.go | 40 +- vendor/github.com/pkg/sftp/request-example.go | 48 +- .../github.com/pkg/sftp/request-interfaces.go | 22 +- vendor/github.com/pkg/sftp/request-server.go | 67 +- .../pkg/sftp/request-server_test.go | 18 + vendor/github.com/pkg/sftp/request.go | 238 +- vendor/github.com/pkg/sftp/request_test.go | 85 +- vendor/github.com/pkg/sftp/server.go | 98 +- .../pkg/sftp/server_integration_test.go | 51 +- vendor/github.com/pkg/sftp/server_stubs.go | 24 +- vendor/github.com/pkg/sftp/server_test.go | 150 +- vendor/github.com/pkg/sftp/server_unix.go | 93 +- .../russross/blackfriday/.travis.yml | 40 +- .../github.com/russross/blackfriday/README.md | 31 +- .../github.com/russross/blackfriday/block.go | 180 +- .../russross/blackfriday/block_test.go | 249 + vendor/github.com/russross/blackfriday/doc.go | 32 + .../github.com/russross/blackfriday/html.go | 1 + .../github.com/russross/blackfriday/inline.go | 35 +- .../russross/blackfriday/inline_test.go | 137 +- .../russross/blackfriday/markdown.go | 177 +- .../russross/blackfriday/markdown_test.go | 75 + .../russross/blackfriday/ref_test.go | 2 +- .../russross/blackfriday/smartypants.go | 58 +- .../shurcooL/sanitized_anchor_name/README.md | 36 - .../shurcooL/sanitized_anchor_name/main.go | 29 - .../sanitized_anchor_name/main_test.go | 35 - vendor/github.com/sirupsen/logrus/.gitignore | 1 + vendor/github.com/sirupsen/logrus/.travis.yml | 15 + .../github.com/sirupsen/logrus/CHANGELOG.md | 113 + .../logrus}/LICENSE | 12 +- vendor/github.com/sirupsen/logrus/README.md | 505 + vendor/github.com/sirupsen/logrus/alt_exit.go | 64 + .../sirupsen/logrus/alt_exit_test.go | 83 + .../github.com/sirupsen/logrus/appveyor.yml | 14 + vendor/github.com/sirupsen/logrus/doc.go | 26 + vendor/github.com/sirupsen/logrus/entry.go | 276 + .../github.com/sirupsen/logrus/entry_test.go | 77 + .../sirupsen/logrus/example_basic_test.go | 69 + .../sirupsen/logrus/example_hook_test.go | 35 + vendor/github.com/sirupsen/logrus/exported.go | 193 + .../github.com/sirupsen/logrus/formatter.go | 45 + .../sirupsen/logrus/formatter_bench_test.go | 101 + .../github.com/sirupsen/logrus/hook_test.go | 122 + vendor/github.com/sirupsen/logrus/hooks.go | 34 + .../sirupsen/logrus/hooks/syslog/README.md | 39 + .../sirupsen/logrus/hooks/syslog/syslog.go | 55 + .../logrus/hooks/syslog/syslog_test.go | 27 + .../sirupsen/logrus/hooks/test/test.go | 95 + .../sirupsen/logrus/hooks/test/test_test.go | 39 + .../sirupsen/logrus/json_formatter.go | 79 + .../sirupsen/logrus/json_formatter_test.go | 199 + vendor/github.com/sirupsen/logrus/logger.go | 317 + .../sirupsen/logrus/logger_bench_test.go | 61 + vendor/github.com/sirupsen/logrus/logrus.go | 143 + .../github.com/sirupsen/logrus/logrus_test.go | 386 + .../sirupsen/logrus/terminal_bsd.go | 10 + .../sirupsen/logrus/terminal_linux.go | 14 + .../sirupsen/logrus/text_formatter.go | 191 + .../sirupsen/logrus/text_formatter_test.go | 141 + vendor/github.com/sirupsen/logrus/writer.go | 62 + vendor/github.com/spf13/cobra/.travis.yml | 4 +- vendor/github.com/spf13/cobra/README.md | 453 +- .../spf13/cobra/bash_completions.go | 36 +- .../spf13/cobra/bash_completions_test.go | 2 +- .../github.com/spf13/cobra/cobra/cmd/add.go | 4 +- .../spf13/cobra/cobra/cmd/add_test.go | 17 +- .../spf13/cobra/cobra/cmd/golden_test.go | 4 +- .../spf13/cobra/cobra/cmd/init_test.go | 11 +- .../spf13/cobra/cobra/cmd/license_agpl.go | 3 +- .../spf13/cobra/cobra/cmd/license_apache_2.go | 3 +- .../cobra/cobra/cmd/license_bsd_clause_2.go | 3 +- .../cobra/cobra/cmd/license_bsd_clause_3.go | 3 +- .../spf13/cobra/cobra/cmd/license_gpl_2.go | 23 +- .../spf13/cobra/cobra/cmd/license_gpl_3.go | 3 +- .../spf13/cobra/cobra/cmd/license_lgpl.go | 3 +- .../spf13/cobra/cobra/cmd/license_mit.go | 2 +- .../spf13/cobra/cobra/cmd/licenses.go | 6 +- .../github.com/spf13/cobra/cobra/cmd/root.go | 4 +- .../cobra/cobra/cmd/testdata/main.go.golden | 1 + .../cobra/cobra/cmd/testdata/root.go.golden | 1 + .../cobra/cobra/cmd/testdata/test.go.golden | 1 + vendor/github.com/spf13/cobra/cobra_test.go | 2 +- vendor/github.com/spf13/cobra/command.go | 5 +- .../github.com/spf13/cobra/zsh_completions.go | 126 + .../spf13/cobra/zsh_completions_test.go | 88 + vendor/golang.org/x/crypto/acme/acme.go | 32 - vendor/golang.org/x/crypto/acme/types.go | 34 + .../internal/chacha20/chacha_generic.go | 5 +- vendor/golang.org/x/crypto/cryptobyte/asn1.go | 240 +- .../x/crypto/cryptobyte/asn1/asn1.go | 46 + .../x/crypto/cryptobyte/asn1_test.go | 45 +- .../golang.org/x/crypto/cryptobyte/builder.go | 86 +- .../x/crypto/cryptobyte/cryptobyte_test.go | 49 + .../x/crypto/cryptobyte/example_test.go | 50 +- .../golang.org/x/crypto/cryptobyte/string.go | 16 +- vendor/golang.org/x/crypto/ed25519/ed25519.go | 4 +- vendor/golang.org/x/crypto/nacl/auth/auth.go | 58 + .../x/crypto/nacl/auth/auth_test.go | 172 + .../x/crypto/nacl/auth/example_test.go | 36 + vendor/golang.org/x/crypto/nacl/box/box.go | 21 +- .../x/crypto/nacl/secretbox/secretbox.go | 17 + .../golang.org/x/crypto/openpgp/keys_test.go | 25 +- .../openpgp/packet/symmetric_key_encrypted.go | 6 +- .../packet/symmetric_key_encrypted_test.go | 82 +- .../x/crypto/salsa20/salsa/salsa20_amd64.go | 3 +- .../x/crypto/salsa20/salsa/salsa20_ref.go | 2 +- .../x/crypto/salsa20/salsa/salsa_test.go | 19 + vendor/golang.org/x/crypto/salsa20/salsa20.go | 4 +- vendor/golang.org/x/crypto/sha3/sha3.go | 5 +- .../golang.org/x/crypto/ssh/agent/client.go | 38 +- .../x/crypto/ssh/agent/client_test.go | 63 +- .../golang.org/x/crypto/ssh/agent/server.go | 90 +- .../x/crypto/ssh/agent/server_test.go | 52 +- vendor/golang.org/x/crypto/ssh/keys.go | 43 +- vendor/golang.org/x/crypto/ssh/server.go | 2 +- vendor/golang.org/x/crypto/ssh/session.go | 20 + .../golang.org/x/crypto/ssh/terminal/util.go | 4 + .../x/crypto/ssh/terminal/util_bsd.go | 6 +- .../x/crypto/ssh/terminal/util_linux.go | 9 +- .../x/crypto/ssh/terminal/util_windows.go | 99 +- .../x/crypto/ssh/test/session_test.go | 48 + vendor/golang.org/x/crypto/xts/xts.go | 4 +- vendor/golang.org/x/net/http2/h2i/h2i.go | 8 +- vendor/golang.org/x/net/http2/transport.go | 415 +- .../golang.org/x/net/http2/transport_test.go | 651 +- vendor/golang.org/x/net/idna/idna_test.go | 65 + vendor/golang.org/x/net/route/defs_openbsd.go | 11 + vendor/golang.org/x/net/route/route_test.go | 4 + vendor/golang.org/x/net/route/sys_openbsd.go | 1 + vendor/golang.org/x/net/route/zsys_openbsd.go | 13 +- vendor/golang.org/x/oauth2/example_test.go | 32 +- vendor/golang.org/x/oauth2/google/default.go | 7 + vendor/golang.org/x/oauth2/internal/token.go | 2 +- vendor/golang.org/x/oauth2/oauth2.go | 4 + vendor/golang.org/x/oauth2/oauth2_test.go | 19 + .../golang.org/x/sys/unix/asm_openbsd_arm.s | 29 + vendor/golang.org/x/sys/unix/creds_test.go | 185 +- vendor/golang.org/x/sys/unix/dev_darwin.go | 24 + .../golang.org/x/sys/unix/dev_darwin_test.go | 49 + vendor/golang.org/x/sys/unix/dev_dragonfly.go | 30 + .../x/sys/unix/dev_dragonfly_test.go | 48 + vendor/golang.org/x/sys/unix/dev_freebsd.go | 30 + vendor/golang.org/x/sys/unix/dev_linux.go | 42 + .../golang.org/x/sys/unix/dev_linux_test.go | 51 + vendor/golang.org/x/sys/unix/dev_netbsd.go | 29 + .../golang.org/x/sys/unix/dev_netbsd_test.go | 50 + vendor/golang.org/x/sys/unix/dev_openbsd.go | 29 + .../golang.org/x/sys/unix/dev_openbsd_test.go | 52 + .../x/sys/unix/errors_freebsd_386.go | 227 + .../x/sys/unix/errors_freebsd_amd64.go | 227 + .../x/sys/unix/errors_freebsd_arm.go | 226 + vendor/golang.org/x/sys/unix/flock.go | 2 - .../x/sys/unix/gccgo_linux_sparc64.go | 20 - vendor/golang.org/x/sys/unix/linux/Dockerfile | 11 +- vendor/golang.org/x/sys/unix/linux/types.go | 71 +- vendor/golang.org/x/sys/unix/mkall.sh | 22 +- vendor/golang.org/x/sys/unix/mkerrors.sh | 11 +- .../golang.org/x/sys/unix/mksysnum_netbsd.pl | 2 +- .../golang.org/x/sys/unix/mmap_unix_test.go | 12 + vendor/golang.org/x/sys/unix/pagesize_unix.go | 15 + vendor/golang.org/x/sys/unix/syscall_bsd.go | 31 +- .../golang.org/x/sys/unix/syscall_darwin.go | 55 +- .../x/sys/unix/syscall_darwin_386.go | 2 - .../x/sys/unix/syscall_darwin_amd64.go | 2 - .../x/sys/unix/syscall_darwin_arm.go | 2 - .../x/sys/unix/syscall_darwin_arm64.go | 2 - .../x/sys/unix/syscall_dragonfly.go | 12 +- .../x/sys/unix/syscall_dragonfly_amd64.go | 2 - .../golang.org/x/sys/unix/syscall_freebsd.go | 60 +- .../x/sys/unix/syscall_freebsd_386.go | 2 - .../x/sys/unix/syscall_freebsd_amd64.go | 2 - .../x/sys/unix/syscall_freebsd_arm.go | 2 - .../x/sys/unix/syscall_freebsd_test.go | 9 +- vendor/golang.org/x/sys/unix/syscall_linux.go | 20 +- .../x/sys/unix/syscall_linux_386.go | 2 - .../x/sys/unix/syscall_linux_amd64.go | 2 - .../x/sys/unix/syscall_linux_arm.go | 2 - .../x/sys/unix/syscall_linux_arm64.go | 2 - .../x/sys/unix/syscall_linux_mips64x.go | 2 - .../x/sys/unix/syscall_linux_mipsx.go | 2 - .../x/sys/unix/syscall_linux_ppc64x.go | 2 - .../x/sys/unix/syscall_linux_s390x.go | 2 - .../x/sys/unix/syscall_linux_sparc64.go | 20 - .../golang.org/x/sys/unix/syscall_netbsd.go | 6 +- .../x/sys/unix/syscall_netbsd_386.go | 2 - .../x/sys/unix/syscall_netbsd_amd64.go | 2 - .../x/sys/unix/syscall_netbsd_arm.go | 2 - .../golang.org/x/sys/unix/syscall_openbsd.go | 7 +- .../x/sys/unix/syscall_openbsd_386.go | 2 - .../x/sys/unix/syscall_openbsd_amd64.go | 2 - .../x/sys/unix/syscall_openbsd_arm.go | 40 + .../golang.org/x/sys/unix/syscall_solaris.go | 17 +- vendor/golang.org/x/sys/unix/types_darwin.go | 2 + .../golang.org/x/sys/unix/types_dragonfly.go | 7 + vendor/golang.org/x/sys/unix/types_freebsd.go | 11 + vendor/golang.org/x/sys/unix/types_netbsd.go | 7 + vendor/golang.org/x/sys/unix/types_openbsd.go | 7 + vendor/golang.org/x/sys/unix/types_solaris.go | 4 - .../x/sys/unix/zerrors_darwin_386.go | 32 + .../x/sys/unix/zerrors_darwin_amd64.go | 64 +- .../x/sys/unix/zerrors_darwin_arm.go | 392 +- .../x/sys/unix/zerrors_darwin_arm64.go | 103 +- .../x/sys/unix/zerrors_freebsd_386.go | 2865 ++-- .../x/sys/unix/zerrors_freebsd_arm.go | 2860 ++-- .../x/sys/unix/zerrors_linux_386.go | 63 +- .../x/sys/unix/zerrors_linux_amd64.go | 63 +- .../x/sys/unix/zerrors_linux_arm.go | 63 +- .../x/sys/unix/zerrors_linux_arm64.go | 64 +- .../x/sys/unix/zerrors_linux_mips.go | 62 +- .../x/sys/unix/zerrors_linux_mips64.go | 62 +- .../x/sys/unix/zerrors_linux_mips64le.go | 62 +- .../x/sys/unix/zerrors_linux_mipsle.go | 62 +- .../x/sys/unix/zerrors_linux_ppc64.go | 63 +- .../x/sys/unix/zerrors_linux_ppc64le.go | 63 +- .../x/sys/unix/zerrors_linux_s390x.go | 63 +- .../x/sys/unix/zerrors_netbsd_arm.go | 3 + .../x/sys/unix/zerrors_openbsd_arm.go | 1586 +++ .../x/sys/unix/zsyscall_darwin_386.go | 178 +- .../x/sys/unix/zsyscall_darwin_amd64.go | 178 +- .../x/sys/unix/zsyscall_darwin_arm.go | 357 +- .../x/sys/unix/zsyscall_darwin_arm64.go | 353 +- .../x/sys/unix/zsyscall_dragonfly_amd64.go | 183 +- .../x/sys/unix/zsyscall_freebsd_386.go | 398 +- .../x/sys/unix/zsyscall_freebsd_amd64.go | 350 +- .../x/sys/unix/zsyscall_freebsd_arm.go | 398 +- .../x/sys/unix/zsyscall_linux_386.go | 46 +- .../x/sys/unix/zsyscall_linux_amd64.go | 46 +- .../x/sys/unix/zsyscall_linux_arm.go | 46 +- .../x/sys/unix/zsyscall_linux_arm64.go | 46 +- .../x/sys/unix/zsyscall_linux_mips.go | 46 +- .../x/sys/unix/zsyscall_linux_mips64.go | 46 +- .../x/sys/unix/zsyscall_linux_mips64le.go | 46 +- .../x/sys/unix/zsyscall_linux_mipsle.go | 46 +- .../x/sys/unix/zsyscall_linux_ppc64.go | 46 +- .../x/sys/unix/zsyscall_linux_ppc64le.go | 46 +- .../x/sys/unix/zsyscall_linux_s390x.go | 46 +- .../x/sys/unix/zsyscall_netbsd_386.go | 185 +- .../x/sys/unix/zsyscall_netbsd_amd64.go | 185 +- .../x/sys/unix/zsyscall_netbsd_arm.go | 187 +- .../x/sys/unix/zsyscall_openbsd_386.go | 185 +- .../x/sys/unix/zsyscall_openbsd_amd64.go | 185 +- .../x/sys/unix/zsyscall_openbsd_arm.go | 1404 ++ .../x/sys/unix/zsyscall_solaris_amd64.go | 25 +- .../x/sys/unix/zsysnum_darwin_arm.go | 110 +- .../x/sys/unix/zsysnum_darwin_arm64.go | 50 +- .../x/sys/unix/zsysnum_freebsd_386.go | 686 +- .../x/sys/unix/zsysnum_freebsd_arm.go | 686 +- .../x/sys/unix/zsysnum_linux_386.go | 2 + .../x/sys/unix/zsysnum_linux_amd64.go | 1 + .../x/sys/unix/zsysnum_linux_arm.go | 1 + .../x/sys/unix/zsysnum_linux_arm64.go | 1 + .../x/sys/unix/zsysnum_linux_mips.go | 1 + .../x/sys/unix/zsysnum_linux_mips64.go | 1 + .../x/sys/unix/zsysnum_linux_mips64le.go | 1 + .../x/sys/unix/zsysnum_linux_mipsle.go | 1 + .../x/sys/unix/zsysnum_linux_ppc64.go | 1 + .../x/sys/unix/zsysnum_linux_ppc64le.go | 1 + .../x/sys/unix/zsysnum_linux_s390x.go | 2 + .../x/sys/unix/zsysnum_netbsd_386.go | 1 + .../x/sys/unix/zsysnum_netbsd_amd64.go | 1 + .../x/sys/unix/zsysnum_netbsd_arm.go | 1 + .../x/sys/unix/zsysnum_openbsd_arm.go | 213 + .../x/sys/unix/ztypes_darwin_386.go | 7 + .../x/sys/unix/ztypes_darwin_amd64.go | 7 + .../x/sys/unix/ztypes_darwin_arm.go | 14 + .../x/sys/unix/ztypes_darwin_arm64.go | 14 + .../x/sys/unix/ztypes_dragonfly_amd64.go | 5 + .../x/sys/unix/ztypes_freebsd_386.go | 79 +- .../x/sys/unix/ztypes_freebsd_amd64.go | 14 + .../x/sys/unix/ztypes_freebsd_arm.go | 87 +- .../golang.org/x/sys/unix/ztypes_linux_386.go | 114 +- .../x/sys/unix/ztypes_linux_amd64.go | 114 +- .../golang.org/x/sys/unix/ztypes_linux_arm.go | 114 +- .../x/sys/unix/ztypes_linux_arm64.go | 114 +- .../x/sys/unix/ztypes_linux_mips.go | 114 +- .../x/sys/unix/ztypes_linux_mips64.go | 114 +- .../x/sys/unix/ztypes_linux_mips64le.go | 114 +- .../x/sys/unix/ztypes_linux_mipsle.go | 114 +- .../x/sys/unix/ztypes_linux_ppc64.go | 114 +- .../x/sys/unix/ztypes_linux_ppc64le.go | 114 +- .../x/sys/unix/ztypes_linux_s390x.go | 114 +- .../x/sys/unix/ztypes_netbsd_386.go | 5 + .../x/sys/unix/ztypes_netbsd_amd64.go | 5 + .../x/sys/unix/ztypes_netbsd_arm.go | 5 + .../x/sys/unix/ztypes_openbsd_386.go | 5 + .../x/sys/unix/ztypes_openbsd_amd64.go | 5 + .../x/sys/unix/ztypes_openbsd_arm.go | 439 + .../x/sys/windows/syscall_windows.go | 25 +- .../{ztypes_windows.go => types_windows.go} | 47 + ...es_windows_386.go => types_windows_386.go} | 0 ...indows_amd64.go => types_windows_amd64.go} | 0 .../x/sys/windows/zsyscall_windows.go | 88 +- vendor/google.golang.org/api/.gitignore | 12 + vendor/google.golang.org/api/.hgignore | 11 - vendor/google.golang.org/api/Makefile | 27 - vendor/google.golang.org/api/README.md | 79 +- .../v1/acceleratedmobilepageurl-api.json | 176 +- .../v1.2/adexchangebuyer-api.json | 4 +- .../v1.3/adexchangebuyer-api.json | 4 +- .../v1.4/adexchangebuyer-api.json | 6 +- .../v1.4/adexchangebuyer-gen.go | 3 +- .../v2beta1/adexchangebuyer2-api.json | 5024 +++---- .../v2beta1/adexchangebuyer2-gen.go | 7 +- .../v1/adexperiencereport-api.json | 418 +- .../v1/adexperiencereport-gen.go | 33 +- .../api/adsense/v1.4/adsense-api.json | 4 +- .../api/adsensehost/v4.1/adsensehost-api.json | 4 +- .../api/analytics/v2.4/analytics-api.json | 4 +- .../api/analytics/v3/analytics-api.json | 19 +- .../api/analytics/v3/analytics-gen.go | 65 +- .../v4/analyticsreporting-api.json | 1510 +- .../v1/androiddeviceprovisioning-api.json | 1310 +- .../v1/androiddeviceprovisioning-gen.go | 395 +- .../v1/androidenterprise-api.json | 30 +- .../v1/androidenterprise-gen.go | 87 +- .../v1/androidmanagement-api.json | 528 +- .../v1/androidmanagement-gen.go | 1417 +- .../v1.1/androidpublisher-api.json | 8 +- .../v1.1/androidpublisher-gen.go | 4 + .../v1/androidpublisher-api.json | 4 +- .../v2/androidpublisher-api.json | 22 +- .../v2/androidpublisher-gen.go | 287 +- vendor/google.golang.org/api/api-list.json | 81 +- .../api/appengine/v1/appengine-api.json | 4413 +++--- .../api/appengine/v1/appengine-gen.go | 2282 ++- .../api/appengine/v1alpha/appengine-api.json | 1656 +-- .../api/appengine/v1beta/appengine-api.json | 3638 ++--- .../api/appengine/v1beta/appengine-gen.go | 131 +- .../api/appengine/v1beta4/appengine-api.json | 3432 ++--- .../api/appengine/v1beta5/appengine-api.json | 1954 +-- .../api/appsactivity/v1/appsactivity-api.json | 4 +- .../api/appstate/v1/appstate-api.json | 4 +- .../api/bigquery/v2/bigquery-api.json | 140 +- .../api/bigquery/v2/bigquery-gen.go | 364 +- .../v1/bigquerydatatransfer-api.json | 2621 ++-- .../v1/bigquerydatatransfer-gen.go | 123 +- .../api/books/v1/books-api.json | 2 +- .../api/calendar/v3/calendar-api.json | 4 +- .../api/classroom/v1/classroom-api.json | 2906 ++-- .../api/classroom/v1/classroom-gen.go | 32 +- .../api/cloudbilling/v1/cloudbilling-api.json | 363 +- .../api/cloudbilling/v1/cloudbilling-gen.go | 986 +- .../api/cloudbuild/v1/cloudbuild-api.json | 1472 +- .../api/cloudbuild/v1/cloudbuild-gen.go | 9 +- .../clouddebugger/v2/clouddebugger-api.json | 1574 +-- .../api/clouddebugger/v2/clouddebugger-gen.go | 163 +- .../v1beta1/clouderrorreporting-api.json | 1116 +- .../cloudfunctions/v1/cloudfunctions-api.json | 431 +- .../cloudfunctions/v1/cloudfunctions-gen.go | 4 +- .../v1beta2/cloudfunctions-api.json | 1044 +- .../v1beta2/cloudfunctions-gen.go | 49 +- .../api/cloudkms/v1/cloudkms-api.json | 1711 +-- .../api/cloudkms/v1/cloudkms-gen.go | 326 +- .../v2beta2/cloudmonitoring-api.json | 2 +- .../v1/cloudresourcemanager-api.json | 3040 ++-- .../v1/cloudresourcemanager-gen.go | 4 +- .../v1beta1/cloudresourcemanager-api.json | 1670 +-- .../v1beta1/cloudresourcemanager-gen.go | 3 +- .../v2beta1/cloudresourcemanager-api.json | 1442 +- .../v2beta1/cloudresourcemanager-gen.go | 4 +- .../cloudtasks/v2beta2/cloudtasks-api.json | 1492 ++ .../api/cloudtasks/v2beta2/cloudtasks-gen.go | 5623 ++++++++ .../api/cloudtrace/v1/cloudtrace-api.json | 276 +- .../api/cloudtrace/v2/cloudtrace-api.json | 877 +- .../api/cloudtrace/v2/cloudtrace-gen.go | 37 +- .../api/compute/v0.alpha/compute-api.json | 7023 ++++++++- .../api/compute/v0.alpha/compute-gen.go | 11781 +++++++++++++++- .../api/compute/v0.beta/compute-api.json | 1825 ++- .../api/compute/v0.beta/compute-gen.go | 5390 ++++++- .../api/compute/v1/compute-api.json | 878 +- .../api/compute/v1/compute-gen.go | 3898 ++++- .../api/container/v1/container-api.json | 3733 ++--- .../api/container/v1/container-gen.go | 98 +- .../api/container/v1alpha1/container-api.json | 7 + .../api/container/v1alpha1/container-gen.go | 65 + .../api/container/v1beta1/container-api.json | 2892 ++++ .../api/container/v1beta1/container-gen.go | 9066 ++++++++++++ .../api/content/v2/content-api.json | 20 +- .../api/content/v2/content-gen.go | 32 +- .../api/content/v2sandbox/content-api.json | 4 +- .../api/customsearch/v1/customsearch-api.json | 4 +- .../api/dataflow/v1b3/dataflow-api.json | 5129 +++---- .../api/dataflow/v1b3/dataflow-gen.go | 94 + .../api/dataproc/v1/dataproc-api.json | 2068 +-- .../api/dataproc/v1/dataproc-gen.go | 2 +- .../api/dataproc/v1beta2/dataproc-api.json | 2912 ++-- .../api/dataproc/v1beta2/dataproc-gen.go | 45 +- .../api/datastore/v1/datastore-api.json | 1861 ++- .../api/datastore/v1/datastore-gen.go | 1286 ++ .../api/datastore/v1beta1/datastore-api.json | 463 + .../api/datastore/v1beta1/datastore-gen.go | 1000 ++ .../api/datastore/v1beta3/datastore-api.json | 1279 +- .../api/datastore/v1beta3/datastore-gen.go | 391 + .../v0.alpha/deploymentmanager-api.json | 84 +- .../v0.alpha/deploymentmanager-gen.go | 196 +- .../v2/deploymentmanager-api.json | 42 +- .../v2/deploymentmanager-gen.go | 123 +- .../v2beta/deploymentmanager-api.json | 65 +- .../v2beta/deploymentmanager-gen.go | 164 +- .../dfareporting/v2.7/dfareporting-api.json | 16 +- .../api/dfareporting/v2.7/dfareporting-gen.go | 103 +- .../dfareporting/v2.8/dfareporting-api.json | 26 +- .../api/dfareporting/v2.8/dfareporting-gen.go | 126 +- .../api/discovery/v1/discovery-api.json | 5 +- .../api/dlp/v2beta1/dlp-api.json | 1921 +-- .../api/dlp/v2beta1/dlp-gen.go | 1037 +- .../api/dns/v2beta1/dns-api.json | 4 +- .../v2/doubleclicksearch-api.json | 4 +- .../api/drive/v2/drive-api.json | 15 +- .../api/drive/v2/drive-gen.go | 224 +- .../api/drive/v3/drive-api.json | 15 +- .../api/drive/v3/drive-gen.go | 158 +- .../v1/firebasedynamiclinks-api.json | 720 +- .../v1/firebasedynamiclinks-gen.go | 371 +- .../v1/firebaseremoteconfig-api.json | 275 + .../v1/firebaseremoteconfig-gen.go | 630 + .../firebaserules/v1/firebaserules-api.json | 1170 +- .../api/fusiontables/v1/fusiontables-gen.go | 134 +- .../api/fusiontables/v2/fusiontables-gen.go | 202 +- .../api/games/v1/games-api.json | 4 +- .../gamesconfiguration-api.json | 4 +- .../v1configuration/gamesconfiguration-gen.go | 70 +- .../v1management/gamesmanagement-api.json | 4 +- .../api/genomics/v1/genomics-api.json | 3702 ++--- .../api/genomics/v1/genomics-gen.go | 4 +- .../api/genomics/v1alpha2/genomics-api.json | 1460 +- .../api/genomics/v1alpha2/genomics-gen.go | 4 +- .../google.golang.org/api/gensupport/media.go | 134 +- .../api/gensupport/media_test.go | 196 + .../api/gmail/v1/gmail-api.json | 22 +- .../api/gmail/v1/gmail-gen.go | 466 +- .../api/google-api-go-generator/Makefile | 34 + .../api/google-api-go-generator/gen.go | 59 +- .../groupsmigration/v1/groupsmigration-gen.go | 68 +- .../google.golang.org/api/iam/v1/iam-api.json | 3081 ++-- .../google.golang.org/api/iam/v1/iam-gen.go | 28 +- .../v3/identitytoolkit-api.json | 166 +- .../identitytoolkit/v3/identitytoolkit-gen.go | 425 + .../google.golang.org/api/internal/creds.go | 6 +- .../api/kgsearch/v1/kgsearch-api.json | 68 +- .../api/language/v1/language-api.json | 744 +- .../api/language/v1/language-gen.go | 248 +- .../api/language/v1beta1/language-api.json | 1130 +- .../api/language/v1beta1/language-gen.go | 6 + .../api/language/v1beta2/language-api.json | 1607 ++- .../api/language/v1beta2/language-gen.go | 284 +- .../api/logging/v2/logging-api.json | 3202 +++-- .../api/logging/v2/logging-gen.go | 4544 +++++- .../api/logging/v2beta1/logging-api.json | 2501 ++-- .../api/logging/v2beta1/logging-gen.go | 535 +- .../manufacturers/v1/manufacturers-api.json | 571 +- .../api/manufacturers/v1/manufacturers-gen.go | 19 +- .../api/mirror/v1/mirror-gen.go | 206 +- .../google.golang.org/api/ml/v1/ml-api.json | 3399 ++--- vendor/google.golang.org/api/ml/v1/ml-gen.go | 1073 +- .../api/ml/v1beta1/ml-api.json | 2124 +-- .../api/ml/v1beta1/ml-gen.go | 6438 +-------- .../api/monitoring/v3/monitoring-api.json | 2704 ++-- .../api/monitoring/v3/monitoring-gen.go | 201 +- .../api/oauth2/v1/oauth2-api.json | 4 +- .../api/oauth2/v2/oauth2-api.json | 4 +- vendor/google.golang.org/api/option/option.go | 2 +- .../api/oslogin/v1alpha/oslogin-api.json | 650 +- .../api/partners/v2/partners-api.json | 3892 ++--- .../api/people/v1/people-api.json | 2788 ++-- .../api/people/v1/people-gen.go | 45 +- .../api/playcustomapp/v1/playcustomapp-gen.go | 70 +- .../v1/playmoviespartner-api.json | 1304 +- .../api/plus/v1/plus-api.json | 4 +- .../api/plusdomains/v1/plusdomains-api.json | 4 +- .../api/plusdomains/v1/plusdomains-gen.go | 72 +- .../v1beta1/proximitybeacon-api.json | 1468 +- .../api/pubsub/v1/pubsub-api.json | 1416 +- .../api/pubsub/v1beta1a/pubsub-api.json | 930 +- .../api/pubsub/v1beta2/pubsub-api.json | 2096 +-- .../runtimeconfig/v1/runtimeconfig-api.json | 371 +- .../api/runtimeconfig/v1/runtimeconfig-gen.go | 10 +- .../v1beta1/runtimeconfig-api.json | 1551 +- .../v1beta1/runtimeconfig-gen.go | 18 +- .../api/safebrowsing/v4/safebrowsing-api.json | 740 +- .../api/safebrowsing/v4/safebrowsing-gen.go | 70 + .../api/script/v1/script-api.json | 617 +- .../api/script/v1/script-gen.go | 84 +- .../searchconsole/v1/searchconsole-api.json | 148 +- .../servicecontrol/v1/servicecontrol-api.json | 2307 +-- .../servicecontrol/v1/servicecontrol-gen.go | 66 +- .../v1/servicemanagement-api.json | 2927 ++-- .../v1/servicemanagement-gen.go | 380 +- .../api/serviceuser/v1/serviceuser-api.json | 2742 ++-- .../api/serviceuser/v1/serviceuser-gen.go | 79 +- .../api/sheets/v4/sheets-api.json | 7234 +++++----- .../api/sheets/v4/sheets-gen.go | 1 - .../api/slides/v1/slides-api.json | 3634 ++--- .../api/slides/v1/slides-gen.go | 29 +- .../api/sourcerepo/v1/sourcerepo-api.json | 1118 +- .../api/spanner/v1/spanner-api.json | 4474 +++--- .../api/spanner/v1/spanner-gen.go | 586 +- .../api/speech/v1/speech-api.json | 502 +- .../api/speech/v1/speech-gen.go | 4 +- .../api/speech/v1beta1/speech-api.json | 650 +- .../api/speech/v1beta1/speech-gen.go | 4 +- .../api/sqladmin/v1beta3/sqladmin-api.json | 6 +- .../api/sqladmin/v1beta3/sqladmin-gen.go | 4 +- .../api/sqladmin/v1beta4/sqladmin-api.json | 14 +- .../api/sqladmin/v1beta4/sqladmin-gen.go | 20 +- .../api/storage/v1/storage-api.json | 59 +- .../api/storage/v1/storage-gen.go | 235 +- .../api/storage/v1beta1/storage-api.json | 4 +- .../api/storage/v1beta1/storage-gen.go | 70 +- .../api/storage/v1beta2/storage-api.json | 4 +- .../api/storage/v1beta2/storage-gen.go | 70 +- .../v1/storagetransfer-api.json | 1118 +- .../storagetransfer/v1/storagetransfer-gen.go | 17 +- .../v1/streetviewpublish-api.json | 876 +- .../v1/streetviewpublish-gen.go | 74 +- .../api/testing/v1/testing-api.json | 1347 ++ .../api/testing/v1/testing-gen.go | 2782 ++++ .../toolresults/v1beta3/toolresults-api.json | 187 +- .../toolresults/v1beta3/toolresults-gen.go | 493 +- .../v1beta3firstparty/toolresults-api.json | 187 +- .../v1beta3firstparty/toolresults-gen.go | 493 +- .../api/translate/v2/translate-api.json | 518 +- .../api/transport/grpc/dial.go | 2 +- .../api/transport/grpc/dial_appengine.go | 9 +- .../api/transport/grpc/dial_test.go | 2 +- .../api/transport/http/dial.go | 6 +- .../api/transport/http/dial_appengine.go | 2 +- .../api/vault/v1/vault-api.json | 1381 +- .../api/vault/v1/vault-gen.go | 9 +- .../v1beta1/videointelligence-api.json | 1108 +- .../v1beta1/videointelligence-gen.go | 453 +- .../api/vision/v1/vision-api.json | 1484 +- .../api/vision/v1/vision-gen.go | 6 +- .../api/youtube/v3/youtube-gen.go | 396 +- .../v1/youtubeanalytics-api.json | 4 +- .../v1beta1/youtubeanalytics-api.json | 4 +- .../v1/youtubereporting-api.json | 506 +- vendor/gopkg.in/yaml.v2/LICENSE | 208 +- 926 files changed, 189726 insertions(+), 98666 deletions(-) create mode 100644 vendor/cloud.google.com/go/datastore/client.go create mode 100644 vendor/cloud.google.com/go/errorreporting/error_logging_test.go create mode 100644 vendor/cloud.google.com/go/errorreporting/errors.go create mode 100644 vendor/cloud.google.com/go/errorreporting/errors_test.go create mode 100644 vendor/cloud.google.com/go/errorreporting/stack_test.go create mode 100644 vendor/cloud.google.com/go/language/apiv1/AnalyzeSentiment_smoke_test.go create mode 100644 vendor/cloud.google.com/go/language/apiv1beta2/AnalyzeSentiment_smoke_test.go delete mode 100644 vendor/cloud.google.com/go/pubsub/acker.go delete mode 100644 vendor/cloud.google.com/go/pubsub/acker_test.go delete mode 100644 vendor/cloud.google.com/go/pubsub/iterator_test.go delete mode 100644 vendor/cloud.google.com/go/pubsub/keepalive.go delete mode 100644 vendor/cloud.google.com/go/pubsub/keepalive_test.go delete mode 100644 vendor/cloud.google.com/go/pubsub/puller.go delete mode 100644 vendor/cloud.google.com/go/pubsub/puller_test.go create mode 100644 vendor/cloud.google.com/go/spanner/apiv1/doc.go create mode 100644 vendor/cloud.google.com/go/spanner/apiv1/mock_test.go create mode 100644 vendor/cloud.google.com/go/spanner/apiv1/spanner_client.go create mode 100644 vendor/cloud.google.com/go/spanner/apiv1/spanner_client_example_test.go create mode 100644 vendor/cloud.google.com/go/spanner/value_benchmarks_test.go create mode 100644 vendor/cloud.google.com/go/speech/apiv1/Recognize_smoke_test.go create mode 100644 vendor/cloud.google.com/go/storage/go110.go.pending create mode 100644 vendor/cloud.google.com/go/storage/not_go110.go create mode 100644 vendor/cloud.google.com/go/videointelligence/apiv1beta2/doc.go create mode 100644 vendor/cloud.google.com/go/videointelligence/apiv1beta2/mock_test.go create mode 100644 vendor/cloud.google.com/go/videointelligence/apiv1beta2/video_intelligence_client.go create mode 100644 vendor/cloud.google.com/go/videointelligence/apiv1beta2/video_intelligence_client_example_test.go create mode 100644 vendor/cloud.google.com/go/videointelligence/apiv1beta2/whitelist.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/NOTICE create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/client.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containergroups.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containerlogs.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/models.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/version.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/client.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/eventsubscriptions.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/models.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/operations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topics.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topictypes.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/version.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/buildTerraform.sh create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.7.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.8.go create mode 100644 vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.7.go create mode 100644 vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.8.go create mode 100644 vendor/github.com/cpuguy83/go-md2man/Dockerfile create mode 100644 vendor/github.com/cpuguy83/go-md2man/Gopkg.lock create mode 100644 vendor/github.com/cpuguy83/go-md2man/Gopkg.toml create mode 100644 vendor/github.com/cpuguy83/go-md2man/md2man/roff_test.go delete mode 100644 vendor/github.com/cpuguy83/go-md2man/vendor.yml create mode 100644 vendor/github.com/dustin/go-humanize/.gitignore rename vendor/github.com/{shurcooL/sanitized_anchor_name => dustin/go-humanize}/.travis.yml (86%) create mode 100644 vendor/github.com/dustin/go-humanize/LICENSE create mode 100644 vendor/github.com/dustin/go-humanize/README.markdown create mode 100644 vendor/github.com/dustin/go-humanize/big.go create mode 100644 vendor/github.com/dustin/go-humanize/bigbytes.go create mode 100644 vendor/github.com/dustin/go-humanize/bigbytes_test.go create mode 100644 vendor/github.com/dustin/go-humanize/bytes.go create mode 100644 vendor/github.com/dustin/go-humanize/bytes_test.go create mode 100644 vendor/github.com/dustin/go-humanize/comma.go create mode 100644 vendor/github.com/dustin/go-humanize/comma_test.go create mode 100644 vendor/github.com/dustin/go-humanize/commaf.go create mode 100644 vendor/github.com/dustin/go-humanize/commaf_test.go create mode 100644 vendor/github.com/dustin/go-humanize/common_test.go create mode 100644 vendor/github.com/dustin/go-humanize/ftoa.go create mode 100644 vendor/github.com/dustin/go-humanize/ftoa_test.go create mode 100644 vendor/github.com/dustin/go-humanize/humanize.go create mode 100644 vendor/github.com/dustin/go-humanize/number.go create mode 100644 vendor/github.com/dustin/go-humanize/number_test.go create mode 100644 vendor/github.com/dustin/go-humanize/ordinals.go create mode 100644 vendor/github.com/dustin/go-humanize/ordinals_test.go create mode 100644 vendor/github.com/dustin/go-humanize/si.go create mode 100644 vendor/github.com/dustin/go-humanize/si_test.go create mode 100644 vendor/github.com/dustin/go-humanize/times.go create mode 100644 vendor/github.com/dustin/go-humanize/times_test.go delete mode 100644 vendor/github.com/elithrar/simple-scrypt/compositor.json create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.proto delete mode 100644 vendor/github.com/minio/minio-go/api_functional_v2_test.go delete mode 100644 vendor/github.com/minio/minio-go/api_functional_v4_test.go create mode 100644 vendor/github.com/minio/minio-go/examples/s3/presignedheadobject.go create mode 100644 vendor/github.com/minio/minio-go/functional_tests.go create mode 100644 vendor/github.com/minio/minio-go/transport.go create mode 100644 vendor/github.com/minio/minio-go/transport_1_5.go create mode 100644 vendor/github.com/minio/minio-go/transport_1_6.go create mode 100644 vendor/github.com/russross/blackfriday/doc.go create mode 100644 vendor/github.com/russross/blackfriday/markdown_test.go delete mode 100644 vendor/github.com/shurcooL/sanitized_anchor_name/README.md delete mode 100644 vendor/github.com/shurcooL/sanitized_anchor_name/main.go delete mode 100644 vendor/github.com/shurcooL/sanitized_anchor_name/main_test.go create mode 100644 vendor/github.com/sirupsen/logrus/.gitignore create mode 100644 vendor/github.com/sirupsen/logrus/.travis.yml create mode 100644 vendor/github.com/sirupsen/logrus/CHANGELOG.md rename vendor/github.com/{shurcooL/sanitized_anchor_name => sirupsen/logrus}/LICENSE (86%) create mode 100644 vendor/github.com/sirupsen/logrus/README.md create mode 100644 vendor/github.com/sirupsen/logrus/alt_exit.go create mode 100644 vendor/github.com/sirupsen/logrus/alt_exit_test.go create mode 100644 vendor/github.com/sirupsen/logrus/appveyor.yml create mode 100644 vendor/github.com/sirupsen/logrus/doc.go create mode 100644 vendor/github.com/sirupsen/logrus/entry.go create mode 100644 vendor/github.com/sirupsen/logrus/entry_test.go create mode 100644 vendor/github.com/sirupsen/logrus/example_basic_test.go create mode 100644 vendor/github.com/sirupsen/logrus/example_hook_test.go create mode 100644 vendor/github.com/sirupsen/logrus/exported.go create mode 100644 vendor/github.com/sirupsen/logrus/formatter.go create mode 100644 vendor/github.com/sirupsen/logrus/formatter_bench_test.go create mode 100644 vendor/github.com/sirupsen/logrus/hook_test.go create mode 100644 vendor/github.com/sirupsen/logrus/hooks.go create mode 100644 vendor/github.com/sirupsen/logrus/hooks/syslog/README.md create mode 100644 vendor/github.com/sirupsen/logrus/hooks/syslog/syslog.go create mode 100644 vendor/github.com/sirupsen/logrus/hooks/syslog/syslog_test.go create mode 100644 vendor/github.com/sirupsen/logrus/hooks/test/test.go create mode 100644 vendor/github.com/sirupsen/logrus/hooks/test/test_test.go create mode 100644 vendor/github.com/sirupsen/logrus/json_formatter.go create mode 100644 vendor/github.com/sirupsen/logrus/json_formatter_test.go create mode 100644 vendor/github.com/sirupsen/logrus/logger.go create mode 100644 vendor/github.com/sirupsen/logrus/logger_bench_test.go create mode 100644 vendor/github.com/sirupsen/logrus/logrus.go create mode 100644 vendor/github.com/sirupsen/logrus/logrus_test.go create mode 100644 vendor/github.com/sirupsen/logrus/terminal_bsd.go create mode 100644 vendor/github.com/sirupsen/logrus/terminal_linux.go create mode 100644 vendor/github.com/sirupsen/logrus/text_formatter.go create mode 100644 vendor/github.com/sirupsen/logrus/text_formatter_test.go create mode 100644 vendor/github.com/sirupsen/logrus/writer.go create mode 100644 vendor/github.com/spf13/cobra/zsh_completions.go create mode 100644 vendor/github.com/spf13/cobra/zsh_completions_test.go create mode 100644 vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go create mode 100644 vendor/golang.org/x/crypto/nacl/auth/auth.go create mode 100644 vendor/golang.org/x/crypto/nacl/auth/auth_test.go create mode 100644 vendor/golang.org/x/crypto/nacl/auth/example_test.go create mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_arm.s create mode 100644 vendor/golang.org/x/sys/unix/dev_darwin.go create mode 100644 vendor/golang.org/x/sys/unix/dev_darwin_test.go create mode 100644 vendor/golang.org/x/sys/unix/dev_dragonfly.go create mode 100644 vendor/golang.org/x/sys/unix/dev_dragonfly_test.go create mode 100644 vendor/golang.org/x/sys/unix/dev_freebsd.go create mode 100644 vendor/golang.org/x/sys/unix/dev_linux.go create mode 100644 vendor/golang.org/x/sys/unix/dev_linux_test.go create mode 100644 vendor/golang.org/x/sys/unix/dev_netbsd.go create mode 100644 vendor/golang.org/x/sys/unix/dev_netbsd_test.go create mode 100644 vendor/golang.org/x/sys/unix/dev_openbsd.go create mode 100644 vendor/golang.org/x/sys/unix/dev_openbsd_test.go create mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go create mode 100644 vendor/golang.org/x/sys/unix/pagesize_unix.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go rename vendor/golang.org/x/sys/windows/{ztypes_windows.go => types_windows.go} (96%) rename vendor/golang.org/x/sys/windows/{ztypes_windows_386.go => types_windows_386.go} (100%) rename vendor/golang.org/x/sys/windows/{ztypes_windows_amd64.go => types_windows_amd64.go} (100%) create mode 100644 vendor/google.golang.org/api/.gitignore delete mode 100644 vendor/google.golang.org/api/.hgignore delete mode 100644 vendor/google.golang.org/api/Makefile create mode 100644 vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-api.json create mode 100644 vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-gen.go create mode 100644 vendor/google.golang.org/api/container/v1alpha1/container-api.json create mode 100644 vendor/google.golang.org/api/container/v1alpha1/container-gen.go create mode 100644 vendor/google.golang.org/api/container/v1beta1/container-api.json create mode 100644 vendor/google.golang.org/api/container/v1beta1/container-gen.go create mode 100644 vendor/google.golang.org/api/datastore/v1beta1/datastore-api.json create mode 100644 vendor/google.golang.org/api/datastore/v1beta1/datastore-gen.go create mode 100644 vendor/google.golang.org/api/firebaseremoteconfig/v1/firebaseremoteconfig-api.json create mode 100644 vendor/google.golang.org/api/firebaseremoteconfig/v1/firebaseremoteconfig-gen.go create mode 100644 vendor/google.golang.org/api/google-api-go-generator/Makefile create mode 100644 vendor/google.golang.org/api/testing/v1/testing-api.json create mode 100644 vendor/google.golang.org/api/testing/v1/testing-gen.go diff --git a/Gopkg.lock b/Gopkg.lock index 29563888b..a7eb65bc8 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -10,26 +10,26 @@ [[projects]] name = "cloud.google.com/go" packages = ["compute/metadata"] - revision = "44bcd0b2078ba5e7fedbeb36808d1ed893534750" - version = "v0.11.0" + revision = "5a9e19d4e1e41a734154e44a2132b358afb49a03" + version = "v0.13.0" [[projects]] name = "github.com/Azure/azure-sdk-for-go" packages = ["storage"] - revision = "2d49bb8f2cee530cc16f1f1a9f0aae763dee257d" - version = "v10.2.1-beta" + revision = "df4dd90d076ebbf6e87d08d3f00bfac8ff4bde1a" + version = "v10.3.1-beta" [[projects]] name = "github.com/Azure/go-autorest" packages = ["autorest","autorest/adal","autorest/azure","autorest/date"] - revision = "f6e08fe5e4d45c9a66e40196d3fed5f37331d224" - version = "v8.1.1" + revision = "5432abe734f8d95c78340cd56712f912906e6514" + version = "v8.3.1" [[projects]] name = "github.com/cpuguy83/go-md2man" packages = ["md2man"] - revision = "a65d4d2de4d5f7c74868dfa9b202a3c8be315aaa" - version = "v1.0.6" + revision = "1d903dcb749992f3741d744c0f8376b4bd7eb3e1" + version = "v1.0.7" [[projects]] name = "github.com/dgrijalva/jwt-go" @@ -39,27 +39,33 @@ [[projects]] branch = "master" + name = "github.com/dustin/go-humanize" + packages = ["."] + revision = "79e699ccd02f240a1f1fbbdcee7e64c1c12e41aa" + +[[projects]] name = "github.com/elithrar/simple-scrypt" packages = ["."] - revision = "6724715de445c2e70cdafb7a1a14c8cfe0984210" + revision = "2325946f714c95de4a6088202c402fbdfa64163b" + version = "v1.2.0" [[projects]] name = "github.com/go-ini/ini" packages = ["."] - revision = "d3de07a94d22b4a0972deb4b96d790c2c0ce8333" - version = "v1.28.0" + revision = "20b96f641a5ea98f2f8619ff4f3e061cff4833bd" + version = "v1.28.2" [[projects]] branch = "master" name = "github.com/golang/protobuf" packages = ["proto"] - revision = "748d386b5c1ea99658fd69fe9f03991ce86a90c1" + revision = "17ce1425424ab154092bbb43af630bd647f3bb0d" [[projects]] - branch = "master" name = "github.com/inconshreveable/mousetrap" packages = ["."] revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" + version = "v1.0" [[projects]] branch = "master" @@ -70,8 +76,8 @@ [[projects]] name = "github.com/kurin/blazer" packages = ["b2","base","internal/b2types","internal/blog"] - revision = "612082ed2430716569f1ec816fc6ade849020816" - version = "v0.1.0" + revision = "1a870c3ee8b83e17d762307c6eae8f390ac3f4a0" + version = "v0.1.1" [[projects]] branch = "master" @@ -82,14 +88,14 @@ [[projects]] name = "github.com/minio/minio-go" packages = [".","pkg/credentials","pkg/encrypt","pkg/policy","pkg/s3signer","pkg/s3utils","pkg/set"] - revision = "5ca66c9a35ba1cd674484be99dc97aa0973afe12" - version = "v3.0.0" + revision = "4e0f567303d4cc90ceb055a451959fb9fc391fb9" + version = "3.0.3" [[projects]] branch = "master" name = "github.com/ncw/swift" packages = ["."] - revision = "5068c3506cf003c630c94b92a64e978115394f26" + revision = "9d3f812e23d270d1c66a9a01e20af1005061cdc4" [[projects]] name = "github.com/pkg/errors" @@ -104,10 +110,10 @@ version = "v1.2.1" [[projects]] - branch = "master" name = "github.com/pkg/sftp" packages = ["."] - revision = "4f3e725e885c021085d2fb8a9cc26e30ea1a992f" + revision = "98203f5a8333288eb3163b7c667d4260fe1333e9" + version = "1.0.0" [[projects]] name = "github.com/pkg/xattr" @@ -124,8 +130,8 @@ [[projects]] name = "github.com/russross/blackfriday" packages = ["."] - revision = "0b647d0506a698cca42caca173e55559b12a69f2" - version = "v1.4" + revision = "4048872b16cc0fc2c5fd9eacf0ed2c2fedaa0c8c" + version = "v1.5" [[projects]] name = "github.com/satori/uuid" @@ -134,16 +140,16 @@ version = "v1.1.0" [[projects]] - branch = "master" - name = "github.com/shurcooL/sanitized_anchor_name" + name = "github.com/sirupsen/logrus" packages = ["."] - revision = "541ff5ee47f1dddf6a5281af78307d921524bcb5" + revision = "f006c2ac4710855cf0f916dd6b77acf6b048dc6e" + version = "v1.0.3" [[projects]] branch = "master" name = "github.com/spf13/cobra" packages = [".","doc"] - revision = "f20b4e9c32bb3e9d44773ca208db814f24dcd21b" + revision = "b78744579491c1ceeaaa3b40205e56b0591b93a3" [[projects]] name = "github.com/spf13/pflag" @@ -155,31 +161,31 @@ branch = "master" name = "golang.org/x/crypto" packages = ["curve25519","ed25519","ed25519/internal/edwards25519","pbkdf2","poly1305","scrypt","ssh","ssh/terminal"] - revision = "6914964337150723782436d56b3f21610a74ce7b" + revision = "faadfbdc035307d901e69eea569f5dda451a3ee3" [[projects]] branch = "master" name = "golang.org/x/net" packages = ["context","context/ctxhttp"] - revision = "ab5485076ff3407ad2d02db054635913f017b0ed" + revision = "b129b8e0fbeb39c8358e51a07ab6c50ad415e72e" [[projects]] branch = "master" name = "golang.org/x/oauth2" packages = [".","google","internal","jws","jwt"] - revision = "96fca6c793ec32f068f97942ae3c7c073810dfc1" + revision = "13449ad91cb26cb47661c1b080790392170385fd" [[projects]] branch = "master" name = "golang.org/x/sys" - packages = ["unix"] - revision = "c4489faa6e5ab84c0ef40d6ee878f7a030281f0f" + packages = ["unix","windows"] + revision = "062cd7e4e68206d8bab9b18396626e855c992658" [[projects]] branch = "master" name = "google.golang.org/api" packages = ["gensupport","googleapi","googleapi/internal/uritemplates","storage/v1"] - revision = "93a219feb72690ca01348faec80d5a076a32f688" + revision = "2fe03ca2dc379c00d654a4459d1a50812cac2848" [[projects]] name = "google.golang.org/appengine" @@ -191,11 +197,11 @@ branch = "v2" name = "gopkg.in/yaml.v2" packages = ["."] - revision = "25c4ec802a7d637f88d584ab26798e94ad14c13b" + revision = "eb3733d160e74a9c7e442f435eb3bea458e1d19f" [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "86ff1296a8516e9135089cc88fd98cbacdc7d9986f7120557b63ab1cd789e00c" + inputs-digest = "53e4779dc4c7de2cd8b195f13c215c24da5efc5e33acf584615b5c43bfefd2db" solver-name = "gps-cdcl" solver-version = 1 diff --git a/vendor/cloud.google.com/go/README.md b/vendor/cloud.google.com/go/README.md index 4fa839396..4857b1d74 100644 --- a/vendor/cloud.google.com/go/README.md +++ b/vendor/cloud.google.com/go/README.md @@ -33,6 +33,51 @@ make backwards-incompatible changes. ## News +_September 8, 2017_ + +*v0.13.0* + +- bigquery: UseLegacySQL options for CreateTable and QueryConfig. Use these + options to continue using Legacy SQL after the client switches its default + to Standard SQL. + +- bigquery: Support for updating dataset labels. + +- bigquery: Set DatasetIterator.ProjectID to list datasets in a project other + than the client's. DatasetsInProject is no longer needed and is deprecated. + +- bigtable: Fail ListInstances when any zones fail. + +- spanner: support decoding of slices of basic types (e.g. []string, []int64, + etc.) + +- logging/logadmin: UpdateSink no longer creates a sink if it is missing + (actually a change to the underlying service, not the client) + +- profiler: Service and ServiceVersion replace Target in Config. + +_August 22, 2017_ + +*v0.12.0* + +- pubsub: Subscription.Receive now uses streaming pull. + +- pubsub: add Client.TopicInProject to access topics in a different project + than the client. + +- errors: renamed errorreporting. The errors package will be removed shortly. + +- datastore: improved retry behavior. + +- bigquery: support updates to dataset metadata, with etags. + +- bigquery: add etag support to Table.Update (BREAKING: etag argument added). + +- bigquery: generate all job IDs on the client. + +- storage: support bucket lifecycle configurations. + + _July 31, 2017_ *v0.11.0* @@ -88,7 +133,7 @@ Google API | Status | Package [Translation][cloud-translation] | stable | [`cloud.google.com/go/translate`][cloud-translation-ref] [Trace][cloud-trace] | alpha | [`cloud.google.com/go/trace`][cloud-trace-ref] [Video Intelligence][cloud-video]| beta | [`cloud.google.com/go/videointelligence/apiv1beta1`][cloud-video-ref] -[ErrorReporting][cloud-errors] | alpha | [`cloud.google.com/go/errors`][cloud-errors-ref] +[ErrorReporting][cloud-errors] | alpha | [`cloud.google.com/go/errorreporting`][cloud-errors-ref] > **Alpha status**: the API is still being actively developed. As a @@ -455,6 +500,6 @@ for more information. [cloud-video-ref]: https://godoc.org/cloud.google.com/go/videointelligence/apiv1beta1 [cloud-errors]: https://cloud.google.com/error-reporting/ -[cloud-errors-ref]: https://godoc.org/cloud.google.com/go/errors +[cloud-errors-ref]: https://godoc.org/cloud.google.com/go/errorreporting [default-creds]: https://developers.google.com/identity/protocols/application-default-credentials diff --git a/vendor/cloud.google.com/go/bigquery/copy_test.go b/vendor/cloud.google.com/go/bigquery/copy_test.go index 30cf45eba..9da3dd435 100644 --- a/vendor/cloud.google.com/go/bigquery/copy_test.go +++ b/vendor/cloud.google.com/go/bigquery/copy_test.go @@ -19,12 +19,14 @@ import ( "cloud.google.com/go/internal/testutil" + "github.com/google/go-cmp/cmp/cmpopts" "golang.org/x/net/context" bq "google.golang.org/api/bigquery/v2" ) func defaultCopyJob() *bq.Job { return &bq.Job{ + JobReference: &bq.JobReference{ProjectId: "client-project-id"}, Configuration: &bq.JobConfiguration{ Copy: &bq.JobConfigurationTableCopy{ DestinationTable: &bq.TableReference{ @@ -106,16 +108,13 @@ func TestCopy(t *testing.T) { config: CopyConfig{JobID: "job-id"}, want: func() *bq.Job { j := defaultCopyJob() - j.JobReference = &bq.JobReference{ - JobId: "job-id", - ProjectId: "client-project-id", - } + j.JobReference.JobId = "job-id" return j }(), }, } - for _, tc := range testCases { + for i, tc := range testCases { s := &testService{} c := &Client{ service: s, @@ -127,11 +126,24 @@ func TestCopy(t *testing.T) { tc.config.Dst = tc.dst copier.CopyConfig = tc.config if _, err := copier.Run(context.Background()); err != nil { - t.Errorf("err calling Run: %v", err) + t.Errorf("#%d: err calling Run: %v", i, err) continue } - if !testutil.Equal(s.Job, tc.want) { - t.Errorf("copying: got:\n%v\nwant:\n%v", s.Job, tc.want) - } + checkJob(t, i, s.Job, tc.want) + } +} + +func checkJob(t *testing.T, i int, got, want *bq.Job) { + if got.JobReference == nil { + t.Errorf("#%d: empty job reference", i) + return + } + if got.JobReference.JobId == "" { + t.Errorf("#%d: empty job ID", i) + return + } + d := testutil.Diff(got, want, cmpopts.IgnoreFields(bq.JobReference{}, "JobId")) + if d != "" { + t.Errorf("#%d: (got=-, want=+) %s", i, d) } } diff --git a/vendor/cloud.google.com/go/bigquery/create_table_test.go b/vendor/cloud.google.com/go/bigquery/create_table_test.go index 4c610c80b..8f586abf8 100644 --- a/vendor/cloud.google.com/go/bigquery/create_table_test.go +++ b/vendor/cloud.google.com/go/bigquery/create_table_test.go @@ -108,3 +108,15 @@ func TestCreateTableOptions(t *testing.T) { } } } + +func TestCreateTableOptionsLegacySQL(t *testing.T) { + c := &Client{ + projectID: "p", + service: &bigqueryService{}, + } + ds := c.Dataset("d") + table := ds.Table("t") + if err := table.Create(context.Background(), UseStandardSQL(), UseLegacySQL()); err == nil { + t.Fatal("no error using both standard and legacy SQL options") + } +} diff --git a/vendor/cloud.google.com/go/bigquery/dataset.go b/vendor/cloud.google.com/go/bigquery/dataset.go index 80eacf659..04e4a643e 100644 --- a/vendor/cloud.google.com/go/bigquery/dataset.go +++ b/vendor/cloud.google.com/go/bigquery/dataset.go @@ -17,6 +17,8 @@ package bigquery import ( "time" + "cloud.google.com/go/internal/optional" + "golang.org/x/net/context" "google.golang.org/api/iterator" ) @@ -30,16 +32,49 @@ type Dataset struct { type DatasetMetadata struct { CreationTime time.Time - LastModifiedTime time.Time // When the dataset or any of its tables were modified. - DefaultTableExpiration time.Duration - Description string // The user-friendly description of this table. - Name string // The user-friendly name for this table. + LastModifiedTime time.Time // When the dataset or any of its tables were modified. + DefaultTableExpiration time.Duration // The default expiration time for new tables. + Description string // The user-friendly description of this dataset. + Name string // The user-friendly name for this dataset. ID string Location string // The geo location of the dataset. Labels map[string]string // User-provided labels. + + // ETag is the ETag obtained when reading metadata. Pass it to Dataset.Update to + // ensure that the metadata hasn't changed since it was read. + ETag string // TODO(jba): access rules } +type DatasetMetadataToUpdate struct { + Description optional.String // The user-friendly description of this table. + Name optional.String // The user-friendly name for this dataset. + // DefaultTableExpiration is the the default expiration time for new tables. + // If set to time.Duration(0), new tables never expire. + DefaultTableExpiration optional.Duration + + setLabels map[string]string + deleteLabels map[string]bool +} + +// SetLabel causes a label to be added or modified when dm is used +// in a call to Dataset.Update. +func (dm *DatasetMetadataToUpdate) SetLabel(name, value string) { + if dm.setLabels == nil { + dm.setLabels = map[string]string{} + } + dm.setLabels[name] = value +} + +// DeleteLabel causes a label to be deleted when dm is used in a +// call to Dataset.Update. +func (dm *DatasetMetadataToUpdate) DeleteLabel(name string) { + if dm.deleteLabels == nil { + dm.deleteLabels = map[string]bool{} + } + dm.deleteLabels[name] = true +} + // Dataset creates a handle to a BigQuery dataset in the client's project. func (c *Client) Dataset(id string) *Dataset { return c.DatasetInProject(c.projectID, id) @@ -70,6 +105,14 @@ func (d *Dataset) Metadata(ctx context.Context) (*DatasetMetadata, error) { return d.c.service.getDatasetMetadata(ctx, d.ProjectID, d.DatasetID) } +// Update modifies specific Dataset metadata fields. +// To perform a read-modify-write that protects against intervening reads, +// set the etag argument to the DatasetMetadata.ETag field from the read. +// Pass the empty string for etag for a "blind write" that will always succeed. +func (d *Dataset) Update(ctx context.Context, dm DatasetMetadataToUpdate, etag string) (*DatasetMetadata, error) { + return d.c.service.patchDataset(ctx, d.ProjectID, d.DatasetID, &dm, etag) +} + // Table creates a handle to a BigQuery table in the dataset. // To determine if a table exists, call Table.Metadata. // If the table does not already exist, use Table.Create to create it. @@ -126,17 +169,21 @@ func (it *TableIterator) fetch(pageSize int, pageToken string) (string, error) { return tok, nil } -// Datasets returns an iterator over the datasets in the Client's project. +// Datasets returns an iterator over the datasets in a project. +// The Client's project is used by default, but that can be +// changed by setting ProjectID on the returned iterator before calling Next. func (c *Client) Datasets(ctx context.Context) *DatasetIterator { return c.DatasetsInProject(ctx, c.projectID) } // DatasetsInProject returns an iterator over the datasets in the provided project. +// +// Deprecated: call Client.Datasets, then set ProjectID on the returned iterator. func (c *Client) DatasetsInProject(ctx context.Context, projectID string) *DatasetIterator { it := &DatasetIterator{ ctx: ctx, c: c, - projectID: projectID, + ProjectID: projectID, } it.pageInfo, it.nextFunc = iterator.NewPageInfo( it.fetch, @@ -148,18 +195,23 @@ func (c *Client) DatasetsInProject(ctx context.Context, projectID string) *Datas // DatasetIterator iterates over the datasets in a project. type DatasetIterator struct { // ListHidden causes hidden datasets to be listed when set to true. + // Set before the first call to Next. ListHidden bool // Filter restricts the datasets returned by label. The filter syntax is described in // https://cloud.google.com/bigquery/docs/labeling-datasets#filtering_datasets_using_labels + // Set before the first call to Next. Filter string - ctx context.Context - projectID string - c *Client - pageInfo *iterator.PageInfo - nextFunc func() error - items []*Dataset + // The project ID of the listed datasets. + // Set before the first call to Next. + ProjectID string + + ctx context.Context + c *Client + pageInfo *iterator.PageInfo + nextFunc func() error + items []*Dataset } // PageInfo supports pagination. See the google.golang.org/api/iterator package for details. @@ -175,7 +227,7 @@ func (it *DatasetIterator) Next() (*Dataset, error) { } func (it *DatasetIterator) fetch(pageSize int, pageToken string) (string, error) { - datasets, nextPageToken, err := it.c.service.listDatasets(it.ctx, it.projectID, + datasets, nextPageToken, err := it.c.service.listDatasets(it.ctx, it.ProjectID, pageSize, pageToken, it.ListHidden, it.Filter) if err != nil { return "", err diff --git a/vendor/cloud.google.com/go/bigquery/examples_test.go b/vendor/cloud.google.com/go/bigquery/examples_test.go index 5ceafff71..61186a77a 100644 --- a/vendor/cloud.google.com/go/bigquery/examples_test.go +++ b/vendor/cloud.google.com/go/bigquery/examples_test.go @@ -262,6 +262,44 @@ func ExampleDataset_Metadata() { fmt.Println(md) } +// This example illustrates how to perform a read-modify-write sequence on dataset +// metadata. Passing the metadata's ETag to the Update call ensures that the call +// will fail if the metadata was changed since the read. +func ExampleDataset_Update_readModifyWrite() { + ctx := context.Background() + client, err := bigquery.NewClient(ctx, "project-id") + if err != nil { + // TODO: Handle error. + } + ds := client.Dataset("my_dataset") + md, err := ds.Metadata(ctx) + if err != nil { + // TODO: Handle error. + } + md2, err := ds.Update(ctx, + bigquery.DatasetMetadataToUpdate{Name: "new " + md.Name}, + md.ETag) + if err != nil { + // TODO: Handle error. + } + fmt.Println(md2) +} + +// To perform a blind write, ignoring the existing state (and possibly overwriting +// other updates), pass the empty string as the etag. +func ExampleDataset_Update_blindWrite() { + ctx := context.Background() + client, err := bigquery.NewClient(ctx, "project-id") + if err != nil { + // TODO: Handle error. + } + md, err := client.Dataset("my_dataset").Update(ctx, bigquery.DatasetMetadataToUpdate{Name: "blind"}, "") + if err != nil { + // TODO: Handle error. + } + fmt.Println(md) +} + func ExampleDataset_Table() { ctx := context.Background() client, err := bigquery.NewClient(ctx, "project-id") @@ -356,6 +394,7 @@ func ExampleTable_Create() { } } +// If you know your table's schema initially, pass a Schema to Create. func ExampleTable_Create_schema() { ctx := context.Background() // Infer table schema from a Go type. @@ -476,6 +515,8 @@ func ExampleTable_LoaderFrom() { } gcsRef := bigquery.NewGCSReference("gs://my-bucket/my-object") gcsRef.AllowJaggedRows = true + gcsRef.MaxBadRecords = 5 + gcsRef.Schema = schema // TODO: set other options on the GCSReference. ds := client.Dataset("my_dataset") loader := ds.Table("my_table").LoaderFrom(gcsRef) @@ -506,6 +547,8 @@ func ExampleTable_LoaderFrom_reader() { } rs := bigquery.NewReaderSource(f) rs.AllowJaggedRows = true + rs.MaxBadRecords = 5 + rs.Schema = schema // TODO: set other options on the GCSReference. ds := client.Dataset("my_dataset") loader := ds.Table("my_table").LoaderFrom(rs) @@ -534,7 +577,32 @@ func ExampleTable_Read() { _ = it // TODO: iterate using Next or iterator.Pager. } -func ExampleTable_Update() { +// This example illustrates how to perform a read-modify-write sequence on table +// metadata. Passing the metadata's ETag to the Update call ensures that the call +// will fail if the metadata was changed since the read. +func ExampleTable_Update_readModifyWrite() { + ctx := context.Background() + client, err := bigquery.NewClient(ctx, "project-id") + if err != nil { + // TODO: Handle error. + } + t := client.Dataset("my_dataset").Table("my_table") + md, err := t.Metadata(ctx) + if err != nil { + // TODO: Handle error. + } + md2, err := t.Update(ctx, + bigquery.TableMetadataToUpdate{Name: "new " + md.Name}, + md.ETag) + if err != nil { + // TODO: Handle error. + } + fmt.Println(md2) +} + +// To perform a blind write, ignoring the existing state (and possibly overwriting +// other updates), pass the empty string as the etag. +func ExampleTable_Update_blindWrite() { ctx := context.Background() client, err := bigquery.NewClient(ctx, "project-id") if err != nil { @@ -543,7 +611,7 @@ func ExampleTable_Update() { t := client.Dataset("my_dataset").Table("my_table") tm, err := t.Update(ctx, bigquery.TableMetadataToUpdate{ Description: "my favorite table", - }) + }, "") if err != nil { // TODO: Handle error. } diff --git a/vendor/cloud.google.com/go/bigquery/extract_test.go b/vendor/cloud.google.com/go/bigquery/extract_test.go index e32e1dd82..1719775a9 100644 --- a/vendor/cloud.google.com/go/bigquery/extract_test.go +++ b/vendor/cloud.google.com/go/bigquery/extract_test.go @@ -17,8 +17,6 @@ package bigquery import ( "testing" - "cloud.google.com/go/internal/testutil" - "golang.org/x/net/context" bq "google.golang.org/api/bigquery/v2" @@ -26,10 +24,11 @@ import ( func defaultExtractJob() *bq.Job { return &bq.Job{ + JobReference: &bq.JobReference{ProjectId: "client-project-id"}, Configuration: &bq.JobConfiguration{ Extract: &bq.JobConfigurationExtract{ SourceTable: &bq.TableReference{ - ProjectId: "project-id", + ProjectId: "client-project-id", DatasetId: "dataset-id", TableId: "table-id", }, @@ -43,7 +42,7 @@ func TestExtract(t *testing.T) { s := &testService{} c := &Client{ service: s, - projectID: "project-id", + projectID: "client-project-id", } testCases := []struct { @@ -87,17 +86,15 @@ func TestExtract(t *testing.T) { }, } - for _, tc := range testCases { + for i, tc := range testCases { ext := tc.src.ExtractorTo(tc.dst) tc.config.Src = ext.Src tc.config.Dst = ext.Dst ext.ExtractConfig = tc.config if _, err := ext.Run(context.Background()); err != nil { - t.Errorf("err calling extract: %v", err) + t.Errorf("#%d: err calling extract: %v", i, err) continue } - if !testutil.Equal(s.Job, tc.want) { - t.Errorf("extracting: got:\n%v\nwant:\n%v", s.Job, tc.want) - } + checkJob(t, i, s.Job, tc.want) } } diff --git a/vendor/cloud.google.com/go/bigquery/integration_test.go b/vendor/cloud.google.com/go/bigquery/integration_test.go index 4b41406c8..f693070c1 100644 --- a/vendor/cloud.google.com/go/bigquery/integration_test.go +++ b/vendor/cloud.google.com/go/bigquery/integration_test.go @@ -43,7 +43,10 @@ var ( dataset *Dataset schema = Schema{ {Name: "name", Type: StringFieldType}, - {Name: "num", Type: IntegerFieldType}, + {Name: "nums", Type: IntegerFieldType, Repeated: true}, + {Name: "rec", Type: RecordFieldType, Schema: Schema{ + {Name: "bool", Type: BooleanFieldType}, + }}, } testTableExpiration time.Time ) @@ -218,6 +221,119 @@ func TestIntegration_DatasetDelete(t *testing.T) { } } +func TestIntegration_DatasetUpdateETags(t *testing.T) { + if client == nil { + t.Skip("Integration tests skipped") + } + + check := func(md *DatasetMetadata, wantDesc, wantName string) { + if md.Description != wantDesc { + t.Errorf("description: got %q, want %q", md.Description, wantDesc) + } + if md.Name != wantName { + t.Errorf("name: got %q, want %q", md.Name, wantName) + } + } + + ctx := context.Background() + md, err := dataset.Metadata(ctx) + if err != nil { + t.Fatal(err) + } + if md.ETag == "" { + t.Fatal("empty ETag") + } + // Write without ETag succeeds. + desc := md.Description + "d2" + name := md.Name + "n2" + md2, err := dataset.Update(ctx, DatasetMetadataToUpdate{Description: desc, Name: name}, "") + if err != nil { + t.Fatal(err) + } + check(md2, desc, name) + + // Write with original ETag fails because of intervening write. + _, err = dataset.Update(ctx, DatasetMetadataToUpdate{Description: "d", Name: "n"}, md.ETag) + if err == nil { + t.Fatal("got nil, want error") + } + + // Write with most recent ETag succeeds. + md3, err := dataset.Update(ctx, DatasetMetadataToUpdate{Description: "", Name: ""}, md2.ETag) + if err != nil { + t.Fatal(err) + } + check(md3, "", "") +} + +func TestIntegration_DatasetUpdateDefaultExpiration(t *testing.T) { + if client == nil { + t.Skip("Integration tests skipped") + } + ctx := context.Background() + md, err := dataset.Metadata(ctx) + if err != nil { + t.Fatal(err) + } + // Set the default expiration time. + md, err = dataset.Update(ctx, + DatasetMetadataToUpdate{DefaultTableExpiration: time.Hour}, "") + if err != nil { + t.Fatal(err) + } + if md.DefaultTableExpiration != time.Hour { + t.Fatalf("got %s, want 1h", md.DefaultTableExpiration) + } + // Omitting DefaultTableExpiration doesn't change it. + md, err = dataset.Update(ctx, DatasetMetadataToUpdate{Name: "xyz"}, "") + if err != nil { + t.Fatal(err) + } + if md.DefaultTableExpiration != time.Hour { + t.Fatalf("got %s, want 1h", md.DefaultTableExpiration) + } + // Setting it to 0 deletes it (which looks like a 0 duration). + md, err = dataset.Update(ctx, + DatasetMetadataToUpdate{DefaultTableExpiration: time.Duration(0)}, "") + if err != nil { + t.Fatal(err) + } + if md.DefaultTableExpiration != 0 { + t.Fatalf("got %s, want 0", md.DefaultTableExpiration) + } +} + +func TestIntegration_DatasetUpdateLabels(t *testing.T) { + if client == nil { + t.Skip("Integration tests skipped") + } + ctx := context.Background() + md, err := dataset.Metadata(ctx) + if err != nil { + t.Fatal(err) + } + // TODO(jba): use a separate dataset for each test run so + // tests don't interfere with each other. + var dm DatasetMetadataToUpdate + dm.SetLabel("label", "value") + md, err = dataset.Update(ctx, dm, "") + if err != nil { + t.Fatal(err) + } + if got, want := md.Labels["label"], "value"; got != want { + t.Errorf("got %q, want %q", got, want) + } + dm = DatasetMetadataToUpdate{} + dm.DeleteLabel("label") + md, err = dataset.Update(ctx, dm, "") + if err != nil { + t.Fatal(err) + } + if _, ok := md.Labels["label"]; ok { + t.Error("label still present after deletion") + } +} + func TestIntegration_Tables(t *testing.T) { if client == nil { t.Skip("Integration tests skipped") @@ -274,7 +390,7 @@ func TestIntegration_UploadAndRead(t *testing.T) { saverRows []*ValuesSaver ) for i, name := range []string{"a", "b", "c"} { - row := []Value{name, int64(i)} + row := []Value{name, []Value{int64(i)}, []Value{true}} wantRows = append(wantRows, row) saverRows = append(saverRows, &ValuesSaver{ Schema: schema, @@ -296,7 +412,8 @@ func TestIntegration_UploadAndRead(t *testing.T) { checkRead(t, "upload", table.Read(ctx), wantRows) // Query the table. - q := client.Query(fmt.Sprintf("select name, num from %s", table.TableID)) + q := client.Query(fmt.Sprintf("select name, nums, rec from %s", table.TableID)) + q.UseStandardSQL = true q.DefaultProjectID = dataset.ProjectID q.DefaultDatasetID = dataset.DatasetID @@ -361,9 +478,11 @@ func TestIntegration_UploadAndRead(t *testing.T) { if got, want := len(vm), len(vl); got != want { t.Fatalf("valueMap len: got %d, want %d", got, want) } + // With maps, structs become nested maps. + vl[2] = map[string]Value{"bool": vl[2].([]Value)[0]} for i, v := range vl { - if got, want := vm[schema[i].Name], v; got != want { - t.Errorf("%d, name=%s: got %v, want %v", + if got, want := vm[schema[i].Name], v; !testutil.Equal(got, want) { + t.Errorf("%d, name=%s: got %#v, want %#v", i, schema[i].Name, got, want) } } @@ -520,7 +639,7 @@ func (b byName) Len() int { return len(b) } func (b byName) Swap(i, j int) { b[i], b[j] = b[j], b[i] } func (b byName) Less(i, j int) bool { return b[i].Name < b[j].Name } -func TestIntegration_Update(t *testing.T) { +func TestIntegration_TableUpdate(t *testing.T) { if client == nil { t.Skip("Integration tests skipped") } @@ -535,10 +654,12 @@ func TestIntegration_Update(t *testing.T) { } wantDescription := tm.Description + "more" wantName := tm.Name + "more" + wantExpiration := tm.ExpirationTime.Add(time.Hour * 24) got, err := table.Update(ctx, TableMetadataToUpdate{ - Description: wantDescription, - Name: wantName, - }) + Description: wantDescription, + Name: wantName, + ExpirationTime: wantExpiration, + }, tm.ETag) if err != nil { t.Fatal(err) } @@ -548,10 +669,24 @@ func TestIntegration_Update(t *testing.T) { if got.Name != wantName { t.Errorf("Name: got %q, want %q", got.Name, wantName) } + if got.ExpirationTime != wantExpiration { + t.Errorf("ExpirationTime: got %q, want %q", got.ExpirationTime, wantExpiration) + } if !testutil.Equal(got.Schema, schema) { t.Errorf("Schema: got %v, want %v", pretty.Value(got.Schema), pretty.Value(schema)) } + // Blind write succeeds. + _, err = table.Update(ctx, TableMetadataToUpdate{Name: "x"}, "") + if err != nil { + t.Fatal(err) + } + // Write with old etag fails. + _, err = table.Update(ctx, TableMetadataToUpdate{Name: "y"}, got.ETag) + if err == nil { + t.Fatal("Update with old ETag succeeded, wanted failure") + } + // Test schema update. // Columns can be added. schema2 is the same as schema, except for the // added column in the middle. @@ -561,24 +696,25 @@ func TestIntegration_Update(t *testing.T) { } schema2 := Schema{ schema[0], - {Name: "rec", Type: RecordFieldType, Schema: nested}, + {Name: "rec2", Type: RecordFieldType, Schema: nested}, schema[1], + schema[2], } - got, err = table.Update(ctx, TableMetadataToUpdate{Schema: schema2}) + got, err = table.Update(ctx, TableMetadataToUpdate{Schema: schema2}, "") if err != nil { t.Fatal(err) } // Wherever you add the column, it appears at the end. - schema3 := Schema{schema2[0], schema2[2], schema2[1]} + schema3 := Schema{schema2[0], schema2[2], schema2[3], schema2[1]} if !testutil.Equal(got.Schema, schema3) { t.Errorf("add field:\ngot %v\nwant %v", pretty.Value(got.Schema), pretty.Value(schema3)) } // Updating with the empty schema succeeds, but is a no-op. - got, err = table.Update(ctx, TableMetadataToUpdate{Schema: Schema{}}) + got, err = table.Update(ctx, TableMetadataToUpdate{Schema: Schema{}}, "") if err != nil { t.Fatal(err) } @@ -587,30 +723,31 @@ func TestIntegration_Update(t *testing.T) { pretty.Value(got.Schema), pretty.Value(schema3)) } - // Error cases. + // Error cases when updating schema. for _, test := range []struct { desc string fields []*FieldSchema }{ {"change from optional to required", []*FieldSchema{ - schema3[0], - {Name: "num", Type: IntegerFieldType, Required: true}, + {Name: "name", Type: StringFieldType, Required: true}, + schema3[1], schema3[2], + schema3[3], }}, {"add a required field", []*FieldSchema{ - schema3[0], schema3[1], schema3[2], + schema3[0], schema3[1], schema3[2], schema3[3], {Name: "req", Type: StringFieldType, Required: true}, }}, - {"remove a field", []*FieldSchema{schema3[0], schema3[1]}}, + {"remove a field", []*FieldSchema{schema3[0], schema3[1], schema3[2]}}, {"remove a nested field", []*FieldSchema{ - schema3[0], schema3[1], - {Name: "rec", Type: RecordFieldType, Schema: Schema{nested[0]}}}}, + schema3[0], schema3[1], schema3[2], + {Name: "rec2", Type: RecordFieldType, Schema: Schema{nested[0]}}}}, {"remove all nested fields", []*FieldSchema{ - schema3[0], schema3[1], - {Name: "rec", Type: RecordFieldType, Schema: Schema{}}}}, + schema3[0], schema3[1], schema3[2], + {Name: "rec2", Type: RecordFieldType, Schema: Schema{}}}}, } { for { - _, err = table.Update(ctx, TableMetadataToUpdate{Schema: Schema(test.fields)}) + _, err = table.Update(ctx, TableMetadataToUpdate{Schema: Schema(test.fields)}, "") if !hasStatusCode(err, 403) { break } @@ -631,7 +768,11 @@ func TestIntegration_Load(t *testing.T) { t.Skip("Integration tests skipped") } ctx := context.Background() - table := newTable(t, schema) + // CSV data can't be loaded into a repeated field, so we use a different schema. + table := newTable(t, Schema{ + {Name: "name", Type: StringFieldType}, + {Name: "nums", Type: IntegerFieldType}, + }) defer table.Delete(ctx) // Load the table from a reader. @@ -666,20 +807,22 @@ func TestIntegration_DML(t *testing.T) { // Use DML to insert. wantRows := [][]Value{ - []Value{"a", int64(0)}, - []Value{"b", int64(1)}, - []Value{"c", int64(2)}, + []Value{"a", []Value{int64(0)}, []Value{true}}, + []Value{"b", []Value{int64(1)}, []Value{false}}, + []Value{"c", []Value{int64(2)}, []Value{true}}, } - query := fmt.Sprintf("INSERT bigquery_integration_test.%s (name, num) "+ - "VALUES ('a', 0), ('b', 1), ('c', 2)", + query := fmt.Sprintf("INSERT bigquery_integration_test.%s (name, nums, rec) "+ + "VALUES ('a', [0], STRUCT(TRUE)), ('b', [1], STRUCT(FALSE)), ('c', [2], STRUCT(TRUE))", table.TableID) q := client.Query(query) q.UseStandardSQL = true // necessary for DML job, err := q.Run(ctx) if err != nil { + fmt.Printf("q.Run: %v\n", err) return false, err } if err := wait(ctx, job); err != nil { + fmt.Printf("wait: %v\n", err) return false, err } if msg, ok := compareRead(table.Read(ctx), wantRows); !ok { @@ -890,7 +1033,7 @@ func TestIntegration_ReadNullIntoStruct(t *testing.T) { upl := table.Uploader() row := &ValuesSaver{ Schema: schema, - Row: []Value{"name", nil}, + Row: []Value{nil, []Value{}, []Value{nil}}, } if err := upl.Put(ctx, []*ValuesSaver{row}); err != nil { t.Fatal(putError(err)) @@ -899,20 +1042,91 @@ func TestIntegration_ReadNullIntoStruct(t *testing.T) { t.Fatal(err) } - q := client.Query(fmt.Sprintf("select name, num from %s", table.TableID)) + q := client.Query(fmt.Sprintf("select name from %s", table.TableID)) q.DefaultProjectID = dataset.ProjectID q.DefaultDatasetID = dataset.DatasetID it, err := q.Read(ctx) if err != nil { t.Fatal(err) } - type S struct{ Num int64 } + type S struct{ Name string } var s S if err := it.Next(&s); err == nil { t.Fatal("got nil, want error") } } +const ( + stdName = "`bigquery-public-data.samples.shakespeare`" + legacyName = "[bigquery-public-data:samples.shakespeare]" +) + +// These tests exploit the fact that the two SQL versions have different syntaxes for +// fully-qualified table names. +var useLegacySqlTests = []struct { + t string // name of table + std, legacy bool // use standard/legacy SQL + err bool // do we expect an error? +}{ + {t: legacyName, std: false, legacy: true, err: false}, + {t: legacyName, std: true, legacy: false, err: true}, + {t: legacyName, std: false, legacy: false, err: false}, // legacy SQL is default + {t: legacyName, std: true, legacy: true, err: true}, + {t: stdName, std: false, legacy: true, err: true}, + {t: stdName, std: true, legacy: false, err: false}, + {t: stdName, std: false, legacy: false, err: true}, // legacy SQL is default + {t: stdName, std: true, legacy: true, err: true}, +} + +func TestIntegration_QueryUseLegacySQL(t *testing.T) { + // Test the UseLegacySQL and UseStandardSQL options for queries. + if client == nil { + t.Skip("Integration tests skipped") + } + ctx := context.Background() + for _, test := range useLegacySqlTests { + q := client.Query(fmt.Sprintf("select word from %s limit 1", test.t)) + q.UseStandardSQL = test.std + q.UseLegacySQL = test.legacy + _, err := q.Read(ctx) + gotErr := err != nil + if gotErr && !test.err { + t.Errorf("%+v:\nunexpected error: %v", test, err) + } else if !gotErr && test.err { + t.Errorf("%+v:\nsucceeded, but want error", test) + } + } +} + +func TestIntegration_TableUseLegacySQL(t *testing.T) { + // Test the UseLegacySQL and UseStandardSQL options for CreateTable. + if client == nil { + t.Skip("Integration tests skipped") + } + ctx := context.Background() + table := newTable(t, schema) + defer table.Delete(ctx) + for i, test := range useLegacySqlTests { + view := dataset.Table(fmt.Sprintf("t_view_%d", i)) + vq := ViewQuery(fmt.Sprintf("SELECT word from %s", test.t)) + opts := []CreateTableOption{vq} + if test.std { + opts = append(opts, UseStandardSQL()) + } + if test.legacy { + opts = append(opts, UseLegacySQL()) + } + err := view.Create(ctx, opts...) + gotErr := err != nil + if gotErr && !test.err { + t.Errorf("%+v:\nunexpected error: %v", test, err) + } else if !gotErr && test.err { + t.Errorf("%+v:\nsucceeded, but want error", test) + } + view.Delete(ctx) + } +} + // Creates a new, temporary table with a unique name and the given schema. func newTable(t *testing.T, s Schema) *Table { name := fmt.Sprintf("t%d", time.Now().UnixNano()) @@ -943,7 +1157,7 @@ func compareRead(it *RowIterator, want [][]Value) (msg string, ok bool) { gotRow := []Value(r) wantRow := want[i] if !testutil.Equal(gotRow, wantRow) { - return fmt.Sprintf("#%d: got %v, want %v", i, gotRow, wantRow), false + return fmt.Sprintf("#%d: got %#v, want %#v", i, gotRow, wantRow), false } } return "", true diff --git a/vendor/cloud.google.com/go/bigquery/iterator.go b/vendor/cloud.google.com/go/bigquery/iterator.go index e36149d68..4c2987371 100644 --- a/vendor/cloud.google.com/go/bigquery/iterator.go +++ b/vendor/cloud.google.com/go/bigquery/iterator.go @@ -70,7 +70,7 @@ type RowIterator struct { // // If dst is a *map[string]Value, a new map will be created if dst is nil. Then // for each schema column name, the map key of that name will be set to the column's -// value. +// value. STRUCT types (RECORD types or nested schemas) become nested maps. // // If dst is pointer to a struct, each column in the schema will be matched // with an exported field of the struct that has the same name, ignoring case. @@ -89,8 +89,8 @@ type RowIterator struct { // TIME civil.Time // DATETIME civil.DateTime // -// A repeated field corresponds to a slice or array of the element type. -// A RECORD type (nested schema) corresponds to a nested struct or struct pointer. +// A repeated field corresponds to a slice or array of the element type. A STRUCT +// type (RECORD or nested schema) corresponds to a nested struct or struct pointer. // All calls to Next on the same iterator must use the same struct type. // // It is an error to attempt to read a BigQuery NULL value into a struct field. diff --git a/vendor/cloud.google.com/go/bigquery/job.go b/vendor/cloud.google.com/go/bigquery/job.go index 89954a2d0..e32161a4e 100644 --- a/vendor/cloud.google.com/go/bigquery/job.go +++ b/vendor/cloud.google.com/go/bigquery/job.go @@ -16,6 +16,9 @@ package bigquery import ( "errors" + "math/rand" + "os" + "sync" "time" "cloud.google.com/go/internal" @@ -46,6 +49,7 @@ func (c *Client) JobFromID(ctx context.Context, id string) (*Job, error) { return job, nil } +// ID returns the job's ID. func (j *Job) ID() string { return j.jobID } @@ -77,17 +81,35 @@ type JobStatus struct { // projectID must be non-empty. func setJobRef(job *bq.Job, jobID, projectID string) { if jobID == "" { - return + // Generate an ID on the client so that insertJob can be idempotent. + jobID = randomJobID() } // We don't check whether projectID is empty; the server will return an // error when it encounters the resulting JobReference. - job.JobReference = &bq.JobReference{ JobId: jobID, ProjectId: projectID, } } +const alphanum = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" + +var ( + rngMu sync.Mutex + rng = rand.New(rand.NewSource(time.Now().UnixNano() ^ int64(os.Getpid()))) +) + +func randomJobID() string { + // As of August 2017, the BigQuery service uses 27 alphanumeric characters. + var b [27]byte + rngMu.Lock() + for i := 0; i < len(b); i++ { + b[i] = alphanum[rng.Intn(len(alphanum))] + } + rngMu.Unlock() + return string(b[:]) +} + // Done reports whether the job has completed. // After Done returns true, the Err method will return an error if the job completed unsuccesfully. func (s *JobStatus) Done() bool { diff --git a/vendor/cloud.google.com/go/bigquery/load.go b/vendor/cloud.google.com/go/bigquery/load.go index 5edf31ca6..50cada2f5 100644 --- a/vendor/cloud.google.com/go/bigquery/load.go +++ b/vendor/cloud.google.com/go/bigquery/load.go @@ -56,6 +56,8 @@ type LoadSource interface { // LoaderFrom returns a Loader which can be used to load data into a BigQuery table. // The returned Loader may optionally be further configured before its Run method is called. +// See GCSReference and ReaderSource for additional configuration options that +// affect loading. func (t *Table) LoaderFrom(src LoadSource) *Loader { return &Loader{ c: t.c, diff --git a/vendor/cloud.google.com/go/bigquery/load_test.go b/vendor/cloud.google.com/go/bigquery/load_test.go index 5fe74e856..0cb09e58f 100644 --- a/vendor/cloud.google.com/go/bigquery/load_test.go +++ b/vendor/cloud.google.com/go/bigquery/load_test.go @@ -20,17 +20,16 @@ import ( "golang.org/x/net/context" - "cloud.google.com/go/internal/pretty" - "cloud.google.com/go/internal/testutil" bq "google.golang.org/api/bigquery/v2" ) func defaultLoadJob() *bq.Job { return &bq.Job{ + JobReference: &bq.JobReference{ProjectId: "client-project-id"}, Configuration: &bq.JobConfiguration{ Load: &bq.JobConfigurationLoad{ DestinationTable: &bq.TableReference{ - ProjectId: "project-id", + ProjectId: "client-project-id", DatasetId: "dataset-id", TableId: "table-id", }, @@ -68,7 +67,7 @@ func bqNestedFieldSchema() *bq.TableFieldSchema { } func TestLoad(t *testing.T) { - c := &Client{projectID: "project-id"} + c := &Client{projectID: "client-project-id"} testCases := []struct { dst *Table @@ -95,7 +94,7 @@ func TestLoad(t *testing.T) { j.Configuration.Load.WriteDisposition = "WRITE_TRUNCATE" j.JobReference = &bq.JobReference{ JobId: "ajob", - ProjectId: "project-id", + ProjectId: "client-project-id", } return j }(), @@ -218,12 +217,9 @@ func TestLoad(t *testing.T) { tc.config.Dst = tc.dst loader.LoadConfig = tc.config if _, err := loader.Run(context.Background()); err != nil { - t.Errorf("%d: err calling Loader.Run: %v", i, err) + t.Errorf("#%d: err calling Loader.Run: %v", i, err) continue } - if !testutil.Equal(s.Job, tc.want) { - t.Errorf("loading %d: got:\n%v\nwant:\n%v", - i, pretty.Value(s.Job), pretty.Value(tc.want)) - } + checkJob(t, i, s.Job, tc.want) } } diff --git a/vendor/cloud.google.com/go/bigquery/query.go b/vendor/cloud.google.com/go/bigquery/query.go index d9b63a7df..6459541cf 100644 --- a/vendor/cloud.google.com/go/bigquery/query.go +++ b/vendor/cloud.google.com/go/bigquery/query.go @@ -15,6 +15,8 @@ package bigquery import ( + "errors" + "golang.org/x/net/context" bq "google.golang.org/api/bigquery/v2" ) @@ -89,6 +91,9 @@ type QueryConfig struct { // The default is false (using legacy SQL). UseStandardSQL bool + // UseLegacySQL causes the query to use legacy SQL. + UseLegacySQL bool + // Parameters is a list of query parameters. The presence of parameters // implies the use of standard SQL. // If the query uses positional syntax ("?"), then no parameter may have a name. @@ -177,11 +182,19 @@ func (q *QueryConfig) populateJobQueryConfig(conf *bq.JobConfigurationQuery) err if q.MaxBytesBilled >= 1 { conf.MaximumBytesBilled = q.MaxBytesBilled } + if q.UseStandardSQL && q.UseLegacySQL { + return errors.New("bigquery: cannot provide both UseStandardSQL and UseLegacySQL") + } + if len(q.Parameters) > 0 && q.UseLegacySQL { + return errors.New("bigquery: cannot provide both Parameters (implying standard SQL) and UseLegacySQL") + } if q.UseStandardSQL || len(q.Parameters) > 0 { conf.UseLegacySql = false conf.ForceSendFields = append(conf.ForceSendFields, "UseLegacySql") } - + if q.UseLegacySQL { + conf.UseLegacySql = true + } if q.Dst != nil && !q.Dst.implicitTable() { conf.DestinationTable = q.Dst.tableRefProto() } diff --git a/vendor/cloud.google.com/go/bigquery/query_test.go b/vendor/cloud.google.com/go/bigquery/query_test.go index 9d9bec752..b66b4a250 100644 --- a/vendor/cloud.google.com/go/bigquery/query_test.go +++ b/vendor/cloud.google.com/go/bigquery/query_test.go @@ -15,6 +15,7 @@ package bigquery import ( + "fmt" "testing" "cloud.google.com/go/internal/testutil" @@ -26,10 +27,11 @@ import ( func defaultQueryJob() *bq.Job { return &bq.Job{ + JobReference: &bq.JobReference{ProjectId: "client-project-id"}, Configuration: &bq.JobConfiguration{ Query: &bq.JobConfigurationQuery{ DestinationTable: &bq.TableReference{ - ProjectId: "project-id", + ProjectId: "client-project-id", DatasetId: "dataset-id", TableId: "table-id", }, @@ -45,7 +47,7 @@ func defaultQueryJob() *bq.Job { func TestQuery(t *testing.T) { c := &Client{ - projectID: "project-id", + projectID: "client-project-id", } testCases := []struct { dst *Table @@ -144,6 +146,7 @@ func TestQuery(t *testing.T) { }, want: func() *bq.Job { j := defaultQueryJob() + j.Configuration.Query.DestinationTable.ProjectId = "project-id" j.Configuration.Query.WriteDisposition = "WRITE_TRUNCATE" j.Configuration.Query.CreateDisposition = "CREATE_NEVER" return j @@ -251,19 +254,17 @@ func TestQuery(t *testing.T) { }(), }, } - for _, tc := range testCases { + for i, tc := range testCases { s := &testService{} c.service = s query := c.Query("") query.QueryConfig = *tc.src query.Dst = tc.dst if _, err := query.Run(context.Background()); err != nil { - t.Errorf("err calling query: %v", err) + t.Errorf("#%d: err calling query: %v", i, err) continue } - if !testutil.Equal(s.Job, tc.want) { - t.Errorf("querying: got:\n%v\nwant:\n%v", s.Job, tc.want) - } + checkJob(t, i, s.Job, tc.want) } } @@ -304,3 +305,26 @@ func TestConfiguringQuery(t *testing.T) { t.Errorf("querying: got:\n%v\nwant:\n%v", s.Job, want) } } + +func TestQueryLegacySQL(t *testing.T) { + c := &Client{ + projectID: "project-id", + service: &testService{}, + } + q := c.Query("q") + q.UseStandardSQL = true + q.UseLegacySQL = true + _, err := q.Run(context.Background()) + if err == nil { + t.Error("UseStandardSQL and UseLegacySQL: got nil, want error") + } + q = c.Query("q") + q.Parameters = []QueryParameter{{Name: "p", Value: 3}} + q.UseLegacySQL = true + _, err = q.Run(context.Background()) + if err == nil { + t.Error("Parameters and UseLegacySQL: got nil, want error") + } else { + fmt.Println(err) + } +} diff --git a/vendor/cloud.google.com/go/bigquery/service.go b/vendor/cloud.google.com/go/bigquery/service.go index c61adfef6..0bf6bbc74 100644 --- a/vendor/cloud.google.com/go/bigquery/service.go +++ b/vendor/cloud.google.com/go/bigquery/service.go @@ -15,13 +15,14 @@ package bigquery import ( + "errors" "fmt" "io" "net/http" - "sync" "time" "cloud.google.com/go/internal" + "cloud.google.com/go/internal/optional" "cloud.google.com/go/internal/version" gax "github.com/googleapis/gax-go" @@ -48,7 +49,7 @@ type service interface { // listTables returns a page of Tables and a next page token. Note: the Tables do not have their c field populated. listTables(ctx context.Context, projectID, datasetID string, pageSize int, pageToken string) ([]*Table, string, error) - patchTable(ctx context.Context, projectID, datasetID, tableID string, conf *patchTableConf) (*TableMetadata, error) + patchTable(ctx context.Context, projectID, datasetID, tableID string, conf *patchTableConf, etag string) (*TableMetadata, error) // Table data readTabledata(ctx context.Context, conf *readTableConf, pageToken string) (*readDataResult, error) @@ -58,6 +59,7 @@ type service interface { insertDataset(ctx context.Context, datasetID, projectID string) error deleteDataset(ctx context.Context, datasetID, projectID string) error getDatasetMetadata(ctx context.Context, projectID, datasetID string) (*DatasetMetadata, error) + patchDataset(ctx context.Context, projectID, datasetID string, dm *DatasetMetadataToUpdate, etag string) (*DatasetMetadata, error) // Misc @@ -177,7 +179,6 @@ func (s *bigqueryService) readTabledata(ctx context.Context, conf *readTableConf // Prepare request to fetch one page of table data. req := s.s.Tabledata.List(conf.projectID, conf.datasetID, conf.tableID) setClientHeader(req.Header()) - if pageToken != "" { req.PageToken(pageToken) } else { @@ -189,33 +190,37 @@ func (s *bigqueryService) readTabledata(ctx context.Context, conf *readTableConf } // Fetch the table schema in the background, if necessary. - var schemaErr error - var schemaFetch sync.WaitGroup - if conf.schema == nil { - schemaFetch.Add(1) + errc := make(chan error, 1) + if conf.schema != nil { + errc <- nil + } else { go func() { - defer schemaFetch.Done() var t *bq.Table - t, schemaErr = s.s.Tables.Get(conf.projectID, conf.datasetID, conf.tableID). - Fields("schema"). - Context(ctx). - Do() - if schemaErr == nil && t.Schema != nil { + err := runWithRetry(ctx, func() (err error) { + t, err = s.s.Tables.Get(conf.projectID, conf.datasetID, conf.tableID). + Fields("schema"). + Context(ctx). + Do() + return err + }) + if err == nil && t.Schema != nil { conf.schema = convertTableSchema(t.Schema) } + errc <- err }() } - - res, err := req.Context(ctx).Do() + var res *bq.TableDataList + err := runWithRetry(ctx, func() (err error) { + res, err = req.Context(ctx).Do() + return err + }) if err != nil { return nil, err } - - schemaFetch.Wait() - if schemaErr != nil { - return nil, schemaErr + err = <-errc + if err != nil { + return nil, err } - result := &readDataResult{ pageToken: res.PageToken, totalRows: uint64(res.TotalRows), @@ -341,11 +346,12 @@ func (s *bigqueryService) jobStatus(ctx context.Context, projectID, jobID string func (s *bigqueryService) getJobInternal(ctx context.Context, projectID, jobID string, fields ...googleapi.Field) (*bq.Job, error) { var job *bq.Job + call := s.s.Jobs.Get(projectID, jobID). + Fields(fields...). + Context(ctx) + setClientHeader(call.Header()) err := runWithRetry(ctx, func() (err error) { - job, err = s.s.Jobs.Get(projectID, jobID). - Fields(fields...). - Context(ctx). - Do() + job, err = call.Do() return err }) if err != nil { @@ -360,11 +366,12 @@ func (s *bigqueryService) jobCancel(ctx context.Context, projectID, jobID string // docs: "This call will return immediately, and the client will need // to poll for the job status to see if the cancel completed // successfully". So it would be misleading to return a status. + call := s.s.Jobs.Cancel(projectID, jobID). + Fields(). // We don't need any of the response data. + Context(ctx) + setClientHeader(call.Header()) return runWithRetry(ctx, func() error { - _, err := s.s.Jobs.Cancel(projectID, jobID). - Fields(). // We don't need any of the response data. - Context(ctx). - Do() + _, err := call.Do() return err }) } @@ -495,6 +502,7 @@ type createTableConf struct { viewQuery string schema *bq.TableSchema useStandardSQL bool + useLegacySQL bool timePartitioning *TimePartitioning } @@ -504,6 +512,9 @@ type createTableConf struct { // Note: expiration can only be set during table creation. // Note: after table creation, a view can be modified only if its table was initially created with a view. func (s *bigqueryService) createTable(ctx context.Context, conf *createTableConf) error { + if conf.useStandardSQL && conf.useLegacySQL { + return errors.New("bigquery: cannot provide both UseStandardSQL and UseLegacySQL") + } table := &bq.Table{ // TODO(jba): retry? Is this always idempotent? TableReference: &bq.TableReference{ @@ -524,6 +535,9 @@ func (s *bigqueryService) createTable(ctx context.Context, conf *createTableConf table.View.UseLegacySql = false table.View.ForceSendFields = append(table.View.ForceSendFields, "UseLegacySql") } + if conf.useLegacySQL { + table.View.UseLegacySql = true + } } if conf.schema != nil { table.Schema = conf.schema @@ -572,6 +586,7 @@ func bqTableToMetadata(t *bq.Table) *TableMetadata { ExpirationTime: unixMillisToTime(t.ExpirationTime), CreationTime: unixMillisToTime(t.CreationTime), LastModifiedTime: unixMillisToTime(int64(t.LastModifiedTime)), + ETag: t.Etag, } if t.Schema != nil { md.Schema = convertTableSchema(t.Schema) @@ -605,6 +620,7 @@ func bqDatasetToMetadata(d *bq.Dataset) *DatasetMetadata { ID: d.Id, Location: d.Location, Labels: d.Labels, + ETag: d.Etag, } } @@ -629,12 +645,13 @@ func convertTableReference(tr *bq.TableReference) *Table { // patchTableConf contains fields to be patched. type patchTableConf struct { // These fields are omitted from the patch operation if nil. - Description *string - Name *string - Schema Schema + Description *string + Name *string + Schema Schema + ExpirationTime time.Time } -func (s *bigqueryService) patchTable(ctx context.Context, projectID, datasetID, tableID string, conf *patchTableConf) (*TableMetadata, error) { +func (s *bigqueryService) patchTable(ctx context.Context, projectID, datasetID, tableID string, conf *patchTableConf, etag string) (*TableMetadata, error) { t := &bq.Table{} forceSend := func(field string) { t.ForceSendFields = append(t.ForceSendFields, field) @@ -652,9 +669,16 @@ func (s *bigqueryService) patchTable(ctx context.Context, projectID, datasetID, t.Schema = conf.Schema.asTableSchema() forceSend("Schema") } - table, err := s.s.Tables.Patch(projectID, datasetID, tableID, t). - Context(ctx). - Do() + if !conf.ExpirationTime.IsZero() { + t.ExpirationTime = conf.ExpirationTime.UnixNano() / 1e6 + forceSend("ExpirationTime") + } + call := s.s.Tables.Patch(projectID, datasetID, tableID, t).Context(ctx) + setClientHeader(call.Header()) + if etag != "" { + call.Header().Set("If-Match", etag) + } + table, err := call.Do() if err != nil { return nil, err } @@ -672,6 +696,58 @@ func (s *bigqueryService) insertDataset(ctx context.Context, datasetID, projectI return err } +func (s *bigqueryService) patchDataset(ctx context.Context, projectID, datasetID string, dm *DatasetMetadataToUpdate, etag string) (*DatasetMetadata, error) { + ds := bqDatasetFromMetadata(dm) + call := s.s.Datasets.Patch(projectID, datasetID, ds).Context(ctx) + setClientHeader(call.Header()) + if etag != "" { + call.Header().Set("If-Match", etag) + } + ds2, err := call.Do() + if err != nil { + return nil, err + } + return bqDatasetToMetadata(ds2), nil +} + +func bqDatasetFromMetadata(dm *DatasetMetadataToUpdate) *bq.Dataset { + ds := &bq.Dataset{} + forceSend := func(field string) { + ds.ForceSendFields = append(ds.ForceSendFields, field) + } + + if dm.Description != nil { + ds.Description = optional.ToString(dm.Description) + forceSend("Description") + } + if dm.Name != nil { + ds.FriendlyName = optional.ToString(dm.Name) + forceSend("FriendlyName") + } + if dm.DefaultTableExpiration != nil { + dur := optional.ToDuration(dm.DefaultTableExpiration) + if dur == 0 { + // Send a null to delete the field. + ds.NullFields = append(ds.NullFields, "DefaultTableExpirationMs") + } else { + ds.DefaultTableExpirationMs = int64(dur.Seconds() * 1000) + } + } + if dm.setLabels != nil || dm.deleteLabels != nil { + ds.Labels = map[string]string{} + for k, v := range dm.setLabels { + ds.Labels[k] = v + } + if len(ds.Labels) == 0 && len(dm.deleteLabels) > 0 { + forceSend("Labels") + } + for l := range dm.deleteLabels { + ds.NullFields = append(ds.NullFields, "Labels."+l) + } + } + return ds +} + func (s *bigqueryService) deleteDataset(ctx context.Context, datasetID, projectID string) error { req := s.s.Datasets.Delete(projectID, datasetID).Context(ctx) setClientHeader(req.Header()) diff --git a/vendor/cloud.google.com/go/bigquery/service_test.go b/vendor/cloud.google.com/go/bigquery/service_test.go index 6d57c1787..79f190a31 100644 --- a/vendor/cloud.google.com/go/bigquery/service_test.go +++ b/vendor/cloud.google.com/go/bigquery/service_test.go @@ -73,6 +73,7 @@ func TestBQTableToMetadata(t *testing.T) { EstimatedRows: 3, OldestEntryTime: aTime, }, + ETag: "etag", }, }, } { @@ -82,3 +83,26 @@ func TestBQTableToMetadata(t *testing.T) { } } } + +func TestBQDatasetFromMetadata(t *testing.T) { + dm := DatasetMetadataToUpdate{ + Description: "desc", + Name: "name", + DefaultTableExpiration: time.Hour, + } + dm.SetLabel("label", "value") + dm.DeleteLabel("del") + + got := bqDatasetFromMetadata(&dm) + want := &bq.Dataset{ + Description: "desc", + FriendlyName: "name", + DefaultTableExpirationMs: 60 * 60 * 1000, + Labels: map[string]string{"label": "value"}, + ForceSendFields: []string{"Description", "FriendlyName"}, + NullFields: []string{"Labels.del"}, + } + if diff := testutil.Diff(got, want); diff != "" { + t.Errorf("-got, +want:\n%s", diff) + } +} diff --git a/vendor/cloud.google.com/go/bigquery/table.go b/vendor/cloud.google.com/go/bigquery/table.go index ffd40bf05..41aa1fe37 100644 --- a/vendor/cloud.google.com/go/bigquery/table.go +++ b/vendor/cloud.google.com/go/bigquery/table.go @@ -69,6 +69,10 @@ type TableMetadata struct { // present. This field will be nil if the table is not being streamed to or if // there is no data in the streaming buffer. StreamingBuffer *StreamingBuffer + + // ETag is the ETag obtained when reading metadata. Pass it to Table.Update to + // ensure that the metadata hasn't changed since it was read. + ETag string } // TableCreateDisposition specifies the circumstances under which destination table will be created. @@ -144,6 +148,8 @@ func (t *Table) implicitTable() bool { } // Create creates a table in the BigQuery service. +// To create a table with a schema, pass in a Schema to Create; +// Schema is a valid CreateTableOption. func (t *Table) Create(ctx context.Context, options ...CreateTableOption) error { conf := &createTableConf{ projectID: t.ProjectID, @@ -200,6 +206,16 @@ func (opt useStandardSQL) customizeCreateTable(conf *createTableConf) { conf.useStandardSQL = true } +type useLegacySQL struct{} + +// UseLegacySQL returns a CreateTableOption to set the table to use legacy SQL. +// This is currently the default. +func UseLegacySQL() CreateTableOption { return useLegacySQL{} } + +func (opt useLegacySQL) customizeCreateTable(conf *createTableConf) { + conf.useLegacySQL = true +} + // TimePartitioning is a CreateTableOption that can be used to set time-based // date partitioning on a table. // For more information see: https://cloud.google.com/bigquery/docs/creating-partitioned-tables @@ -223,7 +239,7 @@ func (t *Table) Read(ctx context.Context) *RowIterator { } // Update modifies specific Table metadata fields. -func (t *Table) Update(ctx context.Context, tm TableMetadataToUpdate) (*TableMetadata, error) { +func (t *Table) Update(ctx context.Context, tm TableMetadataToUpdate, etag string) (*TableMetadata, error) { var conf patchTableConf if tm.Description != nil { s := optional.ToString(tm.Description) @@ -234,7 +250,8 @@ func (t *Table) Update(ctx context.Context, tm TableMetadataToUpdate) (*TableMet conf.Name = &s } conf.Schema = tm.Schema - return t.c.service.patchTable(ctx, t.ProjectID, t.DatasetID, t.TableID, &conf) + conf.ExpirationTime = tm.ExpirationTime + return t.c.service.patchTable(ctx, t.ProjectID, t.DatasetID, t.TableID, &conf, etag) } // TableMetadataToUpdate is used when updating a table's metadata. @@ -250,4 +267,7 @@ type TableMetadataToUpdate struct { // When updating a schema, you can add columns but not remove them. Schema Schema // TODO(jba): support updating the view + + // ExpirationTime is the time when this table expires. + ExpirationTime time.Time } diff --git a/vendor/cloud.google.com/go/bigtable/admin.go b/vendor/cloud.google.com/go/bigtable/admin.go index 5a7304a6d..cfc9106dc 100644 --- a/vendor/cloud.google.com/go/bigtable/admin.go +++ b/vendor/cloud.google.com/go/bigtable/admin.go @@ -30,6 +30,8 @@ import ( btapb "google.golang.org/genproto/googleapis/bigtable/admin/v2" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/grpc/codes" ) const adminAddr = "bigtableadmin.googleapis.com:443" @@ -379,6 +381,11 @@ func (iac *InstanceAdminClient) Instances(ctx context.Context) ([]*InstanceInfo, if err != nil { return nil, err } + if len(res.FailedLocations) > 0 { + // We don't have a good way to return a partial result in the face of some zones being unavailable. + // Fail the entire request. + return nil, status.Errorf(codes.Unavailable, "Failed locations: %v", res.FailedLocations) + } var is []*InstanceInfo for _, i := range res.Instances { diff --git a/vendor/cloud.google.com/go/bigtable/bigtable.go b/vendor/cloud.google.com/go/bigtable/bigtable.go index e65549e3d..df83b0012 100644 --- a/vendor/cloud.google.com/go/bigtable/bigtable.go +++ b/vendor/cloud.google.com/go/bigtable/bigtable.go @@ -53,7 +53,13 @@ func NewClient(ctx context.Context, project, instance string, opts ...option.Cli return nil, err } // Default to a small connection pool that can be overridden. - o = append(o, option.WithGRPCConnectionPool(4)) + o = append(o, + option.WithGRPCConnectionPool(4), + // Set the max size to correspond to server-side limits. + option.WithGRPCDialOption(grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(100<<20), grpc.MaxCallRecvMsgSize(100<<20))), + // TODO(grpc/grpc-go#1388) using connection pool without WithBlock + // can cause RPCs to fail randomly. We can delete this after the issue is fixed. + option.WithGRPCDialOption(grpc.WithBlock())) o = append(o, opts...) conn, err := gtransport.Dial(ctx, o...) if err != nil { @@ -211,6 +217,7 @@ func decodeFamilyProto(r Row, row string, f *btpb.Family) { } // RowSet is a set of rows to be read. It is satisfied by RowList, RowRange and RowRangeList. +// The serialized size of the RowSet must be no larger than 1MiB. type RowSet interface { proto() *btpb.RowSet @@ -391,6 +398,9 @@ type ReadOption interface { } // RowFilter returns a ReadOption that applies f to the contents of read rows. +// +// If multiple RowFilters are provided, only the last is used. To combine filters, +// use ChainFilters or InterleaveFilters instead. func RowFilter(f Filter) ReadOption { return rowFilter{f} } type rowFilter struct{ f Filter } @@ -571,7 +581,7 @@ type entryErr struct { Err error } -// ApplyBulk applies multiple Mutations. +// ApplyBulk applies multiple Mutations, up to a maximum of 100,000. // Each mutation is individually applied atomically, // but the set of mutations may be applied in any order. // diff --git a/vendor/cloud.google.com/go/bigtable/bigtable_test.go b/vendor/cloud.google.com/go/bigtable/bigtable_test.go index 054697d22..3cee24d80 100644 --- a/vendor/cloud.google.com/go/bigtable/bigtable_test.go +++ b/vendor/cloud.google.com/go/bigtable/bigtable_test.go @@ -448,6 +448,24 @@ func TestClientIntegration(t *testing.T) { t.Fatalf("After %s,\n got %v\nwant %v", step.desc, row, wantRow) } } + + // Check for google-cloud-go/issues/723. RMWs that insert new rows should keep row order sorted in the emulator. + row, err = tbl.ApplyReadModifyWrite(ctx, "issue-723-2", appendRMW([]byte{0})) + if err != nil { + t.Fatalf("ApplyReadModifyWrite null string: %v", err) + } + row, err = tbl.ApplyReadModifyWrite(ctx, "issue-723-1", appendRMW([]byte{0})) + if err != nil { + t.Fatalf("ApplyReadModifyWrite null string: %v", err) + } + // Get only the correct row back on read. + r, err := tbl.ReadRow(ctx, "issue-723-1") + if err != nil { + t.Fatalf("Reading row: %v", err) + } + if r.Key() != "issue-723-1" { + t.Errorf("ApplyReadModifyWrite: incorrect read after RMW,\n got %v\nwant %v", r.Key(), "issue-723-1") + } checkpoint("tested ReadModifyWrite") // Test arbitrary timestamps more thoroughly. @@ -465,7 +483,7 @@ func TestClientIntegration(t *testing.T) { if err := tbl.Apply(ctx, "testrow", mut); err != nil { t.Fatalf("Mutating row: %v", err) } - r, err := tbl.ReadRow(ctx, "testrow") + r, err = tbl.ReadRow(ctx, "testrow") if err != nil { t.Fatalf("Reading row: %v", err) } @@ -758,7 +776,7 @@ func TestClientIntegration(t *testing.T) { checkpoint("tested high concurrency") // Large reads, writes and scans. - bigBytes := make([]byte, 3<<20) // 3 MB is large, but less than current gRPC max of 4 MB. + bigBytes := make([]byte, 5<<20) // 5 MB is larger than current default gRPC max of 4 MB, but less than the max we set. nonsense := []byte("lorem ipsum dolor sit amet, ") fill(bigBytes, nonsense) mut = NewMutation() diff --git a/vendor/cloud.google.com/go/bigtable/bttest/inmem.go b/vendor/cloud.google.com/go/bigtable/bttest/inmem.go index 31d8c5569..6472ad182 100644 --- a/vendor/cloud.google.com/go/bigtable/bttest/inmem.go +++ b/vendor/cloud.google.com/go/bigtable/bttest/inmem.go @@ -277,7 +277,6 @@ func (s *server) ReadRows(req *btpb.ReadRowsRequest, stream btpb.Bigtable_ReadRo // Rows to read can be specified by a set of row keys and/or a set of row ranges. // Output is a stream of sorted, de-duped rows. tbl.mu.RLock() - rowSet := make(map[string]*row) if req.Rows != nil { // Add the explicitly given keys @@ -624,9 +623,8 @@ func (s *server) MutateRow(ctx context.Context, req *btpb.MutateRowRequest) (*bt if !ok { return nil, grpc.Errorf(codes.NotFound, "table %q not found", req.TableName) } - fs := tbl.columnFamilies() - r := tbl.mutableRow(string(req.RowKey)) + r, _ := tbl.mutableRow(string(req.RowKey)) r.mu.Lock() defer tbl.resortRowIndex() // Make sure the row lock is released before this grabs the table lock defer r.mu.Unlock() @@ -643,14 +641,13 @@ func (s *server) MutateRows(req *btpb.MutateRowsRequest, stream btpb.Bigtable_Mu if !ok { return grpc.Errorf(codes.NotFound, "table %q not found", req.TableName) } - res := &btpb.MutateRowsResponse{Entries: make([]*btpb.MutateRowsResponse_Entry, len(req.Entries))} fs := tbl.columnFamilies() defer tbl.resortRowIndex() for i, entry := range req.Entries { - r := tbl.mutableRow(string(entry.RowKey)) + r, _ := tbl.mutableRow(string(entry.RowKey)) r.mu.Lock() code, msg := int32(codes.OK), "" if err := applyMutations(tbl, r, entry.Mutations, fs); err != nil { @@ -674,12 +671,11 @@ func (s *server) CheckAndMutateRow(ctx context.Context, req *btpb.CheckAndMutate if !ok { return nil, grpc.Errorf(codes.NotFound, "table %q not found", req.TableName) } - res := &btpb.CheckAndMutateRowResponse{} fs := tbl.columnFamilies() - r := tbl.mutableRow(string(req.RowKey)) + r, _ := tbl.mutableRow(string(req.RowKey)) r.mu.Lock() defer r.mu.Unlock() @@ -830,12 +826,16 @@ func (s *server) ReadModifyWriteRow(ctx context.Context, req *btpb.ReadModifyWri if !ok { return nil, grpc.Errorf(codes.NotFound, "table %q not found", req.TableName) } - updates := make(map[string]cell) // copy of updated cells; keyed by full column name fs := tbl.columnFamilies() - r := tbl.mutableRow(string(req.RowKey)) + rowKey := string(req.RowKey) + r, isNewRow := tbl.mutableRow(rowKey) + // This must be done before the row lock, acquired below, is released. + if isNewRow { + defer tbl.resortRowIndex() + } r.mu.Lock() defer r.mu.Unlock() // Assume all mutations apply to the most recent version of the cell. @@ -1025,13 +1025,13 @@ func (t *table) columnFamilies() map[string]*columnFamily { return cp } -func (t *table) mutableRow(row string) *row { +func (t *table) mutableRow(row string) (mutRow *row, isNewRow bool) { // Try fast path first. t.mu.RLock() r := t.rowIndex[row] t.mu.RUnlock() if r != nil { - return r + return r, false } // We probably need to create the row. @@ -1043,7 +1043,7 @@ func (t *table) mutableRow(row string) *row { t.rows = append(t.rows, r) } t.mu.Unlock() - return r + return r, true } func (t *table) resortRowIndex() { diff --git a/vendor/cloud.google.com/go/bigtable/cmd/loadtest/loadtest.go b/vendor/cloud.google.com/go/bigtable/cmd/loadtest/loadtest.go index c0d980ae1..158f912d8 100644 --- a/vendor/cloud.google.com/go/bigtable/cmd/loadtest/loadtest.go +++ b/vendor/cloud.google.com/go/bigtable/cmd/loadtest/loadtest.go @@ -36,6 +36,7 @@ import ( "cloud.google.com/go/bigtable/internal/stat" "golang.org/x/net/context" "google.golang.org/api/option" + "google.golang.org/grpc" ) var ( @@ -74,7 +75,12 @@ func main() { var options []option.ClientOption if *poolSize > 1 { - options = append(options, option.WithGRPCConnectionPool(*poolSize)) + options = append(options, + option.WithGRPCConnectionPool(*poolSize), + + // TODO(grpc/grpc-go#1388) using connection pool without WithBlock + // can cause RPCs to fail randomly. We can delete this after the issue is fixed. + option.WithGRPCDialOption(grpc.WithBlock())) } var csvFile *os.File diff --git a/vendor/cloud.google.com/go/bigtable/export_test.go b/vendor/cloud.google.com/go/bigtable/export_test.go index 156aed484..dee3740ca 100644 --- a/vendor/cloud.google.com/go/bigtable/export_test.go +++ b/vendor/cloud.google.com/go/bigtable/export_test.go @@ -98,7 +98,7 @@ type EmulatedEnv struct { // NewEmulatedEnv builds and starts the emulator based environment func NewEmulatedEnv(config IntegrationTestConfig) (*EmulatedEnv, error) { - srv, err := bttest.NewServer("127.0.0.1:0") + srv, err := bttest.NewServer("127.0.0.1:0", grpc.MaxRecvMsgSize(200<<20), grpc.MaxSendMsgSize(100<<20)) if err != nil { return nil, err } @@ -152,7 +152,7 @@ func (e *EmulatedEnv) NewInstanceAdminClient() (*InstanceAdminClient, error) { func (e *EmulatedEnv) NewClient() (*Client, error) { timeout := 20 * time.Second ctx, _ := context.WithTimeout(context.Background(), timeout) - conn, err := grpc.Dial(e.server.Addr, grpc.WithInsecure()) + conn, err := grpc.Dial(e.server.Addr, grpc.WithInsecure(), grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(100<<20), grpc.MaxCallRecvMsgSize(100<<20))) if err != nil { return nil, err } diff --git a/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/debuglet.go b/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/debuglet.go index 6a8702c77..cbed2bece 100644 --- a/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/debuglet.go +++ b/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/debuglet.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build linux +// +build linux,go1.7 package main diff --git a/vendor/cloud.google.com/go/datastore/client.go b/vendor/cloud.google.com/go/datastore/client.go new file mode 100644 index 000000000..940bfec83 --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/client.go @@ -0,0 +1,118 @@ +// 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. +// 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. + +package datastore + +import ( + "fmt" + + gax "github.com/googleapis/gax-go" + + "cloud.google.com/go/internal" + "cloud.google.com/go/internal/version" + "golang.org/x/net/context" + pb "google.golang.org/genproto/googleapis/datastore/v1" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// datastoreClient is a wrapper for the pb.DatastoreClient that includes gRPC +// metadata to be sent in each request for server-side traffic management. +type datastoreClient struct { + // Embed so we still implement the DatastoreClient interface, + // if the interface adds more methods. + pb.DatastoreClient + + c pb.DatastoreClient + md metadata.MD +} + +func newDatastoreClient(conn *grpc.ClientConn, projectID string) pb.DatastoreClient { + return &datastoreClient{ + c: pb.NewDatastoreClient(conn), + md: metadata.Pairs( + resourcePrefixHeader, "projects/"+projectID, + "x-goog-api-client", fmt.Sprintf("gl-go/%s gccl/%s grpc/", version.Go(), version.Repo)), + } +} + +func (dc *datastoreClient) Lookup(ctx context.Context, in *pb.LookupRequest, opts ...grpc.CallOption) (res *pb.LookupResponse, err error) { + err = dc.invoke(ctx, func(ctx context.Context) error { + res, err = dc.c.Lookup(ctx, in, opts...) + return err + }) + return res, err +} + +func (dc *datastoreClient) RunQuery(ctx context.Context, in *pb.RunQueryRequest, opts ...grpc.CallOption) (res *pb.RunQueryResponse, err error) { + err = dc.invoke(ctx, func(ctx context.Context) error { + res, err = dc.c.RunQuery(ctx, in, opts...) + return err + }) + return res, err +} + +func (dc *datastoreClient) BeginTransaction(ctx context.Context, in *pb.BeginTransactionRequest, opts ...grpc.CallOption) (res *pb.BeginTransactionResponse, err error) { + err = dc.invoke(ctx, func(ctx context.Context) error { + res, err = dc.c.BeginTransaction(ctx, in, opts...) + return err + }) + return res, err +} + +func (dc *datastoreClient) Commit(ctx context.Context, in *pb.CommitRequest, opts ...grpc.CallOption) (res *pb.CommitResponse, err error) { + err = dc.invoke(ctx, func(ctx context.Context) error { + res, err = dc.c.Commit(ctx, in, opts...) + return err + }) + return res, err +} + +func (dc *datastoreClient) Rollback(ctx context.Context, in *pb.RollbackRequest, opts ...grpc.CallOption) (res *pb.RollbackResponse, err error) { + err = dc.invoke(ctx, func(ctx context.Context) error { + res, err = dc.c.Rollback(ctx, in, opts...) + return err + }) + return res, err +} + +func (dc *datastoreClient) AllocateIds(ctx context.Context, in *pb.AllocateIdsRequest, opts ...grpc.CallOption) (res *pb.AllocateIdsResponse, err error) { + err = dc.invoke(ctx, func(ctx context.Context) error { + res, err = dc.c.AllocateIds(ctx, in, opts...) + return err + }) + return res, err +} + +func (dc *datastoreClient) invoke(ctx context.Context, f func(ctx context.Context) error) error { + ctx = metadata.NewOutgoingContext(ctx, dc.md) + return internal.Retry(ctx, gax.Backoff{}, func() (stop bool, err error) { + err = f(ctx) + return !shouldRetry(err), err + }) +} + +func shouldRetry(err error) bool { + if err == nil { + return false + } + s, ok := status.FromError(err) + if !ok { + return false + } + // See https://cloud.google.com/datastore/docs/concepts/errors. + return s.Code() == codes.Unavailable || s.Code() == codes.DeadlineExceeded +} diff --git a/vendor/cloud.google.com/go/datastore/datastore.go b/vendor/cloud.google.com/go/datastore/datastore.go index 51b60b01c..b35db8718 100644 --- a/vendor/cloud.google.com/go/datastore/datastore.go +++ b/vendor/cloud.google.com/go/datastore/datastore.go @@ -21,15 +21,11 @@ import ( "os" "reflect" - "cloud.google.com/go/internal/version" - - "github.com/golang/protobuf/proto" "golang.org/x/net/context" "google.golang.org/api/option" gtransport "google.golang.org/api/transport/grpc" pb "google.golang.org/genproto/googleapis/datastore/v1" "google.golang.org/grpc" - "google.golang.org/grpc/metadata" ) const ( @@ -44,56 +40,6 @@ const ScopeDatastore = "https://www.googleapis.com/auth/datastore" // the resource being operated on. const resourcePrefixHeader = "google-cloud-resource-prefix" -// protoClient is an interface for *transport.ProtoClient to support injecting -// fake clients in tests. -type protoClient interface { - Call(context.Context, string, proto.Message, proto.Message) error -} - -// datastoreClient is a wrapper for the pb.DatastoreClient that includes gRPC -// metadata to be sent in each request for server-side traffic management. -type datastoreClient struct { - // Embed so we still implement the DatastoreClient interface, - // if the interface adds more methods. - pb.DatastoreClient - - c pb.DatastoreClient - md metadata.MD -} - -func newDatastoreClient(conn *grpc.ClientConn, projectID string) pb.DatastoreClient { - return &datastoreClient{ - c: pb.NewDatastoreClient(conn), - md: metadata.Pairs( - resourcePrefixHeader, "projects/"+projectID, - "x-goog-api-client", fmt.Sprintf("gl-go/%s gccl/%s grpc/", version.Go(), version.Repo)), - } -} - -func (dc *datastoreClient) Lookup(ctx context.Context, in *pb.LookupRequest, opts ...grpc.CallOption) (*pb.LookupResponse, error) { - return dc.c.Lookup(metadata.NewOutgoingContext(ctx, dc.md), in, opts...) -} - -func (dc *datastoreClient) RunQuery(ctx context.Context, in *pb.RunQueryRequest, opts ...grpc.CallOption) (*pb.RunQueryResponse, error) { - return dc.c.RunQuery(metadata.NewOutgoingContext(ctx, dc.md), in, opts...) -} - -func (dc *datastoreClient) BeginTransaction(ctx context.Context, in *pb.BeginTransactionRequest, opts ...grpc.CallOption) (*pb.BeginTransactionResponse, error) { - return dc.c.BeginTransaction(metadata.NewOutgoingContext(ctx, dc.md), in, opts...) -} - -func (dc *datastoreClient) Commit(ctx context.Context, in *pb.CommitRequest, opts ...grpc.CallOption) (*pb.CommitResponse, error) { - return dc.c.Commit(metadata.NewOutgoingContext(ctx, dc.md), in, opts...) -} - -func (dc *datastoreClient) Rollback(ctx context.Context, in *pb.RollbackRequest, opts ...grpc.CallOption) (*pb.RollbackResponse, error) { - return dc.c.Rollback(metadata.NewOutgoingContext(ctx, dc.md), in, opts...) -} - -func (dc *datastoreClient) AllocateIds(ctx context.Context, in *pb.AllocateIdsRequest, opts ...grpc.CallOption) (*pb.AllocateIdsResponse, error) { - return dc.c.AllocateIds(metadata.NewOutgoingContext(ctx, dc.md), in, opts...) -} - // Client is a client for reading and writing data in a datastore dataset. type Client struct { conn *grpc.ClientConn @@ -201,7 +147,6 @@ func keyToProto(k *Key) *pb.Key { return nil } - // TODO(jbd): Eliminate unrequired allocations. var path []*pb.Key_PathElement for { el := &pb.Key_PathElement{Kind: k.Kind} @@ -210,12 +155,19 @@ func keyToProto(k *Key) *pb.Key { } else if k.Name != "" { el.IdType = &pb.Key_PathElement_Name{Name: k.Name} } - path = append([]*pb.Key_PathElement{el}, path...) + path = append(path, el) if k.Parent == nil { break } k = k.Parent } + + // The path should be in order [grandparent, parent, child] + // We did it backward above, so reverse back. + for i := 0; i < len(path)/2; i++ { + path[i], path[len(path)-i-1] = path[len(path)-i-1], path[i] + } + key := &pb.Key{Path: path} if k.Namespace != "" { key.PartitionId = &pb.PartitionId{ @@ -390,17 +342,21 @@ func (c *Client) get(ctx context.Context, keys []*Key, dst interface{}, opts *pb return nil } - // Go through keys, validate them, serialize then, and create a dict mapping them to their index + // Go through keys, validate them, serialize then, and create a dict mapping them to their indices. + // Equal keys are deduped. multiErr, any := make(MultiError, len(keys)), false - keyMap := make(map[string]int) - pbKeys := make([]*pb.Key, len(keys)) + keyMap := make(map[string][]int, len(keys)) + pbKeys := make([]*pb.Key, 0, len(keys)) for i, k := range keys { if !k.valid() { multiErr[i] = ErrInvalidKey any = true } else { - keyMap[k.String()] = i - pbKeys[i] = keyToProto(k) + ks := k.String() + if _, ok := keyMap[ks]; !ok { + pbKeys = append(pbKeys, keyToProto(k)) + } + keyMap[ks] = append(keyMap[ks], i) } } if any { @@ -434,25 +390,26 @@ func (c *Client) get(ctx context.Context, keys []*Key, dst interface{}, opts *pb found = append(found, resp.Found...) missing = append(missing, resp.Missing...) } - if len(keys) != len(found)+len(missing) { - return errors.New("datastore: internal error: server returned the wrong number of entities") - } + + filled := 0 for _, e := range found { k, err := protoToKey(e.Entity.Key) if err != nil { return errors.New("datastore: internal error: server returned an invalid key") } - index := keyMap[k.String()] - elem := v.Index(index) - if multiArgType == multiArgTypePropertyLoadSaver || multiArgType == multiArgTypeStruct { - elem = elem.Addr() - } - if multiArgType == multiArgTypeStructPtr && elem.IsNil() { - elem.Set(reflect.New(elem.Type().Elem())) - } - if err := loadEntityProto(elem.Interface(), e.Entity); err != nil { - multiErr[index] = err - any = true + filled += len(keyMap[k.String()]) + for _, index := range keyMap[k.String()] { + elem := v.Index(index) + if multiArgType == multiArgTypePropertyLoadSaver || multiArgType == multiArgTypeStruct { + elem = elem.Addr() + } + if multiArgType == multiArgTypeStructPtr && elem.IsNil() { + elem.Set(reflect.New(elem.Type().Elem())) + } + if err := loadEntityProto(elem.Interface(), e.Entity); err != nil { + multiErr[index] = err + any = true + } } } for _, e := range missing { @@ -460,9 +417,17 @@ func (c *Client) get(ctx context.Context, keys []*Key, dst interface{}, opts *pb if err != nil { return errors.New("datastore: internal error: server returned an invalid key") } - multiErr[keyMap[k.String()]] = ErrNoSuchEntity + filled += len(keyMap[k.String()]) + for _, index := range keyMap[k.String()] { + multiErr[index] = ErrNoSuchEntity + } any = true } + + if filled != len(keys) { + return errors.New("datastore: internal error: server returned the wrong number of entities") + } + if any { return multiErr } @@ -592,13 +557,18 @@ func (c *Client) DeleteMulti(ctx context.Context, keys []*Key) error { func deleteMutations(keys []*Key) ([]*pb.Mutation, error) { mutations := make([]*pb.Mutation, 0, len(keys)) + set := make(map[string]bool, len(keys)) for _, k := range keys { if k.Incomplete() { return nil, fmt.Errorf("datastore: can't delete the incomplete key: %v", k) } - mutations = append(mutations, &pb.Mutation{ - Operation: &pb.Mutation_Delete{Delete: keyToProto(k)}, - }) + ks := k.String() + if !set[ks] { + mutations = append(mutations, &pb.Mutation{ + Operation: &pb.Mutation_Delete{Delete: keyToProto(k)}, + }) + } + set[ks] = true } return mutations, nil } diff --git a/vendor/cloud.google.com/go/datastore/integration_test.go b/vendor/cloud.google.com/go/datastore/integration_test.go index 5170206f8..460bc779d 100644 --- a/vendor/cloud.google.com/go/datastore/integration_test.go +++ b/vendor/cloud.google.com/go/datastore/integration_test.go @@ -170,6 +170,7 @@ func TestGetMulti(t *testing.T) { {key: NameKey("X", "item1", p), put: true}, {key: NameKey("X", "item2", p), put: false}, {key: NameKey("X", "item3", p), put: false}, + {key: NameKey("X", "item3", p), put: false}, {key: NameKey("X", "item4", p), put: true}, } @@ -1003,6 +1004,8 @@ func TestNilPointers(t *testing.T) { t.Errorf("Get: err %v; want %v", err, want) } + // Test that deleting with duplicate keys work. + keys = append(keys, keys...) if err := client.DeleteMulti(ctx, keys); err != nil { t.Errorf("Delete: %v", err) } diff --git a/vendor/cloud.google.com/go/debugger/apiv2/controller2_client.go b/vendor/cloud.google.com/go/debugger/apiv2/controller2_client.go index 041f99fda..5c07d5664 100644 --- a/vendor/cloud.google.com/go/debugger/apiv2/controller2_client.go +++ b/vendor/cloud.google.com/go/debugger/apiv2/controller2_client.go @@ -88,10 +88,10 @@ type Controller2Client struct { // // The debugger agents register with the Controller to identify the application // being debugged, the Debuggee. All agents that register with the same data, -// represent the same Debuggee, and are assigned the same `debuggee_id`. +// represent the same Debuggee, and are assigned the same debuggee_id. // // The debugger agents call the Controller to retrieve the list of active -// Breakpoints. Agents with the same `debuggee_id` get the same breakpoints +// Breakpoints. Agents with the same debuggee_id get the same breakpoints // list. An agent that can fulfill the breakpoint request updates the // Controller with the breakpoint result. The controller selects the first // result received and discards the rest of the results. @@ -139,14 +139,14 @@ func (c *Controller2Client) SetGoogleClientInfo(keyval ...string) { // RegisterDebuggee registers the debuggee with the controller service. // -// All agents attached to the same application should call this method with -// the same request content to get back the same stable `debuggee_id`. Agents -// should call this method again whenever `google.rpc.Code.NOT_FOUND` is -// returned from any controller method. +// All agents attached to the same application must call this method with +// exactly the same request content to get back the same stable debuggee_id. +// Agents should call this method again whenever google.rpc.Code.NOT_FOUND +// is returned from any controller method. // -// This allows the controller service to disable the agent or recover from any -// data loss. If the debuggee is disabled by the server, the response will -// have `is_disabled` set to `true`. +// This protocol allows the controller service to disable debuggees, recover +// from data loss, or change the debuggee_id format. Agents must handle +// debuggee_id value changing upon re-registration. func (c *Controller2Client) RegisterDebuggee(ctx context.Context, req *clouddebuggerpb.RegisterDebuggeeRequest, opts ...gax.CallOption) (*clouddebuggerpb.RegisterDebuggeeResponse, error) { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.RegisterDebuggee[0:len(c.CallOptions.RegisterDebuggee):len(c.CallOptions.RegisterDebuggee)], opts...) @@ -164,7 +164,7 @@ func (c *Controller2Client) RegisterDebuggee(ctx context.Context, req *clouddebu // ListActiveBreakpoints returns the list of all active breakpoints for the debuggee. // -// The breakpoint specification (location, condition, and expression +// The breakpoint specification (location, condition, and expressions // fields) is semantically immutable, although the field values may // change. For example, an agent may update the location line number // to reflect the actual line where the breakpoint was set, but this @@ -191,12 +191,11 @@ func (c *Controller2Client) ListActiveBreakpoints(ctx context.Context, req *clou } // UpdateActiveBreakpoint updates the breakpoint state or mutable fields. -// The entire Breakpoint message must be sent back to the controller -// service. +// The entire Breakpoint message must be sent back to the controller service. // // Updates to active breakpoint fields are only allowed if the new value -// does not change the breakpoint specification. Updates to the `location`, -// `condition` and `expression` fields should not alter the breakpoint +// does not change the breakpoint specification. Updates to the location, +// condition and expressions fields should not alter the breakpoint // semantics. These may only make changes such as canonicalizing a value // or snapping the location to the correct line of code. func (c *Controller2Client) UpdateActiveBreakpoint(ctx context.Context, req *clouddebuggerpb.UpdateActiveBreakpointRequest, opts ...gax.CallOption) (*clouddebuggerpb.UpdateActiveBreakpointResponse, error) { diff --git a/vendor/cloud.google.com/go/debugger/apiv2/debugger2_client.go b/vendor/cloud.google.com/go/debugger/apiv2/debugger2_client.go index b50aa2ae2..a726f1f93 100644 --- a/vendor/cloud.google.com/go/debugger/apiv2/debugger2_client.go +++ b/vendor/cloud.google.com/go/debugger/apiv2/debugger2_client.go @@ -91,9 +91,9 @@ type Debugger2Client struct { // and without modifying its state. An application may include one or // more replicated processes performing the same work. // -// The application is represented using the Debuggee concept. The Debugger -// service provides a way to query for available Debuggees, but does not -// provide a way to create one. A debuggee is created using the Controller +// A debugged application is represented using the Debuggee concept. The +// Debugger service provides a way to query for available debuggees, but does +// not provide a way to create one. A debuggee is created using the Controller // service, usually by running a debugger agent with the application. // // The Debugger service enables the client to set one or more Breakpoints on a @@ -193,7 +193,7 @@ func (c *Debugger2Client) ListBreakpoints(ctx context.Context, req *clouddebugge return resp, nil } -// ListDebuggees lists all the debuggees that the user can set breakpoints to. +// ListDebuggees lists all the debuggees that the user has access to. func (c *Debugger2Client) ListDebuggees(ctx context.Context, req *clouddebuggerpb.ListDebuggeesRequest, opts ...gax.CallOption) (*clouddebuggerpb.ListDebuggeesResponse, error) { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.ListDebuggees[0:len(c.CallOptions.ListDebuggees):len(c.CallOptions.ListDebuggees)], opts...) diff --git a/vendor/cloud.google.com/go/debugger/apiv2/doc.go b/vendor/cloud.google.com/go/debugger/apiv2/doc.go index f0b10caa3..94d9f2b6c 100644 --- a/vendor/cloud.google.com/go/debugger/apiv2/doc.go +++ b/vendor/cloud.google.com/go/debugger/apiv2/doc.go @@ -35,8 +35,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/cloud.google.com/go/dlp/apiv2beta1/dlp_client.go b/vendor/cloud.google.com/go/dlp/apiv2beta1/dlp_client.go index 4e63c6347..4a6f80b28 100644 --- a/vendor/cloud.google.com/go/dlp/apiv2beta1/dlp_client.go +++ b/vendor/cloud.google.com/go/dlp/apiv2beta1/dlp_client.go @@ -113,7 +113,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error client: dlppb.NewDlpServiceClient(conn), } - c.SetGoogleClientInfo() + c.setGoogleClientInfo() c.LROClient, err = lroauto.NewOperationsClient(ctx, option.WithGRPCConn(conn)) if err != nil { @@ -139,10 +139,10 @@ func (c *Client) Close() error { return c.conn.Close() } -// SetGoogleClientInfo sets the name and version of the application in +// setGoogleClientInfo sets the name and version of the application in // the `x-goog-api-client` header passed on each request. Intended for // use by Google-written clients. -func (c *Client) SetGoogleClientInfo(keyval ...string) { +func (c *Client) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", version.Go()}, keyval...) kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version) c.xGoogHeader = []string{gax.XGoogHeader(kv...)} @@ -275,7 +275,7 @@ func (c *Client) CreateInspectOperationHandle(name string) *CreateInspectOperati // See documentation of Poll for error-handling information. func (op *CreateInspectOperationHandle) Wait(ctx context.Context, opts ...gax.CallOption) (*dlppb.InspectOperationResult, error) { var resp dlppb.InspectOperationResult - if err := op.lro.Wait(ctx, &resp, opts...); err != nil { + if err := op.lro.WaitWithInterval(ctx, &resp, 45000*time.Millisecond, opts...); err != nil { return nil, err } return &resp, nil diff --git a/vendor/cloud.google.com/go/dlp/apiv2beta1/doc.go b/vendor/cloud.google.com/go/dlp/apiv2beta1/doc.go index 93e43b80f..af6e0d9b2 100644 --- a/vendor/cloud.google.com/go/dlp/apiv2beta1/doc.go +++ b/vendor/cloud.google.com/go/dlp/apiv2beta1/doc.go @@ -34,8 +34,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/cloud.google.com/go/errorreporting/apiv1beta1/doc.go b/vendor/cloud.google.com/go/errorreporting/apiv1beta1/doc.go index 351bf6fa5..5f9412466 100644 --- a/vendor/cloud.google.com/go/errorreporting/apiv1beta1/doc.go +++ b/vendor/cloud.google.com/go/errorreporting/apiv1beta1/doc.go @@ -20,6 +20,8 @@ // Stackdriver Error Reporting groups and counts similar errors from cloud // services. The Stackdriver Error Reporting API provides a way to report new // errors and read access to error groups and their associated errors. +// +// Use the client at cloud.google.com/go/errorreporting in preference to this. package errorreporting // import "cloud.google.com/go/errorreporting/apiv1beta1" import ( @@ -34,8 +36,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/cloud.google.com/go/errorreporting/apiv1beta1/error_group_client.go b/vendor/cloud.google.com/go/errorreporting/apiv1beta1/error_group_client.go index 3c09c324a..f2d2194b5 100644 --- a/vendor/cloud.google.com/go/errorreporting/apiv1beta1/error_group_client.go +++ b/vendor/cloud.google.com/go/errorreporting/apiv1beta1/error_group_client.go @@ -29,10 +29,6 @@ import ( "google.golang.org/grpc/codes" ) -var ( - errorGroupGroupPathTemplate = gax.MustCompilePathTemplate("projects/{project}/groups/{group}") -) - // ErrorGroupCallOptions contains the retry settings for each method of ErrorGroupClient. type ErrorGroupCallOptions struct { GetGroup []gax.CallOption @@ -122,14 +118,12 @@ func (c *ErrorGroupClient) SetGoogleClientInfo(keyval ...string) { // ErrorGroupGroupPath returns the path for the group resource. func ErrorGroupGroupPath(project, group string) string { - path, err := errorGroupGroupPathTemplate.Render(map[string]string{ - "project": project, - "group": group, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/groups/" + + group + + "" } // GetGroup get the specified group. diff --git a/vendor/cloud.google.com/go/errorreporting/apiv1beta1/error_stats_client.go b/vendor/cloud.google.com/go/errorreporting/apiv1beta1/error_stats_client.go index 88f3a53a5..e9150a006 100644 --- a/vendor/cloud.google.com/go/errorreporting/apiv1beta1/error_stats_client.go +++ b/vendor/cloud.google.com/go/errorreporting/apiv1beta1/error_stats_client.go @@ -31,10 +31,6 @@ import ( "google.golang.org/grpc/codes" ) -var ( - errorStatsProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}") -) - // ErrorStatsCallOptions contains the retry settings for each method of ErrorStatsClient. type ErrorStatsCallOptions struct { ListGroupStats []gax.CallOption @@ -127,13 +123,10 @@ func (c *ErrorStatsClient) SetGoogleClientInfo(keyval ...string) { // ErrorStatsProjectPath returns the path for the project resource. func ErrorStatsProjectPath(project string) string { - path, err := errorStatsProjectPathTemplate.Render(map[string]string{ - "project": project, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "" } // ListGroupStats lists the specified groups. diff --git a/vendor/cloud.google.com/go/errorreporting/apiv1beta1/report_errors_client.go b/vendor/cloud.google.com/go/errorreporting/apiv1beta1/report_errors_client.go index 189b85e46..bf8f98cc5 100644 --- a/vendor/cloud.google.com/go/errorreporting/apiv1beta1/report_errors_client.go +++ b/vendor/cloud.google.com/go/errorreporting/apiv1beta1/report_errors_client.go @@ -26,10 +26,6 @@ import ( "google.golang.org/grpc" ) -var ( - reportErrorsProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}") -) - // ReportErrorsCallOptions contains the retry settings for each method of ReportErrorsClient. type ReportErrorsCallOptions struct { ReportErrorEvent []gax.CallOption @@ -104,13 +100,10 @@ func (c *ReportErrorsClient) SetGoogleClientInfo(keyval ...string) { // ReportErrorsProjectPath returns the path for the project resource. func ReportErrorsProjectPath(project string) string { - path, err := reportErrorsProjectPathTemplate.Render(map[string]string{ - "project": project, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "" } // ReportErrorEvent report an individual error event. @@ -119,8 +112,7 @@ func ReportErrorsProjectPath(project string) string { // or an // API key // for authentication. To use an API key, append it to the URL as the value of -// a `key` parameter. For example: -//
POST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456
+// a key parameter. For example:
POST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456
func (c *ReportErrorsClient) ReportErrorEvent(ctx context.Context, req *clouderrorreportingpb.ReportErrorEventRequest, opts ...gax.CallOption) (*clouderrorreportingpb.ReportErrorEventResponse, error) { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.ReportErrorEvent[0:len(c.CallOptions.ReportErrorEvent):len(c.CallOptions.ReportErrorEvent)], opts...) diff --git a/vendor/cloud.google.com/go/errorreporting/error_logging_test.go b/vendor/cloud.google.com/go/errorreporting/error_logging_test.go new file mode 100644 index 000000000..ba1a3c987 --- /dev/null +++ b/vendor/cloud.google.com/go/errorreporting/error_logging_test.go @@ -0,0 +1,215 @@ +// 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. +// 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. + +package errorreporting + +import ( + "bytes" + "errors" + "log" + "strings" + "testing" + + "cloud.google.com/go/logging" + "golang.org/x/net/context" + "google.golang.org/api/option" +) + +type fakeLogger struct { + entry *logging.Entry + fail bool +} + +func (c *fakeLogger) LogSync(ctx context.Context, e logging.Entry) error { + if c.fail { + return errors.New("request failed") + } + c.entry = &e + return nil +} + +func (c *fakeLogger) Close() error { + return nil +} + +func newTestClientUsingLogging(c *fakeLogger) *Client { + newLoggerInterface = func(ctx context.Context, project string, opts ...option.ClientOption) (loggerInterface, error) { + return c, nil + } + t, err := NewClient(context.Background(), testProjectID, "myservice", "v1.000", true) + if err != nil { + panic(err) + } + t.RepanicDefault = false + return t +} + +func TestCatchNothingUsingLogging(t *testing.T) { + fl := &fakeLogger{} + c := newTestClientUsingLogging(fl) + defer func() { + e := fl.entry + if e != nil { + t.Errorf("got error report, expected none") + } + }() + defer c.Catch(ctx) +} + +func entryMessage(e *logging.Entry) string { + return e.Payload.(map[string]interface{})["message"].(string) +} + +func commonLoggingChecks(t *testing.T, e *logging.Entry, panickingFunction string) { + if e.Payload.(map[string]interface{})["serviceContext"].(map[string]string)["service"] != "myservice" { + t.Errorf("error report didn't contain service name") + } + if e.Payload.(map[string]interface{})["serviceContext"].(map[string]string)["version"] != "v1.000" { + t.Errorf("error report didn't contain version name") + } + if !strings.Contains(entryMessage(e), "hello, error") { + t.Errorf("error report didn't contain message") + } + if !strings.Contains(entryMessage(e), panickingFunction) { + t.Errorf("error report didn't contain stack trace") + } +} + +func TestCatchPanicUsingLogging(t *testing.T) { + fl := &fakeLogger{} + c := newTestClientUsingLogging(fl) + defer func() { + e := fl.entry + if e == nil { + t.Fatalf("got no error report, expected one") + } + commonLoggingChecks(t, e, "TestCatchPanic") + if !strings.Contains(entryMessage(e), "divide by zero") { + t.Errorf("error report didn't contain recovered value") + } + }() + defer c.Catch(ctx, WithMessage("hello, error")) + var x int + x = x / x +} + +func TestCatchPanicNilClientUsingLogging(t *testing.T) { + buf := new(bytes.Buffer) + log.SetOutput(buf) + defer func() { + recover() + body := buf.String() + if !strings.Contains(body, "divide by zero") { + t.Errorf("error report didn't contain recovered value") + } + if !strings.Contains(body, "hello, error") { + t.Errorf("error report didn't contain message") + } + if !strings.Contains(body, "TestCatchPanicNilClient") { + t.Errorf("error report didn't contain recovered value") + } + }() + var c *Client + defer c.Catch(ctx, WithMessage("hello, error")) + var x int + x = x / x +} + +func TestLogFailedReportsUsingLogging(t *testing.T) { + fl := &fakeLogger{fail: true} + c := newTestClientUsingLogging(fl) + buf := new(bytes.Buffer) + log.SetOutput(buf) + defer func() { + recover() + body := buf.String() + if !strings.Contains(body, "hello, error") { + t.Errorf("error report didn't contain message") + } + if !strings.Contains(body, "errorreporting.TestLogFailedReports") { + t.Errorf("error report didn't contain stack trace") + } + if !strings.Contains(body, "divide by zero") { + t.Errorf("error report didn't contain recovered value") + } + }() + defer c.Catch(ctx, WithMessage("hello, error")) + var x int + x = x / x +} + +func TestCatchNilPanicUsingLogging(t *testing.T) { + fl := &fakeLogger{} + c := newTestClientUsingLogging(fl) + defer func() { + e := fl.entry + if e == nil { + t.Fatalf("got no error report, expected one") + } + commonLoggingChecks(t, e, "TestCatchNilPanic") + if !strings.Contains(entryMessage(e), "nil") { + t.Errorf("error report didn't contain recovered value") + } + }() + b := true + defer c.Catch(ctx, WithMessage("hello, error"), PanicFlag(&b)) + panic(nil) +} + +func TestNotCatchNilPanicUsingLogging(t *testing.T) { + fl := &fakeLogger{} + c := newTestClientUsingLogging(fl) + defer func() { + e := fl.entry + if e != nil { + t.Errorf("got error report, expected none") + } + }() + defer c.Catch(ctx, WithMessage("hello, error")) + panic(nil) +} + +func TestReportUsingLogging(t *testing.T) { + fl := &fakeLogger{} + c := newTestClientUsingLogging(fl) + c.Report(ctx, nil, "hello, ", "error") + e := fl.entry + if e == nil { + t.Fatalf("got no error report, expected one") + } + commonLoggingChecks(t, e, "TestReport") +} + +func TestReportfUsingLogging(t *testing.T) { + fl := &fakeLogger{} + c := newTestClientUsingLogging(fl) + c.Reportf(ctx, nil, "hello, error 2+%d=%d", 2, 2+2) + e := fl.entry + if e == nil { + t.Fatalf("got no error report, expected one") + } + commonLoggingChecks(t, e, "TestReportf") + if !strings.Contains(entryMessage(e), "2+2=4") { + t.Errorf("error report didn't contain formatted message") + } +} + +func TestCloseUsingLogging(t *testing.T) { + fl := &fakeLogger{} + c := newTestClientUsingLogging(fl) + err := c.Close() + if err != nil { + t.Fatal(err) + } +} diff --git a/vendor/cloud.google.com/go/errorreporting/errors.go b/vendor/cloud.google.com/go/errorreporting/errors.go new file mode 100644 index 000000000..dee600733 --- /dev/null +++ b/vendor/cloud.google.com/go/errorreporting/errors.go @@ -0,0 +1,456 @@ +// 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. +// 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. + +// Package errorreporting is a Google Stackdriver Error Reporting library. +// +// This package is still experimental and subject to change. +// +// See https://cloud.google.com/error-reporting/ for more information. +// +// To initialize a client, use the NewClient function. +// +// import "cloud.google.com/go/errorreporting" +// ... +// errorsClient, err = errorreporting.NewClient(ctx, projectID, "myservice", "v1.0", true) +// +// The client can recover panics in your program and report them as errors. +// To use this functionality, defer its Catch method, as you would any other +// function for recovering panics. +// +// func foo(ctx context.Context, ...) { +// defer errorsClient.Catch(ctx) +// ... +// } +// +// Catch writes an error report containing the recovered value and a stack trace +// to Stackdriver Error Reporting. +// +// There are various options you can add to the call to Catch that modify how +// panics are handled. +// +// WithMessage and WithMessagef add a custom message after the recovered value, +// using fmt.Sprint and fmt.Sprintf respectively. +// +// defer errorsClient.Catch(ctx, errorreporting.WithMessagef("x=%d", x)) +// +// WithRequest fills in various fields in the error report with information +// about an http.Request that's being handled. +// +// defer errorsClient.Catch(ctx, errorreporting.WithRequest(httpReq)) +// +// By default, after recovering a panic, Catch will panic again with the +// recovered value. You can turn off this behavior with the Repanic option. +// +// defer errorsClient.Catch(ctx, errorreporting.Repanic(false)) +// +// You can also change the default behavior for the client by changing the +// RepanicDefault field. +// +// errorsClient.RepanicDefault = false +// +// It is also possible to write an error report directly without recovering a +// panic, using Report or Reportf. +// +// if err != nil { +// errorsClient.Reportf(ctx, r, "unexpected error %v", err) +// } +// +// If you try to write an error report with a nil client, or if the client +// fails to write the report to the server, the error report is logged using +// log.Println. +package errorreporting // import "cloud.google.com/go/errorreporting" + +import ( + "bytes" + "fmt" + "log" + "net/http" + "runtime" + "strings" + "time" + + api "cloud.google.com/go/errorreporting/apiv1beta1" + "cloud.google.com/go/internal/version" + "cloud.google.com/go/logging" + "github.com/golang/protobuf/ptypes/timestamp" + gax "github.com/googleapis/gax-go" + "golang.org/x/net/context" + "google.golang.org/api/option" + erpb "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1" +) + +const ( + userAgent = `gcloud-golang-errorreporting/20160701` +) + +type apiInterface interface { + ReportErrorEvent(ctx context.Context, req *erpb.ReportErrorEventRequest, opts ...gax.CallOption) (*erpb.ReportErrorEventResponse, error) + Close() error +} + +var newApiInterface = func(ctx context.Context, opts ...option.ClientOption) (apiInterface, error) { + client, err := api.NewReportErrorsClient(ctx, opts...) + if err != nil { + return nil, err + } + client.SetGoogleClientInfo("gccl", version.Repo) + return client, nil +} + +type loggerInterface interface { + LogSync(ctx context.Context, e logging.Entry) error + Close() error +} + +type logger struct { + *logging.Logger + c *logging.Client +} + +func (l logger) Close() error { + return l.c.Close() +} + +var newLoggerInterface = func(ctx context.Context, projectID string, opts ...option.ClientOption) (loggerInterface, error) { + lc, err := logging.NewClient(ctx, projectID, opts...) + if err != nil { + return nil, fmt.Errorf("creating Logging client: %v", err) + } + l := lc.Logger("errorreports") + return logger{l, lc}, nil +} + +type sender interface { + send(ctx context.Context, r *http.Request, message string) + close() error +} + +// errorApiSender sends error reports using the Stackdriver Error Reporting API. +type errorApiSender struct { + apiClient apiInterface + projectID string + serviceContext erpb.ServiceContext +} + +// loggingSender sends error reports using the Stackdriver Logging API. +type loggingSender struct { + logger loggerInterface + projectID string + serviceContext map[string]string +} + +// Client represents a Google Cloud Error Reporting client. +type Client struct { + sender + // RepanicDefault determines whether Catch will re-panic after recovering a + // panic. This behavior can be overridden for an individual call to Catch using + // the Repanic option. + RepanicDefault bool +} + +// NewClient returns a new error reporting client. Generally you will want +// to create a client on program initialization and use it through the lifetime +// of the process. +// +// The service name and version string identify the running program, and are +// included in error reports. The version string can be left empty. +// +// Set useLogging to report errors also using Stackdriver Logging, +// which will result in errors appearing in both the logs and the error +// dashboard. This is useful if you are already a user of Stackdriver Logging. +func NewClient(ctx context.Context, projectID, serviceName, serviceVersion string, useLogging bool, opts ...option.ClientOption) (*Client, error) { + if useLogging { + l, err := newLoggerInterface(ctx, projectID, opts...) + if err != nil { + return nil, fmt.Errorf("creating Logging client: %v", err) + } + sender := &loggingSender{ + logger: l, + projectID: projectID, + serviceContext: map[string]string{ + "service": serviceName, + }, + } + if serviceVersion != "" { + sender.serviceContext["version"] = serviceVersion + } + c := &Client{ + sender: sender, + RepanicDefault: true, + } + return c, nil + } else { + a, err := newApiInterface(ctx, opts...) + if err != nil { + return nil, fmt.Errorf("creating Error Reporting client: %v", err) + } + c := &Client{ + sender: &errorApiSender{ + apiClient: a, + projectID: "projects/" + projectID, + serviceContext: erpb.ServiceContext{ + Service: serviceName, + Version: serviceVersion, + }, + }, + RepanicDefault: true, + } + return c, nil + } +} + +// Close closes any resources held by the client. +// Close should be called when the client is no longer needed. +// It need not be called at program exit. +func (c *Client) Close() error { + err := c.sender.close() + c.sender = nil + return err +} + +// An Option is an optional argument to Catch. +type Option interface { + isOption() +} + +// PanicFlag returns an Option that can inform Catch that a panic has occurred. +// If *p is true when Catch is called, an error report is made even if recover +// returns nil. This allows Catch to report an error for panic(nil). +// If p is nil, the option is ignored. +// +// Here is an example of how to use PanicFlag: +// +// func foo(ctx context.Context, ...) { +// hasPanicked := true +// defer errorsClient.Catch(ctx, errorreporting.PanicFlag(&hasPanicked)) +// ... +// ... +// // We have reached the end of the function, so we're not panicking. +// hasPanicked = false +// } +func PanicFlag(p *bool) Option { return panicFlag{p} } + +type panicFlag struct { + *bool +} + +func (h panicFlag) isOption() {} + +// Repanic returns an Option that determines whether Catch will re-panic after +// it reports an error. This overrides the default in the client. +func Repanic(r bool) Option { return repanic(r) } + +type repanic bool + +func (r repanic) isOption() {} + +// WithRequest returns an Option that informs Catch or Report of an http.Request +// that is being handled. Information from the Request is included in the error +// report, if one is made. +func WithRequest(r *http.Request) Option { return withRequest{r} } + +type withRequest struct { + *http.Request +} + +func (w withRequest) isOption() {} + +// WithMessage returns an Option that sets a message to be included in the error +// report, if one is made. v is converted to a string with fmt.Sprint. +func WithMessage(v ...interface{}) Option { return message(v) } + +type message []interface{} + +func (m message) isOption() {} + +// WithMessagef returns an Option that sets a message to be included in the error +// report, if one is made. format and v are converted to a string with fmt.Sprintf. +func WithMessagef(format string, v ...interface{}) Option { return messagef{format, v} } + +type messagef struct { + format string + v []interface{} +} + +func (m messagef) isOption() {} + +// Catch tries to recover a panic; if it succeeds, it writes an error report. +// It should be called by deferring it, like any other function for recovering +// panics. +// +// Catch can be called concurrently with other calls to Catch, Report or Reportf. +func (c *Client) Catch(ctx context.Context, opt ...Option) { + panicked := false + for _, o := range opt { + switch o := o.(type) { + case panicFlag: + panicked = panicked || o.bool != nil && *o.bool + } + } + x := recover() + if x == nil && !panicked { + return + } + var ( + r *http.Request + shouldRepanic = true + messages = []string{fmt.Sprint(x)} + ) + if c != nil { + shouldRepanic = c.RepanicDefault + } + for _, o := range opt { + switch o := o.(type) { + case repanic: + shouldRepanic = bool(o) + case withRequest: + r = o.Request + case message: + messages = append(messages, fmt.Sprint(o...)) + case messagef: + messages = append(messages, fmt.Sprintf(o.format, o.v...)) + } + } + c.logInternal(ctx, r, true, strings.Join(messages, " ")) + if shouldRepanic { + panic(x) + } +} + +// Report writes an error report unconditionally, instead of only when a panic +// occurs. +// If r is non-nil, information from the Request is included in the error report. +// +// Report can be called concurrently with other calls to Catch, Report or Reportf. +func (c *Client) Report(ctx context.Context, r *http.Request, v ...interface{}) { + c.logInternal(ctx, r, false, fmt.Sprint(v...)) +} + +// Reportf writes an error report unconditionally, instead of only when a panic +// occurs. +// If r is non-nil, information from the Request is included in the error report. +// +// Reportf can be called concurrently with other calls to Catch, Report or Reportf. +func (c *Client) Reportf(ctx context.Context, r *http.Request, format string, v ...interface{}) { + c.logInternal(ctx, r, false, fmt.Sprintf(format, v...)) +} + +func (c *Client) logInternal(ctx context.Context, r *http.Request, isPanic bool, msg string) { + // limit the stack trace to 16k. + var buf [16384]byte + stack := buf[0:runtime.Stack(buf[:], false)] + message := msg + "\n" + chopStack(stack, isPanic) + if c == nil { + log.Println("Error report used nil client:", message) + return + } + c.send(ctx, r, message) +} + +func (s *loggingSender) send(ctx context.Context, r *http.Request, message string) { + payload := map[string]interface{}{ + "eventTime": time.Now().In(time.UTC).Format(time.RFC3339Nano), + "message": message, + "serviceContext": s.serviceContext, + } + if r != nil { + payload["context"] = map[string]interface{}{ + "httpRequest": map[string]interface{}{ + "method": r.Method, + "url": r.Host + r.RequestURI, + "userAgent": r.UserAgent(), + "referrer": r.Referer(), + "remoteIp": r.RemoteAddr, + }, + } + } + e := logging.Entry{ + Severity: logging.Error, + Payload: payload, + } + err := s.logger.LogSync(ctx, e) + if err != nil { + log.Println("Error writing error report:", err, "report:", payload) + } +} + +func (s *loggingSender) close() error { + return s.logger.Close() +} + +func (s *errorApiSender) send(ctx context.Context, r *http.Request, message string) { + time := time.Now() + var errorContext *erpb.ErrorContext + if r != nil { + errorContext = &erpb.ErrorContext{ + HttpRequest: &erpb.HttpRequestContext{ + Method: r.Method, + Url: r.Host + r.RequestURI, + UserAgent: r.UserAgent(), + Referrer: r.Referer(), + RemoteIp: r.RemoteAddr, + }, + } + } + req := erpb.ReportErrorEventRequest{ + ProjectName: s.projectID, + Event: &erpb.ReportedErrorEvent{ + EventTime: ×tamp.Timestamp{ + Seconds: time.Unix(), + Nanos: int32(time.Nanosecond()), + }, + ServiceContext: &s.serviceContext, + Message: message, + Context: errorContext, + }, + } + _, err := s.apiClient.ReportErrorEvent(ctx, &req) + if err != nil { + log.Println("Error writing error report:", err, "report:", message) + } +} + +func (s *errorApiSender) close() error { + return s.apiClient.Close() +} + +// chopStack trims a stack trace so that the function which panics or calls +// Report is first. +func chopStack(s []byte, isPanic bool) string { + var f []byte + if isPanic { + f = []byte("panic(") + } else { + f = []byte("cloud.google.com/go/errorreporting.(*Client).Report") + } + + lfFirst := bytes.IndexByte(s, '\n') + if lfFirst == -1 { + return string(s) + } + stack := s[lfFirst:] + panicLine := bytes.Index(stack, f) + if panicLine == -1 { + return string(s) + } + stack = stack[panicLine+1:] + for i := 0; i < 2; i++ { + nextLine := bytes.IndexByte(stack, '\n') + if nextLine == -1 { + return string(s) + } + stack = stack[nextLine+1:] + } + return string(s[:lfFirst+1]) + string(stack) +} diff --git a/vendor/cloud.google.com/go/errorreporting/errors_test.go b/vendor/cloud.google.com/go/errorreporting/errors_test.go new file mode 100644 index 000000000..c5cda8815 --- /dev/null +++ b/vendor/cloud.google.com/go/errorreporting/errors_test.go @@ -0,0 +1,212 @@ +// 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. +// 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. + +package errorreporting + +import ( + "bytes" + "errors" + "log" + "strings" + "testing" + + gax "github.com/googleapis/gax-go" + + "golang.org/x/net/context" + "google.golang.org/api/option" + erpb "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1" +) + +const testProjectID = "testproject" + +type fakeReportErrorsClient struct { + req *erpb.ReportErrorEventRequest + fail bool +} + +func (c *fakeReportErrorsClient) ReportErrorEvent(ctx context.Context, req *erpb.ReportErrorEventRequest, _ ...gax.CallOption) (*erpb.ReportErrorEventResponse, error) { + if c.fail { + return nil, errors.New("request failed") + } + c.req = req + return &erpb.ReportErrorEventResponse{}, nil +} + +func (c *fakeReportErrorsClient) Close() error { + return nil +} + +func newTestClient(c *fakeReportErrorsClient) *Client { + newApiInterface = func(ctx context.Context, opts ...option.ClientOption) (apiInterface, error) { + return c, nil + } + t, err := NewClient(context.Background(), testProjectID, "myservice", "v1.000", false) + if err != nil { + panic(err) + } + t.RepanicDefault = false + return t +} + +var ctx context.Context + +func init() { + ctx = context.Background() +} + +func TestCatchNothing(t *testing.T) { + fc := &fakeReportErrorsClient{} + c := newTestClient(fc) + defer func() { + r := fc.req + if r != nil { + t.Errorf("got error report, expected none") + } + }() + defer c.Catch(ctx) +} + +func commonChecks(t *testing.T, req *erpb.ReportErrorEventRequest, panickingFunction string) { + if req.Event.ServiceContext.Service != "myservice" { + t.Errorf("error report didn't contain service name") + } + if req.Event.ServiceContext.Version != "v1.000" { + t.Errorf("error report didn't contain version name") + } + if !strings.Contains(req.Event.Message, "hello, error") { + t.Errorf("error report didn't contain message") + } + if !strings.Contains(req.Event.Message, panickingFunction) { + t.Errorf("error report didn't contain stack trace") + } +} + +func TestCatchPanic(t *testing.T) { + fc := &fakeReportErrorsClient{} + c := newTestClient(fc) + defer func() { + r := fc.req + if r == nil { + t.Fatalf("got no error report, expected one") + } + commonChecks(t, r, "errorreporting.TestCatchPanic") + if !strings.Contains(r.Event.Message, "divide by zero") { + t.Errorf("error report didn't contain recovered value") + } + }() + defer c.Catch(ctx, WithMessage("hello, error")) + var x int + x = x / x +} + +func TestCatchPanicNilClient(t *testing.T) { + buf := new(bytes.Buffer) + log.SetOutput(buf) + defer func() { + recover() + body := buf.String() + if !strings.Contains(body, "divide by zero") { + t.Errorf("error report didn't contain recovered value") + } + if !strings.Contains(body, "hello, error") { + t.Errorf("error report didn't contain message") + } + if !strings.Contains(body, "TestCatchPanicNilClient") { + t.Errorf("error report didn't contain recovered value") + } + }() + var c *Client + defer c.Catch(ctx, WithMessage("hello, error")) + var x int + x = x / x +} + +func TestLogFailedReports(t *testing.T) { + fc := &fakeReportErrorsClient{fail: true} + c := newTestClient(fc) + buf := new(bytes.Buffer) + log.SetOutput(buf) + defer func() { + recover() + body := buf.String() + if !strings.Contains(body, "hello, error") { + t.Errorf("error report didn't contain message") + } + if !strings.Contains(body, "errorreporting.TestLogFailedReports") { + t.Errorf("error report didn't contain stack trace") + } + if !strings.Contains(body, "divide by zero") { + t.Errorf("error report didn't contain recovered value") + } + }() + defer c.Catch(ctx, WithMessage("hello, error")) + var x int + x = x / x +} + +func TestCatchNilPanic(t *testing.T) { + fc := &fakeReportErrorsClient{} + c := newTestClient(fc) + defer func() { + r := fc.req + if r == nil { + t.Fatalf("got no error report, expected one") + } + commonChecks(t, r, "errorreporting.TestCatchNilPanic") + if !strings.Contains(r.Event.Message, "nil") { + t.Errorf("error report didn't contain recovered value") + } + }() + b := true + defer c.Catch(ctx, WithMessage("hello, error"), PanicFlag(&b)) + panic(nil) +} + +func TestNotCatchNilPanic(t *testing.T) { + fc := &fakeReportErrorsClient{} + c := newTestClient(fc) + defer func() { + r := fc.req + if r != nil { + t.Errorf("got error report, expected none") + } + }() + defer c.Catch(ctx, WithMessage("hello, error")) + panic(nil) +} + +func TestReport(t *testing.T) { + fc := &fakeReportErrorsClient{} + c := newTestClient(fc) + c.Report(ctx, nil, "hello, ", "error") + r := fc.req + if r == nil { + t.Fatalf("got no error report, expected one") + } + commonChecks(t, r, "errorreporting.TestReport") +} + +func TestReportf(t *testing.T) { + fc := &fakeReportErrorsClient{} + c := newTestClient(fc) + c.Reportf(ctx, nil, "hello, error 2+%d=%d", 2, 2+2) + r := fc.req + if r == nil { + t.Fatalf("got no error report, expected one") + } + commonChecks(t, r, "errorreporting.TestReportf") + if !strings.Contains(r.Event.Message, "2+2=4") { + t.Errorf("error report didn't contain formatted message") + } +} diff --git a/vendor/cloud.google.com/go/errorreporting/stack_test.go b/vendor/cloud.google.com/go/errorreporting/stack_test.go new file mode 100644 index 000000000..950534f25 --- /dev/null +++ b/vendor/cloud.google.com/go/errorreporting/stack_test.go @@ -0,0 +1,118 @@ +// 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. +// 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. + +package errorreporting + +import "testing" + +func TestChopStack(t *testing.T) { + for _, test := range []struct { + name string + in []byte + expected string + isPanic bool + }{ + { + name: "Catch", + in: []byte(`goroutine 20 [running]: +runtime/debug.Stack() + /gopath/src/runtime/debug/stack.go:24 +0x79 +cloud.google.com/go/errorreporting.(*Client).logInternal() + /gopath/src/cloud.google.com/go/errorreporting/errors.go:259 +0x18b +cloud.google.com/go/errorreporting.(*Client).Catch() + /gopath/src/cloud.google.com/go/errorreporting/errors.go:219 +0x6ed +panic() + /gopath/src/runtime/panic.go:458 +0x243 +cloud.google.com/go/errorreporting.TestCatchPanic() + /gopath/src/cloud.google.com/go/errorreporting/errors_test.go:93 +0x171 +testing.tRunner() + /gopath/src/testing/testing.go:610 +0x81 +created by testing.(*T).Run + /gopath/src/testing/testing.go:646 +0x2ec +`), + expected: `goroutine 20 [running]: +cloud.google.com/go/errorreporting.TestCatchPanic() + /gopath/src/cloud.google.com/go/errorreporting/errors_test.go:93 +0x171 +testing.tRunner() + /gopath/src/testing/testing.go:610 +0x81 +created by testing.(*T).Run + /gopath/src/testing/testing.go:646 +0x2ec +`, + isPanic: true, + }, + { + name: "function not found", + in: []byte(`goroutine 20 [running]: +runtime/debug.Stack() + /gopath/src/runtime/debug/stack.go:24 +0x79 +cloud.google.com/go/errorreporting.(*Client).logInternal() + /gopath/src/cloud.google.com/go/errorreporting/errors.go:259 +0x18b +cloud.google.com/go/errorreporting.(*Client).Catch() + /gopath/src/cloud.google.com/go/errorreporting/errors.go:219 +0x6ed +cloud.google.com/go/errorreporting.TestCatchPanic() + /gopath/src/cloud.google.com/go/errorreporting/errors_test.go:93 +0x171 +testing.tRunner() + /gopath/src/testing/testing.go:610 +0x81 +created by testing.(*T).Run + /gopath/src/testing/testing.go:646 +0x2ec +`), + expected: `goroutine 20 [running]: +runtime/debug.Stack() + /gopath/src/runtime/debug/stack.go:24 +0x79 +cloud.google.com/go/errorreporting.(*Client).logInternal() + /gopath/src/cloud.google.com/go/errorreporting/errors.go:259 +0x18b +cloud.google.com/go/errorreporting.(*Client).Catch() + /gopath/src/cloud.google.com/go/errorreporting/errors.go:219 +0x6ed +cloud.google.com/go/errorreporting.TestCatchPanic() + /gopath/src/cloud.google.com/go/errorreporting/errors_test.go:93 +0x171 +testing.tRunner() + /gopath/src/testing/testing.go:610 +0x81 +created by testing.(*T).Run + /gopath/src/testing/testing.go:646 +0x2ec +`, + isPanic: true, + }, + { + name: "Report", + in: []byte(` goroutine 39 [running]: +runtime/debug.Stack() + /gopath/runtime/debug/stack.go:24 +0x79 +cloud.google.com/go/errorreporting.(*Client).logInternal() + /gopath/cloud.google.com/go/errorreporting/errors.go:259 +0x18b +cloud.google.com/go/errorreporting.(*Client).Report() + /gopath/cloud.google.com/go/errorreporting/errors.go:248 +0x4ed +cloud.google.com/go/errorreporting.TestReport() + /gopath/cloud.google.com/go/errorreporting/errors_test.go:137 +0x2a1 +testing.tRunner() + /gopath/testing/testing.go:610 +0x81 +created by testing.(*T).Run + /gopath/testing/testing.go:646 +0x2ec +`), + expected: ` goroutine 39 [running]: +cloud.google.com/go/errorreporting.TestReport() + /gopath/cloud.google.com/go/errorreporting/errors_test.go:137 +0x2a1 +testing.tRunner() + /gopath/testing/testing.go:610 +0x81 +created by testing.(*T).Run + /gopath/testing/testing.go:646 +0x2ec +`, + isPanic: false, + }, + } { + out := chopStack(test.in, test.isPanic) + if out != test.expected { + t.Errorf("case %q: chopStack(%q, %t): got %q want %q", test.name, test.in, test.isPanic, out, test.expected) + } + } +} diff --git a/vendor/cloud.google.com/go/errors/error_logging_test.go b/vendor/cloud.google.com/go/errors/error_logging_test.go index 559613652..cead5a4d5 100644 --- a/vendor/cloud.google.com/go/errors/error_logging_test.go +++ b/vendor/cloud.google.com/go/errors/error_logging_test.go @@ -204,3 +204,12 @@ func TestReportfUsingLogging(t *testing.T) { t.Errorf("error report didn't contain formatted message") } } + +func TestCloseUsingLogging(t *testing.T) { + fl := &fakeLogger{} + c := newTestClientUsingLogging(fl) + err := c.Close() + if err != nil { + t.Fatal(err) + } +} diff --git a/vendor/cloud.google.com/go/errors/errors.go b/vendor/cloud.google.com/go/errors/errors.go index d5e78b8f4..a4c836403 100644 --- a/vendor/cloud.google.com/go/errors/errors.go +++ b/vendor/cloud.google.com/go/errors/errors.go @@ -18,14 +18,7 @@ // // See https://cloud.google.com/error-reporting/ for more information. // -// To initialize a client, use the NewClient function. Generally you will want -// to do this on program initialization. The NewClient function takes as -// arguments a context, the project name, a service name, and a version string. -// The service name and version string identify the running program, and are -// included in error reports. The version string can be left empty. NewClient -// also takes a bool that indicates whether to report errors using Stackdriver -// Logging, which will result in errors appearing in both the logs and the error -// dashboard. This is useful if you are already a user of Stackdriver Logging. +// To initialize a client, use the NewClient function. // // import "cloud.google.com/go/errors" // ... @@ -76,6 +69,8 @@ // If you try to write an error report with a nil client, or if the client // fails to write the report to the server, the error report is logged using // log.Println. +// +// Deprecated: Use cloud.google.com/go/errorreporting instead. package errors // import "cloud.google.com/go/errors" import ( @@ -155,9 +150,9 @@ type loggingSender struct { logger loggerInterface projectID string serviceContext map[string]string - client *logging.Client } +// Client represents a Google Cloud Error Reporting client. type Client struct { sender // RepanicDefault determines whether Catch will re-panic after recovering a @@ -166,6 +161,16 @@ type Client struct { RepanicDefault bool } +// NewClient returns a new error reporting client. Generally you will want +// to create a client on program initialization and use it through the lifetime +// of the process. +// +// The service name and version string identify the running program, and are +// included in error reports. The version string can be left empty. +// +// Set useLogging to report errors also using Stackdriver Logging, +// which will result in errors appearing in both the logs and the error +// dashboard. This is useful if you are already a user of Stackdriver Logging. func NewClient(ctx context.Context, projectID, serviceName, serviceVersion string, useLogging bool, opts ...option.ClientOption) (*Client, error) { if useLogging { l, err := newLoggerInterface(ctx, projectID, opts...) @@ -383,7 +388,7 @@ func (s *loggingSender) send(ctx context.Context, r *http.Request, message strin } func (s *loggingSender) close() error { - return s.client.Close() + return s.logger.Close() } func (s *errorApiSender) send(ctx context.Context, r *http.Request, message string) { diff --git a/vendor/cloud.google.com/go/iam/admin/apiv1/doc.go b/vendor/cloud.google.com/go/iam/admin/apiv1/doc.go index 825facddf..e366fedf6 100644 --- a/vendor/cloud.google.com/go/iam/admin/apiv1/doc.go +++ b/vendor/cloud.google.com/go/iam/admin/apiv1/doc.go @@ -34,8 +34,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/cloud.google.com/go/iam/admin/apiv1/iam_client.go b/vendor/cloud.google.com/go/iam/admin/apiv1/iam_client.go index 89dff8e99..32ca067eb 100644 --- a/vendor/cloud.google.com/go/iam/admin/apiv1/iam_client.go +++ b/vendor/cloud.google.com/go/iam/admin/apiv1/iam_client.go @@ -32,12 +32,6 @@ import ( "google.golang.org/grpc/codes" ) -var ( - iamProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}") - iamServiceAccountPathTemplate = gax.MustCompilePathTemplate("projects/{project}/serviceAccounts/{service_account}") - iamKeyPathTemplate = gax.MustCompilePathTemplate("projects/{project}/serviceAccounts/{service_account}/keys/{key}") -) - // IamCallOptions contains the retry settings for each method of IamClient. type IamCallOptions struct { ListServiceAccounts []gax.CallOption @@ -119,16 +113,16 @@ type IamClient struct { // of to an individual end user. It is used to authenticate calls // to a Google API. // -// To create a service account, specify the `project_id` and `account_id` -// for the account. The `account_id` is unique within the project, and used +// To create a service account, specify the project_id and account_id +// for the account. The account_id is unique within the project, and used // to generate the service account email address and a stable -// `unique_id`. +// unique_id. // // All other methods can identify accounts using the format -// `projects/{project}/serviceAccounts/{account}`. -// Using `-` as a wildcard for the project will infer the project from -// the account. The `account` value can be the `email` address or the -// `unique_id` of the service account. +// projects/{project}/serviceAccounts/{account}. +// Using - as a wildcard for the project will infer the project from +// the account. The account value can be the email address or the +// unique_id of the service account. func NewIamClient(ctx context.Context, opts ...option.ClientOption) (*IamClient, error) { conn, err := transport.DialGRPC(ctx, append(defaultIamClientOptions(), opts...)...) if err != nil { @@ -140,7 +134,7 @@ func NewIamClient(ctx context.Context, opts ...option.ClientOption) (*IamClient, iamClient: adminpb.NewIAMClient(conn), } - c.SetGoogleClientInfo() + c.setGoogleClientInfo() return c, nil } @@ -155,10 +149,10 @@ func (c *IamClient) Close() error { return c.conn.Close() } -// SetGoogleClientInfo sets the name and version of the application in +// setGoogleClientInfo sets the name and version of the application in // the `x-goog-api-client` header passed on each request. Intended for // use by Google-written clients. -func (c *IamClient) SetGoogleClientInfo(keyval ...string) { +func (c *IamClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", version.Go()}, keyval...) kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version) c.xGoogHeader = []string{gax.XGoogHeader(kv...)} @@ -166,38 +160,32 @@ func (c *IamClient) SetGoogleClientInfo(keyval ...string) { // IamProjectPath returns the path for the project resource. func IamProjectPath(project string) string { - path, err := iamProjectPathTemplate.Render(map[string]string{ - "project": project, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "" } // IamServiceAccountPath returns the path for the service account resource. func IamServiceAccountPath(project, serviceAccount string) string { - path, err := iamServiceAccountPathTemplate.Render(map[string]string{ - "project": project, - "service_account": serviceAccount, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/serviceAccounts/" + + serviceAccount + + "" } // IamKeyPath returns the path for the key resource. func IamKeyPath(project, serviceAccount, key string) string { - path, err := iamKeyPathTemplate.Render(map[string]string{ - "project": project, - "service_account": serviceAccount, - "key": key, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/serviceAccounts/" + + serviceAccount + + "/keys/" + + key + + "" } // ListServiceAccounts lists [ServiceAccounts][google.iam.admin.v1.ServiceAccount] for a project. @@ -271,8 +259,8 @@ func (c *IamClient) CreateServiceAccount(ctx context.Context, req *adminpb.Creat // UpdateServiceAccount updates a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. // // Currently, only the following fields are updatable: -// `display_name` . -// The `etag` is mandatory. +// display_name . +// The etag is mandatory. func (c *IamClient) UpdateServiceAccount(ctx context.Context, req *adminpb.ServiceAccount, opts ...gax.CallOption) (*adminpb.ServiceAccount, error) { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.UpdateServiceAccount[0:len(c.CallOptions.UpdateServiceAccount):len(c.CallOptions.UpdateServiceAccount)], opts...) diff --git a/vendor/cloud.google.com/go/internal/kokoro/build.sh b/vendor/cloud.google.com/go/internal/kokoro/build.sh index 0d20d3199..869be0d8d 100755 --- a/vendor/cloud.google.com/go/internal/kokoro/build.sh +++ b/vendor/cloud.google.com/go/internal/kokoro/build.sh @@ -38,7 +38,7 @@ go get -v ./... # cd $GOCLOUD_HOME # Run tests and tee output to log file, to be pushed to GCS as artifact. -go test -race -v -short ./... 2>&1 | tee $KOKORO_ARTIFACTS_DIR/$KOKORO_GERRIT_REVISION.log +go test -race -v -short ./... 2>&1 | tee $KOKORO_ARTIFACTS_DIR/$KOKORO_GERRIT_CHANGE_NUMBER.txt # Make sure README.md is up to date. make -C internal/readme test diff diff --git a/vendor/cloud.google.com/go/internal/optional/optional.go b/vendor/cloud.google.com/go/internal/optional/optional.go index f9102f365..4c15410aa 100644 --- a/vendor/cloud.google.com/go/internal/optional/optional.go +++ b/vendor/cloud.google.com/go/internal/optional/optional.go @@ -20,6 +20,7 @@ package optional import ( "fmt" "strings" + "time" ) type ( @@ -37,6 +38,9 @@ type ( // Float64 is either a float64 or nil. Float64 interface{} + + // Duration is either a time.Duration or nil. + Duration interface{} ) // ToBool returns its argument as a bool. @@ -89,6 +93,16 @@ func ToFloat64(v Float64) float64 { return x } +// ToDuration returns its argument as a time.Duration. +// It panics if its argument is nil or not a time.Duration. +func ToDuration(v Duration) time.Duration { + x, ok := v.(time.Duration) + if !ok { + doPanic("Duration", v) + } + return x +} + func doPanic(capType string, v interface{}) { panic(fmt.Sprintf("optional.%s value should be %s, got %T", capType, strings.ToLower(capType), v)) } diff --git a/vendor/cloud.google.com/go/language/apiv1/AnalyzeSentiment_smoke_test.go b/vendor/cloud.google.com/go/language/apiv1/AnalyzeSentiment_smoke_test.go new file mode 100644 index 000000000..84d55c7e3 --- /dev/null +++ b/vendor/cloud.google.com/go/language/apiv1/AnalyzeSentiment_smoke_test.go @@ -0,0 +1,71 @@ +// 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. +// 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. + +// AUTO-GENERATED CODE. DO NOT EDIT. + +package language + +import ( + languagepb "google.golang.org/genproto/googleapis/cloud/language/v1" +) + +import ( + "strconv" + "testing" + "time" + + "cloud.google.com/go/internal/testutil" + "golang.org/x/net/context" + "google.golang.org/api/iterator" + "google.golang.org/api/option" +) + +var _ = iterator.Done +var _ = strconv.FormatUint +var _ = time.Now + +func TestLanguageServiceSmoke(t *testing.T) { + if testing.Short() { + t.Skip("skipping smoke test in short mode") + } + ctx := context.Background() + ts := testutil.TokenSource(ctx, DefaultAuthScopes()...) + if ts == nil { + t.Skip("Integration tests skipped. See CONTRIBUTING.md for details") + } + + projectId := testutil.ProjID() + _ = projectId + + c, err := NewClient(ctx, option.WithTokenSource(ts)) + if err != nil { + t.Fatal(err) + } + + var content string = "Hello, world!" + var type_ languagepb.Document_Type = languagepb.Document_PLAIN_TEXT + var document = &languagepb.Document{ + Source: &languagepb.Document_Content{ + Content: content, + }, + Type: type_, + } + var request = &languagepb.AnalyzeSentimentRequest{ + Document: document, + } + + if _, err := c.AnalyzeSentiment(ctx, request); err != nil { + t.Error(err) + } +} diff --git a/vendor/cloud.google.com/go/language/apiv1/doc.go b/vendor/cloud.google.com/go/language/apiv1/doc.go index 34d357e23..f28bdfae1 100644 --- a/vendor/cloud.google.com/go/language/apiv1/doc.go +++ b/vendor/cloud.google.com/go/language/apiv1/doc.go @@ -34,8 +34,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/cloud.google.com/go/language/apiv1/language_client.go b/vendor/cloud.google.com/go/language/apiv1/language_client.go index d1cfdc4ca..a74551a13 100644 --- a/vendor/cloud.google.com/go/language/apiv1/language_client.go +++ b/vendor/cloud.google.com/go/language/apiv1/language_client.go @@ -97,7 +97,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error client: languagepb.NewLanguageServiceClient(conn), } - c.SetGoogleClientInfo() + c.setGoogleClientInfo() return c, nil } @@ -112,10 +112,10 @@ func (c *Client) Close() error { return c.conn.Close() } -// SetGoogleClientInfo sets the name and version of the application in +// setGoogleClientInfo sets the name and version of the application in // the `x-goog-api-client` header passed on each request. Intended for // use by Google-written clients. -func (c *Client) SetGoogleClientInfo(keyval ...string) { +func (c *Client) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", version.Go()}, keyval...) kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version) c.xGoogHeader = []string{gax.XGoogHeader(kv...)} diff --git a/vendor/cloud.google.com/go/language/apiv1/mock_test.go b/vendor/cloud.google.com/go/language/apiv1/mock_test.go index 2c214792a..b139468a2 100644 --- a/vendor/cloud.google.com/go/language/apiv1/mock_test.go +++ b/vendor/cloud.google.com/go/language/apiv1/mock_test.go @@ -208,10 +208,8 @@ func TestLanguageServiceAnalyzeEntities(t *testing.T) { mockLanguage.resps = append(mockLanguage.resps[:0], expectedResponse) var document *languagepb.Document = &languagepb.Document{} - var encodingType languagepb.EncodingType = languagepb.EncodingType_NONE var request = &languagepb.AnalyzeEntitiesRequest{ - Document: document, - EncodingType: encodingType, + Document: document, } c, err := NewClient(context.Background(), clientOpt) @@ -239,10 +237,8 @@ func TestLanguageServiceAnalyzeEntitiesError(t *testing.T) { mockLanguage.err = gstatus.Error(errCode, "test error") var document *languagepb.Document = &languagepb.Document{} - var encodingType languagepb.EncodingType = languagepb.EncodingType_NONE var request = &languagepb.AnalyzeEntitiesRequest{ - Document: document, - EncodingType: encodingType, + Document: document, } c, err := NewClient(context.Background(), clientOpt) @@ -271,10 +267,8 @@ func TestLanguageServiceAnalyzeSyntax(t *testing.T) { mockLanguage.resps = append(mockLanguage.resps[:0], expectedResponse) var document *languagepb.Document = &languagepb.Document{} - var encodingType languagepb.EncodingType = languagepb.EncodingType_NONE var request = &languagepb.AnalyzeSyntaxRequest{ - Document: document, - EncodingType: encodingType, + Document: document, } c, err := NewClient(context.Background(), clientOpt) @@ -302,10 +296,8 @@ func TestLanguageServiceAnalyzeSyntaxError(t *testing.T) { mockLanguage.err = gstatus.Error(errCode, "test error") var document *languagepb.Document = &languagepb.Document{} - var encodingType languagepb.EncodingType = languagepb.EncodingType_NONE var request = &languagepb.AnalyzeSyntaxRequest{ - Document: document, - EncodingType: encodingType, + Document: document, } c, err := NewClient(context.Background(), clientOpt) @@ -335,11 +327,9 @@ func TestLanguageServiceAnnotateText(t *testing.T) { var document *languagepb.Document = &languagepb.Document{} var features *languagepb.AnnotateTextRequest_Features = &languagepb.AnnotateTextRequest_Features{} - var encodingType languagepb.EncodingType = languagepb.EncodingType_NONE var request = &languagepb.AnnotateTextRequest{ - Document: document, - Features: features, - EncodingType: encodingType, + Document: document, + Features: features, } c, err := NewClient(context.Background(), clientOpt) @@ -368,11 +358,9 @@ func TestLanguageServiceAnnotateTextError(t *testing.T) { var document *languagepb.Document = &languagepb.Document{} var features *languagepb.AnnotateTextRequest_Features = &languagepb.AnnotateTextRequest_Features{} - var encodingType languagepb.EncodingType = languagepb.EncodingType_NONE var request = &languagepb.AnnotateTextRequest{ - Document: document, - Features: features, - EncodingType: encodingType, + Document: document, + Features: features, } c, err := NewClient(context.Background(), clientOpt) diff --git a/vendor/cloud.google.com/go/language/apiv1beta2/AnalyzeSentiment_smoke_test.go b/vendor/cloud.google.com/go/language/apiv1beta2/AnalyzeSentiment_smoke_test.go new file mode 100644 index 000000000..48709198d --- /dev/null +++ b/vendor/cloud.google.com/go/language/apiv1beta2/AnalyzeSentiment_smoke_test.go @@ -0,0 +1,71 @@ +// 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. +// 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. + +// AUTO-GENERATED CODE. DO NOT EDIT. + +package language + +import ( + languagepb "google.golang.org/genproto/googleapis/cloud/language/v1beta2" +) + +import ( + "strconv" + "testing" + "time" + + "cloud.google.com/go/internal/testutil" + "golang.org/x/net/context" + "google.golang.org/api/iterator" + "google.golang.org/api/option" +) + +var _ = iterator.Done +var _ = strconv.FormatUint +var _ = time.Now + +func TestLanguageServiceSmoke(t *testing.T) { + if testing.Short() { + t.Skip("skipping smoke test in short mode") + } + ctx := context.Background() + ts := testutil.TokenSource(ctx, DefaultAuthScopes()...) + if ts == nil { + t.Skip("Integration tests skipped. See CONTRIBUTING.md for details") + } + + projectId := testutil.ProjID() + _ = projectId + + c, err := NewClient(ctx, option.WithTokenSource(ts)) + if err != nil { + t.Fatal(err) + } + + var content string = "Hello, world!" + var type_ languagepb.Document_Type = languagepb.Document_PLAIN_TEXT + var document = &languagepb.Document{ + Source: &languagepb.Document_Content{ + Content: content, + }, + Type: type_, + } + var request = &languagepb.AnalyzeSentimentRequest{ + Document: document, + } + + if _, err := c.AnalyzeSentiment(ctx, request); err != nil { + t.Error(err) + } +} diff --git a/vendor/cloud.google.com/go/language/apiv1beta2/doc.go b/vendor/cloud.google.com/go/language/apiv1beta2/doc.go index e43233faa..42dc1e51c 100644 --- a/vendor/cloud.google.com/go/language/apiv1beta2/doc.go +++ b/vendor/cloud.google.com/go/language/apiv1beta2/doc.go @@ -34,8 +34,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/cloud.google.com/go/language/apiv1beta2/language_client.go b/vendor/cloud.google.com/go/language/apiv1beta2/language_client.go index 6b234e457..3b6d06ad1 100644 --- a/vendor/cloud.google.com/go/language/apiv1beta2/language_client.go +++ b/vendor/cloud.google.com/go/language/apiv1beta2/language_client.go @@ -99,7 +99,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error client: languagepb.NewLanguageServiceClient(conn), } - c.SetGoogleClientInfo() + c.setGoogleClientInfo() return c, nil } @@ -114,10 +114,10 @@ func (c *Client) Close() error { return c.conn.Close() } -// SetGoogleClientInfo sets the name and version of the application in +// setGoogleClientInfo sets the name and version of the application in // the `x-goog-api-client` header passed on each request. Intended for // use by Google-written clients. -func (c *Client) SetGoogleClientInfo(keyval ...string) { +func (c *Client) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", version.Go()}, keyval...) kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version) c.xGoogHeader = []string{gax.XGoogHeader(kv...)} diff --git a/vendor/cloud.google.com/go/language/apiv1beta2/mock_test.go b/vendor/cloud.google.com/go/language/apiv1beta2/mock_test.go index 33972a8bf..d2c9a90d6 100644 --- a/vendor/cloud.google.com/go/language/apiv1beta2/mock_test.go +++ b/vendor/cloud.google.com/go/language/apiv1beta2/mock_test.go @@ -220,10 +220,8 @@ func TestLanguageServiceAnalyzeEntities(t *testing.T) { mockLanguage.resps = append(mockLanguage.resps[:0], expectedResponse) var document *languagepb.Document = &languagepb.Document{} - var encodingType languagepb.EncodingType = languagepb.EncodingType_NONE var request = &languagepb.AnalyzeEntitiesRequest{ - Document: document, - EncodingType: encodingType, + Document: document, } c, err := NewClient(context.Background(), clientOpt) @@ -251,10 +249,8 @@ func TestLanguageServiceAnalyzeEntitiesError(t *testing.T) { mockLanguage.err = gstatus.Error(errCode, "test error") var document *languagepb.Document = &languagepb.Document{} - var encodingType languagepb.EncodingType = languagepb.EncodingType_NONE var request = &languagepb.AnalyzeEntitiesRequest{ - Document: document, - EncodingType: encodingType, + Document: document, } c, err := NewClient(context.Background(), clientOpt) @@ -283,10 +279,8 @@ func TestLanguageServiceAnalyzeEntitySentiment(t *testing.T) { mockLanguage.resps = append(mockLanguage.resps[:0], expectedResponse) var document *languagepb.Document = &languagepb.Document{} - var encodingType languagepb.EncodingType = languagepb.EncodingType_NONE var request = &languagepb.AnalyzeEntitySentimentRequest{ - Document: document, - EncodingType: encodingType, + Document: document, } c, err := NewClient(context.Background(), clientOpt) @@ -314,10 +308,8 @@ func TestLanguageServiceAnalyzeEntitySentimentError(t *testing.T) { mockLanguage.err = gstatus.Error(errCode, "test error") var document *languagepb.Document = &languagepb.Document{} - var encodingType languagepb.EncodingType = languagepb.EncodingType_NONE var request = &languagepb.AnalyzeEntitySentimentRequest{ - Document: document, - EncodingType: encodingType, + Document: document, } c, err := NewClient(context.Background(), clientOpt) @@ -346,10 +338,8 @@ func TestLanguageServiceAnalyzeSyntax(t *testing.T) { mockLanguage.resps = append(mockLanguage.resps[:0], expectedResponse) var document *languagepb.Document = &languagepb.Document{} - var encodingType languagepb.EncodingType = languagepb.EncodingType_NONE var request = &languagepb.AnalyzeSyntaxRequest{ - Document: document, - EncodingType: encodingType, + Document: document, } c, err := NewClient(context.Background(), clientOpt) @@ -377,10 +367,8 @@ func TestLanguageServiceAnalyzeSyntaxError(t *testing.T) { mockLanguage.err = gstatus.Error(errCode, "test error") var document *languagepb.Document = &languagepb.Document{} - var encodingType languagepb.EncodingType = languagepb.EncodingType_NONE var request = &languagepb.AnalyzeSyntaxRequest{ - Document: document, - EncodingType: encodingType, + Document: document, } c, err := NewClient(context.Background(), clientOpt) @@ -410,11 +398,9 @@ func TestLanguageServiceAnnotateText(t *testing.T) { var document *languagepb.Document = &languagepb.Document{} var features *languagepb.AnnotateTextRequest_Features = &languagepb.AnnotateTextRequest_Features{} - var encodingType languagepb.EncodingType = languagepb.EncodingType_NONE var request = &languagepb.AnnotateTextRequest{ - Document: document, - Features: features, - EncodingType: encodingType, + Document: document, + Features: features, } c, err := NewClient(context.Background(), clientOpt) @@ -443,11 +429,9 @@ func TestLanguageServiceAnnotateTextError(t *testing.T) { var document *languagepb.Document = &languagepb.Document{} var features *languagepb.AnnotateTextRequest_Features = &languagepb.AnnotateTextRequest_Features{} - var encodingType languagepb.EncodingType = languagepb.EncodingType_NONE var request = &languagepb.AnnotateTextRequest{ - Document: document, - Features: features, - EncodingType: encodingType, + Document: document, + Features: features, } c, err := NewClient(context.Background(), clientOpt) diff --git a/vendor/cloud.google.com/go/logging/apiv2/config_client.go b/vendor/cloud.google.com/go/logging/apiv2/config_client.go index c8e171ccd..3df8653ca 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/config_client.go +++ b/vendor/cloud.google.com/go/logging/apiv2/config_client.go @@ -31,11 +31,6 @@ import ( "google.golang.org/grpc/codes" ) -var ( - configProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}") - configSinkPathTemplate = gax.MustCompilePathTemplate("projects/{project}/sinks/{sink}") -) - // ConfigCallOptions contains the retry settings for each method of ConfigClient. type ConfigCallOptions struct { ListSinks []gax.CallOption @@ -133,25 +128,20 @@ func (c *ConfigClient) SetGoogleClientInfo(keyval ...string) { // ConfigProjectPath returns the path for the project resource. func ConfigProjectPath(project string) string { - path, err := configProjectPathTemplate.Render(map[string]string{ - "project": project, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "" } // ConfigSinkPath returns the path for the sink resource. func ConfigSinkPath(project, sink string) string { - path, err := configSinkPathTemplate.Render(map[string]string{ - "project": project, - "sink": sink, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/sinks/" + + sink + + "" } // ListSinks lists sinks. @@ -208,7 +198,7 @@ func (c *ConfigClient) GetSink(ctx context.Context, req *loggingpb.GetSinkReques // CreateSink creates a sink that exports specified log entries to a destination. The // export of newly-ingested log entries begins immediately, unless the current // time is outside the sink's start and end times or the sink's -// `writer_identity` is not permitted to write to the destination. A sink can +// writer_identity is not permitted to write to the destination. A sink can // export log entries only from the resource owning the sink. func (c *ConfigClient) CreateSink(ctx context.Context, req *loggingpb.CreateSinkRequest, opts ...gax.CallOption) (*loggingpb.LogSink, error) { ctx = insertXGoog(ctx, c.xGoogHeader) @@ -227,12 +217,12 @@ func (c *ConfigClient) CreateSink(ctx context.Context, req *loggingpb.CreateSink // UpdateSink updates a sink. If the named sink doesn't exist, then this method is // identical to -// [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create). +// sinks.create (at /logging/docs/api/reference/rest/v2/projects.sinks/create). // If the named sink does exist, then this method replaces the following -// fields in the existing sink with values from the new sink: `destination`, -// `filter`, `output_version_format`, `start_time`, and `end_time`. -// The updated filter might also have a new `writer_identity`; see the -// `unique_writer_identity` field. +// fields in the existing sink with values from the new sink: destination, +// filter, output_version_format, start_time, and end_time. +// The updated filter might also have a new writer_identity; see the +// unique_writer_identity field. func (c *ConfigClient) UpdateSink(ctx context.Context, req *loggingpb.UpdateSinkRequest, opts ...gax.CallOption) (*loggingpb.LogSink, error) { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.UpdateSink[0:len(c.CallOptions.UpdateSink):len(c.CallOptions.UpdateSink)], opts...) @@ -248,7 +238,7 @@ func (c *ConfigClient) UpdateSink(ctx context.Context, req *loggingpb.UpdateSink return resp, nil } -// DeleteSink deletes a sink. If the sink has a unique `writer_identity`, then that +// DeleteSink deletes a sink. If the sink has a unique writer_identity, then that // service account is also deleted. func (c *ConfigClient) DeleteSink(ctx context.Context, req *loggingpb.DeleteSinkRequest, opts ...gax.CallOption) error { ctx = insertXGoog(ctx, c.xGoogHeader) diff --git a/vendor/cloud.google.com/go/logging/apiv2/doc.go b/vendor/cloud.google.com/go/logging/apiv2/doc.go index 0398913a1..77c43c7d4 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/doc.go +++ b/vendor/cloud.google.com/go/logging/apiv2/doc.go @@ -35,8 +35,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/cloud.google.com/go/logging/apiv2/logging_client.go b/vendor/cloud.google.com/go/logging/apiv2/logging_client.go index 9458ed4dc..4f64ff0c9 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/logging_client.go +++ b/vendor/cloud.google.com/go/logging/apiv2/logging_client.go @@ -32,11 +32,6 @@ import ( "google.golang.org/grpc/codes" ) -var ( - loggingProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}") - loggingLogPathTemplate = gax.MustCompilePathTemplate("projects/{project}/logs/{log}") -) - // CallOptions contains the retry settings for each method of Client. type CallOptions struct { DeleteLog []gax.CallOption @@ -146,25 +141,20 @@ func (c *Client) SetGoogleClientInfo(keyval ...string) { // ProjectPath returns the path for the project resource. func ProjectPath(project string) string { - path, err := loggingProjectPathTemplate.Render(map[string]string{ - "project": project, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "" } // LogPath returns the path for the log resource. func LogPath(project, log string) string { - path, err := loggingLogPathTemplate.Render(map[string]string{ - "project": project, - "log": log, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/logs/" + + log + + "" } // DeleteLog deletes all the log entries in a log. @@ -200,7 +190,7 @@ func (c *Client) WriteLogEntries(ctx context.Context, req *loggingpb.WriteLogEnt // ListLogEntries lists log entries. Use this method to retrieve log entries from // Stackdriver Logging. For ways to export log entries, see -// [Exporting Logs](/logging/docs/export). +// Exporting Logs (at /logging/docs/export). func (c *Client) ListLogEntries(ctx context.Context, req *loggingpb.ListLogEntriesRequest, opts ...gax.CallOption) *LogEntryIterator { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.ListLogEntries[0:len(c.CallOptions.ListLogEntries):len(c.CallOptions.ListLogEntries)], opts...) diff --git a/vendor/cloud.google.com/go/logging/apiv2/metrics_client.go b/vendor/cloud.google.com/go/logging/apiv2/metrics_client.go index 62ec7e766..e4cc57f32 100644 --- a/vendor/cloud.google.com/go/logging/apiv2/metrics_client.go +++ b/vendor/cloud.google.com/go/logging/apiv2/metrics_client.go @@ -31,11 +31,6 @@ import ( "google.golang.org/grpc/codes" ) -var ( - metricsProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}") - metricsMetricPathTemplate = gax.MustCompilePathTemplate("projects/{project}/metrics/{metric}") -) - // MetricsCallOptions contains the retry settings for each method of MetricsClient. type MetricsCallOptions struct { ListLogMetrics []gax.CallOption @@ -132,25 +127,20 @@ func (c *MetricsClient) SetGoogleClientInfo(keyval ...string) { // MetricsProjectPath returns the path for the project resource. func MetricsProjectPath(project string) string { - path, err := metricsProjectPathTemplate.Render(map[string]string{ - "project": project, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "" } // MetricsMetricPath returns the path for the metric resource. func MetricsMetricPath(project, metric string) string { - path, err := metricsMetricPathTemplate.Render(map[string]string{ - "project": project, - "metric": metric, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/metrics/" + + metric + + "" } // ListLogMetrics lists logs-based metrics. diff --git a/vendor/cloud.google.com/go/logging/logadmin/logadmin.go b/vendor/cloud.google.com/go/logging/logadmin/logadmin.go index 9ea728c8b..4097ea78e 100644 --- a/vendor/cloud.google.com/go/logging/logadmin/logadmin.go +++ b/vendor/cloud.google.com/go/logging/logadmin/logadmin.go @@ -46,7 +46,9 @@ import ( logtypepb "google.golang.org/genproto/googleapis/logging/type" logpb "google.golang.org/genproto/googleapis/logging/v2" "google.golang.org/grpc/codes" + // Import the following so EntryIterator can unmarshal log protos. + _ "google.golang.org/genproto/googleapis/appengine/logging/v1" _ "google.golang.org/genproto/googleapis/cloud/audit" ) diff --git a/vendor/cloud.google.com/go/logging/logadmin/sinks.go b/vendor/cloud.google.com/go/logging/logadmin/sinks.go index 588c7afd3..12aa54c1e 100644 --- a/vendor/cloud.google.com/go/logging/logadmin/sinks.go +++ b/vendor/cloud.google.com/go/logging/logadmin/sinks.go @@ -87,8 +87,7 @@ func (c *Client) Sink(ctx context.Context, sinkID string) (*Sink, error) { return fromLogSink(ls), nil } -// UpdateSink updates an existing Sink, or creates a new one if the Sink doesn't exist. -// Requires AdminScope. +// UpdateSink updates an existing Sink. Requires AdminScope. func (c *Client) UpdateSink(ctx context.Context, sink *Sink) (*Sink, error) { ls, err := c.sClient.UpdateSink(ctx, &logpb.UpdateSinkRequest{ SinkName: c.sinkPath(sink.ID), diff --git a/vendor/cloud.google.com/go/logging/logadmin/sinks_test.go b/vendor/cloud.google.com/go/logging/logadmin/sinks_test.go index 36d120f60..20f4b7c46 100644 --- a/vendor/cloud.google.com/go/logging/logadmin/sinks_test.go +++ b/vendor/cloud.google.com/go/logging/logadmin/sinks_test.go @@ -152,7 +152,9 @@ func TestUpdateSink(t *testing.T) { Filter: testFilter, } - // Updating a non-existent sink creates a new one. + if _, err := client.CreateSink(ctx, sink); err != nil { + t.Fatal(err) + } got, err := client.UpdateSink(ctx, sink) if err != nil { t.Fatal(err) diff --git a/vendor/cloud.google.com/go/logging/logging.go b/vendor/cloud.google.com/go/logging/logging.go index 46d06dd8c..5738adcf4 100644 --- a/vendor/cloud.google.com/go/logging/logging.go +++ b/vendor/cloud.google.com/go/logging/logging.go @@ -86,7 +86,11 @@ var now = time.Now // ErrOverflow signals that the number of buffered entries for a Logger // exceeds its BufferLimit. -var ErrOverflow = errors.New("logging: log entry overflowed buffer limits") +var ErrOverflow = bundler.ErrOverflow + +// ErrOversizedEntry signals that an entry's size exceeds the maximum number of +// bytes that will be sent in a single call to the logging service. +var ErrOversizedEntry = bundler.ErrOversizedItem // Client is a Logging client. A Client is associated with a single Cloud project. type Client struct { @@ -331,10 +335,10 @@ type entryByteThreshold int func (e entryByteThreshold) set(l *Logger) { l.bundler.BundleByteThreshold = int(e) } // EntryByteLimit is the maximum number of bytes of entries that will be sent -// in a single call to the logging service. This option limits the size of a -// single RPC payload, to account for network or service issues with large -// RPCs. If EntryByteLimit is smaller than EntryByteThreshold, the latter has -// no effect. +// in a single call to the logging service. ErrOversizedEntry is returned if an +// entry exceeds EntryByteLimit. This option limits the size of a single RPC +// payload, to account for network or service issues with large RPCs. If +// EntryByteLimit is smaller than EntryByteThreshold, the latter has no effect. // The default is zero, meaning there is no limit. func EntryByteLimit(n int) LoggerOption { return entryByteLimit(n) } diff --git a/vendor/cloud.google.com/go/longrunning/autogen/doc.go b/vendor/cloud.google.com/go/longrunning/autogen/doc.go index 21968062a..495818443 100644 --- a/vendor/cloud.google.com/go/longrunning/autogen/doc.go +++ b/vendor/cloud.google.com/go/longrunning/autogen/doc.go @@ -33,8 +33,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{} } diff --git a/vendor/cloud.google.com/go/longrunning/autogen/operations_client.go b/vendor/cloud.google.com/go/longrunning/autogen/operations_client.go index dc012f05a..80cedf63d 100644 --- a/vendor/cloud.google.com/go/longrunning/autogen/operations_client.go +++ b/vendor/cloud.google.com/go/longrunning/autogen/operations_client.go @@ -93,7 +93,7 @@ type OperationsClient struct { // interface to receive the real response asynchronously by polling the // operation resource, or pass the operation resource to another API (such as // Google Cloud Pub/Sub API) to receive the response. Any API service that -// returns long-running operations should implement the `Operations` interface +// returns long-running operations should implement the Operations interface // so developers can have a consistent client experience. func NewOperationsClient(ctx context.Context, opts ...option.ClientOption) (*OperationsClient, error) { conn, err := transport.DialGRPC(ctx, append(defaultOperationsClientOptions(), opts...)...) @@ -149,10 +149,10 @@ func (c *OperationsClient) GetOperation(ctx context.Context, req *longrunningpb. } // ListOperations lists operations that match the specified filter in the request. If the -// server doesn't support this method, it returns `UNIMPLEMENTED`. +// server doesn't support this method, it returns UNIMPLEMENTED. // -// NOTE: the `name` binding below allows API services to override the binding -// to use different resource name schemes, such as `users/*/operations`. +// NOTE: the name binding below allows API services to override the binding +// to use different resource name schemes, such as users/*/operations. func (c *OperationsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.ListOperations[0:len(c.CallOptions.ListOperations):len(c.CallOptions.ListOperations)], opts...) @@ -190,13 +190,13 @@ func (c *OperationsClient) ListOperations(ctx context.Context, req *longrunningp // CancelOperation starts asynchronous cancellation on a long-running operation. The server // makes a best effort to cancel the operation, but success is not // guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// google.rpc.Code.UNIMPLEMENTED. Clients can use // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, // the operation is not deleted; instead, it becomes an operation with // an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, -// corresponding to `Code.CANCELLED`. +// corresponding to Code.CANCELLED. func (c *OperationsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.CancelOperation[0:len(c.CallOptions.CancelOperation):len(c.CallOptions.CancelOperation)], opts...) @@ -211,7 +211,7 @@ func (c *OperationsClient) CancelOperation(ctx context.Context, req *longrunning // DeleteOperation deletes a long-running operation. This method indicates that the client is // no longer interested in the operation result. It does not cancel the // operation. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. +// google.rpc.Code.UNIMPLEMENTED. func (c *OperationsClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.DeleteOperation[0:len(c.CallOptions.DeleteOperation):len(c.CallOptions.DeleteOperation)], opts...) diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/doc.go b/vendor/cloud.google.com/go/monitoring/apiv3/doc.go index ca72c8e50..426f6a501 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/doc.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/doc.go @@ -34,8 +34,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/group_client.go b/vendor/cloud.google.com/go/monitoring/apiv3/group_client.go index e861d7dfd..d235c85ec 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/group_client.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/group_client.go @@ -32,11 +32,6 @@ import ( "google.golang.org/grpc/codes" ) -var ( - groupProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}") - groupGroupPathTemplate = gax.MustCompilePathTemplate("projects/{project}/groups/{group}") -) - // GroupCallOptions contains the retry settings for each method of GroupClient. type GroupCallOptions struct { ListGroups []gax.CallOption @@ -97,7 +92,7 @@ type GroupClient struct { // NewGroupClient creates a new group service client. // // The Group API lets you inspect and manage your -// [groups](google.monitoring.v3.Group). +// groups (at google.monitoring.v3.Group). // // A group is a named filter that is used to identify // a collection of monitored resources. Groups are typically used to @@ -119,7 +114,7 @@ func NewGroupClient(ctx context.Context, opts ...option.ClientOption) (*GroupCli groupClient: monitoringpb.NewGroupServiceClient(conn), } - c.SetGoogleClientInfo() + c.setGoogleClientInfo() return c, nil } @@ -134,10 +129,10 @@ func (c *GroupClient) Close() error { return c.conn.Close() } -// SetGoogleClientInfo sets the name and version of the application in +// setGoogleClientInfo sets the name and version of the application in // the `x-goog-api-client` header passed on each request. Intended for // use by Google-written clients. -func (c *GroupClient) SetGoogleClientInfo(keyval ...string) { +func (c *GroupClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", version.Go()}, keyval...) kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version) c.xGoogHeader = []string{gax.XGoogHeader(kv...)} @@ -145,25 +140,20 @@ func (c *GroupClient) SetGoogleClientInfo(keyval ...string) { // GroupProjectPath returns the path for the project resource. func GroupProjectPath(project string) string { - path, err := groupProjectPathTemplate.Render(map[string]string{ - "project": project, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "" } // GroupGroupPath returns the path for the group resource. func GroupGroupPath(project, group string) string { - path, err := groupGroupPathTemplate.Render(map[string]string{ - "project": project, - "group": group, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/groups/" + + group + + "" } // ListGroups lists the existing groups. @@ -234,7 +224,7 @@ func (c *GroupClient) CreateGroup(ctx context.Context, req *monitoringpb.CreateG } // UpdateGroup updates an existing group. -// You can change any group attributes except `name`. +// You can change any group attributes except name. func (c *GroupClient) UpdateGroup(ctx context.Context, req *monitoringpb.UpdateGroupRequest, opts ...gax.CallOption) (*monitoringpb.Group, error) { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.UpdateGroup[0:len(c.CallOptions.UpdateGroup):len(c.CallOptions.UpdateGroup)], opts...) diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/metric_client.go b/vendor/cloud.google.com/go/monitoring/apiv3/metric_client.go index 4b24b6d6c..8b35ce721 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/metric_client.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/metric_client.go @@ -33,12 +33,6 @@ import ( "google.golang.org/grpc/codes" ) -var ( - metricProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}") - metricMetricDescriptorPathTemplate = gax.MustCompilePathTemplate("projects/{project}/metricDescriptors/{metric_descriptor=**}") - metricMonitoredResourceDescriptorPathTemplate = gax.MustCompilePathTemplate("projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}") -) - // MetricCallOptions contains the retry settings for each method of MetricClient. type MetricCallOptions struct { ListMonitoredResourceDescriptors []gax.CallOption @@ -115,7 +109,7 @@ func NewMetricClient(ctx context.Context, opts ...option.ClientOption) (*MetricC metricClient: monitoringpb.NewMetricServiceClient(conn), } - c.SetGoogleClientInfo() + c.setGoogleClientInfo() return c, nil } @@ -130,10 +124,10 @@ func (c *MetricClient) Close() error { return c.conn.Close() } -// SetGoogleClientInfo sets the name and version of the application in +// setGoogleClientInfo sets the name and version of the application in // the `x-goog-api-client` header passed on each request. Intended for // use by Google-written clients. -func (c *MetricClient) SetGoogleClientInfo(keyval ...string) { +func (c *MetricClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", version.Go()}, keyval...) kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version) c.xGoogHeader = []string{gax.XGoogHeader(kv...)} @@ -141,37 +135,30 @@ func (c *MetricClient) SetGoogleClientInfo(keyval ...string) { // MetricProjectPath returns the path for the project resource. func MetricProjectPath(project string) string { - path, err := metricProjectPathTemplate.Render(map[string]string{ - "project": project, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "" } // MetricMetricDescriptorPath returns the path for the metric descriptor resource. func MetricMetricDescriptorPath(project, metricDescriptor string) string { - path, err := metricMetricDescriptorPathTemplate.Render(map[string]string{ - "project": project, - "metric_descriptor": metricDescriptor, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/metricDescriptors/" + + metricDescriptor + + "" } // MetricMonitoredResourceDescriptorPath returns the path for the monitored resource descriptor resource. func MetricMonitoredResourceDescriptorPath(project, monitoredResourceDescriptor string) string { - path, err := metricMonitoredResourceDescriptorPathTemplate.Render(map[string]string{ - "project": project, - "monitored_resource_descriptor": monitoredResourceDescriptor, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/monitoredResourceDescriptors/" + + monitoredResourceDescriptor + + "" } // ListMonitoredResourceDescriptors lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. @@ -278,7 +265,7 @@ func (c *MetricClient) GetMetricDescriptor(ctx context.Context, req *monitoringp // CreateMetricDescriptor creates a new metric descriptor. // User-created metric descriptors define -// [custom metrics](/monitoring/custom-metrics). +// custom metrics (at /monitoring/custom-metrics). func (c *MetricClient) CreateMetricDescriptor(ctx context.Context, req *monitoringpb.CreateMetricDescriptorRequest, opts ...gax.CallOption) (*metricpb.MetricDescriptor, error) { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.CreateMetricDescriptor[0:len(c.CallOptions.CreateMetricDescriptor):len(c.CallOptions.CreateMetricDescriptor)], opts...) @@ -295,7 +282,7 @@ func (c *MetricClient) CreateMetricDescriptor(ctx context.Context, req *monitori } // DeleteMetricDescriptor deletes a metric descriptor. Only user-created -// [custom metrics](/monitoring/custom-metrics) can be deleted. +// custom metrics (at /monitoring/custom-metrics) can be deleted. func (c *MetricClient) DeleteMetricDescriptor(ctx context.Context, req *monitoringpb.DeleteMetricDescriptorRequest, opts ...gax.CallOption) error { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.DeleteMetricDescriptor[0:len(c.CallOptions.DeleteMetricDescriptor):len(c.CallOptions.DeleteMetricDescriptor)], opts...) diff --git a/vendor/cloud.google.com/go/profiler/profiler.go b/vendor/cloud.google.com/go/profiler/profiler.go index 7676fd71e..a203a8a4c 100644 --- a/vendor/cloud.google.com/go/profiler/profiler.go +++ b/vendor/cloud.google.com/go/profiler/profiler.go @@ -16,29 +16,28 @@ // // This package is still experimental and subject to change. // +// Usage example: +// +// import "cloud.google.com/go/profiler" +// ... +// err := profiler.Start(profiler.Config{Service: "my-service"}) +// if err != nil { +// // TODO: Handle error. +// } +// // Calling Start will start a goroutine to collect profiles and // upload to Cloud Profiler server, at the rhythm specified by // the server. // -// The caller should provide the target string in the config so Cloud -// Profiler knows how to group the profile data. Otherwise the target -// string is set to "unknown". -// -// Optionally DebugLogging can be set in the config to enable detailed -// logging from profiler. -// -// Start should only be called once. The first call will start -// the profiling goroutine. Any additional calls will be ignored. +// The caller must provide the service string in the config, and +// may provide other information as well. See Config for details. package profiler import ( "bytes" "errors" - "fmt" "log" "runtime/pprof" - "sort" - "strings" "sync" "time" @@ -48,7 +47,6 @@ import ( "github.com/golang/protobuf/ptypes" gax "github.com/googleapis/gax-go" "golang.org/x/net/context" - "golang.org/x/oauth2/google" "google.golang.org/api/option" gtransport "google.golang.org/api/transport/grpc" pb "google.golang.org/genproto/googleapis/devtools/cloudprofiler/v2" @@ -60,7 +58,7 @@ import ( ) var ( - config = &Config{} + config Config startOnce sync.Once // getProjectID, getInstanceName, getZone, startCPUProfile, stopCPUProfile, // writeHeapProfile and sleep are overrideable for testing. @@ -74,12 +72,12 @@ var ( ) const ( - apiAddress = "cloudprofiler.googleapis.com:443" - xGoogAPIMetadata = "x-goog-api-client" - deploymentKeyMetadata = "x-profiler-deployment-key-bin" - zoneNameLabel = "zone" - instanceLabel = "instance" - scope = "https://www.googleapis.com/auth/monitoring.write" + apiAddress = "cloudprofiler.googleapis.com:443" + xGoogAPIMetadata = "x-goog-api-client" + zoneNameLabel = "zone" + versionLabel = "version" + instanceLabel = "instance" + scope = "https://www.googleapis.com/auth/monitoring.write" initialBackoff = time.Second // Ensure the agent will recover within 1 hour. @@ -90,10 +88,25 @@ const ( // Config is the profiler configuration. type Config struct { - // Target groups related deployments together, defaults to "unknown". - Target string + // Service (or deprecated Target) must be provided to start the profiler. + // It specifies the name of the service under which the profiled data + // will be recorded and exposed at the Cloud Profiler UI for the project. + // You can specify an arbitrary string, but see Deployment.target at + // https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudprofiler/v2/profiler.proto + // for restrictions. + // NOTE: The string should be the same across different replicas of + // your service so that the globally constant profiling rate is + // maintained. Do not put things like PID or unique pod ID in the name. + Service string - // DebugLogging enables detailed debug logging from profiler. + // ServiceVersion is an optional field specifying the version of the + // service. It can be an arbitrary string. Cloud Profiler profiles + // once per minute for each version of each service in each zone. + // ServiceVersion defaults to an empty string. + ServiceVersion string + + // DebugLogging enables detailed debug logging from profiler. It + // defaults to false. DebugLogging bool // ProjectID is the Cloud Console project ID to use instead of @@ -121,35 +134,36 @@ type Config struct { // agent API. Defaults to the production environment, overridable // for testing. APIAddr string + + // Target is deprecated, use Service instead. + Target string } // startError represents the error occured during the // initializating and starting of the agent. var startError error -// Start starts a goroutine to collect and upload profiles. -// See package level documentation for details. -func Start(cfg *Config, options ...option.ClientOption) error { +// Start starts a goroutine to collect and upload profiles. The +// caller must provide the service string in the config. See +// Config for details. Start should only be called once. Any +// additional calls will be ignored. +func Start(cfg Config, options ...option.ClientOption) error { startOnce.Do(func() { startError = start(cfg, options...) }) return startError } -func start(cfg *Config, options ...option.ClientOption) error { - initializeConfig(cfg) - - ctx := context.Background() - - ts, err := google.DefaultTokenSource(ctx, scope) - if err != nil { - debugLog("failed to get application default credentials: %v", err) +func start(cfg Config, options ...option.ClientOption) error { + if err := initializeConfig(cfg); err != nil { + debugLog("failed to initialize config: %v", err) return err } + ctx := context.Background() + opts := []option.ClientOption{ option.WithEndpoint(config.APIAddr), - option.WithTokenSource(ts), option.WithScopes(scope), } opts = append(opts, options...) @@ -166,7 +180,9 @@ func start(cfg *Config, options ...option.ClientOption) error { return err } - a, ctx := initializeResources(ctx, conn, d) + l := initializeProfileLabels() + + a, ctx := initializeResources(ctx, conn, d, l) go pollProfilerService(ctx, a) return nil } @@ -180,9 +196,9 @@ func debugLog(format string, e ...interface{}) { // agent polls Cloud Profiler server for instructions on behalf of // a task, and collects and uploads profiles as requested. type agent struct { - client *client - deployment *pb.Deployment - creationErrorCount int64 + client *client + deployment *pb.Deployment + profileLabels map[string]string } // abortedBackoffDuration retrieves the retry duration from gRPC trailing @@ -292,6 +308,7 @@ func (a *agent) profileAndUpload(ctx context.Context, p *pb.Profile) { } p.ProfileBytes = prof.Bytes() + p.Labels = a.profileLabels req := pb.UpdateProfileRequest{Profile: p} // Upload profile, discard profile in case of error. @@ -308,22 +325,6 @@ type client struct { // Metadata for google API to be sent with each request. xGoogHeader []string - - // Metadata for Cloud Profiler API to be sent with each request. - profilerHeader []string -} - -// setProfilerHeader sets the unique key string for a deployment target in -// the `x-profiler-deployment-key-bin` header passed on each request. -// Intended for use by Cloud Profiler agents. -func (c *client) setProfilerHeader(d *pb.Deployment) { - labels := make([]string, 0, len(d.Labels)) - for k, v := range d.Labels { - labels = append(labels, fmt.Sprintf("%s|%s", k, v)) - } - sort.Strings(labels) - key := d.ProjectId + "##" + d.Target + "##" + strings.Join(labels, "#") - c.profilerHeader = []string{key} } // setXGoogHeader sets the name and version of the application in @@ -339,7 +340,6 @@ func (c *client) insertMetadata(ctx context.Context) context.Context { md, _ := grpcmd.FromOutgoingContext(ctx) md = md.Copy() md[xGoogAPIMetadata] = c.xGoogHeader - md[deploymentKeyMetadata] = c.profilerHeader return grpcmd.NewOutgoingContext(ctx, md) } @@ -354,14 +354,6 @@ func initializeDeployment() (*pb.Deployment, error) { } } - instance := config.InstanceName - if instance == "" { - instance, err = getInstanceName() - if err != nil { - return nil, err - } - } - zone := config.ZoneName if zone == "" { zone, err = getZone() @@ -370,39 +362,62 @@ func initializeDeployment() (*pb.Deployment, error) { } } + labels := map[string]string{ + zoneNameLabel: zone, + } + if config.ServiceVersion != "" { + labels[versionLabel] = config.ServiceVersion + } + return &pb.Deployment{ ProjectId: projectID, Target: config.Target, - Labels: map[string]string{ - instanceLabel: instance, - zoneNameLabel: zone, - }, + Labels: labels, }, nil } -func initializeResources(ctx context.Context, conn *grpc.ClientConn, d *pb.Deployment) (*agent, context.Context) { +func initializeProfileLabels() map[string]string { + instance := config.InstanceName + if instance == "" { + var err error + if instance, err = getInstanceName(); err != nil { + instance = "unknown" + debugLog("failed to get instance name: %v", err) + } + } + + return map[string]string{instanceLabel: instance} +} + +func initializeResources(ctx context.Context, conn *grpc.ClientConn, d *pb.Deployment, l map[string]string) (*agent, context.Context) { c := &client{ client: pb.NewProfilerServiceClient(conn), } c.setXGoogHeader() - c.setProfilerHeader(d) ctx = c.insertMetadata(ctx) return &agent{ - client: c, - deployment: d, + client: c, + deployment: d, + profileLabels: l, }, ctx } -func initializeConfig(cfg *Config) { - *config = *cfg +func initializeConfig(cfg Config) error { + config = cfg + + if config.Service != "" { + config.Target = config.Service + } if config.Target == "" { - config.Target = "unknown" + return errors.New("service name must be specified in the configuration") } + if config.APIAddr == "" { config.APIAddr = apiAddress } + return nil } // pollProfilerService starts an endless loop to poll Cloud Profiler diff --git a/vendor/cloud.google.com/go/profiler/profiler_example_test.go b/vendor/cloud.google.com/go/profiler/profiler_example_test.go index f683fb16d..8e3277626 100644 --- a/vendor/cloud.google.com/go/profiler/profiler_example_test.go +++ b/vendor/cloud.google.com/go/profiler/profiler_example_test.go @@ -19,13 +19,7 @@ import ( ) func ExampleStart() { - // The caller should provide the target string in the config so Cloud - // Profiler knows how to group the profile data. Otherwise the target - // string is set to "unknown". - // - // Optionally DebugLogging can be set in the config to enable detailed - // logging from profiler. - err := profiler.Start(&profiler.Config{Target: "my-target"}) + err := profiler.Start(profiler.Config{Service: "my-service", ServiceVersion: "v1"}) if err != nil { //TODO: Handle error. } diff --git a/vendor/cloud.google.com/go/profiler/profiler_test.go b/vendor/cloud.google.com/go/profiler/profiler_test.go index cf6996704..ce0d8f81c 100644 --- a/vendor/cloud.google.com/go/profiler/profiler_test.go +++ b/vendor/cloud.google.com/go/profiler/profiler_test.go @@ -17,10 +17,12 @@ package profiler import ( "errors" "io" + "runtime/pprof" "strings" "testing" "time" + gcemd "cloud.google.com/go/compute/metadata" "cloud.google.com/go/internal/testutil" "cloud.google.com/go/profiler/mocks" "github.com/golang/mock/gomock" @@ -36,30 +38,33 @@ import ( ) const ( - testProjectID = "test-project-ID" - testInstanceName = "test-instance-name" - testZoneName = "test-zone-name" - testTarget = "test-target" + testProjectID = "test-project-ID" + testInstanceName = "test-instance-name" + testZoneName = "test-zone-name" + testTarget = "test-target" + testService = "test-service" + testServiceVersion = "test-service-version" ) func createTestDeployment() *pb.Deployment { - labels := make(map[string]string) - labels[zoneNameLabel] = testZoneName - labels[instanceLabel] = testInstanceName + labels := map[string]string{ + zoneNameLabel: testZoneName, + versionLabel: testServiceVersion, + } return &pb.Deployment{ ProjectId: testProjectID, - Target: testTarget, + Target: testService, Labels: labels, } } func createTestAgent(psc pb.ProfilerServiceClient) *agent { c := &client{client: psc} - a := &agent{ - client: c, - deployment: createTestDeployment(), + return &agent{ + client: c, + deployment: createTestDeployment(), + profileLabels: map[string]string{instanceLabel: testInstanceName}, } - return a } func createTrailers(dur time.Duration) map[string]string { @@ -93,6 +98,13 @@ func TestCreateProfile(t *testing.T) { } func TestProfileAndUpload(t *testing.T) { + defer func() { + startCPUProfile = pprof.StartCPUProfile + stopCPUProfile = pprof.StopCPUProfile + writeHeapProfile = pprof.WriteHeapProfile + sleep = gax.Sleep + }() + ctx := context.Background() ctrl := gomock.NewController(t) defer ctrl.Finish() @@ -188,12 +200,12 @@ func TestProfileAndUpload(t *testing.T) { if tt.duration != nil { p.Duration = ptypes.DurationProto(*tt.duration) } - if tt.wantBytes != nil { wantProfile := &pb.Profile{ ProfileType: p.ProfileType, Duration: p.Duration, ProfileBytes: tt.wantBytes, + Labels: a.profileLabels, } wantRequest := pb.UpdateProfileRequest{ Profile: wantProfile, @@ -296,9 +308,11 @@ func TestRetry(t *testing.T) { func TestInitializeResources(t *testing.T) { d := createTestDeployment() + l := map[string]string{instanceLabel: testInstanceName} + ctx := context.Background() - a, ctx := initializeResources(ctx, nil, d) + a, ctx := initializeResources(ctx, nil, d, l) if xg := a.client.xGoogHeader; len(xg) == 0 { t.Errorf("initializeResources() sets empty xGoogHeader") @@ -317,44 +331,93 @@ func TestInitializeResources(t *testing.T) { } } - wantPH := "test-project-ID##test-target##instance|test-instance-name#zone|test-zone-name" - if ph := a.client.profilerHeader; len(ph) == 0 { - t.Errorf("initializeResources() sets empty profilerHeader") - } else if ph[0] != wantPH { - t.Errorf("initializeResources() sets wrong profilerHeader, got: %v, want: %v", ph[0], wantPH) - } - md, _ := grpcmd.FromOutgoingContext(ctx) if !testutil.Equal(md[xGoogAPIMetadata], a.client.xGoogHeader) { t.Errorf("md[%v] = %v, want equal xGoogHeader = %v", xGoogAPIMetadata, md[xGoogAPIMetadata], a.client.xGoogHeader) } - if !testutil.Equal(md[deploymentKeyMetadata], a.client.profilerHeader) { - t.Errorf("md[%v] = %v, want equal profilerHeader = %v", deploymentKeyMetadata, md[deploymentKeyMetadata], a.client.profilerHeader) - } } func TestInitializeDeployment(t *testing.T) { + defer func() { + getProjectID = gcemd.ProjectID + getZone = gcemd.Zone + config = Config{} + }() + getProjectID = func() (string, error) { return testProjectID, nil } - getInstanceName = func() (string, error) { - return testInstanceName, nil - } getZone = func() (string, error) { return testZoneName, nil } - config = &Config{Target: testTarget} + cfg := Config{Service: testService, ServiceVersion: testServiceVersion} + initializeConfig(cfg) d, err := initializeDeployment() - if err != nil { t.Errorf("initializeDeployment() got error: %v, want no error", err) } - want := createTestDeployment() - - if !testutil.Equal(d, want) { - t.Errorf("initializeDeployment() got wrong deployment, got: %v, want %v", d, want) + if want := createTestDeployment(); !testutil.Equal(d, want) { + t.Errorf("initializeDeployment() got: %v, want %v", d, want) + } +} + +func TestInitializeConfig(t *testing.T) { + oldConfig := config + defer func() { + config = oldConfig + }() + + for _, tt := range []struct { + config Config + wantTarget string + wantErrorString string + }{ + { + Config{Service: testService}, + testService, + "", + }, + { + Config{Target: testTarget}, + testTarget, + "", + }, + { + Config{}, + "", + "service name must be specified in the configuration", + }, + } { + errorString := "" + if err := initializeConfig(tt.config); err != nil { + errorString = err.Error() + } + + if errorString != tt.wantErrorString { + t.Errorf("initializeConfig(%v) got error: %v, want %v", tt.config, errorString, tt.wantErrorString) + } + + if config.Target != tt.wantTarget { + t.Errorf("initializeConfig(%v) got target: %v, want %v", tt.config, config.Target, tt.wantTarget) + } + } +} + +func TestInitializeProfileLabels(t *testing.T) { + defer func() { + getInstanceName = gcemd.InstanceName + }() + + getInstanceName = func() (string, error) { + return testInstanceName, nil + } + + l := initializeProfileLabels() + want := map[string]string{instanceLabel: testInstanceName} + if !testutil.Equal(l, want) { + t.Errorf("initializeProfileLabels() got: %v, want %v", l, want) } } diff --git a/vendor/cloud.google.com/go/pubsub/acker.go b/vendor/cloud.google.com/go/pubsub/acker.go deleted file mode 100644 index 088ed79cf..000000000 --- a/vendor/cloud.google.com/go/pubsub/acker.go +++ /dev/null @@ -1,159 +0,0 @@ -// 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. -// 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. - -package pubsub - -import ( - "sync" - "time" - - "golang.org/x/net/context" -) - -// ackBuffer stores the pending ack IDs and notifies the Dirty channel when it becomes non-empty. -type ackBuffer struct { - Dirty chan struct{} - // Close done when ackBuffer is no longer needed. - Done chan struct{} - - mu sync.Mutex - pending []string - send bool -} - -// Add adds ackID to the buffer. -func (buf *ackBuffer) Add(ackID string) { - buf.mu.Lock() - defer buf.mu.Unlock() - buf.pending = append(buf.pending, ackID) - - // If we are transitioning into a non-empty notification state. - if buf.send && len(buf.pending) == 1 { - buf.notify() - } -} - -// RemoveAll removes all ackIDs from the buffer and returns them. -func (buf *ackBuffer) RemoveAll() []string { - buf.mu.Lock() - defer buf.mu.Unlock() - - ret := buf.pending - buf.pending = nil - return ret -} - -// SendNotifications enables sending dirty notification on empty -> non-empty transitions. -// If the buffer is already non-empty, a notification will be sent immediately. -func (buf *ackBuffer) SendNotifications() { - buf.mu.Lock() - defer buf.mu.Unlock() - - buf.send = true - // If we are transitioning into a non-empty notification state. - if len(buf.pending) > 0 { - buf.notify() - } -} - -func (buf *ackBuffer) notify() { - go func() { - select { - case buf.Dirty <- struct{}{}: - case <-buf.Done: - } - }() -} - -// acker acks messages in batches. -type acker struct { - s service - Ctx context.Context // The context to use when acknowledging messages. - Sub string // The full name of the subscription. - AckTick <-chan time.Time // AckTick supplies the frequency with which to make ack requests. - - // Notify is called with an ack ID after the message with that ack ID - // has been processed. An ackID is considered to have been processed - // if at least one attempt has been made to acknowledge it. - Notify func(string) - - ackBuffer - - wg sync.WaitGroup - done chan struct{} -} - -// Start intiates processing of ackIDs which are added via Add. -// Notify is called with each ackID once it has been processed. -func (a *acker) Start() { - a.done = make(chan struct{}) - a.ackBuffer.Dirty = make(chan struct{}) - a.ackBuffer.Done = a.done - - a.wg.Add(1) - go func() { - defer a.wg.Done() - for { - select { - case <-a.ackBuffer.Dirty: - a.ack(a.ackBuffer.RemoveAll()) - case <-a.AckTick: - a.ack(a.ackBuffer.RemoveAll()) - case <-a.done: - return - } - } - - }() -} - -// Ack adds an ack id to be acked in the next batch. -func (a *acker) Ack(ackID string) { - a.ackBuffer.Add(ackID) -} - -// FastMode switches acker into a mode which acks messages as they arrive, rather than waiting -// for a.AckTick. -func (a *acker) FastMode() { - a.ackBuffer.SendNotifications() -} - -// Stop drops all pending messages, and releases resources before returning. -func (a *acker) Stop() { - close(a.done) - a.wg.Wait() -} - -const maxAckAttempts = 2 - -// ack acknowledges the supplied ackIDs. -// After the acknowledgement request has completed (regardless of its success -// or failure), ids will be passed to a.Notify. -func (a *acker) ack(ids []string) { - head, tail := a.s.splitAckIDs(ids) - for len(head) > 0 { - for i := 0; i < maxAckAttempts; i++ { - if a.s.acknowledge(a.Ctx, a.Sub, head) == nil { - break - } - } - // NOTE: if retry gives up and returns an error, we simply drop - // those ack IDs. The messages will be redelivered and this is - // a documented behaviour of the API. - head, tail = a.s.splitAckIDs(tail) - } - for _, id := range ids { - a.Notify(id) - } -} diff --git a/vendor/cloud.google.com/go/pubsub/acker_test.go b/vendor/cloud.google.com/go/pubsub/acker_test.go deleted file mode 100644 index 9e283bafc..000000000 --- a/vendor/cloud.google.com/go/pubsub/acker_test.go +++ /dev/null @@ -1,262 +0,0 @@ -// 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. -// 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. - -package pubsub - -import ( - "errors" - "reflect" - "sort" - "testing" - "time" - - "golang.org/x/net/context" -) - -func TestAcker(t *testing.T) { - tick := make(chan time.Time) - s := &testService{acknowledgeCalled: make(chan acknowledgeCall)} - - processed := make(chan string, 10) - acker := &acker{ - s: s, - Ctx: context.Background(), - Sub: "subname", - AckTick: tick, - Notify: func(ackID string) { processed <- ackID }, - } - acker.Start() - - checkAckProcessed := func(ackIDs []string) { - got := <-s.acknowledgeCalled - sort.Strings(got.ackIDs) - - want := acknowledgeCall{ - subName: "subname", - ackIDs: ackIDs, - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("acknowledge: got:\n%v\nwant:\n%v", got, want) - } - } - - acker.Ack("a") - acker.Ack("b") - tick <- time.Time{} - checkAckProcessed([]string{"a", "b"}) - acker.Ack("c") - tick <- time.Time{} - checkAckProcessed([]string{"c"}) - acker.Stop() - - // all IDS should have been sent to processed. - close(processed) - processedIDs := []string{} - for id := range processed { - processedIDs = append(processedIDs, id) - } - sort.Strings(processedIDs) - want := []string{"a", "b", "c"} - if !reflect.DeepEqual(processedIDs, want) { - t.Errorf("acker processed: got:\n%v\nwant:\n%v", processedIDs, want) - } -} - -func TestAckerFastMode(t *testing.T) { - tick := make(chan time.Time) - s := &testService{acknowledgeCalled: make(chan acknowledgeCall)} - - processed := make(chan string, 10) - acker := &acker{ - s: s, - Ctx: context.Background(), - Sub: "subname", - AckTick: tick, - Notify: func(ackID string) { processed <- ackID }, - } - acker.Start() - - checkAckProcessed := func(ackIDs []string) { - got := <-s.acknowledgeCalled - sort.Strings(got.ackIDs) - - want := acknowledgeCall{ - subName: "subname", - ackIDs: ackIDs, - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("acknowledge: got:\n%v\nwant:\n%v", got, want) - } - } - // No ticks are sent; fast mode doesn't need them. - acker.Ack("a") - acker.Ack("b") - acker.FastMode() - checkAckProcessed([]string{"a", "b"}) - acker.Ack("c") - checkAckProcessed([]string{"c"}) - acker.Stop() - - // all IDS should have been sent to processed. - close(processed) - processedIDs := []string{} - for id := range processed { - processedIDs = append(processedIDs, id) - } - sort.Strings(processedIDs) - want := []string{"a", "b", "c"} - if !reflect.DeepEqual(processedIDs, want) { - t.Errorf("acker processed: got:\n%v\nwant:\n%v", processedIDs, want) - } -} - -// TestAckerStop checks that Stop returns immediately. -func TestAckerStop(t *testing.T) { - tick := make(chan time.Time) - s := &testService{acknowledgeCalled: make(chan acknowledgeCall, 10)} - - processed := make(chan string) - acker := &acker{ - s: s, - Ctx: context.Background(), - Sub: "subname", - AckTick: tick, - Notify: func(ackID string) { processed <- ackID }, - } - - acker.Start() - - stopped := make(chan struct{}) - - acker.Ack("a") - - go func() { - acker.Stop() - stopped <- struct{}{} - }() - - // Stopped should have been written to by the time this sleep completes. - time.Sleep(time.Millisecond) - - // Receiving from processed should cause Stop to subsequently return, - // so it should never be possible to read from stopped before - // processed. - select { - case <-stopped: - case <-processed: - t.Errorf("acker.Stop processed an ack id before returning") - case <-time.After(time.Millisecond): - t.Errorf("acker.Stop never returned") - } -} - -type ackCallResult struct { - ackIDs []string - err error -} - -type ackService struct { - service - - calls []ackCallResult - - t *testing.T // used for error logging. -} - -func (as *ackService) acknowledge(ctx context.Context, subName string, ackIDs []string) error { - if len(as.calls) == 0 { - as.t.Fatalf("unexpected call to acknowledge: ackIDs: %v", ackIDs) - } - call := as.calls[0] - as.calls = as.calls[1:] - - if got, want := ackIDs, call.ackIDs; !reflect.DeepEqual(got, want) { - as.t.Errorf("unexpected arguments to acknowledge: got: %v ; want: %v", got, want) - } - return call.err -} - -// Test implementation returns the first 2 elements as head, and the rest as tail. -func (as *ackService) splitAckIDs(ids []string) ([]string, []string) { - if len(ids) < 2 { - return ids, nil - } - return ids[:2], ids[2:] -} - -func TestAckerSplitsBatches(t *testing.T) { - type testCase struct { - calls []ackCallResult - } - for _, tc := range []testCase{ - { - calls: []ackCallResult{ - { - ackIDs: []string{"a", "b"}, - }, - { - ackIDs: []string{"c", "d"}, - }, - { - ackIDs: []string{"e", "f"}, - }, - }, - }, - { - calls: []ackCallResult{ - { - ackIDs: []string{"a", "b"}, - err: errors.New("bang"), - }, - // On error we retry once. - { - ackIDs: []string{"a", "b"}, - err: errors.New("bang"), - }, - // We give up after failing twice, so we move on to the next set, "c" and "d" - { - ackIDs: []string{"c", "d"}, - err: errors.New("bang"), - }, - // Again, we retry once. - { - ackIDs: []string{"c", "d"}, - }, - { - ackIDs: []string{"e", "f"}, - }, - }, - }, - } { - s := &ackService{ - t: t, - calls: tc.calls, - } - - acker := &acker{ - s: s, - Ctx: context.Background(), - Sub: "subname", - Notify: func(string) {}, - } - - acker.ack([]string{"a", "b", "c", "d", "e", "f"}) - - if len(s.calls) != 0 { - t.Errorf("expected ack calls did not occur: %v", s.calls) - } - } -} diff --git a/vendor/cloud.google.com/go/pubsub/apiv1/doc.go b/vendor/cloud.google.com/go/pubsub/apiv1/doc.go index 6a4addcb1..c15769b7c 100644 --- a/vendor/cloud.google.com/go/pubsub/apiv1/doc.go +++ b/vendor/cloud.google.com/go/pubsub/apiv1/doc.go @@ -35,8 +35,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/cloud.google.com/go/pubsub/apiv1/mock_test.go b/vendor/cloud.google.com/go/pubsub/apiv1/mock_test.go index eddd8e5b0..01bb5fcb7 100644 --- a/vendor/cloud.google.com/go/pubsub/apiv1/mock_test.go +++ b/vendor/cloud.google.com/go/pubsub/apiv1/mock_test.go @@ -75,6 +75,18 @@ func (s *mockPublisherServer) CreateTopic(ctx context.Context, req *pubsubpb.Top return s.resps[0].(*pubsubpb.Topic), nil } +func (s *mockPublisherServer) UpdateTopic(ctx context.Context, req *pubsubpb.UpdateTopicRequest) (*pubsubpb.Topic, error) { + md, _ := metadata.FromIncomingContext(ctx) + if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { + return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) + } + s.reqs = append(s.reqs, req) + if s.err != nil { + return nil, s.err + } + return s.resps[0].(*pubsubpb.Topic), nil +} + func (s *mockPublisherServer) Publish(ctx context.Context, req *pubsubpb.PublishRequest) (*pubsubpb.PublishResponse, error) { md, _ := metadata.FromIncomingContext(ctx) if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { @@ -358,6 +370,18 @@ func (s *mockSubscriberServer) CreateSnapshot(ctx context.Context, req *pubsubpb return s.resps[0].(*pubsubpb.Snapshot), nil } +func (s *mockSubscriberServer) UpdateSnapshot(ctx context.Context, req *pubsubpb.UpdateSnapshotRequest) (*pubsubpb.Snapshot, error) { + md, _ := metadata.FromIncomingContext(ctx) + if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { + return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) + } + s.reqs = append(s.reqs, req) + if s.err != nil { + return nil, s.err + } + return s.resps[0].(*pubsubpb.Snapshot), nil +} + func (s *mockSubscriberServer) DeleteSnapshot(ctx context.Context, req *pubsubpb.DeleteSnapshotRequest) (*emptypb.Empty, error) { md, _ := metadata.FromIncomingContext(ctx) if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { @@ -474,6 +498,69 @@ func TestPublisherCreateTopicError(t *testing.T) { } _ = resp } +func TestPublisherUpdateTopic(t *testing.T) { + var name string = "name3373707" + var expectedResponse = &pubsubpb.Topic{ + Name: name, + } + + mockPublisher.err = nil + mockPublisher.reqs = nil + + mockPublisher.resps = append(mockPublisher.resps[:0], expectedResponse) + + var topic *pubsubpb.Topic = &pubsubpb.Topic{} + var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} + var request = &pubsubpb.UpdateTopicRequest{ + Topic: topic, + UpdateMask: updateMask, + } + + c, err := NewPublisherClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.UpdateTopic(context.Background(), request) + + if err != nil { + t.Fatal(err) + } + + if want, got := request, mockPublisher.reqs[0]; !proto.Equal(want, got) { + t.Errorf("wrong request %q, want %q", got, want) + } + + if want, got := expectedResponse, resp; !proto.Equal(want, got) { + t.Errorf("wrong response %q, want %q)", got, want) + } +} + +func TestPublisherUpdateTopicError(t *testing.T) { + errCode := codes.PermissionDenied + mockPublisher.err = gstatus.Error(errCode, "test error") + + var topic *pubsubpb.Topic = &pubsubpb.Topic{} + var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} + var request = &pubsubpb.UpdateTopicRequest{ + Topic: topic, + UpdateMask: updateMask, + } + + c, err := NewPublisherClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.UpdateTopic(context.Background(), request) + + if st, ok := gstatus.FromError(err); !ok { + t.Errorf("got error %v, expected grpc error", err) + } else if c := st.Code(); c != errCode { + t.Errorf("got error code %q, want %q", c, errCode) + } + _ = resp +} func TestPublisherPublish(t *testing.T) { var messageIdsElement string = "messageIdsElement-744837059" var messageIds = []string{messageIdsElement} @@ -1581,6 +1668,71 @@ func TestSubscriberCreateSnapshotError(t *testing.T) { } _ = resp } +func TestSubscriberUpdateSnapshot(t *testing.T) { + var name string = "name3373707" + var topic string = "topic110546223" + var expectedResponse = &pubsubpb.Snapshot{ + Name: name, + Topic: topic, + } + + mockSubscriber.err = nil + mockSubscriber.reqs = nil + + mockSubscriber.resps = append(mockSubscriber.resps[:0], expectedResponse) + + var snapshot *pubsubpb.Snapshot = &pubsubpb.Snapshot{} + var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} + var request = &pubsubpb.UpdateSnapshotRequest{ + Snapshot: snapshot, + UpdateMask: updateMask, + } + + c, err := NewSubscriberClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.UpdateSnapshot(context.Background(), request) + + if err != nil { + t.Fatal(err) + } + + if want, got := request, mockSubscriber.reqs[0]; !proto.Equal(want, got) { + t.Errorf("wrong request %q, want %q", got, want) + } + + if want, got := expectedResponse, resp; !proto.Equal(want, got) { + t.Errorf("wrong response %q, want %q)", got, want) + } +} + +func TestSubscriberUpdateSnapshotError(t *testing.T) { + errCode := codes.PermissionDenied + mockSubscriber.err = gstatus.Error(errCode, "test error") + + var snapshot *pubsubpb.Snapshot = &pubsubpb.Snapshot{} + var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} + var request = &pubsubpb.UpdateSnapshotRequest{ + Snapshot: snapshot, + UpdateMask: updateMask, + } + + c, err := NewSubscriberClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.UpdateSnapshot(context.Background(), request) + + if st, ok := gstatus.FromError(err); !ok { + t.Errorf("got error %v, expected grpc error", err) + } else if c := st.Code(); c != errCode { + t.Errorf("got error code %q, want %q", c, errCode) + } + _ = resp +} func TestSubscriberDeleteSnapshot(t *testing.T) { var expectedResponse *emptypb.Empty = &emptypb.Empty{} diff --git a/vendor/cloud.google.com/go/pubsub/apiv1/publisher_client.go b/vendor/cloud.google.com/go/pubsub/apiv1/publisher_client.go index b5bc84856..eab21d8f4 100644 --- a/vendor/cloud.google.com/go/pubsub/apiv1/publisher_client.go +++ b/vendor/cloud.google.com/go/pubsub/apiv1/publisher_client.go @@ -32,14 +32,10 @@ import ( "google.golang.org/grpc/codes" ) -var ( - publisherProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}") - publisherTopicPathTemplate = gax.MustCompilePathTemplate("projects/{project}/topics/{topic}") -) - // PublisherCallOptions contains the retry settings for each method of PublisherClient. type PublisherCallOptions struct { CreateTopic []gax.CallOption + UpdateTopic []gax.CallOption Publish []gax.CallOption GetTopic []gax.CallOption ListTopics []gax.CallOption @@ -88,6 +84,7 @@ func defaultPublisherCallOptions() *PublisherCallOptions { } return &PublisherCallOptions{ CreateTopic: retry[[2]string{"default", "idempotent"}], + UpdateTopic: retry[[2]string{"default", "idempotent"}], Publish: retry[[2]string{"messaging", "one_plus_delivery"}], GetTopic: retry[[2]string{"default", "idempotent"}], ListTopics: retry[[2]string{"default", "idempotent"}], @@ -152,25 +149,20 @@ func (c *PublisherClient) SetGoogleClientInfo(keyval ...string) { // PublisherProjectPath returns the path for the project resource. func PublisherProjectPath(project string) string { - path, err := publisherProjectPathTemplate.Render(map[string]string{ - "project": project, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "" } // PublisherTopicPath returns the path for the topic resource. func PublisherTopicPath(project, topic string) string { - path, err := publisherTopicPathTemplate.Render(map[string]string{ - "project": project, - "topic": topic, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/topics/" + + topic + + "" } func (c *PublisherClient) SubscriptionIAM(subscription *pubsubpb.Subscription) *iam.Handle { @@ -197,9 +189,30 @@ func (c *PublisherClient) CreateTopic(ctx context.Context, req *pubsubpb.Topic, return resp, nil } -// Publish adds one or more messages to the topic. Returns `NOT_FOUND` if the topic +// UpdateTopic updates an existing topic. Note that certain properties of a topic are not +// modifiable. Options settings follow the style guide: +// NOTE: The style guide requires body: "topic" instead of body: "*". +// Keeping the latter for internal consistency in V1, however it should be +// corrected in V2. See +// https://cloud.google.com/apis/design/standard_methods#update for details. +func (c *PublisherClient) UpdateTopic(ctx context.Context, req *pubsubpb.UpdateTopicRequest, opts ...gax.CallOption) (*pubsubpb.Topic, error) { + ctx = insertXGoog(ctx, c.xGoogHeader) + opts = append(c.CallOptions.UpdateTopic[0:len(c.CallOptions.UpdateTopic):len(c.CallOptions.UpdateTopic)], opts...) + var resp *pubsubpb.Topic + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.publisherClient.UpdateTopic(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// Publish adds one or more messages to the topic. Returns NOT_FOUND if the topic // does not exist. The message payload must not be empty; it must contain -// either a non-empty data field, or at least one attribute. +// either a non-empty data field, or at least one attribute. func (c *PublisherClient) Publish(ctx context.Context, req *pubsubpb.PublishRequest, opts ...gax.CallOption) (*pubsubpb.PublishResponse, error) { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.Publish[0:len(c.CallOptions.Publish):len(c.CallOptions.Publish)], opts...) @@ -301,11 +314,11 @@ func (c *PublisherClient) ListTopicSubscriptions(ctx context.Context, req *pubsu return it } -// DeleteTopic deletes the topic with the given name. Returns `NOT_FOUND` if the topic +// DeleteTopic deletes the topic with the given name. Returns NOT_FOUND if the topic // does not exist. After a topic is deleted, a new topic may be created with // the same name; this is an entirely new topic with none of the old // configuration or subscriptions. Existing subscriptions to this topic are -// not deleted, but their `topic` field is set to `_deleted-topic_`. +// not deleted, but their topic field is set to _deleted-topic_. func (c *PublisherClient) DeleteTopic(ctx context.Context, req *pubsubpb.DeleteTopicRequest, opts ...gax.CallOption) error { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.DeleteTopic[0:len(c.CallOptions.DeleteTopic):len(c.CallOptions.DeleteTopic)], opts...) diff --git a/vendor/cloud.google.com/go/pubsub/apiv1/publisher_client_example_test.go b/vendor/cloud.google.com/go/pubsub/apiv1/publisher_client_example_test.go index ad77ce842..996652571 100644 --- a/vendor/cloud.google.com/go/pubsub/apiv1/publisher_client_example_test.go +++ b/vendor/cloud.google.com/go/pubsub/apiv1/publisher_client_example_test.go @@ -85,6 +85,24 @@ func ExamplePublisherClient_CreateTopic() { _ = resp } +func ExamplePublisherClient_UpdateTopic() { + ctx := context.Background() + c, err := pubsub.NewPublisherClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &pubsubpb.UpdateTopicRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.UpdateTopic(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExamplePublisherClient_Publish() { ctx := context.Background() c, err := pubsub.NewPublisherClient(ctx) diff --git a/vendor/cloud.google.com/go/pubsub/apiv1/subscriber_client.go b/vendor/cloud.google.com/go/pubsub/apiv1/subscriber_client.go index 29fc43936..eb6f3803a 100644 --- a/vendor/cloud.google.com/go/pubsub/apiv1/subscriber_client.go +++ b/vendor/cloud.google.com/go/pubsub/apiv1/subscriber_client.go @@ -32,13 +32,6 @@ import ( "google.golang.org/grpc/codes" ) -var ( - subscriberProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}") - subscriberSnapshotPathTemplate = gax.MustCompilePathTemplate("projects/{project}/snapshots/{snapshot}") - subscriberSubscriptionPathTemplate = gax.MustCompilePathTemplate("projects/{project}/subscriptions/{subscription}") - subscriberTopicPathTemplate = gax.MustCompilePathTemplate("projects/{project}/topics/{topic}") -) - // SubscriberCallOptions contains the retry settings for each method of SubscriberClient. type SubscriberCallOptions struct { CreateSubscription []gax.CallOption @@ -53,6 +46,7 @@ type SubscriberCallOptions struct { ModifyPushConfig []gax.CallOption ListSnapshots []gax.CallOption CreateSnapshot []gax.CallOption + UpdateSnapshot []gax.CallOption DeleteSnapshot []gax.CallOption Seek []gax.CallOption } @@ -93,6 +87,21 @@ func defaultSubscriberCallOptions() *SubscriberCallOptions { }) }), }, + {"streaming_messaging", "pull"}: { + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Canceled, + codes.DeadlineExceeded, + codes.ResourceExhausted, + codes.Internal, + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.3, + }) + }), + }, } return &SubscriberCallOptions{ CreateSubscription: retry[[2]string{"default", "idempotent"}], @@ -103,10 +112,11 @@ func defaultSubscriberCallOptions() *SubscriberCallOptions { ModifyAckDeadline: retry[[2]string{"default", "non_idempotent"}], Acknowledge: retry[[2]string{"messaging", "non_idempotent"}], Pull: retry[[2]string{"messaging", "pull"}], - StreamingPull: retry[[2]string{"messaging", "pull"}], + StreamingPull: retry[[2]string{"streaming_messaging", "pull"}], ModifyPushConfig: retry[[2]string{"default", "non_idempotent"}], ListSnapshots: retry[[2]string{"default", "idempotent"}], CreateSnapshot: retry[[2]string{"default", "idempotent"}], + UpdateSnapshot: retry[[2]string{"default", "idempotent"}], DeleteSnapshot: retry[[2]string{"default", "idempotent"}], Seek: retry[[2]string{"default", "non_idempotent"}], } @@ -130,7 +140,7 @@ type SubscriberClient struct { // NewSubscriberClient creates a new subscriber client. // // The service that an application uses to manipulate subscriptions and to -// consume messages from a subscription via the `Pull` method. +// consume messages from a subscription via the Pull method. func NewSubscriberClient(ctx context.Context, opts ...option.ClientOption) (*SubscriberClient, error) { conn, err := transport.DialGRPC(ctx, append(defaultSubscriberClientOptions(), opts...)...) if err != nil { @@ -168,49 +178,40 @@ func (c *SubscriberClient) SetGoogleClientInfo(keyval ...string) { // SubscriberProjectPath returns the path for the project resource. func SubscriberProjectPath(project string) string { - path, err := subscriberProjectPathTemplate.Render(map[string]string{ - "project": project, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "" } // SubscriberSnapshotPath returns the path for the snapshot resource. func SubscriberSnapshotPath(project, snapshot string) string { - path, err := subscriberSnapshotPathTemplate.Render(map[string]string{ - "project": project, - "snapshot": snapshot, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/snapshots/" + + snapshot + + "" } // SubscriberSubscriptionPath returns the path for the subscription resource. func SubscriberSubscriptionPath(project, subscription string) string { - path, err := subscriberSubscriptionPathTemplate.Render(map[string]string{ - "project": project, - "subscription": subscription, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/subscriptions/" + + subscription + + "" } // SubscriberTopicPath returns the path for the topic resource. func SubscriberTopicPath(project, topic string) string { - path, err := subscriberTopicPathTemplate.Render(map[string]string{ - "project": project, - "topic": topic, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/topics/" + + topic + + "" } func (c *SubscriberClient) SubscriptionIAM(subscription *pubsubpb.Subscription) *iam.Handle { @@ -222,13 +223,13 @@ func (c *SubscriberClient) TopicIAM(topic *pubsubpb.Topic) *iam.Handle { } // CreateSubscription creates a subscription to a given topic. -// If the subscription already exists, returns `ALREADY_EXISTS`. -// If the corresponding topic doesn't exist, returns `NOT_FOUND`. +// If the subscription already exists, returns ALREADY_EXISTS. +// If the corresponding topic doesn't exist, returns NOT_FOUND. // // If the name is not provided in the request, the server will assign a random // name for this subscription on the same project as the topic, conforming // to the -// [resource name format](https://cloud.google.com/pubsub/docs/overview#names). +// resource name format (at https://cloud.google.com/pubsub/docs/overview#names). // The generated name is populated in the returned Subscription object. // Note that for REST API requests, you must specify a name in the request. func (c *SubscriberClient) CreateSubscription(ctx context.Context, req *pubsubpb.Subscription, opts ...gax.CallOption) (*pubsubpb.Subscription, error) { @@ -264,6 +265,10 @@ func (c *SubscriberClient) GetSubscription(ctx context.Context, req *pubsubpb.Ge // UpdateSubscription updates an existing subscription. Note that certain properties of a // subscription, such as its topic, are not modifiable. +// NOTE: The style guide requires body: "subscription" instead of body: "*". +// Keeping the latter for internal consistency in V1, however it should be +// corrected in V2. See +// https://cloud.google.com/apis/design/standard_methods#update for details. func (c *SubscriberClient) UpdateSubscription(ctx context.Context, req *pubsubpb.UpdateSubscriptionRequest, opts ...gax.CallOption) (*pubsubpb.Subscription, error) { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.UpdateSubscription[0:len(c.CallOptions.UpdateSubscription):len(c.CallOptions.UpdateSubscription)], opts...) @@ -315,8 +320,8 @@ func (c *SubscriberClient) ListSubscriptions(ctx context.Context, req *pubsubpb. } // DeleteSubscription deletes an existing subscription. All messages retained in the subscription -// are immediately dropped. Calls to `Pull` after deletion will return -// `NOT_FOUND`. After a subscription is deleted, a new one may be created with +// are immediately dropped. Calls to Pull after deletion will return +// NOT_FOUND. After a subscription is deleted, a new one may be created with // the same name, but the new one has no association with the old // subscription or its topic unless the same topic is specified. func (c *SubscriberClient) DeleteSubscription(ctx context.Context, req *pubsubpb.DeleteSubscriptionRequest, opts ...gax.CallOption) error { @@ -334,7 +339,7 @@ func (c *SubscriberClient) DeleteSubscription(ctx context.Context, req *pubsubpb // to indicate that more time is needed to process a message by the // subscriber, or to make the message available for redelivery if the // processing was interrupted. Note that this does not modify the -// subscription-level `ackDeadlineSeconds` used for subsequent messages. +// subscription-level ackDeadlineSeconds used for subsequent messages. func (c *SubscriberClient) ModifyAckDeadline(ctx context.Context, req *pubsubpb.ModifyAckDeadlineRequest, opts ...gax.CallOption) error { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.ModifyAckDeadline[0:len(c.CallOptions.ModifyAckDeadline):len(c.CallOptions.ModifyAckDeadline)], opts...) @@ -346,8 +351,8 @@ func (c *SubscriberClient) ModifyAckDeadline(ctx context.Context, req *pubsubpb. return err } -// Acknowledge acknowledges the messages associated with the `ack_ids` in the -// `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages +// Acknowledge acknowledges the messages associated with the ack_ids in the +// AcknowledgeRequest. The Pub/Sub system can remove the relevant messages // from the subscription. // // Acknowledging a message whose ack deadline has expired may succeed, @@ -365,7 +370,7 @@ func (c *SubscriberClient) Acknowledge(ctx context.Context, req *pubsubpb.Acknow } // Pull pulls messages from the server. Returns an empty list if there are no -// messages available in the backlog. The server may return `UNAVAILABLE` if +// messages available in the backlog. The server may return UNAVAILABLE if // there are too many concurrent pull requests pending for the given // subscription. func (c *SubscriberClient) Pull(ctx context.Context, req *pubsubpb.PullRequest, opts ...gax.CallOption) (*pubsubpb.PullResponse, error) { @@ -390,9 +395,9 @@ func (c *SubscriberClient) Pull(ctx context.Context, req *pubsubpb.PullRequest, // Establishes a stream with the server, which sends messages down to the // client. The client streams acknowledgements and ack deadline modifications // back to the server. The server will close the stream and return the status -// on any error. The server may close the stream with status `OK` to reassign +// on any error. The server may close the stream with status OK to reassign // server-side resources, in which case, the client should re-establish the -// stream. `UNAVAILABLE` may also be returned in the case of a transient error +// stream. UNAVAILABLE may also be returned in the case of a transient error // (e.g., a server restart). These should also be retried by the client. Flow // control can be achieved by configuring the underlying RPC channel. func (c *SubscriberClient) StreamingPull(ctx context.Context, opts ...gax.CallOption) (pubsubpb.Subscriber_StreamingPullClient, error) { @@ -410,12 +415,12 @@ func (c *SubscriberClient) StreamingPull(ctx context.Context, opts ...gax.CallOp return resp, nil } -// ModifyPushConfig modifies the `PushConfig` for a specified subscription. +// ModifyPushConfig modifies the PushConfig for a specified subscription. // // This may be used to change a push subscription to a pull one (signified by -// an empty `PushConfig`) or vice versa, or change the endpoint URL and other +// an empty PushConfig) or vice versa, or change the endpoint URL and other // attributes of a push subscription. Messages will accumulate for delivery -// continuously through the call regardless of changes to the `PushConfig`. +// continuously through the call regardless of changes to the PushConfig. func (c *SubscriberClient) ModifyPushConfig(ctx context.Context, req *pubsubpb.ModifyPushConfigRequest, opts ...gax.CallOption) error { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.ModifyPushConfig[0:len(c.CallOptions.ModifyPushConfig):len(c.CallOptions.ModifyPushConfig)], opts...) @@ -463,13 +468,13 @@ func (c *SubscriberClient) ListSnapshots(ctx context.Context, req *pubsubpb.List } // CreateSnapshot creates a snapshot from the requested subscription. -// If the snapshot already exists, returns `ALREADY_EXISTS`. -// If the requested subscription doesn't exist, returns `NOT_FOUND`. +// If the snapshot already exists, returns ALREADY_EXISTS. +// If the requested subscription doesn't exist, returns NOT_FOUND. // // If the name is not provided in the request, the server will assign a random // name for this snapshot on the same project as the subscription, conforming // to the -// [resource name format](https://cloud.google.com/pubsub/docs/overview#names). +// resource name format (at https://cloud.google.com/pubsub/docs/overview#names). // The generated name is populated in the returned Snapshot object. // Note that for REST API requests, you must specify a name in the request. func (c *SubscriberClient) CreateSnapshot(ctx context.Context, req *pubsubpb.CreateSnapshotRequest, opts ...gax.CallOption) (*pubsubpb.Snapshot, error) { @@ -487,6 +492,27 @@ func (c *SubscriberClient) CreateSnapshot(ctx context.Context, req *pubsubpb.Cre return resp, nil } +// UpdateSnapshot updates an existing snapshot. Note that certain properties of a snapshot +// are not modifiable. +// NOTE: The style guide requires body: "snapshot" instead of body: "*". +// Keeping the latter for internal consistency in V1, however it should be +// corrected in V2. See +// https://cloud.google.com/apis/design/standard_methods#update for details. +func (c *SubscriberClient) UpdateSnapshot(ctx context.Context, req *pubsubpb.UpdateSnapshotRequest, opts ...gax.CallOption) (*pubsubpb.Snapshot, error) { + ctx = insertXGoog(ctx, c.xGoogHeader) + opts = append(c.CallOptions.UpdateSnapshot[0:len(c.CallOptions.UpdateSnapshot):len(c.CallOptions.UpdateSnapshot)], opts...) + var resp *pubsubpb.Snapshot + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.subscriberClient.UpdateSnapshot(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + // DeleteSnapshot removes an existing snapshot. All messages retained in the snapshot // are immediately dropped. After a snapshot is deleted, a new one may be // created with the same name, but the new one has no association with the old diff --git a/vendor/cloud.google.com/go/pubsub/apiv1/subscriber_client_example_test.go b/vendor/cloud.google.com/go/pubsub/apiv1/subscriber_client_example_test.go index 066fca13f..cce5e743e 100644 --- a/vendor/cloud.google.com/go/pubsub/apiv1/subscriber_client_example_test.go +++ b/vendor/cloud.google.com/go/pubsub/apiv1/subscriber_client_example_test.go @@ -305,6 +305,24 @@ func ExampleSubscriberClient_CreateSnapshot() { _ = resp } +func ExampleSubscriberClient_UpdateSnapshot() { + ctx := context.Background() + c, err := pubsub.NewSubscriberClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &pubsubpb.UpdateSnapshotRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.UpdateSnapshot(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleSubscriberClient_DeleteSnapshot() { ctx := context.Background() c, err := pubsub.NewSubscriberClient(ctx) diff --git a/vendor/cloud.google.com/go/pubsub/example_test.go b/vendor/cloud.google.com/go/pubsub/example_test.go index 1747080a0..4e8e1a5a2 100644 --- a/vendor/cloud.google.com/go/pubsub/example_test.go +++ b/vendor/cloud.google.com/go/pubsub/example_test.go @@ -49,6 +49,18 @@ func ExampleClient_CreateTopic() { _ = topic // TODO: use the topic. } +// Use TopicInProject to refer to a topic that is not in the client's project, such +// as a public topic. +func ExampleClient_TopicInProject() { + ctx := context.Background() + client, err := pubsub.NewClient(ctx, "project-id") + if err != nil { + // TODO: Handle error. + } + topic := client.TopicInProject("topicName", "another-project-id") + _ = topic // TODO: use the topic. +} + func ExampleClient_CreateSubscription() { ctx := context.Background() client, err := pubsub.NewClient(ctx, "project-id") diff --git a/vendor/cloud.google.com/go/pubsub/fake_test.go b/vendor/cloud.google.com/go/pubsub/fake_test.go index 903b23c2f..693b1510a 100644 --- a/vendor/cloud.google.com/go/pubsub/fake_test.go +++ b/vendor/cloud.google.com/go/pubsub/fake_test.go @@ -117,7 +117,7 @@ func (s *fakeServer) StreamingPull(stream pb.Subscriber_StreamingPullServer) err // Add a slight delay to ensure the server receives any // messages en route from the client before shutting down the stream. // This reduces flakiness of tests involving retry. - time.Sleep(100 * time.Millisecond) + time.Sleep(200 * time.Millisecond) } if pr.err == io.EOF { return nil diff --git a/vendor/cloud.google.com/go/pubsub/integration_test.go b/vendor/cloud.google.com/go/pubsub/integration_test.go index 07d11b632..13f2e4b42 100644 --- a/vendor/cloud.google.com/go/pubsub/integration_test.go +++ b/vendor/cloud.google.com/go/pubsub/integration_test.go @@ -31,6 +31,11 @@ import ( "google.golang.org/api/option" ) +var ( + topicIDs = testutil.NewUIDSpace("topic") + subIDs = testutil.NewUIDSpace("sub") +) + // messageData is used to hold the contents of a message so that it can be compared against the contents // of another message without regard to irrelevant fields. type messageData struct { @@ -47,8 +52,7 @@ func extractMessageData(m *Message) *messageData { } } -func TestAll(t *testing.T) { - t.Parallel() +func integrationTestClient(t *testing.T, ctx context.Context) *Client { if testing.Short() { t.Skip("Integration tests skipped in short mode") } @@ -56,30 +60,31 @@ func TestAll(t *testing.T) { if projID == "" { t.Skip("Integration tests skipped. See CONTRIBUTING.md for details") } - ctx := context.Background() ts := testutil.TokenSource(ctx, ScopePubSub, ScopeCloudPlatform) if ts == nil { t.Skip("Integration tests skipped. See CONTRIBUTING.md for details") } - - now := time.Now() - topicName := fmt.Sprintf("topic-%d", now.Unix()) - subName := fmt.Sprintf("subscription-%d", now.Unix()) - client, err := NewClient(ctx, projID, option.WithTokenSource(ts)) if err != nil { t.Fatalf("Creating client error: %v", err) } + return client +} + +func TestAll(t *testing.T) { + t.Parallel() + ctx := context.Background() + client := integrationTestClient(t, ctx) defer client.Close() - var topic *Topic - if topic, err = client.CreateTopic(ctx, topicName); err != nil { + topic, err := client.CreateTopic(ctx, topicIDs.New()) + if err != nil { t.Errorf("CreateTopic error: %v", err) } defer topic.Stop() var sub *Subscription - if sub, err = client.CreateSubscription(ctx, subName, SubscriptionConfig{Topic: topic}); err != nil { + if sub, err = client.CreateSubscription(ctx, subIDs.New(), SubscriptionConfig{Topic: topic}); err != nil { t.Errorf("CreateSub error: %v", err) } @@ -88,7 +93,7 @@ func TestAll(t *testing.T) { t.Fatalf("TopicExists error: %v", err) } if !exists { - t.Errorf("topic %s should exist, but it doesn't", topic) + t.Errorf("topic %v should exist, but it doesn't", topic) } exists, err = sub.Exists(ctx) @@ -96,10 +101,10 @@ func TestAll(t *testing.T) { t.Fatalf("SubExists error: %v", err) } if !exists { - t.Errorf("subscription %s should exist, but it doesn't", subName) + t.Errorf("subscription %s should exist, but it doesn't", sub.ID()) } - msgs := []*Message{} + var msgs []*Message for i := 0; i < 10; i++ { text := fmt.Sprintf("a message with an index %d", i) attrs := make(map[string]string) @@ -275,37 +280,18 @@ func testIAM(ctx context.Context, h *iam.Handle, permission string) (msg string, func TestSubscriptionUpdate(t *testing.T) { t.Parallel() ctx := context.Background() - if testing.Short() { - t.Skip("Integration tests skipped in short mode") - } - projID := testutil.ProjID() - if projID == "" { - t.Skip("Integration tests skipped. See CONTRIBUTING.md for details.") - } - ts := testutil.TokenSource(ctx, ScopePubSub, ScopeCloudPlatform) - if ts == nil { - t.Skip("Integration tests skipped. See CONTRIBUTING.md for details") - } - - now := time.Now() - topicName := fmt.Sprintf("topic-modify-%d", now.Unix()) - subName := fmt.Sprintf("subscription-modify-%d", now.Unix()) - - client, err := NewClient(ctx, projID, option.WithTokenSource(ts)) - if err != nil { - t.Fatalf("Creating client error: %v", err) - } + client := integrationTestClient(t, ctx) defer client.Close() - var topic *Topic - if topic, err = client.CreateTopic(ctx, topicName); err != nil { + topic, err := client.CreateTopic(ctx, topicIDs.New()) + if err != nil { t.Fatalf("CreateTopic error: %v", err) } defer topic.Stop() defer topic.Delete(ctx) var sub *Subscription - if sub, err = client.CreateSubscription(ctx, subName, SubscriptionConfig{Topic: topic}); err != nil { + if sub, err = client.CreateSubscription(ctx, subIDs.New(), SubscriptionConfig{Topic: topic}); err != nil { t.Fatalf("CreateSub error: %v", err) } defer sub.Delete(ctx) @@ -318,6 +304,7 @@ func TestSubscriptionUpdate(t *testing.T) { t.Fatalf("got %+v, want empty PushConfig") } // Add a PushConfig. + projID := testutil.ProjID() pc := PushConfig{ Endpoint: "https://" + projID + ".appspot.com/_ah/push-handlers/push", Attributes: map[string]string{"x-goog-version": "v1"}, @@ -349,3 +336,28 @@ func TestSubscriptionUpdate(t *testing.T) { t.Fatal("got nil, wanted error") } } + +func TestPublicTopic(t *testing.T) { + t.Parallel() + ctx := context.Background() + client := integrationTestClient(t, ctx) + defer client.Close() + + sub, err := client.CreateSubscription(ctx, subIDs.New(), SubscriptionConfig{ + Topic: client.TopicInProject("taxirides-realtime", "pubsub-public-data"), + }) + if err != nil { + t.Fatal(err) + } + defer sub.Delete(ctx) + // Confirm that Receive works. It doesn't matter if we actually get any + // messages. + ctxt, cancel := context.WithTimeout(ctx, 5*time.Second) + err = sub.Receive(ctxt, func(_ context.Context, msg *Message) { + msg.Ack() + cancel() + }) + if err != nil { + t.Fatal(err) + } +} diff --git a/vendor/cloud.google.com/go/pubsub/iterator.go b/vendor/cloud.google.com/go/pubsub/iterator.go index fdce09622..12d1f0752 100644 --- a/vendor/cloud.google.com/go/pubsub/iterator.go +++ b/vendor/cloud.google.com/go/pubsub/iterator.go @@ -15,201 +15,21 @@ package pubsub import ( - "log" "sync" "time" "golang.org/x/net/context" - "google.golang.org/api/iterator" - "google.golang.org/api/support/bundler" pb "google.golang.org/genproto/googleapis/pubsub/v1" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" ) -type messageIterator struct { - impl interface { - next() (*Message, error) - stop() - } -} - -type pollingMessageIterator struct { - // kaTicker controls how often we send an ack deadline extension request. - kaTicker *time.Ticker - // ackTicker controls how often we acknowledge a batch of messages. - ackTicker *time.Ticker - - ka *keepAlive - acker *acker - nacker *bundler.Bundler - puller *puller - - // mu ensures that cleanup only happens once, and concurrent Stop - // invocations block until cleanup completes. - mu sync.Mutex - - // closed is used to signal that Stop has been called. - closed chan struct{} -} - -var useStreamingPull = false - -// newMessageIterator starts a new messageIterator. Stop must be called on the messageIterator +// newMessageIterator starts a new streamingMessageIterator. Stop must be called on the messageIterator // when it is no longer needed. // subName is the full name of the subscription to pull messages from. // ctx is the context to use for acking messages and extending message deadlines. -func newMessageIterator(ctx context.Context, s service, subName string, po *pullOptions) *messageIterator { - if !useStreamingPull { - return &messageIterator{ - impl: newPollingMessageIterator(ctx, s, subName, po), - } - } +func newMessageIterator(ctx context.Context, s service, subName string, po *pullOptions) *streamingMessageIterator { sp := s.newStreamingPuller(ctx, subName, int32(po.ackDeadline.Seconds())) - err := sp.open() - if grpc.Code(err) == codes.Unimplemented { - log.Println("pubsub: streaming pull unimplemented; falling back to legacy pull") - return &messageIterator{ - impl: newPollingMessageIterator(ctx, s, subName, po), - } - } - // TODO(jba): handle other non-nil error? - log.Println("using streaming pull") - return &messageIterator{ - impl: newStreamingMessageIterator(ctx, sp, po), - } -} - -func newPollingMessageIterator(ctx context.Context, s service, subName string, po *pullOptions) *pollingMessageIterator { - // TODO: make kaTicker frequency more configurable. - // (ackDeadline - 5s) is a reasonable default for now, because the minimum ack period is 10s. This gives us 5s grace. - keepAlivePeriod := po.ackDeadline - 5*time.Second - kaTicker := time.NewTicker(keepAlivePeriod) // Stopped in it.Stop - - // Ack promptly so users don't lose work if client crashes. - ackTicker := time.NewTicker(100 * time.Millisecond) // Stopped in it.Stop - ka := &keepAlive{ - s: s, - Ctx: ctx, - Sub: subName, - ExtensionTick: kaTicker.C, - Deadline: po.ackDeadline, - MaxExtension: po.maxExtension, - } - - ack := &acker{ - s: s, - Ctx: ctx, - Sub: subName, - AckTick: ackTicker.C, - Notify: ka.Remove, - } - - nacker := bundler.NewBundler("", func(ackIDs interface{}) { - // NACK by setting the ack deadline to zero, to make the message - // immediately available for redelivery. - // - // If the RPC fails, nothing we can do about it. In the worst case, the - // deadline for these messages will expire and they will still get - // redelivered. - _ = s.modifyAckDeadline(ctx, subName, 0, ackIDs.([]string)) - }) - nacker.DelayThreshold = 100 * time.Millisecond // nack promptly - nacker.BundleCountThreshold = 10 - - pull := newPuller(s, subName, ctx, po.maxPrefetch, ka.Add, ka.Remove) - - ka.Start() - ack.Start() - return &pollingMessageIterator{ - kaTicker: kaTicker, - ackTicker: ackTicker, - ka: ka, - acker: ack, - nacker: nacker, - puller: pull, - closed: make(chan struct{}), - } -} - -// Next returns the next Message to be processed. The caller must call -// Message.Done when finished with it. -// Once Stop has been called, calls to Next will return iterator.Done. -func (it *messageIterator) Next() (*Message, error) { - return it.impl.next() -} - -func (it *pollingMessageIterator) next() (*Message, error) { - m, err := it.puller.Next() - if err == nil { - m.doneFunc = it.done - return m, nil - } - - select { - // If Stop has been called, we return Done regardless the value of err. - case <-it.closed: - return nil, iterator.Done - default: - return nil, err - } -} - -// Client code must call Stop on a messageIterator when finished with it. -// Stop will block until Done has been called on all Messages that have been -// returned by Next, or until the context with which the messageIterator was created -// is cancelled or exceeds its deadline. -// Stop need only be called once, but may be called multiple times from -// multiple goroutines. -func (it *messageIterator) Stop() { - it.impl.stop() -} - -func (it *pollingMessageIterator) stop() { - it.mu.Lock() - defer it.mu.Unlock() - - select { - case <-it.closed: - // Cleanup has already been performed. - return - default: - } - - // We close this channel before calling it.puller.Stop to ensure that we - // reliably return iterator.Done from Next. - close(it.closed) - - // Stop the puller. Once this completes, no more messages will be added - // to it.ka. - it.puller.Stop() - - // Start acking messages as they arrive, ignoring ackTicker. This will - // result in it.ka.Stop, below, returning as soon as possible. - it.acker.FastMode() - - // This will block until - // (a) it.ka.Ctx is done, or - // (b) all messages have been removed from keepAlive. - // (b) will happen once all outstanding messages have been either ACKed or NACKed. - it.ka.Stop() - - // There are no more live messages, so kill off the acker. - it.acker.Stop() - it.nacker.Flush() - it.kaTicker.Stop() - it.ackTicker.Stop() -} - -func (it *pollingMessageIterator) done(ackID string, ack bool) { - if ack { - it.acker.Ack(ackID) - // There's no need to call it.ka.Remove here, as acker will - // call it via its Notify function. - } else { - it.ka.Remove(ackID) - _ = it.nacker.Add(ackID, len(ackID)) // ignore error; this is just an optimization - } + _ = sp.open() // error stored in sp + return newStreamingMessageIterator(ctx, sp, po) } type streamingMessageIterator struct { @@ -222,7 +42,6 @@ type streamingMessageIterator struct { failed chan struct{} // closed on stream error stopped chan struct{} // closed when Stop is called drained chan struct{} // closed when stopped && no more pending messages - msgc chan *Message wg sync.WaitGroup mu sync.Mutex @@ -242,104 +61,36 @@ func newStreamingMessageIterator(ctx context.Context, sp *streamingPuller, po *p ackTicker := time.NewTicker(100 * time.Millisecond) nackTicker := time.NewTicker(100 * time.Millisecond) it := &streamingMessageIterator{ - ctx: ctx, - sp: sp, - po: po, - kaTicker: kaTicker, - ackTicker: ackTicker, - nackTicker: nackTicker, - failed: make(chan struct{}), - stopped: make(chan struct{}), - drained: make(chan struct{}), - // use maxPrefetch as the channel's buffer size. - msgc: make(chan *Message, po.maxPrefetch), + ctx: ctx, + sp: sp, + po: po, + kaTicker: kaTicker, + ackTicker: ackTicker, + nackTicker: nackTicker, + failed: make(chan struct{}), + stopped: make(chan struct{}), + drained: make(chan struct{}), keepAliveDeadlines: map[string]time.Time{}, pendingReq: &pb.StreamingPullRequest{}, } - it.wg.Add(2) - go it.receiver() + it.wg.Add(1) go it.sender() return it } -func (it *streamingMessageIterator) next() (*Message, error) { - // If ctx has been cancelled or the iterator is done, return straight - // away (even if there are buffered messages available). - select { - case <-it.ctx.Done(): - return nil, it.ctx.Err() - - case <-it.failed: - break - - case <-it.stopped: - break - - default: - // Wait for a message, but also for one of the above conditions. - select { - case msg := <-it.msgc: - // Since active select cases are chosen at random, this can return - // nil (from the channel close) even if it.failed or it.stopped is - // closed. - if msg == nil { - break - } - msg.doneFunc = it.done - return msg, nil - - case <-it.ctx.Done(): - return nil, it.ctx.Err() - - case <-it.failed: - break - - case <-it.stopped: - break - } - } - // Here if the iterator is done. - it.mu.Lock() - defer it.mu.Unlock() - return nil, it.err -} - +// Subscription.receive will call stop on its messageIterator when finished with it. +// Stop will block until Done has been called on all Messages that have been +// returned by Next, or until the context with which the messageIterator was created +// is cancelled or exceeds its deadline. func (it *streamingMessageIterator) stop() { it.mu.Lock() select { case <-it.stopped: - it.mu.Unlock() - it.wg.Wait() - return default: close(it.stopped) } - if it.err == nil { - it.err = iterator.Done - } - // Before reading from the channel, see if we're already drained. it.checkDrained() it.mu.Unlock() - // Nack all the pending messages. - // Grab the lock separately for each message to allow the receiver - // and sender goroutines to make progress. - // Why this will eventually terminate: - // - If the receiver is not blocked on a stream Recv, then - // it will write all the messages it has received to the channel, - // then exit, closing the channel. - // - If the receiver is blocked, then this loop will eventually - // nack all the messages in the channel. Once done is called - // on the remaining messages, the iterator will be marked as drained, - // which will trigger the sender to terminate. When it does, it - // performs a CloseSend on the stream, which will result in the blocked - // stream Recv returning. - for m := range it.msgc { - it.mu.Lock() - delete(it.keepAliveDeadlines, m.ackID) - it.addDeadlineMod(m.ackID, 0) - it.checkDrained() - it.mu.Unlock() - } it.wg.Wait() } @@ -394,52 +145,40 @@ func (it *streamingMessageIterator) fail(err error) { it.mu.Unlock() } -// receiver runs in a goroutine and handles all receives from the stream. -func (it *streamingMessageIterator) receiver() { - defer it.wg.Done() - defer close(it.msgc) - for { - // Stop retrieving messages if the context is done, the stream - // failed, or the iterator's Stop method was called. - select { - case <-it.ctx.Done(): - return - case <-it.failed: - return - case <-it.stopped: - return - default: - } - // Receive messages from stream. This may block indefinitely. - msgs, err := it.sp.fetchMessages() - - // The streamingPuller handles retries, so any error here - // is fatal to the iterator. - if err != nil { - it.fail(err) - return - } - // We received some messages. Remember them so we can - // keep them alive. - deadline := time.Now().Add(it.po.maxExtension) - it.mu.Lock() - for _, m := range msgs { - it.keepAliveDeadlines[m.ackID] = deadline - } - it.mu.Unlock() - // Deliver the messages to the channel. - for _, m := range msgs { - select { - case <-it.ctx.Done(): - return - case <-it.failed: - return - // Don't return if stopped. We want to send the remaining - // messages on the channel, where they will be nacked. - case it.msgc <- m: - } - } +// receive makes a call to the stream's Recv method and returns +// its messages. +func (it *streamingMessageIterator) receive() ([]*Message, error) { + // Stop retrieving messages if the context is done, the stream + // failed, or the iterator's Stop method was called. + select { + case <-it.ctx.Done(): + return nil, it.ctx.Err() + default: } + it.mu.Lock() + err := it.err + it.mu.Unlock() + if err != nil { + return nil, err + } + // Receive messages from stream. This may block indefinitely. + msgs, err := it.sp.fetchMessages() + // The streamingPuller handles retries, so any error here + // is fatal. + if err != nil { + it.fail(err) + return nil, err + } + // We received some messages. Remember them so we can + // keep them alive. + deadline := time.Now().Add(it.po.maxExtension) + it.mu.Lock() + for _, m := range msgs { + m.doneFunc = it.done + it.keepAliveDeadlines[m.ackID] = deadline + } + it.mu.Unlock() + return msgs, nil } // sender runs in a goroutine and handles all sends to the stream. @@ -518,3 +257,15 @@ func (it *streamingMessageIterator) handleKeepAlives() bool { it.checkDrained() return len(live) > 0 } + +func getKeepAliveAckIDs(items map[string]time.Time) (live, expired []string) { + now := time.Now() + for id, expiry := range items { + if expiry.Before(now) { + expired = append(expired, id) + } else { + live = append(live, id) + } + } + return live, expired +} diff --git a/vendor/cloud.google.com/go/pubsub/iterator_test.go b/vendor/cloud.google.com/go/pubsub/iterator_test.go deleted file mode 100644 index 2955eb767..000000000 --- a/vendor/cloud.google.com/go/pubsub/iterator_test.go +++ /dev/null @@ -1,338 +0,0 @@ -// 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. -// 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. - -package pubsub - -import ( - "fmt" - "reflect" - "testing" - "time" - - "golang.org/x/net/context" - - "google.golang.org/api/iterator" -) - -func TestReturnsDoneOnStop(t *testing.T) { - if useStreamingPull { - t.Skip("iterator tests are for polling pull only") - } - type testCase struct { - abort func(*messageIterator, context.CancelFunc) - want error - } - - for _, tc := range []testCase{ - { - abort: func(it *messageIterator, cancel context.CancelFunc) { - it.Stop() - }, - want: iterator.Done, - }, - { - abort: func(it *messageIterator, cancel context.CancelFunc) { - cancel() - }, - want: context.Canceled, - }, - { - abort: func(it *messageIterator, cancel context.CancelFunc) { - it.Stop() - cancel() - }, - want: iterator.Done, - }, - { - abort: func(it *messageIterator, cancel context.CancelFunc) { - cancel() - it.Stop() - }, - want: iterator.Done, - }, - } { - s := &blockingFetch{} - ctx, cancel := context.WithCancel(context.Background()) - it := newMessageIterator(ctx, s, "subname", &pullOptions{ackDeadline: time.Second * 10, maxExtension: time.Hour}) - defer it.Stop() - tc.abort(it, cancel) - - _, err := it.Next() - if err != tc.want { - t.Errorf("iterator Next error after abort: got:\n%v\nwant:\n%v", err, tc.want) - } - } -} - -// blockingFetch implements message fetching by not returning until its context is cancelled. -type blockingFetch struct { - service -} - -func (s *blockingFetch) fetchMessages(ctx context.Context, subName string, maxMessages int32) ([]*Message, error) { - <-ctx.Done() - return nil, ctx.Err() -} - -func (s *blockingFetch) newStreamingPuller(ctx context.Context, subName string, ackDeadline int32) *streamingPuller { - return nil -} - -// justInTimeFetch simulates the situation where the iterator is aborted just after the fetch RPC -// succeeds, so the rest of puller.Next will continue to execute and return sucessfully. -type justInTimeFetch struct { - service -} - -func (s *justInTimeFetch) fetchMessages(ctx context.Context, subName string, maxMessages int32) ([]*Message, error) { - <-ctx.Done() - // The context was cancelled, but let's pretend that this happend just after our RPC returned. - - var result []*Message - for i := 0; i < int(maxMessages); i++ { - val := fmt.Sprintf("msg%v", i) - result = append(result, &Message{Data: []byte(val), ackID: val}) - } - return result, nil -} - -func (s *justInTimeFetch) splitAckIDs(ids []string) ([]string, []string) { - return nil, nil -} - -func (s *justInTimeFetch) modifyAckDeadline(ctx context.Context, subName string, deadline time.Duration, ackIDs []string) error { - return nil -} - -func (s *justInTimeFetch) newStreamingPuller(ctx context.Context, subName string, ackDeadline int32) *streamingPuller { - return nil -} - -func TestAfterAbortReturnsNoMoreThanOneMessage(t *testing.T) { - // Each test case is excercised by making two concurrent blocking calls on a - // messageIterator, and then aborting the iterator. - // The result should be one call to Next returning a message, and the other returning an error. - t.Skip(`This test has subtle timing dependencies, making it flaky. -It is not worth fixing because iterators will be removed shortly.`) - type testCase struct { - abort func(*messageIterator, context.CancelFunc) - // want is the error that should be returned from one Next invocation. - want error - } - for n := 1; n < 3; n++ { - for _, tc := range []testCase{ - { - abort: func(it *messageIterator, cancel context.CancelFunc) { - it.Stop() - }, - want: iterator.Done, - }, - { - abort: func(it *messageIterator, cancel context.CancelFunc) { - cancel() - }, - want: context.Canceled, - }, - { - abort: func(it *messageIterator, cancel context.CancelFunc) { - it.Stop() - cancel() - }, - want: iterator.Done, - }, - { - abort: func(it *messageIterator, cancel context.CancelFunc) { - cancel() - it.Stop() - }, - want: iterator.Done, - }, - } { - s := &justInTimeFetch{} - ctx, cancel := context.WithCancel(context.Background()) - - // if maxPrefetch == 1, there will be no messages in the puller buffer when Next is invoked the second time. - // if maxPrefetch == 2, there will be 1 message in the puller buffer when Next is invoked the second time. - po := &pullOptions{ - ackDeadline: time.Second * 10, - maxExtension: time.Hour, - maxPrefetch: int32(n), - } - it := newMessageIterator(ctx, s, "subname", po) - defer it.Stop() - - type result struct { - m *Message - err error - } - results := make(chan *result, 2) - - for i := 0; i < 2; i++ { - go func() { - m, err := it.Next() - results <- &result{m, err} - if err == nil { - m.Nack() - } - }() - } - // Wait for goroutines to block on it.Next(). - time.Sleep(50 * time.Millisecond) - tc.abort(it, cancel) - - result1 := <-results - result2 := <-results - - // There should be one error result, and one non-error result. - // Make result1 be the non-error result. - if result1.err != nil { - result1, result2 = result2, result1 - } - - if string(result1.m.Data) != "msg0" { - t.Errorf("After abort, got message: %v, want %v", result1.m.Data, "msg0") - } - if result1.err != nil { - t.Errorf("After abort, got : %v, want nil", result1.err) - } - if result2.m != nil { - t.Errorf("After abort, got message: %v, want nil", result2.m) - } - if result2.err != tc.want { - t.Errorf("After abort, got err: %v, want %v", result2.err, tc.want) - } - } - } -} - -type fetcherServiceWithModifyAckDeadline struct { - fetcherService - events chan string -} - -func (f *fetcherServiceWithModifyAckDeadline) modifyAckDeadline(_ context.Context, _ string, d time.Duration, ids []string) error { - // Different versions of Go use different representations for time.Duration(0). - var ds string - if d == 0 { - ds = "0s" - } else { - ds = d.String() - } - f.events <- fmt.Sprintf("modAck(%v, %s)", ids, ds) - return nil -} - -func (f *fetcherServiceWithModifyAckDeadline) splitAckIDs(ackIDs []string) ([]string, []string) { - return ackIDs, nil -} - -func (f *fetcherServiceWithModifyAckDeadline) newStreamingPuller(ctx context.Context, subName string, ackDeadline int32) *streamingPuller { - return nil -} - -func TestMultipleStopCallsBlockUntilMessageDone(t *testing.T) { - t.Skip(`This test has subtle timing dependencies, making it flaky. -It is not worth fixing because iterators will be removed shortly.`) - events := make(chan string, 3) - s := &fetcherServiceWithModifyAckDeadline{ - fetcherService{ - results: []fetchResult{ - { - msgs: []*Message{{ackID: "a"}, {ackID: "b"}}, - }, - }, - }, - events, - } - - ctx := context.Background() - it := newMessageIterator(ctx, s, "subname", &pullOptions{ackDeadline: time.Second * 10, maxExtension: 0}) - - m, err := it.Next() - if err != nil { - t.Errorf("error calling Next: %v", err) - } - - go func() { - it.Stop() - events <- "stopped" - }() - go func() { - it.Stop() - events <- "stopped" - }() - - select { - case <-events: - t.Fatal("Stop is not blocked") - case <-time.After(100 * time.Millisecond): - } - m.Nack() - - got := []string{<-events, <-events, <-events} - want := []string{"modAck([a], 0s)", "stopped", "stopped"} - if !reflect.DeepEqual(got, want) { - t.Errorf("stopping iterator, got: %v ; want: %v", got, want) - } - - // The iterator is stopped, so should not return another message. - m, err = it.Next() - if m != nil { - t.Errorf("message got: %v ; want: nil", m) - } - if err != iterator.Done { - t.Errorf("err got: %v ; want: %v", err, iterator.Done) - } -} - -func TestFastNack(t *testing.T) { - if useStreamingPull { - t.Skip("iterator tests are for polling pull only") - } - events := make(chan string, 3) - s := &fetcherServiceWithModifyAckDeadline{ - fetcherService{ - results: []fetchResult{ - { - msgs: []*Message{{ackID: "a"}, {ackID: "b"}}, - }, - }, - }, - events, - } - - ctx := context.Background() - it := newMessageIterator(ctx, s, "subname", &pullOptions{ - ackDeadline: time.Second * 6, - maxExtension: time.Second * 10, - }) - // Get both messages. - _, err := it.Next() - if err != nil { - t.Errorf("error calling Next: %v", err) - } - m2, err := it.Next() - if err != nil { - t.Errorf("error calling Next: %v", err) - } - // Ignore the first, nack the second. - m2.Nack() - - got := []string{<-events, <-events} - // The nack should happen before the deadline extension. - want := []string{"modAck([b], 0s)", "modAck([a], 6s)"} - if !reflect.DeepEqual(got, want) { - t.Errorf("got: %v ; want: %v", got, want) - } -} diff --git a/vendor/cloud.google.com/go/pubsub/keepalive.go b/vendor/cloud.google.com/go/pubsub/keepalive.go deleted file mode 100644 index f57c3831c..000000000 --- a/vendor/cloud.google.com/go/pubsub/keepalive.go +++ /dev/null @@ -1,182 +0,0 @@ -// 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. -// 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. - -package pubsub - -import ( - "sync" - "time" - - "golang.org/x/net/context" -) - -// keepAlive keeps track of which Messages need to have their deadline extended, and -// periodically extends them. -// Messages are tracked by Ack ID. -type keepAlive struct { - s service - Ctx context.Context // The context to use when extending deadlines. - Sub string // The full name of the subscription. - ExtensionTick <-chan time.Time // ExtensionTick supplies the frequency with which to make extension requests. - Deadline time.Duration // How long to extend messages for each time they are extended. Should be greater than ExtensionTick frequency. - MaxExtension time.Duration // How long to keep extending each message's ack deadline before automatically removing it. - - mu sync.Mutex - // key: ackID; value: time at which ack deadline extension should cease. - items map[string]time.Time - dr drain - - wg sync.WaitGroup -} - -// Start initiates the deadline extension loop. Stop must be called once keepAlive is no longer needed. -func (ka *keepAlive) Start() { - ka.items = make(map[string]time.Time) - ka.dr = drain{Drained: make(chan struct{})} - ka.wg.Add(1) - go func() { - defer ka.wg.Done() - for { - select { - case <-ka.Ctx.Done(): - // Don't bother waiting for items to be removed: we can't extend them any more. - return - case <-ka.dr.Drained: - return - case <-ka.ExtensionTick: - live, expired := ka.getAckIDs() - ka.wg.Add(1) - go func() { - defer ka.wg.Done() - ka.extendDeadlines(live) - }() - - for _, id := range expired { - ka.Remove(id) - } - } - } - }() -} - -// Add adds an ack id to be kept alive. -// It should not be called after Stop. -func (ka *keepAlive) Add(ackID string) { - ka.mu.Lock() - defer ka.mu.Unlock() - - ka.items[ackID] = time.Now().Add(ka.MaxExtension) - ka.dr.SetPending(true) -} - -// Remove removes ackID from the list to be kept alive. -func (ka *keepAlive) Remove(ackID string) { - ka.mu.Lock() - defer ka.mu.Unlock() - - // Note: If users NACKs a message after it has been removed due to - // expiring, Remove will be called twice with same ack id. This is OK. - delete(ka.items, ackID) - ka.dr.SetPending(len(ka.items) != 0) -} - -// Stop waits until all added ackIDs have been removed, and cleans up resources. -// Stop may only be called once. -func (ka *keepAlive) Stop() { - ka.mu.Lock() - ka.dr.Drain() - ka.mu.Unlock() - - ka.wg.Wait() -} - -// getAckIDs returns the set of ackIDs that are being kept alive. -// The set is divided into two lists: one with IDs that should continue to be kept alive, -// and the other with IDs that should be dropped. -func (ka *keepAlive) getAckIDs() (live, expired []string) { - ka.mu.Lock() - defer ka.mu.Unlock() - return getKeepAliveAckIDs(ka.items) -} - -func getKeepAliveAckIDs(items map[string]time.Time) (live, expired []string) { - now := time.Now() - for id, expiry := range items { - if expiry.Before(now) { - expired = append(expired, id) - } else { - live = append(live, id) - } - } - return live, expired -} - -const maxExtensionAttempts = 2 - -func (ka *keepAlive) extendDeadlines(ackIDs []string) { - head, tail := ka.s.splitAckIDs(ackIDs) - for len(head) > 0 { - for i := 0; i < maxExtensionAttempts; i++ { - if ka.s.modifyAckDeadline(ka.Ctx, ka.Sub, ka.Deadline, head) == nil { - break - } - } - // NOTE: Messages whose deadlines we fail to extend will - // eventually be redelivered and this is a documented behaviour - // of the API. - // - // NOTE: If we fail to extend deadlines here, this - // implementation will continue to attempt extending the - // deadlines for those ack IDs the next time the extension - // ticker ticks. By then the deadline will have expired. - // Re-extending them is harmless, however. - // - // TODO: call Remove for ids which fail to be extended. - - head, tail = ka.s.splitAckIDs(tail) - } -} - -// A drain (once started) indicates via a channel when there is no work pending. -type drain struct { - started bool - pending bool - - // Drained is closed once there are no items outstanding if Drain has been called. - Drained chan struct{} -} - -// Drain starts the drain process. This cannot be undone. -func (d *drain) Drain() { - d.started = true - d.closeIfDrained() -} - -// SetPending sets whether there is work pending or not. It may be called multiple times before or after Drain. -func (d *drain) SetPending(pending bool) { - d.pending = pending - d.closeIfDrained() -} - -func (d *drain) closeIfDrained() { - if !d.pending && d.started { - // Check to see if d.Drained is closed before closing it. - // This allows SetPending(false) to be safely called multiple times. - select { - case <-d.Drained: - default: - close(d.Drained) - } - } -} diff --git a/vendor/cloud.google.com/go/pubsub/keepalive_test.go b/vendor/cloud.google.com/go/pubsub/keepalive_test.go deleted file mode 100644 index 0128afe64..000000000 --- a/vendor/cloud.google.com/go/pubsub/keepalive_test.go +++ /dev/null @@ -1,319 +0,0 @@ -// 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. -// 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. - -package pubsub - -import ( - "errors" - "reflect" - "sort" - "testing" - "time" - - "golang.org/x/net/context" -) - -func TestKeepAliveExtendsDeadline(t *testing.T) { - ticker := make(chan time.Time) - deadline := time.Nanosecond * 15 - s := &testService{modDeadlineCalled: make(chan modDeadlineCall)} - - checkModDeadlineCall := func(ackIDs []string) { - got := <-s.modDeadlineCalled - sort.Strings(got.ackIDs) - - want := modDeadlineCall{ - subName: "subname", - deadline: deadline, - ackIDs: ackIDs, - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("keepalive: got:\n%v\nwant:\n%v", got, want) - } - } - - ka := &keepAlive{ - s: s, - Ctx: context.Background(), - Sub: "subname", - ExtensionTick: ticker, - Deadline: deadline, - MaxExtension: time.Hour, - } - ka.Start() - - ka.Add("a") - ka.Add("b") - ticker <- time.Time{} - checkModDeadlineCall([]string{"a", "b"}) - ka.Add("c") - ka.Remove("b") - ticker <- time.Time{} - checkModDeadlineCall([]string{"a", "c"}) - ka.Remove("a") - ka.Remove("c") - ka.Add("d") - ticker <- time.Time{} - checkModDeadlineCall([]string{"d"}) - - ka.Remove("d") - ka.Stop() -} - -func TestKeepAliveStopsWhenNoItem(t *testing.T) { - ticker := make(chan time.Time) - stopped := make(chan bool) - s := &testService{modDeadlineCalled: make(chan modDeadlineCall, 3)} - ka := &keepAlive{ - s: s, - Ctx: context.Background(), - ExtensionTick: ticker, - } - - ka.Start() - - // There should be no call to modifyAckDeadline since there is no item. - ticker <- time.Time{} - - go func() { - ka.Stop() // No items; should not block - if len(s.modDeadlineCalled) > 0 { - t.Errorf("unexpected extension to non-existent items: %v", <-s.modDeadlineCalled) - } - close(stopped) - }() - - select { - case <-stopped: - case <-time.After(time.Second): - t.Errorf("keepAlive timed out waiting for stop") - } -} - -func TestKeepAliveStopsWhenItemsExpired(t *testing.T) { - ticker := make(chan time.Time) - stopped := make(chan bool) - s := &testService{modDeadlineCalled: make(chan modDeadlineCall, 2)} - ka := &keepAlive{ - s: s, - Ctx: context.Background(), - ExtensionTick: ticker, - MaxExtension: time.Duration(0), // Should expire items at the first tick. - } - - ka.Start() - ka.Add("a") - ka.Add("b") - - // Wait until the clock advances. Without this loop, this test fails on - // Windows because the clock doesn't advance at all between ka.Add and the - // expiration check after the tick is received. - begin := time.Now() - for time.Now().Equal(begin) { - time.Sleep(time.Millisecond) - } - - // There should be no call to modifyAckDeadline since both items are expired. - ticker <- time.Time{} - - go func() { - ka.Stop() // No live items; should not block. - if len(s.modDeadlineCalled) > 0 { - t.Errorf("unexpected extension to expired items") - } - close(stopped) - }() - - select { - case <-stopped: - case <-time.After(time.Second): - t.Errorf("timed out waiting for stop") - } -} - -func TestKeepAliveBlocksUntilAllItemsRemoved(t *testing.T) { - ticker := make(chan time.Time) - eventc := make(chan string, 3) - s := &testService{modDeadlineCalled: make(chan modDeadlineCall)} - ka := &keepAlive{ - s: s, - Ctx: context.Background(), - ExtensionTick: ticker, - MaxExtension: time.Hour, // Should not expire. - } - - ka.Start() - ka.Add("a") - ka.Add("b") - - go func() { - ticker <- time.Time{} - - // We expect a call since both items should be extended. - select { - case args := <-s.modDeadlineCalled: - sort.Strings(args.ackIDs) - got := args.ackIDs - want := []string{"a", "b"} - if !reflect.DeepEqual(got, want) { - t.Errorf("mismatching IDs:\ngot %v\nwant %v", got, want) - } - case <-time.After(time.Second): - t.Errorf("timed out waiting for deadline extend call") - } - - time.Sleep(10 * time.Millisecond) - - eventc <- "pre-remove-b" - // Remove one item, Stop should still be waiting. - ka.Remove("b") - - ticker <- time.Time{} - - // We expect a call since the item is still alive. - select { - case args := <-s.modDeadlineCalled: - got := args.ackIDs - want := []string{"a"} - if !reflect.DeepEqual(got, want) { - t.Errorf("mismatching IDs:\ngot %v\nwant %v", got, want) - } - case <-time.After(time.Second): - t.Errorf("timed out waiting for deadline extend call") - } - - time.Sleep(10 * time.Millisecond) - - eventc <- "pre-remove-a" - // Remove the last item so that Stop can proceed. - ka.Remove("a") - }() - - go func() { - ka.Stop() // Should block all item are removed. - eventc <- "post-stop" - }() - - for i, want := range []string{"pre-remove-b", "pre-remove-a", "post-stop"} { - select { - case got := <-eventc: - if got != want { - t.Errorf("event #%d:\ngot %v\nwant %v", i, got, want) - } - case <-time.After(time.Second): - t.Errorf("time out waiting for #%d event: want %v", i, want) - } - } -} - -// extendCallResult contains a list of ackIDs which are expected in an ackID -// extension request, along with the result that should be returned. -type extendCallResult struct { - ackIDs []string - err error -} - -// extendService implements modifyAckDeadline using a hard-coded list of extendCallResults. -type extendService struct { - service - - calls []extendCallResult - - t *testing.T // used for error logging. -} - -func (es *extendService) modifyAckDeadline(ctx context.Context, subName string, deadline time.Duration, ackIDs []string) error { - if len(es.calls) == 0 { - es.t.Fatalf("unexpected call to modifyAckDeadline: ackIDs: %v", ackIDs) - } - call := es.calls[0] - es.calls = es.calls[1:] - - if got, want := ackIDs, call.ackIDs; !reflect.DeepEqual(got, want) { - es.t.Errorf("unexpected arguments to modifyAckDeadline: got: %v ; want: %v", got, want) - } - return call.err -} - -// Test implementation returns the first 2 elements as head, and the rest as tail. -func (es *extendService) splitAckIDs(ids []string) ([]string, []string) { - if len(ids) < 2 { - return ids, nil - } - return ids[:2], ids[2:] -} - -func TestKeepAliveSplitsBatches(t *testing.T) { - type testCase struct { - calls []extendCallResult - } - for _, tc := range []testCase{ - { - calls: []extendCallResult{ - { - ackIDs: []string{"a", "b"}, - }, - { - ackIDs: []string{"c", "d"}, - }, - { - ackIDs: []string{"e", "f"}, - }, - }, - }, - { - calls: []extendCallResult{ - { - ackIDs: []string{"a", "b"}, - err: errors.New("bang"), - }, - // On error we retry once. - { - ackIDs: []string{"a", "b"}, - err: errors.New("bang"), - }, - // We give up after failing twice, so we move on to the next set, "c" and "d". - { - ackIDs: []string{"c", "d"}, - err: errors.New("bang"), - }, - // Again, we retry once. - { - ackIDs: []string{"c", "d"}, - }, - { - ackIDs: []string{"e", "f"}, - }, - }, - }, - } { - s := &extendService{ - t: t, - calls: tc.calls, - } - - ka := &keepAlive{ - s: s, - Ctx: context.Background(), - Sub: "subname", - } - - ka.extendDeadlines([]string{"a", "b", "c", "d", "e", "f"}) - - if len(s.calls) != 0 { - t.Errorf("expected extend calls did not occur: %v", s.calls) - } - } -} diff --git a/vendor/cloud.google.com/go/pubsub/loadtest/benchmark_test.go b/vendor/cloud.google.com/go/pubsub/loadtest/benchmark_test.go index 80e27b98e..ff695ea78 100644 --- a/vendor/cloud.google.com/go/pubsub/loadtest/benchmark_test.go +++ b/vendor/cloud.google.com/go/pubsub/loadtest/benchmark_test.go @@ -102,7 +102,11 @@ func perfClient(pubDelay time.Duration, nConns int, f interface { } conn, err := gtransport.DialInsecure(ctx, option.WithEndpoint(srv.Addr), - option.WithGRPCConnectionPool(nConns)) + option.WithGRPCConnectionPool(nConns), + + // TODO(grpc/grpc-go#1388) using connection pool without WithBlock + // can cause RPCs to fail randomly. We can delete this after the issue is fixed. + option.WithGRPCDialOption(grpc.WithBlock())) if err != nil { f.Fatal(err) } diff --git a/vendor/cloud.google.com/go/pubsub/pubsub.go b/vendor/cloud.google.com/go/pubsub/pubsub.go index b7063edd7..b3595e1a7 100644 --- a/vendor/cloud.google.com/go/pubsub/pubsub.go +++ b/vendor/cloud.google.com/go/pubsub/pubsub.go @@ -62,6 +62,10 @@ func NewClient(ctx context.Context, projectID string, opts ...option.ClientOptio o = []option.ClientOption{ // Create multiple connections to increase throughput. option.WithGRPCConnectionPool(runtime.GOMAXPROCS(0)), + + // TODO(grpc/grpc-go#1388) using connection pool without WithBlock + // can cause RPCs to fail randomly. We can delete this after the issue is fixed. + option.WithGRPCDialOption(grpc.WithBlock()), } } o = append(o, opts...) diff --git a/vendor/cloud.google.com/go/pubsub/puller.go b/vendor/cloud.google.com/go/pubsub/puller.go deleted file mode 100644 index f3ffa3e18..000000000 --- a/vendor/cloud.google.com/go/pubsub/puller.go +++ /dev/null @@ -1,115 +0,0 @@ -// 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. -// 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. - -package pubsub - -import ( - "sync" - - "golang.org/x/net/context" -) - -// puller fetches messages from the server in a batch. -type puller struct { - ctx context.Context - cancel context.CancelFunc - - // keepAlive takes ownership of the lifetime of the message identified - // by ackID, ensuring that its ack deadline does not expire. It should - // be called each time a new message is fetched from the server, even - // if it is not yet returned from Next. - keepAlive func(ackID string) - - // abandon should be called for each message which has previously been - // passed to keepAlive, but will never be returned by Next. - abandon func(ackID string) - - // fetch fetches a batch of messages from the server. - fetch func() ([]*Message, error) - - mu sync.Mutex - buf []*Message -} - -// newPuller constructs a new puller. -// batchSize is the maximum number of messages to fetch at once. -// No more than batchSize messages will be outstanding at any time. -func newPuller(s service, subName string, ctx context.Context, batchSize int32, keepAlive, abandon func(ackID string)) *puller { - ctx, cancel := context.WithCancel(ctx) - return &puller{ - cancel: cancel, - keepAlive: keepAlive, - abandon: abandon, - ctx: ctx, - fetch: func() ([]*Message, error) { return s.fetchMessages(ctx, subName, batchSize) }, - } -} - -const maxPullAttempts = 2 - -// Next returns the next message from the server, fetching a new batch if necessary. -// keepAlive is called with the ackIDs of newly fetched messages. -// If p.Ctx has already been cancelled before Next is called, no new messages -// will be fetched. -func (p *puller) Next() (*Message, error) { - p.mu.Lock() - defer p.mu.Unlock() - - // If ctx has been cancelled, return straight away (even if there are buffered messages available). - select { - case <-p.ctx.Done(): - return nil, p.ctx.Err() - default: - } - - for len(p.buf) == 0 { - var buf []*Message - var err error - - for i := 0; i < maxPullAttempts; i++ { - // Once Stop has completed, all future calls to Next will immediately fail at this point. - buf, err = p.fetch() - if err == nil || err == context.Canceled || err == context.DeadlineExceeded { - break - } - } - if err != nil { - return nil, err - } - - for _, m := range buf { - p.keepAlive(m.ackID) - } - p.buf = buf - } - - m := p.buf[0] - p.buf = p.buf[1:] - return m, nil -} - -// Stop aborts any pending calls to Next, and prevents any future ones from succeeding. -// Stop also abandons any messages that have been pre-fetched. -// Once Stop completes, no calls to Next will succeed. -func (p *puller) Stop() { - // Next may be executing in another goroutine. Cancel it, and then wait until it terminates. - p.cancel() - p.mu.Lock() - defer p.mu.Unlock() - - for _, m := range p.buf { - p.abandon(m.ackID) - } - p.buf = nil -} diff --git a/vendor/cloud.google.com/go/pubsub/puller_test.go b/vendor/cloud.google.com/go/pubsub/puller_test.go deleted file mode 100644 index 2cc9ce03e..000000000 --- a/vendor/cloud.google.com/go/pubsub/puller_test.go +++ /dev/null @@ -1,154 +0,0 @@ -// 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. -// 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. - -package pubsub - -import ( - "errors" - "reflect" - "testing" - - "golang.org/x/net/context" -) - -type fetchResult struct { - msgs []*Message - err error -} - -type fetcherService struct { - service - results []fetchResult - unexpectedCall bool -} - -func (s *fetcherService) fetchMessages(ctx context.Context, subName string, maxMessages int32) ([]*Message, error) { - if len(s.results) == 0 { - s.unexpectedCall = true - return nil, errors.New("bang") - } - ret := s.results[0] - s.results = s.results[1:] - return ret.msgs, ret.err -} - -func TestPuller(t *testing.T) { - s := &fetcherService{ - results: []fetchResult{ - { - msgs: []*Message{{ackID: "a"}, {ackID: "b"}}, - }, - {}, - { - msgs: []*Message{{ackID: "c"}, {ackID: "d"}}, - }, - { - msgs: []*Message{{ackID: "e"}}, - }, - }, - } - - pulled := make(chan string, 10) - - pull := newPuller(s, "subname", context.Background(), 2, func(ackID string) { pulled <- ackID }, func(string) {}) - - got := []string{} - for i := 0; i < 5; i++ { - m, err := pull.Next() - got = append(got, m.ackID) - if err != nil { - t.Errorf("unexpected err from pull.Next: %v", err) - } - } - _, err := pull.Next() - if err == nil { - t.Errorf("unexpected err from pull.Next: %v", err) - } - - want := []string{"a", "b", "c", "d", "e"} - if !reflect.DeepEqual(got, want) { - t.Errorf("pulled ack ids: got: %v ; want: %v", got, want) - } -} - -func TestPullerAddsToKeepAlive(t *testing.T) { - s := &fetcherService{ - results: []fetchResult{ - { - msgs: []*Message{{ackID: "a"}, {ackID: "b"}}, - }, - { - msgs: []*Message{{ackID: "c"}, {ackID: "d"}}, - }, - }, - } - - pulled := make(chan string, 10) - - pull := newPuller(s, "subname", context.Background(), 2, func(ackID string) { pulled <- ackID }, func(string) {}) - - got := []string{} - for i := 0; i < 3; i++ { - m, err := pull.Next() - got = append(got, m.ackID) - if err != nil { - t.Errorf("unexpected err from pull.Next: %v", err) - } - } - - want := []string{"a", "b", "c"} - if !reflect.DeepEqual(got, want) { - t.Errorf("pulled ack ids: got: %v ; want: %v", got, want) - } - - close(pulled) - // We should have seen "d" written to the channel too, even though it hasn't been returned yet. - pulledIDs := []string{} - for id := range pulled { - pulledIDs = append(pulledIDs, id) - } - - want = append(want, "d") - if !reflect.DeepEqual(pulledIDs, want) { - t.Errorf("pulled ack ids: got: %v ; want: %v", pulledIDs, want) - } -} - -func TestPullerRetriesOnce(t *testing.T) { - bang := errors.New("bang") - s := &fetcherService{ - results: []fetchResult{ - { - err: bang, - }, - { - err: bang, - }, - }, - } - - pull := newPuller(s, "subname", context.Background(), 2, func(string) {}, func(string) {}) - - _, err := pull.Next() - if err != bang { - t.Errorf("pull.Next err got: %v, want: %v", err, bang) - } - - if s.unexpectedCall { - t.Errorf("unexpected retry") - } - if len(s.results) != 0 { - t.Errorf("outstanding calls: got: %v, want: 0", len(s.results)) - } -} diff --git a/vendor/cloud.google.com/go/pubsub/streaming_pull_test.go b/vendor/cloud.google.com/go/pubsub/streaming_pull_test.go index 36fc67331..7a09f9f18 100644 --- a/vendor/cloud.google.com/go/pubsub/streaming_pull_test.go +++ b/vendor/cloud.google.com/go/pubsub/streaming_pull_test.go @@ -58,9 +58,6 @@ func TestStreamingPullMultipleFetches(t *testing.T) { } func testStreamingPullIteration(t *testing.T, client *Client, server *fakeServer, msgs []*pb.ReceivedMessage) { - if !useStreamingPull { - t.SkipNow() - } sub := client.Subscription("s") gotMsgs, err := pullN(context.Background(), sub, len(msgs), func(_ context.Context, m *Message) { id, err := strconv.Atoi(m.ackID) @@ -116,9 +113,6 @@ func TestStreamingPullError(t *testing.T) { // If an RPC to the service returns a non-retryable error, Pull should // return after all callbacks return, without waiting for messages to be // acked. - if !useStreamingPull { - t.SkipNow() - } client, server := newFake(t) server.addStreamingPullMessages(testMessages[:1]) server.addStreamingPullError(grpc.Errorf(codes.Unknown, "")) @@ -148,9 +142,6 @@ func TestStreamingPullError(t *testing.T) { func TestStreamingPullCancel(t *testing.T) { // If Receive's context is canceled, it should return after all callbacks // return and all messages have been acked. - if !useStreamingPull { - t.SkipNow() - } client, server := newFake(t) server.addStreamingPullMessages(testMessages) sub := client.Subscription("s") @@ -171,9 +162,6 @@ func TestStreamingPullCancel(t *testing.T) { } func TestStreamingPullRetry(t *testing.T) { - if !useStreamingPull { - t.SkipNow() - } // Check that we retry on io.EOF or Unavailable. client, server := newFake(t) server.addStreamingPullMessages(testMessages[:1]) @@ -189,9 +177,6 @@ func TestStreamingPullRetry(t *testing.T) { func TestStreamingPullOneActive(t *testing.T) { // Only one call to Pull can be active at a time. - if !useStreamingPull { - t.SkipNow() - } client, srv := newFake(t) srv.addStreamingPullMessages(testMessages[:1]) sub := client.Subscription("s") @@ -210,9 +195,6 @@ func TestStreamingPullOneActive(t *testing.T) { } func TestStreamingPullConcurrent(t *testing.T) { - if !useStreamingPull { - t.SkipNow() - } newMsg := func(i int) *pb.ReceivedMessage { return &pb.ReceivedMessage{ AckId: strconv.Itoa(i), @@ -249,9 +231,6 @@ func TestStreamingPullConcurrent(t *testing.T) { func TestStreamingPullFlowControl(t *testing.T) { // Callback invocations should not occur if flow control limits are exceeded. - if !useStreamingPull { - t.SkipNow() - } client, server := newFake(t) server.addStreamingPullMessages(testMessages) sub := client.Subscription("s") diff --git a/vendor/cloud.google.com/go/pubsub/subscription.go b/vendor/cloud.google.com/go/pubsub/subscription.go index e179143d8..2144125da 100644 --- a/vendor/cloud.google.com/go/pubsub/subscription.go +++ b/vendor/cloud.google.com/go/pubsub/subscription.go @@ -17,6 +17,7 @@ package pubsub import ( "errors" "fmt" + "io" "strings" "sync" "time" @@ -24,7 +25,6 @@ import ( "cloud.google.com/go/iam" "golang.org/x/net/context" "golang.org/x/sync/errgroup" - "google.golang.org/api/iterator" "google.golang.org/grpc" "google.golang.org/grpc/codes" ) @@ -152,6 +152,12 @@ type ReceiveSettings struct { // NumGoroutines is the number of goroutines Receive will spawn to pull // messages concurrently. If NumGoroutines is less than 1, it will be treated // as if it were DefaultReceiveSettings.NumGoroutines. + // + // NumGoroutines does not limit the number of messages that can be processed + // concurrently. Even with one goroutine, many messages might be processed at + // once, because that goroutine may continually receive messages and invoke the + // function passed to Receive on them. To limit the number of messages being + // processed concurrently, set MaxOutstandingMessages. NumGoroutines int } @@ -352,35 +358,40 @@ func (s *Subscription) receive(ctx context.Context, po *pullOptions, fc *flowCon wg.Add(1) go func() { <-ctx2.Done() - iter.Stop() + iter.stop() wg.Done() }() defer wg.Wait() defer cancel() for { - msg, err := iter.Next() - if err == iterator.Done { + msgs, err := iter.receive() + if err == io.EOF { return nil } if err != nil { return err } - // TODO(jba): call acquire closer to when the message is allocated. - if err := fc.acquire(ctx, len(msg.Data)); err != nil { - // TODO(jba): test that this "orphaned" message is nacked immediately when ctx is done. - msg.Nack() - return nil + for i, msg := range msgs { + msg := msg + // TODO(jba): call acquire closer to when the message is allocated. + if err := fc.acquire(ctx, len(msg.Data)); err != nil { + // TODO(jba): test that these "orphaned" messages are nacked immediately when ctx is done. + for _, m := range msgs[i:] { + m.Nack() + } + return nil + } + wg.Add(1) + go func() { + // TODO(jba): call release when the message is available for GC. + // This considers the message to be released when + // f is finished, but f may ack early or not at all. + defer wg.Done() + defer fc.release(len(msg.Data)) + f(ctx2, msg) + }() } - wg.Add(1) - go func() { - // TODO(jba): call release when the message is available for GC. - // This considers the message to be released when - // f is finished, but f may ack early or not at all. - defer wg.Done() - defer fc.release(len(msg.Data)) - f(ctx2, msg) - }() } } diff --git a/vendor/cloud.google.com/go/pubsub/topic.go b/vendor/cloud.google.com/go/pubsub/topic.go index 9e3c2afff..274f54de2 100644 --- a/vendor/cloud.google.com/go/pubsub/topic.go +++ b/vendor/cloud.google.com/go/pubsub/topic.go @@ -106,14 +106,24 @@ func (c *Client) CreateTopic(ctx context.Context, id string) (*Topic, error) { return t, err } -// Topic creates a reference to a topic. +// Topic creates a reference to a topic in the client's project. // // If a Topic's Publish method is called, it has background goroutines // associated with it. Clean them up by calling Topic.Stop. // // Avoid creating many Topic instances if you use them to publish. func (c *Client) Topic(id string) *Topic { - return newTopic(c.s, fmt.Sprintf("projects/%s/topics/%s", c.projectID, id)) + return c.TopicInProject(id, c.projectID) +} + +// TopicInProject creates a reference to a topic in the given project. +// +// If a Topic's Publish method is called, it has background goroutines +// associated with it. Clean them up by calling Topic.Stop. +// +// Avoid creating many Topic instances if you use them to publish. +func (c *Client) TopicInProject(id, projectID string) *Topic { + return newTopic(c.s, fmt.Sprintf("projects/%s/topics/%s", projectID, id)) } func newTopic(s service, name string) *Topic { diff --git a/vendor/cloud.google.com/go/run-tests.sh b/vendor/cloud.google.com/go/run-tests.sh index ac0b66a7a..f47ff50a5 100755 --- a/vendor/cloud.google.com/go/run-tests.sh +++ b/vendor/cloud.google.com/go/run-tests.sh @@ -83,4 +83,6 @@ for pkg in $(go list $prefix/...); do # for each package in the repo fi done run go test -race -v -short $shorts -run go test -race -v $fulls +if [[ $fulls != "" ]]; then + run go test -race -v $fulls +fi diff --git a/vendor/cloud.google.com/go/spanner/admin/database/apiv1/database_admin_client.go b/vendor/cloud.google.com/go/spanner/admin/database/apiv1/database_admin_client.go index 65506b633..b256ebc73 100644 --- a/vendor/cloud.google.com/go/spanner/admin/database/apiv1/database_admin_client.go +++ b/vendor/cloud.google.com/go/spanner/admin/database/apiv1/database_admin_client.go @@ -35,11 +35,6 @@ import ( "google.golang.org/grpc/codes" ) -var ( - databaseAdminInstancePathTemplate = gax.MustCompilePathTemplate("projects/{project}/instances/{instance}") - databaseAdminDatabasePathTemplate = gax.MustCompilePathTemplate("projects/{project}/instances/{instance}/databases/{database}") -) - // DatabaseAdminCallOptions contains the retry settings for each method of DatabaseAdminClient. type DatabaseAdminCallOptions struct { ListDatabases []gax.CallOption @@ -126,7 +121,7 @@ func NewDatabaseAdminClient(ctx context.Context, opts ...option.ClientOption) (* databaseAdminClient: databasepb.NewDatabaseAdminClient(conn), } - c.SetGoogleClientInfo() + c.setGoogleClientInfo() c.LROClient, err = lroauto.NewOperationsClient(ctx, option.WithGRPCConn(conn)) if err != nil { @@ -152,10 +147,10 @@ func (c *DatabaseAdminClient) Close() error { return c.conn.Close() } -// SetGoogleClientInfo sets the name and version of the application in +// setGoogleClientInfo sets the name and version of the application in // the `x-goog-api-client` header passed on each request. Intended for // use by Google-written clients. -func (c *DatabaseAdminClient) SetGoogleClientInfo(keyval ...string) { +func (c *DatabaseAdminClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", version.Go()}, keyval...) kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version) c.xGoogHeader = []string{gax.XGoogHeader(kv...)} @@ -163,27 +158,24 @@ func (c *DatabaseAdminClient) SetGoogleClientInfo(keyval ...string) { // DatabaseAdminInstancePath returns the path for the instance resource. func DatabaseAdminInstancePath(project, instance string) string { - path, err := databaseAdminInstancePathTemplate.Render(map[string]string{ - "project": project, - "instance": instance, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/instances/" + + instance + + "" } // DatabaseAdminDatabasePath returns the path for the database resource. func DatabaseAdminDatabasePath(project, instance, database string) string { - path, err := databaseAdminDatabasePathTemplate.Render(map[string]string{ - "project": project, - "instance": instance, - "database": database, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/instances/" + + instance + + "/databases/" + + database + + "" } // ListDatabases lists Cloud Spanner databases. @@ -223,7 +215,7 @@ func (c *DatabaseAdminClient) ListDatabases(ctx context.Context, req *databasepb // CreateDatabase creates a new Cloud Spanner database and starts to prepare it for serving. // The returned [long-running operation][google.longrunning.Operation] will -// have a name of the format `/operations/` and +// have a name of the format /operations/ and // can be used to track preparation of the database. The // [metadata][google.longrunning.Operation.metadata] field type is // [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The @@ -265,7 +257,7 @@ func (c *DatabaseAdminClient) GetDatabase(ctx context.Context, req *databasepb.G // UpdateDatabaseDdl updates the schema of a Cloud Spanner database by // creating/altering/dropping tables, columns, indexes, etc. The returned // [long-running operation][google.longrunning.Operation] will have a name of -// the format `/operations/` and can be used to +// the format /operations/ and can be used to // track execution of the schema change(s). The // [metadata][google.longrunning.Operation.metadata] field type is // [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response. @@ -319,7 +311,7 @@ func (c *DatabaseAdminClient) GetDatabaseDdl(ctx context.Context, req *databasep // SetIamPolicy sets the access control policy on a database resource. Replaces any // existing policy. // -// Authorization requires `spanner.databases.setIamPolicy` permission on +// Authorization requires spanner.databases.setIamPolicy permission on // [resource][google.iam.v1.SetIamPolicyRequest.resource]. func (c *DatabaseAdminClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { ctx = insertXGoog(ctx, c.xGoogHeader) @@ -339,7 +331,7 @@ func (c *DatabaseAdminClient) SetIamPolicy(ctx context.Context, req *iampb.SetIa // 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 +// Authorization requires spanner.databases.getIamPolicy permission on // [resource][google.iam.v1.GetIamPolicyRequest.resource]. func (c *DatabaseAdminClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { ctx = insertXGoog(ctx, c.xGoogHeader) @@ -359,7 +351,7 @@ func (c *DatabaseAdminClient) GetIamPolicy(ctx context.Context, req *iampb.GetIa // 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 +// 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 (c *DatabaseAdminClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { @@ -437,7 +429,7 @@ func (c *DatabaseAdminClient) CreateDatabaseOperation(name string) *CreateDataba // See documentation of Poll for error-handling information. func (op *CreateDatabaseOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*databasepb.Database, error) { var resp databasepb.Database - if err := op.lro.Wait(ctx, &resp, opts...); err != nil { + if err := op.lro.WaitWithInterval(ctx, &resp, 45000*time.Millisecond, opts...); err != nil { return nil, err } return &resp, nil @@ -505,7 +497,7 @@ func (c *DatabaseAdminClient) UpdateDatabaseDdlOperation(name string) *UpdateDat // // See documentation of Poll for error-handling information. func (op *UpdateDatabaseDdlOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.Wait(ctx, nil, opts...) + return op.lro.WaitWithInterval(ctx, nil, 45000*time.Millisecond, opts...) } // Poll fetches the latest state of the long-running operation. diff --git a/vendor/cloud.google.com/go/spanner/admin/database/apiv1/doc.go b/vendor/cloud.google.com/go/spanner/admin/database/apiv1/doc.go index 03ee1441d..9c56f1e6b 100644 --- a/vendor/cloud.google.com/go/spanner/admin/database/apiv1/doc.go +++ b/vendor/cloud.google.com/go/spanner/admin/database/apiv1/doc.go @@ -31,8 +31,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/cloud.google.com/go/spanner/admin/instance/apiv1/doc.go b/vendor/cloud.google.com/go/spanner/admin/instance/apiv1/doc.go index dd4ea6841..332b69506 100644 --- a/vendor/cloud.google.com/go/spanner/admin/instance/apiv1/doc.go +++ b/vendor/cloud.google.com/go/spanner/admin/instance/apiv1/doc.go @@ -31,8 +31,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/cloud.google.com/go/spanner/admin/instance/apiv1/instance_admin_client.go b/vendor/cloud.google.com/go/spanner/admin/instance/apiv1/instance_admin_client.go index 281433d28..125fc3565 100644 --- a/vendor/cloud.google.com/go/spanner/admin/instance/apiv1/instance_admin_client.go +++ b/vendor/cloud.google.com/go/spanner/admin/instance/apiv1/instance_admin_client.go @@ -35,12 +35,6 @@ import ( "google.golang.org/grpc/codes" ) -var ( - instanceAdminProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}") - instanceAdminInstanceConfigPathTemplate = gax.MustCompilePathTemplate("projects/{project}/instanceConfigs/{instance_config}") - instanceAdminInstancePathTemplate = gax.MustCompilePathTemplate("projects/{project}/instances/{instance}") -) - // InstanceAdminCallOptions contains the retry settings for each method of InstanceAdminClient. type InstanceAdminCallOptions struct { ListInstanceConfigs []gax.CallOption @@ -145,7 +139,7 @@ func NewInstanceAdminClient(ctx context.Context, opts ...option.ClientOption) (* instanceAdminClient: instancepb.NewInstanceAdminClient(conn), } - c.SetGoogleClientInfo() + c.setGoogleClientInfo() c.LROClient, err = lroauto.NewOperationsClient(ctx, option.WithGRPCConn(conn)) if err != nil { @@ -171,10 +165,10 @@ func (c *InstanceAdminClient) Close() error { return c.conn.Close() } -// SetGoogleClientInfo sets the name and version of the application in +// setGoogleClientInfo sets the name and version of the application in // the `x-goog-api-client` header passed on each request. Intended for // use by Google-written clients. -func (c *InstanceAdminClient) SetGoogleClientInfo(keyval ...string) { +func (c *InstanceAdminClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", version.Go()}, keyval...) kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version) c.xGoogHeader = []string{gax.XGoogHeader(kv...)} @@ -182,37 +176,30 @@ func (c *InstanceAdminClient) SetGoogleClientInfo(keyval ...string) { // InstanceAdminProjectPath returns the path for the project resource. func InstanceAdminProjectPath(project string) string { - path, err := instanceAdminProjectPathTemplate.Render(map[string]string{ - "project": project, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "" } // InstanceAdminInstanceConfigPath returns the path for the instance config resource. func InstanceAdminInstanceConfigPath(project, instanceConfig string) string { - path, err := instanceAdminInstanceConfigPathTemplate.Render(map[string]string{ - "project": project, - "instance_config": instanceConfig, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/instanceConfigs/" + + instanceConfig + + "" } // InstanceAdminInstancePath returns the path for the instance resource. func InstanceAdminInstancePath(project, instance string) string { - path, err := instanceAdminInstancePathTemplate.Render(map[string]string{ - "project": project, - "instance": instance, - }) - if err != nil { - panic(err) - } - return path + return "" + + "projects/" + + project + + "/instances/" + + instance + + "" } // ListInstanceConfigs lists the supported instance configurations for a given project. @@ -321,31 +308,36 @@ func (c *InstanceAdminClient) GetInstance(ctx context.Context, req *instancepb.G // returned [long-running operation][google.longrunning.Operation] // can be used to track the progress of preparing the new // instance. The instance name is assigned by the caller. If the -// named instance already exists, `CreateInstance` returns -// `ALREADY_EXISTS`. +// named instance already exists, CreateInstance returns +// ALREADY_EXISTS. // // Immediately upon completion of this request: // -// * The instance is readable via the API, with all requested attributes -// but no allocated resources. Its state is `CREATING`. +// The instance is readable via the API, with all requested attributes +// but no allocated resources. Its state is CREATING. // // Until completion of the returned operation: // -// * Cancelling the operation renders the instance immediately unreadable -// via the API. -// * The instance can be deleted. -// * All other attempts to modify the instance are rejected. +// Cancelling the operation renders the instance immediately unreadable +// via the API. +// +// The instance can be deleted. +// +// All other attempts to modify the instance are rejected. // // Upon completion of the returned operation: // -// * Billing for all successfully-allocated resources begins (some types -// may have lower than the requested levels). -// * Databases can be created in the instance. -// * The instance's allocated resource levels are readable via the API. -// * The instance's state becomes `READY`. +// Billing for all successfully-allocated resources begins (some types +// may have lower than the requested levels). +// +// Databases can be created in the instance. +// +// The instance's allocated resource levels are readable via the API. +// +// The instance's state becomes READY. // // The returned [long-running operation][google.longrunning.Operation] will -// have a name of the format `/operations/` and +// have a name of the format /operations/ and // can be used to track creation of the instance. The // [metadata][google.longrunning.Operation.metadata] field type is // [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. @@ -372,41 +364,45 @@ func (c *InstanceAdminClient) CreateInstance(ctx context.Context, req *instancep // as requested. The returned [long-running // operation][google.longrunning.Operation] can be used to track the // progress of updating the instance. If the named instance does not -// exist, returns `NOT_FOUND`. +// exist, returns NOT_FOUND. // // Immediately upon completion of this request: // -// * For resource types for which a decrease in the instance's allocation -// has been requested, billing is based on the newly-requested level. +// For resource types for which a decrease in the instance's allocation +// has been requested, billing is based on the newly-requested level. // // Until completion of the returned operation: // -// * Cancelling the operation sets its metadata's -// [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], and begins -// restoring resources to their pre-request values. The operation -// is guaranteed to succeed at undoing all resource changes, -// after which point it terminates with a `CANCELLED` status. -// * All other attempts to modify the instance are rejected. -// * Reading the instance via the API continues to give the pre-request -// resource levels. +// Cancelling the operation sets its metadata's +// [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], and begins +// restoring resources to their pre-request values. The operation +// is guaranteed to succeed at undoing all resource changes, +// after which point it terminates with a CANCELLED status. +// +// All other attempts to modify the instance are rejected. +// +// Reading the instance via the API continues to give the pre-request +// resource levels. // // Upon completion of the returned operation: // -// * Billing begins for all successfully-allocated resources (some types -// may have lower than the requested levels). -// * All newly-reserved resources are available for serving the instance's -// tables. -// * The instance's new resource levels are readable via the API. +// Billing begins for all successfully-allocated resources (some types +// may have lower than the requested levels). +// +// All newly-reserved resources are available for serving the instance's +// tables. +// +// The instance's new resource levels are readable via the API. // // The returned [long-running operation][google.longrunning.Operation] will -// have a name of the format `/operations/` and +// have a name of the format /operations/ and // can be used to track the instance modification. The // [metadata][google.longrunning.Operation.metadata] field type is // [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. // The [response][google.longrunning.Operation.response] field type is // [Instance][google.spanner.admin.instance.v1.Instance], if successful. // -// Authorization requires `spanner.instances.update` permission on +// Authorization requires spanner.instances.update permission on // resource [name][google.spanner.admin.instance.v1.Instance.name]. func (c *InstanceAdminClient) UpdateInstance(ctx context.Context, req *instancepb.UpdateInstanceRequest, opts ...gax.CallOption) (*UpdateInstanceOperation, error) { ctx = insertXGoog(ctx, c.xGoogHeader) @@ -429,13 +425,13 @@ func (c *InstanceAdminClient) UpdateInstance(ctx context.Context, req *instancep // // Immediately upon completion of the request: // -// * Billing ceases for all of the instance's reserved resources. +// Billing ceases for all of the instance's reserved resources. // // Soon afterward: // -// * The instance and *all of its databases* immediately and -// irrevocably disappear from the API. All data in the databases -// is permanently deleted. +// The instance and all of its databases immediately and +// irrevocably disappear from the API. All data in the databases +// is permanently deleted. func (c *InstanceAdminClient) DeleteInstance(ctx context.Context, req *instancepb.DeleteInstanceRequest, opts ...gax.CallOption) error { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.DeleteInstance[0:len(c.CallOptions.DeleteInstance):len(c.CallOptions.DeleteInstance)], opts...) @@ -450,7 +446,7 @@ func (c *InstanceAdminClient) DeleteInstance(ctx context.Context, req *instancep // SetIamPolicy sets the access control policy on an instance resource. Replaces any // existing policy. // -// Authorization requires `spanner.instances.setIamPolicy` on +// Authorization requires spanner.instances.setIamPolicy on // [resource][google.iam.v1.SetIamPolicyRequest.resource]. func (c *InstanceAdminClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { ctx = insertXGoog(ctx, c.xGoogHeader) @@ -470,7 +466,7 @@ func (c *InstanceAdminClient) SetIamPolicy(ctx context.Context, req *iampb.SetIa // GetIamPolicy gets the access control policy for an instance resource. Returns an empty // policy if an instance exists but does not have a policy set. // -// Authorization requires `spanner.instances.getIamPolicy` on +// Authorization requires spanner.instances.getIamPolicy on // [resource][google.iam.v1.GetIamPolicyRequest.resource]. func (c *InstanceAdminClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { ctx = insertXGoog(ctx, c.xGoogHeader) @@ -490,7 +486,7 @@ func (c *InstanceAdminClient) GetIamPolicy(ctx context.Context, req *iampb.GetIa // TestIamPermissions returns permissions that the caller has on the specified instance resource. // // Attempting this RPC on a non-existent Cloud Spanner instance resource will -// result in a NOT_FOUND error if the user has `spanner.instances.list` +// result in a NOT_FOUND error if the user has spanner.instances.list // permission on the containing Google Cloud Project. Otherwise returns an // empty set of permissions. func (c *InstanceAdminClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { @@ -610,7 +606,7 @@ func (c *InstanceAdminClient) CreateInstanceOperation(name string) *CreateInstan // See documentation of Poll for error-handling information. func (op *CreateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*instancepb.Instance, error) { var resp instancepb.Instance - if err := op.lro.Wait(ctx, &resp, opts...); err != nil { + if err := op.lro.WaitWithInterval(ctx, &resp, 45000*time.Millisecond, opts...); err != nil { return nil, err } return &resp, nil @@ -679,7 +675,7 @@ func (c *InstanceAdminClient) UpdateInstanceOperation(name string) *UpdateInstan // See documentation of Poll for error-handling information. func (op *UpdateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*instancepb.Instance, error) { var resp instancepb.Instance - if err := op.lro.Wait(ctx, &resp, opts...); err != nil { + if err := op.lro.WaitWithInterval(ctx, &resp, 45000*time.Millisecond, opts...); err != nil { return nil, err } return &resp, nil diff --git a/vendor/cloud.google.com/go/spanner/apiv1/doc.go b/vendor/cloud.google.com/go/spanner/apiv1/doc.go new file mode 100644 index 000000000..d6bf75402 --- /dev/null +++ b/vendor/cloud.google.com/go/spanner/apiv1/doc.go @@ -0,0 +1,44 @@ +// 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. +// 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. + +// AUTO-GENERATED CODE. DO NOT EDIT. + +// Package spanner is an experimental, auto-generated package for the +// Cloud Spanner API. +// +// Cloud Spanner is a managed, mission-critical, globally consistent and +// scalable relational database service. +// +// Use the client at cloud.google.com/go/spanner in preference to this. +package spanner // import "cloud.google.com/go/spanner/apiv1" + +import ( + "golang.org/x/net/context" + "google.golang.org/grpc/metadata" +) + +func insertXGoog(ctx context.Context, val []string) context.Context { + md, _ := metadata.FromOutgoingContext(ctx) + md = md.Copy() + md["x-goog-api-client"] = val + return metadata.NewOutgoingContext(ctx, md) +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data", + } +} diff --git a/vendor/cloud.google.com/go/spanner/apiv1/mock_test.go b/vendor/cloud.google.com/go/spanner/apiv1/mock_test.go new file mode 100644 index 000000000..dd8a546a7 --- /dev/null +++ b/vendor/cloud.google.com/go/spanner/apiv1/mock_test.go @@ -0,0 +1,853 @@ +// 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. +// 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. + +// AUTO-GENERATED CODE. DO NOT EDIT. + +package spanner + +import ( + emptypb "github.com/golang/protobuf/ptypes/empty" + spannerpb "google.golang.org/genproto/googleapis/spanner/v1" +) + +import ( + "flag" + "fmt" + "io" + "log" + "net" + "os" + "strings" + "testing" + + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes" + "golang.org/x/net/context" + "google.golang.org/api/option" + status "google.golang.org/genproto/googleapis/rpc/status" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + gstatus "google.golang.org/grpc/status" +) + +var _ = io.EOF +var _ = ptypes.MarshalAny +var _ status.Status + +type mockSpannerServer struct { + // Embed for forward compatibility. + // Tests will keep working if more methods are added + // in the future. + spannerpb.SpannerServer + + reqs []proto.Message + + // If set, all calls return this error. + err error + + // responses to return if err == nil + resps []proto.Message +} + +func (s *mockSpannerServer) CreateSession(ctx context.Context, req *spannerpb.CreateSessionRequest) (*spannerpb.Session, error) { + md, _ := metadata.FromIncomingContext(ctx) + if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { + return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) + } + s.reqs = append(s.reqs, req) + if s.err != nil { + return nil, s.err + } + return s.resps[0].(*spannerpb.Session), nil +} + +func (s *mockSpannerServer) GetSession(ctx context.Context, req *spannerpb.GetSessionRequest) (*spannerpb.Session, error) { + md, _ := metadata.FromIncomingContext(ctx) + if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { + return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) + } + s.reqs = append(s.reqs, req) + if s.err != nil { + return nil, s.err + } + return s.resps[0].(*spannerpb.Session), nil +} + +func (s *mockSpannerServer) DeleteSession(ctx context.Context, req *spannerpb.DeleteSessionRequest) (*emptypb.Empty, error) { + md, _ := metadata.FromIncomingContext(ctx) + if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { + return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) + } + s.reqs = append(s.reqs, req) + if s.err != nil { + return nil, s.err + } + return s.resps[0].(*emptypb.Empty), nil +} + +func (s *mockSpannerServer) ExecuteSql(ctx context.Context, req *spannerpb.ExecuteSqlRequest) (*spannerpb.ResultSet, error) { + md, _ := metadata.FromIncomingContext(ctx) + if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { + return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) + } + s.reqs = append(s.reqs, req) + if s.err != nil { + return nil, s.err + } + return s.resps[0].(*spannerpb.ResultSet), nil +} + +func (s *mockSpannerServer) ExecuteStreamingSql(req *spannerpb.ExecuteSqlRequest, stream spannerpb.Spanner_ExecuteStreamingSqlServer) error { + md, _ := metadata.FromIncomingContext(stream.Context()) + if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { + return fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) + } + s.reqs = append(s.reqs, req) + if s.err != nil { + return s.err + } + for _, v := range s.resps { + if err := stream.Send(v.(*spannerpb.PartialResultSet)); err != nil { + return err + } + } + return nil +} + +func (s *mockSpannerServer) Read(ctx context.Context, req *spannerpb.ReadRequest) (*spannerpb.ResultSet, error) { + md, _ := metadata.FromIncomingContext(ctx) + if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { + return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) + } + s.reqs = append(s.reqs, req) + if s.err != nil { + return nil, s.err + } + return s.resps[0].(*spannerpb.ResultSet), nil +} + +func (s *mockSpannerServer) StreamingRead(req *spannerpb.ReadRequest, stream spannerpb.Spanner_StreamingReadServer) error { + md, _ := metadata.FromIncomingContext(stream.Context()) + if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { + return fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) + } + s.reqs = append(s.reqs, req) + if s.err != nil { + return s.err + } + for _, v := range s.resps { + if err := stream.Send(v.(*spannerpb.PartialResultSet)); err != nil { + return err + } + } + return nil +} + +func (s *mockSpannerServer) BeginTransaction(ctx context.Context, req *spannerpb.BeginTransactionRequest) (*spannerpb.Transaction, error) { + md, _ := metadata.FromIncomingContext(ctx) + if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { + return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) + } + s.reqs = append(s.reqs, req) + if s.err != nil { + return nil, s.err + } + return s.resps[0].(*spannerpb.Transaction), nil +} + +func (s *mockSpannerServer) Commit(ctx context.Context, req *spannerpb.CommitRequest) (*spannerpb.CommitResponse, error) { + md, _ := metadata.FromIncomingContext(ctx) + if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { + return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) + } + s.reqs = append(s.reqs, req) + if s.err != nil { + return nil, s.err + } + return s.resps[0].(*spannerpb.CommitResponse), nil +} + +func (s *mockSpannerServer) Rollback(ctx context.Context, req *spannerpb.RollbackRequest) (*emptypb.Empty, error) { + md, _ := metadata.FromIncomingContext(ctx) + if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { + return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) + } + s.reqs = append(s.reqs, req) + if s.err != nil { + return nil, s.err + } + return s.resps[0].(*emptypb.Empty), nil +} + +// clientOpt is the option tests should use to connect to the test server. +// It is initialized by TestMain. +var clientOpt option.ClientOption + +var ( + mockSpanner mockSpannerServer +) + +func TestMain(m *testing.M) { + flag.Parse() + + serv := grpc.NewServer() + spannerpb.RegisterSpannerServer(serv, &mockSpanner) + + lis, err := net.Listen("tcp", "localhost:0") + if err != nil { + log.Fatal(err) + } + go serv.Serve(lis) + + conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) + if err != nil { + log.Fatal(err) + } + clientOpt = option.WithGRPCConn(conn) + + os.Exit(m.Run()) +} + +func TestSpannerCreateSession(t *testing.T) { + var name string = "name3373707" + var expectedResponse = &spannerpb.Session{ + Name: name, + } + + mockSpanner.err = nil + mockSpanner.reqs = nil + + mockSpanner.resps = append(mockSpanner.resps[:0], expectedResponse) + + var formattedDatabase string = DatabasePath("[PROJECT]", "[INSTANCE]", "[DATABASE]") + var request = &spannerpb.CreateSessionRequest{ + Database: formattedDatabase, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.CreateSession(context.Background(), request) + + if err != nil { + t.Fatal(err) + } + + if want, got := request, mockSpanner.reqs[0]; !proto.Equal(want, got) { + t.Errorf("wrong request %q, want %q", got, want) + } + + if want, got := expectedResponse, resp; !proto.Equal(want, got) { + t.Errorf("wrong response %q, want %q)", got, want) + } +} + +func TestSpannerCreateSessionError(t *testing.T) { + errCode := codes.PermissionDenied + mockSpanner.err = gstatus.Error(errCode, "test error") + + var formattedDatabase string = DatabasePath("[PROJECT]", "[INSTANCE]", "[DATABASE]") + var request = &spannerpb.CreateSessionRequest{ + Database: formattedDatabase, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.CreateSession(context.Background(), request) + + if st, ok := gstatus.FromError(err); !ok { + t.Errorf("got error %v, expected grpc error", err) + } else if c := st.Code(); c != errCode { + t.Errorf("got error code %q, want %q", c, errCode) + } + _ = resp +} +func TestSpannerGetSession(t *testing.T) { + var name2 string = "name2-1052831874" + var expectedResponse = &spannerpb.Session{ + Name: name2, + } + + mockSpanner.err = nil + mockSpanner.reqs = nil + + mockSpanner.resps = append(mockSpanner.resps[:0], expectedResponse) + + var formattedName string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var request = &spannerpb.GetSessionRequest{ + Name: formattedName, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.GetSession(context.Background(), request) + + if err != nil { + t.Fatal(err) + } + + if want, got := request, mockSpanner.reqs[0]; !proto.Equal(want, got) { + t.Errorf("wrong request %q, want %q", got, want) + } + + if want, got := expectedResponse, resp; !proto.Equal(want, got) { + t.Errorf("wrong response %q, want %q)", got, want) + } +} + +func TestSpannerGetSessionError(t *testing.T) { + errCode := codes.PermissionDenied + mockSpanner.err = gstatus.Error(errCode, "test error") + + var formattedName string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var request = &spannerpb.GetSessionRequest{ + Name: formattedName, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.GetSession(context.Background(), request) + + if st, ok := gstatus.FromError(err); !ok { + t.Errorf("got error %v, expected grpc error", err) + } else if c := st.Code(); c != errCode { + t.Errorf("got error code %q, want %q", c, errCode) + } + _ = resp +} +func TestSpannerDeleteSession(t *testing.T) { + var expectedResponse *emptypb.Empty = &emptypb.Empty{} + + mockSpanner.err = nil + mockSpanner.reqs = nil + + mockSpanner.resps = append(mockSpanner.resps[:0], expectedResponse) + + var formattedName string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var request = &spannerpb.DeleteSessionRequest{ + Name: formattedName, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + err = c.DeleteSession(context.Background(), request) + + if err != nil { + t.Fatal(err) + } + + if want, got := request, mockSpanner.reqs[0]; !proto.Equal(want, got) { + t.Errorf("wrong request %q, want %q", got, want) + } + +} + +func TestSpannerDeleteSessionError(t *testing.T) { + errCode := codes.PermissionDenied + mockSpanner.err = gstatus.Error(errCode, "test error") + + var formattedName string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var request = &spannerpb.DeleteSessionRequest{ + Name: formattedName, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + err = c.DeleteSession(context.Background(), request) + + if st, ok := gstatus.FromError(err); !ok { + t.Errorf("got error %v, expected grpc error", err) + } else if c := st.Code(); c != errCode { + t.Errorf("got error code %q, want %q", c, errCode) + } +} +func TestSpannerExecuteSql(t *testing.T) { + var expectedResponse *spannerpb.ResultSet = &spannerpb.ResultSet{} + + mockSpanner.err = nil + mockSpanner.reqs = nil + + mockSpanner.resps = append(mockSpanner.resps[:0], expectedResponse) + + var formattedSession string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var sql string = "sql114126" + var request = &spannerpb.ExecuteSqlRequest{ + Session: formattedSession, + Sql: sql, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.ExecuteSql(context.Background(), request) + + if err != nil { + t.Fatal(err) + } + + if want, got := request, mockSpanner.reqs[0]; !proto.Equal(want, got) { + t.Errorf("wrong request %q, want %q", got, want) + } + + if want, got := expectedResponse, resp; !proto.Equal(want, got) { + t.Errorf("wrong response %q, want %q)", got, want) + } +} + +func TestSpannerExecuteSqlError(t *testing.T) { + errCode := codes.PermissionDenied + mockSpanner.err = gstatus.Error(errCode, "test error") + + var formattedSession string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var sql string = "sql114126" + var request = &spannerpb.ExecuteSqlRequest{ + Session: formattedSession, + Sql: sql, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.ExecuteSql(context.Background(), request) + + if st, ok := gstatus.FromError(err); !ok { + t.Errorf("got error %v, expected grpc error", err) + } else if c := st.Code(); c != errCode { + t.Errorf("got error code %q, want %q", c, errCode) + } + _ = resp +} +func TestSpannerExecuteStreamingSql(t *testing.T) { + var chunkedValue bool = true + var resumeToken []byte = []byte("103") + var expectedResponse = &spannerpb.PartialResultSet{ + ChunkedValue: chunkedValue, + ResumeToken: resumeToken, + } + + mockSpanner.err = nil + mockSpanner.reqs = nil + + mockSpanner.resps = append(mockSpanner.resps[:0], expectedResponse) + + var formattedSession string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var sql string = "sql114126" + var request = &spannerpb.ExecuteSqlRequest{ + Session: formattedSession, + Sql: sql, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + stream, err := c.ExecuteStreamingSql(context.Background(), request) + if err != nil { + t.Fatal(err) + } + resp, err := stream.Recv() + + if err != nil { + t.Fatal(err) + } + + if want, got := request, mockSpanner.reqs[0]; !proto.Equal(want, got) { + t.Errorf("wrong request %q, want %q", got, want) + } + + if want, got := expectedResponse, resp; !proto.Equal(want, got) { + t.Errorf("wrong response %q, want %q)", got, want) + } +} + +func TestSpannerExecuteStreamingSqlError(t *testing.T) { + errCode := codes.PermissionDenied + mockSpanner.err = gstatus.Error(errCode, "test error") + + var formattedSession string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var sql string = "sql114126" + var request = &spannerpb.ExecuteSqlRequest{ + Session: formattedSession, + Sql: sql, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + stream, err := c.ExecuteStreamingSql(context.Background(), request) + if err != nil { + t.Fatal(err) + } + resp, err := stream.Recv() + + if st, ok := gstatus.FromError(err); !ok { + t.Errorf("got error %v, expected grpc error", err) + } else if c := st.Code(); c != errCode { + t.Errorf("got error code %q, want %q", c, errCode) + } + _ = resp +} +func TestSpannerRead(t *testing.T) { + var expectedResponse *spannerpb.ResultSet = &spannerpb.ResultSet{} + + mockSpanner.err = nil + mockSpanner.reqs = nil + + mockSpanner.resps = append(mockSpanner.resps[:0], expectedResponse) + + var formattedSession string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var table string = "table110115790" + var columns []string = nil + var keySet *spannerpb.KeySet = &spannerpb.KeySet{} + var request = &spannerpb.ReadRequest{ + Session: formattedSession, + Table: table, + Columns: columns, + KeySet: keySet, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.Read(context.Background(), request) + + if err != nil { + t.Fatal(err) + } + + if want, got := request, mockSpanner.reqs[0]; !proto.Equal(want, got) { + t.Errorf("wrong request %q, want %q", got, want) + } + + if want, got := expectedResponse, resp; !proto.Equal(want, got) { + t.Errorf("wrong response %q, want %q)", got, want) + } +} + +func TestSpannerReadError(t *testing.T) { + errCode := codes.PermissionDenied + mockSpanner.err = gstatus.Error(errCode, "test error") + + var formattedSession string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var table string = "table110115790" + var columns []string = nil + var keySet *spannerpb.KeySet = &spannerpb.KeySet{} + var request = &spannerpb.ReadRequest{ + Session: formattedSession, + Table: table, + Columns: columns, + KeySet: keySet, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.Read(context.Background(), request) + + if st, ok := gstatus.FromError(err); !ok { + t.Errorf("got error %v, expected grpc error", err) + } else if c := st.Code(); c != errCode { + t.Errorf("got error code %q, want %q", c, errCode) + } + _ = resp +} +func TestSpannerStreamingRead(t *testing.T) { + var chunkedValue bool = true + var resumeToken []byte = []byte("103") + var expectedResponse = &spannerpb.PartialResultSet{ + ChunkedValue: chunkedValue, + ResumeToken: resumeToken, + } + + mockSpanner.err = nil + mockSpanner.reqs = nil + + mockSpanner.resps = append(mockSpanner.resps[:0], expectedResponse) + + var formattedSession string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var table string = "table110115790" + var columns []string = nil + var keySet *spannerpb.KeySet = &spannerpb.KeySet{} + var request = &spannerpb.ReadRequest{ + Session: formattedSession, + Table: table, + Columns: columns, + KeySet: keySet, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + stream, err := c.StreamingRead(context.Background(), request) + if err != nil { + t.Fatal(err) + } + resp, err := stream.Recv() + + if err != nil { + t.Fatal(err) + } + + if want, got := request, mockSpanner.reqs[0]; !proto.Equal(want, got) { + t.Errorf("wrong request %q, want %q", got, want) + } + + if want, got := expectedResponse, resp; !proto.Equal(want, got) { + t.Errorf("wrong response %q, want %q)", got, want) + } +} + +func TestSpannerStreamingReadError(t *testing.T) { + errCode := codes.PermissionDenied + mockSpanner.err = gstatus.Error(errCode, "test error") + + var formattedSession string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var table string = "table110115790" + var columns []string = nil + var keySet *spannerpb.KeySet = &spannerpb.KeySet{} + var request = &spannerpb.ReadRequest{ + Session: formattedSession, + Table: table, + Columns: columns, + KeySet: keySet, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + stream, err := c.StreamingRead(context.Background(), request) + if err != nil { + t.Fatal(err) + } + resp, err := stream.Recv() + + if st, ok := gstatus.FromError(err); !ok { + t.Errorf("got error %v, expected grpc error", err) + } else if c := st.Code(); c != errCode { + t.Errorf("got error code %q, want %q", c, errCode) + } + _ = resp +} +func TestSpannerBeginTransaction(t *testing.T) { + var id []byte = []byte("27") + var expectedResponse = &spannerpb.Transaction{ + Id: id, + } + + mockSpanner.err = nil + mockSpanner.reqs = nil + + mockSpanner.resps = append(mockSpanner.resps[:0], expectedResponse) + + var formattedSession string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var options *spannerpb.TransactionOptions = &spannerpb.TransactionOptions{} + var request = &spannerpb.BeginTransactionRequest{ + Session: formattedSession, + Options: options, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.BeginTransaction(context.Background(), request) + + if err != nil { + t.Fatal(err) + } + + if want, got := request, mockSpanner.reqs[0]; !proto.Equal(want, got) { + t.Errorf("wrong request %q, want %q", got, want) + } + + if want, got := expectedResponse, resp; !proto.Equal(want, got) { + t.Errorf("wrong response %q, want %q)", got, want) + } +} + +func TestSpannerBeginTransactionError(t *testing.T) { + errCode := codes.PermissionDenied + mockSpanner.err = gstatus.Error(errCode, "test error") + + var formattedSession string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var options *spannerpb.TransactionOptions = &spannerpb.TransactionOptions{} + var request = &spannerpb.BeginTransactionRequest{ + Session: formattedSession, + Options: options, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.BeginTransaction(context.Background(), request) + + if st, ok := gstatus.FromError(err); !ok { + t.Errorf("got error %v, expected grpc error", err) + } else if c := st.Code(); c != errCode { + t.Errorf("got error code %q, want %q", c, errCode) + } + _ = resp +} +func TestSpannerCommit(t *testing.T) { + var expectedResponse *spannerpb.CommitResponse = &spannerpb.CommitResponse{} + + mockSpanner.err = nil + mockSpanner.reqs = nil + + mockSpanner.resps = append(mockSpanner.resps[:0], expectedResponse) + + var formattedSession string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var mutations []*spannerpb.Mutation = nil + var request = &spannerpb.CommitRequest{ + Session: formattedSession, + Mutations: mutations, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.Commit(context.Background(), request) + + if err != nil { + t.Fatal(err) + } + + if want, got := request, mockSpanner.reqs[0]; !proto.Equal(want, got) { + t.Errorf("wrong request %q, want %q", got, want) + } + + if want, got := expectedResponse, resp; !proto.Equal(want, got) { + t.Errorf("wrong response %q, want %q)", got, want) + } +} + +func TestSpannerCommitError(t *testing.T) { + errCode := codes.PermissionDenied + mockSpanner.err = gstatus.Error(errCode, "test error") + + var formattedSession string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var mutations []*spannerpb.Mutation = nil + var request = &spannerpb.CommitRequest{ + Session: formattedSession, + Mutations: mutations, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.Commit(context.Background(), request) + + if st, ok := gstatus.FromError(err); !ok { + t.Errorf("got error %v, expected grpc error", err) + } else if c := st.Code(); c != errCode { + t.Errorf("got error code %q, want %q", c, errCode) + } + _ = resp +} +func TestSpannerRollback(t *testing.T) { + var expectedResponse *emptypb.Empty = &emptypb.Empty{} + + mockSpanner.err = nil + mockSpanner.reqs = nil + + mockSpanner.resps = append(mockSpanner.resps[:0], expectedResponse) + + var formattedSession string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var transactionId []byte = []byte("28") + var request = &spannerpb.RollbackRequest{ + Session: formattedSession, + TransactionId: transactionId, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + err = c.Rollback(context.Background(), request) + + if err != nil { + t.Fatal(err) + } + + if want, got := request, mockSpanner.reqs[0]; !proto.Equal(want, got) { + t.Errorf("wrong request %q, want %q", got, want) + } + +} + +func TestSpannerRollbackError(t *testing.T) { + errCode := codes.PermissionDenied + mockSpanner.err = gstatus.Error(errCode, "test error") + + var formattedSession string = SessionPath("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]") + var transactionId []byte = []byte("28") + var request = &spannerpb.RollbackRequest{ + Session: formattedSession, + TransactionId: transactionId, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + err = c.Rollback(context.Background(), request) + + if st, ok := gstatus.FromError(err); !ok { + t.Errorf("got error %v, expected grpc error", err) + } else if c := st.Code(); c != errCode { + t.Errorf("got error code %q, want %q", c, errCode) + } +} diff --git a/vendor/cloud.google.com/go/spanner/apiv1/spanner_client.go b/vendor/cloud.google.com/go/spanner/apiv1/spanner_client.go new file mode 100644 index 000000000..d20a93d99 --- /dev/null +++ b/vendor/cloud.google.com/go/spanner/apiv1/spanner_client.go @@ -0,0 +1,392 @@ +// 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. +// 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. + +// AUTO-GENERATED CODE. DO NOT EDIT. + +package spanner + +import ( + "time" + + "cloud.google.com/go/internal/version" + gax "github.com/googleapis/gax-go" + "golang.org/x/net/context" + "google.golang.org/api/option" + "google.golang.org/api/transport" + spannerpb "google.golang.org/genproto/googleapis/spanner/v1" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" +) + +// CallOptions contains the retry settings for each method of Client. +type CallOptions struct { + CreateSession []gax.CallOption + GetSession []gax.CallOption + DeleteSession []gax.CallOption + ExecuteSql []gax.CallOption + ExecuteStreamingSql []gax.CallOption + Read []gax.CallOption + StreamingRead []gax.CallOption + BeginTransaction []gax.CallOption + Commit []gax.CallOption + Rollback []gax.CallOption +} + +func defaultClientOptions() []option.ClientOption { + return []option.ClientOption{ + option.WithEndpoint("spanner.googleapis.com:443"), + option.WithScopes(DefaultAuthScopes()...), + } +} + +func defaultCallOptions() *CallOptions { + retry := map[[2]string][]gax.CallOption{ + {"default", "idempotent"}: { + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 32000 * time.Millisecond, + Multiplier: 1.3, + }) + }), + }, + {"long_running", "long_running"}: { + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 32000 * time.Millisecond, + Multiplier: 1.3, + }) + }), + }, + } + return &CallOptions{ + CreateSession: retry[[2]string{"default", "idempotent"}], + GetSession: retry[[2]string{"default", "idempotent"}], + DeleteSession: retry[[2]string{"default", "idempotent"}], + ExecuteSql: retry[[2]string{"default", "idempotent"}], + ExecuteStreamingSql: retry[[2]string{"default", "non_idempotent"}], + Read: retry[[2]string{"default", "idempotent"}], + StreamingRead: retry[[2]string{"default", "non_idempotent"}], + BeginTransaction: retry[[2]string{"default", "idempotent"}], + Commit: retry[[2]string{"long_running", "long_running"}], + Rollback: retry[[2]string{"default", "idempotent"}], + } +} + +// Client is a client for interacting with Cloud Spanner API. +type Client struct { + // The connection to the service. + conn *grpc.ClientConn + + // The gRPC API client. + client spannerpb.SpannerClient + + // The call options for this service. + CallOptions *CallOptions + + // The metadata to be sent with each request. + xGoogHeader []string +} + +// NewClient creates a new spanner client. +// +// Cloud Spanner API +// +// The Cloud Spanner API can be used to manage sessions and execute +// transactions on data stored in Cloud Spanner databases. +func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + conn, err := transport.DialGRPC(ctx, append(defaultClientOptions(), opts...)...) + if err != nil { + return nil, err + } + c := &Client{ + conn: conn, + CallOptions: defaultCallOptions(), + + client: spannerpb.NewSpannerClient(conn), + } + c.SetGoogleClientInfo() + return c, nil +} + +// Connection returns the client's connection to the API service. +func (c *Client) Connection() *grpc.ClientConn { + return c.conn +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *Client) Close() error { + return c.conn.Close() +} + +// SetGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *Client) SetGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", version.Go()}, keyval...) + kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version) + c.xGoogHeader = []string{gax.XGoogHeader(kv...)} +} + +// DatabasePath returns the path for the database resource. +func DatabasePath(project, instance, database string) string { + return "" + + "projects/" + + project + + "/instances/" + + instance + + "/databases/" + + database + + "" +} + +// SessionPath returns the path for the session resource. +func SessionPath(project, instance, database, session string) string { + return "" + + "projects/" + + project + + "/instances/" + + instance + + "/databases/" + + database + + "/sessions/" + + session + + "" +} + +// CreateSession creates a new session. A session can be used to perform +// transactions that read and/or modify data in a Cloud Spanner database. +// Sessions are meant to be reused for many consecutive +// transactions. +// +// Sessions can only execute one transaction at a time. To execute +// multiple concurrent read-write/write-only transactions, create +// multiple sessions. Note that standalone reads and queries use a +// transaction internally, and count toward the one transaction +// limit. +// +// Cloud Spanner limits the number of sessions that can exist at any given +// time; thus, it is a good idea to delete idle and/or unneeded sessions. +// Aside from explicit deletes, Cloud Spanner can delete sessions for which no +// operations are sent for more than an hour. If a session is deleted, +// requests to it return NOT_FOUND. +// +// Idle sessions can be kept alive by sending a trivial SQL query +// periodically, e.g., "SELECT 1". +func (c *Client) CreateSession(ctx context.Context, req *spannerpb.CreateSessionRequest, opts ...gax.CallOption) (*spannerpb.Session, error) { + ctx = insertXGoog(ctx, c.xGoogHeader) + opts = append(c.CallOptions.CreateSession[0:len(c.CallOptions.CreateSession):len(c.CallOptions.CreateSession)], opts...) + var resp *spannerpb.Session + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.CreateSession(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// GetSession gets a session. Returns NOT_FOUND if the session does not exist. +// This is mainly useful for determining whether a session is still +// alive. +func (c *Client) GetSession(ctx context.Context, req *spannerpb.GetSessionRequest, opts ...gax.CallOption) (*spannerpb.Session, error) { + ctx = insertXGoog(ctx, c.xGoogHeader) + opts = append(c.CallOptions.GetSession[0:len(c.CallOptions.GetSession):len(c.CallOptions.GetSession)], opts...) + var resp *spannerpb.Session + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetSession(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// DeleteSession ends a session, releasing server resources associated with it. +func (c *Client) DeleteSession(ctx context.Context, req *spannerpb.DeleteSessionRequest, opts ...gax.CallOption) error { + ctx = insertXGoog(ctx, c.xGoogHeader) + opts = append(c.CallOptions.DeleteSession[0:len(c.CallOptions.DeleteSession):len(c.CallOptions.DeleteSession)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.client.DeleteSession(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +// ExecuteSql executes an SQL query, returning all rows in a single reply. This +// method cannot be used to return a result set larger than 10 MiB; +// if the query yields more data than that, the query fails with +// a FAILED_PRECONDITION error. +// +// Queries inside read-write transactions might return ABORTED. If +// this occurs, the application should restart the transaction from +// the beginning. See [Transaction][google.spanner.v1.Transaction] for more details. +// +// Larger result sets can be fetched in streaming fashion by calling +// [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] instead. +func (c *Client) ExecuteSql(ctx context.Context, req *spannerpb.ExecuteSqlRequest, opts ...gax.CallOption) (*spannerpb.ResultSet, error) { + ctx = insertXGoog(ctx, c.xGoogHeader) + opts = append(c.CallOptions.ExecuteSql[0:len(c.CallOptions.ExecuteSql):len(c.CallOptions.ExecuteSql)], opts...) + var resp *spannerpb.ResultSet + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ExecuteSql(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// ExecuteStreamingSql like [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], except returns the result +// set as a stream. Unlike [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], there +// is no limit on the size of the returned result set. However, no +// individual row in the result set can exceed 100 MiB, and no +// column value can exceed 10 MiB. +func (c *Client) ExecuteStreamingSql(ctx context.Context, req *spannerpb.ExecuteSqlRequest, opts ...gax.CallOption) (spannerpb.Spanner_ExecuteStreamingSqlClient, error) { + ctx = insertXGoog(ctx, c.xGoogHeader) + opts = append(c.CallOptions.ExecuteStreamingSql[0:len(c.CallOptions.ExecuteStreamingSql):len(c.CallOptions.ExecuteStreamingSql)], opts...) + var resp spannerpb.Spanner_ExecuteStreamingSqlClient + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ExecuteStreamingSql(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// Read reads rows from the database using key lookups and scans, as a +// simple key/value style alternative to +// [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method cannot be used to +// return a result set larger than 10 MiB; if the read matches more +// data than that, the read fails with a FAILED_PRECONDITION +// error. +// +// Reads inside read-write transactions might return ABORTED. If +// this occurs, the application should restart the transaction from +// the beginning. See [Transaction][google.spanner.v1.Transaction] for more details. +// +// Larger result sets can be yielded in streaming fashion by calling +// [StreamingRead][google.spanner.v1.Spanner.StreamingRead] instead. +func (c *Client) Read(ctx context.Context, req *spannerpb.ReadRequest, opts ...gax.CallOption) (*spannerpb.ResultSet, error) { + ctx = insertXGoog(ctx, c.xGoogHeader) + opts = append(c.CallOptions.Read[0:len(c.CallOptions.Read):len(c.CallOptions.Read)], opts...) + var resp *spannerpb.ResultSet + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.Read(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// StreamingRead like [Read][google.spanner.v1.Spanner.Read], except returns the result set as a +// stream. Unlike [Read][google.spanner.v1.Spanner.Read], there is no limit on the +// size of the returned result set. However, no individual row in +// the result set can exceed 100 MiB, and no column value can exceed +// 10 MiB. +func (c *Client) StreamingRead(ctx context.Context, req *spannerpb.ReadRequest, opts ...gax.CallOption) (spannerpb.Spanner_StreamingReadClient, error) { + ctx = insertXGoog(ctx, c.xGoogHeader) + opts = append(c.CallOptions.StreamingRead[0:len(c.CallOptions.StreamingRead):len(c.CallOptions.StreamingRead)], opts...) + var resp spannerpb.Spanner_StreamingReadClient + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.StreamingRead(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// BeginTransaction begins a new transaction. This step can often be skipped: +// [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and +// [Commit][google.spanner.v1.Spanner.Commit] can begin a new transaction as a +// side-effect. +func (c *Client) BeginTransaction(ctx context.Context, req *spannerpb.BeginTransactionRequest, opts ...gax.CallOption) (*spannerpb.Transaction, error) { + ctx = insertXGoog(ctx, c.xGoogHeader) + opts = append(c.CallOptions.BeginTransaction[0:len(c.CallOptions.BeginTransaction):len(c.CallOptions.BeginTransaction)], opts...) + var resp *spannerpb.Transaction + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.BeginTransaction(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// Commit commits a transaction. The request includes the mutations to be +// applied to rows in the database. +// +// Commit might return an ABORTED error. This can occur at any time; +// commonly, the cause is conflicts with concurrent +// transactions. However, it can also happen for a variety of other +// reasons. If Commit returns ABORTED, the caller should re-attempt +// the transaction from the beginning, re-using the same session. +func (c *Client) Commit(ctx context.Context, req *spannerpb.CommitRequest, opts ...gax.CallOption) (*spannerpb.CommitResponse, error) { + ctx = insertXGoog(ctx, c.xGoogHeader) + opts = append(c.CallOptions.Commit[0:len(c.CallOptions.Commit):len(c.CallOptions.Commit)], opts...) + var resp *spannerpb.CommitResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.Commit(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// Rollback rolls back a transaction, releasing any locks it holds. It is a good +// idea to call this for any transaction that includes one or more +// [Read][google.spanner.v1.Spanner.Read] or [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and +// ultimately decides not to commit. +// +// Rollback returns OK if it successfully aborts the transaction, the +// transaction was already aborted, or the transaction is not +// found. Rollback never returns ABORTED. +func (c *Client) Rollback(ctx context.Context, req *spannerpb.RollbackRequest, opts ...gax.CallOption) error { + ctx = insertXGoog(ctx, c.xGoogHeader) + opts = append(c.CallOptions.Rollback[0:len(c.CallOptions.Rollback):len(c.CallOptions.Rollback)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.client.Rollback(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} diff --git a/vendor/cloud.google.com/go/spanner/apiv1/spanner_client_example_test.go b/vendor/cloud.google.com/go/spanner/apiv1/spanner_client_example_test.go new file mode 100644 index 000000000..55ee8d104 --- /dev/null +++ b/vendor/cloud.google.com/go/spanner/apiv1/spanner_client_example_test.go @@ -0,0 +1,229 @@ +// 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. +// 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. + +// AUTO-GENERATED CODE. DO NOT EDIT. + +package spanner_test + +import ( + "io" + + "cloud.google.com/go/spanner/apiv1" + "golang.org/x/net/context" + spannerpb "google.golang.org/genproto/googleapis/spanner/v1" +) + +func ExampleNewClient() { + ctx := context.Background() + c, err := spanner.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use client. + _ = c +} + +func ExampleClient_CreateSession() { + ctx := context.Background() + c, err := spanner.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &spannerpb.CreateSessionRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.CreateSession(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_GetSession() { + ctx := context.Background() + c, err := spanner.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &spannerpb.GetSessionRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.GetSession(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_DeleteSession() { + ctx := context.Background() + c, err := spanner.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &spannerpb.DeleteSessionRequest{ + // TODO: Fill request struct fields. + } + err = c.DeleteSession(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_ExecuteSql() { + ctx := context.Background() + c, err := spanner.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &spannerpb.ExecuteSqlRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.ExecuteSql(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ExecuteStreamingSql() { + ctx := context.Background() + c, err := spanner.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &spannerpb.ExecuteSqlRequest{ + // TODO: Fill request struct fields. + } + stream, err := c.ExecuteStreamingSql(ctx, req) + if err != nil { + // TODO: Handle error. + } + for { + resp, err := stream.Recv() + if err == io.EOF { + break + } + if err != nil { + // TODO: handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_Read() { + ctx := context.Background() + c, err := spanner.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &spannerpb.ReadRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.Read(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_StreamingRead() { + ctx := context.Background() + c, err := spanner.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &spannerpb.ReadRequest{ + // TODO: Fill request struct fields. + } + stream, err := c.StreamingRead(ctx, req) + if err != nil { + // TODO: Handle error. + } + for { + resp, err := stream.Recv() + if err == io.EOF { + break + } + if err != nil { + // TODO: handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_BeginTransaction() { + ctx := context.Background() + c, err := spanner.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &spannerpb.BeginTransactionRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.BeginTransaction(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_Commit() { + ctx := context.Background() + c, err := spanner.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &spannerpb.CommitRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.Commit(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_Rollback() { + ctx := context.Background() + c, err := spanner.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &spannerpb.RollbackRequest{ + // TODO: Fill request struct fields. + } + err = c.Rollback(ctx, req) + if err != nil { + // TODO: Handle error. + } +} diff --git a/vendor/cloud.google.com/go/spanner/internal/testutil/mockclient.go b/vendor/cloud.google.com/go/spanner/internal/testutil/mockclient.go index aa56a3299..9b41b810d 100644 --- a/vendor/cloud.google.com/go/spanner/internal/testutil/mockclient.go +++ b/vendor/cloud.google.com/go/spanner/internal/testutil/mockclient.go @@ -270,15 +270,15 @@ func (m *MockCloudSpannerClient) StreamingRead(c context.Context, r *sppb.ReadRe Table: "t_mock", Columns: []string{"col1", "col2"}, KeySet: &sppb.KeySet{ - []*proto3.ListValue{ + Keys: []*proto3.ListValue{ &proto3.ListValue{ Values: []*proto3.Value{ &proto3.Value{Kind: &proto3.Value_StringValue{StringValue: "foo"}}, }, }, }, - []*sppb.KeyRange{}, - false, + Ranges: []*sppb.KeyRange{}, + All: false, }, } if act.method == "StreamingIndexRead" { diff --git a/vendor/cloud.google.com/go/spanner/key_test.go b/vendor/cloud.google.com/go/spanner/key_test.go index e552e8647..aee47f993 100644 --- a/vendor/cloud.google.com/go/spanner/key_test.go +++ b/vendor/cloud.google.com/go/spanner/key_test.go @@ -209,32 +209,32 @@ func TestKeyRange(t *testing.T) { { kr: KeyRange{Key{"A"}, Key{"D"}, OpenOpen}, wantProto: &sppb.KeyRange{ - &sppb.KeyRange_StartOpen{listValueProto(stringProto("A"))}, - &sppb.KeyRange_EndOpen{listValueProto(stringProto("D"))}, + StartKeyType: &sppb.KeyRange_StartOpen{StartOpen: listValueProto(stringProto("A"))}, + EndKeyType: &sppb.KeyRange_EndOpen{EndOpen: listValueProto(stringProto("D"))}, }, wantStr: `(("A"),("D"))`, }, { kr: KeyRange{Key{1}, Key{10}, OpenClosed}, wantProto: &sppb.KeyRange{ - &sppb.KeyRange_StartOpen{listValueProto(stringProto("1"))}, - &sppb.KeyRange_EndClosed{listValueProto(stringProto("10"))}, + StartKeyType: &sppb.KeyRange_StartOpen{StartOpen: listValueProto(stringProto("1"))}, + EndKeyType: &sppb.KeyRange_EndClosed{EndClosed: listValueProto(stringProto("10"))}, }, wantStr: "((1),(10)]", }, { kr: KeyRange{Key{1.5, 2.1, 0.2}, Key{1.9, 0.7}, ClosedOpen}, wantProto: &sppb.KeyRange{ - &sppb.KeyRange_StartClosed{listValueProto(floatProto(1.5), floatProto(2.1), floatProto(0.2))}, - &sppb.KeyRange_EndOpen{listValueProto(floatProto(1.9), floatProto(0.7))}, + StartKeyType: &sppb.KeyRange_StartClosed{StartClosed: listValueProto(floatProto(1.5), floatProto(2.1), floatProto(0.2))}, + EndKeyType: &sppb.KeyRange_EndOpen{EndOpen: listValueProto(floatProto(1.9), floatProto(0.7))}, }, wantStr: "[(1.5,2.1,0.2),(1.9,0.7))", }, { kr: KeyRange{Key{NullInt64{1, true}}, Key{10}, ClosedClosed}, wantProto: &sppb.KeyRange{ - &sppb.KeyRange_StartClosed{listValueProto(stringProto("1"))}, - &sppb.KeyRange_EndClosed{listValueProto(stringProto("10"))}, + StartKeyType: &sppb.KeyRange_StartClosed{StartClosed: listValueProto(stringProto("1"))}, + EndKeyType: &sppb.KeyRange_EndClosed{EndClosed: listValueProto(stringProto("10"))}, }, wantStr: "[(1),(10)]", }, @@ -296,8 +296,8 @@ func TestKeySets(t *testing.T) { KeyRange{Key{1}, Key{2}, ClosedOpen}, &sppb.KeySet{Ranges: []*sppb.KeyRange{ &sppb.KeyRange{ - &sppb.KeyRange_StartClosed{listValueProto(int1)}, - &sppb.KeyRange_EndOpen{listValueProto(int2)}, + StartKeyType: &sppb.KeyRange_StartClosed{StartClosed: listValueProto(int1)}, + EndKeyType: &sppb.KeyRange_EndOpen{EndOpen: listValueProto(int2)}, }, }}, }, @@ -305,8 +305,8 @@ func TestKeySets(t *testing.T) { Key{2}.AsPrefix(), &sppb.KeySet{Ranges: []*sppb.KeyRange{ &sppb.KeyRange{ - &sppb.KeyRange_StartClosed{listValueProto(int2)}, - &sppb.KeyRange_EndClosed{listValueProto(int2)}, + StartKeyType: &sppb.KeyRange_StartClosed{StartClosed: listValueProto(int2)}, + EndKeyType: &sppb.KeyRange_EndClosed{EndClosed: listValueProto(int2)}, }, }}, }, @@ -318,12 +318,12 @@ func TestKeySets(t *testing.T) { &sppb.KeySet{ Ranges: []*sppb.KeyRange{ &sppb.KeyRange{ - &sppb.KeyRange_StartClosed{listValueProto(int1)}, - &sppb.KeyRange_EndClosed{listValueProto(int2)}, + StartKeyType: &sppb.KeyRange_StartClosed{StartClosed: listValueProto(int1)}, + EndKeyType: &sppb.KeyRange_EndClosed{EndClosed: listValueProto(int2)}, }, &sppb.KeyRange{ - &sppb.KeyRange_StartOpen{listValueProto(int3)}, - &sppb.KeyRange_EndClosed{listValueProto(int4)}, + StartKeyType: &sppb.KeyRange_StartOpen{StartOpen: listValueProto(int3)}, + EndKeyType: &sppb.KeyRange_EndClosed{EndClosed: listValueProto(int4)}, }, }, }, @@ -342,12 +342,12 @@ func TestKeySets(t *testing.T) { }, Ranges: []*sppb.KeyRange{ &sppb.KeyRange{ - &sppb.KeyRange_StartClosed{listValueProto(int2)}, - &sppb.KeyRange_EndClosed{listValueProto(int3)}, + StartKeyType: &sppb.KeyRange_StartClosed{StartClosed: listValueProto(int2)}, + EndKeyType: &sppb.KeyRange_EndClosed{EndClosed: listValueProto(int3)}, }, &sppb.KeyRange{ - &sppb.KeyRange_StartOpen{listValueProto(int4)}, - &sppb.KeyRange_EndClosed{listValueProto(intProto(5))}, + StartKeyType: &sppb.KeyRange_StartOpen{StartOpen: listValueProto(int4)}, + EndKeyType: &sppb.KeyRange_EndClosed{EndClosed: listValueProto(intProto(5))}, }, }, }, diff --git a/vendor/cloud.google.com/go/spanner/protoutils.go b/vendor/cloud.google.com/go/spanner/protoutils.go index df12432d5..a6fcdd701 100644 --- a/vendor/cloud.google.com/go/spanner/protoutils.go +++ b/vendor/cloud.google.com/go/spanner/protoutils.go @@ -101,7 +101,7 @@ func listType(t *sppb.Type) *sppb.Type { } func mkField(n string, t *sppb.Type) *sppb.StructType_Field { - return &sppb.StructType_Field{n, t} + return &sppb.StructType_Field{Name: n, Type: t} } func structType(fields ...*sppb.StructType_Field) *sppb.Type { diff --git a/vendor/cloud.google.com/go/spanner/row.go b/vendor/cloud.google.com/go/spanner/row.go index 62f84397a..200fda55a 100644 --- a/vendor/cloud.google.com/go/spanner/row.go +++ b/vendor/cloud.google.com/go/spanner/row.go @@ -50,19 +50,19 @@ import ( // Supported types and their corresponding Cloud Spanner column type(s) are: // // *string(not NULL), *NullString - STRING -// *[]NullString - STRING ARRAY +// *[]string, *[]NullString - STRING ARRAY // *[]byte - BYTES // *[][]byte - BYTES ARRAY // *int64(not NULL), *NullInt64 - INT64 -// *[]NullInt64 - INT64 ARRAY +// *[]int64, *[]NullInt64 - INT64 ARRAY // *bool(not NULL), *NullBool - BOOL -// *[]NullBool - BOOL ARRAY +// *[]bool, *[]NullBool - BOOL ARRAY // *float64(not NULL), *NullFloat64 - FLOAT64 -// *[]NullFloat64 - FLOAT64 ARRAY +// *[]float64, *[]NullFloat64 - FLOAT64 ARRAY // *time.Time(not NULL), *NullTime - TIMESTAMP -// *[]NullTime - TIMESTAMP ARRAY +// *[]time.Time, *[]NullTime - TIMESTAMP ARRAY // *Date(not NULL), *NullDate - DATE -// *[]NullDate - DATE ARRAY +// *[]civil.Date, *[]NullDate - DATE ARRAY // *[]*some_go_struct, *[]NullRow - STRUCT ARRAY // *GenericColumnValue - any Cloud Spanner type // diff --git a/vendor/cloud.google.com/go/spanner/session_test.go b/vendor/cloud.google.com/go/spanner/session_test.go index 9a8aca4be..3fc6fcc8c 100644 --- a/vendor/cloud.google.com/go/spanner/session_test.go +++ b/vendor/cloud.google.com/go/spanner/session_test.go @@ -806,6 +806,7 @@ func TestStressSessionPool(t *testing.T) { } idleSessions[s.getID()] = true } + sp.mu.Lock() if int(sp.numOpened) != len(idleSessions) { t.Errorf("%v: number of opened sessions (%v) != number of idle sessions (%v)", ti, sp.numOpened, len(idleSessions)) } @@ -819,6 +820,8 @@ func TestStressSessionPool(t *testing.T) { } hcSessions[s.getID()] = true } + sp.mu.Unlock() + // Verify that idleSessions == hcSessions == mockSessions. if !reflect.DeepEqual(idleSessions, hcSessions) { t.Errorf("%v: sessions in idle list (%v) != sessions in healthcheck queue (%v)", ti, idleSessions, hcSessions) @@ -853,9 +856,11 @@ func TestMaintainer(t *testing.T) { defer cancel() <-time.After(sampleInterval * 1) + sp.mu.Lock() if sp.numOpened != 5 { t.Errorf("Replenish. Expect %d open, got %d", sp.MinOpened, sp.numOpened) } + sp.mu.Unlock() // To save test time, we are not creating many sessions, because the time to create sessions will have impact on the decision on sessionsToKeep. We also parallelize the take and recycle process. shs := make([]*sessionHandle, 10) diff --git a/vendor/cloud.google.com/go/spanner/spanner_test.go b/vendor/cloud.google.com/go/spanner/spanner_test.go index 7643cd4d1..0b14696a7 100644 --- a/vendor/cloud.google.com/go/spanner/spanner_test.go +++ b/vendor/cloud.google.com/go/spanner/spanner_test.go @@ -18,8 +18,11 @@ package spanner import ( "errors" + "flag" "fmt" + "log" "math" + "os" "reflect" "strings" "sync" @@ -44,14 +47,8 @@ var ( // testInstanceID specifies the Cloud Spanner instance used for testing. testInstanceID = "go-integration-test" - // client is a spanner.Client. - client *Client // admin is a spanner.DatabaseAdminClient. admin *database.DatabaseAdminClient - // db is the path of the testing database. - db string - // dbName is the short name of the testing database. - dbName string ) var ( @@ -100,29 +97,53 @@ var ( type testTableRow struct{ Key, StringValue string } -// prepare initializes Cloud Spanner testing DB and clients. -func prepare(ctx context.Context, t *testing.T, statements []string) error { +func TestMain(m *testing.M) { + initIntegrationTest() + os.Exit(m.Run()) +} + +func initIntegrationTest() { + flag.Parse() // needed for testing.Short() if testing.Short() { - t.Skip("Integration tests skipped in short mode") + return } if testProjectID == "" { - t.Skip("Integration tests skipped: GCLOUD_TESTS_GOLANG_PROJECT_ID is missing") + log.Print("Integration tests skipped: GCLOUD_TESTS_GOLANG_PROJECT_ID is missing") + return } + ctx := context.Background() ts := testutil.TokenSource(ctx, AdminScope, Scope) if ts == nil { - t.Skip("Integration test skipped: cannot get service account credential from environment variable %v", "GCLOUD_TESTS_GOLANG_KEY") + log.Print("Integration test skipped: cannot get service account credential from environment variable %v", "GCLOUD_TESTS_GOLANG_KEY") + return } var err error // Create Admin client and Data client. // TODO: Remove the EndPoint option once this is the default. admin, err = database.NewDatabaseAdminClient(ctx, option.WithTokenSource(ts), option.WithEndpoint("spanner.googleapis.com:443")) if err != nil { - t.Errorf("cannot create admin client: %v", err) - return err + log.Fatalf("cannot create admin client: %v", err) } - // Construct test DB name. - dbName = fmt.Sprintf("gotest_%v", time.Now().UnixNano()) - db = fmt.Sprintf("projects/%v/instances/%v/databases/%v", testProjectID, testInstanceID, dbName) +} + +var ( + mu sync.Mutex + count int + now = time.Now() +) + +// prepare initializes Cloud Spanner testing DB and clients. +func prepare(ctx context.Context, t *testing.T, statements []string) (client *Client, dbPath string, tearDown func()) { + if admin == nil { + t.Skip("Integration tests skipped") + } + // Construct a unique test DB name. + mu.Lock() + dbName := fmt.Sprintf("gotest_%d_%d", now.UnixNano(), count) + count++ + mu.Unlock() + + dbPath = fmt.Sprintf("projects/%v/instances/%v/databases/%v", testProjectID, testInstanceID, dbName) // Create database and tables. op, err := admin.CreateDatabase(ctx, &adminpb.CreateDatabaseRequest{ Parent: fmt.Sprintf("projects/%v/instances/%v", testProjectID, testInstanceID), @@ -130,53 +151,33 @@ func prepare(ctx context.Context, t *testing.T, statements []string) error { ExtraStatements: statements, }) if err != nil { - t.Errorf("cannot create testing DB %v: %v", db, err) - return err + t.Fatalf("cannot create testing DB %v: %v", dbPath, err) } if _, err := op.Wait(ctx); err != nil { - t.Errorf("cannot create testing DB %v: %v", db, err) - return err + t.Fatalf("cannot create testing DB %v: %v", dbPath, err) } - client, err = NewClientWithConfig(ctx, db, ClientConfig{ - SessionPoolConfig: SessionPoolConfig{ - WriteSessions: 0.2, - }, - }, option.WithTokenSource(ts)) + client, err = NewClientWithConfig(ctx, dbPath, ClientConfig{ + SessionPoolConfig: SessionPoolConfig{WriteSessions: 0.2}, + }, option.WithTokenSource(testutil.TokenSource(ctx, Scope))) if err != nil { - t.Errorf("cannot create data client on DB %v: %v", db, err) - return err + t.Fatalf("cannot create data client on DB %v: %v", dbPath, err) } - return nil -} - -// tearDown tears down the testing environment created by prepare(). -func tearDown(ctx context.Context, t *testing.T) { - if admin != nil { - if err := admin.DropDatabase(ctx, &adminpb.DropDatabaseRequest{db}); err != nil { - t.Logf("failed to drop testing database: %v, might need a manual removal", db) + return client, dbPath, func() { + if err := admin.DropDatabase(ctx, &adminpb.DropDatabaseRequest{dbPath}); err != nil { + t.Logf("failed to drop testing database: %v, might need a manual removal", dbPath) } - admin.Close() - } - if client != nil { client.Close() } - admin = nil - client = nil - db = "" } // Test SingleUse transaction. func TestSingleUse(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second) + t.Parallel() + ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second) defer cancel() // Set up testing environment. - if err := prepare(ctx, t, singerDBStatements); err != nil { - // If prepare() fails, tear down whatever that's already up. - tearDown(ctx, t) - t.Fatalf("cannot set up testing environment: %v", err) - } - // After all tests, tear down testing environment. - defer tearDown(ctx, t) + client, _, tearDown := prepare(ctx, t, singerDBStatements) + defer tearDown() writes := []struct { row []interface{} @@ -369,16 +370,12 @@ func TestSingleUse(t *testing.T) { // Test ReadOnlyTransaction. The testsuite is mostly like SingleUse, except it // also tests for a single timestamp across multiple reads. func TestReadOnlyTransaction(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second) + t.Parallel() + ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second) defer cancel() // Set up testing environment. - if err := prepare(ctx, t, singerDBStatements); err != nil { - // If prepare() fails, tear down whatever that's already up. - tearDown(ctx, t) - t.Fatalf("cannot set up testing environment: %v", err) - } - // After all tests, tear down testing environment. - defer tearDown(ctx, t) + client, _, tearDown := prepare(ctx, t, singerDBStatements) + defer tearDown() writes := []struct { row []interface{} @@ -557,13 +554,11 @@ func TestReadOnlyTransaction(t *testing.T) { // Test ReadOnlyTransaction with different timestamp bound when there's an update at the same time. func TestUpdateDuringRead(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second) + t.Parallel() + ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second) defer cancel() - if err := prepare(ctx, t, singerDBStatements); err != nil { - tearDown(ctx, t) - t.Fatalf("cannot set up testing environment: %v", err) - } - defer tearDown(ctx, t) + client, _, tearDown := prepare(ctx, t, singerDBStatements) + defer tearDown() for i, tb := range []TimestampBound{ StrongRead(), @@ -590,14 +585,12 @@ func TestUpdateDuringRead(t *testing.T) { // Test ReadWriteTransaction. func TestReadWriteTransaction(t *testing.T) { + t.Parallel() // Give a longer deadline because of transaction backoffs. ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second) defer cancel() - if err := prepare(ctx, t, singerDBStatements); err != nil { - tearDown(ctx, t) - t.Fatalf("cannot set up testing environment: %v", err) - } - defer tearDown(ctx, t) + client, _, tearDown := prepare(ctx, t, singerDBStatements) + defer tearDown() // Set up two accounts accounts := []*Mutation{ @@ -690,16 +683,12 @@ const ( var testTableColumns = []string{"Key", "StringValue"} func TestReads(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second) + t.Parallel() + ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second) defer cancel() // Set up testing environment. - if err := prepare(ctx, t, readDBStatements); err != nil { - // If prepare() fails, tear down whatever that's already up. - tearDown(ctx, t) - t.Fatalf("cannot set up testing environment: %v", err) - } - // After all tests, tear down testing environment. - defer tearDown(ctx, t) + client, _, tearDown := prepare(ctx, t, readDBStatements) + defer tearDown() // Includes k0..k14. Strings sort lexically, eg "k1" < "k10" < "k2". var ms []*Mutation @@ -754,11 +743,11 @@ func TestReads(t *testing.T) { // No index point read not found, because Go does not have ReadRowUsingIndex. - rangeReads(ctx, t) - indexRangeReads(ctx, t) + rangeReads(ctx, t, client) + indexRangeReads(ctx, t, client) } -func rangeReads(ctx context.Context, t *testing.T) { +func rangeReads(ctx context.Context, t *testing.T, client *Client) { checkRange := func(ks KeySet, wantNums ...int) { if msg, ok := compareRows(client.Single().Read(ctx, testTable, ks, testTableColumns), wantNums); !ok { t.Errorf("key set %+v: %s", ks, msg) @@ -791,7 +780,7 @@ func rangeReads(ctx context.Context, t *testing.T) { checkRange(AllKeys(), 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14) } -func indexRangeReads(ctx context.Context, t *testing.T) { +func indexRangeReads(ctx context.Context, t *testing.T, client *Client) { checkRange := func(ks KeySet, wantNums ...int) { if msg, ok := compareRows(client.Single().ReadUsingIndex(ctx, testTable, testTableIndex, ks, testTableColumns), wantNums); !ok { @@ -850,18 +839,14 @@ func compareRows(iter *RowIterator, wantNums []int) (string, bool) { } func TestEarlyTimestamp(t *testing.T) { + t.Parallel() // Test that we can get the timestamp from a read-only transaction as // soon as we have read at least one row. - ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second) defer cancel() // Set up testing environment. - if err := prepare(ctx, t, readDBStatements); err != nil { - // If prepare() fails, tear down whatever that's already up. - tearDown(ctx, t) - t.Fatalf("cannot set up testing environment: %v", err) - } - // After all tests, tear down testing environment. - defer tearDown(ctx, t) + client, _, tearDown := prepare(ctx, t, readDBStatements) + defer tearDown() var ms []*Mutation for i := 0; i < 3; i++ { @@ -901,13 +886,11 @@ func TestEarlyTimestamp(t *testing.T) { } func TestNestedTransaction(t *testing.T) { + t.Parallel() // You cannot use a transaction from inside a read-write transaction. ctx := context.Background() - if err := prepare(ctx, t, singerDBStatements); err != nil { - tearDown(ctx, t) - t.Fatalf("cannot set up testing environment: %v", err) - } - defer tearDown(ctx, t) + client, _, tearDown := prepare(ctx, t, singerDBStatements) + defer tearDown() client.ReadWriteTransaction(ctx, func(ctx context.Context, tx *ReadWriteTransaction) error { _, err := client.ReadWriteTransaction(ctx, func(context.Context, *ReadWriteTransaction) error { return nil }) @@ -930,17 +913,15 @@ func TestNestedTransaction(t *testing.T) { // Test client recovery on database recreation. func TestDbRemovalRecovery(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second) + t.Parallel() + ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second) defer cancel() - if err := prepare(ctx, t, singerDBStatements); err != nil { - tearDown(ctx, t) - t.Fatalf("cannot set up testing environment: %v", err) - } - defer tearDown(ctx, t) + client, dbPath, tearDown := prepare(ctx, t, singerDBStatements) + defer tearDown() // Drop the testing database. - if err := admin.DropDatabase(ctx, &adminpb.DropDatabaseRequest{db}); err != nil { - t.Fatalf("failed to drop testing database %v: %v", db, err) + if err := admin.DropDatabase(ctx, &adminpb.DropDatabaseRequest{dbPath}); err != nil { + t.Fatalf("failed to drop testing database %v: %v", dbPath, err) } // Now, send the query. @@ -951,6 +932,7 @@ func TestDbRemovalRecovery(t *testing.T) { } // Recreate database and table. + dbName := dbPath[strings.LastIndex(dbPath, "/")+1:] op, err := admin.CreateDatabase(ctx, &adminpb.CreateDatabaseRequest{ Parent: fmt.Sprintf("projects/%v/instances/%v", testProjectID, testInstanceID), CreateStatement: "CREATE DATABASE " + dbName, @@ -964,7 +946,7 @@ func TestDbRemovalRecovery(t *testing.T) { }, }) if _, err := op.Wait(ctx); err != nil { - t.Errorf("cannot recreate testing DB %v: %v", db, err) + t.Errorf("cannot recreate testing DB %v: %v", dbPath, err) } // Now, send the query again. @@ -972,19 +954,17 @@ func TestDbRemovalRecovery(t *testing.T) { defer iter.Stop() _, err = iter.Next() if err != nil && err != iterator.Done { - t.Fatalf("failed to send query to database %v: %v", db, err) + t.Fatalf("failed to send query to database %v: %v", dbPath, err) } } // Test encoding/decoding non-struct Cloud Spanner types. func TestBasicTypes(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) + t.Parallel() + ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second) defer cancel() - if err := prepare(ctx, t, singerDBStatements); err != nil { - tearDown(ctx, t) - t.Fatalf("cannot set up testing environment: %v", err) - } - defer tearDown(ctx, t) + client, _, tearDown := prepare(ctx, t, singerDBStatements) + defer tearDown() t1, _ := time.Parse(time.RFC3339Nano, "2016-11-15T15:04:05.999999999Z") // Boundaries t2, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00.000000000Z") @@ -1121,13 +1101,11 @@ func TestBasicTypes(t *testing.T) { // Test decoding Cloud Spanner STRUCT type. func TestStructTypes(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second) + t.Parallel() + ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second) defer cancel() - if err := prepare(ctx, t, singerDBStatements); err != nil { - tearDown(ctx, t) - t.Fatalf("cannot set up testing environment: %v", err) - } - defer tearDown(ctx, t) + client, _, tearDown := prepare(ctx, t, singerDBStatements) + defer tearDown() tests := []struct { q Statement @@ -1210,12 +1188,10 @@ func TestStructTypes(t *testing.T) { // Test queries of the form "SELECT expr". func TestQueryExpressions(t *testing.T) { + t.Parallel() ctx := context.Background() - if err := prepare(ctx, t, nil); err != nil { - tearDown(ctx, t) - t.Fatalf("cannot set up testing environment: %v", err) - } - defer tearDown(ctx, t) + client, _, tearDown := prepare(ctx, t, nil) + defer tearDown() newRow := func(vals []interface{}) *Row { row, err := NewRow(make([]string, len(vals)), vals) @@ -1274,6 +1250,7 @@ func isNaN(x interface{}) bool { } func TestInvalidDatabase(t *testing.T) { + t.Parallel() if testing.Short() { t.Skip("Integration tests skipped in short mode") } @@ -1298,12 +1275,10 @@ func TestInvalidDatabase(t *testing.T) { } func TestReadErrors(t *testing.T) { + t.Parallel() ctx := context.Background() - if err := prepare(ctx, t, readDBStatements); err != nil { - tearDown(ctx, t) - t.Fatalf("cannot set up testing environment: %v", err) - } - defer tearDown(ctx, t) + client, _, tearDown := prepare(ctx, t, readDBStatements) + defer tearDown() // Read over invalid table fails _, err := client.Single().ReadRow(ctx, "badTable", Key{1}, []string{"StringValue"}) @@ -1402,13 +1377,11 @@ func readAllTestTable(iter *RowIterator) ([]testTableRow, error) { // Test TransactionRunner. Test that transactions are aborted and retried as expected. func TestTransactionRunner(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second) + t.Parallel() + ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second) defer cancel() - if err := prepare(ctx, t, singerDBStatements); err != nil { - tearDown(ctx, t) - t.Fatalf("cannot set up testing environment: %v", err) - } - defer tearDown(ctx, t) + client, _, tearDown := prepare(ctx, t, singerDBStatements) + defer tearDown() // Test 1: User error should abort the transaction. _, _ = client.ReadWriteTransaction(ctx, func(ctx context.Context, tx *ReadWriteTransaction) error { diff --git a/vendor/cloud.google.com/go/spanner/value.go b/vendor/cloud.google.com/go/spanner/value.go index 0fa724d0c..86d9f71b2 100644 --- a/vendor/cloud.google.com/go/spanner/value.go +++ b/vendor/cloud.google.com/go/spanner/value.go @@ -274,6 +274,26 @@ func decodeValue(v *proto3.Value, t *sppb.Type, ptr interface{}) error { p.Valid = true p.StringVal = x case *[]NullString: + if p == nil { + return errNilDst(p) + } + if acode != sppb.TypeCode_STRING { + return errTypeMismatch(code, acode, ptr) + } + if isNull { + *p = nil + break + } + x, err := getListValue(v) + if err != nil { + return err + } + y, err := decodeNullStringArray(x) + if err != nil { + return err + } + *p = y + case *[]string: if p == nil { return errNilDst(p) } @@ -388,7 +408,27 @@ func decodeValue(v *proto3.Value, t *sppb.Type, ptr interface{}) error { if err != nil { return err } - y, err := decodeIntArray(x) + y, err := decodeNullInt64Array(x) + if err != nil { + return err + } + *p = y + case *[]int64: + if p == nil { + return errNilDst(p) + } + if acode != sppb.TypeCode_INT64 { + return errTypeMismatch(code, acode, ptr) + } + if isNull { + *p = nil + break + } + x, err := getListValue(v) + if err != nil { + return err + } + y, err := decodeInt64Array(x) if err != nil { return err } @@ -426,6 +466,26 @@ func decodeValue(v *proto3.Value, t *sppb.Type, ptr interface{}) error { p.Valid = true p.Bool = x case *[]NullBool: + if p == nil { + return errNilDst(p) + } + if acode != sppb.TypeCode_BOOL { + return errTypeMismatch(code, acode, ptr) + } + if isNull { + *p = nil + break + } + x, err := getListValue(v) + if err != nil { + return err + } + y, err := decodeNullBoolArray(x) + if err != nil { + return err + } + *p = y + case *[]bool: if p == nil { return errNilDst(p) } @@ -478,6 +538,26 @@ func decodeValue(v *proto3.Value, t *sppb.Type, ptr interface{}) error { p.Valid = true p.Float64 = x case *[]NullFloat64: + if p == nil { + return errNilDst(p) + } + if acode != sppb.TypeCode_FLOAT64 { + return errTypeMismatch(code, acode, ptr) + } + if isNull { + *p = nil + break + } + x, err := getListValue(v) + if err != nil { + return err + } + y, err := decodeNullFloat64Array(x) + if err != nil { + return err + } + *p = y + case *[]float64: if p == nil { return errNilDst(p) } @@ -513,6 +593,26 @@ func decodeValue(v *proto3.Value, t *sppb.Type, ptr interface{}) error { return err } case *[]NullTime: + if p == nil { + return errNilDst(p) + } + if acode != sppb.TypeCode_TIMESTAMP { + return errTypeMismatch(code, acode, ptr) + } + if isNull { + *p = nil + break + } + x, err := getListValue(v) + if err != nil { + return err + } + y, err := decodeNullTimeArray(x) + if err != nil { + return err + } + *p = y + case *[]time.Time: if p == nil { return errNilDst(p) } @@ -573,6 +673,26 @@ func decodeValue(v *proto3.Value, t *sppb.Type, ptr interface{}) error { p.Valid = true p.Date = y case *[]NullDate: + if p == nil { + return errNilDst(p) + } + if acode != sppb.TypeCode_DATE { + return errTypeMismatch(code, acode, ptr) + } + if isNull { + *p = nil + break + } + x, err := getListValue(v) + if err != nil { + return err + } + y, err := decodeNullDateArray(x) + if err != nil { + return err + } + *p = y + case *[]civil.Date: if p == nil { return errNilDst(p) } @@ -732,8 +852,8 @@ func errDecodeArrayElement(i int, v proto.Message, sqlType string, err error) er return se } -// decodeStringArray decodes proto3.ListValue pb into a NullString slice. -func decodeStringArray(pb *proto3.ListValue) ([]NullString, error) { +// decodeNullStringArray decodes proto3.ListValue pb into a NullString slice. +func decodeNullStringArray(pb *proto3.ListValue) ([]NullString, error) { if pb == nil { return nil, errNilListValue("STRING") } @@ -746,8 +866,23 @@ func decodeStringArray(pb *proto3.ListValue) ([]NullString, error) { return a, nil } -// decodeIntArray decodes proto3.ListValue pb into a NullInt64 slice. -func decodeIntArray(pb *proto3.ListValue) ([]NullInt64, error) { +// decodeStringArray decodes proto3.ListValue pb into a string slice. +func decodeStringArray(pb *proto3.ListValue) ([]string, error) { + if pb == nil { + return nil, errNilListValue("STRING") + } + a := make([]string, len(pb.Values)) + st := stringType() + for i, v := range pb.Values { + if err := decodeValue(v, st, &a[i]); err != nil { + return nil, errDecodeArrayElement(i, v, "STRING", err) + } + } + return a, nil +} + +// decodeNullInt64Array decodes proto3.ListValue pb into a NullInt64 slice. +func decodeNullInt64Array(pb *proto3.ListValue) ([]NullInt64, error) { if pb == nil { return nil, errNilListValue("INT64") } @@ -760,8 +895,22 @@ func decodeIntArray(pb *proto3.ListValue) ([]NullInt64, error) { return a, nil } -// decodeBoolArray decodes proto3.ListValue pb into a NullBool slice. -func decodeBoolArray(pb *proto3.ListValue) ([]NullBool, error) { +// decodeInt64Array decodes proto3.ListValue pb into a int64 slice. +func decodeInt64Array(pb *proto3.ListValue) ([]int64, error) { + if pb == nil { + return nil, errNilListValue("INT64") + } + a := make([]int64, len(pb.Values)) + for i, v := range pb.Values { + if err := decodeValue(v, intType(), &a[i]); err != nil { + return nil, errDecodeArrayElement(i, v, "INT64", err) + } + } + return a, nil +} + +// decodeNullBoolArray decodes proto3.ListValue pb into a NullBool slice. +func decodeNullBoolArray(pb *proto3.ListValue) ([]NullBool, error) { if pb == nil { return nil, errNilListValue("BOOL") } @@ -774,8 +923,22 @@ func decodeBoolArray(pb *proto3.ListValue) ([]NullBool, error) { return a, nil } -// decodeFloat64Array decodes proto3.ListValue pb into a NullFloat64 slice. -func decodeFloat64Array(pb *proto3.ListValue) ([]NullFloat64, error) { +// decodeBoolArray decodes proto3.ListValue pb into a bool slice. +func decodeBoolArray(pb *proto3.ListValue) ([]bool, error) { + if pb == nil { + return nil, errNilListValue("BOOL") + } + a := make([]bool, len(pb.Values)) + for i, v := range pb.Values { + if err := decodeValue(v, boolType(), &a[i]); err != nil { + return nil, errDecodeArrayElement(i, v, "BOOL", err) + } + } + return a, nil +} + +// decodeNullFloat64Array decodes proto3.ListValue pb into a NullFloat64 slice. +func decodeNullFloat64Array(pb *proto3.ListValue) ([]NullFloat64, error) { if pb == nil { return nil, errNilListValue("FLOAT64") } @@ -788,6 +951,20 @@ func decodeFloat64Array(pb *proto3.ListValue) ([]NullFloat64, error) { return a, nil } +// decodeFloat64Array decodes proto3.ListValue pb into a float64 slice. +func decodeFloat64Array(pb *proto3.ListValue) ([]float64, error) { + if pb == nil { + return nil, errNilListValue("FLOAT64") + } + a := make([]float64, len(pb.Values)) + for i, v := range pb.Values { + if err := decodeValue(v, floatType(), &a[i]); err != nil { + return nil, errDecodeArrayElement(i, v, "FLOAT64", err) + } + } + return a, nil +} + // decodeByteArray decodes proto3.ListValue pb into a slice of byte slice. func decodeByteArray(pb *proto3.ListValue) ([][]byte, error) { if pb == nil { @@ -802,8 +979,8 @@ func decodeByteArray(pb *proto3.ListValue) ([][]byte, error) { return a, nil } -// decodeTimeArray decodes proto3.ListValue pb into a NullTime slice. -func decodeTimeArray(pb *proto3.ListValue) ([]NullTime, error) { +// decodeNullTimeArray decodes proto3.ListValue pb into a NullTime slice. +func decodeNullTimeArray(pb *proto3.ListValue) ([]NullTime, error) { if pb == nil { return nil, errNilListValue("TIMESTAMP") } @@ -816,8 +993,22 @@ func decodeTimeArray(pb *proto3.ListValue) ([]NullTime, error) { return a, nil } -// decodeDateArray decodes proto3.ListValue pb into a NullDate slice. -func decodeDateArray(pb *proto3.ListValue) ([]NullDate, error) { +// decodeTimeArray decodes proto3.ListValue pb into a time.Time slice. +func decodeTimeArray(pb *proto3.ListValue) ([]time.Time, error) { + if pb == nil { + return nil, errNilListValue("TIMESTAMP") + } + a := make([]time.Time, len(pb.Values)) + for i, v := range pb.Values { + if err := decodeValue(v, timeType(), &a[i]); err != nil { + return nil, errDecodeArrayElement(i, v, "TIMESTAMP", err) + } + } + return a, nil +} + +// decodeNullDateArray decodes proto3.ListValue pb into a NullDate slice. +func decodeNullDateArray(pb *proto3.ListValue) ([]NullDate, error) { if pb == nil { return nil, errNilListValue("DATE") } @@ -830,6 +1021,20 @@ func decodeDateArray(pb *proto3.ListValue) ([]NullDate, error) { return a, nil } +// decodeDateArray decodes proto3.ListValue pb into a civil.Date slice. +func decodeDateArray(pb *proto3.ListValue) ([]civil.Date, error) { + if pb == nil { + return nil, errNilListValue("DATE") + } + a := make([]civil.Date, len(pb.Values)) + for i, v := range pb.Values { + if err := decodeValue(v, dateType(), &a[i]); err != nil { + return nil, errDecodeArrayElement(i, v, "DATE", err) + } + } + return a, nil +} + func errNotStructElement(i int, v *proto3.Value) error { return errDecodeArrayElement(i, v, "STRUCT", spannerErrorf(codes.FailedPrecondition, "%v(type: %T) doesn't encode Cloud Spanner STRUCT", v, v)) diff --git a/vendor/cloud.google.com/go/spanner/value_benchmarks_test.go b/vendor/cloud.google.com/go/spanner/value_benchmarks_test.go new file mode 100644 index 000000000..0d95ab9de --- /dev/null +++ b/vendor/cloud.google.com/go/spanner/value_benchmarks_test.go @@ -0,0 +1,214 @@ +// 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. +// 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.7 + +package spanner + +import ( + "reflect" + "strconv" + "testing" + + "cloud.google.com/go/civil" + proto3 "github.com/golang/protobuf/ptypes/struct" + sppb "google.golang.org/genproto/googleapis/spanner/v1" +) + +func BenchmarkEncodeIntArray(b *testing.B) { + for _, s := range []struct { + name string + f func(a []int) (*proto3.Value, *sppb.Type, error) + }{ + {"Orig", encodeIntArrayOrig}, + {"Func", encodeIntArrayFunc}, + {"Reflect", encodeIntArrayReflect}, + } { + b.Run(s.name, func(b *testing.B) { + for _, size := range []int{1, 10, 100, 1000} { + a := make([]int, size) + b.Run(strconv.Itoa(size), func(b *testing.B) { + for i := 0; i < b.N; i++ { + s.f(a) + } + }) + } + }) + } +} + +func encodeIntArrayOrig(a []int) (*proto3.Value, *sppb.Type, error) { + vs := make([]*proto3.Value, len(a)) + var err error + for i := range a { + vs[i], _, err = encodeValue(a[i]) + if err != nil { + return nil, nil, err + } + } + return listProto(vs...), listType(intType()), nil +} + +func encodeIntArrayFunc(a []int) (*proto3.Value, *sppb.Type, error) { + v, err := encodeArray(len(a), func(i int) interface{} { return a[i] }) + if err != nil { + return nil, nil, err + } + return v, listType(intType()), nil +} + +func encodeIntArrayReflect(a []int) (*proto3.Value, *sppb.Type, error) { + v, err := encodeArrayReflect(a) + if err != nil { + return nil, nil, err + } + return v, listType(intType()), nil +} + +func encodeArrayReflect(a interface{}) (*proto3.Value, error) { + va := reflect.ValueOf(a) + len := va.Len() + vs := make([]*proto3.Value, len) + var err error + for i := 0; i < len; i++ { + vs[i], _, err = encodeValue(va.Index(i).Interface()) + if err != nil { + return nil, err + } + } + return listProto(vs...), nil +} + +func BenchmarkDecodeGeneric(b *testing.B) { + v := stringProto("test") + t := stringType() + var g GenericColumnValue + b.ResetTimer() + for i := 0; i < b.N; i++ { + decodeValue(v, t, &g) + } +} + +func BenchmarkDecodeArray(b *testing.B) { + for _, size := range []int{1, 10, 100, 1000} { + vals := make([]*proto3.Value, size) + for i := 0; i < size; i++ { + vals[i] = dateProto(d1) + } + lv := &proto3.ListValue{Values: vals} + b.Run(strconv.Itoa(size), func(b *testing.B) { + for _, s := range []struct { + name string + decode func(*proto3.ListValue) + }{ + {"DateDirect", decodeArray_Date_direct}, + {"DateFunc", decodeArray_Date_func}, + {"DateReflect", decodeArray_Date_reflect}, + {"StringDecodeStringArray", decodeStringArrayWrap}, + {"StringDirect", decodeArray_String_direct}, + {"StringFunc", decodeArray_String_func}, + {"StringReflect", decodeArray_String_reflect}, + } { + b.Run(s.name, func(b *testing.B) { + for i := 0; i < b.N; i++ { + s.decode(lv) + } + }) + } + }) + + } +} + +func decodeArray_Date_direct(pb *proto3.ListValue) { + a := make([]civil.Date, len(pb.Values)) + t := dateType() + for i, v := range pb.Values { + if err := decodeValue(v, t, &a[i]); err != nil { + panic(err) + } + } +} + +func decodeArray_Date_func(pb *proto3.ListValue) { + a := make([]civil.Date, len(pb.Values)) + if err := decodeArray_func(pb, "DATE", dateType(), func(i int) interface{} { return &a[i] }); err != nil { + panic(err) + } +} + +func decodeArray_Date_reflect(pb *proto3.ListValue) { + var a []civil.Date + if err := decodeArray_reflect(pb, "DATE", dateType(), &a); err != nil { + panic(err) + } +} + +func decodeStringArrayWrap(pb *proto3.ListValue) { + if _, err := decodeStringArray(pb); err != nil { + panic(err) + } +} + +func decodeArray_String_direct(pb *proto3.ListValue) { + a := make([]string, len(pb.Values)) + t := stringType() + for i, v := range pb.Values { + if err := decodeValue(v, t, &a[i]); err != nil { + panic(err) + } + } +} + +func decodeArray_String_func(pb *proto3.ListValue) { + + a := make([]string, len(pb.Values)) + if err := decodeArray_func(pb, "STRING", stringType(), func(i int) interface{} { return &a[i] }); err != nil { + panic(err) + } +} + +func decodeArray_String_reflect(pb *proto3.ListValue) { + var a []string + if err := decodeArray_reflect(pb, "STRING", stringType(), &a); err != nil { + panic(err) + } +} + +func decodeArray_func(pb *proto3.ListValue, name string, typ *sppb.Type, elptr func(int) interface{}) error { + if pb == nil { + return errNilListValue(name) + } + for i, v := range pb.Values { + if err := decodeValue(v, typ, elptr(i)); err != nil { + return errDecodeArrayElement(i, v, name, err) + } + } + return nil +} + +func decodeArray_reflect(pb *proto3.ListValue, name string, typ *sppb.Type, aptr interface{}) error { + if pb == nil { + return errNilListValue(name) + } + av := reflect.ValueOf(aptr).Elem() + av.Set(reflect.MakeSlice(av.Type(), len(pb.Values), len(pb.Values))) + for i, v := range pb.Values { + if err := decodeValue(v, typ, av.Index(i).Addr().Interface()); err != nil { + av.Set(reflect.Zero(av.Type())) // reset slice to nil + return errDecodeArrayElement(i, v, name, err) + } + } + return nil +} diff --git a/vendor/cloud.google.com/go/spanner/value_test.go b/vendor/cloud.google.com/go/spanner/value_test.go index f1bd018b9..7fca3eb3f 100644 --- a/vendor/cloud.google.com/go/spanner/value_test.go +++ b/vendor/cloud.google.com/go/spanner/value_test.go @@ -159,7 +159,7 @@ func TestDecodeValue(t *testing.T) { {nullProto(), stringType(), "abc", true}, {stringProto("abc"), stringType(), NullString{"abc", true}, false}, {nullProto(), stringType(), NullString{}, false}, - // STRING ARRAY + // STRING ARRAY with []NullString { listProto(stringProto("abc"), nullProto(), stringProto("bcd")), listType(stringType()), @@ -167,6 +167,13 @@ func TestDecodeValue(t *testing.T) { false, }, {nullProto(), listType(stringType()), []NullString(nil), false}, + // STRING ARRAY with []string + { + listProto(stringProto("abc"), stringProto("bcd")), + listType(stringType()), + []string{"abc", "bcd"}, + false, + }, // BYTES {bytesProto([]byte("ab")), bytesType(), []byte("ab"), false}, {nullProto(), bytesType(), []byte(nil), false}, @@ -178,23 +185,27 @@ func TestDecodeValue(t *testing.T) { {nullProto(), intType(), int64(0), true}, {intProto(15), intType(), NullInt64{15, true}, false}, {nullProto(), intType(), NullInt64{}, false}, - // INT64 ARRAY + // INT64 ARRAY with []NullInt64 {listProto(intProto(91), nullProto(), intProto(87)), listType(intType()), []NullInt64{{91, true}, {}, {87, true}}, false}, {nullProto(), listType(intType()), []NullInt64(nil), false}, + // INT64 ARRAY with []int64 + {listProto(intProto(91), intProto(87)), listType(intType()), []int64{91, 87}, false}, // BOOL {boolProto(true), boolType(), true, false}, {nullProto(), boolType(), true, true}, {boolProto(true), boolType(), NullBool{true, true}, false}, {nullProto(), boolType(), NullBool{}, false}, - // BOOL ARRAY + // BOOL ARRAY with []NullBool {listProto(boolProto(true), boolProto(false), nullProto()), listType(boolType()), []NullBool{{true, true}, {false, true}, {}}, false}, {nullProto(), listType(boolType()), []NullBool(nil), false}, + // BOOL ARRAY with []bool + {listProto(boolProto(true), boolProto(false)), listType(boolType()), []bool{true, false}, false}, // FLOAT64 {floatProto(3.14), floatType(), 3.14, false}, {nullProto(), floatType(), 0.00, true}, {floatProto(3.14), floatType(), NullFloat64{3.14, true}, false}, {nullProto(), floatType(), NullFloat64{}, false}, - // FLOAT64 ARRAY + // FLOAT64 ARRAY with []NullFloat64 { listProto(floatProto(math.Inf(1)), floatProto(math.Inf(-1)), nullProto(), floatProto(3.1)), listType(floatType()), @@ -202,20 +213,31 @@ func TestDecodeValue(t *testing.T) { false, }, {nullProto(), listType(floatType()), []NullFloat64(nil), false}, + // FLOAT64 ARRAY with []float64 + { + listProto(floatProto(math.Inf(1)), floatProto(math.Inf(-1)), floatProto(3.1)), + listType(floatType()), + []float64{math.Inf(1), math.Inf(-1), 3.1}, + false, + }, // TIMESTAMP {timeProto(t1), timeType(), t1, false}, {timeProto(t1), timeType(), NullTime{t1, true}, false}, {nullProto(), timeType(), NullTime{}, false}, - // TIMESTAMP ARRAY + // TIMESTAMP ARRAY with []NullTime {listProto(timeProto(t1), timeProto(t2), timeProto(t3), nullProto()), listType(timeType()), []NullTime{{t1, true}, {t2, true}, {t3, true}, {}}, false}, {nullProto(), listType(timeType()), []NullTime(nil), false}, + // TIMESTAMP ARRAY with []time.Time + {listProto(timeProto(t1), timeProto(t2), timeProto(t3)), listType(timeType()), []time.Time{t1, t2, t3}, false}, // DATE {dateProto(d1), dateType(), d1, false}, {dateProto(d1), dateType(), NullDate{d1, true}, false}, {nullProto(), dateType(), NullDate{}, false}, - // DATE ARRAY + // DATE ARRAY with []NullDate {listProto(dateProto(d1), dateProto(d2), nullProto()), listType(dateType()), []NullDate{{d1, true}, {d2, true}, {}}, false}, {nullProto(), listType(dateType()), []NullDate(nil), false}, + // DATE ARRAY with []civil.Date + {listProto(dateProto(d1), dateProto(d2)), listType(dateType()), []civil.Date{d1, d2}, false}, // STRUCT ARRAY // STRUCT schema is equal to the following Go struct: // type s struct { @@ -496,110 +518,3 @@ func TestGenericColumnValue(t *testing.T) { } } } - -func runBench(b *testing.B, size int, f func(a []int) (*proto3.Value, *sppb.Type, error)) { - a := make([]int, size) - for i := 0; i < b.N; i++ { - f(a) - } -} - -func BenchmarkEncodeIntArrayOrig1(b *testing.B) { - runBench(b, 1, encodeIntArrayOrig) -} - -func BenchmarkEncodeIntArrayOrig10(b *testing.B) { - runBench(b, 10, encodeIntArrayOrig) -} - -func BenchmarkEncodeIntArrayOrig100(b *testing.B) { - runBench(b, 100, encodeIntArrayOrig) -} - -func BenchmarkEncodeIntArrayOrig1000(b *testing.B) { - runBench(b, 1000, encodeIntArrayOrig) -} - -func BenchmarkEncodeIntArrayFunc1(b *testing.B) { - runBench(b, 1, encodeIntArrayFunc) -} - -func BenchmarkEncodeIntArrayFunc10(b *testing.B) { - runBench(b, 10, encodeIntArrayFunc) -} - -func BenchmarkEncodeIntArrayFunc100(b *testing.B) { - runBench(b, 100, encodeIntArrayFunc) -} - -func BenchmarkEncodeIntArrayFunc1000(b *testing.B) { - runBench(b, 1000, encodeIntArrayFunc) -} - -func BenchmarkEncodeIntArrayReflect1(b *testing.B) { - runBench(b, 1, encodeIntArrayReflect) -} - -func BenchmarkEncodeIntArrayReflect10(b *testing.B) { - runBench(b, 10, encodeIntArrayReflect) -} - -func BenchmarkEncodeIntArrayReflect100(b *testing.B) { - runBench(b, 100, encodeIntArrayReflect) -} - -func BenchmarkEncodeIntArrayReflect1000(b *testing.B) { - runBench(b, 1000, encodeIntArrayReflect) -} - -func encodeIntArrayOrig(a []int) (*proto3.Value, *sppb.Type, error) { - vs := make([]*proto3.Value, len(a)) - var err error - for i := range a { - vs[i], _, err = encodeValue(a[i]) - if err != nil { - return nil, nil, err - } - } - return listProto(vs...), listType(intType()), nil -} - -func encodeIntArrayFunc(a []int) (*proto3.Value, *sppb.Type, error) { - v, err := encodeArray(len(a), func(i int) interface{} { return a[i] }) - if err != nil { - return nil, nil, err - } - return v, listType(intType()), nil -} - -func encodeIntArrayReflect(a []int) (*proto3.Value, *sppb.Type, error) { - v, err := encodeArrayReflect(a) - if err != nil { - return nil, nil, err - } - return v, listType(intType()), nil -} - -func encodeArrayReflect(a interface{}) (*proto3.Value, error) { - va := reflect.ValueOf(a) - len := va.Len() - vs := make([]*proto3.Value, len) - var err error - for i := 0; i < len; i++ { - vs[i], _, err = encodeValue(va.Index(i).Interface()) - if err != nil { - return nil, err - } - } - return listProto(vs...), nil -} - -func BenchmarkDecodeGeneric(b *testing.B) { - v := stringProto("test") - t := stringType() - var g GenericColumnValue - b.ResetTimer() - for i := 0; i < b.N; i++ { - decodeValue(v, t, &g) - } -} diff --git a/vendor/cloud.google.com/go/speech/apiv1/Recognize_smoke_test.go b/vendor/cloud.google.com/go/speech/apiv1/Recognize_smoke_test.go new file mode 100644 index 000000000..fcc448dc6 --- /dev/null +++ b/vendor/cloud.google.com/go/speech/apiv1/Recognize_smoke_test.go @@ -0,0 +1,78 @@ +// 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. +// 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. + +// AUTO-GENERATED CODE. DO NOT EDIT. + +package speech + +import ( + speechpb "google.golang.org/genproto/googleapis/cloud/speech/v1" +) + +import ( + "strconv" + "testing" + "time" + + "cloud.google.com/go/internal/testutil" + "golang.org/x/net/context" + "google.golang.org/api/iterator" + "google.golang.org/api/option" +) + +var _ = iterator.Done +var _ = strconv.FormatUint +var _ = time.Now + +func TestSpeechSmoke(t *testing.T) { + if testing.Short() { + t.Skip("skipping smoke test in short mode") + } + ctx := context.Background() + ts := testutil.TokenSource(ctx, DefaultAuthScopes()...) + if ts == nil { + t.Skip("Integration tests skipped. See CONTRIBUTING.md for details") + } + + projectId := testutil.ProjID() + _ = projectId + + c, err := NewClient(ctx, option.WithTokenSource(ts)) + if err != nil { + t.Fatal(err) + } + + var languageCode string = "en-US" + var sampleRateHertz int32 = 44100 + var encoding speechpb.RecognitionConfig_AudioEncoding = speechpb.RecognitionConfig_FLAC + var config = &speechpb.RecognitionConfig{ + LanguageCode: languageCode, + SampleRateHertz: sampleRateHertz, + Encoding: encoding, + } + var uri string = "gs://gapic-toolkit/hello.flac" + var audio = &speechpb.RecognitionAudio{ + AudioSource: &speechpb.RecognitionAudio_Uri{ + Uri: uri, + }, + } + var request = &speechpb.RecognizeRequest{ + Config: config, + Audio: audio, + } + + if _, err := c.Recognize(ctx, request); err != nil { + t.Error(err) + } +} diff --git a/vendor/cloud.google.com/go/speech/apiv1/doc.go b/vendor/cloud.google.com/go/speech/apiv1/doc.go index c884fa9f1..b3d55ab65 100644 --- a/vendor/cloud.google.com/go/speech/apiv1/doc.go +++ b/vendor/cloud.google.com/go/speech/apiv1/doc.go @@ -32,8 +32,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/cloud.google.com/go/speech/apiv1/speech_client.go b/vendor/cloud.google.com/go/speech/apiv1/speech_client.go index fa6eedcdf..0f618efe0 100644 --- a/vendor/cloud.google.com/go/speech/apiv1/speech_client.go +++ b/vendor/cloud.google.com/go/speech/apiv1/speech_client.go @@ -102,7 +102,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error client: speechpb.NewSpeechClient(conn), } - c.SetGoogleClientInfo() + c.setGoogleClientInfo() c.LROClient, err = lroauto.NewOperationsClient(ctx, option.WithGRPCConn(conn)) if err != nil { @@ -128,10 +128,10 @@ func (c *Client) Close() error { return c.conn.Close() } -// SetGoogleClientInfo sets the name and version of the application in +// setGoogleClientInfo sets the name and version of the application in // the `x-goog-api-client` header passed on each request. Intended for // use by Google-written clients. -func (c *Client) SetGoogleClientInfo(keyval ...string) { +func (c *Client) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", version.Go()}, keyval...) kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version) c.xGoogHeader = []string{gax.XGoogHeader(kv...)} @@ -156,8 +156,8 @@ func (c *Client) Recognize(ctx context.Context, req *speechpb.RecognizeRequest, // LongRunningRecognize performs asynchronous speech recognition: receive results via the // google.longrunning.Operations interface. Returns either an -// `Operation.error` or an `Operation.response` which contains -// a `LongRunningRecognizeResponse` message. +// Operation.error or an Operation.response which contains +// a LongRunningRecognizeResponse message. func (c *Client) LongRunningRecognize(ctx context.Context, req *speechpb.LongRunningRecognizeRequest, opts ...gax.CallOption) (*LongRunningRecognizeOperation, error) { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.LongRunningRecognize[0:len(c.CallOptions.LongRunningRecognize):len(c.CallOptions.LongRunningRecognize)], opts...) @@ -210,7 +210,7 @@ func (c *Client) LongRunningRecognizeOperation(name string) *LongRunningRecogniz // See documentation of Poll for error-handling information. func (op *LongRunningRecognizeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*speechpb.LongRunningRecognizeResponse, error) { var resp speechpb.LongRunningRecognizeResponse - if err := op.lro.Wait(ctx, &resp, opts...); err != nil { + if err := op.lro.WaitWithInterval(ctx, &resp, 45000*time.Millisecond, opts...); err != nil { return nil, err } return &resp, nil diff --git a/vendor/cloud.google.com/go/speech/apiv1beta1/doc.go b/vendor/cloud.google.com/go/speech/apiv1beta1/doc.go index 1bd791110..83ba2658d 100644 --- a/vendor/cloud.google.com/go/speech/apiv1beta1/doc.go +++ b/vendor/cloud.google.com/go/speech/apiv1beta1/doc.go @@ -32,8 +32,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/cloud.google.com/go/speech/apiv1beta1/speech_client.go b/vendor/cloud.google.com/go/speech/apiv1beta1/speech_client.go index 609d7b281..d5e7603f3 100644 --- a/vendor/cloud.google.com/go/speech/apiv1beta1/speech_client.go +++ b/vendor/cloud.google.com/go/speech/apiv1beta1/speech_client.go @@ -102,7 +102,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error client: speechpb.NewSpeechClient(conn), } - c.SetGoogleClientInfo() + c.setGoogleClientInfo() c.LROClient, err = lroauto.NewOperationsClient(ctx, option.WithGRPCConn(conn)) if err != nil { @@ -128,10 +128,10 @@ func (c *Client) Close() error { return c.conn.Close() } -// SetGoogleClientInfo sets the name and version of the application in +// setGoogleClientInfo sets the name and version of the application in // the `x-goog-api-client` header passed on each request. Intended for // use by Google-written clients. -func (c *Client) SetGoogleClientInfo(keyval ...string) { +func (c *Client) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", version.Go()}, keyval...) kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version) c.xGoogHeader = []string{gax.XGoogHeader(kv...)} @@ -158,8 +158,8 @@ func (c *Client) SyncRecognize(ctx context.Context, req *speechpb.SyncRecognizeR // [google.longrunning.Operations] // (/speech/reference/rest/v1beta1/operations#Operation) // interface. Returns either an -// `Operation.error` or an `Operation.response` which contains -// an `AsyncRecognizeResponse` message. +// Operation.error or an Operation.response which contains +// an AsyncRecognizeResponse message. func (c *Client) AsyncRecognize(ctx context.Context, req *speechpb.AsyncRecognizeRequest, opts ...gax.CallOption) (*AsyncRecognizeOperation, error) { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.AsyncRecognize[0:len(c.CallOptions.AsyncRecognize):len(c.CallOptions.AsyncRecognize)], opts...) @@ -212,7 +212,7 @@ func (c *Client) AsyncRecognizeOperation(name string) *AsyncRecognizeOperation { // See documentation of Poll for error-handling information. func (op *AsyncRecognizeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*speechpb.AsyncRecognizeResponse, error) { var resp speechpb.AsyncRecognizeResponse - if err := op.lro.Wait(ctx, &resp, opts...); err != nil { + if err := op.lro.WaitWithInterval(ctx, &resp, 45000*time.Millisecond, opts...); err != nil { return nil, err } return &resp, nil diff --git a/vendor/cloud.google.com/go/storage/bucket.go b/vendor/cloud.google.com/go/storage/bucket.go index 68f298e84..310d02784 100644 --- a/vendor/cloud.google.com/go/storage/bucket.go +++ b/vendor/cloud.google.com/go/storage/bucket.go @@ -1,4 +1,4 @@ -// Copyright 2014 Google Inc. All Rights Reserved. +// Copyright 2014 Google Inc. LiveAndArchived Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -71,6 +71,11 @@ func (b *BucketHandle) Create(ctx context.Context, projectID string, attrs *Buck bkt = &raw.Bucket{} } bkt.Name = b.name + // If there is lifecycle information but no location, explicitly set + // the location. This is a GCS quirk/bug. + if bkt.Location == "" && bkt.Lifecycle != nil { + bkt.Location = "US" + } req := b.c.raw.Buckets.Insert(projectID, bkt) setClientHeader(req.Header()) return runWithRetry(ctx, func() error { _, err := req.Context(ctx).Do(); return err }) @@ -230,6 +235,98 @@ type BucketAttrs struct { // RequesterPays reports whether the bucket is a Requester Pays bucket. RequesterPays bool + // Lifecycle is the lifecycle configuration for objects in the bucket. + Lifecycle Lifecycle +} + +// Lifecycle is the lifecycle configuration for objects in the bucket. +type Lifecycle struct { + Rules []LifecycleRule +} + +const ( + // RFC3339 date with only the date segment, used for CreatedBefore in LifecycleRule. + rfc3339Date = "2006-01-02" + + // DeleteAction is a lifecycle action that deletes a live and/or archived + // objects. Takes precendence over SetStorageClass actions. + DeleteAction = "Delete" + + // SetStorageClassAction changes the storage class of live and/or archived + // objects. + SetStorageClassAction = "SetStorageClass" +) + +// LifecycleRule is a lifecycle configuration rule. +// +// When all the configured conditions are met by an object in the bucket, the +// configured action will automatically be taken on that object. +type LifecycleRule struct { + // Action is the action to take when all of the associated conditions are + // met. + Action LifecycleAction + + // Condition is the set of conditions that must be met for the associated + // action to be taken. + Condition LifecycleCondition +} + +// LifecycleAction is a lifecycle configuration action. +type LifecycleAction struct { + // Type is the type of action to take on matching objects. + // + // Acceptable values are "Delete" to delete matching objects and + // "SetStorageClass" to set the storage class defined in StorageClass on + // matching objects. + Type string + + // StorageClass is the storage class to set on matching objects if the Action + // is "SetStorageClass". + StorageClass string +} + +// Liveness specifies whether the object is live or not. +type Liveness int + +const ( + // LiveAndArchived includes both live and archived objects. + LiveAndArchived Liveness = iota + // Live specifies that the object is still live. + Live + // Archived specifies that the object is archived. + Archived +) + +// LifecycleCondition is a set of conditions used to match objects and take an +// action automatically. +// +// All configured conditions must be met for the associated action to be taken. +type LifecycleCondition struct { + // AgeInDays is the age of the object in days. + AgeInDays int64 + + // CreatedBefore is the time the object was created. + // + // This condition is satisfied when an object is created before midnight of + // the specified date in UTC. + CreatedBefore time.Time + + // Liveness specifies the object's liveness. Relevant only for versioned objects + Liveness Liveness + + // MatchesStorageClasses is the condition matching the object's storage + // class. + // + // Values include "MULTI_REGIONAL", "REGIONAL", "NEARLINE", "COLDLINE", + // "STANDARD", and "DURABLE_REDUCED_AVAILABILITY". + MatchesStorageClasses []string + + // NumNewerVersions is the condition matching objects with a number of newer versions. + // + // If the value is N, this condition is satisfied when there are at least N + // versions (including the live version) newer than this version of the + // object. + NumNewerVersions int64 } func newBucket(b *raw.Bucket) *BucketAttrs { @@ -245,6 +342,7 @@ func newBucket(b *raw.Bucket) *BucketAttrs { VersioningEnabled: b.Versioning != nil && b.Versioning.Enabled, Labels: b.Labels, RequesterPays: b.Billing != nil && b.Billing.RequesterPays, + Lifecycle: toLifecycle(b.Lifecycle), } acl := make([]ACLRule, len(b.Acl)) for i, rule := range b.Acl { @@ -306,6 +404,7 @@ func (b *BucketAttrs) toRawBucket() *raw.Bucket { Versioning: v, Labels: labels, Billing: bb, + Lifecycle: toRawLifecycle(b.Lifecycle), } } @@ -437,6 +536,75 @@ func applyBucketConds(method string, conds *BucketConditions, call interface{}) return nil } +func toRawLifecycle(l Lifecycle) *raw.BucketLifecycle { + var rl raw.BucketLifecycle + if len(l.Rules) == 0 { + return nil + } + for _, r := range l.Rules { + rr := &raw.BucketLifecycleRule{ + Action: &raw.BucketLifecycleRuleAction{ + Type: r.Action.Type, + StorageClass: r.Action.StorageClass, + }, + Condition: &raw.BucketLifecycleRuleCondition{ + Age: r.Condition.AgeInDays, + MatchesStorageClass: r.Condition.MatchesStorageClasses, + NumNewerVersions: r.Condition.NumNewerVersions, + }, + } + + switch r.Condition.Liveness { + case LiveAndArchived: + rr.Condition.IsLive = nil + case Live: + rr.Condition.IsLive = googleapi.Bool(true) + case Archived: + rr.Condition.IsLive = googleapi.Bool(false) + } + + if !r.Condition.CreatedBefore.IsZero() { + rr.Condition.CreatedBefore = r.Condition.CreatedBefore.Format(rfc3339Date) + } + rl.Rule = append(rl.Rule, rr) + } + return &rl +} + +func toLifecycle(rl *raw.BucketLifecycle) Lifecycle { + var l Lifecycle + if rl == nil { + return l + } + for _, rr := range rl.Rule { + r := LifecycleRule{ + Action: LifecycleAction{ + Type: rr.Action.Type, + StorageClass: rr.Action.StorageClass, + }, + Condition: LifecycleCondition{ + AgeInDays: rr.Condition.Age, + MatchesStorageClasses: rr.Condition.MatchesStorageClass, + NumNewerVersions: rr.Condition.NumNewerVersions, + }, + } + + switch { + case rr.Condition.IsLive == nil: + r.Condition.Liveness = LiveAndArchived + case *rr.Condition.IsLive == true: + r.Condition.Liveness = Live + case *rr.Condition.IsLive == false: + r.Condition.Liveness = Archived + } + + if rr.Condition.CreatedBefore != "" { + r.Condition.CreatedBefore, _ = time.Parse(rfc3339Date, rr.Condition.CreatedBefore) + } + } + return l +} + // Objects returns an iterator over the objects in the bucket that match the Query q. // If q is nil, no filtering is done. func (b *BucketHandle) Objects(ctx context.Context, q *Query) *ObjectIterator { diff --git a/vendor/cloud.google.com/go/storage/example_test.go b/vendor/cloud.google.com/go/storage/example_test.go index d8ec8ff6d..3eec674b9 100644 --- a/vendor/cloud.google.com/go/storage/example_test.go +++ b/vendor/cloud.google.com/go/storage/example_test.go @@ -16,6 +16,7 @@ package storage_test import ( "fmt" + "hash/crc32" "io" "io/ioutil" "log" @@ -321,6 +322,31 @@ func ExampleWriter_Write() { wc.ACL = []storage.ACLRule{{storage.AllUsers, storage.RoleReader}} if _, err := wc.Write([]byte("hello world")); err != nil { // TODO: handle error. + // Note that Write may return nil in some error situations, + // so always check the error from Close. + } + if err := wc.Close(); err != nil { + // TODO: handle error. + } + fmt.Println("updated object:", wc.Attrs()) +} + +// To make sure the data you write is uncorrupted, use an MD5 or CRC32c +// checksum. This example illustrates CRC32c. +func ExampleWriter_Write_checksum() { + ctx := context.Background() + client, err := storage.NewClient(ctx) + if err != nil { + // TODO: handle error. + } + data := []byte("verify me") + wc := client.Bucket("bucketname").Object("filename1").NewWriter(ctx) + wc.CRC32C = crc32.Checksum(data, crc32.MakeTable(crc32.Castagnoli)) + wc.SendCRC32C = true + if _, err := wc.Write([]byte("hello world")); err != nil { + // TODO: handle error. + // Note that Write may return nil in some error situations, + // so always check the error from Close. } if err := wc.Close(); err != nil { // TODO: handle error. diff --git a/vendor/cloud.google.com/go/storage/go110.go.pending b/vendor/cloud.google.com/go/storage/go110.go.pending new file mode 100644 index 000000000..b85e8c3b9 --- /dev/null +++ b/vendor/cloud.google.com/go/storage/go110.go.pending @@ -0,0 +1,30 @@ +// 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. +// 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.10 + +package storage + +import "google.golang.org/api/googleapi" + +func shouldRetry(err error) bool { + switch e := err.(type) { + case *googleapi.Error: + // Retry on 429 and 5xx, according to + // https://cloud.google.com/storage/docs/exponential-backoff. + return e.Code == 429 || (e.Code >= 500 && e.Code < 600) + default: + return false + } +} diff --git a/vendor/cloud.google.com/go/storage/integration_test.go b/vendor/cloud.google.com/go/storage/integration_test.go index 07b93022b..9b8f8228e 100644 --- a/vendor/cloud.google.com/go/storage/integration_test.go +++ b/vendor/cloud.google.com/go/storage/integration_test.go @@ -45,7 +45,7 @@ import ( "google.golang.org/api/option" ) -const testPrefix = "-go-cloud-storage-test" +const testPrefix = "-go-test" // suffix is a timestamp-based suffix which is added to all buckets created by // tests. This reduces flakiness when the tests are run in parallel and allows @@ -124,7 +124,7 @@ func TestBucketMethods(t *testing.T) { b := client.Bucket(newBucket) // Test Create and Delete. if err := b.Create(ctx, projectID, nil); err != nil { - t.Errorf("Bucket(%v).Create(%v, %v) failed: %v", newBucket, projectID, nil, err) + t.Fatalf("Bucket(%v).Create(%v, %v) failed: %v", newBucket, projectID, nil, err) } attrs, err := b.Attrs(ctx) if err != nil { @@ -153,9 +153,35 @@ func TestBucketMethods(t *testing.T) { StorageClass: "NEARLINE", VersioningEnabled: true, Labels: labels, + Lifecycle: Lifecycle{ + Rules: []LifecycleRule{{ + Action: LifecycleAction{ + Type: SetStorageClassAction, + StorageClass: "NEARLINE", + }, + Condition: LifecycleCondition{ + AgeInDays: 10, + Liveness: Archived, + CreatedBefore: time.Date(2017, 1, 1, 0, 0, 0, 0, time.UTC), + MatchesStorageClasses: []string{"MULTI_REGIONAL", "STANDARD"}, + NumNewerVersions: 3, + }, + }, { + Action: LifecycleAction{ + Type: DeleteAction, + }, + Condition: LifecycleCondition{ + AgeInDays: 30, + Liveness: Live, + CreatedBefore: time.Date(2017, 1, 1, 0, 0, 0, 0, time.UTC), + MatchesStorageClasses: []string{"NEARLINE"}, + NumNewerVersions: 10, + }, + }}, + }, } if err := client.Bucket(newBucket).Create(ctx, projectID, attrs); err != nil { - t.Errorf("Bucket(%v).Create(%v, %v) failed: %v", newBucket, projectID, attrs, err) + t.Fatalf("Bucket(%v).Create(%v, %+v) failed: %v", newBucket, projectID, attrs, err) } attrs, err = b.Attrs(ctx) if err != nil { @@ -338,6 +364,9 @@ func TestObjects(t *testing.T) { if got, want := rc.ContentType(), "text/plain"; got != want { t.Errorf("ContentType (%q) = %q; want %q", obj, got, want) } + if got, want := rc.CacheControl(), "public, max-age=60"; got != want { + t.Errorf("CacheControl (%q) = %q; want %q", obj, got, want) + } rc.Close() // Check early close. @@ -1422,6 +1451,7 @@ func TestIntegration_RequesterPays(t *testing.T) { func writeObject(ctx context.Context, obj *ObjectHandle, contentType string, contents []byte) error { w := obj.NewWriter(ctx) w.ContentType = contentType + w.CacheControl = "public, max-age=60" if contents != nil { if _, err := w.Write(contents); err != nil { _ = w.Close() diff --git a/vendor/cloud.google.com/go/storage/invoke.go b/vendor/cloud.google.com/go/storage/invoke.go index e8fc924ea..46423a8b2 100644 --- a/vendor/cloud.google.com/go/storage/invoke.go +++ b/vendor/cloud.google.com/go/storage/invoke.go @@ -18,7 +18,6 @@ import ( "cloud.google.com/go/internal" gax "github.com/googleapis/gax-go" "golang.org/x/net/context" - "google.golang.org/api/googleapi" ) // runWithRetry calls the function until it returns nil or a non-retryable error, or @@ -29,13 +28,7 @@ func runWithRetry(ctx context.Context, call func() error) error { if err == nil { return true, nil } - e, ok := err.(*googleapi.Error) - if !ok { - return true, err - } - // Retry on 429 and 5xx, according to - // https://cloud.google.com/storage/docs/exponential-backoff. - if e.Code == 429 || (e.Code >= 500 && e.Code < 600) { + if shouldRetry(err) { return false, nil } return true, err diff --git a/vendor/cloud.google.com/go/storage/not_go110.go b/vendor/cloud.google.com/go/storage/not_go110.go new file mode 100644 index 000000000..c354e74bf --- /dev/null +++ b/vendor/cloud.google.com/go/storage/not_go110.go @@ -0,0 +1,40 @@ +// 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. +// 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.10 + +package storage + +import ( + "net/url" + "strings" + + "google.golang.org/api/googleapi" +) + +func shouldRetry(err error) bool { + switch e := err.(type) { + case *googleapi.Error: + // Retry on 429 and 5xx, according to + // https://cloud.google.com/storage/docs/exponential-backoff. + return e.Code == 429 || (e.Code >= 500 && e.Code < 600) + case *url.Error: + // Retry on REFUSED_STREAM. + // Unfortunately the error type is unexported, so we resort to string + // matching. + return strings.Contains(e.Error(), "REFUSED_STREAM") + default: + return false + } +} diff --git a/vendor/cloud.google.com/go/storage/reader.go b/vendor/cloud.google.com/go/storage/reader.go index aa103c175..c96ca8ae4 100644 --- a/vendor/cloud.google.com/go/storage/reader.go +++ b/vendor/cloud.google.com/go/storage/reader.go @@ -28,6 +28,7 @@ type Reader struct { body io.ReadCloser remain, size int64 contentType string + cacheControl string checkCRC bool // should we check the CRC? wantCRC uint32 // the CRC32c value the server sent in the header gotCRC uint32 // running crc @@ -72,3 +73,8 @@ func (r *Reader) Remain() int64 { func (r *Reader) ContentType() string { return r.contentType } + +// CacheControl returns the cache control of the object. +func (r *Reader) CacheControl() string { + return r.cacheControl +} diff --git a/vendor/cloud.google.com/go/storage/storage.go b/vendor/cloud.google.com/go/storage/storage.go index f9d1b5e2f..82c0ddbf5 100644 --- a/vendor/cloud.google.com/go/storage/storage.go +++ b/vendor/cloud.google.com/go/storage/storage.go @@ -567,12 +567,13 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64) crc, checkCRC = parseCRC32c(res) } return &Reader{ - body: body, - size: size, - remain: remain, - contentType: res.Header.Get("Content-Type"), - wantCRC: crc, - checkCRC: checkCRC, + body: body, + size: size, + remain: remain, + contentType: res.Header.Get("Content-Type"), + cacheControl: res.Header.Get("Cache-Control"), + wantCRC: crc, + checkCRC: checkCRC, }, nil } @@ -720,11 +721,16 @@ type ObjectAttrs struct { // sent in the response headers. ContentDisposition string - // MD5 is the MD5 hash of the object's content. This field is read-only. + // MD5 is the MD5 hash of the object's content. This field is read-only, + // except when used from a Writer. If set on a Writer, the uploaded + // data is rejected if its MD5 hash does not match this field. MD5 []byte // CRC32C is the CRC32 checksum of the object's content using - // the Castagnoli93 polynomial. This field is read-only. + // the Castagnoli93 polynomial. This field is read-only, except when + // used from a Writer. If set on a Writer and Writer.SendCRC32C + // is true, the uploaded data is rejected if its CRC32c hash does not + // match this field. CRC32C uint32 // MediaLink is an URL to the object's content. This field is read-only. diff --git a/vendor/cloud.google.com/go/storage/storage_test.go b/vendor/cloud.google.com/go/storage/storage_test.go index 8d42eee86..b60af9254 100644 --- a/vendor/cloud.google.com/go/storage/storage_test.go +++ b/vendor/cloud.google.com/go/storage/storage_test.go @@ -31,6 +31,7 @@ import ( "cloud.google.com/go/internal/testutil" "golang.org/x/net/context" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" raw "google.golang.org/api/storage/v1" @@ -686,6 +687,88 @@ func TestCodecUint32(t *testing.T) { } } +func TestBucketAttrs(t *testing.T) { + for _, c := range []struct { + attrs BucketAttrs + raw raw.Bucket + }{{ + attrs: BucketAttrs{ + Lifecycle: Lifecycle{ + Rules: []LifecycleRule{{ + Action: LifecycleAction{ + Type: SetStorageClassAction, + StorageClass: "NEARLINE", + }, + Condition: LifecycleCondition{ + AgeInDays: 10, + Liveness: Live, + CreatedBefore: time.Date(2017, 1, 2, 3, 4, 5, 6, time.UTC), + MatchesStorageClasses: []string{"MULTI_REGIONAL", "REGIONAL", "STANDARD"}, + NumNewerVersions: 3, + }, + }, { + Action: LifecycleAction{ + Type: DeleteAction, + }, + Condition: LifecycleCondition{ + AgeInDays: 30, + Liveness: Live, + CreatedBefore: time.Date(2017, 1, 2, 3, 4, 5, 6, time.UTC), + MatchesStorageClasses: []string{"NEARLINE"}, + NumNewerVersions: 10, + }, + }, { + Action: LifecycleAction{ + Type: DeleteAction, + }, + Condition: LifecycleCondition{ + Liveness: Archived, + }, + }}, + }, + }, + raw: raw.Bucket{ + Lifecycle: &raw.BucketLifecycle{ + Rule: []*raw.BucketLifecycleRule{{ + Action: &raw.BucketLifecycleRuleAction{ + Type: SetStorageClassAction, + StorageClass: "NEARLINE", + }, + Condition: &raw.BucketLifecycleRuleCondition{ + Age: 10, + IsLive: googleapi.Bool(true), + CreatedBefore: "2017-01-02", + MatchesStorageClass: []string{"MULTI_REGIONAL", "REGIONAL", "STANDARD"}, + NumNewerVersions: 3, + }, + }, { + Action: &raw.BucketLifecycleRuleAction{ + Type: DeleteAction, + }, + Condition: &raw.BucketLifecycleRuleCondition{ + Age: 30, + IsLive: googleapi.Bool(true), + CreatedBefore: "2017-01-02", + MatchesStorageClass: []string{"NEARLINE"}, + NumNewerVersions: 10, + }, + }, { + Action: &raw.BucketLifecycleRuleAction{ + Type: DeleteAction, + }, + Condition: &raw.BucketLifecycleRuleCondition{ + IsLive: googleapi.Bool(false), + }, + }}, + }, + }, + }} { + if got := c.attrs.toRawBucket(); !testutil.Equal(*got, c.raw) { + t.Errorf("toRawBucket: got %v, want %v", *got, c.raw) + } + } +} + func newTestServer(handler func(w http.ResponseWriter, r *http.Request)) (*http.Client, func()) { ts := httptest.NewTLSServer(http.HandlerFunc(handler)) tlsConf := &tls.Config{InsecureSkipVerify: true} diff --git a/vendor/cloud.google.com/go/storage/writer.go b/vendor/cloud.google.com/go/storage/writer.go index 19f4f0e10..109112c62 100644 --- a/vendor/cloud.google.com/go/storage/writer.go +++ b/vendor/cloud.google.com/go/storage/writer.go @@ -36,6 +36,8 @@ type Writer struct { // SendCRC specifies whether to transmit a CRC32C field. It should be set // to true in addition to setting the Writer's CRC32C field, because zero // is a valid CRC and normally a zero would not be transmitted. + // If a CRC32C is sent, and the data written does not match the checksum, + // the write will be rejected. SendCRC32C bool // ChunkSize controls the maximum number of bytes of the object that the diff --git a/vendor/cloud.google.com/go/trace/apiv1/doc.go b/vendor/cloud.google.com/go/trace/apiv1/doc.go index b5878cafe..4aeb77908 100644 --- a/vendor/cloud.google.com/go/trace/apiv1/doc.go +++ b/vendor/cloud.google.com/go/trace/apiv1/doc.go @@ -37,8 +37,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/cloud.google.com/go/trace/trace.go b/vendor/cloud.google.com/go/trace/trace.go index 7ec8d74d0..cecd3856a 100644 --- a/vendor/cloud.google.com/go/trace/trace.go +++ b/vendor/cloud.google.com/go/trace/trace.go @@ -113,7 +113,7 @@ // ... // childSpan.Finish(trace.WithResponse(resp)) // -// When a span created by SpanFromRequest or SpamFromHeader is finished, the +// When a span created by SpanFromRequest or SpanFromHeader is finished, the // finished spans in the corresponding trace -- the span itself and its // descendants -- are uploaded to the Stackdriver Trace server using the // *Client that created the span. Finish returns immediately, and uploading diff --git a/vendor/cloud.google.com/go/videointelligence/apiv1beta1/doc.go b/vendor/cloud.google.com/go/videointelligence/apiv1beta1/doc.go index 0240b18a7..726458fe6 100644 --- a/vendor/cloud.google.com/go/videointelligence/apiv1beta1/doc.go +++ b/vendor/cloud.google.com/go/videointelligence/apiv1beta1/doc.go @@ -18,8 +18,6 @@ // Google Cloud Video Intelligence API. // // Google Cloud Video Intelligence API. -// -// Use the client at cloud.google.com/go/videointelligence in preference to this. package videointelligence // import "cloud.google.com/go/videointelligence/apiv1beta1" import ( @@ -34,8 +32,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/cloud.google.com/go/videointelligence/apiv1beta1/video_intelligence_client.go b/vendor/cloud.google.com/go/videointelligence/apiv1beta1/video_intelligence_client.go index 13cfbba10..552e936a1 100644 --- a/vendor/cloud.google.com/go/videointelligence/apiv1beta1/video_intelligence_client.go +++ b/vendor/cloud.google.com/go/videointelligence/apiv1beta1/video_intelligence_client.go @@ -98,7 +98,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error client: videointelligencepb.NewVideoIntelligenceServiceClient(conn), } - c.SetGoogleClientInfo() + c.setGoogleClientInfo() c.LROClient, err = lroauto.NewOperationsClient(ctx, option.WithGRPCConn(conn)) if err != nil { @@ -124,19 +124,19 @@ func (c *Client) Close() error { return c.conn.Close() } -// SetGoogleClientInfo sets the name and version of the application in +// setGoogleClientInfo sets the name and version of the application in // the `x-goog-api-client` header passed on each request. Intended for // use by Google-written clients. -func (c *Client) SetGoogleClientInfo(keyval ...string) { +func (c *Client) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", version.Go()}, keyval...) kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version) c.xGoogHeader = []string{gax.XGoogHeader(kv...)} } // AnnotateVideo performs asynchronous video annotation. Progress and results can be -// retrieved through the `google.longrunning.Operations` interface. -// `Operation.metadata` contains `AnnotateVideoProgress` (progress). -// `Operation.response` contains `AnnotateVideoResponse` (results). +// retrieved through the google.longrunning.Operations interface. +// Operation.metadata contains AnnotateVideoProgress (progress). +// Operation.response contains AnnotateVideoResponse (results). func (c *Client) AnnotateVideo(ctx context.Context, req *videointelligencepb.AnnotateVideoRequest, opts ...gax.CallOption) (*AnnotateVideoOperation, error) { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.AnnotateVideo[0:len(c.CallOptions.AnnotateVideo):len(c.CallOptions.AnnotateVideo)], opts...) @@ -172,7 +172,7 @@ func (c *Client) AnnotateVideoOperation(name string) *AnnotateVideoOperation { // See documentation of Poll for error-handling information. func (op *AnnotateVideoOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*videointelligencepb.AnnotateVideoResponse, error) { var resp videointelligencepb.AnnotateVideoResponse - if err := op.lro.Wait(ctx, &resp, opts...); err != nil { + if err := op.lro.WaitWithInterval(ctx, &resp, 45000*time.Millisecond, opts...); err != nil { return nil, err } return &resp, nil diff --git a/vendor/cloud.google.com/go/videointelligence/apiv1beta2/doc.go b/vendor/cloud.google.com/go/videointelligence/apiv1beta2/doc.go new file mode 100644 index 000000000..b214286b2 --- /dev/null +++ b/vendor/cloud.google.com/go/videointelligence/apiv1beta2/doc.go @@ -0,0 +1,40 @@ +// 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. +// 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. + +// AUTO-GENERATED CODE. DO NOT EDIT. + +// Package videointelligence is an experimental, auto-generated package for the +// Google Cloud Video Intelligence API. +// +// Google Cloud Video Intelligence API. +package videointelligence // import "cloud.google.com/go/videointelligence/apiv1beta2" + +import ( + "golang.org/x/net/context" + "google.golang.org/grpc/metadata" +) + +func insertXGoog(ctx context.Context, val []string) context.Context { + md, _ := metadata.FromOutgoingContext(ctx) + md = md.Copy() + md["x-goog-api-client"] = val + return metadata.NewOutgoingContext(ctx, md) +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + } +} diff --git a/vendor/cloud.google.com/go/videointelligence/apiv1beta2/mock_test.go b/vendor/cloud.google.com/go/videointelligence/apiv1beta2/mock_test.go new file mode 100644 index 000000000..fa6e84ca8 --- /dev/null +++ b/vendor/cloud.google.com/go/videointelligence/apiv1beta2/mock_test.go @@ -0,0 +1,190 @@ +// 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. +// 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. + +// AUTO-GENERATED CODE. DO NOT EDIT. + +package videointelligence + +import ( + videointelligencepb "google.golang.org/genproto/googleapis/cloud/videointelligence/v1beta2" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +import ( + "flag" + "fmt" + "io" + "log" + "net" + "os" + "strings" + "testing" + + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes" + "golang.org/x/net/context" + "google.golang.org/api/option" + status "google.golang.org/genproto/googleapis/rpc/status" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + gstatus "google.golang.org/grpc/status" +) + +var _ = io.EOF +var _ = ptypes.MarshalAny +var _ status.Status + +type mockVideoIntelligenceServer struct { + // Embed for forward compatibility. + // Tests will keep working if more methods are added + // in the future. + videointelligencepb.VideoIntelligenceServiceServer + + reqs []proto.Message + + // If set, all calls return this error. + err error + + // responses to return if err == nil + resps []proto.Message +} + +func (s *mockVideoIntelligenceServer) AnnotateVideo(ctx context.Context, req *videointelligencepb.AnnotateVideoRequest) (*longrunningpb.Operation, error) { + md, _ := metadata.FromIncomingContext(ctx) + if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { + return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) + } + s.reqs = append(s.reqs, req) + if s.err != nil { + return nil, s.err + } + return s.resps[0].(*longrunningpb.Operation), nil +} + +// clientOpt is the option tests should use to connect to the test server. +// It is initialized by TestMain. +var clientOpt option.ClientOption + +var ( + mockVideoIntelligence mockVideoIntelligenceServer +) + +func TestMain(m *testing.M) { + flag.Parse() + + serv := grpc.NewServer() + videointelligencepb.RegisterVideoIntelligenceServiceServer(serv, &mockVideoIntelligence) + + lis, err := net.Listen("tcp", "localhost:0") + if err != nil { + log.Fatal(err) + } + go serv.Serve(lis) + + conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) + if err != nil { + log.Fatal(err) + } + clientOpt = option.WithGRPCConn(conn) + + os.Exit(m.Run()) +} + +func TestVideoIntelligenceServiceAnnotateVideo(t *testing.T) { + var expectedResponse *videointelligencepb.AnnotateVideoResponse = &videointelligencepb.AnnotateVideoResponse{} + + mockVideoIntelligence.err = nil + mockVideoIntelligence.reqs = nil + + any, err := ptypes.MarshalAny(expectedResponse) + if err != nil { + t.Fatal(err) + } + mockVideoIntelligence.resps = append(mockVideoIntelligence.resps[:0], &longrunningpb.Operation{ + Name: "longrunning-test", + Done: true, + Result: &longrunningpb.Operation_Response{Response: any}, + }) + + var inputUri string = "inputUri1707300727" + var features []videointelligencepb.Feature = nil + var request = &videointelligencepb.AnnotateVideoRequest{ + InputUri: inputUri, + Features: features, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + respLRO, err := c.AnnotateVideo(context.Background(), request) + if err != nil { + t.Fatal(err) + } + resp, err := respLRO.Wait(context.Background()) + + if err != nil { + t.Fatal(err) + } + + if want, got := request, mockVideoIntelligence.reqs[0]; !proto.Equal(want, got) { + t.Errorf("wrong request %q, want %q", got, want) + } + + if want, got := expectedResponse, resp; !proto.Equal(want, got) { + t.Errorf("wrong response %q, want %q)", got, want) + } +} + +func TestVideoIntelligenceServiceAnnotateVideoError(t *testing.T) { + errCode := codes.PermissionDenied + mockVideoIntelligence.err = nil + mockVideoIntelligence.resps = append(mockVideoIntelligence.resps[:0], &longrunningpb.Operation{ + Name: "longrunning-test", + Done: true, + Result: &longrunningpb.Operation_Error{ + Error: &status.Status{ + Code: int32(errCode), + Message: "test error", + }, + }, + }) + + var inputUri string = "inputUri1707300727" + var features []videointelligencepb.Feature = nil + var request = &videointelligencepb.AnnotateVideoRequest{ + InputUri: inputUri, + Features: features, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + respLRO, err := c.AnnotateVideo(context.Background(), request) + if err != nil { + t.Fatal(err) + } + resp, err := respLRO.Wait(context.Background()) + + if st, ok := gstatus.FromError(err); !ok { + t.Errorf("got error %v, expected grpc error", err) + } else if c := st.Code(); c != errCode { + t.Errorf("got error code %q, want %q", c, errCode) + } + _ = resp +} diff --git a/vendor/cloud.google.com/go/videointelligence/apiv1beta2/video_intelligence_client.go b/vendor/cloud.google.com/go/videointelligence/apiv1beta2/video_intelligence_client.go new file mode 100644 index 000000000..4dd4fef36 --- /dev/null +++ b/vendor/cloud.google.com/go/videointelligence/apiv1beta2/video_intelligence_client.go @@ -0,0 +1,224 @@ +// 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. +// 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. + +// AUTO-GENERATED CODE. DO NOT EDIT. + +package videointelligence + +import ( + "time" + + "cloud.google.com/go/internal/version" + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + gax "github.com/googleapis/gax-go" + "golang.org/x/net/context" + "google.golang.org/api/option" + "google.golang.org/api/transport" + videointelligencepb "google.golang.org/genproto/googleapis/cloud/videointelligence/v1beta2" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" +) + +// CallOptions contains the retry settings for each method of Client. +type CallOptions struct { + AnnotateVideo []gax.CallOption +} + +func defaultClientOptions() []option.ClientOption { + return []option.ClientOption{ + option.WithEndpoint("videointelligence.googleapis.com:443"), + option.WithScopes(DefaultAuthScopes()...), + } +} + +func defaultCallOptions() *CallOptions { + retry := map[[2]string][]gax.CallOption{ + {"default", "idempotent"}: { + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 120000 * time.Millisecond, + Multiplier: 2.5, + }) + }), + }, + } + return &CallOptions{ + AnnotateVideo: retry[[2]string{"default", "idempotent"}], + } +} + +// Client is a client for interacting with Google Cloud Video Intelligence API. +type Client struct { + // The connection to the service. + conn *grpc.ClientConn + + // The gRPC API client. + client videointelligencepb.VideoIntelligenceServiceClient + + // LROClient is used internally to handle longrunning operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient + + // The call options for this service. + CallOptions *CallOptions + + // The metadata to be sent with each request. + xGoogHeader []string +} + +// NewClient creates a new video intelligence service client. +// +// Service that implements Google Cloud Video Intelligence API. +func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + conn, err := transport.DialGRPC(ctx, append(defaultClientOptions(), opts...)...) + if err != nil { + return nil, err + } + c := &Client{ + conn: conn, + CallOptions: defaultCallOptions(), + + client: videointelligencepb.NewVideoIntelligenceServiceClient(conn), + } + c.setGoogleClientInfo() + + c.LROClient, err = lroauto.NewOperationsClient(ctx, option.WithGRPCConn(conn)) + if err != nil { + // This error "should not happen", since we are just reusing old connection + // and never actually need to dial. + // If this does happen, we could leak conn. However, we cannot close conn: + // If the user invoked the function with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO(pongad): investigate error conditions. + return nil, err + } + return c, nil +} + +// Connection returns the client's connection to the API service. +func (c *Client) Connection() *grpc.ClientConn { + return c.conn +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *Client) Close() error { + return c.conn.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *Client) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", version.Go()}, keyval...) + kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version) + c.xGoogHeader = []string{gax.XGoogHeader(kv...)} +} + +// AnnotateVideo performs asynchronous video annotation. Progress and results can be +// retrieved through the google.longrunning.Operations interface. +// Operation.metadata contains AnnotateVideoProgress (progress). +// Operation.response contains AnnotateVideoResponse (results). +func (c *Client) AnnotateVideo(ctx context.Context, req *videointelligencepb.AnnotateVideoRequest, opts ...gax.CallOption) (*AnnotateVideoOperation, error) { + ctx = insertXGoog(ctx, c.xGoogHeader) + opts = append(c.CallOptions.AnnotateVideo[0:len(c.CallOptions.AnnotateVideo):len(c.CallOptions.AnnotateVideo)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.AnnotateVideo(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &AnnotateVideoOperation{ + lro: longrunning.InternalNewOperation(c.LROClient, resp), + }, nil +} + +// AnnotateVideoOperation manages a long-running operation from AnnotateVideo. +type AnnotateVideoOperation struct { + lro *longrunning.Operation +} + +// AnnotateVideoOperation returns a new AnnotateVideoOperation from a given name. +// The name must be that of a previously created AnnotateVideoOperation, possibly from a different process. +func (c *Client) AnnotateVideoOperation(name string) *AnnotateVideoOperation { + return &AnnotateVideoOperation{ + lro: longrunning.InternalNewOperation(c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *AnnotateVideoOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*videointelligencepb.AnnotateVideoResponse, error) { + var resp videointelligencepb.AnnotateVideoResponse + if err := op.lro.WaitWithInterval(ctx, &resp, 45000*time.Millisecond, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *AnnotateVideoOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*videointelligencepb.AnnotateVideoResponse, error) { + var resp videointelligencepb.AnnotateVideoResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *AnnotateVideoOperation) Metadata() (*videointelligencepb.AnnotateVideoProgress, error) { + var meta videointelligencepb.AnnotateVideoProgress + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *AnnotateVideoOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *AnnotateVideoOperation) Name() string { + return op.lro.Name() +} diff --git a/vendor/cloud.google.com/go/videointelligence/apiv1beta2/video_intelligence_client_example_test.go b/vendor/cloud.google.com/go/videointelligence/apiv1beta2/video_intelligence_client_example_test.go new file mode 100644 index 000000000..1dd4917ef --- /dev/null +++ b/vendor/cloud.google.com/go/videointelligence/apiv1beta2/video_intelligence_client_example_test.go @@ -0,0 +1,56 @@ +// 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. +// 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. + +// AUTO-GENERATED CODE. DO NOT EDIT. + +package videointelligence_test + +import ( + "cloud.google.com/go/videointelligence/apiv1beta2" + "golang.org/x/net/context" + videointelligencepb "google.golang.org/genproto/googleapis/cloud/videointelligence/v1beta2" +) + +func ExampleNewClient() { + ctx := context.Background() + c, err := videointelligence.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use client. + _ = c +} + +func ExampleClient_AnnotateVideo() { + ctx := context.Background() + c, err := videointelligence.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &videointelligencepb.AnnotateVideoRequest{ + // TODO: Fill request struct fields. + } + op, err := c.AnnotateVideo(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/vendor/cloud.google.com/go/videointelligence/apiv1beta2/whitelist.go b/vendor/cloud.google.com/go/videointelligence/apiv1beta2/whitelist.go new file mode 100644 index 000000000..d0e057e70 --- /dev/null +++ b/vendor/cloud.google.com/go/videointelligence/apiv1beta2/whitelist.go @@ -0,0 +1,16 @@ +// 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. +// 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. + +// THIS API IS CURRENTLY UNDER WHITELIST. +package videointelligence diff --git a/vendor/cloud.google.com/go/vision/apiv1/doc.go b/vendor/cloud.google.com/go/vision/apiv1/doc.go index b86cca35c..e89490a98 100644 --- a/vendor/cloud.google.com/go/vision/apiv1/doc.go +++ b/vendor/cloud.google.com/go/vision/apiv1/doc.go @@ -36,8 +36,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context { return metadata.NewOutgoingContext(ctx, md) } -// DefaultAuthScopes reports the authentication scopes required -// by this package. +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/github.com/Azure/azure-sdk-for-go/.travis.yml b/vendor/github.com/Azure/azure-sdk-for-go/.travis.yml index e33f601d4..5ba4ffd32 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/.travis.yml +++ b/vendor/github.com/Azure/azure-sdk-for-go/.travis.yml @@ -4,6 +4,7 @@ language: go go: - 1.8 + - 1.9 install: - go get -u github.com/golang/lint/golint @@ -19,6 +20,8 @@ script: - test -z "$(gofmt -s -l -w management | tee /dev/stderr)" - test -z "$(gofmt -s -l -w storage | tee /dev/stderr)" - test -z "$(gofmt -s -l -w Gododir | tee /dev/stderr)" + - test -z "$(gofmt -s -l -w $(find ./datalake-store/* -type d -print) | tee /dev/stderr)" + # - test -z "$(gofmt -s -l -w $(find ./dataplane/* -type d -print) | tee /dev/stderr)" - test -z "$(go build $(find ./* -type d -print | grep -v '^./vendor$' | grep -v '^./storage$') | tee /dev/stderr)" - test -z "$(go vet $(find ./arm/* -type d -print) | tee /dev/stderr)" - test -z "$(golint ./arm/... | tee /dev/stderr)" @@ -26,11 +29,16 @@ script: - go test -v ./management/... - go test -v ./arm/... - go test -v ./storage/... + - go test -v ./datalake-store/... + - go test -v ./dataplane/... - test -z "$(golint ./management/... | grep -v 'should have comment' | grep -v 'stutters' | tee /dev/stderr)" - test -z "$(golint ./storage/... | tee /dev/stderr)" + # - test -z "$(golint ./datalake-store/... | tee /dev/stderr)" + # - test -z "$(golint ./dataplane/... | tee /dev/stderr)" - go vet ./management/... - go vet ./storage/... + - go vet ./datalake-store/... + - go vet ./dataplane/... - test -z "$(golint ./Gododir/... | tee /dev/stderr)" - go vet ./Gododir/... - - bash buildTerraform.sh - \ No newline at end of file + diff --git a/vendor/github.com/Azure/azure-sdk-for-go/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/CHANGELOG.md index 11173cdf8..7f03f2cf5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/CHANGELOG.md @@ -1,5 +1,37 @@ # CHANGELOG +## `v10.3.1-beta` +- Added Apache notice file. + +### ARM +- Fixed package name on some `version.go` files. + +### Storage +- Fixed bug related to SAS URI generation and storage emulator support. + +### Generated code notes +- [Azure REST API specs](https://github.com/Azure/azure-rest-api-specs) commit: ad55af74f3f0e2b390a4306532528168ba742fef +- [AutoRest Go extension](https://github.com/Azure/autorest.go) commit: 28a531c59c82cf67bc90c87095c1d34a936461b4 + +## `v10.3.0-beta` +### ARM + +| api | version | note | +|:------------------------------------|:-------------------|:------------------------------------| +| arm/containerinstance | 2017-08-01-preview | new | +| arm/eventgrid | 2017-06-15-preview | new | + +### ASM +- Marked as in mainteinance mode. +- Added Go 1.7 build tags. + +### Storage +- Support for Go 1.7 and Go 1.6 (except table batch operation tests). + +### Generated code notes +- [Azure REST API specs](https://github.com/Azure/azure-rest-api-specs) commit: ad55af74f3f0e2b390a4306532528168ba742fef +- [AutoRest](https://github.com/Azure/autorest) commit: cfb296f153f948f85afab637f7212fcfdc4a8bbb + ## `v10.2.1-beta` - Fixes polymorphic structs in `mysql` and `postgresql` packages. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/Gododir/gen.go b/vendor/github.com/Azure/azure-sdk-for-go/Gododir/gen.go index f81b09e05..afeff13cb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/Gododir/gen.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/Gododir/gen.go @@ -16,41 +16,22 @@ import ( ) type service struct { - Name string - Fullname string - Namespace string - Packages []string - TaskName string - Version string - Input string - Output string - Swagger string - SubServices []service - Modeler modeler - Extension extension + Name string + Fullname string + Namespace string + TaskName string + Tag string + Input string + Output string } -type modeler string - -const ( - swagger modeler = "Swagger" - compSwagger modeler = "CompositeSwagger" -) - -type extension string - -const ( - md extension = "md" - json extension = "json" -) - const ( testsSubDir = "tests" ) type mapping struct { - Plane string - InputPrefix string + PlaneInput string + PlaneOutput string Services []service } @@ -64,418 +45,174 @@ var ( services = []*service{} servicesMapping = []mapping{ { - Plane: "arm", - InputPrefix: "arm-", + PlaneOutput: "arm", + PlaneInput: "resource-manager", Services: []service{ - { - Name: "advisor", - Version: "2017-04-19", - }, - { - Name: "analysisservices", - Version: "2016-05-16", - }, - { - Name: "apimanagement", - Swagger: "compositeApiManagementClient", - Modeler: compSwagger, - }, - { - Name: "appinsights", - Swagger: "compositeAppInsightsManagementClient", - Modeler: compSwagger, - }, - { - Name: "authorization", - Version: "2015-07-01", - }, - { - Name: "automation", - Swagger: "compositeAutomation", - Modeler: compSwagger, - }, - { - Name: "batch", - Version: "2017-01-01", - Swagger: "BatchManagement", - }, - { - Name: "billing", - Version: "2017-04-24-preview", - }, - { - Name: "cdn", - Version: "2016-10-02", - }, - { - // bug in AutoRest (duplicated files) - Name: "cognitiveservices", - // Version: "2017-04-18", - Version: "2016-02-01-preview", - }, - { - Name: "commerce", - Version: "2015-06-01-preview", - }, - { - Name: "compute", - Version: "2016-04-30-preview", - }, - { - Name: "containerservice", - Version: "2017-01-31", - Swagger: "containerService", - Input: "compute", - }, - { - Name: "consumption", - Version: "2017-04-24-preview", - }, - { - Name: "containerregistry", - Version: "2017-03-01", - }, - { - Name: "cosmos-db", - Version: "2015-04-08", - }, - { - Name: "customer-insights", - Version: "2017-01-01", - }, - { - Name: "datalake-analytics", - SubServices: []service{ - { - Name: "account", - Version: "2016-11-01", - }, - }, - }, - { - Name: "datalake-store", - SubServices: []service{ - { - Name: "account", - Version: "2016-11-01", - }, - }, - }, - { - Name: "devtestlabs", - Version: "2016-05-15", - Swagger: "DTL", - }, - { - Name: "disk", - Version: "2016-04-30-preview", - Swagger: "disk", - Input: "compute", - }, - { - Name: "dns", - Version: "2016-04-01", - }, + {Name: "advisor"}, + {Name: "analysisservices"}, // { - // Name: "documentdb", - // Version: "2015-04-08", + // Autorest Bug + // Name: "apimanagement", // }, - { - Name: "eventhub", - Version: "2015-08-01", - Swagger: "EventHub", - }, - { - Name: "graphrbac", - Swagger: "compositeGraphRbacManagementClient", - Modeler: compSwagger, - }, - { - Name: "hdinsight", - Swagger: "compositeHDInsight", - Modeler: compSwagger, - }, - { - Name: "insights", - Swagger: "compositeInsightsManagementClient", - Modeler: compSwagger, - }, - { - Name: "intune", - Version: "2015-01-14-preview", - }, - { - Name: "iothub", - Version: "2016-02-03", - }, - { - Name: "keyvault", - Version: "2015-06-01", - }, - { - Name: "logic", - Version: "2016-06-01", - }, - { - Name: "machinelearning", - SubServices: []service{ - { - Name: "commitmentplans", - Version: "2016-05-01-preview", - Swagger: "commitmentPlans", - Input: "machinelearning", - }, - { - Name: "webservices", - Version: "2017-01-01", - Input: "machinelearning", - }, - }, - }, - { - Name: "mediaservices", - Version: "2015-10-01", - Swagger: "media", - }, - { - Name: "mobileengagement", - Version: "2014-12-01", - Swagger: "mobile-engagement", - }, - { - Name: "monitor", - Swagger: "compositeMonitorManagementClient", - Modeler: compSwagger, - }, - { - Name: "mysql", - Version: "2017-04-30-preview", - }, - { - Name: "network", - Swagger: "compositeNetworkClient", - Modeler: compSwagger, - }, - { - Name: "notificationhubs", - Version: "2017-04-01", - }, - { - // bug in the Go generator https://github.com/Azure/autorest/issues/2219 - Name: "operationalinsights", - // Swagger: "compositeOperationalInsights", - // Modeler: compSwagger, - Version: "2015-11-01-preview", - }, - { - Name: "postgresql", - Version: "2017-04-30-preview", - }, - { - Name: "powerbiembedded", - Version: "2016-01-29", - }, - { - // bug in the go generator - Name: "recoveryservices", - // Swagger: "compositeRecoveryServicesClient", - // Modeler: compSwagger, - Version: "2016-06-01", - Swagger: "vaults", - }, - { - // When using the readme.md, there is an exception in the modeler - Name: "recoveryservicesbackup", - Version: "2016-12-01", - // Swagger: "readme", - // Extension: md, - Swagger: "backupManagement", - }, - { - Name: "recoveryservicessiterecovery", - Version: "2016-08-10", - Swagger: "service", - }, - { - Name: "redis", - Version: "2016-04-01", - }, - { - Name: "relay", - Version: "2016-07-01", - }, - { - Name: "resourcehealth", - Version: "2015-01-01", - }, - { - Name: "resources", - SubServices: []service{ - { - Name: "features", - Version: "2015-12-01", - }, - { - Name: "links", - Version: "2016-09-01", - }, - { - Name: "locks", - Version: "2016-09-01", - }, - { - Name: "managedapplications", - Version: "2016-09-01-preview", - }, - { - Name: "policy", - Version: "2016-12-01", - }, - { - Name: "resources", - Version: "2016-09-01", - // Version: "2017-05-10", - }, - { - Name: "subscriptions", - Version: "2016-06-01", - }, - }, - }, - { - Name: "scheduler", - Version: "2016-03-01", - }, - { - Name: "search", - Version: "2015-08-19", - }, - { - Name: "servermanagement", - Version: "2016-07-01-preview", - }, - { - Name: "service-map", - Version: "2015-11-01-preview", - Swagger: "arm-service-map", - }, - { - Name: "servicebus", - Version: "2015-08-01", - }, - { - Name: "servicefabric", - Version: "2016-09-01", - }, + {Name: "appinsights"}, + {Name: "authorization"}, + {Name: "automation"}, + {Name: "batch"}, + {Name: "billing"}, + {Name: "cdn"}, // { - // Name: "sql", - // Swagger: "compositeSql", - // Modeler: compSwagger, + // bug in AutoRest (duplicated files) + // Name: "cognitiveservices", // }, + {Name: "commerce"}, + {Name: "compute"}, { - Name: "storage", - Version: "2016-12-01", + Name: "containerservice", + Input: "compute", + Tag: "package-container-service-2017-01", + }, + {Name: "consumption"}, + {Name: "containerinstance"}, + {Name: "containerregistry"}, + {Name: "cosmos-db"}, + {Name: "customer-insights"}, + { + Name: "account", + Input: "datalake-analytics", + Output: "datalake-analytics/account", }, { - Name: "storageimportexport", - Version: "2016-11-01", + Name: "account", + Input: "datalake-store", + Output: "datalake-store/account", + }, + {Name: "devtestlabs"}, + {Name: "dns"}, + {Name: "eventgrid"}, + {Name: "eventhub"}, + {Name: "hdinsight"}, + {Name: "intune"}, + {Name: "iothub"}, + {Name: "keyvault"}, + {Name: "logic"}, + { + Name: "commitmentplans", + Input: "machinelearning", + Output: "machinelearning/commitmentPlans", + Tag: "package-commitmentPlans-2016-05-preview", }, { - Name: "storsimple8000series", - Version: "2017-06-01", - Swagger: "storsimple", + Name: "webservices", + Input: "machinelearning", + Output: "machinelearning/webservices", + Tag: "package-webservices-2017-01", + }, + {Name: "mediaservices"}, + {Name: "mobileengagement"}, + {Name: "monitor"}, + {Name: "mysql"}, + {Name: "network"}, + {Name: "notificationhubs"}, + // { + // bug in the Go generator https://github.com/Azure/autorest/issues/2219 + // Name: "operationalinsights", + // }, + {Name: "postgresql"}, + {Name: "powerbiembedded"}, + {Name: "recoveryservices"}, + {Name: "recoveryservicesbackup"}, + {Name: "recoveryservicessiterecovery"}, + {Name: "redis"}, + {Name: "relay"}, + {Name: "resourcehealth"}, + { + Name: "features", + Input: "resources", + Output: "resources/features", + Tag: "package-features-2015-12", }, { - Name: "streamanalytics", - Swagger: "compositeStreamAnalytics", - Modeler: compSwagger, + Name: "links", + Input: "resources", + Output: "resources/links", + Tag: "package-links-2016-09", }, + { + Name: "locks", + Input: "resources", + Output: "resources/locks", + Tag: "package-locks-2016-09", + }, + { + Name: "managedapplications", + Input: "resources", + Output: "resources/managedapplications", + Tag: "package-managedapplications-2016-09", + }, + { + Name: "policy", + Input: "resources", + Output: "resources/policy", + Tag: "package-policy-2016-12", + }, + { + Name: "resources", + Input: "resources", + Output: "resources/resources", + Tag: "package-resources-2017-05", + }, + { + Name: "subscriptions", + Input: "resources", + Output: "resources/subscriptions", + Tag: "package-subscriptions-2016-06", + }, + {Name: "scheduler"}, + {Name: "search"}, + {Name: "servermanagement"}, + {Name: "service-map"}, + {Name: "servicebus"}, + {Name: "servicefabric"}, + {Name: "sql"}, + {Name: "storage"}, + {Name: "storageimportexport"}, + {Name: "storsimple8000series"}, + {Name: "streamanalytics"}, // { // error in the modeler // Name: "timeseriesinsights", - // Version: "2017-02-28-preview", // }, + {Name: "trafficmanager"}, + {Name: "visualstudio"}, + {Name: "web"}, + }, + }, + { + PlaneOutput: "dataplane", + PlaneInput: "data-plane", + Services: []service{ { - Name: "trafficmanager", - Version: "2015-11-01", - }, - { - Name: "web", - Swagger: "compositeWebAppClient", - Modeler: compSwagger, + Name: "keyvault", }, }, }, { - Plane: "dataplane", - InputPrefix: "", + PlaneInput: "data-plane", Services: []service{ - // { - // Name: "batch", - // Version: "2017-01-01.4.0", - // Swagger: "BatchService", - // }, - // { - // Name: "insights", - // Swagger: "compositeInsightsClient", - // Modeler: compSwagger, - // }, { - Name: "keyvault", - Version: "2016-10-01", + Name: "filesystem", + Input: "datalake-store", + Output: "datalake-store/filesystem", }, - // { - // Name: "monitor", - // Swagger: "compositeMonitorClient", - // Modeler: compSwagger, - // }, - // { - // Name: "search", - // SubServices: []service{ - // { - // Name: "searchindex", - // Version: "2016-09-01", - // Input: "search", - // }, - // { - // Name: "searchservice", - // Version: "2016-09-01", - // Input: "search", - // }, - // }, - // }, - // { - // Name: "servicefabric", - // Version: "2016-01-28", - // }, }, }, { - Plane: "", - InputPrefix: "arm-", + PlaneOutput: "arm", + PlaneInput: "data-plane", Services: []service{ { - Name: "datalake-store", - SubServices: []service{ - { - Name: "filesystem", - Version: "2016-11-01", - }, - }, + Name: "graphrbac", }, - // { - // Name: "datalake-analytics", - // SubServices: []service{ - // { - // Name: "catalog", - // Version: "2016-11-01", - // }, - // { - // Name: "job", - // Version: "2016-11-01", - // }, - // }, - // }, }, }, } @@ -486,52 +223,27 @@ func main() { swg := swaggerGroup for _, service := range swg.Services { s := service - initAndAddService(&s, swg.InputPrefix, swg.Plane) + initAndAddService(&s, swg.PlaneInput, swg.PlaneOutput) } } do.Godo(tasks) } -func initAndAddService(service *service, inputPrefix, plane string) { - if service.Swagger == "" { - service.Swagger = service.Name +func initAndAddService(service *service, planeInput, planeOutput string) { + if service.Input == "" { + service.Input = service.Name } - if service.Extension == "" { - service.Extension = json - } - packages := append(service.Packages, service.Name) - service.TaskName = fmt.Sprintf("%s>%s", plane, strings.Join(packages, ">")) - service.Fullname = filepath.Join(plane, strings.Join(packages, string(os.PathSeparator))) - if service.Modeler == compSwagger { - service.Input = filepath.Join(inputPrefix+strings.Join(packages, string(os.PathSeparator)), service.Swagger) - } else { - input := []string{} - if service.Input == "" { - input = append(input, inputPrefix+strings.Join(packages, string(os.PathSeparator))) - } else { - input = append(input, inputPrefix+service.Input) - } - input = append(input, service.Version) - if service.Extension == json { - input = append(input, "swagger") - } - input = append(input, service.Swagger) - service.Input = filepath.Join(input...) - service.Modeler = swagger + service.Input = filepath.Join(service.Input, planeInput, "readme.md") + if service.Output == "" { + service.Output = service.Name } + service.TaskName = fmt.Sprintf("%s>%s", planeOutput, strings.Join(strings.Split(service.Output, "/"), ">")) + service.Fullname = filepath.Join(planeOutput, service.Output) service.Namespace = filepath.Join("github.com", "Azure", "azure-sdk-for-go", service.Fullname) service.Output = filepath.Join(gopath, "src", service.Namespace) - if service.SubServices != nil { - for _, subs := range service.SubServices { - ss := subs - ss.Packages = append(ss.Packages, service.Name) - initAndAddService(&ss, inputPrefix, plane) - } - } else { - services = append(services, service) - deps = append(deps, service.TaskName) - } + services = append(services, service) + deps = append(deps, service.TaskName) } func tasks(p *do.Project) { @@ -542,7 +254,6 @@ func tasks(p *do.Project) { p.Use("gobuild", buildTasks) p.Use("golint", lintTasks) p.Use("govet", vetTasks) - p.Use("delete", deleteTasks) p.Task("management", do.S{"setvars"}, managementVersion) p.Task("addVersion", nil, addVersion) } @@ -554,7 +265,7 @@ func setVars(c *do.Context) { sdkVersion = c.Args.MustString("s", "sdk", "version") autorestDir = c.Args.MayString("", "a", "ar", "autorest") - swaggersDir = c.Args.MayString("C:/", "w", "sw", "swagger") + swaggersDir = c.Args.MayString("", "w", "sw", "swagger") testGen = c.Args.MayBool(false, "t", "testgen") } @@ -563,44 +274,49 @@ func generateTasks(p *do.Project) { } func generate(service *service) { - codegen := "Go" + codegen := "--go" if testGen { - codegen = "Go.TestGen" + codegen = "--go.testgen" service.Fullname = strings.Join([]string{service.Fullname, testsSubDir}, string(os.PathSeparator)) service.Output = filepath.Join(service.Output, testsSubDir) } fmt.Printf("Generating %s...\n\n", service.Fullname) - delete(service) + fullInput := "" + if swaggersDir == "" { + fullInput = fmt.Sprintf("https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/%s", service.Input) + } else { + fullInput = filepath.Join(swaggersDir, "azure-rest-api-specs", "specification", service.Input) + } execCommand := "autorest" commandArgs := []string{ - "-Input", filepath.Join(swaggersDir, "azure-rest-api-specs", service.Input+"."+string(service.Extension)), - "-CodeGenerator", codegen, - "-Header", "MICROSOFT_APACHE", - "-Namespace", service.Name, - "-OutputDirectory", service.Output, - "-Modeler", string(service.Modeler), - "-PackageVersion", sdkVersion, + fullInput, + codegen, + "--license-header=MICROSOFT_APACHE", + fmt.Sprintf("--namespace=%s", service.Name), + fmt.Sprintf("--output-folder=%s", service.Output), + fmt.Sprintf("--package-version=%s", sdkVersion), + "--clear-output-folder", + "--can-clear-output-folder", + } + if service.Tag != "" { + commandArgs = append(commandArgs, fmt.Sprintf("--tag=%s", service.Tag)) } if testGen { commandArgs = append([]string{"-LEGACY"}, commandArgs...) } - // default to the current directory - workingDir := "" - if autorestDir != "" { // if an AutoRest directory was specified then assume // the caller wants to use a locally-built version. - execCommand = "gulp" - commandArgs = append([]string{"autorest"}, commandArgs...) - workingDir = filepath.Join(autorestDir, "autorest") + commandArgs = append(commandArgs, fmt.Sprintf("--use=%s", autorestDir)) } autorest := exec.Command(execCommand, commandArgs...) - autorest.Dir = workingDir + + fmt.Println(commandArgs) if _, err := runner(autorest); err != nil { panic(fmt.Errorf("Autorest error: %s", err)) @@ -612,18 +328,6 @@ func generate(service *service) { vet(service) } -func deleteTasks(p *do.Project) { - addTasks(format, p) -} - -func delete(service *service) { - fmt.Printf("Deleting %s...\n\n", service.Fullname) - err := os.RemoveAll(service.Output) - if err != nil { - panic(fmt.Sprintf("Error deleting %s : %s\n", service.Output, err)) - } -} - func formatTasks(p *do.Project) { addTasks(format, p) } @@ -702,7 +406,9 @@ func managementVersion(c *do.Context) { func version(packageName string) { versionFile := filepath.Join(packageName, "version.go") os.Remove(versionFile) - template := `package %s + template := `// +build go1.7 + +package %s var ( sdkVersion = "%s" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/NOTICE b/vendor/github.com/Azure/azure-sdk-for-go/NOTICE new file mode 100644 index 000000000..2d1d72608 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/NOTICE @@ -0,0 +1,5 @@ +Microsoft Azure-SDK-for-Go +Copyright 2014-2017 Microsoft + +This product includes software developed at +the Microsoft Corporation (https://www.microsoft.com). diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/version.go index fd83eed1e..678f32810 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/version.go @@ -14,15 +14,15 @@ package advisor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-advisor/2017-04-19" + return "Azure-SDK-For-Go/v10.3.1-beta arm-advisor/2017-04-19" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/version.go index fbe561d26..5f9852db9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/version.go @@ -14,15 +14,15 @@ package analysisservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-analysisservices/2016-05-16" + return "Azure-SDK-For-Go/v10.3.1-beta arm-analysisservices/2017-08-01-beta" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/version.go index 0ec31d218..432984f9d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/version.go @@ -14,15 +14,15 @@ package appinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-appinsights/" + return "Azure-SDK-For-Go/v10.3.1-beta arm-appinsights/2015-05-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/version.go index 6a439d70a..63783b42f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/version.go @@ -14,15 +14,15 @@ package authorization // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-authorization/2015-07-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-authorization/2015-07-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/version.go index 2ae93d27a..7429960ae 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/version.go @@ -14,15 +14,15 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-automation/" + return "Azure-SDK-For-Go/v10.3.1-beta arm-automation/2015-10-31" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/version.go index 372912538..b67c0d54c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/version.go @@ -14,15 +14,15 @@ package batch // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-batch/2017-01-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-batch/2017-05-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/version.go index fa923de26..d07688eb6 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/version.go @@ -14,15 +14,15 @@ package billing // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-billing/2017-04-24-preview" + return "Azure-SDK-For-Go/v10.3.1-beta arm-billing/2017-04-24-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/version.go index 0686ea319..68d77a1c2 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/version.go @@ -14,15 +14,15 @@ package cdn // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-cdn/2016-10-02" + return "Azure-SDK-For-Go/v10.3.1-beta arm-cdn/2016-10-02" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/version.go index cfcd51a92..5a5172f5c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/version.go @@ -14,15 +14,15 @@ package commerce // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-commerce/2015-06-01-preview" + return "Azure-SDK-For-Go/v10.3.1-beta arm-commerce/2015-06-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/version.go index 862d94e25..b9d4e2699 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/version.go @@ -14,15 +14,15 @@ package compute // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-compute/2016-04-30-preview" + return "Azure-SDK-For-Go/v10.3.1-beta arm-compute/" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/version.go index 6a1aa180d..8835f23e6 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/version.go @@ -14,15 +14,15 @@ package consumption // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-consumption/2017-04-24-preview" + return "Azure-SDK-For-Go/v10.3.1-beta arm-consumption/2017-04-24-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/client.go new file mode 100644 index 000000000..8428722c5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/client.go @@ -0,0 +1,51 @@ +// Package containerinstance implements the Azure ARM Containerinstance service API version 2017-08-01-preview. +// +// +package containerinstance + +// Copyright (c) Microsoft and contributors. 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. +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Containerinstance + DefaultBaseURI = "https://management.azure.com" +) + +// ManagementClient is the base client for Containerinstance. +type ManagementClient struct { + autorest.Client + BaseURI string + SubscriptionID string +} + +// New creates an instance of the ManagementClient client. +func New(subscriptionID string) ManagementClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWithBaseURI creates an instance of the ManagementClient client. +func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { + return ManagementClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containergroups.go new file mode 100644 index 000000000..0396dac00 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containergroups.go @@ -0,0 +1,512 @@ +package containerinstance + +// Copyright (c) Microsoft and contributors. 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. +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// ContainerGroupsClient is the client for the ContainerGroups methods of the Containerinstance service. +type ContainerGroupsClient struct { + ManagementClient +} + +// NewContainerGroupsClient creates an instance of the ContainerGroupsClient client. +func NewContainerGroupsClient(subscriptionID string) ContainerGroupsClient { + return NewContainerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client. +func NewContainerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupsClient { + return ContainerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update container groups. +// +// resourceGroupName is azure resource group name containerGroupName is container group name containerGroup is +// definition of the container to be created. +func (client ContainerGroupsClient) CreateOrUpdate(resourceGroupName string, containerGroupName string, containerGroup ContainerGroup) (result ContainerGroup, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: containerGroup, + Constraints: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties.IPAddress", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties.IPAddress.Ports", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "containerGroup.ContainerGroupProperties.IPAddress.Type", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate") + } + + req, err := client.CreateOrUpdatePreparer(resourceGroupName, containerGroupName, containerGroup) + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ContainerGroupsClient) CreateOrUpdatePreparer(resourceGroupName string, containerGroupName string, containerGroup ContainerGroup) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerGroupName": autorest.Encode("path", containerGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-08-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", pathParameters), + autorest.WithJSON(containerGroup), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ContainerGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ContainerGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete container groups. +// +// resourceGroupName is azure resource group name containerGroupName is name of the container group to be deleted +func (client ContainerGroupsClient) Delete(resourceGroupName string, containerGroupName string) (result ContainerGroup, err error) { + req, err := client.DeletePreparer(resourceGroupName, containerGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ContainerGroupsClient) DeletePreparer(resourceGroupName string, containerGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerGroupName": autorest.Encode("path", containerGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-08-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ContainerGroupsClient) DeleteResponder(resp *http.Response) (result ContainerGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get details for this container group. +// +// resourceGroupName is azure resource group name containerGroupName is container group name +func (client ContainerGroupsClient) Get(resourceGroupName string, containerGroupName string) (result ContainerGroup, err error) { + req, err := client.GetPreparer(resourceGroupName, containerGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ContainerGroupsClient) GetPreparer(resourceGroupName string, containerGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerGroupName": autorest.Encode("path", containerGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-08-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ContainerGroupsClient) GetResponder(resp *http.Response) (result ContainerGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get the list of container groups in a given subscription. +func (client ContainerGroupsClient) List() (result ContainerGroupListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ContainerGroupsClient) ListPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-08-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerGroupsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ContainerGroupsClient) ListResponder(resp *http.Response) (result ContainerGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client ContainerGroupsClient) ListNextResults(lastResults ContainerGroupListResult) (result ContainerGroupListResult, err error) { + req, err := lastResults.ContainerGroupListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client ContainerGroupsClient) ListComplete(cancel <-chan struct{}) (<-chan ContainerGroup, <-chan error) { + resultChan := make(chan ContainerGroup) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup get the list of container groups in a given resource group. +// +// resourceGroupName is azure resource group name +func (client ContainerGroupsClient) ListByResourceGroup(resourceGroupName string) (result ContainerGroupListResult, err error) { + req, err := client.ListByResourceGroupPreparer(resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ContainerGroupsClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-08-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ContainerGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result ContainerGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroupNextResults retrieves the next set of results, if any. +func (client ContainerGroupsClient) ListByResourceGroupNextResults(lastResults ContainerGroupListResult) (result ContainerGroupListResult, err error) { + req, err := lastResults.ContainerGroupListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "ListByResourceGroup", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "ListByResourceGroup", resp, "Failure sending next results request") + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "ListByResourceGroup", resp, "Failure responding to next results request") + } + + return +} + +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client ContainerGroupsClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan ContainerGroup, <-chan error) { + resultChan := make(chan ContainerGroup) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containerlogs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containerlogs.go new file mode 100644 index 000000000..c11264b18 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containerlogs.go @@ -0,0 +1,109 @@ +package containerinstance + +// Copyright (c) Microsoft and contributors. 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. +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ContainerLogsClient is the client for the ContainerLogs methods of the Containerinstance service. +type ContainerLogsClient struct { + ManagementClient +} + +// NewContainerLogsClient creates an instance of the ContainerLogsClient client. +func NewContainerLogsClient(subscriptionID string) ContainerLogsClient { + return NewContainerLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewContainerLogsClientWithBaseURI creates an instance of the ContainerLogsClient client. +func NewContainerLogsClientWithBaseURI(baseURI string, subscriptionID string) ContainerLogsClient { + return ContainerLogsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List get the logs for this container. +// +// resourceGroupName is azure resource group name containerName is container name containerGroupName is container group +// name tail is only show this number of log lines. If not provided, all available logs are shown. +func (client ContainerLogsClient) List(resourceGroupName string, containerName string, containerGroupName string, tail *int32) (result Logs, err error) { + req, err := client.ListPreparer(resourceGroupName, containerName, containerGroupName, tail) + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ContainerLogsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerinstance.ContainerLogsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerinstance.ContainerLogsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ContainerLogsClient) ListPreparer(resourceGroupName string, containerName string, containerGroupName string, tail *int32) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerGroupName": autorest.Encode("path", containerGroupName), + "containerName": autorest.Encode("path", containerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-08-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if tail != nil { + queryParameters["tail"] = autorest.Encode("query", *tail) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/logs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerLogsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ContainerLogsClient) ListResponder(resp *http.Response) (result Logs, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/models.go new file mode 100644 index 000000000..51aea50b0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/models.go @@ -0,0 +1,223 @@ +package containerinstance + +// Copyright (c) Microsoft and contributors. 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. +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "net/http" +) + +// ContainerGroupNetworkProtocol enumerates the values for container group network protocol. +type ContainerGroupNetworkProtocol string + +const ( + // TCP specifies the tcp state for container group network protocol. + TCP ContainerGroupNetworkProtocol = "TCP" + // UDP specifies the udp state for container group network protocol. + UDP ContainerGroupNetworkProtocol = "UDP" +) + +// ContainerRestartPolicy enumerates the values for container restart policy. +type ContainerRestartPolicy string + +const ( + // Always specifies the always state for container restart policy. + Always ContainerRestartPolicy = "always" +) + +// OperatingSystemTypes enumerates the values for operating system types. +type OperatingSystemTypes string + +const ( + // Linux specifies the linux state for operating system types. + Linux OperatingSystemTypes = "Linux" + // Windows specifies the windows state for operating system types. + Windows OperatingSystemTypes = "Windows" +) + +// AzureFileVolume is the Azure file volume. +type AzureFileVolume struct { + ShareName *string `json:"shareName,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + StorageAccountName *string `json:"storageAccountName,omitempty"` + StorageAccountKey *string `json:"storageAccountKey,omitempty"` +} + +// Container is a container instance. +type Container struct { + Name *string `json:"name,omitempty"` + *ContainerProperties `json:"properties,omitempty"` +} + +// ContainerEvent is a container event. +type ContainerEvent struct { + Count *int32 `json:"count,omitempty"` + FirstTimestamp *date.Time `json:"firstTimestamp,omitempty"` + LastTimestamp *date.Time `json:"lastTimestamp,omitempty"` + Message *string `json:"message,omitempty"` + Type *string `json:"type,omitempty"` +} + +// ContainerGroup is a container group. +type ContainerGroup struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *ContainerGroupProperties `json:"properties,omitempty"` +} + +// ContainerGroupProperties is +type ContainerGroupProperties struct { + ProvisioningState *string `json:"provisioningState,omitempty"` + Containers *[]Container `json:"containers,omitempty"` + ImageRegistryCredentials *[]ImageRegistryCredential `json:"imageRegistryCredentials,omitempty"` + RestartPolicy ContainerRestartPolicy `json:"restartPolicy,omitempty"` + IPAddress *IPAddress `json:"ipAddress,omitempty"` + OsType OperatingSystemTypes `json:"osType,omitempty"` + State *string `json:"state,omitempty"` + Volumes *[]Volume `json:"volumes,omitempty"` +} + +// ContainerGroupListResult is the container group list response that contains the container group properties. +type ContainerGroupListResult struct { + autorest.Response `json:"-"` + Value *[]ContainerGroup `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// ContainerGroupListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client ContainerGroupListResult) ContainerGroupListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// ContainerPort is the container port. +type ContainerPort struct { + Port *int32 `json:"port,omitempty"` +} + +// ContainerProperties is the container properties. +type ContainerProperties struct { + Image *string `json:"image,omitempty"` + Command *[]string `json:"command,omitempty"` + Ports *[]ContainerPort `json:"ports,omitempty"` + EnvironmentVariables *[]EnvironmentVariable `json:"environmentVariables,omitempty"` + InstanceView *ContainerPropertiesInstanceView `json:"instanceView,omitempty"` + Resources *ResourceRequirements `json:"resources,omitempty"` + VolumeMounts *[]VolumeMount `json:"volumeMounts,omitempty"` +} + +// ContainerPropertiesInstanceView is the instance view of the container. Only valid in response. +type ContainerPropertiesInstanceView struct { + RestartCount *int32 `json:"restartCount,omitempty"` + CurrentState *ContainerState `json:"currentState,omitempty"` + PreviousState *ContainerState `json:"previousState,omitempty"` + Events *[]ContainerEvent `json:"events,omitempty"` +} + +// ContainerState is the container state. +type ContainerState struct { + State *string `json:"state,omitempty"` + StartTime *date.Time `json:"startTime,omitempty"` + ExitCode *int32 `json:"exitCode,omitempty"` + FinishTime *date.Time `json:"finishTime,omitempty"` + DetailStatus *string `json:"detailStatus,omitempty"` +} + +// EnvironmentVariable is environment variable to set within the container. +type EnvironmentVariable struct { + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} + +// ImageRegistryCredential is image registry credential. +type ImageRegistryCredential struct { + Server *string `json:"server,omitempty"` + Username *string `json:"username,omitempty"` + Password *string `json:"password,omitempty"` +} + +// IPAddress is IP address for the group. +type IPAddress struct { + Ports *[]Port `json:"ports,omitempty"` + Type *string `json:"type,omitempty"` + IP *string `json:"ip,omitempty"` +} + +// Logs is the logs. +type Logs struct { + autorest.Response `json:"-"` + Content *string `json:"content,omitempty"` +} + +// Port is the port. +type Port struct { + Protocol ContainerGroupNetworkProtocol `json:"protocol,omitempty"` + Port *int32 `json:"port,omitempty"` +} + +// Resource is the Resource model definition. +type Resource struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} + +// ResourceLimits is the resource limits. +type ResourceLimits struct { + MemoryInGB *float64 `json:"memoryInGB,omitempty"` + CPU *float64 `json:"cpu,omitempty"` +} + +// ResourceRequests is the resource requests. +type ResourceRequests struct { + MemoryInGB *float64 `json:"memoryInGB,omitempty"` + CPU *float64 `json:"cpu,omitempty"` +} + +// ResourceRequirements is the resource requirements. +type ResourceRequirements struct { + Requests *ResourceRequests `json:"requests,omitempty"` + Limits *ResourceLimits `json:"limits,omitempty"` +} + +// Volume is the volume. +type Volume struct { + Name *string `json:"name,omitempty"` + AzureFile *AzureFileVolume `json:"azureFile,omitempty"` +} + +// VolumeMount is the volume mount. +type VolumeMount struct { + Name *string `json:"name,omitempty"` + MountPath *string `json:"mountPath,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/version.go new file mode 100644 index 000000000..d62e4bc37 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/version.go @@ -0,0 +1,28 @@ +package containerinstance + +// Copyright (c) Microsoft and contributors. 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. +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/v10.3.1-beta arm-containerinstance/2017-08-01-preview" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return "v10.3.1-beta" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/version.go index ca7af7c6c..9b3a4037a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/version.go @@ -14,15 +14,15 @@ package containerregistry // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-containerregistry/2017-03-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-containerregistry/2017-06-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/version.go index 8765e77b6..07bef1e72 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/version.go @@ -14,15 +14,15 @@ package containerservice // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-containerservice/2017-01-31" + return "Azure-SDK-For-Go/v10.3.1-beta arm-containerservice/2017-01-31" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/version.go index fc21cb159..4bfe34cfc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/version.go @@ -14,15 +14,15 @@ package cosmosdb // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-cosmosdb/2015-04-08" + return "Azure-SDK-For-Go/v10.3.1-beta arm-cosmosdb/2015-04-08" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/version.go index 35b9ec100..6bdf9b971 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/version.go @@ -14,15 +14,15 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-customerinsights/2017-01-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-customerinsights/2017-04-26" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/version.go index 3f201d353..62f3860b0 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/version.go @@ -14,15 +14,15 @@ package account // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-account/2016-11-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-account/2016-11-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/version.go index 3f201d353..62f3860b0 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/version.go @@ -14,15 +14,15 @@ package account // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-account/2016-11-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-account/2016-11-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/version.go index 127a7972c..0729f19be 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/version.go @@ -14,15 +14,15 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-devtestlabs/2016-05-15" + return "Azure-SDK-For-Go/v10.3.1-beta arm-devtestlabs/2016-05-15" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/version.go index dd8f8b73b..97933554a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/version.go @@ -14,15 +14,15 @@ package dns // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-dns/2016-04-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-dns/2016-04-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/client.go new file mode 100644 index 000000000..52f4456ea --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/client.go @@ -0,0 +1,51 @@ +// Package eventgrid implements the Azure ARM Eventgrid service API version 2017-06-15-preview. +// +// Azure EventGrid Management Client +package eventgrid + +// Copyright (c) Microsoft and contributors. 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. +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Eventgrid + DefaultBaseURI = "https://management.azure.com" +) + +// ManagementClient is the base client for Eventgrid. +type ManagementClient struct { + autorest.Client + BaseURI string + SubscriptionID string +} + +// New creates an instance of the ManagementClient client. +func New(subscriptionID string) ManagementClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWithBaseURI creates an instance of the ManagementClient client. +func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { + return ManagementClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/eventsubscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/eventsubscriptions.go new file mode 100644 index 000000000..994b6048a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/eventsubscriptions.go @@ -0,0 +1,1040 @@ +package eventgrid + +// Copyright (c) Microsoft and contributors. 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. +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// EventSubscriptionsClient is the azure EventGrid Management Client +type EventSubscriptionsClient struct { + ManagementClient +} + +// NewEventSubscriptionsClient creates an instance of the EventSubscriptionsClient client. +func NewEventSubscriptionsClient(subscriptionID string) EventSubscriptionsClient { + return NewEventSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client. +func NewEventSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) EventSubscriptionsClient { + return EventSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create asynchronously creates a new event subscription to the specified scope. Existing event subscriptions cannot +// be updated with this API and should instead use the Update event subscription API. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. +// +// scope is the scope of the resource to which the event subscription needs to be created. The scope can be a +// subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an +// EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, +// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and +// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' +// for a resource, and +// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' +// for an EventGrid topic. eventSubscriptionName is name of the event subscription to be created. Event subscription +// names must be between 3 and 64 characters in length and use alphanumeric letters only. eventSubscriptionInfo is +// event subscription properties containing the destination and filter information +func (client EventSubscriptionsClient) Create(scope string, eventSubscriptionName string, eventSubscriptionInfo EventSubscription, cancel <-chan struct{}) (<-chan EventSubscription, <-chan error) { + resultChan := make(chan EventSubscription, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result EventSubscription + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreatePreparer(scope, eventSubscriptionName, eventSubscriptionInfo, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "Create", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreatePreparer prepares the Create request. +func (client EventSubscriptionsClient) CreatePreparer(scope string, eventSubscriptionName string, eventSubscriptionInfo EventSubscription, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "eventSubscriptionName": autorest.Encode("path", eventSubscriptionName), + "scope": scope, + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", pathParameters), + autorest.WithJSON(eventSubscriptionInfo), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client EventSubscriptionsClient) CreateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client EventSubscriptionsClient) CreateResponder(resp *http.Response) (result EventSubscription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete an existing event subscription This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// scope is the scope of the event subscription. The scope can be a subscription, or a resource group, or a top level +// resource belonging to a resource provider namespace, or an EventGrid topic. For example, use +// '/subscriptions/{subscriptionId}/' for a subscription, +// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and +// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' +// for a resource, and +// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' +// for an EventGrid topic. eventSubscriptionName is name of the event subscription +func (client EventSubscriptionsClient) Delete(scope string, eventSubscriptionName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(scope, eventSubscriptionName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client EventSubscriptionsClient) DeletePreparer(scope string, eventSubscriptionName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "eventSubscriptionName": autorest.Encode("path", eventSubscriptionName), + "scope": scope, + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client EventSubscriptionsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client EventSubscriptionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get properties of an event subscription +// +// scope is the scope of the event subscription. The scope can be a subscription, or a resource group, or a top level +// resource belonging to a resource provider namespace, or an EventGrid topic. For example, use +// '/subscriptions/{subscriptionId}/' for a subscription, +// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and +// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' +// for a resource, and +// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' +// for an EventGrid topic. eventSubscriptionName is name of the event subscription +func (client EventSubscriptionsClient) Get(scope string, eventSubscriptionName string) (result EventSubscription, err error) { + req, err := client.GetPreparer(scope, eventSubscriptionName) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client EventSubscriptionsClient) GetPreparer(scope string, eventSubscriptionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "eventSubscriptionName": autorest.Encode("path", eventSubscriptionName), + "scope": scope, + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client EventSubscriptionsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client EventSubscriptionsClient) GetResponder(resp *http.Response) (result EventSubscription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetFullURL get the full endpoint URL for an event subscription +// +// scope is the scope of the event subscription. The scope can be a subscription, or a resource group, or a top level +// resource belonging to a resource provider namespace, or an EventGrid topic. For example, use +// '/subscriptions/{subscriptionId}/' for a subscription, +// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and +// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' +// for a resource, and +// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' +// for an EventGrid topic. eventSubscriptionName is name of the event subscription +func (client EventSubscriptionsClient) GetFullURL(scope string, eventSubscriptionName string) (result EventSubscriptionFullURL, err error) { + req, err := client.GetFullURLPreparer(scope, eventSubscriptionName) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "GetFullURL", nil, "Failure preparing request") + return + } + + resp, err := client.GetFullURLSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "GetFullURL", resp, "Failure sending request") + return + } + + result, err = client.GetFullURLResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "GetFullURL", resp, "Failure responding to request") + } + + return +} + +// GetFullURLPreparer prepares the GetFullURL request. +func (client EventSubscriptionsClient) GetFullURLPreparer(scope string, eventSubscriptionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "eventSubscriptionName": autorest.Encode("path", eventSubscriptionName), + "scope": scope, + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetFullURLSender sends the GetFullURL request. The method will close the +// http.Response Body if it receives an error. +func (client EventSubscriptionsClient) GetFullURLSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetFullURLResponder handles the response to the GetFullURL request. The method always +// closes the http.Response Body. +func (client EventSubscriptionsClient) GetFullURLResponder(resp *http.Response) (result EventSubscriptionFullURL, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResource list all event subscriptions that have been created for a specific topic +// +// resourceGroupName is the name of the resource group within the user's subscription. providerNamespace is namespace +// of the provider of the topic resourceTypeName is name of the resource type resourceName is name of the resource +func (client EventSubscriptionsClient) ListByResource(resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string) (result EventSubscriptionsListResult, err error) { + req, err := client.ListByResourcePreparer(resourceGroupName, providerNamespace, resourceTypeName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListByResource", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListByResource", resp, "Failure sending request") + return + } + + result, err = client.ListByResourceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListByResource", resp, "Failure responding to request") + } + + return +} + +// ListByResourcePreparer prepares the ListByResource request. +func (client EventSubscriptionsClient) ListByResourcePreparer(resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "providerNamespace": autorest.Encode("path", providerNamespace), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "resourceTypeName": autorest.Encode("path", resourceTypeName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByResourceSender sends the ListByResource request. The method will close the +// http.Response Body if it receives an error. +func (client EventSubscriptionsClient) ListByResourceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByResourceResponder handles the response to the ListByResource request. The method always +// closes the http.Response Body. +func (client EventSubscriptionsClient) ListByResourceResponder(resp *http.Response) (result EventSubscriptionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListGlobalByResourceGroup list all global event subscriptions under a specific Azure subscription and resource group +// +// resourceGroupName is the name of the resource group within the user's subscription. +func (client EventSubscriptionsClient) ListGlobalByResourceGroup(resourceGroupName string) (result EventSubscriptionsListResult, err error) { + req, err := client.ListGlobalByResourceGroupPreparer(resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListGlobalByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListGlobalByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListGlobalByResourceGroupPreparer prepares the ListGlobalByResourceGroup request. +func (client EventSubscriptionsClient) ListGlobalByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/eventSubscriptions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListGlobalByResourceGroupSender sends the ListGlobalByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client EventSubscriptionsClient) ListGlobalByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListGlobalByResourceGroupResponder handles the response to the ListGlobalByResourceGroup request. The method always +// closes the http.Response Body. +func (client EventSubscriptionsClient) ListGlobalByResourceGroupResponder(resp *http.Response) (result EventSubscriptionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListGlobalByResourceGroupForTopicType list all global event subscriptions under a resource group for a specific +// topic type. +// +// resourceGroupName is the name of the resource group within the user's subscription. topicTypeName is name of the +// topic type +func (client EventSubscriptionsClient) ListGlobalByResourceGroupForTopicType(resourceGroupName string, topicTypeName string) (result EventSubscriptionsListResult, err error) { + req, err := client.ListGlobalByResourceGroupForTopicTypePreparer(resourceGroupName, topicTypeName) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalByResourceGroupForTopicType", nil, "Failure preparing request") + return + } + + resp, err := client.ListGlobalByResourceGroupForTopicTypeSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalByResourceGroupForTopicType", resp, "Failure sending request") + return + } + + result, err = client.ListGlobalByResourceGroupForTopicTypeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalByResourceGroupForTopicType", resp, "Failure responding to request") + } + + return +} + +// ListGlobalByResourceGroupForTopicTypePreparer prepares the ListGlobalByResourceGroupForTopicType request. +func (client EventSubscriptionsClient) ListGlobalByResourceGroupForTopicTypePreparer(resourceGroupName string, topicTypeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "topicTypeName": autorest.Encode("path", topicTypeName), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListGlobalByResourceGroupForTopicTypeSender sends the ListGlobalByResourceGroupForTopicType request. The method will close the +// http.Response Body if it receives an error. +func (client EventSubscriptionsClient) ListGlobalByResourceGroupForTopicTypeSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListGlobalByResourceGroupForTopicTypeResponder handles the response to the ListGlobalByResourceGroupForTopicType request. The method always +// closes the http.Response Body. +func (client EventSubscriptionsClient) ListGlobalByResourceGroupForTopicTypeResponder(resp *http.Response) (result EventSubscriptionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListGlobalBySubscription list all aggregated global event subscriptions under a specific Azure subscription +func (client EventSubscriptionsClient) ListGlobalBySubscription() (result EventSubscriptionsListResult, err error) { + req, err := client.ListGlobalBySubscriptionPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListGlobalBySubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalBySubscription", resp, "Failure sending request") + return + } + + result, err = client.ListGlobalBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalBySubscription", resp, "Failure responding to request") + } + + return +} + +// ListGlobalBySubscriptionPreparer prepares the ListGlobalBySubscription request. +func (client EventSubscriptionsClient) ListGlobalBySubscriptionPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/eventSubscriptions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListGlobalBySubscriptionSender sends the ListGlobalBySubscription request. The method will close the +// http.Response Body if it receives an error. +func (client EventSubscriptionsClient) ListGlobalBySubscriptionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListGlobalBySubscriptionResponder handles the response to the ListGlobalBySubscription request. The method always +// closes the http.Response Body. +func (client EventSubscriptionsClient) ListGlobalBySubscriptionResponder(resp *http.Response) (result EventSubscriptionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListGlobalBySubscriptionForTopicType list all global event subscriptions under an Azure subscription for a topic +// type. +// +// topicTypeName is name of the topic type +func (client EventSubscriptionsClient) ListGlobalBySubscriptionForTopicType(topicTypeName string) (result EventSubscriptionsListResult, err error) { + req, err := client.ListGlobalBySubscriptionForTopicTypePreparer(topicTypeName) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalBySubscriptionForTopicType", nil, "Failure preparing request") + return + } + + resp, err := client.ListGlobalBySubscriptionForTopicTypeSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalBySubscriptionForTopicType", resp, "Failure sending request") + return + } + + result, err = client.ListGlobalBySubscriptionForTopicTypeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalBySubscriptionForTopicType", resp, "Failure responding to request") + } + + return +} + +// ListGlobalBySubscriptionForTopicTypePreparer prepares the ListGlobalBySubscriptionForTopicType request. +func (client EventSubscriptionsClient) ListGlobalBySubscriptionForTopicTypePreparer(topicTypeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "topicTypeName": autorest.Encode("path", topicTypeName), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListGlobalBySubscriptionForTopicTypeSender sends the ListGlobalBySubscriptionForTopicType request. The method will close the +// http.Response Body if it receives an error. +func (client EventSubscriptionsClient) ListGlobalBySubscriptionForTopicTypeSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListGlobalBySubscriptionForTopicTypeResponder handles the response to the ListGlobalBySubscriptionForTopicType request. The method always +// closes the http.Response Body. +func (client EventSubscriptionsClient) ListGlobalBySubscriptionForTopicTypeResponder(resp *http.Response) (result EventSubscriptionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListRegionalByResourceGroup list all event subscriptions from the given location under a specific Azure subscription +// and resource group +// +// resourceGroupName is the name of the resource group within the user's subscription. location is name of the location +func (client EventSubscriptionsClient) ListRegionalByResourceGroup(resourceGroupName string, location string) (result EventSubscriptionsListResult, err error) { + req, err := client.ListRegionalByResourceGroupPreparer(resourceGroupName, location) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListRegionalByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListRegionalByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListRegionalByResourceGroupPreparer prepares the ListRegionalByResourceGroup request. +func (client EventSubscriptionsClient) ListRegionalByResourceGroupPreparer(resourceGroupName string, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListRegionalByResourceGroupSender sends the ListRegionalByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client EventSubscriptionsClient) ListRegionalByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListRegionalByResourceGroupResponder handles the response to the ListRegionalByResourceGroup request. The method always +// closes the http.Response Body. +func (client EventSubscriptionsClient) ListRegionalByResourceGroupResponder(resp *http.Response) (result EventSubscriptionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListRegionalByResourceGroupForTopicType list all event subscriptions from the given location under a specific Azure +// subscription and resource group and topic type +// +// resourceGroupName is the name of the resource group within the user's subscription. location is name of the location +// topicTypeName is name of the topic type +func (client EventSubscriptionsClient) ListRegionalByResourceGroupForTopicType(resourceGroupName string, location string, topicTypeName string) (result EventSubscriptionsListResult, err error) { + req, err := client.ListRegionalByResourceGroupForTopicTypePreparer(resourceGroupName, location, topicTypeName) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalByResourceGroupForTopicType", nil, "Failure preparing request") + return + } + + resp, err := client.ListRegionalByResourceGroupForTopicTypeSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalByResourceGroupForTopicType", resp, "Failure sending request") + return + } + + result, err = client.ListRegionalByResourceGroupForTopicTypeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalByResourceGroupForTopicType", resp, "Failure responding to request") + } + + return +} + +// ListRegionalByResourceGroupForTopicTypePreparer prepares the ListRegionalByResourceGroupForTopicType request. +func (client EventSubscriptionsClient) ListRegionalByResourceGroupForTopicTypePreparer(resourceGroupName string, location string, topicTypeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "topicTypeName": autorest.Encode("path", topicTypeName), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListRegionalByResourceGroupForTopicTypeSender sends the ListRegionalByResourceGroupForTopicType request. The method will close the +// http.Response Body if it receives an error. +func (client EventSubscriptionsClient) ListRegionalByResourceGroupForTopicTypeSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListRegionalByResourceGroupForTopicTypeResponder handles the response to the ListRegionalByResourceGroupForTopicType request. The method always +// closes the http.Response Body. +func (client EventSubscriptionsClient) ListRegionalByResourceGroupForTopicTypeResponder(resp *http.Response) (result EventSubscriptionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListRegionalBySubscription list all event subscriptions from the given location under a specific Azure subscription +// +// location is name of the location +func (client EventSubscriptionsClient) ListRegionalBySubscription(location string) (result EventSubscriptionsListResult, err error) { + req, err := client.ListRegionalBySubscriptionPreparer(location) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListRegionalBySubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalBySubscription", resp, "Failure sending request") + return + } + + result, err = client.ListRegionalBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalBySubscription", resp, "Failure responding to request") + } + + return +} + +// ListRegionalBySubscriptionPreparer prepares the ListRegionalBySubscription request. +func (client EventSubscriptionsClient) ListRegionalBySubscriptionPreparer(location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListRegionalBySubscriptionSender sends the ListRegionalBySubscription request. The method will close the +// http.Response Body if it receives an error. +func (client EventSubscriptionsClient) ListRegionalBySubscriptionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListRegionalBySubscriptionResponder handles the response to the ListRegionalBySubscription request. The method always +// closes the http.Response Body. +func (client EventSubscriptionsClient) ListRegionalBySubscriptionResponder(resp *http.Response) (result EventSubscriptionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListRegionalBySubscriptionForTopicType list all event subscriptions from the given location under a specific Azure +// subscription and topic type. +// +// location is name of the location topicTypeName is name of the topic type +func (client EventSubscriptionsClient) ListRegionalBySubscriptionForTopicType(location string, topicTypeName string) (result EventSubscriptionsListResult, err error) { + req, err := client.ListRegionalBySubscriptionForTopicTypePreparer(location, topicTypeName) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalBySubscriptionForTopicType", nil, "Failure preparing request") + return + } + + resp, err := client.ListRegionalBySubscriptionForTopicTypeSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalBySubscriptionForTopicType", resp, "Failure sending request") + return + } + + result, err = client.ListRegionalBySubscriptionForTopicTypeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalBySubscriptionForTopicType", resp, "Failure responding to request") + } + + return +} + +// ListRegionalBySubscriptionForTopicTypePreparer prepares the ListRegionalBySubscriptionForTopicType request. +func (client EventSubscriptionsClient) ListRegionalBySubscriptionForTopicTypePreparer(location string, topicTypeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "topicTypeName": autorest.Encode("path", topicTypeName), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListRegionalBySubscriptionForTopicTypeSender sends the ListRegionalBySubscriptionForTopicType request. The method will close the +// http.Response Body if it receives an error. +func (client EventSubscriptionsClient) ListRegionalBySubscriptionForTopicTypeSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListRegionalBySubscriptionForTopicTypeResponder handles the response to the ListRegionalBySubscriptionForTopicType request. The method always +// closes the http.Response Body. +func (client EventSubscriptionsClient) ListRegionalBySubscriptionForTopicTypeResponder(resp *http.Response) (result EventSubscriptionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update asynchronously updates an existing event subscription. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. +// +// scope is the scope of existing event subscription. The scope can be a subscription, or a resource group, or a top +// level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use +// '/subscriptions/{subscriptionId}/' for a subscription, +// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and +// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' +// for a resource, and +// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' +// for an EventGrid topic. eventSubscriptionName is name of the event subscription to be created +// eventSubscriptionUpdateParameters is updated event subscription information +func (client EventSubscriptionsClient) Update(scope string, eventSubscriptionName string, eventSubscriptionUpdateParameters EventSubscriptionUpdateParameters, cancel <-chan struct{}) (<-chan EventSubscription, <-chan error) { + resultChan := make(chan EventSubscription, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result EventSubscription + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.UpdatePreparer(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "Update", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// UpdatePreparer prepares the Update request. +func (client EventSubscriptionsClient) UpdatePreparer(scope string, eventSubscriptionName string, eventSubscriptionUpdateParameters EventSubscriptionUpdateParameters, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "eventSubscriptionName": autorest.Encode("path", eventSubscriptionName), + "scope": scope, + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", pathParameters), + autorest.WithJSON(eventSubscriptionUpdateParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client EventSubscriptionsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client EventSubscriptionsClient) UpdateResponder(resp *http.Response) (result EventSubscription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/models.go new file mode 100644 index 000000000..efcf8c3ad --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/models.go @@ -0,0 +1,292 @@ +package eventgrid + +// Copyright (c) Microsoft and contributors. 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. +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +// EndpointType enumerates the values for endpoint type. +type EndpointType string + +const ( + // WebHook specifies the web hook state for endpoint type. + WebHook EndpointType = "WebHook" +) + +// EventSubscriptionProvisioningState enumerates the values for event subscription provisioning state. +type EventSubscriptionProvisioningState string + +const ( + // Canceled specifies the canceled state for event subscription provisioning state. + Canceled EventSubscriptionProvisioningState = "Canceled" + // Creating specifies the creating state for event subscription provisioning state. + Creating EventSubscriptionProvisioningState = "Creating" + // Deleting specifies the deleting state for event subscription provisioning state. + Deleting EventSubscriptionProvisioningState = "Deleting" + // Failed specifies the failed state for event subscription provisioning state. + Failed EventSubscriptionProvisioningState = "Failed" + // Succeeded specifies the succeeded state for event subscription provisioning state. + Succeeded EventSubscriptionProvisioningState = "Succeeded" + // Updating specifies the updating state for event subscription provisioning state. + Updating EventSubscriptionProvisioningState = "Updating" +) + +// OperationOrigin enumerates the values for operation origin. +type OperationOrigin string + +const ( + // System specifies the system state for operation origin. + System OperationOrigin = "System" + // User specifies the user state for operation origin. + User OperationOrigin = "User" + // UserAndSystem specifies the user and system state for operation origin. + UserAndSystem OperationOrigin = "UserAndSystem" +) + +// ResourceRegionType enumerates the values for resource region type. +type ResourceRegionType string + +const ( + // GlobalResource specifies the global resource state for resource region type. + GlobalResource ResourceRegionType = "GlobalResource" + // RegionalResource specifies the regional resource state for resource region type. + RegionalResource ResourceRegionType = "RegionalResource" +) + +// TopicProvisioningState enumerates the values for topic provisioning state. +type TopicProvisioningState string + +const ( + // TopicProvisioningStateCanceled specifies the topic provisioning state canceled state for topic provisioning + // state. + TopicProvisioningStateCanceled TopicProvisioningState = "Canceled" + // TopicProvisioningStateCreating specifies the topic provisioning state creating state for topic provisioning + // state. + TopicProvisioningStateCreating TopicProvisioningState = "Creating" + // TopicProvisioningStateDeleting specifies the topic provisioning state deleting state for topic provisioning + // state. + TopicProvisioningStateDeleting TopicProvisioningState = "Deleting" + // TopicProvisioningStateFailed specifies the topic provisioning state failed state for topic provisioning state. + TopicProvisioningStateFailed TopicProvisioningState = "Failed" + // TopicProvisioningStateSucceeded specifies the topic provisioning state succeeded state for topic provisioning + // state. + TopicProvisioningStateSucceeded TopicProvisioningState = "Succeeded" + // TopicProvisioningStateUpdating specifies the topic provisioning state updating state for topic provisioning + // state. + TopicProvisioningStateUpdating TopicProvisioningState = "Updating" +) + +// TopicTypeProvisioningState enumerates the values for topic type provisioning state. +type TopicTypeProvisioningState string + +const ( + // TopicTypeProvisioningStateCanceled specifies the topic type provisioning state canceled state for topic type + // provisioning state. + TopicTypeProvisioningStateCanceled TopicTypeProvisioningState = "Canceled" + // TopicTypeProvisioningStateCreating specifies the topic type provisioning state creating state for topic type + // provisioning state. + TopicTypeProvisioningStateCreating TopicTypeProvisioningState = "Creating" + // TopicTypeProvisioningStateDeleting specifies the topic type provisioning state deleting state for topic type + // provisioning state. + TopicTypeProvisioningStateDeleting TopicTypeProvisioningState = "Deleting" + // TopicTypeProvisioningStateFailed specifies the topic type provisioning state failed state for topic type + // provisioning state. + TopicTypeProvisioningStateFailed TopicTypeProvisioningState = "Failed" + // TopicTypeProvisioningStateSucceeded specifies the topic type provisioning state succeeded state for topic type + // provisioning state. + TopicTypeProvisioningStateSucceeded TopicTypeProvisioningState = "Succeeded" + // TopicTypeProvisioningStateUpdating specifies the topic type provisioning state updating state for topic type + // provisioning state. + TopicTypeProvisioningStateUpdating TopicTypeProvisioningState = "Updating" +) + +// EventSubscription is event Subscription +type EventSubscription struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *EventSubscriptionProperties `json:"properties,omitempty"` +} + +// EventSubscriptionDestination is information about the destination for an event subscription +type EventSubscriptionDestination struct { + EndpointType EndpointType `json:"endpointType,omitempty"` + *EventSubscriptionDestinationProperties `json:"properties,omitempty"` +} + +// EventSubscriptionDestinationProperties is properties of the event subscription destination +type EventSubscriptionDestinationProperties struct { + EndpointURL *string `json:"endpointUrl,omitempty"` + EndpointBaseURL *string `json:"endpointBaseUrl,omitempty"` +} + +// EventSubscriptionFilter is filter for the Event Subscription +type EventSubscriptionFilter struct { + SubjectBeginsWith *string `json:"subjectBeginsWith,omitempty"` + SubjectEndsWith *string `json:"subjectEndsWith,omitempty"` + IncludedEventTypes *[]string `json:"includedEventTypes,omitempty"` + IsSubjectCaseSensitive *bool `json:"isSubjectCaseSensitive,omitempty"` +} + +// EventSubscriptionFullURL is full endpoint url of an event subscription +type EventSubscriptionFullURL struct { + autorest.Response `json:"-"` + EndpointURL *string `json:"endpointUrl,omitempty"` +} + +// EventSubscriptionProperties is properties of the Event Subscription +type EventSubscriptionProperties struct { + Topic *string `json:"topic,omitempty"` + ProvisioningState EventSubscriptionProvisioningState `json:"provisioningState,omitempty"` + Destination *EventSubscriptionDestination `json:"destination,omitempty"` + Filter *EventSubscriptionFilter `json:"filter,omitempty"` + Labels *[]string `json:"labels,omitempty"` +} + +// EventSubscriptionsListResult is result of the List EventSubscriptions operation +type EventSubscriptionsListResult struct { + autorest.Response `json:"-"` + Value *[]EventSubscription `json:"value,omitempty"` +} + +// EventSubscriptionUpdateParameters is properties of the Event Subscription update +type EventSubscriptionUpdateParameters struct { + Destination *EventSubscriptionDestination `json:"destination,omitempty"` + Filter *EventSubscriptionFilter `json:"filter,omitempty"` + Labels *[]string `json:"labels,omitempty"` +} + +// EventType is event Type for a subject under a topic +type EventType struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *EventTypeProperties `json:"properties,omitempty"` +} + +// EventTypeProperties is properties of the event type +type EventTypeProperties struct { + DisplayName *string `json:"displayName,omitempty"` + Description *string `json:"description,omitempty"` + SchemaURL *string `json:"schemaUrl,omitempty"` +} + +// EventTypesListResult is result of the List Event Types operation +type EventTypesListResult struct { + autorest.Response `json:"-"` + Value *[]EventType `json:"value,omitempty"` +} + +// Operation is represents an operation returned by the GetOperations request +type Operation struct { + Name *string `json:"name,omitempty"` + Display *OperationInfo `json:"display,omitempty"` + Origin OperationOrigin `json:"origin,omitempty"` + Properties *map[string]interface{} `json:"properties,omitempty"` +} + +// OperationInfo is information about an operation +type OperationInfo struct { + Provider *string `json:"provider,omitempty"` + Resource *string `json:"resource,omitempty"` + Operation *string `json:"operation,omitempty"` + Description *string `json:"description,omitempty"` +} + +// OperationsListResult is result of the List Operations operation +type OperationsListResult struct { + autorest.Response `json:"-"` + Value *[]Operation `json:"value,omitempty"` +} + +// Resource is definition of a Resource +type Resource struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +// Topic is eventGrid Topic +type Topic struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *TopicProperties `json:"properties,omitempty"` +} + +// TopicProperties is properties of the Topic +type TopicProperties struct { + ProvisioningState TopicProvisioningState `json:"provisioningState,omitempty"` + Endpoint *string `json:"endpoint,omitempty"` +} + +// TopicRegenerateKeyRequest is topic regenerate share access key key request +type TopicRegenerateKeyRequest struct { + KeyName *string `json:"keyName,omitempty"` +} + +// TopicSharedAccessKeys is shared access keys of the Topic +type TopicSharedAccessKeys struct { + autorest.Response `json:"-"` + Key1 *string `json:"key1,omitempty"` + Key2 *string `json:"key2,omitempty"` +} + +// TopicsListResult is result of the List Topics operation +type TopicsListResult struct { + autorest.Response `json:"-"` + Value *[]Topic `json:"value,omitempty"` +} + +// TopicTypeInfo is properties of a topic type info. +type TopicTypeInfo struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *TopicTypeProperties `json:"properties,omitempty"` +} + +// TopicTypeProperties is properties of a topic type. +type TopicTypeProperties struct { + Provider *string `json:"provider,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Description *string `json:"description,omitempty"` + ResourceRegionType ResourceRegionType `json:"resourceRegionType,omitempty"` + ProvisioningState TopicTypeProvisioningState `json:"provisioningState,omitempty"` +} + +// TopicTypesListResult is result of the List Topic Types operation +type TopicTypesListResult struct { + autorest.Response `json:"-"` + Value *[]TopicTypeInfo `json:"value,omitempty"` +} + +// TrackedResource is definition of a Tracked Resource +type TrackedResource struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/operations.go new file mode 100644 index 000000000..8c89d3eb0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/operations.go @@ -0,0 +1,96 @@ +package eventgrid + +// Copyright (c) Microsoft and contributors. 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. +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// OperationsClient is the azure EventGrid Management Client +type OperationsClient struct { + ManagementClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List list the available operations supported by the Microsoft.EventGrid resource provider +func (client OperationsClient) List() (result OperationsListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer() (*http.Request, error) { + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.EventGrid/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topics.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topics.go new file mode 100644 index 000000000..e094c867a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topics.go @@ -0,0 +1,602 @@ +package eventgrid + +// Copyright (c) Microsoft and contributors. 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. +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// TopicsClient is the azure EventGrid Management Client +type TopicsClient struct { + ManagementClient +} + +// NewTopicsClient creates an instance of the TopicsClient client. +func NewTopicsClient(subscriptionID string) TopicsClient { + return NewTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client. +func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsClient { + return TopicsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate asynchronously creates a new topic with the specified parameters. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group within the user's subscription. topicName is name of the topic +// topicInfo is topic information +func (client TopicsClient) CreateOrUpdate(resourceGroupName string, topicName string, topicInfo Topic, cancel <-chan struct{}) (<-chan Topic, <-chan error) { + resultChan := make(chan Topic, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result Topic + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, topicName, topicInfo, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client TopicsClient) CreateOrUpdatePreparer(resourceGroupName string, topicName string, topicInfo Topic, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "topicName": autorest.Encode("path", topicName), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", pathParameters), + autorest.WithJSON(topicInfo), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client TopicsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client TopicsClient) CreateOrUpdateResponder(resp *http.Response) (result Topic, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete existing topic This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group within the user's subscription. topicName is name of the topic +func (client TopicsClient) Delete(resourceGroupName string, topicName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, topicName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client TopicsClient) DeletePreparer(resourceGroupName string, topicName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "topicName": autorest.Encode("path", topicName), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client TopicsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client TopicsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get properties of a topic +// +// resourceGroupName is the name of the resource group within the user's subscription. topicName is name of the topic +func (client TopicsClient) Get(resourceGroupName string, topicName string) (result Topic, err error) { + req, err := client.GetPreparer(resourceGroupName, topicName) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client TopicsClient) GetPreparer(resourceGroupName string, topicName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "topicName": autorest.Encode("path", topicName), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client TopicsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client TopicsClient) GetResponder(resp *http.Response) (result Topic, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup list all the topics under a resource group +// +// resourceGroupName is the name of the resource group within the user's subscription. +func (client TopicsClient) ListByResourceGroup(resourceGroupName string) (result TopicsListResult, err error) { + req, err := client.ListByResourceGroupPreparer(resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client TopicsClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client TopicsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client TopicsClient) ListByResourceGroupResponder(resp *http.Response) (result TopicsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySubscription list all the topics under an Azure subscription +func (client TopicsClient) ListBySubscription() (result TopicsListResult, err error) { + req, err := client.ListBySubscriptionPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListBySubscription", resp, "Failure responding to request") + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client TopicsClient) ListBySubscriptionPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListBySubscriptionSender sends the ListBySubscription request. The method will close the +// http.Response Body if it receives an error. +func (client TopicsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client TopicsClient) ListBySubscriptionResponder(resp *http.Response) (result TopicsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListEventTypes list event types for a topic +// +// resourceGroupName is the name of the resource group within the user's subscription. providerNamespace is namespace +// of the provider of the topic resourceTypeName is name of the topic type resourceName is name of the topic +func (client TopicsClient) ListEventTypes(resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string) (result EventTypesListResult, err error) { + req, err := client.ListEventTypesPreparer(resourceGroupName, providerNamespace, resourceTypeName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListEventTypes", nil, "Failure preparing request") + return + } + + resp, err := client.ListEventTypesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListEventTypes", resp, "Failure sending request") + return + } + + result, err = client.ListEventTypesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListEventTypes", resp, "Failure responding to request") + } + + return +} + +// ListEventTypesPreparer prepares the ListEventTypes request. +func (client TopicsClient) ListEventTypesPreparer(resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "providerNamespace": autorest.Encode("path", providerNamespace), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "resourceTypeName": autorest.Encode("path", resourceTypeName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventTypes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListEventTypesSender sends the ListEventTypes request. The method will close the +// http.Response Body if it receives an error. +func (client TopicsClient) ListEventTypesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListEventTypesResponder handles the response to the ListEventTypes request. The method always +// closes the http.Response Body. +func (client TopicsClient) ListEventTypesResponder(resp *http.Response) (result EventTypesListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSharedAccessKeys list the two keys used to publish to a topic +// +// resourceGroupName is the name of the resource group within the user's subscription. topicName is name of the topic +func (client TopicsClient) ListSharedAccessKeys(resourceGroupName string, topicName string) (result TopicSharedAccessKeys, err error) { + req, err := client.ListSharedAccessKeysPreparer(resourceGroupName, topicName) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListSharedAccessKeys", nil, "Failure preparing request") + return + } + + resp, err := client.ListSharedAccessKeysSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListSharedAccessKeys", resp, "Failure sending request") + return + } + + result, err = client.ListSharedAccessKeysResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListSharedAccessKeys", resp, "Failure responding to request") + } + + return +} + +// ListSharedAccessKeysPreparer prepares the ListSharedAccessKeys request. +func (client TopicsClient) ListSharedAccessKeysPreparer(resourceGroupName string, topicName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "topicName": autorest.Encode("path", topicName), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/listKeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSharedAccessKeysSender sends the ListSharedAccessKeys request. The method will close the +// http.Response Body if it receives an error. +func (client TopicsClient) ListSharedAccessKeysSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListSharedAccessKeysResponder handles the response to the ListSharedAccessKeys request. The method always +// closes the http.Response Body. +func (client TopicsClient) ListSharedAccessKeysResponder(resp *http.Response) (result TopicSharedAccessKeys, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RegenerateKey regenerate a shared access key for a topic +// +// resourceGroupName is the name of the resource group within the user's subscription. topicName is name of the topic +// regenerateKeyRequest is request body to regenerate key +func (client TopicsClient) RegenerateKey(resourceGroupName string, topicName string, regenerateKeyRequest TopicRegenerateKeyRequest) (result TopicSharedAccessKeys, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: regenerateKeyRequest, + Constraints: []validation.Constraint{{Target: "regenerateKeyRequest.KeyName", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "eventgrid.TopicsClient", "RegenerateKey") + } + + req, err := client.RegenerateKeyPreparer(resourceGroupName, topicName, regenerateKeyRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "RegenerateKey", nil, "Failure preparing request") + return + } + + resp, err := client.RegenerateKeySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "RegenerateKey", resp, "Failure sending request") + return + } + + result, err = client.RegenerateKeyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "RegenerateKey", resp, "Failure responding to request") + } + + return +} + +// RegenerateKeyPreparer prepares the RegenerateKey request. +func (client TopicsClient) RegenerateKeyPreparer(resourceGroupName string, topicName string, regenerateKeyRequest TopicRegenerateKeyRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "topicName": autorest.Encode("path", topicName), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/regenerateKey", pathParameters), + autorest.WithJSON(regenerateKeyRequest), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// RegenerateKeySender sends the RegenerateKey request. The method will close the +// http.Response Body if it receives an error. +func (client TopicsClient) RegenerateKeySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// RegenerateKeyResponder handles the response to the RegenerateKey request. The method always +// closes the http.Response Body. +func (client TopicsClient) RegenerateKeyResponder(resp *http.Response) (result TopicSharedAccessKeys, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topictypes.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topictypes.go new file mode 100644 index 000000000..8986cc735 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topictypes.go @@ -0,0 +1,222 @@ +package eventgrid + +// Copyright (c) Microsoft and contributors. 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. +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// TopicTypesClient is the azure EventGrid Management Client +type TopicTypesClient struct { + ManagementClient +} + +// NewTopicTypesClient creates an instance of the TopicTypesClient client. +func NewTopicTypesClient(subscriptionID string) TopicTypesClient { + return NewTopicTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client. +func NewTopicTypesClientWithBaseURI(baseURI string, subscriptionID string) TopicTypesClient { + return TopicTypesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get information about a topic type +// +// topicTypeName is name of the topic type +func (client TopicTypesClient) Get(topicTypeName string) (result TopicTypeInfo, err error) { + req, err := client.GetPreparer(topicTypeName) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client TopicTypesClient) GetPreparer(topicTypeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "topicTypeName": autorest.Encode("path", topicTypeName), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client TopicTypesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client TopicTypesClient) GetResponder(resp *http.Response) (result TopicTypeInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all registered topic types +func (client TopicTypesClient) List() (result TopicTypesListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client TopicTypesClient) ListPreparer() (*http.Request, error) { + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.EventGrid/topicTypes"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client TopicTypesClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client TopicTypesClient) ListResponder(resp *http.Response) (result TopicTypesListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListEventTypes list event types for a topic type +// +// topicTypeName is name of the topic type +func (client TopicTypesClient) ListEventTypes(topicTypeName string) (result EventTypesListResult, err error) { + req, err := client.ListEventTypesPreparer(topicTypeName) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "ListEventTypes", nil, "Failure preparing request") + return + } + + resp, err := client.ListEventTypesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "ListEventTypes", resp, "Failure sending request") + return + } + + result, err = client.ListEventTypesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "ListEventTypes", resp, "Failure responding to request") + } + + return +} + +// ListEventTypesPreparer prepares the ListEventTypes request. +func (client TopicTypesClient) ListEventTypesPreparer(topicTypeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "topicTypeName": autorest.Encode("path", topicTypeName), + } + + const APIVersion = "2017-06-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventTypes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListEventTypesSender sends the ListEventTypes request. The method will close the +// http.Response Body if it receives an error. +func (client TopicTypesClient) ListEventTypesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListEventTypesResponder handles the response to the ListEventTypes request. The method always +// closes the http.Response Body. +func (client TopicTypesClient) ListEventTypesResponder(resp *http.Response) (result EventTypesListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/version.go new file mode 100644 index 000000000..14770d16d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/version.go @@ -0,0 +1,28 @@ +package eventgrid + +// Copyright (c) Microsoft and contributors. 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. +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/v10.3.1-beta arm-eventgrid/2017-06-15-preview" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return "v10.3.1-beta" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/version.go index f30757488..16a30d037 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/version.go @@ -14,15 +14,15 @@ package eventhub // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-eventhub/2015-08-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-eventhub/2017-04-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/version.go index 3ca0b1a59..97c90e57c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/version.go @@ -14,15 +14,15 @@ package graphrbac // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-graphrbac/" + return "Azure-SDK-For-Go/v10.3.1-beta arm-graphrbac/1.6" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/version.go index cee62675a..9d1f5dd2d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/version.go @@ -14,15 +14,15 @@ package hdinsight // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-hdinsight/" + return "Azure-SDK-For-Go/v10.3.1-beta arm-hdinsight/2015-03-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/version.go index 45ed1b5f6..fbf802d8c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/version.go @@ -14,15 +14,15 @@ package intune // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-intune/2015-01-14-preview" + return "Azure-SDK-For-Go/v10.3.1-beta arm-intune/2015-01-14-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/version.go index f7c0208c1..8459b9d90 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/version.go @@ -14,15 +14,15 @@ package iothub // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-iothub/2016-02-03" + return "Azure-SDK-For-Go/v10.3.1-beta arm-iothub/2017-07-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/version.go index 2be26bff3..6ef6ca2d3 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/version.go @@ -14,15 +14,15 @@ package keyvault // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-keyvault/2015-06-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-keyvault/2016-10-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/version.go index 701c83a05..277f45b94 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/version.go @@ -14,15 +14,15 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-logic/2016-06-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-logic/2016-06-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/version.go index 25f9e609c..08322317b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/version.go @@ -14,15 +14,15 @@ package commitmentplans // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-commitmentplans/2016-05-01-preview" + return "Azure-SDK-For-Go/v10.3.1-beta arm-commitmentplans/2016-05-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/version.go index 587565d58..281936f24 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/version.go @@ -14,15 +14,15 @@ package webservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-webservices/2017-01-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-webservices/2017-01-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/version.go index 8dbc133f2..1a8c6ad40 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/version.go @@ -14,15 +14,15 @@ package mediaservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-mediaservices/2015-10-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-mediaservices/2015-10-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/version.go index 76bdaab67..300e03145 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/version.go @@ -14,15 +14,15 @@ package mobileengagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-mobileengagement/2014-12-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-mobileengagement/2014-12-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/version.go index 59985be48..5788cfc1f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/version.go @@ -14,15 +14,15 @@ package monitor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-monitor/" + return "Azure-SDK-For-Go/v10.3.1-beta arm-monitor/" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/version.go index 270855a39..0c6094d0f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/version.go @@ -14,15 +14,15 @@ package mysql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-mysql/2017-04-30-preview" + return "Azure-SDK-For-Go/v10.3.1-beta arm-mysql/2017-04-30-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/version.go index b075ca676..cf04f75c9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/version.go @@ -14,15 +14,15 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-network/" + return "Azure-SDK-For-Go/v10.3.1-beta arm-network/" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/version.go index ca846081a..813b99e1f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/version.go @@ -14,15 +14,15 @@ package notificationhubs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-notificationhubs/2017-04-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-notificationhubs/2017-04-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/version.go index 104618ff5..7bf070324 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/version.go @@ -14,15 +14,15 @@ package postgresql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-postgresql/2017-04-30-preview" + return "Azure-SDK-For-Go/v10.3.1-beta arm-postgresql/2017-04-30-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/version.go index c556b8cd6..868428982 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/version.go @@ -14,15 +14,15 @@ package powerbiembedded // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-powerbiembedded/2016-01-29" + return "Azure-SDK-For-Go/v10.3.1-beta arm-powerbiembedded/2016-01-29" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/version.go index e3702ef21..0d13412a6 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/version.go @@ -14,15 +14,15 @@ package recoveryservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-recoveryservices/2016-06-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-recoveryservices/" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/version.go index cc0c914da..8c3fd58c0 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/version.go @@ -14,15 +14,15 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-recoveryservicesbackup/2016-12-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-recoveryservicesbackup/" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/version.go index fcd0f1388..940d76574 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/version.go @@ -14,15 +14,15 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-recoveryservicessiterecovery/2016-08-10" + return "Azure-SDK-For-Go/v10.3.1-beta arm-recoveryservicessiterecovery/2016-08-10" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/version.go index 5c98eadd8..be0f08bd6 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/version.go @@ -14,15 +14,15 @@ package redis // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-redis/2016-04-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-redis/2017-02-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/version.go index 9876f37af..de4fd8b7d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/version.go @@ -14,15 +14,15 @@ package relay // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-relay/2016-07-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-relay/2017-04-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/version.go index 30f52bbf9..35d43907e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/version.go @@ -14,15 +14,15 @@ package resourcehealth // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-resourcehealth/2015-01-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-resourcehealth/2017-07-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/version.go index 39d23d92c..07d8c9c7a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/version.go @@ -14,15 +14,15 @@ package features // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-features/2015-12-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-features/2015-12-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/version.go index 18af7cccf..e798fa478 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/version.go @@ -14,15 +14,15 @@ package links // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-links/2016-09-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-links/2016-09-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/version.go index f5429924e..34e611e50 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/version.go @@ -14,15 +14,15 @@ package locks // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-locks/2016-09-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-locks/2016-09-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/version.go index 6c6cdeb5f..4e6118575 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/version.go @@ -14,15 +14,15 @@ package managedapplications // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-managedapplications/2016-09-01-preview" + return "Azure-SDK-For-Go/v10.3.1-beta arm-managedapplications/2016-09-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/version.go index 1fcc1d8f7..8f6442a76 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/version.go @@ -14,15 +14,15 @@ package policy // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-policy/2016-12-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-policy/2016-12-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/version.go index 1b58352f4..e8ef96bd5 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/version.go @@ -14,15 +14,15 @@ package resources // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-resources/2016-09-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-resources/2017-05-10" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/version.go index 90005af1b..423a732ef 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/version.go @@ -14,15 +14,15 @@ package subscriptions // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-subscriptions/2016-06-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-subscriptions/2016-06-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/version.go index 8e506bbb9..2c1287818 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/version.go @@ -14,15 +14,15 @@ package scheduler // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-scheduler/2016-03-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-scheduler/2016-03-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/search/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/search/version.go index 4e142ad0e..a32a80b47 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/search/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/search/version.go @@ -14,15 +14,15 @@ package search // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-search/2015-08-19" + return "Azure-SDK-For-Go/v10.3.1-beta arm-search/2015-08-19" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/version.go index 963b950fc..5f4fa506b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/version.go @@ -14,15 +14,15 @@ package servermanagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-servermanagement/2016-07-01-preview" + return "Azure-SDK-For-Go/v10.3.1-beta arm-servermanagement/2016-07-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/version.go index a7991b09a..ffa81dc74 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/version.go @@ -14,15 +14,15 @@ package servicemap // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-servicemap/2015-11-01-preview" + return "Azure-SDK-For-Go/v10.3.1-beta arm-servicemap/2015-11-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/version.go index 48e34352e..49ea4cf44 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/version.go @@ -14,15 +14,15 @@ package servicebus // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-servicebus/2015-08-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-servicebus/2017-04-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/version.go index 7a34226bb..fc934accf 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/version.go @@ -14,15 +14,15 @@ package servicefabric // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-servicefabric/2016-09-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-servicefabric/2016-09-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/version.go index 0e351022c..9e3acd97d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/version.go @@ -14,16 +14,15 @@ package sql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-sql/" + return "Azure-SDK-For-Go/v10.3.1-beta arm-sql/" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/version.go index 185cdc314..faf07633b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/version.go @@ -14,15 +14,15 @@ package storage // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-storage/2016-12-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-storage/2017-06-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/version.go index 221e66640..54da4e7f0 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/version.go @@ -14,15 +14,15 @@ package storageimportexport // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-storageimportexport/2016-11-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-storageimportexport/2016-11-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/version.go index 653c39873..c649bbe8a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/version.go @@ -14,15 +14,15 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-storsimple8000series/2017-06-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-storsimple8000series/2017-06-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/version.go index 80212843b..5e607a098 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/version.go @@ -14,15 +14,15 @@ package streamanalytics // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-streamanalytics/" + return "Azure-SDK-For-Go/v10.3.1-beta arm-streamanalytics/2016-03-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/version.go index c5360bace..3e02ab50d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/version.go @@ -14,15 +14,15 @@ package trafficmanager // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-trafficmanager/2015-11-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-trafficmanager/2017-05-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/version.go index 0e17bf6be..f1398a8b1 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/version.go @@ -14,15 +14,15 @@ package web // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-web/" + return "Azure-SDK-For-Go/v10.3.1-beta arm-web/" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/buildTerraform.sh b/vendor/github.com/Azure/azure-sdk-for-go/buildTerraform.sh deleted file mode 100644 index 9c622dfdf..000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/buildTerraform.sh +++ /dev/null @@ -1,36 +0,0 @@ -# This script tries to build Terraform related packages, -# and find possible breaking changes regarding the Azure -# SDK for Go - -set -x - -# This should only run on cronjobs -if [ "cron" != $TRAVIS_EVENT_TYPE ]; then - exit 0 -fi - -# Only meant to run on latest go version -if [ "go version go1.8 linux/amd64" != "$(go version)" ]; then - exit 0 -fi - -go get github.com/kardianos/govendor -REALEXITSTATUS=0 - -packages=(github.com/hashicorp/terraform - github.com/terraform-providers/terraform-provider-azurerm - github.com/terraform-providers/terraform-provider-azure) - -for package in ${packages[*]}; do - go get $package - cd $GOPATH/src/$package - - # update to latest SDK - govendor update github.com/Azure/azure-sdk-for-go/... - - # try to build - make - REALEXITSTATUS=$(($REALEXITSTATUS+$?)) -done - -exit $REALEXITSTATUS diff --git a/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/version.go b/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/version.go index e6855e194..00f4d4445 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/version.go @@ -14,15 +14,15 @@ package filesystem // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-filesystem/2016-11-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-filesystem/2016-11-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/version.go b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/version.go index 868404d72..6ef6ca2d3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/version.go @@ -14,15 +14,15 @@ package keyvault // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-keyvault/2016-10-01" + return "Azure-SDK-For-Go/v10.3.1-beta arm-keyvault/2016-10-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v10.3.1-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/glide.lock b/vendor/github.com/Azure/azure-sdk-for-go/glide.lock index 395f533c6..3dc0fd7b1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/glide.lock +++ b/vendor/github.com/Azure/azure-sdk-for-go/glide.lock @@ -1,8 +1,8 @@ -hash: bdeb606eca05304f80e5577159227ae4f00a002213f353e304066c593419a31b -updated: 2017-07-31T15:32:36.5529621-07:00 +hash: f52476dff67b66fe9fffe35b63ac0c06962fcaacd326b66820a33edf53b01a16 +updated: 2017-09-01T13:52:16.3705168-07:00 imports: - name: github.com/Azure/go-autorest - version: f6e08fe5e4d45c9a66e40196d3fed5f37331d224 + version: 48a8154950f853ae1f2a9c409e0eb1fb71119bc8 subpackages: - autorest - autorest/adal @@ -30,6 +30,8 @@ imports: version: 4748e29d5718c2df4028a6543edf86fd8cc0f881 - name: github.com/nozzle/throttler version: d9b45f19996c645d38c9266d1f5cf1990e930119 +- name: github.com/satori/go.uuid + version: 879c5887cd475cd7864858769793b2ceb0d44feb - name: github.com/satori/uuid version: 5bf94b69c6b68ee1b541973bb8e1144db23a194b - name: github.com/shopspring/decimal diff --git a/vendor/github.com/Azure/azure-sdk-for-go/glide.yaml b/vendor/github.com/Azure/azure-sdk-for-go/glide.yaml index bae18484c..d0961f338 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/glide.yaml +++ b/vendor/github.com/Azure/azure-sdk-for-go/glide.yaml @@ -1,7 +1,7 @@ package: github.com/Azure/azure-sdk-for-go import: - package: github.com/Azure/go-autorest - version: ~8.1.1 + version: ~8.2.0 subpackages: - /autorest - autorest/azure diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/README.md b/vendor/github.com/Azure/azure-sdk-for-go/management/README.md index 7a1abb35a..2617033c1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/README.md @@ -1,6 +1,8 @@ # Azure Service Management packages for Go The `github.com/Azure/azure-sdk-for-go/management` packages are used to perform operations using the Azure Service Management (ASM), aka classic deployment model. Read more about [Azure Resource Manager vs. classic deployment](https://azure.microsoft.com/documentation/articles/resource-manager-deployment-model/). Packages for Azure Resource Manager are in the [arm](../arm) folder. +Note that this package requires Go 1.7+ to build. +This package is in mainteinance mode and will only receive bug fixes. It is recommended to [migrate to Azure Resource Manager](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-deployment-model) deployment model. ## First a Sidenote: Authentication and the Azure Service Manager diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/client.go index 3f6f240a3..dd703c0ad 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/client.go @@ -1,3 +1,5 @@ +// +build go1.7 + package affinitygroup import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/entities.go index 7ce588264..1e48cfddb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/entities.go @@ -1,3 +1,5 @@ +// +build go1.7 + package affinitygroup import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/client.go index 155674a68..3ce4ede86 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/client.go @@ -1,3 +1,5 @@ +// +build go1.7 + // Package management provides the main API client to construct other clients // and make requests to the Microsoft Azure Service Management REST API. package management diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/errors.go b/vendor/github.com/Azure/azure-sdk-for-go/management/errors.go index 798594543..f0b220225 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/errors.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/errors.go @@ -1,3 +1,5 @@ +// +build go1.7 + package management import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/errors_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/errors_test.go index 9ee32be4e..13579b1ad 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/errors_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/errors_test.go @@ -1,3 +1,5 @@ +// +build go1.7 + package management_test import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/client.go index a9c7063a2..46cd5b27a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/client.go @@ -1,3 +1,5 @@ +// +build go1.7 + // Package hostedservice provides a client for Hosted Services. package hostedservice diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/entities.go index f540fa9f4..7ad7a9171 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/entities.go @@ -1,3 +1,5 @@ +// +build go1.7 + package hostedservice import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/http.go b/vendor/github.com/Azure/azure-sdk-for-go/management/http.go index 5760f51ee..b8a6d5d32 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/http.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/http.go @@ -1,3 +1,5 @@ +// +build go1.7 + package management import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/location/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/location/client.go index 721f3f607..1b0262cea 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/location/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/location/client.go @@ -1,3 +1,5 @@ +// +build go1.7 + // Package location provides a client for Locations. package location diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/location/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/location/entities.go index 8a2501583..d85921995 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/location/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/location/entities.go @@ -1,3 +1,5 @@ +// +build go1.7 + package location import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/client.go index 8e8eea4da..92cd349e8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/client.go @@ -1,3 +1,5 @@ +// +build go1.7 + // Package networksecuritygroup provides a client for Network Security Groups. package networksecuritygroup diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/entities.go index 2c6f75757..77856532f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/entities.go @@ -1,3 +1,5 @@ +// +build go1.7 + // Package networksecuritygroup implements operations for managing network security groups // using the Service Management REST API // diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/management/operations.go index 4f6acb217..adf08aa14 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/operations.go @@ -1,3 +1,5 @@ +// +build go1.7 + package management import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/client.go index e9af16e9b..3391e5826 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/client.go @@ -1,3 +1,5 @@ +// +build go1.7 + // Package osimage provides a client for Operating System Images. package osimage diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/entities.go index 25577c16e..6731010b1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/entities.go @@ -1,3 +1,5 @@ +// +build go1.7 + package osimage import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/publishSettings.go b/vendor/github.com/Azure/azure-sdk-for-go/management/publishSettings.go index 17505536c..9eea9e3b3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/publishSettings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/publishSettings.go @@ -1,3 +1,5 @@ +// +build go1.7 + package management import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/sql/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/sql/client.go index 970c3f644..57a71918f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/sql/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/sql/client.go @@ -1,3 +1,5 @@ +// +build go1.7 + package sql import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/sql/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/sql/entities.go index bed6a05bd..7752fb50a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/sql/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/sql/entities.go @@ -1,3 +1,5 @@ +// +build go1.7 + package sql import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/client.go index dad87e6db..6ba8a03da 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/client.go @@ -1,3 +1,5 @@ +// +build go1.7 + // Package storageservice provides a client for Storage Services. package storageservice diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities.go index 2401298aa..49d9c37ff 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities.go @@ -1,3 +1,5 @@ +// +build go1.7 + package storageservice import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities_test.go index 3f02f5beb..298a62c8c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities_test.go @@ -1,3 +1,5 @@ +// +build go1.7 + package storageservice import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/testutils/managementclient.go b/vendor/github.com/Azure/azure-sdk-for-go/management/testutils/managementclient.go index 426e20dcc..09ae535e5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/testutils/managementclient.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/testutils/managementclient.go @@ -1,3 +1,5 @@ +// +build go1.7 + // Package testutils contains some test utilities for the Azure SDK package testutils diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/util.go b/vendor/github.com/Azure/azure-sdk-for-go/management/util.go index 72601757e..9439cd73e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/util.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/util.go @@ -1,3 +1,5 @@ +// +build go1.7 + package management import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/version.go b/vendor/github.com/Azure/azure-sdk-for-go/management/version.go index a81c9f5ae..ae11c8d8c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/version.go @@ -1,5 +1,7 @@ +// +build go1.7 + package management var ( - sdkVersion = "v10.2.0-beta" + sdkVersion = "v10.3.1-beta" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/client.go index a9fe82755..c3e718070 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/client.go @@ -1,3 +1,5 @@ +// +build go1.7 + // Package virtualmachine provides a client for Virtual Machines. package virtualmachine diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities.go index a826541a7..5c21a1981 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities.go @@ -1,3 +1,5 @@ +// +build go1.7 + package virtualmachine import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities_test.go index 3118e6c5a..3eef25aed 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities_test.go @@ -1,3 +1,5 @@ +// +build go1.7 + package virtualmachine import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions.go index 25320447e..bcdef2d17 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions.go @@ -1,3 +1,5 @@ +// +build go1.7 + package virtualmachine import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions_test.go index b4ec2a769..2748719ef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions_test.go @@ -1,3 +1,5 @@ +// +build go1.7 + package virtualmachine import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/client.go index 90f8d6561..465363bcf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/client.go @@ -1,3 +1,5 @@ +// +build go1.7 + // Package virtualmachinedisk provides a client for Virtual Machine Disks. package virtualmachinedisk diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/entities.go index 1359381b8..3b5adb347 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/entities.go @@ -1,3 +1,5 @@ +// +build go1.7 + package virtualmachinedisk import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/client.go index 11c8848a7..bff906c19 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/client.go @@ -1,3 +1,5 @@ +// +build go1.7 + // Package virtualmachineimage provides a client for Virtual Machine Images. package virtualmachineimage diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities.go index 4a1df3119..e719d56b1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities.go @@ -1,3 +1,5 @@ +// +build go1.7 + package virtualmachineimage import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities_test.go index b0d5bbe6f..ca2490e3f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities_test.go @@ -1,3 +1,5 @@ +// +build go1.7 + package virtualmachineimage import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/client.go index 9d27ab7fd..2e1f166fb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/client.go @@ -1,3 +1,5 @@ +// +build go1.7 + // Package virtualnetwork provides a client for Virtual Networks. package virtualnetwork diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/entities.go index 0cb8913e7..4e22db32a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/entities.go @@ -1,3 +1,5 @@ +// +build go1.7 + package virtualnetwork import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/configurationset.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/configurationset.go index 0ed3bd018..f8c163332 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/configurationset.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/configurationset.go @@ -1,3 +1,5 @@ +// +build go1.7 + package vmutils import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/datadisks.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/datadisks.go index 06fcf852d..fbf04f6be 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/datadisks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/datadisks.go @@ -1,3 +1,5 @@ +// +build go1.7 + package vmutils import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/deployment.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/deployment.go index 8ac5398de..788972a1e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/deployment.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/deployment.go @@ -1,3 +1,5 @@ +// +build go1.7 + package vmutils import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions.go index 751fd6a6c..e82ad0e26 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions.go @@ -1,3 +1,5 @@ +// +build go1.7 + package vmutils import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions_test.go index 17a46563d..cb4d4a0af 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions_test.go @@ -1,3 +1,5 @@ +// +build go1.7 + package vmutils import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/integration_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/integration_test.go index a0e79065a..5239c322f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/integration_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/integration_test.go @@ -1,3 +1,5 @@ +// +build go1.7 + package vmutils import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/network.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/network.go index bf2331c7b..f06f43175 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/network.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/network.go @@ -1,3 +1,5 @@ +// +build go1.7 + package vmutils import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolesize.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolesize.go index bedd702fb..44327b53c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolesize.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolesize.go @@ -1,3 +1,5 @@ +// +build go1.7 + package vmutils import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolestate.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolestate.go index e3f21285c..bc753ad7d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolestate.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolestate.go @@ -1,3 +1,5 @@ +// +build go1.7 + package vmutils import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils.go index 1845663c8..25df9cede 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils.go @@ -1,3 +1,5 @@ +// +build go1.7 + // Package vmutils provides convenience methods for creating Virtual // Machine Role configurations. package vmutils diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils_test.go index 675594020..48219f91f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils_test.go @@ -1,3 +1,5 @@ +// +build go1.7 + package vmutils import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization.go index 608bf3133..d4ad5da27 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization.go @@ -50,7 +50,7 @@ func (c *Client) addAuthorizationHeader(verb, url string, headers map[string]str } func (c *Client) getSharedKey(verb, url string, headers map[string]string, auth authentication) (string, error) { - canRes, err := c.buildCanonicalizedResource(url, auth) + canRes, err := c.buildCanonicalizedResource(url, auth, false) if err != nil { return "", err } @@ -62,15 +62,18 @@ func (c *Client) getSharedKey(verb, url string, headers map[string]string, auth return c.createAuthorizationHeader(canString, auth), nil } -func (c *Client) buildCanonicalizedResource(uri string, auth authentication) (string, error) { +func (c *Client) buildCanonicalizedResource(uri string, auth authentication, sas bool) (string, error) { errMsg := "buildCanonicalizedResource error: %s" u, err := url.Parse(uri) if err != nil { return "", fmt.Errorf(errMsg, err.Error()) } - cr := bytes.NewBufferString("/") - cr.WriteString(c.getCanonicalizedAccountName()) + cr := bytes.NewBufferString("") + if c.accountName != StorageEmulatorAccountName || !sas { + cr.WriteString("/") + cr.WriteString(c.getCanonicalizedAccountName()) + } if len(u.Path) > 0 { // Any portion of the CanonicalizedResource string that is derived from diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization_test.go index 420868acf..1130d0f80 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization_test.go @@ -60,26 +60,41 @@ func (a *AuthorizationSuite) Test_buildCanonicalizedResource(c *chk.C) { url string auth authentication expected string + sas bool } tests := []test{ // Shared Key - {"https://golangrocksonazure.blob.core.windows.net/path?a=b&c=d", sharedKey, "/golangrocksonazure/path\na:b\nc:d"}, - {"https://golangrocksonazure.blob.core.windows.net/?comp=list", sharedKey, "/golangrocksonazure/\ncomp:list"}, - {"https://golangrocksonazure.blob.core.windows.net/cnt/blob", sharedKey, "/golangrocksonazure/cnt/blob"}, - {"https://golangrocksonazure.blob.core.windows.net/cnt/bl ob", sharedKey, "/golangrocksonazure/cnt/bl%20ob"}, - {"https://golangrocksonazure.blob.core.windows.net/c nt/blob", sharedKey, "/golangrocksonazure/c%20nt/blob"}, - {"https://golangrocksonazure.blob.core.windows.net/cnt/blob%3F%23%5B%5D%21$&%27%28%29%2A blob", sharedKey, "/golangrocksonazure/cnt/blob%3F%23%5B%5D%21$&%27%28%29%2A%20blob"}, - {"https://golangrocksonazure.blob.core.windows.net/cnt/blob-._~:,@;+=blob", sharedKey, "/golangrocksonazure/cnt/blob-._~:,@;+=blob"}, - {"https://golangrocksonazure.blob.core.windows.net/c nt/blob-._~:%3F%23%5B%5D@%21$&%27%28%29%2A,;+=/blob", sharedKey, "/golangrocksonazure/c%20nt/blob-._~:%3F%23%5B%5D@%21$&%27%28%29%2A,;+=/blob"}, + {"https://golangrocksonazure.blob.core.windows.net/path?a=b&c=d", sharedKey, "/golangrocksonazure/path\na:b\nc:d", false}, + {"https://golangrocksonazure.blob.core.windows.net/?comp=list", sharedKey, "/golangrocksonazure/\ncomp:list", false}, + {"https://golangrocksonazure.blob.core.windows.net/cnt/blob", sharedKey, "/golangrocksonazure/cnt/blob", false}, + {"https://golangrocksonazure.blob.core.windows.net/cnt/bl ob", sharedKey, "/golangrocksonazure/cnt/bl%20ob", false}, + {"https://golangrocksonazure.blob.core.windows.net/c nt/blob", sharedKey, "/golangrocksonazure/c%20nt/blob", false}, + {"https://golangrocksonazure.blob.core.windows.net/cnt/blob%3F%23%5B%5D%21$&%27%28%29%2A blob", sharedKey, "/golangrocksonazure/cnt/blob%3F%23%5B%5D%21$&%27%28%29%2A%20blob", false}, + {"https://golangrocksonazure.blob.core.windows.net/cnt/blob-._~:,@;+=blob", sharedKey, "/golangrocksonazure/cnt/blob-._~:,@;+=blob", false}, + {"https://golangrocksonazure.blob.core.windows.net/c nt/blob-._~:%3F%23%5B%5D@%21$&%27%28%29%2A,;+=/blob", sharedKey, "/golangrocksonazure/c%20nt/blob-._~:%3F%23%5B%5D@%21$&%27%28%29%2A,;+=/blob", false}, // Shared Key Lite for Table - {"https://golangrocksonazure.table.core.windows.net/mytable", sharedKeyLiteForTable, "/golangrocksonazure/mytable"}, - {"https://golangrocksonazure.table.core.windows.net/mytable?comp=acl", sharedKeyLiteForTable, "/golangrocksonazure/mytable?comp=acl"}, - {"https://golangrocksonazure.table.core.windows.net/mytable?comp=acl&timeout=10", sharedKeyForTable, "/golangrocksonazure/mytable?comp=acl"}, - {"https://golangrocksonazure.table.core.windows.net/mytable(PartitionKey='pkey',RowKey='rowkey%3D')", sharedKeyForTable, "/golangrocksonazure/mytable(PartitionKey='pkey',RowKey='rowkey%3D')"}, + {"https://golangrocksonazure.table.core.windows.net/mytable", sharedKeyLiteForTable, "/golangrocksonazure/mytable", false}, + {"https://golangrocksonazure.table.core.windows.net/mytable?comp=acl", sharedKeyLiteForTable, "/golangrocksonazure/mytable?comp=acl", false}, + {"https://golangrocksonazure.table.core.windows.net/mytable?comp=acl&timeout=10", sharedKeyForTable, "/golangrocksonazure/mytable?comp=acl", false}, + {"https://golangrocksonazure.table.core.windows.net/mytable(PartitionKey='pkey',RowKey='rowkey%3D')", sharedKeyForTable, "/golangrocksonazure/mytable(PartitionKey='pkey',RowKey='rowkey%3D')", false}, + // Canonicalized Resource with SAS + {"https://golangrocksonazure.blob.core.windows.net/cnt/blob", sharedKey, "/golangrocksonazure/cnt/blob", true}, } for _, t := range tests { - out, err := cli.buildCanonicalizedResource(t.url, t.auth) + out, err := cli.buildCanonicalizedResource(t.url, t.auth, t.sas) + c.Assert(err, chk.IsNil) + c.Assert(out, chk.Equals, t.expected) + } + + eCli, err := NewEmulatorClient() + c.Assert(err, chk.IsNil) + eTests := []test{ + {"http://127.0.0.1:10000/devstoreaccount1/cnt/blob", sharedKey, "/devstoreaccount1/cnt/blob", true}, + {"http://127.0.0.1:10000/devstoreaccount1/cnt/blob", sharedKey, "/devstoreaccount1/devstoreaccount1/cnt/blob", false}, + } + for _, t := range eTests { + out, err := eCli.buildCanonicalizedResource(t.url, t.auth, t.sas) c.Assert(err, chk.IsNil) c.Assert(out, chk.Equals, t.expected) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri.go index 43173d3a4..8f0864e34 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri.go @@ -19,7 +19,7 @@ func (b *Blob) GetSASURIWithSignedIPAndProtocol(expiry time.Time, permissions st signedPermissions = permissions blobURL = b.GetURL() ) - canonicalizedResource, err := b.Container.bsc.client.buildCanonicalizedResource(blobURL, b.Container.bsc.auth) + canonicalizedResource, err := b.Container.bsc.client.buildCanonicalizedResource(blobURL, b.Container.bsc.auth, true) if err != nil { return "", err } @@ -44,7 +44,7 @@ func (b *Blob) GetSASURIWithSignedIPAndProtocol(expiry time.Time, permissions st signedResource = "b" } - protocols := "https,http" + protocols := "" if HTTPSOnly { protocols = "https" } @@ -63,7 +63,9 @@ func (b *Blob) GetSASURIWithSignedIPAndProtocol(expiry time.Time, permissions st } if b.Container.bsc.client.apiVersion >= "2015-04-05" { - sasParams.Add("spr", protocols) + if protocols != "" { + sasParams.Add("spr", protocols) + } if signedIPRange != "" { sasParams.Add("sip", signedIPRange) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri_test.go index ac2b6b1c5..2bfda5bc5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri_test.go @@ -183,3 +183,14 @@ func (s *BlobSASURISuite) Test_blobSASStringToSign(c *chk.C) { c.Assert(err, chk.IsNil) c.Assert(out, chk.Equals, "SP\n\nSE\n/blobCS\n\n127.0.0.1\nhttps,http\n2015-04-05\n\n\n\n\n") } + +func (s *BlobSASURISuite) TestGetBlobSASURIStorageEmulator(c *chk.C) { + client, err := NewEmulatorClient() + c.Assert(err, chk.IsNil) + blobService := client.GetBlobService() + container := blobService.GetContainerReference("testfolder") + blob := container.GetBlobReference("testfile") + url, err := blob.GetSASURI(time.Date(2017, 9, 30, 16, 0, 0, 0, time.UTC), "w") + c.Assert(err, chk.IsNil) + c.Assert(url, chk.Equals, "http://127.0.0.1:10000/devstoreaccount1/testfolder/testfile?se=2017-09-30T16%3A00%3A00Z&sig=Tyrg2ccc0RXyRz5xfkcSVDvjjoRivygrGb%2ByTLf0jJY%3D&sp=w&sr=b&sv=2016-05-31") +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go index a701c4b2c..42fa702f6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go @@ -403,12 +403,7 @@ func (c Client) exec(verb, url string, headers map[string]string, body io.Reader // and for those that it doesn't we will handle here. if body != nil && req.ContentLength < 1 { if lr, ok := body.(*io.LimitedReader); ok { - req.ContentLength = lr.N - snapshot := *lr - req.GetBody = func() (io.ReadCloser, error) { - r := snapshot - return ioutil.NopCloser(&r), nil - } + setContentLengthFromLimitedReader(req, lr) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/file.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/file.go index 27dbdd1fc..b4022bcb6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/file.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/file.go @@ -426,7 +426,7 @@ func (f *File) URL() string { return f.fsc.client.getEndpoint(fileServiceName, f.buildPath(), nil) } -// WriteRangeOptions includes opptions for a write file range operation +// WriteRangeOptions includes options for a write file range operation type WriteRangeOptions struct { Timeout uint ContentMD5 string diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/BlobSASURISuite/TestBlobSASURICorrectness.yaml b/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/BlobSASURISuite/TestBlobSASURICorrectness.yaml index 6e5c9d195..d7c2cb232 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/BlobSASURISuite/TestBlobSASURICorrectness.yaml +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/BlobSASURISuite/TestBlobSASURICorrectness.yaml @@ -7,12 +7,11 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:qFrXoSDc+iV3H6nRHRlB4c3hOKZLmLOxJzzBrQgm3LI= + - SharedKey golangrocksonazure:zwzoWS6j6OntsD5C+xM0JWq0GPjF4o4I/t+WRDRtZoU= User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.8 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-date: - - Thu, 20 Jul 2017 23:33:55 GMT + - Tue, 29 Aug 2017 00:10:36 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-41blobsasurisuitetestblobsas?restype=container @@ -21,15 +20,15 @@ interactions: body: "" headers: Date: - - Thu, 20 Jul 2017 23:33:54 GMT + - Tue, 29 Aug 2017 00:10:36 GMT Etag: - - '"0x8D4CFC7C957D263"' + - '"0x8D4EE725FB6A14A"' Last-Modified: - - Thu, 20 Jul 2017 23:33:54 GMT + - Tue, 29 Aug 2017 00:10:36 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d612e9e-0001-0009-4eb0-01ca46000000 + - 184267f3-0001-009a-555b-208e7c000000 X-Ms-Version: - 2016-05-31 status: 201 Created @@ -40,16 +39,15 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:vveUGDYJVbo6lH70ChXDIpQtM/+J28sWPfXMBOQSM1Q= + - SharedKey golangrocksonazure:ihQ4FzjlT7EEu5Xw7BKx4AG99DwPpVyDgHw7GLVu5KQ= Content-Length: - "100" User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.8 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-blob-type: - BlockBlob x-ms-date: - - Thu, 20 Jul 2017 23:33:55 GMT + - Tue, 29 Aug 2017 00:10:36 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-41blobsasurisuitetestblobsas/Lorem/Lorem-._~:%3F%23%5B%5D@%21$&%27%28%29%2A,;+=%20Lorem @@ -60,17 +58,17 @@ interactions: Content-Md5: - Bcz94Jycda959ev/eJWOhw== Date: - - Thu, 20 Jul 2017 23:33:54 GMT + - Tue, 29 Aug 2017 00:10:36 GMT Etag: - - '"0x8D4CFC7C9B4859C"' + - '"0x8D4EE725FA84DAA"' Last-Modified: - - Thu, 20 Jul 2017 23:33:55 GMT + - Tue, 29 Aug 2017 00:10:36 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d612ea0-0001-0009-4fb0-01ca46000000 + - 18426805-0001-009a-645b-208e7c000000 X-Ms-Request-Server-Encrypted: - - "true" + - "false" X-Ms-Version: - 2016-05-31 status: 201 Created @@ -79,7 +77,7 @@ interactions: body: "" form: {} headers: {} - url: https://golangrocksonazure.blob.core.windows.net/cnt-41blobsasurisuitetestblobsas/Lorem/Lorem-._~:%3F%23%5B%5D@%21$&%27%28%29%2A,;+=%20Lorem?se=2050-12-20T22%3A55%3A06Z&sig=7saT6XpIoyYFSJqzV6abtEcWMcRYOUI3suzPBIOcXEE%3D&sp=r&spr=https%2Chttp&sr=b&sv=2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-41blobsasurisuitetestblobsas/Lorem/Lorem-._~:%3F%23%5B%5D@%21$&%27%28%29%2A,;+=%20Lorem?se=2050-12-20T22%3A55%3A06Z&sig=cNkzT%2BH3ukX9wqL1YXNb8KEM4qpW9LxNCldnDtVFzG8%3D&sp=r&sr=b&sv=2016-05-31 method: GET response: body: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer feugiat @@ -94,11 +92,11 @@ interactions: Content-Type: - application/octet-stream Date: - - Thu, 20 Jul 2017 23:33:54 GMT + - Tue, 29 Aug 2017 00:10:36 GMT Etag: - - '"0x8D4CFC7C9B4859C"' + - '"0x8D4EE725FA84DAA"' Last-Modified: - - Thu, 20 Jul 2017 23:33:55 GMT + - Tue, 29 Aug 2017 00:10:36 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Blob-Type: @@ -108,9 +106,9 @@ interactions: X-Ms-Lease-Status: - unlocked X-Ms-Request-Id: - - 7d612ea2-0001-0009-51b0-01ca46000000 + - 18426824-0001-009a-7e5b-208e7c000000 X-Ms-Server-Encrypted: - - "true" + - "false" X-Ms-Version: - 2016-05-31 status: 200 OK @@ -120,12 +118,11 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:q6DVJbMDCnOP2Tzxld1EdyIuH1jmXwcEfneKl90hKj0= + - SharedKey golangrocksonazure:cAGD8RdzO6MiQfD+LvESzb9I9+pj7taya5mIMYrDQ8Q= User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.8 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-date: - - Thu, 20 Jul 2017 23:33:55 GMT + - Tue, 29 Aug 2017 00:10:36 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-41blobsasurisuitetestblobsas?restype=container @@ -134,11 +131,11 @@ interactions: body: "" headers: Date: - - Thu, 20 Jul 2017 23:33:54 GMT + - Tue, 29 Aug 2017 00:10:36 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d612ea4-0001-0009-53b0-01ca46000000 + - 18426834-0001-009a-0c5b-208e7c000000 X-Ms-Version: - 2016-05-31 status: 202 Accepted diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/table_batch_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/table_batch_test.go index 8b91efa0c..7bf6c51c3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/table_batch_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/table_batch_test.go @@ -1,3 +1,5 @@ +// +build go1.7 + package storage import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.7.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.7.go new file mode 100644 index 000000000..345bb28f2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.7.go @@ -0,0 +1,12 @@ +// +build !go1.8 + +package storage + +import ( + "io" + "net/http" +) + +func setContentLengthFromLimitedReader(req *http.Request, lr *io.LimitedReader) { + req.ContentLength = lr.N +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.8.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.8.go new file mode 100644 index 000000000..ed8b77919 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.8.go @@ -0,0 +1,18 @@ +// +build go1.8 + +package storage + +import ( + "io" + "io/ioutil" + "net/http" +) + +func setContentLengthFromLimitedReader(req *http.Request, lr *io.LimitedReader) { + req.ContentLength = lr.N + snapshot := *lr + req.GetBody = func() (io.ReadCloser, error) { + r := snapshot + return ioutil.NopCloser(&r), nil + } +} diff --git a/vendor/github.com/Azure/go-autorest/.travis.yml b/vendor/github.com/Azure/go-autorest/.travis.yml index 583ae25d9..566850986 100644 --- a/vendor/github.com/Azure/go-autorest/.travis.yml +++ b/vendor/github.com/Azure/go-autorest/.travis.yml @@ -2,8 +2,10 @@ sudo: false language: go -go: +go: - 1.8 + - 1.7 + - 1.6 install: - go get -u github.com/golang/lint/golint diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go index 559fc6653..55361139a 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go @@ -33,6 +33,9 @@ const ( // managedIdentitySettingsPath is the path to the MSI Extension settings file (to discover the endpoint) managedIdentitySettingsPath = "/var/lib/waagent/ManagedIdentity-Settings" + + // metadataHeader is the header required by MSI extension + metadataHeader = "Metadata" ) var expirationBase time.Time @@ -364,6 +367,9 @@ func (spt *ServicePrincipalToken) refreshInternal(resource string) error { req.ContentLength = int64(len(s)) req.Header.Set(contentType, mimeTypeFormPost) + if _, ok := spt.secret.(*ServicePrincipalMSISecret); ok { + req.Header.Set(metadataHeader, "true") + } resp, err := spt.sender.Do(req) if err != nil { return fmt.Errorf("adal: Failed to execute the refresh request. Error = '%v'", err) diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/token_test.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token_test.go index 9c92f4198..d63a9cdc3 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/token_test.go +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token_test.go @@ -133,6 +133,67 @@ func TestServicePrincipalTokenRefreshUsesPOST(t *testing.T) { } } +func TestServicePrincipalTokenFromMSIRefreshUsesPOST(t *testing.T) { + resource := "https://resource" + + cb := func(token Token) error { return nil } + tempSettingsFile, err := ioutil.TempFile("", "ManagedIdentity-Settings") + if err != nil { + t.Fatal("Couldn't write temp settings file") + } + defer os.Remove(tempSettingsFile.Name()) + + settingsContents := []byte(`{ + "url": "http://msiendpoint/" + }`) + + if _, err := tempSettingsFile.Write(settingsContents); err != nil { + t.Fatal("Couldn't fill temp settings file") + } + + oauthConfig, err := NewOAuthConfig("http://adendpoint", "1-2-3-4") + if err != nil { + t.Fatal("Failed to construct oauthconfig") + } + + spt, err := newServicePrincipalTokenFromMSI( + *oauthConfig, + resource, + tempSettingsFile.Name(), + cb) + if err != nil { + t.Fatalf("Failed to get MSI SPT: %v", err) + } + + body := mocks.NewBody(newTokenJSON("test", "test")) + resp := mocks.NewResponseWithBodyAndStatus(body, http.StatusOK, "OK") + + c := mocks.NewSender() + s := DecorateSender(c, + (func() SendDecorator { + return func(s Sender) Sender { + return SenderFunc(func(r *http.Request) (*http.Response, error) { + if r.Method != "POST" { + t.Fatalf("adal: ServicePrincipalToken#Refresh did not correctly set HTTP method -- expected %v, received %v", "POST", r.Method) + } + if h := r.Header.Get("Metadata"); h != "true" { + t.Fatalf("adal: ServicePrincipalToken#Refresh did not correctly set Metadata header for MSI") + } + return resp, nil + }) + } + })()) + spt.SetSender(s) + err = spt.Refresh() + if err != nil { + t.Fatalf("adal: ServicePrincipalToken#Refresh returned an unexpected error (%v)", err) + } + + if body.IsOpen() { + t.Fatalf("the response was not closed!") + } +} + func TestServicePrincipalTokenRefreshSetsMimeType(t *testing.T) { spt := newServicePrincipalToken() diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization.go b/vendor/github.com/Azure/go-autorest/autorest/authorization.go index 7f4e3d845..314ed7876 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/authorization.go +++ b/vendor/github.com/Azure/go-autorest/autorest/authorization.go @@ -3,10 +3,18 @@ package autorest import ( "fmt" "net/http" + "net/url" + "strings" "github.com/Azure/go-autorest/autorest/adal" ) +const ( + bearerChallengeHeader = "Www-Authenticate" + bearer = "Bearer" + tenantID = "tenantID" +) + // Authorizer is the interface that provides a PrepareDecorator used to supply request // authorization. Most often, the Authorizer decorator runs last so it has access to the full // state of the formed HTTP request. @@ -55,3 +63,105 @@ func (ba *BearerAuthorizer) WithAuthorization() PrepareDecorator { }) } } + +// BearerAuthorizerCallbackFunc is the authentication callback signature. +type BearerAuthorizerCallbackFunc func(tenantID, resource string) (*BearerAuthorizer, error) + +// BearerAuthorizerCallback implements bearer authorization via a callback. +type BearerAuthorizerCallback struct { + sender Sender + callback BearerAuthorizerCallbackFunc +} + +// NewBearerAuthorizerCallback creates a bearer authorization callback. The callback +// is invoked when the HTTP request is submitted. +func NewBearerAuthorizerCallback(sender Sender, callback BearerAuthorizerCallbackFunc) *BearerAuthorizerCallback { + if sender == nil { + sender = &http.Client{} + } + return &BearerAuthorizerCallback{sender: sender, callback: callback} +} + +// WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose value +// is "Bearer " followed by the token. The BearerAuthorizer is obtained via a user-supplied callback. +// +// By default, the token will be automatically refreshed through the Refresher interface. +func (bacb *BearerAuthorizerCallback) WithAuthorization() PrepareDecorator { + return func(p Preparer) Preparer { + return PreparerFunc(func(r *http.Request) (*http.Request, error) { + // make a copy of the request and remove the body as it's not + // required and avoids us having to create a copy of it. + rCopy := *r + removeRequestBody(&rCopy) + + resp, err := bacb.sender.Do(&rCopy) + if err == nil && resp.StatusCode == 401 { + defer resp.Body.Close() + if hasBearerChallenge(resp) { + bc, err := newBearerChallenge(resp) + if err != nil { + return r, err + } + if bacb.callback != nil { + ba, err := bacb.callback(bc.values[tenantID], bc.values["resource"]) + if err != nil { + return r, err + } + return ba.WithAuthorization()(p).Prepare(r) + } + } + } + return r, err + }) + } +} + +// returns true if the HTTP response contains a bearer challenge +func hasBearerChallenge(resp *http.Response) bool { + authHeader := resp.Header.Get(bearerChallengeHeader) + if len(authHeader) == 0 || strings.Index(authHeader, bearer) < 0 { + return false + } + return true +} + +type bearerChallenge struct { + values map[string]string +} + +func newBearerChallenge(resp *http.Response) (bc bearerChallenge, err error) { + challenge := strings.TrimSpace(resp.Header.Get(bearerChallengeHeader)) + trimmedChallenge := challenge[len(bearer)+1:] + + // challenge is a set of key=value pairs that are comma delimited + pairs := strings.Split(trimmedChallenge, ",") + if len(pairs) < 1 { + err = fmt.Errorf("challenge '%s' contains no pairs", challenge) + return bc, err + } + + bc.values = make(map[string]string) + for i := range pairs { + trimmedPair := strings.TrimSpace(pairs[i]) + pair := strings.Split(trimmedPair, "=") + if len(pair) == 2 { + // remove the enclosing quotes + key := strings.Trim(pair[0], "\"") + value := strings.Trim(pair[1], "\"") + + switch key { + case "authorization", "authorization_uri": + // strip the tenant ID from the authorization URL + asURL, err := url.Parse(value) + if err != nil { + return bc, err + } + bc.values[tenantID] = asURL.Path[1:] + default: + bc.values[key] = value + } + } + } + + return bc, err +} diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization_test.go b/vendor/github.com/Azure/go-autorest/autorest/authorization_test.go index d3f638880..10db45aaf 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/authorization_test.go +++ b/vendor/github.com/Azure/go-autorest/autorest/authorization_test.go @@ -135,3 +135,40 @@ func TestServicePrincipalTokenWithAuthorizationReturnsErrorIfConnotRefresh(t *te t.Fatal("azure: BearerAuthorizer#WithAuthorization failed to return an error when refresh fails") } } + +func TestBearerAuthorizerCallback(t *testing.T) { + tenantString := "123-tenantID-456" + resourceString := "https://fake.resource.net" + + s := mocks.NewSender() + resp := mocks.NewResponseWithStatus("401 Unauthorized", http.StatusUnauthorized) + mocks.SetResponseHeader(resp, bearerChallengeHeader, bearer+" \"authorization\"=\"https://fake.net/"+tenantString+"\",\"resource\"=\""+resourceString+"\"") + s.AppendResponse(resp) + + auth := NewBearerAuthorizerCallback(s, func(tenantID, resource string) (*BearerAuthorizer, error) { + if tenantID != tenantString { + t.Fatal("BearerAuthorizerCallback: bad tenant ID") + } + if resource != resourceString { + t.Fatal("BearerAuthorizerCallback: bad resource") + } + + oauthConfig, err := adal.NewOAuthConfig(TestActiveDirectoryEndpoint, tenantID) + if err != nil { + t.Fatalf("azure: NewOAuthConfig returned an error (%v)", err) + } + + spt, err := adal.NewServicePrincipalToken(*oauthConfig, "id", "secret", resource) + if err != nil { + t.Fatalf("azure: NewServicePrincipalToken returned an error (%v)", err) + } + + spt.SetSender(s) + return NewBearerAuthorizer(spt), nil + }) + + _, err := Prepare(mocks.NewRequest(), auth.WithAuthorization()) + if err == nil { + t.Fatal("azure: BearerAuthorizerCallback#WithAuthorization failed to return an error when refresh fails") + } +} diff --git a/vendor/github.com/Azure/go-autorest/autorest/client.go b/vendor/github.com/Azure/go-autorest/autorest/client.go index b5f94b5c3..5f1e72fbe 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/client.go +++ b/vendor/github.com/Azure/go-autorest/autorest/client.go @@ -35,6 +35,7 @@ var ( statusCodesForRetry = []int{ http.StatusRequestTimeout, // 408 + http.StatusTooManyRequests, // 429 http.StatusInternalServerError, // 500 http.StatusBadGateway, // 502 http.StatusServiceUnavailable, // 503 diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/unixtime_test.go b/vendor/github.com/Azure/go-autorest/autorest/date/unixtime_test.go index 3d18fd600..8156a1c01 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/date/unixtime_test.go +++ b/vendor/github.com/Azure/go-autorest/autorest/date/unixtime_test.go @@ -1,3 +1,5 @@ +// +build go1.7 + package date import ( diff --git a/vendor/github.com/Azure/go-autorest/autorest/error.go b/vendor/github.com/Azure/go-autorest/autorest/error.go index 4bcb8f27b..aaef2ac8e 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/error.go +++ b/vendor/github.com/Azure/go-autorest/autorest/error.go @@ -31,6 +31,9 @@ type DetailedError struct { // Service Error is the response body of failed API in bytes ServiceError []byte + + // Response is the response object that was returned during failure if applicable. + Response *http.Response } // NewError creates a new Error conforming object from the passed packageType, method, and @@ -67,6 +70,7 @@ func NewErrorWithError(original error, packageType string, method string, resp * Method: method, StatusCode: statusCode, Message: fmt.Sprintf(message, args...), + Response: resp, } } diff --git a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest.go b/vendor/github.com/Azure/go-autorest/autorest/retriablerequest.go index fb686de27..0ab1eb300 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest.go +++ b/vendor/github.com/Azure/go-autorest/autorest/retriablerequest.go @@ -7,14 +7,6 @@ import ( "net/http" ) -// RetriableRequest provides facilities for retrying an HTTP request. -type RetriableRequest struct { - req *http.Request - rc io.ReadCloser - br *bytes.Reader - reset bool -} - // NewRetriableRequest returns a wrapper around an HTTP request that support retry logic. func NewRetriableRequest(req *http.Request) *RetriableRequest { return &RetriableRequest{req: req} @@ -25,49 +17,22 @@ func (rr *RetriableRequest) Request() *http.Request { return rr.req } -// Prepare signals that the request is about to be sent. -func (rr *RetriableRequest) Prepare() (err error) { - // preserve the request body; this is to support retry logic as - // the underlying transport will always close the reqeust body - if rr.req.Body != nil { - if rr.reset { - if rr.rc != nil { - rr.req.Body = rr.rc - } else if rr.br != nil { - _, err = rr.br.Seek(0, io.SeekStart) - } - rr.reset = false - if err != nil { - return err - } +func (rr *RetriableRequest) prepareFromByteReader() (err error) { + // fall back to making a copy (only do this once) + b := []byte{} + if rr.req.ContentLength > 0 { + b = make([]byte, rr.req.ContentLength) + _, err = io.ReadFull(rr.req.Body, b) + if err != nil { + return err } - if rr.req.GetBody != nil { - // this will allow us to preserve the body without having to - // make a copy. note we need to do this on each iteration - rr.rc, err = rr.req.GetBody() - if err != nil { - return err - } - } else if rr.br == nil { - // fall back to making a copy (only do this once) - b := []byte{} - if rr.req.ContentLength > 0 { - b = make([]byte, rr.req.ContentLength) - _, err = io.ReadFull(rr.req.Body, b) - if err != nil { - return err - } - } else { - b, err = ioutil.ReadAll(rr.req.Body) - if err != nil { - return err - } - } - rr.br = bytes.NewReader(b) - rr.req.Body = ioutil.NopCloser(rr.br) + } else { + b, err = ioutil.ReadAll(rr.req.Body) + if err != nil { + return err } - // indicates that the request body needs to be reset - rr.reset = true } + rr.br = bytes.NewReader(b) + rr.req.Body = ioutil.NopCloser(rr.br) return err } diff --git a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.7.go b/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.7.go new file mode 100644 index 000000000..e28eb2cbd --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.7.go @@ -0,0 +1,44 @@ +// +build !go1.8 + +package autorest + +import ( + "bytes" + "net/http" +) + +// RetriableRequest provides facilities for retrying an HTTP request. +type RetriableRequest struct { + req *http.Request + br *bytes.Reader + reset bool +} + +// Prepare signals that the request is about to be sent. +func (rr *RetriableRequest) Prepare() (err error) { + // preserve the request body; this is to support retry logic as + // the underlying transport will always close the reqeust body + if rr.req.Body != nil { + if rr.reset { + if rr.br != nil { + _, err = rr.br.Seek(0, 0 /*io.SeekStart*/) + } + rr.reset = false + if err != nil { + return err + } + } + if rr.br == nil { + // fall back to making a copy (only do this once) + err = rr.prepareFromByteReader() + } + // indicates that the request body needs to be reset + rr.reset = true + } + return err +} + +func removeRequestBody(req *http.Request) { + req.Body = nil + req.ContentLength = 0 +} diff --git a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.8.go b/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.8.go new file mode 100644 index 000000000..8c1d1aec8 --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.8.go @@ -0,0 +1,56 @@ +// +build go1.8 + +package autorest + +import ( + "bytes" + "io" + "net/http" +) + +// RetriableRequest provides facilities for retrying an HTTP request. +type RetriableRequest struct { + req *http.Request + rc io.ReadCloser + br *bytes.Reader + reset bool +} + +// Prepare signals that the request is about to be sent. +func (rr *RetriableRequest) Prepare() (err error) { + // preserve the request body; this is to support retry logic as + // the underlying transport will always close the reqeust body + if rr.req.Body != nil { + if rr.reset { + if rr.rc != nil { + rr.req.Body = rr.rc + } else if rr.br != nil { + _, err = rr.br.Seek(0, io.SeekStart) + } + rr.reset = false + if err != nil { + return err + } + } + if rr.req.GetBody != nil { + // this will allow us to preserve the body without having to + // make a copy. note we need to do this on each iteration + rr.rc, err = rr.req.GetBody() + if err != nil { + return err + } + } else if rr.br == nil { + // fall back to making a copy (only do this once) + err = rr.prepareFromByteReader() + } + // indicates that the request body needs to be reset + rr.reset = true + } + return err +} + +func removeRequestBody(req *http.Request) { + req.Body = nil + req.GetBody = nil + req.ContentLength = 0 +} diff --git a/vendor/github.com/Azure/go-autorest/autorest/sender.go b/vendor/github.com/Azure/go-autorest/autorest/sender.go index 9b88f329a..94b029847 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/sender.go +++ b/vendor/github.com/Azure/go-autorest/autorest/sender.go @@ -5,6 +5,7 @@ import ( "log" "math" "net/http" + "strconv" "time" ) @@ -209,13 +210,31 @@ func DoRetryForStatusCodes(attempts int, backoff time.Duration, codes ...int) Se if err != nil || !ResponseHasStatusCode(resp, codes...) { return resp, err } - DelayForBackoff(backoff, attempt, r.Cancel) + delayed := DelayWithRetryAfter(resp, r.Cancel) + if !delayed { + DelayForBackoff(backoff, attempt, r.Cancel) + } } return resp, err }) } } +// DelayWithRetryAfter invokes time.After for the duration specified in the "Retry-After" header in +// responses with status code 429 +func DelayWithRetryAfter(resp *http.Response, cancel <-chan struct{}) bool { + retryAfter, _ := strconv.Atoi(resp.Header.Get("Retry-After")) + if resp.StatusCode == http.StatusTooManyRequests && retryAfter > 0 { + select { + case <-time.After(time.Duration(retryAfter) * time.Second): + return true + case <-cancel: + return false + } + } + return false +} + // DoRetryForDuration returns a SendDecorator that retries the request until the total time is equal // to or greater than the specified duration, exponentially backing off between requests using the // supplied backoff time.Duration (which may be zero). Retrying may be canceled by closing the diff --git a/vendor/github.com/Azure/go-autorest/autorest/sender_test.go b/vendor/github.com/Azure/go-autorest/autorest/sender_test.go index d8e7beddb..bc90cbfaa 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/sender_test.go +++ b/vendor/github.com/Azure/go-autorest/autorest/sender_test.go @@ -765,3 +765,33 @@ func newAcceptedResponse() *http.Response { mocks.SetAcceptedHeaders(resp) return resp } + +func TestDelayWithRetryAfterWithSuccess(t *testing.T) { + after, retries := 5, 2 + totalSecs := after * retries + + client := mocks.NewSender() + resp := mocks.NewResponseWithStatus("429 Too many requests", http.StatusTooManyRequests) + mocks.SetResponseHeader(resp, "Retry-After", fmt.Sprintf("%v", after)) + client.AppendAndRepeatResponse(resp, retries) + client.AppendResponse(mocks.NewResponseWithStatus("200 OK", http.StatusOK)) + + d := time.Second * time.Duration(totalSecs) + start := time.Now() + r, _ := SendWithSender(client, mocks.NewRequest(), + DoRetryForStatusCodes(5, time.Duration(time.Second), http.StatusTooManyRequests), + ) + + if time.Since(start) < d { + t.Fatal("autorest: DelayWithRetryAfter failed stopped too soon") + } + + Respond(r, + ByDiscardingBody(), + ByClosing()) + + if client.Attempts() != 3 { + t.Fatalf("autorest: Sender#DelayWithRetryAfter -- Got: StatusCode %v in %v attempts; Want: StatusCode 200 OK in 2 attempts -- ", + r.Status, client.Attempts()-1) + } +} diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go b/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go index d7b0eadc5..38f0074d0 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go +++ b/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go @@ -205,14 +205,14 @@ func validateString(x reflect.Value, v Constraint) error { return createError(x, v, fmt.Sprintf("rule must be integer value for %v constraint; got: %v", v.Name, v.Rule)) } if len(s) > v.Rule.(int) { - return createError(x, v, fmt.Sprintf("value length must be less than %v", v.Rule)) + return createError(x, v, fmt.Sprintf("value length must be less than or equal to %v", v.Rule)) } case MinLength: if _, ok := v.Rule.(int); !ok { return createError(x, v, fmt.Sprintf("rule must be integer value for %v constraint; got: %v", v.Name, v.Rule)) } if len(s) < v.Rule.(int) { - return createError(x, v, fmt.Sprintf("value length must be greater than %v", v.Rule)) + return createError(x, v, fmt.Sprintf("value length must be greater than or equal to %v", v.Rule)) } case ReadOnly: if len(s) > 0 { @@ -273,6 +273,17 @@ func validateArrayMap(x reflect.Value, v Constraint) error { if x.Len() != 0 { return createError(x, v, "readonly parameter; must send as nil or empty in request") } + case Pattern: + reg, err := regexp.Compile(v.Rule.(string)) + if err != nil { + return createError(x, v, err.Error()) + } + keys := x.MapKeys() + for _, k := range keys { + if !reg.MatchString(k.String()) { + return createError(k, v, fmt.Sprintf("map key doesn't match pattern %v", v.Rule)) + } + } default: return createError(x, v, fmt.Sprintf("constraint %v is not applicable to array, slice and map type", v.Name)) } diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/validation_test.go b/vendor/github.com/Azure/go-autorest/autorest/validation/validation_test.go index fdf822846..59051494d 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/validation/validation_test.go +++ b/vendor/github.com/Azure/go-autorest/autorest/validation/validation_test.go @@ -706,7 +706,7 @@ func TestValidateString_MaxLengthInvalid(t *testing.T) { Chain: nil, } require.Equal(t, strings.Contains(validateString(reflect.ValueOf(x), c).Error(), - fmt.Sprintf("value length must be less than %v", c.Rule)), true) + fmt.Sprintf("value length must be less than or equal to %v", c.Rule)), true) } func TestValidateString_MaxLengthValid(t *testing.T) { @@ -741,7 +741,7 @@ func TestValidateString_MinLengthInvalid(t *testing.T) { Chain: nil, } require.Equal(t, strings.Contains(validateString(reflect.ValueOf(x), c).Error(), - fmt.Sprintf("value length must be greater than %v", c.Rule)), true) + fmt.Sprintf("value length must be greater than or equal to %v", c.Rule)), true) } func TestValidateString_MinLengthValid(t *testing.T) { @@ -1389,7 +1389,7 @@ func TestValidatePointer_StringInvalid(t *testing.T) { }}} require.Equal(t, validatePtr(reflect.ValueOf(x), c).Error(), createError(reflect.ValueOf("hello"), c.Chain[0], - "value length must be less than 2").Error()) + "value length must be less than or equal to 2").Error()) } func TestValidatePointer_ArrayValid(t *testing.T) { @@ -1496,7 +1496,7 @@ func TestValidatePointer_StructWithError(t *testing.T) { } require.Equal(t, validatePtr(reflect.ValueOf(x), c).Error(), createError(reflect.ValueOf("100"), c.Chain[0].Chain[0], - "value length must be less than 2").Error()) + "value length must be less than or equal to 2").Error()) } func TestValidatePointer_WithNilStruct(t *testing.T) { @@ -1579,7 +1579,7 @@ func TestValidateStruct_WithChainConstraint(t *testing.T) { }, } require.Equal(t, validateStruct(reflect.ValueOf(x), c).Error(), - createError(reflect.ValueOf("100"), c.Chain[0].Chain[0], "value length must be less than 2").Error()) + createError(reflect.ValueOf("100"), c.Chain[0].Chain[0], "value length must be less than or equal to 2").Error()) } func TestValidateStruct_WithoutChainConstraint(t *testing.T) { @@ -1794,6 +1794,7 @@ func TestValidate_MapValidationWithoutError(t *testing.T) { {"M", Empty, false, nil}, {"M", MinItems, 1, nil}, {"M", UniqueItems, true, nil}, + {"M", Pattern, "^[a-z]+$", nil}, }, }, }, @@ -1807,6 +1808,7 @@ func TestValidate_MapValidationWithoutError(t *testing.T) { {"M", Empty, false, nil}, {"M", MinItems, 1, nil}, {"M", UniqueItems, true, nil}, + {"M", Pattern, "^[a-z]+$", nil}, }, }, }, @@ -2005,7 +2007,7 @@ func TestValidate_String(t *testing.T) { } require.Equal(t, Validate(v).Error(), createError(reflect.ValueOf(s), v[0].Constraints[1].Chain[0], - "value length must be less than 3").Error()) + "value length must be less than or equal to 3").Error()) // required paramter s = "" @@ -2063,7 +2065,7 @@ func TestValidate_StringStruct(t *testing.T) { // } require.Equal(t, Validate(v).Error(), createError(reflect.ValueOf(s), v[0].Constraints[0].Chain[0].Chain[1], - "value length must be less than 3").Error()) + "value length must be less than or equal to 3").Error()) // required paramter - can't be Empty s = "" @@ -2348,7 +2350,7 @@ func TestValidate_StructInStruct(t *testing.T) { } require.Equal(t, Validate(v).Error(), createError(reflect.ValueOf(p.C.I), v[0].Constraints[0].Chain[0].Chain[0], - "value length must be greater than 7").Error()) + "value length must be greater than or equal to 7").Error()) // required paramter - can't be Empty p = &Product{ diff --git a/vendor/github.com/cpuguy83/go-md2man/Dockerfile b/vendor/github.com/cpuguy83/go-md2man/Dockerfile new file mode 100644 index 000000000..97bec8289 --- /dev/null +++ b/vendor/github.com/cpuguy83/go-md2man/Dockerfile @@ -0,0 +1,8 @@ +FROM golang:1.8 AS build +COPY . /go/src/github.com/cpuguy83/go-md2man +WORKDIR /go/src/github.com/cpuguy83/go-md2man +RUN CGO_ENABLED=0 go build + +FROM scratch +COPY --from=build /go/src/github.com/cpuguy83/go-md2man/go-md2man /go-md2man +ENTRYPOINT ["/go-md2man"] diff --git a/vendor/github.com/cpuguy83/go-md2man/Gopkg.lock b/vendor/github.com/cpuguy83/go-md2man/Gopkg.lock new file mode 100644 index 000000000..03f34f68b --- /dev/null +++ b/vendor/github.com/cpuguy83/go-md2man/Gopkg.lock @@ -0,0 +1,15 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/russross/blackfriday" + packages = ["."] + revision = "4048872b16cc0fc2c5fd9eacf0ed2c2fedaa0c8c" + version = "v1.5" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "d4fdd599038b13752bbcaf722cac55d8e6d81b6fd60bb325df3e31d71aaf358c" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/vendor/github.com/cpuguy83/go-md2man/Gopkg.toml b/vendor/github.com/cpuguy83/go-md2man/Gopkg.toml new file mode 100644 index 000000000..9372f8c85 --- /dev/null +++ b/vendor/github.com/cpuguy83/go-md2man/Gopkg.toml @@ -0,0 +1,26 @@ + +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" + + +[[constraint]] + name = "github.com/russross/blackfriday" + version = "1.4" diff --git a/vendor/github.com/cpuguy83/go-md2man/md2man/roff.go b/vendor/github.com/cpuguy83/go-md2man/md2man/roff.go index b8cea1c73..292fca343 100644 --- a/vendor/github.com/cpuguy83/go-md2man/md2man/roff.go +++ b/vendor/github.com/cpuguy83/go-md2man/md2man/roff.go @@ -118,11 +118,24 @@ func (r *roffRenderer) Paragraph(out *bytes.Buffer, text func() bool) { } } -// TODO: This might now work func (r *roffRenderer) Table(out *bytes.Buffer, header []byte, body []byte, columnData []int) { - out.WriteString(".TS\nallbox;\n") + out.WriteString("\n.TS\nallbox;\n") + max_delims := 0 + lines := strings.Split(strings.TrimRight(string(header), "\n")+"\n"+strings.TrimRight(string(body), "\n"), "\n") + for _, w := range lines { + cur_delims := strings.Count(w, "\t") + if cur_delims > max_delims { + max_delims = cur_delims + } + } + out.Write([]byte(strings.Repeat("l ", max_delims+1) + "\n")) + out.Write([]byte(strings.Repeat("l ", max_delims+1) + ".\n")) out.Write(header) + if len(header) > 0 { + out.Write([]byte("\n")) + } + out.Write(body) out.WriteString("\n.TE\n") } @@ -132,24 +145,30 @@ func (r *roffRenderer) TableRow(out *bytes.Buffer, text []byte) { out.WriteString("\n") } out.Write(text) - out.WriteString("\n") } func (r *roffRenderer) TableHeaderCell(out *bytes.Buffer, text []byte, align int) { if out.Len() > 0 { - out.WriteString(" ") + out.WriteString("\t") } - out.Write(text) - out.WriteString(" ") + if len(text) == 0 { + text = []byte{' '} + } + out.Write([]byte("\\fB\\fC" + string(text) + "\\fR")) } -// TODO: This is probably broken func (r *roffRenderer) TableCell(out *bytes.Buffer, text []byte, align int) { if out.Len() > 0 { out.WriteString("\t") } + if len(text) > 30 { + text = append([]byte("T{\n"), text...) + text = append(text, []byte("\nT}")...) + } + if len(text) == 0 { + text = []byte{' '} + } out.Write(text) - out.WriteString("\t") } func (r *roffRenderer) Footnotes(out *bytes.Buffer, text func() bool) { diff --git a/vendor/github.com/cpuguy83/go-md2man/md2man/roff_test.go b/vendor/github.com/cpuguy83/go-md2man/md2man/roff_test.go new file mode 100644 index 000000000..b8804f133 --- /dev/null +++ b/vendor/github.com/cpuguy83/go-md2man/md2man/roff_test.go @@ -0,0 +1,83 @@ +package md2man + +import ( + "bytes" + "testing" +) + +func TestBlockCode(t *testing.T) { + r := &roffRenderer{} + buf := bytes.NewBuffer(nil) + + code := []byte("$ echo hello world\nhello world\n") + r.BlockCode(buf, code, "") + + expected := ` +.PP +.RS + +.nf +$ echo hello world +hello world + +.fi +.RE +` + result := buf.String() + if expected != result { + t.Fatalf("got incorrect output:\nexpected:\n%v\n\ngot:\n%v", expected, result) + } +} + +func TestTableCell(t *testing.T) { + r := &roffRenderer{} + buf := bytes.NewBuffer(nil) + cell := []byte{} + + r.TableCell(buf, cell, 0) + expected := " " + if buf.String() != expected { + t.Fatal("expected %q, got %q", expected, buf.String()) + } + + r.TableCell(buf, cell, 0) + expected += "\t " + if buf.String() != expected { + t.Fatalf("expected %q, got %q", expected, buf.String()) + } + + cell = []byte("*") + r.TableCell(buf, cell, 0) + expected += "\t*" + if buf.String() != expected { + t.Fatalf("expected %q, got %q", expected, buf.String()) + } + + cell = []byte("this is a test with some really long string") + r.TableCell(buf, cell, 0) + expected += "\tT{\nthis is a test with some really long string\nT}" + if buf.String() != expected { + t.Fatalf("expected %q, got %q", expected, buf.String()) + } + + cell = []byte("some short string") + r.TableCell(buf, cell, 0) + expected += "\tsome short string" + if buf.String() != expected { + t.Fatalf("expected %q, got %q", expected, buf.String()) + } + + cell = []byte{} + r.TableCell(buf, cell, 0) + expected += "\t " + if buf.String() != expected { + t.Fatalf("expected %q, got %q", expected, buf.String()) + } + + cell = []byte("*") + r.TableCell(buf, cell, 0) + expected += "\t*" + if buf.String() != expected { + t.Fatalf("expected %q, got %q", expected, buf.String()) + } +} diff --git a/vendor/github.com/cpuguy83/go-md2man/vendor.yml b/vendor/github.com/cpuguy83/go-md2man/vendor.yml deleted file mode 100644 index 1b85d9ae5..000000000 --- a/vendor/github.com/cpuguy83/go-md2man/vendor.yml +++ /dev/null @@ -1,5 +0,0 @@ -vendors: -- path: github.com/russross/blackfriday - rev: 93622da34e54fb6529bfb7c57e710f37a8d9cbd8 -- path: github.com/shurcooL/sanitized_anchor_name - rev: 10ef21a441db47d8b13ebcc5fd2310f636973c77 diff --git a/vendor/github.com/dustin/go-humanize/.gitignore b/vendor/github.com/dustin/go-humanize/.gitignore new file mode 100644 index 000000000..05b40514a --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/.gitignore @@ -0,0 +1,6 @@ +#* +*.[568] +*.a +*~ +[568].out +_* diff --git a/vendor/github.com/shurcooL/sanitized_anchor_name/.travis.yml b/vendor/github.com/dustin/go-humanize/.travis.yml similarity index 86% rename from vendor/github.com/shurcooL/sanitized_anchor_name/.travis.yml rename to vendor/github.com/dustin/go-humanize/.travis.yml index 93b1fcdb3..ba95cdd15 100644 --- a/vendor/github.com/shurcooL/sanitized_anchor_name/.travis.yml +++ b/vendor/github.com/dustin/go-humanize/.travis.yml @@ -1,7 +1,12 @@ sudo: false language: go go: - - 1.x + - 1.3.x + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x - master matrix: allow_failures: diff --git a/vendor/github.com/dustin/go-humanize/LICENSE b/vendor/github.com/dustin/go-humanize/LICENSE new file mode 100644 index 000000000..8d9a94a90 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2005-2008 Dustin Sallings + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/vendor/github.com/dustin/go-humanize/README.markdown b/vendor/github.com/dustin/go-humanize/README.markdown new file mode 100644 index 000000000..f69d3c870 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/README.markdown @@ -0,0 +1,92 @@ +# Humane Units [![Build Status](https://travis-ci.org/dustin/go-humanize.svg?branch=master)](https://travis-ci.org/dustin/go-humanize) [![GoDoc](https://godoc.org/github.com/dustin/go-humanize?status.svg)](https://godoc.org/github.com/dustin/go-humanize) + +Just a few functions for helping humanize times and sizes. + +`go get` it as `github.com/dustin/go-humanize`, import it as +`"github.com/dustin/go-humanize"`, use it as `humanize`. + +See [godoc](https://godoc.org/github.com/dustin/go-humanize) for +complete documentation. + +## Sizes + +This lets you take numbers like `82854982` and convert them to useful +strings like, `83 MB` or `79 MiB` (whichever you prefer). + +Example: + +```go +fmt.Printf("That file is %s.", humanize.Bytes(82854982)) // That file is 83 MB. +``` + +## Times + +This lets you take a `time.Time` and spit it out in relative terms. +For example, `12 seconds ago` or `3 days from now`. + +Example: + +```go +fmt.Printf("This was touched %s.", humanize.Time(someTimeInstance)) // This was touched 7 hours ago. +``` + +Thanks to Kyle Lemons for the time implementation from an IRC +conversation one day. It's pretty neat. + +## Ordinals + +From a [mailing list discussion][odisc] where a user wanted to be able +to label ordinals. + + 0 -> 0th + 1 -> 1st + 2 -> 2nd + 3 -> 3rd + 4 -> 4th + [...] + +Example: + +```go +fmt.Printf("You're my %s best friend.", humanize.Ordinal(193)) // You are my 193rd best friend. +``` + +## Commas + +Want to shove commas into numbers? Be my guest. + + 0 -> 0 + 100 -> 100 + 1000 -> 1,000 + 1000000000 -> 1,000,000,000 + -100000 -> -100,000 + +Example: + +```go +fmt.Printf("You owe $%s.\n", humanize.Comma(6582491)) // You owe $6,582,491. +``` + +## Ftoa + +Nicer float64 formatter that removes trailing zeros. + +```go +fmt.Printf("%f", 2.24) // 2.240000 +fmt.Printf("%s", humanize.Ftoa(2.24)) // 2.24 +fmt.Printf("%f", 2.0) // 2.000000 +fmt.Printf("%s", humanize.Ftoa(2.0)) // 2 +``` + +## SI notation + +Format numbers with [SI notation][sinotation]. + +Example: + +```go +humanize.SI(0.00000000223, "M") // 2.23 nM +``` + +[odisc]: https://groups.google.com/d/topic/golang-nuts/l8NhI74jl-4/discussion +[sinotation]: http://en.wikipedia.org/wiki/Metric_prefix diff --git a/vendor/github.com/dustin/go-humanize/big.go b/vendor/github.com/dustin/go-humanize/big.go new file mode 100644 index 000000000..f49dc337d --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/big.go @@ -0,0 +1,31 @@ +package humanize + +import ( + "math/big" +) + +// order of magnitude (to a max order) +func oomm(n, b *big.Int, maxmag int) (float64, int) { + mag := 0 + m := &big.Int{} + for n.Cmp(b) >= 0 { + n.DivMod(n, b, m) + mag++ + if mag == maxmag && maxmag >= 0 { + break + } + } + return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag +} + +// total order of magnitude +// (same as above, but with no upper limit) +func oom(n, b *big.Int) (float64, int) { + mag := 0 + m := &big.Int{} + for n.Cmp(b) >= 0 { + n.DivMod(n, b, m) + mag++ + } + return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag +} diff --git a/vendor/github.com/dustin/go-humanize/bigbytes.go b/vendor/github.com/dustin/go-humanize/bigbytes.go new file mode 100644 index 000000000..1a2bf6172 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/bigbytes.go @@ -0,0 +1,173 @@ +package humanize + +import ( + "fmt" + "math/big" + "strings" + "unicode" +) + +var ( + bigIECExp = big.NewInt(1024) + + // BigByte is one byte in bit.Ints + BigByte = big.NewInt(1) + // BigKiByte is 1,024 bytes in bit.Ints + BigKiByte = (&big.Int{}).Mul(BigByte, bigIECExp) + // BigMiByte is 1,024 k bytes in bit.Ints + BigMiByte = (&big.Int{}).Mul(BigKiByte, bigIECExp) + // BigGiByte is 1,024 m bytes in bit.Ints + BigGiByte = (&big.Int{}).Mul(BigMiByte, bigIECExp) + // BigTiByte is 1,024 g bytes in bit.Ints + BigTiByte = (&big.Int{}).Mul(BigGiByte, bigIECExp) + // BigPiByte is 1,024 t bytes in bit.Ints + BigPiByte = (&big.Int{}).Mul(BigTiByte, bigIECExp) + // BigEiByte is 1,024 p bytes in bit.Ints + BigEiByte = (&big.Int{}).Mul(BigPiByte, bigIECExp) + // BigZiByte is 1,024 e bytes in bit.Ints + BigZiByte = (&big.Int{}).Mul(BigEiByte, bigIECExp) + // BigYiByte is 1,024 z bytes in bit.Ints + BigYiByte = (&big.Int{}).Mul(BigZiByte, bigIECExp) +) + +var ( + bigSIExp = big.NewInt(1000) + + // BigSIByte is one SI byte in big.Ints + BigSIByte = big.NewInt(1) + // BigKByte is 1,000 SI bytes in big.Ints + BigKByte = (&big.Int{}).Mul(BigSIByte, bigSIExp) + // BigMByte is 1,000 SI k bytes in big.Ints + BigMByte = (&big.Int{}).Mul(BigKByte, bigSIExp) + // BigGByte is 1,000 SI m bytes in big.Ints + BigGByte = (&big.Int{}).Mul(BigMByte, bigSIExp) + // BigTByte is 1,000 SI g bytes in big.Ints + BigTByte = (&big.Int{}).Mul(BigGByte, bigSIExp) + // BigPByte is 1,000 SI t bytes in big.Ints + BigPByte = (&big.Int{}).Mul(BigTByte, bigSIExp) + // BigEByte is 1,000 SI p bytes in big.Ints + BigEByte = (&big.Int{}).Mul(BigPByte, bigSIExp) + // BigZByte is 1,000 SI e bytes in big.Ints + BigZByte = (&big.Int{}).Mul(BigEByte, bigSIExp) + // BigYByte is 1,000 SI z bytes in big.Ints + BigYByte = (&big.Int{}).Mul(BigZByte, bigSIExp) +) + +var bigBytesSizeTable = map[string]*big.Int{ + "b": BigByte, + "kib": BigKiByte, + "kb": BigKByte, + "mib": BigMiByte, + "mb": BigMByte, + "gib": BigGiByte, + "gb": BigGByte, + "tib": BigTiByte, + "tb": BigTByte, + "pib": BigPiByte, + "pb": BigPByte, + "eib": BigEiByte, + "eb": BigEByte, + "zib": BigZiByte, + "zb": BigZByte, + "yib": BigYiByte, + "yb": BigYByte, + // Without suffix + "": BigByte, + "ki": BigKiByte, + "k": BigKByte, + "mi": BigMiByte, + "m": BigMByte, + "gi": BigGiByte, + "g": BigGByte, + "ti": BigTiByte, + "t": BigTByte, + "pi": BigPiByte, + "p": BigPByte, + "ei": BigEiByte, + "e": BigEByte, + "z": BigZByte, + "zi": BigZiByte, + "y": BigYByte, + "yi": BigYiByte, +} + +var ten = big.NewInt(10) + +func humanateBigBytes(s, base *big.Int, sizes []string) string { + if s.Cmp(ten) < 0 { + return fmt.Sprintf("%d B", s) + } + c := (&big.Int{}).Set(s) + val, mag := oomm(c, base, len(sizes)-1) + suffix := sizes[mag] + f := "%.0f %s" + if val < 10 { + f = "%.1f %s" + } + + return fmt.Sprintf(f, val, suffix) + +} + +// BigBytes produces a human readable representation of an SI size. +// +// See also: ParseBigBytes. +// +// BigBytes(82854982) -> 83 MB +func BigBytes(s *big.Int) string { + sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"} + return humanateBigBytes(s, bigSIExp, sizes) +} + +// BigIBytes produces a human readable representation of an IEC size. +// +// See also: ParseBigBytes. +// +// BigIBytes(82854982) -> 79 MiB +func BigIBytes(s *big.Int) string { + sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"} + return humanateBigBytes(s, bigIECExp, sizes) +} + +// ParseBigBytes parses a string representation of bytes into the number +// of bytes it represents. +// +// See also: BigBytes, BigIBytes. +// +// ParseBigBytes("42 MB") -> 42000000, nil +// ParseBigBytes("42 mib") -> 44040192, nil +func ParseBigBytes(s string) (*big.Int, error) { + lastDigit := 0 + hasComma := false + for _, r := range s { + if !(unicode.IsDigit(r) || r == '.' || r == ',') { + break + } + if r == ',' { + hasComma = true + } + lastDigit++ + } + + num := s[:lastDigit] + if hasComma { + num = strings.Replace(num, ",", "", -1) + } + + val := &big.Rat{} + _, err := fmt.Sscanf(num, "%f", val) + if err != nil { + return nil, err + } + + extra := strings.ToLower(strings.TrimSpace(s[lastDigit:])) + if m, ok := bigBytesSizeTable[extra]; ok { + mv := (&big.Rat{}).SetInt(m) + val.Mul(val, mv) + rv := &big.Int{} + rv.Div(val.Num(), val.Denom()) + return rv, nil + } + + return nil, fmt.Errorf("unhandled size name: %v", extra) +} diff --git a/vendor/github.com/dustin/go-humanize/bigbytes_test.go b/vendor/github.com/dustin/go-humanize/bigbytes_test.go new file mode 100644 index 000000000..236ad0806 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/bigbytes_test.go @@ -0,0 +1,220 @@ +package humanize + +import ( + "math/big" + "testing" +) + +func TestBigByteParsing(t *testing.T) { + tests := []struct { + in string + exp uint64 + }{ + {"42", 42}, + {"42MB", 42000000}, + {"42MiB", 44040192}, + {"42mb", 42000000}, + {"42mib", 44040192}, + {"42MIB", 44040192}, + {"42 MB", 42000000}, + {"42 MiB", 44040192}, + {"42 mb", 42000000}, + {"42 mib", 44040192}, + {"42 MIB", 44040192}, + {"42.5MB", 42500000}, + {"42.5MiB", 44564480}, + {"42.5 MB", 42500000}, + {"42.5 MiB", 44564480}, + // No need to say B + {"42M", 42000000}, + {"42Mi", 44040192}, + {"42m", 42000000}, + {"42mi", 44040192}, + {"42MI", 44040192}, + {"42 M", 42000000}, + {"42 Mi", 44040192}, + {"42 m", 42000000}, + {"42 mi", 44040192}, + {"42 MI", 44040192}, + {"42.5M", 42500000}, + {"42.5Mi", 44564480}, + {"42.5 M", 42500000}, + {"42.5 Mi", 44564480}, + {"1,005.03 MB", 1005030000}, + // Large testing, breaks when too much larger than + // this. + {"12.5 EB", uint64(12.5 * float64(EByte))}, + {"12.5 E", uint64(12.5 * float64(EByte))}, + {"12.5 EiB", uint64(12.5 * float64(EiByte))}, + } + + for _, p := range tests { + got, err := ParseBigBytes(p.in) + if err != nil { + t.Errorf("Couldn't parse %v: %v", p.in, err) + } else { + if got.Uint64() != p.exp { + t.Errorf("Expected %v for %v, got %v", + p.exp, p.in, got) + } + } + } +} + +func TestBigByteErrors(t *testing.T) { + got, err := ParseBigBytes("84 JB") + if err == nil { + t.Errorf("Expected error, got %v", got) + } + got, err = ParseBigBytes("") + if err == nil { + t.Errorf("Expected error parsing nothing") + } +} + +func bbyte(in uint64) string { + return BigBytes((&big.Int{}).SetUint64(in)) +} + +func bibyte(in uint64) string { + return BigIBytes((&big.Int{}).SetUint64(in)) +} + +func TestBigBytes(t *testing.T) { + testList{ + {"bytes(0)", bbyte(0), "0 B"}, + {"bytes(1)", bbyte(1), "1 B"}, + {"bytes(803)", bbyte(803), "803 B"}, + {"bytes(999)", bbyte(999), "999 B"}, + + {"bytes(1024)", bbyte(1024), "1.0 kB"}, + {"bytes(1MB - 1)", bbyte(MByte - Byte), "1000 kB"}, + + {"bytes(1MB)", bbyte(1024 * 1024), "1.0 MB"}, + {"bytes(1GB - 1K)", bbyte(GByte - KByte), "1000 MB"}, + + {"bytes(1GB)", bbyte(GByte), "1.0 GB"}, + {"bytes(1TB - 1M)", bbyte(TByte - MByte), "1000 GB"}, + + {"bytes(1TB)", bbyte(TByte), "1.0 TB"}, + {"bytes(1PB - 1T)", bbyte(PByte - TByte), "999 TB"}, + + {"bytes(1PB)", bbyte(PByte), "1.0 PB"}, + {"bytes(1PB - 1T)", bbyte(EByte - PByte), "999 PB"}, + + {"bytes(1EB)", bbyte(EByte), "1.0 EB"}, + // Overflows. + // {"bytes(1EB - 1P)", Bytes((KByte*EByte)-PByte), "1023EB"}, + + {"bytes(0)", bibyte(0), "0 B"}, + {"bytes(1)", bibyte(1), "1 B"}, + {"bytes(803)", bibyte(803), "803 B"}, + {"bytes(1023)", bibyte(1023), "1023 B"}, + + {"bytes(1024)", bibyte(1024), "1.0 KiB"}, + {"bytes(1MB - 1)", bibyte(MiByte - IByte), "1024 KiB"}, + + {"bytes(1MB)", bibyte(1024 * 1024), "1.0 MiB"}, + {"bytes(1GB - 1K)", bibyte(GiByte - KiByte), "1024 MiB"}, + + {"bytes(1GB)", bibyte(GiByte), "1.0 GiB"}, + {"bytes(1TB - 1M)", bibyte(TiByte - MiByte), "1024 GiB"}, + + {"bytes(1TB)", bibyte(TiByte), "1.0 TiB"}, + {"bytes(1PB - 1T)", bibyte(PiByte - TiByte), "1023 TiB"}, + + {"bytes(1PB)", bibyte(PiByte), "1.0 PiB"}, + {"bytes(1PB - 1T)", bibyte(EiByte - PiByte), "1023 PiB"}, + + {"bytes(1EiB)", bibyte(EiByte), "1.0 EiB"}, + // Overflows. + // {"bytes(1EB - 1P)", bibyte((KIByte*EIByte)-PiByte), "1023EB"}, + + {"bytes(5.5GiB)", bibyte(5.5 * GiByte), "5.5 GiB"}, + + {"bytes(5.5GB)", bbyte(5.5 * GByte), "5.5 GB"}, + }.validate(t) +} + +func TestVeryBigBytes(t *testing.T) { + b, _ := (&big.Int{}).SetString("15347691069326346944512", 10) + s := BigBytes(b) + if s != "15 ZB" { + t.Errorf("Expected 15 ZB, got %v", s) + } + s = BigIBytes(b) + if s != "13 ZiB" { + t.Errorf("Expected 13 ZiB, got %v", s) + } + + b, _ = (&big.Int{}).SetString("15716035654990179271180288", 10) + s = BigBytes(b) + if s != "16 YB" { + t.Errorf("Expected 16 YB, got %v", s) + } + s = BigIBytes(b) + if s != "13 YiB" { + t.Errorf("Expected 13 YiB, got %v", s) + } +} + +func TestVeryVeryBigBytes(t *testing.T) { + b, _ := (&big.Int{}).SetString("16093220510709943573688614912", 10) + s := BigBytes(b) + if s != "16093 YB" { + t.Errorf("Expected 16093 YB, got %v", s) + } + s = BigIBytes(b) + if s != "13312 YiB" { + t.Errorf("Expected 13312 YiB, got %v", s) + } +} + +func TestParseVeryBig(t *testing.T) { + tests := []struct { + in string + out string + }{ + {"16 ZB", "16000000000000000000000"}, + {"16 ZiB", "18889465931478580854784"}, + {"16.5 ZB", "16500000000000000000000"}, + {"16.5 ZiB", "19479761741837286506496"}, + {"16 Z", "16000000000000000000000"}, + {"16 Zi", "18889465931478580854784"}, + {"16.5 Z", "16500000000000000000000"}, + {"16.5 Zi", "19479761741837286506496"}, + + {"16 YB", "16000000000000000000000000"}, + {"16 YiB", "19342813113834066795298816"}, + {"16.5 YB", "16500000000000000000000000"}, + {"16.5 YiB", "19947276023641381382651904"}, + {"16 Y", "16000000000000000000000000"}, + {"16 Yi", "19342813113834066795298816"}, + {"16.5 Y", "16500000000000000000000000"}, + {"16.5 Yi", "19947276023641381382651904"}, + } + + for _, test := range tests { + x, err := ParseBigBytes(test.in) + if err != nil { + t.Errorf("Error parsing %q: %v", test.in, err) + continue + } + + if x.String() != test.out { + t.Errorf("Expected %q for %q, got %v", test.out, test.in, x) + } + } +} + +func BenchmarkParseBigBytes(b *testing.B) { + for i := 0; i < b.N; i++ { + ParseBigBytes("16.5 Z") + } +} + +func BenchmarkBigBytes(b *testing.B) { + for i := 0; i < b.N; i++ { + bibyte(16.5 * GByte) + } +} diff --git a/vendor/github.com/dustin/go-humanize/bytes.go b/vendor/github.com/dustin/go-humanize/bytes.go new file mode 100644 index 000000000..0b498f488 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/bytes.go @@ -0,0 +1,143 @@ +package humanize + +import ( + "fmt" + "math" + "strconv" + "strings" + "unicode" +) + +// IEC Sizes. +// kibis of bits +const ( + Byte = 1 << (iota * 10) + KiByte + MiByte + GiByte + TiByte + PiByte + EiByte +) + +// SI Sizes. +const ( + IByte = 1 + KByte = IByte * 1000 + MByte = KByte * 1000 + GByte = MByte * 1000 + TByte = GByte * 1000 + PByte = TByte * 1000 + EByte = PByte * 1000 +) + +var bytesSizeTable = map[string]uint64{ + "b": Byte, + "kib": KiByte, + "kb": KByte, + "mib": MiByte, + "mb": MByte, + "gib": GiByte, + "gb": GByte, + "tib": TiByte, + "tb": TByte, + "pib": PiByte, + "pb": PByte, + "eib": EiByte, + "eb": EByte, + // Without suffix + "": Byte, + "ki": KiByte, + "k": KByte, + "mi": MiByte, + "m": MByte, + "gi": GiByte, + "g": GByte, + "ti": TiByte, + "t": TByte, + "pi": PiByte, + "p": PByte, + "ei": EiByte, + "e": EByte, +} + +func logn(n, b float64) float64 { + return math.Log(n) / math.Log(b) +} + +func humanateBytes(s uint64, base float64, sizes []string) string { + if s < 10 { + return fmt.Sprintf("%d B", s) + } + e := math.Floor(logn(float64(s), base)) + suffix := sizes[int(e)] + val := math.Floor(float64(s)/math.Pow(base, e)*10+0.5) / 10 + f := "%.0f %s" + if val < 10 { + f = "%.1f %s" + } + + return fmt.Sprintf(f, val, suffix) +} + +// Bytes produces a human readable representation of an SI size. +// +// See also: ParseBytes. +// +// Bytes(82854982) -> 83 MB +func Bytes(s uint64) string { + sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB"} + return humanateBytes(s, 1000, sizes) +} + +// IBytes produces a human readable representation of an IEC size. +// +// See also: ParseBytes. +// +// IBytes(82854982) -> 79 MiB +func IBytes(s uint64) string { + sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"} + return humanateBytes(s, 1024, sizes) +} + +// ParseBytes parses a string representation of bytes into the number +// of bytes it represents. +// +// See Also: Bytes, IBytes. +// +// ParseBytes("42 MB") -> 42000000, nil +// ParseBytes("42 mib") -> 44040192, nil +func ParseBytes(s string) (uint64, error) { + lastDigit := 0 + hasComma := false + for _, r := range s { + if !(unicode.IsDigit(r) || r == '.' || r == ',') { + break + } + if r == ',' { + hasComma = true + } + lastDigit++ + } + + num := s[:lastDigit] + if hasComma { + num = strings.Replace(num, ",", "", -1) + } + + f, err := strconv.ParseFloat(num, 64) + if err != nil { + return 0, err + } + + extra := strings.ToLower(strings.TrimSpace(s[lastDigit:])) + if m, ok := bytesSizeTable[extra]; ok { + f *= float64(m) + if f >= math.MaxUint64 { + return 0, fmt.Errorf("too large: %v", s) + } + return uint64(f), nil + } + + return 0, fmt.Errorf("unhandled size name: %v", extra) +} diff --git a/vendor/github.com/dustin/go-humanize/bytes_test.go b/vendor/github.com/dustin/go-humanize/bytes_test.go new file mode 100644 index 000000000..0bb811c70 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/bytes_test.go @@ -0,0 +1,146 @@ +package humanize + +import ( + "testing" +) + +func TestByteParsing(t *testing.T) { + tests := []struct { + in string + exp uint64 + }{ + {"42", 42}, + {"42MB", 42000000}, + {"42MiB", 44040192}, + {"42mb", 42000000}, + {"42mib", 44040192}, + {"42MIB", 44040192}, + {"42 MB", 42000000}, + {"42 MiB", 44040192}, + {"42 mb", 42000000}, + {"42 mib", 44040192}, + {"42 MIB", 44040192}, + {"42.5MB", 42500000}, + {"42.5MiB", 44564480}, + {"42.5 MB", 42500000}, + {"42.5 MiB", 44564480}, + // No need to say B + {"42M", 42000000}, + {"42Mi", 44040192}, + {"42m", 42000000}, + {"42mi", 44040192}, + {"42MI", 44040192}, + {"42 M", 42000000}, + {"42 Mi", 44040192}, + {"42 m", 42000000}, + {"42 mi", 44040192}, + {"42 MI", 44040192}, + {"42.5M", 42500000}, + {"42.5Mi", 44564480}, + {"42.5 M", 42500000}, + {"42.5 Mi", 44564480}, + // Bug #42 + {"1,005.03 MB", 1005030000}, + // Large testing, breaks when too much larger than + // this. + {"12.5 EB", uint64(12.5 * float64(EByte))}, + {"12.5 E", uint64(12.5 * float64(EByte))}, + {"12.5 EiB", uint64(12.5 * float64(EiByte))}, + } + + for _, p := range tests { + got, err := ParseBytes(p.in) + if err != nil { + t.Errorf("Couldn't parse %v: %v", p.in, err) + } + if got != p.exp { + t.Errorf("Expected %v for %v, got %v", + p.exp, p.in, got) + } + } +} + +func TestByteErrors(t *testing.T) { + got, err := ParseBytes("84 JB") + if err == nil { + t.Errorf("Expected error, got %v", got) + } + got, err = ParseBytes("") + if err == nil { + t.Errorf("Expected error parsing nothing") + } + got, err = ParseBytes("16 EiB") + if err == nil { + t.Errorf("Expected error, got %v", got) + } +} + +func TestBytes(t *testing.T) { + testList{ + {"bytes(0)", Bytes(0), "0 B"}, + {"bytes(1)", Bytes(1), "1 B"}, + {"bytes(803)", Bytes(803), "803 B"}, + {"bytes(999)", Bytes(999), "999 B"}, + + {"bytes(1024)", Bytes(1024), "1.0 kB"}, + {"bytes(9999)", Bytes(9999), "10 kB"}, + {"bytes(1MB - 1)", Bytes(MByte - Byte), "1000 kB"}, + + {"bytes(1MB)", Bytes(1024 * 1024), "1.0 MB"}, + {"bytes(1GB - 1K)", Bytes(GByte - KByte), "1000 MB"}, + + {"bytes(1GB)", Bytes(GByte), "1.0 GB"}, + {"bytes(1TB - 1M)", Bytes(TByte - MByte), "1000 GB"}, + {"bytes(10MB)", Bytes(9999 * 1000), "10 MB"}, + + {"bytes(1TB)", Bytes(TByte), "1.0 TB"}, + {"bytes(1PB - 1T)", Bytes(PByte - TByte), "999 TB"}, + + {"bytes(1PB)", Bytes(PByte), "1.0 PB"}, + {"bytes(1PB - 1T)", Bytes(EByte - PByte), "999 PB"}, + + {"bytes(1EB)", Bytes(EByte), "1.0 EB"}, + // Overflows. + // {"bytes(1EB - 1P)", Bytes((KByte*EByte)-PByte), "1023EB"}, + + {"bytes(0)", IBytes(0), "0 B"}, + {"bytes(1)", IBytes(1), "1 B"}, + {"bytes(803)", IBytes(803), "803 B"}, + {"bytes(1023)", IBytes(1023), "1023 B"}, + + {"bytes(1024)", IBytes(1024), "1.0 KiB"}, + {"bytes(1MB - 1)", IBytes(MiByte - IByte), "1024 KiB"}, + + {"bytes(1MB)", IBytes(1024 * 1024), "1.0 MiB"}, + {"bytes(1GB - 1K)", IBytes(GiByte - KiByte), "1024 MiB"}, + + {"bytes(1GB)", IBytes(GiByte), "1.0 GiB"}, + {"bytes(1TB - 1M)", IBytes(TiByte - MiByte), "1024 GiB"}, + + {"bytes(1TB)", IBytes(TiByte), "1.0 TiB"}, + {"bytes(1PB - 1T)", IBytes(PiByte - TiByte), "1023 TiB"}, + + {"bytes(1PB)", IBytes(PiByte), "1.0 PiB"}, + {"bytes(1PB - 1T)", IBytes(EiByte - PiByte), "1023 PiB"}, + + {"bytes(1EiB)", IBytes(EiByte), "1.0 EiB"}, + // Overflows. + // {"bytes(1EB - 1P)", IBytes((KIByte*EIByte)-PiByte), "1023EB"}, + + {"bytes(5.5GiB)", IBytes(5.5 * GiByte), "5.5 GiB"}, + + {"bytes(5.5GB)", Bytes(5.5 * GByte), "5.5 GB"}, + }.validate(t) +} + +func BenchmarkParseBytes(b *testing.B) { + for i := 0; i < b.N; i++ { + ParseBytes("16.5 GB") + } +} + +func BenchmarkBytes(b *testing.B) { + for i := 0; i < b.N; i++ { + Bytes(16.5 * GByte) + } +} diff --git a/vendor/github.com/dustin/go-humanize/comma.go b/vendor/github.com/dustin/go-humanize/comma.go new file mode 100644 index 000000000..eb285cb95 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/comma.go @@ -0,0 +1,108 @@ +package humanize + +import ( + "bytes" + "math" + "math/big" + "strconv" + "strings" +) + +// Comma produces a string form of the given number in base 10 with +// commas after every three orders of magnitude. +// +// e.g. Comma(834142) -> 834,142 +func Comma(v int64) string { + sign := "" + + // minin64 can't be negated to a usable value, so it has to be special cased. + if v == math.MinInt64 { + return "-9,223,372,036,854,775,808" + } + + if v < 0 { + sign = "-" + v = 0 - v + } + + parts := []string{"", "", "", "", "", "", ""} + j := len(parts) - 1 + + for v > 999 { + parts[j] = strconv.FormatInt(v%1000, 10) + switch len(parts[j]) { + case 2: + parts[j] = "0" + parts[j] + case 1: + parts[j] = "00" + parts[j] + } + v = v / 1000 + j-- + } + parts[j] = strconv.Itoa(int(v)) + return sign + strings.Join(parts[j:], ",") +} + +// Commaf produces a string form of the given number in base 10 with +// commas after every three orders of magnitude. +// +// e.g. Commaf(834142.32) -> 834,142.32 +func Commaf(v float64) string { + buf := &bytes.Buffer{} + if v < 0 { + buf.Write([]byte{'-'}) + v = 0 - v + } + + comma := []byte{','} + + parts := strings.Split(strconv.FormatFloat(v, 'f', -1, 64), ".") + pos := 0 + if len(parts[0])%3 != 0 { + pos += len(parts[0]) % 3 + buf.WriteString(parts[0][:pos]) + buf.Write(comma) + } + for ; pos < len(parts[0]); pos += 3 { + buf.WriteString(parts[0][pos : pos+3]) + buf.Write(comma) + } + buf.Truncate(buf.Len() - 1) + + if len(parts) > 1 { + buf.Write([]byte{'.'}) + buf.WriteString(parts[1]) + } + return buf.String() +} + +// BigComma produces a string form of the given big.Int in base 10 +// with commas after every three orders of magnitude. +func BigComma(b *big.Int) string { + sign := "" + if b.Sign() < 0 { + sign = "-" + b.Abs(b) + } + + athousand := big.NewInt(1000) + c := (&big.Int{}).Set(b) + _, m := oom(c, athousand) + parts := make([]string, m+1) + j := len(parts) - 1 + + mod := &big.Int{} + for b.Cmp(athousand) >= 0 { + b.DivMod(b, athousand, mod) + parts[j] = strconv.FormatInt(mod.Int64(), 10) + switch len(parts[j]) { + case 2: + parts[j] = "0" + parts[j] + case 1: + parts[j] = "00" + parts[j] + } + j-- + } + parts[j] = strconv.Itoa(int(b.Int64())) + return sign + strings.Join(parts[j:], ",") +} diff --git a/vendor/github.com/dustin/go-humanize/comma_test.go b/vendor/github.com/dustin/go-humanize/comma_test.go new file mode 100644 index 000000000..89daca5fb --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/comma_test.go @@ -0,0 +1,136 @@ +package humanize + +import ( + "math" + "math/big" + "testing" +) + +func TestCommas(t *testing.T) { + testList{ + {"0", Comma(0), "0"}, + {"10", Comma(10), "10"}, + {"100", Comma(100), "100"}, + {"1,000", Comma(1000), "1,000"}, + {"10,000", Comma(10000), "10,000"}, + {"100,000", Comma(100000), "100,000"}, + {"10,000,000", Comma(10000000), "10,000,000"}, + {"10,100,000", Comma(10100000), "10,100,000"}, + {"10,010,000", Comma(10010000), "10,010,000"}, + {"10,001,000", Comma(10001000), "10,001,000"}, + {"123,456,789", Comma(123456789), "123,456,789"}, + {"maxint", Comma(9.223372e+18), "9,223,372,000,000,000,000"}, + {"math.maxint", Comma(math.MaxInt64), "9,223,372,036,854,775,807"}, + {"math.minint", Comma(math.MinInt64), "-9,223,372,036,854,775,808"}, + {"minint", Comma(-9.223372e+18), "-9,223,372,000,000,000,000"}, + {"-123,456,789", Comma(-123456789), "-123,456,789"}, + {"-10,100,000", Comma(-10100000), "-10,100,000"}, + {"-10,010,000", Comma(-10010000), "-10,010,000"}, + {"-10,001,000", Comma(-10001000), "-10,001,000"}, + {"-10,000,000", Comma(-10000000), "-10,000,000"}, + {"-100,000", Comma(-100000), "-100,000"}, + {"-10,000", Comma(-10000), "-10,000"}, + {"-1,000", Comma(-1000), "-1,000"}, + {"-100", Comma(-100), "-100"}, + {"-10", Comma(-10), "-10"}, + }.validate(t) +} + +func TestCommafs(t *testing.T) { + testList{ + {"0", Commaf(0), "0"}, + {"10.11", Commaf(10.11), "10.11"}, + {"100", Commaf(100), "100"}, + {"1,000", Commaf(1000), "1,000"}, + {"10,000", Commaf(10000), "10,000"}, + {"100,000", Commaf(100000), "100,000"}, + {"834,142.32", Commaf(834142.32), "834,142.32"}, + {"10,000,000", Commaf(10000000), "10,000,000"}, + {"10,100,000", Commaf(10100000), "10,100,000"}, + {"10,010,000", Commaf(10010000), "10,010,000"}, + {"10,001,000", Commaf(10001000), "10,001,000"}, + {"123,456,789", Commaf(123456789), "123,456,789"}, + {"maxf64", Commaf(math.MaxFloat64), "179,769,313,486,231,570,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000"}, + {"minf64", Commaf(math.SmallestNonzeroFloat64), "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005"}, + {"-123,456,789", Commaf(-123456789), "-123,456,789"}, + {"-10,100,000", Commaf(-10100000), "-10,100,000"}, + {"-10,010,000", Commaf(-10010000), "-10,010,000"}, + {"-10,001,000", Commaf(-10001000), "-10,001,000"}, + {"-10,000,000", Commaf(-10000000), "-10,000,000"}, + {"-100,000", Commaf(-100000), "-100,000"}, + {"-10,000", Commaf(-10000), "-10,000"}, + {"-1,000", Commaf(-1000), "-1,000"}, + {"-100.11", Commaf(-100.11), "-100.11"}, + {"-10", Commaf(-10), "-10"}, + }.validate(t) +} + +func BenchmarkCommas(b *testing.B) { + for i := 0; i < b.N; i++ { + Comma(1234567890) + } +} + +func BenchmarkCommaf(b *testing.B) { + for i := 0; i < b.N; i++ { + Commaf(1234567890.83584) + } +} + +func BenchmarkBigCommas(b *testing.B) { + for i := 0; i < b.N; i++ { + BigComma(big.NewInt(1234567890)) + } +} + +func bigComma(i int64) string { + return BigComma(big.NewInt(i)) +} + +func TestBigCommas(t *testing.T) { + testList{ + {"0", bigComma(0), "0"}, + {"10", bigComma(10), "10"}, + {"100", bigComma(100), "100"}, + {"1,000", bigComma(1000), "1,000"}, + {"10,000", bigComma(10000), "10,000"}, + {"100,000", bigComma(100000), "100,000"}, + {"10,000,000", bigComma(10000000), "10,000,000"}, + {"10,100,000", bigComma(10100000), "10,100,000"}, + {"10,010,000", bigComma(10010000), "10,010,000"}, + {"10,001,000", bigComma(10001000), "10,001,000"}, + {"123,456,789", bigComma(123456789), "123,456,789"}, + {"maxint", bigComma(9.223372e+18), "9,223,372,000,000,000,000"}, + {"minint", bigComma(-9.223372e+18), "-9,223,372,000,000,000,000"}, + {"-123,456,789", bigComma(-123456789), "-123,456,789"}, + {"-10,100,000", bigComma(-10100000), "-10,100,000"}, + {"-10,010,000", bigComma(-10010000), "-10,010,000"}, + {"-10,001,000", bigComma(-10001000), "-10,001,000"}, + {"-10,000,000", bigComma(-10000000), "-10,000,000"}, + {"-100,000", bigComma(-100000), "-100,000"}, + {"-10,000", bigComma(-10000), "-10,000"}, + {"-1,000", bigComma(-1000), "-1,000"}, + {"-100", bigComma(-100), "-100"}, + {"-10", bigComma(-10), "-10"}, + }.validate(t) +} + +func TestVeryBigCommas(t *testing.T) { + tests := []struct{ in, exp string }{ + { + "84889279597249724975972597249849757294578485", + "84,889,279,597,249,724,975,972,597,249,849,757,294,578,485", + }, + { + "-84889279597249724975972597249849757294578485", + "-84,889,279,597,249,724,975,972,597,249,849,757,294,578,485", + }, + } + for _, test := range tests { + n, _ := (&big.Int{}).SetString(test.in, 10) + got := BigComma(n) + if test.exp != got { + t.Errorf("Expected %q, got %q", test.exp, got) + } + } +} diff --git a/vendor/github.com/dustin/go-humanize/commaf.go b/vendor/github.com/dustin/go-humanize/commaf.go new file mode 100644 index 000000000..620690dec --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/commaf.go @@ -0,0 +1,40 @@ +// +build go1.6 + +package humanize + +import ( + "bytes" + "math/big" + "strings" +) + +// BigCommaf produces a string form of the given big.Float in base 10 +// with commas after every three orders of magnitude. +func BigCommaf(v *big.Float) string { + buf := &bytes.Buffer{} + if v.Sign() < 0 { + buf.Write([]byte{'-'}) + v.Abs(v) + } + + comma := []byte{','} + + parts := strings.Split(v.Text('f', -1), ".") + pos := 0 + if len(parts[0])%3 != 0 { + pos += len(parts[0]) % 3 + buf.WriteString(parts[0][:pos]) + buf.Write(comma) + } + for ; pos < len(parts[0]); pos += 3 { + buf.WriteString(parts[0][pos : pos+3]) + buf.Write(comma) + } + buf.Truncate(buf.Len() - 1) + + if len(parts) > 1 { + buf.Write([]byte{'.'}) + buf.WriteString(parts[1]) + } + return buf.String() +} diff --git a/vendor/github.com/dustin/go-humanize/commaf_test.go b/vendor/github.com/dustin/go-humanize/commaf_test.go new file mode 100644 index 000000000..21f7f9e5f --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/commaf_test.go @@ -0,0 +1,44 @@ +// +build go1.6 + +package humanize + +import ( + "math" + "math/big" + "testing" +) + +func BenchmarkBigCommaf(b *testing.B) { + for i := 0; i < b.N; i++ { + Commaf(1234567890.83584) + } +} + +func TestBigCommafs(t *testing.T) { + testList{ + {"0", BigCommaf(big.NewFloat(0)), "0"}, + {"10.11", BigCommaf(big.NewFloat(10.11)), "10.11"}, + {"100", BigCommaf(big.NewFloat(100)), "100"}, + {"1,000", BigCommaf(big.NewFloat(1000)), "1,000"}, + {"10,000", BigCommaf(big.NewFloat(10000)), "10,000"}, + {"100,000", BigCommaf(big.NewFloat(100000)), "100,000"}, + {"834,142.32", BigCommaf(big.NewFloat(834142.32)), "834,142.32"}, + {"10,000,000", BigCommaf(big.NewFloat(10000000)), "10,000,000"}, + {"10,100,000", BigCommaf(big.NewFloat(10100000)), "10,100,000"}, + {"10,010,000", BigCommaf(big.NewFloat(10010000)), "10,010,000"}, + {"10,001,000", BigCommaf(big.NewFloat(10001000)), "10,001,000"}, + {"123,456,789", BigCommaf(big.NewFloat(123456789)), "123,456,789"}, + {"maxf64", BigCommaf(big.NewFloat(math.MaxFloat64)), "179,769,313,486,231,570,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000"}, + {"minf64", BigCommaf(big.NewFloat(math.SmallestNonzeroFloat64)), "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004940656458412465"}, + {"-123,456,789", BigCommaf(big.NewFloat(-123456789)), "-123,456,789"}, + {"-10,100,000", BigCommaf(big.NewFloat(-10100000)), "-10,100,000"}, + {"-10,010,000", BigCommaf(big.NewFloat(-10010000)), "-10,010,000"}, + {"-10,001,000", BigCommaf(big.NewFloat(-10001000)), "-10,001,000"}, + {"-10,000,000", BigCommaf(big.NewFloat(-10000000)), "-10,000,000"}, + {"-100,000", BigCommaf(big.NewFloat(-100000)), "-100,000"}, + {"-10,000", BigCommaf(big.NewFloat(-10000)), "-10,000"}, + {"-1,000", BigCommaf(big.NewFloat(-1000)), "-1,000"}, + {"-100.11", BigCommaf(big.NewFloat(-100.11)), "-100.11"}, + {"-10", BigCommaf(big.NewFloat(-10)), "-10"}, + }.validate(t) +} diff --git a/vendor/github.com/dustin/go-humanize/common_test.go b/vendor/github.com/dustin/go-humanize/common_test.go new file mode 100644 index 000000000..fc7db1516 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/common_test.go @@ -0,0 +1,18 @@ +package humanize + +import ( + "testing" +) + +type testList []struct { + name, got, exp string +} + +func (tl testList) validate(t *testing.T) { + for _, test := range tl { + if test.got != test.exp { + t.Errorf("On %v, expected '%v', but got '%v'", + test.name, test.exp, test.got) + } + } +} diff --git a/vendor/github.com/dustin/go-humanize/ftoa.go b/vendor/github.com/dustin/go-humanize/ftoa.go new file mode 100644 index 000000000..c76190b10 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/ftoa.go @@ -0,0 +1,23 @@ +package humanize + +import "strconv" + +func stripTrailingZeros(s string) string { + offset := len(s) - 1 + for offset > 0 { + if s[offset] == '.' { + offset-- + break + } + if s[offset] != '0' { + break + } + offset-- + } + return s[:offset+1] +} + +// Ftoa converts a float to a string with no trailing zeros. +func Ftoa(num float64) string { + return stripTrailingZeros(strconv.FormatFloat(num, 'f', 6, 64)) +} diff --git a/vendor/github.com/dustin/go-humanize/ftoa_test.go b/vendor/github.com/dustin/go-humanize/ftoa_test.go new file mode 100644 index 000000000..276d411b7 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/ftoa_test.go @@ -0,0 +1,55 @@ +package humanize + +import ( + "fmt" + "regexp" + "strconv" + "testing" +) + +func TestFtoa(t *testing.T) { + testList{ + {"200", Ftoa(200), "200"}, + {"2", Ftoa(2), "2"}, + {"2.2", Ftoa(2.2), "2.2"}, + {"2.02", Ftoa(2.02), "2.02"}, + {"200.02", Ftoa(200.02), "200.02"}, + }.validate(t) +} + +func BenchmarkFtoaRegexTrailing(b *testing.B) { + trailingZerosRegex := regexp.MustCompile(`\.?0+$`) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + trailingZerosRegex.ReplaceAllString("2.00000", "") + trailingZerosRegex.ReplaceAllString("2.0000", "") + trailingZerosRegex.ReplaceAllString("2.000", "") + trailingZerosRegex.ReplaceAllString("2.00", "") + trailingZerosRegex.ReplaceAllString("2.0", "") + trailingZerosRegex.ReplaceAllString("2", "") + } +} + +func BenchmarkFtoaFunc(b *testing.B) { + for i := 0; i < b.N; i++ { + stripTrailingZeros("2.00000") + stripTrailingZeros("2.0000") + stripTrailingZeros("2.000") + stripTrailingZeros("2.00") + stripTrailingZeros("2.0") + stripTrailingZeros("2") + } +} + +func BenchmarkFmtF(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = fmt.Sprintf("%f", 2.03584) + } +} + +func BenchmarkStrconvF(b *testing.B) { + for i := 0; i < b.N; i++ { + strconv.FormatFloat(2.03584, 'f', 6, 64) + } +} diff --git a/vendor/github.com/dustin/go-humanize/humanize.go b/vendor/github.com/dustin/go-humanize/humanize.go new file mode 100644 index 000000000..a2c2da31e --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/humanize.go @@ -0,0 +1,8 @@ +/* +Package humanize converts boring ugly numbers to human-friendly strings and back. + +Durations can be turned into strings such as "3 days ago", numbers +representing sizes like 82854982 into useful strings like, "83 MB" or +"79 MiB" (whichever you prefer). +*/ +package humanize diff --git a/vendor/github.com/dustin/go-humanize/number.go b/vendor/github.com/dustin/go-humanize/number.go new file mode 100644 index 000000000..dec618659 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/number.go @@ -0,0 +1,192 @@ +package humanize + +/* +Slightly adapted from the source to fit go-humanize. + +Author: https://github.com/gorhill +Source: https://gist.github.com/gorhill/5285193 + +*/ + +import ( + "math" + "strconv" +) + +var ( + renderFloatPrecisionMultipliers = [...]float64{ + 1, + 10, + 100, + 1000, + 10000, + 100000, + 1000000, + 10000000, + 100000000, + 1000000000, + } + + renderFloatPrecisionRounders = [...]float64{ + 0.5, + 0.05, + 0.005, + 0.0005, + 0.00005, + 0.000005, + 0.0000005, + 0.00000005, + 0.000000005, + 0.0000000005, + } +) + +// FormatFloat produces a formatted number as string based on the following user-specified criteria: +// * thousands separator +// * decimal separator +// * decimal precision +// +// Usage: s := RenderFloat(format, n) +// The format parameter tells how to render the number n. +// +// See examples: http://play.golang.org/p/LXc1Ddm1lJ +// +// Examples of format strings, given n = 12345.6789: +// "#,###.##" => "12,345.67" +// "#,###." => "12,345" +// "#,###" => "12345,678" +// "#\u202F###,##" => "12 345,68" +// "#.###,###### => 12.345,678900 +// "" (aka default format) => 12,345.67 +// +// The highest precision allowed is 9 digits after the decimal symbol. +// There is also a version for integer number, FormatInteger(), +// which is convenient for calls within template. +func FormatFloat(format string, n float64) string { + // Special cases: + // NaN = "NaN" + // +Inf = "+Infinity" + // -Inf = "-Infinity" + if math.IsNaN(n) { + return "NaN" + } + if n > math.MaxFloat64 { + return "Infinity" + } + if n < -math.MaxFloat64 { + return "-Infinity" + } + + // default format + precision := 2 + decimalStr := "." + thousandStr := "," + positiveStr := "" + negativeStr := "-" + + if len(format) > 0 { + format := []rune(format) + + // If there is an explicit format directive, + // then default values are these: + precision = 9 + thousandStr = "" + + // collect indices of meaningful formatting directives + formatIndx := []int{} + for i, char := range format { + if char != '#' && char != '0' { + formatIndx = append(formatIndx, i) + } + } + + if len(formatIndx) > 0 { + // Directive at index 0: + // Must be a '+' + // Raise an error if not the case + // index: 0123456789 + // +0.000,000 + // +000,000.0 + // +0000.00 + // +0000 + if formatIndx[0] == 0 { + if format[formatIndx[0]] != '+' { + panic("RenderFloat(): invalid positive sign directive") + } + positiveStr = "+" + formatIndx = formatIndx[1:] + } + + // Two directives: + // First is thousands separator + // Raise an error if not followed by 3-digit + // 0123456789 + // 0.000,000 + // 000,000.00 + if len(formatIndx) == 2 { + if (formatIndx[1] - formatIndx[0]) != 4 { + panic("RenderFloat(): thousands separator directive must be followed by 3 digit-specifiers") + } + thousandStr = string(format[formatIndx[0]]) + formatIndx = formatIndx[1:] + } + + // One directive: + // Directive is decimal separator + // The number of digit-specifier following the separator indicates wanted precision + // 0123456789 + // 0.00 + // 000,0000 + if len(formatIndx) == 1 { + decimalStr = string(format[formatIndx[0]]) + precision = len(format) - formatIndx[0] - 1 + } + } + } + + // generate sign part + var signStr string + if n >= 0.000000001 { + signStr = positiveStr + } else if n <= -0.000000001 { + signStr = negativeStr + n = -n + } else { + signStr = "" + n = 0.0 + } + + // split number into integer and fractional parts + intf, fracf := math.Modf(n + renderFloatPrecisionRounders[precision]) + + // generate integer part string + intStr := strconv.FormatInt(int64(intf), 10) + + // add thousand separator if required + if len(thousandStr) > 0 { + for i := len(intStr); i > 3; { + i -= 3 + intStr = intStr[:i] + thousandStr + intStr[i:] + } + } + + // no fractional part, we can leave now + if precision == 0 { + return signStr + intStr + } + + // generate fractional part + fracStr := strconv.Itoa(int(fracf * renderFloatPrecisionMultipliers[precision])) + // may need padding + if len(fracStr) < precision { + fracStr = "000000000000000"[:precision-len(fracStr)] + fracStr + } + + return signStr + intStr + decimalStr + fracStr +} + +// FormatInteger produces a formatted number as string. +// See FormatFloat. +func FormatInteger(format string, n int) string { + return FormatFloat(format, float64(n)) +} diff --git a/vendor/github.com/dustin/go-humanize/number_test.go b/vendor/github.com/dustin/go-humanize/number_test.go new file mode 100644 index 000000000..516f3378d --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/number_test.go @@ -0,0 +1,79 @@ +package humanize + +import ( + "math" + "testing" +) + +type TestStruct struct { + name string + format string + num float64 + formatted string +} + +func TestFormatFloat(t *testing.T) { + tests := []TestStruct{ + {"default", "", 12345.6789, "12,345.68"}, + {"#", "#", 12345.6789, "12345.678900000"}, + {"#.", "#.", 12345.6789, "12346"}, + {"#,#", "#,#", 12345.6789, "12345,7"}, + {"#,##", "#,##", 12345.6789, "12345,68"}, + {"#,###", "#,###", 12345.6789, "12345,679"}, + {"#,###.", "#,###.", 12345.6789, "12,346"}, + {"#,###.##", "#,###.##", 12345.6789, "12,345.68"}, + {"#,###.###", "#,###.###", 12345.6789, "12,345.679"}, + {"#,###.####", "#,###.####", 12345.6789, "12,345.6789"}, + {"#.###,######", "#.###,######", 12345.6789, "12.345,678900"}, + {"bug46", "#,###.##", 52746220055.92342, "52,746,220,055.92"}, + {"#\u202f###,##", "#\u202f###,##", 12345.6789, "12 345,68"}, + + // special cases + {"NaN", "#", math.NaN(), "NaN"}, + {"+Inf", "#", math.Inf(1), "Infinity"}, + {"-Inf", "#", math.Inf(-1), "-Infinity"}, + {"signStr <= -0.000000001", "", -0.000000002, "-0.00"}, + {"signStr = 0", "", 0, "0.00"}, + {"Format directive must start with +", "+000", 12345.6789, "+12345.678900000"}, + } + + for _, test := range tests { + got := FormatFloat(test.format, test.num) + if got != test.formatted { + t.Errorf("On %v (%v, %v), got %v, wanted %v", + test.name, test.format, test.num, got, test.formatted) + } + } + // Test a single integer + got := FormatInteger("#", 12345) + if got != "12345.000000000" { + t.Errorf("On %v (%v, %v), got %v, wanted %v", + "integerTest", "#", 12345, got, "12345.000000000") + } + // Test the things that could panic + panictests := []TestStruct{ + {"RenderFloat(): invalid positive sign directive", "-", 12345.6789, "12,345.68"}, + {"RenderFloat(): thousands separator directive must be followed by 3 digit-specifiers", "0.01", 12345.6789, "12,345.68"}, + } + for _, test := range panictests { + didPanic := false + var message interface{} + func() { + + defer func() { + if message = recover(); message != nil { + didPanic = true + } + }() + + // call the target function + _ = FormatFloat(test.format, test.num) + + }() + if didPanic != true { + t.Errorf("On %v, should have panic and did not.", + test.name) + } + } + +} diff --git a/vendor/github.com/dustin/go-humanize/ordinals.go b/vendor/github.com/dustin/go-humanize/ordinals.go new file mode 100644 index 000000000..43d88a861 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/ordinals.go @@ -0,0 +1,25 @@ +package humanize + +import "strconv" + +// Ordinal gives you the input number in a rank/ordinal format. +// +// Ordinal(3) -> 3rd +func Ordinal(x int) string { + suffix := "th" + switch x % 10 { + case 1: + if x%100 != 11 { + suffix = "st" + } + case 2: + if x%100 != 12 { + suffix = "nd" + } + case 3: + if x%100 != 13 { + suffix = "rd" + } + } + return strconv.Itoa(x) + suffix +} diff --git a/vendor/github.com/dustin/go-humanize/ordinals_test.go b/vendor/github.com/dustin/go-humanize/ordinals_test.go new file mode 100644 index 000000000..51d85ee7a --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/ordinals_test.go @@ -0,0 +1,22 @@ +package humanize + +import ( + "testing" +) + +func TestOrdinals(t *testing.T) { + testList{ + {"0", Ordinal(0), "0th"}, + {"1", Ordinal(1), "1st"}, + {"2", Ordinal(2), "2nd"}, + {"3", Ordinal(3), "3rd"}, + {"4", Ordinal(4), "4th"}, + {"10", Ordinal(10), "10th"}, + {"11", Ordinal(11), "11th"}, + {"12", Ordinal(12), "12th"}, + {"13", Ordinal(13), "13th"}, + {"101", Ordinal(101), "101st"}, + {"102", Ordinal(102), "102nd"}, + {"103", Ordinal(103), "103rd"}, + }.validate(t) +} diff --git a/vendor/github.com/dustin/go-humanize/si.go b/vendor/github.com/dustin/go-humanize/si.go new file mode 100644 index 000000000..b24e48169 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/si.go @@ -0,0 +1,113 @@ +package humanize + +import ( + "errors" + "math" + "regexp" + "strconv" +) + +var siPrefixTable = map[float64]string{ + -24: "y", // yocto + -21: "z", // zepto + -18: "a", // atto + -15: "f", // femto + -12: "p", // pico + -9: "n", // nano + -6: "µ", // micro + -3: "m", // milli + 0: "", + 3: "k", // kilo + 6: "M", // mega + 9: "G", // giga + 12: "T", // tera + 15: "P", // peta + 18: "E", // exa + 21: "Z", // zetta + 24: "Y", // yotta +} + +var revSIPrefixTable = revfmap(siPrefixTable) + +// revfmap reverses the map and precomputes the power multiplier +func revfmap(in map[float64]string) map[string]float64 { + rv := map[string]float64{} + for k, v := range in { + rv[v] = math.Pow(10, k) + } + return rv +} + +var riParseRegex *regexp.Regexp + +func init() { + ri := `^([\-0-9.]+)\s?([` + for _, v := range siPrefixTable { + ri += v + } + ri += `]?)(.*)` + + riParseRegex = regexp.MustCompile(ri) +} + +// ComputeSI finds the most appropriate SI prefix for the given number +// and returns the prefix along with the value adjusted to be within +// that prefix. +// +// See also: SI, ParseSI. +// +// e.g. ComputeSI(2.2345e-12) -> (2.2345, "p") +func ComputeSI(input float64) (float64, string) { + if input == 0 { + return 0, "" + } + mag := math.Abs(input) + exponent := math.Floor(logn(mag, 10)) + exponent = math.Floor(exponent/3) * 3 + + value := mag / math.Pow(10, exponent) + + // Handle special case where value is exactly 1000.0 + // Should return 1 M instead of 1000 k + if value == 1000.0 { + exponent += 3 + value = mag / math.Pow(10, exponent) + } + + value = math.Copysign(value, input) + + prefix := siPrefixTable[exponent] + return value, prefix +} + +// SI returns a string with default formatting. +// +// SI uses Ftoa to format float value, removing trailing zeros. +// +// See also: ComputeSI, ParseSI. +// +// e.g. SI(1000000, "B") -> 1 MB +// e.g. SI(2.2345e-12, "F") -> 2.2345 pF +func SI(input float64, unit string) string { + value, prefix := ComputeSI(input) + return Ftoa(value) + " " + prefix + unit +} + +var errInvalid = errors.New("invalid input") + +// ParseSI parses an SI string back into the number and unit. +// +// See also: SI, ComputeSI. +// +// e.g. ParseSI("2.2345 pF") -> (2.2345e-12, "F", nil) +func ParseSI(input string) (float64, string, error) { + found := riParseRegex.FindStringSubmatch(input) + if len(found) != 4 { + return 0, "", errInvalid + } + mag := revSIPrefixTable[found[2]] + unit := found[3] + + base, err := strconv.ParseFloat(found[1], 64) + return base * mag, unit, err +} diff --git a/vendor/github.com/dustin/go-humanize/si_test.go b/vendor/github.com/dustin/go-humanize/si_test.go new file mode 100644 index 000000000..bc5bac669 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/si_test.go @@ -0,0 +1,101 @@ +package humanize + +import ( + "math" + "testing" +) + +func TestSI(t *testing.T) { + tests := []struct { + name string + num float64 + formatted string + }{ + {"e-24", 1e-24, "1 yF"}, + {"e-21", 1e-21, "1 zF"}, + {"e-18", 1e-18, "1 aF"}, + {"e-15", 1e-15, "1 fF"}, + {"e-12", 1e-12, "1 pF"}, + {"e-12", 2.2345e-12, "2.2345 pF"}, + {"e-12", 2.23e-12, "2.23 pF"}, + {"e-11", 2.23e-11, "22.3 pF"}, + {"e-10", 2.2e-10, "220 pF"}, + {"e-9", 2.2e-9, "2.2 nF"}, + {"e-8", 2.2e-8, "22 nF"}, + {"e-7", 2.2e-7, "220 nF"}, + {"e-6", 2.2e-6, "2.2 µF"}, + {"e-6", 1e-6, "1 µF"}, + {"e-5", 2.2e-5, "22 µF"}, + {"e-4", 2.2e-4, "220 µF"}, + {"e-3", 2.2e-3, "2.2 mF"}, + {"e-2", 2.2e-2, "22 mF"}, + {"e-1", 2.2e-1, "220 mF"}, + {"e+0", 2.2e-0, "2.2 F"}, + {"e+0", 2.2, "2.2 F"}, + {"e+1", 2.2e+1, "22 F"}, + {"0", 0, "0 F"}, + {"e+1", 22, "22 F"}, + {"e+2", 2.2e+2, "220 F"}, + {"e+2", 220, "220 F"}, + {"e+3", 2.2e+3, "2.2 kF"}, + {"e+3", 2200, "2.2 kF"}, + {"e+4", 2.2e+4, "22 kF"}, + {"e+4", 22000, "22 kF"}, + {"e+5", 2.2e+5, "220 kF"}, + {"e+6", 2.2e+6, "2.2 MF"}, + {"e+6", 1e+6, "1 MF"}, + {"e+7", 2.2e+7, "22 MF"}, + {"e+8", 2.2e+8, "220 MF"}, + {"e+9", 2.2e+9, "2.2 GF"}, + {"e+10", 2.2e+10, "22 GF"}, + {"e+11", 2.2e+11, "220 GF"}, + {"e+12", 2.2e+12, "2.2 TF"}, + {"e+15", 2.2e+15, "2.2 PF"}, + {"e+18", 2.2e+18, "2.2 EF"}, + {"e+21", 2.2e+21, "2.2 ZF"}, + {"e+24", 2.2e+24, "2.2 YF"}, + + // special case + {"1F", 1000 * 1000, "1 MF"}, + {"1F", 1e6, "1 MF"}, + + // negative number + {"-100 F", -100, "-100 F"}, + } + + for _, test := range tests { + got := SI(test.num, "F") + if got != test.formatted { + t.Errorf("On %v (%v), got %v, wanted %v", + test.name, test.num, got, test.formatted) + } + + gotf, gotu, err := ParseSI(test.formatted) + if err != nil { + t.Errorf("Error parsing %v (%v): %v", test.name, test.formatted, err) + continue + } + + if math.Abs(1-(gotf/test.num)) > 0.01 { + t.Errorf("On %v (%v), got %v, wanted %v (±%v)", + test.name, test.formatted, gotf, test.num, + math.Abs(1-(gotf/test.num))) + } + if gotu != "F" { + t.Errorf("On %v (%v), expected unit F, got %v", + test.name, test.formatted, gotu) + } + } + + // Parse error + gotf, gotu, err := ParseSI("x1.21JW") // 1.21 jigga whats + if err == nil { + t.Errorf("Expected error on x1.21JW, got %v %v", gotf, gotu) + } +} + +func BenchmarkParseSI(b *testing.B) { + for i := 0; i < b.N; i++ { + ParseSI("2.2346ZB") + } +} diff --git a/vendor/github.com/dustin/go-humanize/times.go b/vendor/github.com/dustin/go-humanize/times.go new file mode 100644 index 000000000..b311f11c8 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/times.go @@ -0,0 +1,117 @@ +package humanize + +import ( + "fmt" + "math" + "sort" + "time" +) + +// Seconds-based time units +const ( + Day = 24 * time.Hour + Week = 7 * Day + Month = 30 * Day + Year = 12 * Month + LongTime = 37 * Year +) + +// Time formats a time into a relative string. +// +// Time(someT) -> "3 weeks ago" +func Time(then time.Time) string { + return RelTime(then, time.Now(), "ago", "from now") +} + +// A RelTimeMagnitude struct contains a relative time point at which +// the relative format of time will switch to a new format string. A +// slice of these in ascending order by their "D" field is passed to +// CustomRelTime to format durations. +// +// The Format field is a string that may contain a "%s" which will be +// replaced with the appropriate signed label (e.g. "ago" or "from +// now") and a "%d" that will be replaced by the quantity. +// +// The DivBy field is the amount of time the time difference must be +// divided by in order to display correctly. +// +// e.g. if D is 2*time.Minute and you want to display "%d minutes %s" +// DivBy should be time.Minute so whatever the duration is will be +// expressed in minutes. +type RelTimeMagnitude struct { + D time.Duration + Format string + DivBy time.Duration +} + +var defaultMagnitudes = []RelTimeMagnitude{ + {time.Second, "now", time.Second}, + {2 * time.Second, "1 second %s", 1}, + {time.Minute, "%d seconds %s", time.Second}, + {2 * time.Minute, "1 minute %s", 1}, + {time.Hour, "%d minutes %s", time.Minute}, + {2 * time.Hour, "1 hour %s", 1}, + {Day, "%d hours %s", time.Hour}, + {2 * Day, "1 day %s", 1}, + {Week, "%d days %s", Day}, + {2 * Week, "1 week %s", 1}, + {Month, "%d weeks %s", Week}, + {2 * Month, "1 month %s", 1}, + {Year, "%d months %s", Month}, + {18 * Month, "1 year %s", 1}, + {2 * Year, "2 years %s", 1}, + {LongTime, "%d years %s", Year}, + {math.MaxInt64, "a long while %s", 1}, +} + +// RelTime formats a time into a relative string. +// +// It takes two times and two labels. In addition to the generic time +// delta string (e.g. 5 minutes), the labels are used applied so that +// the label corresponding to the smaller time is applied. +// +// RelTime(timeInPast, timeInFuture, "earlier", "later") -> "3 weeks earlier" +func RelTime(a, b time.Time, albl, blbl string) string { + return CustomRelTime(a, b, albl, blbl, defaultMagnitudes) +} + +// CustomRelTime formats a time into a relative string. +// +// It takes two times two labels and a table of relative time formats. +// In addition to the generic time delta string (e.g. 5 minutes), the +// labels are used applied so that the label corresponding to the +// smaller time is applied. +func CustomRelTime(a, b time.Time, albl, blbl string, magnitudes []RelTimeMagnitude) string { + lbl := albl + diff := b.Sub(a) + + if a.After(b) { + lbl = blbl + diff = a.Sub(b) + } + + n := sort.Search(len(magnitudes), func(i int) bool { + return magnitudes[i].D >= diff + }) + + if n >= len(magnitudes) { + n = len(magnitudes) - 1 + } + mag := magnitudes[n] + args := []interface{}{} + escaped := false + for _, ch := range mag.Format { + if escaped { + switch ch { + case 's': + args = append(args, lbl) + case 'd': + args = append(args, diff/mag.DivBy) + } + escaped = false + } else { + escaped = ch == '%' + } + } + return fmt.Sprintf(mag.Format, args...) +} diff --git a/vendor/github.com/dustin/go-humanize/times_test.go b/vendor/github.com/dustin/go-humanize/times_test.go new file mode 100644 index 000000000..c90a71b1a --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/times_test.go @@ -0,0 +1,113 @@ +package humanize + +import ( + "math" + "testing" + "time" +) + +func TestPast(t *testing.T) { + now := time.Now() + testList{ + {"now", Time(now), "now"}, + {"1 second ago", Time(now.Add(-1 * time.Second)), "1 second ago"}, + {"12 seconds ago", Time(now.Add(-12 * time.Second)), "12 seconds ago"}, + {"30 seconds ago", Time(now.Add(-30 * time.Second)), "30 seconds ago"}, + {"45 seconds ago", Time(now.Add(-45 * time.Second)), "45 seconds ago"}, + {"1 minute ago", Time(now.Add(-63 * time.Second)), "1 minute ago"}, + {"15 minutes ago", Time(now.Add(-15 * time.Minute)), "15 minutes ago"}, + {"1 hour ago", Time(now.Add(-63 * time.Minute)), "1 hour ago"}, + {"2 hours ago", Time(now.Add(-2 * time.Hour)), "2 hours ago"}, + {"21 hours ago", Time(now.Add(-21 * time.Hour)), "21 hours ago"}, + {"1 day ago", Time(now.Add(-26 * time.Hour)), "1 day ago"}, + {"2 days ago", Time(now.Add(-49 * time.Hour)), "2 days ago"}, + {"3 days ago", Time(now.Add(-3 * Day)), "3 days ago"}, + {"1 week ago (1)", Time(now.Add(-7 * Day)), "1 week ago"}, + {"1 week ago (2)", Time(now.Add(-12 * Day)), "1 week ago"}, + {"2 weeks ago", Time(now.Add(-15 * Day)), "2 weeks ago"}, + {"1 month ago", Time(now.Add(-39 * Day)), "1 month ago"}, + {"3 months ago", Time(now.Add(-99 * Day)), "3 months ago"}, + {"1 year ago (1)", Time(now.Add(-365 * Day)), "1 year ago"}, + {"1 year ago (1)", Time(now.Add(-400 * Day)), "1 year ago"}, + {"2 years ago (1)", Time(now.Add(-548 * Day)), "2 years ago"}, + {"2 years ago (2)", Time(now.Add(-725 * Day)), "2 years ago"}, + {"2 years ago (3)", Time(now.Add(-800 * Day)), "2 years ago"}, + {"3 years ago", Time(now.Add(-3 * Year)), "3 years ago"}, + {"long ago", Time(now.Add(-LongTime)), "a long while ago"}, + }.validate(t) +} + +func TestFuture(t *testing.T) { + // Add a little time so that these things properly line up in + // the future. + now := time.Now().Add(time.Millisecond * 250) + testList{ + {"now", Time(now), "now"}, + {"1 second from now", Time(now.Add(+1 * time.Second)), "1 second from now"}, + {"12 seconds from now", Time(now.Add(+12 * time.Second)), "12 seconds from now"}, + {"30 seconds from now", Time(now.Add(+30 * time.Second)), "30 seconds from now"}, + {"45 seconds from now", Time(now.Add(+45 * time.Second)), "45 seconds from now"}, + {"15 minutes from now", Time(now.Add(+15 * time.Minute)), "15 minutes from now"}, + {"2 hours from now", Time(now.Add(+2 * time.Hour)), "2 hours from now"}, + {"21 hours from now", Time(now.Add(+21 * time.Hour)), "21 hours from now"}, + {"1 day from now", Time(now.Add(+26 * time.Hour)), "1 day from now"}, + {"2 days from now", Time(now.Add(+49 * time.Hour)), "2 days from now"}, + {"3 days from now", Time(now.Add(+3 * Day)), "3 days from now"}, + {"1 week from now (1)", Time(now.Add(+7 * Day)), "1 week from now"}, + {"1 week from now (2)", Time(now.Add(+12 * Day)), "1 week from now"}, + {"2 weeks from now", Time(now.Add(+15 * Day)), "2 weeks from now"}, + {"1 month from now", Time(now.Add(+30 * Day)), "1 month from now"}, + {"1 year from now", Time(now.Add(+365 * Day)), "1 year from now"}, + {"2 years from now", Time(now.Add(+2 * Year)), "2 years from now"}, + {"a while from now", Time(now.Add(+LongTime)), "a long while from now"}, + }.validate(t) +} + +func TestRange(t *testing.T) { + start := time.Time{} + end := time.Unix(math.MaxInt64, math.MaxInt64) + x := RelTime(start, end, "ago", "from now") + if x != "a long while from now" { + t.Errorf("Expected a long while from now, got %q", x) + } +} + +func TestCustomRelTime(t *testing.T) { + now := time.Now().Add(time.Millisecond * 250) + magnitudes := []RelTimeMagnitude{ + {time.Second, "now", time.Second}, + {2 * time.Second, "1 second %s", 1}, + {time.Minute, "%d seconds %s", time.Second}, + {Day - time.Second, "%d minutes %s", time.Minute}, + {Day, "%d hours %s", time.Hour}, + {2 * Day, "1 day %s", 1}, + {Week, "%d days %s", Day}, + {2 * Week, "1 week %s", 1}, + {6 * Month, "%d weeks %s", Week}, + {Year, "%d months %s", Month}, + } + customRelTime := func(then time.Time) string { + return CustomRelTime(then, time.Now(), "ago", "from now", magnitudes) + } + testList{ + {"now", customRelTime(now), "now"}, + {"1 second from now", customRelTime(now.Add(+1 * time.Second)), "1 second from now"}, + {"12 seconds from now", customRelTime(now.Add(+12 * time.Second)), "12 seconds from now"}, + {"30 seconds from now", customRelTime(now.Add(+30 * time.Second)), "30 seconds from now"}, + {"45 seconds from now", customRelTime(now.Add(+45 * time.Second)), "45 seconds from now"}, + {"15 minutes from now", customRelTime(now.Add(+15 * time.Minute)), "15 minutes from now"}, + {"2 hours from now", customRelTime(now.Add(+2 * time.Hour)), "120 minutes from now"}, + {"21 hours from now", customRelTime(now.Add(+21 * time.Hour)), "1260 minutes from now"}, + {"1 day from now", customRelTime(now.Add(+26 * time.Hour)), "1 day from now"}, + {"2 days from now", customRelTime(now.Add(+49 * time.Hour)), "2 days from now"}, + {"3 days from now", customRelTime(now.Add(+3 * Day)), "3 days from now"}, + {"1 week from now (1)", customRelTime(now.Add(+7 * Day)), "1 week from now"}, + {"1 week from now (2)", customRelTime(now.Add(+12 * Day)), "1 week from now"}, + {"2 weeks from now", customRelTime(now.Add(+15 * Day)), "2 weeks from now"}, + {"1 month from now", customRelTime(now.Add(+30 * Day)), "4 weeks from now"}, + {"6 months from now", customRelTime(now.Add(+6*Month - time.Second)), "25 weeks from now"}, + {"1 year from now", customRelTime(now.Add(+365 * Day)), "12 months from now"}, + {"2 years from now", customRelTime(now.Add(+2 * Year)), "24 months from now"}, + {"a while from now", customRelTime(now.Add(+LongTime)), "444 months from now"}, + }.validate(t) +} diff --git a/vendor/github.com/elithrar/simple-scrypt/compositor.json b/vendor/github.com/elithrar/simple-scrypt/compositor.json deleted file mode 100644 index 2f6b01ff1..000000000 --- a/vendor/github.com/elithrar/simple-scrypt/compositor.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "elithrar/simple-scrypt", - "version": "0.1.4", - "libraries": { - "xv": "^1.1.25" - }, - "title": "simple-scrypt", - "branch": "", - "style": { - "name": "Williamsburg", - "componentSet": { - "nav": "nav/BasicNav", - "header": "header/LightBannerHeader", - "article": "article/ReaderArticle", - "footer": "footer/BasicFooter" - }, - "fontFamily": "Montserrat, sans-serif", - "heading": { - "fontWeight": 600, - "letterSpacing": "0.1em" - }, - "colors": { - "text": "#666666", - "background": "#fff", - "primary": "#0099e0", - "secondary": "#ab61ff", - "highlight": "#f7b", - "muted": "#2b2d70", - "border": "#ccd" - } - }, - "content": [ - { - "component": "nav", - "links": [ - { - "href": "https://github.com/elithrar/simple-scrypt", - "text": "GitHub" - } - ] - }, - { - "component": "header", - "heading": "simple-scrypt", - "subhead": "A convenience library for generating, comparing and inspecting password hashes using the scrypt KDF in Go.", - "children": [ - { - "component": "ui/TweetButton", - "text": "simple-scrypt: A convenience library for generating, comparing and inspecting password hashes using the scrypt KDF in Go.", - "url": null - }, - { - "component": "ui/GithubButton", - "user": "elithrar", - "repo": "simple-scrypt" - } - ] - }, - { - "component": "article", - "metadata": { - "source": "github.readme" - }, - "html": "\n

\n

simple-scrypt provides a convenience wrapper around Go's existing\nscrypt package that makes it easier to\nsecurely derive strong keys ("hash user passwords"). This library allows you to:

\n
    \n
  • Generate a scrypt derived key with a crytographically secure salt and sane\ndefault parameters for N, r and p.
  • \n
  • Upgrade the parameters used to generate keys as hardware improves by storing\nthem with the derived key (the scrypt spec. doesn't allow for this by\ndefault).
  • \n
  • Provide your own parameters (if you wish to).
  • \n
\n

The API closely mirrors Go's bcrypt\nlibrary in an effort to make it easy to migrate—and because it's an easy to grok\nAPI.

\n

Installation

\n

With a working Go toolchain:

\n
go get -u github.com/elithrar/simple-scrypt

Example

\n

simple-scrypt doesn't try to re-invent the wheel or do anything "special". It\nwraps the scrypt.Key function as thinly as possible, generates a\ncrytographically secure salt for you using Go's crypto/rand package, and\nreturns the derived key with the parameters prepended:

\n
package main\n\nimport(\n    "fmt"\n    "log"\n\n    "github.com/elithrar/simple-scrypt"\n)\n\nfunc main() {\n    // e.g. r.PostFormValue("password")\n    passwordFromForm := "prew8fid9hick6c"\n\n    // Generates a derived key of the form "N$r$p$salt$dk" where N, r and p are defined as per\n    // Colin Percival's scrypt paper: http://www.tarsnap.com/scrypt/scrypt.pdf\n    // scrypt.Defaults (N=16384, r=8, p=1) makes it easy to provide these parameters, and\n    // (should you wish) provide your own values via the scrypt.Params type.\n    hash, err := scrypt.GenerateFromPassword([]byte(passwordFromForm), scrypt.DefaultParams)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    // Print the derived key with its parameters prepended.\n    fmt.Printf("%s\\n", hash)\n\n    // Uses the parameters from the existing derived key. Return an error if they don't match.\n    err := scrypt.CompareHashAndPassword(hash, []byte(passwordFromForm))\n    if err != nil {\n        log.Fatal(err)\n    }\n}

Upgrading Parameters

\n

Upgrading derived keys from a set of parameters to a "stronger" set of parameters\nas hardware improves, or as you scale (and move your auth process to separate\nhardware), can be pretty useful. Here's how to do it with simple-scrypt:

\n
func main() {\n    // SCENE: We've successfully authenticated a user, compared their submitted\n    // (cleartext) password against the derived key stored in our database, and\n    // now want to upgrade the parameters (more rounds, more parallelism) to\n    // reflect some shiny new hardware we just purchased. As the user is logging\n    // in, we can retrieve the parameters used to generate their key, and if\n    // they don't match our "new" parameters, we can re-generate the key while\n    // we still have the cleartext password in memory\n    // (e.g. before the HTTP request ends).\n    current, err := scrypt.Cost(hash)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    // Now to check them against our own Params struct (e.g. using reflect.DeepEquals)\n    // and determine whether we want to generate a new key with our "upgraded" parameters.\n    slower := scrypt.Params{\n        N: 32768,\n        R: 8,\n        P: 2,\n        SaltLen: 16,\n        DKLen: 32,\n    }\n\n    if !reflect.DeepEqual(current, slower) {\n        // Re-generate the key with the slower parameters\n        // here using scrypt.GenerateFromPassword\n    }\n}

Automatically Determining Parameters

\n

Thanks to the work by tgulacsi, you can have simple-scrypt\nautomatically determine the optimal parameters for you (time vs. memory). You should run this once\non program startup, as calibrating parameters can be an expensive operation.

\n
var params scrypt.Params\n\nfunc main() {\n    var err error\n    // 500ms, 64MB of RAM per hash.\n    params, err = scrypt.Calibrate(500*time.Millisecond, 64, Params{})\n    if err != nil {\n        return nil, err\n    }\n\n    ...\n}\n\nfunc RegisterUserHandler(w http.ResponseWriter, r *http.Request) {\n    err := r.ParseForm()\n    if err != nil {\n        http.Error(w, err.Error(), http.StatusBadRequest)\n        return\n    }\n\n    // Make sure you validate: not empty, not too long, etc.\n    email := r.PostFormValue("email")\n    pass := r.PostFormValue("password")\n\n    // Use our calibrated parameters\n    hash, err := scrypt.GenerateFromPassword([]byte(pass), params)\n    if err != nil {\n        http.Error(w, err.Error(), http.StatusBadRequest)\n        return\n    }\n\n    // Save to DB, etc.\n}

Be aware that increasing these, whilst making it harder to brute-force the resulting hash, also\nincreases the risk of a denial-of-service attack against your server. A surge in authenticate\nattempts (even if legitimate!) could consume all available resources.

\n

License

\n

MIT Licensed. See LICENSE file for details.

\n" - }, - { - "component": "footer", - "links": [ - { - "href": "https://github.com/elithrar/simple-scrypt", - "text": "GitHub" - }, - { - "href": "https://github.com/elithrar", - "text": "elithrar" - } - ] - } - ] -} \ No newline at end of file diff --git a/vendor/github.com/go-ini/ini/.travis.yml b/vendor/github.com/go-ini/ini/.travis.yml index 9a41f64df..fbfaee213 100644 --- a/vendor/github.com/go-ini/ini/.travis.yml +++ b/vendor/github.com/go-ini/ini/.travis.yml @@ -1,11 +1,11 @@ sudo: false language: go go: - - 1.4 - - 1.5 - - 1.6 - - 1.7 - - 1.8 + - 1.4.x + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x - master script: diff --git a/vendor/github.com/go-ini/ini/ini.go b/vendor/github.com/go-ini/ini/ini.go index 0bd6c505b..7f3c4d1ed 100644 --- a/vendor/github.com/go-ini/ini/ini.go +++ b/vendor/github.com/go-ini/ini/ini.go @@ -24,10 +24,8 @@ import ( "os" "regexp" "runtime" - "strconv" "strings" "sync" - "time" ) const ( @@ -37,7 +35,7 @@ const ( // Maximum allowed depth when recursively substituing variable names. _DEPTH_VALUES = 99 - _VERSION = "1.28.0" + _VERSION = "1.28.2" ) // Version returns current package version literal. @@ -398,10 +396,7 @@ func (f *File) Append(source interface{}, others ...interface{}) error { return f.Reload() } -// WriteToIndent writes content into io.Writer with given indention. -// If PrettyFormat has been set to be true, -// it will align "=" sign with spaces under each section. -func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { +func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) { equalSign := "=" if PrettyFormat { equalSign = " = " @@ -415,14 +410,14 @@ func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { if sec.Comment[0] != '#' && sec.Comment[0] != ';' { sec.Comment = "; " + sec.Comment } - if _, err = buf.WriteString(sec.Comment + LineBreak); err != nil { - return 0, err + if _, err := buf.WriteString(sec.Comment + LineBreak); err != nil { + return nil, err } } if i > 0 || DefaultHeader { - if _, err = buf.WriteString("[" + sname + "]" + LineBreak); err != nil { - return 0, err + if _, err := buf.WriteString("[" + sname + "]" + LineBreak); err != nil { + return nil, err } } else { // Write nothing if default section is empty @@ -432,8 +427,8 @@ func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { } if sec.isRawSection { - if _, err = buf.WriteString(sec.rawBody); err != nil { - return 0, err + if _, err := buf.WriteString(sec.rawBody); err != nil { + return nil, err } continue } @@ -469,8 +464,8 @@ func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { if key.Comment[0] != '#' && key.Comment[0] != ';' { key.Comment = "; " + key.Comment } - if _, err = buf.WriteString(key.Comment + LineBreak); err != nil { - return 0, err + if _, err := buf.WriteString(key.Comment + LineBreak); err != nil { + return nil, err } } @@ -488,8 +483,8 @@ func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { } for _, val := range key.ValueWithShadows() { - if _, err = buf.WriteString(kname); err != nil { - return 0, err + if _, err := buf.WriteString(kname); err != nil { + return nil, err } if key.isBooleanType { @@ -510,20 +505,31 @@ func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { } else if !f.options.IgnoreInlineComment && strings.ContainsAny(val, "#;") { val = "`" + val + "`" } - if _, err = buf.WriteString(equalSign + val + LineBreak); err != nil { - return 0, err + if _, err := buf.WriteString(equalSign + val + LineBreak); err != nil { + return nil, err } } } if PrettySection { // Put a line between sections - if _, err = buf.WriteString(LineBreak); err != nil { - return 0, err + if _, err := buf.WriteString(LineBreak); err != nil { + return nil, err } } } + return buf, nil +} + +// WriteToIndent writes content into io.Writer with given indention. +// If PrettyFormat has been set to be true, +// it will align "=" sign with spaces under each section. +func (f *File) WriteToIndent(w io.Writer, indent string) (int64, error) { + buf, err := f.writeToBuffer(indent) + if err != nil { + return 0, err + } return buf.WriteTo(w) } @@ -536,23 +542,12 @@ func (f *File) WriteTo(w io.Writer) (int64, error) { func (f *File) SaveToIndent(filename, indent string) error { // Note: Because we are truncating with os.Create, // so it's safer to save to a temporary file location and rename afte done. - tmpPath := filename + "." + strconv.Itoa(time.Now().Nanosecond()) + ".tmp" - defer os.Remove(tmpPath) - - fw, err := os.Create(tmpPath) + buf, err := f.writeToBuffer(indent) if err != nil { return err } - if _, err = f.WriteToIndent(fw, indent); err != nil { - fw.Close() - return err - } - fw.Close() - - // Remove old file and rename the new one. - os.Remove(filename) - return os.Rename(tmpPath, filename) + return ioutil.WriteFile(filename, buf.Bytes(), 0666) } // SaveTo writes content to file system. diff --git a/vendor/github.com/go-ini/ini/struct.go b/vendor/github.com/go-ini/ini/struct.go index d522e003a..eeb8dabaa 100644 --- a/vendor/github.com/go-ini/ini/struct.go +++ b/vendor/github.com/go-ini/ini/struct.go @@ -408,10 +408,11 @@ func isEmptyValue(v reflect.Value) bool { return v.Uint() == 0 case reflect.Float32, reflect.Float64: return v.Float() == 0 - case reflectTime: - return v.Interface().(time.Time).IsZero() case reflect.Interface, reflect.Ptr: return v.IsNil() + case reflectTime: + t, ok := v.Interface().(time.Time) + return ok && t.IsZero() } return false } diff --git a/vendor/github.com/golang/protobuf/.travis.yml b/vendor/github.com/golang/protobuf/.travis.yml index 24e22f85a..93c67805b 100644 --- a/vendor/github.com/golang/protobuf/.travis.yml +++ b/vendor/github.com/golang/protobuf/.travis.yml @@ -4,6 +4,7 @@ go: - 1.6.x - 1.7.x - 1.8.x +- 1.9.x install: - go get -v -d -t github.com/golang/protobuf/... diff --git a/vendor/github.com/golang/protobuf/README.md b/vendor/github.com/golang/protobuf/README.md index 795f53f6f..207eb6b48 100644 --- a/vendor/github.com/golang/protobuf/README.md +++ b/vendor/github.com/golang/protobuf/README.md @@ -111,6 +111,7 @@ When the .proto file specifies `syntax="proto3"`, there are some differences: Consider file test.proto, containing ```proto + syntax = "proto2"; package example; enum FOO { X = 17; }; diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go index d422dcf82..10066316f 100644 --- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go +++ b/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go @@ -73,6 +73,31 @@ type Marshaler struct { // Whether to use the original (.proto) name for fields. OrigName bool + + // A custom URL resolver to use when marshaling Any messages to JSON. + // If unset, the default resolution strategy is to extract the + // fully-qualified type name from the type URL and pass that to + // proto.MessageType(string). + AnyResolver AnyResolver +} + +// AnyResolver takes a type URL, present in an Any message, and resolves it into +// an instance of the associated message. +type AnyResolver interface { + Resolve(typeUrl string) (proto.Message, error) +} + +func defaultResolveAny(typeUrl string) (proto.Message, error) { + // Only the part of typeUrl after the last slash is relevant. + mname := typeUrl + if slash := strings.LastIndex(mname, "/"); slash >= 0 { + mname = mname[slash+1:] + } + mt := proto.MessageType(mname) + if mt == nil { + return nil, fmt.Errorf("unknown message type %q", mname) + } + return reflect.New(mt.Elem()).Interface().(proto.Message), nil } // JSONPBMarshaler is implemented by protobuf messages that customize the @@ -344,16 +369,17 @@ func (m *Marshaler) marshalAny(out *errWriter, any proto.Message, indent string) turl := v.Field(0).String() val := v.Field(1).Bytes() - // Only the part of type_url after the last slash is relevant. - mname := turl - if slash := strings.LastIndex(mname, "/"); slash >= 0 { - mname = mname[slash+1:] + var msg proto.Message + var err error + if m.AnyResolver != nil { + msg, err = m.AnyResolver.Resolve(turl) + } else { + msg, err = defaultResolveAny(turl) } - mt := proto.MessageType(mname) - if mt == nil { - return fmt.Errorf("unknown message type %q", mname) + if err != nil { + return err } - msg := reflect.New(mt.Elem()).Interface().(proto.Message) + if err := proto.Unmarshal(val, msg); err != nil { return err } @@ -590,6 +616,12 @@ type Unmarshaler struct { // Whether to allow messages to contain unknown fields, as opposed to // failing to unmarshal. AllowUnknownFields bool + + // A custom URL resolver to use when unmarshaling Any messages from JSON. + // If unset, the default resolution strategy is to extract the + // fully-qualified type name from the type URL and pass that to + // proto.MessageType(string). + AnyResolver AnyResolver } // UnmarshalNext unmarshals the next protocol buffer from a JSON object stream. @@ -679,16 +711,17 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe } target.Field(0).SetString(turl) - mname := turl - if slash := strings.LastIndex(mname, "/"); slash >= 0 { - mname = mname[slash+1:] + var m proto.Message + var err error + if u.AnyResolver != nil { + m, err = u.AnyResolver.Resolve(turl) + } else { + m, err = defaultResolveAny(turl) } - mt := proto.MessageType(mname) - if mt == nil { - return fmt.Errorf("unknown message type %q", mname) + if err != nil { + return err } - m := reflect.New(mt.Elem()).Interface().(proto.Message) if _, ok := m.(wkt); ok { val, ok := jsonFields["value"] if !ok { @@ -919,11 +952,13 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe if err := json.Unmarshal(inputValue, &slc); err != nil { return err } - len := len(slc) - target.Set(reflect.MakeSlice(targetType, len, len)) - for i := 0; i < len; i++ { - if err := u.unmarshalValue(target.Index(i), slc[i], prop); err != nil { - return err + if slc != nil { + l := len(slc) + target.Set(reflect.MakeSlice(targetType, l, l)) + for i := 0; i < l; i++ { + if err := u.unmarshalValue(target.Index(i), slc[i], prop); err != nil { + return err + } } } return nil @@ -935,33 +970,35 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe if err := json.Unmarshal(inputValue, &mp); err != nil { return err } - target.Set(reflect.MakeMap(targetType)) - var keyprop, valprop *proto.Properties - if prop != nil { - // These could still be nil if the protobuf metadata is broken somehow. - // TODO: This won't work because the fields are unexported. - // We should probably just reparse them. - //keyprop, valprop = prop.mkeyprop, prop.mvalprop - } - for ks, raw := range mp { - // Unmarshal map key. The core json library already decoded the key into a - // string, so we handle that specially. Other types were quoted post-serialization. - var k reflect.Value - if targetType.Key().Kind() == reflect.String { - k = reflect.ValueOf(ks) - } else { - k = reflect.New(targetType.Key()).Elem() - if err := u.unmarshalValue(k, json.RawMessage(ks), keyprop); err != nil { + if mp != nil { + target.Set(reflect.MakeMap(targetType)) + var keyprop, valprop *proto.Properties + if prop != nil { + // These could still be nil if the protobuf metadata is broken somehow. + // TODO: This won't work because the fields are unexported. + // We should probably just reparse them. + //keyprop, valprop = prop.mkeyprop, prop.mvalprop + } + for ks, raw := range mp { + // Unmarshal map key. The core json library already decoded the key into a + // string, so we handle that specially. Other types were quoted post-serialization. + var k reflect.Value + if targetType.Key().Kind() == reflect.String { + k = reflect.ValueOf(ks) + } else { + k = reflect.New(targetType.Key()).Elem() + if err := u.unmarshalValue(k, json.RawMessage(ks), keyprop); err != nil { + return err + } + } + + // Unmarshal map value. + v := reflect.New(targetType.Elem()).Elem() + if err := u.unmarshalValue(v, raw, valprop); err != nil { return err } + target.SetMapIndex(k, v) } - - // Unmarshal map value. - v := reflect.New(targetType.Elem()).Elem() - if err := u.unmarshalValue(v, raw, valprop); err != nil { - return err - } - target.SetMapIndex(k, v) } return nil } diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go index 38d081ce2..5ce1923f2 100644 --- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go +++ b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go @@ -379,9 +379,9 @@ var marshalingTests = []struct { &pb.Mappy{Strry: map[string]string{`"one"`: "two", "three": "four"}}, `{"strry":{"\"one\"":"two","three":"four"}}`}, {"map", marshaler, - &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: &pb.Simple3{Dub: 1}}}, `{"objjy":{"1":{"dub":1}}}`}, + &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}, `{"objjy":{"1":{"dub":1}}}`}, {"map", marshalerAllOptions, - &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: &pb.Simple3{Dub: 1}}}, objjyPrettyJSON}, + &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}, objjyPrettyJSON}, {"map", marshaler, &pb.Mappy{Buggy: map[int64]string{1234: "yup"}}, `{"buggy":{"1234":"yup"}}`}, {"map", marshaler, &pb.Mappy{Booly: map[bool]bool{false: true}}, `{"booly":{"false":true}}`}, @@ -395,7 +395,7 @@ var marshalingTests = []struct { {"proto2 map", marshaler, &pb.Maps{MInt64Str: map[int64]string{213: "cat"}}, `{"mInt64Str":{"213":"cat"}}`}, {"proto2 map", marshaler, - &pb.Maps{MBoolSimple: map[bool]*pb.Simple{true: &pb.Simple{OInt32: proto.Int32(1)}}}, + &pb.Maps{MBoolSimple: map[bool]*pb.Simple{true: {OInt32: proto.Int32(1)}}}, `{"mBoolSimple":{"true":{"oInt32":1}}}`}, {"oneof, not set", marshaler, &pb.MsgWithOneof{}, `{}`}, {"oneof, set", marshaler, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Title{"Grand Poobah"}}, `{"title":"Grand Poobah"}`}, @@ -486,7 +486,7 @@ func TestMarshalAnyJSONPBMarshaler(t *testing.T) { } // after custom marshaling, it's round-tripped through JSON decoding/encoding already, // so the keys are sorted, whitespace is compacted, and "@type" key has been added - expected := `{"@type":"type.googleapis.com/` + dynamicMessageName +`","baz":[0,1,2,3],"foo":"bar"}` + expected := `{"@type":"type.googleapis.com/` + dynamicMessageName + `","baz":[0,1,2,3],"foo":"bar"}` if str != expected { t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", str, expected) } @@ -535,7 +535,7 @@ var unmarshalingTests = []struct { {"-Inf", Unmarshaler{}, `{"oDouble":"-Infinity"}`, &pb.Simple{ODouble: proto.Float64(math.Inf(-1))}}, {"map", Unmarshaler{}, `{"nummy":{"1":2,"3":4}}`, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}}, {"map", Unmarshaler{}, `{"strry":{"\"one\"":"two","three":"four"}}`, &pb.Mappy{Strry: map[string]string{`"one"`: "two", "three": "four"}}}, - {"map", Unmarshaler{}, `{"objjy":{"1":{"dub":1}}}`, &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: &pb.Simple3{Dub: 1}}}}, + {"map", Unmarshaler{}, `{"objjy":{"1":{"dub":1}}}`, &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}}, {"proto2 extension", Unmarshaler{}, realNumberJSON, realNumber}, {"Any with message", Unmarshaler{}, anySimpleJSON, anySimple}, {"Any with message and indent", Unmarshaler{}, anySimplePrettyJSON, anySimple}, @@ -645,6 +645,26 @@ func TestUnmarshaling(t *testing.T) { } } +func TestUnmarshalNullArray(t *testing.T) { + var repeats pb.Repeats + if err := UnmarshalString(`{"rBool":null}`, &repeats); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(repeats, pb.Repeats{}) { + t.Errorf("got non-nil fields in [%#v]", repeats) + } +} + +func TestUnmarshalNullObject(t *testing.T) { + var maps pb.Maps + if err := UnmarshalString(`{"mInt64Str":null}`, &maps); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(maps, pb.Maps{}) { + t.Errorf("got non-nil fields in [%#v]", maps) + } +} + func TestUnmarshalNext(t *testing.T) { // We only need to check against a few, not all of them. tests := unmarshalingTests[:5] @@ -701,6 +721,65 @@ func TestUnmarshalingBadInput(t *testing.T) { } } +type funcResolver func(turl string) (proto.Message, error) + +func (fn funcResolver) Resolve(turl string) (proto.Message, error) { + return fn(turl) +} + +func TestAnyWithCustomResolver(t *testing.T) { + var resolvedTypeUrls []string + resolver := funcResolver(func(turl string) (proto.Message, error) { + resolvedTypeUrls = append(resolvedTypeUrls, turl) + return new(pb.Simple), nil + }) + msg := &pb.Simple{ + OBytes: []byte{1, 2, 3, 4}, + OBool: proto.Bool(true), + OString: proto.String("foobar"), + OInt64: proto.Int64(1020304), + } + msgBytes, err := proto.Marshal(msg) + if err != nil { + t.Errorf("an unexpected error occurred when marshaling message: %v", err) + } + // make an Any with a type URL that won't resolve w/out custom resolver + any := &anypb.Any{ + TypeUrl: "https://foobar.com/some.random.MessageKind", + Value: msgBytes, + } + + m := Marshaler{AnyResolver: resolver} + js, err := m.MarshalToString(any) + if err != nil { + t.Errorf("an unexpected error occurred when marshaling any to JSON: %v", err) + } + if len(resolvedTypeUrls) != 1 { + t.Errorf("custom resolver was not invoked during marshaling") + } else if resolvedTypeUrls[0] != "https://foobar.com/some.random.MessageKind" { + t.Errorf("custom resolver was invoked with wrong URL: got %q, wanted %q", resolvedTypeUrls[0], "https://foobar.com/some.random.MessageKind") + } + wanted := `{"@type":"https://foobar.com/some.random.MessageKind","oBool":true,"oInt64":"1020304","oString":"foobar","oBytes":"AQIDBA=="}` + if js != wanted { + t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", js, wanted) + } + + u := Unmarshaler{AnyResolver: resolver} + roundTrip := &anypb.Any{} + err = u.Unmarshal(bytes.NewReader([]byte(js)), roundTrip) + if err != nil { + t.Errorf("an unexpected error occurred when unmarshaling any from JSON: %v", err) + } + if len(resolvedTypeUrls) != 2 { + t.Errorf("custom resolver was not invoked during marshaling") + } else if resolvedTypeUrls[1] != "https://foobar.com/some.random.MessageKind" { + t.Errorf("custom resolver was invoked with wrong URL: got %q, wanted %q", resolvedTypeUrls[1], "https://foobar.com/some.random.MessageKind") + } + if !proto.Equal(any, roundTrip) { + t.Errorf("message contents not set correctly after unmarshalling JSON: got %s, wanted %s", roundTrip, any) + } +} + func TestUnmarshalJSONPBUnmarshaler(t *testing.T) { rawJson := `{ "foo": "bar", "baz": [0, 1, 2, 3] }` var msg dynamicMessage @@ -736,6 +815,7 @@ func TestUnmarshalAnyJSONPBUnmarshaler(t *testing.T) { const ( dynamicMessageName = "google.protobuf.jsonpb.testing.dynamicMessage" ) + func init() { // we register the custom type below so that we can use it in Any types proto.RegisterType((*dynamicMessage)(nil), dynamicMessageName) diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile index 41a2d04d0..f706871a6 100644 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile @@ -33,4 +33,5 @@ # at src/google/protobuf/descriptor.proto regenerate: @echo WARNING! THIS RULE IS PROBABLY NOT RIGHT FOR YOUR INSTALLATION + cp $(HOME)/src/protobuf/include/google/protobuf/descriptor.proto . protoc --go_out=../../../../.. -I$(HOME)/src/protobuf/include $(HOME)/src/protobuf/include/google/protobuf/descriptor.proto diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go index 63cf2c80a..1d92cb272 100644 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go @@ -974,6 +974,7 @@ type FileOptions struct { CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"` JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"` PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"` + PhpGenericServices *bool `protobuf:"varint,19,opt,name=php_generic_services,json=phpGenericServices,def=0" json:"php_generic_services,omitempty"` // Is this file deprecated? // Depending on the target platform, this can emit Deprecated annotations // for everything in the file, or it will be completely ignored; in the very @@ -995,6 +996,10 @@ type FileOptions struct { // Sets the php class prefix which is prepended to all php generated classes // from this .proto. Default is empty. PhpClassPrefix *string `protobuf:"bytes,40,opt,name=php_class_prefix,json=phpClassPrefix" json:"php_class_prefix,omitempty"` + // Use this option to change the namespace of php generated classes. Default + // is empty. When this option is empty, the package name will be used for + // determining the namespace. + PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` proto.XXX_InternalExtensions `json:"-"` @@ -1020,6 +1025,7 @@ const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPE const Default_FileOptions_CcGenericServices bool = false const Default_FileOptions_JavaGenericServices bool = false const Default_FileOptions_PyGenericServices bool = false +const Default_FileOptions_PhpGenericServices bool = false const Default_FileOptions_Deprecated bool = false const Default_FileOptions_CcEnableArenas bool = false @@ -1093,6 +1099,13 @@ func (m *FileOptions) GetPyGenericServices() bool { return Default_FileOptions_PyGenericServices } +func (m *FileOptions) GetPhpGenericServices() bool { + if m != nil && m.PhpGenericServices != nil { + return *m.PhpGenericServices + } + return Default_FileOptions_PhpGenericServices +} + func (m *FileOptions) GetDeprecated() bool { if m != nil && m.Deprecated != nil { return *m.Deprecated @@ -1135,6 +1148,13 @@ func (m *FileOptions) GetPhpClassPrefix() string { return "" } +func (m *FileOptions) GetPhpNamespace() string { + if m != nil && m.PhpNamespace != nil { + return *m.PhpNamespace + } + return "" +} + func (m *FileOptions) GetUninterpretedOption() []*UninterpretedOption { if m != nil { return m.UninterpretedOption @@ -1994,159 +2014,161 @@ func init() { func init() { proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 2460 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x5b, 0x6f, 0xdb, 0xc8, - 0x15, 0x5e, 0x5d, 0x2d, 0x1d, 0xc9, 0xf2, 0x78, 0xec, 0x4d, 0x18, 0xef, 0x25, 0x8e, 0xf6, 0x12, - 0x6f, 0xd2, 0xc8, 0x0b, 0xe7, 0xb2, 0x59, 0xa7, 0x48, 0x21, 0x4b, 0x8c, 0x57, 0xa9, 0x2c, 0xa9, - 0x94, 0xdc, 0x4d, 0xf6, 0x85, 0x18, 0x93, 0x23, 0x99, 0x09, 0x45, 0x72, 0x49, 0x2a, 0x89, 0xf7, - 0x29, 0x40, 0x9f, 0x0a, 0xf4, 0x07, 0x14, 0x45, 0xd1, 0x87, 0x7d, 0x59, 0xa0, 0x3f, 0xa0, 0xcf, - 0xfd, 0x05, 0x05, 0xf6, 0xb9, 0x2f, 0x45, 0x51, 0xa0, 0xfd, 0x07, 0x7d, 0x2d, 0x66, 0x86, 0xa4, - 0x48, 0x5d, 0x12, 0x77, 0x81, 0xec, 0x3e, 0xd9, 0x73, 0xce, 0x77, 0x0e, 0xcf, 0x9c, 0xf9, 0x66, - 0xce, 0x99, 0x11, 0x6c, 0x8f, 0x6c, 0x7b, 0x64, 0xd2, 0x5d, 0xc7, 0xb5, 0x7d, 0xfb, 0x64, 0x32, - 0xdc, 0xd5, 0xa9, 0xa7, 0xb9, 0x86, 0xe3, 0xdb, 0x6e, 0x8d, 0xcb, 0xf0, 0x9a, 0x40, 0xd4, 0x42, - 0x44, 0xf5, 0x08, 0xd6, 0x1f, 0x18, 0x26, 0x6d, 0x46, 0xc0, 0x3e, 0xf5, 0xf1, 0x5d, 0xc8, 0x0e, - 0x0d, 0x93, 0x4a, 0xa9, 0xed, 0xcc, 0x4e, 0x69, 0xef, 0xc3, 0xda, 0x8c, 0x51, 0x2d, 0x69, 0xd1, - 0x63, 0x62, 0x85, 0x5b, 0x54, 0xff, 0x95, 0x85, 0x8d, 0x05, 0x5a, 0x8c, 0x21, 0x6b, 0x91, 0x31, - 0xf3, 0x98, 0xda, 0x29, 0x2a, 0xfc, 0x7f, 0x2c, 0xc1, 0x8a, 0x43, 0xb4, 0xa7, 0x64, 0x44, 0xa5, - 0x34, 0x17, 0x87, 0x43, 0xfc, 0x3e, 0x80, 0x4e, 0x1d, 0x6a, 0xe9, 0xd4, 0xd2, 0xce, 0xa4, 0xcc, - 0x76, 0x66, 0xa7, 0xa8, 0xc4, 0x24, 0xf8, 0x3a, 0xac, 0x3b, 0x93, 0x13, 0xd3, 0xd0, 0xd4, 0x18, - 0x0c, 0xb6, 0x33, 0x3b, 0x39, 0x05, 0x09, 0x45, 0x73, 0x0a, 0xbe, 0x0a, 0x6b, 0xcf, 0x29, 0x79, - 0x1a, 0x87, 0x96, 0x38, 0xb4, 0xc2, 0xc4, 0x31, 0x60, 0x03, 0xca, 0x63, 0xea, 0x79, 0x64, 0x44, - 0x55, 0xff, 0xcc, 0xa1, 0x52, 0x96, 0xcf, 0x7e, 0x7b, 0x6e, 0xf6, 0xb3, 0x33, 0x2f, 0x05, 0x56, - 0x83, 0x33, 0x87, 0xe2, 0x3a, 0x14, 0xa9, 0x35, 0x19, 0x0b, 0x0f, 0xb9, 0x25, 0xf9, 0x93, 0xad, - 0xc9, 0x78, 0xd6, 0x4b, 0x81, 0x99, 0x05, 0x2e, 0x56, 0x3c, 0xea, 0x3e, 0x33, 0x34, 0x2a, 0xe5, - 0xb9, 0x83, 0xab, 0x73, 0x0e, 0xfa, 0x42, 0x3f, 0xeb, 0x23, 0xb4, 0xc3, 0x0d, 0x28, 0xd2, 0x17, - 0x3e, 0xb5, 0x3c, 0xc3, 0xb6, 0xa4, 0x15, 0xee, 0xe4, 0xa3, 0x05, 0xab, 0x48, 0x4d, 0x7d, 0xd6, - 0xc5, 0xd4, 0x0e, 0xdf, 0x81, 0x15, 0xdb, 0xf1, 0x0d, 0xdb, 0xf2, 0xa4, 0xc2, 0x76, 0x6a, 0xa7, - 0xb4, 0xf7, 0xee, 0x42, 0x22, 0x74, 0x05, 0x46, 0x09, 0xc1, 0xb8, 0x05, 0xc8, 0xb3, 0x27, 0xae, - 0x46, 0x55, 0xcd, 0xd6, 0xa9, 0x6a, 0x58, 0x43, 0x5b, 0x2a, 0x72, 0x07, 0x97, 0xe7, 0x27, 0xc2, - 0x81, 0x0d, 0x5b, 0xa7, 0x2d, 0x6b, 0x68, 0x2b, 0x15, 0x2f, 0x31, 0xc6, 0x17, 0x20, 0xef, 0x9d, - 0x59, 0x3e, 0x79, 0x21, 0x95, 0x39, 0x43, 0x82, 0x51, 0xf5, 0xbf, 0x39, 0x58, 0x3b, 0x0f, 0xc5, - 0xee, 0x41, 0x6e, 0xc8, 0x66, 0x29, 0xa5, 0xff, 0x9f, 0x1c, 0x08, 0x9b, 0x64, 0x12, 0xf3, 0x3f, - 0x30, 0x89, 0x75, 0x28, 0x59, 0xd4, 0xf3, 0xa9, 0x2e, 0x18, 0x91, 0x39, 0x27, 0xa7, 0x40, 0x18, - 0xcd, 0x53, 0x2a, 0xfb, 0x83, 0x28, 0xf5, 0x08, 0xd6, 0xa2, 0x90, 0x54, 0x97, 0x58, 0xa3, 0x90, - 0x9b, 0xbb, 0xaf, 0x8b, 0xa4, 0x26, 0x87, 0x76, 0x0a, 0x33, 0x53, 0x2a, 0x34, 0x31, 0xc6, 0x4d, - 0x00, 0xdb, 0xa2, 0xf6, 0x50, 0xd5, 0xa9, 0x66, 0x4a, 0x85, 0x25, 0x59, 0xea, 0x32, 0xc8, 0x5c, - 0x96, 0x6c, 0x21, 0xd5, 0x4c, 0xfc, 0xf9, 0x94, 0x6a, 0x2b, 0x4b, 0x98, 0x72, 0x24, 0x36, 0xd9, - 0x1c, 0xdb, 0x8e, 0xa1, 0xe2, 0x52, 0xc6, 0x7b, 0xaa, 0x07, 0x33, 0x2b, 0xf2, 0x20, 0x6a, 0xaf, - 0x9d, 0x99, 0x12, 0x98, 0x89, 0x89, 0xad, 0xba, 0xf1, 0x21, 0xfe, 0x00, 0x22, 0x81, 0xca, 0x69, - 0x05, 0xfc, 0x14, 0x2a, 0x87, 0xc2, 0x0e, 0x19, 0xd3, 0xad, 0xbb, 0x50, 0x49, 0xa6, 0x07, 0x6f, - 0x42, 0xce, 0xf3, 0x89, 0xeb, 0x73, 0x16, 0xe6, 0x14, 0x31, 0xc0, 0x08, 0x32, 0xd4, 0xd2, 0xf9, - 0x29, 0x97, 0x53, 0xd8, 0xbf, 0x5b, 0x9f, 0xc1, 0x6a, 0xe2, 0xf3, 0xe7, 0x35, 0xac, 0xfe, 0x3e, - 0x0f, 0x9b, 0x8b, 0x38, 0xb7, 0x90, 0xfe, 0x17, 0x20, 0x6f, 0x4d, 0xc6, 0x27, 0xd4, 0x95, 0x32, - 0xdc, 0x43, 0x30, 0xc2, 0x75, 0xc8, 0x99, 0xe4, 0x84, 0x9a, 0x52, 0x76, 0x3b, 0xb5, 0x53, 0xd9, - 0xbb, 0x7e, 0x2e, 0x56, 0xd7, 0xda, 0xcc, 0x44, 0x11, 0x96, 0xf8, 0x3e, 0x64, 0x83, 0x23, 0x8e, - 0x79, 0xb8, 0x76, 0x3e, 0x0f, 0x8c, 0x8b, 0x0a, 0xb7, 0xc3, 0xef, 0x40, 0x91, 0xfd, 0x15, 0xb9, - 0xcd, 0xf3, 0x98, 0x0b, 0x4c, 0xc0, 0xf2, 0x8a, 0xb7, 0xa0, 0xc0, 0x69, 0xa6, 0xd3, 0xb0, 0x34, - 0x44, 0x63, 0xb6, 0x30, 0x3a, 0x1d, 0x92, 0x89, 0xe9, 0xab, 0xcf, 0x88, 0x39, 0xa1, 0x9c, 0x30, - 0x45, 0xa5, 0x1c, 0x08, 0x7f, 0xcd, 0x64, 0xf8, 0x32, 0x94, 0x04, 0x2b, 0x0d, 0x4b, 0xa7, 0x2f, - 0xf8, 0xe9, 0x93, 0x53, 0x04, 0x51, 0x5b, 0x4c, 0xc2, 0x3e, 0xff, 0xc4, 0xb3, 0xad, 0x70, 0x69, - 0xf9, 0x27, 0x98, 0x80, 0x7f, 0xfe, 0xb3, 0xd9, 0x83, 0xef, 0xbd, 0xc5, 0xd3, 0x9b, 0xe5, 0x62, - 0xf5, 0x2f, 0x69, 0xc8, 0xf2, 0xfd, 0xb6, 0x06, 0xa5, 0xc1, 0xe3, 0x9e, 0xac, 0x36, 0xbb, 0xc7, - 0x07, 0x6d, 0x19, 0xa5, 0x70, 0x05, 0x80, 0x0b, 0x1e, 0xb4, 0xbb, 0xf5, 0x01, 0x4a, 0x47, 0xe3, - 0x56, 0x67, 0x70, 0xe7, 0x16, 0xca, 0x44, 0x06, 0xc7, 0x42, 0x90, 0x8d, 0x03, 0x6e, 0xee, 0xa1, - 0x1c, 0x46, 0x50, 0x16, 0x0e, 0x5a, 0x8f, 0xe4, 0xe6, 0x9d, 0x5b, 0x28, 0x9f, 0x94, 0xdc, 0xdc, - 0x43, 0x2b, 0x78, 0x15, 0x8a, 0x5c, 0x72, 0xd0, 0xed, 0xb6, 0x51, 0x21, 0xf2, 0xd9, 0x1f, 0x28, - 0xad, 0xce, 0x21, 0x2a, 0x46, 0x3e, 0x0f, 0x95, 0xee, 0x71, 0x0f, 0x41, 0xe4, 0xe1, 0x48, 0xee, - 0xf7, 0xeb, 0x87, 0x32, 0x2a, 0x45, 0x88, 0x83, 0xc7, 0x03, 0xb9, 0x8f, 0xca, 0x89, 0xb0, 0x6e, - 0xee, 0xa1, 0xd5, 0xe8, 0x13, 0x72, 0xe7, 0xf8, 0x08, 0x55, 0xf0, 0x3a, 0xac, 0x8a, 0x4f, 0x84, - 0x41, 0xac, 0xcd, 0x88, 0xee, 0xdc, 0x42, 0x68, 0x1a, 0x88, 0xf0, 0xb2, 0x9e, 0x10, 0xdc, 0xb9, - 0x85, 0x70, 0xb5, 0x01, 0x39, 0xce, 0x2e, 0x8c, 0xa1, 0xd2, 0xae, 0x1f, 0xc8, 0x6d, 0xb5, 0xdb, - 0x1b, 0xb4, 0xba, 0x9d, 0x7a, 0x1b, 0xa5, 0xa6, 0x32, 0x45, 0xfe, 0xd5, 0x71, 0x4b, 0x91, 0x9b, - 0x28, 0x1d, 0x97, 0xf5, 0xe4, 0xfa, 0x40, 0x6e, 0xa2, 0x4c, 0x55, 0x83, 0xcd, 0x45, 0xe7, 0xcc, - 0xc2, 0x9d, 0x11, 0x5b, 0xe2, 0xf4, 0x92, 0x25, 0xe6, 0xbe, 0xe6, 0x96, 0xf8, 0xdb, 0x14, 0x6c, - 0x2c, 0x38, 0x6b, 0x17, 0x7e, 0xe4, 0x17, 0x90, 0x13, 0x14, 0x15, 0xd5, 0xe7, 0x93, 0x85, 0x87, - 0x36, 0x27, 0xec, 0x5c, 0x05, 0xe2, 0x76, 0xf1, 0x0a, 0x9c, 0x59, 0x52, 0x81, 0x99, 0x8b, 0xb9, - 0x20, 0x7f, 0x93, 0x02, 0x69, 0x99, 0xef, 0xd7, 0x1c, 0x14, 0xe9, 0xc4, 0x41, 0x71, 0x6f, 0x36, - 0x80, 0x2b, 0xcb, 0xe7, 0x30, 0x17, 0xc5, 0x77, 0x29, 0xb8, 0xb0, 0xb8, 0x51, 0x59, 0x18, 0xc3, - 0x7d, 0xc8, 0x8f, 0xa9, 0x7f, 0x6a, 0x87, 0xc5, 0xfa, 0xe3, 0x05, 0x25, 0x80, 0xa9, 0x67, 0x73, - 0x15, 0x58, 0xc5, 0x6b, 0x48, 0x66, 0x59, 0xb7, 0x21, 0xa2, 0x99, 0x8b, 0xf4, 0xb7, 0x69, 0x78, - 0x7b, 0xa1, 0xf3, 0x85, 0x81, 0xbe, 0x07, 0x60, 0x58, 0xce, 0xc4, 0x17, 0x05, 0x59, 0x9c, 0x4f, - 0x45, 0x2e, 0xe1, 0x7b, 0x9f, 0x9d, 0x3d, 0x13, 0x3f, 0xd2, 0x67, 0xb8, 0x1e, 0x84, 0x88, 0x03, - 0xee, 0x4e, 0x03, 0xcd, 0xf2, 0x40, 0xdf, 0x5f, 0x32, 0xd3, 0xb9, 0x5a, 0xf7, 0x29, 0x20, 0xcd, - 0x34, 0xa8, 0xe5, 0xab, 0x9e, 0xef, 0x52, 0x32, 0x36, 0xac, 0x11, 0x3f, 0x80, 0x0b, 0xfb, 0xb9, - 0x21, 0x31, 0x3d, 0xaa, 0xac, 0x09, 0x75, 0x3f, 0xd4, 0x32, 0x0b, 0x5e, 0x65, 0xdc, 0x98, 0x45, - 0x3e, 0x61, 0x21, 0xd4, 0x91, 0x45, 0xf5, 0xef, 0x2b, 0x50, 0x8a, 0xb5, 0x75, 0xf8, 0x0a, 0x94, - 0x9f, 0x90, 0x67, 0x44, 0x0d, 0x5b, 0x75, 0x91, 0x89, 0x12, 0x93, 0xf5, 0x82, 0x76, 0xfd, 0x53, - 0xd8, 0xe4, 0x10, 0x7b, 0xe2, 0x53, 0x57, 0xd5, 0x4c, 0xe2, 0x79, 0x3c, 0x69, 0x05, 0x0e, 0xc5, - 0x4c, 0xd7, 0x65, 0xaa, 0x46, 0xa8, 0xc1, 0xb7, 0x61, 0x83, 0x5b, 0x8c, 0x27, 0xa6, 0x6f, 0x38, - 0x26, 0x55, 0xd9, 0xe5, 0xc1, 0xe3, 0x07, 0x71, 0x14, 0xd9, 0x3a, 0x43, 0x1c, 0x05, 0x00, 0x16, - 0x91, 0x87, 0x9b, 0xf0, 0x1e, 0x37, 0x1b, 0x51, 0x8b, 0xba, 0xc4, 0xa7, 0x2a, 0xfd, 0x7a, 0x42, - 0x4c, 0x4f, 0x25, 0x96, 0xae, 0x9e, 0x12, 0xef, 0x54, 0xda, 0x64, 0x0e, 0x0e, 0xd2, 0x52, 0x4a, - 0xb9, 0xc4, 0x80, 0x87, 0x01, 0x4e, 0xe6, 0xb0, 0xba, 0xa5, 0x7f, 0x41, 0xbc, 0x53, 0xbc, 0x0f, - 0x17, 0xb8, 0x17, 0xcf, 0x77, 0x0d, 0x6b, 0xa4, 0x6a, 0xa7, 0x54, 0x7b, 0xaa, 0x4e, 0xfc, 0xe1, - 0x5d, 0xe9, 0x9d, 0xf8, 0xf7, 0x79, 0x84, 0x7d, 0x8e, 0x69, 0x30, 0xc8, 0xb1, 0x3f, 0xbc, 0x8b, - 0xfb, 0x50, 0x66, 0x8b, 0x31, 0x36, 0xbe, 0xa1, 0xea, 0xd0, 0x76, 0x79, 0x65, 0xa9, 0x2c, 0xd8, - 0xd9, 0xb1, 0x0c, 0xd6, 0xba, 0x81, 0xc1, 0x91, 0xad, 0xd3, 0xfd, 0x5c, 0xbf, 0x27, 0xcb, 0x4d, - 0xa5, 0x14, 0x7a, 0x79, 0x60, 0xbb, 0x8c, 0x50, 0x23, 0x3b, 0x4a, 0x70, 0x49, 0x10, 0x6a, 0x64, - 0x87, 0xe9, 0xbd, 0x0d, 0x1b, 0x9a, 0x26, 0xe6, 0x6c, 0x68, 0x6a, 0xd0, 0xe2, 0x7b, 0x12, 0x4a, - 0x24, 0x4b, 0xd3, 0x0e, 0x05, 0x20, 0xe0, 0xb8, 0x87, 0x3f, 0x87, 0xb7, 0xa7, 0xc9, 0x8a, 0x1b, - 0xae, 0xcf, 0xcd, 0x72, 0xd6, 0xf4, 0x36, 0x6c, 0x38, 0x67, 0xf3, 0x86, 0x38, 0xf1, 0x45, 0xe7, - 0x6c, 0xd6, 0xec, 0x23, 0x7e, 0x6d, 0x73, 0xa9, 0x46, 0x7c, 0xaa, 0x4b, 0x17, 0xe3, 0xe8, 0x98, - 0x02, 0xef, 0x02, 0xd2, 0x34, 0x95, 0x5a, 0xe4, 0xc4, 0xa4, 0x2a, 0x71, 0xa9, 0x45, 0x3c, 0xe9, - 0x72, 0x1c, 0x5c, 0xd1, 0x34, 0x99, 0x6b, 0xeb, 0x5c, 0x89, 0xaf, 0xc1, 0xba, 0x7d, 0xf2, 0x44, - 0x13, 0xcc, 0x52, 0x1d, 0x97, 0x0e, 0x8d, 0x17, 0xd2, 0x87, 0x3c, 0x4d, 0x6b, 0x4c, 0xc1, 0x79, - 0xd5, 0xe3, 0x62, 0xfc, 0x09, 0x20, 0xcd, 0x3b, 0x25, 0xae, 0xc3, 0x4b, 0xbb, 0xe7, 0x10, 0x8d, - 0x4a, 0x1f, 0x09, 0xa8, 0x90, 0x77, 0x42, 0x31, 0x63, 0xb6, 0xf7, 0xdc, 0x18, 0xfa, 0xa1, 0xc7, - 0xab, 0x82, 0xd9, 0x5c, 0x16, 0x78, 0xdb, 0x01, 0xe4, 0x9c, 0x3a, 0xc9, 0x0f, 0xef, 0x70, 0x58, - 0xc5, 0x39, 0x75, 0xe2, 0xdf, 0x7d, 0x04, 0x9b, 0x13, 0xcb, 0xb0, 0x7c, 0xea, 0x3a, 0x2e, 0x65, - 0xed, 0xbe, 0xd8, 0xb3, 0xd2, 0xbf, 0x57, 0x96, 0x34, 0xec, 0xc7, 0x71, 0xb4, 0xa0, 0x8a, 0xb2, - 0x31, 0x99, 0x17, 0x56, 0xf7, 0xa1, 0x1c, 0x67, 0x10, 0x2e, 0x82, 0xe0, 0x10, 0x4a, 0xb1, 0x6a, - 0xdc, 0xe8, 0x36, 0x59, 0x1d, 0xfd, 0x4a, 0x46, 0x69, 0x56, 0xcf, 0xdb, 0xad, 0x81, 0xac, 0x2a, - 0xc7, 0x9d, 0x41, 0xeb, 0x48, 0x46, 0x99, 0x6b, 0xc5, 0xc2, 0x7f, 0x56, 0xd0, 0xcb, 0x97, 0x2f, - 0x5f, 0xa6, 0x1f, 0x66, 0x0b, 0x1f, 0xa3, 0xab, 0xd5, 0xef, 0xd3, 0x50, 0x49, 0x76, 0xd2, 0xf8, - 0xe7, 0x70, 0x31, 0xbc, 0xf6, 0x7a, 0xd4, 0x57, 0x9f, 0x1b, 0x2e, 0xa7, 0xf6, 0x98, 0x88, 0x5e, - 0x34, 0x5a, 0x95, 0xcd, 0x00, 0xd5, 0xa7, 0xfe, 0x97, 0x86, 0xcb, 0x88, 0x3b, 0x26, 0x3e, 0x6e, - 0xc3, 0x65, 0xcb, 0x56, 0x3d, 0x9f, 0x58, 0x3a, 0x71, 0x75, 0x75, 0xfa, 0xe0, 0xa0, 0x12, 0x4d, - 0xa3, 0x9e, 0x67, 0x8b, 0x92, 0x12, 0x79, 0x79, 0xd7, 0xb2, 0xfb, 0x01, 0x78, 0x7a, 0xd6, 0xd6, - 0x03, 0xe8, 0x0c, 0x83, 0x32, 0xcb, 0x18, 0xf4, 0x0e, 0x14, 0xc7, 0xc4, 0x51, 0xa9, 0xe5, 0xbb, - 0x67, 0xbc, 0xff, 0x2b, 0x28, 0x85, 0x31, 0x71, 0x64, 0x36, 0x7e, 0x73, 0x2b, 0x91, 0xcc, 0x66, - 0x01, 0x15, 0x1f, 0x66, 0x0b, 0x45, 0x04, 0xd5, 0x7f, 0x66, 0xa0, 0x1c, 0xef, 0x07, 0x59, 0x7b, - 0xad, 0xf1, 0xb3, 0x3f, 0xc5, 0x4f, 0x87, 0x0f, 0x5e, 0xd9, 0x3d, 0xd6, 0x1a, 0xac, 0x28, 0xec, - 0xe7, 0x45, 0x97, 0xa6, 0x08, 0x4b, 0x56, 0x90, 0xd9, 0x79, 0x40, 0x45, 0xef, 0x5f, 0x50, 0x82, - 0x11, 0x3e, 0x84, 0xfc, 0x13, 0x8f, 0xfb, 0xce, 0x73, 0xdf, 0x1f, 0xbe, 0xda, 0xf7, 0xc3, 0x3e, - 0x77, 0x5e, 0x7c, 0xd8, 0x57, 0x3b, 0x5d, 0xe5, 0xa8, 0xde, 0x56, 0x02, 0x73, 0x7c, 0x09, 0xb2, - 0x26, 0xf9, 0xe6, 0x2c, 0x59, 0x3e, 0xb8, 0xe8, 0xbc, 0x8b, 0x70, 0x09, 0xb2, 0xcf, 0x29, 0x79, - 0x9a, 0x3c, 0xb4, 0xb9, 0xe8, 0x0d, 0x6e, 0x86, 0x5d, 0xc8, 0xf1, 0x7c, 0x61, 0x80, 0x20, 0x63, - 0xe8, 0x2d, 0x5c, 0x80, 0x6c, 0xa3, 0xab, 0xb0, 0x0d, 0x81, 0xa0, 0x2c, 0xa4, 0x6a, 0xaf, 0x25, - 0x37, 0x64, 0x94, 0xae, 0xde, 0x86, 0xbc, 0x48, 0x02, 0xdb, 0x2c, 0x51, 0x1a, 0xd0, 0x5b, 0xc1, - 0x30, 0xf0, 0x91, 0x0a, 0xb5, 0xc7, 0x47, 0x07, 0xb2, 0x82, 0xd2, 0xc9, 0xa5, 0xce, 0xa2, 0x5c, - 0xd5, 0x83, 0x72, 0xbc, 0x21, 0xfc, 0x51, 0x58, 0x56, 0xfd, 0x6b, 0x0a, 0x4a, 0xb1, 0x06, 0x8f, - 0xb5, 0x16, 0xc4, 0x34, 0xed, 0xe7, 0x2a, 0x31, 0x0d, 0xe2, 0x05, 0xd4, 0x00, 0x2e, 0xaa, 0x33, - 0xc9, 0x79, 0x97, 0xee, 0x47, 0xda, 0x22, 0x39, 0x94, 0xaf, 0xfe, 0x29, 0x05, 0x68, 0xb6, 0x45, - 0x9c, 0x09, 0x33, 0xf5, 0x53, 0x86, 0x59, 0xfd, 0x63, 0x0a, 0x2a, 0xc9, 0xbe, 0x70, 0x26, 0xbc, - 0x2b, 0x3f, 0x69, 0x78, 0xff, 0x48, 0xc3, 0x6a, 0xa2, 0x1b, 0x3c, 0x6f, 0x74, 0x5f, 0xc3, 0xba, - 0xa1, 0xd3, 0xb1, 0x63, 0xfb, 0xd4, 0xd2, 0xce, 0x54, 0x93, 0x3e, 0xa3, 0xa6, 0x54, 0xe5, 0x87, - 0xc6, 0xee, 0xab, 0xfb, 0xcd, 0x5a, 0x6b, 0x6a, 0xd7, 0x66, 0x66, 0xfb, 0x1b, 0xad, 0xa6, 0x7c, - 0xd4, 0xeb, 0x0e, 0xe4, 0x4e, 0xe3, 0xb1, 0x7a, 0xdc, 0xf9, 0x65, 0xa7, 0xfb, 0x65, 0x47, 0x41, - 0xc6, 0x0c, 0xec, 0x0d, 0x6e, 0xfb, 0x1e, 0xa0, 0xd9, 0xa0, 0xf0, 0x45, 0x58, 0x14, 0x16, 0x7a, - 0x0b, 0x6f, 0xc0, 0x5a, 0xa7, 0xab, 0xf6, 0x5b, 0x4d, 0x59, 0x95, 0x1f, 0x3c, 0x90, 0x1b, 0x83, - 0xbe, 0xb8, 0x80, 0x47, 0xe8, 0x41, 0x62, 0x83, 0x57, 0xff, 0x90, 0x81, 0x8d, 0x05, 0x91, 0xe0, - 0x7a, 0xd0, 0xfb, 0x8b, 0xeb, 0xc8, 0x8d, 0xf3, 0x44, 0x5f, 0x63, 0xdd, 0x45, 0x8f, 0xb8, 0x7e, - 0x70, 0x55, 0xf8, 0x04, 0x58, 0x96, 0x2c, 0xdf, 0x18, 0x1a, 0xd4, 0x0d, 0xde, 0x2b, 0xc4, 0x85, - 0x60, 0x6d, 0x2a, 0x17, 0x4f, 0x16, 0x3f, 0x03, 0xec, 0xd8, 0x9e, 0xe1, 0x1b, 0xcf, 0xa8, 0x6a, - 0x58, 0xe1, 0xe3, 0x06, 0xbb, 0x20, 0x64, 0x15, 0x14, 0x6a, 0x5a, 0x96, 0x1f, 0xa1, 0x2d, 0x3a, - 0x22, 0x33, 0x68, 0x76, 0x98, 0x67, 0x14, 0x14, 0x6a, 0x22, 0xf4, 0x15, 0x28, 0xeb, 0xf6, 0x84, - 0xb5, 0x5b, 0x02, 0xc7, 0x6a, 0x47, 0x4a, 0x29, 0x09, 0x59, 0x04, 0x09, 0xfa, 0xe1, 0xe9, 0xab, - 0x4a, 0x59, 0x29, 0x09, 0x99, 0x80, 0x5c, 0x85, 0x35, 0x32, 0x1a, 0xb9, 0xcc, 0x79, 0xe8, 0x48, - 0x74, 0xf8, 0x95, 0x48, 0xcc, 0x81, 0x5b, 0x0f, 0xa1, 0x10, 0xe6, 0x81, 0x95, 0x6a, 0x96, 0x09, - 0xd5, 0x11, 0x6f, 0x5b, 0xe9, 0x9d, 0xa2, 0x52, 0xb0, 0x42, 0xe5, 0x15, 0x28, 0x1b, 0x9e, 0x3a, - 0x7d, 0x64, 0x4d, 0x6f, 0xa7, 0x77, 0x0a, 0x4a, 0xc9, 0xf0, 0xa2, 0x57, 0xb5, 0xea, 0x77, 0x69, - 0xa8, 0x24, 0x1f, 0x89, 0x71, 0x13, 0x0a, 0xa6, 0xad, 0x11, 0x4e, 0x2d, 0xf1, 0x0b, 0xc5, 0xce, - 0x6b, 0xde, 0x95, 0x6b, 0xed, 0x00, 0xaf, 0x44, 0x96, 0x5b, 0x7f, 0x4b, 0x41, 0x21, 0x14, 0xe3, - 0x0b, 0x90, 0x75, 0x88, 0x7f, 0xca, 0xdd, 0xe5, 0x0e, 0xd2, 0x28, 0xa5, 0xf0, 0x31, 0x93, 0x7b, - 0x0e, 0xb1, 0x38, 0x05, 0x02, 0x39, 0x1b, 0xb3, 0x75, 0x35, 0x29, 0xd1, 0xf9, 0xf5, 0xc1, 0x1e, - 0x8f, 0xa9, 0xe5, 0x7b, 0xe1, 0xba, 0x06, 0xf2, 0x46, 0x20, 0xc6, 0xd7, 0x61, 0xdd, 0x77, 0x89, - 0x61, 0x26, 0xb0, 0x59, 0x8e, 0x45, 0xa1, 0x22, 0x02, 0xef, 0xc3, 0xa5, 0xd0, 0xaf, 0x4e, 0x7d, - 0xa2, 0x9d, 0x52, 0x7d, 0x6a, 0x94, 0xe7, 0x2f, 0x90, 0x17, 0x03, 0x40, 0x33, 0xd0, 0x87, 0xb6, - 0xd5, 0xef, 0x53, 0xb0, 0x1e, 0x5e, 0x78, 0xf4, 0x28, 0x59, 0x47, 0x00, 0xc4, 0xb2, 0x6c, 0x3f, - 0x9e, 0xae, 0x79, 0x2a, 0xcf, 0xd9, 0xd5, 0xea, 0x91, 0x91, 0x12, 0x73, 0xb0, 0x35, 0x06, 0x98, - 0x6a, 0x96, 0xa6, 0xed, 0x32, 0x94, 0x82, 0x5f, 0x00, 0xf8, 0xcf, 0x48, 0xe2, 0x8a, 0x0c, 0x42, - 0xc4, 0x6e, 0x46, 0x78, 0x13, 0x72, 0x27, 0x74, 0x64, 0x58, 0xc1, 0xbb, 0xa4, 0x18, 0x84, 0xaf, - 0x9d, 0xd9, 0xe8, 0xb5, 0xf3, 0xe0, 0x77, 0x29, 0xd8, 0xd0, 0xec, 0xf1, 0x6c, 0xbc, 0x07, 0x68, - 0xe6, 0x9e, 0xee, 0x7d, 0x91, 0xfa, 0xea, 0xfe, 0xc8, 0xf0, 0x4f, 0x27, 0x27, 0x35, 0xcd, 0x1e, - 0xef, 0x8e, 0x6c, 0x93, 0x58, 0xa3, 0xe9, 0xef, 0x60, 0xfc, 0x1f, 0xed, 0xc6, 0x88, 0x5a, 0x37, - 0x46, 0x76, 0xec, 0x57, 0xb1, 0x7b, 0xd3, 0x7f, 0xbf, 0x4d, 0x67, 0x0e, 0x7b, 0x07, 0x7f, 0x4e, - 0x6f, 0x1d, 0x8a, 0x6f, 0xf5, 0xc2, 0xdc, 0x28, 0x74, 0x68, 0x52, 0x8d, 0xcd, 0xf7, 0x7f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x8e, 0x54, 0xe7, 0xef, 0x60, 0x1b, 0x00, 0x00, + // 2490 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xdd, 0x8e, 0xdb, 0xc6, + 0x15, 0x8e, 0x7e, 0x57, 0x3a, 0xd2, 0x6a, 0x67, 0x67, 0x37, 0x36, 0xbd, 0xf9, 0xf1, 0x5a, 0xf9, + 0xf1, 0x3a, 0x69, 0xb4, 0xc1, 0xc6, 0x76, 0x9c, 0x4d, 0xe1, 0x42, 0x2b, 0xd1, 0x1b, 0xb9, 0x5a, + 0x49, 0xa5, 0xb4, 0x8d, 0x9d, 0x1b, 0x62, 0x96, 0x1c, 0x49, 0xb4, 0x29, 0x92, 0x21, 0x29, 0xdb, + 0x9b, 0x2b, 0x03, 0xbd, 0x2a, 0xd0, 0x07, 0x28, 0x8a, 0xa2, 0x17, 0xb9, 0x09, 0xd0, 0x07, 0x28, + 0xd0, 0xbb, 0x3e, 0x41, 0x81, 0xbc, 0x41, 0x51, 0x14, 0x68, 0xdf, 0xa0, 0xb7, 0xc5, 0xcc, 0x90, + 0x14, 0xa9, 0x1f, 0x7b, 0x1b, 0xc0, 0xc9, 0x95, 0x34, 0xdf, 0xf9, 0xce, 0x99, 0x33, 0x67, 0xce, + 0xcc, 0x9c, 0x19, 0xc2, 0xee, 0xc8, 0xb6, 0x47, 0x26, 0xdd, 0x77, 0x5c, 0xdb, 0xb7, 0xcf, 0xa6, + 0xc3, 0x7d, 0x9d, 0x7a, 0x9a, 0x6b, 0x38, 0xbe, 0xed, 0xd6, 0x38, 0x86, 0x37, 0x04, 0xa3, 0x16, + 0x32, 0xaa, 0x27, 0xb0, 0x79, 0xcf, 0x30, 0x69, 0x33, 0x22, 0xf6, 0xa9, 0x8f, 0xef, 0x40, 0x76, + 0x68, 0x98, 0x54, 0x4a, 0xed, 0x66, 0xf6, 0x4a, 0x07, 0xef, 0xd6, 0xe6, 0x94, 0x6a, 0x49, 0x8d, + 0x1e, 0x83, 0x15, 0xae, 0x51, 0xfd, 0x57, 0x16, 0xb6, 0x96, 0x48, 0x31, 0x86, 0xac, 0x45, 0x26, + 0xcc, 0x62, 0x6a, 0xaf, 0xa8, 0xf0, 0xff, 0x58, 0x82, 0x35, 0x87, 0x68, 0x8f, 0xc9, 0x88, 0x4a, + 0x69, 0x0e, 0x87, 0x4d, 0xfc, 0x36, 0x80, 0x4e, 0x1d, 0x6a, 0xe9, 0xd4, 0xd2, 0xce, 0xa5, 0xcc, + 0x6e, 0x66, 0xaf, 0xa8, 0xc4, 0x10, 0xfc, 0x21, 0x6c, 0x3a, 0xd3, 0x33, 0xd3, 0xd0, 0xd4, 0x18, + 0x0d, 0x76, 0x33, 0x7b, 0x39, 0x05, 0x09, 0x41, 0x73, 0x46, 0xbe, 0x0e, 0x1b, 0x4f, 0x29, 0x79, + 0x1c, 0xa7, 0x96, 0x38, 0xb5, 0xc2, 0xe0, 0x18, 0xb1, 0x01, 0xe5, 0x09, 0xf5, 0x3c, 0x32, 0xa2, + 0xaa, 0x7f, 0xee, 0x50, 0x29, 0xcb, 0x47, 0xbf, 0xbb, 0x30, 0xfa, 0xf9, 0x91, 0x97, 0x02, 0xad, + 0xc1, 0xb9, 0x43, 0x71, 0x1d, 0x8a, 0xd4, 0x9a, 0x4e, 0x84, 0x85, 0xdc, 0x8a, 0xf8, 0xc9, 0xd6, + 0x74, 0x32, 0x6f, 0xa5, 0xc0, 0xd4, 0x02, 0x13, 0x6b, 0x1e, 0x75, 0x9f, 0x18, 0x1a, 0x95, 0xf2, + 0xdc, 0xc0, 0xf5, 0x05, 0x03, 0x7d, 0x21, 0x9f, 0xb7, 0x11, 0xea, 0xe1, 0x06, 0x14, 0xe9, 0x33, + 0x9f, 0x5a, 0x9e, 0x61, 0x5b, 0xd2, 0x1a, 0x37, 0xf2, 0xde, 0x92, 0x59, 0xa4, 0xa6, 0x3e, 0x6f, + 0x62, 0xa6, 0x87, 0x6f, 0xc3, 0x9a, 0xed, 0xf8, 0x86, 0x6d, 0x79, 0x52, 0x61, 0x37, 0xb5, 0x57, + 0x3a, 0x78, 0x73, 0x69, 0x22, 0x74, 0x05, 0x47, 0x09, 0xc9, 0xb8, 0x05, 0xc8, 0xb3, 0xa7, 0xae, + 0x46, 0x55, 0xcd, 0xd6, 0xa9, 0x6a, 0x58, 0x43, 0x5b, 0x2a, 0x72, 0x03, 0x57, 0x17, 0x07, 0xc2, + 0x89, 0x0d, 0x5b, 0xa7, 0x2d, 0x6b, 0x68, 0x2b, 0x15, 0x2f, 0xd1, 0xc6, 0x97, 0x20, 0xef, 0x9d, + 0x5b, 0x3e, 0x79, 0x26, 0x95, 0x79, 0x86, 0x04, 0xad, 0xea, 0x7f, 0x73, 0xb0, 0x71, 0x91, 0x14, + 0xfb, 0x1c, 0x72, 0x43, 0x36, 0x4a, 0x29, 0xfd, 0xff, 0xc4, 0x40, 0xe8, 0x24, 0x83, 0x98, 0xff, + 0x81, 0x41, 0xac, 0x43, 0xc9, 0xa2, 0x9e, 0x4f, 0x75, 0x91, 0x11, 0x99, 0x0b, 0xe6, 0x14, 0x08, + 0xa5, 0xc5, 0x94, 0xca, 0xfe, 0xa0, 0x94, 0x7a, 0x00, 0x1b, 0x91, 0x4b, 0xaa, 0x4b, 0xac, 0x51, + 0x98, 0x9b, 0xfb, 0x2f, 0xf3, 0xa4, 0x26, 0x87, 0x7a, 0x0a, 0x53, 0x53, 0x2a, 0x34, 0xd1, 0xc6, + 0x4d, 0x00, 0xdb, 0xa2, 0xf6, 0x50, 0xd5, 0xa9, 0x66, 0x4a, 0x85, 0x15, 0x51, 0xea, 0x32, 0xca, + 0x42, 0x94, 0x6c, 0x81, 0x6a, 0x26, 0xfe, 0x6c, 0x96, 0x6a, 0x6b, 0x2b, 0x32, 0xe5, 0x44, 0x2c, + 0xb2, 0x85, 0x6c, 0x3b, 0x85, 0x8a, 0x4b, 0x59, 0xde, 0x53, 0x3d, 0x18, 0x59, 0x91, 0x3b, 0x51, + 0x7b, 0xe9, 0xc8, 0x94, 0x40, 0x4d, 0x0c, 0x6c, 0xdd, 0x8d, 0x37, 0xf1, 0x3b, 0x10, 0x01, 0x2a, + 0x4f, 0x2b, 0xe0, 0xbb, 0x50, 0x39, 0x04, 0x3b, 0x64, 0x42, 0x77, 0xee, 0x40, 0x25, 0x19, 0x1e, + 0xbc, 0x0d, 0x39, 0xcf, 0x27, 0xae, 0xcf, 0xb3, 0x30, 0xa7, 0x88, 0x06, 0x46, 0x90, 0xa1, 0x96, + 0xce, 0x77, 0xb9, 0x9c, 0xc2, 0xfe, 0xee, 0x7c, 0x0a, 0xeb, 0x89, 0xee, 0x2f, 0xaa, 0x58, 0xfd, + 0x7d, 0x1e, 0xb6, 0x97, 0xe5, 0xdc, 0xd2, 0xf4, 0xbf, 0x04, 0x79, 0x6b, 0x3a, 0x39, 0xa3, 0xae, + 0x94, 0xe1, 0x16, 0x82, 0x16, 0xae, 0x43, 0xce, 0x24, 0x67, 0xd4, 0x94, 0xb2, 0xbb, 0xa9, 0xbd, + 0xca, 0xc1, 0x87, 0x17, 0xca, 0xea, 0x5a, 0x9b, 0xa9, 0x28, 0x42, 0x13, 0xdf, 0x85, 0x6c, 0xb0, + 0xc5, 0x31, 0x0b, 0x1f, 0x5c, 0xcc, 0x02, 0xcb, 0x45, 0x85, 0xeb, 0xe1, 0x37, 0xa0, 0xc8, 0x7e, + 0x45, 0x6c, 0xf3, 0xdc, 0xe7, 0x02, 0x03, 0x58, 0x5c, 0xf1, 0x0e, 0x14, 0x78, 0x9a, 0xe9, 0x34, + 0x3c, 0x1a, 0xa2, 0x36, 0x9b, 0x18, 0x9d, 0x0e, 0xc9, 0xd4, 0xf4, 0xd5, 0x27, 0xc4, 0x9c, 0x52, + 0x9e, 0x30, 0x45, 0xa5, 0x1c, 0x80, 0xbf, 0x66, 0x18, 0xbe, 0x0a, 0x25, 0x91, 0x95, 0x86, 0xa5, + 0xd3, 0x67, 0x7c, 0xf7, 0xc9, 0x29, 0x22, 0x51, 0x5b, 0x0c, 0x61, 0xdd, 0x3f, 0xf2, 0x6c, 0x2b, + 0x9c, 0x5a, 0xde, 0x05, 0x03, 0x78, 0xf7, 0x9f, 0xce, 0x6f, 0x7c, 0x6f, 0x2d, 0x1f, 0xde, 0x7c, + 0x2e, 0x56, 0xff, 0x92, 0x86, 0x2c, 0x5f, 0x6f, 0x1b, 0x50, 0x1a, 0x3c, 0xec, 0xc9, 0x6a, 0xb3, + 0x7b, 0x7a, 0xd4, 0x96, 0x51, 0x0a, 0x57, 0x00, 0x38, 0x70, 0xaf, 0xdd, 0xad, 0x0f, 0x50, 0x3a, + 0x6a, 0xb7, 0x3a, 0x83, 0xdb, 0x37, 0x51, 0x26, 0x52, 0x38, 0x15, 0x40, 0x36, 0x4e, 0xf8, 0xe4, + 0x00, 0xe5, 0x30, 0x82, 0xb2, 0x30, 0xd0, 0x7a, 0x20, 0x37, 0x6f, 0xdf, 0x44, 0xf9, 0x24, 0xf2, + 0xc9, 0x01, 0x5a, 0xc3, 0xeb, 0x50, 0xe4, 0xc8, 0x51, 0xb7, 0xdb, 0x46, 0x85, 0xc8, 0x66, 0x7f, + 0xa0, 0xb4, 0x3a, 0xc7, 0xa8, 0x18, 0xd9, 0x3c, 0x56, 0xba, 0xa7, 0x3d, 0x04, 0x91, 0x85, 0x13, + 0xb9, 0xdf, 0xaf, 0x1f, 0xcb, 0xa8, 0x14, 0x31, 0x8e, 0x1e, 0x0e, 0xe4, 0x3e, 0x2a, 0x27, 0xdc, + 0xfa, 0xe4, 0x00, 0xad, 0x47, 0x5d, 0xc8, 0x9d, 0xd3, 0x13, 0x54, 0xc1, 0x9b, 0xb0, 0x2e, 0xba, + 0x08, 0x9d, 0xd8, 0x98, 0x83, 0x6e, 0xdf, 0x44, 0x68, 0xe6, 0x88, 0xb0, 0xb2, 0x99, 0x00, 0x6e, + 0xdf, 0x44, 0xb8, 0xda, 0x80, 0x1c, 0xcf, 0x2e, 0x8c, 0xa1, 0xd2, 0xae, 0x1f, 0xc9, 0x6d, 0xb5, + 0xdb, 0x1b, 0xb4, 0xba, 0x9d, 0x7a, 0x1b, 0xa5, 0x66, 0x98, 0x22, 0xff, 0xea, 0xb4, 0xa5, 0xc8, + 0x4d, 0x94, 0x8e, 0x63, 0x3d, 0xb9, 0x3e, 0x90, 0x9b, 0x28, 0x53, 0xd5, 0x60, 0x7b, 0xd9, 0x3e, + 0xb3, 0x74, 0x65, 0xc4, 0xa6, 0x38, 0xbd, 0x62, 0x8a, 0xb9, 0xad, 0x85, 0x29, 0xfe, 0x36, 0x05, + 0x5b, 0x4b, 0xf6, 0xda, 0xa5, 0x9d, 0xfc, 0x02, 0x72, 0x22, 0x45, 0xc5, 0xe9, 0x73, 0x63, 0xe9, + 0xa6, 0xcd, 0x13, 0x76, 0xe1, 0x04, 0xe2, 0x7a, 0xf1, 0x13, 0x38, 0xb3, 0xe2, 0x04, 0x66, 0x26, + 0x16, 0x9c, 0xfc, 0x4d, 0x0a, 0xa4, 0x55, 0xb6, 0x5f, 0xb2, 0x51, 0xa4, 0x13, 0x1b, 0xc5, 0xe7, + 0xf3, 0x0e, 0x5c, 0x5b, 0x3d, 0x86, 0x05, 0x2f, 0xbe, 0x4b, 0xc1, 0xa5, 0xe5, 0x85, 0xca, 0x52, + 0x1f, 0xee, 0x42, 0x7e, 0x42, 0xfd, 0xb1, 0x1d, 0x1e, 0xd6, 0xef, 0x2f, 0x39, 0x02, 0x98, 0x78, + 0x3e, 0x56, 0x81, 0x56, 0xfc, 0x0c, 0xc9, 0xac, 0xaa, 0x36, 0x84, 0x37, 0x0b, 0x9e, 0xfe, 0x36, + 0x0d, 0xaf, 0x2f, 0x35, 0xbe, 0xd4, 0xd1, 0xb7, 0x00, 0x0c, 0xcb, 0x99, 0xfa, 0xe2, 0x40, 0x16, + 0xfb, 0x53, 0x91, 0x23, 0x7c, 0xed, 0xb3, 0xbd, 0x67, 0xea, 0x47, 0xf2, 0x0c, 0x97, 0x83, 0x80, + 0x38, 0xe1, 0xce, 0xcc, 0xd1, 0x2c, 0x77, 0xf4, 0xed, 0x15, 0x23, 0x5d, 0x38, 0xeb, 0x3e, 0x06, + 0xa4, 0x99, 0x06, 0xb5, 0x7c, 0xd5, 0xf3, 0x5d, 0x4a, 0x26, 0x86, 0x35, 0xe2, 0x1b, 0x70, 0xe1, + 0x30, 0x37, 0x24, 0xa6, 0x47, 0x95, 0x0d, 0x21, 0xee, 0x87, 0x52, 0xa6, 0xc1, 0x4f, 0x19, 0x37, + 0xa6, 0x91, 0x4f, 0x68, 0x08, 0x71, 0xa4, 0x51, 0xfd, 0x6b, 0x01, 0x4a, 0xb1, 0xb2, 0x0e, 0x5f, + 0x83, 0xf2, 0x23, 0xf2, 0x84, 0xa8, 0x61, 0xa9, 0x2e, 0x22, 0x51, 0x62, 0x58, 0x2f, 0x28, 0xd7, + 0x3f, 0x86, 0x6d, 0x4e, 0xb1, 0xa7, 0x3e, 0x75, 0x55, 0xcd, 0x24, 0x9e, 0xc7, 0x83, 0x56, 0xe0, + 0x54, 0xcc, 0x64, 0x5d, 0x26, 0x6a, 0x84, 0x12, 0x7c, 0x0b, 0xb6, 0xb8, 0xc6, 0x64, 0x6a, 0xfa, + 0x86, 0x63, 0x52, 0x95, 0x5d, 0x1e, 0x3c, 0xbe, 0x11, 0x47, 0x9e, 0x6d, 0x32, 0xc6, 0x49, 0x40, + 0x60, 0x1e, 0x79, 0xb8, 0x09, 0x6f, 0x71, 0xb5, 0x11, 0xb5, 0xa8, 0x4b, 0x7c, 0xaa, 0xd2, 0xaf, + 0xa7, 0xc4, 0xf4, 0x54, 0x62, 0xe9, 0xea, 0x98, 0x78, 0x63, 0x69, 0x9b, 0x19, 0x38, 0x4a, 0x4b, + 0x29, 0xe5, 0x0a, 0x23, 0x1e, 0x07, 0x3c, 0x99, 0xd3, 0xea, 0x96, 0xfe, 0x05, 0xf1, 0xc6, 0xf8, + 0x10, 0x2e, 0x71, 0x2b, 0x9e, 0xef, 0x1a, 0xd6, 0x48, 0xd5, 0xc6, 0x54, 0x7b, 0xac, 0x4e, 0xfd, + 0xe1, 0x1d, 0xe9, 0x8d, 0x78, 0xff, 0xdc, 0xc3, 0x3e, 0xe7, 0x34, 0x18, 0xe5, 0xd4, 0x1f, 0xde, + 0xc1, 0x7d, 0x28, 0xb3, 0xc9, 0x98, 0x18, 0xdf, 0x50, 0x75, 0x68, 0xbb, 0xfc, 0x64, 0xa9, 0x2c, + 0x59, 0xd9, 0xb1, 0x08, 0xd6, 0xba, 0x81, 0xc2, 0x89, 0xad, 0xd3, 0xc3, 0x5c, 0xbf, 0x27, 0xcb, + 0x4d, 0xa5, 0x14, 0x5a, 0xb9, 0x67, 0xbb, 0x2c, 0xa1, 0x46, 0x76, 0x14, 0xe0, 0x92, 0x48, 0xa8, + 0x91, 0x1d, 0x86, 0xf7, 0x16, 0x6c, 0x69, 0x9a, 0x18, 0xb3, 0xa1, 0xa9, 0x41, 0x89, 0xef, 0x49, + 0x28, 0x11, 0x2c, 0x4d, 0x3b, 0x16, 0x84, 0x20, 0xc7, 0x3d, 0xfc, 0x19, 0xbc, 0x3e, 0x0b, 0x56, + 0x5c, 0x71, 0x73, 0x61, 0x94, 0xf3, 0xaa, 0xb7, 0x60, 0xcb, 0x39, 0x5f, 0x54, 0xc4, 0x89, 0x1e, + 0x9d, 0xf3, 0x79, 0xb5, 0x4f, 0x61, 0xdb, 0x19, 0x3b, 0x8b, 0x7a, 0x5b, 0x71, 0x3d, 0xec, 0x8c, + 0x9d, 0x79, 0xc5, 0xf7, 0xf8, 0x7d, 0xcf, 0xa5, 0x1a, 0xf1, 0xa9, 0x2e, 0x5d, 0x8e, 0xd3, 0x63, + 0x02, 0xbc, 0x0f, 0x48, 0xd3, 0x54, 0x6a, 0x91, 0x33, 0x93, 0xaa, 0xc4, 0xa5, 0x16, 0xf1, 0xa4, + 0xab, 0x71, 0x72, 0x45, 0xd3, 0x64, 0x2e, 0xad, 0x73, 0x21, 0xfe, 0x00, 0x36, 0xed, 0xb3, 0x47, + 0x9a, 0x48, 0x49, 0xd5, 0x71, 0xe9, 0xd0, 0x78, 0x26, 0xbd, 0xcb, 0xe3, 0xbb, 0xc1, 0x04, 0x3c, + 0x21, 0x7b, 0x1c, 0xc6, 0x37, 0x00, 0x69, 0xde, 0x98, 0xb8, 0x0e, 0xaf, 0x09, 0x3c, 0x87, 0x68, + 0x54, 0x7a, 0x4f, 0x50, 0x05, 0xde, 0x09, 0x61, 0xb6, 0x24, 0xbc, 0xa7, 0xc6, 0xd0, 0x0f, 0x2d, + 0x5e, 0x17, 0x4b, 0x82, 0x63, 0x81, 0xb5, 0x3d, 0x40, 0x2c, 0x14, 0x89, 0x8e, 0xf7, 0x38, 0xad, + 0xe2, 0x8c, 0x9d, 0x78, 0xbf, 0xef, 0xc0, 0x3a, 0x63, 0xce, 0x3a, 0xbd, 0x21, 0xea, 0x19, 0x67, + 0x1c, 0xeb, 0xf1, 0x01, 0x6c, 0x4f, 0x2d, 0xc3, 0xf2, 0xa9, 0xeb, 0xb8, 0x94, 0x5d, 0x26, 0xc4, + 0x8e, 0x20, 0xfd, 0x7b, 0x6d, 0xc5, 0x75, 0xe0, 0x34, 0xce, 0x16, 0x89, 0xa8, 0x6c, 0x4d, 0x17, + 0xc1, 0xea, 0x21, 0x94, 0xe3, 0xf9, 0x89, 0x8b, 0x20, 0x32, 0x14, 0xa5, 0xd8, 0x59, 0xdf, 0xe8, + 0x36, 0xd9, 0x29, 0xfd, 0x95, 0x8c, 0xd2, 0xac, 0x5a, 0x68, 0xb7, 0x06, 0xb2, 0xaa, 0x9c, 0x76, + 0x06, 0xad, 0x13, 0x19, 0x65, 0x3e, 0x28, 0x16, 0xfe, 0xb3, 0x86, 0x9e, 0x3f, 0x7f, 0xfe, 0x3c, + 0x7d, 0x3f, 0x5b, 0x78, 0x1f, 0x5d, 0xaf, 0x7e, 0x9f, 0x86, 0x4a, 0xb2, 0x4e, 0xc7, 0x3f, 0x87, + 0xcb, 0xe1, 0xa5, 0xda, 0xa3, 0xbe, 0xfa, 0xd4, 0x70, 0xf9, 0xc2, 0x99, 0x10, 0x51, 0xe9, 0x46, + 0x53, 0xb7, 0x1d, 0xb0, 0xfa, 0xd4, 0xff, 0xd2, 0x70, 0xd9, 0xb2, 0x98, 0x10, 0x1f, 0xb7, 0xe1, + 0xaa, 0x65, 0xab, 0x9e, 0x4f, 0x2c, 0x9d, 0xb8, 0xba, 0x3a, 0x7b, 0xce, 0x50, 0x89, 0xa6, 0x51, + 0xcf, 0xb3, 0xc5, 0x81, 0x15, 0x59, 0x79, 0xd3, 0xb2, 0xfb, 0x01, 0x79, 0xb6, 0x93, 0xd7, 0x03, + 0xea, 0x5c, 0x9a, 0x65, 0x56, 0xa5, 0xd9, 0x1b, 0x50, 0x9c, 0x10, 0x47, 0xa5, 0x96, 0xef, 0x9e, + 0xf3, 0xea, 0xb2, 0xa0, 0x14, 0x26, 0xc4, 0x91, 0x59, 0xfb, 0xd5, 0xcd, 0x44, 0x32, 0x9a, 0x05, + 0x54, 0xbc, 0x9f, 0x2d, 0x14, 0x11, 0x54, 0xff, 0x99, 0x81, 0x72, 0xbc, 0xda, 0x64, 0xc5, 0xbb, + 0xc6, 0x4f, 0x96, 0x14, 0xdf, 0x7b, 0xde, 0x79, 0x61, 0x6d, 0x5a, 0x6b, 0xb0, 0x23, 0xe7, 0x30, + 0x2f, 0x6a, 0x40, 0x45, 0x68, 0xb2, 0xe3, 0x9e, 0xed, 0x36, 0x54, 0xdc, 0x2c, 0x0a, 0x4a, 0xd0, + 0xc2, 0xc7, 0x90, 0x7f, 0xe4, 0x71, 0xdb, 0x79, 0x6e, 0xfb, 0xdd, 0x17, 0xdb, 0xbe, 0xdf, 0xe7, + 0xc6, 0x8b, 0xf7, 0xfb, 0x6a, 0xa7, 0xab, 0x9c, 0xd4, 0xdb, 0x4a, 0xa0, 0x8e, 0xaf, 0x40, 0xd6, + 0x24, 0xdf, 0x9c, 0x27, 0x0f, 0x27, 0x0e, 0x5d, 0x74, 0x12, 0xae, 0x40, 0xf6, 0x29, 0x25, 0x8f, + 0x93, 0x47, 0x02, 0x87, 0x5e, 0xe1, 0x62, 0xd8, 0x87, 0x1c, 0x8f, 0x17, 0x06, 0x08, 0x22, 0x86, + 0x5e, 0xc3, 0x05, 0xc8, 0x36, 0xba, 0x0a, 0x5b, 0x10, 0x08, 0xca, 0x02, 0x55, 0x7b, 0x2d, 0xb9, + 0x21, 0xa3, 0x74, 0xf5, 0x16, 0xe4, 0x45, 0x10, 0xd8, 0x62, 0x89, 0xc2, 0x80, 0x5e, 0x0b, 0x9a, + 0x81, 0x8d, 0x54, 0x28, 0x3d, 0x3d, 0x39, 0x92, 0x15, 0x94, 0x4e, 0x4e, 0x75, 0x16, 0xe5, 0xaa, + 0x1e, 0x94, 0xe3, 0xe5, 0xe6, 0x8f, 0x92, 0x65, 0xd5, 0xbf, 0xa5, 0xa0, 0x14, 0x2b, 0x1f, 0x59, + 0xe1, 0x42, 0x4c, 0xd3, 0x7e, 0xaa, 0x12, 0xd3, 0x20, 0x5e, 0x90, 0x1a, 0xc0, 0xa1, 0x3a, 0x43, + 0x2e, 0x3a, 0x75, 0x3f, 0xd2, 0x12, 0xc9, 0xa1, 0x7c, 0xf5, 0x4f, 0x29, 0x40, 0xf3, 0x05, 0xe8, + 0x9c, 0x9b, 0xa9, 0x9f, 0xd2, 0xcd, 0xea, 0x1f, 0x53, 0x50, 0x49, 0x56, 0x9d, 0x73, 0xee, 0x5d, + 0xfb, 0x49, 0xdd, 0xfb, 0x47, 0x1a, 0xd6, 0x13, 0xb5, 0xe6, 0x45, 0xbd, 0xfb, 0x1a, 0x36, 0x0d, + 0x9d, 0x4e, 0x1c, 0xdb, 0xa7, 0x96, 0x76, 0xae, 0x9a, 0xf4, 0x09, 0x35, 0xa5, 0x2a, 0xdf, 0x34, + 0xf6, 0x5f, 0x5c, 0xcd, 0xd6, 0x5a, 0x33, 0xbd, 0x36, 0x53, 0x3b, 0xdc, 0x6a, 0x35, 0xe5, 0x93, + 0x5e, 0x77, 0x20, 0x77, 0x1a, 0x0f, 0xd5, 0xd3, 0xce, 0x2f, 0x3b, 0xdd, 0x2f, 0x3b, 0x0a, 0x32, + 0xe6, 0x68, 0xaf, 0x70, 0xd9, 0xf7, 0x00, 0xcd, 0x3b, 0x85, 0x2f, 0xc3, 0x32, 0xb7, 0xd0, 0x6b, + 0x78, 0x0b, 0x36, 0x3a, 0x5d, 0xb5, 0xdf, 0x6a, 0xca, 0xaa, 0x7c, 0xef, 0x9e, 0xdc, 0x18, 0xf4, + 0xc5, 0xf5, 0x3e, 0x62, 0x0f, 0x12, 0x0b, 0xbc, 0xfa, 0x87, 0x0c, 0x6c, 0x2d, 0xf1, 0x04, 0xd7, + 0x83, 0x9b, 0x85, 0xb8, 0xec, 0x7c, 0x74, 0x11, 0xef, 0x6b, 0xac, 0x20, 0xe8, 0x11, 0xd7, 0x0f, + 0x2e, 0x22, 0x37, 0x80, 0x45, 0xc9, 0xf2, 0x8d, 0xa1, 0x41, 0xdd, 0xe0, 0x35, 0x44, 0x5c, 0x37, + 0x36, 0x66, 0xb8, 0x78, 0x10, 0xf9, 0x19, 0x60, 0xc7, 0xf6, 0x0c, 0xdf, 0x78, 0x42, 0x55, 0xc3, + 0x0a, 0x9f, 0x4e, 0xd8, 0xf5, 0x23, 0xab, 0xa0, 0x50, 0xd2, 0xb2, 0xfc, 0x88, 0x6d, 0xd1, 0x11, + 0x99, 0x63, 0xb3, 0xcd, 0x3c, 0xa3, 0xa0, 0x50, 0x12, 0xb1, 0xaf, 0x41, 0x59, 0xb7, 0xa7, 0xac, + 0x26, 0x13, 0x3c, 0x76, 0x76, 0xa4, 0x94, 0x92, 0xc0, 0x22, 0x4a, 0x50, 0x6d, 0xcf, 0xde, 0x6c, + 0xca, 0x4a, 0x49, 0x60, 0x82, 0x72, 0x1d, 0x36, 0xc8, 0x68, 0xe4, 0x32, 0xe3, 0xa1, 0x21, 0x71, + 0x7f, 0xa8, 0x44, 0x30, 0x27, 0xee, 0xdc, 0x87, 0x42, 0x18, 0x07, 0x76, 0x54, 0xb3, 0x48, 0xa8, + 0x8e, 0x78, 0x39, 0x4b, 0xef, 0x15, 0x95, 0x82, 0x15, 0x0a, 0xaf, 0x41, 0xd9, 0xf0, 0xd4, 0xd9, + 0x13, 0x6e, 0x7a, 0x37, 0xbd, 0x57, 0x50, 0x4a, 0x86, 0x17, 0xbd, 0xd9, 0x55, 0xbf, 0x4b, 0x43, + 0x25, 0xf9, 0x04, 0x8d, 0x9b, 0x50, 0x30, 0x6d, 0x8d, 0xf0, 0xd4, 0x12, 0xdf, 0x3f, 0xf6, 0x5e, + 0xf2, 0x6a, 0x5d, 0x6b, 0x07, 0x7c, 0x25, 0xd2, 0xdc, 0xf9, 0x7b, 0x0a, 0x0a, 0x21, 0x8c, 0x2f, + 0x41, 0xd6, 0x21, 0xfe, 0x98, 0x9b, 0xcb, 0x1d, 0xa5, 0x51, 0x4a, 0xe1, 0x6d, 0x86, 0x7b, 0x0e, + 0xb1, 0x78, 0x0a, 0x04, 0x38, 0x6b, 0xb3, 0x79, 0x35, 0x29, 0xd1, 0xf9, 0xe5, 0xc4, 0x9e, 0x4c, + 0xa8, 0xe5, 0x7b, 0xe1, 0xbc, 0x06, 0x78, 0x23, 0x80, 0xf1, 0x87, 0xb0, 0xe9, 0xbb, 0xc4, 0x30, + 0x13, 0xdc, 0x2c, 0xe7, 0xa2, 0x50, 0x10, 0x91, 0x0f, 0xe1, 0x4a, 0x68, 0x57, 0xa7, 0x3e, 0xd1, + 0xc6, 0x54, 0x9f, 0x29, 0xe5, 0xf9, 0xfb, 0xe6, 0xe5, 0x80, 0xd0, 0x0c, 0xe4, 0xa1, 0x6e, 0xf5, + 0xfb, 0x14, 0x6c, 0x86, 0xd7, 0x29, 0x3d, 0x0a, 0xd6, 0x09, 0x00, 0xb1, 0x2c, 0xdb, 0x8f, 0x87, + 0x6b, 0x31, 0x95, 0x17, 0xf4, 0x6a, 0xf5, 0x48, 0x49, 0x89, 0x19, 0xd8, 0x99, 0x00, 0xcc, 0x24, + 0x2b, 0xc3, 0x76, 0x15, 0x4a, 0xc1, 0xf7, 0x05, 0xfe, 0x91, 0x4a, 0x5c, 0xc0, 0x41, 0x40, 0xec, + 0xde, 0x85, 0xb7, 0x21, 0x77, 0x46, 0x47, 0x86, 0x15, 0xbc, 0x7a, 0x8a, 0x46, 0xf8, 0x96, 0x9a, + 0x8d, 0xde, 0x52, 0x8f, 0x7e, 0x97, 0x82, 0x2d, 0xcd, 0x9e, 0xcc, 0xfb, 0x7b, 0x84, 0xe6, 0x5e, + 0x01, 0xbc, 0x2f, 0x52, 0x5f, 0xdd, 0x1d, 0x19, 0xfe, 0x78, 0x7a, 0x56, 0xd3, 0xec, 0xc9, 0xfe, + 0xc8, 0x36, 0x89, 0x35, 0x9a, 0x7d, 0x65, 0xe3, 0x7f, 0xb4, 0x8f, 0x46, 0xd4, 0xfa, 0x68, 0x64, + 0xc7, 0xbe, 0xb9, 0x7d, 0x3e, 0xfb, 0xfb, 0x6d, 0x3a, 0x73, 0xdc, 0x3b, 0xfa, 0x73, 0x7a, 0xe7, + 0x58, 0xf4, 0xd5, 0x0b, 0x63, 0xa3, 0xd0, 0xa1, 0x49, 0x35, 0x36, 0xde, 0xff, 0x05, 0x00, 0x00, + 0xff, 0xff, 0xa2, 0xc3, 0x4e, 0x18, 0xbe, 0x1b, 0x00, 0x00, } diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto new file mode 100644 index 000000000..70b82a4dc --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto @@ -0,0 +1,837 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Author: kenton@google.com (Kenton Varda) +// Based on original Protocol Buffers design by +// Sanjay Ghemawat, Jeff Dean, and others. +// +// The messages in this file describe the definitions found in .proto files. +// A valid .proto file can be translated directly to a FileDescriptorProto +// without any other information (e.g. without reading its imports). + + +syntax = "proto2"; + +package google.protobuf; +option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "DescriptorProtos"; +option csharp_namespace = "Google.Protobuf.Reflection"; +option objc_class_prefix = "GPB"; + +// descriptor.proto must be optimized for speed because reflection-based +// algorithms don't work during bootstrapping. +option optimize_for = SPEED; + +// The protocol compiler can output a FileDescriptorSet containing the .proto +// files it parses. +message FileDescriptorSet { + repeated FileDescriptorProto file = 1; +} + +// Describes a complete .proto file. +message FileDescriptorProto { + optional string name = 1; // file name, relative to root of source tree + optional string package = 2; // e.g. "foo", "foo.bar", etc. + + // Names of files imported by this file. + repeated string dependency = 3; + // Indexes of the public imported files in the dependency list above. + repeated int32 public_dependency = 10; + // Indexes of the weak imported files in the dependency list. + // For Google-internal migration only. Do not use. + repeated int32 weak_dependency = 11; + + // All top-level definitions in this file. + repeated DescriptorProto message_type = 4; + repeated EnumDescriptorProto enum_type = 5; + repeated ServiceDescriptorProto service = 6; + repeated FieldDescriptorProto extension = 7; + + optional FileOptions options = 8; + + // This field contains optional information about the original source code. + // You may safely remove this entire field without harming runtime + // functionality of the descriptors -- the information is needed only by + // development tools. + optional SourceCodeInfo source_code_info = 9; + + // The syntax of the proto file. + // The supported values are "proto2" and "proto3". + optional string syntax = 12; +} + +// Describes a message type. +message DescriptorProto { + optional string name = 1; + + repeated FieldDescriptorProto field = 2; + repeated FieldDescriptorProto extension = 6; + + repeated DescriptorProto nested_type = 3; + repeated EnumDescriptorProto enum_type = 4; + + message ExtensionRange { + optional int32 start = 1; + optional int32 end = 2; + } + repeated ExtensionRange extension_range = 5; + + repeated OneofDescriptorProto oneof_decl = 8; + + optional MessageOptions options = 7; + + // Range of reserved tag numbers. Reserved tag numbers may not be used by + // fields or extension ranges in the same message. Reserved ranges may + // not overlap. + message ReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. + } + repeated ReservedRange reserved_range = 9; + // Reserved field names, which may not be used by fields in the same message. + // A given name may only be reserved once. + repeated string reserved_name = 10; +} + +// Describes a field within a message. +message FieldDescriptorProto { + enum Type { + // 0 is reserved for errors. + // Order is weird for historical reasons. + TYPE_DOUBLE = 1; + TYPE_FLOAT = 2; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + // negative values are likely. + TYPE_INT64 = 3; + TYPE_UINT64 = 4; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + // negative values are likely. + TYPE_INT32 = 5; + TYPE_FIXED64 = 6; + TYPE_FIXED32 = 7; + TYPE_BOOL = 8; + TYPE_STRING = 9; + // Tag-delimited aggregate. + // Group type is deprecated and not supported in proto3. However, Proto3 + // implementations should still be able to parse the group wire format and + // treat group fields as unknown fields. + TYPE_GROUP = 10; + TYPE_MESSAGE = 11; // Length-delimited aggregate. + + // New in version 2. + TYPE_BYTES = 12; + TYPE_UINT32 = 13; + TYPE_ENUM = 14; + TYPE_SFIXED32 = 15; + TYPE_SFIXED64 = 16; + TYPE_SINT32 = 17; // Uses ZigZag encoding. + TYPE_SINT64 = 18; // Uses ZigZag encoding. + }; + + enum Label { + // 0 is reserved for errors + LABEL_OPTIONAL = 1; + LABEL_REQUIRED = 2; + LABEL_REPEATED = 3; + }; + + optional string name = 1; + optional int32 number = 3; + optional Label label = 4; + + // If type_name is set, this need not be set. If both this and type_name + // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + optional Type type = 5; + + // For message and enum types, this is the name of the type. If the name + // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + // rules are used to find the type (i.e. first the nested types within this + // message are searched, then within the parent, on up to the root + // namespace). + optional string type_name = 6; + + // For extensions, this is the name of the type being extended. It is + // resolved in the same manner as type_name. + optional string extendee = 2; + + // For numeric types, contains the original text representation of the value. + // For booleans, "true" or "false". + // For strings, contains the default text contents (not escaped in any way). + // For bytes, contains the C escaped value. All bytes >= 128 are escaped. + // TODO(kenton): Base-64 encode? + optional string default_value = 7; + + // If set, gives the index of a oneof in the containing type's oneof_decl + // list. This field is a member of that oneof. + optional int32 oneof_index = 9; + + // JSON name of this field. The value is set by protocol compiler. If the + // user has set a "json_name" option on this field, that option's value + // will be used. Otherwise, it's deduced from the field's name by converting + // it to camelCase. + optional string json_name = 10; + + optional FieldOptions options = 8; +} + +// Describes a oneof. +message OneofDescriptorProto { + optional string name = 1; + optional OneofOptions options = 2; +} + +// Describes an enum type. +message EnumDescriptorProto { + optional string name = 1; + + repeated EnumValueDescriptorProto value = 2; + + optional EnumOptions options = 3; +} + +// Describes a value within an enum. +message EnumValueDescriptorProto { + optional string name = 1; + optional int32 number = 2; + + optional EnumValueOptions options = 3; +} + +// Describes a service. +message ServiceDescriptorProto { + optional string name = 1; + repeated MethodDescriptorProto method = 2; + + optional ServiceOptions options = 3; +} + +// Describes a method of a service. +message MethodDescriptorProto { + optional string name = 1; + + // Input and output type names. These are resolved in the same way as + // FieldDescriptorProto.type_name, but must refer to a message type. + optional string input_type = 2; + optional string output_type = 3; + + optional MethodOptions options = 4; + + // Identifies if client streams multiple client messages + optional bool client_streaming = 5 [default=false]; + // Identifies if server streams multiple server messages + optional bool server_streaming = 6 [default=false]; +} + + +// =================================================================== +// Options + +// Each of the definitions above may have "options" attached. These are +// just annotations which may cause code to be generated slightly differently +// or may contain hints for code that manipulates protocol messages. +// +// Clients may define custom options as extensions of the *Options messages. +// These extensions may not yet be known at parsing time, so the parser cannot +// store the values in them. Instead it stores them in a field in the *Options +// message called uninterpreted_option. This field must have the same name +// across all *Options messages. We then use this field to populate the +// extensions when we build a descriptor, at which point all protos have been +// parsed and so all extensions are known. +// +// Extension numbers for custom options may be chosen as follows: +// * For options which will only be used within a single application or +// organization, or for experimental options, use field numbers 50000 +// through 99999. It is up to you to ensure that you do not use the +// same number for multiple options. +// * For options which will be published and used publicly by multiple +// independent entities, e-mail protobuf-global-extension-registry@google.com +// to reserve extension numbers. Simply provide your project name (e.g. +// Objective-C plugin) and your project website (if available) -- there's no +// need to explain how you intend to use them. Usually you only need one +// extension number. You can declare multiple options with only one extension +// number by putting them in a sub-message. See the Custom Options section of +// the docs for examples: +// https://developers.google.com/protocol-buffers/docs/proto#options +// If this turns out to be popular, a web service will be set up +// to automatically assign option numbers. + + +message FileOptions { + + // Sets the Java package where classes generated from this .proto will be + // placed. By default, the proto package is used, but this is often + // inappropriate because proto packages do not normally start with backwards + // domain names. + optional string java_package = 1; + + + // If set, all the classes from the .proto file are wrapped in a single + // outer class with the given name. This applies to both Proto1 + // (equivalent to the old "--one_java_file" option) and Proto2 (where + // a .proto always translates to a single class, but you may want to + // explicitly choose the class name). + optional string java_outer_classname = 8; + + // If set true, then the Java code generator will generate a separate .java + // file for each top-level message, enum, and service defined in the .proto + // file. Thus, these types will *not* be nested inside the outer class + // named by java_outer_classname. However, the outer class will still be + // generated to contain the file's getDescriptor() method as well as any + // top-level extensions defined in the file. + optional bool java_multiple_files = 10 [default=false]; + + // This option does nothing. + optional bool java_generate_equals_and_hash = 20 [deprecated=true]; + + // If set true, then the Java2 code generator will generate code that + // throws an exception whenever an attempt is made to assign a non-UTF-8 + // byte sequence to a string field. + // Message reflection will do the same. + // However, an extension field still accepts non-UTF-8 byte sequences. + // This option has no effect on when used with the lite runtime. + optional bool java_string_check_utf8 = 27 [default=false]; + + + // Generated classes can be optimized for speed or code size. + enum OptimizeMode { + SPEED = 1; // Generate complete code for parsing, serialization, + // etc. + CODE_SIZE = 2; // Use ReflectionOps to implement these methods. + LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. + } + optional OptimizeMode optimize_for = 9 [default=SPEED]; + + // Sets the Go package where structs generated from this .proto will be + // placed. If omitted, the Go package will be derived from the following: + // - The basename of the package import path, if provided. + // - Otherwise, the package statement in the .proto file, if present. + // - Otherwise, the basename of the .proto file, without extension. + optional string go_package = 11; + + + + // Should generic services be generated in each language? "Generic" services + // are not specific to any particular RPC system. They are generated by the + // main code generators in each language (without additional plugins). + // Generic services were the only kind of service generation supported by + // early versions of google.protobuf. + // + // Generic services are now considered deprecated in favor of using plugins + // that generate code specific to your particular RPC system. Therefore, + // these default to false. Old code which depends on generic services should + // explicitly set them to true. + optional bool cc_generic_services = 16 [default=false]; + optional bool java_generic_services = 17 [default=false]; + optional bool py_generic_services = 18 [default=false]; + optional bool php_generic_services = 19 [default=false]; + + // Is this file deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for everything in the file, or it will be completely ignored; in the very + // least, this is a formalization for deprecating files. + optional bool deprecated = 23 [default=false]; + + // Enables the use of arenas for the proto messages in this file. This applies + // only to generated classes for C++. + optional bool cc_enable_arenas = 31 [default=false]; + + + // Sets the objective c class prefix which is prepended to all objective c + // generated classes from this .proto. There is no default. + optional string objc_class_prefix = 36; + + // Namespace for generated classes; defaults to the package. + optional string csharp_namespace = 37; + + // By default Swift generators will take the proto package and CamelCase it + // replacing '.' with underscore and use that to prefix the types/symbols + // defined. When this options is provided, they will use this value instead + // to prefix the types/symbols defined. + optional string swift_prefix = 39; + + // Sets the php class prefix which is prepended to all php generated classes + // from this .proto. Default is empty. + optional string php_class_prefix = 40; + + // Use this option to change the namespace of php generated classes. Default + // is empty. When this option is empty, the package name will be used for + // determining the namespace. + optional string php_namespace = 41; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; + + reserved 38; +} + +message MessageOptions { + // Set true to use the old proto1 MessageSet wire format for extensions. + // This is provided for backwards-compatibility with the MessageSet wire + // format. You should not use this for any other reason: It's less + // efficient, has fewer features, and is more complicated. + // + // The message must be defined exactly as follows: + // message Foo { + // option message_set_wire_format = true; + // extensions 4 to max; + // } + // Note that the message cannot have any defined fields; MessageSets only + // have extensions. + // + // All extensions of your type must be singular messages; e.g. they cannot + // be int32s, enums, or repeated messages. + // + // Because this is an option, the above two restrictions are not enforced by + // the protocol compiler. + optional bool message_set_wire_format = 1 [default=false]; + + // Disables the generation of the standard "descriptor()" accessor, which can + // conflict with a field of the same name. This is meant to make migration + // from proto1 easier; new code should avoid fields named "descriptor". + optional bool no_standard_descriptor_accessor = 2 [default=false]; + + // Is this message deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the message, or it will be completely ignored; in the very least, + // this is a formalization for deprecating messages. + optional bool deprecated = 3 [default=false]; + + // Whether the message is an automatically generated map entry type for the + // maps field. + // + // For maps fields: + // map map_field = 1; + // The parsed descriptor looks like: + // message MapFieldEntry { + // option map_entry = true; + // optional KeyType key = 1; + // optional ValueType value = 2; + // } + // repeated MapFieldEntry map_field = 1; + // + // Implementations may choose not to generate the map_entry=true message, but + // use a native map in the target language to hold the keys and values. + // The reflection APIs in such implementions still need to work as + // if the field is a repeated message field. + // + // NOTE: Do not set the option in .proto files. Always use the maps syntax + // instead. The option should only be implicitly set by the proto compiler + // parser. + optional bool map_entry = 7; + + reserved 8; // javalite_serializable + reserved 9; // javanano_as_lite + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message FieldOptions { + // The ctype option instructs the C++ code generator to use a different + // representation of the field than it normally would. See the specific + // options below. This option is not yet implemented in the open source + // release -- sorry, we'll try to include it in a future version! + optional CType ctype = 1 [default = STRING]; + enum CType { + // Default mode. + STRING = 0; + + CORD = 1; + + STRING_PIECE = 2; + } + // The packed option can be enabled for repeated primitive fields to enable + // a more efficient representation on the wire. Rather than repeatedly + // writing the tag and type for each element, the entire array is encoded as + // a single length-delimited blob. In proto3, only explicit setting it to + // false will avoid using packed encoding. + optional bool packed = 2; + + // The jstype option determines the JavaScript type used for values of the + // field. The option is permitted only for 64 bit integral and fixed types + // (int64, uint64, sint64, fixed64, sfixed64). By default these types are + // represented as JavaScript strings. This avoids loss of precision that can + // happen when a large value is converted to a floating point JavaScript + // numbers. Specifying JS_NUMBER for the jstype causes the generated + // JavaScript code to use the JavaScript "number" type instead of strings. + // This option is an enum to permit additional types to be added, + // e.g. goog.math.Integer. + optional JSType jstype = 6 [default = JS_NORMAL]; + enum JSType { + // Use the default type. + JS_NORMAL = 0; + + // Use JavaScript strings. + JS_STRING = 1; + + // Use JavaScript numbers. + JS_NUMBER = 2; + } + + // Should this field be parsed lazily? Lazy applies only to message-type + // fields. It means that when the outer message is initially parsed, the + // inner message's contents will not be parsed but instead stored in encoded + // form. The inner message will actually be parsed when it is first accessed. + // + // This is only a hint. Implementations are free to choose whether to use + // eager or lazy parsing regardless of the value of this option. However, + // setting this option true suggests that the protocol author believes that + // using lazy parsing on this field is worth the additional bookkeeping + // overhead typically needed to implement it. + // + // This option does not affect the public interface of any generated code; + // all method signatures remain the same. Furthermore, thread-safety of the + // interface is not affected by this option; const methods remain safe to + // call from multiple threads concurrently, while non-const methods continue + // to require exclusive access. + // + // + // Note that implementations may choose not to check required fields within + // a lazy sub-message. That is, calling IsInitialized() on the outer message + // may return true even if the inner message has missing required fields. + // This is necessary because otherwise the inner message would have to be + // parsed in order to perform the check, defeating the purpose of lazy + // parsing. An implementation which chooses not to check required fields + // must be consistent about it. That is, for any particular sub-message, the + // implementation must either *always* check its required fields, or *never* + // check its required fields, regardless of whether or not the message has + // been parsed. + optional bool lazy = 5 [default=false]; + + // Is this field deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for accessors, or it will be completely ignored; in the very least, this + // is a formalization for deprecating fields. + optional bool deprecated = 3 [default=false]; + + // For Google-internal migration only. Do not use. + optional bool weak = 10 [default=false]; + + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; + + reserved 4; // removed jtype +} + +message OneofOptions { + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumOptions { + + // Set this option to true to allow mapping different tag names to the same + // value. + optional bool allow_alias = 2; + + // Is this enum deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum, or it will be completely ignored; in the very least, this + // is a formalization for deprecating enums. + optional bool deprecated = 3 [default=false]; + + reserved 5; // javanano_as_lite + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumValueOptions { + // Is this enum value deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum value, or it will be completely ignored; in the very least, + // this is a formalization for deprecating enum values. + optional bool deprecated = 1 [default=false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message ServiceOptions { + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // Is this service deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the service, or it will be completely ignored; in the very least, + // this is a formalization for deprecating services. + optional bool deprecated = 33 [default=false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message MethodOptions { + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // Is this method deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the method, or it will be completely ignored; in the very least, + // this is a formalization for deprecating methods. + optional bool deprecated = 33 [default=false]; + + // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + // or neither? HTTP based RPC implementation may choose GET verb for safe + // methods, and PUT verb for idempotent methods instead of the default POST. + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0; + NO_SIDE_EFFECTS = 1; // implies idempotent + IDEMPOTENT = 2; // idempotent, but may have side effects + } + optional IdempotencyLevel idempotency_level = + 34 [default=IDEMPOTENCY_UNKNOWN]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + + +// A message representing a option the parser does not recognize. This only +// appears in options protos created by the compiler::Parser class. +// DescriptorPool resolves these when building Descriptor objects. Therefore, +// options protos in descriptor objects (e.g. returned by Descriptor::options(), +// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions +// in them. +message UninterpretedOption { + // The name of the uninterpreted option. Each string represents a segment in + // a dot-separated name. is_extension is true iff a segment represents an + // extension (denoted with parentheses in options specs in .proto files). + // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents + // "foo.(bar.baz).qux". + message NamePart { + required string name_part = 1; + required bool is_extension = 2; + } + repeated NamePart name = 2; + + // The value of the uninterpreted option, in whatever type the tokenizer + // identified it as during parsing. Exactly one of these should be set. + optional string identifier_value = 3; + optional uint64 positive_int_value = 4; + optional int64 negative_int_value = 5; + optional double double_value = 6; + optional bytes string_value = 7; + optional string aggregate_value = 8; +} + +// =================================================================== +// Optional source code info + +// Encapsulates information about the original source file from which a +// FileDescriptorProto was generated. +message SourceCodeInfo { + // A Location identifies a piece of source code in a .proto file which + // corresponds to a particular definition. This information is intended + // to be useful to IDEs, code indexers, documentation generators, and similar + // tools. + // + // For example, say we have a file like: + // message Foo { + // optional string foo = 1; + // } + // Let's look at just the field definition: + // optional string foo = 1; + // ^ ^^ ^^ ^ ^^^ + // a bc de f ghi + // We have the following locations: + // span path represents + // [a,i) [ 4, 0, 2, 0 ] The whole field definition. + // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + // + // Notes: + // - A location may refer to a repeated field itself (i.e. not to any + // particular index within it). This is used whenever a set of elements are + // logically enclosed in a single code segment. For example, an entire + // extend block (possibly containing multiple extension definitions) will + // have an outer location whose path refers to the "extensions" repeated + // field without an index. + // - Multiple locations may have the same path. This happens when a single + // logical declaration is spread out across multiple places. The most + // obvious example is the "extend" block again -- there may be multiple + // extend blocks in the same scope, each of which will have the same path. + // - A location's span is not always a subset of its parent's span. For + // example, the "extendee" of an extension declaration appears at the + // beginning of the "extend" block and is shared by all extensions within + // the block. + // - Just because a location's span is a subset of some other location's span + // does not mean that it is a descendent. For example, a "group" defines + // both a type and a field in a single declaration. Thus, the locations + // corresponding to the type and field and their components will overlap. + // - Code which tries to interpret locations should probably be designed to + // ignore those that it doesn't understand, as more types of locations could + // be recorded in the future. + repeated Location location = 1; + message Location { + // Identifies which part of the FileDescriptorProto was defined at this + // location. + // + // Each element is a field number or an index. They form a path from + // the root FileDescriptorProto to the place where the definition. For + // example, this path: + // [ 4, 3, 2, 7, 1 ] + // refers to: + // file.message_type(3) // 4, 3 + // .field(7) // 2, 7 + // .name() // 1 + // This is because FileDescriptorProto.message_type has field number 4: + // repeated DescriptorProto message_type = 4; + // and DescriptorProto.field has field number 2: + // repeated FieldDescriptorProto field = 2; + // and FieldDescriptorProto.name has field number 1: + // optional string name = 1; + // + // Thus, the above path gives the location of a field name. If we removed + // the last element: + // [ 4, 3, 2, 7 ] + // this path refers to the whole field declaration (from the beginning + // of the label to the terminating semicolon). + repeated int32 path = 1 [packed=true]; + + // Always has exactly three or four elements: start line, start column, + // end line (optional, otherwise assumed same as start line), end column. + // These are packed into a single field for efficiency. Note that line + // and column numbers are zero-based -- typically you will want to add + // 1 to each before displaying to a user. + repeated int32 span = 2 [packed=true]; + + // If this SourceCodeInfo represents a complete declaration, these are any + // comments appearing before and after the declaration which appear to be + // attached to the declaration. + // + // A series of line comments appearing on consecutive lines, with no other + // tokens appearing on those lines, will be treated as a single comment. + // + // leading_detached_comments will keep paragraphs of comments that appear + // before (but not connected to) the current element. Each paragraph, + // separated by empty lines, will be one comment element in the repeated + // field. + // + // Only the comment content is provided; comment markers (e.g. //) are + // stripped out. For block comments, leading whitespace and an asterisk + // will be stripped from the beginning of each line other than the first. + // Newlines are included in the output. + // + // Examples: + // + // optional int32 foo = 1; // Comment attached to foo. + // // Comment attached to bar. + // optional int32 bar = 2; + // + // optional string baz = 3; + // // Comment attached to baz. + // // Another line attached to baz. + // + // // Comment attached to qux. + // // + // // Another line attached to qux. + // optional double qux = 4; + // + // // Detached comment for corge. This is not leading or trailing comments + // // to qux or corge because there are blank lines separating it from + // // both. + // + // // Detached comment for corge paragraph 2. + // + // optional string corge = 5; + // /* Block comment attached + // * to corge. Leading asterisks + // * will be removed. */ + // /* Block comment attached to + // * grault. */ + // optional int32 grault = 6; + // + // // ignored detached comments. + optional string leading_comments = 3; + optional string trailing_comments = 4; + repeated string leading_detached_comments = 6; + } +} + +// Describes the relationship between generated code and its original source +// file. A GeneratedCodeInfo message is associated with only one generated +// source file, but may contain references to different source .proto files. +message GeneratedCodeInfo { + // An Annotation connects some span of text in generated code to an element + // of its generating .proto file. + repeated Annotation annotation = 1; + message Annotation { + // Identifies the element in the original source .proto file. This field + // is formatted the same as SourceCodeInfo.Location.path. + repeated int32 path = 1 [packed=true]; + + // Identifies the filesystem path to the original source .proto. + optional string source_file = 2; + + // Identifies the starting offset in bytes in the generated code + // that relates to the identified object. + optional int32 begin = 3; + + // Identifies the ending offset in bytes in the generated code that + // relates to the identified offset. The end offset should be one past + // the last relevant byte (so the length of the text = end - begin). + optional int32 end = 4; + } +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile index 4095623e0..bc0463d57 100644 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile @@ -34,6 +34,7 @@ # Also we need to fix an import. regenerate: @echo WARNING! THIS RULE IS PROBABLY NOT RIGHT FOR YOUR INSTALLATION + cp $(HOME)/src/protobuf/include/google/protobuf/compiler/plugin.proto . protoc --go_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor:../../../../.. \ -I$(HOME)/src/protobuf/include $(HOME)/src/protobuf/include/google/protobuf/compiler/plugin.proto diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.proto new file mode 100644 index 000000000..f04dc73c8 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.proto @@ -0,0 +1,166 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Author: kenton@google.com (Kenton Varda) +// +// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to +// change. +// +// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is +// just a program that reads a CodeGeneratorRequest from stdin and writes a +// CodeGeneratorResponse to stdout. +// +// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead +// of dealing with the raw protocol defined here. +// +// A plugin executable needs only to be placed somewhere in the path. The +// plugin should be named "protoc-gen-$NAME", and will then be used when the +// flag "--${NAME}_out" is passed to protoc. + +syntax = "proto2"; +package google.protobuf.compiler; +option java_package = "com.google.protobuf.compiler"; +option java_outer_classname = "PluginProtos"; + +option go_package = "github.com/golang/protobuf/protoc-gen-go/plugin;plugin_go"; + +import "google/protobuf/descriptor.proto"; + +// The version number of protocol compiler. +message Version { + optional int32 major = 1; + optional int32 minor = 2; + optional int32 patch = 3; + // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should + // be empty for mainline stable releases. + optional string suffix = 4; +} + +// An encoded CodeGeneratorRequest is written to the plugin's stdin. +message CodeGeneratorRequest { + // The .proto files that were explicitly listed on the command-line. The + // code generator should generate code only for these files. Each file's + // descriptor will be included in proto_file, below. + repeated string file_to_generate = 1; + + // The generator parameter passed on the command-line. + optional string parameter = 2; + + // FileDescriptorProtos for all files in files_to_generate and everything + // they import. The files will appear in topological order, so each file + // appears before any file that imports it. + // + // protoc guarantees that all proto_files will be written after + // the fields above, even though this is not technically guaranteed by the + // protobuf wire format. This theoretically could allow a plugin to stream + // in the FileDescriptorProtos and handle them one by one rather than read + // the entire set into memory at once. However, as of this writing, this + // is not similarly optimized on protoc's end -- it will store all fields in + // memory at once before sending them to the plugin. + // + // Type names of fields and extensions in the FileDescriptorProto are always + // fully qualified. + repeated FileDescriptorProto proto_file = 15; + + // The version number of protocol compiler. + optional Version compiler_version = 3; +} + +// The plugin writes an encoded CodeGeneratorResponse to stdout. +message CodeGeneratorResponse { + // Error message. If non-empty, code generation failed. The plugin process + // should exit with status code zero even if it reports an error in this way. + // + // This should be used to indicate errors in .proto files which prevent the + // code generator from generating correct code. Errors which indicate a + // problem in protoc itself -- such as the input CodeGeneratorRequest being + // unparseable -- should be reported by writing a message to stderr and + // exiting with a non-zero status code. + optional string error = 1; + + // Represents a single generated file. + message File { + // The file name, relative to the output directory. The name must not + // contain "." or ".." components and must be relative, not be absolute (so, + // the file cannot lie outside the output directory). "/" must be used as + // the path separator, not "\". + // + // If the name is omitted, the content will be appended to the previous + // file. This allows the generator to break large files into small chunks, + // and allows the generated text to be streamed back to protoc so that large + // files need not reside completely in memory at one time. Note that as of + // this writing protoc does not optimize for this -- it will read the entire + // CodeGeneratorResponse before writing files to disk. + optional string name = 1; + + // If non-empty, indicates that the named file should already exist, and the + // content here is to be inserted into that file at a defined insertion + // point. This feature allows a code generator to extend the output + // produced by another code generator. The original generator may provide + // insertion points by placing special annotations in the file that look + // like: + // @@protoc_insertion_point(NAME) + // The annotation can have arbitrary text before and after it on the line, + // which allows it to be placed in a comment. NAME should be replaced with + // an identifier naming the point -- this is what other generators will use + // as the insertion_point. Code inserted at this point will be placed + // immediately above the line containing the insertion point (thus multiple + // insertions to the same point will come out in the order they were added). + // The double-@ is intended to make it unlikely that the generated code + // could contain things that look like insertion points by accident. + // + // For example, the C++ code generator places the following line in the + // .pb.h files that it generates: + // // @@protoc_insertion_point(namespace_scope) + // This line appears within the scope of the file's package namespace, but + // outside of any particular class. Another plugin can then specify the + // insertion_point "namespace_scope" to generate additional classes or + // other declarations that should be placed in this scope. + // + // Note that if the line containing the insertion point begins with + // whitespace, the same whitespace will be added to every line of the + // inserted text. This is useful for languages like Python, where + // indentation matters. In these languages, the insertion point comment + // should be indented the same amount as any inserted code will need to be + // in order to work correctly in that context. + // + // The code generator that generates the initial file and the one which + // inserts into it must both run as part of a single invocation of protoc. + // Code generators are executed in the order in which they appear on the + // command line. + // + // If |insertion_point| is present, |name| must also be present. + optional string insertion_point = 2; + + // The file contents. + optional string content = 15; + } + repeated File file = 15; +} diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go index 1fbaa44ca..6c9a6cf74 100644 --- a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go @@ -1,11 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: github.com/golang/protobuf/ptypes/any/any.proto +// source: google/protobuf/any.proto /* Package any is a generated protocol buffer package. It is generated from these files: - github.com/golang/protobuf/ptypes/any/any.proto + google/protobuf/any.proto It has these top-level messages: Any @@ -149,20 +149,20 @@ func init() { proto.RegisterType((*Any)(nil), "google.protobuf.Any") } -func init() { proto.RegisterFile("github.com/golang/protobuf/ptypes/any/any.proto", fileDescriptor0) } +func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 184 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4f, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, - 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0xcc, - 0xab, 0x04, 0x61, 0x3d, 0xb0, 0xb8, 0x10, 0x7f, 0x7a, 0x7e, 0x7e, 0x7a, 0x4e, 0xaa, 0x1e, 0x4c, - 0x95, 0x92, 0x19, 0x17, 0xb3, 0x63, 0x5e, 0xa5, 0x90, 0x24, 0x17, 0x07, 0x48, 0x79, 0x7c, 0x69, - 0x51, 0x8e, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x3b, 0x88, 0x1f, 0x5a, 0x94, 0x23, 0x24, - 0xc2, 0xc5, 0x5a, 0x96, 0x98, 0x53, 0x9a, 0x2a, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x13, 0x04, 0xe1, - 0x38, 0xe5, 0x73, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, 0x19, 0xe7, 0xc4, 0xe1, 0x98, 0x57, 0x19, - 0x00, 0xe2, 0x04, 0x30, 0x46, 0xa9, 0x12, 0xe5, 0xb8, 0x45, 0x4c, 0xcc, 0xee, 0x01, 0x4e, 0xab, - 0x98, 0xe4, 0xdc, 0x21, 0x46, 0x05, 0x40, 0x95, 0xe8, 0x85, 0xa7, 0xe6, 0xe4, 0x78, 0xe7, 0xe5, - 0x97, 0xe7, 0x85, 0x80, 0x94, 0x26, 0xb1, 0x81, 0xf5, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, - 0x45, 0x1f, 0x1a, 0xf2, 0xf3, 0x00, 0x00, 0x00, + // 185 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0xd4, + 0x03, 0x73, 0x84, 0xf8, 0x21, 0x52, 0x7a, 0x30, 0x29, 0x25, 0x33, 0x2e, 0x66, 0xc7, 0xbc, 0x4a, + 0x21, 0x49, 0x2e, 0x8e, 0x92, 0xca, 0x82, 0xd4, 0xf8, 0xd2, 0xa2, 0x1c, 0x09, 0x46, 0x05, 0x46, + 0x0d, 0xce, 0x20, 0x76, 0x10, 0x3f, 0xb4, 0x28, 0x47, 0x48, 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7, + 0x34, 0x55, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 0x08, 0xc2, 0x71, 0xca, 0xe7, 0x12, 0x4e, 0xce, + 0xcf, 0xd5, 0x43, 0x33, 0xce, 0x89, 0xc3, 0x31, 0xaf, 0x32, 0x00, 0xc4, 0x09, 0x60, 0x8c, 0x52, + 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, + 0x4b, 0x47, 0xb8, 0xa8, 0x00, 0x64, 0x7a, 0x31, 0xc8, 0x61, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c, + 0x56, 0x31, 0xc9, 0xb9, 0x43, 0x8c, 0x0a, 0x80, 0x2a, 0xd1, 0x0b, 0x4f, 0xcd, 0xc9, 0xf1, 0xce, + 0xcb, 0x2f, 0xcf, 0x0b, 0x01, 0x29, 0x4d, 0x62, 0x03, 0xeb, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, + 0xff, 0x13, 0xf8, 0xe8, 0x42, 0xdd, 0x00, 0x00, 0x00, } diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go index fe3350bed..b2410a098 100644 --- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go @@ -1,11 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: github.com/golang/protobuf/ptypes/duration/duration.proto +// source: google/protobuf/duration.proto /* Package duration is a generated protocol buffer package. It is generated from these files: - github.com/golang/protobuf/ptypes/duration/duration.proto + google/protobuf/duration.proto It has these top-level messages: Duration @@ -125,22 +125,20 @@ func init() { proto.RegisterType((*Duration)(nil), "google.protobuf.Duration") } -func init() { - proto.RegisterFile("github.com/golang/protobuf/ptypes/duration/duration.proto", fileDescriptor0) -} +func init() { proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 189 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, - 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0x29, - 0x2d, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0x83, 0x33, 0xf4, 0xc0, 0x2a, 0x84, 0xf8, 0xd3, 0xf3, 0xf3, - 0xd3, 0x73, 0x52, 0xf5, 0x60, 0xea, 0x95, 0xac, 0xb8, 0x38, 0x5c, 0xa0, 0x4a, 0x84, 0x24, 0xb8, - 0xd8, 0x8b, 0x53, 0x93, 0xf3, 0xf3, 0x52, 0x8a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83, 0x60, - 0x5c, 0x21, 0x11, 0x2e, 0xd6, 0xbc, 0xc4, 0xbc, 0xfc, 0x62, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xd6, - 0x20, 0x08, 0xc7, 0xa9, 0x86, 0x4b, 0x38, 0x39, 0x3f, 0x57, 0x0f, 0xcd, 0x48, 0x27, 0x5e, 0x98, - 0x81, 0x01, 0x20, 0x91, 0x00, 0xc6, 0x28, 0x2d, 0xe2, 0xdd, 0xfb, 0x83, 0x91, 0x71, 0x11, 0x13, - 0xb3, 0x7b, 0x80, 0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, 0xb9, 0x01, 0x50, 0xa5, 0x7a, 0xe1, 0xa9, - 0x39, 0x39, 0xde, 0x79, 0xf9, 0xe5, 0x79, 0x21, 0x20, 0x2d, 0x49, 0x6c, 0x60, 0x33, 0x8c, 0x01, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x45, 0x5a, 0x81, 0x3d, 0x0e, 0x01, 0x00, 0x00, + // 190 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0x29, 0x2d, 0x4a, + 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0x56, + 0x5c, 0x1c, 0x2e, 0x50, 0x25, 0x42, 0x12, 0x5c, 0xec, 0xc5, 0xa9, 0xc9, 0xf9, 0x79, 0x29, 0xc5, + 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x30, 0xae, 0x90, 0x08, 0x17, 0x6b, 0x5e, 0x62, 0x5e, + 0x7e, 0xb1, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x84, 0xe3, 0x54, 0xc3, 0x25, 0x9c, 0x9c, + 0x9f, 0xab, 0x87, 0x66, 0xa4, 0x13, 0x2f, 0xcc, 0xc0, 0x00, 0x90, 0x48, 0x00, 0x63, 0x94, 0x56, + 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x7a, 0x7e, 0x4e, 0x62, 0x5e, + 0x3a, 0xc2, 0x7d, 0x05, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x70, 0x67, 0xfe, 0x60, 0x64, 0x5c, 0xc4, + 0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0x62, 0x6e, 0x00, 0x54, 0xa9, 0x5e, 0x78, + 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x4b, 0x12, 0x1b, 0xd8, 0x0c, 0x63, + 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x84, 0x30, 0xff, 0xf3, 0x00, 0x00, 0x00, } diff --git a/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go b/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go index ae1594144..e877b72c3 100644 --- a/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go @@ -1,11 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: github.com/golang/protobuf/ptypes/empty/empty.proto +// source: google/protobuf/empty.proto /* Package empty is a generated protocol buffer package. It is generated from these files: - github.com/golang/protobuf/ptypes/empty/empty.proto + google/protobuf/empty.proto It has these top-level messages: Empty @@ -49,20 +49,18 @@ func init() { proto.RegisterType((*Empty)(nil), "google.protobuf.Empty") } -func init() { - proto.RegisterFile("github.com/golang/protobuf/ptypes/empty/empty.proto", fileDescriptor0) -} +func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 147 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4e, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, - 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0xcd, - 0x2d, 0x28, 0xa9, 0x84, 0x90, 0x7a, 0x60, 0x39, 0x21, 0xfe, 0xf4, 0xfc, 0xfc, 0xf4, 0x9c, 0x54, - 0x3d, 0x98, 0x4a, 0x25, 0x76, 0x2e, 0x56, 0x57, 0x90, 0xbc, 0x53, 0x19, 0x97, 0x70, 0x72, 0x7e, - 0xae, 0x1e, 0x9a, 0xbc, 0x13, 0x17, 0x58, 0x36, 0x00, 0xc4, 0x0d, 0x60, 0x8c, 0x52, 0x27, 0xd2, - 0xce, 0x1f, 0x8c, 0x8c, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c, 0x56, 0x31, 0xc9, 0xb9, 0x43, 0x4c, - 0x0c, 0x80, 0xaa, 0xd3, 0x0b, 0x4f, 0xcd, 0xc9, 0xf1, 0xce, 0xcb, 0x2f, 0xcf, 0x0b, 0x01, 0xa9, - 0x4f, 0x62, 0x03, 0x1b, 0x60, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x8e, 0x0a, 0x06, 0xcf, - 0x00, 0x00, 0x00, + // 148 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28, + 0xa9, 0xd4, 0x03, 0x73, 0x85, 0xf8, 0x21, 0x92, 0x7a, 0x30, 0x49, 0x25, 0x76, 0x2e, 0x56, 0x57, + 0x90, 0xbc, 0x53, 0x19, 0x97, 0x70, 0x72, 0x7e, 0xae, 0x1e, 0x9a, 0xbc, 0x13, 0x17, 0x58, 0x36, + 0x00, 0xc4, 0x0d, 0x60, 0x8c, 0x52, 0x4f, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, + 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0x47, 0x58, 0x53, 0x50, 0x52, 0x59, 0x90, 0x5a, 0x0c, + 0xb1, 0xed, 0x07, 0x23, 0xe3, 0x22, 0x26, 0x66, 0xf7, 0x00, 0xa7, 0x55, 0x4c, 0x72, 0xee, 0x10, + 0x13, 0x03, 0xa0, 0xea, 0xf4, 0xc2, 0x53, 0x73, 0x72, 0xbc, 0xf3, 0xf2, 0xcb, 0xf3, 0x42, 0x40, + 0xea, 0x93, 0xd8, 0xc0, 0x06, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x64, 0xd4, 0xb3, 0xa6, + 0xb7, 0x00, 0x00, 0x00, } diff --git a/vendor/github.com/golang/protobuf/ptypes/regen.sh b/vendor/github.com/golang/protobuf/ptypes/regen.sh index 2a5b4e8bd..b50a9414a 100755 --- a/vendor/github.com/golang/protobuf/ptypes/regen.sh +++ b/vendor/github.com/golang/protobuf/ptypes/regen.sh @@ -8,14 +8,7 @@ PKG=github.com/golang/protobuf/ptypes UPSTREAM=https://github.com/google/protobuf UPSTREAM_SUBDIR=src/google/protobuf -PROTO_FILES=' - any.proto - duration.proto - empty.proto - struct.proto - timestamp.proto - wrappers.proto -' +PROTO_FILES=(any duration empty struct timestamp wrappers) function die() { echo 1>&2 $* @@ -36,31 +29,15 @@ pkgdir=$(go list -f '{{.Dir}}' $PKG) echo 1>&2 $pkgdir base=$(echo $pkgdir | sed "s,/$PKG\$,,") echo 1>&2 "base: $base" -cd $base +cd "$base" echo 1>&2 "fetching latest protos... " git clone -q $UPSTREAM $tmpdir -# Pass 1: build mapping from upstream filename to our filename. -declare -A filename_map -for f in $(cd $PKG && find * -name '*.proto'); do - echo -n 1>&2 "looking for latest version of $f... " - up=$(cd $tmpdir/$UPSTREAM_SUBDIR && find * -name $(basename $f) | grep -v /testdata/) - echo 1>&2 $up - if [ $(echo $up | wc -w) != "1" ]; then - die "not exactly one match" - fi - filename_map[$up]=$f -done -# Pass 2: copy files -for up in "${!filename_map[@]}"; do - f=${filename_map[$up]} - shortname=$(basename $f | sed 's,\.proto$,,') - cp $tmpdir/$UPSTREAM_SUBDIR/$up $PKG/$f + +for file in ${PROTO_FILES[@]}; do + echo 1>&2 "* $file" + protoc --go_out=. -I$tmpdir/src $tmpdir/src/google/protobuf/$file.proto || die + cp $tmpdir/src/google/protobuf/$file.proto $PKG/$file done -# Run protoc once per package. -for dir in $(find $PKG -name '*.proto' | xargs dirname | sort | uniq); do - echo 1>&2 "* $dir" - protoc --go_out=. $dir/*.proto -done echo 1>&2 "All OK" diff --git a/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go b/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go index 35a8ec599..4cfe60818 100644 --- a/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go @@ -1,11 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: github.com/golang/protobuf/ptypes/struct/struct.proto +// source: google/protobuf/struct.proto /* Package structpb is a generated protocol buffer package. It is generated from these files: - github.com/golang/protobuf/ptypes/struct/struct.proto + google/protobuf/struct.proto It has these top-level messages: Struct @@ -346,37 +346,35 @@ func init() { proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value) } -func init() { - proto.RegisterFile("github.com/golang/protobuf/ptypes/struct/struct.proto", fileDescriptor0) -} +func init() { proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ // 417 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x8b, 0xd3, 0x40, - 0x14, 0x80, 0x3b, 0xc9, 0x36, 0x98, 0x17, 0x59, 0x97, 0x11, 0xb4, 0xac, 0xa0, 0xa1, 0x7b, 0x09, - 0x22, 0x09, 0x56, 0x04, 0x31, 0x5e, 0x0c, 0xac, 0xbb, 0x60, 0x58, 0x62, 0x74, 0x57, 0xf0, 0x52, - 0x9a, 0x34, 0x8d, 0xa1, 0xd3, 0x99, 0x90, 0xcc, 0x28, 0x3d, 0xfa, 0x2f, 0x3c, 0x7b, 0xf4, 0xe8, - 0xaf, 0xf3, 0x28, 0x33, 0x93, 0x44, 0x69, 0x29, 0x78, 0x9a, 0xbe, 0x37, 0xdf, 0xfb, 0xe6, 0xbd, - 0xd7, 0xc0, 0xf3, 0xb2, 0xe2, 0x9f, 0x45, 0xe6, 0xe7, 0x6c, 0x13, 0x94, 0x8c, 0x2c, 0x68, 0x19, - 0xd4, 0x0d, 0xe3, 0x2c, 0x13, 0xab, 0xa0, 0xe6, 0xdb, 0xba, 0x68, 0x83, 0x96, 0x37, 0x22, 0xe7, - 0xdd, 0xe1, 0xab, 0x5b, 0x7c, 0xa7, 0x64, 0xac, 0x24, 0x85, 0xdf, 0xb3, 0xd3, 0xef, 0x08, 0xac, - 0xf7, 0x8a, 0xc0, 0x21, 0x58, 0xab, 0xaa, 0x20, 0xcb, 0x76, 0x82, 0x5c, 0xd3, 0x73, 0x66, 0x67, - 0xfe, 0x0e, 0xec, 0x6b, 0xd0, 0x7f, 0xa3, 0xa8, 0x73, 0xca, 0x9b, 0x6d, 0xda, 0x95, 0x9c, 0xbe, - 0x03, 0xe7, 0x9f, 0x34, 0x3e, 0x01, 0x73, 0x5d, 0x6c, 0x27, 0xc8, 0x45, 0x9e, 0x9d, 0xca, 0x9f, - 0xf8, 0x09, 0x8c, 0xbf, 0x2c, 0x88, 0x28, 0x26, 0x86, 0x8b, 0x3c, 0x67, 0x76, 0x6f, 0x4f, 0x7e, - 0x23, 0x6f, 0x53, 0x0d, 0xbd, 0x34, 0x5e, 0xa0, 0xe9, 0x2f, 0x03, 0xc6, 0x2a, 0x89, 0x43, 0x00, - 0x2a, 0x08, 0x99, 0x6b, 0x81, 0x94, 0x1e, 0xcf, 0x4e, 0xf7, 0x04, 0x57, 0x82, 0x10, 0xc5, 0x5f, - 0x8e, 0x52, 0x9b, 0xf6, 0x01, 0x3e, 0x83, 0xdb, 0x54, 0x6c, 0xb2, 0xa2, 0x99, 0xff, 0x7d, 0x1f, - 0x5d, 0x8e, 0x52, 0x47, 0x67, 0x07, 0xa8, 0xe5, 0x4d, 0x45, 0xcb, 0x0e, 0x32, 0x65, 0xe3, 0x12, - 0xd2, 0x59, 0x0d, 0x3d, 0x02, 0xc8, 0x18, 0xeb, 0xdb, 0x38, 0x72, 0x91, 0x77, 0x4b, 0x3e, 0x25, - 0x73, 0x1a, 0x78, 0xa5, 0x2c, 0x22, 0xe7, 0x1d, 0x32, 0x56, 0xa3, 0xde, 0x3f, 0xb0, 0xc7, 0x4e, - 0x2f, 0x72, 0x3e, 0x4c, 0x49, 0xaa, 0xb6, 0xaf, 0xb5, 0x54, 0xed, 0xfe, 0x94, 0x71, 0xd5, 0xf2, - 0x61, 0x4a, 0xd2, 0x07, 0x91, 0x05, 0x47, 0xeb, 0x8a, 0x2e, 0xa7, 0x21, 0xd8, 0x03, 0x81, 0x7d, - 0xb0, 0x94, 0xac, 0xff, 0x47, 0x0f, 0x2d, 0xbd, 0xa3, 0x1e, 0x3f, 0x00, 0x7b, 0x58, 0x22, 0x3e, - 0x06, 0xb8, 0xba, 0x8e, 0xe3, 0xf9, 0xcd, 0xeb, 0xf8, 0xfa, 0xfc, 0x64, 0x14, 0x7d, 0x43, 0x70, - 0x37, 0x67, 0x9b, 0x5d, 0x45, 0xe4, 0xe8, 0x69, 0x12, 0x19, 0x27, 0xe8, 0xd3, 0xd3, 0xff, 0xfd, - 0x30, 0x43, 0x7d, 0xd4, 0xd9, 0x6f, 0x84, 0x7e, 0x18, 0xe6, 0x45, 0x12, 0xfd, 0x34, 0x1e, 0x5e, - 0x68, 0x79, 0xd2, 0xf7, 0xf7, 0xb1, 0x20, 0xe4, 0x2d, 0x65, 0x5f, 0xe9, 0x07, 0x59, 0x99, 0x59, - 0x4a, 0xf5, 0xec, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9b, 0x6e, 0x5d, 0x3c, 0xfe, 0x02, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x8b, 0xd3, 0x40, + 0x14, 0xc7, 0x3b, 0xc9, 0x36, 0x98, 0x17, 0x59, 0x97, 0x11, 0xb4, 0xac, 0xa2, 0xa1, 0x7b, 0x09, + 0x22, 0x29, 0xd6, 0x8b, 0x18, 0x2f, 0x06, 0xd6, 0x5d, 0x30, 0x2c, 0x31, 0xba, 0x15, 0xbc, 0x94, + 0x26, 0x4d, 0x63, 0xe8, 0x74, 0x26, 0x24, 0x33, 0x4a, 0x8f, 0x7e, 0x0b, 0xcf, 0x1e, 0x3d, 0xfa, + 0xe9, 0x3c, 0xca, 0xcc, 0x24, 0xa9, 0xb4, 0xf4, 0x94, 0xbc, 0xf7, 0x7e, 0xef, 0x3f, 0xef, 0xff, + 0x66, 0xe0, 0x71, 0xc1, 0x58, 0x41, 0xf2, 0x49, 0x55, 0x33, 0xce, 0x52, 0xb1, 0x9a, 0x34, 0xbc, + 0x16, 0x19, 0xf7, 0x55, 0x8c, 0xef, 0xe9, 0xaa, 0xdf, 0x55, 0xc7, 0x3f, 0x11, 0x58, 0x1f, 0x15, + 0x81, 0x03, 0xb0, 0x56, 0x65, 0x4e, 0x96, 0xcd, 0x08, 0xb9, 0xa6, 0xe7, 0x4c, 0x2f, 0xfc, 0x3d, + 0xd8, 0xd7, 0xa0, 0xff, 0x4e, 0x51, 0x97, 0x94, 0xd7, 0xdb, 0xa4, 0x6d, 0x39, 0xff, 0x00, 0xce, + 0x7f, 0x69, 0x7c, 0x06, 0xe6, 0x3a, 0xdf, 0x8e, 0x90, 0x8b, 0x3c, 0x3b, 0x91, 0xbf, 0xf8, 0x39, + 0x0c, 0xbf, 0x2d, 0x88, 0xc8, 0x47, 0x86, 0x8b, 0x3c, 0x67, 0xfa, 0xe0, 0x40, 0x7c, 0x26, 0xab, + 0x89, 0x86, 0x5e, 0x1b, 0xaf, 0xd0, 0xf8, 0x8f, 0x01, 0x43, 0x95, 0xc4, 0x01, 0x00, 0x15, 0x84, + 0xcc, 0xb5, 0x80, 0x14, 0x3d, 0x9d, 0x9e, 0x1f, 0x08, 0xdc, 0x08, 0x42, 0x14, 0x7f, 0x3d, 0x48, + 0x6c, 0xda, 0x05, 0xf8, 0x02, 0xee, 0x52, 0xb1, 0x49, 0xf3, 0x7a, 0xbe, 0x3b, 0x1f, 0x5d, 0x0f, + 0x12, 0x47, 0x67, 0x7b, 0xa8, 0xe1, 0x75, 0x49, 0x8b, 0x16, 0x32, 0xe5, 0xe0, 0x12, 0xd2, 0x59, + 0x0d, 0x3d, 0x05, 0x48, 0x19, 0xeb, 0xc6, 0x38, 0x71, 0x91, 0x77, 0x47, 0x1e, 0x25, 0x73, 0x1a, + 0x78, 0xa3, 0x54, 0x44, 0xc6, 0x5b, 0x64, 0xa8, 0xac, 0x3e, 0x3c, 0xb2, 0xc7, 0x56, 0x5e, 0x64, + 0xbc, 0x77, 0x49, 0xca, 0xa6, 0xeb, 0xb5, 0x54, 0xef, 0xa1, 0xcb, 0xa8, 0x6c, 0x78, 0xef, 0x92, + 0x74, 0x41, 0x68, 0xc1, 0xc9, 0xba, 0xa4, 0xcb, 0x71, 0x00, 0x76, 0x4f, 0x60, 0x1f, 0x2c, 0x25, + 0xd6, 0xdd, 0xe8, 0xb1, 0xa5, 0xb7, 0xd4, 0xb3, 0x47, 0x60, 0xf7, 0x4b, 0xc4, 0xa7, 0x00, 0x37, + 0xb7, 0x51, 0x34, 0x9f, 0xbd, 0x8d, 0x6e, 0x2f, 0xcf, 0x06, 0xe1, 0x0f, 0x04, 0xf7, 0x33, 0xb6, + 0xd9, 0x97, 0x08, 0x1d, 0xed, 0x26, 0x96, 0x71, 0x8c, 0xbe, 0xbc, 0x28, 0x4a, 0xfe, 0x55, 0xa4, + 0x7e, 0xc6, 0x36, 0x93, 0x82, 0x91, 0x05, 0x2d, 0x76, 0x4f, 0xb1, 0xe2, 0xdb, 0x2a, 0x6f, 0xda, + 0x17, 0x19, 0xe8, 0x4f, 0x95, 0xfe, 0x45, 0xe8, 0x97, 0x61, 0x5e, 0xc5, 0xe1, 0x6f, 0xe3, 0xc9, + 0x95, 0x16, 0x8f, 0xbb, 0xf9, 0x3e, 0xe7, 0x84, 0xbc, 0xa7, 0xec, 0x3b, 0xfd, 0x24, 0x3b, 0x53, + 0x4b, 0x49, 0xbd, 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x1b, 0x59, 0xf8, 0xe5, 0x02, 0x00, 0x00, } diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go index 3b76261ec..e23e4a25d 100644 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go @@ -1,11 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: github.com/golang/protobuf/ptypes/timestamp/timestamp.proto +// source: google/protobuf/timestamp.proto /* Package timestamp is a generated protocol buffer package. It is generated from these files: - github.com/golang/protobuf/ptypes/timestamp/timestamp.proto + google/protobuf/timestamp.proto It has these top-level messages: Timestamp @@ -141,22 +141,20 @@ func init() { proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp") } -func init() { - proto.RegisterFile("github.com/golang/protobuf/ptypes/timestamp/timestamp.proto", fileDescriptor0) -} +func init() { proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 190 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, - 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0xc9, - 0xcc, 0x4d, 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0x40, 0xb0, 0xf4, 0xc0, 0x6a, 0x84, 0xf8, 0xd3, 0xf3, - 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0x60, 0x3a, 0x94, 0xac, 0xb9, 0x38, 0x43, 0x60, 0x6a, 0x84, 0x24, - 0xb8, 0xd8, 0x8b, 0x53, 0x93, 0xf3, 0xf3, 0x52, 0x8a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83, - 0x60, 0x5c, 0x21, 0x11, 0x2e, 0xd6, 0xbc, 0xc4, 0xbc, 0xfc, 0x62, 0x09, 0x26, 0x05, 0x46, 0x0d, - 0xd6, 0x20, 0x08, 0xc7, 0xa9, 0x8e, 0x4b, 0x38, 0x39, 0x3f, 0x57, 0x0f, 0xcd, 0x4c, 0x27, 0x3e, - 0xb8, 0x89, 0x01, 0x20, 0xa1, 0x00, 0xc6, 0x28, 0x6d, 0x12, 0xdc, 0xfc, 0x83, 0x91, 0x71, 0x11, - 0x13, 0xb3, 0x7b, 0x80, 0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, 0xc9, 0x01, 0x50, 0xb5, 0x7a, 0xe1, - 0xa9, 0x39, 0x39, 0xde, 0x79, 0xf9, 0xe5, 0x79, 0x21, 0x20, 0x3d, 0x49, 0x6c, 0x60, 0x43, 0x8c, - 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x59, 0x0a, 0x4d, 0x13, 0x01, 0x00, 0x00, + // 191 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xc9, 0xcc, 0x4d, + 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0xd0, 0x03, 0x0b, 0x09, 0xf1, 0x43, 0x14, 0xe8, 0xc1, 0x14, 0x28, + 0x59, 0x73, 0x71, 0x86, 0xc0, 0xd4, 0x08, 0x49, 0x70, 0xb1, 0x17, 0xa7, 0x26, 0xe7, 0xe7, 0xa5, + 0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0xc1, 0xb8, 0x42, 0x22, 0x5c, 0xac, 0x79, 0x89, + 0x79, 0xf9, 0xc5, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xac, 0x41, 0x10, 0x8e, 0x53, 0x1d, 0x97, 0x70, + 0x72, 0x7e, 0xae, 0x1e, 0x9a, 0x99, 0x4e, 0x7c, 0x70, 0x13, 0x03, 0x40, 0x42, 0x01, 0x8c, 0x51, + 0xda, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0x39, 0x89, + 0x79, 0xe9, 0x08, 0x27, 0x16, 0x94, 0x54, 0x16, 0xa4, 0x16, 0x23, 0x5c, 0xfa, 0x83, 0x91, 0x71, + 0x11, 0x13, 0xb3, 0x7b, 0x80, 0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, 0xc9, 0x01, 0x50, 0xb5, 0x7a, + 0xe1, 0xa9, 0x39, 0x39, 0xde, 0x79, 0xf9, 0xe5, 0x79, 0x21, 0x20, 0x3d, 0x49, 0x6c, 0x60, 0x43, + 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x77, 0x4a, 0x07, 0xf7, 0x00, 0x00, 0x00, } diff --git a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go index 1328bd296..0ed59bf19 100644 --- a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go @@ -1,11 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: github.com/golang/protobuf/ptypes/wrappers/wrappers.proto +// source: google/protobuf/wrappers.proto /* Package wrappers is a generated protocol buffer package. It is generated from these files: - github.com/golang/protobuf/ptypes/wrappers/wrappers.proto + google/protobuf/wrappers.proto It has these top-level messages: DoubleValue @@ -236,27 +236,25 @@ func init() { proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue") } -func init() { - proto.RegisterFile("github.com/golang/protobuf/ptypes/wrappers/wrappers.proto", fileDescriptor0) -} +func init() { proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 257 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, - 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x2f, - 0x4a, 0x2c, 0x28, 0x48, 0x2d, 0x42, 0x30, 0xf4, 0xc0, 0x2a, 0x84, 0xf8, 0xd3, 0xf3, 0xf3, 0xd3, - 0x73, 0x52, 0xf5, 0x60, 0xea, 0x95, 0x94, 0xb9, 0xb8, 0x5d, 0xf2, 0x4b, 0x93, 0x72, 0x52, 0xc3, - 0x12, 0x73, 0x4a, 0x53, 0x85, 0x44, 0xb8, 0x58, 0xcb, 0x40, 0x0c, 0x09, 0x46, 0x05, 0x46, 0x0d, - 0xc6, 0x20, 0x08, 0x47, 0x49, 0x89, 0x8b, 0xcb, 0x2d, 0x27, 0x3f, 0xb1, 0x04, 0x8b, 0x1a, 0x26, - 0x24, 0x35, 0x9e, 0x79, 0x25, 0x66, 0x26, 0x58, 0xd4, 0x30, 0xc3, 0xd4, 0x28, 0x73, 0x71, 0x87, - 0xe2, 0x52, 0xc4, 0x82, 0x6a, 0x90, 0xb1, 0x11, 0x16, 0x35, 0xac, 0x68, 0x06, 0x61, 0x55, 0xc4, - 0x0b, 0x53, 0xa4, 0xc8, 0xc5, 0xe9, 0x94, 0x9f, 0x9f, 0x83, 0x45, 0x09, 0x07, 0x92, 0x39, 0xc1, - 0x25, 0x45, 0x99, 0x79, 0xe9, 0x58, 0x14, 0x71, 0x22, 0x39, 0xc8, 0xa9, 0xb2, 0x24, 0xb5, 0x18, - 0x8b, 0x1a, 0x1e, 0xa8, 0x1a, 0xa7, 0x1a, 0x2e, 0xe1, 0xe4, 0xfc, 0x5c, 0x3d, 0xb4, 0xd0, 0x75, - 0xe2, 0x0d, 0x87, 0x06, 0x7f, 0x00, 0x48, 0x24, 0x80, 0x31, 0x4a, 0x8b, 0xf8, 0xa8, 0xfb, 0xc1, - 0xc8, 0xb8, 0x88, 0x89, 0xd9, 0x3d, 0xc0, 0x69, 0x15, 0x93, 0x9c, 0x3b, 0xc4, 0xdc, 0x00, 0xa8, - 0x52, 0xbd, 0xf0, 0xd4, 0x9c, 0x1c, 0xef, 0xbc, 0xfc, 0xf2, 0xbc, 0x10, 0x90, 0x96, 0x24, 0x36, - 0xb0, 0x19, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xee, 0x36, 0x8d, 0xd8, 0x19, 0x02, 0x00, - 0x00, + // 259 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x2f, 0x4a, 0x2c, + 0x28, 0x48, 0x2d, 0x2a, 0xd6, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0xca, + 0x5c, 0xdc, 0x2e, 0xf9, 0xa5, 0x49, 0x39, 0xa9, 0x61, 0x89, 0x39, 0xa5, 0xa9, 0x42, 0x22, 0x5c, + 0xac, 0x65, 0x20, 0x86, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x63, 0x10, 0x84, 0xa3, 0xa4, 0xc4, 0xc5, + 0xe5, 0x96, 0x93, 0x9f, 0x58, 0x82, 0x45, 0x0d, 0x13, 0x92, 0x1a, 0xcf, 0xbc, 0x12, 0x33, 0x13, + 0x2c, 0x6a, 0x98, 0x61, 0x6a, 0x94, 0xb9, 0xb8, 0x43, 0x71, 0x29, 0x62, 0x41, 0x35, 0xc8, 0xd8, + 0x08, 0x8b, 0x1a, 0x56, 0x34, 0x83, 0xb0, 0x2a, 0xe2, 0x85, 0x29, 0x52, 0xe4, 0xe2, 0x74, 0xca, + 0xcf, 0xcf, 0xc1, 0xa2, 0x84, 0x03, 0xc9, 0x9c, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0x74, 0x2c, 0x8a, + 0x38, 0x91, 0x1c, 0xe4, 0x54, 0x59, 0x92, 0x5a, 0x8c, 0x45, 0x0d, 0x0f, 0x54, 0x8d, 0x53, 0x0d, + 0x97, 0x70, 0x72, 0x7e, 0xae, 0x1e, 0x5a, 0xe8, 0x3a, 0xf1, 0x86, 0x43, 0x83, 0x3f, 0x00, 0x24, + 0x12, 0xc0, 0x18, 0xa5, 0x95, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, + 0x9e, 0x9f, 0x93, 0x98, 0x97, 0x8e, 0x88, 0xaa, 0x82, 0x92, 0xca, 0x82, 0xd4, 0x62, 0x78, 0x8c, + 0xfd, 0x60, 0x64, 0x5c, 0xc4, 0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0x62, 0x6e, + 0x00, 0x54, 0xa9, 0x5e, 0x78, 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x4b, + 0x12, 0x1b, 0xd8, 0x0c, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x19, 0x6c, 0xb9, 0xb8, 0xfe, + 0x01, 0x00, 0x00, } diff --git a/vendor/github.com/kurin/blazer/base/base.go b/vendor/github.com/kurin/blazer/base/base.go index 90f997235..9db0e7ea2 100644 --- a/vendor/github.com/kurin/blazer/base/base.go +++ b/vendor/github.com/kurin/blazer/base/base.go @@ -83,6 +83,12 @@ func Action(err error) ErrAction { return AttemptNewUpload } return ReAuthenticate + case 400: + // See restic/restic#1207 + if e.method == "b2_upload_file" && strings.HasPrefix(e.msg, "more than one upload using auth token") { + return AttemptNewUpload + } + return Punt case 408: return AttemptNewUpload case 429, 500, 503: diff --git a/vendor/github.com/kurin/blazer/base/integration_test.go b/vendor/github.com/kurin/blazer/base/integration_test.go index 6a79710ca..7d6980079 100644 --- a/vendor/github.com/kurin/blazer/base/integration_test.go +++ b/vendor/github.com/kurin/blazer/base/integration_test.go @@ -20,13 +20,15 @@ import ( "encoding/json" "fmt" "io" + "net" + "net/http" "os" "reflect" "strings" "testing" "time" - "golang.org/x/net/context" + "context" ) const ( @@ -268,6 +270,121 @@ func TestStorage(t *testing.T) { } } +// This slow motion train wreck of a type exists to axe a net connection after +// N bytes have been written. Because of the specific bug it's built to test, +// it can't just *close* the connection, so it just sleeps forever. +type wonkyNetConn struct { + net.Conn + ctx context.Context // implode once cancelled + die *bool // only implode once + n int // bytes to allow before imploding, roughly + i int // bytes written +} + +func (w *wonkyNetConn) Write(b []byte) (int, error) { + if w.i > w.n && w.ctx.Err() != nil && *w.die { + *w.die = false + select {} + } + n, err := w.Conn.Write(b) + w.i += n + return n, err +} + +func newWonkyNetConn(ctx context.Context, die *bool, n int, netw, addr string) (net.Conn, error) { + conn, err := net.Dial(netw, addr) + if err != nil { + return nil, err + } + return &wonkyNetConn{ + Conn: conn, + ctx: ctx, + n: n, + die: die, + }, nil +} + +func makeBadDialContext(ctx context.Context) func(context.Context, string, string) (net.Conn, error) { + die := true + return func(noCtx context.Context, network, addr string) (net.Conn, error) { + return newWonkyNetConn(ctx, &die, 10000, network, addr) + } +} + +func TestBadUpload(t *testing.T) { + id := os.Getenv(apiID) + key := os.Getenv(apiKey) + if id == "" || key == "" { + t.Skipf("B2_ACCOUNT_ID or B2_SECRET_KEY unset; skipping integration tests") + } + ctx := context.Background() + + octx, ocancel := context.WithCancel(ctx) + defer ocancel() + + badTransport := &http.Transport{ + Proxy: http.ProxyFromEnvironment, + DialContext: makeBadDialContext(octx), + MaxIdleConns: 100, + IdleConnTimeout: 90 * time.Second, + TLSHandshakeTimeout: 10 * time.Second, + ExpectContinueTimeout: 1 * time.Second, + } + + b2, err := AuthorizeAccount(ctx, id, key, Transport(badTransport)) + if err != nil { + t.Fatal(err) + } + bname := id + "-" + bucketName + bucket, err := b2.CreateBucket(ctx, bname, "", nil, nil) + if err != nil { + t.Fatal(err) + } + defer func() { + if err := bucket.DeleteBucket(ctx); err != nil { + t.Error(err) + } + }() + ue, err := bucket.GetUploadURL(ctx) + if err != nil { + t.Fatal(err) + } + + smallFile := io.LimitReader(zReader{}, 1024*50) // 50k + hash := sha1.New() + buf := &bytes.Buffer{} + w := io.MultiWriter(hash, buf) + if _, err := io.Copy(w, smallFile); err != nil { + t.Error(err) + } + smallSHA1 := fmt.Sprintf("%x", hash.Sum(nil)) + ocancel() + go func() { + ue.UploadFile(ctx, buf, buf.Len(), smallFileName, "application/octet-stream", smallSHA1, nil) + t.Fatal("this ought not to be reachable") + }() + + time.Sleep(time.Second) // give this a chance to hang + + // Do the whole thing again with the same upload auth, before the remote end + // notices we're gone. + smallFile = io.LimitReader(zReader{}, 1024*50) // 50k again + buf.Reset() + if _, err := io.Copy(buf, smallFile); err != nil { + t.Error(err) + } + file, err := ue.UploadFile(ctx, buf, buf.Len(), smallFileName, "application/octet-stream", smallSHA1, nil) + if err == nil { + t.Error("expected an error, got none") + if err := file.DeleteFileVersion(ctx); err != nil { + t.Error(err) + } + } + if Action(err) != AttemptNewUpload { + t.Error("Action(%v): got %v, want AttemptNewUpload", err, Action(err)) + } +} + func compareFileAndInfo(t *testing.T, info *FileInfo, name, sha1 string, imap map[string]string) { if info.Name != name { t.Errorf("got %q, want %q", info.Name, name) diff --git a/vendor/github.com/kurin/blazer/internal/blog/blog.go b/vendor/github.com/kurin/blazer/internal/blog/blog.go index ebd4ad358..6ffe5cbf0 100644 --- a/vendor/github.com/kurin/blazer/internal/blog/blog.go +++ b/vendor/github.com/kurin/blazer/internal/blog/blog.go @@ -13,7 +13,7 @@ // limitations under the License. // Package blog implements a private logger, in the manner of glog, without -// poluting the flag namespace or leaving files all over /tmp. +// polluting the flag namespace or leaving files all over /tmp. // // It has almost no features, and a bunch of global state. package blog diff --git a/vendor/github.com/minio/minio-go/.travis.yml b/vendor/github.com/minio/minio-go/.travis.yml index 066cbe883..3d260fa61 100644 --- a/vendor/github.com/minio/minio-go/.travis.yml +++ b/vendor/github.com/minio/minio-go/.travis.yml @@ -16,5 +16,11 @@ go: script: - diff -au <(gofmt -d .) <(printf "") +- go get -u github.com/cheggaaa/pb/... +- go get -u github.com/sirupsen/logrus/... +- go get -u github.com/dustin/go-humanize/... - go vet ./... -- go test -short -race -v ./... +- SERVER_ENDPOINT=play.minio.io:9000 ACCESS_KEY=Q3AM3UQ867SPQQA43P2F SECRET_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG ENABLE_HTTPS=1 go test -race -v ./... +- SERVER_ENDPOINT=play.minio.io:9000 ACCESS_KEY=Q3AM3UQ867SPQQA43P2F SECRET_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG ENABLE_HTTPS=1 go run functional_tests.go +- mkdir /tmp/examples \ + && for i in $(echo examples/s3/*); do go build -o /tmp/examples/$(basename ${i:0:-3}) ${i}; done diff --git a/vendor/github.com/minio/minio-go/MAINTAINERS.md b/vendor/github.com/minio/minio-go/MAINTAINERS.md index 6dbef6265..e2a957137 100644 --- a/vendor/github.com/minio/minio-go/MAINTAINERS.md +++ b/vendor/github.com/minio/minio-go/MAINTAINERS.md @@ -5,7 +5,6 @@ Please go through this link [Maintainer Responsibility](https://gist.github.com/abperiasamy/f4d9b31d3186bbd26522) ### Making new releases - Edit `libraryVersion` constant in `api.go`. ``` @@ -13,7 +12,23 @@ $ grep libraryVersion api.go libraryVersion = "0.3.0" ``` +Commit your changes ``` -$ git tag 0.3.0 +$ git commit -a -m "Bump to new release 0.3.0" --author "Minio Trusted " +``` + +Tag and sign your release commit, additionally this step requires you to have access to Minio's trusted private key. +``` +$ export GNUPGHOME=/path/to/trusted/key +$ git tag -s 0.3.0 +$ git push $ git push --tags -``` \ No newline at end of file +``` + +### Announce +Announce new release by adding release notes at https://github.com/minio/minio-go/releases from `trusted@minio.io` account. Release notes requires two sections `highlights` and `changelog`. Highlights is a bulleted list of salient features in this release and Changelog contains list of all commits since the last release. + +To generate `changelog` +```sh +git log --no-color --pretty=format:'-%d %s (%cr) <%an>' .. +``` diff --git a/vendor/github.com/minio/minio-go/README.md b/vendor/github.com/minio/minio-go/README.md index 4a91dc9c8..5eb6656d5 100644 --- a/vendor/github.com/minio/minio-go/README.md +++ b/vendor/github.com/minio/minio-go/README.md @@ -54,7 +54,7 @@ func main() { log.Fatalln(err) } - log.Println("%v", minioClient) // minioClient is now setup + log.Printf("%#v\n", minioClient) // minioClient is now setup ``` ## Quick Start Example - File Uploader @@ -130,7 +130,6 @@ The full API Reference is available here. * [Complete API Reference](https://docs.minio.io/docs/golang-client-api-reference) ### API Reference : Bucket Operations - * [`MakeBucket`](https://docs.minio.io/docs/golang-client-api-reference#MakeBucket) * [`ListBuckets`](https://docs.minio.io/docs/golang-client-api-reference#ListBuckets) * [`BucketExists`](https://docs.minio.io/docs/golang-client-api-reference#BucketExists) @@ -140,25 +139,21 @@ The full API Reference is available here. * [`ListIncompleteUploads`](https://docs.minio.io/docs/golang-client-api-reference#ListIncompleteUploads) ### API Reference : Bucket policy Operations - * [`SetBucketPolicy`](https://docs.minio.io/docs/golang-client-api-reference#SetBucketPolicy) * [`GetBucketPolicy`](https://docs.minio.io/docs/golang-client-api-reference#GetBucketPolicy) * [`ListBucketPolicies`](https://docs.minio.io/docs/golang-client-api-reference#ListBucketPolicies) ### API Reference : Bucket notification Operations - * [`SetBucketNotification`](https://docs.minio.io/docs/golang-client-api-reference#SetBucketNotification) * [`GetBucketNotification`](https://docs.minio.io/docs/golang-client-api-reference#GetBucketNotification) * [`RemoveAllBucketNotification`](https://docs.minio.io/docs/golang-client-api-reference#RemoveAllBucketNotification) * [`ListenBucketNotification`](https://docs.minio.io/docs/golang-client-api-reference#ListenBucketNotification) (Minio Extension) ### API Reference : File Object Operations - * [`FPutObject`](https://docs.minio.io/docs/golang-client-api-reference#FPutObject) * [`FGetObject`](https://docs.minio.io/docs/golang-client-api-reference#FPutObject) ### API Reference : Object Operations - * [`GetObject`](https://docs.minio.io/docs/golang-client-api-reference#GetObject) * [`PutObject`](https://docs.minio.io/docs/golang-client-api-reference#PutObject) * [`PutObjectStreaming`](https://docs.minio.io/docs/golang-client-api-reference#PutObjectStreaming) @@ -169,14 +164,13 @@ The full API Reference is available here. * [`RemoveIncompleteUpload`](https://docs.minio.io/docs/golang-client-api-reference#RemoveIncompleteUpload) ### API Reference: Encrypted Object Operations - * [`GetEncryptedObject`](https://docs.minio.io/docs/golang-client-api-reference#GetEncryptedObject) * [`PutEncryptedObject`](https://docs.minio.io/docs/golang-client-api-reference#PutEncryptedObject) ### API Reference : Presigned Operations - * [`PresignedGetObject`](https://docs.minio.io/docs/golang-client-api-reference#PresignedGetObject) * [`PresignedPutObject`](https://docs.minio.io/docs/golang-client-api-reference#PresignedPutObject) +* [`PresignedHeadObject`](https://docs.minio.io/docs/golang-client-api-reference#PresignedHeadObject) * [`PresignedPostPolicy`](https://docs.minio.io/docs/golang-client-api-reference#PresignedPostPolicy) ### API Reference : Client custom settings @@ -185,11 +179,9 @@ The full API Reference is available here. * [`TraceOn`](http://docs.minio.io/docs/golang-client-api-reference#TraceOn) * [`TraceOff`](http://docs.minio.io/docs/golang-client-api-reference#TraceOff) - ## Full Examples -#### Full Examples : Bucket Operations - +### Full Examples : Bucket Operations * [makebucket.go](https://github.com/minio/minio-go/blob/master/examples/s3/makebucket.go) * [listbuckets.go](https://github.com/minio/minio-go/blob/master/examples/s3/listbuckets.go) * [bucketexists.go](https://github.com/minio/minio-go/blob/master/examples/s3/bucketexists.go) @@ -198,26 +190,22 @@ The full API Reference is available here. * [listobjectsV2.go](https://github.com/minio/minio-go/blob/master/examples/s3/listobjectsV2.go) * [listincompleteuploads.go](https://github.com/minio/minio-go/blob/master/examples/s3/listincompleteuploads.go) -#### Full Examples : Bucket policy Operations - +### Full Examples : Bucket policy Operations * [setbucketpolicy.go](https://github.com/minio/minio-go/blob/master/examples/s3/setbucketpolicy.go) * [getbucketpolicy.go](https://github.com/minio/minio-go/blob/master/examples/s3/getbucketpolicy.go) * [listbucketpolicies.go](https://github.com/minio/minio-go/blob/master/examples/s3/listbucketpolicies.go) -#### Full Examples : Bucket notification Operations - +### Full Examples : Bucket notification Operations * [setbucketnotification.go](https://github.com/minio/minio-go/blob/master/examples/s3/setbucketnotification.go) * [getbucketnotification.go](https://github.com/minio/minio-go/blob/master/examples/s3/getbucketnotification.go) * [removeallbucketnotification.go](https://github.com/minio/minio-go/blob/master/examples/s3/removeallbucketnotification.go) * [listenbucketnotification.go](https://github.com/minio/minio-go/blob/master/examples/minio/listenbucketnotification.go) (Minio Extension) -#### Full Examples : File Object Operations - +### Full Examples : File Object Operations * [fputobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/fputobject.go) * [fgetobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/fgetobject.go) -#### Full Examples : Object Operations - +### Full Examples : Object Operations * [putobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/putobject.go) * [getobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/getobject.go) * [statobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/statobject.go) @@ -226,14 +214,14 @@ The full API Reference is available here. * [removeincompleteupload.go](https://github.com/minio/minio-go/blob/master/examples/s3/removeincompleteupload.go) * [removeobjects.go](https://github.com/minio/minio-go/blob/master/examples/s3/removeobjects.go) -#### Full Examples : Encrypted Object Operations - +### Full Examples : Encrypted Object Operations * [put-encrypted-object.go](https://github.com/minio/minio-go/blob/master/examples/s3/put-encrypted-object.go) * [get-encrypted-object.go](https://github.com/minio/minio-go/blob/master/examples/s3/get-encrypted-object.go) -#### Full Examples : Presigned Operations +### Full Examples : Presigned Operations * [presignedgetobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/presignedgetobject.go) * [presignedputobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/presignedputobject.go) +* [presignedheadobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/presignedheadobject.go) * [presignedpostpolicy.go](https://github.com/minio/minio-go/blob/master/examples/s3/presignedpostpolicy.go) ## Explore Further @@ -242,7 +230,6 @@ The full API Reference is available here. * [Go Music Player App Full Application Example](https://docs.minio.io/docs/go-music-player-app) ## Contribute - [Contributors Guide](https://github.com/minio/minio-go/blob/master/CONTRIBUTING.md) [![Build Status](https://travis-ci.org/minio/minio-go.svg)](https://travis-ci.org/minio/minio-go) diff --git a/vendor/github.com/minio/minio-go/api-compose-object.go b/vendor/github.com/minio/minio-go/api-compose-object.go index 6baf09e84..4fa88b818 100644 --- a/vendor/github.com/minio/minio-go/api-compose-object.go +++ b/vendor/github.com/minio/minio-go/api-compose-object.go @@ -309,7 +309,7 @@ func (c Client) uploadPartCopy(bucket, object, uploadID string, partNumber int, // server-side copying operations. func (c Client) ComposeObject(dst DestinationInfo, srcs []SourceInfo) error { if len(srcs) < 1 || len(srcs) > maxPartsCount { - return ErrInvalidArgument("There must be as least one and upto 10000 source objects.") + return ErrInvalidArgument("There must be as least one and up to 10000 source objects.") } srcSizes := make([]int64, len(srcs)) diff --git a/vendor/github.com/minio/minio-go/api-get-object.go b/vendor/github.com/minio/minio-go/api-get-object.go index 1078d2f98..9bd784ffa 100644 --- a/vendor/github.com/minio/minio-go/api-get-object.go +++ b/vendor/github.com/minio/minio-go/api-get-object.go @@ -679,12 +679,18 @@ func (c Client) getObject(bucketName, objectName string, reqHeaders RequestHeade if contentType == "" { contentType = "application/octet-stream" } - var objectStat ObjectInfo - objectStat.ETag = md5sum - objectStat.Key = objectName - objectStat.Size = resp.ContentLength - objectStat.LastModified = date - objectStat.ContentType = contentType + + objectStat := ObjectInfo{ + ETag: md5sum, + Key: objectName, + Size: resp.ContentLength, + LastModified: date, + ContentType: contentType, + // Extract only the relevant header keys describing the object. + // following function filters out a list of standard set of keys + // which are not part of object metadata. + Metadata: extractObjMetadata(resp.Header), + } // do not close body here, caller will close return resp.Body, objectStat, nil diff --git a/vendor/github.com/minio/minio-go/api-presigned.go b/vendor/github.com/minio/minio-go/api-presigned.go index 8cfcb55fb..c645828df 100644 --- a/vendor/github.com/minio/minio-go/api-presigned.go +++ b/vendor/github.com/minio/minio-go/api-presigned.go @@ -84,19 +84,35 @@ func (c Client) presignURL(method string, bucketName string, objectName string, } // PresignedGetObject - Returns a presigned URL to access an object -// without credentials. Expires maximum is 7days - ie. 604800 and -// minimum is 1. Additionally you can override a set of response -// headers using the query parameters. +// data without credentials. URL can have a maximum expiry of +// upto 7days or a minimum of 1sec. Additionally you can override +// a set of response headers using the query parameters. func (c Client) PresignedGetObject(bucketName string, objectName string, expires time.Duration, reqParams url.Values) (u *url.URL, err error) { return c.presignURL("GET", bucketName, objectName, expires, reqParams) } -// PresignedPutObject - Returns a presigned URL to upload an object without credentials. -// Expires maximum is 7days - ie. 604800 and minimum is 1. +// PresignedHeadObject - Returns a presigned URL to access object +// metadata without credentials. URL can have a maximum expiry of +// upto 7days or a minimum of 1sec. Additionally you can override +// a set of response headers using the query parameters. +func (c Client) PresignedHeadObject(bucketName string, objectName string, expires time.Duration, reqParams url.Values) (u *url.URL, err error) { + return c.presignURL("HEAD", bucketName, objectName, expires, reqParams) +} + +// PresignedPutObject - Returns a presigned URL to upload an object +// without credentials. URL can have a maximum expiry of upto 7days +// or a minimum of 1sec. func (c Client) PresignedPutObject(bucketName string, objectName string, expires time.Duration) (u *url.URL, err error) { return c.presignURL("PUT", bucketName, objectName, expires, nil) } +// Presign - returns a presigned URL for any http method of your choice +// along with custom request params. URL can have a maximum expiry of +// upto 7days or a minimum of 1sec. +func (c Client) Presign(method string, bucketName string, objectName string, expires time.Duration, reqParams url.Values) (u *url.URL, err error) { + return c.presignURL(method, bucketName, objectName, expires, reqParams) +} + // PresignedPostPolicy - Returns POST urlString, form data to upload an object. func (c Client) PresignedPostPolicy(p *PostPolicy) (u *url.URL, formData map[string]string, err error) { // Validate input arguments. diff --git a/vendor/github.com/minio/minio-go/api-put-object-common.go b/vendor/github.com/minio/minio-go/api-put-object-common.go index 833f1fe8f..0158bc1d8 100644 --- a/vendor/github.com/minio/minio-go/api-put-object-common.go +++ b/vendor/github.com/minio/minio-go/api-put-object-common.go @@ -17,7 +17,6 @@ package minio import ( - "hash" "io" "math" "os" @@ -76,28 +75,6 @@ func optimalPartInfo(objectSize int64) (totalPartsCount int, partSize int64, las return totalPartsCount, partSize, lastPartSize, nil } -// hashCopyN - Calculates chosen hashes up to partSize amount of bytes. -func hashCopyN(hashAlgorithms map[string]hash.Hash, hashSums map[string][]byte, writer io.Writer, reader io.Reader, partSize int64) (size int64, err error) { - hashWriter := writer - for _, v := range hashAlgorithms { - hashWriter = io.MultiWriter(hashWriter, v) - } - - // Copies to input at writer. - size, err = io.CopyN(hashWriter, reader, partSize) - if err != nil { - // If not EOF return error right here. - if err != io.EOF { - return 0, err - } - } - - for k, v := range hashAlgorithms { - hashSums[k] = v.Sum(nil) - } - return size, err -} - // getUploadID - fetch upload id if already present for an object name // or initiate a new request to fetch a new upload id. func (c Client) newUploadID(bucketName, objectName string, metaData map[string][]string) (uploadID string, err error) { diff --git a/vendor/github.com/minio/minio-go/api-put-object-encrypted.go b/vendor/github.com/minio/minio-go/api-put-object-encrypted.go index 141b3e91c..534a21ecf 100644 --- a/vendor/github.com/minio/minio-go/api-put-object-encrypted.go +++ b/vendor/github.com/minio/minio-go/api-put-object-encrypted.go @@ -42,5 +42,5 @@ func (c Client) PutEncryptedObject(bucketName, objectName string, reader io.Read metadata[amzHeaderKey] = []string{encryptMaterials.GetKey()} metadata[amzHeaderMatDesc] = []string{encryptMaterials.GetDesc()} - return c.putObjectMultipart(bucketName, objectName, encryptMaterials, -1, metadata, progress) + return c.putObjectMultipartStreamNoLength(bucketName, objectName, encryptMaterials, metadata, progress) } diff --git a/vendor/github.com/minio/minio-go/api-put-object-multipart.go b/vendor/github.com/minio/minio-go/api-put-object-multipart.go index 1938378f8..aefeb5f26 100644 --- a/vendor/github.com/minio/minio-go/api-put-object-multipart.go +++ b/vendor/github.com/minio/minio-go/api-put-object-multipart.go @@ -24,6 +24,7 @@ import ( "io/ioutil" "net/http" "net/url" + "runtime/debug" "sort" "strconv" "strings" @@ -33,7 +34,7 @@ import ( func (c Client) putObjectMultipart(bucketName, objectName string, reader io.Reader, size int64, metadata map[string][]string, progress io.Reader) (n int64, err error) { - n, err = c.putObjectMultipartNoStream(bucketName, objectName, reader, size, metadata, progress) + n, err = c.putObjectMultipartNoStream(bucketName, objectName, reader, metadata, progress) if err != nil { errResp := ToErrorResponse(err) // Verify if multipart functionality is not available, if not @@ -50,8 +51,7 @@ func (c Client) putObjectMultipart(bucketName, objectName string, reader io.Read return n, err } -func (c Client) putObjectMultipartNoStream(bucketName, objectName string, reader io.Reader, size int64, - metadata map[string][]string, progress io.Reader) (n int64, err error) { +func (c Client) putObjectMultipartNoStream(bucketName, objectName string, reader io.Reader, metadata map[string][]string, progress io.Reader) (n int64, err error) { // Input validation. if err = s3utils.CheckValidBucketName(bucketName); err != nil { return 0, err @@ -68,7 +68,7 @@ func (c Client) putObjectMultipartNoStream(bucketName, objectName string, reader var complMultipartUpload completeMultipartUpload // Calculate the optimal parts info for a given size. - totalPartsCount, partSize, _, err := optimalPartInfo(size) + totalPartsCount, partSize, _, err := optimalPartInfo(-1) if err != nil { return 0, err } @@ -88,65 +88,61 @@ func (c Client) putObjectMultipartNoStream(bucketName, objectName string, reader // Part number always starts with '1'. partNumber := 1 - // Initialize a temporary buffer. - tmpBuffer := new(bytes.Buffer) - // Initialize parts uploaded map. partsInfo := make(map[int]ObjectPart) + // Create a buffer. + buf := make([]byte, partSize) + defer debug.FreeOSMemory() + for partNumber <= totalPartsCount { // Choose hash algorithms to be calculated by hashCopyN, // avoid sha256 with non-v4 signature request or // HTTPS connection. hashAlgos, hashSums := c.hashMaterials() - // Calculates hash sums while copying partSize bytes into tmpBuffer. - prtSize, rErr := hashCopyN(hashAlgos, hashSums, tmpBuffer, reader, partSize) - if rErr != nil && rErr != io.EOF { + length, rErr := io.ReadFull(reader, buf) + if rErr == io.EOF { + break + } + if rErr != nil && rErr != io.ErrUnexpectedEOF { return 0, rErr } - var reader io.Reader + // Calculates hash sums while copying partSize bytes into cw. + for k, v := range hashAlgos { + v.Write(buf[:length]) + hashSums[k] = v.Sum(nil) + } + // Update progress reader appropriately to the latest offset // as we read from the source. - reader = newHook(tmpBuffer, progress) + rd := newHook(bytes.NewReader(buf[:length]), progress) // Proceed to upload the part. var objPart ObjectPart - objPart, err = c.uploadPart(bucketName, objectName, uploadID, reader, partNumber, - hashSums["md5"], hashSums["sha256"], prtSize, metadata) + objPart, err = c.uploadPart(bucketName, objectName, uploadID, rd, partNumber, + hashSums["md5"], hashSums["sha256"], int64(length), metadata) if err != nil { - // Reset the temporary buffer upon any error. - tmpBuffer.Reset() return totalUploadedSize, err } // Save successfully uploaded part metadata. partsInfo[partNumber] = objPart - // Reset the temporary buffer. - tmpBuffer.Reset() - // Save successfully uploaded size. - totalUploadedSize += prtSize + totalUploadedSize += int64(length) // Increment part number. partNumber++ // For unknown size, Read EOF we break away. // We do not have to upload till totalPartsCount. - if size < 0 && rErr == io.EOF { + if rErr == io.EOF { break } } - // Verify if we uploaded all the data. - if size > 0 { - if totalUploadedSize != size { - return totalUploadedSize, ErrUnexpectedEOF(totalUploadedSize, size, bucketName, objectName) - } - } - // Loop over total uploaded parts to save them in // Parts array before completing the multipart request. for i := 1; i < partNumber; i++ { diff --git a/vendor/github.com/minio/minio-go/api-put-object-streaming.go b/vendor/github.com/minio/minio-go/api-put-object-streaming.go index 0d4639e83..40cd5c252 100644 --- a/vendor/github.com/minio/minio-go/api-put-object-streaming.go +++ b/vendor/github.com/minio/minio-go/api-put-object-streaming.go @@ -153,7 +153,7 @@ func (c Client) putObjectMultipartStreamFromReadAt(bucketName, objectName string // Receive each part number from the channel allowing three parallel uploads. for w := 1; w <= totalWorkers; w++ { - go func() { + go func(partSize int64) { // Each worker will draw from the part channel and upload in parallel. for uploadReq := range uploadPartsCh { @@ -197,7 +197,7 @@ func (c Client) putObjectMultipartStreamFromReadAt(bucketName, objectName string Error: nil, } } - }() + }(partSize) } // Gather the responses as they occur and update any diff --git a/vendor/github.com/minio/minio-go/api-put-object.go b/vendor/github.com/minio/minio-go/api-put-object.go index 2ea498789..94db82593 100644 --- a/vendor/github.com/minio/minio-go/api-put-object.go +++ b/vendor/github.com/minio/minio-go/api-put-object.go @@ -17,13 +17,16 @@ package minio import ( + "bytes" + "fmt" "io" "os" "reflect" "runtime" + "runtime/debug" + "sort" "strings" - "github.com/minio/minio-go/pkg/credentials" "github.com/minio/minio-go/pkg/s3utils" ) @@ -178,6 +181,7 @@ func (c Client) PutObjectWithProgress(bucketName, objectName string, reader io.R if err != nil { return 0, err } + return c.putObjectCommon(bucketName, objectName, reader, size, metadata, progress) } @@ -194,21 +198,16 @@ func (c Client) putObjectCommon(bucketName, objectName string, reader io.Reader, } if c.overrideSignerType.IsV2() { - if size > 0 && size < minPartSize { + if size >= 0 && size < minPartSize { return c.putObjectNoChecksum(bucketName, objectName, reader, size, metadata, progress) } return c.putObjectMultipart(bucketName, objectName, reader, size, metadata, progress) } - // If size cannot be found on a stream, it is not possible - // to upload using streaming signature, fall back to multipart. if size < 0 { - return c.putObjectMultipart(bucketName, objectName, reader, size, metadata, progress) + return c.putObjectMultipartStreamNoLength(bucketName, objectName, reader, metadata, progress) } - // Set streaming signature. - c.overrideSignerType = credentials.SignatureV4Streaming - if size < minPartSize { return c.putObjectNoChecksum(bucketName, objectName, reader, size, metadata, progress) } @@ -216,3 +215,108 @@ func (c Client) putObjectCommon(bucketName, objectName string, reader io.Reader, // For all sizes greater than 64MiB do multipart. return c.putObjectMultipartStream(bucketName, objectName, reader, size, metadata, progress) } + +func (c Client) putObjectMultipartStreamNoLength(bucketName, objectName string, reader io.Reader, metadata map[string][]string, + progress io.Reader) (n int64, err error) { + // Input validation. + if err = s3utils.CheckValidBucketName(bucketName); err != nil { + return 0, err + } + if err = s3utils.CheckValidObjectName(objectName); err != nil { + return 0, err + } + + // Total data read and written to server. should be equal to + // 'size' at the end of the call. + var totalUploadedSize int64 + + // Complete multipart upload. + var complMultipartUpload completeMultipartUpload + + // Calculate the optimal parts info for a given size. + totalPartsCount, partSize, _, err := optimalPartInfo(-1) + if err != nil { + return 0, err + } + + // Initiate a new multipart upload. + uploadID, err := c.newUploadID(bucketName, objectName, metadata) + if err != nil { + return 0, err + } + + defer func() { + if err != nil { + c.abortMultipartUpload(bucketName, objectName, uploadID) + } + }() + + // Part number always starts with '1'. + partNumber := 1 + + // Initialize parts uploaded map. + partsInfo := make(map[int]ObjectPart) + + // Create a buffer. + buf := make([]byte, partSize) + defer debug.FreeOSMemory() + + for partNumber <= totalPartsCount { + length, rErr := io.ReadFull(reader, buf) + if rErr == io.EOF { + break + } + if rErr != nil && rErr != io.ErrUnexpectedEOF { + return 0, rErr + } + + // Update progress reader appropriately to the latest offset + // as we read from the source. + rd := newHook(bytes.NewReader(buf[:length]), progress) + + // Proceed to upload the part. + var objPart ObjectPart + objPart, err = c.uploadPart(bucketName, objectName, uploadID, rd, partNumber, + nil, nil, int64(length), metadata) + if err != nil { + return totalUploadedSize, err + } + + // Save successfully uploaded part metadata. + partsInfo[partNumber] = objPart + + // Save successfully uploaded size. + totalUploadedSize += int64(length) + + // Increment part number. + partNumber++ + + // For unknown size, Read EOF we break away. + // We do not have to upload till totalPartsCount. + if rErr == io.EOF { + break + } + } + + // Loop over total uploaded parts to save them in + // Parts array before completing the multipart request. + for i := 1; i < partNumber; i++ { + part, ok := partsInfo[i] + if !ok { + return 0, ErrInvalidArgument(fmt.Sprintf("Missing part number %d", i)) + } + complMultipartUpload.Parts = append(complMultipartUpload.Parts, CompletePart{ + ETag: part.ETag, + PartNumber: part.PartNumber, + }) + } + + // Sort all completed parts. + sort.Sort(completedParts(complMultipartUpload.Parts)) + if _, err = c.completeMultipartUpload(bucketName, objectName, uploadID, complMultipartUpload); err != nil { + return totalUploadedSize, err + } + + // Return final size. + return totalUploadedSize, nil +} diff --git a/vendor/github.com/minio/minio-go/api-stat.go b/vendor/github.com/minio/minio-go/api-stat.go index 4b530327b..5f06bfc9e 100644 --- a/vendor/github.com/minio/minio-go/api-stat.go +++ b/vendor/github.com/minio/minio-go/api-stat.go @@ -167,11 +167,6 @@ func (c Client) statObject(bucketName, objectName string, reqHeaders RequestHead contentType = "application/octet-stream" } - // Extract only the relevant header keys describing the object. - // following function filters out a list of standard set of keys - // which are not part of object metadata. - metadata := extractObjMetadata(resp.Header) - // Save object metadata info. return ObjectInfo{ ETag: md5sum, @@ -179,6 +174,9 @@ func (c Client) statObject(bucketName, objectName string, reqHeaders RequestHead Size: size, LastModified: date, ContentType: contentType, - Metadata: metadata, + // Extract only the relevant header keys describing the object. + // following function filters out a list of standard set of keys + // which are not part of object metadata. + Metadata: extractObjMetadata(resp.Header), }, nil } diff --git a/vendor/github.com/minio/minio-go/api.go b/vendor/github.com/minio/minio-go/api.go index 6fe508aa1..946a58869 100644 --- a/vendor/github.com/minio/minio-go/api.go +++ b/vendor/github.com/minio/minio-go/api.go @@ -87,7 +87,7 @@ type Client struct { // Global constants. const ( libraryName = "minio-go" - libraryVersion = "3.0.0" + libraryVersion = "3.0.3" ) // User Agent should always following the below style. @@ -190,6 +190,31 @@ func redirectHeaders(req *http.Request, via []*http.Request) error { return nil } +// getRegionFromURL - parse region from URL if present. +func getRegionFromURL(u url.URL) (region string) { + region = "" + if s3utils.IsGoogleEndpoint(u) { + return + } else if s3utils.IsAmazonChinaEndpoint(u) { + // For china specifically we need to set everything to + // cn-north-1 for now, there is no easier way until AWS S3 + // provides a cleaner compatible API across "us-east-1" and + // China region. + return "cn-north-1" + } else if s3utils.IsAmazonGovCloudEndpoint(u) { + // For us-gov specifically we need to set everything to + // us-gov-west-1 for now, there is no easier way until AWS S3 + // provides a cleaner compatible API across "us-east-1" and + // Gov cloud region. + return "us-gov-west-1" + } + parts := s3utils.AmazonS3Host.FindStringSubmatch(u.Host) + if len(parts) > 1 { + region = parts[1] + } + return region +} + func privateNew(endpoint string, creds *credentials.Credentials, secure bool, region string) (*Client, error) { // construct endpoint. endpointURL, err := getEndpointURL(endpoint, secure) @@ -211,11 +236,14 @@ func privateNew(endpoint string, creds *credentials.Credentials, secure bool, re // Instantiate http client and bucket location cache. clnt.httpClient = &http.Client{ - Transport: http.DefaultTransport, + Transport: defaultMinioTransport, CheckRedirect: redirectHeaders, } // Sets custom region, if region is empty bucket location cache is used automatically. + if region == "" { + region = getRegionFromURL(clnt.endpointURL) + } clnt.region = region // Instantiate bucket location cache. @@ -494,7 +522,7 @@ func (c Client) executeMethod(method string, metadata requestMetadata) (res *htt // Blank indentifier is kept here on purpose since 'range' without // blank identifiers is only supported since go1.4 // https://golang.org/doc/go1.4#forrange. - for _ = range c.newRetryTimer(MaxRetry, DefaultRetryUnit, DefaultRetryCap, MaxJitter, doneCh) { + for range c.newRetryTimer(MaxRetry, DefaultRetryUnit, DefaultRetryCap, MaxJitter, doneCh) { // Retry executes the following function body if request has an // error until maxRetries have been exhausted, retry attempts are // performed after waiting for a given period of time in a @@ -562,9 +590,14 @@ func (c Client) executeMethod(method string, metadata requestMetadata) (res *htt // Additionally we should only retry if bucketLocation and custom // region is empty. if metadata.bucketLocation == "" && c.region == "" { - if res.StatusCode == http.StatusBadRequest && errResponse.Region != "" { - c.bucketLocCache.Set(metadata.bucketName, errResponse.Region) - continue // Retry. + if errResponse.Code == "AuthorizationHeaderMalformed" || errResponse.Code == "InvalidRegion" { + if metadata.bucketName != "" && errResponse.Region != "" { + // Gather Cached location only if bucketName is present. + if _, cachedLocationError := c.bucketLocCache.Get(metadata.bucketName); cachedLocationError != false { + c.bucketLocCache.Set(metadata.bucketName, errResponse.Region) + continue // Retry. + } + } } } @@ -700,7 +733,10 @@ func (c Client) newRequest(method string, metadata requestMetadata) (req *http.R case signerType.IsV2(): // Add signature version '2' authorization header. req = s3signer.SignV2(*req, accessKeyID, secretAccessKey) - case signerType.IsStreamingV4() && method == "PUT": + case metadata.objectName != "" && method == "PUT" && metadata.customHeader.Get("X-Amz-Copy-Source") == "" && !c.secure: + // Streaming signature is used by default for a PUT object request. Additionally we also + // look if the initialized client is secure, if yes then we don't need to perform + // streaming signature. req = s3signer.StreamingSignV4(req, accessKeyID, secretAccessKey, sessionToken, location, metadata.contentLength, time.Now().UTC()) default: diff --git a/vendor/github.com/minio/minio-go/api_functional_v2_test.go b/vendor/github.com/minio/minio-go/api_functional_v2_test.go deleted file mode 100644 index e81596ecf..000000000 --- a/vendor/github.com/minio/minio-go/api_functional_v2_test.go +++ /dev/null @@ -1,1470 +0,0 @@ -/* - * Minio Go Library for Amazon S3 Compatible Cloud Storage (C) 2015 Minio, Inc. - * - * 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. - */ - -package minio - -import ( - "bytes" - "errors" - "io" - "io/ioutil" - "log" - "math/rand" - "net/http" - "net/url" - "os" - "reflect" - "strings" - "testing" - "time" - - "github.com/minio/minio-go/pkg/policy" -) - -// Tests bucket re-create errors. -func TestMakeBucketErrorV2(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for short runs") - } - if os.Getenv(serverEndpoint) != "s3.amazonaws.com" { - t.Skip("skipping region functional tests for non s3 runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := NewV2( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket in 'eu-west-1'. - if err = c.MakeBucket(bucketName, "eu-west-1"); err != nil { - t.Fatal("Error:", err, bucketName) - } - if err = c.MakeBucket(bucketName, "eu-west-1"); err == nil { - t.Fatal("Error: make bucket should should fail for", bucketName) - } - // Verify valid error response from server. - if ToErrorResponse(err).Code != "BucketAlreadyExists" && - ToErrorResponse(err).Code != "BucketAlreadyOwnedByYou" { - t.Fatal("Error: Invalid error returned by server", err) - } - if err = c.RemoveBucket(bucketName); err != nil { - t.Fatal("Error:", err, bucketName) - } -} - -// Test get object reader to not throw error on being closed twice. -func TestGetObjectClosedTwiceV2(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := NewV2( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Generate data more than 32K. - buf := bytes.Repeat([]byte("h"), rand.Intn(1<<20)+32*1024) - - // Save the data - objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") - n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - if n != int64(len(buf)) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), n) - } - - // Read the data back - r, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - st, err := r.Stat() - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - if st.Size != int64(len(buf)) { - t.Fatalf("Error: number of bytes in stat does not match, want %v, got %v\n", - len(buf), st.Size) - } - if err := r.Close(); err != nil { - t.Fatal("Error:", err) - } - if err := r.Close(); err == nil { - t.Fatal("Error: object is already closed, should return error") - } - - err = c.RemoveObject(bucketName, objectName) - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } -} - -// Tests removing partially uploaded objects. -func TestRemovePartiallyUploadedV2(t *testing.T) { - if testing.Short() { - t.Skip("skipping function tests for short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := NewV2( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Enable tracing, write to stdout. - // c.TraceOn(os.Stderr) - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - r := bytes.NewReader(bytes.Repeat([]byte("a"), 128*1024)) - - reader, writer := io.Pipe() - go func() { - i := 0 - for i < 25 { - _, cerr := io.CopyN(writer, r, 128*1024) - if cerr != nil { - t.Fatal("Error:", cerr, bucketName) - } - i++ - r.Seek(0, 0) - } - writer.CloseWithError(errors.New("proactively closed to be verified later")) - }() - - objectName := bucketName + "-resumable" - _, err = c.PutObject(bucketName, objectName, reader, "application/octet-stream") - if err == nil { - t.Fatal("Error: PutObject should fail.") - } - if err.Error() != "proactively closed to be verified later" { - t.Fatal("Error:", err) - } - err = c.RemoveIncompleteUpload(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err) - } - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } -} - -// Tests FPutObject hidden contentType setting -func TestFPutObjectV2(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := NewV2( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Make a temp file with 11*1024*1024 bytes of data. - file, err := ioutil.TempFile(os.TempDir(), "FPutObjectTest") - if err != nil { - t.Fatal("Error:", err) - } - - r := bytes.NewReader(bytes.Repeat([]byte("b"), 11*1024*1024)) - n, err := io.CopyN(file, r, 11*1024*1024) - if err != nil { - t.Fatal("Error:", err) - } - if n != int64(11*1024*1024) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", 11*1024*1024, n) - } - - // Close the file pro-actively for windows. - err = file.Close() - if err != nil { - t.Fatal("Error:", err) - } - - // Set base object name - objectName := bucketName + "FPutObject" - - // Perform standard FPutObject with contentType provided (Expecting application/octet-stream) - n, err = c.FPutObject(bucketName, objectName+"-standard", file.Name(), "application/octet-stream") - if err != nil { - t.Fatal("Error:", err) - } - if n != int64(11*1024*1024) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", 11*1024*1024, n) - } - - // Perform FPutObject with no contentType provided (Expecting application/octet-stream) - n, err = c.FPutObject(bucketName, objectName+"-Octet", file.Name(), "") - if err != nil { - t.Fatal("Error:", err) - } - if n != int64(11*1024*1024) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", 11*1024*1024, n) - } - - // Add extension to temp file name - fileName := file.Name() - err = os.Rename(file.Name(), fileName+".gtar") - if err != nil { - t.Fatal("Error:", err) - } - - // Perform FPutObject with no contentType provided (Expecting application/x-gtar) - n, err = c.FPutObject(bucketName, objectName+"-GTar", fileName+".gtar", "") - if err != nil { - t.Fatal("Error:", err) - } - if n != int64(11*1024*1024) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", 11*1024*1024, n) - } - - // Check headers - rStandard, err := c.StatObject(bucketName, objectName+"-standard") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName+"-standard") - } - if rStandard.ContentType != "application/octet-stream" { - t.Fatalf("Error: Content-Type headers mismatched, want %v, got %v\n", - "application/octet-stream", rStandard.ContentType) - } - - rOctet, err := c.StatObject(bucketName, objectName+"-Octet") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName+"-Octet") - } - if rOctet.ContentType != "application/octet-stream" { - t.Fatalf("Error: Content-Type headers mismatched, want %v, got %v\n", - "application/octet-stream", rStandard.ContentType) - } - - rGTar, err := c.StatObject(bucketName, objectName+"-GTar") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName+"-GTar") - } - if rGTar.ContentType != "application/x-gtar" { - t.Fatalf("Error: Content-Type headers mismatched, want %v, got %v\n", - "application/x-gtar", rStandard.ContentType) - } - - // Remove all objects and bucket and temp file - err = c.RemoveObject(bucketName, objectName+"-standard") - if err != nil { - t.Fatal("Error: ", err) - } - - err = c.RemoveObject(bucketName, objectName+"-Octet") - if err != nil { - t.Fatal("Error: ", err) - } - - err = c.RemoveObject(bucketName, objectName+"-GTar") - if err != nil { - t.Fatal("Error: ", err) - } - - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } - - err = os.Remove(fileName + ".gtar") - if err != nil { - t.Fatal("Error:", err) - } - -} - -// Tests various bucket supported formats. -func TestMakeBucketRegionsV2(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for short runs") - } - if os.Getenv(serverEndpoint) != "s3.amazonaws.com" { - t.Skip("skipping region functional tests for non s3 runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := NewV2( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket in 'eu-central-1'. - if err = c.MakeBucket(bucketName, "eu-west-1"); err != nil { - t.Fatal("Error:", err, bucketName) - } - - if err = c.RemoveBucket(bucketName); err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Make a new bucket with '.' in its name, in 'us-west-2'. This - // request is internally staged into a path style instead of - // virtual host style. - if err = c.MakeBucket(bucketName+".withperiod", "us-west-2"); err != nil { - t.Fatal("Error:", err, bucketName+".withperiod") - } - - // Remove the newly created bucket. - if err = c.RemoveBucket(bucketName + ".withperiod"); err != nil { - t.Fatal("Error:", err, bucketName+".withperiod") - } -} - -// Tests get object ReaderSeeker interface methods. -func TestGetObjectReadSeekFunctionalV2(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := NewV2( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Generate data more than 32K. - buf := bytes.Repeat([]byte("2"), rand.Intn(1<<20)+32*1024) - - // Save the data. - objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") - n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - if n != int64(len(buf)) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), n) - } - - // Read the data back - r, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - st, err := r.Stat() - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - if st.Size != int64(len(buf)) { - t.Fatalf("Error: number of bytes in stat does not match, want %v, got %v\n", - len(buf), st.Size) - } - - offset := int64(2048) - n, err = r.Seek(offset, 0) - if err != nil { - t.Fatal("Error:", err, offset) - } - if n != offset { - t.Fatalf("Error: number of bytes seeked does not match, want %v, got %v\n", - offset, n) - } - n, err = r.Seek(0, 1) - if err != nil { - t.Fatal("Error:", err) - } - if n != offset { - t.Fatalf("Error: number of current seek does not match, want %v, got %v\n", - offset, n) - } - _, err = r.Seek(offset, 2) - if err == nil { - t.Fatal("Error: seek on positive offset for whence '2' should error out") - } - n, err = r.Seek(-offset, 2) - if err != nil { - t.Fatal("Error:", err) - } - if n != st.Size-offset { - t.Fatalf("Error: number of bytes seeked back does not match, want %d, got %v\n", st.Size-offset, n) - } - - var buffer1 bytes.Buffer - if _, err = io.CopyN(&buffer1, r, st.Size); err != nil { - if err != io.EOF { - t.Fatal("Error:", err) - } - } - if !bytes.Equal(buf[len(buf)-int(offset):], buffer1.Bytes()) { - t.Fatal("Error: Incorrect read bytes v/s original buffer.") - } - - // Seek again and read again. - n, err = r.Seek(offset-1, 0) - if err != nil { - t.Fatal("Error:", err) - } - if n != (offset - 1) { - t.Fatalf("Error: number of bytes seeked back does not match, want %v, got %v\n", offset-1, n) - } - - var buffer2 bytes.Buffer - if _, err = io.CopyN(&buffer2, r, st.Size); err != nil { - if err != io.EOF { - t.Fatal("Error:", err) - } - } - // Verify now lesser bytes. - if !bytes.Equal(buf[2047:], buffer2.Bytes()) { - t.Fatal("Error: Incorrect read bytes v/s original buffer.") - } - - err = c.RemoveObject(bucketName, objectName) - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } -} - -// Tests get object ReaderAt interface methods. -func TestGetObjectReadAtFunctionalV2(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := NewV2( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Generate data more than 32K - buf := bytes.Repeat([]byte("8"), rand.Intn(1<<20)+32*1024) - - // Save the data - objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") - n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - if n != int64(len(buf)) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), n) - } - - // Read the data back - r, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - st, err := r.Stat() - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - if st.Size != int64(len(buf)) { - t.Fatalf("Error: number of bytes in stat does not match, want %v, got %v\n", - len(buf), st.Size) - } - - offset := int64(2048) - - // Read directly - buf2 := make([]byte, 512) - buf3 := make([]byte, 512) - buf4 := make([]byte, 512) - - m, err := r.ReadAt(buf2, offset) - if err != nil { - t.Fatal("Error:", err, st.Size, len(buf2), offset) - } - if m != len(buf2) { - t.Fatalf("Error: ReadAt read shorter bytes before reaching EOF, want %v, got %v\n", m, len(buf2)) - } - if !bytes.Equal(buf2, buf[offset:offset+512]) { - t.Fatal("Error: Incorrect read between two ReadAt from same offset.") - } - offset += 512 - m, err = r.ReadAt(buf3, offset) - if err != nil { - t.Fatal("Error:", err, st.Size, len(buf3), offset) - } - if m != len(buf3) { - t.Fatalf("Error: ReadAt read shorter bytes before reaching EOF, want %v, got %v\n", m, len(buf3)) - } - if !bytes.Equal(buf3, buf[offset:offset+512]) { - t.Fatal("Error: Incorrect read between two ReadAt from same offset.") - } - offset += 512 - m, err = r.ReadAt(buf4, offset) - if err != nil { - t.Fatal("Error:", err, st.Size, len(buf4), offset) - } - if m != len(buf4) { - t.Fatalf("Error: ReadAt read shorter bytes before reaching EOF, want %v, got %v\n", m, len(buf4)) - } - if !bytes.Equal(buf4, buf[offset:offset+512]) { - t.Fatal("Error: Incorrect read between two ReadAt from same offset.") - } - - buf5 := make([]byte, n) - // Read the whole object. - m, err = r.ReadAt(buf5, 0) - if err != nil { - if err != io.EOF { - t.Fatal("Error:", err, len(buf5)) - } - } - if m != len(buf5) { - t.Fatalf("Error: ReadAt read shorter bytes before reaching EOF, want %v, got %v\n", m, len(buf5)) - } - if !bytes.Equal(buf, buf5) { - t.Fatal("Error: Incorrect data read in GetObject, than what was previously upoaded.") - } - - buf6 := make([]byte, n+1) - // Read the whole object and beyond. - _, err = r.ReadAt(buf6, 0) - if err != nil { - if err != io.EOF { - t.Fatal("Error:", err, len(buf6)) - } - } - err = c.RemoveObject(bucketName, objectName) - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } -} - -// Tests copy object -func TestCopyObjectV2(t *testing.T) { - if testing.Short() { - t.Skip("Skipping functional tests for short runs") - } - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object - c, err := NewV2( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket in 'us-east-1' (source bucket). - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Make a new bucket in 'us-east-1' (destination bucket). - err = c.MakeBucket(bucketName+"-copy", "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName+"-copy") - } - - // Generate data more than 32K - buf := bytes.Repeat([]byte("9"), rand.Intn(1<<20)+32*1024) - - // Save the data - objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") - n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - if n != int64(len(buf)) { - t.Fatalf("Error: number of bytes does not match want %v, got %v", - len(buf), n) - } - - dst, err := NewDestinationInfo(bucketName+"-copy", objectName+"-copy", nil, nil) - if err != nil { - t.Fatal(err) - } - - src := NewSourceInfo(bucketName, objectName, nil) - err = src.SetModifiedSinceCond(time.Date(2014, time.April, 0, 0, 0, 0, 0, time.UTC)) - if err != nil { - t.Fatal("Error:", err) - } - - // Perform the Copy - err = c.CopyObject(dst, src) - if err != nil { - t.Fatal("Error:", err, bucketName+"-copy", objectName+"-copy") - } - - // Source object - reader, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err) - } - // Destination object - readerCopy, err := c.GetObject(bucketName+"-copy", objectName+"-copy") - if err != nil { - t.Fatal("Error:", err) - } - // Check the various fields of source object against destination object. - objInfo, err := reader.Stat() - if err != nil { - t.Fatal("Error:", err) - } - objInfoCopy, err := readerCopy.Stat() - if err != nil { - t.Fatal("Error:", err) - } - if objInfo.Size != objInfoCopy.Size { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", - objInfo.Size, objInfoCopy.Size) - } - - // Remove all objects and buckets - err = c.RemoveObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err) - } - - err = c.RemoveObject(bucketName+"-copy", objectName+"-copy") - if err != nil { - t.Fatal("Error:", err) - } - - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } - - err = c.RemoveBucket(bucketName + "-copy") - if err != nil { - t.Fatal("Error:", err) - } -} - -// Tests comprehensive list of all methods. -func TestFunctionalV2(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - c, err := NewV2( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable to debug - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Generate a random file name. - fileName := randString(60, rand.NewSource(time.Now().UnixNano()), "") - file, err := os.Create(fileName) - if err != nil { - t.Fatal("Error:", err) - } - for i := 0; i < 3; i++ { - buf := make([]byte, rand.Intn(1<<19)) - _, err = file.Write(buf) - if err != nil { - t.Fatal("Error:", err) - } - } - file.Close() - - // Verify if bucket exits and you have access. - var exists bool - exists, err = c.BucketExists(bucketName) - if err != nil { - t.Fatal("Error:", err, bucketName) - } - if !exists { - t.Fatal("Error: could not find ", bucketName) - } - - // Make the bucket 'public read/write'. - err = c.SetBucketPolicy(bucketName, "", policy.BucketPolicyReadWrite) - if err != nil { - t.Fatal("Error:", err) - } - - // List all buckets. - buckets, err := c.ListBuckets() - if len(buckets) == 0 { - t.Fatal("Error: list buckets cannot be empty", buckets) - } - if err != nil { - t.Fatal("Error:", err) - } - - // Verify if previously created bucket is listed in list buckets. - bucketFound := false - for _, bucket := range buckets { - if bucket.Name == bucketName { - bucketFound = true - } - } - - // If bucket not found error out. - if !bucketFound { - t.Fatal("Error: bucket ", bucketName, "not found") - } - - objectName := bucketName + "unique" - - // Generate data - buf := bytes.Repeat([]byte("n"), rand.Intn(1<<19)) - - n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "") - if err != nil { - t.Fatal("Error: ", err) - } - if n != int64(len(buf)) { - t.Fatal("Error: bad length ", n, len(buf)) - } - - n, err = c.PutObject(bucketName, objectName+"-nolength", bytes.NewReader(buf), "binary/octet-stream") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName+"-nolength") - } - - if n != int64(len(buf)) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), n) - } - - // Instantiate a done channel to close all listing. - doneCh := make(chan struct{}) - defer close(doneCh) - - objFound := false - isRecursive := true // Recursive is true. - for obj := range c.ListObjects(bucketName, objectName, isRecursive, doneCh) { - if obj.Key == objectName { - objFound = true - break - } - } - if !objFound { - t.Fatal("Error: object " + objectName + " not found.") - } - - objFound = false - isRecursive = true // Recursive is true. - for obj := range c.ListObjects(bucketName, objectName, isRecursive, doneCh) { - if obj.Key == objectName { - objFound = true - break - } - } - if !objFound { - t.Fatal("Error: object " + objectName + " not found.") - } - - incompObjNotFound := true - for objIncompl := range c.ListIncompleteUploads(bucketName, objectName, isRecursive, doneCh) { - if objIncompl.Key != "" { - incompObjNotFound = false - break - } - } - if !incompObjNotFound { - t.Fatal("Error: unexpected dangling incomplete upload found.") - } - - newReader, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatal("Error: ", err) - } - - newReadBytes, err := ioutil.ReadAll(newReader) - if err != nil { - t.Fatal("Error: ", err) - } - - if !bytes.Equal(newReadBytes, buf) { - t.Fatal("Error: bytes mismatch.") - } - - err = c.FGetObject(bucketName, objectName, fileName+"-f") - if err != nil { - t.Fatal("Error: ", err) - } - - // Generate presigned GET object url. - presignedGetURL, err := c.PresignedGetObject(bucketName, objectName, 3600*time.Second, nil) - if err != nil { - t.Fatal("Error: ", err) - } - // Verify if presigned url works. - resp, err := http.Get(presignedGetURL.String()) - if err != nil { - t.Fatal("Error: ", err) - } - if resp.StatusCode != http.StatusOK { - t.Fatal("Error: ", resp.Status) - } - newPresignedBytes, err := ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal("Error: ", err) - } - if !bytes.Equal(newPresignedBytes, buf) { - t.Fatal("Error: bytes mismatch.") - } - - // Set request parameters. - reqParams := make(url.Values) - reqParams.Set("response-content-disposition", "attachment; filename=\"test.txt\"") - // Generate presigned GET object url. - presignedGetURL, err = c.PresignedGetObject(bucketName, objectName, 3600*time.Second, reqParams) - if err != nil { - t.Fatal("Error: ", err) - } - // Verify if presigned url works. - resp, err = http.Get(presignedGetURL.String()) - if err != nil { - t.Fatal("Error: ", err) - } - if resp.StatusCode != http.StatusOK { - t.Fatal("Error: ", resp.Status) - } - newPresignedBytes, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal("Error: ", err) - } - if !bytes.Equal(newPresignedBytes, buf) { - t.Fatal("Error: bytes mismatch for presigned GET url.") - } - // Verify content disposition. - if resp.Header.Get("Content-Disposition") != "attachment; filename=\"test.txt\"" { - t.Fatalf("Error: wrong Content-Disposition received %s", resp.Header.Get("Content-Disposition")) - } - - presignedPutURL, err := c.PresignedPutObject(bucketName, objectName+"-presigned", 3600*time.Second) - if err != nil { - t.Fatal("Error: ", err) - } - // Generate data more than 32K - buf = bytes.Repeat([]byte("1"), rand.Intn(1<<20)+32*1024) - - req, err := http.NewRequest("PUT", presignedPutURL.String(), bytes.NewReader(buf)) - if err != nil { - t.Fatal("Error: ", err) - } - httpClient := &http.Client{ - // Setting a sensible time out of 30secs to wait for response - // headers. Request is pro-actively cancelled after 30secs - // with no response. - Timeout: 30 * time.Second, - Transport: http.DefaultTransport, - } - resp, err = httpClient.Do(req) - if err != nil { - t.Fatal("Error: ", err) - } - - newReader, err = c.GetObject(bucketName, objectName+"-presigned") - if err != nil { - t.Fatal("Error: ", err) - } - - newReadBytes, err = ioutil.ReadAll(newReader) - if err != nil { - t.Fatal("Error: ", err) - } - - if !bytes.Equal(newReadBytes, buf) { - t.Fatal("Error: bytes mismatch.") - } - - err = c.RemoveObject(bucketName, objectName) - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveObject(bucketName, objectName+"-f") - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveObject(bucketName, objectName+"-nolength") - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveObject(bucketName, objectName+"-presigned") - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } - err = c.RemoveBucket(bucketName) - if err == nil { - t.Fatal("Error:") - } - if err.Error() != "The specified bucket does not exist" { - t.Fatal("Error: ", err) - } - if err = os.Remove(fileName); err != nil { - t.Fatal("Error: ", err) - } - if err = os.Remove(fileName + "-f"); err != nil { - t.Fatal("Error: ", err) - } -} - -func testComposeObjectErrorCases(c *Client, t *testing.T) { - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket in 'us-east-1' (source bucket). - err := c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Test that more than 10K source objects cannot be - // concatenated. - srcArr := [10001]SourceInfo{} - srcSlice := srcArr[:] - dst, err := NewDestinationInfo(bucketName, "object", nil, nil) - if err != nil { - t.Fatal(err) - } - - if err := c.ComposeObject(dst, srcSlice); err == nil { - t.Fatal("Error was expected.") - } else if err.Error() != "There must be as least one and upto 10000 source objects." { - t.Fatal("Got unexpected error: ", err) - } - - // Create a source with invalid offset spec and check that - // error is returned: - // 1. Create the source object. - const badSrcSize = 5 * 1024 * 1024 - buf := bytes.Repeat([]byte("1"), badSrcSize) - _, err = c.PutObject(bucketName, "badObject", bytes.NewReader(buf), "") - if err != nil { - t.Fatal("Error:", err) - } - // 2. Set invalid range spec on the object (going beyond - // object size) - badSrc := NewSourceInfo(bucketName, "badObject", nil) - err = badSrc.SetRange(1, badSrcSize) - if err != nil { - t.Fatal("Error:", err) - } - // 3. ComposeObject call should fail. - if err := c.ComposeObject(dst, []SourceInfo{badSrc}); err == nil { - t.Fatal("Error was expected.") - } else if !strings.Contains(err.Error(), "has invalid segment-to-copy") { - t.Fatal("Got unexpected error: ", err) - } -} - -// Test expected error cases -func TestComposeObjectErrorCasesV2(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - - // Instantiate new minio client object - c, err := NewV2( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - testComposeObjectErrorCases(c, t) -} - -func testComposeMultipleSources(c *Client, t *testing.T) { - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - // Make a new bucket in 'us-east-1' (source bucket). - err := c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Upload a small source object - const srcSize = 1024 * 1024 * 5 - buf := bytes.Repeat([]byte("1"), srcSize) - _, err = c.PutObject(bucketName, "srcObject", bytes.NewReader(buf), "binary/octet-stream") - if err != nil { - t.Fatal("Error:", err) - } - - // We will append 10 copies of the object. - srcs := []SourceInfo{} - for i := 0; i < 10; i++ { - srcs = append(srcs, NewSourceInfo(bucketName, "srcObject", nil)) - } - // make the last part very small - err = srcs[9].SetRange(0, 0) - if err != nil { - t.Fatal("unexpected error:", err) - } - - dst, err := NewDestinationInfo(bucketName, "dstObject", nil, nil) - if err != nil { - t.Fatal(err) - } - err = c.ComposeObject(dst, srcs) - if err != nil { - t.Fatal("Error:", err) - } - - objProps, err := c.StatObject(bucketName, "dstObject") - if err != nil { - t.Fatal("Error:", err) - } - - if objProps.Size != 9*srcSize+1 { - t.Fatal("Size mismatched! Expected:", 10000*srcSize, "but got:", objProps.Size) - } -} - -// Test concatenating multiple objects objects -func TestCompose10KSourcesV2(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - - // Instantiate new minio client object - c, err := NewV2( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - testComposeMultipleSources(c, t) -} - -func testEncryptedCopyObject(c *Client, t *testing.T) { - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - // Make a new bucket in 'us-east-1' (source bucket). - err := c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - key1 := NewSSEInfo([]byte("32byteslongsecretkeymustbegiven1"), "AES256") - key2 := NewSSEInfo([]byte("32byteslongsecretkeymustbegiven2"), "AES256") - - // 1. create an sse-c encrypted object to copy by uploading - const srcSize = 1024 * 1024 - buf := bytes.Repeat([]byte("abcde"), srcSize) // gives a buffer of 5MiB - metadata := make(map[string][]string) - for k, v := range key1.GetSSEHeaders() { - metadata[k] = append(metadata[k], v) - } - _, err = c.PutObjectWithSize(bucketName, "srcObject", bytes.NewReader(buf), int64(len(buf)), metadata, nil) - if err != nil { - t.Fatal("PutObjectWithSize Error:", err) - } - - // 2. copy object and change encryption key - src := NewSourceInfo(bucketName, "srcObject", &key1) - dst, err := NewDestinationInfo(bucketName, "dstObject", &key2, nil) - if err != nil { - t.Fatal("Error:", err) - } - - err = c.CopyObject(dst, src) - if err != nil { - t.Fatal("CopyObject Error:", err) - } - - // 3. get copied object and check if content is equal - reqH := NewGetReqHeaders() - for k, v := range key2.GetSSEHeaders() { - reqH.Set(k, v) - } - coreClient := Core{c} - reader, _, err := coreClient.GetObject(bucketName, "dstObject", reqH) - if err != nil { - t.Fatal("GetObject Error:", err) - } - defer reader.Close() - - decBytes, err := ioutil.ReadAll(reader) - if err != nil { - log.Fatalln(err) - } - if !bytes.Equal(decBytes, buf) { - log.Fatal("downloaded object mismatched for encrypted object") - } -} - -// Test encrypted copy object -func TestEncryptedCopyObjectV2(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - - // Instantiate new minio client object - c, err := NewV2( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - testEncryptedCopyObject(c, t) -} - -func testUserMetadataCopying(c *Client, t *testing.T) { - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - // Make a new bucket in 'us-east-1' (source bucket). - err := c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - fetchMeta := func(object string) (h http.Header) { - objInfo, err := c.StatObject(bucketName, object) - if err != nil { - t.Fatal("Metadata fetch error:", err) - } - h = make(http.Header) - for k, vs := range objInfo.Metadata { - if strings.HasPrefix(strings.ToLower(k), "x-amz-meta-") { - for _, v := range vs { - h.Add(k, v) - } - } - } - return h - } - - // 1. create a client encrypted object to copy by uploading - const srcSize = 1024 * 1024 - buf := bytes.Repeat([]byte("abcde"), srcSize) // gives a buffer of 5MiB - metadata := make(http.Header) - metadata.Set("x-amz-meta-myheader", "myvalue") - _, err = c.PutObjectWithMetadata(bucketName, "srcObject", - bytes.NewReader(buf), metadata, nil) - if err != nil { - t.Fatal("Put Error:", err) - } - if !reflect.DeepEqual(metadata, fetchMeta("srcObject")) { - t.Fatal("Unequal metadata") - } - - // 2. create source - src := NewSourceInfo(bucketName, "srcObject", nil) - // 2.1 create destination with metadata set - dst1, err := NewDestinationInfo(bucketName, "dstObject-1", nil, map[string]string{"notmyheader": "notmyvalue"}) - if err != nil { - t.Fatal("Error:", err) - } - - // 3. Check that copying to an object with metadata set resets - // the headers on the copy. - err = c.CopyObject(dst1, src) - if err != nil { - t.Fatal("Error:", err) - } - - expectedHeaders := make(http.Header) - expectedHeaders.Set("x-amz-meta-notmyheader", "notmyvalue") - if !reflect.DeepEqual(expectedHeaders, fetchMeta("dstObject-1")) { - t.Fatal("Unequal metadata") - } - - // 4. create destination with no metadata set and same source - dst2, err := NewDestinationInfo(bucketName, "dstObject-2", nil, nil) - if err != nil { - t.Fatal("Error:", err) - - } - src = NewSourceInfo(bucketName, "srcObject", nil) - - // 5. Check that copying to an object with no metadata set, - // copies metadata. - err = c.CopyObject(dst2, src) - if err != nil { - t.Fatal("Error:", err) - } - - expectedHeaders = metadata - if !reflect.DeepEqual(expectedHeaders, fetchMeta("dstObject-2")) { - t.Fatal("Unequal metadata") - } - - // 6. Compose a pair of sources. - srcs := []SourceInfo{ - NewSourceInfo(bucketName, "srcObject", nil), - NewSourceInfo(bucketName, "srcObject", nil), - } - dst3, err := NewDestinationInfo(bucketName, "dstObject-3", nil, nil) - if err != nil { - t.Fatal("Error:", err) - - } - - err = c.ComposeObject(dst3, srcs) - if err != nil { - t.Fatal("Error:", err) - } - - // Check that no headers are copied in this case - if !reflect.DeepEqual(make(http.Header), fetchMeta("dstObject-3")) { - t.Fatal("Unequal metadata") - } - - // 7. Compose a pair of sources with dest user metadata set. - srcs = []SourceInfo{ - NewSourceInfo(bucketName, "srcObject", nil), - NewSourceInfo(bucketName, "srcObject", nil), - } - dst4, err := NewDestinationInfo(bucketName, "dstObject-4", nil, map[string]string{"notmyheader": "notmyvalue"}) - if err != nil { - t.Fatal("Error:", err) - - } - - err = c.ComposeObject(dst4, srcs) - if err != nil { - t.Fatal("Error:", err) - } - - // Check that no headers are copied in this case - expectedHeaders = make(http.Header) - expectedHeaders.Set("x-amz-meta-notmyheader", "notmyvalue") - if !reflect.DeepEqual(expectedHeaders, fetchMeta("dstObject-4")) { - t.Fatal("Unequal metadata") - } -} - -func TestUserMetadataCopyingV2(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - - // Instantiate new minio client object - c, err := NewV2( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // c.TraceOn(os.Stderr) - testUserMetadataCopying(c, t) -} diff --git a/vendor/github.com/minio/minio-go/api_functional_v4_test.go b/vendor/github.com/minio/minio-go/api_functional_v4_test.go deleted file mode 100644 index e9593ddaf..000000000 --- a/vendor/github.com/minio/minio-go/api_functional_v4_test.go +++ /dev/null @@ -1,2410 +0,0 @@ -/* - * Minio Go Library for Amazon S3 Compatible Cloud Storage (C) 2015 Minio, Inc. - * - * 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. - */ - -package minio - -import ( - "bytes" - "encoding/hex" - "errors" - "fmt" - "io" - "io/ioutil" - "math/rand" - "net/http" - "net/url" - "os" - "strconv" - "strings" - "testing" - "time" - - "github.com/minio/minio-go/pkg/encrypt" - "github.com/minio/minio-go/pkg/policy" -) - -const letterBytes = "abcdefghijklmnopqrstuvwxyz01234569" -const ( - letterIdxBits = 6 // 6 bits to represent a letter index - letterIdxMask = 1<= 0; { - if remain == 0 { - cache, remain = src.Int63(), letterIdxMax - } - if idx := int(cache & letterIdxMask); idx < len(letterBytes) { - b[i] = letterBytes[idx] - i-- - } - cache >>= letterIdxBits - remain-- - } - return prefix + string(b[0:30-len(prefix)]) -} - -// Tests bucket re-create errors. -func TestMakeBucketError(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for short runs") - } - if os.Getenv(serverEndpoint) != "s3.amazonaws.com" { - t.Skip("skipping region functional tests for non s3 runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := New( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket in 'eu-central-1'. - if err = c.MakeBucket(bucketName, "eu-central-1"); err != nil { - t.Fatal("Error:", err, bucketName) - } - if err = c.MakeBucket(bucketName, "eu-central-1"); err == nil { - t.Fatal("Error: make bucket should should fail for", bucketName) - } - // Verify valid error response from server. - if ToErrorResponse(err).Code != "BucketAlreadyExists" && - ToErrorResponse(err).Code != "BucketAlreadyOwnedByYou" { - t.Fatal("Error: Invalid error returned by server", err) - } - if err = c.RemoveBucket(bucketName); err != nil { - t.Fatal("Error:", err, bucketName) - } - if err = c.MakeBucket(bucketName+"..-1", "eu-central-1"); err == nil { - t.Fatal("Error:", err, bucketName+"..-1") - } - // Verify valid error response. - if err != nil && err.Error() != "Bucket name contains invalid characters" { - t.Fatal("Error: Invalid error returned by server", err) - } - if err = c.MakeBucket(bucketName+"AAA-1", "eu-central-1"); err == nil { - t.Fatal("Error:", err, bucketName+"..-1") - } - // Verify valid error response. - if err != nil && err.Error() != "Bucket name contains invalid characters" { - t.Fatal("Error: Invalid error returned by server", err) - } -} - -// Tests various bucket supported formats. -func TestMakeBucketRegions(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for short runs") - } - if os.Getenv(serverEndpoint) != "s3.amazonaws.com" { - t.Skip("skipping region functional tests for non s3 runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := New( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket in 'eu-central-1'. - if err = c.MakeBucket(bucketName, "eu-central-1"); err != nil { - t.Fatal("Error:", err, bucketName) - } - - if err = c.RemoveBucket(bucketName); err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Make a new bucket with '.' in its name, in 'us-west-2'. This - // request is internally staged into a path style instead of - // virtual host style. - if err = c.MakeBucket(bucketName+".withperiod", "us-west-2"); err != nil { - t.Fatal("Error:", err, bucketName+".withperiod") - } - - // Remove the newly created bucket. - if err = c.RemoveBucket(bucketName + ".withperiod"); err != nil { - t.Fatal("Error:", err, bucketName+".withperiod") - } -} - -// Test PutObject using a large data to trigger multipart readat -func TestPutObjectReadAt(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := New( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Generate data using 4 parts so that all 3 'workers' are utilized and a part is leftover. - // Use different data for each part for multipart tests to ensure part order at the end. - var buf []byte - for i := 0; i < 4; i++ { - buf = append(buf, bytes.Repeat([]byte(string('a'+i)), minPartSize)...) - } - - // Save the data - objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") - // Object content type - objectContentType := "binary/octet-stream" - - n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), objectContentType) - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - if n != int64(len(buf)) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), n) - } - - // Read the data back - r, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - st, err := r.Stat() - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - if st.Size != int64(len(buf)) { - t.Fatalf("Error: number of bytes in stat does not match, want %v, got %v\n", - len(buf), st.Size) - } - if st.ContentType != objectContentType { - t.Fatalf("Error: Content types don't match, expected: %+v, found: %+v\n", objectContentType, st.ContentType) - } - if err := r.Close(); err != nil { - t.Fatal("Error:", err) - } - if err := r.Close(); err == nil { - t.Fatal("Error: object is already closed, should return error") - } - - err = c.RemoveObject(bucketName, objectName) - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } -} - -// Test PutObject using a large data to trigger multipart readat -func TestPutObjectWithMetadata(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := New( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Generate data using 2 parts - // Use different data in each part for multipart tests to ensure part order at the end. - var buf []byte - for i := 0; i < 2; i++ { - buf = append(buf, bytes.Repeat([]byte(string('a'+i)), minPartSize)...) - } - - // Save the data - objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") - - // Object custom metadata - customContentType := "custom/contenttype" - - n, err := c.PutObjectWithMetadata(bucketName, objectName, bytes.NewReader(buf), map[string][]string{ - "Content-Type": {customContentType}, - }, nil) - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - if n != int64(len(buf)) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), n) - } - - // Read the data back - r, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - st, err := r.Stat() - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - if st.Size != int64(len(buf)) { - t.Fatalf("Error: number of bytes in stat does not match, want %v, got %v\n", - len(buf), st.Size) - } - if st.ContentType != customContentType { - t.Fatalf("Error: Expected and found content types do not match, want %v, got %v\n", - customContentType, st.ContentType) - } - if err := r.Close(); err != nil { - t.Fatal("Error:", err) - } - if err := r.Close(); err == nil { - t.Fatal("Error: object is already closed, should return error") - } - - err = c.RemoveObject(bucketName, objectName) - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } -} - -// Test put object with streaming signature. -func TestPutObjectStreaming(t *testing.T) { - if testing.Short() { - t.Skip("skipping function tests for short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := NewV4( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), - "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Upload an object. - sizes := []int64{0, 64*1024 - 1, 64 * 1024} - objectName := "test-object" - for i, size := range sizes { - data := bytes.Repeat([]byte("a"), int(size)) - n, err := c.PutObjectStreaming(bucketName, objectName, bytes.NewReader(data)) - if err != nil { - t.Fatalf("Test %d Error: %v %s %s", i+1, err, bucketName, objectName) - } - - if n != size { - t.Errorf("Test %d Expected upload object size %d but got %d", i+1, size, n) - } - } - - // Remove the object. - err = c.RemoveObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err) - } - - // Remove the bucket. - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } -} - -// Test listing no partially uploaded objects upon putObject error. -func TestListNoPartiallyUploadedObjects(t *testing.T) { - if testing.Short() { - t.Skip("skipping function tests for short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := New( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Enable tracing, write to stdout. - // c.TraceOn(os.Stderr) - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - r := bytes.NewReader(bytes.Repeat([]byte("0"), minPartSize*2)) - - reader, writer := io.Pipe() - go func() { - i := 0 - for i < 25 { - _, cerr := io.CopyN(writer, r, (minPartSize*2)/25) - if cerr != nil { - t.Fatal("Error:", cerr, bucketName) - } - i++ - r.Seek(0, 0) - } - writer.CloseWithError(errors.New("proactively closed to be verified later")) - }() - - objectName := bucketName + "-resumable" - _, err = c.PutObject(bucketName, objectName, reader, "application/octet-stream") - if err == nil { - t.Fatal("Error: PutObject should fail.") - } - if !strings.Contains(err.Error(), "proactively closed to be verified later") { - t.Fatal("Error:", err) - } - - doneCh := make(chan struct{}) - defer close(doneCh) - - isRecursive := true - multiPartObjectCh := c.ListIncompleteUploads(bucketName, objectName, isRecursive, doneCh) - - var activeUploads bool - for multiPartObject := range multiPartObjectCh { - if multiPartObject.Err != nil { - t.Fatalf("Error: Error when listing incomplete upload") - } - activeUploads = true - } - if activeUploads { - t.Errorf("There should be no active uploads in progress upon error for %s/%s", bucketName, objectName) - } - - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } -} - -// Test get object seeker from the end, using whence set to '2'. -func TestGetOjectSeekEnd(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := New( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Generate data more than 32K - buf := bytes.Repeat([]byte("1"), rand.Intn(1<<20)+32*1024) - // Save the data - objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") - n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - if n != int64(len(buf)) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), n) - } - - // Read the data back - r, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - st, err := r.Stat() - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - if st.Size != int64(len(buf)) { - t.Fatalf("Error: number of bytes in stat does not match, want %v, got %v\n", - len(buf), st.Size) - } - - pos, err := r.Seek(-100, 2) - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - if pos != st.Size-100 { - t.Fatalf("Expected %d, got %d instead", pos, st.Size-100) - } - buf2 := make([]byte, 100) - m, err := io.ReadFull(r, buf2) - if err != nil { - t.Fatal("Error: reading through io.ReadFull", err, bucketName, objectName) - } - if m != len(buf2) { - t.Fatalf("Expected %d bytes, got %d", len(buf2), m) - } - hexBuf1 := fmt.Sprintf("%02x", buf[len(buf)-100:]) - hexBuf2 := fmt.Sprintf("%02x", buf2[:m]) - if hexBuf1 != hexBuf2 { - t.Fatalf("Expected %s, got %s instead", hexBuf1, hexBuf2) - } - pos, err = r.Seek(-100, 2) - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - if pos != st.Size-100 { - t.Fatalf("Expected %d, got %d instead", pos, st.Size-100) - } - if err = r.Close(); err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } -} - -// Test get object reader to not throw error on being closed twice. -func TestGetObjectClosedTwice(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := New( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Generate data more than 32K - buf := bytes.Repeat([]byte("1"), rand.Intn(1<<20)+32*1024) - - // Save the data - objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") - n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - if n != int64(len(buf)) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), n) - } - - // Read the data back - r, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - st, err := r.Stat() - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - if st.Size != int64(len(buf)) { - t.Fatalf("Error: number of bytes in stat does not match, want %v, got %v\n", - len(buf), st.Size) - } - if err := r.Close(); err != nil { - t.Fatal("Error:", err) - } - if err := r.Close(); err == nil { - t.Fatal("Error: object is already closed, should return error") - } - - err = c.RemoveObject(bucketName, objectName) - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } -} - -// Test removing multiple objects with Remove API -func TestRemoveMultipleObjects(t *testing.T) { - if testing.Short() { - t.Skip("skipping function tests for short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := New( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - - if err != nil { - t.Fatal("Error:", err) - } - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Enable tracing, write to stdout. - // c.TraceOn(os.Stderr) - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - r := bytes.NewReader(bytes.Repeat([]byte("a"), 8)) - - // Multi remove of 1100 objects - nrObjects := 1100 - - objectsCh := make(chan string) - - go func() { - defer close(objectsCh) - // Upload objects and send them to objectsCh - for i := 0; i < nrObjects; i++ { - objectName := "sample" + strconv.Itoa(i) + ".txt" - _, err = c.PutObject(bucketName, objectName, r, "application/octet-stream") - if err != nil { - t.Error("Error: PutObject shouldn't fail.", err) - continue - } - objectsCh <- objectName - } - }() - - // Call RemoveObjects API - errorCh := c.RemoveObjects(bucketName, objectsCh) - - // Check if errorCh doesn't receive any error - select { - case r, more := <-errorCh: - if more { - t.Fatalf("Unexpected error, objName(%v) err(%v)", r.ObjectName, r.Err) - } - } - - // Clean the bucket created by the test - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } -} - -// Tests FPutObject of a big file to trigger multipart -func TestFPutObjectMultipart(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := New( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Make a temp file with minPartSize*4 bytes of data. - file, err := ioutil.TempFile(os.TempDir(), "FPutObjectTest") - if err != nil { - t.Fatal("Error:", err) - } - - // Upload 4 parts to utilize all 3 'workers' in multipart and still have a part to upload. - var buffer []byte - for i := 0; i < 4; i++ { - buffer = append(buffer, bytes.Repeat([]byte(string('a'+i)), minPartSize)...) - } - - size, err := file.Write(buffer) - if err != nil { - t.Fatal("Error:", err) - } - if size != minPartSize*4 { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", minPartSize*4, size) - } - - // Close the file pro-actively for windows. - err = file.Close() - if err != nil { - t.Fatal("Error:", err) - } - - // Set base object name - objectName := bucketName + "FPutObject" - objectContentType := "testapplication/octet-stream" - - // Perform standard FPutObject with contentType provided (Expecting application/octet-stream) - n, err := c.FPutObject(bucketName, objectName+"-standard", file.Name(), objectContentType) - if err != nil { - t.Fatal("Error:", err) - } - if n != int64(minPartSize*4) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", minPartSize*4, n) - } - - r, err := c.GetObject(bucketName, objectName+"-standard") - if err != nil { - t.Fatalf("Unexpected error: %v\n", err) - } - objInfo, err := r.Stat() - if err != nil { - t.Fatalf("Unexpected error: %v\n", err) - } - if objInfo.Size != minPartSize*4 { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", minPartSize*4, n) - } - if objInfo.ContentType != objectContentType { - t.Fatalf("Error: Content types don't match, want %v, got %v\n", objectContentType, objInfo.ContentType) - } - - // Remove all objects and bucket and temp file - err = c.RemoveObject(bucketName, objectName+"-standard") - if err != nil { - t.Fatal("Error: ", err) - } - - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } -} - -// Tests FPutObject hidden contentType setting -func TestFPutObject(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := New( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Make a temp file with minPartSize*4 bytes of data. - file, err := ioutil.TempFile(os.TempDir(), "FPutObjectTest") - if err != nil { - t.Fatal("Error:", err) - } - - // Upload 4 parts worth of data to use all 3 of multiparts 'workers' and have an extra part. - // Use different data in part for multipart tests to check parts are uploaded in correct order. - var buffer []byte - for i := 0; i < 4; i++ { - buffer = append(buffer, bytes.Repeat([]byte(string('a'+i)), minPartSize)...) - } - - // Write the data to the file. - size, err := file.Write(buffer) - if err != nil { - t.Fatal("Error:", err) - } - if size != minPartSize*4 { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", minPartSize*4, size) - } - - // Close the file pro-actively for windows. - err = file.Close() - if err != nil { - t.Fatal("Error:", err) - } - - // Set base object name - objectName := bucketName + "FPutObject" - - // Perform standard FPutObject with contentType provided (Expecting application/octet-stream) - n, err := c.FPutObject(bucketName, objectName+"-standard", file.Name(), "application/octet-stream") - if err != nil { - t.Fatal("Error:", err) - } - if n != int64(minPartSize*4) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", minPartSize*4, n) - } - - // Perform FPutObject with no contentType provided (Expecting application/octet-stream) - n, err = c.FPutObject(bucketName, objectName+"-Octet", file.Name(), "") - if err != nil { - t.Fatal("Error:", err) - } - if n != int64(minPartSize*4) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", minPartSize*4, n) - } - - // Add extension to temp file name - fileName := file.Name() - err = os.Rename(file.Name(), fileName+".gtar") - if err != nil { - t.Fatal("Error:", err) - } - - // Perform FPutObject with no contentType provided (Expecting application/x-gtar) - n, err = c.FPutObject(bucketName, objectName+"-GTar", fileName+".gtar", "") - if err != nil { - t.Fatal("Error:", err) - } - if n != int64(minPartSize*4) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", minPartSize*4, n) - } - - // Check headers - rStandard, err := c.StatObject(bucketName, objectName+"-standard") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName+"-standard") - } - if rStandard.ContentType != "application/octet-stream" { - t.Fatalf("Error: Content-Type headers mismatched, want %v, got %v\n", - "application/octet-stream", rStandard.ContentType) - } - - rOctet, err := c.StatObject(bucketName, objectName+"-Octet") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName+"-Octet") - } - if rOctet.ContentType != "application/octet-stream" { - t.Fatalf("Error: Content-Type headers mismatched, want %v, got %v\n", - "application/octet-stream", rStandard.ContentType) - } - - rGTar, err := c.StatObject(bucketName, objectName+"-GTar") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName+"-GTar") - } - if rGTar.ContentType != "application/x-gtar" { - t.Fatalf("Error: Content-Type headers mismatched, want %v, got %v\n", - "application/x-gtar", rStandard.ContentType) - } - - // Remove all objects and bucket and temp file - err = c.RemoveObject(bucketName, objectName+"-standard") - if err != nil { - t.Fatal("Error: ", err) - } - - err = c.RemoveObject(bucketName, objectName+"-Octet") - if err != nil { - t.Fatal("Error: ", err) - } - - err = c.RemoveObject(bucketName, objectName+"-GTar") - if err != nil { - t.Fatal("Error: ", err) - } - - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } - - err = os.Remove(fileName + ".gtar") - if err != nil { - t.Fatal("Error:", err) - } - -} - -// Tests get object ReaderSeeker interface methods. -func TestGetObjectReadSeekFunctional(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := New( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Generate data more than 32K - buf := bytes.Repeat([]byte("2"), rand.Intn(1<<20)+32*1024) - bufSize := len(buf) - - // Save the data - objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") - n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - if n != int64(bufSize) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), n) - } - - defer func() { - err = c.RemoveObject(bucketName, objectName) - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } - }() - - // Read the data back - r, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - st, err := r.Stat() - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - if st.Size != int64(bufSize) { - t.Fatalf("Error: number of bytes in stat does not match, want %v, got %v\n", - len(buf), st.Size) - } - - // This following function helps us to compare data from the reader after seek - // with the data from the original buffer - cmpData := func(r io.Reader, start, end int) { - if end-start == 0 { - return - } - buffer := bytes.NewBuffer([]byte{}) - if _, err := io.CopyN(buffer, r, int64(bufSize)); err != nil { - if err != io.EOF { - t.Fatal("Error:", err) - } - } - if !bytes.Equal(buf[start:end], buffer.Bytes()) { - t.Fatal("Error: Incorrect read bytes v/s original buffer.") - } - } - - // Generic seek error for errors other than io.EOF - seekErr := errors.New("seek error") - - testCases := []struct { - offset int64 - whence int - pos int64 - err error - shouldCmp bool - start int - end int - }{ - // Start from offset 0, fetch data and compare - {0, 0, 0, nil, true, 0, 0}, - // Start from offset 2048, fetch data and compare - {2048, 0, 2048, nil, true, 2048, bufSize}, - // Start from offset larger than possible - {int64(bufSize) + 1024, 0, 0, seekErr, false, 0, 0}, - // Move to offset 0 without comparing - {0, 0, 0, nil, false, 0, 0}, - // Move one step forward and compare - {1, 1, 1, nil, true, 1, bufSize}, - // Move larger than possible - {int64(bufSize), 1, 0, seekErr, false, 0, 0}, - // Provide negative offset with CUR_SEEK - {int64(-1), 1, 0, seekErr, false, 0, 0}, - // Test with whence SEEK_END and with positive offset - {1024, 2, int64(bufSize) - 1024, io.EOF, true, 0, 0}, - // Test with whence SEEK_END and with negative offset - {-1024, 2, int64(bufSize) - 1024, nil, true, bufSize - 1024, bufSize}, - // Test with whence SEEK_END and with large negative offset - {-int64(bufSize) * 2, 2, 0, seekErr, true, 0, 0}, - } - - for i, testCase := range testCases { - // Perform seek operation - n, err := r.Seek(testCase.offset, testCase.whence) - // We expect an error - if testCase.err == seekErr && err == nil { - t.Fatalf("Test %d, unexpected err value: expected: %v, found: %v", i+1, testCase.err, err) - } - // We expect a specific error - if testCase.err != seekErr && testCase.err != err { - t.Fatalf("Test %d, unexpected err value: expected: %v, found: %v", i+1, testCase.err, err) - } - // If we expect an error go to the next loop - if testCase.err != nil { - continue - } - // Check the returned seek pos - if n != testCase.pos { - t.Fatalf("Test %d, error: number of bytes seeked does not match, want %v, got %v\n", i+1, - testCase.pos, n) - } - // Compare only if shouldCmp is activated - if testCase.shouldCmp { - cmpData(r, testCase.start, testCase.end) - } - } -} - -// Tests get object ReaderAt interface methods. -func TestGetObjectReadAtFunctional(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := New( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Generate data more than 32K - buf := bytes.Repeat([]byte("3"), rand.Intn(1<<20)+32*1024) - - // Save the data - objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") - n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - if n != int64(len(buf)) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), n) - } - - // read the data back - r, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - offset := int64(2048) - - // read directly - buf1 := make([]byte, 512) - buf2 := make([]byte, 512) - buf3 := make([]byte, 512) - buf4 := make([]byte, 512) - - // Test readAt before stat is called. - m, err := r.ReadAt(buf1, offset) - if err != nil { - t.Fatal("Error:", err, len(buf1), offset) - } - if m != len(buf1) { - t.Fatalf("Error: ReadAt read shorter bytes before reaching EOF, want %v, got %v\n", m, len(buf1)) - } - if !bytes.Equal(buf1, buf[offset:offset+512]) { - t.Fatal("Error: Incorrect read between two ReadAt from same offset.") - } - offset += 512 - - st, err := r.Stat() - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - if st.Size != int64(len(buf)) { - t.Fatalf("Error: number of bytes in stat does not match, want %v, got %v\n", - len(buf), st.Size) - } - - m, err = r.ReadAt(buf2, offset) - if err != nil { - t.Fatal("Error:", err, st.Size, len(buf2), offset) - } - if m != len(buf2) { - t.Fatalf("Error: ReadAt read shorter bytes before reaching EOF, want %v, got %v\n", m, len(buf2)) - } - if !bytes.Equal(buf2, buf[offset:offset+512]) { - t.Fatal("Error: Incorrect read between two ReadAt from same offset.") - } - offset += 512 - m, err = r.ReadAt(buf3, offset) - if err != nil { - t.Fatal("Error:", err, st.Size, len(buf3), offset) - } - if m != len(buf3) { - t.Fatalf("Error: ReadAt read shorter bytes before reaching EOF, want %v, got %v\n", m, len(buf3)) - } - if !bytes.Equal(buf3, buf[offset:offset+512]) { - t.Fatal("Error: Incorrect read between two ReadAt from same offset.") - } - offset += 512 - m, err = r.ReadAt(buf4, offset) - if err != nil { - t.Fatal("Error:", err, st.Size, len(buf4), offset) - } - if m != len(buf4) { - t.Fatalf("Error: ReadAt read shorter bytes before reaching EOF, want %v, got %v\n", m, len(buf4)) - } - if !bytes.Equal(buf4, buf[offset:offset+512]) { - t.Fatal("Error: Incorrect read between two ReadAt from same offset.") - } - - buf5 := make([]byte, n) - // Read the whole object. - m, err = r.ReadAt(buf5, 0) - if err != nil { - if err != io.EOF { - t.Fatal("Error:", err, len(buf5)) - } - } - if m != len(buf5) { - t.Fatalf("Error: ReadAt read shorter bytes before reaching EOF, want %v, got %v\n", m, len(buf5)) - } - if !bytes.Equal(buf, buf5) { - t.Fatal("Error: Incorrect data read in GetObject, than what was previously upoaded.") - } - - buf6 := make([]byte, n+1) - // Read the whole object and beyond. - _, err = r.ReadAt(buf6, 0) - if err != nil { - if err != io.EOF { - t.Fatal("Error:", err, len(buf6)) - } - } - err = c.RemoveObject(bucketName, objectName) - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } -} - -// Test Presigned Post Policy -func TestPresignedPostPolicy(t *testing.T) { - if testing.Short() { - t.Skip("Skipping functional tests for short runs") - } - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object - c, err := NewV4( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket in 'us-east-1' (source bucket). - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Generate data more than 32K - buf := bytes.Repeat([]byte("4"), rand.Intn(1<<20)+32*1024) - - // Save the data - objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") - n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - if n != int64(len(buf)) { - t.Fatalf("Error: number of bytes does not match want %v, got %v", - len(buf), n) - } - - policy := NewPostPolicy() - - if err := policy.SetBucket(""); err == nil { - t.Fatalf("Error: %s", err) - } - if err := policy.SetKey(""); err == nil { - t.Fatalf("Error: %s", err) - } - if err := policy.SetKeyStartsWith(""); err == nil { - t.Fatalf("Error: %s", err) - } - if err := policy.SetExpires(time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC)); err == nil { - t.Fatalf("Error: %s", err) - } - if err := policy.SetContentType(""); err == nil { - t.Fatalf("Error: %s", err) - } - if err := policy.SetContentLengthRange(1024*1024, 1024); err == nil { - t.Fatalf("Error: %s", err) - } - - policy.SetBucket(bucketName) - policy.SetKey(objectName) - policy.SetExpires(time.Now().UTC().AddDate(0, 0, 10)) // expires in 10 days - policy.SetContentType("image/png") - policy.SetContentLengthRange(1024, 1024*1024) - - _, _, err = c.PresignedPostPolicy(policy) - if err != nil { - t.Fatal("Error:", err) - } - - policy = NewPostPolicy() - - // Remove all objects and buckets - err = c.RemoveObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err) - } - - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } -} - -// Tests copy object -func TestCopyObject(t *testing.T) { - if testing.Short() { - t.Skip("Skipping functional tests for short runs") - } - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object - c, err := NewV4( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket in 'us-east-1' (source bucket). - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Make a new bucket in 'us-east-1' (destination bucket). - err = c.MakeBucket(bucketName+"-copy", "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName+"-copy") - } - - // Generate data more than 32K - buf := bytes.Repeat([]byte("5"), rand.Intn(1<<20)+32*1024) - - // Save the data - objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") - n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName) - } - - if n != int64(len(buf)) { - t.Fatalf("Error: number of bytes does not match want %v, got %v", - len(buf), n) - } - - r, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err) - } - // Check the various fields of source object against destination object. - objInfo, err := r.Stat() - if err != nil { - t.Fatal("Error:", err) - } - - // Copy Source - src := NewSourceInfo(bucketName, objectName, nil) - - // Set copy conditions. - - // All invalid conditions first. - err = src.SetModifiedSinceCond(time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC)) - if err == nil { - t.Fatal("Error:", err) - } - err = src.SetUnmodifiedSinceCond(time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC)) - if err == nil { - t.Fatal("Error:", err) - } - err = src.SetMatchETagCond("") - if err == nil { - t.Fatal("Error:", err) - } - err = src.SetMatchETagExceptCond("") - if err == nil { - t.Fatal("Error:", err) - } - - err = src.SetModifiedSinceCond(time.Date(2014, time.April, 0, 0, 0, 0, 0, time.UTC)) - if err != nil { - t.Fatal("Error:", err) - } - err = src.SetMatchETagCond(objInfo.ETag) - if err != nil { - t.Fatal("Error:", err) - } - - dst, err := NewDestinationInfo(bucketName+"-copy", objectName+"-copy", nil, nil) - if err != nil { - t.Fatal(err) - } - - // Perform the Copy - err = c.CopyObject(dst, src) - if err != nil { - t.Fatal("Error:", err, bucketName+"-copy", objectName+"-copy") - } - - // Source object - reader, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err) - } - // Destination object - readerCopy, err := c.GetObject(bucketName+"-copy", objectName+"-copy") - if err != nil { - t.Fatal("Error:", err) - } - // Check the various fields of source object against destination object. - objInfo, err = reader.Stat() - if err != nil { - t.Fatal("Error:", err) - } - objInfoCopy, err := readerCopy.Stat() - if err != nil { - t.Fatal("Error:", err) - } - if objInfo.Size != objInfoCopy.Size { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", - objInfo.Size, objInfoCopy.Size) - } - - // CopyObject again but with wrong conditions - src = NewSourceInfo(bucketName, objectName, nil) - err = src.SetUnmodifiedSinceCond(time.Date(2014, time.April, 0, 0, 0, 0, 0, time.UTC)) - if err != nil { - t.Fatal("Error:", err) - } - err = src.SetMatchETagExceptCond(objInfo.ETag) - if err != nil { - t.Fatal("Error:", err) - } - - // Perform the Copy which should fail - err = c.CopyObject(dst, src) - if err == nil { - t.Fatal("Error:", err, bucketName+"-copy", objectName+"-copy should fail") - } - - // Remove all objects and buckets - err = c.RemoveObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err) - } - - err = c.RemoveObject(bucketName+"-copy", objectName+"-copy") - if err != nil { - t.Fatal("Error:", err) - } - - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } - - err = c.RemoveBucket(bucketName + "-copy") - if err != nil { - t.Fatal("Error:", err) - } -} - -// TestEncryptionPutGet tests client side encryption -func TestEncryptionPutGet(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - // Instantiate new minio client object. - c, err := New( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Generate a symmetric key - symKey := encrypt.NewSymmetricKey([]byte("my-secret-key-00")) - - // Generate an assymmetric key from predefine public and private certificates - privateKey, err := hex.DecodeString( - "30820277020100300d06092a864886f70d0101010500048202613082025d" + - "0201000281810087b42ea73243a3576dc4c0b6fa245d339582dfdbddc20c" + - "bb8ab666385034d997210c54ba79275c51162a1221c3fb1a4c7c61131ca6" + - "5563b319d83474ef5e803fbfa7e52b889e1893b02586b724250de7ac6351" + - "cc0b7c638c980acec0a07020a78eed7eaa471eca4b92071394e061346c06" + - "15ccce2f465dee2080a89e43f29b5702030100010281801dd5770c3af8b3" + - "c85cd18cacad81a11bde1acfac3eac92b00866e142301fee565365aa9af4" + - "57baebf8bb7711054d071319a51dd6869aef3848ce477a0dc5f0dbc0c336" + - "5814b24c820491ae2bb3c707229a654427e03307fec683e6b27856688f08" + - "bdaa88054c5eeeb773793ff7543ee0fb0e2ad716856f2777f809ef7e6fa4" + - "41024100ca6b1edf89e8a8f93cce4b98c76c6990a09eb0d32ad9d3d04fbf" + - "0b026fa935c44f0a1c05dd96df192143b7bda8b110ec8ace28927181fd8c" + - "d2f17330b9b63535024100aba0260afb41489451baaeba423bee39bcbd1e" + - "f63dd44ee2d466d2453e683bf46d019a8baead3a2c7fca987988eb4d565e" + - "27d6be34605953f5034e4faeec9bdb0241009db2cb00b8be8c36710aff96" + - "6d77a6dec86419baca9d9e09a2b761ea69f7d82db2ae5b9aae4246599bb2" + - "d849684d5ab40e8802cfe4a2b358ad56f2b939561d2902404e0ead9ecafd" + - "bb33f22414fa13cbcc22a86bdf9c212ce1a01af894e3f76952f36d6c904c" + - "bd6a7e0de52550c9ddf31f1e8bfe5495f79e66a25fca5c20b3af5b870241" + - "0083456232aa58a8c45e5b110494599bda8dbe6a094683a0539ddd24e19d" + - "47684263bbe285ad953d725942d670b8f290d50c0bca3d1dc9688569f1d5" + - "9945cb5c7d") - - if err != nil { - t.Fatal(err) - } - - publicKey, err := hex.DecodeString("30819f300d06092a864886f70d010101050003818d003081890281810087" + - "b42ea73243a3576dc4c0b6fa245d339582dfdbddc20cbb8ab666385034d9" + - "97210c54ba79275c51162a1221c3fb1a4c7c61131ca65563b319d83474ef" + - "5e803fbfa7e52b889e1893b02586b724250de7ac6351cc0b7c638c980ace" + - "c0a07020a78eed7eaa471eca4b92071394e061346c0615ccce2f465dee20" + - "80a89e43f29b570203010001") - if err != nil { - t.Fatal(err) - } - - // Generate an asymmetric key - asymKey, err := encrypt.NewAsymmetricKey(privateKey, publicKey) - if err != nil { - t.Fatal(err) - } - - // Object custom metadata - customContentType := "custom/contenttype" - - testCases := []struct { - buf []byte - encKey encrypt.Key - }{ - {encKey: symKey, buf: bytes.Repeat([]byte("F"), 0)}, - {encKey: symKey, buf: bytes.Repeat([]byte("F"), 1)}, - {encKey: symKey, buf: bytes.Repeat([]byte("F"), 15)}, - {encKey: symKey, buf: bytes.Repeat([]byte("F"), 16)}, - {encKey: symKey, buf: bytes.Repeat([]byte("F"), 17)}, - {encKey: symKey, buf: bytes.Repeat([]byte("F"), 31)}, - {encKey: symKey, buf: bytes.Repeat([]byte("F"), 32)}, - {encKey: symKey, buf: bytes.Repeat([]byte("F"), 33)}, - {encKey: symKey, buf: bytes.Repeat([]byte("F"), 1024)}, - {encKey: symKey, buf: bytes.Repeat([]byte("F"), 1024*2)}, - {encKey: symKey, buf: bytes.Repeat([]byte("F"), 1024*1024)}, - - {encKey: asymKey, buf: bytes.Repeat([]byte("F"), 0)}, - {encKey: asymKey, buf: bytes.Repeat([]byte("F"), 1)}, - {encKey: asymKey, buf: bytes.Repeat([]byte("F"), 16)}, - {encKey: asymKey, buf: bytes.Repeat([]byte("F"), 32)}, - {encKey: asymKey, buf: bytes.Repeat([]byte("F"), 1024)}, - {encKey: asymKey, buf: bytes.Repeat([]byte("F"), 1024*1024)}, - } - - for i, testCase := range testCases { - // Generate a random object name - objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") - - // Secured object - cbcMaterials, err := encrypt.NewCBCSecureMaterials(testCase.encKey) - if err != nil { - t.Fatal(err) - } - - // Put encrypted data - _, err = c.PutEncryptedObject(bucketName, objectName, bytes.NewReader(testCase.buf), cbcMaterials, map[string][]string{"Content-Type": {customContentType}}, nil) - if err != nil { - t.Fatalf("Test %d, error: %v %v %v", i+1, err, bucketName, objectName) - } - - // Read the data back - r, err := c.GetEncryptedObject(bucketName, objectName, cbcMaterials) - if err != nil { - t.Fatalf("Test %d, error: %v %v %v", i+1, err, bucketName, objectName) - } - defer r.Close() - - // Compare the sent object with the received one - recvBuffer := bytes.NewBuffer([]byte{}) - if _, err = io.Copy(recvBuffer, r); err != nil { - t.Fatalf("Test %d, error: %v", i+1, err) - } - if recvBuffer.Len() != len(testCase.buf) { - t.Fatalf("Test %d, error: number of bytes of received object does not match, want %v, got %v\n", - i+1, len(testCase.buf), recvBuffer.Len()) - } - if !bytes.Equal(testCase.buf, recvBuffer.Bytes()) { - t.Fatalf("Test %d, error: Encrypted sent is not equal to decrypted, want `%x`, go `%x`", i+1, testCase.buf, recvBuffer.Bytes()) - } - - // Remove test object - err = c.RemoveObject(bucketName, objectName) - if err != nil { - t.Fatalf("Test %d, error: %v", i+1, err) - } - - } - - // Remove test bucket - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } - -} - -func TestBucketNotification(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - if os.Getenv("NOTIFY_BUCKET") == "" || - os.Getenv("NOTIFY_SERVICE") == "" || - os.Getenv("NOTIFY_REGION") == "" || - os.Getenv("NOTIFY_ACCOUNTID") == "" || - os.Getenv("NOTIFY_RESOURCE") == "" { - t.Skip("skipping notification test if not configured") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - c, err := New( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable to debug - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - bucketName := os.Getenv("NOTIFY_BUCKET") - - topicArn := NewArn("aws", os.Getenv("NOTIFY_SERVICE"), os.Getenv("NOTIFY_REGION"), os.Getenv("NOTIFY_ACCOUNTID"), os.Getenv("NOTIFY_RESOURCE")) - queueArn := NewArn("aws", "dummy-service", "dummy-region", "dummy-accountid", "dummy-resource") - - topicConfig := NewNotificationConfig(topicArn) - topicConfig.AddEvents(ObjectCreatedAll, ObjectRemovedAll) - topicConfig.AddFilterSuffix("jpg") - - queueConfig := NewNotificationConfig(queueArn) - queueConfig.AddEvents(ObjectCreatedAll) - queueConfig.AddFilterPrefix("photos/") - - bNotification := BucketNotification{} - bNotification.AddTopic(topicConfig) - - // Add the same topicConfig again, should have no effect - // because it is duplicated - bNotification.AddTopic(topicConfig) - if len(bNotification.TopicConfigs) != 1 { - t.Fatal("Error: duplicated entry added") - } - - // Add and remove a queue config - bNotification.AddQueue(queueConfig) - bNotification.RemoveQueueByArn(queueArn) - - err = c.SetBucketNotification(bucketName, bNotification) - if err != nil { - t.Fatal("Error: ", err) - } - - bNotification, err = c.GetBucketNotification(bucketName) - if err != nil { - t.Fatal("Error: ", err) - } - - if len(bNotification.TopicConfigs) != 1 { - t.Fatal("Error: Topic config is empty") - } - - if bNotification.TopicConfigs[0].Filter.S3Key.FilterRules[0].Value != "jpg" { - t.Fatal("Error: cannot get the suffix") - } - - err = c.RemoveAllBucketNotification(bucketName) - if err != nil { - t.Fatal("Error: cannot delete bucket notification") - } -} - -// Tests comprehensive list of all methods. -func TestFunctional(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - - // Seed random based on current time. - rand.Seed(time.Now().Unix()) - - c, err := New( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable to debug - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Generate a new random bucket name. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - - // Make a new bucket. - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - - // Generate a random file name. - fileName := randString(60, rand.NewSource(time.Now().UnixNano()), "") - file, err := os.Create(fileName) - if err != nil { - t.Fatal("Error:", err) - } - for i := 0; i < 3; i++ { - buf := make([]byte, rand.Intn(1<<19)) - _, err = file.Write(buf) - if err != nil { - t.Fatal("Error:", err) - } - } - file.Close() - - // Verify if bucket exits and you have access. - var exists bool - exists, err = c.BucketExists(bucketName) - if err != nil { - t.Fatal("Error:", err, bucketName) - } - if !exists { - t.Fatal("Error: could not find ", bucketName) - } - - // Asserting the default bucket policy. - policyAccess, err := c.GetBucketPolicy(bucketName, "") - if err != nil { - t.Fatal("Error:", err) - } - if policyAccess != "none" { - t.Fatalf("Default bucket policy incorrect") - } - // Set the bucket policy to 'public readonly'. - err = c.SetBucketPolicy(bucketName, "", policy.BucketPolicyReadOnly) - if err != nil { - t.Fatal("Error:", err) - } - // should return policy `readonly`. - policyAccess, err = c.GetBucketPolicy(bucketName, "") - if err != nil { - t.Fatal("Error:", err) - } - if policyAccess != "readonly" { - t.Fatalf("Expected bucket policy to be readonly") - } - - // Make the bucket 'public writeonly'. - err = c.SetBucketPolicy(bucketName, "", policy.BucketPolicyWriteOnly) - if err != nil { - t.Fatal("Error:", err) - } - // should return policy `writeonly`. - policyAccess, err = c.GetBucketPolicy(bucketName, "") - if err != nil { - t.Fatal("Error:", err) - } - if policyAccess != "writeonly" { - t.Fatalf("Expected bucket policy to be writeonly") - } - // Make the bucket 'public read/write'. - err = c.SetBucketPolicy(bucketName, "", policy.BucketPolicyReadWrite) - if err != nil { - t.Fatal("Error:", err) - } - // should return policy `readwrite`. - policyAccess, err = c.GetBucketPolicy(bucketName, "") - if err != nil { - t.Fatal("Error:", err) - } - if policyAccess != "readwrite" { - t.Fatalf("Expected bucket policy to be readwrite") - } - // List all buckets. - buckets, err := c.ListBuckets() - if len(buckets) == 0 { - t.Fatal("Error: list buckets cannot be empty", buckets) - } - if err != nil { - t.Fatal("Error:", err) - } - - // Verify if previously created bucket is listed in list buckets. - bucketFound := false - for _, bucket := range buckets { - if bucket.Name == bucketName { - bucketFound = true - } - } - - // If bucket not found error out. - if !bucketFound { - t.Fatal("Error: bucket ", bucketName, "not found") - } - - objectName := bucketName + "unique" - - // Generate data - buf := bytes.Repeat([]byte("f"), 1<<19) - - n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "") - if err != nil { - t.Fatal("Error: ", err) - } - if n != int64(len(buf)) { - t.Fatal("Error: bad length ", n, len(buf)) - } - - n, err = c.PutObject(bucketName, objectName+"-nolength", bytes.NewReader(buf), "binary/octet-stream") - if err != nil { - t.Fatal("Error:", err, bucketName, objectName+"-nolength") - } - - if n != int64(len(buf)) { - t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), n) - } - - // Instantiate a done channel to close all listing. - doneCh := make(chan struct{}) - defer close(doneCh) - - objFound := false - isRecursive := true // Recursive is true. - for obj := range c.ListObjects(bucketName, objectName, isRecursive, doneCh) { - if obj.Key == objectName { - objFound = true - break - } - } - if !objFound { - t.Fatal("Error: object " + objectName + " not found.") - } - - objFound = false - isRecursive = true // Recursive is true. - for obj := range c.ListObjectsV2(bucketName, objectName, isRecursive, doneCh) { - if obj.Key == objectName { - objFound = true - break - } - } - if !objFound { - t.Fatal("Error: object " + objectName + " not found.") - } - - incompObjNotFound := true - for objIncompl := range c.ListIncompleteUploads(bucketName, objectName, isRecursive, doneCh) { - if objIncompl.Key != "" { - incompObjNotFound = false - break - } - } - if !incompObjNotFound { - t.Fatal("Error: unexpected dangling incomplete upload found.") - } - - newReader, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatal("Error: ", err) - } - - newReadBytes, err := ioutil.ReadAll(newReader) - if err != nil { - t.Fatal("Error: ", err) - } - - if !bytes.Equal(newReadBytes, buf) { - t.Fatal("Error: bytes mismatch.") - } - - err = c.FGetObject(bucketName, objectName, fileName+"-f") - if err != nil { - t.Fatal("Error: ", err) - } - - // Generate presigned GET object url. - presignedGetURL, err := c.PresignedGetObject(bucketName, objectName, 3600*time.Second, nil) - if err != nil { - t.Fatal("Error: ", err) - } - - // Verify if presigned url works. - resp, err := http.Get(presignedGetURL.String()) - if err != nil { - t.Fatal("Error: ", err) - } - if resp.StatusCode != http.StatusOK { - t.Fatal("Error: ", resp.Status) - } - newPresignedBytes, err := ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal("Error: ", err) - } - if !bytes.Equal(newPresignedBytes, buf) { - t.Fatal("Error: bytes mismatch.") - } - - // Set request parameters. - reqParams := make(url.Values) - reqParams.Set("response-content-disposition", "attachment; filename=\"test.txt\"") - presignedGetURL, err = c.PresignedGetObject(bucketName, objectName, 3600*time.Second, reqParams) - if err != nil { - t.Fatal("Error: ", err) - } - // Verify if presigned url works. - resp, err = http.Get(presignedGetURL.String()) - if err != nil { - t.Fatal("Error: ", err) - } - if resp.StatusCode != http.StatusOK { - t.Fatal("Error: ", resp.Status) - } - newPresignedBytes, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal("Error: ", err) - } - if !bytes.Equal(newPresignedBytes, buf) { - t.Fatal("Error: bytes mismatch for presigned GET URL.") - } - if resp.Header.Get("Content-Disposition") != "attachment; filename=\"test.txt\"" { - t.Fatalf("Error: wrong Content-Disposition received %s", resp.Header.Get("Content-Disposition")) - } - - presignedPutURL, err := c.PresignedPutObject(bucketName, objectName+"-presigned", 3600*time.Second) - if err != nil { - t.Fatal("Error: ", err) - } - - buf = bytes.Repeat([]byte("g"), 1<<19) - - req, err := http.NewRequest("PUT", presignedPutURL.String(), bytes.NewReader(buf)) - if err != nil { - t.Fatal("Error: ", err) - } - httpClient := &http.Client{ - // Setting a sensible time out of 30secs to wait for response - // headers. Request is pro-actively cancelled after 30secs - // with no response. - Timeout: 30 * time.Second, - Transport: http.DefaultTransport, - } - resp, err = httpClient.Do(req) - if err != nil { - t.Fatal("Error: ", err) - } - - newReader, err = c.GetObject(bucketName, objectName+"-presigned") - if err != nil { - t.Fatal("Error: ", err) - } - - newReadBytes, err = ioutil.ReadAll(newReader) - if err != nil { - t.Fatal("Error: ", err) - } - - if !bytes.Equal(newReadBytes, buf) { - t.Fatal("Error: bytes mismatch.") - } - - err = c.RemoveObject(bucketName, objectName) - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveObject(bucketName, objectName+"-f") - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveObject(bucketName, objectName+"-nolength") - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveObject(bucketName, objectName+"-presigned") - if err != nil { - t.Fatal("Error: ", err) - } - err = c.RemoveBucket(bucketName) - if err != nil { - t.Fatal("Error:", err) - } - err = c.RemoveBucket(bucketName) - if err == nil { - t.Fatal("Error:") - } - if err.Error() != "The specified bucket does not exist" { - t.Fatal("Error: ", err) - } - if err = os.Remove(fileName); err != nil { - t.Fatal("Error: ", err) - } - if err = os.Remove(fileName + "-f"); err != nil { - t.Fatal("Error: ", err) - } -} - -// Test for validating GetObject Reader* methods functioning when the -// object is modified in the object store. -func TestGetObjectObjectModified(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - - // Instantiate new minio client object. - c, err := NewV4( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Make a new bucket. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - defer c.RemoveBucket(bucketName) - - // Upload an object. - objectName := "myobject" - content := "helloworld" - _, err = c.PutObject(bucketName, objectName, strings.NewReader(content), "application/text") - if err != nil { - t.Fatalf("Failed to upload %s/%s: %v", bucketName, objectName, err) - } - - defer c.RemoveObject(bucketName, objectName) - - reader, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatalf("Failed to get object %s/%s: %v", bucketName, objectName, err) - } - defer reader.Close() - - // Read a few bytes of the object. - b := make([]byte, 5) - n, err := reader.ReadAt(b, 0) - if err != nil { - t.Fatalf("Failed to read object %s/%s at an offset: %v", bucketName, objectName, err) - } - - // Upload different contents to the same object while object is being read. - newContent := "goodbyeworld" - _, err = c.PutObject(bucketName, objectName, strings.NewReader(newContent), "application/text") - if err != nil { - t.Fatalf("Failed to upload %s/%s: %v", bucketName, objectName, err) - } - - // Confirm that a Stat() call in between doesn't change the Object's cached etag. - _, err = reader.Stat() - if err.Error() != s3ErrorResponseMap["PreconditionFailed"] { - t.Errorf("Expected Stat to fail with error %s but received %s", s3ErrorResponseMap["PreconditionFailed"], err.Error()) - } - - // Read again only to find object contents have been modified since last read. - _, err = reader.ReadAt(b, int64(n)) - if err.Error() != s3ErrorResponseMap["PreconditionFailed"] { - t.Errorf("Expected ReadAt to fail with error %s but received %s", s3ErrorResponseMap["PreconditionFailed"], err.Error()) - } -} - -// Test validates putObject to upload a file seeked at a given offset. -func TestPutObjectUploadSeekedObject(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - - // Instantiate new minio client object. - c, err := NewV4( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // Enable tracing, write to stderr. - // c.TraceOn(os.Stderr) - - // Set user agent. - c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") - - // Make a new bucket. - bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") - err = c.MakeBucket(bucketName, "us-east-1") - if err != nil { - t.Fatal("Error:", err, bucketName) - } - defer c.RemoveBucket(bucketName) - - tempfile, err := ioutil.TempFile("", "minio-go-upload-test-") - if err != nil { - t.Fatal("Error:", err) - } - - var length = 120000 - data := bytes.Repeat([]byte("1"), length) - - if _, err = tempfile.Write(data); err != nil { - t.Fatal("Error:", err) - } - - objectName := fmt.Sprintf("test-file-%v", rand.Uint32()) - - offset := length / 2 - if _, err := tempfile.Seek(int64(offset), 0); err != nil { - t.Fatal("Error:", err) - } - - n, err := c.PutObject(bucketName, objectName, tempfile, "binary/octet-stream") - if err != nil { - t.Fatal("Error:", err) - } - if n != int64(length-offset) { - t.Fatalf("Invalid length returned, want %v, got %v", int64(length-offset), n) - } - tempfile.Close() - if err = os.Remove(tempfile.Name()); err != nil { - t.Fatal("Error:", err) - } - - length = int(n) - - obj, err := c.GetObject(bucketName, objectName) - if err != nil { - t.Fatal("Error:", err) - } - - n, err = obj.Seek(int64(offset), 0) - if err != nil { - t.Fatal("Error:", err) - } - if n != int64(offset) { - t.Fatalf("Invalid offset returned, want %v, got %v", int64(offset), n) - } - - n, err = c.PutObject(bucketName, objectName+"getobject", obj, "binary/octet-stream") - if err != nil { - t.Fatal("Error:", err) - } - if n != int64(length-offset) { - t.Fatalf("Invalid length returned, want %v, got %v", int64(length-offset), n) - } - - if err = c.RemoveObject(bucketName, objectName); err != nil { - t.Fatal("Error:", err) - } - - if err = c.RemoveObject(bucketName, objectName+"getobject"); err != nil { - t.Fatal("Error:", err) - } -} - -// Test expected error cases -func TestComposeObjectErrorCases(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - - // Instantiate new minio client object - c, err := NewV4( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - testComposeObjectErrorCases(c, t) -} - -// Test concatenating 10K objects -func TestCompose10KSources(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - - // Instantiate new minio client object - c, err := NewV4( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - testComposeMultipleSources(c, t) -} - -// Test encrypted copy object -func TestEncryptedCopyObject(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - - // Instantiate new minio client object - c, err := NewV4( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // c.TraceOn(os.Stderr) - testEncryptedCopyObject(c, t) -} - -func TestUserMetadataCopying(t *testing.T) { - if testing.Short() { - t.Skip("skipping functional tests for the short runs") - } - - // Instantiate new minio client object - c, err := NewV4( - os.Getenv(serverEndpoint), - os.Getenv(accessKey), - os.Getenv(secretKey), - mustParseBool(os.Getenv(enableSecurity)), - ) - if err != nil { - t.Fatal("Error:", err) - } - - // c.TraceOn(os.Stderr) - testUserMetadataCopying(c, t) -} diff --git a/vendor/github.com/minio/minio-go/api_unit_test.go b/vendor/github.com/minio/minio-go/api_unit_test.go index 2a9db3cb6..f15a6eed3 100644 --- a/vendor/github.com/minio/minio-go/api_unit_test.go +++ b/vendor/github.com/minio/minio-go/api_unit_test.go @@ -164,6 +164,50 @@ func TestGetReaderSize(t *testing.T) { } } +// Tests get region from host URL. +func TestGetRegionFromURL(t *testing.T) { + testCases := []struct { + u url.URL + expectedRegion string + }{ + { + u: url.URL{Host: "storage.googleapis.com"}, + expectedRegion: "", + }, + { + u: url.URL{Host: "s3.cn-north-1.amazonaws.com.cn"}, + expectedRegion: "cn-north-1", + }, + { + u: url.URL{Host: "s3-fips-us-gov-west-1.amazonaws.com"}, + expectedRegion: "us-gov-west-1", + }, + { + u: url.URL{Host: "s3-us-gov-west-1.amazonaws.com"}, + expectedRegion: "us-gov-west-1", + }, + { + u: url.URL{Host: "192.168.1.1"}, + expectedRegion: "", + }, + { + u: url.URL{Host: "s3-eu-west-1.amazonaws.com"}, + expectedRegion: "eu-west-1", + }, + { + u: url.URL{Host: "s3.amazonaws.com"}, + expectedRegion: "", + }, + } + + for i, testCase := range testCases { + region := getRegionFromURL(testCase.u) + if testCase.expectedRegion != region { + t.Errorf("Test %d: Expected region %s, got %s", i+1, testCase.expectedRegion, region) + } + } +} + // Tests valid hosts for location. func TestValidBucketLocation(t *testing.T) { s3Hosts := []struct { diff --git a/vendor/github.com/minio/minio-go/appveyor.yml b/vendor/github.com/minio/minio-go/appveyor.yml index 4f5c1b390..0f623d3d4 100644 --- a/vendor/github.com/minio/minio-go/appveyor.yml +++ b/vendor/github.com/minio/minio-go/appveyor.yml @@ -21,6 +21,7 @@ install: - go get -u github.com/minio/go-homedir - go get -u github.com/remyoudompheng/go-misc/deadcode - go get -u github.com/gordonklaus/ineffassign + - go get -u github.com/dustin/go-humanize # to run your custom scripts instead of automatic MSBuild build_script: diff --git a/vendor/github.com/minio/minio-go/bucket-cache.go b/vendor/github.com/minio/minio-go/bucket-cache.go index 6d2a40f78..3ad06da3a 100644 --- a/vendor/github.com/minio/minio-go/bucket-cache.go +++ b/vendor/github.com/minio/minio-go/bucket-cache.go @@ -91,20 +91,6 @@ func (c Client) getBucketLocation(bucketName string) (string, error) { return c.region, nil } - if s3utils.IsAmazonChinaEndpoint(c.endpointURL) { - // For china specifically we need to set everything to - // cn-north-1 for now, there is no easier way until AWS S3 - // provides a cleaner compatible API across "us-east-1" and - // China region. - return "cn-north-1", nil - } else if s3utils.IsAmazonGovCloudEndpoint(c.endpointURL) { - // For us-gov specifically we need to set everything to - // us-gov-west-1 for now, there is no easier way until AWS S3 - // provides a cleaner compatible API across "us-east-1" and - // Gov cloud region. - return "us-gov-west-1", nil - } - if location, ok := c.bucketLocCache.Get(bucketName); ok { return location, nil } @@ -213,20 +199,24 @@ func (c Client) getBucketLocationRequest(bucketName string) (*http.Request, erro signerType = credentials.SignatureAnonymous } - // Set sha256 sum for signature calculation only with signature version '4'. - switch { - case signerType.IsV4(): - var contentSha256 string - if c.secure { - contentSha256 = unsignedPayload - } else { - contentSha256 = hex.EncodeToString(sum256([]byte{})) - } - req.Header.Set("X-Amz-Content-Sha256", contentSha256) - req = s3signer.SignV4(*req, accessKeyID, secretAccessKey, sessionToken, "us-east-1") - case signerType.IsV2(): - req = s3signer.SignV2(*req, accessKeyID, secretAccessKey) + if signerType.IsAnonymous() { + return req, nil } + if signerType.IsV2() { + req = s3signer.SignV2(*req, accessKeyID, secretAccessKey) + return req, nil + } + + // Set sha256 sum for signature calculation only with signature version '4'. + var contentSha256 string + if c.secure { + contentSha256 = unsignedPayload + } else { + contentSha256 = hex.EncodeToString(sum256([]byte{})) + } + + req.Header.Set("X-Amz-Content-Sha256", contentSha256) + req = s3signer.SignV4(*req, accessKeyID, secretAccessKey, sessionToken, "us-east-1") return req, nil } diff --git a/vendor/github.com/minio/minio-go/core_test.go b/vendor/github.com/minio/minio-go/core_test.go index 81e1cd5bf..8cadc251b 100644 --- a/vendor/github.com/minio/minio-go/core_test.go +++ b/vendor/github.com/minio/minio-go/core_test.go @@ -18,14 +18,15 @@ package minio import ( "bytes" - "crypto/md5" - "io" - "math/rand" + "log" "os" "reflect" "testing" "time" + + "crypto/md5" + "math/rand" ) const ( @@ -35,6 +36,33 @@ const ( enableSecurity = "ENABLE_HTTPS" ) +// Minimum part size +const MinPartSize = 1024 * 1024 * 64 +const letterBytes = "abcdefghijklmnopqrstuvwxyz01234569" +const ( + letterIdxBits = 6 // 6 bits to represent a letter index + letterIdxMask = 1<= 0; { + if remain == 0 { + cache, remain = src.Int63(), letterIdxMax + } + if idx := int(cache & letterIdxMask); idx < len(letterBytes) { + b[i] = letterBytes[idx] + i-- + } + cache >>= letterIdxBits + remain-- + } + return prefix + string(b[0:30-len(prefix)]) +} + // Tests for Core GetObject() function. func TestGetObjectCore(t *testing.T) { if testing.Short() { @@ -209,6 +237,76 @@ func TestGetObjectCore(t *testing.T) { } } +// Tests GetObject to return Content-Encoding properly set +// and overrides any auto decoding. +func TestGetObjectContentEncoding(t *testing.T) { + if testing.Short() { + t.Skip("skipping functional tests for the short runs") + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio core client object. + c, err := NewCore( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableSecurity)), + ) + if err != nil { + t.Fatal("Error:", err) + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + t.Fatal("Error:", err, bucketName) + } + + // Generate data more than 32K + buf := bytes.Repeat([]byte("3"), rand.Intn(1<<20)+32*1024) + m := make(map[string][]string) + m["Content-Encoding"] = []string{"gzip"} + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + n, err := c.Client.PutObjectWithMetadata(bucketName, objectName, bytes.NewReader(buf), m, nil) + if err != nil { + t.Fatal("Error:", err, bucketName, objectName) + } + + if n != int64(len(buf)) { + t.Fatalf("Error: number of bytes does not match, want %v, got %v\n", len(buf), n) + } + + reqHeaders := NewGetReqHeaders() + rwc, objInfo, err := c.GetObject(bucketName, objectName, reqHeaders) + if err != nil { + t.Fatalf("Error: %v", err) + } + rwc.Close() + if objInfo.Size <= 0 { + t.Fatalf("Unexpected size of the object %v, expected %v", objInfo.Size, n) + } + value, ok := objInfo.Metadata["Content-Encoding"] + if !ok { + t.Fatalf("Expected Content-Encoding metadata to be set.") + } + if value[0] != "gzip" { + t.Fatalf("Unexpected content-encoding found, want gzip, got %v", value) + } +} + // Tests get bucket policy core API. func TestGetBucketPolicy(t *testing.T) { if testing.Short() { @@ -321,11 +419,6 @@ func TestCorePutObject(t *testing.T) { t.Fatal("Error expected: nil, got: ", err) } - objInfo, err = c.PutObject(bucketName, objectName, int64(len(buf)), bytes.NewReader(buf), nil, sum256(nil), metadata) - if err == nil { - t.Fatal("Error expected: nil, got: ", err) - } - objInfo, err = c.PutObject(bucketName, objectName, int64(len(buf)), bytes.NewReader(buf), nil, nil, metadata) if err != nil { t.Fatal("Error:", err, bucketName, objectName) @@ -373,3 +466,48 @@ func TestCorePutObject(t *testing.T) { t.Fatal("Error:", err) } } + +func TestCoreGetObjectMetadata(t *testing.T) { + if testing.Short() { + t.Skip("skipping functional tests for the short runs") + } + + core, err := NewCore( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableSecurity))) + if err != nil { + log.Fatalln(err) + } + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + + // Make a new bucket. + err = core.MakeBucket(bucketName, "us-east-1") + if err != nil { + t.Fatal("Error:", err, bucketName) + } + + metadata := map[string][]string{ + "X-Amz-Meta-Key-1": {"Val-1"}, + } + + _, err = core.PutObject(bucketName, "my-objectname", 5, + bytes.NewReader([]byte("hello")), nil, nil, metadata) + if err != nil { + log.Fatalln(err) + } + + reader, objInfo, err := core.GetObject(bucketName, "my-objectname", + RequestHeaders{}) + if err != nil { + log.Fatalln(err) + } + defer reader.Close() + + if objInfo.Metadata.Get("X-Amz-Meta-Key-1") != "Val-1" { + log.Fatalln("Expected metadata to be available but wasn't") + } +} diff --git a/vendor/github.com/minio/minio-go/docs/API.md b/vendor/github.com/minio/minio-go/docs/API.md index e0d0a11e6..bfdd42db6 100644 --- a/vendor/github.com/minio/minio-go/docs/API.md +++ b/vendor/github.com/minio/minio-go/docs/API.md @@ -54,11 +54,12 @@ func main() { | :--- | :--- | :--- | :--- | :--- | :--- | | [`MakeBucket`](#MakeBucket) | [`GetObject`](#GetObject) | [`NewSymmetricKey`](#NewSymmetricKey) | [`PresignedGetObject`](#PresignedGetObject) | [`SetBucketPolicy`](#SetBucketPolicy) | [`SetAppInfo`](#SetAppInfo) | | [`ListBuckets`](#ListBuckets) | [`PutObject`](#PutObject) | [`NewAsymmetricKey`](#NewAsymmetricKey) | [`PresignedPutObject`](#PresignedPutObject) | [`GetBucketPolicy`](#GetBucketPolicy) | [`SetCustomTransport`](#SetCustomTransport) | -| [`BucketExists`](#BucketExists) | [`CopyObject`](#CopyObject) | [`GetEncryptedObject`](#GetEncryptedObject) | [`PresignedPostPolicy`](#PresignedPostPolicy) | [`ListBucketPolicies`](#ListBucketPolicies) | [`TraceOn`](#TraceOn) | -| [`RemoveBucket`](#RemoveBucket) | [`StatObject`](#StatObject) | [`PutObjectStreaming`](#PutObjectStreaming) | | [`SetBucketNotification`](#SetBucketNotification) | [`TraceOff`](#TraceOff) | -| [`ListObjects`](#ListObjects) | [`RemoveObject`](#RemoveObject) | [`PutEncryptedObject`](#PutEncryptedObject) | | [`GetBucketNotification`](#GetBucketNotification) | [`SetS3TransferAccelerate`](#SetS3TransferAccelerate) | -| [`ListObjectsV2`](#ListObjectsV2) | [`RemoveObjects`](#RemoveObjects) | [`NewSSEInfo`](#NewSSEInfo) | | [`RemoveAllBucketNotification`](#RemoveAllBucketNotification) | | -| [`ListIncompleteUploads`](#ListIncompleteUploads) | [`RemoveIncompleteUpload`](#RemoveIncompleteUpload) | | | [`ListenBucketNotification`](#ListenBucketNotification) | | +| [`BucketExists`](#BucketExists) | [`PutObjectStreaming`](#PutObjectStreaming) | [`GetEncryptedObject`](#GetEncryptedObject) | [`PresignedPostPolicy`](#PresignedPostPolicy) | [`ListBucketPolicies`](#ListBucketPolicies) | [`TraceOn`](#TraceOn) | +| [`RemoveBucket`](#RemoveBucket) | [`CopyObject`](#CopyObject) | [`PutEncryptedObject`](#PutEncryptedObject) | | [`SetBucketNotification`](#SetBucketNotification) | [`TraceOff`](#TraceOff) | +| [`ListObjects`](#ListObjects) | [`StatObject`](#StatObject) | [`NewSSEInfo`](#NewSSEInfo) | | [`GetBucketNotification`](#GetBucketNotification) | [`SetS3TransferAccelerate`](#SetS3TransferAccelerate) | +| [`ListObjectsV2`](#ListObjectsV2) | [`RemoveObject`](#RemoveObject) | | | [`RemoveAllBucketNotification`](#RemoveAllBucketNotification) | | +| [`ListIncompleteUploads`](#ListIncompleteUploads) | [`RemoveObjects`](#RemoveObjects) | | | [`ListenBucketNotification`](#ListenBucketNotification) | | +| | [`RemoveIncompleteUpload`](#RemoveIncompleteUpload) | | | | | | | [`FPutObject`](#FPutObject) | | | | | | | [`FGetObject`](#FGetObject) | | | | | | | [`ComposeObject`](#ComposeObject) | | | | | @@ -531,9 +532,13 @@ __Example__ src := minio.NewSourceInfo("my-sourcebucketname", "my-sourceobjectname", nil) // Destination object -dst := minio.NewDestinationInfo("my-bucketname", "my-objectname", nil, nil) +dst, err := minio.NewDestinationInfo("my-bucketname", "my-objectname", nil, nil) +if err != nil { + fmt.Println(err) + return +} -/ Copy object call +// Copy object call err = s3Client.CopyObject(dst, src) if err != nil { fmt.Println(err) @@ -562,9 +567,13 @@ src.SetUnmodifiedSinceCond(time.Date(2014, time.April, 23, 0, 0, 0, 0, time.UTC) src.SetRange(0, 1024*1024-1) // Destination object -dst := minio.NewDestinationInfo("my-bucketname", "my-objectname", nil, nil) +dst, err := minio.NewDestinationInfo("my-bucketname", "my-objectname", nil, nil) +if err != nil { + fmt.Println(err) + return +} -/ Copy object call +// Copy object call err = s3Client.CopyObject(dst, src) if err != nil { fmt.Println(err) @@ -648,7 +657,7 @@ src := NewSourceInfo("bucket", "object", decKey) ``` -### NewDestinationInfo(bucket, object string, encryptSSEC *SSEInfo, userMeta map[string]string) DestinationInfo +### NewDestinationInfo(bucket, object string, encryptSSEC *SSEInfo, userMeta map[string]string) (DestinationInfo, error) Construct a `DestinationInfo` object that can be used as the destination object for server-side copying operations like `CopyObject` and `ComposeObject`. @@ -665,11 +674,11 @@ __Example__ ``` go // No encryption parameter. -src := NewDestinationInfo("bucket", "object", nil, nil) +dst, err := NewDestinationInfo("bucket", "object", nil, nil) // With encryption parameter. encKey := NewSSEKey([]byte{1,2,3}, "") -src := NewDecryptionInfo("bucket", "object", encKey, nil) +dst, err := NewDecryptionInfo("bucket", "object", encKey, nil) ``` @@ -1059,8 +1068,6 @@ Generates a presigned URL for HTTP PUT operations. Browsers/Mobile clients may p NOTE: you can upload to S3 only with specified object name. - - __Parameters__ @@ -1085,6 +1092,37 @@ if err != nil { fmt.Println(presignedURL) ``` + +### PresignedHeadObject(bucketName, objectName string, expiry time.Duration, reqParams url.Values) (*url.URL, error) + +Generates a presigned URL for HTTP HEAD operations. Browsers/Mobile clients may point to this URL to directly get metadata from objects even if the bucket is private. This presigned URL can have an associated expiration time in seconds after which it is no longer operational. The default expiry is set to 7 days. + +__Parameters__ + +|Param |Type |Description | +|:---|:---| :---| +|`bucketName` | _string_ |Name of the bucket | +|`objectName` | _string_ |Name of the object | +|`expiry` | _time.Duration_ |Expiry of presigned URL in seconds | +|`reqParams` | _url.Values_ |Additional response header overrides supports _response-expires_, _response-content-type_, _response-cache-control_, _response-content-disposition_. | + + +__Example__ + + +```go +// Set request parameters for content-disposition. +reqParams := make(url.Values) +reqParams.Set("response-content-disposition", "attachment; filename=\"your-filename.txt\"") + +// Generates a presigned url which expires in a day. +presignedURL, err := minioClient.PresignedHeadObject("mybucket", "myobject", time.Second * 24 * 60 * 60, reqParams) +if err != nil { + fmt.Println(err) + return +} +``` + ### PresignedPostPolicy(PostPolicy) (*url.URL, map[string]string, error) @@ -1092,7 +1130,6 @@ Allows setting policy conditions to a presigned URL for POST operations. Policie Create policy : - ```go policy := minio.NewPostPolicy() ``` @@ -1120,10 +1157,8 @@ if err != nil { } ``` - POST your content from the command line using `curl`: - ```go fmt.Printf("curl ") for k, v := range formData { diff --git a/vendor/github.com/minio/minio-go/examples/s3/composeobject.go b/vendor/github.com/minio/minio-go/examples/s3/composeobject.go index 555d98bc3..8aec6c158 100644 --- a/vendor/github.com/minio/minio-go/examples/s3/composeobject.go +++ b/vendor/github.com/minio/minio-go/examples/s3/composeobject.go @@ -47,14 +47,14 @@ func main() { // Source objects to concatenate. We also specify decryption // key for each - src1 := minio.NewSourceInfo("bucket1", "object1", decKey) - src1.SetMatchETag("31624deb84149d2f8ef9c385918b653a") + src1 := minio.NewSourceInfo("bucket1", "object1", &decKey) + src1.SetMatchETagCond("31624deb84149d2f8ef9c385918b653a") - src2 := minio.NewSourceInfo("bucket2", "object2", decKey) - src2.SetMatchETag("f8ef9c385918b653a31624deb84149d2") + src2 := minio.NewSourceInfo("bucket2", "object2", &decKey) + src2.SetMatchETagCond("f8ef9c385918b653a31624deb84149d2") - src3 := minio.NewSourceInfo("bucket3", "object3", decKey) - src3.SetMatchETag("5918b653a31624deb84149d2f8ef9c38") + src3 := minio.NewSourceInfo("bucket3", "object3", &decKey) + src3.SetMatchETagCond("5918b653a31624deb84149d2f8ef9c38") // Create slice of sources. srcs := []minio.SourceInfo{src1, src2, src3} @@ -63,11 +63,14 @@ func main() { encKey := minio.NewSSEInfo([]byte{8, 9, 0}, "") // Create destination info - dst := minio.NewDestinationInfo("bucket", "object", encKey) + dst, err := minio.NewDestinationInfo("bucket", "object", &encKey, nil) + if err != nil { + log.Fatalln(err) + } + err = s3Client.ComposeObject(dst, srcs) if err != nil { - log.Println(err) - return + log.Fatalln(err) } log.Println("Composed object successfully.") diff --git a/vendor/github.com/minio/minio-go/examples/s3/copyobject.go b/vendor/github.com/minio/minio-go/examples/s3/copyobject.go index 0de865555..c1d92d73a 100644 --- a/vendor/github.com/minio/minio-go/examples/s3/copyobject.go +++ b/vendor/github.com/minio/minio-go/examples/s3/copyobject.go @@ -60,7 +60,10 @@ func main() { // src.SetMatchETagExceptCond("31624deb84149d2f8ef9c385918b653a") // Destination object - dst := minio.NewDestinationInfo("my-bucketname", "my-objectname", nil) + dst, err := minio.NewDestinationInfo("my-bucketname", "my-objectname", nil, nil) + if err != nil { + log.Fatalln(err) + } // Initiate copy object. err = s3Client.CopyObject(dst, src) diff --git a/vendor/github.com/minio/minio-go/examples/s3/presignedheadobject.go b/vendor/github.com/minio/minio-go/examples/s3/presignedheadobject.go new file mode 100644 index 000000000..0332049e5 --- /dev/null +++ b/vendor/github.com/minio/minio-go/examples/s3/presignedheadobject.go @@ -0,0 +1,53 @@ +// +build ignore + +/* + * Minio Go Library for Amazon S3 Compatible Cloud Storage (C) 2015 Minio, Inc. + * + * 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. + */ + +package main + +import ( + "log" + "net/url" + "time" + + "github.com/minio/minio-go" +) + +func main() { + // Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY, my-bucketname and my-objectname + // are dummy values, please replace them with original values. + + // Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access. + // This boolean value is the last argument for New(). + + // New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically + // determined based on the Endpoint value. + s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", true) + if err != nil { + log.Fatalln(err) + } + + // Set request parameters + reqParams := make(url.Values) + reqParams.Set("response-content-disposition", "attachment; filename=\"your-filename.txt\"") + + // Gernerate presigned get object url. + presignedURL, err := s3Client.PresignedHeadObject("my-bucketname", "my-objectname", time.Duration(1000)*time.Second, reqParams) + if err != nil { + log.Fatalln(err) + } + log.Println(presignedURL) +} diff --git a/vendor/github.com/minio/minio-go/examples/s3/putobject-progress.go b/vendor/github.com/minio/minio-go/examples/s3/putobject-progress.go index 1179fd787..26e77b9e6 100644 --- a/vendor/github.com/minio/minio-go/examples/s3/putobject-progress.go +++ b/vendor/github.com/minio/minio-go/examples/s3/putobject-progress.go @@ -55,7 +55,9 @@ func main() { progress := pb.New64(objectInfo.Size) progress.Start() - n, err := s3Client.PutObjectWithProgress("my-bucketname", "my-objectname-progress", reader, "application/octet-stream", progress) + n, err := s3Client.PutObjectWithProgress("my-bucketname", "my-objectname-progress", reader, map[string][]string{ + "Content-Type": []string{"application/octet-stream"}, + }, progress) if err != nil { log.Fatalln(err) } diff --git a/vendor/github.com/minio/minio-go/examples/s3/putobject-s3-accelerate.go b/vendor/github.com/minio/minio-go/examples/s3/putobject-s3-accelerate.go index e47976f2e..a26415c7a 100644 --- a/vendor/github.com/minio/minio-go/examples/s3/putobject-s3-accelerate.go +++ b/vendor/github.com/minio/minio-go/examples/s3/putobject-s3-accelerate.go @@ -40,7 +40,7 @@ func main() { } // Enable S3 transfer accelerate endpoint. - s3Client.S3TransferAccelerate("s3-accelerate.amazonaws.com") + s3Client.SetS3TransferAccelerate("s3-accelerate.amazonaws.com") object, err := os.Open("my-testfile") if err != nil { diff --git a/vendor/github.com/minio/minio-go/functional_tests.go b/vendor/github.com/minio/minio-go/functional_tests.go new file mode 100644 index 000000000..ec554e4fe --- /dev/null +++ b/vendor/github.com/minio/minio-go/functional_tests.go @@ -0,0 +1,4912 @@ +// +build ignore + +/* + * Minio Go Library for Amazon S3 Compatible Cloud Storage (C) 2015 Minio, Inc. + * + * 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. + */ + +package main + +import ( + "bytes" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "io" + "io/ioutil" + "math/rand" + "net/http" + "net/url" + "os" + "reflect" + "strconv" + "strings" + "time" + + minio "github.com/minio/minio-go" + log "github.com/sirupsen/logrus" + + "github.com/dustin/go-humanize" + "github.com/minio/minio-go/pkg/encrypt" + "github.com/minio/minio-go/pkg/policy" +) + +const ( + sixtyFiveMiB = 65 * humanize.MiByte // 65MiB + thirtyThreeKiB = 33 * humanize.KiByte // 33KiB +) + +const letterBytes = "abcdefghijklmnopqrstuvwxyz01234569" +const ( + letterIdxBits = 6 // 6 bits to represent a letter index + letterIdxMask = 1<= 0; { + if remain == 0 { + cache, remain = src.Int63(), letterIdxMax + } + if idx := int(cache & letterIdxMask); idx < len(letterBytes) { + b[i] = letterBytes[idx] + i-- + } + cache >>= letterIdxBits + remain-- + } + return prefix + string(b[0:30-len(prefix)]) +} + +func isQuickMode() bool { + return os.Getenv("MODE") == "quick" +} + +// Tests bucket re-create errors. +func testMakeBucketError() { + region := "eu-central-1" + + // initialize logging params + startTime := time.Now() + function := "MakeBucket(bucketName, region)" + // initialize logging params + args := map[string]interface{}{ + "bucketName": "", + "region": region, + } + + // skipping region functional tests for non s3 runs + if os.Getenv(serverEndpoint) != "s3.amazonaws.com" { + ignoredLog(function, args, startTime, "Skipped region functional tests for non s3 runs").Info() + return + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket in 'eu-central-1'. + if err = c.MakeBucket(bucketName, region); err != nil { + failureLog(function, args, startTime, "", "MakeBucket Failed", err).Fatal() + } + if err = c.MakeBucket(bucketName, region); err == nil { + failureLog(function, args, startTime, "", "Bucket already exists", err).Fatal() + } + // Verify valid error response from server. + if minio.ToErrorResponse(err).Code != "BucketAlreadyExists" && + minio.ToErrorResponse(err).Code != "BucketAlreadyOwnedByYou" { + failureLog(function, args, startTime, "", "Invalid error returned by server", err).Fatal() + } + if err = c.RemoveBucket(bucketName); err != nil { + failureLog(function, args, startTime, "", "Remove bucket failed", err).Fatal() + } + + successLogger(function, args, startTime).Info() +} + +// Tests various bucket supported formats. +func testMakeBucketRegions() { + region := "eu-central-1" + // initialize logging params + startTime := time.Now() + function := "MakeBucket(bucketName, region)" + // initialize logging params + args := map[string]interface{}{ + "bucketName": "", + "region": region, + } + + // skipping region functional tests for non s3 runs + if os.Getenv(serverEndpoint) != "s3.amazonaws.com" { + ignoredLog(function, args, startTime, "Skipped region functional tests for non s3 runs").Info() + return + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket in 'eu-central-1'. + if err = c.MakeBucket(bucketName, region); err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + if err = c.RemoveBucket(bucketName); err != nil { + failureLog(function, args, startTime, "", "Remove bucket failed", err).Fatal() + } + + // Make a new bucket with '.' in its name, in 'us-west-2'. This + // request is internally staged into a path style instead of + // virtual host style. + region = "us-west-2" + args["region"] = region + if err = c.MakeBucket(bucketName+".withperiod", region); err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Remove the newly created bucket. + if err = c.RemoveBucket(bucketName + ".withperiod"); err != nil { + failureLog(function, args, startTime, "", "Remove bucket failed", err).Fatal() + } + + successLogger(function, args, startTime).Info() +} + +// Test PutObject using a large data to trigger multipart readat +func testPutObjectReadAt() { + // initialize logging params + startTime := time.Now() + function := "PutObject(bucketName, objectName, reader, objectContentType)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "objectContentType": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "Make bucket failed", err).Fatal() + } + + // Generate data using 4 parts so that all 3 'workers' are utilized and a part is leftover. + // Use different data for each part for multipart tests to ensure part order at the end. + var reader = getDataReader("datafile-65-MB", sixtyFiveMiB) + defer reader.Close() + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + // Object content type + objectContentType := "binary/octet-stream" + args["objectContentType"] = objectContentType + + n, err := c.PutObject(bucketName, objectName, reader, objectContentType) + + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + if n != int64(sixtyFiveMiB) { + failureLog(function, args, startTime, "", "Number of bytes returned by PutObject does not match, expected "+string(sixtyFiveMiB)+" got "+string(n), err).Fatal() + } + + // Read the data back + r, err := c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "Get Object failed", err).Fatal() + } + + st, err := r.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Stat Object failed", err).Fatal() + } + if st.Size != int64(sixtyFiveMiB) { + failureLog(function, args, startTime, "", "Number of bytes in stat does not match, expected "+string(sixtyFiveMiB)+" got "+string(st.Size), err).Fatal() + } + if st.ContentType != objectContentType { + failureLog(function, args, startTime, "", "Content types don't match", err).Fatal() + } + if err := r.Close(); err != nil { + failureLog(function, args, startTime, "", "Object Close failed", err).Fatal() + } + if err := r.Close(); err == nil { + failureLog(function, args, startTime, "", "Object is already closed, didn't return error on Close", err).Fatal() + } + + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + err = c.RemoveBucket(bucketName) + + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + + successLogger(function, args, startTime).Info() +} + +// Test PutObject using a large data to trigger multipart readat +func testPutObjectWithMetadata() { + // initialize logging params + startTime := time.Now() + function := "PutObjectWithMetadata(bucketName, objectName, reader, metadata, progress)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "metadata": "", + } + + if isQuickMode() { + ignoredLog(function, args, startTime, "Skipping functional tests for short runs").Info() + return + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "Make bucket failed", err).Fatal() + } + + // Generate data using 2 parts + // Use different data in each part for multipart tests to ensure part order at the end. + var reader = getDataReader("datafile-65-MB", sixtyFiveMiB) + defer reader.Close() + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + // Object custom metadata + customContentType := "custom/contenttype" + + n, err := c.PutObjectWithMetadata(bucketName, objectName, reader, map[string][]string{ + "Content-Type": {customContentType}, + }, nil) + args["metadata"] = map[string][]string{ + "Content-Type": {customContentType}, + } + + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + if n != int64(sixtyFiveMiB) { + failureLog(function, args, startTime, "", "Number of bytes returned by PutObject does not match, expected "+string(sixtyFiveMiB)+" got "+string(n), err).Fatal() + } + + // Read the data back + r, err := c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + + st, err := r.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Stat failed", err).Fatal() + } + if st.Size != int64(sixtyFiveMiB) { + failureLog(function, args, startTime, "", "Number of bytes returned by PutObject does not match GetObject, expected "+string(sixtyFiveMiB)+" got "+string(st.Size), err).Fatal() + } + if st.ContentType != customContentType { + failureLog(function, args, startTime, "", "ContentType does not match, expected "+customContentType+" got "+st.ContentType, err).Fatal() + } + if err := r.Close(); err != nil { + failureLog(function, args, startTime, "", "Object Close failed", err).Fatal() + } + if err := r.Close(); err == nil { + failureLog(function, args, startTime, "", "Object already closed, should respond with error", err).Fatal() + } + + if err = c.RemoveObject(bucketName, objectName); err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + if err = c.RemoveBucket(bucketName); err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + + successLogger(function, args, startTime).Info() +} + +// Test put object with streaming signature. +func testPutObjectStreaming() { + // initialize logging params + objectName := "test-object" + startTime := time.Now() + function := "PutObjectStreaming(bucketName, objectName, reader)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": objectName, + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.NewV4( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), + "minio-go-test") + args["bucketName"] = bucketName + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Upload an object. + sizes := []int64{0, 64*1024 - 1, 64 * 1024} + + for _, size := range sizes { + data := bytes.Repeat([]byte("a"), int(size)) + n, err := c.PutObjectStreaming(bucketName, objectName, bytes.NewReader(data)) + if err != nil { + failureLog(function, args, startTime, "", "PutObjectStreaming failed", err).Fatal() + } + + if n != size { + failureLog(function, args, startTime, "", "Expected upload object size doesn't match with PutObjectStreaming return value", err).Fatal() + } + } + + // Remove the object. + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + // Remove the bucket. + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Test listing partially uploaded objects. +func testListPartiallyUploaded() { + // initialize logging params + startTime := time.Now() + function := "ListIncompleteUploads(bucketName, objectName, isRecursive, doneCh)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "isRecursive": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Enable tracing, write to stdout. + // c.TraceOn(os.Stderr) + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + r := bytes.NewReader(bytes.Repeat([]byte("0"), sixtyFiveMiB*2)) + + reader, writer := io.Pipe() + go func() { + i := 0 + for i < 25 { + _, cerr := io.CopyN(writer, r, (sixtyFiveMiB*2)/25) + if cerr != nil { + failureLog(function, args, startTime, "", "Copy failed", err).Fatal() + } + i++ + r.Seek(0, 0) + } + writer.CloseWithError(errors.New("proactively closed to be verified later")) + }() + + objectName := bucketName + "-resumable" + args["objectName"] = objectName + + _, err = c.PutObject(bucketName, objectName, reader, "application/octet-stream") + if err == nil { + failureLog(function, args, startTime, "", "PutObject should fail", err).Fatal() + } + if !strings.Contains(err.Error(), "proactively closed to be verified later") { + failureLog(function, args, startTime, "", "String not found in PutObject output", err).Fatal() + } + + doneCh := make(chan struct{}) + defer close(doneCh) + isRecursive := true + args["isRecursive"] = isRecursive + + multiPartObjectCh := c.ListIncompleteUploads(bucketName, objectName, isRecursive, doneCh) + for multiPartObject := range multiPartObjectCh { + if multiPartObject.Err != nil { + failureLog(function, args, startTime, "", "Multipart object error", multiPartObject.Err).Fatal() + } + } + + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Test get object seeker from the end, using whence set to '2'. +func testGetObjectSeekEnd() { + // initialize logging params + startTime := time.Now() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Generate 33K of data. + var reader = getDataReader("datafile-33-kB", thirtyThreeKiB) + defer reader.Close() + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + buf, err := ioutil.ReadAll(reader) + if err != nil { + failureLog(function, args, startTime, "", "ReadAll failed", err).Fatal() + } + + n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + if n != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes read does not match, expected "+string(int64(thirtyThreeKiB))+" got "+string(n), err).Fatal() + } + + // Read the data back + r, err := c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + + st, err := r.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Stat failed", err).Fatal() + } + + if st.Size != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes read does not match, expected "+string(int64(thirtyThreeKiB))+" got "+string(st.Size), err).Fatal() + } + + pos, err := r.Seek(-100, 2) + if err != nil { + failureLog(function, args, startTime, "", "Object Seek failed", err).Fatal() + } + if pos != st.Size-100 { + failureLog(function, args, startTime, "", "Incorrect position", err).Fatal() + } + buf2 := make([]byte, 100) + m, err := io.ReadFull(r, buf2) + if err != nil { + failureLog(function, args, startTime, "", "Error reading through io.ReadFull", err).Fatal() + } + if m != len(buf2) { + failureLog(function, args, startTime, "", "Number of bytes dont match, expected "+string(len(buf2))+" got "+string(m), err).Fatal() + } + hexBuf1 := fmt.Sprintf("%02x", buf[len(buf)-100:]) + hexBuf2 := fmt.Sprintf("%02x", buf2[:m]) + if hexBuf1 != hexBuf2 { + failureLog(function, args, startTime, "", "Values at same index dont match", err).Fatal() + } + pos, err = r.Seek(-100, 2) + if err != nil { + failureLog(function, args, startTime, "", "Object Seek failed", err).Fatal() + } + if pos != st.Size-100 { + failureLog(function, args, startTime, "", "Incorrect position", err).Fatal() + } + if err = r.Close(); err != nil { + failureLog(function, args, startTime, "", "ObjectClose failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Test get object reader to not throw error on being closed twice. +func testGetObjectClosedTwice() { + // initialize logging params + startTime := time.Now() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Generate 33K of data. + var reader = getDataReader("datafile-33-kB", thirtyThreeKiB) + defer reader.Close() + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + n, err := c.PutObject(bucketName, objectName, reader, "binary/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + if n != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "PutObject response doesn't match sent bytes, expected "+string(int64(thirtyThreeKiB))+" got "+string(n), err).Fatal() + } + + // Read the data back + r, err := c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + + st, err := r.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Stat failed", err).Fatal() + } + if st.Size != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes in stat does not match, expected "+string(int64(thirtyThreeKiB))+" got "+string(st.Size), err).Fatal() + } + if err := r.Close(); err != nil { + failureLog(function, args, startTime, "", "Object Close failed", err).Fatal() + } + if err := r.Close(); err == nil { + failureLog(function, args, startTime, "", "Already closed object. No error returned", err).Fatal() + } + + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Test removing multiple objects with Remove API +func testRemoveMultipleObjects() { + // initialize logging params + startTime := time.Now() + function := "RemoveObjects(bucketName, objectsCh)" + args := map[string]interface{}{ + "bucketName": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Enable tracing, write to stdout. + // c.TraceOn(os.Stderr) + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + r := bytes.NewReader(bytes.Repeat([]byte("a"), 8)) + + // Multi remove of 1100 objects + nrObjects := 1100 + + objectsCh := make(chan string) + + go func() { + defer close(objectsCh) + // Upload objects and send them to objectsCh + for i := 0; i < nrObjects; i++ { + objectName := "sample" + strconv.Itoa(i) + ".txt" + _, err = c.PutObject(bucketName, objectName, r, "application/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + continue + } + objectsCh <- objectName + } + }() + + // Call RemoveObjects API + errorCh := c.RemoveObjects(bucketName, objectsCh) + + // Check if errorCh doesn't receive any error + select { + case r, more := <-errorCh: + if more { + failureLog(function, args, startTime, "", "Unexpected error", r.Err).Fatal() + } + } + + // Clean the bucket created by the test + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Tests removing partially uploaded objects. +func testRemovePartiallyUploaded() { + // initialize logging params + startTime := time.Now() + function := "RemoveIncompleteUpload(bucketName, objectName)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Enable tracing, write to stdout. + // c.TraceOn(os.Stderr) + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + r := bytes.NewReader(bytes.Repeat([]byte("a"), 128*1024)) + + reader, writer := io.Pipe() + go func() { + i := 0 + for i < 25 { + _, cerr := io.CopyN(writer, r, 128*1024) + if cerr != nil { + failureLog(function, args, startTime, "", "Copy failed", err).Fatal() + } + i++ + r.Seek(0, 0) + } + writer.CloseWithError(errors.New("proactively closed to be verified later")) + }() + + objectName := bucketName + "-resumable" + args["objectName"] = objectName + + _, err = c.PutObject(bucketName, objectName, reader, "application/octet-stream") + if err == nil { + failureLog(function, args, startTime, "", "PutObject should fail", err).Fatal() + } + if !strings.Contains(err.Error(), "proactively closed to be verified later") { + failureLog(function, args, startTime, "", "String not found", err).Fatal() + } + err = c.RemoveIncompleteUpload(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveIncompleteUpload failed", err).Fatal() + } + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Tests FPutObject of a big file to trigger multipart +func testFPutObjectMultipart() { + // initialize logging params + startTime := time.Now() + function := "FPutObject(bucketName, objectName, fileName, objectContentType)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "fileName": "", + "objectContentType": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Upload 4 parts to utilize all 3 'workers' in multipart and still have a part to upload. + var fileName = getFilePath("datafile-65-MB") + if os.Getenv("MINT_DATA_DIR") == "" { + // Make a temp file with minPartSize bytes of data. + file, err := ioutil.TempFile(os.TempDir(), "FPutObjectTest") + if err != nil { + failureLog(function, args, startTime, "", "TempFile creation failed", err).Fatal() + } + // Upload 4 parts to utilize all 3 'workers' in multipart and still have a part to upload. + _, err = io.Copy(file, getDataReader("non-existent", sixtyFiveMiB)) + if err != nil { + failureLog(function, args, startTime, "", "Copy failed", err).Fatal() + } + err = file.Close() + if err != nil { + failureLog(function, args, startTime, "", "File Close failed", err).Fatal() + } + fileName = file.Name() + args["fileName"] = fileName + } + totalSize := sixtyFiveMiB * 1 + // Set base object name + objectName := bucketName + "FPutObject" + "-standard" + args["objectName"] = objectName + + objectContentType := "testapplication/octet-stream" + args["objectContentType"] = objectContentType + + // Perform standard FPutObject with contentType provided (Expecting application/octet-stream) + n, err := c.FPutObject(bucketName, objectName, fileName, objectContentType) + if err != nil { + failureLog(function, args, startTime, "", "FPutObject failed", err).Fatal() + } + if n != int64(totalSize) { + failureLog(function, args, startTime, "", "FPutObject failed", err).Fatal() + } + + r, err := c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + objInfo, err := r.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Unexpected error", err).Fatal() + } + if objInfo.Size != int64(totalSize) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(totalSize))+" got "+string(objInfo.Size), err).Fatal() + } + if objInfo.ContentType != objectContentType { + failureLog(function, args, startTime, "", "ContentType doesn't match", err).Fatal() + } + + // Remove all objects and bucket and temp file + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Tests FPutObject with null contentType (default = application/octet-stream) +func testFPutObject() { + // initialize logging params + startTime := time.Now() + function := "FPutObject(bucketName, objectName, fileName, objectContentType)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Upload 3 parts worth of data to use all 3 of multiparts 'workers' and have an extra part. + // Use different data in part for multipart tests to check parts are uploaded in correct order. + var fName = getFilePath("datafile-65-MB") + if os.Getenv("MINT_DATA_DIR") == "" { + // Make a temp file with minPartSize bytes of data. + file, err := ioutil.TempFile(os.TempDir(), "FPutObjectTest") + if err != nil { + failureLog(function, args, startTime, "", "TempFile creation failed", err).Fatal() + } + + // Upload 4 parts to utilize all 3 'workers' in multipart and still have a part to upload. + var buffer = bytes.Repeat([]byte(string('a')), sixtyFiveMiB) + if _, err = file.Write(buffer); err != nil { + failureLog(function, args, startTime, "", "File write failed", err).Fatal() + } + // Close the file pro-actively for windows. + err = file.Close() + if err != nil { + failureLog(function, args, startTime, "", "File close failed", err).Fatal() + } + fName = file.Name() + } + var totalSize = sixtyFiveMiB * 1 + + // Set base object name + objectName := bucketName + "FPutObject" + args["objectName"] = objectName + + // Perform standard FPutObject with contentType provided (Expecting application/octet-stream) + n, err := c.FPutObject(bucketName, objectName+"-standard", fName, "application/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "FPutObject failed", err).Fatal() + } + if n != int64(totalSize) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(totalSize)+", got "+string(n), err).Fatal() + } + + // Perform FPutObject with no contentType provided (Expecting application/octet-stream) + n, err = c.FPutObject(bucketName, objectName+"-Octet", fName, "") + if err != nil { + failureLog(function, args, startTime, "", "File close failed", err).Fatal() + } + if n != int64(totalSize) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(totalSize)+", got "+string(n), err).Fatal() + } + srcFile, err := os.Open(fName) + if err != nil { + failureLog(function, args, startTime, "", "File open failed", err).Fatal() + } + defer srcFile.Close() + // Add extension to temp file name + tmpFile, err := os.Create(fName + ".gtar") + if err != nil { + failureLog(function, args, startTime, "", "File create failed", err).Fatal() + } + defer tmpFile.Close() + _, err = io.Copy(tmpFile, srcFile) + if err != nil { + failureLog(function, args, startTime, "", "File copy failed", err).Fatal() + } + + // Perform FPutObject with no contentType provided (Expecting application/x-gtar) + n, err = c.FPutObject(bucketName, objectName+"-GTar", fName+".gtar", "") + if err != nil { + failureLog(function, args, startTime, "", "FPutObject failed", err).Fatal() + } + if n != int64(totalSize) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(totalSize)+", got "+string(n), err).Fatal() + } + + // Check headers + rStandard, err := c.StatObject(bucketName, objectName+"-standard") + if err != nil { + failureLog(function, args, startTime, "", "StatObject failed", err).Fatal() + } + if rStandard.ContentType != "application/octet-stream" { + failureLog(function, args, startTime, "", "ContentType does not match, expected application/octet-stream, got "+rStandard.ContentType, err).Fatal() + } + + rOctet, err := c.StatObject(bucketName, objectName+"-Octet") + if err != nil { + failureLog(function, args, startTime, "", "StatObject failed", err).Fatal() + } + if rOctet.ContentType != "application/octet-stream" { + failureLog(function, args, startTime, "", "ContentType does not match, expected application/octet-stream, got "+rStandard.ContentType, err).Fatal() + } + + rGTar, err := c.StatObject(bucketName, objectName+"-GTar") + if err != nil { + failureLog(function, args, startTime, "", "StatObject failed", err).Fatal() + } + if rGTar.ContentType != "application/x-gtar" { + failureLog(function, args, startTime, "", "ContentType does not match, expected application/x-gtar, got "+rStandard.ContentType, err).Fatal() + } + + // Remove all objects and bucket and temp file + err = c.RemoveObject(bucketName, objectName+"-standard") + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + err = c.RemoveObject(bucketName, objectName+"-Octet") + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + err = c.RemoveObject(bucketName, objectName+"-GTar") + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + + err = os.Remove(fName + ".gtar") + if err != nil { + failureLog(function, args, startTime, "", "File remove failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Tests get object ReaderSeeker interface methods. +func testGetObjectReadSeekFunctional() { + // initialize logging params + startTime := time.Now() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Generate 33K of data. + var reader = getDataReader("datafile-33-kB", thirtyThreeKiB) + defer reader.Close() + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + buf, err := ioutil.ReadAll(reader) + if err != nil { + failureLog(function, args, startTime, "", "ReadAll failed", err).Fatal() + } + + // Save the data + n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + if n != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(thirtyThreeKiB))+", got "+string(n), err).Fatal() + } + + defer func() { + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + }() + + // Read the data back + r, err := c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + + st, err := r.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Stat object failed", err).Fatal() + } + + if st.Size != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(thirtyThreeKiB))+", got "+string(st.Size), err).Fatal() + } + + // This following function helps us to compare data from the reader after seek + // with the data from the original buffer + cmpData := func(r io.Reader, start, end int) { + if end-start == 0 { + return + } + buffer := bytes.NewBuffer([]byte{}) + if _, err := io.CopyN(buffer, r, int64(thirtyThreeKiB)); err != nil { + if err != io.EOF { + failureLog(function, args, startTime, "", "CopyN failed", err).Fatal() + } + } + if !bytes.Equal(buf[start:end], buffer.Bytes()) { + failureLog(function, args, startTime, "", "Incorrect read bytes v/s original buffer", err).Fatal() + } + } + + // Generic seek error for errors other than io.EOF + seekErr := errors.New("seek error") + + testCases := []struct { + offset int64 + whence int + pos int64 + err error + shouldCmp bool + start int + end int + }{ + // Start from offset 0, fetch data and compare + {0, 0, 0, nil, true, 0, 0}, + // Start from offset 2048, fetch data and compare + {2048, 0, 2048, nil, true, 2048, thirtyThreeKiB}, + // Start from offset larger than possible + {int64(thirtyThreeKiB) + 1024, 0, 0, seekErr, false, 0, 0}, + // Move to offset 0 without comparing + {0, 0, 0, nil, false, 0, 0}, + // Move one step forward and compare + {1, 1, 1, nil, true, 1, thirtyThreeKiB}, + // Move larger than possible + {int64(thirtyThreeKiB), 1, 0, seekErr, false, 0, 0}, + // Provide negative offset with CUR_SEEK + {int64(-1), 1, 0, seekErr, false, 0, 0}, + // Test with whence SEEK_END and with positive offset + {1024, 2, int64(thirtyThreeKiB) - 1024, io.EOF, true, 0, 0}, + // Test with whence SEEK_END and with negative offset + {-1024, 2, int64(thirtyThreeKiB) - 1024, nil, true, thirtyThreeKiB - 1024, thirtyThreeKiB}, + // Test with whence SEEK_END and with large negative offset + {-int64(thirtyThreeKiB) * 2, 2, 0, seekErr, true, 0, 0}, + } + + for i, testCase := range testCases { + // Perform seek operation + n, err := r.Seek(testCase.offset, testCase.whence) + // We expect an error + if testCase.err == seekErr && err == nil { + failureLog(function, args, startTime, "", "Test "+string(i+1)+", unexpected err value: expected: "+testCase.err.Error()+", found: "+err.Error(), err).Fatal() + } + // We expect a specific error + if testCase.err != seekErr && testCase.err != err { + failureLog(function, args, startTime, "", "Test "+string(i+1)+", unexpected err value: expected: "+testCase.err.Error()+", found: "+err.Error(), err).Fatal() + } + // If we expect an error go to the next loop + if testCase.err != nil { + continue + } + // Check the returned seek pos + if n != testCase.pos { + failureLog(function, args, startTime, "", "Test "+string(i+1)+", number of bytes seeked does not match, expected "+string(testCase.pos)+", got "+string(n), err).Fatal() + } + // Compare only if shouldCmp is activated + if testCase.shouldCmp { + cmpData(r, testCase.start, testCase.end) + } + } + successLogger(function, args, startTime).Info() +} + +// Tests get object ReaderAt interface methods. +func testGetObjectReadAtFunctional() { + // initialize logging params + startTime := time.Now() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Generate 33K of data. + var reader = getDataReader("datafile-33-kB", thirtyThreeKiB) + defer reader.Close() + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + buf, err := ioutil.ReadAll(reader) + if err != nil { + failureLog(function, args, startTime, "", "ReadAll failed", err).Fatal() + } + + // Save the data + n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + if n != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(thirtyThreeKiB))+", got "+string(n), err).Fatal() + } + + // read the data back + r, err := c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + offset := int64(2048) + + // read directly + buf1 := make([]byte, 512) + buf2 := make([]byte, 512) + buf3 := make([]byte, 512) + buf4 := make([]byte, 512) + + // Test readAt before stat is called. + m, err := r.ReadAt(buf1, offset) + if err != nil { + failureLog(function, args, startTime, "", "ReadAt failed", err).Fatal() + } + if m != len(buf1) { + failureLog(function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf1))+", got "+string(m), err).Fatal() + } + if !bytes.Equal(buf1, buf[offset:offset+512]) { + failureLog(function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err).Fatal() + } + offset += 512 + + st, err := r.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Stat failed", err).Fatal() + } + + if st.Size != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes in stat does not match, expected "+string(int64(thirtyThreeKiB))+", got "+string(st.Size), err).Fatal() + } + + m, err = r.ReadAt(buf2, offset) + if err != nil { + failureLog(function, args, startTime, "", "ReadAt failed", err).Fatal() + } + if m != len(buf2) { + failureLog(function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf2))+", got "+string(m), err).Fatal() + } + if !bytes.Equal(buf2, buf[offset:offset+512]) { + failureLog(function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err).Fatal() + } + offset += 512 + m, err = r.ReadAt(buf3, offset) + if err != nil { + failureLog(function, args, startTime, "", "ReadAt failed", err).Fatal() + } + if m != len(buf3) { + failureLog(function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf3))+", got "+string(m), err).Fatal() + } + if !bytes.Equal(buf3, buf[offset:offset+512]) { + failureLog(function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err).Fatal() + } + offset += 512 + m, err = r.ReadAt(buf4, offset) + if err != nil { + failureLog(function, args, startTime, "", "ReadAt failed", err).Fatal() + } + if m != len(buf4) { + failureLog(function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf4))+", got "+string(m), err).Fatal() + } + if !bytes.Equal(buf4, buf[offset:offset+512]) { + failureLog(function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err).Fatal() + } + + buf5 := make([]byte, n) + // Read the whole object. + m, err = r.ReadAt(buf5, 0) + if err != nil { + if err != io.EOF { + failureLog(function, args, startTime, "", "ReadAt failed", err).Fatal() + } + } + if m != len(buf5) { + failureLog(function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf5))+", got "+string(m), err).Fatal() + } + if !bytes.Equal(buf, buf5) { + failureLog(function, args, startTime, "", "Incorrect data read in GetObject, than what was previously uploaded", err).Fatal() + } + + buf6 := make([]byte, n+1) + // Read the whole object and beyond. + _, err = r.ReadAt(buf6, 0) + if err != nil { + if err != io.EOF { + failureLog(function, args, startTime, "", "ReadAt failed", err).Fatal() + } + } + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Test Presigned Post Policy +func testPresignedPostPolicy() { + // initialize logging params + startTime := time.Now() + function := "PresignedPostPolicy(policy)" + args := map[string]interface{}{ + "policy": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object + c, err := minio.NewV4( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + + // Make a new bucket in 'us-east-1' (source bucket). + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Generate 33K of data. + var reader = getDataReader("datafile-33-kB", thirtyThreeKiB) + defer reader.Close() + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + + buf, err := ioutil.ReadAll(reader) + if err != nil { + failureLog(function, args, startTime, "", "ReadAll failed", err).Fatal() + } + + // Save the data + n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + if n != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(thirtyThreeKiB))+" got "+string(n), err).Fatal() + } + + policy := minio.NewPostPolicy() + + if err := policy.SetBucket(""); err == nil { + failureLog(function, args, startTime, "", "SetBucket did not fail for invalid conditions", err).Fatal() + } + if err := policy.SetKey(""); err == nil { + failureLog(function, args, startTime, "", "SetKey did not fail for invalid conditions", err).Fatal() + } + if err := policy.SetKeyStartsWith(""); err == nil { + failureLog(function, args, startTime, "", "SetKeyStartsWith did not fail for invalid conditions", err).Fatal() + } + if err := policy.SetExpires(time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC)); err == nil { + failureLog(function, args, startTime, "", "SetExpires did not fail for invalid conditions", err).Fatal() + } + if err := policy.SetContentType(""); err == nil { + failureLog(function, args, startTime, "", "SetContentType did not fail for invalid conditions", err).Fatal() + } + if err := policy.SetContentLengthRange(1024*1024, 1024); err == nil { + failureLog(function, args, startTime, "", "SetContentLengthRange did not fail for invalid conditions", err).Fatal() + } + + policy.SetBucket(bucketName) + policy.SetKey(objectName) + policy.SetExpires(time.Now().UTC().AddDate(0, 0, 10)) // expires in 10 days + policy.SetContentType("image/png") + policy.SetContentLengthRange(1024, 1024*1024) + args["policy"] = policy + + _, _, err = c.PresignedPostPolicy(policy) + if err != nil { + failureLog(function, args, startTime, "", "PresignedPostPolicy failed", err).Fatal() + } + + policy = minio.NewPostPolicy() + + // Remove all objects and buckets + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Tests copy object +func testCopyObject() { + // initialize logging params + startTime := time.Now() + function := "CopyObject(dst, src)" + args := map[string]interface{}{ + "dst": "", + "src": "", + } + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object + c, err := minio.NewV4( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + + // Make a new bucket in 'us-east-1' (source bucket). + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Make a new bucket in 'us-east-1' (destination bucket). + err = c.MakeBucket(bucketName+"-copy", "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Generate 33K of data. + var reader = getDataReader("datafile-33-kB", thirtyThreeKiB) + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + n, err := c.PutObject(bucketName, objectName, reader, "binary/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + if n != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(thirtyThreeKiB))+", got "+string(n), err).Fatal() + } + + r, err := c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + // Check the various fields of source object against destination object. + objInfo, err := r.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Stat failed", err).Fatal() + } + + // Copy Source + src := minio.NewSourceInfo(bucketName, objectName, nil) + + // Set copy conditions. + + // All invalid conditions first. + err = src.SetModifiedSinceCond(time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC)) + if err == nil { + failureLog(function, args, startTime, "", "SetModifiedSinceCond did not fail for invalid conditions", err).Fatal() + } + err = src.SetUnmodifiedSinceCond(time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC)) + if err == nil { + failureLog(function, args, startTime, "", "SetUnmodifiedSinceCond did not fail for invalid conditions", err).Fatal() + } + err = src.SetMatchETagCond("") + if err == nil { + failureLog(function, args, startTime, "", "SetMatchETagCond did not fail for invalid conditions", err).Fatal() + } + err = src.SetMatchETagExceptCond("") + if err == nil { + failureLog(function, args, startTime, "", "SetMatchETagExceptCond did not fail for invalid conditions", err).Fatal() + } + + err = src.SetModifiedSinceCond(time.Date(2014, time.April, 0, 0, 0, 0, 0, time.UTC)) + if err != nil { + failureLog(function, args, startTime, "", "SetModifiedSinceCond failed", err).Fatal() + } + err = src.SetMatchETagCond(objInfo.ETag) + if err != nil { + failureLog(function, args, startTime, "", "SetMatchETagCond failed", err).Fatal() + } + args["src"] = src + + dst, err := minio.NewDestinationInfo(bucketName+"-copy", objectName+"-copy", nil, nil) + args["dst"] = dst + if err != nil { + failureLog(function, args, startTime, "", "NewDestinationInfo failed", err).Fatal() + } + + // Perform the Copy + err = c.CopyObject(dst, src) + if err != nil { + failureLog(function, args, startTime, "", "CopyObject failed", err).Fatal() + } + + // Source object + r, err = c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + + // Destination object + readerCopy, err := c.GetObject(bucketName+"-copy", objectName+"-copy") + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + // Check the various fields of source object against destination object. + objInfo, err = r.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Stat failed", err).Fatal() + } + objInfoCopy, err := readerCopy.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Stat failed", err).Fatal() + } + if objInfo.Size != objInfoCopy.Size { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(objInfoCopy.Size)+", got "+string(objInfo.Size), err).Fatal() + } + + // CopyObject again but with wrong conditions + src = minio.NewSourceInfo(bucketName, objectName, nil) + err = src.SetUnmodifiedSinceCond(time.Date(2014, time.April, 0, 0, 0, 0, 0, time.UTC)) + if err != nil { + failureLog(function, args, startTime, "", "SetUnmodifiedSinceCond failed", err).Fatal() + } + err = src.SetMatchETagExceptCond(objInfo.ETag) + if err != nil { + failureLog(function, args, startTime, "", "SetMatchETagExceptCond failed", err).Fatal() + } + + // Perform the Copy which should fail + err = c.CopyObject(dst, src) + if err == nil { + failureLog(function, args, startTime, "", "CopyObject did not fail for invalid conditions", err).Fatal() + } + + // Remove all objects and buckets + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + err = c.RemoveObject(bucketName+"-copy", objectName+"-copy") + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + + err = c.RemoveBucket(bucketName + "-copy") + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// TestEncryptionPutGet tests client side encryption +func testEncryptionPutGet() { + // initialize logging params + startTime := time.Now() + function := "PutEncryptedObject(bucketName, objectName, reader, cbcMaterials, metadata, progress)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "cbcMaterials": "", + "metadata": "", + } + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object + c, err := minio.NewV4( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Generate a symmetric key + symKey := encrypt.NewSymmetricKey([]byte("my-secret-key-00")) + + // Generate an assymmetric key from predefine public and private certificates + privateKey, err := hex.DecodeString( + "30820277020100300d06092a864886f70d0101010500048202613082025d" + + "0201000281810087b42ea73243a3576dc4c0b6fa245d339582dfdbddc20c" + + "bb8ab666385034d997210c54ba79275c51162a1221c3fb1a4c7c61131ca6" + + "5563b319d83474ef5e803fbfa7e52b889e1893b02586b724250de7ac6351" + + "cc0b7c638c980acec0a07020a78eed7eaa471eca4b92071394e061346c06" + + "15ccce2f465dee2080a89e43f29b5702030100010281801dd5770c3af8b3" + + "c85cd18cacad81a11bde1acfac3eac92b00866e142301fee565365aa9af4" + + "57baebf8bb7711054d071319a51dd6869aef3848ce477a0dc5f0dbc0c336" + + "5814b24c820491ae2bb3c707229a654427e03307fec683e6b27856688f08" + + "bdaa88054c5eeeb773793ff7543ee0fb0e2ad716856f2777f809ef7e6fa4" + + "41024100ca6b1edf89e8a8f93cce4b98c76c6990a09eb0d32ad9d3d04fbf" + + "0b026fa935c44f0a1c05dd96df192143b7bda8b110ec8ace28927181fd8c" + + "d2f17330b9b63535024100aba0260afb41489451baaeba423bee39bcbd1e" + + "f63dd44ee2d466d2453e683bf46d019a8baead3a2c7fca987988eb4d565e" + + "27d6be34605953f5034e4faeec9bdb0241009db2cb00b8be8c36710aff96" + + "6d77a6dec86419baca9d9e09a2b761ea69f7d82db2ae5b9aae4246599bb2" + + "d849684d5ab40e8802cfe4a2b358ad56f2b939561d2902404e0ead9ecafd" + + "bb33f22414fa13cbcc22a86bdf9c212ce1a01af894e3f76952f36d6c904c" + + "bd6a7e0de52550c9ddf31f1e8bfe5495f79e66a25fca5c20b3af5b870241" + + "0083456232aa58a8c45e5b110494599bda8dbe6a094683a0539ddd24e19d" + + "47684263bbe285ad953d725942d670b8f290d50c0bca3d1dc9688569f1d5" + + "9945cb5c7d") + + if err != nil { + failureLog(function, args, startTime, "", "DecodeString for symmetric Key generation failed", err).Fatal() + } + + publicKey, err := hex.DecodeString("30819f300d06092a864886f70d010101050003818d003081890281810087" + + "b42ea73243a3576dc4c0b6fa245d339582dfdbddc20cbb8ab666385034d9" + + "97210c54ba79275c51162a1221c3fb1a4c7c61131ca65563b319d83474ef" + + "5e803fbfa7e52b889e1893b02586b724250de7ac6351cc0b7c638c980ace" + + "c0a07020a78eed7eaa471eca4b92071394e061346c0615ccce2f465dee20" + + "80a89e43f29b570203010001") + if err != nil { + failureLog(function, args, startTime, "", "DecodeString for symmetric Key generation failed", err).Fatal() + } + + // Generate an asymmetric key + asymKey, err := encrypt.NewAsymmetricKey(privateKey, publicKey) + if err != nil { + failureLog(function, args, startTime, "", "NewAsymmetricKey for symmetric Key generation failed", err).Fatal() + } + + // Object custom metadata + customContentType := "custom/contenttype" + args["metadata"] = customContentType + + testCases := []struct { + buf []byte + encKey encrypt.Key + }{ + {encKey: symKey, buf: bytes.Repeat([]byte("F"), 0)}, + {encKey: symKey, buf: bytes.Repeat([]byte("F"), 1)}, + {encKey: symKey, buf: bytes.Repeat([]byte("F"), 15)}, + {encKey: symKey, buf: bytes.Repeat([]byte("F"), 16)}, + {encKey: symKey, buf: bytes.Repeat([]byte("F"), 17)}, + {encKey: symKey, buf: bytes.Repeat([]byte("F"), 31)}, + {encKey: symKey, buf: bytes.Repeat([]byte("F"), 32)}, + {encKey: symKey, buf: bytes.Repeat([]byte("F"), 33)}, + {encKey: symKey, buf: bytes.Repeat([]byte("F"), 1024)}, + {encKey: symKey, buf: bytes.Repeat([]byte("F"), 1024*2)}, + {encKey: symKey, buf: bytes.Repeat([]byte("F"), 1024*1024)}, + + {encKey: asymKey, buf: bytes.Repeat([]byte("F"), 0)}, + {encKey: asymKey, buf: bytes.Repeat([]byte("F"), 1)}, + {encKey: asymKey, buf: bytes.Repeat([]byte("F"), 16)}, + {encKey: asymKey, buf: bytes.Repeat([]byte("F"), 32)}, + {encKey: asymKey, buf: bytes.Repeat([]byte("F"), 1024)}, + {encKey: asymKey, buf: bytes.Repeat([]byte("F"), 1024*1024)}, + } + + for i, testCase := range testCases { + // Generate a random object name + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + // Secured object + cbcMaterials, err := encrypt.NewCBCSecureMaterials(testCase.encKey) + args["cbcMaterials"] = cbcMaterials + + if err != nil { + failureLog(function, args, startTime, "", "NewCBCSecureMaterials failed", err).Fatal() + } + + // Put encrypted data + _, err = c.PutEncryptedObject(bucketName, objectName, bytes.NewReader(testCase.buf), cbcMaterials, map[string][]string{"Content-Type": {customContentType}}, nil) + if err != nil { + failureLog(function, args, startTime, "", "PutEncryptedObject failed", err).Fatal() + } + + // Read the data back + r, err := c.GetEncryptedObject(bucketName, objectName, cbcMaterials) + if err != nil { + failureLog(function, args, startTime, "", "GetEncryptedObject failed", err).Fatal() + } + defer r.Close() + + // Compare the sent object with the received one + recvBuffer := bytes.NewBuffer([]byte{}) + if _, err = io.Copy(recvBuffer, r); err != nil { + failureLog(function, args, startTime, "", "Test "+string(i+1)+", error: "+err.Error(), err).Fatal() + } + if recvBuffer.Len() != len(testCase.buf) { + failureLog(function, args, startTime, "", "Test "+string(i+1)+", Number of bytes of received object does not match, expected "+string(len(testCase.buf))+", got "+string(recvBuffer.Len()), err).Fatal() + } + if !bytes.Equal(testCase.buf, recvBuffer.Bytes()) { + failureLog(function, args, startTime, "", "Test "+string(i+1)+", Encrypted sent is not equal to decrypted, expected "+string(testCase.buf)+", got "+string(recvBuffer.Bytes()), err).Fatal() + } + + // Remove test object + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "Test "+string(i+1)+", RemoveObject failed with: "+err.Error(), err).Fatal() + } + + } + + // Remove test bucket + err = c.RemoveBucket(bucketName) + if err != nil { + err = c.RemoveBucket(bucketName) + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +func testBucketNotification() { + // initialize logging params + startTime := time.Now() + function := "SetBucketNotification(bucketName)" + args := map[string]interface{}{ + "bucketName": "", + } + + if os.Getenv("NOTIFY_BUCKET") == "" || + os.Getenv("NOTIFY_SERVICE") == "" || + os.Getenv("NOTIFY_REGION") == "" || + os.Getenv("NOTIFY_ACCOUNTID") == "" || + os.Getenv("NOTIFY_RESOURCE") == "" { + ignoredLog(function, args, startTime, "Skipped notification test as it is not configured").Info() + return + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + c, err := minio.New( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable to debug + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + bucketName := os.Getenv("NOTIFY_BUCKET") + args["bucketName"] = bucketName + + topicArn := minio.NewArn("aws", os.Getenv("NOTIFY_SERVICE"), os.Getenv("NOTIFY_REGION"), os.Getenv("NOTIFY_ACCOUNTID"), os.Getenv("NOTIFY_RESOURCE")) + queueArn := minio.NewArn("aws", "dummy-service", "dummy-region", "dummy-accountid", "dummy-resource") + + topicConfig := minio.NewNotificationConfig(topicArn) + + topicConfig.AddEvents(minio.ObjectCreatedAll, minio.ObjectRemovedAll) + topicConfig.AddFilterSuffix("jpg") + + queueConfig := minio.NewNotificationConfig(queueArn) + queueConfig.AddEvents(minio.ObjectCreatedAll) + queueConfig.AddFilterPrefix("photos/") + + bNotification := minio.BucketNotification{} + bNotification.AddTopic(topicConfig) + + // Add the same topicConfig again, should have no effect + // because it is duplicated + bNotification.AddTopic(topicConfig) + if len(bNotification.TopicConfigs) != 1 { + failureLog(function, args, startTime, "", "Duplicate entry added", err).Fatal() + } + + // Add and remove a queue config + bNotification.AddQueue(queueConfig) + bNotification.RemoveQueueByArn(queueArn) + + err = c.SetBucketNotification(bucketName, bNotification) + if err != nil { + failureLog(function, args, startTime, "", "SetBucketNotification failed", err).Fatal() + } + + bNotification, err = c.GetBucketNotification(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "GetBucketNotification failed", err).Fatal() + } + + if len(bNotification.TopicConfigs) != 1 { + failureLog(function, args, startTime, "", "Topic config is empty", err).Fatal() + } + + if bNotification.TopicConfigs[0].Filter.S3Key.FilterRules[0].Value != "jpg" { + failureLog(function, args, startTime, "", "Couldn't get the suffix", err).Fatal() + } + + err = c.RemoveAllBucketNotification(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveAllBucketNotification failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Tests comprehensive list of all methods. +func testFunctional() { + // initialize logging params + startTime := time.Now() + function := "testFunctional()" + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + c, err := minio.New( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, nil, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable to debug + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + function = "MakeBucket(bucketName, region)" + args := map[string]interface{}{ + "bucketName": bucketName, + } + + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Generate a random file name. + fileName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + file, err := os.Create(fileName) + if err != nil { + failureLog(function, args, startTime, "", "File creation failed", err).Fatal() + } + for i := 0; i < 3; i++ { + buf := make([]byte, rand.Intn(1<<19)) + _, err = file.Write(buf) + if err != nil { + failureLog(function, args, startTime, "", "File write failed", err).Fatal() + } + } + file.Close() + + // Verify if bucket exits and you have access. + var exists bool + exists, err = c.BucketExists(bucketName) + function = "BucketExists(bucketName)" + args = map[string]interface{}{ + "bucketName": bucketName, + } + + if err != nil { + failureLog(function, args, startTime, "", "BucketExists failed", err).Fatal() + } + if !exists { + failureLog(function, args, startTime, "", "Could not find the bucket", err).Fatal() + } + + // Asserting the default bucket policy. + policyAccess, err := c.GetBucketPolicy(bucketName, "") + function = "GetBucketPolicy(bucketName, objectPrefix)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectPrefix": "", + } + + if err != nil { + failureLog(function, args, startTime, "", "GetBucketPolicy failed", err).Fatal() + } + if policyAccess != "none" { + failureLog(function, args, startTime, "", "policy should be set to none", err).Fatal() + } + // Set the bucket policy to 'public readonly'. + err = c.SetBucketPolicy(bucketName, "", policy.BucketPolicyReadOnly) + function = "SetBucketPolicy(bucketName, objectPrefix, bucketPolicy)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectPrefix": "", + "bucketPolicy": policy.BucketPolicyReadOnly, + } + + if err != nil { + failureLog(function, args, startTime, "", "SetBucketPolicy failed", err).Fatal() + } + // should return policy `readonly`. + policyAccess, err = c.GetBucketPolicy(bucketName, "") + function = "GetBucketPolicy(bucketName, objectPrefix)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectPrefix": "", + } + + if err != nil { + failureLog(function, args, startTime, "", "GetBucketPolicy failed", err).Fatal() + } + if policyAccess != "readonly" { + failureLog(function, args, startTime, "", "policy should be set to readonly", err).Fatal() + } + + // Make the bucket 'public writeonly'. + err = c.SetBucketPolicy(bucketName, "", policy.BucketPolicyWriteOnly) + function = "SetBucketPolicy(bucketName, objectPrefix, bucketPolicy)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectPrefix": "", + "bucketPolicy": policy.BucketPolicyWriteOnly, + } + + if err != nil { + failureLog(function, args, startTime, "", "SetBucketPolicy failed", err).Fatal() + } + // should return policy `writeonly`. + policyAccess, err = c.GetBucketPolicy(bucketName, "") + function = "GetBucketPolicy(bucketName, objectPrefix)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectPrefix": "", + } + + if err != nil { + failureLog(function, args, startTime, "", "GetBucketPolicy failed", err).Fatal() + } + if policyAccess != "writeonly" { + failureLog(function, args, startTime, "", "policy should be set to writeonly", err).Fatal() + } + // Make the bucket 'public read/write'. + err = c.SetBucketPolicy(bucketName, "", policy.BucketPolicyReadWrite) + function = "SetBucketPolicy(bucketName, objectPrefix, bucketPolicy)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectPrefix": "", + "bucketPolicy": policy.BucketPolicyReadWrite, + } + + if err != nil { + failureLog(function, args, startTime, "", "SetBucketPolicy failed", err).Fatal() + } + // should return policy `readwrite`. + policyAccess, err = c.GetBucketPolicy(bucketName, "") + function = "GetBucketPolicy(bucketName, objectPrefix)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectPrefix": "", + } + + if err != nil { + failureLog(function, args, startTime, "", "GetBucketPolicy failed", err).Fatal() + } + if policyAccess != "readwrite" { + failureLog(function, args, startTime, "", "policy should be set to readwrite", err).Fatal() + } + // List all buckets. + buckets, err := c.ListBuckets() + function = "ListBuckets()" + args = nil + + if len(buckets) == 0 { + failureLog(function, args, startTime, "", "Found bucket list to be empty", err).Fatal() + } + if err != nil { + failureLog(function, args, startTime, "", "ListBuckets failed", err).Fatal() + } + + // Verify if previously created bucket is listed in list buckets. + bucketFound := false + for _, bucket := range buckets { + if bucket.Name == bucketName { + bucketFound = true + } + } + + // If bucket not found error out. + if !bucketFound { + failureLog(function, args, startTime, "", "Bucket: "+bucketName+" not found", err).Fatal() + } + + objectName := bucketName + "unique" + + // Generate data + buf := bytes.Repeat([]byte("f"), 1<<19) + + n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "") + function = "PutObject(bucketName, objectName, reader, contentType)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "contentType": "", + } + + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + if n != int64(len(buf)) { + failureLog(function, args, startTime, "", "Length doesn't match, expected "+string(int64(len(buf)))+" got "+string(n), err).Fatal() + } + + n, err = c.PutObject(bucketName, objectName+"-nolength", bytes.NewReader(buf), "binary/octet-stream") + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName + "-nolength", + "contentType": "binary/octet-stream", + } + + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + if n != int64(len(buf)) { + failureLog(function, args, startTime, "", "Length doesn't match, expected "+string(int64(len(buf)))+" got "+string(n), err).Fatal() + } + + // Instantiate a done channel to close all listing. + doneCh := make(chan struct{}) + defer close(doneCh) + + objFound := false + isRecursive := true // Recursive is true. + + function = "ListObjects(bucketName, objectName, isRecursive, doneCh)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "isRecursive": isRecursive, + } + + for obj := range c.ListObjects(bucketName, objectName, isRecursive, doneCh) { + if obj.Key == objectName { + objFound = true + break + } + } + if !objFound { + failureLog(function, args, startTime, "", "Object "+objectName+" not found", err).Fatal() + } + + objFound = false + isRecursive = true // Recursive is true. + function = "ListObjectsV2(bucketName, objectName, isRecursive, doneCh)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "isRecursive": isRecursive, + } + + for obj := range c.ListObjectsV2(bucketName, objectName, isRecursive, doneCh) { + if obj.Key == objectName { + objFound = true + break + } + } + if !objFound { + failureLog(function, args, startTime, "", "Object "+objectName+" not found", err).Fatal() + } + + incompObjNotFound := true + + function = "ListIncompleteUploads(bucketName, objectName, isRecursive, doneCh)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "isRecursive": isRecursive, + } + + for objIncompl := range c.ListIncompleteUploads(bucketName, objectName, isRecursive, doneCh) { + if objIncompl.Key != "" { + incompObjNotFound = false + break + } + } + if !incompObjNotFound { + failureLog(function, args, startTime, "", "Unexpected dangling incomplete upload found", err).Fatal() + } + + newReader, err := c.GetObject(bucketName, objectName) + function = "GetObject(bucketName, objectName)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + } + + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + + newReadBytes, err := ioutil.ReadAll(newReader) + if err != nil { + failureLog(function, args, startTime, "", "ReadAll failed", err).Fatal() + } + + if !bytes.Equal(newReadBytes, buf) { + failureLog(function, args, startTime, "", "GetObject bytes mismatch", err).Fatal() + } + + err = c.FGetObject(bucketName, objectName, fileName+"-f") + function = "FGetObject(bucketName, objectName, fileName)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "fileName": fileName + "-f", + } + + if err != nil { + failureLog(function, args, startTime, "", "FGetObject failed", err).Fatal() + } + + // Generate presigned HEAD object url. + presignedHeadURL, err := c.PresignedHeadObject(bucketName, objectName, 3600*time.Second, nil) + function = "PresignedHeadObject(bucketName, objectName, expires, reqParams)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "expires": 3600 * time.Second, + } + + if err != nil { + failureLog(function, args, startTime, "", "PresignedHeadObject failed", err).Fatal() + } + // Verify if presigned url works. + resp, err := http.Head(presignedHeadURL.String()) + if err != nil { + failureLog(function, args, startTime, "", "PresignedHeadObject response incorrect", err).Fatal() + } + if resp.StatusCode != http.StatusOK { + failureLog(function, args, startTime, "", "PresignedHeadObject response incorrect, status "+string(resp.StatusCode), err).Fatal() + } + if resp.Header.Get("ETag") == "" { + failureLog(function, args, startTime, "", "PresignedHeadObject response incorrect", err).Fatal() + } + resp.Body.Close() + + // Generate presigned GET object url. + presignedGetURL, err := c.PresignedGetObject(bucketName, objectName, 3600*time.Second, nil) + function = "PresignedGetObject(bucketName, objectName, expires, reqParams)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "expires": 3600 * time.Second, + } + + if err != nil { + failureLog(function, args, startTime, "", "PresignedGetObject failed", err).Fatal() + } + + // Verify if presigned url works. + resp, err = http.Get(presignedGetURL.String()) + if err != nil { + failureLog(function, args, startTime, "", "PresignedGetObject response incorrect", err).Fatal() + } + if resp.StatusCode != http.StatusOK { + failureLog(function, args, startTime, "", "PresignedGetObject response incorrect, status "+string(resp.StatusCode), err).Fatal() + } + newPresignedBytes, err := ioutil.ReadAll(resp.Body) + if err != nil { + failureLog(function, args, startTime, "", "PresignedGetObject response incorrect", err).Fatal() + } + resp.Body.Close() + if !bytes.Equal(newPresignedBytes, buf) { + failureLog(function, args, startTime, "", "PresignedGetObject response incorrect", err).Fatal() + } + + // Set request parameters. + reqParams := make(url.Values) + reqParams.Set("response-content-disposition", "attachment; filename=\"test.txt\"") + presignedGetURL, err = c.PresignedGetObject(bucketName, objectName, 3600*time.Second, reqParams) + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "expires": 3600 * time.Second, + "reqParams": reqParams, + } + + if err != nil { + failureLog(function, args, startTime, "", "PresignedGetObject failed", err).Fatal() + } + // Verify if presigned url works. + resp, err = http.Get(presignedGetURL.String()) + if err != nil { + failureLog(function, args, startTime, "", "PresignedGetObject response incorrect", err).Fatal() + } + if resp.StatusCode != http.StatusOK { + failureLog(function, args, startTime, "", "PresignedGetObject response incorrect, status "+string(resp.StatusCode), err).Fatal() + } + newPresignedBytes, err = ioutil.ReadAll(resp.Body) + if err != nil { + failureLog(function, args, startTime, "", "PresignedGetObject response incorrect", err).Fatal() + } + if !bytes.Equal(newPresignedBytes, buf) { + failureLog(function, args, startTime, "", "Bytes mismatch for presigned GET URL", err).Fatal() + } + if resp.Header.Get("Content-Disposition") != "attachment; filename=\"test.txt\"" { + failureLog(function, args, startTime, "", "wrong Content-Disposition received "+string(resp.Header.Get("Content-Disposition")), err).Fatal() + } + + presignedPutURL, err := c.PresignedPutObject(bucketName, objectName+"-presigned", 3600*time.Second) + + function = "PresignedPutObject(bucketName, objectName, expires)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "expires": 3600 * time.Second, + } + + if err != nil { + failureLog(function, args, startTime, "", "PresignedPutObject failed", err).Fatal() + } + + buf = bytes.Repeat([]byte("g"), 1<<19) + + req, err := http.NewRequest("PUT", presignedPutURL.String(), bytes.NewReader(buf)) + if err != nil { + failureLog(function, args, startTime, "", "Couldn't make HTTP request with PresignedPutObject URL", err).Fatal() + } + httpClient := &http.Client{ + // Setting a sensible time out of 30secs to wait for response + // headers. Request is pro-actively cancelled after 30secs + // with no response. + Timeout: 30 * time.Second, + Transport: http.DefaultTransport, + } + resp, err = httpClient.Do(req) + if err != nil { + failureLog(function, args, startTime, "", "PresignedPutObject failed", err).Fatal() + } + + newReader, err = c.GetObject(bucketName, objectName+"-presigned") + if err != nil { + failureLog(function, args, startTime, "", "GetObject after PresignedPutObject failed", err).Fatal() + } + + newReadBytes, err = ioutil.ReadAll(newReader) + if err != nil { + failureLog(function, args, startTime, "", "ReadAll after GetObject failed", err).Fatal() + } + + if !bytes.Equal(newReadBytes, buf) { + failureLog(function, args, startTime, "", "Bytes mismatch", err).Fatal() + } + + err = c.RemoveObject(bucketName, objectName) + function = "RemoveObject(bucketName, objectName)" + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + } + + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + err = c.RemoveObject(bucketName, objectName+"-f") + args["objectName"] = objectName + "-f" + + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + err = c.RemoveObject(bucketName, objectName+"-nolength") + args["objectName"] = objectName + "-nolength" + + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + err = c.RemoveObject(bucketName, objectName+"-presigned") + args["objectName"] = objectName + "-presigned" + + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + err = c.RemoveBucket(bucketName) + function = "RemoveBucket(bucketName)" + args = map[string]interface{}{ + "bucketName": bucketName, + } + + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + err = c.RemoveBucket(bucketName) + if err == nil { + failureLog(function, args, startTime, "", "RemoveBucket did not fail for invalid bucket name", err).Fatal() + } + if err.Error() != "The specified bucket does not exist" { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + if err = os.Remove(fileName); err != nil { + failureLog(function, args, startTime, "", "File Remove failed", err).Fatal() + } + if err = os.Remove(fileName + "-f"); err != nil { + failureLog(function, args, startTime, "", "File Remove failed", err).Fatal() + } + function = "testFunctional()" + successLogger(function, args, startTime).Info() +} + +// Test for validating GetObject Reader* methods functioning when the +// object is modified in the object store. +func testGetObjectObjectModified() { + // initialize logging params + startTime := time.Now() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + } + + // Instantiate new minio client object. + c, err := minio.NewV4( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Make a new bucket. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + defer c.RemoveBucket(bucketName) + + // Upload an object. + objectName := "myobject" + content := "helloworld" + _, err = c.PutObject(bucketName, objectName, strings.NewReader(content), "application/text") + if err != nil { + failureLog(function, args, startTime, "", "Failed to upload "+objectName+", to bucket "+bucketName, err).Fatal() + } + + defer c.RemoveObject(bucketName, objectName) + + reader, err := c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "Failed to GetObject "+objectName+", from bucket "+bucketName, err).Fatal() + } + defer reader.Close() + + // Read a few bytes of the object. + b := make([]byte, 5) + n, err := reader.ReadAt(b, 0) + if err != nil { + failureLog(function, args, startTime, "", "Failed to read object "+objectName+", from bucket "+bucketName+" at an offset", err).Fatal() + } + + // Upload different contents to the same object while object is being read. + newContent := "goodbyeworld" + _, err = c.PutObject(bucketName, objectName, strings.NewReader(newContent), "application/text") + if err != nil { + failureLog(function, args, startTime, "", "Failed to upload "+objectName+", to bucket "+bucketName, err).Fatal() + } + + // Confirm that a Stat() call in between doesn't change the Object's cached etag. + _, err = reader.Stat() + expectedError := "At least one of the pre-conditions you specified did not hold" + if err.Error() != expectedError { + failureLog(function, args, startTime, "", "Expected Stat to fail with error "+expectedError+", but received "+err.Error(), err).Fatal() + } + + // Read again only to find object contents have been modified since last read. + _, err = reader.ReadAt(b, int64(n)) + if err.Error() != expectedError { + failureLog(function, args, startTime, "", "Expected ReadAt to fail with error "+expectedError+", but received "+err.Error(), err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Test validates putObject to upload a file seeked at a given offset. +func testPutObjectUploadSeekedObject() { + // initialize logging params + startTime := time.Now() + function := "PutObject(bucketName, objectName, fileToUpload, contentType)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "fileToUpload": "", + "contentType": "binary/octet-stream", + } + + // Instantiate new minio client object. + c, err := minio.NewV4( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Make a new bucket. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + defer c.RemoveBucket(bucketName) + + tempfile, err := ioutil.TempFile("", "minio-go-upload-test-") + args["fileToUpload"] = tempfile + + if err != nil { + failureLog(function, args, startTime, "", "TempFile create failed", err).Fatal() + } + + var data []byte + if fileName := getFilePath("datafile-100-kB"); fileName != "" { + data, _ = ioutil.ReadFile(fileName) + } else { + // Generate data more than 32K + data = bytes.Repeat([]byte("1"), 120000) + } + var length = len(data) + if _, err = tempfile.Write(data); err != nil { + failureLog(function, args, startTime, "", "TempFile write failed", err).Fatal() + } + + objectName := fmt.Sprintf("test-file-%v", rand.Uint32()) + args["objectName"] = objectName + + offset := length / 2 + if _, err := tempfile.Seek(int64(offset), 0); err != nil { + failureLog(function, args, startTime, "", "TempFile seek failed", err).Fatal() + } + + n, err := c.PutObject(bucketName, objectName, tempfile, "binary/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + if n != int64(length-offset) { + failureLog(function, args, startTime, "", "Invalid length returned, expected "+string(int64(length-offset))+" got "+string(n), err).Fatal() + } + tempfile.Close() + if err = os.Remove(tempfile.Name()); err != nil { + failureLog(function, args, startTime, "", "File remove failed", err).Fatal() + } + + length = int(n) + + obj, err := c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + + n, err = obj.Seek(int64(offset), 0) + if err != nil { + failureLog(function, args, startTime, "", "Seek failed", err).Fatal() + } + if n != int64(offset) { + failureLog(function, args, startTime, "", "Invalid offset returned, expected "+string(int64(offset))+" got "+string(n), err).Fatal() + } + + n, err = c.PutObject(bucketName, objectName+"getobject", obj, "binary/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + if n != int64(length-offset) { + failureLog(function, args, startTime, "", "Invalid offset returned, expected "+string(int64(length-offset))+" got "+string(n), err).Fatal() + } + + if err = c.RemoveObject(bucketName, objectName); err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + if err = c.RemoveObject(bucketName, objectName+"getobject"); err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + if err = c.RemoveBucket(bucketName); err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Tests bucket re-create errors. +func testMakeBucketErrorV2() { + // initialize logging params + startTime := time.Now() + function := "MakeBucket(bucketName, region)" + args := map[string]interface{}{ + "bucketName": "", + "region": "eu-west-1", + } + + if os.Getenv(serverEndpoint) != "s3.amazonaws.com" { + ignoredLog(function, args, startTime, "Skipped region functional tests for non s3 runs").Info() + return + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio v2 client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket in 'eu-west-1'. + if err = c.MakeBucket(bucketName, "eu-west-1"); err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + if err = c.MakeBucket(bucketName, "eu-west-1"); err == nil { + failureLog(function, args, startTime, "", "MakeBucket did not fail for existing bucket name", err).Fatal() + } + // Verify valid error response from server. + if minio.ToErrorResponse(err).Code != "BucketAlreadyExists" && + minio.ToErrorResponse(err).Code != "BucketAlreadyOwnedByYou" { + failureLog(function, args, startTime, "", "Invalid error returned by server", err).Fatal() + } + if err = c.RemoveBucket(bucketName); err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Test get object reader to not throw error on being closed twice. +func testGetObjectClosedTwiceV2() { + // initialize logging params + startTime := time.Now() + function := "MakeBucket(bucketName, region)" + args := map[string]interface{}{ + "bucketName": "", + "region": "eu-west-1", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio v2 client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Generate 33K of data. + var reader = getDataReader("datafile-33-kB", thirtyThreeKiB) + defer reader.Close() + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + n, err := c.PutObject(bucketName, objectName, reader, "binary/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + if n != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(thirtyThreeKiB)+" got "+string(n), err).Fatal() + } + + // Read the data back + r, err := c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + + st, err := r.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Stat failed", err).Fatal() + } + + if st.Size != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(thirtyThreeKiB)+" got "+string(st.Size), err).Fatal() + } + if err := r.Close(); err != nil { + failureLog(function, args, startTime, "", "Stat failed", err).Fatal() + } + if err := r.Close(); err == nil { + failureLog(function, args, startTime, "", "Object is already closed, should return error", err).Fatal() + } + + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Tests removing partially uploaded objects. +func testRemovePartiallyUploadedV2() { + // initialize logging params + startTime := time.Now() + function := "RemoveIncompleteUpload(bucketName, objectName)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio v2 client object creation failed", err).Fatal() + } + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Enable tracing, write to stdout. + // c.TraceOn(os.Stderr) + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + r := bytes.NewReader(bytes.Repeat([]byte("a"), 128*1024)) + + reader, writer := io.Pipe() + go func() { + i := 0 + for i < 25 { + _, cerr := io.CopyN(writer, r, 128*1024) + if cerr != nil { + failureLog(function, args, startTime, "", "Copy failed", cerr).Fatal() + } + i++ + r.Seek(0, 0) + } + writer.CloseWithError(errors.New("proactively closed to be verified later")) + }() + + objectName := bucketName + "-resumable" + args["objectName"] = objectName + + _, err = c.PutObject(bucketName, objectName, reader, "application/octet-stream") + if err == nil { + failureLog(function, args, startTime, "", "PutObject should fail", err).Fatal() + } + if err.Error() != "proactively closed to be verified later" { + failureLog(function, args, startTime, "", "Unexpected error, expected : proactively closed to be verified later", err).Fatal() + } + err = c.RemoveIncompleteUpload(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveIncompleteUpload failed", err).Fatal() + } + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Tests FPutObject hidden contentType setting +func testFPutObjectV2() { + // initialize logging params + startTime := time.Now() + function := "FPutObject(bucketName, objectName, fileName, contentType)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "fileName": "", + "contentType": "application/octet-stream", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio v2 client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Make a temp file with 11*1024*1024 bytes of data. + file, err := ioutil.TempFile(os.TempDir(), "FPutObjectTest") + if err != nil { + failureLog(function, args, startTime, "", "TempFile creation failed", err).Fatal() + } + + r := bytes.NewReader(bytes.Repeat([]byte("b"), 11*1024*1024)) + n, err := io.CopyN(file, r, 11*1024*1024) + if err != nil { + failureLog(function, args, startTime, "", "Copy failed", err).Fatal() + } + if n != int64(11*1024*1024) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(11*1024*1024))+" got "+string(n), err).Fatal() + } + + // Close the file pro-actively for windows. + err = file.Close() + if err != nil { + failureLog(function, args, startTime, "", "File close failed", err).Fatal() + } + + // Set base object name + objectName := bucketName + "FPutObject" + args["objectName"] = objectName + args["fileName"] = file.Name() + + // Perform standard FPutObject with contentType provided (Expecting application/octet-stream) + n, err = c.FPutObject(bucketName, objectName+"-standard", file.Name(), "application/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "FPutObject failed", err).Fatal() + } + if n != int64(11*1024*1024) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(11*1024*1024))+" got "+string(n), err).Fatal() + } + + // Perform FPutObject with no contentType provided (Expecting application/octet-stream) + n, err = c.FPutObject(bucketName, objectName+"-Octet", file.Name(), "") + args["objectName"] = objectName + "-Octet" + args["contentType"] = "" + + if err != nil { + failureLog(function, args, startTime, "", "FPutObject failed", err).Fatal() + } + if n != int64(11*1024*1024) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(11*1024*1024))+" got "+string(n), err).Fatal() + } + + // Add extension to temp file name + fileName := file.Name() + err = os.Rename(file.Name(), fileName+".gtar") + if err != nil { + failureLog(function, args, startTime, "", "Rename failed", err).Fatal() + } + + // Perform FPutObject with no contentType provided (Expecting application/x-gtar) + n, err = c.FPutObject(bucketName, objectName+"-GTar", fileName+".gtar", "") + args["objectName"] = objectName + "-Octet" + args["contentType"] = "" + args["fileName"] = fileName + ".gtar" + + if err != nil { + failureLog(function, args, startTime, "", "FPutObject failed", err).Fatal() + } + if n != int64(11*1024*1024) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(11*1024*1024))+" got "+string(n), err).Fatal() + } + + // Check headers + rStandard, err := c.StatObject(bucketName, objectName+"-standard") + if err != nil { + failureLog(function, args, startTime, "", "StatObject failed", err).Fatal() + } + if rStandard.ContentType != "application/octet-stream" { + failureLog(function, args, startTime, "", "Content-Type headers mismatched, expected: application/octet-stream , got "+rStandard.ContentType, err).Fatal() + } + + rOctet, err := c.StatObject(bucketName, objectName+"-Octet") + if err != nil { + failureLog(function, args, startTime, "", "StatObject failed", err).Fatal() + } + if rOctet.ContentType != "application/octet-stream" { + failureLog(function, args, startTime, "", "Content-Type headers mismatched, expected: application/octet-stream , got "+rOctet.ContentType, err).Fatal() + } + + rGTar, err := c.StatObject(bucketName, objectName+"-GTar") + if err != nil { + failureLog(function, args, startTime, "", "StatObject failed", err).Fatal() + } + if rGTar.ContentType != "application/x-gtar" { + failureLog(function, args, startTime, "", "Content-Type headers mismatched, expected: application/x-gtar , got "+rGTar.ContentType, err).Fatal() + } + + // Remove all objects and bucket and temp file + err = c.RemoveObject(bucketName, objectName+"-standard") + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + err = c.RemoveObject(bucketName, objectName+"-Octet") + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + err = c.RemoveObject(bucketName, objectName+"-GTar") + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + + err = os.Remove(fileName + ".gtar") + if err != nil { + failureLog(function, args, startTime, "", "File remove failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Tests various bucket supported formats. +func testMakeBucketRegionsV2() { + // initialize logging params + startTime := time.Now() + function := "MakeBucket(bucketName, region)" + args := map[string]interface{}{ + "bucketName": "", + "region": "eu-west-1", + } + + if os.Getenv(serverEndpoint) != "s3.amazonaws.com" { + ignoredLog(function, args, startTime, "Skipped region functional tests for non s3 runs").Info() + return + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio v2 client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket in 'eu-central-1'. + if err = c.MakeBucket(bucketName, "eu-west-1"); err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + if err = c.RemoveBucket(bucketName); err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + + // Make a new bucket with '.' in its name, in 'us-west-2'. This + // request is internally staged into a path style instead of + // virtual host style. + if err = c.MakeBucket(bucketName+".withperiod", "us-west-2"); err != nil { + args["bucketName"] = bucketName + ".withperiod" + args["region"] = "us-west-2" + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Remove the newly created bucket. + if err = c.RemoveBucket(bucketName + ".withperiod"); err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Tests get object ReaderSeeker interface methods. +func testGetObjectReadSeekFunctionalV2() { + // initialize logging params + startTime := time.Now() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio v2 client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Generate 33K of data. + var reader = getDataReader("datafile-33-kB", thirtyThreeKiB) + defer reader.Close() + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + buf, err := ioutil.ReadAll(reader) + if err != nil { + failureLog(function, args, startTime, "", "ReadAll failed", err).Fatal() + } + + // Save the data. + n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + if n != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(thirtyThreeKiB))+" got "+string(n), err).Fatal() + } + + // Read the data back + r, err := c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + + st, err := r.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Stat failed", err).Fatal() + } + + if st.Size != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes in stat does not match, expected "+string(int64(thirtyThreeKiB))+" got "+string(st.Size), err).Fatal() + } + + offset := int64(2048) + n, err = r.Seek(offset, 0) + if err != nil { + failureLog(function, args, startTime, "", "Seek failed", err).Fatal() + } + if n != offset { + failureLog(function, args, startTime, "", "Number of seeked bytes does not match, expected "+string(offset)+" got "+string(n), err).Fatal() + } + n, err = r.Seek(0, 1) + if err != nil { + failureLog(function, args, startTime, "", "Seek failed", err).Fatal() + } + if n != offset { + failureLog(function, args, startTime, "", "Number of seeked bytes does not match, expected "+string(offset)+" got "+string(n), err).Fatal() + } + _, err = r.Seek(offset, 2) + if err == nil { + failureLog(function, args, startTime, "", "Seek on positive offset for whence '2' should error out", err).Fatal() + } + n, err = r.Seek(-offset, 2) + if err != nil { + failureLog(function, args, startTime, "", "Seek failed", err).Fatal() + } + if n != st.Size-offset { + failureLog(function, args, startTime, "", "Number of seeked bytes does not match, expected "+string(st.Size-offset)+" got "+string(n), err).Fatal() + } + + var buffer1 bytes.Buffer + if _, err = io.CopyN(&buffer1, r, st.Size); err != nil { + if err != io.EOF { + failureLog(function, args, startTime, "", "Copy failed", err).Fatal() + } + } + if !bytes.Equal(buf[len(buf)-int(offset):], buffer1.Bytes()) { + failureLog(function, args, startTime, "", "Incorrect read bytes v/s original buffer", err).Fatal() + } + + // Seek again and read again. + n, err = r.Seek(offset-1, 0) + if err != nil { + failureLog(function, args, startTime, "", "Seek failed", err).Fatal() + } + if n != (offset - 1) { + failureLog(function, args, startTime, "", "Number of seeked bytes does not match, expected "+string(offset-1)+" got "+string(n), err).Fatal() + } + + var buffer2 bytes.Buffer + if _, err = io.CopyN(&buffer2, r, st.Size); err != nil { + if err != io.EOF { + failureLog(function, args, startTime, "", "Copy failed", err).Fatal() + } + } + // Verify now lesser bytes. + if !bytes.Equal(buf[2047:], buffer2.Bytes()) { + failureLog(function, args, startTime, "", "Incorrect read bytes v/s original buffer", err).Fatal() + } + + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Tests get object ReaderAt interface methods. +func testGetObjectReadAtFunctionalV2() { + // initialize logging params + startTime := time.Now() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio v2 client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Generate 33K of data. + var reader = getDataReader("datafile-33-kB", thirtyThreeKiB) + defer reader.Close() + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + buf, err := ioutil.ReadAll(reader) + if err != nil { + failureLog(function, args, startTime, "", "ReadAll failed", err).Fatal() + } + + // Save the data + n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "binary/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + if n != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(thirtyThreeKiB)+" got "+string(n), err).Fatal() + } + + // Read the data back + r, err := c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + + st, err := r.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Stat failed", err).Fatal() + } + + if st.Size != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(thirtyThreeKiB)+" got "+string(st.Size), err).Fatal() + } + + offset := int64(2048) + + // Read directly + buf2 := make([]byte, 512) + buf3 := make([]byte, 512) + buf4 := make([]byte, 512) + + m, err := r.ReadAt(buf2, offset) + if err != nil { + failureLog(function, args, startTime, "", "ReadAt failed", err).Fatal() + } + if m != len(buf2) { + failureLog(function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf2))+" got "+string(m), err).Fatal() + } + if !bytes.Equal(buf2, buf[offset:offset+512]) { + failureLog(function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err).Fatal() + } + offset += 512 + m, err = r.ReadAt(buf3, offset) + if err != nil { + failureLog(function, args, startTime, "", "ReadAt failed", err).Fatal() + } + if m != len(buf3) { + failureLog(function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf3))+" got "+string(m), err).Fatal() + } + if !bytes.Equal(buf3, buf[offset:offset+512]) { + failureLog(function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err).Fatal() + } + offset += 512 + m, err = r.ReadAt(buf4, offset) + if err != nil { + failureLog(function, args, startTime, "", "ReadAt failed", err).Fatal() + } + if m != len(buf4) { + failureLog(function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf4))+" got "+string(m), err).Fatal() + } + if !bytes.Equal(buf4, buf[offset:offset+512]) { + failureLog(function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err).Fatal() + } + + buf5 := make([]byte, n) + // Read the whole object. + m, err = r.ReadAt(buf5, 0) + if err != nil { + if err != io.EOF { + failureLog(function, args, startTime, "", "ReadAt failed", err).Fatal() + } + } + if m != len(buf5) { + failureLog(function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf5))+" got "+string(m), err).Fatal() + } + if !bytes.Equal(buf, buf5) { + failureLog(function, args, startTime, "", "Incorrect data read in GetObject, than what was previously uploaded", err).Fatal() + } + + buf6 := make([]byte, n+1) + // Read the whole object and beyond. + _, err = r.ReadAt(buf6, 0) + if err != nil { + if err != io.EOF { + failureLog(function, args, startTime, "", "ReadAt failed", err).Fatal() + } + } + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Tests copy object +func testCopyObjectV2() { + // initialize logging params + startTime := time.Now() + function := "CopyObject(destination, source)" + args := map[string]interface{}{ + "destination": "", + "source": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio v2 client object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + + // Make a new bucket in 'us-east-1' (source bucket). + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Make a new bucket in 'us-east-1' (destination bucket). + err = c.MakeBucket(bucketName+"-copy", "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Generate 33K of data. + var reader = getDataReader("datafile-33-kB", thirtyThreeKiB) + defer reader.Close() + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + n, err := c.PutObject(bucketName, objectName, reader, "binary/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + if n != int64(thirtyThreeKiB) { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(thirtyThreeKiB))+" got "+string(n), err).Fatal() + } + + r, err := c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + // Check the various fields of source object against destination object. + objInfo, err := r.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Stat failed", err).Fatal() + } + + // Copy Source + src := minio.NewSourceInfo(bucketName, objectName, nil) + + // Set copy conditions. + + // All invalid conditions first. + err = src.SetModifiedSinceCond(time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC)) + if err == nil { + failureLog(function, args, startTime, "", "SetModifiedSinceCond did not fail for invalid conditions", err).Fatal() + } + err = src.SetUnmodifiedSinceCond(time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC)) + if err == nil { + failureLog(function, args, startTime, "", "SetUnmodifiedSinceCond did not fail for invalid conditions", err).Fatal() + } + err = src.SetMatchETagCond("") + if err == nil { + failureLog(function, args, startTime, "", "SetMatchETagCond did not fail for invalid conditions", err).Fatal() + } + err = src.SetMatchETagExceptCond("") + if err == nil { + failureLog(function, args, startTime, "", "SetMatchETagExceptCond did not fail for invalid conditions", err).Fatal() + } + + err = src.SetModifiedSinceCond(time.Date(2014, time.April, 0, 0, 0, 0, 0, time.UTC)) + if err != nil { + failureLog(function, args, startTime, "", "SetModifiedSinceCond failed", err).Fatal() + } + err = src.SetMatchETagCond(objInfo.ETag) + if err != nil { + failureLog(function, args, startTime, "", "SetMatchETagCond failed", err).Fatal() + } + args["source"] = src + + dst, err := minio.NewDestinationInfo(bucketName+"-copy", objectName+"-copy", nil, nil) + if err != nil { + failureLog(function, args, startTime, "", "NewDestinationInfo failed", err).Fatal() + } + args["destination"] = dst + + // Perform the Copy + err = c.CopyObject(dst, src) + if err != nil { + failureLog(function, args, startTime, "", "CopyObject failed", err).Fatal() + } + + // Source object + r, err = c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + // Destination object + readerCopy, err := c.GetObject(bucketName+"-copy", objectName+"-copy") + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + // Check the various fields of source object against destination object. + objInfo, err = r.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Stat failed", err).Fatal() + } + objInfoCopy, err := readerCopy.Stat() + if err != nil { + failureLog(function, args, startTime, "", "Stat failed", err).Fatal() + } + if objInfo.Size != objInfoCopy.Size { + failureLog(function, args, startTime, "", "Number of bytes does not match, expected "+string(objInfoCopy.Size)+" got "+string(objInfo.Size), err).Fatal() + } + + // CopyObject again but with wrong conditions + src = minio.NewSourceInfo(bucketName, objectName, nil) + err = src.SetUnmodifiedSinceCond(time.Date(2014, time.April, 0, 0, 0, 0, 0, time.UTC)) + if err != nil { + failureLog(function, args, startTime, "", "SetUnmodifiedSinceCond failed", err).Fatal() + } + err = src.SetMatchETagExceptCond(objInfo.ETag) + if err != nil { + failureLog(function, args, startTime, "", "SetMatchETagExceptCond failed", err).Fatal() + } + + // Perform the Copy which should fail + err = c.CopyObject(dst, src) + if err == nil { + failureLog(function, args, startTime, "", "CopyObject did not fail for invalid conditions", err).Fatal() + } + + // Remove all objects and buckets + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + err = c.RemoveObject(bucketName+"-copy", objectName+"-copy") + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + + err = c.RemoveBucket(bucketName + "-copy") + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +func testComposeObjectErrorCasesWrapper(c *minio.Client) { + // initialize logging params + startTime := time.Now() + function := "testComposeObjectErrorCasesWrapper(minioClient)" + args := map[string]interface{}{} + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + + // Make a new bucket in 'us-east-1' (source bucket). + err := c.MakeBucket(bucketName, "us-east-1") + + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Test that more than 10K source objects cannot be + // concatenated. + srcArr := [10001]minio.SourceInfo{} + srcSlice := srcArr[:] + dst, err := minio.NewDestinationInfo(bucketName, "object", nil, nil) + if err != nil { + failureLog(function, args, startTime, "", "NewDestinationInfo failed", err).Fatal() + } + + if err := c.ComposeObject(dst, srcSlice); err == nil { + failureLog(function, args, startTime, "", "Expected error in ComposeObject", err).Fatal() + } else if err.Error() != "There must be as least one and up to 10000 source objects." { + failureLog(function, args, startTime, "", "Got unexpected error", err).Fatal() + } + + // Create a source with invalid offset spec and check that + // error is returned: + // 1. Create the source object. + const badSrcSize = 5 * 1024 * 1024 + buf := bytes.Repeat([]byte("1"), badSrcSize) + _, err = c.PutObject(bucketName, "badObject", bytes.NewReader(buf), "") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + // 2. Set invalid range spec on the object (going beyond + // object size) + badSrc := minio.NewSourceInfo(bucketName, "badObject", nil) + err = badSrc.SetRange(1, badSrcSize) + if err != nil { + failureLog(function, args, startTime, "", "Setting NewSourceInfo failed", err).Fatal() + } + // 3. ComposeObject call should fail. + if err := c.ComposeObject(dst, []minio.SourceInfo{badSrc}); err == nil { + failureLog(function, args, startTime, "", "ComposeObject expected to fail", err).Fatal() + } else if !strings.Contains(err.Error(), "has invalid segment-to-copy") { + failureLog(function, args, startTime, "", "Got invalid error", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Test expected error cases +func testComposeObjectErrorCasesV2() { + // initialize logging params + startTime := time.Now() + function := "testComposeObjectErrorCasesV2()" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio v2 client object creation failed", err).Fatal() + } + + testComposeObjectErrorCasesWrapper(c) +} + +func testComposeMultipleSources(c *minio.Client) { + // initialize logging params + startTime := time.Now() + function := "ComposeObject(destination, sources)" + args := map[string]interface{}{ + "destination": "", + "sources": "", + } + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + // Make a new bucket in 'us-east-1' (source bucket). + err := c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Upload a small source object + const srcSize = 1024 * 1024 * 5 + buf := bytes.Repeat([]byte("1"), srcSize) + _, err = c.PutObject(bucketName, "srcObject", bytes.NewReader(buf), "binary/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + // We will append 10 copies of the object. + srcs := []minio.SourceInfo{} + for i := 0; i < 10; i++ { + srcs = append(srcs, minio.NewSourceInfo(bucketName, "srcObject", nil)) + } + // make the last part very small + err = srcs[9].SetRange(0, 0) + if err != nil { + failureLog(function, args, startTime, "", "SetRange failed", err).Fatal() + } + args["sources"] = srcs + + dst, err := minio.NewDestinationInfo(bucketName, "dstObject", nil, nil) + args["destination"] = dst + + if err != nil { + failureLog(function, args, startTime, "", "NewDestinationInfo failed", err).Fatal() + } + err = c.ComposeObject(dst, srcs) + if err != nil { + failureLog(function, args, startTime, "", "ComposeObject failed", err).Fatal() + } + + objProps, err := c.StatObject(bucketName, "dstObject") + if err != nil { + failureLog(function, args, startTime, "", "StatObject failed", err).Fatal() + } + + if objProps.Size != 9*srcSize+1 { + failureLog(function, args, startTime, "", "Size mismatched! Expected "+string(10000*srcSize)+" got "+string(objProps.Size), err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Test concatenating multiple objects objects +func testCompose10KSourcesV2() { + // initialize logging params + startTime := time.Now() + function := "testCompose10KSourcesV2(minioClient)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio v2 client object creation failed", err).Fatal() + } + + testComposeMultipleSources(c) +} + +func testEncryptedCopyObjectWrapper(c *minio.Client) { + // initialize logging params + startTime := time.Now() + function := "testEncryptedCopyObjectWrapper(minioClient)" + args := map[string]interface{}{} + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + // Make a new bucket in 'us-east-1' (source bucket). + err := c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + key1 := minio.NewSSEInfo([]byte("32byteslongsecretkeymustbegiven1"), "AES256") + key2 := minio.NewSSEInfo([]byte("32byteslongsecretkeymustbegiven2"), "AES256") + + // 1. create an sse-c encrypted object to copy by uploading + const srcSize = 1024 * 1024 + buf := bytes.Repeat([]byte("abcde"), srcSize) // gives a buffer of 5MiB + metadata := make(map[string][]string) + for k, v := range key1.GetSSEHeaders() { + metadata[k] = append(metadata[k], v) + } + _, err = c.PutObjectWithSize(bucketName, "srcObject", bytes.NewReader(buf), int64(len(buf)), metadata, nil) + if err != nil { + failureLog(function, args, startTime, "", "PutObjectWithSize failed", err).Fatal() + } + + // 2. copy object and change encryption key + src := minio.NewSourceInfo(bucketName, "srcObject", &key1) + dst, err := minio.NewDestinationInfo(bucketName, "dstObject", &key2, nil) + if err != nil { + failureLog(function, args, startTime, "", "NewDestinationInfo failed", err).Fatal() + } + + err = c.CopyObject(dst, src) + if err != nil { + failureLog(function, args, startTime, "", "CopyObject failed", err).Fatal() + } + + // 3. get copied object and check if content is equal + reqH := minio.NewGetReqHeaders() + for k, v := range key2.GetSSEHeaders() { + reqH.Set(k, v) + } + coreClient := minio.Core{c} + reader, _, err := coreClient.GetObject(bucketName, "dstObject", reqH) + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + defer reader.Close() + + decBytes, err := ioutil.ReadAll(reader) + if err != nil { + failureLog(function, args, startTime, "", "ReadAll failed", err).Fatal() + } + if !bytes.Equal(decBytes, buf) { + failureLog(function, args, startTime, "", "Downloaded object mismatched for encrypted object", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Test encrypted copy object +func testEncryptedCopyObject() { + // initialize logging params + startTime := time.Now() + function := "testEncryptedCopyObject()" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.NewV4( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio v2 client object creation failed", err).Fatal() + } + + // c.TraceOn(os.Stderr) + testEncryptedCopyObjectWrapper(c) +} + +// Test encrypted copy object +func testEncryptedCopyObjectV2() { + // initialize logging params + startTime := time.Now() + function := "testEncryptedCopyObjectV2()" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio v2 client object creation failed", err).Fatal() + } + + testEncryptedCopyObjectWrapper(c) +} + +func testUserMetadataCopying() { + // initialize logging params + startTime := time.Now() + function := "testUserMetadataCopying()" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.NewV4( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + // c.TraceOn(os.Stderr) + testUserMetadataCopyingWrapper(c) +} + +func testUserMetadataCopyingWrapper(c *minio.Client) { + // initialize logging params + startTime := time.Now() + function := "CopyObject(destination, source)" + args := map[string]interface{}{ + "destination": "", + "source": "", + } + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + // Make a new bucket in 'us-east-1' (source bucket). + err := c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + fetchMeta := func(object string) (h http.Header) { + objInfo, err := c.StatObject(bucketName, object) + if err != nil { + failureLog(function, args, startTime, "", "Stat failed", err).Fatal() + } + h = make(http.Header) + for k, vs := range objInfo.Metadata { + if strings.HasPrefix(strings.ToLower(k), "x-amz-meta-") { + for _, v := range vs { + h.Add(k, v) + } + } + } + return h + } + + // 1. create a client encrypted object to copy by uploading + const srcSize = 1024 * 1024 + buf := bytes.Repeat([]byte("abcde"), srcSize) // gives a buffer of 5MiB + metadata := make(http.Header) + metadata.Set("x-amz-meta-myheader", "myvalue") + _, err = c.PutObjectWithMetadata(bucketName, "srcObject", + bytes.NewReader(buf), metadata, nil) + if err != nil { + failureLog(function, args, startTime, "", "PutObjectWithMetadata failed", err).Fatal() + } + if !reflect.DeepEqual(metadata, fetchMeta("srcObject")) { + failureLog(function, args, startTime, "", "Metadata match failed", err).Fatal() + } + + // 2. create source + src := minio.NewSourceInfo(bucketName, "srcObject", nil) + // 2.1 create destination with metadata set + dst1, err := minio.NewDestinationInfo(bucketName, "dstObject-1", nil, map[string]string{"notmyheader": "notmyvalue"}) + if err != nil { + failureLog(function, args, startTime, "", "NewDestinationInfo failed", err).Fatal() + } + + // 3. Check that copying to an object with metadata set resets + // the headers on the copy. + err = c.CopyObject(dst1, src) + args["destination"] = dst1 + args["source"] = src + + if err != nil { + failureLog(function, args, startTime, "", "CopyObject failed", err).Fatal() + } + + expectedHeaders := make(http.Header) + expectedHeaders.Set("x-amz-meta-notmyheader", "notmyvalue") + if !reflect.DeepEqual(expectedHeaders, fetchMeta("dstObject-1")) { + failureLog(function, args, startTime, "", "Metadata match failed", err).Fatal() + } + + // 4. create destination with no metadata set and same source + dst2, err := minio.NewDestinationInfo(bucketName, "dstObject-2", nil, nil) + if err != nil { + failureLog(function, args, startTime, "", "NewDestinationInfo failed", err).Fatal() + + } + src = minio.NewSourceInfo(bucketName, "srcObject", nil) + + // 5. Check that copying to an object with no metadata set, + // copies metadata. + err = c.CopyObject(dst2, src) + args["destination"] = dst2 + args["source"] = src + + if err != nil { + failureLog(function, args, startTime, "", "CopyObject failed", err).Fatal() + } + + expectedHeaders = metadata + if !reflect.DeepEqual(expectedHeaders, fetchMeta("dstObject-2")) { + failureLog(function, args, startTime, "", "Metadata match failed", err).Fatal() + } + + // 6. Compose a pair of sources. + srcs := []minio.SourceInfo{ + minio.NewSourceInfo(bucketName, "srcObject", nil), + minio.NewSourceInfo(bucketName, "srcObject", nil), + } + dst3, err := minio.NewDestinationInfo(bucketName, "dstObject-3", nil, nil) + if err != nil { + failureLog(function, args, startTime, "", "NewDestinationInfo failed", err).Fatal() + } + + err = c.ComposeObject(dst3, srcs) + function = "ComposeObject(destination, sources)" + args["destination"] = dst3 + args["source"] = srcs + + if err != nil { + failureLog(function, args, startTime, "", "ComposeObject failed", err).Fatal() + } + + // Check that no headers are copied in this case + if !reflect.DeepEqual(make(http.Header), fetchMeta("dstObject-3")) { + failureLog(function, args, startTime, "", "Metadata match failed", err).Fatal() + } + + // 7. Compose a pair of sources with dest user metadata set. + srcs = []minio.SourceInfo{ + minio.NewSourceInfo(bucketName, "srcObject", nil), + minio.NewSourceInfo(bucketName, "srcObject", nil), + } + dst4, err := minio.NewDestinationInfo(bucketName, "dstObject-4", nil, map[string]string{"notmyheader": "notmyvalue"}) + if err != nil { + failureLog(function, args, startTime, "", "NewDestinationInfo failed", err).Fatal() + } + + err = c.ComposeObject(dst4, srcs) + function = "ComposeObject(destination, sources)" + args["destination"] = dst4 + args["source"] = srcs + + if err != nil { + failureLog(function, args, startTime, "", "ComposeObject failed", err).Fatal() + } + + // Check that no headers are copied in this case + expectedHeaders = make(http.Header) + expectedHeaders.Set("x-amz-meta-notmyheader", "notmyvalue") + if !reflect.DeepEqual(expectedHeaders, fetchMeta("dstObject-4")) { + failureLog(function, args, startTime, "", "Metadata match failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +func testUserMetadataCopyingV2() { + // initialize logging params + startTime := time.Now() + function := "testUserMetadataCopyingV2()" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client v2 object creation failed", err).Fatal() + } + + // c.TraceOn(os.Stderr) + testUserMetadataCopyingWrapper(c) +} + +// Test put object with size -1 byte object. +func testPutObjectNoLengthV2() { + // initialize logging params + startTime := time.Now() + function := "PutObjectWithSize(bucketName, objectName, reader, size, metadata, progress)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "size": -1, + "metadata": nil, + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client v2 object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), + "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + objectName := bucketName + "unique" + args["objectName"] = objectName + + // Generate data using 4 parts so that all 3 'workers' are utilized and a part is leftover. + // Use different data for each part for multipart tests to ensure part order at the end. + var reader = getDataReader("datafile-65-MB", sixtyFiveMiB) + defer reader.Close() + + // Upload an object. + n, err := c.PutObjectWithSize(bucketName, objectName, reader, -1, nil, nil) + if err != nil { + failureLog(function, args, startTime, "", "PutObjectWithSize failed", err).Fatal() + } + if n != int64(sixtyFiveMiB) { + failureLog(function, args, startTime, "", "Expected upload object size "+string(sixtyFiveMiB)+" got "+string(n), err).Fatal() + } + + // Remove the object. + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + // Remove the bucket. + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Test put objects of unknown size. +func testPutObjectsUnknownV2() { + // initialize logging params + startTime := time.Now() + function := "PutObjectStreaming(bucketName, objectName, reader)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client v2 object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), + "minio-go-test") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Issues are revealed by trying to upload multiple files of unknown size + // sequentially (on 4GB machines) + for i := 1; i <= 4; i++ { + // Simulate that we could be receiving byte slices of data that we want + // to upload as a file + rpipe, wpipe := io.Pipe() + defer rpipe.Close() + go func() { + b := []byte("test") + wpipe.Write(b) + wpipe.Close() + }() + + // Upload the object. + objectName := fmt.Sprintf("%sunique%d", bucketName, i) + args["objectName"] = objectName + + n, err := c.PutObjectStreaming(bucketName, objectName, rpipe) + if err != nil { + failureLog(function, args, startTime, "", "PutObjectStreaming failed", err).Fatal() + } + if n != int64(4) { + failureLog(function, args, startTime, "", "Expected upload object size "+string(4)+" got "+string(n), err).Fatal() + } + + // Remove the object. + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + } + + // Remove the bucket. + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Test put object with 0 byte object. +func testPutObject0ByteV2() { + // initialize logging params + startTime := time.Now() + function := "PutObjectWithSize(bucketName, objectName, reader, size, metadata, progress)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "size": 0, + "metadata": nil, + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client v2 object creation failed", err).Fatal() + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), + "minio-go-test") + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + objectName := bucketName + "unique" + + // Upload an object. + n, err := c.PutObjectWithSize(bucketName, objectName, bytes.NewReader([]byte("")), 0, nil, nil) + if err != nil { + failureLog(function, args, startTime, "", "PutObjectWithSize failed", err).Fatal() + } + if n != 0 { + failureLog(function, args, startTime, "", "Expected upload object size 0 but got "+string(n), err).Fatal() + } + + // Remove the object. + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + + // Remove the bucket. + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Test expected error cases +func testComposeObjectErrorCases() { + // initialize logging params + startTime := time.Now() + function := "testComposeObjectErrorCases()" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.NewV4( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + testComposeObjectErrorCasesWrapper(c) +} + +// Test concatenating 10K objects +func testCompose10KSources() { + // initialize logging params + startTime := time.Now() + function := "testCompose10KSources()" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.NewV4( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client object creation failed", err).Fatal() + } + + testComposeMultipleSources(c) +} + +// Tests comprehensive list of all methods. +func testFunctionalV2() { + // initialize logging params + startTime := time.Now() + function := "testFunctionalV2()" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + c, err := minio.NewV2( + os.Getenv(serverEndpoint), + os.Getenv(accessKey), + os.Getenv(secretKey), + mustParseBool(os.Getenv(enableHTTPS)), + ) + if err != nil { + failureLog(function, args, startTime, "", "Minio client v2 object creation failed", err).Fatal() + } + + // Enable to debug + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0") + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + + // Make a new bucket. + err = c.MakeBucket(bucketName, "us-east-1") + if err != nil { + failureLog(function, args, startTime, "", "MakeBucket failed", err).Fatal() + } + + // Generate a random file name. + fileName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + file, err := os.Create(fileName) + if err != nil { + failureLog(function, args, startTime, "", "file create failed", err).Fatal() + } + for i := 0; i < 3; i++ { + buf := make([]byte, rand.Intn(1<<19)) + _, err = file.Write(buf) + if err != nil { + failureLog(function, args, startTime, "", "file write failed", err).Fatal() + } + } + file.Close() + + // Verify if bucket exits and you have access. + var exists bool + exists, err = c.BucketExists(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "BucketExists failed", err).Fatal() + } + if !exists { + failureLog(function, args, startTime, "", "Could not find existing bucket "+bucketName, err).Fatal() + } + + // Make the bucket 'public read/write'. + err = c.SetBucketPolicy(bucketName, "", policy.BucketPolicyReadWrite) + if err != nil { + failureLog(function, args, startTime, "", "SetBucketPolicy failed", err).Fatal() + } + + // List all buckets. + buckets, err := c.ListBuckets() + if len(buckets) == 0 { + failureLog(function, args, startTime, "", "List buckets cannot be empty", err).Fatal() + } + if err != nil { + failureLog(function, args, startTime, "", "ListBuckets failed", err).Fatal() + } + + // Verify if previously created bucket is listed in list buckets. + bucketFound := false + for _, bucket := range buckets { + if bucket.Name == bucketName { + bucketFound = true + } + } + + // If bucket not found error out. + if !bucketFound { + failureLog(function, args, startTime, "", "Bucket "+bucketName+"not found", err).Fatal() + } + + objectName := bucketName + "unique" + + // Generate data + buf := bytes.Repeat([]byte("n"), rand.Intn(1<<19)) + + n, err := c.PutObject(bucketName, objectName, bytes.NewReader(buf), "") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + if n != int64(len(buf)) { + failureLog(function, args, startTime, "", "Expected uploaded object length "+string(len(buf))+" got "+string(n), err).Fatal() + } + + n, err = c.PutObject(bucketName, objectName+"-nolength", bytes.NewReader(buf), "binary/octet-stream") + if err != nil { + failureLog(function, args, startTime, "", "PutObject failed", err).Fatal() + } + + if n != int64(len(buf)) { + failureLog(function, args, startTime, "", "Expected uploaded object length "+string(len(buf))+" got "+string(n), err).Fatal() + } + + // Instantiate a done channel to close all listing. + doneCh := make(chan struct{}) + defer close(doneCh) + + objFound := false + isRecursive := true // Recursive is true. + for obj := range c.ListObjects(bucketName, objectName, isRecursive, doneCh) { + if obj.Key == objectName { + objFound = true + break + } + } + if !objFound { + failureLog(function, args, startTime, "", "Could not find existing object "+objectName, err).Fatal() + } + + objFound = false + isRecursive = true // Recursive is true. + for obj := range c.ListObjects(bucketName, objectName, isRecursive, doneCh) { + if obj.Key == objectName { + objFound = true + break + } + } + if !objFound { + failureLog(function, args, startTime, "", "Could not find existing object "+objectName, err).Fatal() + } + + incompObjNotFound := true + for objIncompl := range c.ListIncompleteUploads(bucketName, objectName, isRecursive, doneCh) { + if objIncompl.Key != "" { + incompObjNotFound = false + break + } + } + if !incompObjNotFound { + failureLog(function, args, startTime, "", "Unexpected dangling incomplete upload found", err).Fatal() + } + + newReader, err := c.GetObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + + newReadBytes, err := ioutil.ReadAll(newReader) + if err != nil { + failureLog(function, args, startTime, "", "ReadAll failed", err).Fatal() + } + + if !bytes.Equal(newReadBytes, buf) { + failureLog(function, args, startTime, "", "Bytes mismatch", err).Fatal() + } + + err = c.FGetObject(bucketName, objectName, fileName+"-f") + if err != nil { + failureLog(function, args, startTime, "", "FgetObject failed", err).Fatal() + } + + // Generate presigned HEAD object url. + presignedHeadURL, err := c.PresignedHeadObject(bucketName, objectName, 3600*time.Second, nil) + if err != nil { + failureLog(function, args, startTime, "", "PresignedHeadObject failed", err).Fatal() + } + // Verify if presigned url works. + resp, err := http.Head(presignedHeadURL.String()) + if err != nil { + failureLog(function, args, startTime, "", "PresignedHeadObject URL head request failed", err).Fatal() + } + if resp.StatusCode != http.StatusOK { + failureLog(function, args, startTime, "", "PresignedHeadObject URL returns status "+string(resp.StatusCode), err).Fatal() + } + if resp.Header.Get("ETag") == "" { + failureLog(function, args, startTime, "", "Got empty ETag", err).Fatal() + } + resp.Body.Close() + + // Generate presigned GET object url. + presignedGetURL, err := c.PresignedGetObject(bucketName, objectName, 3600*time.Second, nil) + if err != nil { + failureLog(function, args, startTime, "", "PresignedGetObject failed", err).Fatal() + } + // Verify if presigned url works. + resp, err = http.Get(presignedGetURL.String()) + if err != nil { + failureLog(function, args, startTime, "", "PresignedGetObject URL GET request failed", err).Fatal() + } + if resp.StatusCode != http.StatusOK { + failureLog(function, args, startTime, "", "PresignedGetObject URL returns status "+string(resp.StatusCode), err).Fatal() + } + newPresignedBytes, err := ioutil.ReadAll(resp.Body) + if err != nil { + failureLog(function, args, startTime, "", "ReadAll failed", err).Fatal() + } + resp.Body.Close() + if !bytes.Equal(newPresignedBytes, buf) { + failureLog(function, args, startTime, "", "Bytes mismatch", err).Fatal() + } + + // Set request parameters. + reqParams := make(url.Values) + reqParams.Set("response-content-disposition", "attachment; filename=\"test.txt\"") + // Generate presigned GET object url. + presignedGetURL, err = c.PresignedGetObject(bucketName, objectName, 3600*time.Second, reqParams) + if err != nil { + failureLog(function, args, startTime, "", "PresignedGetObject failed", err).Fatal() + } + // Verify if presigned url works. + resp, err = http.Get(presignedGetURL.String()) + if err != nil { + failureLog(function, args, startTime, "", "PresignedGetObject URL GET request failed", err).Fatal() + } + if resp.StatusCode != http.StatusOK { + failureLog(function, args, startTime, "", "PresignedGetObject URL returns status "+string(resp.StatusCode), err).Fatal() + } + newPresignedBytes, err = ioutil.ReadAll(resp.Body) + if err != nil { + failureLog(function, args, startTime, "", "ReadAll failed", err).Fatal() + } + if !bytes.Equal(newPresignedBytes, buf) { + failureLog(function, args, startTime, "", "Bytes mismatch", err).Fatal() + } + // Verify content disposition. + if resp.Header.Get("Content-Disposition") != "attachment; filename=\"test.txt\"" { + failureLog(function, args, startTime, "", "wrong Content-Disposition received ", err).Fatal() + } + + presignedPutURL, err := c.PresignedPutObject(bucketName, objectName+"-presigned", 3600*time.Second) + if err != nil { + failureLog(function, args, startTime, "", "PresignedPutObject failed", err).Fatal() + } + // Generate data more than 32K + buf = bytes.Repeat([]byte("1"), rand.Intn(1<<10)+32*1024) + + req, err := http.NewRequest("PUT", presignedPutURL.String(), bytes.NewReader(buf)) + if err != nil { + failureLog(function, args, startTime, "", "HTTP request to PresignedPutObject URL failed", err).Fatal() + } + httpClient := &http.Client{ + // Setting a sensible time out of 30secs to wait for response + // headers. Request is pro-actively cancelled after 30secs + // with no response. + Timeout: 30 * time.Second, + Transport: http.DefaultTransport, + } + resp, err = httpClient.Do(req) + if err != nil { + failureLog(function, args, startTime, "", "HTTP request to PresignedPutObject URL failed", err).Fatal() + } + + newReader, err = c.GetObject(bucketName, objectName+"-presigned") + if err != nil { + failureLog(function, args, startTime, "", "GetObject failed", err).Fatal() + } + + newReadBytes, err = ioutil.ReadAll(newReader) + if err != nil { + failureLog(function, args, startTime, "", "ReadAll failed", err).Fatal() + } + + if !bytes.Equal(newReadBytes, buf) { + failureLog(function, args, startTime, "", "Bytes mismatch", err).Fatal() + } + + err = c.RemoveObject(bucketName, objectName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + err = c.RemoveObject(bucketName, objectName+"-f") + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + err = c.RemoveObject(bucketName, objectName+"-nolength") + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + err = c.RemoveObject(bucketName, objectName+"-presigned") + if err != nil { + failureLog(function, args, startTime, "", "RemoveObject failed", err).Fatal() + } + err = c.RemoveBucket(bucketName) + if err != nil { + failureLog(function, args, startTime, "", "RemoveBucket failed", err).Fatal() + } + err = c.RemoveBucket(bucketName) + if err == nil { + failureLog(function, args, startTime, "", "RemoveBucket should fail as bucket does not exist", err).Fatal() + } + if err.Error() != "The specified bucket does not exist" { + failureLog(function, args, startTime, "", "RemoveBucket failed with wrong error message", err).Fatal() + } + if err = os.Remove(fileName); err != nil { + failureLog(function, args, startTime, "", "File remove failed", err).Fatal() + } + if err = os.Remove(fileName + "-f"); err != nil { + failureLog(function, args, startTime, "", "File removes failed", err).Fatal() + } + successLogger(function, args, startTime).Info() +} + +// Convert string to bool and always return false if any error +func mustParseBool(str string) bool { + b, err := strconv.ParseBool(str) + if err != nil { + return false + } + return b +} + +func main() { + // Output to stdout instead of the default stderr + log.SetOutput(os.Stdout) + // create custom formatter + mintFormatter := mintJSONFormatter{} + // set custom formatter + log.SetFormatter(&mintFormatter) + // log Info or above -- success cases are Info level, failures are Fatal level + log.SetLevel(log.InfoLevel) + // execute tests + if !isQuickMode() { + testMakeBucketErrorV2() + testGetObjectClosedTwiceV2() + testRemovePartiallyUploadedV2() + testFPutObjectV2() + testMakeBucketRegionsV2() + testGetObjectReadSeekFunctionalV2() + testGetObjectReadAtFunctionalV2() + testCopyObjectV2() + testFunctionalV2() + testComposeObjectErrorCasesV2() + testCompose10KSourcesV2() + testEncryptedCopyObjectV2() + testUserMetadataCopyingV2() + testPutObject0ByteV2() + testPutObjectNoLengthV2() + testPutObjectsUnknownV2() + testMakeBucketError() + testMakeBucketRegions() + testPutObjectWithMetadata() + testPutObjectReadAt() + testPutObjectStreaming() + testListPartiallyUploaded() + testGetObjectSeekEnd() + testGetObjectClosedTwice() + testRemoveMultipleObjects() + testRemovePartiallyUploaded() + testFPutObjectMultipart() + testFPutObject() + testGetObjectReadSeekFunctional() + testGetObjectReadAtFunctional() + testPresignedPostPolicy() + testCopyObject() + testEncryptionPutGet() + testComposeObjectErrorCases() + testCompose10KSources() + testUserMetadataCopying() + testEncryptedCopyObject() + testBucketNotification() + testFunctional() + testGetObjectObjectModified() + testPutObjectUploadSeekedObject() + } else { + testFunctional() + testFunctionalV2() + } +} diff --git a/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-streaming.go b/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-streaming.go index 22059bb1d..d831436cd 100644 --- a/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-streaming.go +++ b/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-streaming.go @@ -99,7 +99,7 @@ func prepareStreamingRequest(req *http.Request, sessionToken string, dataLen int if sessionToken != "" { req.Header.Set("X-Amz-Security-Token", sessionToken) } - req.Header.Set("Content-Encoding", streamingEncoding) + req.Header.Add("Content-Encoding", streamingEncoding) req.Header.Set("X-Amz-Date", timestamp.Format(iso8601DateFormat)) // Set content length with streaming signature for each chunk included. diff --git a/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-v2.go b/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-v2.go index af0e91515..39c4e0187 100644 --- a/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-v2.go +++ b/vendor/github.com/minio/minio-go/pkg/s3signer/request-signature-v2.go @@ -42,9 +42,7 @@ const ( func encodeURL2Path(u *url.URL) (path string) { // Encode URL path. if isS3, _ := filepath.Match("*.s3*.amazonaws.com", u.Host); isS3 { - hostSplits := strings.SplitN(u.Host, ".", 4) - // First element is the bucket name. - bucketName := hostSplits[0] + bucketName := u.Host[:strings.LastIndex(u.Host, ".s3")] path = "/" + bucketName path += u.Path path = s3utils.EncodePath(path) diff --git a/vendor/github.com/minio/minio-go/pkg/s3signer/utils_test.go b/vendor/github.com/minio/minio-go/pkg/s3signer/utils_test.go index b266e42a1..26f609013 100644 --- a/vendor/github.com/minio/minio-go/pkg/s3signer/utils_test.go +++ b/vendor/github.com/minio/minio-go/pkg/s3signer/utils_test.go @@ -25,6 +25,7 @@ import ( // Tests url encoding. func TestEncodeURL2Path(t *testing.T) { type urlStrings struct { + bucketName string objName string encodedObjName string } @@ -32,22 +33,27 @@ func TestEncodeURL2Path(t *testing.T) { bucketName := "bucketName" want := []urlStrings{ { + bucketName: "bucketName", objName: "本語", encodedObjName: "%E6%9C%AC%E8%AA%9E", }, { + bucketName: "bucketName", objName: "本語.1", encodedObjName: "%E6%9C%AC%E8%AA%9E.1", }, { objName: ">123>3123123", + bucketName: "bucketName", encodedObjName: "%3E123%3E3123123", }, { + bucketName: "bucketName", objName: "test 1 2.txt", encodedObjName: "test%201%202.txt", }, { + bucketName: "test.bucketName", objName: "test++ 1.txt", encodedObjName: "test%2B%2B%201.txt", }, @@ -63,4 +69,5 @@ func TestEncodeURL2Path(t *testing.T) { t.Fatal("Error") } } + } diff --git a/vendor/github.com/minio/minio-go/pkg/s3utils/utils.go b/vendor/github.com/minio/minio-go/pkg/s3utils/utils.go index 9d6ac4d81..bdc8d4e91 100644 --- a/vendor/github.com/minio/minio-go/pkg/s3utils/utils.go +++ b/vendor/github.com/minio/minio-go/pkg/s3utils/utils.go @@ -80,6 +80,9 @@ func IsVirtualHostSupported(endpointURL url.URL, bucketName string) bool { return IsAmazonEndpoint(endpointURL) || IsGoogleEndpoint(endpointURL) } +// AmazonS3Host - regular expression used to determine if an arg is s3 host. +var AmazonS3Host = regexp.MustCompile("^s3[.-]?(.*?)\\.amazonaws\\.com$") + // IsAmazonEndpoint - Match if it is exactly Amazon S3 endpoint. func IsAmazonEndpoint(endpointURL url.URL) bool { if IsAmazonChinaEndpoint(endpointURL) { @@ -88,7 +91,7 @@ func IsAmazonEndpoint(endpointURL url.URL) bool { if IsAmazonGovCloudEndpoint(endpointURL) { return true } - return endpointURL.Host == "s3.amazonaws.com" + return AmazonS3Host.MatchString(endpointURL.Host) } // IsAmazonGovCloudEndpoint - Match if it is exactly Amazon S3 GovCloud endpoint. @@ -205,7 +208,7 @@ func EncodePath(pathName string) string { // We support '.' with bucket names but we fallback to using path // style requests instead for such buckets. var ( - validBucketName = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9\.\-]{1,61}[A-Za-z0-9]$`) + validBucketName = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9\.\-\_\:]{1,61}[A-Za-z0-9]$`) validBucketNameStrict = regexp.MustCompile(`^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$`) ipAddress = regexp.MustCompile(`^(\d+\.){3}\d+$`) ) @@ -240,14 +243,13 @@ func checkBucketNameCommon(bucketName string, strict bool) (err error) { } // CheckValidBucketName - checks if we have a valid input bucket name. -// This is a non stricter version. -// - http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html func CheckValidBucketName(bucketName string) (err error) { return checkBucketNameCommon(bucketName, false) } // CheckValidBucketNameStrict - checks if we have a valid input bucket name. // This is a stricter version. +// - http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html func CheckValidBucketNameStrict(bucketName string) (err error) { return checkBucketNameCommon(bucketName, true) } diff --git a/vendor/github.com/minio/minio-go/pkg/s3utils/utils_test.go b/vendor/github.com/minio/minio-go/pkg/s3utils/utils_test.go index 6be701d18..d3b4d4331 100644 --- a/vendor/github.com/minio/minio-go/pkg/s3utils/utils_test.go +++ b/vendor/github.com/minio/minio-go/pkg/s3utils/utils_test.go @@ -301,10 +301,14 @@ func TestIsValidBucketName(t *testing.T) { {"", errors.New("Bucket name cannot be empty"), false}, {"my..bucket", errors.New("Bucket name contains invalid characters"), false}, {"192.168.1.168", errors.New("Bucket name cannot be an ip address"), false}, + {":bucketname", errors.New("Bucket name contains invalid characters"), false}, + {"_bucketName", errors.New("Bucket name contains invalid characters"), false}, {"my.bucket.com", nil, true}, {"my-bucket", nil, true}, {"123my-bucket", nil, true}, {"Mybucket", nil, true}, + {"My_bucket", nil, true}, + {"My:bucket", nil, true}, } for i, testCase := range testCases { diff --git a/vendor/github.com/minio/minio-go/test-utils_test.go b/vendor/github.com/minio/minio-go/test-utils_test.go index 4134af996..b109dfaf7 100644 --- a/vendor/github.com/minio/minio-go/test-utils_test.go +++ b/vendor/github.com/minio/minio-go/test-utils_test.go @@ -64,11 +64,11 @@ func encodeResponse(response interface{}) []byte { return bytesBuffer.Bytes() } -// Convert string to bool and always return true if any error +// Convert string to bool and always return false if any error func mustParseBool(str string) bool { b, err := strconv.ParseBool(str) if err != nil { - return true + return false } return b } diff --git a/vendor/github.com/minio/minio-go/transport.go b/vendor/github.com/minio/minio-go/transport.go new file mode 100644 index 000000000..d286bd7ae --- /dev/null +++ b/vendor/github.com/minio/minio-go/transport.go @@ -0,0 +1,48 @@ +// +build go1.7 go1.8 + +/* + * Minio Go Library for Amazon S3 Compatible Cloud Storage + * (C) 2017 Minio, Inc. + * + * 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. + */ + +package minio + +import ( + "net" + "net/http" + "time" +) + +// This default transport is similar to http.DefaultTransport +// but with additional DisableCompression: +var defaultMinioTransport http.RoundTripper = &http.Transport{ + Proxy: http.ProxyFromEnvironment, + DialContext: (&net.Dialer{ + Timeout: 30 * time.Second, + KeepAlive: 30 * time.Second, + DualStack: true, + }).DialContext, + MaxIdleConns: 100, + IdleConnTimeout: 90 * time.Second, + TLSHandshakeTimeout: 10 * time.Second, + ExpectContinueTimeout: 1 * time.Second, + // Set this value so that the underlying transport round-tripper + // doesn't try to auto decode the body of objects with + // content-encoding set to `gzip`. + // + // Refer: + // https://golang.org/src/net/http/transport.go?h=roundTrip#L1843 + DisableCompression: true, +} diff --git a/vendor/github.com/minio/minio-go/transport_1_5.go b/vendor/github.com/minio/minio-go/transport_1_5.go new file mode 100644 index 000000000..468daafd3 --- /dev/null +++ b/vendor/github.com/minio/minio-go/transport_1_5.go @@ -0,0 +1,39 @@ +// +build go1.5,!go1.6,!go1.7,!go1.8 + +/* + * Minio Go Library for Amazon S3 Compatible Cloud Storage + * (C) 2017 Minio, Inc. + * + * 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. + */ + +package minio + +import ( + "net/http" + "time" +) + +// This default transport is similar to http.DefaultTransport +// but with additional DisableCompression: +var defaultMinioTransport http.RoundTripper = &http.Transport{ + Proxy: http.ProxyFromEnvironment, + TLSHandshakeTimeout: 10 * time.Second, + // Set this value so that the underlying transport round-tripper + // doesn't try to auto decode the body of objects with + // content-encoding set to `gzip`. + // + // Refer: + // https://golang.org/src/net/http/transport.go?h=roundTrip#L1843 + DisableCompression: true, +} diff --git a/vendor/github.com/minio/minio-go/transport_1_6.go b/vendor/github.com/minio/minio-go/transport_1_6.go new file mode 100644 index 000000000..77e7d76fc --- /dev/null +++ b/vendor/github.com/minio/minio-go/transport_1_6.go @@ -0,0 +1,40 @@ +// +build go1.6,!go1.7,!go1.8 + +/* + * Minio Go Library for Amazon S3 Compatible Cloud Storage + * (C) 2017 Minio, Inc. + * + * 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. + */ + +package minio + +import ( + "net/http" + "time" +) + +// This default transport is similar to http.DefaultTransport +// but with additional DisableCompression: +var defaultMinioTransport http.RoundTripper = &http.Transport{ + Proxy: http.ProxyFromEnvironment, + TLSHandshakeTimeout: 10 * time.Second, + ExpectContinueTimeout: 1 * time.Second, + // Set this value so that the underlying transport round-tripper + // doesn't try to auto decode the body of objects with + // content-encoding set to `gzip`. + // + // Refer: + // https://golang.org/src/net/http/transport.go?h=roundTrip#L1843 + DisableCompression: true, +} diff --git a/vendor/github.com/ncw/swift/auth_v3.go b/vendor/github.com/ncw/swift/auth_v3.go index 21e96718b..64dcabc9b 100644 --- a/vendor/github.com/ncw/swift/auth_v3.go +++ b/vendor/github.com/ncw/swift/auth_v3.go @@ -117,7 +117,7 @@ func (auth *v3Auth) Request(c *Connection) (*http.Request, error) { v3 := v3AuthRequest{} - if c.UserName == "" { + if c.UserName == "" && c.UserId == "" { v3.Auth.Identity.Methods = []string{v3AuthMethodToken} v3.Auth.Identity.Token = &v3AuthToken{Id: c.ApiKey} } else { @@ -125,6 +125,7 @@ func (auth *v3Auth) Request(c *Connection) (*http.Request, error) { v3.Auth.Identity.Password = &v3AuthPassword{ User: v3User{ Name: c.UserName, + Id: c.UserId, Password: c.ApiKey, }, } diff --git a/vendor/github.com/ncw/swift/swift.go b/vendor/github.com/ncw/swift/swift.go index e37e3b0a5..1e8589c7b 100644 --- a/vendor/github.com/ncw/swift/swift.go +++ b/vendor/github.com/ncw/swift/swift.go @@ -99,6 +99,7 @@ type Connection struct { Domain string // User's domain name DomainId string // User's domain Id UserName string // UserName for api + UserId string // User Id ApiKey string // Key for api access AuthUrl string // Auth URL Retries int // Retries on error (default is 3) @@ -191,6 +192,7 @@ func setFromEnv(param interface{}, name string) (err error) { // For v3 authentication // OS_AUTH_URL - Auth URL // OS_USERNAME - UserName for api +// OS_USER_ID - User Id // OS_PASSWORD - Key for api access // OS_USER_DOMAIN_NAME - User's domain name // OS_USER_DOMAIN_ID - User's domain Id @@ -223,6 +225,7 @@ func (c *Connection) ApplyEnvironment() (err error) { {&c.Domain, "OS_USER_DOMAIN_NAME"}, {&c.DomainId, "OS_USER_DOMAIN_ID"}, {&c.UserName, "OS_USERNAME"}, + {&c.UserId, "OS_USER_ID"}, {&c.ApiKey, "OS_PASSWORD"}, {&c.AuthUrl, "OS_AUTH_URL"}, {&c.Retries, "GOSWIFT_RETRIES"}, @@ -284,6 +287,7 @@ type errorMap map[int]error var ( // Specific Errors you might want to check for equality + NotModified = newError(304, "Not Modified") BadRequest = newError(400, "Bad Request") AuthorizationFailed = newError(401, "Authorization Failed") ContainerNotFound = newError(404, "Container Not Found") @@ -311,6 +315,7 @@ var ( // Mappings for object errors objectErrorMap = errorMap{ + 304: NotModified, 400: BadRequest, 403: Forbidden, 404: ObjectNotFound, diff --git a/vendor/github.com/ncw/swift/swift_internal_test.go b/vendor/github.com/ncw/swift/swift_internal_test.go index 442f2bde5..894fd8f94 100644 --- a/vendor/github.com/ncw/swift/swift_internal_test.go +++ b/vendor/github.com/ncw/swift/swift_internal_test.go @@ -576,6 +576,7 @@ func TestApplyEnvironmentAll(t *testing.T) { {1, &c.Domain, "OS_USER_DOMAIN_NAME", "os_user_domain_name", "os_user_domain_name", ""}, {1, &c.DomainId, "OS_USER_DOMAIN_ID", "os_user_domain_id", "os_user_domain_id", ""}, {1, &c.UserName, "OS_USERNAME", "os_username", "os_username", ""}, + {1, &c.UserId, "OS_USER_ID", "os_user_id", "os_user_id", ""}, {1, &c.ApiKey, "OS_PASSWORD", "os_password", "os_password", ""}, {1, &c.AuthUrl, "OS_AUTH_URL", "os_auth_url", "os_auth_url", ""}, {1, &c.Retries, "GOSWIFT_RETRIES", "4", 4, ""}, diff --git a/vendor/github.com/ncw/swift/swift_test.go b/vendor/github.com/ncw/swift/swift_test.go index 5dd44dd37..b6c5682fb 100644 --- a/vendor/github.com/ncw/swift/swift_test.go +++ b/vendor/github.com/ncw/swift/swift_test.go @@ -1077,6 +1077,17 @@ func TestObjectOpenLength(t *testing.T) { } } +func TestObjectOpenNotModified(t *testing.T) { + c, rollback := makeConnectionWithObject(t) + defer rollback() + _, _, err := c.ObjectOpen(CONTAINER, OBJECT, true, swift.Headers{ + "If-None-Match": CONTENT_MD5, + }) + if err != swift.NotModified { + t.Fatal(err) + } +} + func TestObjectOpenSeek(t *testing.T) { c, rollback := makeConnectionWithObject(t) defer rollback() diff --git a/vendor/github.com/ncw/swift/swifttest/server.go b/vendor/github.com/ncw/swift/swifttest/server.go index 3cecdcfb7..6ec50f609 100644 --- a/vendor/github.com/ncw/swift/swifttest/server.go +++ b/vendor/github.com/ncw/swift/swifttest/server.go @@ -44,9 +44,12 @@ const ( type HandlerOverrideFunc func(w http.ResponseWriter, r *http.Request, recorder *httptest.ResponseRecorder) type SwiftServer struct { + // `sync/atomic` expects the first word in an allocated struct to be 64-bit + // aligned on both ARM and x86-32. + // See https://golang.org/pkg/sync/atomic/#pkg-note-BUG for more details. + reqId int64 sync.RWMutex t *testing.T - reqId int64 mu sync.Mutex Listener net.Listener AuthURL string @@ -121,12 +124,15 @@ type object struct { } type container struct { + // `sync/atomic` expects the first word in an allocated struct to be 64-bit + // aligned on both ARM and x86-32. + // See https://golang.org/pkg/sync/atomic/#pkg-note-BUG for more details. + bytes int64 sync.RWMutex metadata name string ctime time.Time objects map[string]*object - bytes int64 } type segment struct { @@ -539,8 +545,15 @@ func (objr objectResource) get(a *action) interface{} { reader = bytes.NewReader(obj.data[start : end+1]) } + etagHex := hex.EncodeToString(etag) + + if a.req.Header.Get("If-None-Match") == etagHex { + a.w.WriteHeader(http.StatusNotModified) + return nil + } + h.Set("Content-Length", fmt.Sprint(end-start+1)) - h.Set("ETag", hex.EncodeToString(etag)) + h.Set("ETag", etagHex) h.Set("Last-Modified", obj.mtime.Format(http.TimeFormat)) if a.req.Method == "HEAD" { diff --git a/vendor/github.com/pkg/sftp/client.go b/vendor/github.com/pkg/sftp/client.go index e539fc5e9..c3012c075 100644 --- a/vendor/github.com/pkg/sftp/client.go +++ b/vendor/github.com/pkg/sftp/client.go @@ -14,12 +14,32 @@ import ( "golang.org/x/crypto/ssh" ) -// MaxPacket sets the maximum size of the payload. -func MaxPacket(size int) func(*Client) error { +// InternalInconsistency indicates the packets sent and the data queued to be +// written to the file don't match up. It is an unusual error and if you get it +// you should file a ticket. +var InternalInconsistency = errors.New("internal inconsistency") + +// A ClientOption is a function which applies configuration to a Client. +type ClientOption func(*Client) error + +// This is based on Openssh's max accepted size of 1<<18 - overhead +const maxMaxPacket = (1 << 18) - 1024 + +// MaxPacket sets the maximum size of the payload. The size param must be +// between 32768 (1<<15) and 261120 ((1 << 18) - 1024). The minimum size is +// given by the RFC, while the maximum size is a de-facto standard based on +// Openssh's SFTP server which won't accept packets much larger than that. +// +// Note if you aren't using Openssh's sftp server and get the error "failed to +// send packet header: EOF" when copying a large file try lowering this number. +func MaxPacket(size int) ClientOption { return func(c *Client) error { if size < 1<<15 { return errors.Errorf("size must be greater or equal to 32k") } + if size > maxMaxPacket { + return errors.Errorf("max packet size is too large (see docs)") + } c.maxPacket = size return nil } @@ -27,7 +47,7 @@ func MaxPacket(size int) func(*Client) error { // NewClient creates a new SFTP client on conn, using zero or more option // functions. -func NewClient(conn *ssh.Client, opts ...func(*Client) error) (*Client, error) { +func NewClient(conn *ssh.Client, opts ...ClientOption) (*Client, error) { s, err := conn.NewSession() if err != nil { return nil, err @@ -50,7 +70,7 @@ func NewClient(conn *ssh.Client, opts ...func(*Client) error) (*Client, error) { // NewClientPipe creates a new SFTP client given a Reader and a WriteCloser. // This can be used for connecting to an SFTP server over TCP/TLS or by using // the system's ssh client program (e.g. via exec.Command). -func NewClientPipe(rd io.Reader, wr io.WriteCloser, opts ...func(*Client) error) (*Client, error) { +func NewClientPipe(rd io.Reader, wr io.WriteCloser, opts ...ClientOption) (*Client, error) { sftp := &Client{ clientConn: clientConn{ conn: conn{ @@ -611,7 +631,7 @@ func (c *Client) Mkdir(path string) error { // applyOptions applies options functions to the Client. // If an error is encountered, option processing ceases. -func (c *Client) applyOptions(opts ...func(*Client) error) error { +func (c *Client) applyOptions(opts ...ClientOption) error { for _, f := range opts { if err := f(c); err != nil { return err @@ -791,7 +811,7 @@ func (f *File) WriteTo(w io.Writer) (int64, error) { if inFlight == 0 { if firstErr.err == nil && len(pendingWrites) > 0 { - return copied, errors.New("internal inconsistency") + return copied, InternalInconsistency } break } diff --git a/vendor/github.com/pkg/sftp/example_test.go b/vendor/github.com/pkg/sftp/example_test.go index c6c9009a6..483f68f1d 100644 --- a/vendor/github.com/pkg/sftp/example_test.go +++ b/vendor/github.com/pkg/sftp/example_test.go @@ -104,14 +104,26 @@ func ExampleClient_Mkdir_parents() { } defer client.Close() - ssh_fx_failure := uint32(4) + sshFxFailure := uint32(4) mkdirParents := func(client *sftp.Client, dir string) (err error) { var parents string + + if path.IsAbs(dir) { + // Otherwise, an absolute path given below would be turned in to a relative one + // by splitting on "/" + parents = "/" + } + for _, name := range strings.Split(dir, "/") { + if name == "" { + // Paths with double-/ in them should just move along + // this will also catch the case of the first character being a "/", i.e. an absolute path + continue + } parents = path.Join(parents, name) err = client.Mkdir(parents) if status, ok := err.(*sftp.StatusError); ok { - if status.Code == ssh_fx_failure { + if status.Code == sshFxFailure { var fi os.FileInfo fi, err = client.Stat(parents) if err == nil { diff --git a/vendor/github.com/pkg/sftp/packet-manager.go b/vendor/github.com/pkg/sftp/packet-manager.go index 6d1a8e5d6..8c6691cf6 100644 --- a/vendor/github.com/pkg/sftp/packet-manager.go +++ b/vendor/github.com/pkg/sftp/packet-manager.go @@ -23,13 +23,13 @@ type packetManager struct { working *sync.WaitGroup } -func newPktMgr(sender packetSender) packetManager { - s := packetManager{ - requests: make(chan requestPacket, sftpServerWorkerCount), - responses: make(chan responsePacket, sftpServerWorkerCount), +func newPktMgr(sender packetSender) *packetManager { + s := &packetManager{ + requests: make(chan requestPacket, SftpServerWorkerCount), + responses: make(chan responsePacket, SftpServerWorkerCount), fini: make(chan struct{}), - incoming: make([]uint32, 0, sftpServerWorkerCount), - outgoing: make([]responsePacket, 0, sftpServerWorkerCount), + incoming: make([]uint32, 0, SftpServerWorkerCount), + outgoing: make([]responsePacket, 0, SftpServerWorkerCount), sender: sender, working: &sync.WaitGroup{}, } @@ -39,19 +39,19 @@ func newPktMgr(sender packetSender) packetManager { // register incoming packets to be handled // send id of 0 for packets without id -func (s packetManager) incomingPacket(pkt requestPacket) { +func (s *packetManager) incomingPacket(pkt requestPacket) { s.working.Add(1) - s.requests <- pkt // buffer == sftpServerWorkerCount + s.requests <- pkt // buffer == SftpServerWorkerCount } // register outgoing packets as being ready -func (s packetManager) readyPacket(pkt responsePacket) { +func (s *packetManager) readyPacket(pkt responsePacket) { s.responses <- pkt s.working.Done() } // shut down packetManager controller -func (s packetManager) close() { +func (s *packetManager) close() { // pause until current packets are processed s.working.Wait() close(s.fini) @@ -63,15 +63,15 @@ func (s packetManager) close() { // transfers. func (s *packetManager) workerChan(runWorker func(requestChan)) requestChan { - rwChan := make(chan requestPacket, sftpServerWorkerCount) - for i := 0; i < sftpServerWorkerCount; i++ { + rwChan := make(chan requestPacket, SftpServerWorkerCount) + for i := 0; i < SftpServerWorkerCount; i++ { runWorker(rwChan) } cmdChan := make(chan requestPacket) runWorker(cmdChan) - pktChan := make(chan requestPacket, sftpServerWorkerCount) + pktChan := make(chan requestPacket, SftpServerWorkerCount) go func() { // start with cmdChan curChan := cmdChan @@ -147,10 +147,10 @@ func (s *packetManager) maybeSendPackets() { } } -func outfilter(o []responsePacket) []uint32 { - res := make([]uint32, 0, len(o)) - for _, v := range o { - res = append(res, v.id()) - } - return res -} +//func outfilter(o []responsePacket) []uint32 { +// res := make([]uint32, 0, len(o)) +// for _, v := range o { +// res = append(res, v.id()) +// } +// return res +//} diff --git a/vendor/github.com/pkg/sftp/request-example.go b/vendor/github.com/pkg/sftp/request-example.go index 3333a8d6f..f66b06055 100644 --- a/vendor/github.com/pkg/sftp/request-example.go +++ b/vendor/github.com/pkg/sftp/request-example.go @@ -11,7 +11,6 @@ import ( "os" "path/filepath" "sort" - "strconv" "sync" "time" ) @@ -26,7 +25,7 @@ func InMemHandler() Handlers { } // Handlers -func (fs *root) Fileread(r Request) (io.ReaderAt, error) { +func (fs *root) Fileread(r *Request) (io.ReaderAt, error) { fs.filesLock.Lock() defer fs.filesLock.Unlock() file, err := fs.fetch(r.Filepath) @@ -42,7 +41,7 @@ func (fs *root) Fileread(r Request) (io.ReaderAt, error) { return file.ReaderAt() } -func (fs *root) Filewrite(r Request) (io.WriterAt, error) { +func (fs *root) Filewrite(r *Request) (io.WriterAt, error) { fs.filesLock.Lock() defer fs.filesLock.Unlock() file, err := fs.fetch(r.Filepath) @@ -60,7 +59,7 @@ func (fs *root) Filewrite(r Request) (io.WriterAt, error) { return file.WriterAt() } -func (fs *root) Filecmd(r Request) error { +func (fs *root) Filecmd(r *Request) error { fs.filesLock.Lock() defer fs.filesLock.Unlock() switch r.Method { @@ -101,20 +100,27 @@ func (fs *root) Filecmd(r Request) error { return nil } -func (fs *root) Fileinfo(r Request) ([]os.FileInfo, error) { +type listerat []os.FileInfo + +// Modeled after strings.Reader's ReadAt() implementation +func (f listerat) ListAt(ls []os.FileInfo, offset int64) (int, error) { + var n int + if offset >= int64(len(f)) { + return 0, io.EOF + } + n = copy(ls, f[offset:]) + if n < len(ls) { + return n, io.EOF + } + return n, nil +} + +func (fs *root) Filelist(r *Request) (ListerAt, error) { fs.filesLock.Lock() defer fs.filesLock.Unlock() + switch r.Method { case "List": - var err error - batch_size := 10 - current_offset := 0 - if token := r.LsNext(); token != "" { - current_offset, err = strconv.Atoi(token) - if err != nil { - return nil, os.ErrInvalid - } - } ordered_names := []string{} for fn, _ := range fs.files { if filepath.Dir(fn) == r.Filepath { @@ -126,21 +132,13 @@ func (fs *root) Fileinfo(r Request) ([]os.FileInfo, error) { for i, fn := range ordered_names { list[i] = fs.files[fn] } - if len(list) < current_offset { - return nil, io.EOF - } - new_offset := current_offset + batch_size - if new_offset > len(list) { - new_offset = len(list) - } - r.LsSave(strconv.Itoa(new_offset)) - return list[current_offset:new_offset], nil + return listerat(list), nil case "Stat": file, err := fs.fetch(r.Filepath) if err != nil { return nil, err } - return []os.FileInfo{file}, nil + return listerat([]os.FileInfo{file}), nil case "Readlink": file, err := fs.fetch(r.Filepath) if err != nil { @@ -152,7 +150,7 @@ func (fs *root) Fileinfo(r Request) ([]os.FileInfo, error) { return nil, err } } - return []os.FileInfo{file}, nil + return listerat([]os.FileInfo{file}), nil } return nil, nil } diff --git a/vendor/github.com/pkg/sftp/request-interfaces.go b/vendor/github.com/pkg/sftp/request-interfaces.go index 46db449c4..0f2b0aaf2 100644 --- a/vendor/github.com/pkg/sftp/request-interfaces.go +++ b/vendor/github.com/pkg/sftp/request-interfaces.go @@ -10,21 +10,29 @@ import ( // FileReader should return an io.Reader for the filepath type FileReader interface { - Fileread(Request) (io.ReaderAt, error) + Fileread(*Request) (io.ReaderAt, error) } // FileWriter should return an io.Writer for the filepath type FileWriter interface { - Filewrite(Request) (io.WriterAt, error) + Filewrite(*Request) (io.WriterAt, error) } // FileCmder should return an error (rename, remove, setstate, etc.) type FileCmder interface { - Filecmd(Request) error + Filecmd(*Request) error } -// FileInfoer should return file listing info and errors (readdir, stat) -// note stat requests would return a list of 1 -type FileInfoer interface { - Fileinfo(Request) ([]os.FileInfo, error) +// FileLister should return file info interface and errors (readdir, stat) +type FileLister interface { + Filelist(*Request) (ListerAt, error) +} + +// ListerAt does for file lists what io.ReaderAt does for files. +// ListAt should return the number of entries copied and an io.EOF +// error if at end of list. This is testable by comparing how many you +// copied to how many could be copied (eg. n < len(ls) below). +// The copy() builtin is best for the copying. +type ListerAt interface { + ListAt([]os.FileInfo, int64) (int, error) } diff --git a/vendor/github.com/pkg/sftp/request-server.go b/vendor/github.com/pkg/sftp/request-server.go index b51a10b35..a6221136e 100644 --- a/vendor/github.com/pkg/sftp/request-server.go +++ b/vendor/github.com/pkg/sftp/request-server.go @@ -3,9 +3,9 @@ package sftp import ( "encoding" "io" - "os" "path/filepath" "strconv" + "strings" "sync" "syscall" @@ -21,14 +21,14 @@ type Handlers struct { FileGet FileReader FilePut FileWriter FileCmd FileCmder - FileInfo FileInfoer + FileList FileLister } // RequestServer abstracts the sftp protocol with an http request-like protocol type RequestServer struct { *serverConn Handlers Handlers - pktMgr packetManager + pktMgr *packetManager openRequests map[string]Request openRequestLock sync.RWMutex handleCount int @@ -51,20 +51,22 @@ func NewRequestServer(rwc io.ReadWriteCloser, h Handlers) *RequestServer { } } -func (rs *RequestServer) nextRequest(r Request) string { +// Note that we are explicitly saving the Request as a value. +func (rs *RequestServer) nextRequest(r *Request) string { rs.openRequestLock.Lock() defer rs.openRequestLock.Unlock() rs.handleCount++ handle := strconv.Itoa(rs.handleCount) - rs.openRequests[handle] = r + rs.openRequests[handle] = *r return handle } -func (rs *RequestServer) getRequest(handle string) (Request, bool) { +// Returns pointer to new copy of Request object +func (rs *RequestServer) getRequest(handle string) (*Request, bool) { rs.openRequestLock.RLock() defer rs.openRequestLock.RUnlock() r, ok := rs.openRequests[handle] - return r, ok + return &r, ok } func (rs *RequestServer) closeRequest(handle string) { @@ -130,7 +132,7 @@ func (rs *RequestServer) packetWorker(pktChan chan requestPacket) error { rs.closeRequest(handle) rpkt = statusFromError(pkt, nil) case *sshFxpRealpathPacket: - rpkt = cleanPath(pkt) + rpkt = cleanPacketPath(pkt) case isOpener: handle := rs.nextRequest(requestFromPacket(pkt)) rpkt = sshFxpHandlePacket{pkt.id(), handle} @@ -142,7 +144,7 @@ func (rs *RequestServer) packetWorker(pktChan chan requestPacket) error { } else { request = requestFromPacket( &sshFxpStatPacket{ID: pkt.id(), Path: request.Filepath}) - rpkt = rs.handle(request, pkt) + rpkt = request.call(rs.Handlers, pkt) } case *sshFxpFsetstatPacket: handle := pkt.getHandle() @@ -154,20 +156,23 @@ func (rs *RequestServer) packetWorker(pktChan chan requestPacket) error { &sshFxpSetstatPacket{ID: pkt.id(), Path: request.Filepath, Flags: pkt.Flags, Attrs: pkt.Attrs, }) - rpkt = rs.handle(request, pkt) + rpkt = request.call(rs.Handlers, pkt) } case hasHandle: handle := pkt.getHandle() request, ok := rs.getRequest(handle) - request.update(pkt) - if !ok { + uerr := request.updateMethod(pkt) + if !ok || uerr != nil { + if uerr == nil { + uerr = syscall.EBADF + } rpkt = statusFromError(pkt, syscall.EBADF) } else { - rpkt = rs.handle(request, pkt) + rpkt = request.call(rs.Handlers, pkt) } case hasPath: request := requestFromPacket(pkt) - rpkt = rs.handle(request, pkt) + rpkt = request.call(rs.Handlers, pkt) default: return errors.Errorf("unexpected packet type %T", pkt) } @@ -180,31 +185,24 @@ func (rs *RequestServer) packetWorker(pktChan chan requestPacket) error { return nil } -func cleanPath(pkt *sshFxpRealpathPacket) responsePacket { - path := pkt.getPath() - if !filepath.IsAbs(path) { - path = "/" + path - } // all paths are absolute - - cleaned_path := filepath.Clean(path) +func cleanPacketPath(pkt *sshFxpRealpathPacket) responsePacket { + path := cleanPath(pkt.getPath()) return &sshFxpNamePacket{ ID: pkt.id(), NameAttrs: []sshFxpNameAttr{{ - Name: cleaned_path, - LongName: cleaned_path, + Name: path, + LongName: path, Attrs: emptyFileStat, }}, } } -func (rs *RequestServer) handle(request Request, pkt requestPacket) responsePacket { - // fmt.Println("Request Method: ", request.Method) - rpkt, err := request.handle(rs.Handlers) - if err != nil { - err = errorAdapter(err) - rpkt = statusFromError(pkt, err) +func cleanPath(path string) string { + cleanSlashPath := filepath.ToSlash(filepath.Clean(path)) + if !strings.HasPrefix(cleanSlashPath, "/") { + return "/" + cleanSlashPath } - return rpkt + return cleanSlashPath } // Wrap underlying connection methods to use packetManager @@ -220,12 +218,3 @@ func (rs *RequestServer) sendPacket(m encoding.BinaryMarshaler) error { func (rs *RequestServer) sendError(p ider, err error) error { return rs.sendPacket(statusFromError(p, err)) } - -// os.ErrNotExist should convert to ssh_FX_NO_SUCH_FILE, but is not recognized -// by statusFromError. So we convert to syscall.ENOENT which it does. -func errorAdapter(err error) error { - if err == os.ErrNotExist { - return syscall.ENOENT - } - return err -} diff --git a/vendor/github.com/pkg/sftp/request-server_test.go b/vendor/github.com/pkg/sftp/request-server_test.go index ee9621be7..0c25ecfca 100644 --- a/vendor/github.com/pkg/sftp/request-server_test.go +++ b/vendor/github.com/pkg/sftp/request-server_test.go @@ -315,6 +315,7 @@ func TestRequestReadlink(t *testing.T) { func TestRequestReaddir(t *testing.T) { p := clientRequestServerPair(t) + MaxFilelist = 22 // make not divisible by our test amount (100) defer p.Close() for i := 0; i < 100; i++ { fname := fmt.Sprintf("/foo_%02d", i) @@ -327,3 +328,20 @@ func TestRequestReaddir(t *testing.T) { names := []string{di[18].Name(), di[81].Name()} assert.Equal(t, []string{"foo_18", "foo_81"}, names) } + +func TestCleanPath(t *testing.T) { + assert.Equal(t, "/", cleanPath("/")) + assert.Equal(t, "/", cleanPath("//")) + assert.Equal(t, "/a", cleanPath("/a/")) + assert.Equal(t, "/a", cleanPath("a/")) + assert.Equal(t, "/a/b/c", cleanPath("/a//b//c/")) + + // filepath.ToSlash does not touch \ as char on unix systems, so os.PathSeparator is used for windows compatible tests + bslash := string(os.PathSeparator) + assert.Equal(t, "/", cleanPath(bslash)) + assert.Equal(t, "/", cleanPath(bslash+bslash)) + assert.Equal(t, "/a", cleanPath(bslash+"a"+bslash)) + assert.Equal(t, "/a", cleanPath("a"+bslash)) + assert.Equal(t, "/a/b/c", cleanPath(bslash+"a"+bslash+bslash+"b"+bslash+bslash+"c"+bslash)) + +} diff --git a/vendor/github.com/pkg/sftp/request.go b/vendor/github.com/pkg/sftp/request.go index 6d7d6ffdf..28629de82 100644 --- a/vendor/github.com/pkg/sftp/request.go +++ b/vendor/github.com/pkg/sftp/request.go @@ -11,6 +11,9 @@ import ( "github.com/pkg/errors" ) +// MaxFilelist is the max number of files to return in a readdir batch. +var MaxFilelist int64 = 100 + // Request contains the data and state for the incoming service request. type Request struct { // Get, Put, Setstat, Stat, Rename, Remove @@ -20,72 +23,73 @@ type Request struct { Flags uint32 Attrs []byte // convert to sub-struct Target string // for renames and sym-links - // packet data - pkt_id uint32 - packets chan packet_data // reader/writer/readdir from handlers stateLock *sync.RWMutex state *state } type state struct { - writerAt io.WriterAt - readerAt io.ReaderAt - endofdir bool // in case handler doesn't use EOF on file list - readdirToken string + writerAt io.WriterAt + readerAt io.ReaderAt + listerAt ListerAt + lsoffset int64 } type packet_data struct { - id uint32 + _id uint32 data []byte length uint32 offset int64 } +func (pd packet_data) id() uint32 { + return pd._id +} + // New Request initialized based on packet data -func requestFromPacket(pkt hasPath) Request { +func requestFromPacket(pkt hasPath) *Request { method := requestMethod(pkt) request := NewRequest(method, pkt.getPath()) - request.pkt_id = pkt.id() switch p := pkt.(type) { case *sshFxpSetstatPacket: request.Flags = p.Flags request.Attrs = p.Attrs.([]byte) case *sshFxpRenamePacket: - request.Target = filepath.Clean(p.Newpath) + request.Target = cleanPath(p.Newpath) case *sshFxpSymlinkPacket: - request.Target = filepath.Clean(p.Linkpath) + request.Target = cleanPath(p.Linkpath) } return request } +func newRequest() *Request { + return &Request{state: &state{}, stateLock: &sync.RWMutex{}} +} + // NewRequest creates a new Request object. -func NewRequest(method, path string) Request { - request := Request{Method: method, Filepath: filepath.Clean(path)} - request.packets = make(chan packet_data, sftpServerWorkerCount) - request.state = &state{} - request.stateLock = &sync.RWMutex{} +func NewRequest(method, path string) *Request { + request := newRequest() + request.Method = method + request.Filepath = cleanPath(path) return request } -// LsSave takes a token to keep track of file list batches. Openssh uses a -// batch size of 100, so I suggest sticking close to that. -func (r Request) LsSave(token string) { +// Returns current offset for file list +func (r *Request) lsNext() int64 { r.stateLock.RLock() defer r.stateLock.RUnlock() - r.state.readdirToken = token + return r.state.lsoffset } -// LsNext should return the token from the previous call to know which batch -// to return next. -func (r Request) LsNext() string { - r.stateLock.RLock() - defer r.stateLock.RUnlock() - return r.state.readdirToken +// Increases next offset +func (r *Request) lsInc(offset int64) { + r.stateLock.Lock() + defer r.stateLock.Unlock() + r.state.lsoffset = r.state.lsoffset + offset } // manage file read/write state -func (r Request) setFileState(s interface{}) { +func (r *Request) setFileState(s interface{}) { r.stateLock.Lock() defer r.stateLock.Unlock() switch s := s.(type) { @@ -93,38 +97,33 @@ func (r Request) setFileState(s interface{}) { r.state.writerAt = s case io.ReaderAt: r.state.readerAt = s - + case ListerAt: + r.state.listerAt = s + case int64: + r.state.lsoffset = s } } -func (r Request) getWriter() io.WriterAt { +func (r *Request) getWriter() io.WriterAt { r.stateLock.RLock() defer r.stateLock.RUnlock() return r.state.writerAt } -func (r Request) getReader() io.ReaderAt { +func (r *Request) getReader() io.ReaderAt { r.stateLock.RLock() defer r.stateLock.RUnlock() return r.state.readerAt } -// For backwards compatibility. The Handler didn't have batch handling at -// first, and just always assumed 1 batch. This preserves that behavior. -func (r Request) setEOD(eod bool) { +func (r *Request) getLister() ListerAt { r.stateLock.RLock() defer r.stateLock.RUnlock() - r.state.endofdir = eod -} - -func (r Request) getEOD() bool { - r.stateLock.RLock() - defer r.stateLock.RUnlock() - return r.state.endofdir + return r.state.listerAt } // Close reader/writer if possible -func (r Request) close() { +func (r *Request) close() { rd := r.getReader() if c, ok := rd.(io.Closer); ok { c.Close() @@ -135,112 +134,130 @@ func (r Request) close() { } } -// push packet_data into fifo -func (r Request) pushPacket(pd packet_data) { - r.packets <- pd -} - -// pop packet_data into fifo -func (r *Request) popPacket() packet_data { - return <-r.packets -} - // called from worker to handle packet/request -func (r Request) handle(handlers Handlers) (responsePacket, error) { - var err error - var rpkt responsePacket +func (r *Request) call(handlers Handlers, pkt requestPacket) responsePacket { + pd := packetData(pkt) switch r.Method { case "Get": - rpkt, err = fileget(handlers.FileGet, r) + return fileget(handlers.FileGet, r, pd) case "Put": // add "Append" to this to handle append only file writes - rpkt, err = fileput(handlers.FilePut, r) + return fileput(handlers.FilePut, r, pd) case "Setstat", "Rename", "Rmdir", "Mkdir", "Symlink", "Remove": - rpkt, err = filecmd(handlers.FileCmd, r) + return filecmd(handlers.FileCmd, r, pd) case "List", "Stat", "Readlink": - rpkt, err = fileinfo(handlers.FileInfo, r) + return filelist(handlers.FileList, r, pd) default: - return rpkt, errors.Errorf("unexpected method: %s", r.Method) + return statusFromError(pkt, + errors.Errorf("unexpected method: %s", r.Method)) } - return rpkt, err +} + +// file data for additional read/write packets +func packetData(p requestPacket) packet_data { + pd := packet_data{_id: p.id()} + switch p := p.(type) { + case *sshFxpReadPacket: + pd.length = p.Len + pd.offset = int64(p.Offset) + case *sshFxpWritePacket: + pd.data = p.Data + pd.length = p.Length + pd.offset = int64(p.Offset) + } + return pd } // wrap FileReader handler -func fileget(h FileReader, r Request) (responsePacket, error) { +func fileget(h FileReader, r *Request, pd packet_data) responsePacket { var err error reader := r.getReader() if reader == nil { reader, err = h.Fileread(r) if err != nil { - return nil, err + return statusFromError(pd, err) } r.setFileState(reader) } - pd := r.popPacket() data := make([]byte, clamp(pd.length, maxTxPacket)) n, err := reader.ReadAt(data, pd.offset) + // only return EOF erro if no data left to read if err != nil && (err != io.EOF || n == 0) { - return nil, err + return statusFromError(pd, err) } return &sshFxpDataPacket{ - ID: pd.id, + ID: pd.id(), Length: uint32(n), Data: data[:n], - }, nil + } } // wrap FileWriter handler -func fileput(h FileWriter, r Request) (responsePacket, error) { +func fileput(h FileWriter, r *Request, pd packet_data) responsePacket { var err error writer := r.getWriter() if writer == nil { writer, err = h.Filewrite(r) if err != nil { - return nil, err + return statusFromError(pd, err) } r.setFileState(writer) } - pd := r.popPacket() _, err = writer.WriteAt(pd.data, pd.offset) if err != nil { - return nil, err + return statusFromError(pd, err) } return &sshFxpStatusPacket{ - ID: pd.id, + ID: pd.id(), StatusError: StatusError{ Code: ssh_FX_OK, - }}, nil + }} } // wrap FileCmder handler -func filecmd(h FileCmder, r Request) (responsePacket, error) { +func filecmd(h FileCmder, r *Request, pd packet_data) responsePacket { err := h.Filecmd(r) if err != nil { - return nil, err + return statusFromError(pd, err) } return &sshFxpStatusPacket{ - ID: r.pkt_id, + ID: pd.id(), StatusError: StatusError{ Code: ssh_FX_OK, - }}, nil + }} } -// wrap FileInfoer handler -func fileinfo(h FileInfoer, r Request) (responsePacket, error) { - if r.getEOD() { - return nil, io.EOF - } - finfo, err := h.Fileinfo(r) - if err != nil { - return nil, err +// wrap FileLister handler +func filelist(h FileLister, r *Request, pd packet_data) responsePacket { + var err error + lister := r.getLister() + if lister == nil { + lister, err = h.Filelist(r) + if err != nil { + return statusFromError(pd, err) + } + r.setFileState(lister) } + offset := r.lsNext() + finfo := make([]os.FileInfo, MaxFilelist) + n, err := lister.ListAt(finfo, offset) + r.lsInc(int64(n)) + // ignore EOF as we only return it when there are no results + finfo = finfo[:n] // avoid need for nil tests below + switch r.Method { case "List": - pd := r.popPacket() - dirname := path.Base(r.Filepath) - ret := &sshFxpNamePacket{ID: pd.id} + if err != nil && err != io.EOF { + return statusFromError(pd, err) + } + if n == 0 { + return statusFromError(pd, io.EOF) + } + dirname := filepath.ToSlash(path.Base(r.Filepath)) + ret := &sshFxpNamePacket{ID: pd.id()} + for _, fi := range finfo { ret.NameAttrs = append(ret.NameAttrs, sshFxpNameAttr{ Name: fi.Name(), @@ -248,63 +265,56 @@ func fileinfo(h FileInfoer, r Request) (responsePacket, error) { Attrs: []interface{}{fi}, }) } - // No entries means we should return EOF as the Handler didn't. - if len(finfo) == 0 { - return nil, io.EOF - } - // If files are returned but no token is set, return EOF next call. - if r.LsNext() == "" { - r.setEOD(true) - } - return ret, nil + return ret case "Stat": - if len(finfo) == 0 { + if err != nil && err != io.EOF { + return statusFromError(pd, err) + } + if n == 0 { err = &os.PathError{Op: "stat", Path: r.Filepath, Err: syscall.ENOENT} - return nil, err + return statusFromError(pd, err) } return &sshFxpStatResponse{ - ID: r.pkt_id, + ID: pd.id(), info: finfo[0], - }, nil + } case "Readlink": - if len(finfo) == 0 { + if err != nil && err != io.EOF { + return statusFromError(pd, err) + } + if n == 0 { err = &os.PathError{Op: "readlink", Path: r.Filepath, Err: syscall.ENOENT} - return nil, err + return statusFromError(pd, err) } filename := finfo[0].Name() return &sshFxpNamePacket{ - ID: r.pkt_id, + ID: pd.id(), NameAttrs: []sshFxpNameAttr{{ Name: filename, LongName: filename, Attrs: emptyFileStat, }}, - }, nil + } + default: + err = errors.Errorf("unexpected method: %s", r.Method) + return statusFromError(pd, err) } - return nil, err } // file data for additional read/write packets -func (r *Request) update(p hasHandle) error { - pd := packet_data{id: p.id()} +func (r *Request) updateMethod(p hasHandle) error { switch p := p.(type) { case *sshFxpReadPacket: r.Method = "Get" - pd.length = p.Len - pd.offset = int64(p.Offset) case *sshFxpWritePacket: r.Method = "Put" - pd.data = p.Data - pd.length = p.Length - pd.offset = int64(p.Offset) case *sshFxpReaddirPacket: r.Method = "List" default: return errors.Errorf("unexpected packet type %T", p) } - r.pushPacket(pd) return nil } diff --git a/vendor/github.com/pkg/sftp/request_test.go b/vendor/github.com/pkg/sftp/request_test.go index e537fc16e..c90a6edc4 100644 --- a/vendor/github.com/pkg/sftp/request_test.go +++ b/vendor/github.com/pkg/sftp/request_test.go @@ -18,28 +18,25 @@ type testHandler struct { err error // dummy error, should be file related } -func (t *testHandler) Fileread(r Request) (io.ReaderAt, error) { +func (t *testHandler) Fileread(r *Request) (io.ReaderAt, error) { if t.err != nil { return nil, t.err } return bytes.NewReader(t.filecontents), nil } -func (t *testHandler) Filewrite(r Request) (io.WriterAt, error) { +func (t *testHandler) Filewrite(r *Request) (io.WriterAt, error) { if t.err != nil { return nil, t.err } return io.WriterAt(t.output), nil } -func (t *testHandler) Filecmd(r Request) error { - if t.err != nil { - return t.err - } - return nil +func (t *testHandler) Filecmd(r *Request) error { + return t.err } -func (t *testHandler) Fileinfo(r Request) ([]os.FileInfo, error) { +func (t *testHandler) Filelist(r *Request) (ListerAt, error) { if t.err != nil { return nil, t.err } @@ -51,7 +48,7 @@ func (t *testHandler) Fileinfo(r Request) ([]os.FileInfo, error) { if err != nil { return nil, err } - return []os.FileInfo{fi}, nil + return listerat([]os.FileInfo{fi}), nil } // make sure len(fakefile) == len(filecontents) @@ -59,21 +56,15 @@ type fakefile [10]byte var filecontents = []byte("file-data.") -func testRequest(method string) Request { - request := Request{ +func testRequest(method string) *Request { + request := &Request{ Filepath: "./request_test.go", Method: method, Attrs: []byte("foo"), Target: "foo", - packets: make(chan packet_data, sftpServerWorkerCount), state: &state{}, stateLock: &sync.RWMutex{}, } - for _, p := range []packet_data{ - packet_data{id: 1, data: filecontents[:5], length: 5}, - packet_data{id: 2, data: filecontents[5:], length: 5, offset: 5}} { - request.packets <- p - } return request } @@ -98,7 +89,7 @@ func newTestHandlers() Handlers { FileGet: handler, FilePut: handler, FileCmd: handler, - FileInfo: handler, + FileList: handler, } } @@ -120,15 +111,30 @@ func statusOk(t *testing.T, p interface{}) { } } +// fake/test packet +type fakePacket struct { + myid uint32 + handle string +} + +func (f fakePacket) id() uint32 { + return f.myid +} + +func (f fakePacket) getHandle() string { + return f.handle +} +func (fakePacket) UnmarshalBinary(d []byte) error { return nil } + func TestRequestGet(t *testing.T) { handlers := newTestHandlers() request := testRequest("Get") // req.length is 5, so we test reads in 5 byte chunks for i, txt := range []string{"file-", "data."} { - pkt, err := request.handle(handlers) - assert.Nil(t, err) - dpkt := pkt.(*sshFxpDataPacket) - assert.Equal(t, dpkt.id(), uint32(i+1)) + pkt := &sshFxpReadPacket{uint32(i), "a", uint64(i * 5), 5} + rpkt := request.call(handlers, pkt) + dpkt := rpkt.(*sshFxpDataPacket) + assert.Equal(t, dpkt.id(), uint32(i)) assert.Equal(t, string(dpkt.Data), txt) } } @@ -136,26 +142,25 @@ func TestRequestGet(t *testing.T) { func TestRequestPut(t *testing.T) { handlers := newTestHandlers() request := testRequest("Put") - pkt, err := request.handle(handlers) - assert.Nil(t, err) - statusOk(t, pkt) - pkt, err = request.handle(handlers) - assert.Nil(t, err) - statusOk(t, pkt) + pkt := &sshFxpWritePacket{0, "a", 0, 5, []byte("file-")} + rpkt := request.call(handlers, pkt) + statusOk(t, rpkt) + pkt = &sshFxpWritePacket{1, "a", 5, 5, []byte("data.")} + rpkt = request.call(handlers, pkt) + statusOk(t, rpkt) assert.Equal(t, "file-data.", handlers.getOutString()) } func TestRequestCmdr(t *testing.T) { handlers := newTestHandlers() request := testRequest("Mkdir") - pkt, err := request.handle(handlers) - assert.Nil(t, err) - statusOk(t, pkt) + pkt := fakePacket{myid: 1} + rpkt := request.call(handlers, pkt) + statusOk(t, rpkt) handlers.returnError() - pkt, err = request.handle(handlers) - assert.Nil(t, pkt) - assert.Equal(t, err, errTest) + rpkt = request.call(handlers, pkt) + assert.Equal(t, rpkt, statusFromError(rpkt, errTest)) } func TestRequestInfoList(t *testing.T) { testInfoMethod(t, "List") } @@ -163,9 +168,9 @@ func TestRequestInfoReadlink(t *testing.T) { testInfoMethod(t, "Readlink") } func TestRequestInfoStat(t *testing.T) { handlers := newTestHandlers() request := testRequest("Stat") - pkt, err := request.handle(handlers) - assert.Nil(t, err) - spkt, ok := pkt.(*sshFxpStatResponse) + pkt := fakePacket{myid: 1} + rpkt := request.call(handlers, pkt) + spkt, ok := rpkt.(*sshFxpStatResponse) assert.True(t, ok) assert.Equal(t, spkt.info.Name(), "request_test.go") } @@ -173,9 +178,9 @@ func TestRequestInfoStat(t *testing.T) { func testInfoMethod(t *testing.T, method string) { handlers := newTestHandlers() request := testRequest(method) - pkt, err := request.handle(handlers) - assert.Nil(t, err) - npkt, ok := pkt.(*sshFxpNamePacket) + pkt := fakePacket{myid: 1} + rpkt := request.call(handlers, pkt) + npkt, ok := rpkt.(*sshFxpNamePacket) assert.True(t, ok) assert.IsType(t, sshFxpNameAttr{}, npkt.NameAttrs[0]) assert.Equal(t, npkt.NameAttrs[0].Name, "request_test.go") diff --git a/vendor/github.com/pkg/sftp/server.go b/vendor/github.com/pkg/sftp/server.go index 42afc9cbf..be14f62e9 100644 --- a/vendor/github.com/pkg/sftp/server.go +++ b/vendor/github.com/pkg/sftp/server.go @@ -18,7 +18,7 @@ import ( ) const ( - sftpServerWorkerCount = 8 + SftpServerWorkerCount = 8 ) // Server is an SSH File Transfer Protocol (sftp) server. @@ -29,7 +29,7 @@ type Server struct { *serverConn debugStream io.Writer readOnly bool - pktMgr packetManager + pktMgr *packetManager openFiles map[string]*os.File openFilesLock sync.RWMutex handleCount int @@ -230,8 +230,7 @@ func handlePacket(s *Server, p interface{}) error { if err != nil { return s.sendError(p, err) } - f = filepath.Clean(f) - f = filepath.ToSlash(f) // make path more Unix like on windows servers + f = cleanPath(f) return s.sendPacket(sshFxpNamePacket{ ID: p.ID, NameAttrs: []sshFxpNameAttr{{ @@ -555,6 +554,8 @@ func statusFromError(p ider, err error) sshFxpStatusPacket { ret.StatusError.msg = err.Error() if err == io.EOF { ret.StatusError.Code = ssh_FX_EOF + } else if err == os.ErrNotExist { + ret.StatusError.Code = ssh_FX_NO_SUCH_FILE } else if errno, ok := err.(syscall.Errno); ok { ret.StatusError.Code = translateErrno(errno) } else if pathError, ok := err.(*os.PathError); ok { @@ -573,3 +574,92 @@ func clamp(v, max uint32) uint32 { } return v } + +func runLsTypeWord(dirent os.FileInfo) string { + // find first character, the type char + // b Block special file. + // c Character special file. + // d Directory. + // l Symbolic link. + // s Socket link. + // p FIFO. + // - Regular file. + tc := '-' + mode := dirent.Mode() + if (mode & os.ModeDir) != 0 { + tc = 'd' + } else if (mode & os.ModeDevice) != 0 { + tc = 'b' + if (mode & os.ModeCharDevice) != 0 { + tc = 'c' + } + } else if (mode & os.ModeSymlink) != 0 { + tc = 'l' + } else if (mode & os.ModeSocket) != 0 { + tc = 's' + } else if (mode & os.ModeNamedPipe) != 0 { + tc = 'p' + } + + // owner + orc := '-' + if (mode & 0400) != 0 { + orc = 'r' + } + owc := '-' + if (mode & 0200) != 0 { + owc = 'w' + } + oxc := '-' + ox := (mode & 0100) != 0 + setuid := (mode & os.ModeSetuid) != 0 + if ox && setuid { + oxc = 's' + } else if setuid { + oxc = 'S' + } else if ox { + oxc = 'x' + } + + // group + grc := '-' + if (mode & 040) != 0 { + grc = 'r' + } + gwc := '-' + if (mode & 020) != 0 { + gwc = 'w' + } + gxc := '-' + gx := (mode & 010) != 0 + setgid := (mode & os.ModeSetgid) != 0 + if gx && setgid { + gxc = 's' + } else if setgid { + gxc = 'S' + } else if gx { + gxc = 'x' + } + + // all / others + arc := '-' + if (mode & 04) != 0 { + arc = 'r' + } + awc := '-' + if (mode & 02) != 0 { + awc = 'w' + } + axc := '-' + ax := (mode & 01) != 0 + sticky := (mode & os.ModeSticky) != 0 + if ax && sticky { + axc = 't' + } else if sticky { + axc = 'T' + } else if ax { + axc = 'x' + } + + return fmt.Sprintf("%c%c%c%c%c%c%c%c%c%c", tc, orc, owc, oxc, grc, gwc, gxc, arc, awc, axc) +} diff --git a/vendor/github.com/pkg/sftp/server_integration_test.go b/vendor/github.com/pkg/sftp/server_integration_test.go index c5786074a..25b89ef13 100644 --- a/vendor/github.com/pkg/sftp/server_integration_test.go +++ b/vendor/github.com/pkg/sftp/server_integration_test.go @@ -6,7 +6,12 @@ package sftp import ( "bytes" + "crypto/ecdsa" + "crypto/elliptic" + crand "crypto/rand" + "crypto/x509" "encoding/hex" + "encoding/pem" "flag" "fmt" "io/ioutil" @@ -316,7 +321,7 @@ func (chsvr *sshSessionChannelServer) handleSubsystem(req *ssh.Request) error { // starts an ssh server to test. returns: host string and port func testServer(t *testing.T, useSubsystem bool, readonly bool) (net.Listener, string, int) { if !*testIntegration { - t.Skip("skipping intergration test") + t.Skip("skipping integration test") } listener, err := net.Listen("tcp", "127.0.0.1:0") @@ -357,17 +362,59 @@ func testServer(t *testing.T, useSubsystem bool, readonly bool) (net.Listener, s return listener, host, port } +func makeDummyKey() (string, error) { + priv, err := ecdsa.GenerateKey(elliptic.P256(), crand.Reader) + if err != nil { + return "", fmt.Errorf("cannot generate key: %v", err) + } + der, err := x509.MarshalECPrivateKey(priv) + if err != nil { + return "", fmt.Errorf("cannot marshal key: %v", err) + } + block := &pem.Block{Type: "EC PRIVATE KEY", Bytes: der} + f, err := ioutil.TempFile("", "sftp-test-key-") + if err != nil { + return "", fmt.Errorf("cannot create temp file: %v", err) + } + defer func() { + if f != nil { + _ = f.Close() + _ = os.Remove(f.Name()) + } + }() + if err := pem.Encode(f, block); err != nil { + return "", fmt.Errorf("cannot write key: %v", err) + } + if err := f.Close(); err != nil { + return "", fmt.Errorf("error closing key file: %v", err) + } + path := f.Name() + f = nil + return path, nil +} + func runSftpClient(t *testing.T, script string, path string, host string, port int) (string, error) { // if sftp client binary is unavailable, skip test if _, err := os.Stat(*testSftpClientBin); err != nil { t.Skip("sftp client binary unavailable") } + + // make a dummy key so we don't rely on ssh-agent + dummyKey, err := makeDummyKey() + if err != nil { + return "", err + } + defer os.Remove(dummyKey) + args := []string{ // "-vvvv", "-b", "-", "-o", "StrictHostKeyChecking=no", "-o", "LogLevel=ERROR", "-o", "UserKnownHostsFile /dev/null", + // do not trigger ssh-agent prompting + "-o", "IdentityFile=" + dummyKey, + "-o", "IdentitiesOnly=yes", "-P", fmt.Sprintf("%d", port), fmt.Sprintf("%s:%s", host, path), } cmd := exec.Command(*testSftpClientBin, args...) @@ -378,7 +425,7 @@ func runSftpClient(t *testing.T, script string, path string, host string, port i if err := cmd.Start(); err != nil { return "", err } - err := cmd.Wait() + err = cmd.Wait() return string(stdout.Bytes()), err } diff --git a/vendor/github.com/pkg/sftp/server_stubs.go b/vendor/github.com/pkg/sftp/server_stubs.go index 3b1ddbdbb..a14c73482 100644 --- a/vendor/github.com/pkg/sftp/server_stubs.go +++ b/vendor/github.com/pkg/sftp/server_stubs.go @@ -4,9 +4,29 @@ package sftp import ( "os" - "path" + "time" + "fmt" ) func runLs(dirname string, dirent os.FileInfo) string { - return path.Join(dirname, dirent.Name()) + typeword := runLsTypeWord(dirent) + numLinks := 1 + if dirent.IsDir() { + numLinks = 0 + } + username := "root" + groupname := "root" + mtime := dirent.ModTime() + monthStr := mtime.Month().String()[0:3] + day := mtime.Day() + year := mtime.Year() + now := time.Now() + isOld := mtime.Before(now.Add(-time.Hour * 24 * 365 / 2)) + + yearOrTime := fmt.Sprintf("%02d:%02d", mtime.Hour(), mtime.Minute()) + if isOld { + yearOrTime = fmt.Sprintf("%d", year) + } + + return fmt.Sprintf("%s %4d %-8s %-8s %8d %s %2d %5s %s", typeword, numLinks, username, groupname, dirent.Size(), monthStr, day, yearOrTime, dirent.Name()) } diff --git a/vendor/github.com/pkg/sftp/server_test.go b/vendor/github.com/pkg/sftp/server_test.go index 721acc677..f2f034a8d 100644 --- a/vendor/github.com/pkg/sftp/server_test.go +++ b/vendor/github.com/pkg/sftp/server_test.go @@ -1,11 +1,159 @@ package sftp import ( + "testing" + "os" + "regexp" + "time" "io" "sync" - "testing" ) +const ( + typeDirectory = "d" + typeFile = "[^d]" +) + +func TestRunLsWithExamplesDirectory(t *testing.T) { + path := "examples" + item, _ := os.Stat(path) + result := runLs(path, item) + runLsTestHelper(t, result, typeDirectory, path) +} + +func TestRunLsWithLicensesFile(t *testing.T) { + path := "LICENSE" + item, _ := os.Stat(path) + result := runLs(path, item) + runLsTestHelper(t, result, typeFile, path) +} + +/* + The format of the `longname' field is unspecified by this protocol. + It MUST be suitable for use in the output of a directory listing + command (in fact, the recommended operation for a directory listing + command is to simply display this data). However, clients SHOULD NOT + attempt to parse the longname field for file attributes; they SHOULD + use the attrs field instead. + + The recommended format for the longname field is as follows: + + -rwxr-xr-x 1 mjos staff 348911 Mar 25 14:29 t-filexfer + 1234567890 123 12345678 12345678 12345678 123456789012 + + Here, the first line is sample output, and the second field indicates + widths of the various fields. Fields are separated by spaces. The + first field lists file permissions for user, group, and others; the + second field is link count; the third field is the name of the user + who owns the file; the fourth field is the name of the group that + owns the file; the fifth field is the size of the file in bytes; the + sixth field (which actually may contain spaces, but is fixed to 12 + characters) is the file modification time, and the seventh field is + the file name. Each field is specified to be a minimum of certain + number of character positions (indicated by the second line above), + but may also be longer if the data does not fit in the specified + length. + + The SSH_FXP_ATTRS response has the following format: + + uint32 id + ATTRS attrs + + where `id' is the request identifier, and `attrs' is the returned + file attributes as described in Section ``File Attributes''. + */ +func runLsTestHelper(t *testing.T, result, expectedType, path string) { + // using regular expressions to make tests work on all systems + // a virtual file system (like afero) would be needed to mock valid filesystem checks + // expected layout is: + // drwxr-xr-x 8 501 20 272 Aug 9 19:46 examples + + // permissions (len 10, "drwxr-xr-x") + got := result[0:10] + if ok, err := regexp.MatchString("^"+expectedType+"[rwx-]{9}$", got); !ok { + t.Errorf("runLs(%#v, *FileInfo): permission field mismatch, expected dir, got: %#v, err: %#v", path, got, err) + } + + // space + got = result[10:11] + if ok, err := regexp.MatchString("^\\s$", got); !ok { + t.Errorf("runLs(%#v, *FileInfo): spacer 1 mismatch, expected whitespace, got: %#v, err: %#v", path, got, err) + } + + // link count (len 3, number) + got = result[12:15] + if ok, err := regexp.MatchString("^\\s*[0-9]+$", got); !ok { + t.Errorf("runLs(%#v, *FileInfo): link count field mismatch, got: %#v, err: %#v", path, got, err) + } + + // spacer + got = result[15:16] + if ok, err := regexp.MatchString("^\\s$", got); !ok { + t.Errorf("runLs(%#v, *FileInfo): spacer 2 mismatch, expected whitespace, got: %#v, err: %#v", path, got, err) + } + + // username / uid (len 8, number or string) + got = result[16:24] + if ok, err := regexp.MatchString("^[^\\s]{1,8}\\s*$", got); !ok { + t.Errorf("runLs(%#v, *FileInfo): username / uid mismatch, expected user, got: %#v, err: %#v", path, got, err) + } + + // spacer + got = result[24:25] + if ok, err := regexp.MatchString("^\\s$", got); !ok { + t.Errorf("runLs(%#v, *FileInfo): spacer 3 mismatch, expected whitespace, got: %#v, err: %#v", path, got, err) + } + + // groupname / gid (len 8, number or string) + got = result[25:33] + if ok, err := regexp.MatchString("^[^\\s]{1,8}\\s*$", got); !ok { + t.Errorf("runLs(%#v, *FileInfo): groupname / gid mismatch, expected group, got: %#v, err: %#v", path, got, err) + } + + // spacer + got = result[33:34] + if ok, err := regexp.MatchString("^\\s$", got); !ok { + t.Errorf("runLs(%#v, *FileInfo): spacer 4 mismatch, expected whitespace, got: %#v, err: %#v", path, got, err) + } + + // filesize (len 8) + got = result[34:42] + if ok, err := regexp.MatchString("^\\s*[0-9]+$", got); !ok { + t.Errorf("runLs(%#v, *FileInfo): filesize field mismatch, expected size in bytes, got: %#v, err: %#v", path, got, err) + } + + // spacer + got = result[42:43] + if ok, err := regexp.MatchString("^\\s$", got); !ok { + t.Errorf("runLs(%#v, *FileInfo): spacer 5 mismatch, expected whitespace, got: %#v, err: %#v", path, got, err) + } + + // mod time (len 12, e.g. Aug 9 19:46) + got = result[43:55] + layout := "Jan 2 15:04" + _, err := time.Parse(layout, got) + + if err != nil { + layout = "Jan 2 2006" + _, err = time.Parse(layout, got) + } + if err != nil { + t.Errorf("runLs(%#v, *FileInfo): mod time field mismatch, expected date layout %s, got: %#v, err: %#v", path, layout, got, err) + } + + // spacer + got = result[55:56] + if ok, err := regexp.MatchString("^\\s$", got); !ok { + t.Errorf("runLs(%#v, *FileInfo): spacer 6 mismatch, expected whitespace, got: %#v, err: %#v", path, got, err) + } + + // filename + got = result[56:] + if ok, err := regexp.MatchString("^"+path+"$", got); !ok { + t.Errorf("runLs(%#v, *FileInfo): name field mismatch, expected examples, got: %#v, err: %#v", path, got, err) + } +} + func clientServerPair(t *testing.T) (*Client, *Server) { cr, sw := io.Pipe() sr, cw := io.Pipe() diff --git a/vendor/github.com/pkg/sftp/server_unix.go b/vendor/github.com/pkg/sftp/server_unix.go index 8c3f0b44e..8d0c138cc 100644 --- a/vendor/github.com/pkg/sftp/server_unix.go +++ b/vendor/github.com/pkg/sftp/server_unix.go @@ -11,96 +11,7 @@ import ( "time" ) -func runLsTypeWord(dirent os.FileInfo) string { - // find first character, the type char - // b Block special file. - // c Character special file. - // d Directory. - // l Symbolic link. - // s Socket link. - // p FIFO. - // - Regular file. - tc := '-' - mode := dirent.Mode() - if (mode & os.ModeDir) != 0 { - tc = 'd' - } else if (mode & os.ModeDevice) != 0 { - tc = 'b' - if (mode & os.ModeCharDevice) != 0 { - tc = 'c' - } - } else if (mode & os.ModeSymlink) != 0 { - tc = 'l' - } else if (mode & os.ModeSocket) != 0 { - tc = 's' - } else if (mode & os.ModeNamedPipe) != 0 { - tc = 'p' - } - - // owner - orc := '-' - if (mode & 0400) != 0 { - orc = 'r' - } - owc := '-' - if (mode & 0200) != 0 { - owc = 'w' - } - oxc := '-' - ox := (mode & 0100) != 0 - setuid := (mode & os.ModeSetuid) != 0 - if ox && setuid { - oxc = 's' - } else if setuid { - oxc = 'S' - } else if ox { - oxc = 'x' - } - - // group - grc := '-' - if (mode & 040) != 0 { - grc = 'r' - } - gwc := '-' - if (mode & 020) != 0 { - gwc = 'w' - } - gxc := '-' - gx := (mode & 010) != 0 - setgid := (mode & os.ModeSetgid) != 0 - if gx && setgid { - gxc = 's' - } else if setgid { - gxc = 'S' - } else if gx { - gxc = 'x' - } - - // all / others - arc := '-' - if (mode & 04) != 0 { - arc = 'r' - } - awc := '-' - if (mode & 02) != 0 { - awc = 'w' - } - axc := '-' - ax := (mode & 01) != 0 - sticky := (mode & os.ModeSticky) != 0 - if ax && sticky { - axc = 't' - } else if sticky { - axc = 'T' - } else if ax { - axc = 'x' - } - - return fmt.Sprintf("%c%c%c%c%c%c%c%c%c%c", tc, orc, owc, oxc, grc, gwc, gxc, arc, awc, axc) -} - -func runLsStatt(dirname string, dirent os.FileInfo, statt *syscall.Stat_t) string { +func runLsStatt(dirent os.FileInfo, statt *syscall.Stat_t) string { // example from openssh sftp server: // crw-rw-rw- 1 root wheel 0 Jul 31 20:52 ttyvd // format: @@ -136,7 +47,7 @@ func runLs(dirname string, dirent os.FileInfo) string { if dsys == nil { } else if statt, ok := dsys.(*syscall.Stat_t); !ok { } else { - return runLsStatt(dirname, dirent, statt) + return runLsStatt(dirent, statt) } return path.Join(dirname, dirent.Name()) diff --git a/vendor/github.com/russross/blackfriday/.travis.yml b/vendor/github.com/russross/blackfriday/.travis.yml index 208fd25bc..a1687f17a 100644 --- a/vendor/github.com/russross/blackfriday/.travis.yml +++ b/vendor/github.com/russross/blackfriday/.travis.yml @@ -1,18 +1,30 @@ -# Travis CI (http://travis-ci.org/) is a continuous integration service for -# open source projects. This file configures it to run unit tests for -# blackfriday. - +sudo: false language: go - go: - - 1.2 - - 1.3 - - 1.4 - - 1.5 - + - 1.5.4 + - 1.6.2 + - tip +matrix: + include: + - go: 1.2.2 + script: + - go get -t -v ./... + - go test -v -race ./... + - go: 1.3.3 + script: + - go get -t -v ./... + - go test -v -race ./... + - go: 1.4.3 + script: + - go get -t -v ./... + - go test -v -race ./... + allow_failures: + - go: tip + fast_finish: true install: - - go get -d -t -v ./... - - go build -v ./... - + - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). script: - - go test -v ./... + - go get -t -v ./... + - diff -u <(echo -n) <(gofmt -d -s .) + - go tool vet . + - go test -v -race ./... diff --git a/vendor/github.com/russross/blackfriday/README.md b/vendor/github.com/russross/blackfriday/README.md index 7b979700b..0d1ac9a73 100644 --- a/vendor/github.com/russross/blackfriday/README.md +++ b/vendor/github.com/russross/blackfriday/README.md @@ -1,4 +1,4 @@ -Blackfriday [![Build Status](https://travis-ci.org/russross/blackfriday.svg?branch=master)](https://travis-ci.org/russross/blackfriday) +Blackfriday [![Build Status](https://travis-ci.org/russross/blackfriday.svg?branch=master)](https://travis-ci.org/russross/blackfriday) [![GoDoc](https://godoc.org/github.com/russross/blackfriday?status.svg)](https://godoc.org/github.com/russross/blackfriday) =========== Blackfriday is a [Markdown][1] processor implemented in [Go][2]. It @@ -93,6 +93,22 @@ installed in `$GOPATH/bin`. This is a statically-linked binary that can be copied to wherever you need it without worrying about dependencies and library versions. +### Sanitized anchor names + +Blackfriday includes an algorithm for creating sanitized anchor names +corresponding to a given input text. This algorithm is used to create +anchors for headings when `EXTENSION_AUTO_HEADER_IDS` is enabled. The +algorithm has a specification, so that other packages can create +compatible anchor names and links to those anchors. + +The specification is located at https://godoc.org/github.com/russross/blackfriday#hdr-Sanitized_Anchor_Names. + +[`SanitizedAnchorName`](https://godoc.org/github.com/russross/blackfriday#SanitizedAnchorName) exposes this functionality, and can be used to +create compatible links to the anchor names generated by blackfriday. +This algorithm is also implemented in a small standalone package at +[`github.com/shurcooL/sanitized_anchor_name`](https://godoc.org/github.com/shurcooL/sanitized_anchor_name). It can be useful for clients +that want a small package and don't need full functionality of blackfriday. + Features -------- @@ -114,7 +130,7 @@ All features of Sundown are supported, including: know and send me the input that does it. NOTE: "safety" in this context means *runtime safety only*. In order to - protect yourself agains JavaScript injection in untrusted content, see + protect yourself against JavaScript injection in untrusted content, see [this example](https://github.com/russross/blackfriday#sanitize-untrusted-content). * **Fast processing**. It is fast enough to render on-demand in @@ -169,6 +185,15 @@ implements the following extensions: You can use 3 or more backticks to mark the beginning of the block, and the same number to mark the end of the block. + To preserve classes of fenced code blocks while using the bluemonday + HTML sanitizer, use the following policy: + + ``` go + p := bluemonday.UGCPolicy() + p.AllowAttrs("class").Matching(regexp.MustCompile("^language-[a-zA-Z0-9]+$")).OnElements("code") + html := p.SanitizeBytes(unsafe) + ``` + * **Definition lists**. A simple definition list is made of a single-line term followed by a colon and the definition for that term. @@ -242,6 +267,8 @@ are a few of note: point. In particular, it does not do any inline escaping, so input that happens to look like LaTeX code will be passed through without modification. + +* [Md2Vim](https://github.com/FooSoft/md2vim): transforms markdown files into vimdoc format. Todo diff --git a/vendor/github.com/russross/blackfriday/block.go b/vendor/github.com/russross/blackfriday/block.go index b5b084117..7fc731d54 100644 --- a/vendor/github.com/russross/blackfriday/block.go +++ b/vendor/github.com/russross/blackfriday/block.go @@ -15,8 +15,7 @@ package blackfriday import ( "bytes" - - "github.com/shurcooL/sanitized_anchor_name" + "unicode" ) // Parse block-level data. @@ -102,7 +101,7 @@ func (p *parser) block(out *bytes.Buffer, data []byte) { // } // ``` if p.flags&EXTENSION_FENCED_CODE != 0 { - if i := p.fencedCode(out, data, true); i > 0 { + if i := p.fencedCodeBlock(out, data, true); i > 0 { data = data[i:] continue } @@ -243,7 +242,7 @@ func (p *parser) prefixHeader(out *bytes.Buffer, data []byte) int { } if end > i { if id == "" && p.flags&EXTENSION_AUTO_HEADER_IDS != 0 { - id = sanitized_anchor_name.Create(string(data[i:end])) + id = SanitizedAnchorName(string(data[i:end])) } work := func() bool { p.inline(out, data[i:end]) @@ -320,6 +319,11 @@ func (p *parser) html(out *bytes.Buffer, data []byte, doRender bool) int { return size } + // check for HTML CDATA + if size := p.htmlCDATA(out, data, doRender); size > 0 { + return size + } + // no special case recognized return 0 } @@ -397,12 +401,10 @@ func (p *parser) html(out *bytes.Buffer, data []byte, doRender bool) int { return i } -// HTML comment, lax form -func (p *parser) htmlComment(out *bytes.Buffer, data []byte, doRender bool) int { - i := p.inlineHtmlComment(out, data) - // needs to end with a blank line - if j := p.isEmpty(data[i:]); j > 0 { - size := i + j +func (p *parser) renderHTMLBlock(out *bytes.Buffer, data []byte, start int, doRender bool) int { + // html block needs to end with a blank line + if i := p.isEmpty(data[start:]); i > 0 { + size := start + i if doRender { // trim trailing newlines end := size @@ -416,6 +418,35 @@ func (p *parser) htmlComment(out *bytes.Buffer, data []byte, doRender bool) int return 0 } +// HTML comment, lax form +func (p *parser) htmlComment(out *bytes.Buffer, data []byte, doRender bool) int { + i := p.inlineHTMLComment(out, data) + return p.renderHTMLBlock(out, data, i, doRender) +} + +// HTML CDATA section +func (p *parser) htmlCDATA(out *bytes.Buffer, data []byte, doRender bool) int { + const cdataTag = "') { + i++ + } + i++ + // no end-of-comment marker + if i >= len(data) { + return 0 + } + return p.renderHTMLBlock(out, data, i, doRender) +} + // HR, which is the only self-closing block tag considered func (p *parser) htmlHr(out *bytes.Buffer, data []byte, doRender bool) int { if data[0] != '<' || (data[1] != 'h' && data[1] != 'H') || (data[2] != 'r' && data[2] != 'R') { @@ -432,19 +463,7 @@ func (p *parser) htmlHr(out *bytes.Buffer, data []byte, doRender bool) int { } if data[i] == '>' { - i++ - if j := p.isEmpty(data[i:]); j > 0 { - size := i + j - if doRender { - // trim newlines - end := size - for end > 0 && data[end-1] == '\n' { - end-- - } - p.r.BlockHtml(out, data[:end]) - } - return size - } + return p.renderHTMLBlock(out, data, i+1, doRender) } return 0 @@ -495,7 +514,7 @@ func (p *parser) htmlFindEnd(tag string, data []byte) int { return i + skip } -func (p *parser) isEmpty(data []byte) int { +func (*parser) isEmpty(data []byte) int { // it is okay to call isEmpty on an empty buffer if len(data) == 0 { return 0 @@ -510,7 +529,7 @@ func (p *parser) isEmpty(data []byte) int { return i + 1 } -func (p *parser) isHRule(data []byte) bool { +func (*parser) isHRule(data []byte) bool { i := 0 // skip up to three spaces @@ -539,21 +558,24 @@ func (p *parser) isHRule(data []byte) bool { return n >= 3 } -func (p *parser) isFencedCode(data []byte, syntax **string, oldmarker string) (skip int, marker string) { +// isFenceLine checks if there's a fence line (e.g., ``` or ``` go) at the beginning of data, +// and returns the end index if so, or 0 otherwise. It also returns the marker found. +// If syntax is not nil, it gets set to the syntax specified in the fence line. +// A final newline is mandatory to recognize the fence line, unless newlineOptional is true. +func isFenceLine(data []byte, syntax *string, oldmarker string, newlineOptional bool) (end int, marker string) { i, size := 0, 0 - skip = 0 // skip up to three spaces for i < len(data) && i < 3 && data[i] == ' ' { i++ } - if i >= len(data) { - return - } // check for the marker characters: ~ or ` + if i >= len(data) { + return 0, "" + } if data[i] != '~' && data[i] != '`' { - return + return 0, "" } c := data[i] @@ -564,27 +586,28 @@ func (p *parser) isFencedCode(data []byte, syntax **string, oldmarker string) (s i++ } - if i >= len(data) { - return - } - // the marker char must occur at least 3 times if size < 3 { - return + return 0, "" } marker = string(data[i-size : i]) // if this is the end marker, it must match the beginning marker if oldmarker != "" && marker != oldmarker { - return + return 0, "" } + // TODO(shurcooL): It's probably a good idea to simplify the 2 code paths here + // into one, always get the syntax, and discard it if the caller doesn't care. if syntax != nil { syn := 0 i = skipChar(data, i, ' ') if i >= len(data) { - return + if newlineOptional && i == len(data) { + return i, marker + } + return 0, "" } syntaxStart := i @@ -599,7 +622,7 @@ func (p *parser) isFencedCode(data []byte, syntax **string, oldmarker string) (s } if i >= len(data) || data[i] != '}' { - return + return 0, "" } // strip all whitespace at the beginning and the end @@ -621,22 +644,26 @@ func (p *parser) isFencedCode(data []byte, syntax **string, oldmarker string) (s } } - language := string(data[syntaxStart : syntaxStart+syn]) - *syntax = &language + *syntax = string(data[syntaxStart : syntaxStart+syn]) } i = skipChar(data, i, ' ') if i >= len(data) || data[i] != '\n' { - return + if newlineOptional && i == len(data) { + return i, marker + } + return 0, "" } - skip = i + 1 - return + return i + 1, marker // Take newline into account. } -func (p *parser) fencedCode(out *bytes.Buffer, data []byte, doRender bool) int { - var lang *string - beg, marker := p.isFencedCode(data, &lang, "") +// fencedCodeBlock returns the end index if data contains a fenced code block at the beginning, +// or 0 otherwise. It writes to out if doRender is true, otherwise it has no side effects. +// If doRender is true, a final newline is mandatory to recognize the fenced code block. +func (p *parser) fencedCodeBlock(out *bytes.Buffer, data []byte, doRender bool) int { + var syntax string + beg, marker := isFenceLine(data, &syntax, "", false) if beg == 0 || beg >= len(data) { return 0 } @@ -647,7 +674,8 @@ func (p *parser) fencedCode(out *bytes.Buffer, data []byte, doRender bool) int { // safe to assume beg < len(data) // check for the end of the code block - fenceEnd, _ := p.isFencedCode(data[beg:], nil, marker) + newlineOptional := !doRender + fenceEnd, _ := isFenceLine(data[beg:], nil, marker, newlineOptional) if fenceEnd != 0 { beg += fenceEnd break @@ -668,11 +696,6 @@ func (p *parser) fencedCode(out *bytes.Buffer, data []byte, doRender bool) int { beg = end } - syntax := "" - if lang != nil { - syntax = *lang - } - if doRender { p.r.BlockCode(out, work.Bytes(), syntax) } @@ -914,7 +937,7 @@ func (p *parser) quote(out *bytes.Buffer, data []byte) int { // irregardless of any contents inside it for data[end] != '\n' { if p.flags&EXTENSION_FENCED_CODE != 0 { - if i := p.fencedCode(out, data[end:], false); i > 0 { + if i := p.fencedCodeBlock(out, data[end:], false); i > 0 { // -1 to compensate for the extra end++ after the loop: end += i - 1 break @@ -1133,6 +1156,7 @@ gatherlines: // and move on to the next line if p.isEmpty(data[line:i]) > 0 { containsBlankLine = true + raw.Write(data[line:i]) line = i continue } @@ -1153,6 +1177,14 @@ gatherlines: p.dliPrefix(chunk) > 0: if containsBlankLine { + // end the list if the type changed after a blank line + if indent <= itemIndent && + ((*flags&LIST_TYPE_ORDERED != 0 && p.uliPrefix(chunk) > 0) || + (*flags&LIST_TYPE_ORDERED == 0 && p.oliPrefix(chunk) > 0)) { + + *flags |= LIST_ITEM_END_OF_LIST + break gatherlines + } *flags |= LIST_ITEM_CONTAINS_BLOCK } @@ -1200,17 +1232,10 @@ gatherlines: // a blank line means this should be parsed as a block case containsBlankLine: - raw.WriteByte('\n') *flags |= LIST_ITEM_CONTAINS_BLOCK } - // if this line was preceeded by one or more blanks, - // re-introduce the blank into the buffer - if containsBlankLine { - containsBlankLine = false - raw.WriteByte('\n') - - } + containsBlankLine = false // add the line into the working buffer without prefix raw.Write(data[line+indent : i]) @@ -1218,6 +1243,12 @@ gatherlines: line = i } + // If reached end of data, the Renderer.ListItem call we're going to make below + // is definitely the last in the list. + if line >= len(data) { + *flags |= LIST_ITEM_END_OF_LIST + } + rawBytes := raw.Bytes() // render the contents of the list item @@ -1332,7 +1363,7 @@ func (p *parser) paragraph(out *bytes.Buffer, data []byte) int { id := "" if p.flags&EXTENSION_AUTO_HEADER_IDS != 0 { - id = sanitized_anchor_name.Create(string(data[prev:eol])) + id = SanitizedAnchorName(string(data[prev:eol])) } p.r.Header(out, work, level, id) @@ -1362,7 +1393,7 @@ func (p *parser) paragraph(out *bytes.Buffer, data []byte) int { // if there's a fenced code block, paragraph is over if p.flags&EXTENSION_FENCED_CODE != 0 { - if p.fencedCode(out, current, false) > 0 { + if p.fencedCodeBlock(out, current, false) > 0 { p.renderParagraph(out, data[:i]) return i } @@ -1396,3 +1427,24 @@ func (p *parser) paragraph(out *bytes.Buffer, data []byte) int { p.renderParagraph(out, data[:i]) return i } + +// SanitizedAnchorName returns a sanitized anchor name for the given text. +// +// It implements the algorithm specified in the package comment. +func SanitizedAnchorName(text string) string { + var anchorName []rune + futureDash := false + for _, r := range text { + switch { + case unicode.IsLetter(r) || unicode.IsNumber(r): + if futureDash && len(anchorName) > 0 { + anchorName = append(anchorName, '-') + } + futureDash = false + anchorName = append(anchorName, unicode.ToLower(r)) + default: + futureDash = true + } + } + return string(anchorName) +} diff --git a/vendor/github.com/russross/blackfriday/block_test.go b/vendor/github.com/russross/blackfriday/block_test.go index b33c2578b..89d57754e 100644 --- a/vendor/github.com/russross/blackfriday/block_test.go +++ b/vendor/github.com/russross/blackfriday/block_test.go @@ -657,6 +657,9 @@ func TestUnorderedList(t *testing.T) { "Paragraph\n\n* Linebreak\n", "

Paragraph

\n\n
    \n
  • Linebreak
  • \n
\n", + "* List\n\n1. Spacer Mixed listing\n", + "
    \n
  • List
  • \n
\n\n
    \n
  1. Spacer Mixed listing
  2. \n
\n", + "* List\n * Nested list\n", "
    \n
  • List\n\n
      \n
    • Nested list
    • \n
  • \n
\n", @@ -702,10 +705,41 @@ func TestUnorderedList(t *testing.T) { "* List\n\n * sublist\n\n normal text\n\n * another sublist\n", "
    \n
  • List

    \n\n
      \n
    • sublist
    • \n
    \n\n

    normal text

    \n\n
      \n
    • another sublist
    • \n
  • \n
\n", + + `* Foo + + bar + + qux +`, + `
    +
  • Foo

    + +
    bar
    +
    +qux
    +
  • +
+`, } doTestsBlock(t, tests, 0) } +func TestFencedCodeBlockWithinList(t *testing.T) { + doTestsBlock(t, []string{ + "* Foo\n\n ```\n bar\n\n qux\n ```\n", + `
    +
  • Foo

    + +
    bar
    +
    +qux
    +
  • +
+`, + }, EXTENSION_FENCED_CODE) +} + func TestOrderedList(t *testing.T) { var tests = []string{ "1. Hello\n", @@ -784,6 +818,12 @@ func TestOrderedList(t *testing.T) { "1. List\n\n code block with spaces\n", "
    \n
  1. List

    \n\n
      code block with spaces\n
  2. \n
\n", + "1. List\n\n* Spacer Mixed listing\n", + "
    \n
  1. List
  2. \n
\n\n
    \n
  • Spacer Mixed listing
  • \n
\n", + + "1. List\n* Mixed listing\n", + "
    \n
  1. List
  2. \n
  3. Mixed listing
  4. \n
\n", + "1. List\n * Mixted list\n", "
    \n
  1. List\n\n
      \n
    • Mixted list
    • \n
  2. \n
\n", @@ -798,6 +838,26 @@ func TestOrderedList(t *testing.T) { "1. numbers\n1. are ignored\n", "
    \n
  1. numbers
  2. \n
  3. are ignored
  4. \n
\n", + + `1. Foo + + bar + + + + qux +`, + `
    +
  1. Foo

    + +
    bar
    +
    +
    +
    +qux
    +
  2. +
+`, } doTestsBlock(t, tests, 0) } @@ -900,6 +960,14 @@ func TestDefinitionList(t *testing.T) { "

Definition b

\n" + "\n" + "\n

Text 2

\n", + + "Term 1\n: Definition a\n\n Text 1\n\n 1. First\n 2. Second", + "
\n" + + "
Term 1
\n" + + "

Definition a

\n\n" + + "

Text 1

\n\n" + + "
    \n
  1. First
  2. \n
  3. Second
  4. \n
\n" + + "
\n", } doTestsBlock(t, tests, EXTENSION_DEFINITION_LISTS) } @@ -1062,6 +1130,12 @@ func TestFencedCodeBlock(t *testing.T) { "Some text before a fenced code block\n``` oz\ncode blocks breakup paragraphs\n```\nSome text in between\n``` oz\nmultiple code blocks work okay\n```\nAnd some text after a fenced code block", "

Some text before a fenced code block

\n\n
code blocks breakup paragraphs\n
\n\n

Some text in between

\n\n
multiple code blocks work okay\n
\n\n

And some text after a fenced code block

\n", + + "```\n[]:()\n```\n", + "
[]:()\n
\n", + + "```\n[]:()\n[]:)\n[]:(\n[]:x\n[]:testing\n[:testing\n\n[]:\nlinebreak\n[]()\n\n[]:\n[]()\n```", + "
[]:()\n[]:)\n[]:(\n[]:x\n[]:testing\n[:testing\n\n[]:\nlinebreak\n[]()\n\n[]:\n[]()\n
\n", } doTestsBlock(t, tests, EXTENSION_FENCED_CODE) } @@ -1530,3 +1604,178 @@ func TestBlockComments(t *testing.T) { } doTestsBlock(t, tests, 0) } + +func TestCDATA(t *testing.T) { + var tests = []string{ + "Some text\n\n\n", + "

Some text

\n\n\n", + + "CDATA ]]\n\n\n", + "

CDATA ]]

\n\n\n", + + "CDATA >\n\n]]>\n", + "

CDATA >

\n\n]]>\n", + + "Lots of text\n\n\n", + "

Lots of text

\n\n\n", + + "]]>\n", + "]]>\n", + } + doTestsBlock(t, tests, 0) + doTestsBlock(t, []string{ + "``` html\n\n```\n", + "
<![CDATA[foo]]>\n
\n", + + "\n", + "\n", + + ` def func(): +> pass +]]> +`, + ` def func(): +> pass +]]> +`, + }, EXTENSION_FENCED_CODE) +} + +func TestIsFenceLine(t *testing.T) { + tests := []struct { + data []byte + syntaxRequested bool + newlineOptional bool + wantEnd int + wantMarker string + wantSyntax string + }{ + { + data: []byte("```"), + wantEnd: 0, + }, + { + data: []byte("```\nstuff here\n"), + wantEnd: 4, + wantMarker: "```", + }, + { + data: []byte("```\nstuff here\n"), + syntaxRequested: true, + wantEnd: 4, + wantMarker: "```", + }, + { + data: []byte("stuff here\n```\n"), + wantEnd: 0, + }, + { + data: []byte("```"), + newlineOptional: true, + wantEnd: 3, + wantMarker: "```", + }, + { + data: []byte("```"), + syntaxRequested: true, + newlineOptional: true, + wantEnd: 3, + wantMarker: "```", + }, + { + data: []byte("``` go"), + syntaxRequested: true, + newlineOptional: true, + wantEnd: 6, + wantMarker: "```", + wantSyntax: "go", + }, + } + + for _, test := range tests { + var syntax *string + if test.syntaxRequested { + syntax = new(string) + } + end, marker := isFenceLine(test.data, syntax, "```", test.newlineOptional) + if got, want := end, test.wantEnd; got != want { + t.Errorf("got end %v, want %v", got, want) + } + if got, want := marker, test.wantMarker; got != want { + t.Errorf("got marker %q, want %q", got, want) + } + if test.syntaxRequested { + if got, want := *syntax, test.wantSyntax; got != want { + t.Errorf("got syntax %q, want %q", got, want) + } + } + } +} + +func TestJoinLines(t *testing.T) { + input := `# 标题 + +第一 +行文字。 + +第 +二 +行文字。 +` + result := `

标题

+ +

第一行文字。

+ +

第二行文字。

+` + opt := Options{Extensions: commonExtensions | EXTENSION_JOIN_LINES} + renderer := HtmlRenderer(commonHtmlFlags, "", "") + output := MarkdownOptions([]byte(input), renderer, opt) + + if string(output) != result { + t.Error("output dose not match.") + } +} + +func TestSanitizedAnchorName(t *testing.T) { + tests := []struct { + text string + want string + }{ + { + text: "This is a header", + want: "this-is-a-header", + }, + { + text: "This is also a header", + want: "this-is-also-a-header", + }, + { + text: "main.go", + want: "main-go", + }, + { + text: "Article 123", + want: "article-123", + }, + { + text: "<- Let's try this, shall we?", + want: "let-s-try-this-shall-we", + }, + { + text: " ", + want: "", + }, + { + text: "Hello, 世界", + want: "hello-世界", + }, + } + for _, test := range tests { + if got := SanitizedAnchorName(test.text); got != test.want { + t.Errorf("SanitizedAnchorName(%q):\ngot %q\nwant %q", test.text, got, test.want) + } + } +} diff --git a/vendor/github.com/russross/blackfriday/doc.go b/vendor/github.com/russross/blackfriday/doc.go new file mode 100644 index 000000000..9656c42a1 --- /dev/null +++ b/vendor/github.com/russross/blackfriday/doc.go @@ -0,0 +1,32 @@ +// Package blackfriday is a Markdown processor. +// +// It translates plain text with simple formatting rules into HTML or LaTeX. +// +// Sanitized Anchor Names +// +// Blackfriday includes an algorithm for creating sanitized anchor names +// corresponding to a given input text. This algorithm is used to create +// anchors for headings when EXTENSION_AUTO_HEADER_IDS is enabled. The +// algorithm is specified below, so that other packages can create +// compatible anchor names and links to those anchors. +// +// The algorithm iterates over the input text, interpreted as UTF-8, +// one Unicode code point (rune) at a time. All runes that are letters (category L) +// or numbers (category N) are considered valid characters. They are mapped to +// lower case, and included in the output. All other runes are considered +// invalid characters. Invalid characters that preceed the first valid character, +// as well as invalid character that follow the last valid character +// are dropped completely. All other sequences of invalid characters +// between two valid characters are replaced with a single dash character '-'. +// +// SanitizedAnchorName exposes this functionality, and can be used to +// create compatible links to the anchor names generated by blackfriday. +// This algorithm is also implemented in a small standalone package at +// github.com/shurcooL/sanitized_anchor_name. It can be useful for clients +// that want a small package and don't need full functionality of blackfriday. +package blackfriday + +// NOTE: Keep Sanitized Anchor Name algorithm in sync with package +// github.com/shurcooL/sanitized_anchor_name. +// Otherwise, users of sanitized_anchor_name will get anchor names +// that are incompatible with those generated by blackfriday. diff --git a/vendor/github.com/russross/blackfriday/html.go b/vendor/github.com/russross/blackfriday/html.go index 74e67ee82..2f0ad3b1e 100644 --- a/vendor/github.com/russross/blackfriday/html.go +++ b/vendor/github.com/russross/blackfriday/html.go @@ -42,6 +42,7 @@ const ( HTML_SMARTYPANTS_DASHES // enable smart dashes (with HTML_USE_SMARTYPANTS) HTML_SMARTYPANTS_LATEX_DASHES // enable LaTeX-style dashes (with HTML_USE_SMARTYPANTS and HTML_SMARTYPANTS_DASHES) HTML_SMARTYPANTS_ANGLED_QUOTES // enable angled double quotes (with HTML_USE_SMARTYPANTS) for double quotes rendering + HTML_SMARTYPANTS_QUOTES_NBSP // enable "French guillemets" (with HTML_USE_SMARTYPANTS) HTML_FOOTNOTE_RETURN_LINKS // generate a link at the end of a footnote to return to the source ) diff --git a/vendor/github.com/russross/blackfriday/inline.go b/vendor/github.com/russross/blackfriday/inline.go index a28bb660d..4483b8f19 100644 --- a/vendor/github.com/russross/blackfriday/inline.go +++ b/vendor/github.com/russross/blackfriday/inline.go @@ -170,6 +170,10 @@ func lineBreak(p *parser, out *bytes.Buffer, data []byte, offset int) int { precededByBackslash := offset >= 1 && data[offset-1] == '\\' // see http://spec.commonmark.org/0.18/#example-527 precededByBackslash = precededByBackslash && p.flags&EXTENSION_BACKSLASH_LINE_BREAK != 0 + if p.flags&EXTENSION_JOIN_LINES != 0 { + return 1 + } + // should there be a hard line break here? if p.flags&EXTENSION_HARD_LINE_BREAK == 0 && !precededByTwoSpaces && !precededByBackslash { return 0 @@ -240,6 +244,8 @@ func link(p *parser, out *bytes.Buffer, data []byte, offset int) int { i++ } + brace := 0 + // look for the matching closing bracket for level := 1; level > 0 && i < len(data); i++ { switch { @@ -273,8 +279,8 @@ func link(p *parser, out *bytes.Buffer, data []byte, offset int) int { i++ } - // inline style link switch { + // inline style link case i < len(data) && data[i] == '(': // skip initial whitespace i++ @@ -285,14 +291,27 @@ func link(p *parser, out *bytes.Buffer, data []byte, offset int) int { linkB := i - // look for link end: ' " ) + // look for link end: ' " ), check for new opening braces and take this + // into account, this may lead for overshooting and probably will require + // some fine-tuning. findlinkend: for i < len(data) { switch { case data[i] == '\\': i += 2 - case data[i] == ')' || data[i] == '\'' || data[i] == '"': + case data[i] == '(': + brace++ + i++ + + case data[i] == ')': + if brace <= 0 { + break findlinkend + } + brace-- + i++ + + case data[i] == '\'' || data[i] == '"': break findlinkend default: @@ -469,6 +488,7 @@ func link(p *parser, out *bytes.Buffer, data []byte, offset int) int { } p.notes = append(p.notes, ref) + p.notesRecord[string(ref.link)] = struct{}{} link = ref.link title = ref.title @@ -479,9 +499,10 @@ func link(p *parser, out *bytes.Buffer, data []byte, offset int) int { return 0 } - if t == linkDeferredFootnote { + if t == linkDeferredFootnote && !p.isFootnote(lr) { lr.noteId = len(p.notes) + 1 p.notes = append(p.notes, lr) + p.notesRecord[string(lr.link)] = struct{}{} } // keep link and title from reference @@ -560,7 +581,7 @@ func link(p *parser, out *bytes.Buffer, data []byte, offset int) int { return i } -func (p *parser) inlineHtmlComment(out *bytes.Buffer, data []byte) int { +func (p *parser) inlineHTMLComment(out *bytes.Buffer, data []byte) int { if len(data) < 5 { return 0 } @@ -584,7 +605,7 @@ func leftAngle(p *parser, out *bytes.Buffer, data []byte, offset int) int { data = data[offset:] altype := LINK_TYPE_NOT_AUTOLINK end := tagLength(data, &altype) - if size := p.inlineHtmlComment(out, data); size > 0 { + if size := p.inlineHTMLComment(out, data); size > 0 { end = size } if end > 2 { @@ -923,7 +944,7 @@ func isMailtoAutoLink(data []byte) int { nb++ case '-', '.', '_': - break + // Do nothing. case '>': if nb == 1 { diff --git a/vendor/github.com/russross/blackfriday/inline_test.go b/vendor/github.com/russross/blackfriday/inline_test.go index d793e0196..5bae3e97b 100644 --- a/vendor/github.com/russross/blackfriday/inline_test.go +++ b/vendor/github.com/russross/blackfriday/inline_test.go @@ -15,9 +15,8 @@ package blackfriday import ( "regexp" - "testing" - "strings" + "testing" ) func runMarkdownInline(input string, opts Options, htmlFlags int, params HtmlRendererParameters) string { @@ -60,13 +59,11 @@ func doTestsInlineParam(t *testing.T, tests []string, opts Options, htmlFlags in params HtmlRendererParameters) { // catch and report panics var candidate string - /* - defer func() { - if err := recover(); err != nil { - t.Errorf("\npanic while processing [%#v] (%v)\n", candidate, err) - } - }() - */ + defer func() { + if err := recover(); err != nil { + t.Errorf("\npanic while processing [%#v]: %s\n", candidate, err) + } + }() for i := 0; i+1 < len(tests); i += 2 { input := tests[i] @@ -156,10 +153,35 @@ func TestEmphasis(t *testing.T) { "*What is A\\* algorithm?*\n", "

What is A* algorithm?

\n", + + "some para_graph with _emphasised_ text.\n", + "

some para_graph with emphasised text.

\n", + + "some paragraph with _emphasised_ te_xt.\n", + "

some paragraph with emphasised te_xt.

\n", + + "some paragraph with t_wo bi_ts of _emphasised_ text.\n", + "

some paragraph with two bits of emphasised text.

\n", + + "un*frigging*believable\n", + "

unfriggingbelievable

\n", } doTestsInline(t, tests) } +func TestNoIntraEmphasis(t *testing.T) { + tests := []string{ + "some para_graph with _emphasised_ text.\n", + "

some para_graph with emphasised text.

\n", + + "un*frigging*believable\n", + "

un*frigging*believable

\n", + } + doTestsInlineParam(t, tests, Options{ + Extensions: EXTENSION_NO_INTRA_EMPHASIS}, + 0, HtmlRendererParameters{}) +} + func TestReferenceOverride(t *testing.T) { var tests = []string{ "test [ref1][]\n", @@ -541,6 +563,20 @@ func TestInlineLink(t *testing.T) { "[link](<../>)\n", "

link

\n", + + // Issue 116 in blackfriday + "![](http://www.broadgate.co.uk/Content/Upload/DetailImages/Cyclus700(1).jpg)", + "

\"\"

\n", + + // no closing ), autolinking detects the url next + "[disambiguation](http://en.wikipedia.org/wiki/Disambiguation_(disambiguation) is the", + "

[disambiguation](http://en.wikipedia.org/wiki/Disambiguation_(disambiguation) is the

\n", + + "[disambiguation](http://en.wikipedia.org/wiki/Disambiguation_(disambiguation)) is the", + "

disambiguation is the

\n", + + "[disambiguation](http://en.wikipedia.org/wiki/Disambiguation_(disambiguation))", + "

disambiguation

\n", } doLinkTestsInline(t, tests) @@ -681,6 +717,9 @@ func TestReferenceLink(t *testing.T) { "[ref]\n [ref]: ../url/ \"title\"\n", "

ref

\n", + + "[link][ref]\n [ref]: /url/", + "

link

\n", } doLinkTestsInline(t, tests) } @@ -984,6 +1023,28 @@ what happens here +`, + `testing footnotes.[^a] + +test footnotes the second.[^b] + +[^a]: This is the first note[^a]. +[^b]: this is the second note.[^a] +`, + `

testing footnotes.1

+ +

test footnotes the second.2

+
+ +
+ +
    +
  1. This is the first note1. +
  2. +
  3. this is the second note.1 +
  4. +
+
`, } @@ -1037,6 +1098,34 @@ func TestNestedFootnotes(t *testing.T) { +`, + `This uses footnote A.[^A] + +This uses footnote C.[^C] + +[^A]: + A note. use itself.[^A] +[^B]: + B note, uses A to test duplicate.[^A] +[^C]: + C note, uses B.[^B] +`, + `

This uses footnote A.1

+ +

This uses footnote C.2

+
+ +
+ +
    +
  1. A note. use itself.1 +
  2. +
  3. C note, uses B.3 +
  4. +
  5. B note, uses A to test duplicate.1 +
  6. +
+
`, } doTestsInlineParam(t, tests, Options{Extensions: EXTENSION_FOOTNOTES}, 0, @@ -1084,6 +1173,18 @@ func TestSmartDoubleQuotes(t *testing.T) { doTestsInlineParam(t, tests, Options{}, HTML_USE_SMARTYPANTS, HtmlRendererParameters{}) } +func TestSmartDoubleQuotesNbsp(t *testing.T) { + var tests = []string{ + "this should be normal \"quoted\" text.\n", + "

this should be normal “ quoted ” text.

\n", + "this \" single double\n", + "

this “  single double

\n", + "two pair of \"some\" quoted \"text\".\n", + "

two pair of “ some ” quoted “ text ”.

\n"} + + doTestsInlineParam(t, tests, Options{}, HTML_USE_SMARTYPANTS|HTML_SMARTYPANTS_QUOTES_NBSP, HtmlRendererParameters{}) +} + func TestSmartAngledDoubleQuotes(t *testing.T) { var tests = []string{ "this should be angled \"quoted\" text.\n", @@ -1096,6 +1197,18 @@ func TestSmartAngledDoubleQuotes(t *testing.T) { doTestsInlineParam(t, tests, Options{}, HTML_USE_SMARTYPANTS|HTML_SMARTYPANTS_ANGLED_QUOTES, HtmlRendererParameters{}) } +func TestSmartAngledDoubleQuotesNbsp(t *testing.T) { + var tests = []string{ + "this should be angled \"quoted\" text.\n", + "

this should be angled « quoted » text.

\n", + "this \" single double\n", + "

this «  single double

\n", + "two pair of \"some\" quoted \"text\".\n", + "

two pair of « some » quoted « text ».

\n"} + + doTestsInlineParam(t, tests, Options{}, HTML_USE_SMARTYPANTS|HTML_SMARTYPANTS_ANGLED_QUOTES|HTML_SMARTYPANTS_QUOTES_NBSP, HtmlRendererParameters{}) +} + func TestSmartFractions(t *testing.T) { var tests = []string{ "1/2, 1/4 and 3/4; 1/4th and 3/4ths\n", @@ -1151,3 +1264,9 @@ func TestDisableSmartDashes(t *testing.T) { HTML_USE_SMARTYPANTS|HTML_SMARTYPANTS_LATEX_DASHES, HtmlRendererParameters{}) } + +func BenchmarkSmartDoubleQuotes(b *testing.B) { + for i := 0; i < b.N; i++ { + runMarkdownInline("this should be normal \"quoted\" text.\n", Options{}, HTML_USE_SMARTYPANTS, HtmlRendererParameters{}) + } +} diff --git a/vendor/github.com/russross/blackfriday/markdown.go b/vendor/github.com/russross/blackfriday/markdown.go index 746905bf3..1722a7389 100644 --- a/vendor/github.com/russross/blackfriday/markdown.go +++ b/vendor/github.com/russross/blackfriday/markdown.go @@ -13,9 +13,6 @@ // // -// Blackfriday markdown processor. -// -// Translates plain text with simple formatting rules into HTML or LaTeX. package blackfriday import ( @@ -25,7 +22,7 @@ import ( "unicode/utf8" ) -const VERSION = "1.4" +const VERSION = "1.5" // These are the supported markdown parsing extensions. // OR these values together to select multiple extensions. @@ -46,6 +43,7 @@ const ( EXTENSION_AUTO_HEADER_IDS // Create the header ID from the text EXTENSION_BACKSLASH_LINE_BREAK // translate trailing backslashes into line breaks EXTENSION_DEFINITION_LISTS // render definition lists + EXTENSION_JOIN_LINES // delete newline and join lines commonHtmlFlags = 0 | HTML_USE_XHTML | @@ -105,46 +103,46 @@ const ( // blockTags is a set of tags that are recognized as HTML block tags. // Any of these can be included in markdown text without special escaping. var blockTags = map[string]struct{}{ - "blockquote": struct{}{}, - "del": struct{}{}, - "div": struct{}{}, - "dl": struct{}{}, - "fieldset": struct{}{}, - "form": struct{}{}, - "h1": struct{}{}, - "h2": struct{}{}, - "h3": struct{}{}, - "h4": struct{}{}, - "h5": struct{}{}, - "h6": struct{}{}, - "iframe": struct{}{}, - "ins": struct{}{}, - "math": struct{}{}, - "noscript": struct{}{}, - "ol": struct{}{}, - "pre": struct{}{}, - "p": struct{}{}, - "script": struct{}{}, - "style": struct{}{}, - "table": struct{}{}, - "ul": struct{}{}, + "blockquote": {}, + "del": {}, + "div": {}, + "dl": {}, + "fieldset": {}, + "form": {}, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "iframe": {}, + "ins": {}, + "math": {}, + "noscript": {}, + "ol": {}, + "pre": {}, + "p": {}, + "script": {}, + "style": {}, + "table": {}, + "ul": {}, // HTML5 - "address": struct{}{}, - "article": struct{}{}, - "aside": struct{}{}, - "canvas": struct{}{}, - "figcaption": struct{}{}, - "figure": struct{}{}, - "footer": struct{}{}, - "header": struct{}{}, - "hgroup": struct{}{}, - "main": struct{}{}, - "nav": struct{}{}, - "output": struct{}{}, - "progress": struct{}{}, - "section": struct{}{}, - "video": struct{}{}, + "address": {}, + "article": {}, + "aside": {}, + "canvas": {}, + "figcaption": {}, + "figure": {}, + "footer": {}, + "header": {}, + "hgroup": {}, + "main": {}, + "nav": {}, + "output": {}, + "progress": {}, + "section": {}, + "video": {}, } // Renderer is the rendering interface. @@ -220,7 +218,8 @@ type parser struct { // Footnotes need to be ordered as well as available to quickly check for // presence. If a ref is also a footnote, it's stored both in refs and here // in notes. Slice is nil if footnotes not enabled. - notes []*reference + notes []*reference + notesRecord map[string]struct{} } func (p *parser) getRef(refid string) (ref *reference, found bool) { @@ -243,6 +242,11 @@ func (p *parser) getRef(refid string) (ref *reference, found bool) { return ref, found } +func (p *parser) isFootnote(ref *reference) bool { + _, ok := p.notesRecord[string(ref.link)] + return ok +} + // // // Public interface @@ -378,6 +382,7 @@ func MarkdownOptions(input []byte, renderer Renderer, opts Options) []byte { if extensions&EXTENSION_FOOTNOTES != 0 { p.notes = make([]*reference, 0) + p.notesRecord = make(map[string]struct{}) } first := firstPass(p, input) @@ -386,9 +391,9 @@ func MarkdownOptions(input []byte, renderer Renderer, opts Options) []byte { } // first pass: -// - extract references -// - expand tabs // - normalize newlines +// - extract references (outside of fenced code blocks) +// - expand tabs (outside of fenced code blocks) // - copy everything else func firstPass(p *parser, input []byte) []byte { var out bytes.Buffer @@ -396,46 +401,46 @@ func firstPass(p *parser, input []byte) []byte { if p.flags&EXTENSION_TAB_SIZE_EIGHT != 0 { tabSize = TAB_SIZE_EIGHT } - beg, end := 0, 0 + beg := 0 lastFencedCodeBlockEnd := 0 - for beg < len(input) { // iterate over lines - if end = isReference(p, input[beg:], tabSize); end > 0 { - beg += end - } else { // skip to the next line - end = beg - for end < len(input) && input[end] != '\n' && input[end] != '\r' { - end++ - } - - if p.flags&EXTENSION_FENCED_CODE != 0 { - // track fenced code block boundaries to suppress tab expansion - // inside them: - if beg >= lastFencedCodeBlockEnd { - if i := p.fencedCode(&out, input[beg:], false); i > 0 { - lastFencedCodeBlockEnd = beg + i - } - } - } - - // add the line body if present - if end > beg { - if end < lastFencedCodeBlockEnd { // Do not expand tabs while inside fenced code blocks. - out.Write(input[beg:end]) - } else { - expandTabs(&out, input[beg:end], tabSize) - } - } - out.WriteByte('\n') - - if end < len(input) && input[end] == '\r' { - end++ - } - if end < len(input) && input[end] == '\n' { - end++ - } - - beg = end + for beg < len(input) { + // Find end of this line, then process the line. + end := beg + for end < len(input) && input[end] != '\n' && input[end] != '\r' { + end++ } + + if p.flags&EXTENSION_FENCED_CODE != 0 { + // track fenced code block boundaries to suppress tab expansion + // and reference extraction inside them: + if beg >= lastFencedCodeBlockEnd { + if i := p.fencedCodeBlock(&out, input[beg:], false); i > 0 { + lastFencedCodeBlockEnd = beg + i + } + } + } + + // add the line body if present + if end > beg { + if end < lastFencedCodeBlockEnd { // Do not expand tabs while inside fenced code blocks. + out.Write(input[beg:end]) + } else if refEnd := isReference(p, input[beg:], tabSize); refEnd > 0 { + beg += refEnd + continue + } else { + expandTabs(&out, input[beg:end], tabSize) + } + } + + if end < len(input) && input[end] == '\r' { + end++ + } + if end < len(input) && input[end] == '\n' { + end++ + } + out.WriteByte('\n') + + beg = end } // empty input? @@ -635,12 +640,12 @@ func scanLinkRef(p *parser, data []byte, i int) (linkOffset, linkEnd, titleOffse i++ } linkOffset = i - for i < len(data) && data[i] != ' ' && data[i] != '\t' && data[i] != '\n' && data[i] != '\r' { - i++ - } if i == len(data) { return } + for i < len(data) && data[i] != ' ' && data[i] != '\t' && data[i] != '\n' && data[i] != '\r' { + i++ + } linkEnd = i if data[linkOffset] == '<' && data[linkEnd-1] == '>' { linkOffset++ diff --git a/vendor/github.com/russross/blackfriday/markdown_test.go b/vendor/github.com/russross/blackfriday/markdown_test.go new file mode 100644 index 000000000..d897644a4 --- /dev/null +++ b/vendor/github.com/russross/blackfriday/markdown_test.go @@ -0,0 +1,75 @@ +// +// Blackfriday Markdown Processor +// Available at http://github.com/russross/blackfriday +// +// Copyright © 2011 Russ Ross . +// Distributed under the Simplified BSD License. +// See README.md for details. +// + +// +// Unit tests for full document parsing and rendering +// + +package blackfriday + +import ( + "testing" +) + +func runMarkdown(input string) string { + return string(MarkdownCommon([]byte(input))) +} + +func doTests(t *testing.T, tests []string) { + // catch and report panics + var candidate string + defer func() { + if err := recover(); err != nil { + t.Errorf("\npanic while processing [%#v]: %s\n", candidate, err) + } + }() + + for i := 0; i+1 < len(tests); i += 2 { + input := tests[i] + candidate = input + expected := tests[i+1] + actual := runMarkdown(candidate) + if actual != expected { + t.Errorf("\nInput [%#v]\nExpected[%#v]\nActual [%#v]", + candidate, expected, actual) + } + + // now test every substring to stress test bounds checking + if !testing.Short() { + for start := 0; start < len(input); start++ { + for end := start + 1; end <= len(input); end++ { + candidate = input[start:end] + _ = runMarkdown(candidate) + } + } + } + } +} + +func TestDocument(t *testing.T) { + var tests = []string{ + // Empty document. + "", + "", + + " ", + "", + + // This shouldn't panic. + // https://github.com/russross/blackfriday/issues/172 + "[]:<", + "

[]:<

\n", + + // This shouldn't panic. + // https://github.com/russross/blackfriday/issues/173 + " [", + "

[

\n", + } + doTests(t, tests) +} diff --git a/vendor/github.com/russross/blackfriday/ref_test.go b/vendor/github.com/russross/blackfriday/ref_test.go index 770439cfd..733a63abe 100644 --- a/vendor/github.com/russross/blackfriday/ref_test.go +++ b/vendor/github.com/russross/blackfriday/ref_test.go @@ -29,7 +29,7 @@ func doTestsReference(t *testing.T, files []string, flag int) { var candidate string defer func() { if err := recover(); err != nil { - t.Errorf("\npanic while processing [%#v]\n", candidate) + t.Errorf("\npanic while processing [%#v]: %s\n", candidate, err) } }() diff --git a/vendor/github.com/russross/blackfriday/smartypants.go b/vendor/github.com/russross/blackfriday/smartypants.go index eeffa5e1e..f25bd07d9 100644 --- a/vendor/github.com/russross/blackfriday/smartypants.go +++ b/vendor/github.com/russross/blackfriday/smartypants.go @@ -39,7 +39,7 @@ func isdigit(c byte) bool { return c >= '0' && c <= '9' } -func smartQuoteHelper(out *bytes.Buffer, previousChar byte, nextChar byte, quote byte, isOpen *bool) bool { +func smartQuoteHelper(out *bytes.Buffer, previousChar byte, nextChar byte, quote byte, isOpen *bool, addNBSP bool) bool { // edge of the buffer is likely to be a tag that we don't get to see, // so we treat it like text sometimes @@ -96,6 +96,12 @@ func smartQuoteHelper(out *bytes.Buffer, previousChar byte, nextChar byte, quote *isOpen = false } + // Note that with the limited lookahead, this non-breaking + // space will also be appended to single double quotes. + if addNBSP && !*isOpen { + out.WriteString(" ") + } + out.WriteByte('&') if *isOpen { out.WriteByte('l') @@ -104,6 +110,11 @@ func smartQuoteHelper(out *bytes.Buffer, previousChar byte, nextChar byte, quote } out.WriteByte(quote) out.WriteString("quo;") + + if addNBSP && *isOpen { + out.WriteString(" ") + } + return true } @@ -116,7 +127,7 @@ func smartSingleQuote(out *bytes.Buffer, smrt *smartypantsData, previousChar byt if len(text) >= 3 { nextChar = text[2] } - if smartQuoteHelper(out, previousChar, nextChar, 'd', &smrt.inDoubleQuote) { + if smartQuoteHelper(out, previousChar, nextChar, 'd', &smrt.inDoubleQuote, false) { return 1 } } @@ -141,7 +152,7 @@ func smartSingleQuote(out *bytes.Buffer, smrt *smartypantsData, previousChar byt if len(text) > 1 { nextChar = text[1] } - if smartQuoteHelper(out, previousChar, nextChar, 's', &smrt.inSingleQuote) { + if smartQuoteHelper(out, previousChar, nextChar, 's', &smrt.inSingleQuote, false) { return 0 } @@ -205,13 +216,13 @@ func smartDashLatex(out *bytes.Buffer, smrt *smartypantsData, previousChar byte, return 0 } -func smartAmpVariant(out *bytes.Buffer, smrt *smartypantsData, previousChar byte, text []byte, quote byte) int { +func smartAmpVariant(out *bytes.Buffer, smrt *smartypantsData, previousChar byte, text []byte, quote byte, addNBSP bool) int { if bytes.HasPrefix(text, []byte(""")) { nextChar := byte(0) if len(text) >= 7 { nextChar = text[6] } - if smartQuoteHelper(out, previousChar, nextChar, quote, &smrt.inDoubleQuote) { + if smartQuoteHelper(out, previousChar, nextChar, quote, &smrt.inDoubleQuote, addNBSP) { return 5 } } @@ -224,12 +235,15 @@ func smartAmpVariant(out *bytes.Buffer, smrt *smartypantsData, previousChar byte return 0 } -func smartAmp(out *bytes.Buffer, smrt *smartypantsData, previousChar byte, text []byte) int { - return smartAmpVariant(out, smrt, previousChar, text, 'd') -} +func smartAmp(angledQuotes, addNBSP bool) func(out *bytes.Buffer, smrt *smartypantsData, previousChar byte, text []byte) int { + var quote byte = 'd' + if angledQuotes { + quote = 'a' + } -func smartAmpAngledQuote(out *bytes.Buffer, smrt *smartypantsData, previousChar byte, text []byte) int { - return smartAmpVariant(out, smrt, previousChar, text, 'a') + return func(out *bytes.Buffer, smrt *smartypantsData, previousChar byte, text []byte) int { + return smartAmpVariant(out, smrt, previousChar, text, quote, addNBSP) + } } func smartPeriod(out *bytes.Buffer, smrt *smartypantsData, previousChar byte, text []byte) int { @@ -253,7 +267,7 @@ func smartBacktick(out *bytes.Buffer, smrt *smartypantsData, previousChar byte, if len(text) >= 3 { nextChar = text[2] } - if smartQuoteHelper(out, previousChar, nextChar, 'd', &smrt.inDoubleQuote) { + if smartQuoteHelper(out, previousChar, nextChar, 'd', &smrt.inDoubleQuote, false) { return 1 } } @@ -337,7 +351,7 @@ func smartDoubleQuoteVariant(out *bytes.Buffer, smrt *smartypantsData, previousC if len(text) > 1 { nextChar = text[1] } - if !smartQuoteHelper(out, previousChar, nextChar, quote, &smrt.inDoubleQuote) { + if !smartQuoteHelper(out, previousChar, nextChar, quote, &smrt.inDoubleQuote, false) { out.WriteString(""") } @@ -367,14 +381,30 @@ type smartCallback func(out *bytes.Buffer, smrt *smartypantsData, previousChar b type smartypantsRenderer [256]smartCallback +var ( + smartAmpAngled = smartAmp(true, false) + smartAmpAngledNBSP = smartAmp(true, true) + smartAmpRegular = smartAmp(false, false) + smartAmpRegularNBSP = smartAmp(false, true) +) + func smartypants(flags int) *smartypantsRenderer { r := new(smartypantsRenderer) + addNBSP := flags&HTML_SMARTYPANTS_QUOTES_NBSP != 0 if flags&HTML_SMARTYPANTS_ANGLED_QUOTES == 0 { r['"'] = smartDoubleQuote - r['&'] = smartAmp + if !addNBSP { + r['&'] = smartAmpRegular + } else { + r['&'] = smartAmpRegularNBSP + } } else { r['"'] = smartAngledDoubleQuote - r['&'] = smartAmpAngledQuote + if !addNBSP { + r['&'] = smartAmpAngled + } else { + r['&'] = smartAmpAngledNBSP + } } r['\''] = smartSingleQuote r['('] = smartParens diff --git a/vendor/github.com/shurcooL/sanitized_anchor_name/README.md b/vendor/github.com/shurcooL/sanitized_anchor_name/README.md deleted file mode 100644 index 670bf0fe6..000000000 --- a/vendor/github.com/shurcooL/sanitized_anchor_name/README.md +++ /dev/null @@ -1,36 +0,0 @@ -sanitized_anchor_name -===================== - -[![Build Status](https://travis-ci.org/shurcooL/sanitized_anchor_name.svg?branch=master)](https://travis-ci.org/shurcooL/sanitized_anchor_name) [![GoDoc](https://godoc.org/github.com/shurcooL/sanitized_anchor_name?status.svg)](https://godoc.org/github.com/shurcooL/sanitized_anchor_name) - -Package sanitized_anchor_name provides a func to create sanitized anchor names. - -Its logic can be reused by multiple packages to create interoperable anchor names -and links to those anchors. - -At this time, it does not try to ensure that generated anchor names -are unique, that responsibility falls on the caller. - -Installation ------------- - -```bash -go get -u github.com/shurcooL/sanitized_anchor_name -``` - -Example -------- - -```Go -anchorName := sanitized_anchor_name.Create("This is a header") - -fmt.Println(anchorName) - -// Output: -// this-is-a-header -``` - -License -------- - -- [MIT License](LICENSE) diff --git a/vendor/github.com/shurcooL/sanitized_anchor_name/main.go b/vendor/github.com/shurcooL/sanitized_anchor_name/main.go deleted file mode 100644 index 72a875350..000000000 --- a/vendor/github.com/shurcooL/sanitized_anchor_name/main.go +++ /dev/null @@ -1,29 +0,0 @@ -// Package sanitized_anchor_name provides a func to create sanitized anchor names. -// -// Its logic can be reused by multiple packages to create interoperable anchor names -// and links to those anchors. -// -// At this time, it does not try to ensure that generated anchor names -// are unique, that responsibility falls on the caller. -package sanitized_anchor_name // import "github.com/shurcooL/sanitized_anchor_name" - -import "unicode" - -// Create returns a sanitized anchor name for the given text. -func Create(text string) string { - var anchorName []rune - var futureDash = false - for _, r := range []rune(text) { - switch { - case unicode.IsLetter(r) || unicode.IsNumber(r): - if futureDash && len(anchorName) > 0 { - anchorName = append(anchorName, '-') - } - futureDash = false - anchorName = append(anchorName, unicode.ToLower(r)) - default: - futureDash = true - } - } - return string(anchorName) -} diff --git a/vendor/github.com/shurcooL/sanitized_anchor_name/main_test.go b/vendor/github.com/shurcooL/sanitized_anchor_name/main_test.go deleted file mode 100644 index 7ce323b94..000000000 --- a/vendor/github.com/shurcooL/sanitized_anchor_name/main_test.go +++ /dev/null @@ -1,35 +0,0 @@ -package sanitized_anchor_name_test - -import ( - "fmt" - - "github.com/shurcooL/sanitized_anchor_name" -) - -func ExampleCreate() { - anchorName := sanitized_anchor_name.Create("This is a header") - - fmt.Println(anchorName) - - // Output: - // this-is-a-header -} - -func ExampleCreate_two() { - fmt.Println(sanitized_anchor_name.Create("This is a header")) - fmt.Println(sanitized_anchor_name.Create("This is also a header")) - fmt.Println(sanitized_anchor_name.Create("main.go")) - fmt.Println(sanitized_anchor_name.Create("Article 123")) - fmt.Println(sanitized_anchor_name.Create("<- Let's try this, shall we?")) - fmt.Printf("%q\n", sanitized_anchor_name.Create(" ")) - fmt.Println(sanitized_anchor_name.Create("Hello, 世界")) - - // Output: - // this-is-a-header - // this-is-also-a-header - // main-go - // article-123 - // let-s-try-this-shall-we - // "" - // hello-世界 -} diff --git a/vendor/github.com/sirupsen/logrus/.gitignore b/vendor/github.com/sirupsen/logrus/.gitignore new file mode 100644 index 000000000..66be63a00 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/.gitignore @@ -0,0 +1 @@ +logrus diff --git a/vendor/github.com/sirupsen/logrus/.travis.yml b/vendor/github.com/sirupsen/logrus/.travis.yml new file mode 100644 index 000000000..a23296a53 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/.travis.yml @@ -0,0 +1,15 @@ +language: go +go: + - 1.6.x + - 1.7.x + - 1.8.x + - tip +env: + - GOMAXPROCS=4 GORACE=halt_on_error=1 +install: + - go get github.com/stretchr/testify/assert + - go get gopkg.in/gemnasium/logrus-airbrake-hook.v2 + - go get golang.org/x/sys/unix + - go get golang.org/x/sys/windows +script: + - go test -race -v ./... diff --git a/vendor/github.com/sirupsen/logrus/CHANGELOG.md b/vendor/github.com/sirupsen/logrus/CHANGELOG.md new file mode 100644 index 000000000..8236d8b6e --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/CHANGELOG.md @@ -0,0 +1,113 @@ +# 1.0.3 + +* Replace example files with testable examples + +# 1.0.2 + +* bug: quote non-string values in text formatter (#583) +* Make (*Logger) SetLevel a public method + +# 1.0.1 + +* bug: fix escaping in text formatter (#575) + +# 1.0.0 + +* Officially changed name to lower-case +* bug: colors on Windows 10 (#541) +* bug: fix race in accessing level (#512) + +# 0.11.5 + +* feature: add writer and writerlevel to entry (#372) + +# 0.11.4 + +* bug: fix undefined variable on solaris (#493) + +# 0.11.3 + +* formatter: configure quoting of empty values (#484) +* formatter: configure quoting character (default is `"`) (#484) +* bug: fix not importing io correctly in non-linux environments (#481) + +# 0.11.2 + +* bug: fix windows terminal detection (#476) + +# 0.11.1 + +* bug: fix tty detection with custom out (#471) + +# 0.11.0 + +* performance: Use bufferpool to allocate (#370) +* terminal: terminal detection for app-engine (#343) +* feature: exit handler (#375) + +# 0.10.0 + +* feature: Add a test hook (#180) +* feature: `ParseLevel` is now case-insensitive (#326) +* feature: `FieldLogger` interface that generalizes `Logger` and `Entry` (#308) +* performance: avoid re-allocations on `WithFields` (#335) + +# 0.9.0 + +* logrus/text_formatter: don't emit empty msg +* logrus/hooks/airbrake: move out of main repository +* logrus/hooks/sentry: move out of main repository +* logrus/hooks/papertrail: move out of main repository +* logrus/hooks/bugsnag: move out of main repository +* logrus/core: run tests with `-race` +* logrus/core: detect TTY based on `stderr` +* logrus/core: support `WithError` on logger +* logrus/core: Solaris support + +# 0.8.7 + +* logrus/core: fix possible race (#216) +* logrus/doc: small typo fixes and doc improvements + + +# 0.8.6 + +* hooks/raven: allow passing an initialized client + +# 0.8.5 + +* logrus/core: revert #208 + +# 0.8.4 + +* formatter/text: fix data race (#218) + +# 0.8.3 + +* logrus/core: fix entry log level (#208) +* logrus/core: improve performance of text formatter by 40% +* logrus/core: expose `LevelHooks` type +* logrus/core: add support for DragonflyBSD and NetBSD +* formatter/text: print structs more verbosely + +# 0.8.2 + +* logrus: fix more Fatal family functions + +# 0.8.1 + +* logrus: fix not exiting on `Fatalf` and `Fatalln` + +# 0.8.0 + +* logrus: defaults to stderr instead of stdout +* hooks/sentry: add special field for `*http.Request` +* formatter/text: ignore Windows for colors + +# 0.7.3 + +* formatter/\*: allow configuration of timestamp layout + +# 0.7.2 + +* formatter/text: Add configuration option for time format (#158) diff --git a/vendor/github.com/shurcooL/sanitized_anchor_name/LICENSE b/vendor/github.com/sirupsen/logrus/LICENSE similarity index 86% rename from vendor/github.com/shurcooL/sanitized_anchor_name/LICENSE rename to vendor/github.com/sirupsen/logrus/LICENSE index c35c17af9..f090cb42f 100644 --- a/vendor/github.com/shurcooL/sanitized_anchor_name/LICENSE +++ b/vendor/github.com/sirupsen/logrus/LICENSE @@ -1,6 +1,6 @@ -MIT License +The MIT License (MIT) -Copyright (c) 2015 Dmitri Shuralyov +Copyright (c) 2014 Simon Eskildsen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/sirupsen/logrus/README.md b/vendor/github.com/sirupsen/logrus/README.md new file mode 100644 index 000000000..4f5ce576d --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/README.md @@ -0,0 +1,505 @@ +# Logrus :walrus: [![Build Status](https://travis-ci.org/sirupsen/logrus.svg?branch=master)](https://travis-ci.org/sirupsen/logrus) [![GoDoc](https://godoc.org/github.com/sirupsen/logrus?status.svg)](https://godoc.org/github.com/sirupsen/logrus) + +Logrus is a structured logger for Go (golang), completely API compatible with +the standard library logger. + +**Seeing weird case-sensitive problems?** It's in the past been possible to +import Logrus as both upper- and lower-case. Due to the Go package environment, +this caused issues in the community and we needed a standard. Some environments +experienced problems with the upper-case variant, so the lower-case was decided. +Everything using `logrus` will need to use the lower-case: +`github.com/sirupsen/logrus`. Any package that isn't, should be changed. + +To fix Glide, see [these +comments](https://github.com/sirupsen/logrus/issues/553#issuecomment-306591437). +For an in-depth explanation of the casing issue, see [this +comment](https://github.com/sirupsen/logrus/issues/570#issuecomment-313933276). + +**Are you interested in assisting in maintaining Logrus?** Currently I have a +lot of obligations, and I am unable to provide Logrus with the maintainership it +needs. If you'd like to help, please reach out to me at `simon at author's +username dot com`. + +Nicely color-coded in development (when a TTY is attached, otherwise just +plain text): + +![Colored](http://i.imgur.com/PY7qMwd.png) + +With `log.SetFormatter(&log.JSONFormatter{})`, for easy parsing by logstash +or Splunk: + +```json +{"animal":"walrus","level":"info","msg":"A group of walrus emerges from the +ocean","size":10,"time":"2014-03-10 19:57:38.562264131 -0400 EDT"} + +{"level":"warning","msg":"The group's number increased tremendously!", +"number":122,"omg":true,"time":"2014-03-10 19:57:38.562471297 -0400 EDT"} + +{"animal":"walrus","level":"info","msg":"A giant walrus appears!", +"size":10,"time":"2014-03-10 19:57:38.562500591 -0400 EDT"} + +{"animal":"walrus","level":"info","msg":"Tremendously sized cow enters the ocean.", +"size":9,"time":"2014-03-10 19:57:38.562527896 -0400 EDT"} + +{"level":"fatal","msg":"The ice breaks!","number":100,"omg":true, +"time":"2014-03-10 19:57:38.562543128 -0400 EDT"} +``` + +With the default `log.SetFormatter(&log.TextFormatter{})` when a TTY is not +attached, the output is compatible with the +[logfmt](http://godoc.org/github.com/kr/logfmt) format: + +```text +time="2015-03-26T01:27:38-04:00" level=debug msg="Started observing beach" animal=walrus number=8 +time="2015-03-26T01:27:38-04:00" level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10 +time="2015-03-26T01:27:38-04:00" level=warning msg="The group's number increased tremendously!" number=122 omg=true +time="2015-03-26T01:27:38-04:00" level=debug msg="Temperature changes" temperature=-4 +time="2015-03-26T01:27:38-04:00" level=panic msg="It's over 9000!" animal=orca size=9009 +time="2015-03-26T01:27:38-04:00" level=fatal msg="The ice breaks!" err=&{0x2082280c0 map[animal:orca size:9009] 2015-03-26 01:27:38.441574009 -0400 EDT panic It's over 9000!} number=100 omg=true +exit status 1 +``` + +#### Case-sensitivity + +The organization's name was changed to lower-case--and this will not be changed +back. If you are getting import conflicts due to case sensitivity, please use +the lower-case import: `github.com/sirupsen/logrus`. + +#### Example + +The simplest way to use Logrus is simply the package-level exported logger: + +```go +package main + +import ( + log "github.com/sirupsen/logrus" +) + +func main() { + log.WithFields(log.Fields{ + "animal": "walrus", + }).Info("A walrus appears") +} +``` + +Note that it's completely api-compatible with the stdlib logger, so you can +replace your `log` imports everywhere with `log "github.com/sirupsen/logrus"` +and you'll now have the flexibility of Logrus. You can customize it all you +want: + +```go +package main + +import ( + "os" + log "github.com/sirupsen/logrus" +) + +func init() { + // Log as JSON instead of the default ASCII formatter. + log.SetFormatter(&log.JSONFormatter{}) + + // Output to stdout instead of the default stderr + // Can be any io.Writer, see below for File example + log.SetOutput(os.Stdout) + + // Only log the warning severity or above. + log.SetLevel(log.WarnLevel) +} + +func main() { + log.WithFields(log.Fields{ + "animal": "walrus", + "size": 10, + }).Info("A group of walrus emerges from the ocean") + + log.WithFields(log.Fields{ + "omg": true, + "number": 122, + }).Warn("The group's number increased tremendously!") + + log.WithFields(log.Fields{ + "omg": true, + "number": 100, + }).Fatal("The ice breaks!") + + // A common pattern is to re-use fields between logging statements by re-using + // the logrus.Entry returned from WithFields() + contextLogger := log.WithFields(log.Fields{ + "common": "this is a common field", + "other": "I also should be logged always", + }) + + contextLogger.Info("I'll be logged with common and other field") + contextLogger.Info("Me too") +} +``` + +For more advanced usage such as logging to multiple locations from the same +application, you can also create an instance of the `logrus` Logger: + +```go +package main + +import ( + "os" + "github.com/sirupsen/logrus" +) + +// Create a new instance of the logger. You can have any number of instances. +var log = logrus.New() + +func main() { + // The API for setting attributes is a little different than the package level + // exported logger. See Godoc. + log.Out = os.Stdout + + // You could set this to any `io.Writer` such as a file + // file, err := os.OpenFile("logrus.log", os.O_CREATE|os.O_WRONLY, 0666) + // if err == nil { + // log.Out = file + // } else { + // log.Info("Failed to log to file, using default stderr") + // } + + log.WithFields(logrus.Fields{ + "animal": "walrus", + "size": 10, + }).Info("A group of walrus emerges from the ocean") +} +``` + +#### Fields + +Logrus encourages careful, structured logging through logging fields instead of +long, unparseable error messages. For example, instead of: `log.Fatalf("Failed +to send event %s to topic %s with key %d")`, you should log the much more +discoverable: + +```go +log.WithFields(log.Fields{ + "event": event, + "topic": topic, + "key": key, +}).Fatal("Failed to send event") +``` + +We've found this API forces you to think about logging in a way that produces +much more useful logging messages. We've been in countless situations where just +a single added field to a log statement that was already there would've saved us +hours. The `WithFields` call is optional. + +In general, with Logrus using any of the `printf`-family functions should be +seen as a hint you should add a field, however, you can still use the +`printf`-family functions with Logrus. + +#### Default Fields + +Often it's helpful to have fields _always_ attached to log statements in an +application or parts of one. For example, you may want to always log the +`request_id` and `user_ip` in the context of a request. Instead of writing +`log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip})` on +every line, you can create a `logrus.Entry` to pass around instead: + +```go +requestLogger := log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip}) +requestLogger.Info("something happened on that request") # will log request_id and user_ip +requestLogger.Warn("something not great happened") +``` + +#### Hooks + +You can add hooks for logging levels. For example to send errors to an exception +tracking service on `Error`, `Fatal` and `Panic`, info to StatsD or log to +multiple places simultaneously, e.g. syslog. + +Logrus comes with [built-in hooks](hooks/). Add those, or your custom hook, in +`init`: + +```go +import ( + log "github.com/sirupsen/logrus" + "gopkg.in/gemnasium/logrus-airbrake-hook.v2" // the package is named "aibrake" + logrus_syslog "github.com/sirupsen/logrus/hooks/syslog" + "log/syslog" +) + +func init() { + + // Use the Airbrake hook to report errors that have Error severity or above to + // an exception tracker. You can create custom hooks, see the Hooks section. + log.AddHook(airbrake.NewHook(123, "xyz", "production")) + + hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") + if err != nil { + log.Error("Unable to connect to local syslog daemon") + } else { + log.AddHook(hook) + } +} +``` +Note: Syslog hook also support connecting to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). For the detail, please check the [syslog hook README](hooks/syslog/README.md). + +| Hook | Description | +| ----- | ----------- | +| [Airbrake "legacy"](https://github.com/gemnasium/logrus-airbrake-legacy-hook) | Send errors to an exception tracking service compatible with the Airbrake API V2. Uses [`airbrake-go`](https://github.com/tobi/airbrake-go) behind the scenes. | +| [Airbrake](https://github.com/gemnasium/logrus-airbrake-hook) | Send errors to the Airbrake API V3. Uses the official [`gobrake`](https://github.com/airbrake/gobrake) behind the scenes. | +| [Amazon Kinesis](https://github.com/evalphobia/logrus_kinesis) | Hook for logging to [Amazon Kinesis](https://aws.amazon.com/kinesis/) | +| [Amqp-Hook](https://github.com/vladoatanasov/logrus_amqp) | Hook for logging to Amqp broker (Like RabbitMQ) | +| [Bugsnag](https://github.com/Shopify/logrus-bugsnag/blob/master/bugsnag.go) | Send errors to the Bugsnag exception tracking service. | +| [DeferPanic](https://github.com/deferpanic/dp-logrus) | Hook for logging to DeferPanic | +| [Discordrus](https://github.com/kz/discordrus) | Hook for logging to [Discord](https://discordapp.com/) | +| [ElasticSearch](https://github.com/sohlich/elogrus) | Hook for logging to ElasticSearch| +| [Firehose](https://github.com/beaubrewer/logrus_firehose) | Hook for logging to [Amazon Firehose](https://aws.amazon.com/kinesis/firehose/) +| [Fluentd](https://github.com/evalphobia/logrus_fluent) | Hook for logging to fluentd | +| [Go-Slack](https://github.com/multiplay/go-slack) | Hook for logging to [Slack](https://slack.com) | +| [Graylog](https://github.com/gemnasium/logrus-graylog-hook) | Hook for logging to [Graylog](http://graylog2.org/) | +| [Hiprus](https://github.com/nubo/hiprus) | Send errors to a channel in hipchat. | +| [Honeybadger](https://github.com/agonzalezro/logrus_honeybadger) | Hook for sending exceptions to Honeybadger | +| [InfluxDB](https://github.com/Abramovic/logrus_influxdb) | Hook for logging to influxdb | +| [Influxus](http://github.com/vlad-doru/influxus) | Hook for concurrently logging to [InfluxDB](http://influxdata.com/) | +| [Journalhook](https://github.com/wercker/journalhook) | Hook for logging to `systemd-journald` | +| [KafkaLogrus](https://github.com/goibibo/KafkaLogrus) | Hook for logging to kafka | +| [LFShook](https://github.com/rifflock/lfshook) | Hook for logging to the local filesystem | +| [Logentries](https://github.com/jcftang/logentriesrus) | Hook for logging to [Logentries](https://logentries.com/) | +| [Logentrus](https://github.com/puddingfactory/logentrus) | Hook for logging to [Logentries](https://logentries.com/) | +| [Logmatic.io](https://github.com/logmatic/logmatic-go) | Hook for logging to [Logmatic.io](http://logmatic.io/) | +| [Logrusly](https://github.com/sebest/logrusly) | Send logs to [Loggly](https://www.loggly.com/) | +| [Logstash](https://github.com/bshuster-repo/logrus-logstash-hook) | Hook for logging to [Logstash](https://www.elastic.co/products/logstash) | +| [Mail](https://github.com/zbindenren/logrus_mail) | Hook for sending exceptions via mail | +| [Mattermost](https://github.com/shuLhan/mattermost-integration/tree/master/hooks/logrus) | Hook for logging to [Mattermost](https://mattermost.com/) | +| [Mongodb](https://github.com/weekface/mgorus) | Hook for logging to mongodb | +| [NATS-Hook](https://github.com/rybit/nats_logrus_hook) | Hook for logging to [NATS](https://nats.io) | +| [Octokit](https://github.com/dorajistyle/logrus-octokit-hook) | Hook for logging to github via octokit | +| [Papertrail](https://github.com/polds/logrus-papertrail-hook) | Send errors to the [Papertrail](https://papertrailapp.com) hosted logging service via UDP. | +| [PostgreSQL](https://github.com/gemnasium/logrus-postgresql-hook) | Send logs to [PostgreSQL](http://postgresql.org) | +| [Pushover](https://github.com/toorop/logrus_pushover) | Send error via [Pushover](https://pushover.net) | +| [Raygun](https://github.com/squirkle/logrus-raygun-hook) | Hook for logging to [Raygun.io](http://raygun.io/) | +| [Redis-Hook](https://github.com/rogierlommers/logrus-redis-hook) | Hook for logging to a ELK stack (through Redis) | +| [Rollrus](https://github.com/heroku/rollrus) | Hook for sending errors to rollbar | +| [Scribe](https://github.com/sagar8192/logrus-scribe-hook) | Hook for logging to [Scribe](https://github.com/facebookarchive/scribe)| +| [Sentry](https://github.com/evalphobia/logrus_sentry) | Send errors to the Sentry error logging and aggregation service. | +| [Slackrus](https://github.com/johntdyer/slackrus) | Hook for Slack chat. | +| [Stackdriver](https://github.com/knq/sdhook) | Hook for logging to [Google Stackdriver](https://cloud.google.com/logging/) | +| [Sumorus](https://github.com/doublefree/sumorus) | Hook for logging to [SumoLogic](https://www.sumologic.com/)| +| [Syslog](https://github.com/sirupsen/logrus/blob/master/hooks/syslog/syslog.go) | Send errors to remote syslog server. Uses standard library `log/syslog` behind the scenes. | +| [Syslog TLS](https://github.com/shinji62/logrus-syslog-ng) | Send errors to remote syslog server with TLS support. | +| [TraceView](https://github.com/evalphobia/logrus_appneta) | Hook for logging to [AppNeta TraceView](https://www.appneta.com/products/traceview/) | +| [Typetalk](https://github.com/dragon3/logrus-typetalk-hook) | Hook for logging to [Typetalk](https://www.typetalk.in/) | +| [logz.io](https://github.com/ripcurld00d/logrus-logzio-hook) | Hook for logging to [logz.io](https://logz.io), a Log as a Service using Logstash | +| [SQS-Hook](https://github.com/tsarpaul/logrus_sqs) | Hook for logging to [Amazon Simple Queue Service (SQS)](https://aws.amazon.com/sqs/) | + +#### Level logging + +Logrus has six logging levels: Debug, Info, Warning, Error, Fatal and Panic. + +```go +log.Debug("Useful debugging information.") +log.Info("Something noteworthy happened!") +log.Warn("You should probably take a look at this.") +log.Error("Something failed but I'm not quitting.") +// Calls os.Exit(1) after logging +log.Fatal("Bye.") +// Calls panic() after logging +log.Panic("I'm bailing.") +``` + +You can set the logging level on a `Logger`, then it will only log entries with +that severity or anything above it: + +```go +// Will log anything that is info or above (warn, error, fatal, panic). Default. +log.SetLevel(log.InfoLevel) +``` + +It may be useful to set `log.Level = logrus.DebugLevel` in a debug or verbose +environment if your application has that. + +#### Entries + +Besides the fields added with `WithField` or `WithFields` some fields are +automatically added to all logging events: + +1. `time`. The timestamp when the entry was created. +2. `msg`. The logging message passed to `{Info,Warn,Error,Fatal,Panic}` after + the `AddFields` call. E.g. `Failed to send event.` +3. `level`. The logging level. E.g. `info`. + +#### Environments + +Logrus has no notion of environment. + +If you wish for hooks and formatters to only be used in specific environments, +you should handle that yourself. For example, if your application has a global +variable `Environment`, which is a string representation of the environment you +could do: + +```go +import ( + log "github.com/sirupsen/logrus" +) + +init() { + // do something here to set environment depending on an environment variable + // or command-line flag + if Environment == "production" { + log.SetFormatter(&log.JSONFormatter{}) + } else { + // The TextFormatter is default, you don't actually have to do this. + log.SetFormatter(&log.TextFormatter{}) + } +} +``` + +This configuration is how `logrus` was intended to be used, but JSON in +production is mostly only useful if you do log aggregation with tools like +Splunk or Logstash. + +#### Formatters + +The built-in logging formatters are: + +* `logrus.TextFormatter`. Logs the event in colors if stdout is a tty, otherwise + without colors. + * *Note:* to force colored output when there is no TTY, set the `ForceColors` + field to `true`. To force no colored output even if there is a TTY set the + `DisableColors` field to `true`. For Windows, see + [github.com/mattn/go-colorable](https://github.com/mattn/go-colorable). + * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#TextFormatter). +* `logrus.JSONFormatter`. Logs fields as JSON. + * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#JSONFormatter). + +Third party logging formatters: + +* [`FluentdFormatter`](https://github.com/joonix/log). Formats entries that can by parsed by Kubernetes and Google Container Engine. +* [`logstash`](https://github.com/bshuster-repo/logrus-logstash-hook). Logs fields as [Logstash](http://logstash.net) Events. +* [`prefixed`](https://github.com/x-cray/logrus-prefixed-formatter). Displays log entry source along with alternative layout. +* [`zalgo`](https://github.com/aybabtme/logzalgo). Invoking the P͉̫o̳̼̊w̖͈̰͎e̬͔̭͂r͚̼̹̲ ̫͓͉̳͈ō̠͕͖̚f̝͍̠ ͕̲̞͖͑Z̖̫̤̫ͪa͉̬͈̗l͖͎g̳̥o̰̥̅!̣͔̲̻͊̄ ̙̘̦̹̦. + +You can define your formatter by implementing the `Formatter` interface, +requiring a `Format` method. `Format` takes an `*Entry`. `entry.Data` is a +`Fields` type (`map[string]interface{}`) with all your fields as well as the +default ones (see Entries section above): + +```go +type MyJSONFormatter struct { +} + +log.SetFormatter(new(MyJSONFormatter)) + +func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) { + // Note this doesn't include Time, Level and Message which are available on + // the Entry. Consult `godoc` on information about those fields or read the + // source of the official loggers. + serialized, err := json.Marshal(entry.Data) + if err != nil { + return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) + } + return append(serialized, '\n'), nil +} +``` + +#### Logger as an `io.Writer` + +Logrus can be transformed into an `io.Writer`. That writer is the end of an `io.Pipe` and it is your responsibility to close it. + +```go +w := logger.Writer() +defer w.Close() + +srv := http.Server{ + // create a stdlib log.Logger that writes to + // logrus.Logger. + ErrorLog: log.New(w, "", 0), +} +``` + +Each line written to that writer will be printed the usual way, using formatters +and hooks. The level for those entries is `info`. + +This means that we can override the standard library logger easily: + +```go +logger := logrus.New() +logger.Formatter = &logrus.JSONFormatter{} + +// Use logrus for standard log output +// Note that `log` here references stdlib's log +// Not logrus imported under the name `log`. +log.SetOutput(logger.Writer()) +``` + +#### Rotation + +Log rotation is not provided with Logrus. Log rotation should be done by an +external program (like `logrotate(8)`) that can compress and delete old log +entries. It should not be a feature of the application-level logger. + +#### Tools + +| Tool | Description | +| ---- | ----------- | +|[Logrus Mate](https://github.com/gogap/logrus_mate)|Logrus mate is a tool for Logrus to manage loggers, you can initial logger's level, hook and formatter by config file, the logger will generated with different config at different environment.| +|[Logrus Viper Helper](https://github.com/heirko/go-contrib/tree/master/logrusHelper)|An Helper around Logrus to wrap with spf13/Viper to load configuration with fangs! And to simplify Logrus configuration use some behavior of [Logrus Mate](https://github.com/gogap/logrus_mate). [sample](https://github.com/heirko/iris-contrib/blob/master/middleware/logrus-logger/example) | + +#### Testing + +Logrus has a built in facility for asserting the presence of log messages. This is implemented through the `test` hook and provides: + +* decorators for existing logger (`test.NewLocal` and `test.NewGlobal`) which basically just add the `test` hook +* a test logger (`test.NewNullLogger`) that just records log messages (and does not output any): + +```go +import( + "github.com/sirupsen/logrus" + "github.com/sirupsen/logrus/hooks/test" + "github.com/stretchr/testify/assert" + "testing" +) + +func TestSomething(t*testing.T){ + logger, hook := test.NewNullLogger() + logger.Error("Helloerror") + + assert.Equal(t, 1, len(hook.Entries)) + assert.Equal(t, logrus.ErrorLevel, hook.LastEntry().Level) + assert.Equal(t, "Helloerror", hook.LastEntry().Message) + + hook.Reset() + assert.Nil(t, hook.LastEntry()) +} +``` + +#### Fatal handlers + +Logrus can register one or more functions that will be called when any `fatal` +level message is logged. The registered handlers will be executed before +logrus performs a `os.Exit(1)`. This behavior may be helpful if callers need +to gracefully shutdown. Unlike a `panic("Something went wrong...")` call which can be intercepted with a deferred `recover` a call to `os.Exit(1)` can not be intercepted. + +``` +... +handler := func() { + // gracefully shutdown something... +} +logrus.RegisterExitHandler(handler) +... +``` + +#### Thread safety + +By default Logger is protected by mutex for concurrent writes, this mutex is invoked when calling hooks and writing logs. +If you are sure such locking is not needed, you can call logger.SetNoLock() to disable the locking. + +Situation when locking is not needed includes: + +* You have no hooks registered, or hooks calling is already thread-safe. + +* Writing to logger.Out is already thread-safe, for example: + + 1) logger.Out is protected by locks. + + 2) logger.Out is a os.File handler opened with `O_APPEND` flag, and every write is smaller than 4k. (This allow multi-thread/multi-process writing) + + (Refer to http://www.notthewizard.com/2014/06/17/are-files-appends-really-atomic/) diff --git a/vendor/github.com/sirupsen/logrus/alt_exit.go b/vendor/github.com/sirupsen/logrus/alt_exit.go new file mode 100644 index 000000000..8af90637a --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/alt_exit.go @@ -0,0 +1,64 @@ +package logrus + +// The following code was sourced and modified from the +// https://github.com/tebeka/atexit package governed by the following license: +// +// Copyright (c) 2012 Miki Tebeka . +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// the Software, and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +import ( + "fmt" + "os" +) + +var handlers = []func(){} + +func runHandler(handler func()) { + defer func() { + if err := recover(); err != nil { + fmt.Fprintln(os.Stderr, "Error: Logrus exit handler error:", err) + } + }() + + handler() +} + +func runHandlers() { + for _, handler := range handlers { + runHandler(handler) + } +} + +// Exit runs all the Logrus atexit handlers and then terminates the program using os.Exit(code) +func Exit(code int) { + runHandlers() + os.Exit(code) +} + +// RegisterExitHandler adds a Logrus Exit handler, call logrus.Exit to invoke +// all handlers. The handlers will also be invoked when any Fatal log entry is +// made. +// +// This method is useful when a caller wishes to use logrus to log a fatal +// message but also needs to gracefully shutdown. An example usecase could be +// closing database connections, or sending a alert that the application is +// closing. +func RegisterExitHandler(handler func()) { + handlers = append(handlers, handler) +} diff --git a/vendor/github.com/sirupsen/logrus/alt_exit_test.go b/vendor/github.com/sirupsen/logrus/alt_exit_test.go new file mode 100644 index 000000000..a08b1a898 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/alt_exit_test.go @@ -0,0 +1,83 @@ +package logrus + +import ( + "io/ioutil" + "log" + "os" + "os/exec" + "path/filepath" + "testing" + "time" +) + +func TestRegister(t *testing.T) { + current := len(handlers) + RegisterExitHandler(func() {}) + if len(handlers) != current+1 { + t.Fatalf("expected %d handlers, got %d", current+1, len(handlers)) + } +} + +func TestHandler(t *testing.T) { + tempDir, err := ioutil.TempDir("", "test_handler") + if err != nil { + log.Fatalf("can't create temp dir. %q", err) + } + defer os.RemoveAll(tempDir) + + gofile := filepath.Join(tempDir, "gofile.go") + if err := ioutil.WriteFile(gofile, testprog, 0666); err != nil { + t.Fatalf("can't create go file. %q", err) + } + + outfile := filepath.Join(tempDir, "outfile.out") + arg := time.Now().UTC().String() + err = exec.Command("go", "run", gofile, outfile, arg).Run() + if err == nil { + t.Fatalf("completed normally, should have failed") + } + + data, err := ioutil.ReadFile(outfile) + if err != nil { + t.Fatalf("can't read output file %s. %q", outfile, err) + } + + if string(data) != arg { + t.Fatalf("bad data. Expected %q, got %q", data, arg) + } +} + +var testprog = []byte(` +// Test program for atexit, gets output file and data as arguments and writes +// data to output file in atexit handler. +package main + +import ( + "github.com/sirupsen/logrus" + "flag" + "fmt" + "io/ioutil" +) + +var outfile = "" +var data = "" + +func handler() { + ioutil.WriteFile(outfile, []byte(data), 0666) +} + +func badHandler() { + n := 0 + fmt.Println(1/n) +} + +func main() { + flag.Parse() + outfile = flag.Arg(0) + data = flag.Arg(1) + + logrus.RegisterExitHandler(handler) + logrus.RegisterExitHandler(badHandler) + logrus.Fatal("Bye bye") +} +`) diff --git a/vendor/github.com/sirupsen/logrus/appveyor.yml b/vendor/github.com/sirupsen/logrus/appveyor.yml new file mode 100644 index 000000000..96c2ce15f --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/appveyor.yml @@ -0,0 +1,14 @@ +version: "{build}" +platform: x64 +clone_folder: c:\gopath\src\github.com\sirupsen\logrus +environment: + GOPATH: c:\gopath +branches: + only: + - master +install: + - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% + - go version +build_script: + - go get -t + - go test diff --git a/vendor/github.com/sirupsen/logrus/doc.go b/vendor/github.com/sirupsen/logrus/doc.go new file mode 100644 index 000000000..da67aba06 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/doc.go @@ -0,0 +1,26 @@ +/* +Package logrus is a structured logger for Go, completely API compatible with the standard library logger. + + +The simplest way to use Logrus is simply the package-level exported logger: + + package main + + import ( + log "github.com/sirupsen/logrus" + ) + + func main() { + log.WithFields(log.Fields{ + "animal": "walrus", + "number": 1, + "size": 10, + }).Info("A walrus appears") + } + +Output: + time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 + +For a full guide visit https://github.com/sirupsen/logrus +*/ +package logrus diff --git a/vendor/github.com/sirupsen/logrus/entry.go b/vendor/github.com/sirupsen/logrus/entry.go new file mode 100644 index 000000000..5bf582ef2 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/entry.go @@ -0,0 +1,276 @@ +package logrus + +import ( + "bytes" + "fmt" + "os" + "sync" + "time" +) + +var bufferPool *sync.Pool + +func init() { + bufferPool = &sync.Pool{ + New: func() interface{} { + return new(bytes.Buffer) + }, + } +} + +// Defines the key when adding errors using WithError. +var ErrorKey = "error" + +// An entry is the final or intermediate Logrus logging entry. It contains all +// the fields passed with WithField{,s}. It's finally logged when Debug, Info, +// Warn, Error, Fatal or Panic is called on it. These objects can be reused and +// passed around as much as you wish to avoid field duplication. +type Entry struct { + Logger *Logger + + // Contains all the fields set by the user. + Data Fields + + // Time at which the log entry was created + Time time.Time + + // Level the log entry was logged at: Debug, Info, Warn, Error, Fatal or Panic + // This field will be set on entry firing and the value will be equal to the one in Logger struct field. + Level Level + + // Message passed to Debug, Info, Warn, Error, Fatal or Panic + Message string + + // When formatter is called in entry.log(), an Buffer may be set to entry + Buffer *bytes.Buffer +} + +func NewEntry(logger *Logger) *Entry { + return &Entry{ + Logger: logger, + // Default is three fields, give a little extra room + Data: make(Fields, 5), + } +} + +// Returns the string representation from the reader and ultimately the +// formatter. +func (entry *Entry) String() (string, error) { + serialized, err := entry.Logger.Formatter.Format(entry) + if err != nil { + return "", err + } + str := string(serialized) + return str, nil +} + +// Add an error as single field (using the key defined in ErrorKey) to the Entry. +func (entry *Entry) WithError(err error) *Entry { + return entry.WithField(ErrorKey, err) +} + +// Add a single field to the Entry. +func (entry *Entry) WithField(key string, value interface{}) *Entry { + return entry.WithFields(Fields{key: value}) +} + +// Add a map of fields to the Entry. +func (entry *Entry) WithFields(fields Fields) *Entry { + data := make(Fields, len(entry.Data)+len(fields)) + for k, v := range entry.Data { + data[k] = v + } + for k, v := range fields { + data[k] = v + } + return &Entry{Logger: entry.Logger, Data: data} +} + +// This function is not declared with a pointer value because otherwise +// race conditions will occur when using multiple goroutines +func (entry Entry) log(level Level, msg string) { + var buffer *bytes.Buffer + entry.Time = time.Now() + entry.Level = level + entry.Message = msg + + if err := entry.Logger.Hooks.Fire(level, &entry); err != nil { + entry.Logger.mu.Lock() + fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err) + entry.Logger.mu.Unlock() + } + buffer = bufferPool.Get().(*bytes.Buffer) + buffer.Reset() + defer bufferPool.Put(buffer) + entry.Buffer = buffer + serialized, err := entry.Logger.Formatter.Format(&entry) + entry.Buffer = nil + if err != nil { + entry.Logger.mu.Lock() + fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err) + entry.Logger.mu.Unlock() + } else { + entry.Logger.mu.Lock() + _, err = entry.Logger.Out.Write(serialized) + if err != nil { + fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err) + } + entry.Logger.mu.Unlock() + } + + // To avoid Entry#log() returning a value that only would make sense for + // panic() to use in Entry#Panic(), we avoid the allocation by checking + // directly here. + if level <= PanicLevel { + panic(&entry) + } +} + +func (entry *Entry) Debug(args ...interface{}) { + if entry.Logger.level() >= DebugLevel { + entry.log(DebugLevel, fmt.Sprint(args...)) + } +} + +func (entry *Entry) Print(args ...interface{}) { + entry.Info(args...) +} + +func (entry *Entry) Info(args ...interface{}) { + if entry.Logger.level() >= InfoLevel { + entry.log(InfoLevel, fmt.Sprint(args...)) + } +} + +func (entry *Entry) Warn(args ...interface{}) { + if entry.Logger.level() >= WarnLevel { + entry.log(WarnLevel, fmt.Sprint(args...)) + } +} + +func (entry *Entry) Warning(args ...interface{}) { + entry.Warn(args...) +} + +func (entry *Entry) Error(args ...interface{}) { + if entry.Logger.level() >= ErrorLevel { + entry.log(ErrorLevel, fmt.Sprint(args...)) + } +} + +func (entry *Entry) Fatal(args ...interface{}) { + if entry.Logger.level() >= FatalLevel { + entry.log(FatalLevel, fmt.Sprint(args...)) + } + Exit(1) +} + +func (entry *Entry) Panic(args ...interface{}) { + if entry.Logger.level() >= PanicLevel { + entry.log(PanicLevel, fmt.Sprint(args...)) + } + panic(fmt.Sprint(args...)) +} + +// Entry Printf family functions + +func (entry *Entry) Debugf(format string, args ...interface{}) { + if entry.Logger.level() >= DebugLevel { + entry.Debug(fmt.Sprintf(format, args...)) + } +} + +func (entry *Entry) Infof(format string, args ...interface{}) { + if entry.Logger.level() >= InfoLevel { + entry.Info(fmt.Sprintf(format, args...)) + } +} + +func (entry *Entry) Printf(format string, args ...interface{}) { + entry.Infof(format, args...) +} + +func (entry *Entry) Warnf(format string, args ...interface{}) { + if entry.Logger.level() >= WarnLevel { + entry.Warn(fmt.Sprintf(format, args...)) + } +} + +func (entry *Entry) Warningf(format string, args ...interface{}) { + entry.Warnf(format, args...) +} + +func (entry *Entry) Errorf(format string, args ...interface{}) { + if entry.Logger.level() >= ErrorLevel { + entry.Error(fmt.Sprintf(format, args...)) + } +} + +func (entry *Entry) Fatalf(format string, args ...interface{}) { + if entry.Logger.level() >= FatalLevel { + entry.Fatal(fmt.Sprintf(format, args...)) + } + Exit(1) +} + +func (entry *Entry) Panicf(format string, args ...interface{}) { + if entry.Logger.level() >= PanicLevel { + entry.Panic(fmt.Sprintf(format, args...)) + } +} + +// Entry Println family functions + +func (entry *Entry) Debugln(args ...interface{}) { + if entry.Logger.level() >= DebugLevel { + entry.Debug(entry.sprintlnn(args...)) + } +} + +func (entry *Entry) Infoln(args ...interface{}) { + if entry.Logger.level() >= InfoLevel { + entry.Info(entry.sprintlnn(args...)) + } +} + +func (entry *Entry) Println(args ...interface{}) { + entry.Infoln(args...) +} + +func (entry *Entry) Warnln(args ...interface{}) { + if entry.Logger.level() >= WarnLevel { + entry.Warn(entry.sprintlnn(args...)) + } +} + +func (entry *Entry) Warningln(args ...interface{}) { + entry.Warnln(args...) +} + +func (entry *Entry) Errorln(args ...interface{}) { + if entry.Logger.level() >= ErrorLevel { + entry.Error(entry.sprintlnn(args...)) + } +} + +func (entry *Entry) Fatalln(args ...interface{}) { + if entry.Logger.level() >= FatalLevel { + entry.Fatal(entry.sprintlnn(args...)) + } + Exit(1) +} + +func (entry *Entry) Panicln(args ...interface{}) { + if entry.Logger.level() >= PanicLevel { + entry.Panic(entry.sprintlnn(args...)) + } +} + +// Sprintlnn => Sprint no newline. This is to get the behavior of how +// fmt.Sprintln where spaces are always added between operands, regardless of +// their type. Instead of vendoring the Sprintln implementation to spare a +// string allocation, we do the simplest thing. +func (entry *Entry) sprintlnn(args ...interface{}) string { + msg := fmt.Sprintln(args...) + return msg[:len(msg)-1] +} diff --git a/vendor/github.com/sirupsen/logrus/entry_test.go b/vendor/github.com/sirupsen/logrus/entry_test.go new file mode 100644 index 000000000..99c3b41d5 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/entry_test.go @@ -0,0 +1,77 @@ +package logrus + +import ( + "bytes" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestEntryWithError(t *testing.T) { + + assert := assert.New(t) + + defer func() { + ErrorKey = "error" + }() + + err := fmt.Errorf("kaboom at layer %d", 4711) + + assert.Equal(err, WithError(err).Data["error"]) + + logger := New() + logger.Out = &bytes.Buffer{} + entry := NewEntry(logger) + + assert.Equal(err, entry.WithError(err).Data["error"]) + + ErrorKey = "err" + + assert.Equal(err, entry.WithError(err).Data["err"]) + +} + +func TestEntryPanicln(t *testing.T) { + errBoom := fmt.Errorf("boom time") + + defer func() { + p := recover() + assert.NotNil(t, p) + + switch pVal := p.(type) { + case *Entry: + assert.Equal(t, "kaboom", pVal.Message) + assert.Equal(t, errBoom, pVal.Data["err"]) + default: + t.Fatalf("want type *Entry, got %T: %#v", pVal, pVal) + } + }() + + logger := New() + logger.Out = &bytes.Buffer{} + entry := NewEntry(logger) + entry.WithField("err", errBoom).Panicln("kaboom") +} + +func TestEntryPanicf(t *testing.T) { + errBoom := fmt.Errorf("boom again") + + defer func() { + p := recover() + assert.NotNil(t, p) + + switch pVal := p.(type) { + case *Entry: + assert.Equal(t, "kaboom true", pVal.Message) + assert.Equal(t, errBoom, pVal.Data["err"]) + default: + t.Fatalf("want type *Entry, got %T: %#v", pVal, pVal) + } + }() + + logger := New() + logger.Out = &bytes.Buffer{} + entry := NewEntry(logger) + entry.WithField("err", errBoom).Panicf("kaboom %v", true) +} diff --git a/vendor/github.com/sirupsen/logrus/example_basic_test.go b/vendor/github.com/sirupsen/logrus/example_basic_test.go new file mode 100644 index 000000000..a2acf550c --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/example_basic_test.go @@ -0,0 +1,69 @@ +package logrus_test + +import ( + "github.com/sirupsen/logrus" + "os" +) + +func Example_basic() { + var log = logrus.New() + log.Formatter = new(logrus.JSONFormatter) + log.Formatter = new(logrus.TextFormatter) //default + log.Formatter.(*logrus.TextFormatter).DisableTimestamp = true // remove timestamp from test output + log.Level = logrus.DebugLevel + log.Out = os.Stdout + + // file, err := os.OpenFile("logrus.log", os.O_CREATE|os.O_WRONLY, 0666) + // if err == nil { + // log.Out = file + // } else { + // log.Info("Failed to log to file, using default stderr") + // } + + defer func() { + err := recover() + if err != nil { + entry := err.(*logrus.Entry) + log.WithFields(logrus.Fields{ + "omg": true, + "err_animal": entry.Data["animal"], + "err_size": entry.Data["size"], + "err_level": entry.Level, + "err_message": entry.Message, + "number": 100, + }).Error("The ice breaks!") // or use Fatal() to force the process to exit with a nonzero code + } + }() + + log.WithFields(logrus.Fields{ + "animal": "walrus", + "number": 8, + }).Debug("Started observing beach") + + log.WithFields(logrus.Fields{ + "animal": "walrus", + "size": 10, + }).Info("A group of walrus emerges from the ocean") + + log.WithFields(logrus.Fields{ + "omg": true, + "number": 122, + }).Warn("The group's number increased tremendously!") + + log.WithFields(logrus.Fields{ + "temperature": -4, + }).Debug("Temperature changes") + + log.WithFields(logrus.Fields{ + "animal": "orca", + "size": 9009, + }).Panic("It's over 9000!") + + // Output: + // level=debug msg="Started observing beach" animal=walrus number=8 + // level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10 + // level=warning msg="The group's number increased tremendously!" number=122 omg=true + // level=debug msg="Temperature changes" temperature=-4 + // level=panic msg="It's over 9000!" animal=orca size=9009 + // level=error msg="The ice breaks!" err_animal=orca err_level=panic err_message="It's over 9000!" err_size=9009 number=100 omg=true +} diff --git a/vendor/github.com/sirupsen/logrus/example_hook_test.go b/vendor/github.com/sirupsen/logrus/example_hook_test.go new file mode 100644 index 000000000..d4ddffca3 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/example_hook_test.go @@ -0,0 +1,35 @@ +package logrus_test + +import ( + "github.com/sirupsen/logrus" + "gopkg.in/gemnasium/logrus-airbrake-hook.v2" + "os" +) + +func Example_hook() { + var log = logrus.New() + log.Formatter = new(logrus.TextFormatter) // default + log.Formatter.(*logrus.TextFormatter).DisableTimestamp = true // remove timestamp from test output + log.Hooks.Add(airbrake.NewHook(123, "xyz", "development")) + log.Out = os.Stdout + + log.WithFields(logrus.Fields{ + "animal": "walrus", + "size": 10, + }).Info("A group of walrus emerges from the ocean") + + log.WithFields(logrus.Fields{ + "omg": true, + "number": 122, + }).Warn("The group's number increased tremendously!") + + log.WithFields(logrus.Fields{ + "omg": true, + "number": 100, + }).Error("The ice breaks!") + + // Output: + // level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10 + // level=warning msg="The group's number increased tremendously!" number=122 omg=true + // level=error msg="The ice breaks!" number=100 omg=true +} diff --git a/vendor/github.com/sirupsen/logrus/exported.go b/vendor/github.com/sirupsen/logrus/exported.go new file mode 100644 index 000000000..013183eda --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/exported.go @@ -0,0 +1,193 @@ +package logrus + +import ( + "io" +) + +var ( + // std is the name of the standard logger in stdlib `log` + std = New() +) + +func StandardLogger() *Logger { + return std +} + +// SetOutput sets the standard logger output. +func SetOutput(out io.Writer) { + std.mu.Lock() + defer std.mu.Unlock() + std.Out = out +} + +// SetFormatter sets the standard logger formatter. +func SetFormatter(formatter Formatter) { + std.mu.Lock() + defer std.mu.Unlock() + std.Formatter = formatter +} + +// SetLevel sets the standard logger level. +func SetLevel(level Level) { + std.mu.Lock() + defer std.mu.Unlock() + std.SetLevel(level) +} + +// GetLevel returns the standard logger level. +func GetLevel() Level { + std.mu.Lock() + defer std.mu.Unlock() + return std.level() +} + +// AddHook adds a hook to the standard logger hooks. +func AddHook(hook Hook) { + std.mu.Lock() + defer std.mu.Unlock() + std.Hooks.Add(hook) +} + +// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key. +func WithError(err error) *Entry { + return std.WithField(ErrorKey, err) +} + +// WithField creates an entry from the standard logger and adds a field to +// it. If you want multiple fields, use `WithFields`. +// +// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal +// or Panic on the Entry it returns. +func WithField(key string, value interface{}) *Entry { + return std.WithField(key, value) +} + +// WithFields creates an entry from the standard logger and adds multiple +// fields to it. This is simply a helper for `WithField`, invoking it +// once for each field. +// +// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal +// or Panic on the Entry it returns. +func WithFields(fields Fields) *Entry { + return std.WithFields(fields) +} + +// Debug logs a message at level Debug on the standard logger. +func Debug(args ...interface{}) { + std.Debug(args...) +} + +// Print logs a message at level Info on the standard logger. +func Print(args ...interface{}) { + std.Print(args...) +} + +// Info logs a message at level Info on the standard logger. +func Info(args ...interface{}) { + std.Info(args...) +} + +// Warn logs a message at level Warn on the standard logger. +func Warn(args ...interface{}) { + std.Warn(args...) +} + +// Warning logs a message at level Warn on the standard logger. +func Warning(args ...interface{}) { + std.Warning(args...) +} + +// Error logs a message at level Error on the standard logger. +func Error(args ...interface{}) { + std.Error(args...) +} + +// Panic logs a message at level Panic on the standard logger. +func Panic(args ...interface{}) { + std.Panic(args...) +} + +// Fatal logs a message at level Fatal on the standard logger. +func Fatal(args ...interface{}) { + std.Fatal(args...) +} + +// Debugf logs a message at level Debug on the standard logger. +func Debugf(format string, args ...interface{}) { + std.Debugf(format, args...) +} + +// Printf logs a message at level Info on the standard logger. +func Printf(format string, args ...interface{}) { + std.Printf(format, args...) +} + +// Infof logs a message at level Info on the standard logger. +func Infof(format string, args ...interface{}) { + std.Infof(format, args...) +} + +// Warnf logs a message at level Warn on the standard logger. +func Warnf(format string, args ...interface{}) { + std.Warnf(format, args...) +} + +// Warningf logs a message at level Warn on the standard logger. +func Warningf(format string, args ...interface{}) { + std.Warningf(format, args...) +} + +// Errorf logs a message at level Error on the standard logger. +func Errorf(format string, args ...interface{}) { + std.Errorf(format, args...) +} + +// Panicf logs a message at level Panic on the standard logger. +func Panicf(format string, args ...interface{}) { + std.Panicf(format, args...) +} + +// Fatalf logs a message at level Fatal on the standard logger. +func Fatalf(format string, args ...interface{}) { + std.Fatalf(format, args...) +} + +// Debugln logs a message at level Debug on the standard logger. +func Debugln(args ...interface{}) { + std.Debugln(args...) +} + +// Println logs a message at level Info on the standard logger. +func Println(args ...interface{}) { + std.Println(args...) +} + +// Infoln logs a message at level Info on the standard logger. +func Infoln(args ...interface{}) { + std.Infoln(args...) +} + +// Warnln logs a message at level Warn on the standard logger. +func Warnln(args ...interface{}) { + std.Warnln(args...) +} + +// Warningln logs a message at level Warn on the standard logger. +func Warningln(args ...interface{}) { + std.Warningln(args...) +} + +// Errorln logs a message at level Error on the standard logger. +func Errorln(args ...interface{}) { + std.Errorln(args...) +} + +// Panicln logs a message at level Panic on the standard logger. +func Panicln(args ...interface{}) { + std.Panicln(args...) +} + +// Fatalln logs a message at level Fatal on the standard logger. +func Fatalln(args ...interface{}) { + std.Fatalln(args...) +} diff --git a/vendor/github.com/sirupsen/logrus/formatter.go b/vendor/github.com/sirupsen/logrus/formatter.go new file mode 100644 index 000000000..b183ff5b1 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/formatter.go @@ -0,0 +1,45 @@ +package logrus + +import "time" + +const defaultTimestampFormat = time.RFC3339 + +// The Formatter interface is used to implement a custom Formatter. It takes an +// `Entry`. It exposes all the fields, including the default ones: +// +// * `entry.Data["msg"]`. The message passed from Info, Warn, Error .. +// * `entry.Data["time"]`. The timestamp. +// * `entry.Data["level"]. The level the entry was logged at. +// +// Any additional fields added with `WithField` or `WithFields` are also in +// `entry.Data`. Format is expected to return an array of bytes which are then +// logged to `logger.Out`. +type Formatter interface { + Format(*Entry) ([]byte, error) +} + +// This is to not silently overwrite `time`, `msg` and `level` fields when +// dumping it. If this code wasn't there doing: +// +// logrus.WithField("level", 1).Info("hello") +// +// Would just silently drop the user provided level. Instead with this code +// it'll logged as: +// +// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."} +// +// It's not exported because it's still using Data in an opinionated way. It's to +// avoid code duplication between the two default formatters. +func prefixFieldClashes(data Fields) { + if t, ok := data["time"]; ok { + data["fields.time"] = t + } + + if m, ok := data["msg"]; ok { + data["fields.msg"] = m + } + + if l, ok := data["level"]; ok { + data["fields.level"] = l + } +} diff --git a/vendor/github.com/sirupsen/logrus/formatter_bench_test.go b/vendor/github.com/sirupsen/logrus/formatter_bench_test.go new file mode 100644 index 000000000..d9481589f --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/formatter_bench_test.go @@ -0,0 +1,101 @@ +package logrus + +import ( + "fmt" + "testing" + "time" +) + +// smallFields is a small size data set for benchmarking +var smallFields = Fields{ + "foo": "bar", + "baz": "qux", + "one": "two", + "three": "four", +} + +// largeFields is a large size data set for benchmarking +var largeFields = Fields{ + "foo": "bar", + "baz": "qux", + "one": "two", + "three": "four", + "five": "six", + "seven": "eight", + "nine": "ten", + "eleven": "twelve", + "thirteen": "fourteen", + "fifteen": "sixteen", + "seventeen": "eighteen", + "nineteen": "twenty", + "a": "b", + "c": "d", + "e": "f", + "g": "h", + "i": "j", + "k": "l", + "m": "n", + "o": "p", + "q": "r", + "s": "t", + "u": "v", + "w": "x", + "y": "z", + "this": "will", + "make": "thirty", + "entries": "yeah", +} + +var errorFields = Fields{ + "foo": fmt.Errorf("bar"), + "baz": fmt.Errorf("qux"), +} + +func BenchmarkErrorTextFormatter(b *testing.B) { + doBenchmark(b, &TextFormatter{DisableColors: true}, errorFields) +} + +func BenchmarkSmallTextFormatter(b *testing.B) { + doBenchmark(b, &TextFormatter{DisableColors: true}, smallFields) +} + +func BenchmarkLargeTextFormatter(b *testing.B) { + doBenchmark(b, &TextFormatter{DisableColors: true}, largeFields) +} + +func BenchmarkSmallColoredTextFormatter(b *testing.B) { + doBenchmark(b, &TextFormatter{ForceColors: true}, smallFields) +} + +func BenchmarkLargeColoredTextFormatter(b *testing.B) { + doBenchmark(b, &TextFormatter{ForceColors: true}, largeFields) +} + +func BenchmarkSmallJSONFormatter(b *testing.B) { + doBenchmark(b, &JSONFormatter{}, smallFields) +} + +func BenchmarkLargeJSONFormatter(b *testing.B) { + doBenchmark(b, &JSONFormatter{}, largeFields) +} + +func doBenchmark(b *testing.B, formatter Formatter, fields Fields) { + logger := New() + + entry := &Entry{ + Time: time.Time{}, + Level: InfoLevel, + Message: "message", + Data: fields, + Logger: logger, + } + var d []byte + var err error + for i := 0; i < b.N; i++ { + d, err = formatter.Format(entry) + if err != nil { + b.Fatal(err) + } + b.SetBytes(int64(len(d))) + } +} diff --git a/vendor/github.com/sirupsen/logrus/hook_test.go b/vendor/github.com/sirupsen/logrus/hook_test.go new file mode 100644 index 000000000..13f34cb6f --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/hook_test.go @@ -0,0 +1,122 @@ +package logrus + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +type TestHook struct { + Fired bool +} + +func (hook *TestHook) Fire(entry *Entry) error { + hook.Fired = true + return nil +} + +func (hook *TestHook) Levels() []Level { + return []Level{ + DebugLevel, + InfoLevel, + WarnLevel, + ErrorLevel, + FatalLevel, + PanicLevel, + } +} + +func TestHookFires(t *testing.T) { + hook := new(TestHook) + + LogAndAssertJSON(t, func(log *Logger) { + log.Hooks.Add(hook) + assert.Equal(t, hook.Fired, false) + + log.Print("test") + }, func(fields Fields) { + assert.Equal(t, hook.Fired, true) + }) +} + +type ModifyHook struct { +} + +func (hook *ModifyHook) Fire(entry *Entry) error { + entry.Data["wow"] = "whale" + return nil +} + +func (hook *ModifyHook) Levels() []Level { + return []Level{ + DebugLevel, + InfoLevel, + WarnLevel, + ErrorLevel, + FatalLevel, + PanicLevel, + } +} + +func TestHookCanModifyEntry(t *testing.T) { + hook := new(ModifyHook) + + LogAndAssertJSON(t, func(log *Logger) { + log.Hooks.Add(hook) + log.WithField("wow", "elephant").Print("test") + }, func(fields Fields) { + assert.Equal(t, fields["wow"], "whale") + }) +} + +func TestCanFireMultipleHooks(t *testing.T) { + hook1 := new(ModifyHook) + hook2 := new(TestHook) + + LogAndAssertJSON(t, func(log *Logger) { + log.Hooks.Add(hook1) + log.Hooks.Add(hook2) + + log.WithField("wow", "elephant").Print("test") + }, func(fields Fields) { + assert.Equal(t, fields["wow"], "whale") + assert.Equal(t, hook2.Fired, true) + }) +} + +type ErrorHook struct { + Fired bool +} + +func (hook *ErrorHook) Fire(entry *Entry) error { + hook.Fired = true + return nil +} + +func (hook *ErrorHook) Levels() []Level { + return []Level{ + ErrorLevel, + } +} + +func TestErrorHookShouldntFireOnInfo(t *testing.T) { + hook := new(ErrorHook) + + LogAndAssertJSON(t, func(log *Logger) { + log.Hooks.Add(hook) + log.Info("test") + }, func(fields Fields) { + assert.Equal(t, hook.Fired, false) + }) +} + +func TestErrorHookShouldFireOnError(t *testing.T) { + hook := new(ErrorHook) + + LogAndAssertJSON(t, func(log *Logger) { + log.Hooks.Add(hook) + log.Error("test") + }, func(fields Fields) { + assert.Equal(t, hook.Fired, true) + }) +} diff --git a/vendor/github.com/sirupsen/logrus/hooks.go b/vendor/github.com/sirupsen/logrus/hooks.go new file mode 100644 index 000000000..3f151cdc3 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/hooks.go @@ -0,0 +1,34 @@ +package logrus + +// A hook to be fired when logging on the logging levels returned from +// `Levels()` on your implementation of the interface. Note that this is not +// fired in a goroutine or a channel with workers, you should handle such +// functionality yourself if your call is non-blocking and you don't wish for +// the logging calls for levels returned from `Levels()` to block. +type Hook interface { + Levels() []Level + Fire(*Entry) error +} + +// Internal type for storing the hooks on a logger instance. +type LevelHooks map[Level][]Hook + +// Add a hook to an instance of logger. This is called with +// `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface. +func (hooks LevelHooks) Add(hook Hook) { + for _, level := range hook.Levels() { + hooks[level] = append(hooks[level], hook) + } +} + +// Fire all the hooks for the passed level. Used by `entry.log` to fire +// appropriate hooks for a log entry. +func (hooks LevelHooks) Fire(level Level, entry *Entry) error { + for _, hook := range hooks[level] { + if err := hook.Fire(entry); err != nil { + return err + } + } + + return nil +} diff --git a/vendor/github.com/sirupsen/logrus/hooks/syslog/README.md b/vendor/github.com/sirupsen/logrus/hooks/syslog/README.md new file mode 100644 index 000000000..1bbc0f72d --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/hooks/syslog/README.md @@ -0,0 +1,39 @@ +# Syslog Hooks for Logrus :walrus: + +## Usage + +```go +import ( + "log/syslog" + "github.com/sirupsen/logrus" + lSyslog "github.com/sirupsen/logrus/hooks/syslog" +) + +func main() { + log := logrus.New() + hook, err := lSyslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") + + if err == nil { + log.Hooks.Add(hook) + } +} +``` + +If you want to connect to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). Just assign empty string to the first two parameters of `NewSyslogHook`. It should look like the following. + +```go +import ( + "log/syslog" + "github.com/sirupsen/logrus" + lSyslog "github.com/sirupsen/logrus/hooks/syslog" +) + +func main() { + log := logrus.New() + hook, err := lSyslog.NewSyslogHook("", "", syslog.LOG_INFO, "") + + if err == nil { + log.Hooks.Add(hook) + } +} +``` diff --git a/vendor/github.com/sirupsen/logrus/hooks/syslog/syslog.go b/vendor/github.com/sirupsen/logrus/hooks/syslog/syslog.go new file mode 100644 index 000000000..329ce0d60 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/hooks/syslog/syslog.go @@ -0,0 +1,55 @@ +// +build !windows,!nacl,!plan9 + +package syslog + +import ( + "fmt" + "log/syslog" + "os" + + "github.com/sirupsen/logrus" +) + +// SyslogHook to send logs via syslog. +type SyslogHook struct { + Writer *syslog.Writer + SyslogNetwork string + SyslogRaddr string +} + +// Creates a hook to be added to an instance of logger. This is called with +// `hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_DEBUG, "")` +// `if err == nil { log.Hooks.Add(hook) }` +func NewSyslogHook(network, raddr string, priority syslog.Priority, tag string) (*SyslogHook, error) { + w, err := syslog.Dial(network, raddr, priority, tag) + return &SyslogHook{w, network, raddr}, err +} + +func (hook *SyslogHook) Fire(entry *logrus.Entry) error { + line, err := entry.String() + if err != nil { + fmt.Fprintf(os.Stderr, "Unable to read entry, %v", err) + return err + } + + switch entry.Level { + case logrus.PanicLevel: + return hook.Writer.Crit(line) + case logrus.FatalLevel: + return hook.Writer.Crit(line) + case logrus.ErrorLevel: + return hook.Writer.Err(line) + case logrus.WarnLevel: + return hook.Writer.Warning(line) + case logrus.InfoLevel: + return hook.Writer.Info(line) + case logrus.DebugLevel: + return hook.Writer.Debug(line) + default: + return nil + } +} + +func (hook *SyslogHook) Levels() []logrus.Level { + return logrus.AllLevels +} diff --git a/vendor/github.com/sirupsen/logrus/hooks/syslog/syslog_test.go b/vendor/github.com/sirupsen/logrus/hooks/syslog/syslog_test.go new file mode 100644 index 000000000..5ec3a4445 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/hooks/syslog/syslog_test.go @@ -0,0 +1,27 @@ +package syslog + +import ( + "log/syslog" + "testing" + + "github.com/sirupsen/logrus" +) + +func TestLocalhostAddAndPrint(t *testing.T) { + log := logrus.New() + hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") + + if err != nil { + t.Errorf("Unable to connect to local syslog.") + } + + log.Hooks.Add(hook) + + for _, level := range hook.Levels() { + if len(log.Hooks[level]) != 1 { + t.Errorf("SyslogHook was not added. The length of log.Hooks[%v]: %v", level, len(log.Hooks[level])) + } + } + + log.Info("Congratulations!") +} diff --git a/vendor/github.com/sirupsen/logrus/hooks/test/test.go b/vendor/github.com/sirupsen/logrus/hooks/test/test.go new file mode 100644 index 000000000..62c4845df --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/hooks/test/test.go @@ -0,0 +1,95 @@ +// The Test package is used for testing logrus. It is here for backwards +// compatibility from when logrus' organization was upper-case. Please use +// lower-case logrus and the `null` package instead of this one. +package test + +import ( + "io/ioutil" + "sync" + + "github.com/sirupsen/logrus" +) + +// Hook is a hook designed for dealing with logs in test scenarios. +type Hook struct { + // Entries is an array of all entries that have been received by this hook. + // For safe access, use the AllEntries() method, rather than reading this + // value directly. + Entries []*logrus.Entry + mu sync.RWMutex +} + +// NewGlobal installs a test hook for the global logger. +func NewGlobal() *Hook { + + hook := new(Hook) + logrus.AddHook(hook) + + return hook + +} + +// NewLocal installs a test hook for a given local logger. +func NewLocal(logger *logrus.Logger) *Hook { + + hook := new(Hook) + logger.Hooks.Add(hook) + + return hook + +} + +// NewNullLogger creates a discarding logger and installs the test hook. +func NewNullLogger() (*logrus.Logger, *Hook) { + + logger := logrus.New() + logger.Out = ioutil.Discard + + return logger, NewLocal(logger) + +} + +func (t *Hook) Fire(e *logrus.Entry) error { + t.mu.Lock() + defer t.mu.Unlock() + t.Entries = append(t.Entries, e) + return nil +} + +func (t *Hook) Levels() []logrus.Level { + return logrus.AllLevels +} + +// LastEntry returns the last entry that was logged or nil. +func (t *Hook) LastEntry() *logrus.Entry { + t.mu.RLock() + defer t.mu.RUnlock() + i := len(t.Entries) - 1 + if i < 0 { + return nil + } + // Make a copy, for safety + e := *t.Entries[i] + return &e +} + +// AllEntries returns all entries that were logged. +func (t *Hook) AllEntries() []*logrus.Entry { + t.mu.RLock() + defer t.mu.RUnlock() + // Make a copy so the returned value won't race with future log requests + entries := make([]*logrus.Entry, len(t.Entries)) + for i, entry := range t.Entries { + // Make a copy, for safety + e := *entry + entries[i] = &e + } + return entries +} + +// Reset removes all Entries from this test hook. +func (t *Hook) Reset() { + t.mu.Lock() + defer t.mu.Unlock() + t.Entries = make([]*logrus.Entry, 0) +} diff --git a/vendor/github.com/sirupsen/logrus/hooks/test/test_test.go b/vendor/github.com/sirupsen/logrus/hooks/test/test_test.go new file mode 100644 index 000000000..3f55cfe31 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/hooks/test/test_test.go @@ -0,0 +1,39 @@ +package test + +import ( + "testing" + + "github.com/sirupsen/logrus" + "github.com/stretchr/testify/assert" +) + +func TestAllHooks(t *testing.T) { + + assert := assert.New(t) + + logger, hook := NewNullLogger() + assert.Nil(hook.LastEntry()) + assert.Equal(0, len(hook.Entries)) + + logger.Error("Hello error") + assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level) + assert.Equal("Hello error", hook.LastEntry().Message) + assert.Equal(1, len(hook.Entries)) + + logger.Warn("Hello warning") + assert.Equal(logrus.WarnLevel, hook.LastEntry().Level) + assert.Equal("Hello warning", hook.LastEntry().Message) + assert.Equal(2, len(hook.Entries)) + + hook.Reset() + assert.Nil(hook.LastEntry()) + assert.Equal(0, len(hook.Entries)) + + hook = NewGlobal() + + logrus.Error("Hello error") + assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level) + assert.Equal("Hello error", hook.LastEntry().Message) + assert.Equal(1, len(hook.Entries)) + +} diff --git a/vendor/github.com/sirupsen/logrus/json_formatter.go b/vendor/github.com/sirupsen/logrus/json_formatter.go new file mode 100644 index 000000000..fb01c1b10 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/json_formatter.go @@ -0,0 +1,79 @@ +package logrus + +import ( + "encoding/json" + "fmt" +) + +type fieldKey string + +// FieldMap allows customization of the key names for default fields. +type FieldMap map[fieldKey]string + +// Default key names for the default fields +const ( + FieldKeyMsg = "msg" + FieldKeyLevel = "level" + FieldKeyTime = "time" +) + +func (f FieldMap) resolve(key fieldKey) string { + if k, ok := f[key]; ok { + return k + } + + return string(key) +} + +// JSONFormatter formats logs into parsable json +type JSONFormatter struct { + // TimestampFormat sets the format used for marshaling timestamps. + TimestampFormat string + + // DisableTimestamp allows disabling automatic timestamps in output + DisableTimestamp bool + + // FieldMap allows users to customize the names of keys for default fields. + // As an example: + // formatter := &JSONFormatter{ + // FieldMap: FieldMap{ + // FieldKeyTime: "@timestamp", + // FieldKeyLevel: "@level", + // FieldKeyMsg: "@message", + // }, + // } + FieldMap FieldMap +} + +// Format renders a single log entry +func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) { + data := make(Fields, len(entry.Data)+3) + for k, v := range entry.Data { + switch v := v.(type) { + case error: + // Otherwise errors are ignored by `encoding/json` + // https://github.com/sirupsen/logrus/issues/137 + data[k] = v.Error() + default: + data[k] = v + } + } + prefixFieldClashes(data) + + timestampFormat := f.TimestampFormat + if timestampFormat == "" { + timestampFormat = defaultTimestampFormat + } + + if !f.DisableTimestamp { + data[f.FieldMap.resolve(FieldKeyTime)] = entry.Time.Format(timestampFormat) + } + data[f.FieldMap.resolve(FieldKeyMsg)] = entry.Message + data[f.FieldMap.resolve(FieldKeyLevel)] = entry.Level.String() + + serialized, err := json.Marshal(data) + if err != nil { + return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) + } + return append(serialized, '\n'), nil +} diff --git a/vendor/github.com/sirupsen/logrus/json_formatter_test.go b/vendor/github.com/sirupsen/logrus/json_formatter_test.go new file mode 100644 index 000000000..51093a79b --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/json_formatter_test.go @@ -0,0 +1,199 @@ +package logrus + +import ( + "encoding/json" + "errors" + "strings" + "testing" +) + +func TestErrorNotLost(t *testing.T) { + formatter := &JSONFormatter{} + + b, err := formatter.Format(WithField("error", errors.New("wild walrus"))) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + + entry := make(map[string]interface{}) + err = json.Unmarshal(b, &entry) + if err != nil { + t.Fatal("Unable to unmarshal formatted entry: ", err) + } + + if entry["error"] != "wild walrus" { + t.Fatal("Error field not set") + } +} + +func TestErrorNotLostOnFieldNotNamedError(t *testing.T) { + formatter := &JSONFormatter{} + + b, err := formatter.Format(WithField("omg", errors.New("wild walrus"))) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + + entry := make(map[string]interface{}) + err = json.Unmarshal(b, &entry) + if err != nil { + t.Fatal("Unable to unmarshal formatted entry: ", err) + } + + if entry["omg"] != "wild walrus" { + t.Fatal("Error field not set") + } +} + +func TestFieldClashWithTime(t *testing.T) { + formatter := &JSONFormatter{} + + b, err := formatter.Format(WithField("time", "right now!")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + + entry := make(map[string]interface{}) + err = json.Unmarshal(b, &entry) + if err != nil { + t.Fatal("Unable to unmarshal formatted entry: ", err) + } + + if entry["fields.time"] != "right now!" { + t.Fatal("fields.time not set to original time field") + } + + if entry["time"] != "0001-01-01T00:00:00Z" { + t.Fatal("time field not set to current time, was: ", entry["time"]) + } +} + +func TestFieldClashWithMsg(t *testing.T) { + formatter := &JSONFormatter{} + + b, err := formatter.Format(WithField("msg", "something")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + + entry := make(map[string]interface{}) + err = json.Unmarshal(b, &entry) + if err != nil { + t.Fatal("Unable to unmarshal formatted entry: ", err) + } + + if entry["fields.msg"] != "something" { + t.Fatal("fields.msg not set to original msg field") + } +} + +func TestFieldClashWithLevel(t *testing.T) { + formatter := &JSONFormatter{} + + b, err := formatter.Format(WithField("level", "something")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + + entry := make(map[string]interface{}) + err = json.Unmarshal(b, &entry) + if err != nil { + t.Fatal("Unable to unmarshal formatted entry: ", err) + } + + if entry["fields.level"] != "something" { + t.Fatal("fields.level not set to original level field") + } +} + +func TestJSONEntryEndsWithNewline(t *testing.T) { + formatter := &JSONFormatter{} + + b, err := formatter.Format(WithField("level", "something")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + + if b[len(b)-1] != '\n' { + t.Fatal("Expected JSON log entry to end with a newline") + } +} + +func TestJSONMessageKey(t *testing.T) { + formatter := &JSONFormatter{ + FieldMap: FieldMap{ + FieldKeyMsg: "message", + }, + } + + b, err := formatter.Format(&Entry{Message: "oh hai"}) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + s := string(b) + if !(strings.Contains(s, "message") && strings.Contains(s, "oh hai")) { + t.Fatal("Expected JSON to format message key") + } +} + +func TestJSONLevelKey(t *testing.T) { + formatter := &JSONFormatter{ + FieldMap: FieldMap{ + FieldKeyLevel: "somelevel", + }, + } + + b, err := formatter.Format(WithField("level", "something")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + s := string(b) + if !strings.Contains(s, "somelevel") { + t.Fatal("Expected JSON to format level key") + } +} + +func TestJSONTimeKey(t *testing.T) { + formatter := &JSONFormatter{ + FieldMap: FieldMap{ + FieldKeyTime: "timeywimey", + }, + } + + b, err := formatter.Format(WithField("level", "something")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + s := string(b) + if !strings.Contains(s, "timeywimey") { + t.Fatal("Expected JSON to format time key") + } +} + +func TestJSONDisableTimestamp(t *testing.T) { + formatter := &JSONFormatter{ + DisableTimestamp: true, + } + + b, err := formatter.Format(WithField("level", "something")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + s := string(b) + if strings.Contains(s, FieldKeyTime) { + t.Error("Did not prevent timestamp", s) + } +} + +func TestJSONEnableTimestamp(t *testing.T) { + formatter := &JSONFormatter{} + + b, err := formatter.Format(WithField("level", "something")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + s := string(b) + if !strings.Contains(s, FieldKeyTime) { + t.Error("Timestamp not present", s) + } +} diff --git a/vendor/github.com/sirupsen/logrus/logger.go b/vendor/github.com/sirupsen/logrus/logger.go new file mode 100644 index 000000000..2acab0509 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/logger.go @@ -0,0 +1,317 @@ +package logrus + +import ( + "io" + "os" + "sync" + "sync/atomic" +) + +type Logger struct { + // The logs are `io.Copy`'d to this in a mutex. It's common to set this to a + // file, or leave it default which is `os.Stderr`. You can also set this to + // something more adventorous, such as logging to Kafka. + Out io.Writer + // Hooks for the logger instance. These allow firing events based on logging + // levels and log entries. For example, to send errors to an error tracking + // service, log to StatsD or dump the core on fatal errors. + Hooks LevelHooks + // All log entries pass through the formatter before logged to Out. The + // included formatters are `TextFormatter` and `JSONFormatter` for which + // TextFormatter is the default. In development (when a TTY is attached) it + // logs with colors, but to a file it wouldn't. You can easily implement your + // own that implements the `Formatter` interface, see the `README` or included + // formatters for examples. + Formatter Formatter + // The logging level the logger should log at. This is typically (and defaults + // to) `logrus.Info`, which allows Info(), Warn(), Error() and Fatal() to be + // logged. + Level Level + // Used to sync writing to the log. Locking is enabled by Default + mu MutexWrap + // Reusable empty entry + entryPool sync.Pool +} + +type MutexWrap struct { + lock sync.Mutex + disabled bool +} + +func (mw *MutexWrap) Lock() { + if !mw.disabled { + mw.lock.Lock() + } +} + +func (mw *MutexWrap) Unlock() { + if !mw.disabled { + mw.lock.Unlock() + } +} + +func (mw *MutexWrap) Disable() { + mw.disabled = true +} + +// Creates a new logger. Configuration should be set by changing `Formatter`, +// `Out` and `Hooks` directly on the default logger instance. You can also just +// instantiate your own: +// +// var log = &Logger{ +// Out: os.Stderr, +// Formatter: new(JSONFormatter), +// Hooks: make(LevelHooks), +// Level: logrus.DebugLevel, +// } +// +// It's recommended to make this a global instance called `log`. +func New() *Logger { + return &Logger{ + Out: os.Stderr, + Formatter: new(TextFormatter), + Hooks: make(LevelHooks), + Level: InfoLevel, + } +} + +func (logger *Logger) newEntry() *Entry { + entry, ok := logger.entryPool.Get().(*Entry) + if ok { + return entry + } + return NewEntry(logger) +} + +func (logger *Logger) releaseEntry(entry *Entry) { + logger.entryPool.Put(entry) +} + +// Adds a field to the log entry, note that it doesn't log until you call +// Debug, Print, Info, Warn, Fatal or Panic. It only creates a log entry. +// If you want multiple fields, use `WithFields`. +func (logger *Logger) WithField(key string, value interface{}) *Entry { + entry := logger.newEntry() + defer logger.releaseEntry(entry) + return entry.WithField(key, value) +} + +// Adds a struct of fields to the log entry. All it does is call `WithField` for +// each `Field`. +func (logger *Logger) WithFields(fields Fields) *Entry { + entry := logger.newEntry() + defer logger.releaseEntry(entry) + return entry.WithFields(fields) +} + +// Add an error as single field to the log entry. All it does is call +// `WithError` for the given `error`. +func (logger *Logger) WithError(err error) *Entry { + entry := logger.newEntry() + defer logger.releaseEntry(entry) + return entry.WithError(err) +} + +func (logger *Logger) Debugf(format string, args ...interface{}) { + if logger.level() >= DebugLevel { + entry := logger.newEntry() + entry.Debugf(format, args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Infof(format string, args ...interface{}) { + if logger.level() >= InfoLevel { + entry := logger.newEntry() + entry.Infof(format, args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Printf(format string, args ...interface{}) { + entry := logger.newEntry() + entry.Printf(format, args...) + logger.releaseEntry(entry) +} + +func (logger *Logger) Warnf(format string, args ...interface{}) { + if logger.level() >= WarnLevel { + entry := logger.newEntry() + entry.Warnf(format, args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Warningf(format string, args ...interface{}) { + if logger.level() >= WarnLevel { + entry := logger.newEntry() + entry.Warnf(format, args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Errorf(format string, args ...interface{}) { + if logger.level() >= ErrorLevel { + entry := logger.newEntry() + entry.Errorf(format, args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Fatalf(format string, args ...interface{}) { + if logger.level() >= FatalLevel { + entry := logger.newEntry() + entry.Fatalf(format, args...) + logger.releaseEntry(entry) + } + Exit(1) +} + +func (logger *Logger) Panicf(format string, args ...interface{}) { + if logger.level() >= PanicLevel { + entry := logger.newEntry() + entry.Panicf(format, args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Debug(args ...interface{}) { + if logger.level() >= DebugLevel { + entry := logger.newEntry() + entry.Debug(args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Info(args ...interface{}) { + if logger.level() >= InfoLevel { + entry := logger.newEntry() + entry.Info(args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Print(args ...interface{}) { + entry := logger.newEntry() + entry.Info(args...) + logger.releaseEntry(entry) +} + +func (logger *Logger) Warn(args ...interface{}) { + if logger.level() >= WarnLevel { + entry := logger.newEntry() + entry.Warn(args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Warning(args ...interface{}) { + if logger.level() >= WarnLevel { + entry := logger.newEntry() + entry.Warn(args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Error(args ...interface{}) { + if logger.level() >= ErrorLevel { + entry := logger.newEntry() + entry.Error(args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Fatal(args ...interface{}) { + if logger.level() >= FatalLevel { + entry := logger.newEntry() + entry.Fatal(args...) + logger.releaseEntry(entry) + } + Exit(1) +} + +func (logger *Logger) Panic(args ...interface{}) { + if logger.level() >= PanicLevel { + entry := logger.newEntry() + entry.Panic(args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Debugln(args ...interface{}) { + if logger.level() >= DebugLevel { + entry := logger.newEntry() + entry.Debugln(args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Infoln(args ...interface{}) { + if logger.level() >= InfoLevel { + entry := logger.newEntry() + entry.Infoln(args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Println(args ...interface{}) { + entry := logger.newEntry() + entry.Println(args...) + logger.releaseEntry(entry) +} + +func (logger *Logger) Warnln(args ...interface{}) { + if logger.level() >= WarnLevel { + entry := logger.newEntry() + entry.Warnln(args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Warningln(args ...interface{}) { + if logger.level() >= WarnLevel { + entry := logger.newEntry() + entry.Warnln(args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Errorln(args ...interface{}) { + if logger.level() >= ErrorLevel { + entry := logger.newEntry() + entry.Errorln(args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Fatalln(args ...interface{}) { + if logger.level() >= FatalLevel { + entry := logger.newEntry() + entry.Fatalln(args...) + logger.releaseEntry(entry) + } + Exit(1) +} + +func (logger *Logger) Panicln(args ...interface{}) { + if logger.level() >= PanicLevel { + entry := logger.newEntry() + entry.Panicln(args...) + logger.releaseEntry(entry) + } +} + +//When file is opened with appending mode, it's safe to +//write concurrently to a file (within 4k message on Linux). +//In these cases user can choose to disable the lock. +func (logger *Logger) SetNoLock() { + logger.mu.Disable() +} + +func (logger *Logger) level() Level { + return Level(atomic.LoadUint32((*uint32)(&logger.Level))) +} + +func (logger *Logger) SetLevel(level Level) { + atomic.StoreUint32((*uint32)(&logger.Level), uint32(level)) +} diff --git a/vendor/github.com/sirupsen/logrus/logger_bench_test.go b/vendor/github.com/sirupsen/logrus/logger_bench_test.go new file mode 100644 index 000000000..dd23a3535 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/logger_bench_test.go @@ -0,0 +1,61 @@ +package logrus + +import ( + "os" + "testing" +) + +// smallFields is a small size data set for benchmarking +var loggerFields = Fields{ + "foo": "bar", + "baz": "qux", + "one": "two", + "three": "four", +} + +func BenchmarkDummyLogger(b *testing.B) { + nullf, err := os.OpenFile("/dev/null", os.O_WRONLY, 0666) + if err != nil { + b.Fatalf("%v", err) + } + defer nullf.Close() + doLoggerBenchmark(b, nullf, &TextFormatter{DisableColors: true}, smallFields) +} + +func BenchmarkDummyLoggerNoLock(b *testing.B) { + nullf, err := os.OpenFile("/dev/null", os.O_WRONLY|os.O_APPEND, 0666) + if err != nil { + b.Fatalf("%v", err) + } + defer nullf.Close() + doLoggerBenchmarkNoLock(b, nullf, &TextFormatter{DisableColors: true}, smallFields) +} + +func doLoggerBenchmark(b *testing.B, out *os.File, formatter Formatter, fields Fields) { + logger := Logger{ + Out: out, + Level: InfoLevel, + Formatter: formatter, + } + entry := logger.WithFields(fields) + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + entry.Info("aaa") + } + }) +} + +func doLoggerBenchmarkNoLock(b *testing.B, out *os.File, formatter Formatter, fields Fields) { + logger := Logger{ + Out: out, + Level: InfoLevel, + Formatter: formatter, + } + logger.SetNoLock() + entry := logger.WithFields(fields) + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + entry.Info("aaa") + } + }) +} diff --git a/vendor/github.com/sirupsen/logrus/logrus.go b/vendor/github.com/sirupsen/logrus/logrus.go new file mode 100644 index 000000000..dd3899974 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/logrus.go @@ -0,0 +1,143 @@ +package logrus + +import ( + "fmt" + "log" + "strings" +) + +// Fields type, used to pass to `WithFields`. +type Fields map[string]interface{} + +// Level type +type Level uint32 + +// Convert the Level to a string. E.g. PanicLevel becomes "panic". +func (level Level) String() string { + switch level { + case DebugLevel: + return "debug" + case InfoLevel: + return "info" + case WarnLevel: + return "warning" + case ErrorLevel: + return "error" + case FatalLevel: + return "fatal" + case PanicLevel: + return "panic" + } + + return "unknown" +} + +// ParseLevel takes a string level and returns the Logrus log level constant. +func ParseLevel(lvl string) (Level, error) { + switch strings.ToLower(lvl) { + case "panic": + return PanicLevel, nil + case "fatal": + return FatalLevel, nil + case "error": + return ErrorLevel, nil + case "warn", "warning": + return WarnLevel, nil + case "info": + return InfoLevel, nil + case "debug": + return DebugLevel, nil + } + + var l Level + return l, fmt.Errorf("not a valid logrus Level: %q", lvl) +} + +// A constant exposing all logging levels +var AllLevels = []Level{ + PanicLevel, + FatalLevel, + ErrorLevel, + WarnLevel, + InfoLevel, + DebugLevel, +} + +// These are the different logging levels. You can set the logging level to log +// on your instance of logger, obtained with `logrus.New()`. +const ( + // PanicLevel level, highest level of severity. Logs and then calls panic with the + // message passed to Debug, Info, ... + PanicLevel Level = iota + // FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the + // logging level is set to Panic. + FatalLevel + // ErrorLevel level. Logs. Used for errors that should definitely be noted. + // Commonly used for hooks to send errors to an error tracking service. + ErrorLevel + // WarnLevel level. Non-critical entries that deserve eyes. + WarnLevel + // InfoLevel level. General operational entries about what's going on inside the + // application. + InfoLevel + // DebugLevel level. Usually only enabled when debugging. Very verbose logging. + DebugLevel +) + +// Won't compile if StdLogger can't be realized by a log.Logger +var ( + _ StdLogger = &log.Logger{} + _ StdLogger = &Entry{} + _ StdLogger = &Logger{} +) + +// StdLogger is what your logrus-enabled library should take, that way +// it'll accept a stdlib logger and a logrus logger. There's no standard +// interface, this is the closest we get, unfortunately. +type StdLogger interface { + Print(...interface{}) + Printf(string, ...interface{}) + Println(...interface{}) + + Fatal(...interface{}) + Fatalf(string, ...interface{}) + Fatalln(...interface{}) + + Panic(...interface{}) + Panicf(string, ...interface{}) + Panicln(...interface{}) +} + +// The FieldLogger interface generalizes the Entry and Logger types +type FieldLogger interface { + WithField(key string, value interface{}) *Entry + WithFields(fields Fields) *Entry + WithError(err error) *Entry + + Debugf(format string, args ...interface{}) + Infof(format string, args ...interface{}) + Printf(format string, args ...interface{}) + Warnf(format string, args ...interface{}) + Warningf(format string, args ...interface{}) + Errorf(format string, args ...interface{}) + Fatalf(format string, args ...interface{}) + Panicf(format string, args ...interface{}) + + Debug(args ...interface{}) + Info(args ...interface{}) + Print(args ...interface{}) + Warn(args ...interface{}) + Warning(args ...interface{}) + Error(args ...interface{}) + Fatal(args ...interface{}) + Panic(args ...interface{}) + + Debugln(args ...interface{}) + Infoln(args ...interface{}) + Println(args ...interface{}) + Warnln(args ...interface{}) + Warningln(args ...interface{}) + Errorln(args ...interface{}) + Fatalln(args ...interface{}) + Panicln(args ...interface{}) +} diff --git a/vendor/github.com/sirupsen/logrus/logrus_test.go b/vendor/github.com/sirupsen/logrus/logrus_test.go new file mode 100644 index 000000000..78cbc2825 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/logrus_test.go @@ -0,0 +1,386 @@ +package logrus + +import ( + "bytes" + "encoding/json" + "strconv" + "strings" + "sync" + "testing" + + "github.com/stretchr/testify/assert" +) + +func LogAndAssertJSON(t *testing.T, log func(*Logger), assertions func(fields Fields)) { + var buffer bytes.Buffer + var fields Fields + + logger := New() + logger.Out = &buffer + logger.Formatter = new(JSONFormatter) + + log(logger) + + err := json.Unmarshal(buffer.Bytes(), &fields) + assert.Nil(t, err) + + assertions(fields) +} + +func LogAndAssertText(t *testing.T, log func(*Logger), assertions func(fields map[string]string)) { + var buffer bytes.Buffer + + logger := New() + logger.Out = &buffer + logger.Formatter = &TextFormatter{ + DisableColors: true, + } + + log(logger) + + fields := make(map[string]string) + for _, kv := range strings.Split(buffer.String(), " ") { + if !strings.Contains(kv, "=") { + continue + } + kvArr := strings.Split(kv, "=") + key := strings.TrimSpace(kvArr[0]) + val := kvArr[1] + if kvArr[1][0] == '"' { + var err error + val, err = strconv.Unquote(val) + assert.NoError(t, err) + } + fields[key] = val + } + assertions(fields) +} + +func TestPrint(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Print("test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test") + assert.Equal(t, fields["level"], "info") + }) +} + +func TestInfo(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Info("test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test") + assert.Equal(t, fields["level"], "info") + }) +} + +func TestWarn(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Warn("test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test") + assert.Equal(t, fields["level"], "warning") + }) +} + +func TestInfolnShouldAddSpacesBetweenStrings(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Infoln("test", "test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test test") + }) +} + +func TestInfolnShouldAddSpacesBetweenStringAndNonstring(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Infoln("test", 10) + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test 10") + }) +} + +func TestInfolnShouldAddSpacesBetweenTwoNonStrings(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Infoln(10, 10) + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "10 10") + }) +} + +func TestInfoShouldAddSpacesBetweenTwoNonStrings(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Infoln(10, 10) + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "10 10") + }) +} + +func TestInfoShouldNotAddSpacesBetweenStringAndNonstring(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Info("test", 10) + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test10") + }) +} + +func TestInfoShouldNotAddSpacesBetweenStrings(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Info("test", "test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "testtest") + }) +} + +func TestWithFieldsShouldAllowAssignments(t *testing.T) { + var buffer bytes.Buffer + var fields Fields + + logger := New() + logger.Out = &buffer + logger.Formatter = new(JSONFormatter) + + localLog := logger.WithFields(Fields{ + "key1": "value1", + }) + + localLog.WithField("key2", "value2").Info("test") + err := json.Unmarshal(buffer.Bytes(), &fields) + assert.Nil(t, err) + + assert.Equal(t, "value2", fields["key2"]) + assert.Equal(t, "value1", fields["key1"]) + + buffer = bytes.Buffer{} + fields = Fields{} + localLog.Info("test") + err = json.Unmarshal(buffer.Bytes(), &fields) + assert.Nil(t, err) + + _, ok := fields["key2"] + assert.Equal(t, false, ok) + assert.Equal(t, "value1", fields["key1"]) +} + +func TestUserSuppliedFieldDoesNotOverwriteDefaults(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.WithField("msg", "hello").Info("test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test") + }) +} + +func TestUserSuppliedMsgFieldHasPrefix(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.WithField("msg", "hello").Info("test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test") + assert.Equal(t, fields["fields.msg"], "hello") + }) +} + +func TestUserSuppliedTimeFieldHasPrefix(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.WithField("time", "hello").Info("test") + }, func(fields Fields) { + assert.Equal(t, fields["fields.time"], "hello") + }) +} + +func TestUserSuppliedLevelFieldHasPrefix(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.WithField("level", 1).Info("test") + }, func(fields Fields) { + assert.Equal(t, fields["level"], "info") + assert.Equal(t, fields["fields.level"], 1.0) // JSON has floats only + }) +} + +func TestDefaultFieldsAreNotPrefixed(t *testing.T) { + LogAndAssertText(t, func(log *Logger) { + ll := log.WithField("herp", "derp") + ll.Info("hello") + ll.Info("bye") + }, func(fields map[string]string) { + for _, fieldName := range []string{"fields.level", "fields.time", "fields.msg"} { + if _, ok := fields[fieldName]; ok { + t.Fatalf("should not have prefixed %q: %v", fieldName, fields) + } + } + }) +} + +func TestDoubleLoggingDoesntPrefixPreviousFields(t *testing.T) { + + var buffer bytes.Buffer + var fields Fields + + logger := New() + logger.Out = &buffer + logger.Formatter = new(JSONFormatter) + + llog := logger.WithField("context", "eating raw fish") + + llog.Info("looks delicious") + + err := json.Unmarshal(buffer.Bytes(), &fields) + assert.NoError(t, err, "should have decoded first message") + assert.Equal(t, len(fields), 4, "should only have msg/time/level/context fields") + assert.Equal(t, fields["msg"], "looks delicious") + assert.Equal(t, fields["context"], "eating raw fish") + + buffer.Reset() + + llog.Warn("omg it is!") + + err = json.Unmarshal(buffer.Bytes(), &fields) + assert.NoError(t, err, "should have decoded second message") + assert.Equal(t, len(fields), 4, "should only have msg/time/level/context fields") + assert.Equal(t, fields["msg"], "omg it is!") + assert.Equal(t, fields["context"], "eating raw fish") + assert.Nil(t, fields["fields.msg"], "should not have prefixed previous `msg` entry") + +} + +func TestConvertLevelToString(t *testing.T) { + assert.Equal(t, "debug", DebugLevel.String()) + assert.Equal(t, "info", InfoLevel.String()) + assert.Equal(t, "warning", WarnLevel.String()) + assert.Equal(t, "error", ErrorLevel.String()) + assert.Equal(t, "fatal", FatalLevel.String()) + assert.Equal(t, "panic", PanicLevel.String()) +} + +func TestParseLevel(t *testing.T) { + l, err := ParseLevel("panic") + assert.Nil(t, err) + assert.Equal(t, PanicLevel, l) + + l, err = ParseLevel("PANIC") + assert.Nil(t, err) + assert.Equal(t, PanicLevel, l) + + l, err = ParseLevel("fatal") + assert.Nil(t, err) + assert.Equal(t, FatalLevel, l) + + l, err = ParseLevel("FATAL") + assert.Nil(t, err) + assert.Equal(t, FatalLevel, l) + + l, err = ParseLevel("error") + assert.Nil(t, err) + assert.Equal(t, ErrorLevel, l) + + l, err = ParseLevel("ERROR") + assert.Nil(t, err) + assert.Equal(t, ErrorLevel, l) + + l, err = ParseLevel("warn") + assert.Nil(t, err) + assert.Equal(t, WarnLevel, l) + + l, err = ParseLevel("WARN") + assert.Nil(t, err) + assert.Equal(t, WarnLevel, l) + + l, err = ParseLevel("warning") + assert.Nil(t, err) + assert.Equal(t, WarnLevel, l) + + l, err = ParseLevel("WARNING") + assert.Nil(t, err) + assert.Equal(t, WarnLevel, l) + + l, err = ParseLevel("info") + assert.Nil(t, err) + assert.Equal(t, InfoLevel, l) + + l, err = ParseLevel("INFO") + assert.Nil(t, err) + assert.Equal(t, InfoLevel, l) + + l, err = ParseLevel("debug") + assert.Nil(t, err) + assert.Equal(t, DebugLevel, l) + + l, err = ParseLevel("DEBUG") + assert.Nil(t, err) + assert.Equal(t, DebugLevel, l) + + l, err = ParseLevel("invalid") + assert.Equal(t, "not a valid logrus Level: \"invalid\"", err.Error()) +} + +func TestGetSetLevelRace(t *testing.T) { + wg := sync.WaitGroup{} + for i := 0; i < 100; i++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + if i%2 == 0 { + SetLevel(InfoLevel) + } else { + GetLevel() + } + }(i) + + } + wg.Wait() +} + +func TestLoggingRace(t *testing.T) { + logger := New() + + var wg sync.WaitGroup + wg.Add(100) + + for i := 0; i < 100; i++ { + go func() { + logger.Info("info") + wg.Done() + }() + } + wg.Wait() +} + +// Compile test +func TestLogrusInterface(t *testing.T) { + var buffer bytes.Buffer + fn := func(l FieldLogger) { + b := l.WithField("key", "value") + b.Debug("Test") + } + // test logger + logger := New() + logger.Out = &buffer + fn(logger) + + // test Entry + e := logger.WithField("another", "value") + fn(e) +} + +// Implements io.Writer using channels for synchronization, so we can wait on +// the Entry.Writer goroutine to write in a non-racey way. This does assume that +// there is a single call to Logger.Out for each message. +type channelWriter chan []byte + +func (cw channelWriter) Write(p []byte) (int, error) { + cw <- p + return len(p), nil +} + +func TestEntryWriter(t *testing.T) { + cw := channelWriter(make(chan []byte, 1)) + log := New() + log.Out = cw + log.Formatter = new(JSONFormatter) + log.WithField("foo", "bar").WriterLevel(WarnLevel).Write([]byte("hello\n")) + + bs := <-cw + var fields Fields + err := json.Unmarshal(bs, &fields) + assert.Nil(t, err) + assert.Equal(t, fields["foo"], "bar") + assert.Equal(t, fields["level"], "warning") +} diff --git a/vendor/github.com/sirupsen/logrus/terminal_bsd.go b/vendor/github.com/sirupsen/logrus/terminal_bsd.go new file mode 100644 index 000000000..d7b3893f3 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_bsd.go @@ -0,0 +1,10 @@ +// +build darwin freebsd openbsd netbsd dragonfly +// +build !appengine + +package logrus + +import "golang.org/x/sys/unix" + +const ioctlReadTermios = unix.TIOCGETA + +type Termios unix.Termios diff --git a/vendor/github.com/sirupsen/logrus/terminal_linux.go b/vendor/github.com/sirupsen/logrus/terminal_linux.go new file mode 100644 index 000000000..88d7298e2 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_linux.go @@ -0,0 +1,14 @@ +// Based on ssh/terminal: +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !appengine + +package logrus + +import "golang.org/x/sys/unix" + +const ioctlReadTermios = unix.TCGETS + +type Termios unix.Termios diff --git a/vendor/github.com/sirupsen/logrus/text_formatter.go b/vendor/github.com/sirupsen/logrus/text_formatter.go new file mode 100644 index 000000000..be412aa94 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/text_formatter.go @@ -0,0 +1,191 @@ +package logrus + +import ( + "bytes" + "fmt" + "io" + "os" + "sort" + "strings" + "sync" + "time" + + "golang.org/x/crypto/ssh/terminal" +) + +const ( + nocolor = 0 + red = 31 + green = 32 + yellow = 33 + blue = 36 + gray = 37 +) + +var ( + baseTimestamp time.Time +) + +func init() { + baseTimestamp = time.Now() +} + +// TextFormatter formats logs into text +type TextFormatter struct { + // Set to true to bypass checking for a TTY before outputting colors. + ForceColors bool + + // Force disabling colors. + DisableColors bool + + // Disable timestamp logging. useful when output is redirected to logging + // system that already adds timestamps. + DisableTimestamp bool + + // Enable logging the full timestamp when a TTY is attached instead of just + // the time passed since beginning of execution. + FullTimestamp bool + + // TimestampFormat to use for display when a full timestamp is printed + TimestampFormat string + + // The fields are sorted by default for a consistent output. For applications + // that log extremely frequently and don't use the JSON formatter this may not + // be desired. + DisableSorting bool + + // QuoteEmptyFields will wrap empty fields in quotes if true + QuoteEmptyFields bool + + // Whether the logger's out is to a terminal + isTerminal bool + + sync.Once +} + +func (f *TextFormatter) init(entry *Entry) { + if entry.Logger != nil { + f.isTerminal = f.checkIfTerminal(entry.Logger.Out) + } +} + +func (f *TextFormatter) checkIfTerminal(w io.Writer) bool { + switch v := w.(type) { + case *os.File: + return terminal.IsTerminal(int(v.Fd())) + default: + return false + } +} + +// Format renders a single log entry +func (f *TextFormatter) Format(entry *Entry) ([]byte, error) { + var b *bytes.Buffer + keys := make([]string, 0, len(entry.Data)) + for k := range entry.Data { + keys = append(keys, k) + } + + if !f.DisableSorting { + sort.Strings(keys) + } + if entry.Buffer != nil { + b = entry.Buffer + } else { + b = &bytes.Buffer{} + } + + prefixFieldClashes(entry.Data) + + f.Do(func() { f.init(entry) }) + + isColored := (f.ForceColors || f.isTerminal) && !f.DisableColors + + timestampFormat := f.TimestampFormat + if timestampFormat == "" { + timestampFormat = defaultTimestampFormat + } + if isColored { + f.printColored(b, entry, keys, timestampFormat) + } else { + if !f.DisableTimestamp { + f.appendKeyValue(b, "time", entry.Time.Format(timestampFormat)) + } + f.appendKeyValue(b, "level", entry.Level.String()) + if entry.Message != "" { + f.appendKeyValue(b, "msg", entry.Message) + } + for _, key := range keys { + f.appendKeyValue(b, key, entry.Data[key]) + } + } + + b.WriteByte('\n') + return b.Bytes(), nil +} + +func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, timestampFormat string) { + var levelColor int + switch entry.Level { + case DebugLevel: + levelColor = gray + case WarnLevel: + levelColor = yellow + case ErrorLevel, FatalLevel, PanicLevel: + levelColor = red + default: + levelColor = blue + } + + levelText := strings.ToUpper(entry.Level.String())[0:4] + + if f.DisableTimestamp { + fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m %-44s ", levelColor, levelText, entry.Message) + } else if !f.FullTimestamp { + fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d] %-44s ", levelColor, levelText, int(entry.Time.Sub(baseTimestamp)/time.Second), entry.Message) + } else { + fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s] %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), entry.Message) + } + for _, k := range keys { + v := entry.Data[k] + fmt.Fprintf(b, " \x1b[%dm%s\x1b[0m=", levelColor, k) + f.appendValue(b, v) + } +} + +func (f *TextFormatter) needsQuoting(text string) bool { + if f.QuoteEmptyFields && len(text) == 0 { + return true + } + for _, ch := range text { + if !((ch >= 'a' && ch <= 'z') || + (ch >= 'A' && ch <= 'Z') || + (ch >= '0' && ch <= '9') || + ch == '-' || ch == '.' || ch == '_' || ch == '/' || ch == '@' || ch == '^' || ch == '+') { + return true + } + } + return false +} + +func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}) { + if b.Len() > 0 { + b.WriteByte(' ') + } + b.WriteString(key) + b.WriteByte('=') + f.appendValue(b, value) +} + +func (f *TextFormatter) appendValue(b *bytes.Buffer, value interface{}) { + stringVal, ok := value.(string) + if !ok { + stringVal = fmt.Sprint(value) + } + + if !f.needsQuoting(stringVal) { + b.WriteString(stringVal) + } else { + b.WriteString(fmt.Sprintf("%q", stringVal)) + } +} diff --git a/vendor/github.com/sirupsen/logrus/text_formatter_test.go b/vendor/github.com/sirupsen/logrus/text_formatter_test.go new file mode 100644 index 000000000..d93b931e5 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/text_formatter_test.go @@ -0,0 +1,141 @@ +package logrus + +import ( + "bytes" + "errors" + "fmt" + "strings" + "testing" + "time" +) + +func TestFormatting(t *testing.T) { + tf := &TextFormatter{DisableColors: true} + + testCases := []struct { + value string + expected string + }{ + {`foo`, "time=\"0001-01-01T00:00:00Z\" level=panic test=foo\n"}, + } + + for _, tc := range testCases { + b, _ := tf.Format(WithField("test", tc.value)) + + if string(b) != tc.expected { + t.Errorf("formatting expected for %q (result was %q instead of %q)", tc.value, string(b), tc.expected) + } + } +} + +func TestQuoting(t *testing.T) { + tf := &TextFormatter{DisableColors: true} + + checkQuoting := func(q bool, value interface{}) { + b, _ := tf.Format(WithField("test", value)) + idx := bytes.Index(b, ([]byte)("test=")) + cont := bytes.Contains(b[idx+5:], []byte("\"")) + if cont != q { + if q { + t.Errorf("quoting expected for: %#v", value) + } else { + t.Errorf("quoting not expected for: %#v", value) + } + } + } + + checkQuoting(false, "") + checkQuoting(false, "abcd") + checkQuoting(false, "v1.0") + checkQuoting(false, "1234567890") + checkQuoting(false, "/foobar") + checkQuoting(false, "foo_bar") + checkQuoting(false, "foo@bar") + checkQuoting(false, "foobar^") + checkQuoting(false, "+/-_^@f.oobar") + checkQuoting(true, "foobar$") + checkQuoting(true, "&foobar") + checkQuoting(true, "x y") + checkQuoting(true, "x,y") + checkQuoting(false, errors.New("invalid")) + checkQuoting(true, errors.New("invalid argument")) + + // Test for quoting empty fields. + tf.QuoteEmptyFields = true + checkQuoting(true, "") + checkQuoting(false, "abcd") + checkQuoting(true, errors.New("invalid argument")) +} + +func TestEscaping(t *testing.T) { + tf := &TextFormatter{DisableColors: true} + + testCases := []struct { + value string + expected string + }{ + {`ba"r`, `ba\"r`}, + {`ba'r`, `ba'r`}, + } + + for _, tc := range testCases { + b, _ := tf.Format(WithField("test", tc.value)) + if !bytes.Contains(b, []byte(tc.expected)) { + t.Errorf("escaping expected for %q (result was %q instead of %q)", tc.value, string(b), tc.expected) + } + } +} + +func TestEscaping_Interface(t *testing.T) { + tf := &TextFormatter{DisableColors: true} + + ts := time.Now() + + testCases := []struct { + value interface{} + expected string + }{ + {ts, fmt.Sprintf("\"%s\"", ts.String())}, + {errors.New("error: something went wrong"), "\"error: something went wrong\""}, + } + + for _, tc := range testCases { + b, _ := tf.Format(WithField("test", tc.value)) + if !bytes.Contains(b, []byte(tc.expected)) { + t.Errorf("escaping expected for %q (result was %q instead of %q)", tc.value, string(b), tc.expected) + } + } +} + +func TestTimestampFormat(t *testing.T) { + checkTimeStr := func(format string) { + customFormatter := &TextFormatter{DisableColors: true, TimestampFormat: format} + customStr, _ := customFormatter.Format(WithField("test", "test")) + timeStart := bytes.Index(customStr, ([]byte)("time=")) + timeEnd := bytes.Index(customStr, ([]byte)("level=")) + timeStr := customStr[timeStart+5+len("\"") : timeEnd-1-len("\"")] + if format == "" { + format = time.RFC3339 + } + _, e := time.Parse(format, (string)(timeStr)) + if e != nil { + t.Errorf("time string \"%s\" did not match provided time format \"%s\": %s", timeStr, format, e) + } + } + + checkTimeStr("2006-01-02T15:04:05.000000000Z07:00") + checkTimeStr("Mon Jan _2 15:04:05 2006") + checkTimeStr("") +} + +func TestDisableTimestampWithColoredOutput(t *testing.T) { + tf := &TextFormatter{DisableTimestamp: true, ForceColors: true} + + b, _ := tf.Format(WithField("test", "test")) + if strings.Contains(string(b), "[0000]") { + t.Error("timestamp not expected when DisableTimestamp is true") + } +} + +// TODO add tests for sorting etc., this requires a parser for the text +// formatter output. diff --git a/vendor/github.com/sirupsen/logrus/writer.go b/vendor/github.com/sirupsen/logrus/writer.go new file mode 100644 index 000000000..7bdebedc6 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/writer.go @@ -0,0 +1,62 @@ +package logrus + +import ( + "bufio" + "io" + "runtime" +) + +func (logger *Logger) Writer() *io.PipeWriter { + return logger.WriterLevel(InfoLevel) +} + +func (logger *Logger) WriterLevel(level Level) *io.PipeWriter { + return NewEntry(logger).WriterLevel(level) +} + +func (entry *Entry) Writer() *io.PipeWriter { + return entry.WriterLevel(InfoLevel) +} + +func (entry *Entry) WriterLevel(level Level) *io.PipeWriter { + reader, writer := io.Pipe() + + var printFunc func(args ...interface{}) + + switch level { + case DebugLevel: + printFunc = entry.Debug + case InfoLevel: + printFunc = entry.Info + case WarnLevel: + printFunc = entry.Warn + case ErrorLevel: + printFunc = entry.Error + case FatalLevel: + printFunc = entry.Fatal + case PanicLevel: + printFunc = entry.Panic + default: + printFunc = entry.Print + } + + go entry.writerScanner(reader, printFunc) + runtime.SetFinalizer(writer, writerFinalizer) + + return writer +} + +func (entry *Entry) writerScanner(reader *io.PipeReader, printFunc func(args ...interface{})) { + scanner := bufio.NewScanner(reader) + for scanner.Scan() { + printFunc(scanner.Text()) + } + if err := scanner.Err(); err != nil { + entry.Errorf("Error while reading from Writer: %s", err) + } + reader.Close() +} + +func writerFinalizer(writer *io.PipeWriter) { + writer.Close() +} diff --git a/vendor/github.com/spf13/cobra/.travis.yml b/vendor/github.com/spf13/cobra/.travis.yml index cb2bf0d5c..68efa1363 100644 --- a/vendor/github.com/spf13/cobra/.travis.yml +++ b/vendor/github.com/spf13/cobra/.travis.yml @@ -2,8 +2,8 @@ language: go matrix: include: - - go: 1.7.5 - - go: 1.8.1 + - go: 1.7.6 + - go: 1.8.3 - go: tip allow_failures: - go: tip diff --git a/vendor/github.com/spf13/cobra/README.md b/vendor/github.com/spf13/cobra/README.md index 3dbb1871a..da9aa881e 100644 --- a/vendor/github.com/spf13/cobra/README.md +++ b/vendor/github.com/spf13/cobra/README.md @@ -117,14 +117,6 @@ Flag functionality is provided by the [pflag library](https://github.com/spf13/pflag), a fork of the flag standard library which maintains the same interface while adding POSIX compliance. -## Usage - -Cobra works by creating a set of commands and then organizing them into a tree. -The tree defines the structure of the application. - -Once each command is defined with its corresponding flags, then the -tree is assigned to the commander which is finally executed. - # Installing Using Cobra is easy. First, use `go get` to install the latest version of the library. This command will install the `cobra` generator executable @@ -159,17 +151,17 @@ In a Cobra app, typically the main.go file is very bare. It serves one purpose: package main import ( - "fmt" - "os" + "fmt" + "os" - "{pathToYourApp}/cmd" + "{pathToYourApp}/cmd" ) func main() { - if err := cmd.RootCmd.Execute(); err != nil { - fmt.Println(err) - os.Exit(1) - } + if err := cmd.RootCmd.Execute(); err != nil { + fmt.Println(err) + os.Exit(1) + } } ``` @@ -285,14 +277,14 @@ Ideally you place this in app/cmd/root.go: ```go var RootCmd = &cobra.Command{ - Use: "hugo", - Short: "Hugo is a very fast static site generator", - Long: `A Fast and Flexible Static Site Generator built with + Use: "hugo", + Short: "Hugo is a very fast static site generator", + Long: `A Fast and Flexible Static Site Generator built with love by spf13 and friends in Go. Complete documentation is available at http://hugo.spf13.com`, - Run: func(cmd *cobra.Command, args []string) { - // Do Stuff Here - }, + Run: func(cmd *cobra.Command, args []string) { + // Do Stuff Here + }, } ``` @@ -302,54 +294,54 @@ For example cmd/root.go: ```go import ( - "fmt" - "os" + "fmt" + "os" - homedir "github.com/mitchellh/go-homedir" - "github.com/spf13/cobra" - "github.com/spf13/viper" + homedir "github.com/mitchellh/go-homedir" + "github.com/spf13/cobra" + "github.com/spf13/viper" ) func init() { - cobra.OnInitialize(initConfig) - RootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cobra.yaml)") - RootCmd.PersistentFlags().StringVarP(&projectBase, "projectbase", "b", "", "base project directory eg. github.com/spf13/") - RootCmd.PersistentFlags().StringP("author", "a", "YOUR NAME", "Author name for copyright attribution") - RootCmd.PersistentFlags().StringVarP(&userLicense, "license", "l", "", "Name of license for the project (can provide `licensetext` in config)") - RootCmd.PersistentFlags().Bool("viper", true, "Use Viper for configuration") - viper.BindPFlag("author", RootCmd.PersistentFlags().Lookup("author")) - viper.BindPFlag("projectbase", RootCmd.PersistentFlags().Lookup("projectbase")) - viper.BindPFlag("useViper", RootCmd.PersistentFlags().Lookup("viper")) - viper.SetDefault("author", "NAME HERE ") - viper.SetDefault("license", "apache") + cobra.OnInitialize(initConfig) + RootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cobra.yaml)") + RootCmd.PersistentFlags().StringVarP(&projectBase, "projectbase", "b", "", "base project directory eg. github.com/spf13/") + RootCmd.PersistentFlags().StringP("author", "a", "YOUR NAME", "Author name for copyright attribution") + RootCmd.PersistentFlags().StringVarP(&userLicense, "license", "l", "", "Name of license for the project (can provide `licensetext` in config)") + RootCmd.PersistentFlags().Bool("viper", true, "Use Viper for configuration") + viper.BindPFlag("author", RootCmd.PersistentFlags().Lookup("author")) + viper.BindPFlag("projectbase", RootCmd.PersistentFlags().Lookup("projectbase")) + viper.BindPFlag("useViper", RootCmd.PersistentFlags().Lookup("viper")) + viper.SetDefault("author", "NAME HERE ") + viper.SetDefault("license", "apache") } func Execute() { - RootCmd.Execute() + RootCmd.Execute() } func initConfig() { // Don't forget to read config either from cfgFile or from home directory! - if cfgFile != "" { - // Use config file from the flag. - viper.SetConfigFile(cfgFile) - } else { - // Find home directory. - home, err := homedir.Dir() - if err != nil { - fmt.Println(err) - os.Exit(1) - } + if cfgFile != "" { + // Use config file from the flag. + viper.SetConfigFile(cfgFile) + } else { + // Find home directory. + home, err := homedir.Dir() + if err != nil { + fmt.Println(err) + os.Exit(1) + } - // Search config in home directory with name ".cobra" (without extension). - viper.AddConfigPath(home) - viper.SetConfigName(".cobra") - } + // Search config in home directory with name ".cobra" (without extension). + viper.AddConfigPath(home) + viper.SetConfigName(".cobra") + } - if err := viper.ReadInConfig(); err != nil { - fmt.Println("Can't read config:", err) - os.Exit(1) - } + if err := viper.ReadInConfig(); err != nil { + fmt.Println("Can't read config:", err) + os.Exit(1) + } } ``` @@ -364,17 +356,17 @@ In a Cobra app, typically the main.go file is very bare. It serves, one purpose, package main import ( - "fmt" - "os" + "fmt" + "os" - "{pathToYourApp}/cmd" + "{pathToYourApp}/cmd" ) func main() { - if err := cmd.RootCmd.Execute(); err != nil { - fmt.Println(err) - os.Exit(1) - } + if err := cmd.RootCmd.Execute(); err != nil { + fmt.Println(err) + os.Exit(1) + } } ``` @@ -390,21 +382,21 @@ populate it with the following: package cmd import ( - "github.com/spf13/cobra" - "fmt" + "github.com/spf13/cobra" + "fmt" ) func init() { - RootCmd.AddCommand(versionCmd) + RootCmd.AddCommand(versionCmd) } var versionCmd = &cobra.Command{ - Use: "version", - Short: "Print the version number of Hugo", - Long: `All software has versions. This is Hugo's`, - Run: func(cmd *cobra.Command, args []string) { - fmt.Println("Hugo Static Site Generator v0.9 -- HEAD") - }, + Use: "version", + Short: "Print the version number of Hugo", + Long: `All software has versions. This is Hugo's`, + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("Hugo Static Site Generator v0.9 -- HEAD") + }, } ``` @@ -419,19 +411,6 @@ root, but commands can be attached at any level. RootCmd.AddCommand(versionCmd) ``` -### Remove a command from its parent - -Removing a command is not a common action in simple programs, but it allows 3rd -parties to customize an existing command tree. - -In this example, we remove the existing `VersionCmd` command of an existing -root command, and we replace it with our own version: - -```go -mainlib.RootCmd.RemoveCommand(mainlib.VersionCmd) -mainlib.RootCmd.AddCommand(versionCmd) -``` - ## Working with Flags Flags provide modifiers to control how the action command operates. @@ -467,36 +446,6 @@ A flag can also be assigned locally which will only apply to that specific comma RootCmd.Flags().StringVarP(&Source, "source", "s", "", "Source directory to read from") ``` -## Positional and Custom Arguments - -Validation of positional arguments can be specified using the `Args` field. - -The follow validators are built in: - -- `NoArgs` - the command will report an error if there are any positional args. -- `ArbitraryArgs` - the command will accept any args. -- `OnlyValidArgs` - the command will report an error if there are any positional args that are not in the ValidArgs list. -- `MinimumNArgs(int)` - the command will report an error if there are not at least N positional args. -- `MaximumNArgs(int)` - the command will report an error if there are more than N positional args. -- `ExactArgs(int)` - the command will report an error if there are not exactly N positional args. -- `RangeArgs(min, max)` - the command will report an error if the number of args is not between the minimum and maximum number of expected args. - -A custom validator can be provided like this: - -```go - -Args: func validColorArgs(cmd *cobra.Command, args []string) error { - if err := cli.RequiresMinArgs(1)(cmd, args); err != nil { - return err - } - if myapp.IsValidColor(args[0]) { - return nil - } - return fmt.Errorf("Invalid color specified: %s", args[0]) -} - -``` - ### Bind Flags with Config You can also bind your flags with [viper](https://github.com/spf13/viper): @@ -504,8 +453,8 @@ You can also bind your flags with [viper](https://github.com/spf13/viper): var author string func init() { - RootCmd.PersistentFlags().StringVar(&author, "author", "YOUR NAME", "Author name for copyright attribution") - viper.BindPFlag("author", RootCmd.PersistentFlags().Lookup("author")) + RootCmd.PersistentFlags().StringVar(&author, "author", "YOUR NAME", "Author name for copyright attribution") + viper.BindPFlag("author", RootCmd.PersistentFlags().Lookup("author")) } ``` @@ -515,6 +464,40 @@ when the `--author` flag is not provided by user. More in [viper documentation](https://github.com/spf13/viper#working-with-flags). +## Positional and Custom Arguments + +Validation of positional arguments can be specified using the `Args` field +of `Command`. + +The following validators are built in: + +- `NoArgs` - the command will report an error if there are any positional args. +- `ArbitraryArgs` - the command will accept any args. +- `OnlyValidArgs` - the command will report an error if there are any positional args that are not in the `ValidArgs` field of `Command`. +- `MinimumNArgs(int)` - the command will report an error if there are not at least N positional args. +- `MaximumNArgs(int)` - the command will report an error if there are more than N positional args. +- `ExactArgs(int)` - the command will report an error if there are not exactly N positional args. +- `RangeArgs(min, max)` - the command will report an error if the number of args is not between the minimum and maximum number of expected args. + +An example of setting the custom validator: + +```go +var cmd = &cobra.Command{ + Short: "hello", + Args: func(cmd *cobra.Command, args []string) error { + if len(args) < 1 { + return errors.New("requires at least one arg") + } + if myapp.IsValidColor(args[0]) { + return nil + } + return fmt.Errorf("invalid color specified: %s", args[0]) + }, + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("Hello, World!") + }, +} +``` ## Example @@ -531,56 +514,56 @@ More documentation about flags is available at https://github.com/spf13/pflag package main import ( - "fmt" - "strings" + "fmt" + "strings" - "github.com/spf13/cobra" + "github.com/spf13/cobra" ) func main() { + var echoTimes int - var echoTimes int + var cmdPrint = &cobra.Command{ + Use: "print [string to print]", + Short: "Print anything to the screen", + Long: `print is for printing anything back to the screen. +For many years people have printed back to the screen.`, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("Print: " + strings.Join(args, " ")) + }, + } - var cmdPrint = &cobra.Command{ - Use: "print [string to print]", - Short: "Print anything to the screen", - Long: `print is for printing anything back to the screen. - For many years people have printed back to the screen. - `, - Run: func(cmd *cobra.Command, args []string) { - fmt.Println("Print: " + strings.Join(args, " ")) - }, - } + var cmdEcho = &cobra.Command{ + Use: "echo [string to echo]", + Short: "Echo anything to the screen", + Long: `echo is for echoing anything back. +Echo works a lot like print, except it has a child command.`, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("Print: " + strings.Join(args, " ")) + }, + } - var cmdEcho = &cobra.Command{ - Use: "echo [string to echo]", - Short: "Echo anything to the screen", - Long: `echo is for echoing anything back. - Echo works a lot like print, except it has a child command. - `, - Run: func(cmd *cobra.Command, args []string) { - fmt.Println("Print: " + strings.Join(args, " ")) - }, - } + var cmdTimes = &cobra.Command{ + Use: "times [# times] [string to echo]", + Short: "Echo anything to the screen more times", + Long: `echo things multiple times back to the user by providing +a count and a string.`, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + for i := 0; i < echoTimes; i++ { + fmt.Println("Echo: " + strings.Join(args, " ")) + } + }, + } - var cmdTimes = &cobra.Command{ - Use: "times [# times] [string to echo]", - Short: "Echo anything to the screen more times", - Long: `echo things multiple times back to the user by providing - a count and a string.`, - Run: func(cmd *cobra.Command, args []string) { - for i := 0; i < echoTimes; i++ { - fmt.Println("Echo: " + strings.Join(args, " ")) - } - }, - } + cmdTimes.Flags().IntVarP(&echoTimes, "times", "t", 1, "times to echo the input") - cmdTimes.Flags().IntVarP(&echoTimes, "times", "t", 1, "times to echo the input") - - var rootCmd = &cobra.Command{Use: "app"} - rootCmd.AddCommand(cmdPrint, cmdEcho) - cmdEcho.AddCommand(cmdTimes) - rootCmd.Execute() + var rootCmd = &cobra.Command{Use: "app"} + rootCmd.AddCommand(cmdPrint, cmdEcho) + cmdEcho.AddCommand(cmdTimes) + rootCmd.Execute() } ``` @@ -666,16 +649,16 @@ The default help command is ```go func (c *Command) initHelp() { - if c.helpCommand == nil { - c.helpCommand = &Command{ - Use: "help [command]", - Short: "Help about any command", - Long: `Help provides help for any command in the application. + if c.helpCommand == nil { + c.helpCommand = &Command{ + Use: "help [command]", + Short: "Help about any command", + Long: `Help provides help for any command in the application. Simply type ` + c.Name() + ` help [path to command] for full details.`, - Run: c.HelpFunc(), - } - } - c.AddCommand(c.helpCommand) + Run: c.HelpFunc(), + } + } + c.AddCommand(c.helpCommand) } ``` @@ -683,9 +666,7 @@ You can provide your own command, function or template through the following met ```go command.SetHelpCommand(cmd *Command) - command.SetHelpFunc(f func(*Command, []string)) - command.SetHelpTemplate(s string) ``` @@ -751,8 +732,8 @@ The default usage function is: ```go return func(c *Command) error { - err := tmpl(c.Out(), c.UsageTemplate(), c) - return err + err := tmpl(c.Out(), c.UsageTemplate(), c) + return err } ``` @@ -780,57 +761,57 @@ An example of two commands which use all of these features is below. When the s package main import ( - "fmt" + "fmt" - "github.com/spf13/cobra" + "github.com/spf13/cobra" ) func main() { - var rootCmd = &cobra.Command{ - Use: "root [sub]", - Short: "My root command", - PersistentPreRun: func(cmd *cobra.Command, args []string) { - fmt.Printf("Inside rootCmd PersistentPreRun with args: %v\n", args) - }, - PreRun: func(cmd *cobra.Command, args []string) { - fmt.Printf("Inside rootCmd PreRun with args: %v\n", args) - }, - Run: func(cmd *cobra.Command, args []string) { - fmt.Printf("Inside rootCmd Run with args: %v\n", args) - }, - PostRun: func(cmd *cobra.Command, args []string) { - fmt.Printf("Inside rootCmd PostRun with args: %v\n", args) - }, - PersistentPostRun: func(cmd *cobra.Command, args []string) { - fmt.Printf("Inside rootCmd PersistentPostRun with args: %v\n", args) - }, - } + var rootCmd = &cobra.Command{ + Use: "root [sub]", + Short: "My root command", + PersistentPreRun: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside rootCmd PersistentPreRun with args: %v\n", args) + }, + PreRun: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside rootCmd PreRun with args: %v\n", args) + }, + Run: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside rootCmd Run with args: %v\n", args) + }, + PostRun: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside rootCmd PostRun with args: %v\n", args) + }, + PersistentPostRun: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside rootCmd PersistentPostRun with args: %v\n", args) + }, + } - var subCmd = &cobra.Command{ - Use: "sub [no options!]", - Short: "My subcommand", - PreRun: func(cmd *cobra.Command, args []string) { - fmt.Printf("Inside subCmd PreRun with args: %v\n", args) - }, - Run: func(cmd *cobra.Command, args []string) { - fmt.Printf("Inside subCmd Run with args: %v\n", args) - }, - PostRun: func(cmd *cobra.Command, args []string) { - fmt.Printf("Inside subCmd PostRun with args: %v\n", args) - }, - PersistentPostRun: func(cmd *cobra.Command, args []string) { - fmt.Printf("Inside subCmd PersistentPostRun with args: %v\n", args) - }, - } + var subCmd = &cobra.Command{ + Use: "sub [no options!]", + Short: "My subcommand", + PreRun: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside subCmd PreRun with args: %v\n", args) + }, + Run: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside subCmd Run with args: %v\n", args) + }, + PostRun: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside subCmd PostRun with args: %v\n", args) + }, + PersistentPostRun: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside subCmd PersistentPostRun with args: %v\n", args) + }, + } - rootCmd.AddCommand(subCmd) + rootCmd.AddCommand(subCmd) - rootCmd.SetArgs([]string{""}) - _ = rootCmd.Execute() - fmt.Print("\n") - rootCmd.SetArgs([]string{"sub", "arg1", "arg2"}) - _ = rootCmd.Execute() + rootCmd.SetArgs([]string{""}) + rootCmd.Execute() + fmt.Println() + rootCmd.SetArgs([]string{"sub", "arg1", "arg2"}) + rootCmd.Execute() } ``` @@ -856,28 +837,28 @@ command. package main import ( - "errors" - "log" + "errors" + "log" - "github.com/spf13/cobra" + "github.com/spf13/cobra" ) func main() { - var rootCmd = &cobra.Command{ - Use: "hugo", - Short: "Hugo is a very fast static site generator", - Long: `A Fast and Flexible Static Site Generator built with - love by spf13 and friends in Go. - Complete documentation is available at http://hugo.spf13.com`, - RunE: func(cmd *cobra.Command, args []string) error { - // Do Stuff Here - return errors.New("some random error") - }, - } + var rootCmd = &cobra.Command{ + Use: "hugo", + Short: "Hugo is a very fast static site generator", + Long: `A Fast and Flexible Static Site Generator built with +love by spf13 and friends in Go. +Complete documentation is available at http://hugo.spf13.com`, + RunE: func(cmd *cobra.Command, args []string) error { + // Do Stuff Here + return errors.New("some random error") + }, + } - if err := rootCmd.Execute(); err != nil { - log.Fatal(err) - } + if err := rootCmd.Execute(); err != nil { + log.Fatal(err) + } } ``` @@ -933,16 +914,6 @@ Cobra can generate a man page based on the subcommands, flags, etc. A simple exa Cobra can generate a bash-completion file. If you add more information to your command, these completions can be amazingly powerful and flexible. Read more about it in [Bash Completions](bash_completions.md). -## Debugging - -Cobra provides a ‘DebugFlags’ method on a command which, when called, will print -out everything Cobra knows about the flags for each command. - -### Example - -```go -command.DebugFlags() -``` ## Extensions diff --git a/vendor/github.com/spf13/cobra/bash_completions.go b/vendor/github.com/spf13/cobra/bash_completions.go index e0cfb3494..e402065dd 100644 --- a/vendor/github.com/spf13/cobra/bash_completions.go +++ b/vendor/github.com/spf13/cobra/bash_completions.go @@ -463,14 +463,14 @@ func gen(buf *bytes.Buffer, cmd *Command) { } // GenBashCompletion generates bash completion file and writes to the passed writer. -func (cmd *Command) GenBashCompletion(w io.Writer) error { +func (c *Command) GenBashCompletion(w io.Writer) error { buf := new(bytes.Buffer) - writePreamble(buf, cmd.Name()) - if len(cmd.BashCompletionFunction) > 0 { - buf.WriteString(cmd.BashCompletionFunction + "\n") + writePreamble(buf, c.Name()) + if len(c.BashCompletionFunction) > 0 { + buf.WriteString(c.BashCompletionFunction + "\n") } - gen(buf, cmd) - writePostscript(buf, cmd.Name()) + gen(buf, c) + writePostscript(buf, c.Name()) _, err := buf.WriteTo(w) return err @@ -481,24 +481,24 @@ func nonCompletableFlag(flag *pflag.Flag) bool { } // GenBashCompletionFile generates bash completion file. -func (cmd *Command) GenBashCompletionFile(filename string) error { +func (c *Command) GenBashCompletionFile(filename string) error { outFile, err := os.Create(filename) if err != nil { return err } defer outFile.Close() - return cmd.GenBashCompletion(outFile) + return c.GenBashCompletion(outFile) } // MarkFlagRequired adds the BashCompOneRequiredFlag annotation to the named flag, if it exists. -func (cmd *Command) MarkFlagRequired(name string) error { - return MarkFlagRequired(cmd.Flags(), name) +func (c *Command) MarkFlagRequired(name string) error { + return MarkFlagRequired(c.Flags(), name) } // MarkPersistentFlagRequired adds the BashCompOneRequiredFlag annotation to the named persistent flag, if it exists. -func (cmd *Command) MarkPersistentFlagRequired(name string) error { - return MarkFlagRequired(cmd.PersistentFlags(), name) +func (c *Command) MarkPersistentFlagRequired(name string) error { + return MarkFlagRequired(c.PersistentFlags(), name) } // MarkFlagRequired adds the BashCompOneRequiredFlag annotation to the named flag in the flag set, if it exists. @@ -508,20 +508,20 @@ func MarkFlagRequired(flags *pflag.FlagSet, name string) error { // MarkFlagFilename adds the BashCompFilenameExt annotation to the named flag, if it exists. // Generated bash autocompletion will select filenames for the flag, limiting to named extensions if provided. -func (cmd *Command) MarkFlagFilename(name string, extensions ...string) error { - return MarkFlagFilename(cmd.Flags(), name, extensions...) +func (c *Command) MarkFlagFilename(name string, extensions ...string) error { + return MarkFlagFilename(c.Flags(), name, extensions...) } // MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists. // Generated bash autocompletion will call the bash function f for the flag. -func (cmd *Command) MarkFlagCustom(name string, f string) error { - return MarkFlagCustom(cmd.Flags(), name, f) +func (c *Command) MarkFlagCustom(name string, f string) error { + return MarkFlagCustom(c.Flags(), name, f) } // MarkPersistentFlagFilename adds the BashCompFilenameExt annotation to the named persistent flag, if it exists. // Generated bash autocompletion will select filenames for the flag, limiting to named extensions if provided. -func (cmd *Command) MarkPersistentFlagFilename(name string, extensions ...string) error { - return MarkFlagFilename(cmd.PersistentFlags(), name, extensions...) +func (c *Command) MarkPersistentFlagFilename(name string, extensions ...string) error { + return MarkFlagFilename(c.PersistentFlags(), name, extensions...) } // MarkFlagFilename adds the BashCompFilenameExt annotation to the named flag in the flag set, if it exists. diff --git a/vendor/github.com/spf13/cobra/bash_completions_test.go b/vendor/github.com/spf13/cobra/bash_completions_test.go index 071a6a2a2..a3b13a32a 100644 --- a/vendor/github.com/spf13/cobra/bash_completions_test.go +++ b/vendor/github.com/spf13/cobra/bash_completions_test.go @@ -118,7 +118,7 @@ func TestBashCompletions(t *testing.T) { check(t, str, `flags_completion+=("_filedir")`) // check for filename extension flags check(t, str, `must_have_one_noun+=("three")`) - // check for filename extention flags + // check for filename extension flags check(t, str, `flags_completion+=("__handle_filename_extension_flag json|yaml|yml")`) // check for custom flags check(t, str, `flags_completion+=("__complete_custom")`) diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/add.go b/vendor/github.com/spf13/cobra/cobra/cmd/add.go index 45f00bb54..993ae16f0 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/add.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/add.go @@ -24,7 +24,7 @@ import ( func init() { addCmd.Flags().StringVarP(&packageName, "package", "t", "", "target package name (e.g. github.com/spf13/hugo)") - addCmd.Flags().StringVarP(&parentName, "parent", "p", "RootCmd", "name of parent command for this command") + addCmd.Flags().StringVarP(&parentName, "parent", "p", "RootCmd", "variable name of parent command for this command") } var packageName, parentName string @@ -121,7 +121,7 @@ func validateCmdName(source string) string { func createCmdFile(license License, path, cmdName string) { template := `{{comment .copyright}} -{{comment .license}} +{{if .license}}{{comment .license}}{{end}} package {{.cmdPackage}} diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/add_test.go b/vendor/github.com/spf13/cobra/cobra/cmd/add_test.go index dacbe838a..b920e2b9d 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/add_test.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/add_test.go @@ -6,6 +6,8 @@ import ( "os" "path/filepath" "testing" + + "github.com/spf13/viper" ) // TestGoldenAddCmd initializes the project "github.com/spf13/testproject" @@ -16,11 +18,18 @@ import ( func TestGoldenAddCmd(t *testing.T) { projectName := "github.com/spf13/testproject" project := NewProject(projectName) - - // Initialize the project at first. - initializeProject(project) defer os.RemoveAll(project.AbsPath()) + viper.Set("author", "NAME HERE ") + viper.Set("license", "apache") + viper.Set("year", 2017) + defer viper.Set("author", nil) + defer viper.Set("license", nil) + defer viper.Set("year", nil) + + // Initialize the project first. + initializeProject(project) + // Then add the "test" command. cmdName := "test" cmdPath := filepath.Join(project.CmdPath(), cmdName+".go") @@ -48,7 +57,7 @@ func TestGoldenAddCmd(t *testing.T) { goldenPath := filepath.Join("testdata", filepath.Base(path)+".golden") switch relPath { - // Know directories. + // Known directories. case ".": return nil // Known files. diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/golden_test.go b/vendor/github.com/spf13/cobra/cobra/cmd/golden_test.go index 0ac7e8935..59a5a1c9f 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/golden_test.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/golden_test.go @@ -39,11 +39,11 @@ func compareFiles(pathA, pathB string) error { // Don't execute diff if it can't be found. return nil } - diffCmd := exec.Command(diffPath, pathA, pathB) + diffCmd := exec.Command(diffPath, "-u", pathA, pathB) diffCmd.Stdout = output diffCmd.Stderr = output - output.WriteString("$ diff " + pathA + " " + pathB + "\n") + output.WriteString("$ diff -u " + pathA + " " + pathB + "\n") if err := diffCmd.Run(); err != nil { output.WriteString("\n" + err.Error()) } diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/init_test.go b/vendor/github.com/spf13/cobra/cobra/cmd/init_test.go index 9a918b9b4..40eb4038e 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/init_test.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/init_test.go @@ -6,6 +6,8 @@ import ( "os" "path/filepath" "testing" + + "github.com/spf13/viper" ) // TestGoldenInitCmd initializes the project "github.com/spf13/testproject" @@ -17,6 +19,13 @@ func TestGoldenInitCmd(t *testing.T) { project := NewProject(projectName) defer os.RemoveAll(project.AbsPath()) + viper.Set("author", "NAME HERE ") + viper.Set("license", "apache") + viper.Set("year", 2017) + defer viper.Set("author", nil) + defer viper.Set("license", nil) + defer viper.Set("year", nil) + os.Args = []string{"cobra", "init", projectName} if err := rootCmd.Execute(); err != nil { t.Fatal("Error by execution:", err) @@ -44,7 +53,7 @@ func TestGoldenInitCmd(t *testing.T) { goldenPath := filepath.Join("testdata", filepath.Base(path)+".golden") switch relPath { - // Know directories. + // Known directories. case ".", "cmd": return nil // Known files. diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_agpl.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_agpl.go index 4ea036ede..bc22e9732 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/license_agpl.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/license_agpl.go @@ -4,8 +4,7 @@ func initAgpl() { Licenses["agpl"] = License{ Name: "GNU Affero General Public License", PossibleMatches: []string{"agpl", "affero gpl", "gnu agpl"}, - Header: `{{.copyright}} - + Header: ` This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_apache_2.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_apache_2.go index 3f330867d..38393d541 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/license_apache_2.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/license_apache_2.go @@ -19,7 +19,8 @@ func initApache2() { Licenses["apache"] = License{ Name: "Apache 2.0", PossibleMatches: []string{"apache", "apache20", "apache 2.0", "apache2.0", "apache-2.0"}, - Header: `Licensed under the Apache License, Version 2.0 (the "License"); + Header: ` +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 diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_2.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_2.go index f2982dab3..4a847e04a 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_2.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_2.go @@ -20,8 +20,7 @@ func initBsdClause2() { Name: "Simplified BSD License", PossibleMatches: []string{"freebsd", "simpbsd", "simple bsd", "2-clause bsd", "2 clause bsd", "simplified bsd license"}, - Header: ` -All rights reserved. + Header: `All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_3.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_3.go index 39c9571f2..c7476b31f 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_3.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_3.go @@ -19,8 +19,7 @@ func initBsdClause3() { Licenses["bsd"] = License{ Name: "NewBSD", PossibleMatches: []string{"bsd", "newbsd", "3 clause bsd", "3-clause bsd"}, - Header: ` -All rights reserved. + Header: `All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_2.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_2.go index 054b470f1..03e05b3a7 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_2.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_2.go @@ -19,20 +19,19 @@ func initGpl2() { Licenses["gpl2"] = License{ Name: "GNU General Public License 2.0", PossibleMatches: []string{"gpl2", "gnu gpl2", "gplv2"}, - Header: `{{.copyright}} + Header: ` +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see .`, +You should have received a copy of the GNU Lesser General Public License +along with this program. If not, see .`, Text: ` GNU GENERAL PUBLIC LICENSE Version 2, June 1991 diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_3.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_3.go index d1ef656a7..ce07679c7 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_3.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_3.go @@ -19,8 +19,7 @@ func initGpl3() { Licenses["gpl3"] = License{ Name: "GNU General Public License 3.0", PossibleMatches: []string{"gpl3", "gplv3", "gpl", "gnu gpl3", "gnu gpl"}, - Header: `{{.copyright}} - + Header: ` This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_lgpl.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_lgpl.go index 75fd043b8..0f8b96cad 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/license_lgpl.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/license_lgpl.go @@ -4,8 +4,7 @@ func initLgpl() { Licenses["lgpl"] = License{ Name: "GNU Lesser General Public License", PossibleMatches: []string{"lgpl", "lesser gpl", "gnu lgpl"}, - Header: `{{.copyright}} - + Header: ` This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_mit.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_mit.go index 4ff5a4cdf..bd2d0c4fa 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/license_mit.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/license_mit.go @@ -17,7 +17,7 @@ package cmd func initMit() { Licenses["mit"] = License{ - Name: "Mit", + Name: "MIT License", PossibleMatches: []string{"mit"}, Header: ` Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/licenses.go b/vendor/github.com/spf13/cobra/cobra/cmd/licenses.go index d73e6fb35..cf2a6b7af 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/licenses.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/licenses.go @@ -77,7 +77,11 @@ func getLicense() License { func copyrightLine() string { author := viper.GetString("author") - year := time.Now().Format("2006") + + year := viper.GetString("year") // For tests. + if year == "" { + year = time.Now().Format("2006") + } return "Copyright © " + year + " " + author } diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/root.go b/vendor/github.com/spf13/cobra/cobra/cmd/root.go index 1c5e69078..19568f980 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/root.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/root.go @@ -40,7 +40,7 @@ func Execute() { } func init() { - initViper() + cobra.OnInitialize(initConfig) rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cobra.yaml)") rootCmd.PersistentFlags().StringP("author", "a", "YOUR NAME", "author name for copyright attribution") @@ -55,7 +55,7 @@ func init() { rootCmd.AddCommand(initCmd) } -func initViper() { +func initConfig() { if cfgFile != "" { // Use config file from the flag. viper.SetConfigFile(cfgFile) diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/testdata/main.go.golden b/vendor/github.com/spf13/cobra/cobra/cmd/testdata/main.go.golden index 69ecbd48e..cdbe38d70 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/testdata/main.go.golden +++ b/vendor/github.com/spf13/cobra/cobra/cmd/testdata/main.go.golden @@ -1,4 +1,5 @@ // Copyright © 2017 NAME HERE +// // 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 diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/testdata/root.go.golden b/vendor/github.com/spf13/cobra/cobra/cmd/testdata/root.go.golden index ecc876012..8eeeae89e 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/testdata/root.go.golden +++ b/vendor/github.com/spf13/cobra/cobra/cmd/testdata/root.go.golden @@ -1,4 +1,5 @@ // Copyright © 2017 NAME HERE +// // 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 diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/testdata/test.go.golden b/vendor/github.com/spf13/cobra/cobra/cmd/testdata/test.go.golden index c8319d1dd..584056802 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/testdata/test.go.golden +++ b/vendor/github.com/spf13/cobra/cobra/cmd/testdata/test.go.golden @@ -1,4 +1,5 @@ // Copyright © 2017 NAME HERE +// // 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 diff --git a/vendor/github.com/spf13/cobra/cobra_test.go b/vendor/github.com/spf13/cobra/cobra_test.go index 1706eae28..d5df951e6 100644 --- a/vendor/github.com/spf13/cobra/cobra_test.go +++ b/vendor/github.com/spf13/cobra/cobra_test.go @@ -1166,7 +1166,7 @@ func TestGlobalNormFuncPropagation(t *testing.T) { rootCmd := initialize() rootCmd.SetGlobalNormalizationFunc(normFunc) - if reflect.ValueOf(normFunc) != reflect.ValueOf(rootCmd.GlobalNormalizationFunc()) { + if reflect.ValueOf(normFunc).Pointer() != reflect.ValueOf(rootCmd.GlobalNormalizationFunc()).Pointer() { t.Error("rootCmd seems to have a wrong normalization function") } diff --git a/vendor/github.com/spf13/cobra/command.go b/vendor/github.com/spf13/cobra/command.go index 4f65d7708..185e45263 100644 --- a/vendor/github.com/spf13/cobra/command.go +++ b/vendor/github.com/spf13/cobra/command.go @@ -54,13 +54,14 @@ type Command struct { // ValidArgs is list of all valid non-flag arguments that are accepted in bash completions ValidArgs []string + // Expected arguments + Args PositionalArgs + // ArgAliases is List of aliases for ValidArgs. // These are not suggested to the user in the bash completion, // but accepted if entered manually. ArgAliases []string - // Expected arguments - Args PositionalArgs // BashCompletionFunction is custom functions used by the bash autocompletion generator. BashCompletionFunction string diff --git a/vendor/github.com/spf13/cobra/zsh_completions.go b/vendor/github.com/spf13/cobra/zsh_completions.go new file mode 100644 index 000000000..889c22e27 --- /dev/null +++ b/vendor/github.com/spf13/cobra/zsh_completions.go @@ -0,0 +1,126 @@ +package cobra + +import ( + "bytes" + "fmt" + "io" + "os" + "strings" +) + +// GenZshCompletionFile generates zsh completion file. +func (c *Command) GenZshCompletionFile(filename string) error { + outFile, err := os.Create(filename) + if err != nil { + return err + } + defer outFile.Close() + + return c.GenZshCompletion(outFile) +} + +// GenZshCompletion generates a zsh completion file and writes to the passed writer. +func (c *Command) GenZshCompletion(w io.Writer) error { + buf := new(bytes.Buffer) + + writeHeader(buf, c) + maxDepth := maxDepth(c) + writeLevelMapping(buf, maxDepth) + writeLevelCases(buf, maxDepth, c) + + _, err := buf.WriteTo(w) + return err +} + +func writeHeader(w io.Writer, cmd *Command) { + fmt.Fprintf(w, "#compdef %s\n\n", cmd.Name()) +} + +func maxDepth(c *Command) int { + if len(c.Commands()) == 0 { + return 0 + } + maxDepthSub := 0 + for _, s := range c.Commands() { + subDepth := maxDepth(s) + if subDepth > maxDepthSub { + maxDepthSub = subDepth + } + } + return 1 + maxDepthSub +} + +func writeLevelMapping(w io.Writer, numLevels int) { + fmt.Fprintln(w, `_arguments \`) + for i := 1; i <= numLevels; i++ { + fmt.Fprintf(w, ` '%d: :->level%d' \`, i, i) + fmt.Fprintln(w) + } + fmt.Fprintf(w, ` '%d: :%s'`, numLevels+1, "_files") + fmt.Fprintln(w) +} + +func writeLevelCases(w io.Writer, maxDepth int, root *Command) { + fmt.Fprintln(w, "case $state in") + defer fmt.Fprintln(w, "esac") + + for i := 1; i <= maxDepth; i++ { + fmt.Fprintf(w, " level%d)\n", i) + writeLevel(w, root, i) + fmt.Fprintln(w, " ;;") + } + fmt.Fprintln(w, " *)") + fmt.Fprintln(w, " _arguments '*: :_files'") + fmt.Fprintln(w, " ;;") +} + +func writeLevel(w io.Writer, root *Command, i int) { + fmt.Fprintf(w, " case $words[%d] in\n", i) + defer fmt.Fprintln(w, " esac") + + commands := filterByLevel(root, i) + byParent := groupByParent(commands) + + for p, c := range byParent { + names := names(c) + fmt.Fprintf(w, " %s)\n", p) + fmt.Fprintf(w, " _arguments '%d: :(%s)'\n", i, strings.Join(names, " ")) + fmt.Fprintln(w, " ;;") + } + fmt.Fprintln(w, " *)") + fmt.Fprintln(w, " _arguments '*: :_files'") + fmt.Fprintln(w, " ;;") + +} + +func filterByLevel(c *Command, l int) []*Command { + cs := make([]*Command, 0) + if l == 0 { + cs = append(cs, c) + return cs + } + for _, s := range c.Commands() { + cs = append(cs, filterByLevel(s, l-1)...) + } + return cs +} + +func groupByParent(commands []*Command) map[string][]*Command { + m := make(map[string][]*Command) + for _, c := range commands { + parent := c.Parent() + if parent == nil { + continue + } + m[parent.Name()] = append(m[parent.Name()], c) + } + return m +} + +func names(commands []*Command) []string { + ns := make([]string, len(commands)) + for i, c := range commands { + ns[i] = c.Name() + } + return ns +} diff --git a/vendor/github.com/spf13/cobra/zsh_completions_test.go b/vendor/github.com/spf13/cobra/zsh_completions_test.go new file mode 100644 index 000000000..08b851591 --- /dev/null +++ b/vendor/github.com/spf13/cobra/zsh_completions_test.go @@ -0,0 +1,88 @@ +package cobra + +import ( + "bytes" + "strings" + "testing" +) + +func TestZshCompletion(t *testing.T) { + tcs := []struct { + name string + root *Command + expectedExpressions []string + }{ + { + name: "trivial", + root: &Command{Use: "trivialapp"}, + expectedExpressions: []string{"#compdef trivial"}, + }, + { + name: "linear", + root: func() *Command { + r := &Command{Use: "linear"} + + sub1 := &Command{Use: "sub1"} + r.AddCommand(sub1) + + sub2 := &Command{Use: "sub2"} + sub1.AddCommand(sub2) + + sub3 := &Command{Use: "sub3"} + sub2.AddCommand(sub3) + return r + }(), + expectedExpressions: []string{"sub1", "sub2", "sub3"}, + }, + { + name: "flat", + root: func() *Command { + r := &Command{Use: "flat"} + r.AddCommand(&Command{Use: "c1"}) + r.AddCommand(&Command{Use: "c2"}) + return r + }(), + expectedExpressions: []string{"(c1 c2)"}, + }, + { + name: "tree", + root: func() *Command { + r := &Command{Use: "tree"} + + sub1 := &Command{Use: "sub1"} + r.AddCommand(sub1) + + sub11 := &Command{Use: "sub11"} + sub12 := &Command{Use: "sub12"} + + sub1.AddCommand(sub11) + sub1.AddCommand(sub12) + + sub2 := &Command{Use: "sub2"} + r.AddCommand(sub2) + + sub21 := &Command{Use: "sub21"} + sub22 := &Command{Use: "sub22"} + + sub2.AddCommand(sub21) + sub2.AddCommand(sub22) + + return r + }(), + expectedExpressions: []string{"(sub11 sub12)", "(sub21 sub22)"}, + }, + } + + for _, tc := range tcs { + t.Run(tc.name, func(t *testing.T) { + buf := new(bytes.Buffer) + tc.root.GenZshCompletion(buf) + completion := buf.String() + for _, expectedExpression := range tc.expectedExpressions { + if !strings.Contains(completion, expectedExpression) { + t.Errorf("expected completion to contain '%v' somewhere; got '%v'", expectedExpression, completion) + } + } + }) + } +} diff --git a/vendor/golang.org/x/crypto/acme/acme.go b/vendor/golang.org/x/crypto/acme/acme.go index 4e409be6d..d6a09dd5b 100644 --- a/vendor/golang.org/x/crypto/acme/acme.go +++ b/vendor/golang.org/x/crypto/acme/acme.go @@ -51,38 +51,6 @@ const ( maxNonces = 100 ) -// CertOption is an optional argument type for Client methods which manipulate -// certificate data. -type CertOption interface { - privateCertOpt() -} - -// WithKey creates an option holding a private/public key pair. -// The private part signs a certificate, and the public part represents the signee. -func WithKey(key crypto.Signer) CertOption { - return &certOptKey{key} -} - -type certOptKey struct { - key crypto.Signer -} - -func (*certOptKey) privateCertOpt() {} - -// WithTemplate creates an option for specifying a certificate template. -// See x509.CreateCertificate for template usage details. -// -// In TLSSNIxChallengeCert methods, the template is also used as parent, -// resulting in a self-signed certificate. -// The DNSNames field of t is always overwritten for tls-sni challenge certs. -func WithTemplate(t *x509.Certificate) CertOption { - return (*certOptTemplate)(t) -} - -type certOptTemplate x509.Certificate - -func (*certOptTemplate) privateCertOpt() {} - // Client is an ACME client. // The only required field is Key. An example of creating a client with a new key // is as follows: diff --git a/vendor/golang.org/x/crypto/acme/types.go b/vendor/golang.org/x/crypto/acme/types.go index ab4de0b88..3e199749e 100644 --- a/vendor/golang.org/x/crypto/acme/types.go +++ b/vendor/golang.org/x/crypto/acme/types.go @@ -5,6 +5,8 @@ package acme import ( + "crypto" + "crypto/x509" "errors" "fmt" "net/http" @@ -293,3 +295,35 @@ func (e *wireError) error(h http.Header) *Error { Header: h, } } + +// CertOption is an optional argument type for the TLSSNIxChallengeCert methods for +// customizing a temporary certificate for TLS-SNI challenges. +type CertOption interface { + privateCertOpt() +} + +// WithKey creates an option holding a private/public key pair. +// The private part signs a certificate, and the public part represents the signee. +func WithKey(key crypto.Signer) CertOption { + return &certOptKey{key} +} + +type certOptKey struct { + key crypto.Signer +} + +func (*certOptKey) privateCertOpt() {} + +// WithTemplate creates an option for specifying a certificate template. +// See x509.CreateCertificate for template usage details. +// +// In TLSSNIxChallengeCert methods, the template is also used as parent, +// resulting in a self-signed certificate. +// The DNSNames field of t is always overwritten for tls-sni challenge certs. +func WithTemplate(t *x509.Certificate) CertOption { + return (*certOptTemplate)(t) +} + +type certOptTemplate x509.Certificate + +func (*certOptTemplate) privateCertOpt() {} diff --git a/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_generic.go b/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_generic.go index f9e8a3a2f..0f8efdbaa 100644 --- a/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_generic.go +++ b/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_generic.go @@ -167,9 +167,8 @@ func core(out *[64]byte, in *[16]byte, k *[32]byte) { } // XORKeyStream crypts bytes from in to out using the given key and counters. -// In and out may be the same slice but otherwise should not overlap. Counter -// contains the raw ChaCha20 counter bytes (i.e. block counter followed by -// nonce). +// In and out must overlap entirely or not at all. Counter contains the raw +// ChaCha20 counter bytes (i.e. block counter followed by nonce). func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { var block [64]byte var counterCopy [16]byte diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1.go b/vendor/golang.org/x/crypto/cryptobyte/asn1.go index 166e22d7b..88ec8b4fb 100644 --- a/vendor/golang.org/x/crypto/cryptobyte/asn1.go +++ b/vendor/golang.org/x/crypto/cryptobyte/asn1.go @@ -5,40 +5,30 @@ package cryptobyte import ( - "encoding/asn1" + encoding_asn1 "encoding/asn1" "fmt" "math/big" "reflect" "time" + + "golang.org/x/crypto/cryptobyte/asn1" ) // This file contains ASN.1-related methods for String and Builder. -// Tag represents an ASN.1 tag number and class (together also referred to as -// identifier octets). Methods in this package only support the low-tag-number -// form, i.e. a single identifier octet with bits 7-8 encoding the class and -// bits 1-6 encoding the tag number. -type Tag uint8 - -// Contructed returns t with the context-specific class bit set. -func (t Tag) ContextSpecific() Tag { return t | 0x80 } - -// Contructed returns t with the constructed class bit set. -func (t Tag) Constructed() Tag { return t | 0x20 } - // Builder // AddASN1Int64 appends a DER-encoded ASN.1 INTEGER. func (b *Builder) AddASN1Int64(v int64) { - b.addASN1Signed(asn1.TagInteger, v) + b.addASN1Signed(asn1.INTEGER, v) } // AddASN1Enum appends a DER-encoded ASN.1 ENUMERATION. func (b *Builder) AddASN1Enum(v int64) { - b.addASN1Signed(asn1.TagEnum, v) + b.addASN1Signed(asn1.ENUM, v) } -func (b *Builder) addASN1Signed(tag Tag, v int64) { +func (b *Builder) addASN1Signed(tag asn1.Tag, v int64) { b.AddASN1(tag, func(c *Builder) { length := 1 for i := v; i >= 0x80 || i < -0x80; i >>= 8 { @@ -54,7 +44,7 @@ func (b *Builder) addASN1Signed(tag Tag, v int64) { // AddASN1Uint64 appends a DER-encoded ASN.1 INTEGER. func (b *Builder) AddASN1Uint64(v uint64) { - b.AddASN1(asn1.TagInteger, func(c *Builder) { + b.AddASN1(asn1.INTEGER, func(c *Builder) { length := 1 for i := v; i >= 0x80; i >>= 8 { length++ @@ -73,7 +63,7 @@ func (b *Builder) AddASN1BigInt(n *big.Int) { return } - b.AddASN1(asn1.TagInteger, func(c *Builder) { + b.AddASN1(asn1.INTEGER, func(c *Builder) { if n.Sign() < 0 { // A negative number has to be converted to two's-complement form. So we // invert and subtract 1. If the most-significant-bit isn't set then @@ -103,7 +93,7 @@ func (b *Builder) AddASN1BigInt(n *big.Int) { // AddASN1OctetString appends a DER-encoded ASN.1 OCTET STRING. func (b *Builder) AddASN1OctetString(bytes []byte) { - b.AddASN1(asn1.TagOctetString, func(c *Builder) { + b.AddASN1(asn1.OCTET_STRING, func(c *Builder) { c.AddBytes(bytes) }) } @@ -116,27 +106,97 @@ func (b *Builder) AddASN1GeneralizedTime(t time.Time) { b.err = fmt.Errorf("cryptobyte: cannot represent %v as a GeneralizedTime", t) return } - b.AddASN1(asn1.TagGeneralizedTime, func(c *Builder) { + b.AddASN1(asn1.GeneralizedTime, func(c *Builder) { c.AddBytes([]byte(t.Format(generalizedTimeFormatStr))) }) } -// AddASN1BitString appends a DER-encoded ASN.1 BIT STRING. -func (b *Builder) AddASN1BitString(s asn1.BitString) { - // TODO(martinkr): Implement. - b.MarshalASN1(s) +// AddASN1BitString appends a DER-encoded ASN.1 BIT STRING. This does not +// support BIT STRINGs that are not a whole number of bytes. +func (b *Builder) AddASN1BitString(data []byte) { + b.AddASN1(asn1.BIT_STRING, func(b *Builder) { + b.AddUint8(0) + b.AddBytes(data) + }) } -// MarshalASN1 calls asn1.Marshal on its input and appends the result if +func (b *Builder) addBase128Int(n int64) { + var length int + if n == 0 { + length = 1 + } else { + for i := n; i > 0; i >>= 7 { + length++ + } + } + + for i := length - 1; i >= 0; i-- { + o := byte(n >> uint(i*7)) + o &= 0x7f + if i != 0 { + o |= 0x80 + } + + b.add(o) + } +} + +func isValidOID(oid encoding_asn1.ObjectIdentifier) bool { + if len(oid) < 2 { + return false + } + + if oid[0] > 2 || (oid[0] <= 1 && oid[1] >= 40) { + return false + } + + for _, v := range oid { + if v < 0 { + return false + } + } + + return true +} + +func (b *Builder) AddASN1ObjectIdentifier(oid encoding_asn1.ObjectIdentifier) { + b.AddASN1(asn1.OBJECT_IDENTIFIER, func(b *Builder) { + if !isValidOID(oid) { + b.err = fmt.Errorf("cryptobyte: invalid OID: %v", oid) + return + } + + b.addBase128Int(int64(oid[0])*40 + int64(oid[1])) + for _, v := range oid[2:] { + b.addBase128Int(int64(v)) + } + }) +} + +func (b *Builder) AddASN1Boolean(v bool) { + b.AddASN1(asn1.BOOLEAN, func(b *Builder) { + if v { + b.AddUint8(0xff) + } else { + b.AddUint8(0) + } + }) +} + +func (b *Builder) AddASN1NULL() { + b.add(uint8(asn1.NULL), 0) +} + +// MarshalASN1 calls encoding_asn1.Marshal on its input and appends the result if // successful or records an error if one occurred. func (b *Builder) MarshalASN1(v interface{}) { // NOTE(martinkr): This is somewhat of a hack to allow propagation of - // asn1.Marshal errors into Builder.err. N.B. if you call MarshalASN1 with a + // encoding_asn1.Marshal errors into Builder.err. N.B. if you call MarshalASN1 with a // value embedded into a struct, its tag information is lost. if b.err != nil { return } - bytes, err := asn1.Marshal(v) + bytes, err := encoding_asn1.Marshal(v) if err != nil { b.err = err return @@ -148,7 +208,7 @@ func (b *Builder) MarshalASN1(v interface{}) { // Tags greater than 30 are not supported and result in an error (i.e. // low-tag-number form only). The child builder passed to the // BuilderContinuation can be used to build the content of the ASN.1 object. -func (b *Builder) AddASN1(tag Tag, f BuilderContinuation) { +func (b *Builder) AddASN1(tag asn1.Tag, f BuilderContinuation) { if b.err != nil { return } @@ -164,6 +224,24 @@ func (b *Builder) AddASN1(tag Tag, f BuilderContinuation) { // String +func (s *String) ReadASN1Boolean(out *bool) bool { + var bytes String + if !s.ReadASN1(&bytes, asn1.INTEGER) || len(bytes) != 1 { + return false + } + + switch bytes[0] { + case 0: + *out = false + case 0xff: + *out = true + default: + return false + } + + return true +} + var bigIntType = reflect.TypeOf((*big.Int)(nil)).Elem() // ReadASN1Integer decodes an ASN.1 INTEGER into out and advances. If out does @@ -215,7 +293,7 @@ var bigOne = big.NewInt(1) func (s *String) readASN1BigInt(out *big.Int) bool { var bytes String - if !s.ReadASN1(&bytes, asn1.TagInteger) || !checkASN1Integer(bytes) { + if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) { return false } if bytes[0]&0x80 == 0x80 { @@ -235,7 +313,7 @@ func (s *String) readASN1BigInt(out *big.Int) bool { func (s *String) readASN1Int64(out *int64) bool { var bytes String - if !s.ReadASN1(&bytes, asn1.TagInteger) || !checkASN1Integer(bytes) || !asn1Signed(out, bytes) { + if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Signed(out, bytes) { return false } return true @@ -258,7 +336,7 @@ func asn1Signed(out *int64, n []byte) bool { func (s *String) readASN1Uint64(out *uint64) bool { var bytes String - if !s.ReadASN1(&bytes, asn1.TagInteger) || !checkASN1Integer(bytes) || !asn1Unsigned(out, bytes) { + if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Unsigned(out, bytes) { return false } return true @@ -286,7 +364,7 @@ func asn1Unsigned(out *uint64, n []byte) bool { func (s *String) ReadASN1Enum(out *int) bool { var bytes String var i int64 - if !s.ReadASN1(&bytes, asn1.TagEnum) || !checkASN1Integer(bytes) || !asn1Signed(&i, bytes) { + if !s.ReadASN1(&bytes, asn1.ENUM) || !checkASN1Integer(bytes) || !asn1Signed(&i, bytes) { return false } if int64(int(i)) != i { @@ -315,9 +393,9 @@ func (s *String) readBase128Int(out *int) bool { // ReadASN1ObjectIdentifier decodes an ASN.1 OBJECT IDENTIFIER into out and // advances. It returns true on success and false on error. -func (s *String) ReadASN1ObjectIdentifier(out *asn1.ObjectIdentifier) bool { +func (s *String) ReadASN1ObjectIdentifier(out *encoding_asn1.ObjectIdentifier) bool { var bytes String - if !s.ReadASN1(&bytes, asn1.TagOID) || len(bytes) == 0 { + if !s.ReadASN1(&bytes, asn1.OBJECT_IDENTIFIER) || len(bytes) == 0 { return false } @@ -356,7 +434,7 @@ func (s *String) ReadASN1ObjectIdentifier(out *asn1.ObjectIdentifier) bool { // advances. It returns true on success and false on error. func (s *String) ReadASN1GeneralizedTime(out *time.Time) bool { var bytes String - if !s.ReadASN1(&bytes, asn1.TagGeneralizedTime) { + if !s.ReadASN1(&bytes, asn1.GeneralizedTime) { return false } t := string(bytes) @@ -373,9 +451,9 @@ func (s *String) ReadASN1GeneralizedTime(out *time.Time) bool { // ReadASN1BitString decodes an ASN.1 BIT STRING into out and advances. It // returns true on success and false on error. -func (s *String) ReadASN1BitString(out *asn1.BitString) bool { +func (s *String) ReadASN1BitString(out *encoding_asn1.BitString) bool { var bytes String - if !s.ReadASN1(&bytes, asn1.TagBitString) || len(bytes) == 0 { + if !s.ReadASN1(&bytes, asn1.BIT_STRING) || len(bytes) == 0 { return false } @@ -392,10 +470,27 @@ func (s *String) ReadASN1BitString(out *asn1.BitString) bool { return true } +// ReadASN1BitString decodes an ASN.1 BIT STRING into out and advances. It is +// an error if the BIT STRING is not a whole number of bytes. This function +// returns true on success and false on error. +func (s *String) ReadASN1BitStringAsBytes(out *[]byte) bool { + var bytes String + if !s.ReadASN1(&bytes, asn1.BIT_STRING) || len(bytes) == 0 { + return false + } + + paddingBits := uint8(bytes[0]) + if paddingBits != 0 { + return false + } + *out = bytes[1:] + return true +} + // ReadASN1Bytes reads the contents of a DER-encoded ASN.1 element (not including // tag and length bytes) into out, and advances. The element must match the // given tag. It returns true on success and false on error. -func (s *String) ReadASN1Bytes(out *[]byte, tag Tag) bool { +func (s *String) ReadASN1Bytes(out *[]byte, tag asn1.Tag) bool { return s.ReadASN1((*String)(out), tag) } @@ -404,8 +499,8 @@ func (s *String) ReadASN1Bytes(out *[]byte, tag Tag) bool { // given tag. It returns true on success and false on error. // // Tags greater than 30 are not supported (i.e. low-tag-number format only). -func (s *String) ReadASN1(out *String, tag Tag) bool { - var t Tag +func (s *String) ReadASN1(out *String, tag asn1.Tag) bool { + var t asn1.Tag if !s.ReadAnyASN1(out, &t) || t != tag { return false } @@ -417,8 +512,8 @@ func (s *String) ReadASN1(out *String, tag Tag) bool { // given tag. It returns true on success and false on error. // // Tags greater than 30 are not supported (i.e. low-tag-number format only). -func (s *String) ReadASN1Element(out *String, tag Tag) bool { - var t Tag +func (s *String) ReadASN1Element(out *String, tag asn1.Tag) bool { + var t asn1.Tag if !s.ReadAnyASN1Element(out, &t) || t != tag { return false } @@ -430,7 +525,7 @@ func (s *String) ReadASN1Element(out *String, tag Tag) bool { // returns true on success and false on error. // // Tags greater than 30 are not supported (i.e. low-tag-number format only). -func (s *String) ReadAnyASN1(out *String, outTag *Tag) bool { +func (s *String) ReadAnyASN1(out *String, outTag *asn1.Tag) bool { return s.readASN1(out, outTag, true /* skip header */) } @@ -439,24 +534,30 @@ func (s *String) ReadAnyASN1(out *String, outTag *Tag) bool { // advances. It returns true on success and false on error. // // Tags greater than 30 are not supported (i.e. low-tag-number format only). -func (s *String) ReadAnyASN1Element(out *String, outTag *Tag) bool { +func (s *String) ReadAnyASN1Element(out *String, outTag *asn1.Tag) bool { return s.readASN1(out, outTag, false /* include header */) } // PeekASN1Tag returns true if the next ASN.1 value on the string starts with // the given tag. -func (s String) PeekASN1Tag(tag Tag) bool { +func (s String) PeekASN1Tag(tag asn1.Tag) bool { if len(s) == 0 { return false } - return Tag(s[0]) == tag + return asn1.Tag(s[0]) == tag } -// ReadOptionalASN1 attempts to read the contents of a DER-encoded ASN.Element -// (not including tag and length bytes) tagged with the given tag into out. It -// stores whether an element with the tag was found in outPresent, unless -// outPresent is nil. It returns true on success and false on error. -func (s *String) ReadOptionalASN1(out *String, outPresent *bool, tag Tag) bool { +// SkipASN1 reads and discards an ASN.1 element with the given tag. +func (s *String) SkipASN1(tag asn1.Tag) bool { + var unused String + return s.ReadASN1(&unused, tag) +} + +// ReadOptionalASN1 attempts to read the contents of a DER-encoded ASN.1 +// element (not including tag and length bytes) tagged with the given tag into +// out. It stores whether an element with the tag was found in outPresent, +// unless outPresent is nil. It returns true on success and false on error. +func (s *String) ReadOptionalASN1(out *String, outPresent *bool, tag asn1.Tag) bool { present := s.PeekASN1Tag(tag) if outPresent != nil { *outPresent = present @@ -467,12 +568,22 @@ func (s *String) ReadOptionalASN1(out *String, outPresent *bool, tag Tag) bool { return true } +// SkipOptionalASN1 advances s over an ASN.1 element with the given tag, or +// else leaves s unchanged. +func (s *String) SkipOptionalASN1(tag asn1.Tag) bool { + if !s.PeekASN1Tag(tag) { + return true + } + var unused String + return s.ReadASN1(&unused, tag) +} + // ReadOptionalASN1Integer attempts to read an optional ASN.1 INTEGER // explicitly tagged with tag into out and advances. If no element with a // matching tag is present, it writes defaultValue into out instead. If out // does not point to an integer or to a big.Int, it panics. It returns true on // success and false on error. -func (s *String) ReadOptionalASN1Integer(out interface{}, tag Tag, defaultValue interface{}) bool { +func (s *String) ReadOptionalASN1Integer(out interface{}, tag asn1.Tag, defaultValue interface{}) bool { if reflect.TypeOf(out).Kind() != reflect.Ptr { panic("out is not a pointer") } @@ -510,7 +621,7 @@ func (s *String) ReadOptionalASN1Integer(out interface{}, tag Tag, defaultValue // explicitly tagged with tag into out and advances. If no element with a // matching tag is present, it writes defaultValue into out instead. It returns // true on success and false on error. -func (s *String) ReadOptionalASN1OctetString(out *[]byte, outPresent *bool, tag Tag) bool { +func (s *String) ReadOptionalASN1OctetString(out *[]byte, outPresent *bool, tag asn1.Tag) bool { var present bool var child String if !s.ReadOptionalASN1(&child, &present, tag) { @@ -521,7 +632,7 @@ func (s *String) ReadOptionalASN1OctetString(out *[]byte, outPresent *bool, tag } if present { var oct String - if !child.ReadASN1(&oct, asn1.TagOctetString) || !child.Empty() { + if !child.ReadASN1(&oct, asn1.OCTET_STRING) || !child.Empty() { return false } *out = oct @@ -531,7 +642,24 @@ func (s *String) ReadOptionalASN1OctetString(out *[]byte, outPresent *bool, tag return true } -func (s *String) readASN1(out *String, outTag *Tag, skipHeader bool) bool { +// ReadOptionalASN1Boolean sets *out to the value of the next ASN.1 BOOLEAN or, +// if the next bytes are not an ASN.1 BOOLEAN, to the value of defaultValue. +func (s *String) ReadOptionalASN1Boolean(out *bool, defaultValue bool) bool { + var present bool + var child String + if !s.ReadOptionalASN1(&child, &present, asn1.BOOLEAN) { + return false + } + + if !present { + *out = defaultValue + return true + } + + return s.ReadASN1Boolean(out) +} + +func (s *String) readASN1(out *String, outTag *asn1.Tag, skipHeader bool) bool { if len(*s) < 2 { return false } @@ -547,7 +675,7 @@ func (s *String) readASN1(out *String, outTag *Tag, skipHeader bool) bool { } if outTag != nil { - *outTag = Tag(tag) + *outTag = asn1.Tag(tag) } // ITU-T X.690 section 8.1.3 diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go b/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go new file mode 100644 index 000000000..cda8e3edf --- /dev/null +++ b/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go @@ -0,0 +1,46 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package asn1 contains supporting types for parsing and building ASN.1 +// messages with the cryptobyte package. +package asn1 // import "golang.org/x/crypto/cryptobyte/asn1" + +// Tag represents an ASN.1 identifier octet, consisting of a tag number +// (indicating a type) and class (such as context-specific or constructed). +// +// Methods in the cryptobyte package only support the low-tag-number form, i.e. +// a single identifier octet with bits 7-8 encoding the class and bits 1-6 +// encoding the tag number. +type Tag uint8 + +const ( + classConstructed = 0x20 + classContextSpecific = 0x80 +) + +// Constructed returns t with the constructed class bit set. +func (t Tag) Constructed() Tag { return t | classConstructed } + +// ContextSpecific returns t with the context-specific class bit set. +func (t Tag) ContextSpecific() Tag { return t | classContextSpecific } + +// The following is a list of standard tag and class combinations. +const ( + BOOLEAN = Tag(1) + INTEGER = Tag(2) + BIT_STRING = Tag(3) + OCTET_STRING = Tag(4) + NULL = Tag(5) + OBJECT_IDENTIFIER = Tag(6) + ENUM = Tag(10) + UTF8String = Tag(12) + SEQUENCE = Tag(16 | classConstructed) + SET = Tag(17 | classConstructed) + PrintableString = Tag(19) + T61String = Tag(20) + IA5String = Tag(22) + UTCTime = Tag(23) + GeneralizedTime = Tag(24) + GeneralString = Tag(27) +) diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1_test.go b/vendor/golang.org/x/crypto/cryptobyte/asn1_test.go index c8c187032..ee6674a2f 100644 --- a/vendor/golang.org/x/crypto/cryptobyte/asn1_test.go +++ b/vendor/golang.org/x/crypto/cryptobyte/asn1_test.go @@ -6,17 +6,19 @@ package cryptobyte import ( "bytes" - "encoding/asn1" + encoding_asn1 "encoding/asn1" "math/big" "reflect" "testing" "time" + + "golang.org/x/crypto/cryptobyte/asn1" ) type readASN1Test struct { name string in []byte - tag Tag + tag asn1.Tag ok bool out interface{} } @@ -194,7 +196,7 @@ func TestReadASN1IntegerInvalid(t *testing.T) { } } -func TestReadASN1ObjectIdentifier(t *testing.T) { +func TestASN1ObjectIdentifier(t *testing.T) { testData := []struct { in []byte ok bool @@ -212,10 +214,23 @@ func TestReadASN1ObjectIdentifier(t *testing.T) { for i, test := range testData { in := String(test.in) - var out asn1.ObjectIdentifier + var out encoding_asn1.ObjectIdentifier ok := in.ReadASN1ObjectIdentifier(&out) if ok != test.ok || ok && !out.Equal(test.out) { t.Errorf("#%d: in.ReadASN1ObjectIdentifier() = %v, want %v; out = %v, want %v", i, ok, test.ok, out, test.out) + continue + } + + var b Builder + b.AddASN1ObjectIdentifier(out) + result, err := b.Bytes() + if builderOk := err == nil; test.ok != builderOk { + t.Errorf("#%d: error from Builder.Bytes: %s", i, err) + continue + } + if test.ok && !bytes.Equal(result, test.in) { + t.Errorf("#%d: reserialisation didn't match, got %x, want %x", i, result, test.in) + continue } } } @@ -250,7 +265,7 @@ func TestReadASN1GeneralizedTime(t *testing.T) { {"201001020304-10Z", false, time.Time{}}, } for i, test := range testData { - in := String(append([]byte{asn1.TagGeneralizedTime, byte(len(test.in))}, test.in...)) + in := String(append([]byte{byte(asn1.GeneralizedTime), byte(len(test.in))}, test.in...)) var out time.Time ok := in.ReadASN1GeneralizedTime(&out) if ok != test.ok || ok && !reflect.DeepEqual(out, test.out) { @@ -263,20 +278,20 @@ func TestReadASN1BitString(t *testing.T) { testData := []struct { in []byte ok bool - out asn1.BitString + out encoding_asn1.BitString }{ - {[]byte{}, false, asn1.BitString{}}, - {[]byte{0x00}, true, asn1.BitString{}}, - {[]byte{0x07, 0x00}, true, asn1.BitString{Bytes: []byte{0}, BitLength: 1}}, - {[]byte{0x07, 0x01}, false, asn1.BitString{}}, - {[]byte{0x07, 0x40}, false, asn1.BitString{}}, - {[]byte{0x08, 0x00}, false, asn1.BitString{}}, - {[]byte{0xff}, false, asn1.BitString{}}, - {[]byte{0xfe, 0x00}, false, asn1.BitString{}}, + {[]byte{}, false, encoding_asn1.BitString{}}, + {[]byte{0x00}, true, encoding_asn1.BitString{}}, + {[]byte{0x07, 0x00}, true, encoding_asn1.BitString{Bytes: []byte{0}, BitLength: 1}}, + {[]byte{0x07, 0x01}, false, encoding_asn1.BitString{}}, + {[]byte{0x07, 0x40}, false, encoding_asn1.BitString{}}, + {[]byte{0x08, 0x00}, false, encoding_asn1.BitString{}}, + {[]byte{0xff}, false, encoding_asn1.BitString{}}, + {[]byte{0xfe, 0x00}, false, encoding_asn1.BitString{}}, } for i, test := range testData { in := String(append([]byte{3, byte(len(test.in))}, test.in...)) - var out asn1.BitString + var out encoding_asn1.BitString ok := in.ReadASN1BitString(&out) if ok != test.ok || ok && (!bytes.Equal(out.Bytes, test.out.Bytes) || out.BitLength != test.out.BitLength) { t.Errorf("#%d: in.ReadASN1BitString() = %v, want %v; out = %v, want %v", i, ok, test.ok, out, test.out) diff --git a/vendor/golang.org/x/crypto/cryptobyte/builder.go b/vendor/golang.org/x/crypto/cryptobyte/builder.go index 9883fb3c3..29b4c7641 100644 --- a/vendor/golang.org/x/crypto/cryptobyte/builder.go +++ b/vendor/golang.org/x/crypto/cryptobyte/builder.go @@ -10,15 +10,25 @@ import ( ) // A Builder builds byte strings from fixed-length and length-prefixed values. +// Builders either allocate space as needed, or are ‘fixed’, which means that +// they write into a given buffer and produce an error if it's exhausted. +// // The zero value is a usable Builder that allocates space as needed. +// +// Simple values are marshaled and appended to a Builder using methods on the +// Builder. Length-prefixed values are marshaled by providing a +// BuilderContinuation, which is a function that writes the inner contents of +// the value to a given Builder. See the documentation for BuilderContinuation +// for details. type Builder struct { - err error - result []byte - fixedSize bool - child *Builder - offset int - pendingLenLen int - pendingIsASN1 bool + err error + result []byte + fixedSize bool + child *Builder + offset int + pendingLenLen int + pendingIsASN1 bool + inContinuation *bool } // NewBuilder creates a Builder that appends its output to the given buffer. @@ -86,9 +96,9 @@ func (b *Builder) AddBytes(v []byte) { // BuilderContinuation is continuation-passing interface for building // length-prefixed byte sequences. Builder methods for length-prefixed -// sequences (AddUint8LengthPrefixed etc.) will invoke the BuilderContinuation +// sequences (AddUint8LengthPrefixed etc) will invoke the BuilderContinuation // supplied to them. The child builder passed to the continuation can be used -// to build the content of the length-prefixed sequence. Example: +// to build the content of the length-prefixed sequence. For example: // // parent := cryptobyte.NewBuilder() // parent.AddUint8LengthPrefixed(func (child *Builder) { @@ -102,8 +112,19 @@ func (b *Builder) AddBytes(v []byte) { // length prefix. After the continuation returns, the child must be considered // invalid, i.e. users must not store any copies or references of the child // that outlive the continuation. +// +// If the continuation panics with a value of type BuildError then the inner +// error will be returned as the error from Bytes. If the child panics +// otherwise then Bytes will repanic with the same value. type BuilderContinuation func(child *Builder) +// BuildError wraps an error. If a BuilderContinuation panics with this value, +// the panic will be recovered and the inner error will be returned from +// Builder.Bytes. +type BuildError struct { + Err error +} + // AddUint8LengthPrefixed adds a 8-bit length-prefixed byte sequence. func (b *Builder) AddUint8LengthPrefixed(f BuilderContinuation) { b.addLengthPrefixed(1, false, f) @@ -119,6 +140,34 @@ func (b *Builder) AddUint24LengthPrefixed(f BuilderContinuation) { b.addLengthPrefixed(3, false, f) } +// AddUint32LengthPrefixed adds a big-endian, 32-bit length-prefixed byte sequence. +func (b *Builder) AddUint32LengthPrefixed(f BuilderContinuation) { + b.addLengthPrefixed(4, false, f) +} + +func (b *Builder) callContinuation(f BuilderContinuation, arg *Builder) { + if !*b.inContinuation { + *b.inContinuation = true + + defer func() { + *b.inContinuation = false + + r := recover() + if r == nil { + return + } + + if buildError, ok := r.(BuildError); ok { + b.err = buildError.Err + } else { + panic(r) + } + }() + } + + f(arg) +} + func (b *Builder) addLengthPrefixed(lenLen int, isASN1 bool, f BuilderContinuation) { // Subsequent writes can be ignored if the builder has encountered an error. if b.err != nil { @@ -128,15 +177,20 @@ func (b *Builder) addLengthPrefixed(lenLen int, isASN1 bool, f BuilderContinuati offset := len(b.result) b.add(make([]byte, lenLen)...) - b.child = &Builder{ - result: b.result, - fixedSize: b.fixedSize, - offset: offset, - pendingLenLen: lenLen, - pendingIsASN1: isASN1, + if b.inContinuation == nil { + b.inContinuation = new(bool) } - f(b.child) + b.child = &Builder{ + result: b.result, + fixedSize: b.fixedSize, + offset: offset, + pendingLenLen: lenLen, + pendingIsASN1: isASN1, + inContinuation: b.inContinuation, + } + + b.callContinuation(f, b.child) b.flushChild() if b.child != nil { panic("cryptobyte: internal error") diff --git a/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go b/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go index 49c61dca4..f294dd552 100644 --- a/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go +++ b/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go @@ -6,6 +6,7 @@ package cryptobyte import ( "bytes" + "errors" "fmt" "testing" ) @@ -18,6 +19,54 @@ func builderBytesEq(b *Builder, want ...byte) error { return nil } +func TestContinuationError(t *testing.T) { + const errorStr = "TestContinuationError" + var b Builder + b.AddUint8LengthPrefixed(func(b *Builder) { + b.AddUint8(1) + panic(BuildError{Err: errors.New(errorStr)}) + }) + + ret, err := b.Bytes() + if ret != nil { + t.Error("expected nil result") + } + if err == nil { + t.Fatal("unexpected nil error") + } + if s := err.Error(); s != errorStr { + t.Errorf("expected error %q, got %v", errorStr, s) + } +} + +func TestContinuationNonError(t *testing.T) { + defer func() { + recover() + }() + + var b Builder + b.AddUint8LengthPrefixed(func(b *Builder) { + b.AddUint8(1) + panic(1) + }) + + t.Error("Builder did not panic") +} + +func TestGeneratedPanic(t *testing.T) { + defer func() { + recover() + }() + + var b Builder + b.AddUint8LengthPrefixed(func(b *Builder) { + var p *byte + *p = 0 + }) + + t.Error("Builder did not panic") +} + func TestBytes(t *testing.T) { var b Builder v := []byte("foobarbaz") diff --git a/vendor/golang.org/x/crypto/cryptobyte/example_test.go b/vendor/golang.org/x/crypto/cryptobyte/example_test.go index 7d3c06e12..86c098adf 100644 --- a/vendor/golang.org/x/crypto/cryptobyte/example_test.go +++ b/vendor/golang.org/x/crypto/cryptobyte/example_test.go @@ -5,9 +5,11 @@ package cryptobyte_test import ( - "encoding/asn1" + "errors" "fmt" + "golang.org/x/crypto/cryptobyte" + "golang.org/x/crypto/cryptobyte/asn1" ) func ExampleString_lengthPrefixed() { @@ -37,7 +39,7 @@ func ExampleString_lengthPrefixed() { fmt.Printf("%#v\n", result) } -func ExampleString_asn1() { +func ExampleString_aSN1() { // This is an example of parsing ASN.1 data that looks like: // Foo ::= SEQUENCE { // version [6] INTEGER DEFAULT 0 @@ -51,12 +53,12 @@ func ExampleString_asn1() { data, inner, versionBytes cryptobyte.String haveVersion bool ) - if !input.ReadASN1(&inner, cryptobyte.Tag(asn1.TagSequence).Constructed()) || + if !input.ReadASN1(&inner, asn1.SEQUENCE) || !input.Empty() || - !inner.ReadOptionalASN1(&versionBytes, &haveVersion, cryptobyte.Tag(6).Constructed().ContextSpecific()) || + !inner.ReadOptionalASN1(&versionBytes, &haveVersion, asn1.Tag(6).Constructed().ContextSpecific()) || (haveVersion && !versionBytes.ReadASN1Integer(&version)) || (haveVersion && !versionBytes.Empty()) || - !inner.ReadASN1(&data, asn1.TagOctetString) || + !inner.ReadASN1(&data, asn1.OCTET_STRING) || !inner.Empty() { panic("bad format") } @@ -65,7 +67,7 @@ func ExampleString_asn1() { fmt.Printf("haveVersion: %t, version: %d, data: %s\n", haveVersion, version, string(data)) } -func ExampleBuilder_asn1() { +func ExampleBuilder_aSN1() { // This is an example of building ASN.1 data that looks like: // Foo ::= SEQUENCE { // version [6] INTEGER DEFAULT 0 @@ -77,9 +79,9 @@ func ExampleBuilder_asn1() { const defaultVersion = 0 var b cryptobyte.Builder - b.AddASN1(cryptobyte.Tag(asn1.TagSequence).Constructed(), func(b *cryptobyte.Builder) { + b.AddASN1(asn1.SEQUENCE, func(b *cryptobyte.Builder) { if version != defaultVersion { - b.AddASN1(cryptobyte.Tag(6).Constructed().ContextSpecific(), func(b *cryptobyte.Builder) { + b.AddASN1(asn1.Tag(6).Constructed().ContextSpecific(), func(b *cryptobyte.Builder) { b.AddASN1Int64(version) }) } @@ -118,3 +120,35 @@ func ExampleBuilder_lengthPrefixed() { // Output: 000c0568656c6c6f05776f726c64 fmt.Printf("%x\n", result) } + +func ExampleBuilder_lengthPrefixOverflow() { + // Writing more data that can be expressed by the length prefix results + // in an error from Bytes(). + + tooLarge := make([]byte, 256) + + var b cryptobyte.Builder + b.AddUint8LengthPrefixed(func(b *cryptobyte.Builder) { + b.AddBytes(tooLarge) + }) + + result, err := b.Bytes() + fmt.Printf("len=%d err=%s\n", len(result), err) + + // Output: len=0 err=cryptobyte: pending child length 256 exceeds 1-byte length prefix +} + +func ExampleBuilderContinuation_errorHandling() { + var b cryptobyte.Builder + // Continuations that panic with a BuildError will cause Bytes to + // return the inner error. + b.AddUint16LengthPrefixed(func(b *cryptobyte.Builder) { + b.AddUint32(0) + panic(cryptobyte.BuildError{Err: errors.New("example error")}) + }) + + result, err := b.Bytes() + fmt.Printf("len=%d err=%s\n", len(result), err) + + // Output: len=0 err=example error +} diff --git a/vendor/golang.org/x/crypto/cryptobyte/string.go b/vendor/golang.org/x/crypto/cryptobyte/string.go index 678033611..7636fb9c8 100644 --- a/vendor/golang.org/x/crypto/cryptobyte/string.go +++ b/vendor/golang.org/x/crypto/cryptobyte/string.go @@ -2,9 +2,19 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Package cryptobyte implements building and parsing of byte strings for -// DER-encoded ASN.1 and TLS messages. See the examples for the Builder and -// String types to get started. +// Package cryptobyte contains types that help with parsing and constructing +// length-prefixed, binary messages, including ASN.1 DER. (The asn1 subpackage +// contains useful ASN.1 constants.) +// +// The String type is for parsing. It wraps a []byte slice and provides helper +// functions for consuming structures, value by value. +// +// The Builder type is for constructing messages. It providers helper functions +// for appending values and also for appending length-prefixed submessages – +// without having to worry about calculating the length prefix ahead of time. +// +// See the documentation and examples for the Builder and String types to get +// started. package cryptobyte // import "golang.org/x/crypto/cryptobyte" // String represents a string of bytes. It provides methods for parsing diff --git a/vendor/golang.org/x/crypto/ed25519/ed25519.go b/vendor/golang.org/x/crypto/ed25519/ed25519.go index 9b07accb6..16cd38546 100644 --- a/vendor/golang.org/x/crypto/ed25519/ed25519.go +++ b/vendor/golang.org/x/crypto/ed25519/ed25519.go @@ -13,10 +13,10 @@ package ed25519 // from SUPERCOP. import ( + "bytes" "crypto" cryptorand "crypto/rand" "crypto/sha512" - "crypto/subtle" "errors" "io" "strconv" @@ -177,5 +177,5 @@ func Verify(publicKey PublicKey, message, sig []byte) bool { var checkR [32]byte R.ToBytes(&checkR) - return subtle.ConstantTimeCompare(sig[:32], checkR[:]) == 1 + return bytes.Equal(sig[:32], checkR[:]) } diff --git a/vendor/golang.org/x/crypto/nacl/auth/auth.go b/vendor/golang.org/x/crypto/nacl/auth/auth.go new file mode 100644 index 000000000..0835d3bf9 --- /dev/null +++ b/vendor/golang.org/x/crypto/nacl/auth/auth.go @@ -0,0 +1,58 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package auth authenticates a message using a secret key. + +The Sum function, viewed as a function of the message for a uniform random +key, is designed to meet the standard notion of unforgeability. This means +that an attacker cannot find authenticators for any messages not authenticated +by the sender, even if the attacker has adaptively influenced the messages +authenticated by the sender. For a formal definition see, e.g., Section 2.4 +of Bellare, Kilian, and Rogaway, "The security of the cipher block chaining +message authentication code," Journal of Computer and System Sciences 61 (2000), +362–399; http://www-cse.ucsd.edu/~mihir/papers/cbc.html. + +auth does not make any promises regarding "strong" unforgeability; perhaps +one valid authenticator can be converted into another valid authenticator for +the same message. NaCl also does not make any promises regarding "truncated +unforgeability." + +This package is interoperable with NaCl: https://nacl.cr.yp.to/auth.html. +*/ +package auth + +import ( + "crypto/hmac" + "crypto/sha512" +) + +const ( + // Size is the size, in bytes, of an authenticated digest. + Size = 32 + // KeySize is the size, in bytes, of an authentication key. + KeySize = 32 +) + +// Sum generates an authenticator for m using a secret key and returns the +// 32-byte digest. +func Sum(m []byte, key *[KeySize]byte) *[Size]byte { + mac := hmac.New(sha512.New, key[:]) + mac.Write(m) + out := new([KeySize]byte) + copy(out[:], mac.Sum(nil)[:Size]) + return out +} + +// Verify checks that digest is a valid authenticator of message m under the +// given secret key. Verify does not leak timing information. +func Verify(digest []byte, m []byte, key *[32]byte) bool { + if len(digest) != Size { + return false + } + mac := hmac.New(sha512.New, key[:]) + mac.Write(m) + expectedMAC := mac.Sum(nil) // first 256 bits of 512-bit sum + return hmac.Equal(digest, expectedMAC[:Size]) +} diff --git a/vendor/golang.org/x/crypto/nacl/auth/auth_test.go b/vendor/golang.org/x/crypto/nacl/auth/auth_test.go new file mode 100644 index 000000000..92074b50b --- /dev/null +++ b/vendor/golang.org/x/crypto/nacl/auth/auth_test.go @@ -0,0 +1,172 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package auth + +import ( + "bytes" + rand "crypto/rand" + mrand "math/rand" + "testing" +) + +// Test cases are from RFC 4231, and match those present in the tests directory +// of the download here: https://nacl.cr.yp.to/install.html +var testCases = []struct { + key [32]byte + msg []byte + out [32]byte +}{ + { + key: [32]byte{ + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b, + }, + msg: []byte("Hi There"), + out: [32]byte{ + 0x87, 0xaa, 0x7c, 0xde, 0xa5, 0xef, 0x61, 0x9d, + 0x4f, 0xf0, 0xb4, 0x24, 0x1a, 0x1d, 0x6c, 0xb0, + 0x23, 0x79, 0xf4, 0xe2, 0xce, 0x4e, 0xc2, 0x78, + 0x7a, 0xd0, 0xb3, 0x05, 0x45, 0xe1, 0x7c, 0xde, + }, + }, + { + key: [32]byte{'J', 'e', 'f', 'e'}, + msg: []byte("what do ya want for nothing?"), + out: [32]byte{ + 0x16, 0x4b, 0x7a, 0x7b, 0xfc, 0xf8, 0x19, 0xe2, + 0xe3, 0x95, 0xfb, 0xe7, 0x3b, 0x56, 0xe0, 0xa3, + 0x87, 0xbd, 0x64, 0x22, 0x2e, 0x83, 0x1f, 0xd6, + 0x10, 0x27, 0x0c, 0xd7, 0xea, 0x25, 0x05, 0x54, + }, + }, + { + key: [32]byte{ + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, + }, + msg: []byte{ // 50 bytes of 0xdd + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, + }, + out: [32]byte{ + 0xfa, 0x73, 0xb0, 0x08, 0x9d, 0x56, 0xa2, 0x84, + 0xef, 0xb0, 0xf0, 0x75, 0x6c, 0x89, 0x0b, 0xe9, + 0xb1, 0xb5, 0xdb, 0xdd, 0x8e, 0xe8, 0x1a, 0x36, + 0x55, 0xf8, 0x3e, 0x33, 0xb2, 0x27, 0x9d, 0x39, + }, + }, + { + key: [32]byte{ + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, + }, + msg: []byte{ + 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, + 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, + 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, + 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, + 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, + 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, + 0xcd, 0xcd, + }, + out: [32]byte{ + 0xb0, 0xba, 0x46, 0x56, 0x37, 0x45, 0x8c, 0x69, + 0x90, 0xe5, 0xa8, 0xc5, 0xf6, 0x1d, 0x4a, 0xf7, + 0xe5, 0x76, 0xd9, 0x7f, 0xf9, 0x4b, 0x87, 0x2d, + 0xe7, 0x6f, 0x80, 0x50, 0x36, 0x1e, 0xe3, 0xdb, + }, + }, +} + +func TestSum(t *testing.T) { + for i, test := range testCases { + tag := Sum(test.msg, &test.key) + if !bytes.Equal(tag[:], test.out[:]) { + t.Errorf("#%d: Sum: got\n%x\nwant\n%x", i, tag, test.out) + } + } +} + +func TestVerify(t *testing.T) { + wrongMsg := []byte("unknown msg") + + for i, test := range testCases { + if !Verify(test.out[:], test.msg, &test.key) { + t.Errorf("#%d: Verify(%x, %q, %x) failed", i, test.out, test.msg, test.key) + } + if Verify(test.out[:], wrongMsg, &test.key) { + t.Errorf("#%d: Verify(%x, %q, %x) unexpectedly passed", i, test.out, wrongMsg, test.key) + } + } +} + +func TestStress(t *testing.T) { + if testing.Short() { + t.Skip("exhaustiveness test") + } + + var key [32]byte + msg := make([]byte, 10000) + prng := mrand.New(mrand.NewSource(0)) + + // copied from tests/auth5.c in nacl + for i := 0; i < 10000; i++ { + if _, err := rand.Read(key[:]); err != nil { + t.Fatal(err) + } + if _, err := rand.Read(msg[:i]); err != nil { + t.Fatal(err) + } + tag := Sum(msg[:i], &key) + if !Verify(tag[:], msg[:i], &key) { + t.Errorf("#%d: unexpected failure from Verify", i) + } + if i > 0 { + msgIndex := prng.Intn(i) + oldMsgByte := msg[msgIndex] + msg[msgIndex] += byte(1 + prng.Intn(255)) + if Verify(tag[:], msg[:i], &key) { + t.Errorf("#%d: unexpected success from Verify after corrupting message", i) + } + msg[msgIndex] = oldMsgByte + + tag[prng.Intn(len(tag))] += byte(1 + prng.Intn(255)) + if Verify(tag[:], msg[:i], &key) { + t.Errorf("#%d: unexpected success from Verify after corrupting authenticator", i) + } + } + } +} + +func BenchmarkAuth(b *testing.B) { + var key [32]byte + if _, err := rand.Read(key[:]); err != nil { + b.Fatal(err) + } + buf := make([]byte, 1024) + if _, err := rand.Read(buf[:]); err != nil { + b.Fatal(err) + } + + b.SetBytes(int64(len(buf))) + b.ReportAllocs() + b.ResetTimer() + + for i := 0; i < b.N; i++ { + tag := Sum(buf, &key) + if Verify(tag[:], buf, &key) == false { + b.Fatal("unexpected failure from Verify") + } + } +} diff --git a/vendor/golang.org/x/crypto/nacl/auth/example_test.go b/vendor/golang.org/x/crypto/nacl/auth/example_test.go new file mode 100644 index 000000000..02a2cd6c4 --- /dev/null +++ b/vendor/golang.org/x/crypto/nacl/auth/example_test.go @@ -0,0 +1,36 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package auth_test + +import ( + "encoding/hex" + "fmt" + + "golang.org/x/crypto/nacl/auth" +) + +func Example() { + // Load your secret key from a safe place and reuse it across multiple + // Sum calls. (Obviously don't use this example key for anything + // real.) If you want to convert a passphrase to a key, use a suitable + // package like bcrypt or scrypt. + secretKeyBytes, err := hex.DecodeString("6368616e676520746869732070617373776f726420746f206120736563726574") + if err != nil { + panic(err) + } + + var secretKey [32]byte + copy(secretKey[:], secretKeyBytes) + + mac := auth.Sum([]byte("hello world"), &secretKey) + fmt.Printf("%x\n", *mac) + result := auth.Verify(mac[:], []byte("hello world"), &secretKey) + fmt.Println(result) + badResult := auth.Verify(mac[:], []byte("different message"), &secretKey) + fmt.Println(badResult) + // Output: eca5a521f3d77b63f567fb0cb6f5f2d200641bc8dada42f60c5f881260c30317 + // true + // false +} diff --git a/vendor/golang.org/x/crypto/nacl/box/box.go b/vendor/golang.org/x/crypto/nacl/box/box.go index 7ed1864f7..31b697be4 100644 --- a/vendor/golang.org/x/crypto/nacl/box/box.go +++ b/vendor/golang.org/x/crypto/nacl/box/box.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. /* -Package box authenticates and encrypts messages using public-key cryptography. +Package box authenticates and encrypts small messages using public-key cryptography. Box uses Curve25519, XSalsa20 and Poly1305 to encrypt and authenticate messages. The length of messages is not hidden. @@ -13,6 +13,23 @@ example, by using nonce 1 for the first message, nonce 2 for the second message, etc. Nonces are long enough that randomly generated nonces have negligible risk of collision. +Messages should be small because: + +1. The whole message needs to be held in memory to be processed. + +2. Using large messages pressures implementations on small machines to decrypt +and process plaintext before authenticating it. This is very dangerous, and +this API does not allow it, but a protocol that uses excessive message sizes +might present some implementations with no other choice. + +3. Fixed overheads will be sufficiently amortised by messages as small as 8KB. + +4. Performance may be improved by working with messages that fit into data caches. + +Thus large amounts of data should be chunked so that each message is small. +(Each message still needs a unique nonce.) If in doubt, 16KB is a reasonable +chunk size. + This package is interoperable with NaCl: https://nacl.cr.yp.to/box.html. */ package box // import "golang.org/x/crypto/nacl/box" @@ -56,7 +73,7 @@ func Precompute(sharedKey, peersPublicKey, privateKey *[32]byte) { } // Seal appends an encrypted and authenticated copy of message to out, which -// will be Overhead bytes longer than the original and must not overlap. The +// will be Overhead bytes longer than the original and must not overlap it. The // nonce must be unique for each distinct message for a given pair of keys. func Seal(out, message []byte, nonce *[24]byte, peersPublicKey, privateKey *[32]byte) []byte { var sharedKey [32]byte diff --git a/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go b/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go index 1e1dff506..53ee83cfb 100644 --- a/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go +++ b/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go @@ -13,6 +13,23 @@ example, by using nonce 1 for the first message, nonce 2 for the second message, etc. Nonces are long enough that randomly generated nonces have negligible risk of collision. +Messages should be small because: + +1. The whole message needs to be held in memory to be processed. + +2. Using large messages pressures implementations on small machines to decrypt +and process plaintext before authenticating it. This is very dangerous, and +this API does not allow it, but a protocol that uses excessive message sizes +might present some implementations with no other choice. + +3. Fixed overheads will be sufficiently amortised by messages as small as 8KB. + +4. Performance may be improved by working with messages that fit into data caches. + +Thus large amounts of data should be chunked so that each message is small. +(Each message still needs a unique nonce.) If in doubt, 16KB is a reasonable +chunk size. + This package is interoperable with NaCl: https://nacl.cr.yp.to/secretbox.html. */ package secretbox // import "golang.org/x/crypto/nacl/secretbox" diff --git a/vendor/golang.org/x/crypto/openpgp/keys_test.go b/vendor/golang.org/x/crypto/openpgp/keys_test.go index f768e68a6..76ba13ed1 100644 --- a/vendor/golang.org/x/crypto/openpgp/keys_test.go +++ b/vendor/golang.org/x/crypto/openpgp/keys_test.go @@ -12,7 +12,10 @@ import ( ) func TestKeyExpiry(t *testing.T) { - kring, _ := ReadKeyRing(readerFromHex(expiringKeyHex)) + kring, err := ReadKeyRing(readerFromHex(expiringKeyHex)) + if err != nil { + t.Fatal(err) + } entity := kring[0] const timeFormat = "2006-01-02" @@ -104,7 +107,10 @@ func TestGoodCrossSignature(t *testing.T) { // TestExternallyRevokableKey attempts to load and parse a key with a third party revocation permission. func TestExternallyRevocableKey(t *testing.T) { - kring, _ := ReadKeyRing(readerFromHex(subkeyUsageHex)) + kring, err := ReadKeyRing(readerFromHex(subkeyUsageHex)) + if err != nil { + t.Fatal(err) + } // The 0xA42704B92866382A key can be revoked by 0xBE3893CB843D0FE70C // according to this signature that appears within the key: @@ -125,7 +131,10 @@ func TestExternallyRevocableKey(t *testing.T) { } func TestKeyRevocation(t *testing.T) { - kring, _ := ReadKeyRing(readerFromHex(revokedKeyHex)) + kring, err := ReadKeyRing(readerFromHex(revokedKeyHex)) + if err != nil { + t.Fatal(err) + } // revokedKeyHex contains these keys: // pub 1024R/9A34F7C0 2014-03-25 [revoked: 2014-03-25] @@ -145,7 +154,10 @@ func TestKeyRevocation(t *testing.T) { } func TestSubkeyRevocation(t *testing.T) { - kring, _ := ReadKeyRing(readerFromHex(revokedSubkeyHex)) + kring, err := ReadKeyRing(readerFromHex(revokedSubkeyHex)) + if err != nil { + t.Fatal(err) + } // revokedSubkeyHex contains these keys: // pub 1024R/4EF7E4BECCDE97F0 2014-03-25 @@ -178,7 +190,10 @@ func TestSubkeyRevocation(t *testing.T) { } func TestKeyUsage(t *testing.T) { - kring, _ := ReadKeyRing(readerFromHex(subkeyUsageHex)) + kring, err := ReadKeyRing(readerFromHex(subkeyUsageHex)) + if err != nil { + t.Fatal(err) + } // subkeyUsageHex contains these keys: // pub 1024R/2866382A created: 2014-04-01 expires: never usage: SC diff --git a/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go b/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go index 4b1105b6f..744c2d2c4 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go @@ -88,10 +88,10 @@ func (ske *SymmetricKeyEncrypted) Decrypt(passphrase []byte) ([]byte, CipherFunc return nil, ske.CipherFunc, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(cipherFunc))) } plaintextKey = plaintextKey[1:] - if l := len(plaintextKey); l == 0 || l%cipherFunc.blockSize() != 0 { - return nil, cipherFunc, errors.StructuralError("length of decrypted key not a multiple of block size") + if l, cipherKeySize := len(plaintextKey), cipherFunc.KeySize(); l != cipherFunc.KeySize() { + return nil, cipherFunc, errors.StructuralError("length of decrypted key (" + strconv.Itoa(l) + ") " + + "not equal to cipher keysize (" + strconv.Itoa(cipherKeySize) + ")") } - return plaintextKey, cipherFunc, nil } diff --git a/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted_test.go b/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted_test.go index 19538df77..e1d52c122 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted_test.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted_test.go @@ -61,43 +61,57 @@ func TestSymmetricKeyEncrypted(t *testing.T) { const symmetricallyEncryptedHex = "8c0d04030302371a0b38d884f02060c91cf97c9973b8e58e028e9501708ccfe618fb92afef7fa2d80ddadd93cf" const symmetricallyEncryptedContentsHex = "cb1062004d14c4df636f6e74656e74732e0a" -func TestSerializeSymmetricKeyEncrypted(t *testing.T) { - buf := bytes.NewBuffer(nil) - passphrase := []byte("testing") - const cipherFunc = CipherAES128 - config := &Config{ - DefaultCipher: cipherFunc, +func TestSerializeSymmetricKeyEncryptedCiphers(t *testing.T) { + tests := [...]struct { + cipherFunc CipherFunction + name string + }{ + {Cipher3DES, "Cipher3DES"}, + {CipherCAST5, "CipherCAST5"}, + {CipherAES128, "CipherAES128"}, + {CipherAES192, "CipherAES192"}, + {CipherAES256, "CipherAES256"}, } - key, err := SerializeSymmetricKeyEncrypted(buf, passphrase, config) - if err != nil { - t.Errorf("failed to serialize: %s", err) - return - } + for _, test := range tests { + var buf bytes.Buffer + passphrase := []byte("testing") + config := &Config{ + DefaultCipher: test.cipherFunc, + } - p, err := Read(buf) - if err != nil { - t.Errorf("failed to reparse: %s", err) - return - } - ske, ok := p.(*SymmetricKeyEncrypted) - if !ok { - t.Errorf("parsed a different packet type: %#v", p) - return - } + key, err := SerializeSymmetricKeyEncrypted(&buf, passphrase, config) + if err != nil { + t.Errorf("cipher(%s) failed to serialize: %s", test.name, err) + continue + } - if ske.CipherFunc != config.DefaultCipher { - t.Errorf("SKE cipher function is %d (expected %d)", ske.CipherFunc, config.DefaultCipher) - } - parsedKey, parsedCipherFunc, err := ske.Decrypt(passphrase) - if err != nil { - t.Errorf("failed to decrypt reparsed SKE: %s", err) - return - } - if !bytes.Equal(key, parsedKey) { - t.Errorf("keys don't match after Decrypt: %x (original) vs %x (parsed)", key, parsedKey) - } - if parsedCipherFunc != cipherFunc { - t.Errorf("cipher function doesn't match after Decrypt: %d (original) vs %d (parsed)", cipherFunc, parsedCipherFunc) + p, err := Read(&buf) + if err != nil { + t.Errorf("cipher(%s) failed to reparse: %s", test.name, err) + continue + } + + ske, ok := p.(*SymmetricKeyEncrypted) + if !ok { + t.Errorf("cipher(%s) parsed a different packet type: %#v", test.name, p) + continue + } + + if ske.CipherFunc != config.DefaultCipher { + t.Errorf("cipher(%s) SKE cipher function is %d (expected %d)", test.name, ske.CipherFunc, config.DefaultCipher) + } + parsedKey, parsedCipherFunc, err := ske.Decrypt(passphrase) + if err != nil { + t.Errorf("cipher(%s) failed to decrypt reparsed SKE: %s", test.name, err) + continue + } + if !bytes.Equal(key, parsedKey) { + t.Errorf("cipher(%s) keys don't match after Decrypt: %x (original) vs %x (parsed)", test.name, key, parsedKey) + } + if parsedCipherFunc != test.cipherFunc { + t.Errorf("cipher(%s) cipher function doesn't match after Decrypt: %d (original) vs %d (parsed)", + test.name, test.cipherFunc, parsedCipherFunc) + } } } diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go index 903c7858e..f9269c384 100644 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go +++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go @@ -13,11 +13,12 @@ package salsa func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte) // XORKeyStream crypts bytes from in to out using the given key and counters. -// In and out may be the same slice but otherwise should not overlap. Counter +// In and out must overlap entirely or not at all. Counter // contains the raw salsa20 counter bytes (both nonce and block counter). func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { if len(in) == 0 { return } + _ = out[len(in)-1] salsa2020XORKeyStream(&out[0], &in[0], uint64(len(in)), &counter[0], &key[0]) } diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go index 95f8ca5bb..22126d17c 100644 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go +++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go @@ -203,7 +203,7 @@ func core(out *[64]byte, in *[16]byte, k *[32]byte, c *[16]byte) { } // XORKeyStream crypts bytes from in to out using the given key and counters. -// In and out may be the same slice but otherwise should not overlap. Counter +// In and out must overlap entirely or not at all. Counter // contains the raw salsa20 counter bytes (both nonce and block counter). func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { var block [64]byte diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa_test.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa_test.go index f8cecd9e6..f67e94eba 100644 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa_test.go +++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa_test.go @@ -33,3 +33,22 @@ func TestCore208(t *testing.T) { t.Errorf("expected %x, got %x", out, in) } } + +func TestOutOfBoundsWrite(t *testing.T) { + // encrypted "0123456789" + cipherText := []byte{170, 166, 196, 104, 175, 121, 68, 44, 174, 51} + var counter [16]byte + var key [32]byte + want := "abcdefghij" + plainText := []byte(want) + defer func() { + err := recover() + if err == nil { + t.Error("XORKeyStream expected to panic on len(dst) < len(src), but didn't") + } + if plainText[3] == '3' { + t.Errorf("XORKeyStream did out of bounds write, want %v, got %v", want, string(plainText)) + } + }() + XORKeyStream(plainText[:3], cipherText, &counter, &key) +} diff --git a/vendor/golang.org/x/crypto/salsa20/salsa20.go b/vendor/golang.org/x/crypto/salsa20/salsa20.go index a8ddd76e8..0ee62485a 100644 --- a/vendor/golang.org/x/crypto/salsa20/salsa20.go +++ b/vendor/golang.org/x/crypto/salsa20/salsa20.go @@ -27,8 +27,8 @@ import ( "golang.org/x/crypto/salsa20/salsa" ) -// XORKeyStream crypts bytes from in to out using the given key and nonce. In -// and out may be the same slice but otherwise should not overlap. Nonce must +// XORKeyStream crypts bytes from in to out using the given key and nonce. +// In and out must overlap entirely or not at all. Nonce must // be either 8 or 24 bytes long. func XORKeyStream(out, in []byte, nonce []byte, key *[32]byte) { if len(out) < len(in) { diff --git a/vendor/golang.org/x/crypto/sha3/sha3.go b/vendor/golang.org/x/crypto/sha3/sha3.go index c86167c0b..b12a35c87 100644 --- a/vendor/golang.org/x/crypto/sha3/sha3.go +++ b/vendor/golang.org/x/crypto/sha3/sha3.go @@ -42,9 +42,8 @@ type state struct { storage [maxRate]byte // Specific to SHA-3 and SHAKE. - fixedOutput bool // whether this is a fixed-output-length instance - outputLen int // the default output size in bytes - state spongeDirection // whether the sponge is absorbing or squeezing + outputLen int // the default output size in bytes + state spongeDirection // whether the sponge is absorbing or squeezing } // BlockSize returns the rate of sponge underlying this hash function. diff --git a/vendor/golang.org/x/crypto/ssh/agent/client.go b/vendor/golang.org/x/crypto/ssh/agent/client.go index ecfd7c58d..dce7682fa 100644 --- a/vendor/golang.org/x/crypto/ssh/agent/client.go +++ b/vendor/golang.org/x/crypto/ssh/agent/client.go @@ -57,6 +57,17 @@ type Agent interface { Signers() ([]ssh.Signer, error) } +// ConstraintExtension describes an optional constraint defined by users. +type ConstraintExtension struct { + // ExtensionName consist of a UTF-8 string suffixed by the + // implementation domain following the naming scheme defined + // in Section 4.2 of [RFC4251], e.g. "foo@example.com". + ExtensionName string + // ExtensionDetails contains the actual content of the extended + // constraint. + ExtensionDetails []byte +} + // AddedKey describes an SSH key to be added to an Agent. type AddedKey struct { // PrivateKey must be a *rsa.PrivateKey, *dsa.PrivateKey or @@ -73,6 +84,9 @@ type AddedKey struct { // ConfirmBeforeUse, if true, requests that the agent confirm with the // user before each use of this key. ConfirmBeforeUse bool + // ConstraintExtensions are the experimental or private-use constraints + // defined by users. + ConstraintExtensions []ConstraintExtension } // See [PROTOCOL.agent], section 3. @@ -94,8 +108,9 @@ const ( agentAddSmartcardKeyConstrained = 26 // 3.7 Key constraint identifiers - agentConstrainLifetime = 1 - agentConstrainConfirm = 2 + agentConstrainLifetime = 1 + agentConstrainConfirm = 2 + agentConstrainExtension = 3 ) // maxAgentResponseBytes is the maximum agent reply size that is accepted. This @@ -151,6 +166,19 @@ type publicKey struct { Rest []byte `ssh:"rest"` } +// 3.7 Key constraint identifiers +type constrainLifetimeAgentMsg struct { + LifetimeSecs uint32 `sshtype:"1"` +} + +type constrainExtensionAgentMsg struct { + ExtensionName string `sshtype:"3"` + ExtensionDetails []byte + + // Rest is a field used for parsing, not part of message + Rest []byte `ssh:"rest"` +} + // Key represents a protocol 2 public key as defined in // [PROTOCOL.agent], section 2.5.2. type Key struct { @@ -542,11 +570,7 @@ func (c *client) Add(key AddedKey) error { var constraints []byte if secs := key.LifetimeSecs; secs != 0 { - constraints = append(constraints, agentConstrainLifetime) - - var secsBytes [4]byte - binary.BigEndian.PutUint32(secsBytes[:], secs) - constraints = append(constraints, secsBytes[:]...) + constraints = append(constraints, ssh.Marshal(constrainLifetimeAgentMsg{secs})...) } if key.ConfirmBeforeUse { diff --git a/vendor/golang.org/x/crypto/ssh/agent/client_test.go b/vendor/golang.org/x/crypto/ssh/agent/client_test.go index 5fc47e577..a5b20f551 100644 --- a/vendor/golang.org/x/crypto/ssh/agent/client_test.go +++ b/vendor/golang.org/x/crypto/ssh/agent/client_test.go @@ -19,8 +19,8 @@ import ( "golang.org/x/crypto/ssh" ) -// startAgent executes ssh-agent, and returns a Agent interface to it. -func startAgent(t *testing.T) (client Agent, socket string, cleanup func()) { +// startOpenSSHAgent executes ssh-agent, and returns a Agent interface to it. +func startOpenSSHAgent(t *testing.T) (client Agent, socket string, cleanup func()) { if testing.Short() { // ssh-agent is not always available, and the key // types supported vary by platform. @@ -79,16 +79,32 @@ func startAgent(t *testing.T) (client Agent, socket string, cleanup func()) { } } -func testAgent(t *testing.T, key interface{}, cert *ssh.Certificate, lifetimeSecs uint32) { - agent, _, cleanup := startAgent(t) +// startKeyringAgent uses Keyring to simulate a ssh-agent Server and returns a client. +func startKeyringAgent(t *testing.T) (client Agent, cleanup func()) { + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + go ServeAgent(NewKeyring(), c2) + + return NewClient(c1), func() { + c1.Close() + c2.Close() + } +} + +func testOpenSSHAgent(t *testing.T, key interface{}, cert *ssh.Certificate, lifetimeSecs uint32) { + agent, _, cleanup := startOpenSSHAgent(t) defer cleanup() testAgentInterface(t, agent, key, cert, lifetimeSecs) } -func testKeyring(t *testing.T, key interface{}, cert *ssh.Certificate, lifetimeSecs uint32) { - a := NewKeyring() - testAgentInterface(t, a, key, cert, lifetimeSecs) +func testKeyringAgent(t *testing.T, key interface{}, cert *ssh.Certificate, lifetimeSecs uint32) { + agent, cleanup := startKeyringAgent(t) + defer cleanup() + + testAgentInterface(t, agent, key, cert, lifetimeSecs) } func testAgentInterface(t *testing.T, agent Agent, key interface{}, cert *ssh.Certificate, lifetimeSecs uint32) { @@ -159,8 +175,8 @@ func testAgentInterface(t *testing.T, agent Agent, key interface{}, cert *ssh.Ce func TestAgent(t *testing.T) { for _, keyType := range []string{"rsa", "dsa", "ecdsa", "ed25519"} { - testAgent(t, testPrivateKeys[keyType], nil, 0) - testKeyring(t, testPrivateKeys[keyType], nil, 1) + testOpenSSHAgent(t, testPrivateKeys[keyType], nil, 0) + testKeyringAgent(t, testPrivateKeys[keyType], nil, 0) } } @@ -172,8 +188,8 @@ func TestCert(t *testing.T) { } cert.SignCert(rand.Reader, testSigners["ecdsa"]) - testAgent(t, testPrivateKeys["rsa"], cert, 0) - testKeyring(t, testPrivateKeys["rsa"], cert, 1) + testOpenSSHAgent(t, testPrivateKeys["rsa"], cert, 0) + testKeyringAgent(t, testPrivateKeys["rsa"], cert, 0) } // netPipe is analogous to net.Pipe, but it uses a real net.Conn, and @@ -203,7 +219,7 @@ func netPipe() (net.Conn, net.Conn, error) { } func TestAuth(t *testing.T) { - agent, _, cleanup := startAgent(t) + agent, _, cleanup := startOpenSSHAgent(t) defer cleanup() a, b, err := netPipe() @@ -247,8 +263,14 @@ func TestAuth(t *testing.T) { conn.Close() } -func TestLockClient(t *testing.T) { - agent, _, cleanup := startAgent(t) +func TestLockOpenSSHAgent(t *testing.T) { + agent, _, cleanup := startOpenSSHAgent(t) + defer cleanup() + testLockAgent(agent, t) +} + +func TestLockKeyringAgent(t *testing.T) { + agent, cleanup := startKeyringAgent(t) defer cleanup() testLockAgent(agent, t) } @@ -308,10 +330,19 @@ func testLockAgent(agent Agent, t *testing.T) { } } -func TestAgentLifetime(t *testing.T) { - agent, _, cleanup := startAgent(t) +func testOpenSSHAgentLifetime(t *testing.T) { + agent, _, cleanup := startOpenSSHAgent(t) defer cleanup() + testAgentLifetime(t, agent) +} +func testKeyringAgentLifetime(t *testing.T) { + agent, cleanup := startKeyringAgent(t) + defer cleanup() + testAgentLifetime(t, agent) +} + +func testAgentLifetime(t *testing.T, agent Agent) { for _, keyType := range []string{"rsa", "dsa", "ecdsa"} { // Add private keys to the agent. err := agent.Add(AddedKey{ diff --git a/vendor/golang.org/x/crypto/ssh/agent/server.go b/vendor/golang.org/x/crypto/ssh/agent/server.go index 68a333fa5..321e48a26 100644 --- a/vendor/golang.org/x/crypto/ssh/agent/server.go +++ b/vendor/golang.org/x/crypto/ssh/agent/server.go @@ -106,7 +106,7 @@ func (s *server) processRequest(data []byte) (interface{}, error) { return nil, s.agent.Lock(req.Passphrase) case agentUnlock: - var req agentLockMsg + var req agentUnlockMsg if err := ssh.Unmarshal(data, &req); err != nil { return nil, err } @@ -155,6 +155,44 @@ func (s *server) processRequest(data []byte) (interface{}, error) { return nil, fmt.Errorf("unknown opcode %d", data[0]) } +func parseConstraints(constraints []byte) (lifetimeSecs uint32, confirmBeforeUse bool, extensions []ConstraintExtension, err error) { + for len(constraints) != 0 { + switch constraints[0] { + case agentConstrainLifetime: + lifetimeSecs = binary.BigEndian.Uint32(constraints[1:5]) + constraints = constraints[5:] + case agentConstrainConfirm: + confirmBeforeUse = true + constraints = constraints[1:] + case agentConstrainExtension: + var msg constrainExtensionAgentMsg + if err = ssh.Unmarshal(constraints, &msg); err != nil { + return 0, false, nil, err + } + extensions = append(extensions, ConstraintExtension{ + ExtensionName: msg.ExtensionName, + ExtensionDetails: msg.ExtensionDetails, + }) + constraints = msg.Rest + default: + return 0, false, nil, fmt.Errorf("unknown constraint type: %d", constraints[0]) + } + } + return +} + +func setConstraints(key *AddedKey, constraintBytes []byte) error { + lifetimeSecs, confirmBeforeUse, constraintExtensions, err := parseConstraints(constraintBytes) + if err != nil { + return err + } + + key.LifetimeSecs = lifetimeSecs + key.ConfirmBeforeUse = confirmBeforeUse + key.ConstraintExtensions = constraintExtensions + return nil +} + func parseRSAKey(req []byte) (*AddedKey, error) { var k rsaKeyMsg if err := ssh.Unmarshal(req, &k); err != nil { @@ -173,7 +211,11 @@ func parseRSAKey(req []byte) (*AddedKey, error) { } priv.Precompute() - return &AddedKey{PrivateKey: priv, Comment: k.Comments}, nil + addedKey := &AddedKey{PrivateKey: priv, Comment: k.Comments} + if err := setConstraints(addedKey, k.Constraints); err != nil { + return nil, err + } + return addedKey, nil } func parseEd25519Key(req []byte) (*AddedKey, error) { @@ -182,7 +224,12 @@ func parseEd25519Key(req []byte) (*AddedKey, error) { return nil, err } priv := ed25519.PrivateKey(k.Priv) - return &AddedKey{PrivateKey: &priv, Comment: k.Comments}, nil + + addedKey := &AddedKey{PrivateKey: &priv, Comment: k.Comments} + if err := setConstraints(addedKey, k.Constraints); err != nil { + return nil, err + } + return addedKey, nil } func parseDSAKey(req []byte) (*AddedKey, error) { @@ -202,7 +249,11 @@ func parseDSAKey(req []byte) (*AddedKey, error) { X: k.X, } - return &AddedKey{PrivateKey: priv, Comment: k.Comments}, nil + addedKey := &AddedKey{PrivateKey: priv, Comment: k.Comments} + if err := setConstraints(addedKey, k.Constraints); err != nil { + return nil, err + } + return addedKey, nil } func unmarshalECDSA(curveName string, keyBytes []byte, privScalar *big.Int) (priv *ecdsa.PrivateKey, err error) { @@ -243,7 +294,12 @@ func parseEd25519Cert(req []byte) (*AddedKey, error) { if !ok { return nil, errors.New("agent: bad ED25519 certificate") } - return &AddedKey{PrivateKey: &priv, Certificate: cert, Comment: k.Comments}, nil + + addedKey := &AddedKey{PrivateKey: &priv, Certificate: cert, Comment: k.Comments} + if err := setConstraints(addedKey, k.Constraints); err != nil { + return nil, err + } + return addedKey, nil } func parseECDSAKey(req []byte) (*AddedKey, error) { @@ -257,7 +313,11 @@ func parseECDSAKey(req []byte) (*AddedKey, error) { return nil, err } - return &AddedKey{PrivateKey: priv, Comment: k.Comments}, nil + addedKey := &AddedKey{PrivateKey: priv, Comment: k.Comments} + if err := setConstraints(addedKey, k.Constraints); err != nil { + return nil, err + } + return addedKey, nil } func parseRSACert(req []byte) (*AddedKey, error) { @@ -300,7 +360,11 @@ func parseRSACert(req []byte) (*AddedKey, error) { } priv.Precompute() - return &AddedKey{PrivateKey: &priv, Certificate: cert, Comment: k.Comments}, nil + addedKey := &AddedKey{PrivateKey: &priv, Certificate: cert, Comment: k.Comments} + if err := setConstraints(addedKey, k.Constraints); err != nil { + return nil, err + } + return addedKey, nil } func parseDSACert(req []byte) (*AddedKey, error) { @@ -338,7 +402,11 @@ func parseDSACert(req []byte) (*AddedKey, error) { X: k.X, } - return &AddedKey{PrivateKey: priv, Certificate: cert, Comment: k.Comments}, nil + addedKey := &AddedKey{PrivateKey: priv, Certificate: cert, Comment: k.Comments} + if err := setConstraints(addedKey, k.Constraints); err != nil { + return nil, err + } + return addedKey, nil } func parseECDSACert(req []byte) (*AddedKey, error) { @@ -371,7 +439,11 @@ func parseECDSACert(req []byte) (*AddedKey, error) { return nil, err } - return &AddedKey{PrivateKey: priv, Certificate: cert, Comment: k.Comments}, nil + addedKey := &AddedKey{PrivateKey: priv, Certificate: cert, Comment: k.Comments} + if err := setConstraints(addedKey, k.Constraints); err != nil { + return nil, err + } + return addedKey, nil } func (s *server) insertIdentity(req []byte) error { diff --git a/vendor/golang.org/x/crypto/ssh/agent/server_test.go b/vendor/golang.org/x/crypto/ssh/agent/server_test.go index 6b0837d94..038018ebb 100644 --- a/vendor/golang.org/x/crypto/ssh/agent/server_test.go +++ b/vendor/golang.org/x/crypto/ssh/agent/server_test.go @@ -8,6 +8,9 @@ import ( "crypto" "crypto/rand" "fmt" + pseudorand "math/rand" + "reflect" + "strings" "testing" "golang.org/x/crypto/ssh" @@ -40,7 +43,7 @@ func TestSetupForwardAgent(t *testing.T) { defer a.Close() defer b.Close() - _, socket, cleanup := startAgent(t) + _, socket, cleanup := startOpenSSHAgent(t) defer cleanup() serverConf := ssh.ServerConfig{ @@ -207,3 +210,50 @@ func TestCertTypes(t *testing.T) { } } } + +func TestParseConstraints(t *testing.T) { + // Test LifetimeSecs + var msg = constrainLifetimeAgentMsg{pseudorand.Uint32()} + lifetimeSecs, _, _, err := parseConstraints(ssh.Marshal(msg)) + if err != nil { + t.Fatalf("parseConstraints: %v", err) + } + if lifetimeSecs != msg.LifetimeSecs { + t.Errorf("got lifetime %v, want %v", lifetimeSecs, msg.LifetimeSecs) + } + + // Test ConfirmBeforeUse + _, confirmBeforeUse, _, err := parseConstraints([]byte{agentConstrainConfirm}) + if err != nil { + t.Fatalf("%v", err) + } + if !confirmBeforeUse { + t.Error("got comfirmBeforeUse == false") + } + + // Test ConstraintExtensions + var data []byte + var expect []ConstraintExtension + for i := 0; i < 10; i++ { + var ext = ConstraintExtension{ + ExtensionName: fmt.Sprintf("name%d", i), + ExtensionDetails: []byte(fmt.Sprintf("details: %d", i)), + } + expect = append(expect, ext) + data = append(data, agentConstrainExtension) + data = append(data, ssh.Marshal(ext)...) + } + _, _, extensions, err := parseConstraints(data) + if err != nil { + t.Fatalf("%v", err) + } + if !reflect.DeepEqual(expect, extensions) { + t.Errorf("got extension %v, want %v", extensions, expect) + } + + // Test Unknown Constraint + _, _, _, err = parseConstraints([]byte{128}) + if err == nil || !strings.Contains(err.Error(), "unknown constraint") { + t.Errorf("unexpected error: %v", err) + } +} diff --git a/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/golang.org/x/crypto/ssh/keys.go index 7a8756a93..b682c1741 100644 --- a/vendor/golang.org/x/crypto/ssh/keys.go +++ b/vendor/golang.org/x/crypto/ssh/keys.go @@ -367,6 +367,17 @@ func (r *dsaPublicKey) Type() string { return "ssh-dss" } +func checkDSAParams(param *dsa.Parameters) error { + // SSH specifies FIPS 186-2, which only provided a single size + // (1024 bits) DSA key. FIPS 186-3 allows for larger key + // sizes, which would confuse SSH. + if l := param.P.BitLen(); l != 1024 { + return fmt.Errorf("ssh: unsupported DSA key size %d", l) + } + + return nil +} + // parseDSA parses an DSA key according to RFC 4253, section 6.6. func parseDSA(in []byte) (out PublicKey, rest []byte, err error) { var w struct { @@ -377,13 +388,18 @@ func parseDSA(in []byte) (out PublicKey, rest []byte, err error) { return nil, nil, err } + param := dsa.Parameters{ + P: w.P, + Q: w.Q, + G: w.G, + } + if err := checkDSAParams(¶m); err != nil { + return nil, nil, err + } + key := &dsaPublicKey{ - Parameters: dsa.Parameters{ - P: w.P, - Q: w.Q, - G: w.G, - }, - Y: w.Y, + Parameters: param, + Y: w.Y, } return key, w.Rest, nil } @@ -630,19 +646,28 @@ func (k *ecdsaPublicKey) CryptoPublicKey() crypto.PublicKey { } // NewSignerFromKey takes an *rsa.PrivateKey, *dsa.PrivateKey, -// *ecdsa.PrivateKey or any other crypto.Signer and returns a corresponding -// Signer instance. ECDSA keys must use P-256, P-384 or P-521. +// *ecdsa.PrivateKey or any other crypto.Signer and returns a +// corresponding Signer instance. ECDSA keys must use P-256, P-384 or +// P-521. DSA keys must use parameter size L1024N160. func NewSignerFromKey(key interface{}) (Signer, error) { switch key := key.(type) { case crypto.Signer: return NewSignerFromSigner(key) case *dsa.PrivateKey: - return &dsaPrivateKey{key}, nil + return newDSAPrivateKey(key) default: return nil, fmt.Errorf("ssh: unsupported key type %T", key) } } +func newDSAPrivateKey(key *dsa.PrivateKey) (Signer, error) { + if err := checkDSAParams(&key.PublicKey.Parameters); err != nil { + return nil, err + } + + return &dsaPrivateKey{key}, nil +} + type wrappedSigner struct { signer crypto.Signer pubKey PublicKey diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go index b6f4cc811..8a78b7ca0 100644 --- a/vendor/golang.org/x/crypto/ssh/server.go +++ b/vendor/golang.org/x/crypto/ssh/server.go @@ -67,7 +67,7 @@ type ServerConfig struct { PasswordCallback func(conn ConnMetadata, password []byte) (*Permissions, error) // PublicKeyCallback, if non-nil, is called when a client - // offers a public key for authentication. It must return true + // offers a public key for authentication. It must return a nil error // if the given public key can be used to authenticate the // given user. For example, see CertChecker.Authenticate. A // call to this function does not guarantee that the key diff --git a/vendor/golang.org/x/crypto/ssh/session.go b/vendor/golang.org/x/crypto/ssh/session.go index 17e2aa85c..cc06e03f5 100644 --- a/vendor/golang.org/x/crypto/ssh/session.go +++ b/vendor/golang.org/x/crypto/ssh/session.go @@ -231,6 +231,26 @@ func (s *Session) RequestSubsystem(subsystem string) error { return err } +// RFC 4254 Section 6.7. +type ptyWindowChangeMsg struct { + Columns uint32 + Rows uint32 + Width uint32 + Height uint32 +} + +// WindowChange informs the remote host about a terminal window dimension change to h rows and w columns. +func (s *Session) WindowChange(h, w int) error { + req := ptyWindowChangeMsg{ + Columns: uint32(w), + Rows: uint32(h), + Width: uint32(w * 8), + Height: uint32(h * 8), + } + _, err := s.ch.SendRequest("window-change", false, Marshal(&req)) + return err +} + // RFC 4254 Section 6.9. type signalMsg struct { Signal string diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util.go b/vendor/golang.org/x/crypto/ssh/terminal/util.go index d01919614..e7404ff49 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util.go @@ -19,6 +19,8 @@ package terminal // import "golang.org/x/crypto/ssh/terminal" import ( "syscall" "unsafe" + + "golang.org/x/sys/unix" ) // State contains the state of a terminal. @@ -50,6 +52,8 @@ func MakeRaw(fd int) (*State, error) { newState.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON | syscall.ISIG | syscall.IEXTEN newState.Cflag &^= syscall.CSIZE | syscall.PARENB newState.Cflag |= syscall.CS8 + newState.Cc[unix.VMIN] = 1 + newState.Cc[unix.VTIME] = 0 if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&newState)), 0, 0, 0); err != 0 { return nil, err } diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go b/vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go index 9c1ffd145..cb23a5904 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go @@ -6,7 +6,7 @@ package terminal -import "syscall" +import "golang.org/x/sys/unix" -const ioctlReadTermios = syscall.TIOCGETA -const ioctlWriteTermios = syscall.TIOCSETA +const ioctlReadTermios = unix.TIOCGETA +const ioctlWriteTermios = unix.TIOCSETA diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_linux.go b/vendor/golang.org/x/crypto/ssh/terminal/util_linux.go index 5883b22d7..5fadfe8a1 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_linux.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util_linux.go @@ -4,8 +4,7 @@ package terminal -// These constants are declared here, rather than importing -// them from the syscall package as some syscall packages, even -// on linux, for example gccgo, do not declare them. -const ioctlReadTermios = 0x5401 // syscall.TCGETS -const ioctlWriteTermios = 0x5402 // syscall.TCSETS +import "golang.org/x/sys/unix" + +const ioctlReadTermios = unix.TCGETS +const ioctlWriteTermios = unix.TCSETS diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go b/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go index e0a1f36ce..60979ccd0 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go @@ -17,53 +17,7 @@ package terminal import ( - "syscall" - "unsafe" -) - -const ( - enableLineInput = 2 - enableEchoInput = 4 - enableProcessedInput = 1 - enableWindowInput = 8 - enableMouseInput = 16 - enableInsertMode = 32 - enableQuickEditMode = 64 - enableExtendedFlags = 128 - enableAutoPosition = 256 - enableProcessedOutput = 1 - enableWrapAtEolOutput = 2 -) - -var kernel32 = syscall.NewLazyDLL("kernel32.dll") - -var ( - procGetConsoleMode = kernel32.NewProc("GetConsoleMode") - procSetConsoleMode = kernel32.NewProc("SetConsoleMode") - procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo") -) - -type ( - short int16 - word uint16 - - coord struct { - x short - y short - } - smallRect struct { - left short - top short - right short - bottom short - } - consoleScreenBufferInfo struct { - size coord - cursorPosition coord - attributes word - window smallRect - maximumWindowSize coord - } + "golang.org/x/sys/windows" ) type State struct { @@ -73,8 +27,8 @@ type State struct { // IsTerminal returns true if the given file descriptor is a terminal. func IsTerminal(fd int) bool { var st uint32 - r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0) - return r != 0 && e == 0 + err := windows.GetConsoleMode(windows.Handle(fd), &st) + return err == nil } // MakeRaw put the terminal connected to the given file descriptor into raw @@ -82,14 +36,12 @@ func IsTerminal(fd int) bool { // restored. func MakeRaw(fd int) (*State, error) { var st uint32 - _, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0) - if e != 0 { - return nil, error(e) + if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { + return nil, err } - raw := st &^ (enableEchoInput | enableProcessedInput | enableLineInput | enableProcessedOutput) - _, _, e = syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(raw), 0) - if e != 0 { - return nil, error(e) + raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT) + if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil { + return nil, err } return &State{st}, nil } @@ -98,9 +50,8 @@ func MakeRaw(fd int) (*State, error) { // restore the terminal after a signal. func GetState(fd int) (*State, error) { var st uint32 - _, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0) - if e != 0 { - return nil, error(e) + if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { + return nil, err } return &State{st}, nil } @@ -108,25 +59,23 @@ func GetState(fd int) (*State, error) { // Restore restores the terminal connected to the given file descriptor to a // previous state. func Restore(fd int, state *State) error { - _, _, err := syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(state.mode), 0) - return err + return windows.SetConsoleMode(windows.Handle(fd), state.mode) } // GetSize returns the dimensions of the given terminal. func GetSize(fd int) (width, height int, err error) { - var info consoleScreenBufferInfo - _, _, e := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&info)), 0) - if e != 0 { - return 0, 0, error(e) + var info windows.ConsoleScreenBufferInfo + if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil { + return 0, 0, err } - return int(info.size.x), int(info.size.y), nil + return int(info.Size.X), int(info.Size.Y), nil } // passwordReader is an io.Reader that reads from a specific Windows HANDLE. type passwordReader int func (r passwordReader) Read(buf []byte) (int, error) { - return syscall.Read(syscall.Handle(r), buf) + return windows.Read(windows.Handle(r), buf) } // ReadPassword reads a line of input from a terminal without local echo. This @@ -134,21 +83,19 @@ func (r passwordReader) Read(buf []byte) (int, error) { // returned does not include the \n. func ReadPassword(fd int) ([]byte, error) { var st uint32 - _, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0) - if e != 0 { - return nil, error(e) + if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { + return nil, err } old := st - st &^= (enableEchoInput) - st |= (enableProcessedInput | enableLineInput | enableProcessedOutput) - _, _, e = syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(st), 0) - if e != 0 { - return nil, error(e) + st &^= (windows.ENABLE_ECHO_INPUT) + st |= (windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT) + if err := windows.SetConsoleMode(windows.Handle(fd), st); err != nil { + return nil, err } defer func() { - syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(old), 0) + windows.SetConsoleMode(windows.Handle(fd), old) }() return readPasswordLine(passwordReader(fd)) diff --git a/vendor/golang.org/x/crypto/ssh/test/session_test.go b/vendor/golang.org/x/crypto/ssh/test/session_test.go index fc7e4715b..8238d9d90 100644 --- a/vendor/golang.org/x/crypto/ssh/test/session_test.go +++ b/vendor/golang.org/x/crypto/ssh/test/session_test.go @@ -276,6 +276,54 @@ func TestValidTerminalMode(t *testing.T) { } } +func TestWindowChange(t *testing.T) { + server := newServer(t) + defer server.Shutdown() + conn := server.Dial(clientConfig()) + defer conn.Close() + + session, err := conn.NewSession() + if err != nil { + t.Fatalf("session failed: %v", err) + } + defer session.Close() + + stdout, err := session.StdoutPipe() + if err != nil { + t.Fatalf("unable to acquire stdout pipe: %s", err) + } + + stdin, err := session.StdinPipe() + if err != nil { + t.Fatalf("unable to acquire stdin pipe: %s", err) + } + + tm := ssh.TerminalModes{ssh.ECHO: 0} + if err = session.RequestPty("xterm", 80, 40, tm); err != nil { + t.Fatalf("req-pty failed: %s", err) + } + + if err := session.WindowChange(100, 100); err != nil { + t.Fatalf("window-change failed: %s", err) + } + + err = session.Shell() + if err != nil { + t.Fatalf("session failed: %s", err) + } + + stdin.Write([]byte("stty size && exit\n")) + + var buf bytes.Buffer + if _, err := io.Copy(&buf, stdout); err != nil { + t.Fatalf("reading failed: %s", err) + } + + if sttyOutput := buf.String(); !strings.Contains(sttyOutput, "100 100") { + t.Fatalf("terminal WindowChange failure: expected \"100 100\" stty output, got %s", sttyOutput) + } +} + func TestCiphers(t *testing.T) { var config ssh.Config config.SetDefaults() diff --git a/vendor/golang.org/x/crypto/xts/xts.go b/vendor/golang.org/x/crypto/xts/xts.go index a7643fdcd..92cbce99b 100644 --- a/vendor/golang.org/x/crypto/xts/xts.go +++ b/vendor/golang.org/x/crypto/xts/xts.go @@ -55,7 +55,7 @@ func NewCipher(cipherFunc func([]byte) (cipher.Block, error), key []byte) (c *Ci } // Encrypt encrypts a sector of plaintext and puts the result into ciphertext. -// Plaintext and ciphertext may be the same slice but should not overlap. +// Plaintext and ciphertext must overlap entirely or not at all. // Sectors must be a multiple of 16 bytes and less than 2²⁴ bytes. func (c *Cipher) Encrypt(ciphertext, plaintext []byte, sectorNum uint64) { if len(ciphertext) < len(plaintext) { @@ -86,7 +86,7 @@ func (c *Cipher) Encrypt(ciphertext, plaintext []byte, sectorNum uint64) { } // Decrypt decrypts a sector of ciphertext and puts the result into plaintext. -// Plaintext and ciphertext may be the same slice but should not overlap. +// Plaintext and ciphertext must overlap entirely or not at all. // Sectors must be a multiple of 16 bytes and less than 2²⁴ bytes. func (c *Cipher) Decrypt(plaintext, ciphertext []byte, sectorNum uint64) { if len(plaintext) < len(ciphertext) { diff --git a/vendor/golang.org/x/net/http2/h2i/h2i.go b/vendor/golang.org/x/net/http2/h2i/h2i.go index 3f4cfe225..62e57527c 100644 --- a/vendor/golang.org/x/net/http2/h2i/h2i.go +++ b/vendor/golang.org/x/net/http2/h2i/h2i.go @@ -45,6 +45,7 @@ var ( flagNextProto = flag.String("nextproto", "h2,h2-14", "Comma-separated list of NPN/ALPN protocol names to negotiate.") flagInsecure = flag.Bool("insecure", false, "Whether to skip TLS cert validation") flagSettings = flag.String("settings", "empty", "comma-separated list of KEY=value settings for the initial SETTINGS frame. The magic value 'empty' sends an empty initial settings frame, and the magic value 'omit' causes no initial settings frame to be sent.") + flagDial = flag.String("dial", "", "optional ip:port to dial, to connect to a host:port but use a different SNI name (including a SNI name without DNS)") ) type command struct { @@ -147,11 +148,14 @@ func (app *h2i) Main() error { InsecureSkipVerify: *flagInsecure, } - hostAndPort := withPort(app.host) + hostAndPort := *flagDial + if hostAndPort == "" { + hostAndPort = withPort(app.host) + } log.Printf("Connecting to %s ...", hostAndPort) tc, err := tls.Dial("tcp", hostAndPort, cfg) if err != nil { - return fmt.Errorf("Error dialing %s: %v", withPort(app.host), err) + return fmt.Errorf("Error dialing %s: %v", hostAndPort, err) } log.Printf("Connected to %v", tc.RemoteAddr()) defer tc.Close() diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index 850d7ae09..adb77ffab 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -18,6 +18,7 @@ import ( "io/ioutil" "log" "math" + mathrand "math/rand" "net" "net/http" "sort" @@ -86,7 +87,7 @@ type Transport struct { // MaxHeaderListSize is the http2 SETTINGS_MAX_HEADER_LIST_SIZE to // send in the initial settings frame. It is how many bytes - // of response headers are allow. Unlike the http2 spec, zero here + // of response headers are allowed. Unlike the http2 spec, zero here // means to use a default limit (currently 10MB). If you actually // want to advertise an ulimited value to the peer, Transport // interprets the highest possible value here (0xffffffff or 1<<32-1) @@ -164,15 +165,17 @@ type ClientConn struct { goAwayDebug string // goAway frame's debug data, retained as a string streams map[uint32]*clientStream // client-initiated nextStreamID uint32 + pendingRequests int // requests blocked and waiting to be sent because len(streams) == maxConcurrentStreams pings map[[8]byte]chan struct{} // in flight ping data to notification channel bw *bufio.Writer br *bufio.Reader fr *Framer lastActive time.Time // Settings from peer: (also guarded by mu) - maxFrameSize uint32 - maxConcurrentStreams uint32 - initialWindowSize uint32 + maxFrameSize uint32 + maxConcurrentStreams uint32 + peerMaxHeaderListSize uint64 + initialWindowSize uint32 hbuf bytes.Buffer // HPACK encoder writes into this henc *hpack.Encoder @@ -216,35 +219,45 @@ type clientStream struct { resTrailer *http.Header // client's Response.Trailer } -// awaitRequestCancel runs in its own goroutine and waits for the user -// to cancel a RoundTrip request, its context to expire, or for the -// request to be done (any way it might be removed from the cc.streams -// map: peer reset, successful completion, TCP connection breakage, -// etc) -func (cs *clientStream) awaitRequestCancel(req *http.Request) { +// awaitRequestCancel waits for the user to cancel a request or for the done +// channel to be signaled. A non-nil error is returned only if the request was +// canceled. +func awaitRequestCancel(req *http.Request, done <-chan struct{}) error { ctx := reqContext(req) if req.Cancel == nil && ctx.Done() == nil { - return + return nil } select { case <-req.Cancel: - cs.cancelStream() - cs.bufPipe.CloseWithError(errRequestCanceled) + return errRequestCanceled case <-ctx.Done(): + return ctx.Err() + case <-done: + return nil + } +} + +// awaitRequestCancel waits for the user to cancel a request, its context to +// expire, or for the request to be done (any way it might be removed from the +// cc.streams map: peer reset, successful completion, TCP connection breakage, +// etc). If the request is canceled, then cs will be canceled and closed. +func (cs *clientStream) awaitRequestCancel(req *http.Request) { + if err := awaitRequestCancel(req, cs.done); err != nil { cs.cancelStream() - cs.bufPipe.CloseWithError(ctx.Err()) - case <-cs.done: + cs.bufPipe.CloseWithError(err) } } func (cs *clientStream) cancelStream() { - cs.cc.mu.Lock() + cc := cs.cc + cc.mu.Lock() didReset := cs.didReset cs.didReset = true - cs.cc.mu.Unlock() + cc.mu.Unlock() if !didReset { - cs.cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) + cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) + cc.forgetStreamID(cs.ID) } } @@ -329,7 +342,7 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res } addr := authorityAddr(req.URL.Scheme, req.URL.Host) - for { + for retry := 0; ; retry++ { cc, err := t.connPool().GetClientConn(req, addr) if err != nil { t.vlogf("http2: Transport failed to get client conn for %s: %v", addr, err) @@ -337,9 +350,25 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res } traceGotConn(req, cc) res, err := cc.RoundTrip(req) - if err != nil { - if req, err = shouldRetryRequest(req, err); err == nil { - continue + if err != nil && retry <= 6 { + afterBodyWrite := false + if e, ok := err.(afterReqBodyWriteError); ok { + err = e + afterBodyWrite = true + } + if req, err = shouldRetryRequest(req, err, afterBodyWrite); err == nil { + // After the first retry, do exponential backoff with 10% jitter. + if retry == 0 { + continue + } + backoff := float64(uint(1) << (uint(retry) - 1)) + backoff += backoff * (0.1 * mathrand.Float64()) + select { + case <-time.After(time.Second * time.Duration(backoff)): + continue + case <-reqContext(req).Done(): + return nil, reqContext(req).Err() + } } } if err != nil { @@ -360,43 +389,60 @@ func (t *Transport) CloseIdleConnections() { } var ( - errClientConnClosed = errors.New("http2: client conn is closed") - errClientConnUnusable = errors.New("http2: client conn not usable") - - errClientConnGotGoAway = errors.New("http2: Transport received Server's graceful shutdown GOAWAY") - errClientConnGotGoAwayAfterSomeReqBody = errors.New("http2: Transport received Server's graceful shutdown GOAWAY; some request body already written") + errClientConnClosed = errors.New("http2: client conn is closed") + errClientConnUnusable = errors.New("http2: client conn not usable") + errClientConnGotGoAway = errors.New("http2: Transport received Server's graceful shutdown GOAWAY") ) +// afterReqBodyWriteError is a wrapper around errors returned by ClientConn.RoundTrip. +// It is used to signal that err happened after part of Request.Body was sent to the server. +type afterReqBodyWriteError struct { + err error +} + +func (e afterReqBodyWriteError) Error() string { + return e.err.Error() + "; some request body already written" +} + // shouldRetryRequest is called by RoundTrip when a request fails to get // response headers. It is always called with a non-nil error. // It returns either a request to retry (either the same request, or a // modified clone), or an error if the request can't be replayed. -func shouldRetryRequest(req *http.Request, err error) (*http.Request, error) { - switch err { - default: +func shouldRetryRequest(req *http.Request, err error, afterBodyWrite bool) (*http.Request, error) { + if !canRetryError(err) { return nil, err - case errClientConnUnusable, errClientConnGotGoAway: - return req, nil - case errClientConnGotGoAwayAfterSomeReqBody: - // If the Body is nil (or http.NoBody), it's safe to reuse - // this request and its Body. - if req.Body == nil || reqBodyIsNoBody(req.Body) { - return req, nil - } - // Otherwise we depend on the Request having its GetBody - // func defined. - getBody := reqGetBody(req) // Go 1.8: getBody = req.GetBody - if getBody == nil { - return nil, errors.New("http2: Transport: peer server initiated graceful shutdown after some of Request.Body was written; define Request.GetBody to avoid this error") - } - body, err := getBody() - if err != nil { - return nil, err - } - newReq := *req - newReq.Body = body - return &newReq, nil } + if !afterBodyWrite { + return req, nil + } + // If the Body is nil (or http.NoBody), it's safe to reuse + // this request and its Body. + if req.Body == nil || reqBodyIsNoBody(req.Body) { + return req, nil + } + // Otherwise we depend on the Request having its GetBody + // func defined. + getBody := reqGetBody(req) // Go 1.8: getBody = req.GetBody + if getBody == nil { + return nil, fmt.Errorf("http2: Transport: cannot retry err [%v] after Request.Body was written; define Request.GetBody to avoid this error", err) + } + body, err := getBody() + if err != nil { + return nil, err + } + newReq := *req + newReq.Body = body + return &newReq, nil +} + +func canRetryError(err error) bool { + if err == errClientConnUnusable || err == errClientConnGotGoAway { + return true + } + if se, ok := err.(StreamError); ok { + return se.Code == ErrCodeRefusedStream + } + return false } func (t *Transport) dialClientConn(addr string, singleUse bool) (*ClientConn, error) { @@ -474,17 +520,18 @@ func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, error) { cc := &ClientConn{ - t: t, - tconn: c, - readerDone: make(chan struct{}), - nextStreamID: 1, - maxFrameSize: 16 << 10, // spec default - initialWindowSize: 65535, // spec default - maxConcurrentStreams: 1000, // "infinite", per spec. 1000 seems good enough. - streams: make(map[uint32]*clientStream), - singleUse: singleUse, - wantSettingsAck: true, - pings: make(map[[8]byte]chan struct{}), + t: t, + tconn: c, + readerDone: make(chan struct{}), + nextStreamID: 1, + maxFrameSize: 16 << 10, // spec default + initialWindowSize: 65535, // spec default + maxConcurrentStreams: 1000, // "infinite", per spec. 1000 seems good enough. + peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead. + streams: make(map[uint32]*clientStream), + singleUse: singleUse, + wantSettingsAck: true, + pings: make(map[[8]byte]chan struct{}), } if d := t.idleConnTimeout(); d != 0 { cc.idleTimeout = d @@ -560,6 +607,8 @@ func (cc *ClientConn) setGoAway(f *GoAwayFrame) { } } +// CanTakeNewRequest reports whether the connection can take a new request, +// meaning it has not been closed or received or sent a GOAWAY. func (cc *ClientConn) CanTakeNewRequest() bool { cc.mu.Lock() defer cc.mu.Unlock() @@ -571,8 +620,7 @@ func (cc *ClientConn) canTakeNewRequestLocked() bool { return false } return cc.goAway == nil && !cc.closed && - int64(len(cc.streams)+1) < int64(cc.maxConcurrentStreams) && - cc.nextStreamID < math.MaxInt32 + int64(cc.nextStreamID)+int64(cc.pendingRequests) < math.MaxInt32 } // onIdleTimeout is called from a time.AfterFunc goroutine. It will @@ -718,10 +766,9 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) { hasTrailers := trailers != "" cc.mu.Lock() - cc.lastActive = time.Now() - if cc.closed || !cc.canTakeNewRequestLocked() { + if err := cc.awaitOpenSlotForRequest(req); err != nil { cc.mu.Unlock() - return nil, errClientConnUnusable + return nil, err } body := req.Body @@ -816,14 +863,13 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) { cs.abortRequestBodyWrite(errStopReqBodyWrite) } if re.err != nil { - if re.err == errClientConnGotGoAway { - cc.mu.Lock() - if cs.startedWrite { - re.err = errClientConnGotGoAwayAfterSomeReqBody - } - cc.mu.Unlock() - } + cc.mu.Lock() + afterBodyWrite := cs.startedWrite + cc.mu.Unlock() cc.forgetStreamID(cs.ID) + if afterBodyWrite { + return nil, afterReqBodyWriteError{re.err} + } return nil, re.err } res.Request = req @@ -836,31 +882,31 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) { case re := <-readLoopResCh: return handleReadLoopResponse(re) case <-respHeaderTimer: - cc.forgetStreamID(cs.ID) if !hasBody || bodyWritten { cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) } else { bodyWriter.cancel() cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel) } + cc.forgetStreamID(cs.ID) return nil, errTimeout case <-ctx.Done(): - cc.forgetStreamID(cs.ID) if !hasBody || bodyWritten { cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) } else { bodyWriter.cancel() cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel) } + cc.forgetStreamID(cs.ID) return nil, ctx.Err() case <-req.Cancel: - cc.forgetStreamID(cs.ID) if !hasBody || bodyWritten { cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) } else { bodyWriter.cancel() cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel) } + cc.forgetStreamID(cs.ID) return nil, errRequestCanceled case <-cs.peerReset: // processResetStream already removed the @@ -887,6 +933,45 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) { } } +// awaitOpenSlotForRequest waits until len(streams) < maxConcurrentStreams. +// Must hold cc.mu. +func (cc *ClientConn) awaitOpenSlotForRequest(req *http.Request) error { + var waitingForConn chan struct{} + var waitingForConnErr error // guarded by cc.mu + for { + cc.lastActive = time.Now() + if cc.closed || !cc.canTakeNewRequestLocked() { + return errClientConnUnusable + } + if int64(len(cc.streams))+1 <= int64(cc.maxConcurrentStreams) { + if waitingForConn != nil { + close(waitingForConn) + } + return nil + } + // Unfortunately, we cannot wait on a condition variable and channel at + // the same time, so instead, we spin up a goroutine to check if the + // request is canceled while we wait for a slot to open in the connection. + if waitingForConn == nil { + waitingForConn = make(chan struct{}) + go func() { + if err := awaitRequestCancel(req, waitingForConn); err != nil { + cc.mu.Lock() + waitingForConnErr = err + cc.cond.Broadcast() + cc.mu.Unlock() + } + }() + } + cc.pendingRequests++ + cc.cond.Wait() + cc.pendingRequests-- + if waitingForConnErr != nil { + return waitingForConnErr + } + } +} + // requires cc.wmu be held func (cc *ClientConn) writeHeaders(streamID uint32, endStream bool, hdrs []byte) error { first := true // first frame written (HEADERS is first, then CONTINUATION) @@ -1002,8 +1087,13 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) ( var trls []byte if hasTrailers { cc.mu.Lock() - defer cc.mu.Unlock() - trls = cc.encodeTrailers(req) + trls, err = cc.encodeTrailers(req) + cc.mu.Unlock() + if err != nil { + cc.writeStreamReset(cs.ID, ErrCodeInternal, err) + cc.forgetStreamID(cs.ID) + return err + } } cc.wmu.Lock() @@ -1106,62 +1196,86 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail } } - // 8.1.2.3 Request Pseudo-Header Fields - // The :path pseudo-header field includes the path and query parts of the - // target URI (the path-absolute production and optionally a '?' character - // followed by the query production (see Sections 3.3 and 3.4 of - // [RFC3986]). - cc.writeHeader(":authority", host) - cc.writeHeader(":method", req.Method) - if req.Method != "CONNECT" { - cc.writeHeader(":path", path) - cc.writeHeader(":scheme", req.URL.Scheme) - } - if trailers != "" { - cc.writeHeader("trailer", trailers) + enumerateHeaders := func(f func(name, value string)) { + // 8.1.2.3 Request Pseudo-Header Fields + // The :path pseudo-header field includes the path and query parts of the + // target URI (the path-absolute production and optionally a '?' character + // followed by the query production (see Sections 3.3 and 3.4 of + // [RFC3986]). + f(":authority", host) + f(":method", req.Method) + if req.Method != "CONNECT" { + f(":path", path) + f(":scheme", req.URL.Scheme) + } + if trailers != "" { + f("trailer", trailers) + } + + var didUA bool + for k, vv := range req.Header { + if strings.EqualFold(k, "host") || strings.EqualFold(k, "content-length") { + // Host is :authority, already sent. + // Content-Length is automatic, set below. + continue + } else if strings.EqualFold(k, "connection") || strings.EqualFold(k, "proxy-connection") || + strings.EqualFold(k, "transfer-encoding") || strings.EqualFold(k, "upgrade") || + strings.EqualFold(k, "keep-alive") { + // Per 8.1.2.2 Connection-Specific Header + // Fields, don't send connection-specific + // fields. We have already checked if any + // are error-worthy so just ignore the rest. + continue + } else if strings.EqualFold(k, "user-agent") { + // Match Go's http1 behavior: at most one + // User-Agent. If set to nil or empty string, + // then omit it. Otherwise if not mentioned, + // include the default (below). + didUA = true + if len(vv) < 1 { + continue + } + vv = vv[:1] + if vv[0] == "" { + continue + } + + } + + for _, v := range vv { + f(k, v) + } + } + if shouldSendReqContentLength(req.Method, contentLength) { + f("content-length", strconv.FormatInt(contentLength, 10)) + } + if addGzipHeader { + f("accept-encoding", "gzip") + } + if !didUA { + f("user-agent", defaultUserAgent) + } } - var didUA bool - for k, vv := range req.Header { - lowKey := strings.ToLower(k) - switch lowKey { - case "host", "content-length": - // Host is :authority, already sent. - // Content-Length is automatic, set below. - continue - case "connection", "proxy-connection", "transfer-encoding", "upgrade", "keep-alive": - // Per 8.1.2.2 Connection-Specific Header - // Fields, don't send connection-specific - // fields. We have already checked if any - // are error-worthy so just ignore the rest. - continue - case "user-agent": - // Match Go's http1 behavior: at most one - // User-Agent. If set to nil or empty string, - // then omit it. Otherwise if not mentioned, - // include the default (below). - didUA = true - if len(vv) < 1 { - continue - } - vv = vv[:1] - if vv[0] == "" { - continue - } - } - for _, v := range vv { - cc.writeHeader(lowKey, v) - } - } - if shouldSendReqContentLength(req.Method, contentLength) { - cc.writeHeader("content-length", strconv.FormatInt(contentLength, 10)) - } - if addGzipHeader { - cc.writeHeader("accept-encoding", "gzip") - } - if !didUA { - cc.writeHeader("user-agent", defaultUserAgent) + // Do a first pass over the headers counting bytes to ensure + // we don't exceed cc.peerMaxHeaderListSize. This is done as a + // separate pass before encoding the headers to prevent + // modifying the hpack state. + hlSize := uint64(0) + enumerateHeaders(func(name, value string) { + hf := hpack.HeaderField{Name: name, Value: value} + hlSize += uint64(hf.Size()) + }) + + if hlSize > cc.peerMaxHeaderListSize { + return nil, errRequestHeaderListSize } + + // Header list size is ok. Write the headers. + enumerateHeaders(func(name, value string) { + cc.writeHeader(strings.ToLower(name), value) + }) + return cc.hbuf.Bytes(), nil } @@ -1188,17 +1302,29 @@ func shouldSendReqContentLength(method string, contentLength int64) bool { } // requires cc.mu be held. -func (cc *ClientConn) encodeTrailers(req *http.Request) []byte { +func (cc *ClientConn) encodeTrailers(req *http.Request) ([]byte, error) { cc.hbuf.Reset() + + hlSize := uint64(0) for k, vv := range req.Trailer { - // Transfer-Encoding, etc.. have already been filter at the + for _, v := range vv { + hf := hpack.HeaderField{Name: k, Value: v} + hlSize += uint64(hf.Size()) + } + } + if hlSize > cc.peerMaxHeaderListSize { + return nil, errRequestHeaderListSize + } + + for k, vv := range req.Trailer { + // Transfer-Encoding, etc.. have already been filtered at the // start of RoundTrip lowKey := strings.ToLower(k) for _, v := range vv { cc.writeHeader(lowKey, v) } } - return cc.hbuf.Bytes() + return cc.hbuf.Bytes(), nil } func (cc *ClientConn) writeHeader(name, value string) { @@ -1246,7 +1372,9 @@ func (cc *ClientConn) streamByID(id uint32, andRemove bool) *clientStream { cc.idleTimer.Reset(cc.idleTimeout) } close(cs.done) - cc.cond.Broadcast() // wake up checkResetOrDone via clientStream.awaitFlowControl + // Wake up checkResetOrDone via clientStream.awaitFlowControl and + // wake up RoundTrip if there is a pending request. + cc.cond.Broadcast() } return cs } @@ -1345,8 +1473,9 @@ func (rl *clientConnReadLoop) run() error { cc.vlogf("http2: Transport readFrame error on conn %p: (%T) %v", cc, err, err) } if se, ok := err.(StreamError); ok { - if cs := cc.streamByID(se.StreamID, true /*ended; remove it*/); cs != nil { + if cs := cc.streamByID(se.StreamID, false); cs != nil { cs.cc.writeStreamReset(cs.ID, se.Code, err) + cs.cc.forgetStreamID(cs.ID) if se.Cause == nil { se.Cause = cc.fr.errDetail } @@ -1668,6 +1797,7 @@ func (b transportResponseBody) Close() error { } cs.bufPipe.BreakWithError(errClosedResponseBody) + cc.forgetStreamID(cs.ID) return nil } @@ -1702,6 +1832,14 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { } return nil } + if !cs.firstByte { + cc.logf("protocol error: received DATA before a HEADERS frame") + rl.endStreamError(cs, StreamError{ + StreamID: f.StreamID, + Code: ErrCodeProtocol, + }) + return nil + } if f.Length > 0 { // Check connection-level flow control. cc.mu.Lock() @@ -1816,6 +1954,8 @@ func (rl *clientConnReadLoop) processSettings(f *SettingsFrame) error { cc.maxFrameSize = s.Val case SettingMaxConcurrentStreams: cc.maxConcurrentStreams = s.Val + case SettingMaxHeaderListSize: + cc.peerMaxHeaderListSize = uint64(s.Val) case SettingInitialWindowSize: // Values above the maximum flow-control // window size of 2^31-1 MUST be treated as a @@ -1982,6 +2122,7 @@ func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, err error) var ( errResponseHeaderListSize = errors.New("http2: response header list larger than advertised limit") + errRequestHeaderListSize = errors.New("http2: request header list larger than peer's advertised limit") errPseudoTrailers = errors.New("http2: invalid pseudo header in trailers") ) diff --git a/vendor/golang.org/x/net/http2/transport_test.go b/vendor/golang.org/x/net/http2/transport_test.go index 15dfa0739..0126ff483 100644 --- a/vendor/golang.org/x/net/http2/transport_test.go +++ b/vendor/golang.org/x/net/http2/transport_test.go @@ -16,6 +16,7 @@ import ( "math/rand" "net" "net/http" + "net/http/httptest" "net/url" "os" "reflect" @@ -685,7 +686,7 @@ func newLocalListener(t *testing.T) net.Listener { return ln } -func (ct *clientTester) greet() { +func (ct *clientTester) greet(settings ...Setting) { buf := make([]byte, len(ClientPreface)) _, err := io.ReadFull(ct.sc, buf) if err != nil { @@ -699,7 +700,7 @@ func (ct *clientTester) greet() { ct.t.Fatalf("Wanted client settings frame; got %v", f) _ = sf // stash it away? } - if err := ct.fr.WriteSettings(); err != nil { + if err := ct.fr.WriteSettings(settings...); err != nil { ct.t.Fatal(err) } if err := ct.fr.WriteSettingsAck(); err != nil { @@ -1370,6 +1371,269 @@ func testInvalidTrailer(t *testing.T, trailers headerType, wantErr error, writeT ct.run() } +// headerListSize returns the HTTP2 header list size of h. +// http://httpwg.org/specs/rfc7540.html#SETTINGS_MAX_HEADER_LIST_SIZE +// http://httpwg.org/specs/rfc7540.html#MaxHeaderBlock +func headerListSize(h http.Header) (size uint32) { + for k, vv := range h { + for _, v := range vv { + hf := hpack.HeaderField{Name: k, Value: v} + size += hf.Size() + } + } + return size +} + +// padHeaders adds data to an http.Header until headerListSize(h) == +// limit. Due to the way header list sizes are calculated, padHeaders +// cannot add fewer than len("Pad-Headers") + 32 bytes to h, and will +// call t.Fatal if asked to do so. PadHeaders first reserves enough +// space for an empty "Pad-Headers" key, then adds as many copies of +// filler as possible. Any remaining bytes necessary to push the +// header list size up to limit are added to h["Pad-Headers"]. +func padHeaders(t *testing.T, h http.Header, limit uint64, filler string) { + if limit > 0xffffffff { + t.Fatalf("padHeaders: refusing to pad to more than 2^32-1 bytes. limit = %v", limit) + } + hf := hpack.HeaderField{Name: "Pad-Headers", Value: ""} + minPadding := uint64(hf.Size()) + size := uint64(headerListSize(h)) + + minlimit := size + minPadding + if limit < minlimit { + t.Fatalf("padHeaders: limit %v < %v", limit, minlimit) + } + + // Use a fixed-width format for name so that fieldSize + // remains constant. + nameFmt := "Pad-Headers-%06d" + hf = hpack.HeaderField{Name: fmt.Sprintf(nameFmt, 1), Value: filler} + fieldSize := uint64(hf.Size()) + + // Add as many complete filler values as possible, leaving + // room for at least one empty "Pad-Headers" key. + limit = limit - minPadding + for i := 0; size+fieldSize < limit; i++ { + name := fmt.Sprintf(nameFmt, i) + h.Add(name, filler) + size += fieldSize + } + + // Add enough bytes to reach limit. + remain := limit - size + lastValue := strings.Repeat("*", int(remain)) + h.Add("Pad-Headers", lastValue) +} + +func TestPadHeaders(t *testing.T) { + check := func(h http.Header, limit uint32, fillerLen int) { + if h == nil { + h = make(http.Header) + } + filler := strings.Repeat("f", fillerLen) + padHeaders(t, h, uint64(limit), filler) + gotSize := headerListSize(h) + if gotSize != limit { + t.Errorf("Got size = %v; want %v", gotSize, limit) + } + } + // Try all possible combinations for small fillerLen and limit. + hf := hpack.HeaderField{Name: "Pad-Headers", Value: ""} + minLimit := hf.Size() + for limit := minLimit; limit <= 128; limit++ { + for fillerLen := 0; uint32(fillerLen) <= limit; fillerLen++ { + check(nil, limit, fillerLen) + } + } + + // Try a few tests with larger limits, plus cumulative + // tests. Since these tests are cumulative, tests[i+1].limit + // must be >= tests[i].limit + minLimit. See the comment on + // padHeaders for more info on why the limit arg has this + // restriction. + tests := []struct { + fillerLen int + limit uint32 + }{ + { + fillerLen: 64, + limit: 1024, + }, + { + fillerLen: 1024, + limit: 1286, + }, + { + fillerLen: 256, + limit: 2048, + }, + { + fillerLen: 1024, + limit: 10 * 1024, + }, + { + fillerLen: 1023, + limit: 11 * 1024, + }, + } + h := make(http.Header) + for _, tc := range tests { + check(nil, tc.limit, tc.fillerLen) + check(h, tc.limit, tc.fillerLen) + } +} + +func TestTransportChecksRequestHeaderListSize(t *testing.T) { + st := newServerTester(t, + func(w http.ResponseWriter, r *http.Request) { + // Consume body & force client to send + // trailers before writing response. + // ioutil.ReadAll returns non-nil err for + // requests that attempt to send greater than + // maxHeaderListSize bytes of trailers, since + // those requests generate a stream reset. + ioutil.ReadAll(r.Body) + r.Body.Close() + }, + func(ts *httptest.Server) { + ts.Config.MaxHeaderBytes = 16 << 10 + }, + optOnlyServer, + optQuiet, + ) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + + checkRoundTrip := func(req *http.Request, wantErr error, desc string) { + res, err := tr.RoundTrip(req) + if err != wantErr { + if res != nil { + res.Body.Close() + } + t.Errorf("%v: RoundTrip err = %v; want %v", desc, err, wantErr) + return + } + if err == nil { + if res == nil { + t.Errorf("%v: response nil; want non-nil.", desc) + return + } + defer res.Body.Close() + if res.StatusCode != http.StatusOK { + t.Errorf("%v: response status = %v; want %v", desc, res.StatusCode, http.StatusOK) + } + return + } + if res != nil { + t.Errorf("%v: RoundTrip err = %v but response non-nil", desc, err) + } + } + headerListSizeForRequest := func(req *http.Request) (size uint64) { + contentLen := actualContentLength(req) + trailers, err := commaSeparatedTrailers(req) + if err != nil { + t.Fatalf("headerListSizeForRequest: %v", err) + } + cc := &ClientConn{peerMaxHeaderListSize: 0xffffffffffffffff} + cc.henc = hpack.NewEncoder(&cc.hbuf) + cc.mu.Lock() + hdrs, err := cc.encodeHeaders(req, true, trailers, contentLen) + cc.mu.Unlock() + if err != nil { + t.Fatalf("headerListSizeForRequest: %v", err) + } + hpackDec := hpack.NewDecoder(initialHeaderTableSize, func(hf hpack.HeaderField) { + size += uint64(hf.Size()) + }) + if len(hdrs) > 0 { + if _, err := hpackDec.Write(hdrs); err != nil { + t.Fatalf("headerListSizeForRequest: %v", err) + } + } + return size + } + // Create a new Request for each test, rather than reusing the + // same Request, to avoid a race when modifying req.Headers. + // See https://github.com/golang/go/issues/21316 + newRequest := func() *http.Request { + // Body must be non-nil to enable writing trailers. + body := strings.NewReader("hello") + req, err := http.NewRequest("POST", st.ts.URL, body) + if err != nil { + t.Fatalf("newRequest: NewRequest: %v", err) + } + return req + } + + // Make an arbitrary request to ensure we get the server's + // settings frame and initialize peerMaxHeaderListSize. + req := newRequest() + checkRoundTrip(req, nil, "Initial request") + + // Get the ClientConn associated with the request and validate + // peerMaxHeaderListSize. + addr := authorityAddr(req.URL.Scheme, req.URL.Host) + cc, err := tr.connPool().GetClientConn(req, addr) + if err != nil { + t.Fatalf("GetClientConn: %v", err) + } + cc.mu.Lock() + peerSize := cc.peerMaxHeaderListSize + cc.mu.Unlock() + st.scMu.Lock() + wantSize := uint64(st.sc.maxHeaderListSize()) + st.scMu.Unlock() + if peerSize != wantSize { + t.Errorf("peerMaxHeaderListSize = %v; want %v", peerSize, wantSize) + } + + // Sanity check peerSize. (*serverConn) maxHeaderListSize adds + // 320 bytes of padding. + wantHeaderBytes := uint64(st.ts.Config.MaxHeaderBytes) + 320 + if peerSize != wantHeaderBytes { + t.Errorf("peerMaxHeaderListSize = %v; want %v.", peerSize, wantHeaderBytes) + } + + // Pad headers & trailers, but stay under peerSize. + req = newRequest() + req.Header = make(http.Header) + req.Trailer = make(http.Header) + filler := strings.Repeat("*", 1024) + padHeaders(t, req.Trailer, peerSize, filler) + // cc.encodeHeaders adds some default headers to the request, + // so we need to leave room for those. + defaultBytes := headerListSizeForRequest(req) + padHeaders(t, req.Header, peerSize-defaultBytes, filler) + checkRoundTrip(req, nil, "Headers & Trailers under limit") + + // Add enough header bytes to push us over peerSize. + req = newRequest() + req.Header = make(http.Header) + padHeaders(t, req.Header, peerSize, filler) + checkRoundTrip(req, errRequestHeaderListSize, "Headers over limit") + + // Push trailers over the limit. + req = newRequest() + req.Trailer = make(http.Header) + padHeaders(t, req.Trailer, peerSize+1, filler) + checkRoundTrip(req, errRequestHeaderListSize, "Trailers over limit") + + // Send headers with a single large value. + req = newRequest() + filler = strings.Repeat("*", int(peerSize)) + req.Header = make(http.Header) + req.Header.Set("Big", filler) + checkRoundTrip(req, errRequestHeaderListSize, "Single large header") + + // Send trailers with a single large value. + req = newRequest() + req.Trailer = make(http.Header) + req.Trailer.Set("Big", filler) + checkRoundTrip(req, errRequestHeaderListSize, "Single large trailer") +} + func TestTransportChecksResponseHeaderListSize(t *testing.T) { ct := newClientTester(t) ct.client = func() error { @@ -2662,7 +2926,7 @@ func TestTransportRequestPathPseudo(t *testing.T) { }, } for i, tt := range tests { - cc := &ClientConn{} + cc := &ClientConn{peerMaxHeaderListSize: 0xffffffffffffffff} cc.henc = hpack.NewEncoder(&cc.hbuf) cc.mu.Lock() hdrs, err := cc.encodeHeaders(tt.req, false, "", -1) @@ -2926,6 +3190,339 @@ func TestTransportRetryAfterGOAWAY(t *testing.T) { } } +func TestTransportRetryAfterRefusedStream(t *testing.T) { + clientDone := make(chan struct{}) + ct := newClientTester(t) + ct.client = func() error { + defer ct.cc.(*net.TCPConn).CloseWrite() + defer close(clientDone) + req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) + resp, err := ct.tr.RoundTrip(req) + if err != nil { + return fmt.Errorf("RoundTrip: %v", err) + } + resp.Body.Close() + if resp.StatusCode != 204 { + return fmt.Errorf("Status = %v; want 204", resp.StatusCode) + } + return nil + } + ct.server = func() error { + ct.greet() + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + nreq := 0 + + for { + f, err := ct.fr.ReadFrame() + if err != nil { + select { + case <-clientDone: + // If the client's done, it + // will have reported any + // errors on its side. + return nil + default: + return err + } + } + switch f := f.(type) { + case *WindowUpdateFrame, *SettingsFrame: + case *HeadersFrame: + if !f.HeadersEnded() { + return fmt.Errorf("headers should have END_HEADERS be ended: %v", f) + } + nreq++ + if nreq == 1 { + ct.fr.WriteRSTStream(f.StreamID, ErrCodeRefusedStream) + } else { + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "204"}) + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: f.StreamID, + EndHeaders: true, + EndStream: true, + BlockFragment: buf.Bytes(), + }) + } + default: + return fmt.Errorf("Unexpected client frame %v", f) + } + } + } + ct.run() +} + +func TestTransportRetryHasLimit(t *testing.T) { + // Skip in short mode because the total expected delay is 1s+2s+4s+8s+16s=29s. + if testing.Short() { + t.Skip("skipping long test in short mode") + } + clientDone := make(chan struct{}) + ct := newClientTester(t) + ct.client = func() error { + defer ct.cc.(*net.TCPConn).CloseWrite() + defer close(clientDone) + req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) + resp, err := ct.tr.RoundTrip(req) + if err == nil { + return fmt.Errorf("RoundTrip expected error, got response: %+v", resp) + } + t.Logf("expected error, got: %v", err) + return nil + } + ct.server = func() error { + ct.greet() + for { + f, err := ct.fr.ReadFrame() + if err != nil { + select { + case <-clientDone: + // If the client's done, it + // will have reported any + // errors on its side. + return nil + default: + return err + } + } + switch f := f.(type) { + case *WindowUpdateFrame, *SettingsFrame: + case *HeadersFrame: + if !f.HeadersEnded() { + return fmt.Errorf("headers should have END_HEADERS be ended: %v", f) + } + ct.fr.WriteRSTStream(f.StreamID, ErrCodeRefusedStream) + default: + return fmt.Errorf("Unexpected client frame %v", f) + } + } + } + ct.run() +} + +func TestTransportResponseDataBeforeHeaders(t *testing.T) { + ct := newClientTester(t) + ct.client = func() error { + defer ct.cc.(*net.TCPConn).CloseWrite() + req := httptest.NewRequest("GET", "https://dummy.tld/", nil) + // First request is normal to ensure the check is per stream and not per connection. + _, err := ct.tr.RoundTrip(req) + if err != nil { + return fmt.Errorf("RoundTrip expected no error, got: %v", err) + } + // Second request returns a DATA frame with no HEADERS. + resp, err := ct.tr.RoundTrip(req) + if err == nil { + return fmt.Errorf("RoundTrip expected error, got response: %+v", resp) + } + if err, ok := err.(StreamError); !ok || err.Code != ErrCodeProtocol { + return fmt.Errorf("expected stream PROTOCOL_ERROR, got: %v", err) + } + return nil + } + ct.server = func() error { + ct.greet() + for { + f, err := ct.fr.ReadFrame() + if err == io.EOF { + return nil + } else if err != nil { + return err + } + switch f := f.(type) { + case *WindowUpdateFrame, *SettingsFrame: + case *HeadersFrame: + switch f.StreamID { + case 1: + // Send a valid response to first request. + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: f.StreamID, + EndHeaders: true, + EndStream: true, + BlockFragment: buf.Bytes(), + }) + case 3: + ct.fr.WriteData(f.StreamID, true, []byte("payload")) + } + default: + return fmt.Errorf("Unexpected client frame %v", f) + } + } + } + ct.run() +} +func TestTransportRequestsStallAtServerLimit(t *testing.T) { + const maxConcurrent = 2 + + greet := make(chan struct{}) // server sends initial SETTINGS frame + gotRequest := make(chan struct{}) // server received a request + clientDone := make(chan struct{}) + + // Collect errors from goroutines. + var wg sync.WaitGroup + errs := make(chan error, 100) + defer func() { + wg.Wait() + close(errs) + for err := range errs { + t.Error(err) + } + }() + + // We will send maxConcurrent+2 requests. This checker goroutine waits for the + // following stages: + // 1. The first maxConcurrent requests are received by the server. + // 2. The client will cancel the next request + // 3. The server is unblocked so it can service the first maxConcurrent requests + // 4. The client will send the final request + wg.Add(1) + unblockClient := make(chan struct{}) + clientRequestCancelled := make(chan struct{}) + unblockServer := make(chan struct{}) + go func() { + defer wg.Done() + // Stage 1. + for k := 0; k < maxConcurrent; k++ { + <-gotRequest + } + // Stage 2. + close(unblockClient) + <-clientRequestCancelled + // Stage 3: give some time for the final RoundTrip call to be scheduled and + // verify that the final request is not sent. + time.Sleep(50 * time.Millisecond) + select { + case <-gotRequest: + errs <- errors.New("last request did not stall") + close(unblockServer) + return + default: + } + close(unblockServer) + // Stage 4. + <-gotRequest + }() + + ct := newClientTester(t) + ct.client = func() error { + var wg sync.WaitGroup + defer func() { + wg.Wait() + close(clientDone) + ct.cc.(*net.TCPConn).CloseWrite() + }() + for k := 0; k < maxConcurrent+2; k++ { + wg.Add(1) + go func(k int) { + defer wg.Done() + // Don't send the second request until after receiving SETTINGS from the server + // to avoid a race where we use the default SettingMaxConcurrentStreams, which + // is much larger than maxConcurrent. We have to send the first request before + // waiting because the first request triggers the dial and greet. + if k > 0 { + <-greet + } + // Block until maxConcurrent requests are sent before sending any more. + if k >= maxConcurrent { + <-unblockClient + } + req, _ := http.NewRequest("GET", fmt.Sprintf("https://dummy.tld/%d", k), nil) + if k == maxConcurrent { + // This request will be canceled. + cancel := make(chan struct{}) + req.Cancel = cancel + close(cancel) + _, err := ct.tr.RoundTrip(req) + close(clientRequestCancelled) + if err == nil { + errs <- fmt.Errorf("RoundTrip(%d) should have failed due to cancel", k) + return + } + } else { + resp, err := ct.tr.RoundTrip(req) + if err != nil { + errs <- fmt.Errorf("RoundTrip(%d): %v", k, err) + return + } + ioutil.ReadAll(resp.Body) + resp.Body.Close() + if resp.StatusCode != 204 { + errs <- fmt.Errorf("Status = %v; want 204", resp.StatusCode) + return + } + } + }(k) + } + return nil + } + + ct.server = func() error { + var wg sync.WaitGroup + defer wg.Wait() + + ct.greet(Setting{SettingMaxConcurrentStreams, maxConcurrent}) + + // Server write loop. + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + writeResp := make(chan uint32, maxConcurrent+1) + + wg.Add(1) + go func() { + defer wg.Done() + <-unblockServer + for id := range writeResp { + buf.Reset() + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "204"}) + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: id, + EndHeaders: true, + EndStream: true, + BlockFragment: buf.Bytes(), + }) + } + }() + + // Server read loop. + var nreq int + for { + f, err := ct.fr.ReadFrame() + if err != nil { + select { + case <-clientDone: + // If the client's done, it will have reported any errors on its side. + return nil + default: + return err + } + } + switch f := f.(type) { + case *WindowUpdateFrame: + case *SettingsFrame: + // Wait for the client SETTINGS ack until ending the greet. + close(greet) + case *HeadersFrame: + if !f.HeadersEnded() { + return fmt.Errorf("headers should have END_HEADERS be ended: %v", f) + } + gotRequest <- struct{}{} + nreq++ + writeResp <- f.StreamID + if nreq == maxConcurrent+1 { + close(writeResp) + } + default: + return fmt.Errorf("Unexpected client frame %v", f) + } + } + } + + ct.run() +} + func TestAuthorityAddr(t *testing.T) { tests := []struct { scheme, authority string @@ -3039,3 +3636,51 @@ func TestTransportNoBodyMeansNoDATA(t *testing.T) { } ct.run() } + +func benchSimpleRoundTrip(b *testing.B, nHeaders int) { + defer disableGoroutineTracking()() + b.ReportAllocs() + st := newServerTester(b, + func(w http.ResponseWriter, r *http.Request) { + }, + optOnlyServer, + optQuiet, + ) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + + req, err := http.NewRequest("GET", st.ts.URL, nil) + if err != nil { + b.Fatal(err) + } + + for i := 0; i < nHeaders; i++ { + name := fmt.Sprint("A-", i) + req.Header.Set(name, "*") + } + + b.ResetTimer() + + for i := 0; i < b.N; i++ { + res, err := tr.RoundTrip(req) + if err != nil { + if res != nil { + res.Body.Close() + } + b.Fatalf("RoundTrip err = %v; want nil", err) + } + res.Body.Close() + if res.StatusCode != http.StatusOK { + b.Fatalf("Response code = %v; want %v", res.StatusCode, http.StatusOK) + } + } +} + +func BenchmarkClientRequestHeaders(b *testing.B) { + b.Run(" 0 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 0) }) + b.Run(" 10 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 10) }) + b.Run(" 100 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 100) }) + b.Run("1000 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 1000) }) +} diff --git a/vendor/golang.org/x/net/idna/idna_test.go b/vendor/golang.org/x/net/idna/idna_test.go index b1bc6fa22..0b067cac9 100644 --- a/vendor/golang.org/x/net/idna/idna_test.go +++ b/vendor/golang.org/x/net/idna/idna_test.go @@ -39,5 +39,70 @@ func TestIDNA(t *testing.T) { } } +func TestIDNASeparators(t *testing.T) { + type subCase struct { + unicode string + wantASCII string + wantErr bool + } + + testCases := []struct { + name string + profile *Profile + subCases []subCase + }{ + { + name: "Punycode", profile: Punycode, + subCases: []subCase{ + {"example\u3002jp", "xn--examplejp-ck3h", false}, + {"東京\uFF0Ejp", "xn--jp-l92cn98g071o", false}, + {"大阪\uFF61jp", "xn--jp-ku9cz72u463f", false}, + }, + }, + { + name: "Lookup", profile: Lookup, + subCases: []subCase{ + {"example\u3002jp", "example.jp", false}, + {"東京\uFF0Ejp", "xn--1lqs71d.jp", false}, + {"大阪\uFF61jp", "xn--pssu33l.jp", false}, + }, + }, + { + name: "Display", profile: Display, + subCases: []subCase{ + {"example\u3002jp", "example.jp", false}, + {"東京\uFF0Ejp", "xn--1lqs71d.jp", false}, + {"大阪\uFF61jp", "xn--pssu33l.jp", false}, + }, + }, + { + name: "Registration", profile: Registration, + subCases: []subCase{ + {"example\u3002jp", "", true}, + {"東京\uFF0Ejp", "", true}, + {"大阪\uFF61jp", "", true}, + }, + }, + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + for _, c := range tc.subCases { + gotA, err := tc.profile.ToASCII(c.unicode) + if c.wantErr { + if err == nil { + t.Errorf("ToASCII(%q): got no error, but an error expected", c.unicode) + } + } else { + if err != nil { + t.Errorf("ToASCII(%q): got err=%v, but no error expected", c.unicode, err) + } else if gotA != c.wantASCII { + t.Errorf("ToASCII(%q): got %q, want %q", c.unicode, gotA, c.wantASCII) + } + } + } + }) + } +} + // TODO(nigeltao): test errors, once we've specified when ToASCII and ToUnicode // return errors. diff --git a/vendor/golang.org/x/net/route/defs_openbsd.go b/vendor/golang.org/x/net/route/defs_openbsd.go index 0f66d3619..173bb5d51 100644 --- a/vendor/golang.org/x/net/route/defs_openbsd.go +++ b/vendor/golang.org/x/net/route/defs_openbsd.go @@ -69,6 +69,9 @@ const ( sysRTM_IFINFO = C.RTM_IFINFO sysRTM_IFANNOUNCE = C.RTM_IFANNOUNCE sysRTM_DESYNC = C.RTM_DESYNC + sysRTM_INVALIDATE = C.RTM_INVALIDATE + sysRTM_BFD = C.RTM_BFD + sysRTM_PROPOSAL = C.RTM_PROPOSAL sysRTA_DST = C.RTA_DST sysRTA_GATEWAY = C.RTA_GATEWAY @@ -81,6 +84,10 @@ const ( sysRTA_SRC = C.RTA_SRC sysRTA_SRCMASK = C.RTA_SRCMASK sysRTA_LABEL = C.RTA_LABEL + sysRTA_BFD = C.RTA_BFD + sysRTA_DNS = C.RTA_DNS + sysRTA_STATIC = C.RTA_STATIC + sysRTA_SEARCH = C.RTA_SEARCH sysRTAX_DST = C.RTAX_DST sysRTAX_GATEWAY = C.RTAX_GATEWAY @@ -93,6 +100,10 @@ const ( sysRTAX_SRC = C.RTAX_SRC sysRTAX_SRCMASK = C.RTAX_SRCMASK sysRTAX_LABEL = C.RTAX_LABEL + sysRTAX_BFD = C.RTAX_BFD + sysRTAX_DNS = C.RTAX_DNS + sysRTAX_STATIC = C.RTAX_STATIC + sysRTAX_SEARCH = C.RTAX_SEARCH sysRTAX_MAX = C.RTAX_MAX ) diff --git a/vendor/golang.org/x/net/route/route_test.go b/vendor/golang.org/x/net/route/route_test.go index 63fd8c561..61bd17454 100644 --- a/vendor/golang.org/x/net/route/route_test.go +++ b/vendor/golang.org/x/net/route/route_test.go @@ -74,6 +74,10 @@ var addrAttrNames = [...]string{ "df:mpls1-n:tag-o:src", // mpls1 for dragonfly, tag for netbsd, src for openbsd "df:mpls2-o:srcmask", // mpls2 for dragonfly, srcmask for openbsd "df:mpls3-o:label", // mpls3 for dragonfly, label for openbsd + "o:bfd", // bfd for openbsd + "o:dns", // dns for openbsd + "o:static", // static for openbsd + "o:search", // search for openbsd } func (attrs addrAttrs) String() string { diff --git a/vendor/golang.org/x/net/route/sys_openbsd.go b/vendor/golang.org/x/net/route/sys_openbsd.go index 19fc025e5..c5674e83d 100644 --- a/vendor/golang.org/x/net/route/sys_openbsd.go +++ b/vendor/golang.org/x/net/route/sys_openbsd.go @@ -75,5 +75,6 @@ func probeRoutingStack() (int, map[int]*wireFormat) { sysRTM_DELADDR: ifam, sysRTM_IFINFO: ifm, sysRTM_IFANNOUNCE: ifanm, + sysRTM_DESYNC: rtm, } } diff --git a/vendor/golang.org/x/net/route/zsys_openbsd.go b/vendor/golang.org/x/net/route/zsys_openbsd.go index f5a1ff967..db8c8efb4 100644 --- a/vendor/golang.org/x/net/route/zsys_openbsd.go +++ b/vendor/golang.org/x/net/route/zsys_openbsd.go @@ -54,6 +54,9 @@ const ( sysRTM_IFINFO = 0xe sysRTM_IFANNOUNCE = 0xf sysRTM_DESYNC = 0x10 + sysRTM_INVALIDATE = 0x11 + sysRTM_BFD = 0x12 + sysRTM_PROPOSAL = 0x13 sysRTA_DST = 0x1 sysRTA_GATEWAY = 0x2 @@ -66,6 +69,10 @@ const ( sysRTA_SRC = 0x100 sysRTA_SRCMASK = 0x200 sysRTA_LABEL = 0x400 + sysRTA_BFD = 0x800 + sysRTA_DNS = 0x1000 + sysRTA_STATIC = 0x2000 + sysRTA_SEARCH = 0x4000 sysRTAX_DST = 0x0 sysRTAX_GATEWAY = 0x1 @@ -78,7 +85,11 @@ const ( sysRTAX_SRC = 0x8 sysRTAX_SRCMASK = 0x9 sysRTAX_LABEL = 0xa - sysRTAX_MAX = 0xb + sysRTAX_BFD = 0xb + sysRTAX_DNS = 0xc + sysRTAX_STATIC = 0xd + sysRTAX_SEARCH = 0xe + sysRTAX_MAX = 0xf ) const ( diff --git a/vendor/golang.org/x/oauth2/example_test.go b/vendor/golang.org/x/oauth2/example_test.go index 378c70dc1..fc2f793b2 100644 --- a/vendor/golang.org/x/oauth2/example_test.go +++ b/vendor/golang.org/x/oauth2/example_test.go @@ -48,24 +48,42 @@ func ExampleConfig() { client.Get("...") } -func ExampleHTTPClient() { - hc := &http.Client{Timeout: 2 * time.Second} - ctx := context.WithValue(context.Background(), oauth2.HTTPClient, hc) +func ExampleConfig_customHTTP() { + ctx := context.Background() conf := &oauth2.Config{ ClientID: "YOUR_CLIENT_ID", ClientSecret: "YOUR_CLIENT_SECRET", Scopes: []string{"SCOPE1", "SCOPE2"}, Endpoint: oauth2.Endpoint{ - AuthURL: "https://provider.com/o/oauth2/auth", TokenURL: "https://provider.com/o/oauth2/token", + AuthURL: "https://provider.com/o/oauth2/auth", }, } - // Exchange request will be made by the custom - // HTTP client, hc. - _, err := conf.Exchange(ctx, "foo") + // Redirect user to consent page to ask for permission + // for the scopes specified above. + url := conf.AuthCodeURL("state", oauth2.AccessTypeOffline) + fmt.Printf("Visit the URL for the auth dialog: %v", url) + + // Use the authorization code that is pushed to the redirect + // URL. Exchange will do the handshake to retrieve the + // initial access token. The HTTP Client returned by + // conf.Client will refresh the token as necessary. + var code string + if _, err := fmt.Scan(&code); err != nil { + log.Fatal(err) + } + + // Use the custom HTTP client when requesting a token. + httpClient := &http.Client{Timeout: 2 * time.Second} + ctx = context.WithValue(ctx, oauth2.HTTPClient, httpClient) + + tok, err := conf.Exchange(ctx, code) if err != nil { log.Fatal(err) } + + client := conf.Client(ctx, tok) + _ = client } diff --git a/vendor/golang.org/x/oauth2/google/default.go b/vendor/golang.org/x/oauth2/google/default.go index 004ed4eab..b4b62745c 100644 --- a/vendor/golang.org/x/oauth2/google/default.go +++ b/vendor/golang.org/x/oauth2/google/default.go @@ -24,6 +24,12 @@ import ( type DefaultCredentials struct { ProjectID string // may be empty TokenSource oauth2.TokenSource + + // JSON contains the raw bytes from a JSON credentials file. + // This field may be nil if authentication is provided by the + // environment and not with a credentials file, e.g. when code is + // running on Google Cloud Platform. + JSON []byte } // DefaultClient returns an HTTP Client that uses the @@ -126,5 +132,6 @@ func readCredentialsFile(ctx context.Context, filename string, scopes []string) return &DefaultCredentials{ ProjectID: f.ProjectID, TokenSource: ts, + JSON: b, }, nil } diff --git a/vendor/golang.org/x/oauth2/internal/token.go b/vendor/golang.org/x/oauth2/internal/token.go index 0487c81b5..53ec23cee 100644 --- a/vendor/golang.org/x/oauth2/internal/token.go +++ b/vendor/golang.org/x/oauth2/internal/token.go @@ -188,7 +188,7 @@ func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, } req.Header.Set("Content-Type", "application/x-www-form-urlencoded") if !bustedAuth { - req.SetBasicAuth(clientID, clientSecret) + req.SetBasicAuth(url.QueryEscape(clientID), url.QueryEscape(clientSecret)) } r, err := ctxhttp.Do(ctx, hc, req) if err != nil { diff --git a/vendor/golang.org/x/oauth2/oauth2.go b/vendor/golang.org/x/oauth2/oauth2.go index 3e4835d7e..4bafe873d 100644 --- a/vendor/golang.org/x/oauth2/oauth2.go +++ b/vendor/golang.org/x/oauth2/oauth2.go @@ -291,6 +291,10 @@ var HTTPClient internal.ContextKey // NewClient creates an *http.Client from a Context and TokenSource. // The returned client is not valid beyond the lifetime of the context. // +// Note that if a custom *http.Client is provided via the Context it +// is used only for token acquisition and is not used to configure the +// *http.Client returned from NewClient. +// // As a special case, if src is nil, a non-OAuth2 client is returned // using the provided context. This exists to support related OAuth2 // packages. diff --git a/vendor/golang.org/x/oauth2/oauth2_test.go b/vendor/golang.org/x/oauth2/oauth2_test.go index 584084b2f..09293ede1 100644 --- a/vendor/golang.org/x/oauth2/oauth2_test.go +++ b/vendor/golang.org/x/oauth2/oauth2_test.go @@ -72,6 +72,25 @@ func TestAuthCodeURL_Optional(t *testing.T) { } } +func TestURLUnsafeClientConfig(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if got, want := r.Header.Get("Authorization"), "Basic Q0xJRU5UX0lEJTNGJTNGOkNMSUVOVF9TRUNSRVQlM0YlM0Y="; got != want { + t.Errorf("Authorization header = %q; want %q", got, want) + } + + w.Header().Set("Content-Type", "application/x-www-form-urlencoded") + w.Write([]byte("access_token=90d64460d14870c08c81352a05dedd3465940a7c&scope=user&token_type=bearer")) + })) + defer ts.Close() + conf := newConf(ts.URL) + conf.ClientID = "CLIENT_ID??" + conf.ClientSecret = "CLIENT_SECRET??" + _, err := conf.Exchange(context.Background(), "exchange-code") + if err != nil { + t.Error(err) + } +} + func TestExchangeRequest(t *testing.T) { ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if r.URL.String() != "/token" { diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s b/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s new file mode 100644 index 000000000..469bfa100 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s @@ -0,0 +1,29 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for ARM, OpenBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + B syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + B syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-52 + B syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + B syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/creds_test.go b/vendor/golang.org/x/sys/unix/creds_test.go index eaae7c367..7ae330532 100644 --- a/vendor/golang.org/x/sys/unix/creds_test.go +++ b/vendor/golang.org/x/sys/unix/creds_test.go @@ -21,101 +21,116 @@ import ( // sockets. The SO_PASSCRED socket option is enabled on the sending // socket for this to work. func TestSCMCredentials(t *testing.T) { - fds, err := unix.Socketpair(unix.AF_LOCAL, unix.SOCK_STREAM, 0) - if err != nil { - t.Fatalf("Socketpair: %v", err) - } - defer unix.Close(fds[0]) - defer unix.Close(fds[1]) - - err = unix.SetsockoptInt(fds[0], unix.SOL_SOCKET, unix.SO_PASSCRED, 1) - if err != nil { - t.Fatalf("SetsockoptInt: %v", err) + socketTypeTests := []struct { + socketType int + dataLen int + }{ + { + unix.SOCK_STREAM, + 1, + }, { + unix.SOCK_DGRAM, + 0, + }, } - srvFile := os.NewFile(uintptr(fds[0]), "server") - defer srvFile.Close() - srv, err := net.FileConn(srvFile) - if err != nil { - t.Errorf("FileConn: %v", err) - return - } - defer srv.Close() + for _, tt := range socketTypeTests { + fds, err := unix.Socketpair(unix.AF_LOCAL, tt.socketType, 0) + if err != nil { + t.Fatalf("Socketpair: %v", err) + } + defer unix.Close(fds[0]) + defer unix.Close(fds[1]) - cliFile := os.NewFile(uintptr(fds[1]), "client") - defer cliFile.Close() - cli, err := net.FileConn(cliFile) - if err != nil { - t.Errorf("FileConn: %v", err) - return - } - defer cli.Close() + err = unix.SetsockoptInt(fds[0], unix.SOL_SOCKET, unix.SO_PASSCRED, 1) + if err != nil { + t.Fatalf("SetsockoptInt: %v", err) + } + + srvFile := os.NewFile(uintptr(fds[0]), "server") + defer srvFile.Close() + srv, err := net.FileConn(srvFile) + if err != nil { + t.Errorf("FileConn: %v", err) + return + } + defer srv.Close() + + cliFile := os.NewFile(uintptr(fds[1]), "client") + defer cliFile.Close() + cli, err := net.FileConn(cliFile) + if err != nil { + t.Errorf("FileConn: %v", err) + return + } + defer cli.Close() + + var ucred unix.Ucred + if os.Getuid() != 0 { + ucred.Pid = int32(os.Getpid()) + ucred.Uid = 0 + ucred.Gid = 0 + oob := unix.UnixCredentials(&ucred) + _, _, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil) + if op, ok := err.(*net.OpError); ok { + err = op.Err + } + if sys, ok := err.(*os.SyscallError); ok { + err = sys.Err + } + if err != syscall.EPERM { + t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err) + } + } - var ucred unix.Ucred - if os.Getuid() != 0 { ucred.Pid = int32(os.Getpid()) - ucred.Uid = 0 - ucred.Gid = 0 + ucred.Uid = uint32(os.Getuid()) + ucred.Gid = uint32(os.Getgid()) oob := unix.UnixCredentials(&ucred) - _, _, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil) - if op, ok := err.(*net.OpError); ok { - err = op.Err + + // On SOCK_STREAM, this is internally going to send a dummy byte + n, oobn, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil) + if err != nil { + t.Fatalf("WriteMsgUnix: %v", err) } - if sys, ok := err.(*os.SyscallError); ok { - err = sys.Err + if n != 0 { + t.Fatalf("WriteMsgUnix n = %d, want 0", n) } - if err != syscall.EPERM { - t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err) + if oobn != len(oob) { + t.Fatalf("WriteMsgUnix oobn = %d, want %d", oobn, len(oob)) } - } - ucred.Pid = int32(os.Getpid()) - ucred.Uid = uint32(os.Getuid()) - ucred.Gid = uint32(os.Getgid()) - oob := unix.UnixCredentials(&ucred) + oob2 := make([]byte, 10*len(oob)) + n, oobn2, flags, _, err := srv.(*net.UnixConn).ReadMsgUnix(nil, oob2) + if err != nil { + t.Fatalf("ReadMsgUnix: %v", err) + } + if flags != 0 { + t.Fatalf("ReadMsgUnix flags = 0x%x, want 0", flags) + } + if n != tt.dataLen { + t.Fatalf("ReadMsgUnix n = %d, want %d", n, tt.dataLen) + } + if oobn2 != oobn { + // without SO_PASSCRED set on the socket, ReadMsgUnix will + // return zero oob bytes + t.Fatalf("ReadMsgUnix oobn = %d, want %d", oobn2, oobn) + } + oob2 = oob2[:oobn2] + if !bytes.Equal(oob, oob2) { + t.Fatal("ReadMsgUnix oob bytes don't match") + } - // this is going to send a dummy byte - n, oobn, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil) - if err != nil { - t.Fatalf("WriteMsgUnix: %v", err) - } - if n != 0 { - t.Fatalf("WriteMsgUnix n = %d, want 0", n) - } - if oobn != len(oob) { - t.Fatalf("WriteMsgUnix oobn = %d, want %d", oobn, len(oob)) - } - - oob2 := make([]byte, 10*len(oob)) - n, oobn2, flags, _, err := srv.(*net.UnixConn).ReadMsgUnix(nil, oob2) - if err != nil { - t.Fatalf("ReadMsgUnix: %v", err) - } - if flags != 0 { - t.Fatalf("ReadMsgUnix flags = 0x%x, want 0", flags) - } - if n != 1 { - t.Fatalf("ReadMsgUnix n = %d, want 1 (dummy byte)", n) - } - if oobn2 != oobn { - // without SO_PASSCRED set on the socket, ReadMsgUnix will - // return zero oob bytes - t.Fatalf("ReadMsgUnix oobn = %d, want %d", oobn2, oobn) - } - oob2 = oob2[:oobn2] - if !bytes.Equal(oob, oob2) { - t.Fatal("ReadMsgUnix oob bytes don't match") - } - - scm, err := unix.ParseSocketControlMessage(oob2) - if err != nil { - t.Fatalf("ParseSocketControlMessage: %v", err) - } - newUcred, err := unix.ParseUnixCredentials(&scm[0]) - if err != nil { - t.Fatalf("ParseUnixCredentials: %v", err) - } - if *newUcred != ucred { - t.Fatalf("ParseUnixCredentials = %+v, want %+v", newUcred, ucred) + scm, err := unix.ParseSocketControlMessage(oob2) + if err != nil { + t.Fatalf("ParseSocketControlMessage: %v", err) + } + newUcred, err := unix.ParseUnixCredentials(&scm[0]) + if err != nil { + t.Fatalf("ParseUnixCredentials: %v", err) + } + if *newUcred != ucred { + t.Fatalf("ParseUnixCredentials = %+v, want %+v", newUcred, ucred) + } } } diff --git a/vendor/golang.org/x/sys/unix/dev_darwin.go b/vendor/golang.org/x/sys/unix/dev_darwin.go new file mode 100644 index 000000000..8d1dc0fa3 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_darwin.go @@ -0,0 +1,24 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Functions to access/create device major and minor numbers matching the +// encoding used in Darwin's sys/types.h header. + +package unix + +// Major returns the major component of a Darwin device number. +func Major(dev uint64) uint32 { + return uint32((dev >> 24) & 0xff) +} + +// Minor returns the minor component of a Darwin device number. +func Minor(dev uint64) uint32 { + return uint32(dev & 0xffffff) +} + +// Mkdev returns a Darwin device number generated from the given major and minor +// components. +func Mkdev(major, minor uint32) uint64 { + return (uint64(major) << 24) | uint64(minor) +} diff --git a/vendor/golang.org/x/sys/unix/dev_darwin_test.go b/vendor/golang.org/x/sys/unix/dev_darwin_test.go new file mode 100644 index 000000000..48d044860 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_darwin_test.go @@ -0,0 +1,49 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix_test + +import ( + "fmt" + "testing" + + "golang.org/x/sys/unix" +) + +func TestDevices(t *testing.T) { + testCases := []struct { + path string + major uint32 + minor uint32 + }{ + // Most of the device major/minor numbers on Darwin are + // dynamically generated by devfs. These are some well-known + // static numbers. + {"/dev/ttyp0", 4, 0}, + {"/dev/ttys0", 4, 48}, + {"/dev/ptyp0", 5, 0}, + {"/dev/ptyr0", 5, 32}, + } + for _, tc := range testCases { + t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) { + var stat unix.Stat_t + err := unix.Stat(tc.path, &stat) + if err != nil { + t.Errorf("failed to stat device: %v", err) + return + } + + dev := uint64(stat.Rdev) + if unix.Major(dev) != tc.major { + t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major) + } + if unix.Minor(dev) != tc.minor { + t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor) + } + if unix.Mkdev(tc.major, tc.minor) != dev { + t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev) + } + }) + } +} diff --git a/vendor/golang.org/x/sys/unix/dev_dragonfly.go b/vendor/golang.org/x/sys/unix/dev_dragonfly.go new file mode 100644 index 000000000..8502f202c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_dragonfly.go @@ -0,0 +1,30 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Functions to access/create device major and minor numbers matching the +// encoding used in Dragonfly's sys/types.h header. +// +// The information below is extracted and adapted from sys/types.h: +// +// Minor gives a cookie instead of an index since in order to avoid changing the +// meanings of bits 0-15 or wasting time and space shifting bits 16-31 for +// devices that don't use them. + +package unix + +// Major returns the major component of a DragonFlyBSD device number. +func Major(dev uint64) uint32 { + return uint32((dev >> 8) & 0xff) +} + +// Minor returns the minor component of a DragonFlyBSD device number. +func Minor(dev uint64) uint32 { + return uint32(dev & 0xffff00ff) +} + +// Mkdev returns a DragonFlyBSD device number generated from the given major and +// minor components. +func Mkdev(major, minor uint32) uint64 { + return (uint64(major) << 8) | uint64(minor) +} diff --git a/vendor/golang.org/x/sys/unix/dev_dragonfly_test.go b/vendor/golang.org/x/sys/unix/dev_dragonfly_test.go new file mode 100644 index 000000000..2caba08a8 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_dragonfly_test.go @@ -0,0 +1,48 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix_test + +import ( + "fmt" + "testing" + + "golang.org/x/sys/unix" +) + +func TestDevices(t *testing.T) { + testCases := []struct { + path string + major uint32 + minor uint32 + }{ + // Minor is a cookie instead of an index on DragonFlyBSD + {"/dev/null", 10, 0x00000002}, + {"/dev/random", 10, 0x00000003}, + {"/dev/urandom", 10, 0x00000004}, + {"/dev/zero", 10, 0x0000000c}, + {"/dev/bpf", 15, 0xffff00ff}, + } + for _, tc := range testCases { + t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) { + var stat unix.Stat_t + err := unix.Stat(tc.path, &stat) + if err != nil { + t.Errorf("failed to stat device: %v", err) + return + } + + dev := uint64(stat.Rdev) + if unix.Major(dev) != tc.major { + t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major) + } + if unix.Minor(dev) != tc.minor { + t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor) + } + if unix.Mkdev(tc.major, tc.minor) != dev { + t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev) + } + }) + } +} diff --git a/vendor/golang.org/x/sys/unix/dev_freebsd.go b/vendor/golang.org/x/sys/unix/dev_freebsd.go new file mode 100644 index 000000000..eba3b4bd3 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_freebsd.go @@ -0,0 +1,30 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Functions to access/create device major and minor numbers matching the +// encoding used in FreeBSD's sys/types.h header. +// +// The information below is extracted and adapted from sys/types.h: +// +// Minor gives a cookie instead of an index since in order to avoid changing the +// meanings of bits 0-15 or wasting time and space shifting bits 16-31 for +// devices that don't use them. + +package unix + +// Major returns the major component of a FreeBSD device number. +func Major(dev uint64) uint32 { + return uint32((dev >> 8) & 0xff) +} + +// Minor returns the minor component of a FreeBSD device number. +func Minor(dev uint64) uint32 { + return uint32(dev & 0xffff00ff) +} + +// Mkdev returns a FreeBSD device number generated from the given major and +// minor components. +func Mkdev(major, minor uint32) uint64 { + return (uint64(major) << 8) | uint64(minor) +} diff --git a/vendor/golang.org/x/sys/unix/dev_linux.go b/vendor/golang.org/x/sys/unix/dev_linux.go new file mode 100644 index 000000000..d165d6f30 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_linux.go @@ -0,0 +1,42 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Functions to access/create device major and minor numbers matching the +// encoding used by the Linux kernel and glibc. +// +// The information below is extracted and adapted from bits/sysmacros.h in the +// glibc sources: +// +// dev_t in glibc is 64-bit, with 32-bit major and minor numbers. glibc's +// default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major +// number and m is a hex digit of the minor number. This is backward compatible +// with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also +// backward compatible with the Linux kernel, which for some architectures uses +// 32-bit dev_t, encoded as mmmM MMmm. + +package unix + +// Major returns the major component of a Linux device number. +func Major(dev uint64) uint32 { + major := uint32((dev & 0x00000000000fff00) >> 8) + major |= uint32((dev & 0xfffff00000000000) >> 32) + return major +} + +// Minor returns the minor component of a Linux device number. +func Minor(dev uint64) uint32 { + minor := uint32((dev & 0x00000000000000ff) >> 0) + minor |= uint32((dev & 0x00000ffffff00000) >> 12) + return minor +} + +// Mkdev returns a Linux device number generated from the given major and minor +// components. +func Mkdev(major, minor uint32) uint64 { + dev := (uint64(major) & 0x00000fff) << 8 + dev |= (uint64(major) & 0xfffff000) << 32 + dev |= (uint64(minor) & 0x000000ff) << 0 + dev |= (uint64(minor) & 0xffffff00) << 12 + return dev +} diff --git a/vendor/golang.org/x/sys/unix/dev_linux_test.go b/vendor/golang.org/x/sys/unix/dev_linux_test.go new file mode 100644 index 000000000..6e001f37a --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_linux_test.go @@ -0,0 +1,51 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix_test + +import ( + "fmt" + "testing" + + "golang.org/x/sys/unix" +) + +func TestDevices(t *testing.T) { + testCases := []struct { + path string + major uint32 + minor uint32 + }{ + // well known major/minor numbers according to + // https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin-guide/devices.txt + {"/dev/null", 1, 3}, + {"/dev/zero", 1, 5}, + {"/dev/random", 1, 8}, + {"/dev/full", 1, 7}, + {"/dev/urandom", 1, 9}, + {"/dev/tty", 5, 0}, + } + for _, tc := range testCases { + t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) { + var stat unix.Stat_t + err := unix.Stat(tc.path, &stat) + if err != nil { + t.Errorf("failed to stat device: %v", err) + return + } + + dev := uint64(stat.Rdev) + if unix.Major(dev) != tc.major { + t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major) + } + if unix.Minor(dev) != tc.minor { + t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor) + } + if unix.Mkdev(tc.major, tc.minor) != dev { + t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev) + } + }) + + } +} diff --git a/vendor/golang.org/x/sys/unix/dev_netbsd.go b/vendor/golang.org/x/sys/unix/dev_netbsd.go new file mode 100644 index 000000000..b4a203d0c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_netbsd.go @@ -0,0 +1,29 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Functions to access/create device major and minor numbers matching the +// encoding used in NetBSD's sys/types.h header. + +package unix + +// Major returns the major component of a NetBSD device number. +func Major(dev uint64) uint32 { + return uint32((dev & 0x000fff00) >> 8) +} + +// Minor returns the minor component of a NetBSD device number. +func Minor(dev uint64) uint32 { + minor := uint32((dev & 0x000000ff) >> 0) + minor |= uint32((dev & 0xfff00000) >> 12) + return minor +} + +// Mkdev returns a NetBSD device number generated from the given major and minor +// components. +func Mkdev(major, minor uint32) uint64 { + dev := (uint64(major) << 8) & 0x000fff00 + dev |= (uint64(minor) << 12) & 0xfff00000 + dev |= (uint64(minor) << 0) & 0x000000ff + return dev +} diff --git a/vendor/golang.org/x/sys/unix/dev_netbsd_test.go b/vendor/golang.org/x/sys/unix/dev_netbsd_test.go new file mode 100644 index 000000000..c39a80a48 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_netbsd_test.go @@ -0,0 +1,50 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix_test + +import ( + "fmt" + "testing" + + "golang.org/x/sys/unix" +) + +func TestDevices(t *testing.T) { + testCases := []struct { + path string + major uint32 + minor uint32 + }{ + // well known major/minor numbers according to /dev/MAKEDEV on + // NetBSD 7.0 + {"/dev/null", 2, 2}, + {"/dev/zero", 2, 12}, + {"/dev/ttyp0", 5, 0}, + {"/dev/ttyp1", 5, 1}, + {"/dev/random", 46, 0}, + {"/dev/urandom", 46, 1}, + } + for _, tc := range testCases { + t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) { + var stat unix.Stat_t + err := unix.Stat(tc.path, &stat) + if err != nil { + t.Errorf("failed to stat device: %v", err) + return + } + + dev := uint64(stat.Rdev) + if unix.Major(dev) != tc.major { + t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major) + } + if unix.Minor(dev) != tc.minor { + t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor) + } + if unix.Mkdev(tc.major, tc.minor) != dev { + t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev) + } + }) + } +} diff --git a/vendor/golang.org/x/sys/unix/dev_openbsd.go b/vendor/golang.org/x/sys/unix/dev_openbsd.go new file mode 100644 index 000000000..f3430c42f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_openbsd.go @@ -0,0 +1,29 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Functions to access/create device major and minor numbers matching the +// encoding used in OpenBSD's sys/types.h header. + +package unix + +// Major returns the major component of an OpenBSD device number. +func Major(dev uint64) uint32 { + return uint32((dev & 0x0000ff00) >> 8) +} + +// Minor returns the minor component of an OpenBSD device number. +func Minor(dev uint64) uint32 { + minor := uint32((dev & 0x000000ff) >> 0) + minor |= uint32((dev & 0xffff0000) >> 8) + return minor +} + +// Mkdev returns an OpenBSD device number generated from the given major and minor +// components. +func Mkdev(major, minor uint32) uint64 { + dev := (uint64(major) << 8) & 0x0000ff00 + dev |= (uint64(minor) << 8) & 0xffff0000 + dev |= (uint64(minor) << 0) & 0x000000ff + return dev +} diff --git a/vendor/golang.org/x/sys/unix/dev_openbsd_test.go b/vendor/golang.org/x/sys/unix/dev_openbsd_test.go new file mode 100644 index 000000000..5635d271f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_openbsd_test.go @@ -0,0 +1,52 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix_test + +import ( + "fmt" + "testing" + + "golang.org/x/sys/unix" +) + +func TestDevices(t *testing.T) { + testCases := []struct { + path string + major uint32 + minor uint32 + }{ + // well known major/minor numbers according to /dev/MAKEDEV on + // OpenBSD 6.0 + {"/dev/null", 2, 2}, + {"/dev/zero", 2, 12}, + {"/dev/ttyp0", 5, 0}, + {"/dev/ttyp1", 5, 1}, + {"/dev/random", 45, 0}, + {"/dev/srandom", 45, 1}, + {"/dev/urandom", 45, 2}, + {"/dev/arandom", 45, 3}, + } + for _, tc := range testCases { + t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) { + var stat unix.Stat_t + err := unix.Stat(tc.path, &stat) + if err != nil { + t.Errorf("failed to stat device: %v", err) + return + } + + dev := uint64(stat.Rdev) + if unix.Major(dev) != tc.major { + t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major) + } + if unix.Minor(dev) != tc.minor { + t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor) + } + if unix.Mkdev(tc.major, tc.minor) != dev { + t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev) + } + }) + } +} diff --git a/vendor/golang.org/x/sys/unix/errors_freebsd_386.go b/vendor/golang.org/x/sys/unix/errors_freebsd_386.go new file mode 100644 index 000000000..c56bc8b05 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/errors_freebsd_386.go @@ -0,0 +1,227 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep +// them here for backwards compatibility. + +package unix + +const ( + IFF_SMART = 0x20 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BSC = 0x53 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_IPXIP = 0xf9 + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf6 + IFT_PFSYNC = 0xf7 + IFT_PLC = 0xae + IFT_POS = 0xab + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xd7 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VOICEEM = 0x64 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IPPROTO_MAXID = 0x34 + IPV6_FAITH = 0x1d + IP_FAITH = 0x16 + MAP_NORESERVE = 0x40 + MAP_RENAME = 0x20 + NET_RT_MAXID = 0x6 + RTF_PRCLONING = 0x10000 + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + SIOCADDRT = 0x8030720a + SIOCALIFADDR = 0x8118691b + SIOCDELRT = 0x8030720b + SIOCDLIFADDR = 0x8118691d + SIOCGLIFADDR = 0xc118691c + SIOCGLIFPHYADDR = 0xc118694b + SIOCSLIFPHYADDR = 0x8118694a +) diff --git a/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go new file mode 100644 index 000000000..3e9771175 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go @@ -0,0 +1,227 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep +// them here for backwards compatibility. + +package unix + +const ( + IFF_SMART = 0x20 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BSC = 0x53 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_IPXIP = 0xf9 + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf6 + IFT_PFSYNC = 0xf7 + IFT_PLC = 0xae + IFT_POS = 0xab + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xd7 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VOICEEM = 0x64 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IPPROTO_MAXID = 0x34 + IPV6_FAITH = 0x1d + IP_FAITH = 0x16 + MAP_NORESERVE = 0x40 + MAP_RENAME = 0x20 + NET_RT_MAXID = 0x6 + RTF_PRCLONING = 0x10000 + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + SIOCADDRT = 0x8040720a + SIOCALIFADDR = 0x8118691b + SIOCDELRT = 0x8040720b + SIOCDLIFADDR = 0x8118691d + SIOCGLIFADDR = 0xc118691c + SIOCGLIFPHYADDR = 0xc118694b + SIOCSLIFPHYADDR = 0x8118694a +) diff --git a/vendor/golang.org/x/sys/unix/errors_freebsd_arm.go b/vendor/golang.org/x/sys/unix/errors_freebsd_arm.go new file mode 100644 index 000000000..856dca325 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/errors_freebsd_arm.go @@ -0,0 +1,226 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix + +const ( + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BSC = 0x53 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf6 + IFT_PFSYNC = 0xf7 + IFT_PLC = 0xae + IFT_POS = 0xab + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xd7 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VOICEEM = 0x64 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + + // missing constants on FreeBSD-11.1-RELEASE, copied from old values in ztypes_freebsd_arm.go + IFF_SMART = 0x20 + IFT_FAITH = 0xf2 + IFT_IPXIP = 0xf9 + IPPROTO_MAXID = 0x34 + IPV6_FAITH = 0x1d + IP_FAITH = 0x16 + MAP_NORESERVE = 0x40 + MAP_RENAME = 0x20 + NET_RT_MAXID = 0x6 + RTF_PRCLONING = 0x10000 + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + SIOCADDRT = 0x8030720a + SIOCALIFADDR = 0x8118691b + SIOCDELRT = 0x8030720b + SIOCDLIFADDR = 0x8118691d + SIOCGLIFADDR = 0xc118691c + SIOCGLIFPHYADDR = 0xc118694b + SIOCSLIFPHYADDR = 0x8118694a +) diff --git a/vendor/golang.org/x/sys/unix/flock.go b/vendor/golang.org/x/sys/unix/flock.go index ce67a5952..2994ce75f 100644 --- a/vendor/golang.org/x/sys/unix/flock.go +++ b/vendor/golang.org/x/sys/unix/flock.go @@ -1,5 +1,3 @@ -// +build linux darwin freebsd openbsd netbsd dragonfly - // Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go b/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go deleted file mode 100644 index 56332692c..000000000 --- a/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gccgo,linux,sparc64 - -package unix - -import "syscall" - -//extern sysconf -func realSysconf(name int) int64 - -func sysconf(name int) (n int64, err syscall.Errno) { - r := realSysconf(name) - if r < 0 { - return 0, syscall.GetErrno() - } - return r, 0 -} diff --git a/vendor/golang.org/x/sys/unix/linux/Dockerfile b/vendor/golang.org/x/sys/unix/linux/Dockerfile index 4397143c9..c448b9dde 100644 --- a/vendor/golang.org/x/sys/unix/linux/Dockerfile +++ b/vendor/golang.org/x/sys/unix/linux/Dockerfile @@ -1,5 +1,8 @@ FROM ubuntu:16.04 +# Use the most recent ubuntu sources +RUN echo 'deb http://en.archive.ubuntu.com/ubuntu/ artful main universe' >> /etc/apt/sources.list + # Dependencies to get the git sources and go binaries RUN apt-get update && apt-get install -y \ curl \ @@ -9,10 +12,10 @@ RUN apt-get update && apt-get install -y \ # Get the git sources. If not cached, this takes O(5 minutes). WORKDIR /git RUN git config --global advice.detachedHead false -# Linux Kernel: Released 19 Feb 2017 -RUN git clone --branch v4.10 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux -# GNU C library: Released 05 Feb 2017 (we should try to get a secure way to clone this) -RUN git clone --branch glibc-2.25 --depth 1 git://sourceware.org/git/glibc.git +# Linux Kernel: Released 03 Sep 2017 +RUN git clone --branch v4.13 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux +# GNU C library: Released 02 Aug 2017 (we should try to get a secure way to clone this) +RUN git clone --branch glibc-2.26 --depth 1 git://sourceware.org/git/glibc.git # Get Go 1.8 (https://github.com/docker-library/golang/blob/master/1.8/Dockerfile) ENV GOLANG_VERSION 1.8 diff --git a/vendor/golang.org/x/sys/unix/linux/types.go b/vendor/golang.org/x/sys/unix/linux/types.go index 56eb4c12e..426be5eb4 100644 --- a/vendor/golang.org/x/sys/unix/linux/types.go +++ b/vendor/golang.org/x/sys/unix/linux/types.go @@ -62,6 +62,8 @@ package unix #include #include #include +#include +#include // On mips64, the glibc stat and kernel stat do not agree #if (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI64) @@ -112,14 +114,6 @@ struct stat { #endif -// Certain constants and structs are missing from the fs/crypto UAPI -#define FS_MAX_KEY_SIZE 64 -struct fscrypt_key { - __u32 mode; - __u8 raw[FS_MAX_KEY_SIZE]; - __u32 size; -}; - #ifdef TCSETS2 // On systems that have "struct termios2" use this as type Termios. typedef struct termios2 termios_t; @@ -316,6 +310,8 @@ type IPMreqn C.struct_ip_mreqn type IPv6Mreq C.struct_ipv6_mreq +type PacketMreq C.struct_packet_mreq + type Msghdr C.struct_msghdr type Cmsghdr C.struct_cmsghdr @@ -344,9 +340,11 @@ const ( SizeofSockaddrALG = C.sizeof_struct_sockaddr_alg SizeofSockaddrVM = C.sizeof_struct_sockaddr_vm SizeofLinger = C.sizeof_struct_linger + SizeofIovec = C.sizeof_struct_iovec SizeofIPMreq = C.sizeof_struct_ip_mreq SizeofIPMreqn = C.sizeof_struct_ip_mreqn SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofPacketMreq = C.sizeof_struct_packet_mreq SizeofMsghdr = C.sizeof_struct_msghdr SizeofCmsghdr = C.sizeof_struct_cmsghdr SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo @@ -537,12 +535,61 @@ const RNDGETENTCNT = C.RNDGETENTCNT const PERF_IOC_FLAG_GROUP = C.PERF_IOC_FLAG_GROUP -// sysconf information - -const _SC_PAGESIZE = C._SC_PAGESIZE - // Terminal handling type Termios C.termios_t type Winsize C.struct_winsize + +// Taskstats + +type Taskstats C.struct_taskstats + +const ( + TASKSTATS_CMD_UNSPEC = C.TASKSTATS_CMD_UNSPEC + TASKSTATS_CMD_GET = C.TASKSTATS_CMD_GET + TASKSTATS_CMD_NEW = C.TASKSTATS_CMD_NEW + TASKSTATS_TYPE_UNSPEC = C.TASKSTATS_TYPE_UNSPEC + TASKSTATS_TYPE_PID = C.TASKSTATS_TYPE_PID + TASKSTATS_TYPE_TGID = C.TASKSTATS_TYPE_TGID + TASKSTATS_TYPE_STATS = C.TASKSTATS_TYPE_STATS + TASKSTATS_TYPE_AGGR_PID = C.TASKSTATS_TYPE_AGGR_PID + TASKSTATS_TYPE_AGGR_TGID = C.TASKSTATS_TYPE_AGGR_TGID + TASKSTATS_TYPE_NULL = C.TASKSTATS_TYPE_NULL + TASKSTATS_CMD_ATTR_UNSPEC = C.TASKSTATS_CMD_ATTR_UNSPEC + TASKSTATS_CMD_ATTR_PID = C.TASKSTATS_CMD_ATTR_PID + TASKSTATS_CMD_ATTR_TGID = C.TASKSTATS_CMD_ATTR_TGID + TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = C.TASKSTATS_CMD_ATTR_REGISTER_CPUMASK + TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = C.TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK +) + +// Generic netlink + +type Genlmsghdr C.struct_genlmsghdr + +const ( + CTRL_CMD_UNSPEC = C.CTRL_CMD_UNSPEC + CTRL_CMD_NEWFAMILY = C.CTRL_CMD_NEWFAMILY + CTRL_CMD_DELFAMILY = C.CTRL_CMD_DELFAMILY + CTRL_CMD_GETFAMILY = C.CTRL_CMD_GETFAMILY + CTRL_CMD_NEWOPS = C.CTRL_CMD_NEWOPS + CTRL_CMD_DELOPS = C.CTRL_CMD_DELOPS + CTRL_CMD_GETOPS = C.CTRL_CMD_GETOPS + CTRL_CMD_NEWMCAST_GRP = C.CTRL_CMD_NEWMCAST_GRP + CTRL_CMD_DELMCAST_GRP = C.CTRL_CMD_DELMCAST_GRP + CTRL_CMD_GETMCAST_GRP = C.CTRL_CMD_GETMCAST_GRP + CTRL_ATTR_UNSPEC = C.CTRL_ATTR_UNSPEC + CTRL_ATTR_FAMILY_ID = C.CTRL_ATTR_FAMILY_ID + CTRL_ATTR_FAMILY_NAME = C.CTRL_ATTR_FAMILY_NAME + CTRL_ATTR_VERSION = C.CTRL_ATTR_VERSION + CTRL_ATTR_HDRSIZE = C.CTRL_ATTR_HDRSIZE + CTRL_ATTR_MAXATTR = C.CTRL_ATTR_MAXATTR + CTRL_ATTR_OPS = C.CTRL_ATTR_OPS + CTRL_ATTR_MCAST_GROUPS = C.CTRL_ATTR_MCAST_GROUPS + CTRL_ATTR_OP_UNSPEC = C.CTRL_ATTR_OP_UNSPEC + CTRL_ATTR_OP_ID = C.CTRL_ATTR_OP_ID + CTRL_ATTR_OP_FLAGS = C.CTRL_ATTR_OP_FLAGS + CTRL_ATTR_MCAST_GRP_UNSPEC = C.CTRL_ATTR_MCAST_GRP_UNSPEC + CTRL_ATTR_MCAST_GRP_NAME = C.CTRL_ATTR_MCAST_GRP_NAME + CTRL_ATTR_MCAST_GRP_ID = C.CTRL_ATTR_MCAST_GRP_ID +) diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh index f0d6566f2..c3a080926 100755 --- a/vendor/golang.org/x/sys/unix/mkall.sh +++ b/vendor/golang.org/x/sys/unix/mkall.sh @@ -72,7 +72,7 @@ darwin_amd64) ;; darwin_arm) mkerrors="$mkerrors" - mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h" + mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; darwin_arm64) @@ -108,7 +108,7 @@ freebsd_arm) mksyscall="./mksyscall.pl -l32 -arm" mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl" # Let the type of C char be signed for making the bare syscall - # API consistent across over platforms. + # API consistent across platforms. mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" ;; linux_sparc64) @@ -130,6 +130,14 @@ netbsd_amd64) mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; +netbsd_arm) + mkerrors="$mkerrors" + mksyscall="./mksyscall.pl -l32 -netbsd -arm" + mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl" + # Let the type of C char be signed for making the bare syscall + # API consistent across platforms. + mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" + ;; openbsd_386) mkerrors="$mkerrors -m32" mksyscall="./mksyscall.pl -l32 -openbsd" @@ -146,6 +154,16 @@ openbsd_amd64) mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; +openbsd_arm) + mkerrors="$mkerrors" + mksyscall="./mksyscall.pl -l32 -openbsd -arm" + mksysctl="./mksysctl_openbsd.pl" + zsysctl="zsysctl_openbsd.go" + mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" + # Let the type of C char be signed for making the bare syscall + # API consistent across platforms. + mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" + ;; solaris_amd64) mksyscall="./mksyscall_solaris.pl" mkerrors="$mkerrors -m64" diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 5fcd7a2a8..22bf41d85 100755 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -17,8 +17,8 @@ if test -z "$GOARCH" -o -z "$GOOS"; then fi # Check that we are using the new build system if we should -if [[ "$GOOS" -eq "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then - if [[ "$GOLANG_SYS_BUILD" -ne "docker" ]]; then +if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then + if [[ "$GOLANG_SYS_BUILD" != "docker" ]]; then echo 1>&2 "In the new build system, mkerrors should not be called directly." echo 1>&2 "See README.md" exit 1 @@ -27,7 +27,7 @@ fi CC=${CC:-cc} -if [[ "$GOOS" -eq "solaris" ]]; then +if [[ "$GOOS" = "solaris" ]]; then # Assumes GNU versions of utilities in PATH. export PATH=/usr/gnu/bin:$PATH fi @@ -45,6 +45,7 @@ includes_Darwin=' #include #include #include +#include #include #include #include @@ -180,6 +181,8 @@ struct ltchars { #include #include #include +#include +#include #include #include @@ -412,6 +415,8 @@ ccflags="$@" $2 ~ /^SECCOMP_MODE_/ || $2 ~ /^SPLICE_/ || $2 ~ /^(VM|VMADDR)_/ || + $2 ~ /^(TASKSTATS|TS)_/ || + $2 ~ /^GENL_/ || $2 ~ /^XATTR_(CREATE|REPLACE)/ || $2 !~ "WMESGLEN" && $2 ~ /^W[A-Z0-9]+$/ || diff --git a/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl b/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl index d31f2c48f..85988b140 100755 --- a/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl +++ b/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl @@ -47,7 +47,7 @@ while(<>){ $name = "$7_$11" if $11 ne ''; $name =~ y/a-z/A-Z/; - if($compat eq '' || $compat eq '30' || $compat eq '50') { + if($compat eq '' || $compat eq '13' || $compat eq '30' || $compat eq '50') { print " $name = $num; // $proto\n"; } } diff --git a/vendor/golang.org/x/sys/unix/mmap_unix_test.go b/vendor/golang.org/x/sys/unix/mmap_unix_test.go index 18ccec05f..8de55feaf 100644 --- a/vendor/golang.org/x/sys/unix/mmap_unix_test.go +++ b/vendor/golang.org/x/sys/unix/mmap_unix_test.go @@ -17,6 +17,18 @@ func TestMmap(t *testing.T) { if err != nil { t.Fatalf("Mmap: %v", err) } + if err := unix.Mprotect(b, unix.PROT_WRITE); err != nil { + t.Fatalf("Mprotect: %v", err) + } + + b[0] = 42 + + if err := unix.Msync(b, unix.MS_SYNC); err != nil { + t.Fatalf("Msync: %v", err) + } + if err := unix.Madvise(b, unix.MADV_DONTNEED); err != nil { + t.Fatalf("Madvise: %v", err) + } if err := unix.Munmap(b); err != nil { t.Fatalf("Munmap: %v", err) } diff --git a/vendor/golang.org/x/sys/unix/pagesize_unix.go b/vendor/golang.org/x/sys/unix/pagesize_unix.go new file mode 100644 index 000000000..45afcf72d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/pagesize_unix.go @@ -0,0 +1,15 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +// For Unix, get the pagesize from the runtime. + +package unix + +import "syscall" + +func Getpagesize() int { + return syscall.Getpagesize() +} diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go index ccb29c75c..c2846b32d 100644 --- a/vendor/golang.org/x/sys/unix/syscall_bsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go @@ -561,13 +561,19 @@ func Utimes(path string, tv []Timeval) error { func UtimesNano(path string, ts []Timespec) error { if ts == nil { + err := utimensat(AT_FDCWD, path, nil, 0) + if err != ENOSYS { + return err + } return utimes(path, nil) } - // TODO: The BSDs can do utimensat with SYS_UTIMENSAT but it - // isn't supported by darwin so this uses utimes instead if len(ts) != 2 { return EINVAL } + err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) + if err != ENOSYS { + return err + } // Not as efficient as it could be because Timespec and // Timeval have different types in the different OSes tv := [2]Timeval{ @@ -577,6 +583,16 @@ func UtimesNano(path string, ts []Timespec) error { return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) } +func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error { + if ts == nil { + return utimensat(dirfd, path, nil, flags) + } + if len(ts) != 2 { + return EINVAL + } + return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags) +} + //sys futimes(fd int, timeval *[2]Timeval) (err error) func Futimes(fd int, tv []Timeval) error { @@ -594,9 +610,6 @@ func Futimes(fd int, tv []Timeval) error { // TODO: wrap // Acct(name nil-string) (err error) // Gethostuuid(uuid *byte, timeout *Timespec) (err error) -// Madvise(addr *byte, len int, behav int) (err error) -// Mprotect(addr *byte, len int, prot int) (err error) -// Msync(addr *byte, len int, flags int) (err error) // Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error) var mapper = &mmapper{ @@ -612,3 +625,11 @@ func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, e func Munmap(b []byte) (err error) { return mapper.Munmap(b) } + +//sys Madvise(b []byte, behav int) (err error) +//sys Mlock(b []byte) (err error) +//sys Mlockall(flags int) (err error) +//sys Mprotect(b []byte, prot int) (err error) +//sys Msync(b []byte, flags int) (err error) +//sys Munlock(b []byte) (err error) +//sys Munlockall() (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go index 6d6f0736c..ad74a11fb 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -187,6 +187,11 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { return } +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error { + // Darwin doesn't support SYS_UTIMENSAT + return ENOSYS +} + /* * Wrapped */ @@ -195,6 +200,45 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) } +//sys ioctl(fd int, req uint, arg uintptr) (err error) + +// ioctl itself should not be exposed directly, but additional get/set +// functions for specific types are permissible. + +// IoctlSetInt performs an ioctl operation which sets an integer value +// on fd, using the specified request number. +func IoctlSetInt(fd int, req uint, value int) error { + return ioctl(fd, req, uintptr(value)) +} + +func IoctlSetWinsize(fd int, req uint, value *Winsize) error { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +func IoctlSetTermios(fd int, req uint, value *Termios) error { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +// IoctlGetInt performs an ioctl operation which gets an integer value +// from fd, using the specified request number. +func IoctlGetInt(fd int, req uint) (int, error) { + var value int + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return value, err +} + +func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { + var value Winsize + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +func IoctlGetTermios(fd int, req uint) (*Termios, error) { + var value Termios + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + /* * Exposed directly */ @@ -248,11 +292,6 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig //sys Mkdirat(dirfd int, path string, mode uint32) (err error) //sys Mkfifo(path string, mode uint32) (err error) //sys Mknod(path string, mode uint32, dev int) (err error) -//sys Mlock(b []byte) (err error) -//sys Mlockall(flags int) (err error) -//sys Mprotect(b []byte, prot int) (err error) -//sys Munlock(b []byte) (err error) -//sys Munlockall() (err error) //sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) //sys Pathconf(path string, name int) (val int, err error) @@ -329,9 +368,6 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig // Add_profil // Kdebug_trace // Sigreturn -// Mmap -// Mlock -// Munlock // Atsocket // Kqueue_from_portset_np // Kqueue_portset @@ -424,8 +460,6 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig // Lio_listio // __pthread_cond_wait // Iopolicysys -// Mlockall -// Munlockall // __pthread_kill // __pthread_sigmask // __sigwait @@ -479,7 +513,6 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig // Sendmsg_nocancel // Recvfrom_nocancel // Accept_nocancel -// Msync_nocancel // Fcntl_nocancel // Select_nocancel // Fsync_nocancel diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go index c172a3da5..76634f7ab 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go index c6c99c13a..7be02dab9 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go index d286cf408..26b66972f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go @@ -9,8 +9,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go index c33905cdc..4d67a8742 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 16384 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go index 7e0210fc9..3a483373d 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go @@ -174,11 +174,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { //sys Mkdir(path string, mode uint32) (err error) //sys Mkfifo(path string, mode uint32) (err error) //sys Mknod(path string, mode uint32, dev int) (err error) -//sys Mlock(b []byte) (err error) -//sys Mlockall(flags int) (err error) -//sys Mprotect(b []byte, prot int) (err error) -//sys Munlock(b []byte) (err error) -//sys Munlockall() (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Pathconf(path string, name int) (val int, err error) @@ -218,6 +213,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE //sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) +//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) /* * Unimplemented @@ -252,9 +248,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { // Add_profil // Kdebug_trace // Sigreturn -// Mmap -// Mlock -// Munlock // Atsocket // Kqueue_from_portset_np // Kqueue_portset @@ -347,8 +340,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { // Lio_listio // __pthread_cond_wait // Iopolicysys -// Mlockall -// Munlockall // __pthread_kill // __pthread_sigmask // __sigwait @@ -401,7 +392,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { // Sendmsg_nocancel // Recvfrom_nocancel // Accept_nocancel -// Msync_nocancel // Fcntl_nocancel // Select_nocancel // Fsync_nocancel diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go index da7cb7982..6d8952d5a 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go index 83b411981..d26e52eae 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go @@ -352,6 +352,45 @@ func Llistxattr(link string, dest []byte) (sz int, err error) { return s, e } +//sys ioctl(fd int, req uint, arg uintptr) (err error) + +// ioctl itself should not be exposed directly, but additional get/set +// functions for specific types are permissible. + +// IoctlSetInt performs an ioctl operation which sets an integer value +// on fd, using the specified request number. +func IoctlSetInt(fd int, req uint, value int) error { + return ioctl(fd, req, uintptr(value)) +} + +func IoctlSetWinsize(fd int, req uint, value *Winsize) error { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +func IoctlSetTermios(fd int, req uint, value *Termios) error { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +// IoctlGetInt performs an ioctl operation which gets an integer value +// from fd, using the specified request number. +func IoctlGetInt(fd int, req uint) (int, error) { + var value int + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return value, err +} + +func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { + var value Winsize + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +func IoctlGetTermios(fd int, req uint) (*Termios, error) { + var value Termios + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + /* * Exposed directly */ @@ -382,10 +421,13 @@ func Llistxattr(link string, dest []byte) (sz int, err error) { //sys ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) //sys ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE +//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error) //sys Fchdir(fd int) (err error) //sys Fchflags(fd int, flags int) (err error) //sys Fchmod(fd int, mode uint32) (err error) +//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) //sys Fchown(fd int, uid int, gid int) (err error) +//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) //sys Flock(fd int, how int) (err error) //sys Fpathconf(fd int, name int) (val int, err error) //sys Fstat(fd int, stat *Stat_t) (err error) @@ -412,16 +454,13 @@ func Llistxattr(link string, dest []byte) (sz int, err error) { //sys Kqueue() (fd int, err error) //sys Lchown(path string, uid int, gid int) (err error) //sys Link(path string, link string) (err error) +//sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) //sys Listen(s int, backlog int) (err error) //sys Lstat(path string, stat *Stat_t) (err error) //sys Mkdir(path string, mode uint32) (err error) +//sys Mkdirat(dirfd int, path string, mode uint32) (err error) //sys Mkfifo(path string, mode uint32) (err error) //sys Mknod(path string, mode uint32, dev int) (err error) -//sys Mlock(b []byte) (err error) -//sys Mlockall(flags int) (err error) -//sys Mprotect(b []byte, prot int) (err error) -//sys Munlock(b []byte) (err error) -//sys Munlockall() (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) @@ -430,7 +469,9 @@ func Llistxattr(link string, dest []byte) (sz int, err error) { //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) //sys read(fd int, p []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error) +//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error) //sys Rename(from string, to string) (err error) +//sys Renameat(fromfd int, from string, tofd int, to string) (err error) //sys Revoke(path string) (err error) //sys Rmdir(path string) (err error) //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK @@ -452,11 +493,13 @@ func Llistxattr(link string, dest []byte) (sz int, err error) { //sys Stat(path string, stat *Stat_t) (err error) //sys Statfs(path string, stat *Statfs_t) (err error) //sys Symlink(path string, link string) (err error) +//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error) //sys Sync() (err error) //sys Truncate(path string, length int64) (err error) //sys Umask(newmask int) (oldmask int) //sys Undelete(path string) (err error) //sys Unlink(path string) (err error) +//sys Unlinkat(dirfd int, path string, flags int) (err error) //sys Unmount(path string, flags int) (err error) //sys write(fd int, p []byte) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) @@ -464,6 +507,7 @@ func Llistxattr(link string, dest []byte) (sz int, err error) { //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE //sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) +//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) /* * Unimplemented @@ -497,9 +541,6 @@ func Llistxattr(link string, dest []byte) (sz int, err error) { // Add_profil // Kdebug_trace // Sigreturn -// Mmap -// Mlock -// Munlock // Atsocket // Kqueue_from_portset_np // Kqueue_portset @@ -592,8 +633,6 @@ func Llistxattr(link string, dest []byte) (sz int, err error) { // Lio_listio // __pthread_cond_wait // Iopolicysys -// Mlockall -// Munlockall // __pthread_kill // __pthread_sigmask // __sigwait @@ -646,7 +685,6 @@ func Llistxattr(link string, dest []byte) (sz int, err error) { // Sendmsg_nocancel // Recvfrom_nocancel // Accept_nocancel -// Msync_nocancel // Fcntl_nocancel // Select_nocancel // Fsync_nocancel diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go index 6a0cd804d..4cf5f453f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go index e142540ef..b8036e726 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go index 5504cb125..5a3bb6a15 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return ts.Sec*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_test.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_test.go index 4d574192e..654439e02 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_test.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_test.go @@ -14,13 +14,14 @@ import ( "os/exec" "path" "path/filepath" + "runtime" "testing" "golang.org/x/sys/unix" ) func TestSysctlUint64(t *testing.T) { - _, err := unix.SysctlUint64("security.mac.labeled") + _, err := unix.SysctlUint64("vm.swap_total") if err != nil { t.Fatal(err) } @@ -157,6 +158,9 @@ func init() { } func TestCapEnter(t *testing.T) { + if runtime.GOARCH != "amd64" { + t.Skipf("skipping test on %s", runtime.GOARCH) + } ExitsCorrectly(t, "cap_enter") } @@ -253,6 +257,9 @@ func init() { } func TestOpenat(t *testing.T) { + if runtime.GOARCH != "amd64" { + t.Skipf("skipping test on %s", runtime.GOARCH) + } ExitsCorrectly(t, "openat") } diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 056f6010a..1b7d59d89 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -931,8 +931,13 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from } var dummy byte if len(oob) > 0 { + var sockType int + sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE) + if err != nil { + return + } // receive at least one normal byte - if len(p) == 0 { + if sockType != SOCK_DGRAM && len(p) == 0 { iov.Base = &dummy iov.SetLen(1) } @@ -978,8 +983,13 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) } var dummy byte if len(oob) > 0 { + var sockType int + sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE) + if err != nil { + return 0, err + } // send at least one normal byte - if len(p) == 0 { + if sockType != SOCK_DGRAM && len(p) == 0 { iov.Base = &dummy iov.SetLen(1) } @@ -1279,6 +1289,7 @@ func Setgid(uid int) (err error) { //sys Setpriority(which int, who int, prio int) (err error) //sys Setxattr(path string, attr string, data []byte, flags int) (err error) //sys Sync() +//sys Syncfs(fd int) (err error) //sysnb Sysinfo(info *Sysinfo_t) (err error) //sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error) //sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error) @@ -1313,8 +1324,9 @@ func Munmap(b []byte) (err error) { //sys Madvise(b []byte, advice int) (err error) //sys Mprotect(b []byte, prot int) (err error) //sys Mlock(b []byte) (err error) -//sys Munlock(b []byte) (err error) //sys Mlockall(flags int) (err error) +//sys Msync(b []byte, flags int) (err error) +//sys Munlock(b []byte) (err error) //sys Munlockall() (err error) // Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd, @@ -1382,7 +1394,6 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) { // ModifyLdt // Mount // MovePages -// Mprotect // MqGetsetattr // MqNotify // MqOpen @@ -1394,7 +1405,6 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) { // Msgget // Msgrcv // Msgsnd -// Msync // Newfstatat // Nfsservctl // Personality diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go index 2b881b979..f4c826a45 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go @@ -14,8 +14,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go index 9516a3fd7..0715200dc 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go @@ -69,8 +69,6 @@ func Gettimeofday(tv *Timeval) (err error) { return nil } -func Getpagesize() int { return 4096 } - func Time(t *Time_t) (tt Time_t, err error) { var tv Timeval errno := gettimeofday(&tv) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go index 71d870228..2b79c84a6 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go index 4a136396c..68cc975db 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go @@ -66,8 +66,6 @@ func Lstat(path string, stat *Stat_t) (err error) { //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) -func Getpagesize() int { return 65536 } - //sysnb Gettimeofday(tv *Timeval) (err error) func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go index 73318e5c6..977df441b 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go @@ -55,8 +55,6 @@ package unix //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) -func Getpagesize() int { return 65536 } - //sysnb Gettimeofday(tv *Timeval) (err error) func Time(t *Time_t) (tt Time_t, err error) { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go index b83d93fdf..25a5a0da5 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go @@ -235,5 +235,3 @@ func Poll(fds []PollFd, timeout int) (n int, err error) { } return poll(&fds[0], len(fds), timeout) } - -func Getpagesize() int { return 4096 } diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go index 60770f627..28b7f350d 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go @@ -61,8 +61,6 @@ package unix //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) -func Getpagesize() int { return 65536 } - //sysnb Gettimeofday(tv *Timeval) (err error) //sysnb Time(t *Time_t) (tt Time_t, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go index 1708a4bbf..3845fc9c4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go @@ -46,8 +46,6 @@ import ( //sysnb getgroups(n int, list *_Gid_t) (nn int, err error) //sysnb setgroups(n int, list *_Gid_t) (err error) -func Getpagesize() int { return 4096 } - //sysnb Gettimeofday(tv *Timeval) (err error) func Time(t *Time_t) (tt Time_t, err error) { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go index 20b7454d7..bd9de3e9d 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go @@ -6,11 +6,6 @@ package unix -import ( - "sync/atomic" - "syscall" -) - //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys Dup2(oldfd int, newfd int) (err error) //sys Fchown(fd int, uid int, gid int) (err error) @@ -63,21 +58,6 @@ import ( //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) -func sysconf(name int) (n int64, err syscall.Errno) - -// pageSize caches the value of Getpagesize, since it can't change -// once the system is booted. -var pageSize int64 // accessed atomically - -func Getpagesize() int { - n := atomic.LoadInt64(&pageSize) - if n == 0 { - n, _ = sysconf(_SC_PAGESIZE) - atomic.StoreInt64(&pageSize, n) - } - return int(n) -} - func Ioperm(from int, num int, on int) (err error) { return ENOSYS } diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go index 01f6a48c8..e12966845 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go @@ -170,11 +170,6 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Mkdir(path string, mode uint32) (err error) //sys Mkfifo(path string, mode uint32) (err error) //sys Mknod(path string, mode uint32, dev int) (err error) -//sys Mlock(b []byte) (err error) -//sys Mlockall(flags int) (err error) -//sys Mprotect(b []byte, prot int) (err error) -//sys Munlock(b []byte) (err error) -//sys Munlockall() (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Pathconf(path string, name int) (val int, err error) @@ -210,6 +205,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys munmap(addr uintptr, length uintptr) (err error) //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE +//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) /* * Unimplemented diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go index afaca0983..baefa411e 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go @@ -6,8 +6,6 @@ package unix -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go index a6ff04ce5..59c2ab7eb 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go @@ -6,8 +6,6 @@ package unix -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go index 68a6969b2..7208108a3 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go @@ -6,8 +6,6 @@ package unix -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index c0d2b6c80..408e63081 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -149,11 +149,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { //sys Mkdir(path string, mode uint32) (err error) //sys Mkfifo(path string, mode uint32) (err error) //sys Mknod(path string, mode uint32, dev int) (err error) -//sys Mlock(b []byte) (err error) -//sys Mlockall(flags int) (err error) -//sys Mprotect(b []byte, prot int) (err error) -//sys Munlock(b []byte) (err error) -//sys Munlockall() (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Pathconf(path string, name int) (val int, err error) @@ -193,6 +188,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { //sys munmap(addr uintptr, length uintptr) (err error) //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE +//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) /* * Unimplemented @@ -282,6 +278,5 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { // thrsleep // thrwakeup // unlinkat -// utimensat // vfork // writev diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go index a66ddc59c..d3809b426 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go @@ -6,8 +6,6 @@ package unix -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go index 0776c1faf..9a9dfceff 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go @@ -6,8 +6,6 @@ package unix -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go new file mode 100644 index 000000000..ba8649056 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go @@ -0,0 +1,40 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm,openbsd + +package unix + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int64(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int64(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go index 4b8ddabda..dbb166e00 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -13,7 +13,6 @@ package unix import ( - "sync/atomic" "syscall" "unsafe" ) @@ -581,6 +580,7 @@ func IoctlGetTermio(fd int, req uint) (*Termio, error) { //sys Fchown(fd int, uid int, gid int) (err error) //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) //sys Fdatasync(fd int) (err error) +//sys Flock(fd int, how int) (err error) //sys Fpathconf(fd int, name int) (val int, err error) //sys Fstat(fd int, stat *Stat_t) (err error) //sys Fstatvfs(fd int, vfsstat *Statvfs_t) (err error) @@ -698,18 +698,3 @@ func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, e func Munmap(b []byte) (err error) { return mapper.Munmap(b) } - -//sys sysconf(name int) (n int64, err error) - -// pageSize caches the value of Getpagesize, since it can't change -// once the system is booted. -var pageSize int64 // accessed atomically - -func Getpagesize() int { - n := atomic.LoadInt64(&pageSize) - if n == 0 { - n, _ = sysconf(_SC_PAGESIZE) - atomic.StoreInt64(&pageSize, n) - } - return int(n) -} diff --git a/vendor/golang.org/x/sys/unix/types_darwin.go b/vendor/golang.org/x/sys/unix/types_darwin.go index 74ff1ac91..415124d4a 100644 --- a/vendor/golang.org/x/sys/unix/types_darwin.go +++ b/vendor/golang.org/x/sys/unix/types_darwin.go @@ -242,6 +242,8 @@ type BpfHdr C.struct_bpf_hdr type Termios C.struct_termios +type Winsize C.struct_winsize + // fchmodat-like syscalls. const ( diff --git a/vendor/golang.org/x/sys/unix/types_dragonfly.go b/vendor/golang.org/x/sys/unix/types_dragonfly.go index a818704eb..80b27781d 100644 --- a/vendor/golang.org/x/sys/unix/types_dragonfly.go +++ b/vendor/golang.org/x/sys/unix/types_dragonfly.go @@ -240,3 +240,10 @@ type BpfHdr C.struct_bpf_hdr // Terminal handling type Termios C.struct_termios + +// fchmodat-like syscalls. + +const ( + AT_FDCWD = C.AT_FDCWD + AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW +) diff --git a/vendor/golang.org/x/sys/unix/types_freebsd.go b/vendor/golang.org/x/sys/unix/types_freebsd.go index f7478a3ae..934fd7ace 100644 --- a/vendor/golang.org/x/sys/unix/types_freebsd.go +++ b/vendor/golang.org/x/sys/unix/types_freebsd.go @@ -356,6 +356,17 @@ type BpfZbufHeader C.struct_bpf_zbuf_header type Termios C.struct_termios +type Winsize C.struct_winsize + +// fchmodat-like syscalls. + +const ( + AT_FDCWD = C.AT_FDCWD + AT_REMOVEDIR = C.AT_REMOVEDIR + AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW + AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW +) + // Capabilities type CapRights C.struct_cap_rights diff --git a/vendor/golang.org/x/sys/unix/types_netbsd.go b/vendor/golang.org/x/sys/unix/types_netbsd.go index 7cfdb9cd4..cb95c80aa 100644 --- a/vendor/golang.org/x/sys/unix/types_netbsd.go +++ b/vendor/golang.org/x/sys/unix/types_netbsd.go @@ -227,6 +227,13 @@ type BpfTimeval C.struct_bpf_timeval type Termios C.struct_termios +// fchmodat-like syscalls. + +const ( + AT_FDCWD = C.AT_FDCWD + AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW +) + // Sysctl type Sysctlnode C.struct_sysctlnode diff --git a/vendor/golang.org/x/sys/unix/types_openbsd.go b/vendor/golang.org/x/sys/unix/types_openbsd.go index 6c7c22795..392da69bf 100644 --- a/vendor/golang.org/x/sys/unix/types_openbsd.go +++ b/vendor/golang.org/x/sys/unix/types_openbsd.go @@ -242,3 +242,10 @@ type BpfTimeval C.struct_bpf_timeval // Terminal handling type Termios C.struct_termios + +// fchmodat-like syscalls. + +const ( + AT_FDCWD = C.AT_FDCWD + AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW +) diff --git a/vendor/golang.org/x/sys/unix/types_solaris.go b/vendor/golang.org/x/sys/unix/types_solaris.go index 393c7f04f..6d7461401 100644 --- a/vendor/golang.org/x/sys/unix/types_solaris.go +++ b/vendor/golang.org/x/sys/unix/types_solaris.go @@ -256,10 +256,6 @@ type BpfTimeval C.struct_bpf_timeval type BpfHdr C.struct_bpf_hdr -// sysconf information - -const _SC_PAGESIZE = C._SC_PAGESIZE - // Terminal handling type Termios C.struct_termios diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go index bb7974330..1c68758b6 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go @@ -822,6 +822,38 @@ const ( MAP_SHARED = 0x1 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 + MNT_ASYNC = 0x40 + MNT_AUTOMOUNTED = 0x400000 + MNT_CMDFLAGS = 0xf0000 + MNT_CPROTECT = 0x80 + MNT_DEFWRITE = 0x2000000 + MNT_DONTBROWSE = 0x100000 + MNT_DOVOLFS = 0x8000 + MNT_DWAIT = 0x4 + MNT_EXPORTED = 0x100 + MNT_FORCE = 0x80000 + MNT_IGNORE_OWNERSHIP = 0x200000 + MNT_JOURNALED = 0x800000 + MNT_LOCAL = 0x1000 + MNT_MULTILABEL = 0x4000000 + MNT_NOATIME = 0x10000000 + MNT_NOBLOCK = 0x20000 + MNT_NODEV = 0x10 + MNT_NOEXEC = 0x4 + MNT_NOSUID = 0x8 + MNT_NOUSERXATTR = 0x1000000 + MNT_NOWAIT = 0x2 + MNT_QUARANTINE = 0x400 + MNT_QUOTA = 0x2000 + MNT_RDONLY = 0x1 + MNT_RELOAD = 0x40000 + MNT_ROOTFS = 0x4000 + MNT_SYNCHRONOUS = 0x2 + MNT_UNION = 0x20 + MNT_UNKNOWNPERMISSIONS = 0x200000 + MNT_UPDATE = 0x10000 + MNT_VISFLAGMASK = 0x17f0f5ff + MNT_WAIT = 0x1 MSG_CTRUNC = 0x20 MSG_DONTROUTE = 0x4 MSG_DONTWAIT = 0x80 diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go index 2efac8d7b..48f63d4f0 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go @@ -144,6 +144,14 @@ const ( BSDLY = 0x8000 CFLUSH = 0xf CLOCAL = 0x8000 + CLOCK_MONOTONIC = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_MONOTONIC_RAW_APPROX = 0x5 + CLOCK_PROCESS_CPUTIME_ID = 0xc + CLOCK_REALTIME = 0x0 + CLOCK_THREAD_CPUTIME_ID = 0x10 + CLOCK_UPTIME_RAW = 0x8 + CLOCK_UPTIME_RAW_APPROX = 0x9 CR0 = 0x0 CR1 = 0x1000 CR2 = 0x2000 @@ -342,13 +350,14 @@ const ( ECHONL = 0x10 ECHOPRT = 0x20 EVFILT_AIO = -0x3 + EVFILT_EXCEPT = -0xf EVFILT_FS = -0x9 EVFILT_MACHPORT = -0x8 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0xe - EVFILT_THREADMARKER = 0xe + EVFILT_SYSCOUNT = 0xf + EVFILT_THREADMARKER = 0xf EVFILT_TIMER = -0x7 EVFILT_USER = -0xa EVFILT_VM = -0xc @@ -359,6 +368,7 @@ const ( EV_DELETE = 0x2 EV_DISABLE = 0x8 EV_DISPATCH = 0x80 + EV_DISPATCH2 = 0x180 EV_ENABLE = 0x4 EV_EOF = 0x8000 EV_ERROR = 0x4000 @@ -369,6 +379,8 @@ const ( EV_POLL = 0x1000 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf000 + EV_UDATA_SPECIFIC = 0x100 + EV_VANISHED = 0x200 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 @@ -379,9 +391,13 @@ const ( FFDLY = 0x4000 FLUSHO = 0x800000 F_ADDFILESIGS = 0x3d + F_ADDFILESIGS_FOR_DYLD_SIM = 0x53 + F_ADDFILESIGS_RETURN = 0x61 F_ADDSIGS = 0x3b F_ALLOCATEALL = 0x4 F_ALLOCATECONTIG = 0x2 + F_BARRIERFSYNC = 0x55 + F_CHECK_LV = 0x62 F_CHKCLEAN = 0x29 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x43 @@ -783,11 +799,13 @@ const ( MADV_FREE_REUSABLE = 0x7 MADV_FREE_REUSE = 0x8 MADV_NORMAL = 0x0 + MADV_PAGEOUT = 0xa MADV_RANDOM = 0x1 MADV_SEQUENTIAL = 0x2 MADV_WILLNEED = 0x3 MADV_ZERO_WIRED_PAGES = 0x6 MAP_ANON = 0x1000 + MAP_ANONYMOUS = 0x1000 MAP_COPY = 0x2 MAP_FILE = 0x0 MAP_FIXED = 0x10 @@ -799,9 +817,43 @@ const ( MAP_PRIVATE = 0x2 MAP_RENAME = 0x20 MAP_RESERVED0080 = 0x80 + MAP_RESILIENT_CODESIGN = 0x2000 + MAP_RESILIENT_MEDIA = 0x4000 MAP_SHARED = 0x1 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 + MNT_ASYNC = 0x40 + MNT_AUTOMOUNTED = 0x400000 + MNT_CMDFLAGS = 0xf0000 + MNT_CPROTECT = 0x80 + MNT_DEFWRITE = 0x2000000 + MNT_DONTBROWSE = 0x100000 + MNT_DOVOLFS = 0x8000 + MNT_DWAIT = 0x4 + MNT_EXPORTED = 0x100 + MNT_FORCE = 0x80000 + MNT_IGNORE_OWNERSHIP = 0x200000 + MNT_JOURNALED = 0x800000 + MNT_LOCAL = 0x1000 + MNT_MULTILABEL = 0x4000000 + MNT_NOATIME = 0x10000000 + MNT_NOBLOCK = 0x20000 + MNT_NODEV = 0x10 + MNT_NOEXEC = 0x4 + MNT_NOSUID = 0x8 + MNT_NOUSERXATTR = 0x1000000 + MNT_NOWAIT = 0x2 + MNT_QUARANTINE = 0x400 + MNT_QUOTA = 0x2000 + MNT_RDONLY = 0x1 + MNT_RELOAD = 0x40000 + MNT_ROOTFS = 0x4000 + MNT_SYNCHRONOUS = 0x2 + MNT_UNION = 0x20 + MNT_UNKNOWNPERMISSIONS = 0x200000 + MNT_UPDATE = 0x10000 + MNT_VISFLAGMASK = 0x17f0f5ff + MNT_WAIT = 0x1 MSG_CTRUNC = 0x20 MSG_DONTROUTE = 0x4 MSG_DONTWAIT = 0x80 @@ -862,11 +914,14 @@ const ( NOTE_FFNOP = 0x0 NOTE_FFOR = 0x80000000 NOTE_FORK = 0x40000000 + NOTE_FUNLOCK = 0x100 NOTE_LEEWAY = 0x10 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 + NOTE_MACH_CONTINUOUS_TIME = 0x80 NOTE_NONE = 0x80 NOTE_NSECONDS = 0x4 + NOTE_OOB = 0x2 NOTE_PCTRLMASK = -0x100000 NOTE_PDATAMASK = 0xfffff NOTE_REAP = 0x10000000 @@ -900,6 +955,7 @@ const ( O_CREAT = 0x200 O_DIRECTORY = 0x100000 O_DP_GETRAWENCRYPTED = 0x1 + O_DP_GETRAWUNENCRYPTED = 0x2 O_DSYNC = 0x400000 O_EVTONLY = 0x8000 O_EXCL = 0x800 @@ -1125,6 +1181,8 @@ const ( SO_LABEL = 0x1010 SO_LINGER = 0x80 SO_LINGER_SEC = 0x1080 + SO_NETSVC_MARKING_LEVEL = 0x1119 + SO_NET_SERVICE_TYPE = 0x1116 SO_NKE = 0x1021 SO_NOADDRERR = 0x1023 SO_NOSIGPIPE = 0x1022 @@ -1193,7 +1251,9 @@ const ( TCOOFF = 0x1 TCOON = 0x2 TCP_CONNECTIONTIMEOUT = 0x20 + TCP_CONNECTION_INFO = 0x106 TCP_ENABLE_ECN = 0x104 + TCP_FASTOPEN = 0x105 TCP_KEEPALIVE = 0x10 TCP_KEEPCNT = 0x102 TCP_KEEPINTVL = 0x101 diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go index a410e88ed..24cb522d9 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go @@ -1,11 +1,11 @@ // mkerrors.sh -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. + +// +build arm,darwin // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- _const.go -// +build arm,darwin - package unix import "syscall" @@ -48,6 +48,7 @@ const ( AF_UNIX = 0x1 AF_UNSPEC = 0x0 AF_UTUN = 0x26 + ALTWERASE = 0x200 B0 = 0x0 B110 = 0x6e B115200 = 0x1c200 @@ -86,6 +87,7 @@ const ( BIOCSBLEN = 0xc0044266 BIOCSDLT = 0x80044278 BIOCSETF = 0x80104267 + BIOCSETFNR = 0x8010427e BIOCSETIF = 0x8020426c BIOCSHDRCMPLT = 0x80044275 BIOCSRSIG = 0x80044273 @@ -137,9 +139,26 @@ const ( BPF_W = 0x0 BPF_X = 0x8 BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x8000 + BSDLY = 0x8000 CFLUSH = 0xf CLOCAL = 0x8000 + CLOCK_MONOTONIC = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_MONOTONIC_RAW_APPROX = 0x5 + CLOCK_PROCESS_CPUTIME_ID = 0xc + CLOCK_REALTIME = 0x0 + CLOCK_THREAD_CPUTIME_ID = 0x10 + CLOCK_UPTIME_RAW = 0x8 + CLOCK_UPTIME_RAW_APPROX = 0x9 + CR0 = 0x0 + CR1 = 0x1000 + CR2 = 0x2000 + CR3 = 0x3000 + CRDLY = 0x3000 CREAD = 0x800 + CRTSCTS = 0x30000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 @@ -152,33 +171,168 @@ const ( CSUSP = 0x1a CTL_MAXNAME = 0xc CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde DLT_APPLE_IP_OVER_IEEE1394 = 0x8a DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 DLT_ATM_CLIP = 0x13 DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 DLT_CHAOS = 0x5 DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DBUS = 0xe7 + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_DVB_CI = 0xeb + DLT_ECONET = 0x73 DLT_EN10MB = 0x1 DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 DLT_IEEE802 = 0x6 DLT_IEEE802_11 = 0x69 DLT_IEEE802_11_RADIO = 0x7f DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NOFCS = 0xe6 + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xf2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_ATM_CEMIC = 0xee + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FIBRECHANNEL = 0xea + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_SRX_E2E = 0xe9 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_JUNIPER_VS = 0xe8 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_PPP_WITHDIRECTION = 0xa6 DLT_LINUX_SLL = 0x71 DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MATCHING_MAX = 0xf5 + DLT_MATCHING_MIN = 0x68 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPEG_2_TS = 0xf3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_MUX27010 = 0xec + DLT_NETANALYZER = 0xf0 + DLT_NETANALYZER_TRANSPARENT = 0xf1 + DLT_NFC_LLCP = 0xf5 + DLT_NFLOG = 0xef + DLT_NG40 = 0xf4 DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d DLT_PFLOG = 0x75 DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 DLT_PPP = 0x9 DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PPP_WITH_DIRECTION = 0xa6 + DLT_PRISM_HEADER = 0x77 DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 DLT_RAW = 0xc + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 DLT_SLIP = 0x8 DLT_SLIP_BSDOS = 0xf + DLT_STANAG_5066_D_PDU = 0xed + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 DT_BLK = 0x6 DT_CHR = 0x2 DT_DIR = 0x4 @@ -196,13 +350,14 @@ const ( ECHONL = 0x10 ECHOPRT = 0x20 EVFILT_AIO = -0x3 + EVFILT_EXCEPT = -0xf EVFILT_FS = -0x9 EVFILT_MACHPORT = -0x8 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0xe - EVFILT_THREADMARKER = 0xe + EVFILT_SYSCOUNT = 0xf + EVFILT_THREADMARKER = 0xf EVFILT_TIMER = -0x7 EVFILT_USER = -0xa EVFILT_VM = -0xc @@ -213,6 +368,7 @@ const ( EV_DELETE = 0x2 EV_DISABLE = 0x8 EV_DISPATCH = 0x80 + EV_DISPATCH2 = 0x180 EV_ENABLE = 0x4 EV_EOF = 0x8000 EV_ERROR = 0x4000 @@ -223,16 +379,25 @@ const ( EV_POLL = 0x1000 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf000 + EV_UDATA_SPECIFIC = 0x100 + EV_VANISHED = 0x200 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 + FF0 = 0x0 + FF1 = 0x4000 + FFDLY = 0x4000 FLUSHO = 0x800000 F_ADDFILESIGS = 0x3d + F_ADDFILESIGS_FOR_DYLD_SIM = 0x53 + F_ADDFILESIGS_RETURN = 0x61 F_ADDSIGS = 0x3b F_ALLOCATEALL = 0x4 F_ALLOCATECONTIG = 0x2 + F_BARRIERFSYNC = 0x55 + F_CHECK_LV = 0x62 F_CHKCLEAN = 0x29 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x43 @@ -347,6 +512,7 @@ const ( IFT_PDP = 0xff IFT_PFLOG = 0xf5 IFT_PFSYNC = 0xf6 + IFT_PKTAP = 0xfe IFT_PPP = 0x17 IFT_PROPMUX = 0x36 IFT_PROPVIRTUAL = 0x35 @@ -515,7 +681,7 @@ const ( IPV6_FAITH = 0x1d IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 + IPV6_FRAGTTL = 0x3c IPV6_FW_ADD = 0x1e IPV6_FW_DEL = 0x1f IPV6_FW_FLUSH = 0x20 @@ -633,11 +799,13 @@ const ( MADV_FREE_REUSABLE = 0x7 MADV_FREE_REUSE = 0x8 MADV_NORMAL = 0x0 + MADV_PAGEOUT = 0xa MADV_RANDOM = 0x1 MADV_SEQUENTIAL = 0x2 MADV_WILLNEED = 0x3 MADV_ZERO_WIRED_PAGES = 0x6 MAP_ANON = 0x1000 + MAP_ANONYMOUS = 0x1000 MAP_COPY = 0x2 MAP_FILE = 0x0 MAP_FIXED = 0x10 @@ -649,9 +817,43 @@ const ( MAP_PRIVATE = 0x2 MAP_RENAME = 0x20 MAP_RESERVED0080 = 0x80 + MAP_RESILIENT_CODESIGN = 0x2000 + MAP_RESILIENT_MEDIA = 0x4000 MAP_SHARED = 0x1 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 + MNT_ASYNC = 0x40 + MNT_AUTOMOUNTED = 0x400000 + MNT_CMDFLAGS = 0xf0000 + MNT_CPROTECT = 0x80 + MNT_DEFWRITE = 0x2000000 + MNT_DONTBROWSE = 0x100000 + MNT_DOVOLFS = 0x8000 + MNT_DWAIT = 0x4 + MNT_EXPORTED = 0x100 + MNT_FORCE = 0x80000 + MNT_IGNORE_OWNERSHIP = 0x200000 + MNT_JOURNALED = 0x800000 + MNT_LOCAL = 0x1000 + MNT_MULTILABEL = 0x4000000 + MNT_NOATIME = 0x10000000 + MNT_NOBLOCK = 0x20000 + MNT_NODEV = 0x10 + MNT_NOEXEC = 0x4 + MNT_NOSUID = 0x8 + MNT_NOUSERXATTR = 0x1000000 + MNT_NOWAIT = 0x2 + MNT_QUARANTINE = 0x400 + MNT_QUOTA = 0x2000 + MNT_RDONLY = 0x1 + MNT_RELOAD = 0x40000 + MNT_ROOTFS = 0x4000 + MNT_SYNCHRONOUS = 0x2 + MNT_UNION = 0x20 + MNT_UNKNOWNPERMISSIONS = 0x200000 + MNT_UPDATE = 0x10000 + MNT_VISFLAGMASK = 0x17f0f5ff + MNT_WAIT = 0x1 MSG_CTRUNC = 0x20 MSG_DONTROUTE = 0x4 MSG_DONTWAIT = 0x80 @@ -682,7 +884,13 @@ const ( NET_RT_MAXID = 0xa NET_RT_STAT = 0x4 NET_RT_TRASH = 0x5 + NL0 = 0x0 + NL1 = 0x100 + NL2 = 0x200 + NL3 = 0x300 + NLDLY = 0x300 NOFLSH = 0x80000000 + NOKERNINFO = 0x2000000 NOTE_ABSOLUTE = 0x8 NOTE_ATTRIB = 0x8 NOTE_BACKGROUND = 0x40 @@ -706,11 +914,14 @@ const ( NOTE_FFNOP = 0x0 NOTE_FFOR = 0x80000000 NOTE_FORK = 0x40000000 + NOTE_FUNLOCK = 0x100 NOTE_LEEWAY = 0x10 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 + NOTE_MACH_CONTINUOUS_TIME = 0x80 NOTE_NONE = 0x80 NOTE_NSECONDS = 0x4 + NOTE_OOB = 0x2 NOTE_PCTRLMASK = -0x100000 NOTE_PDATAMASK = 0xfffff NOTE_REAP = 0x10000000 @@ -735,6 +946,7 @@ const ( ONOCR = 0x20 ONOEOT = 0x8 OPOST = 0x1 + OXTABS = 0x4 O_ACCMODE = 0x3 O_ALERT = 0x20000000 O_APPEND = 0x8 @@ -743,6 +955,7 @@ const ( O_CREAT = 0x200 O_DIRECTORY = 0x100000 O_DP_GETRAWENCRYPTED = 0x1 + O_DP_GETRAWUNENCRYPTED = 0x2 O_DSYNC = 0x400000 O_EVTONLY = 0x8000 O_EXCL = 0x800 @@ -795,7 +1008,10 @@ const ( RLIMIT_CPU_USAGE_MONITOR = 0x2 RLIMIT_DATA = 0x2 RLIMIT_FSIZE = 0x1 + RLIMIT_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 + RLIMIT_NPROC = 0x7 + RLIMIT_RSS = 0x5 RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffffffffffff RTAX_AUTHOR = 0x6 @@ -830,6 +1046,7 @@ const ( RTF_LOCAL = 0x200000 RTF_MODIFIED = 0x20 RTF_MULTICAST = 0x800000 + RTF_NOIFREF = 0x2000 RTF_PINNED = 0x100000 RTF_PRCLONING = 0x10000 RTF_PROTO1 = 0x8000 @@ -964,6 +1181,8 @@ const ( SO_LABEL = 0x1010 SO_LINGER = 0x80 SO_LINGER_SEC = 0x1080 + SO_NETSVC_MARKING_LEVEL = 0x1119 + SO_NET_SERVICE_TYPE = 0x1116 SO_NKE = 0x1021 SO_NOADDRERR = 0x1023 SO_NOSIGPIPE = 0x1022 @@ -1019,11 +1238,22 @@ const ( S_IXGRP = 0x8 S_IXOTH = 0x1 S_IXUSR = 0x40 + TAB0 = 0x0 + TAB1 = 0x400 + TAB2 = 0x800 + TAB3 = 0x4 + TABDLY = 0xc04 TCIFLUSH = 0x1 + TCIOFF = 0x3 TCIOFLUSH = 0x3 + TCION = 0x4 TCOFLUSH = 0x2 + TCOOFF = 0x1 + TCOON = 0x2 TCP_CONNECTIONTIMEOUT = 0x20 + TCP_CONNECTION_INFO = 0x106 TCP_ENABLE_ECN = 0x104 + TCP_FASTOPEN = 0x105 TCP_KEEPALIVE = 0x10 TCP_KEEPCNT = 0x102 TCP_KEEPINTVL = 0x101 @@ -1123,6 +1353,11 @@ const ( VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 + VM_LOADAVG = 0x2 + VM_MACHFACTOR = 0x4 + VM_MAXID = 0x6 + VM_METER = 0x1 + VM_SWAPUSAGE = 0x5 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc @@ -1291,3 +1526,148 @@ const ( SIGXCPU = syscall.Signal(0x18) SIGXFSZ = syscall.Signal(0x19) ) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "resource busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "device power is off", + 83: "device error", + 84: "value too large to be stored in data type", + 85: "bad executable (or shared library)", + 86: "bad CPU type in executable", + 87: "shared library version mismatch", + 88: "malformed Mach-o file", + 89: "operation canceled", + 90: "identifier removed", + 91: "no message of desired type", + 92: "illegal byte sequence", + 93: "attribute not found", + 94: "bad message", + 95: "EMULTIHOP (Reserved)", + 96: "no message available on STREAM", + 97: "ENOLINK (Reserved)", + 98: "no STREAM resources", + 99: "not a STREAM", + 100: "protocol error", + 101: "STREAM ioctl timeout", + 102: "operation not supported on socket", + 103: "policy not found", + 104: "state not recoverable", + 105: "previous owner died", + 106: "interface output queue is full", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go index 3189c6b34..cc8cc5b57 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go @@ -1,5 +1,5 @@ // mkerrors.sh -m64 -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build arm64,darwin @@ -48,6 +48,7 @@ const ( AF_UNIX = 0x1 AF_UNSPEC = 0x0 AF_UTUN = 0x26 + ALTWERASE = 0x200 B0 = 0x0 B110 = 0x6e B115200 = 0x1c200 @@ -138,9 +139,26 @@ const ( BPF_W = 0x0 BPF_X = 0x8 BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x8000 + BSDLY = 0x8000 CFLUSH = 0xf CLOCAL = 0x8000 + CLOCK_MONOTONIC = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_MONOTONIC_RAW_APPROX = 0x5 + CLOCK_PROCESS_CPUTIME_ID = 0xc + CLOCK_REALTIME = 0x0 + CLOCK_THREAD_CPUTIME_ID = 0x10 + CLOCK_UPTIME_RAW = 0x8 + CLOCK_UPTIME_RAW_APPROX = 0x9 + CR0 = 0x0 + CR1 = 0x1000 + CR2 = 0x2000 + CR3 = 0x3000 + CRDLY = 0x3000 CREAD = 0x800 + CRTSCTS = 0x30000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 @@ -332,13 +350,14 @@ const ( ECHONL = 0x10 ECHOPRT = 0x20 EVFILT_AIO = -0x3 + EVFILT_EXCEPT = -0xf EVFILT_FS = -0x9 EVFILT_MACHPORT = -0x8 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0xe - EVFILT_THREADMARKER = 0xe + EVFILT_SYSCOUNT = 0xf + EVFILT_THREADMARKER = 0xf EVFILT_TIMER = -0x7 EVFILT_USER = -0xa EVFILT_VM = -0xc @@ -349,6 +368,7 @@ const ( EV_DELETE = 0x2 EV_DISABLE = 0x8 EV_DISPATCH = 0x80 + EV_DISPATCH2 = 0x180 EV_ENABLE = 0x4 EV_EOF = 0x8000 EV_ERROR = 0x4000 @@ -359,16 +379,25 @@ const ( EV_POLL = 0x1000 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf000 + EV_UDATA_SPECIFIC = 0x100 + EV_VANISHED = 0x200 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 + FF0 = 0x0 + FF1 = 0x4000 + FFDLY = 0x4000 FLUSHO = 0x800000 F_ADDFILESIGS = 0x3d + F_ADDFILESIGS_FOR_DYLD_SIM = 0x53 + F_ADDFILESIGS_RETURN = 0x61 F_ADDSIGS = 0x3b F_ALLOCATEALL = 0x4 F_ALLOCATECONTIG = 0x2 + F_BARRIERFSYNC = 0x55 + F_CHECK_LV = 0x62 F_CHKCLEAN = 0x29 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x43 @@ -770,11 +799,13 @@ const ( MADV_FREE_REUSABLE = 0x7 MADV_FREE_REUSE = 0x8 MADV_NORMAL = 0x0 + MADV_PAGEOUT = 0xa MADV_RANDOM = 0x1 MADV_SEQUENTIAL = 0x2 MADV_WILLNEED = 0x3 MADV_ZERO_WIRED_PAGES = 0x6 MAP_ANON = 0x1000 + MAP_ANONYMOUS = 0x1000 MAP_COPY = 0x2 MAP_FILE = 0x0 MAP_FIXED = 0x10 @@ -786,9 +817,43 @@ const ( MAP_PRIVATE = 0x2 MAP_RENAME = 0x20 MAP_RESERVED0080 = 0x80 + MAP_RESILIENT_CODESIGN = 0x2000 + MAP_RESILIENT_MEDIA = 0x4000 MAP_SHARED = 0x1 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 + MNT_ASYNC = 0x40 + MNT_AUTOMOUNTED = 0x400000 + MNT_CMDFLAGS = 0xf0000 + MNT_CPROTECT = 0x80 + MNT_DEFWRITE = 0x2000000 + MNT_DONTBROWSE = 0x100000 + MNT_DOVOLFS = 0x8000 + MNT_DWAIT = 0x4 + MNT_EXPORTED = 0x100 + MNT_FORCE = 0x80000 + MNT_IGNORE_OWNERSHIP = 0x200000 + MNT_JOURNALED = 0x800000 + MNT_LOCAL = 0x1000 + MNT_MULTILABEL = 0x4000000 + MNT_NOATIME = 0x10000000 + MNT_NOBLOCK = 0x20000 + MNT_NODEV = 0x10 + MNT_NOEXEC = 0x4 + MNT_NOSUID = 0x8 + MNT_NOUSERXATTR = 0x1000000 + MNT_NOWAIT = 0x2 + MNT_QUARANTINE = 0x400 + MNT_QUOTA = 0x2000 + MNT_RDONLY = 0x1 + MNT_RELOAD = 0x40000 + MNT_ROOTFS = 0x4000 + MNT_SYNCHRONOUS = 0x2 + MNT_UNION = 0x20 + MNT_UNKNOWNPERMISSIONS = 0x200000 + MNT_UPDATE = 0x10000 + MNT_VISFLAGMASK = 0x17f0f5ff + MNT_WAIT = 0x1 MSG_CTRUNC = 0x20 MSG_DONTROUTE = 0x4 MSG_DONTWAIT = 0x80 @@ -819,7 +884,13 @@ const ( NET_RT_MAXID = 0xa NET_RT_STAT = 0x4 NET_RT_TRASH = 0x5 + NL0 = 0x0 + NL1 = 0x100 + NL2 = 0x200 + NL3 = 0x300 + NLDLY = 0x300 NOFLSH = 0x80000000 + NOKERNINFO = 0x2000000 NOTE_ABSOLUTE = 0x8 NOTE_ATTRIB = 0x8 NOTE_BACKGROUND = 0x40 @@ -843,11 +914,14 @@ const ( NOTE_FFNOP = 0x0 NOTE_FFOR = 0x80000000 NOTE_FORK = 0x40000000 + NOTE_FUNLOCK = 0x100 NOTE_LEEWAY = 0x10 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 + NOTE_MACH_CONTINUOUS_TIME = 0x80 NOTE_NONE = 0x80 NOTE_NSECONDS = 0x4 + NOTE_OOB = 0x2 NOTE_PCTRLMASK = -0x100000 NOTE_PDATAMASK = 0xfffff NOTE_REAP = 0x10000000 @@ -872,6 +946,7 @@ const ( ONOCR = 0x20 ONOEOT = 0x8 OPOST = 0x1 + OXTABS = 0x4 O_ACCMODE = 0x3 O_ALERT = 0x20000000 O_APPEND = 0x8 @@ -880,6 +955,7 @@ const ( O_CREAT = 0x200 O_DIRECTORY = 0x100000 O_DP_GETRAWENCRYPTED = 0x1 + O_DP_GETRAWUNENCRYPTED = 0x2 O_DSYNC = 0x400000 O_EVTONLY = 0x8000 O_EXCL = 0x800 @@ -932,7 +1008,10 @@ const ( RLIMIT_CPU_USAGE_MONITOR = 0x2 RLIMIT_DATA = 0x2 RLIMIT_FSIZE = 0x1 + RLIMIT_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 + RLIMIT_NPROC = 0x7 + RLIMIT_RSS = 0x5 RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffffffffffff RTAX_AUTHOR = 0x6 @@ -1102,6 +1181,8 @@ const ( SO_LABEL = 0x1010 SO_LINGER = 0x80 SO_LINGER_SEC = 0x1080 + SO_NETSVC_MARKING_LEVEL = 0x1119 + SO_NET_SERVICE_TYPE = 0x1116 SO_NKE = 0x1021 SO_NOADDRERR = 0x1023 SO_NOSIGPIPE = 0x1022 @@ -1157,11 +1238,22 @@ const ( S_IXGRP = 0x8 S_IXOTH = 0x1 S_IXUSR = 0x40 + TAB0 = 0x0 + TAB1 = 0x400 + TAB2 = 0x800 + TAB3 = 0x4 + TABDLY = 0xc04 TCIFLUSH = 0x1 + TCIOFF = 0x3 TCIOFLUSH = 0x3 + TCION = 0x4 TCOFLUSH = 0x2 + TCOOFF = 0x1 + TCOON = 0x2 TCP_CONNECTIONTIMEOUT = 0x20 + TCP_CONNECTION_INFO = 0x106 TCP_ENABLE_ECN = 0x104 + TCP_FASTOPEN = 0x105 TCP_KEEPALIVE = 0x10 TCP_KEEPCNT = 0x102 TCP_KEEPINTVL = 0x101 @@ -1261,6 +1353,11 @@ const ( VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 + VM_LOADAVG = 0x2 + VM_MACHFACTOR = 0x4 + VM_MAXID = 0x6 + VM_METER = 0x1 + VM_SWAPUSAGE = 0x5 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go index 7b95751c3..1d3eec44d 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go @@ -1,5 +1,5 @@ // mkerrors.sh -m32 -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build 386,freebsd @@ -11,1456 +11,1419 @@ package unix import "syscall" const ( - AF_APPLETALK = 0x10 - AF_ARP = 0x23 - AF_ATM = 0x1e - AF_BLUETOOTH = 0x24 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_HYLINK = 0xf - AF_IEEE80211 = 0x25 - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x1c - AF_INET6_SDP = 0x2a - AF_INET_SDP = 0x28 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x2a - AF_NATM = 0x1d - AF_NETBIOS = 0x6 - AF_NETGRAPH = 0x20 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x11 - AF_SCLUSTER = 0x22 - AF_SIP = 0x18 - AF_SLOW = 0x21 - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VENDOR00 = 0x27 - AF_VENDOR01 = 0x29 - AF_VENDOR02 = 0x2b - AF_VENDOR03 = 0x2d - AF_VENDOR04 = 0x2f - AF_VENDOR05 = 0x31 - AF_VENDOR06 = 0x33 - AF_VENDOR07 = 0x35 - AF_VENDOR08 = 0x37 - AF_VENDOR09 = 0x39 - AF_VENDOR10 = 0x3b - AF_VENDOR11 = 0x3d - AF_VENDOR12 = 0x3f - AF_VENDOR13 = 0x41 - AF_VENDOR14 = 0x43 - AF_VENDOR15 = 0x45 - AF_VENDOR16 = 0x47 - AF_VENDOR17 = 0x49 - AF_VENDOR18 = 0x4b - AF_VENDOR19 = 0x4d - AF_VENDOR20 = 0x4f - AF_VENDOR21 = 0x51 - AF_VENDOR22 = 0x53 - AF_VENDOR23 = 0x55 - AF_VENDOR24 = 0x57 - AF_VENDOR25 = 0x59 - AF_VENDOR26 = 0x5b - AF_VENDOR27 = 0x5d - AF_VENDOR28 = 0x5f - AF_VENDOR29 = 0x61 - AF_VENDOR30 = 0x63 - AF_VENDOR31 = 0x65 - AF_VENDOR32 = 0x67 - AF_VENDOR33 = 0x69 - AF_VENDOR34 = 0x6b - AF_VENDOR35 = 0x6d - AF_VENDOR36 = 0x6f - AF_VENDOR37 = 0x71 - AF_VENDOR38 = 0x73 - AF_VENDOR39 = 0x75 - AF_VENDOR40 = 0x77 - AF_VENDOR41 = 0x79 - AF_VENDOR42 = 0x7b - AF_VENDOR43 = 0x7d - AF_VENDOR44 = 0x7f - AF_VENDOR45 = 0x81 - AF_VENDOR46 = 0x83 - AF_VENDOR47 = 0x85 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B460800 = 0x70800 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B921600 = 0xe1000 - B9600 = 0x2580 - BIOCFEEDBACK = 0x8004427c - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDIRECTION = 0x40044276 - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc0084279 - BIOCGETBUFMODE = 0x4004427d - BIOCGETIF = 0x4020426b - BIOCGETZMAX = 0x4004427f - BIOCGHDRCMPLT = 0x40044274 - BIOCGRSIG = 0x40044272 - BIOCGRTIMEOUT = 0x4008426e - BIOCGSEESENT = 0x40044276 - BIOCGSTATS = 0x4008426f - BIOCGTSTAMP = 0x40044283 - BIOCIMMEDIATE = 0x80044270 - BIOCLOCK = 0x2000427a - BIOCPROMISC = 0x20004269 - BIOCROTZBUF = 0x400c4280 - BIOCSBLEN = 0xc0044266 - BIOCSDIRECTION = 0x80044277 - BIOCSDLT = 0x80044278 - BIOCSETBUFMODE = 0x8004427e - BIOCSETF = 0x80084267 - BIOCSETFNR = 0x80084282 - BIOCSETIF = 0x8020426c - BIOCSETWF = 0x8008427b - BIOCSETZBUF = 0x800c4281 - BIOCSHDRCMPLT = 0x80044275 - BIOCSRSIG = 0x80044273 - BIOCSRTIMEOUT = 0x8008426d - BIOCSSEESENT = 0x80044277 - BIOCSTSTAMP = 0x80044284 - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_BUFMODE_BUFFER = 0x1 - BPF_BUFMODE_ZBUF = 0x2 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x80000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_T_BINTIME = 0x2 - BPF_T_BINTIME_FAST = 0x102 - BPF_T_BINTIME_MONOTONIC = 0x202 - BPF_T_BINTIME_MONOTONIC_FAST = 0x302 - BPF_T_FAST = 0x100 - BPF_T_FLAG_MASK = 0x300 - BPF_T_FORMAT_MASK = 0x3 - BPF_T_MICROTIME = 0x0 - BPF_T_MICROTIME_FAST = 0x100 - BPF_T_MICROTIME_MONOTONIC = 0x200 - BPF_T_MICROTIME_MONOTONIC_FAST = 0x300 - BPF_T_MONOTONIC = 0x200 - BPF_T_MONOTONIC_FAST = 0x300 - BPF_T_NANOTIME = 0x1 - BPF_T_NANOTIME_FAST = 0x101 - BPF_T_NANOTIME_MONOTONIC = 0x201 - BPF_T_NANOTIME_MONOTONIC_FAST = 0x301 - BPF_T_NONE = 0x3 - BPF_T_NORMAL = 0x0 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CLOCK_MONOTONIC = 0x4 - CLOCK_MONOTONIC_FAST = 0xc - CLOCK_MONOTONIC_PRECISE = 0xb - CLOCK_PROCESS_CPUTIME_ID = 0xf - CLOCK_PROF = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_FAST = 0xa - CLOCK_REALTIME_PRECISE = 0x9 - CLOCK_SECOND = 0xd - CLOCK_THREAD_CPUTIME_ID = 0xe - CLOCK_UPTIME = 0x5 - CLOCK_UPTIME_FAST = 0x8 - CLOCK_UPTIME_PRECISE = 0x7 - CLOCK_VIRTUAL = 0x1 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x14 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0x18 - CTL_NET = 0x4 - DLT_A429 = 0xb8 - DLT_A653_ICM = 0xb9 - DLT_AIRONET_HEADER = 0x78 - DLT_AOS = 0xde - DLT_APPLE_IP_OVER_IEEE1394 = 0x8a - DLT_ARCNET = 0x7 - DLT_ARCNET_LINUX = 0x81 - DLT_ATM_CLIP = 0x13 - DLT_ATM_RFC1483 = 0xb - DLT_AURORA = 0x7e - DLT_AX25 = 0x3 - DLT_AX25_KISS = 0xca - DLT_BACNET_MS_TP = 0xa5 - DLT_BLUETOOTH_HCI_H4 = 0xbb - DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 - DLT_CAN20B = 0xbe - DLT_CAN_SOCKETCAN = 0xe3 - DLT_CHAOS = 0x5 - DLT_CHDLC = 0x68 - DLT_CISCO_IOS = 0x76 - DLT_C_HDLC = 0x68 - DLT_C_HDLC_WITH_DIR = 0xcd - DLT_DBUS = 0xe7 - DLT_DECT = 0xdd - DLT_DOCSIS = 0x8f - DLT_DVB_CI = 0xeb - DLT_ECONET = 0x73 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0x6d - DLT_ERF = 0xc5 - DLT_ERF_ETH = 0xaf - DLT_ERF_POS = 0xb0 - DLT_FC_2 = 0xe0 - DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 - DLT_FDDI = 0xa - DLT_FLEXRAY = 0xd2 - DLT_FRELAY = 0x6b - DLT_FRELAY_WITH_DIR = 0xce - DLT_GCOM_SERIAL = 0xad - DLT_GCOM_T1E1 = 0xac - DLT_GPF_F = 0xab - DLT_GPF_T = 0xaa - DLT_GPRS_LLC = 0xa9 - DLT_GSMTAP_ABIS = 0xda - DLT_GSMTAP_UM = 0xd9 - DLT_HHDLC = 0x79 - DLT_IBM_SN = 0x92 - DLT_IBM_SP = 0x91 - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_IEEE802_11_RADIO_AVS = 0xa3 - DLT_IEEE802_15_4 = 0xc3 - DLT_IEEE802_15_4_LINUX = 0xbf - DLT_IEEE802_15_4_NOFCS = 0xe6 - DLT_IEEE802_15_4_NONASK_PHY = 0xd7 - DLT_IEEE802_16_MAC_CPS = 0xbc - DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 - DLT_IPFILTER = 0x74 - DLT_IPMB = 0xc7 - DLT_IPMB_LINUX = 0xd1 - DLT_IPNET = 0xe2 - DLT_IPOIB = 0xf2 - DLT_IPV4 = 0xe4 - DLT_IPV6 = 0xe5 - DLT_IP_OVER_FC = 0x7a - DLT_JUNIPER_ATM1 = 0x89 - DLT_JUNIPER_ATM2 = 0x87 - DLT_JUNIPER_ATM_CEMIC = 0xee - DLT_JUNIPER_CHDLC = 0xb5 - DLT_JUNIPER_ES = 0x84 - DLT_JUNIPER_ETHER = 0xb2 - DLT_JUNIPER_FIBRECHANNEL = 0xea - DLT_JUNIPER_FRELAY = 0xb4 - DLT_JUNIPER_GGSN = 0x85 - DLT_JUNIPER_ISM = 0xc2 - DLT_JUNIPER_MFR = 0x86 - DLT_JUNIPER_MLFR = 0x83 - DLT_JUNIPER_MLPPP = 0x82 - DLT_JUNIPER_MONITOR = 0xa4 - DLT_JUNIPER_PIC_PEER = 0xae - DLT_JUNIPER_PPP = 0xb3 - DLT_JUNIPER_PPPOE = 0xa7 - DLT_JUNIPER_PPPOE_ATM = 0xa8 - DLT_JUNIPER_SERVICES = 0x88 - DLT_JUNIPER_SRX_E2E = 0xe9 - DLT_JUNIPER_ST = 0xc8 - DLT_JUNIPER_VP = 0xb7 - DLT_JUNIPER_VS = 0xe8 - DLT_LAPB_WITH_DIR = 0xcf - DLT_LAPD = 0xcb - DLT_LIN = 0xd4 - DLT_LINUX_EVDEV = 0xd8 - DLT_LINUX_IRDA = 0x90 - DLT_LINUX_LAPD = 0xb1 - DLT_LINUX_PPP_WITHDIRECTION = 0xa6 - DLT_LINUX_SLL = 0x71 - DLT_LOOP = 0x6c - DLT_LTALK = 0x72 - DLT_MATCHING_MAX = 0xf6 - DLT_MATCHING_MIN = 0x68 - DLT_MFR = 0xb6 - DLT_MOST = 0xd3 - DLT_MPEG_2_TS = 0xf3 - DLT_MPLS = 0xdb - DLT_MTP2 = 0x8c - DLT_MTP2_WITH_PHDR = 0x8b - DLT_MTP3 = 0x8d - DLT_MUX27010 = 0xec - DLT_NETANALYZER = 0xf0 - DLT_NETANALYZER_TRANSPARENT = 0xf1 - DLT_NFC_LLCP = 0xf5 - DLT_NFLOG = 0xef - DLT_NG40 = 0xf4 - DLT_NULL = 0x0 - DLT_PCI_EXP = 0x7d - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x79 - DLT_PPI = 0xc0 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0x10 - DLT_PPP_ETHER = 0x33 - DLT_PPP_PPPD = 0xa6 - DLT_PPP_SERIAL = 0x32 - DLT_PPP_WITH_DIR = 0xcc - DLT_PPP_WITH_DIRECTION = 0xa6 - DLT_PRISM_HEADER = 0x77 - DLT_PRONET = 0x4 - DLT_RAIF1 = 0xc6 - DLT_RAW = 0xc - DLT_RIO = 0x7c - DLT_SCCP = 0x8e - DLT_SITA = 0xc4 - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xf - DLT_STANAG_5066_D_PDU = 0xed - DLT_SUNATM = 0x7b - DLT_SYMANTEC_FIREWALL = 0x63 - DLT_TZSP = 0x80 - DLT_USB = 0xba - DLT_USB_LINUX = 0xbd - DLT_USB_LINUX_MMAPPED = 0xdc - DLT_USER0 = 0x93 - DLT_USER1 = 0x94 - DLT_USER10 = 0x9d - DLT_USER11 = 0x9e - DLT_USER12 = 0x9f - DLT_USER13 = 0xa0 - DLT_USER14 = 0xa1 - DLT_USER15 = 0xa2 - DLT_USER2 = 0x95 - DLT_USER3 = 0x96 - DLT_USER4 = 0x97 - DLT_USER5 = 0x98 - DLT_USER6 = 0x99 - DLT_USER7 = 0x9a - DLT_USER8 = 0x9b - DLT_USER9 = 0x9c - DLT_WIHART = 0xdf - DLT_X2E_SERIAL = 0xd5 - DLT_X2E_XORAYA = 0xd6 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EVFILT_AIO = -0x3 - EVFILT_FS = -0x9 - EVFILT_LIO = -0xa - EVFILT_PROC = -0x5 - EVFILT_READ = -0x1 - EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0xb - EVFILT_TIMER = -0x7 - EVFILT_USER = -0xb - EVFILT_VNODE = -0x4 - EVFILT_WRITE = -0x2 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_DISPATCH = 0x80 - EV_DROP = 0x1000 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTATTR_NAMESPACE_EMPTY = 0x0 - EXTATTR_NAMESPACE_SYSTEM = 0x2 - EXTATTR_NAMESPACE_USER = 0x1 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_CANCEL = 0x5 - F_DUP2FD = 0xa - F_DUP2FD_CLOEXEC = 0x12 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x11 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0xb - F_GETOWN = 0x5 - F_OGETLK = 0x7 - F_OK = 0x0 - F_OSETLK = 0x8 - F_OSETLKW = 0x9 - F_RDAHEAD = 0x10 - F_RDLCK = 0x1 - F_READAHEAD = 0xf - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0xc - F_SETLKW = 0xd - F_SETLK_REMOTE = 0xe - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_UNLCKSYS = 0x4 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_ALTPHYS = 0x4000 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x218f72 - IFF_CANTCONFIG = 0x10000 - IFF_DEBUG = 0x4 - IFF_DRV_OACTIVE = 0x400 - IFF_DRV_RUNNING = 0x40 - IFF_DYING = 0x200000 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MONITOR = 0x40000 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PPROMISC = 0x20000 - IFF_PROMISC = 0x100 - IFF_RENAMING = 0x400000 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_SMART = 0x20 - IFF_STATICARP = 0x80000 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf8 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ENC = 0xf4 - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf2 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_IPXIP = 0xf9 - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf6 - IFT_PFSYNC = 0xf7 - IFT_PLC = 0xae - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf1 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_STF = 0xd7 - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VOICEEM = 0x64 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IN_RFC3021_MASK = 0xfffffffe - IPPROTO_3PC = 0x22 - IPPROTO_ADFS = 0x44 - IPPROTO_AH = 0x33 - IPPROTO_AHIP = 0x3d - IPPROTO_APES = 0x63 - IPPROTO_ARGUS = 0xd - IPPROTO_AX25 = 0x5d - IPPROTO_BHA = 0x31 - IPPROTO_BLT = 0x1e - IPPROTO_BRSATMON = 0x4c - IPPROTO_CARP = 0x70 - IPPROTO_CFTP = 0x3e - IPPROTO_CHAOS = 0x10 - IPPROTO_CMTP = 0x26 - IPPROTO_CPHB = 0x49 - IPPROTO_CPNX = 0x48 - IPPROTO_DDP = 0x25 - IPPROTO_DGP = 0x56 - IPPROTO_DIVERT = 0x102 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_EMCON = 0xe - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GMTP = 0x64 - IPPROTO_GRE = 0x2f - IPPROTO_HELLO = 0x3f - IPPROTO_HIP = 0x8b - IPPROTO_HMP = 0x14 - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IDPR = 0x23 - IPPROTO_IDRP = 0x2d - IPPROTO_IGMP = 0x2 - IPPROTO_IGP = 0x55 - IPPROTO_IGRP = 0x58 - IPPROTO_IL = 0x28 - IPPROTO_INLSP = 0x34 - IPPROTO_INP = 0x20 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPCV = 0x47 - IPPROTO_IPEIP = 0x5e - IPPROTO_IPIP = 0x4 - IPPROTO_IPPC = 0x43 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_IRTP = 0x1c - IPPROTO_KRYPTOLAN = 0x41 - IPPROTO_LARP = 0x5b - IPPROTO_LEAF1 = 0x19 - IPPROTO_LEAF2 = 0x1a - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x34 - IPPROTO_MEAS = 0x13 - IPPROTO_MH = 0x87 - IPPROTO_MHRP = 0x30 - IPPROTO_MICP = 0x5f - IPPROTO_MOBILE = 0x37 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_MUX = 0x12 - IPPROTO_ND = 0x4d - IPPROTO_NHRP = 0x36 - IPPROTO_NONE = 0x3b - IPPROTO_NSP = 0x1f - IPPROTO_NVPII = 0xb - IPPROTO_OLD_DIVERT = 0xfe - IPPROTO_OSPFIGP = 0x59 - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PGM = 0x71 - IPPROTO_PIGP = 0x9 - IPPROTO_PIM = 0x67 - IPPROTO_PRM = 0x15 - IPPROTO_PUP = 0xc - IPPROTO_PVP = 0x4b - IPPROTO_RAW = 0xff - IPPROTO_RCCMON = 0xa - IPPROTO_RDP = 0x1b - IPPROTO_RESERVED_253 = 0xfd - IPPROTO_RESERVED_254 = 0xfe - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_RVD = 0x42 - IPPROTO_SATEXPAK = 0x40 - IPPROTO_SATMON = 0x45 - IPPROTO_SCCSP = 0x60 - IPPROTO_SCTP = 0x84 - IPPROTO_SDRP = 0x2a - IPPROTO_SEND = 0x103 - IPPROTO_SEP = 0x21 - IPPROTO_SHIM6 = 0x8c - IPPROTO_SKIP = 0x39 - IPPROTO_SPACER = 0x7fff - IPPROTO_SRPC = 0x5a - IPPROTO_ST = 0x7 - IPPROTO_SVMTP = 0x52 - IPPROTO_SWIPE = 0x35 - IPPROTO_TCF = 0x57 - IPPROTO_TCP = 0x6 - IPPROTO_TLSP = 0x38 - IPPROTO_TP = 0x1d - IPPROTO_TPXX = 0x27 - IPPROTO_TRUNK1 = 0x17 - IPPROTO_TRUNK2 = 0x18 - IPPROTO_TTP = 0x54 - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPPROTO_VINES = 0x53 - IPPROTO_VISA = 0x46 - IPPROTO_VMTP = 0x51 - IPPROTO_WBEXPAK = 0x4f - IPPROTO_WBMON = 0x4e - IPPROTO_WSN = 0x4a - IPPROTO_XNET = 0xf - IPPROTO_XTP = 0x24 - IPV6_AUTOFLOWLABEL = 0x3b - IPV6_BINDANY = 0x40 - IPV6_BINDV6ONLY = 0x1b - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_FW_ADD = 0x1e - IPV6_FW_DEL = 0x1f - IPV6_FW_FLUSH = 0x20 - IPV6_FW_GET = 0x22 - IPV6_FW_ZERO = 0x21 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPSEC_POLICY = 0x1c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXOPTHDR = 0x800 - IPV6_MAXPACKET = 0xffff - IPV6_MAX_GROUP_SRC_FILTER = 0x200 - IPV6_MAX_MEMBERSHIPS = 0xfff - IPV6_MAX_SOCK_SRC_FILTER = 0x80 - IPV6_MIN_MEMBERSHIPS = 0x1f - IPV6_MMTU = 0x500 - IPV6_MSFILTER = 0x4a - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_PATHMTU = 0x2c - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_PREFER_TEMPADDR = 0x3f - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_ADD_SOURCE_MEMBERSHIP = 0x46 - IP_BINDANY = 0x18 - IP_BLOCK_SOURCE = 0x48 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DONTFRAG = 0x43 - IP_DROP_MEMBERSHIP = 0xd - IP_DROP_SOURCE_MEMBERSHIP = 0x47 - IP_DUMMYNET3 = 0x31 - IP_DUMMYNET_CONFIGURE = 0x3c - IP_DUMMYNET_DEL = 0x3d - IP_DUMMYNET_FLUSH = 0x3e - IP_DUMMYNET_GET = 0x40 - IP_FAITH = 0x16 - IP_FW3 = 0x30 - IP_FW_ADD = 0x32 - IP_FW_DEL = 0x33 - IP_FW_FLUSH = 0x34 - IP_FW_GET = 0x36 - IP_FW_NAT_CFG = 0x38 - IP_FW_NAT_DEL = 0x39 - IP_FW_NAT_GET_CONFIG = 0x3a - IP_FW_NAT_GET_LOG = 0x3b - IP_FW_RESETLOG = 0x37 - IP_FW_TABLE_ADD = 0x28 - IP_FW_TABLE_DEL = 0x29 - IP_FW_TABLE_FLUSH = 0x2a - IP_FW_TABLE_GETSIZE = 0x2b - IP_FW_TABLE_LIST = 0x2c - IP_FW_ZERO = 0x35 - IP_HDRINCL = 0x2 - IP_IPSEC_POLICY = 0x15 - IP_MAXPACKET = 0xffff - IP_MAX_GROUP_SRC_FILTER = 0x200 - IP_MAX_MEMBERSHIPS = 0xfff - IP_MAX_SOCK_MUTE_FILTER = 0x80 - IP_MAX_SOCK_SRC_FILTER = 0x80 - IP_MAX_SOURCE_FILTER = 0x400 - IP_MF = 0x2000 - IP_MINTTL = 0x42 - IP_MIN_MEMBERSHIPS = 0x1f - IP_MSFILTER = 0x4a - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_MULTICAST_VIF = 0xe - IP_OFFMASK = 0x1fff - IP_ONESBCAST = 0x17 - IP_OPTIONS = 0x1 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x14 - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVTOS = 0x44 - IP_RECVTTL = 0x41 - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_RSVP_OFF = 0x10 - IP_RSVP_ON = 0xf - IP_RSVP_VIF_OFF = 0x12 - IP_RSVP_VIF_ON = 0x11 - IP_SENDSRCADDR = 0x7 - IP_TOS = 0x3 - IP_TTL = 0x4 - IP_UNBLOCK_SOURCE = 0x49 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_AUTOSYNC = 0x7 - MADV_CORE = 0x9 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x5 - MADV_NOCORE = 0x8 - MADV_NORMAL = 0x0 - MADV_NOSYNC = 0x6 - MADV_PROTECT = 0xa - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_WILLNEED = 0x3 - MAP_ALIGNED_SUPER = 0x1000000 - MAP_ALIGNMENT_MASK = -0x1000000 - MAP_ALIGNMENT_SHIFT = 0x18 - MAP_ANON = 0x1000 - MAP_ANONYMOUS = 0x1000 - MAP_COPY = 0x2 - MAP_EXCL = 0x4000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_HASSEMAPHORE = 0x200 - MAP_NOCORE = 0x20000 - MAP_NORESERVE = 0x40 - MAP_NOSYNC = 0x800 - MAP_PREFAULT_READ = 0x40000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_RESERVED0080 = 0x80 - MAP_RESERVED0100 = 0x100 - MAP_SHARED = 0x1 - MAP_STACK = 0x400 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_CMSG_CLOEXEC = 0x40000 - MSG_COMPAT = 0x8000 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_NBIO = 0x4000 - MSG_NOSIGNAL = 0x20000 - MSG_NOTIFICATION = 0x2000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x2 - MS_SYNC = 0x0 - NAME_MAX = 0xff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x3 - NET_RT_IFLISTL = 0x5 - NET_RT_IFMALIST = 0x4 - NET_RT_MAXID = 0x6 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FFAND = 0x40000000 - NOTE_FFCOPY = 0xc0000000 - NOTE_FFCTRLMASK = 0xc0000000 - NOTE_FFLAGSMASK = 0xffffff - NOTE_FFNOP = 0x0 - NOTE_FFOR = 0x80000000 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_TRIGGER = 0x1000000 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - ONLCR = 0x2 - ONLRET = 0x40 - ONOCR = 0x20 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x100000 - O_CREAT = 0x200 - O_DIRECT = 0x10000 - O_DIRECTORY = 0x20000 - O_EXCL = 0x800 - O_EXEC = 0x40000 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_TTY_INIT = 0x80000 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_AS = 0xa - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0x8 - RTAX_NETMASK = 0x2 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_NETMASK = 0x4 - RTF_BLACKHOLE = 0x1000 - RTF_BROADCAST = 0x400000 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x1004d808 - RTF_GATEWAY = 0x2 - RTF_GWFLAG_COMPAT = 0x80000000 - RTF_HOST = 0x4 - RTF_LLDATA = 0x400 - RTF_LLINFO = 0x400 - RTF_LOCAL = 0x200000 - RTF_MODIFIED = 0x20 - RTF_MULTICAST = 0x800000 - RTF_PINNED = 0x100000 - RTF_PRCLONING = 0x10000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x40000 - RTF_REJECT = 0x8 - RTF_RNH_LOCKED = 0x40000000 - RTF_STATIC = 0x800 - RTF_STICKY = 0x10000000 - RTF_UP = 0x1 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_DELMADDR = 0x10 - RTM_GET = 0x4 - RTM_IEEE80211 = 0x12 - RTM_IFANNOUNCE = 0x11 - RTM_IFINFO = 0xe - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_NEWMADDR = 0xf - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x5 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RTV_WEIGHT = 0x100 - RT_ALL_FIBS = -0x1 - RT_CACHING_CONTEXT = 0x1 - RT_DEFAULT_FIB = 0x0 - RT_NORTREF = 0x2 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_BINTIME = 0x4 - SCM_CREDS = 0x3 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x2 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80206931 - SIOCADDRT = 0x8030720a - SIOCAIFADDR = 0x8040691a - SIOCAIFGROUP = 0x80246987 - SIOCALIFADDR = 0x8118691b - SIOCATMARK = 0x40047307 - SIOCDELMULTI = 0x80206932 - SIOCDELRT = 0x8030720b - SIOCDIFADDR = 0x80206919 - SIOCDIFGROUP = 0x80246989 - SIOCDIFPHYADDR = 0x80206949 - SIOCDLIFADDR = 0x8118691d - SIOCGDRVSPEC = 0xc01c697b - SIOCGETSGCNT = 0xc0147210 - SIOCGETVIFCNT = 0xc014720f - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0206921 - SIOCGIFBRDADDR = 0xc0206923 - SIOCGIFCAP = 0xc020691f - SIOCGIFCONF = 0xc0086924 - SIOCGIFDESCR = 0xc020692a - SIOCGIFDSTADDR = 0xc0206922 - SIOCGIFFIB = 0xc020695c - SIOCGIFFLAGS = 0xc0206911 - SIOCGIFGENERIC = 0xc020693a - SIOCGIFGMEMB = 0xc024698a - SIOCGIFGROUP = 0xc0246988 - SIOCGIFINDEX = 0xc0206920 - SIOCGIFMAC = 0xc0206926 - SIOCGIFMEDIA = 0xc0286938 - SIOCGIFMETRIC = 0xc0206917 - SIOCGIFMTU = 0xc0206933 - SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206948 - SIOCGIFPHYS = 0xc0206935 - SIOCGIFPSRCADDR = 0xc0206947 - SIOCGIFSTATUS = 0xc331693b - SIOCGLIFADDR = 0xc118691c - SIOCGLIFPHYADDR = 0xc118694b - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCGPRIVATE_0 = 0xc0206950 - SIOCGPRIVATE_1 = 0xc0206951 - SIOCIFCREATE = 0xc020697a - SIOCIFCREATE2 = 0xc020697c - SIOCIFDESTROY = 0x80206979 - SIOCIFGCLONERS = 0xc00c6978 - SIOCSDRVSPEC = 0x801c697b - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8020690c - SIOCSIFBRDADDR = 0x80206913 - SIOCSIFCAP = 0x8020691e - SIOCSIFDESCR = 0x80206929 - SIOCSIFDSTADDR = 0x8020690e - SIOCSIFFIB = 0x8020695d - SIOCSIFFLAGS = 0x80206910 - SIOCSIFGENERIC = 0x80206939 - SIOCSIFLLADDR = 0x8020693c - SIOCSIFMAC = 0x80206927 - SIOCSIFMEDIA = 0xc0206937 - SIOCSIFMETRIC = 0x80206918 - SIOCSIFMTU = 0x80206934 - SIOCSIFNAME = 0x80206928 - SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x80406946 - SIOCSIFPHYS = 0x80206936 - SIOCSIFRVNET = 0xc020695b - SIOCSIFVNET = 0xc020695a - SIOCSLIFPHYADDR = 0x8118694a - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SOCK_CLOEXEC = 0x10000000 - SOCK_DGRAM = 0x2 - SOCK_MAXADDRLEN = 0xff - SOCK_NONBLOCK = 0x20000000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_ACCEPTFILTER = 0x1000 - SO_BINTIME = 0x2000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LABEL = 0x1009 - SO_LINGER = 0x80 - SO_LISTENINCQLEN = 0x1013 - SO_LISTENQLEN = 0x1012 - SO_LISTENQLIMIT = 0x1011 - SO_NOSIGPIPE = 0x800 - SO_NO_DDP = 0x8000 - SO_NO_OFFLOAD = 0x4000 - SO_OOBINLINE = 0x100 - SO_PEERLABEL = 0x1010 - SO_PROTOCOL = 0x1016 - SO_PROTOTYPE = 0x1016 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_SETFIB = 0x1014 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x400 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - SO_USER_COOKIE = 0x1015 - SO_VENDOR = 0x80000000 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_CA_NAME_MAX = 0x10 - TCP_CONGESTION = 0x40 - TCP_INFO = 0x20 - TCP_KEEPCNT = 0x400 - TCP_KEEPIDLE = 0x100 - TCP_KEEPINIT = 0x80 - TCP_KEEPINTVL = 0x200 - TCP_MAXBURST = 0x4 - TCP_MAXHLEN = 0x3c - TCP_MAXOLEN = 0x28 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_SACK = 0x4 - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x10 - TCP_MINMSS = 0xd8 - TCP_MSS = 0x218 - TCP_NODELAY = 0x1 - TCP_NOOPT = 0x8 - TCP_NOPUSH = 0x4 - TCP_VENDOR = 0x80000000 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLUSH = 0x80047410 - TIOCGDRAINWAIT = 0x40047456 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGPGRP = 0x40047477 - TIOCGPTN = 0x4004740f - TIOCGSID = 0x40047463 - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGDTRWAIT = 0x4004745a - TIOCMGET = 0x4004746a - TIOCMSDTRWAIT = 0x8004745b - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DCD = 0x40 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCPTMASTER = 0x2000741c - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDRAINWAIT = 0x80047457 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSIG = 0x2004745f - TIOCSPGRP = 0x80047476 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x20007465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCTIMESTAMP = 0x40087459 - TIOCUCNTL = 0x80047466 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VERASE2 = 0x7 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WCONTINUED = 0x4 - WCOREFLAG = 0x80 - WEXITED = 0x10 - WLINUXCLONE = 0x80000000 - WNOHANG = 0x1 - WNOWAIT = 0x8 - WSTOPPED = 0x2 - WTRAPPED = 0x20 - WUNTRACED = 0x2 + AF_APPLETALK = 0x10 + AF_ARP = 0x23 + AF_ATM = 0x1e + AF_BLUETOOTH = 0x24 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1c + AF_INET6_SDP = 0x2a + AF_INET_SDP = 0x28 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x2a + AF_NATM = 0x1d + AF_NETBIOS = 0x6 + AF_NETGRAPH = 0x20 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SCLUSTER = 0x22 + AF_SIP = 0x18 + AF_SLOW = 0x21 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VENDOR00 = 0x27 + AF_VENDOR01 = 0x29 + AF_VENDOR02 = 0x2b + AF_VENDOR03 = 0x2d + AF_VENDOR04 = 0x2f + AF_VENDOR05 = 0x31 + AF_VENDOR06 = 0x33 + AF_VENDOR07 = 0x35 + AF_VENDOR08 = 0x37 + AF_VENDOR09 = 0x39 + AF_VENDOR10 = 0x3b + AF_VENDOR11 = 0x3d + AF_VENDOR12 = 0x3f + AF_VENDOR13 = 0x41 + AF_VENDOR14 = 0x43 + AF_VENDOR15 = 0x45 + AF_VENDOR16 = 0x47 + AF_VENDOR17 = 0x49 + AF_VENDOR18 = 0x4b + AF_VENDOR19 = 0x4d + AF_VENDOR20 = 0x4f + AF_VENDOR21 = 0x51 + AF_VENDOR22 = 0x53 + AF_VENDOR23 = 0x55 + AF_VENDOR24 = 0x57 + AF_VENDOR25 = 0x59 + AF_VENDOR26 = 0x5b + AF_VENDOR27 = 0x5d + AF_VENDOR28 = 0x5f + AF_VENDOR29 = 0x61 + AF_VENDOR30 = 0x63 + AF_VENDOR31 = 0x65 + AF_VENDOR32 = 0x67 + AF_VENDOR33 = 0x69 + AF_VENDOR34 = 0x6b + AF_VENDOR35 = 0x6d + AF_VENDOR36 = 0x6f + AF_VENDOR37 = 0x71 + AF_VENDOR38 = 0x73 + AF_VENDOR39 = 0x75 + AF_VENDOR40 = 0x77 + AF_VENDOR41 = 0x79 + AF_VENDOR42 = 0x7b + AF_VENDOR43 = 0x7d + AF_VENDOR44 = 0x7f + AF_VENDOR45 = 0x81 + AF_VENDOR46 = 0x83 + AF_VENDOR47 = 0x85 + ALTWERASE = 0x200 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B460800 = 0x70800 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B921600 = 0xe1000 + B9600 = 0x2580 + BIOCFEEDBACK = 0x8004427c + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDIRECTION = 0x40044276 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0084279 + BIOCGETBUFMODE = 0x4004427d + BIOCGETIF = 0x4020426b + BIOCGETZMAX = 0x4004427f + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4008426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCGTSTAMP = 0x40044283 + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x2000427a + BIOCPROMISC = 0x20004269 + BIOCROTZBUF = 0x400c4280 + BIOCSBLEN = 0xc0044266 + BIOCSDIRECTION = 0x80044277 + BIOCSDLT = 0x80044278 + BIOCSETBUFMODE = 0x8004427e + BIOCSETF = 0x80084267 + BIOCSETFNR = 0x80084282 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x8008427b + BIOCSETZBUF = 0x800c4281 + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8008426d + BIOCSSEESENT = 0x80044277 + BIOCSTSTAMP = 0x80044284 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_BUFMODE_BUFFER = 0x1 + BPF_BUFMODE_ZBUF = 0x2 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MOD = 0x90 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_T_BINTIME = 0x2 + BPF_T_BINTIME_FAST = 0x102 + BPF_T_BINTIME_MONOTONIC = 0x202 + BPF_T_BINTIME_MONOTONIC_FAST = 0x302 + BPF_T_FAST = 0x100 + BPF_T_FLAG_MASK = 0x300 + BPF_T_FORMAT_MASK = 0x3 + BPF_T_MICROTIME = 0x0 + BPF_T_MICROTIME_FAST = 0x100 + BPF_T_MICROTIME_MONOTONIC = 0x200 + BPF_T_MICROTIME_MONOTONIC_FAST = 0x300 + BPF_T_MONOTONIC = 0x200 + BPF_T_MONOTONIC_FAST = 0x300 + BPF_T_NANOTIME = 0x1 + BPF_T_NANOTIME_FAST = 0x101 + BPF_T_NANOTIME_MONOTONIC = 0x201 + BPF_T_NANOTIME_MONOTONIC_FAST = 0x301 + BPF_T_NONE = 0x3 + BPF_T_NORMAL = 0x0 + BPF_W = 0x0 + BPF_X = 0x8 + BPF_XOR = 0xa0 + BRKINT = 0x2 + CAP_ACCEPT = 0x200000020000000 + CAP_ACL_CHECK = 0x400000000010000 + CAP_ACL_DELETE = 0x400000000020000 + CAP_ACL_GET = 0x400000000040000 + CAP_ACL_SET = 0x400000000080000 + CAP_ALL0 = 0x20007ffffffffff + CAP_ALL1 = 0x4000000001fffff + CAP_BIND = 0x200000040000000 + CAP_BINDAT = 0x200008000000400 + CAP_CHFLAGSAT = 0x200000000001400 + CAP_CONNECT = 0x200000080000000 + CAP_CONNECTAT = 0x200010000000400 + CAP_CREATE = 0x200000000000040 + CAP_EVENT = 0x400000000000020 + CAP_EXTATTR_DELETE = 0x400000000001000 + CAP_EXTATTR_GET = 0x400000000002000 + CAP_EXTATTR_LIST = 0x400000000004000 + CAP_EXTATTR_SET = 0x400000000008000 + CAP_FCHDIR = 0x200000000000800 + CAP_FCHFLAGS = 0x200000000001000 + CAP_FCHMOD = 0x200000000002000 + CAP_FCHMODAT = 0x200000000002400 + CAP_FCHOWN = 0x200000000004000 + CAP_FCHOWNAT = 0x200000000004400 + CAP_FCNTL = 0x200000000008000 + CAP_FCNTL_ALL = 0x78 + CAP_FCNTL_GETFL = 0x8 + CAP_FCNTL_GETOWN = 0x20 + CAP_FCNTL_SETFL = 0x10 + CAP_FCNTL_SETOWN = 0x40 + CAP_FEXECVE = 0x200000000000080 + CAP_FLOCK = 0x200000000010000 + CAP_FPATHCONF = 0x200000000020000 + CAP_FSCK = 0x200000000040000 + CAP_FSTAT = 0x200000000080000 + CAP_FSTATAT = 0x200000000080400 + CAP_FSTATFS = 0x200000000100000 + CAP_FSYNC = 0x200000000000100 + CAP_FTRUNCATE = 0x200000000000200 + CAP_FUTIMES = 0x200000000200000 + CAP_FUTIMESAT = 0x200000000200400 + CAP_GETPEERNAME = 0x200000100000000 + CAP_GETSOCKNAME = 0x200000200000000 + CAP_GETSOCKOPT = 0x200000400000000 + CAP_IOCTL = 0x400000000000080 + CAP_IOCTLS_ALL = 0x7fffffff + CAP_KQUEUE = 0x400000000100040 + CAP_KQUEUE_CHANGE = 0x400000000100000 + CAP_KQUEUE_EVENT = 0x400000000000040 + CAP_LINKAT_SOURCE = 0x200020000000400 + CAP_LINKAT_TARGET = 0x200000000400400 + CAP_LISTEN = 0x200000800000000 + CAP_LOOKUP = 0x200000000000400 + CAP_MAC_GET = 0x400000000000001 + CAP_MAC_SET = 0x400000000000002 + CAP_MKDIRAT = 0x200000000800400 + CAP_MKFIFOAT = 0x200000001000400 + CAP_MKNODAT = 0x200000002000400 + CAP_MMAP = 0x200000000000010 + CAP_MMAP_R = 0x20000000000001d + CAP_MMAP_RW = 0x20000000000001f + CAP_MMAP_RWX = 0x20000000000003f + CAP_MMAP_RX = 0x20000000000003d + CAP_MMAP_W = 0x20000000000001e + CAP_MMAP_WX = 0x20000000000003e + CAP_MMAP_X = 0x20000000000003c + CAP_PDGETPID = 0x400000000000200 + CAP_PDKILL = 0x400000000000800 + CAP_PDWAIT = 0x400000000000400 + CAP_PEELOFF = 0x200001000000000 + CAP_POLL_EVENT = 0x400000000000020 + CAP_PREAD = 0x20000000000000d + CAP_PWRITE = 0x20000000000000e + CAP_READ = 0x200000000000001 + CAP_RECV = 0x200000000000001 + CAP_RENAMEAT_SOURCE = 0x200000004000400 + CAP_RENAMEAT_TARGET = 0x200040000000400 + CAP_RIGHTS_VERSION = 0x0 + CAP_RIGHTS_VERSION_00 = 0x0 + CAP_SEEK = 0x20000000000000c + CAP_SEEK_TELL = 0x200000000000004 + CAP_SEM_GETVALUE = 0x400000000000004 + CAP_SEM_POST = 0x400000000000008 + CAP_SEM_WAIT = 0x400000000000010 + CAP_SEND = 0x200000000000002 + CAP_SETSOCKOPT = 0x200002000000000 + CAP_SHUTDOWN = 0x200004000000000 + CAP_SOCK_CLIENT = 0x200007780000003 + CAP_SOCK_SERVER = 0x200007f60000003 + CAP_SYMLINKAT = 0x200000008000400 + CAP_TTYHOOK = 0x400000000000100 + CAP_UNLINKAT = 0x200000010000400 + CAP_UNUSED0_44 = 0x200080000000000 + CAP_UNUSED0_57 = 0x300000000000000 + CAP_UNUSED1_22 = 0x400000000200000 + CAP_UNUSED1_57 = 0x500000000000000 + CAP_WRITE = 0x200000000000002 + CFLUSH = 0xf + CLOCAL = 0x8000 + CLOCK_MONOTONIC = 0x4 + CLOCK_MONOTONIC_FAST = 0xc + CLOCK_MONOTONIC_PRECISE = 0xb + CLOCK_PROCESS_CPUTIME_ID = 0xf + CLOCK_PROF = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_FAST = 0xa + CLOCK_REALTIME_PRECISE = 0x9 + CLOCK_SECOND = 0xd + CLOCK_THREAD_CPUTIME_ID = 0xe + CLOCK_UPTIME = 0x5 + CLOCK_UPTIME_FAST = 0x8 + CLOCK_UPTIME_PRECISE = 0x7 + CLOCK_VIRTUAL = 0x1 + CREAD = 0x800 + CRTSCTS = 0x30000 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0x18 + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_BREDR_BB = 0xff + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_BLUETOOTH_LE_LL = 0xfb + DLT_BLUETOOTH_LE_LL_WITH_PHDR = 0x100 + DLT_BLUETOOTH_LINUX_MONITOR = 0xfe + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DBUS = 0xe7 + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_DVB_CI = 0xeb + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_EPON = 0x103 + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NOFCS = 0xe6 + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_INFINIBAND = 0xf7 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPMI_HPM_2 = 0x104 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xf2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_ATM_CEMIC = 0xee + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FIBRECHANNEL = 0xea + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_SRX_E2E = 0xe9 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_JUNIPER_VS = 0xe8 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_PPP_WITHDIRECTION = 0xa6 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MATCHING_MAX = 0x104 + DLT_MATCHING_MIN = 0x68 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPEG_2_TS = 0xf3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_MUX27010 = 0xec + DLT_NETANALYZER = 0xf0 + DLT_NETANALYZER_TRANSPARENT = 0xf1 + DLT_NETLINK = 0xfd + DLT_NFC_LLCP = 0xf5 + DLT_NFLOG = 0xef + DLT_NG40 = 0xf4 + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x79 + DLT_PKTAP = 0x102 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PPP_WITH_DIRECTION = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PROFIBUS_DL = 0x101 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RIO = 0x7c + DLT_RTAC_SERIAL = 0xfa + DLT_SCCP = 0x8e + DLT_SCTP = 0xf8 + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_STANAG_5066_D_PDU = 0xed + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USBPCAP = 0xf9 + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DLT_WIHART = 0xdf + DLT_WIRESHARK_UPPER_PDU = 0xfc + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_LIO = -0xa + EVFILT_PROC = -0x5 + EVFILT_PROCDESC = -0x8 + EVFILT_READ = -0x1 + EVFILT_SENDFILE = -0xc + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xc + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xb + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_DROP = 0x1000 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_FLAG2 = 0x4000 + EV_FORCEONESHOT = 0x100 + EV_ONESHOT = 0x10 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTATTR_NAMESPACE_EMPTY = 0x0 + EXTATTR_NAMESPACE_SYSTEM = 0x2 + EXTATTR_NAMESPACE_USER = 0x1 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_CANCEL = 0x5 + F_DUP2FD = 0xa + F_DUP2FD_CLOEXEC = 0x12 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x11 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0xb + F_GETOWN = 0x5 + F_OGETLK = 0x7 + F_OK = 0x0 + F_OSETLK = 0x8 + F_OSETLKW = 0x9 + F_RDAHEAD = 0x10 + F_RDLCK = 0x1 + F_READAHEAD = 0xf + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0xc + F_SETLKW = 0xd + F_SETLK_REMOTE = 0xe + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_UNLCKSYS = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x218f52 + IFF_CANTCONFIG = 0x10000 + IFF_DEBUG = 0x4 + IFF_DRV_OACTIVE = 0x400 + IFF_DRV_RUNNING = 0x40 + IFF_DYING = 0x200000 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MONITOR = 0x40000 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PPROMISC = 0x20000 + IFF_PROMISC = 0x100 + IFF_RENAMING = 0x400000 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_STATICARP = 0x80000 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_BRIDGE = 0xd1 + IFT_CARP = 0xf8 + IFT_IEEE1394 = 0x90 + IFT_INFINIBAND = 0xc7 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_PPP = 0x17 + IFT_PROPVIRTUAL = 0x35 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IN_RFC3021_MASK = 0xfffffffe + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CARP = 0x70 + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0x102 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HIP = 0x8b + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MEAS = 0x13 + IPPROTO_MH = 0x87 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MOBILE = 0x37 + IPPROTO_MPLS = 0x89 + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OLD_DIVERT = 0xfe + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_RESERVED_253 = 0xfd + IPPROTO_RESERVED_254 = 0xfe + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEND = 0x103 + IPPROTO_SEP = 0x21 + IPPROTO_SHIM6 = 0x8c + IPPROTO_SKIP = 0x39 + IPPROTO_SPACER = 0x7fff + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TLSP = 0x38 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_BINDANY = 0x40 + IPV6_BINDMULTI = 0x41 + IPV6_BINDV6ONLY = 0x1b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FLOWID = 0x43 + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FLOWTYPE = 0x44 + IPV6_FRAGTTL = 0x78 + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MSFILTER = 0x4a + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_PREFER_TEMPADDR = 0x3f + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVFLOWID = 0x46 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRSSBUCKETID = 0x47 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RSSBUCKETID = 0x45 + IPV6_RSS_LISTEN_BUCKET = 0x42 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BINDANY = 0x18 + IP_BINDMULTI = 0x19 + IP_BLOCK_SOURCE = 0x48 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DONTFRAG = 0x43 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET3 = 0x31 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FLOWID = 0x5a + IP_FLOWTYPE = 0x5b + IP_FW3 = 0x30 + IP_FW_ADD = 0x32 + IP_FW_DEL = 0x33 + IP_FW_FLUSH = 0x34 + IP_FW_GET = 0x36 + IP_FW_NAT_CFG = 0x38 + IP_FW_NAT_DEL = 0x39 + IP_FW_NAT_GET_CONFIG = 0x3a + IP_FW_NAT_GET_LOG = 0x3b + IP_FW_RESETLOG = 0x37 + IP_FW_TABLE_ADD = 0x28 + IP_FW_TABLE_DEL = 0x29 + IP_FW_TABLE_FLUSH = 0x2a + IP_FW_TABLE_GETSIZE = 0x2b + IP_FW_TABLE_LIST = 0x2c + IP_FW_ZERO = 0x35 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MAX_SOURCE_FILTER = 0x400 + IP_MF = 0x2000 + IP_MINTTL = 0x42 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_OFFMASK = 0x1fff + IP_ONESBCAST = 0x17 + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVFLOWID = 0x5d + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVRSSBUCKETID = 0x5e + IP_RECVTOS = 0x44 + IP_RECVTTL = 0x41 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSSBUCKETID = 0x5c + IP_RSS_LISTEN_BUCKET = 0x1a + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_SENDSRCADDR = 0x7 + IP_TOS = 0x3 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_AUTOSYNC = 0x7 + MADV_CORE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_NOCORE = 0x8 + MADV_NORMAL = 0x0 + MADV_NOSYNC = 0x6 + MADV_PROTECT = 0xa + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MAP_ALIGNED_SUPER = 0x1000000 + MAP_ALIGNMENT_MASK = -0x1000000 + MAP_ALIGNMENT_SHIFT = 0x18 + MAP_ANON = 0x1000 + MAP_ANONYMOUS = 0x1000 + MAP_COPY = 0x2 + MAP_EXCL = 0x4000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_NOCORE = 0x20000 + MAP_NOSYNC = 0x800 + MAP_PREFAULT_READ = 0x40000 + MAP_PRIVATE = 0x2 + MAP_RESERVED0020 = 0x20 + MAP_RESERVED0040 = 0x40 + MAP_RESERVED0080 = 0x80 + MAP_RESERVED0100 = 0x100 + MAP_SHARED = 0x1 + MAP_STACK = 0x400 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CMSG_CLOEXEC = 0x40000 + MSG_COMPAT = 0x8000 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_NBIO = 0x4000 + MSG_NOSIGNAL = 0x20000 + MSG_NOTIFICATION = 0x2000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MSG_WAITFORONE = 0x80000 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x0 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLISTL = 0x5 + NET_RT_IFMALIST = 0x4 + NOFLSH = 0x80000000 + NOKERNINFO = 0x2000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_CLOSE = 0x100 + NOTE_CLOSE_WRITE = 0x200 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FILE_POLL = 0x2 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_MSECONDS = 0x2 + NOTE_NSECONDS = 0x8 + NOTE_OPEN = 0x80 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_READ = 0x400 + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_SECONDS = 0x1 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_USECONDS = 0x4 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + OXTABS = 0x4 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x100000 + O_CREAT = 0x200 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x20000 + O_EXCL = 0x800 + O_EXEC = 0x40000 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_TTY_INIT = 0x80000 + O_VERIFY = 0x200000 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_MEMLOCK = 0x6 + RLIMIT_NOFILE = 0x8 + RLIMIT_NPROC = 0x7 + RLIMIT_RSS = 0x5 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_FIXEDMTU = 0x80000 + RTF_FMASK = 0x1004d808 + RTF_GATEWAY = 0x2 + RTF_GWFLAG_COMPAT = 0x80000000 + RTF_HOST = 0x4 + RTF_LLDATA = 0x400 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_PINNED = 0x100000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_REJECT = 0x8 + RTF_RNH_LOCKED = 0x40000000 + RTF_STATIC = 0x800 + RTF_STICKY = 0x10000000 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x12 + RTM_IFANNOUNCE = 0x11 + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RTV_WEIGHT = 0x100 + RT_ALL_FIBS = -0x1 + RT_BLACKHOLE = 0x40 + RT_CACHING_CONTEXT = 0x1 + RT_DEFAULT_FIB = 0x0 + RT_HAS_GW = 0x80 + RT_HAS_HEADER = 0x10 + RT_HAS_HEADER_BIT = 0x4 + RT_L2_ME = 0x4 + RT_L2_ME_BIT = 0x2 + RT_LLE_CACHE = 0x100 + RT_MAY_LOOP = 0x8 + RT_MAY_LOOP_BIT = 0x3 + RT_NORTREF = 0x2 + RT_REJECT = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_BINTIME = 0x4 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCAIFGROUP = 0x80246987 + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFGROUP = 0x80246989 + SIOCDIFPHYADDR = 0x80206949 + SIOCGDRVSPEC = 0xc01c697b + SIOCGETSGCNT = 0xc0147210 + SIOCGETVIFCNT = 0xc014720f + SIOCGHIWAT = 0x40047301 + SIOCGI2C = 0xc020693d + SIOCGIFADDR = 0xc0206921 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020691f + SIOCGIFCONF = 0xc0086924 + SIOCGIFDESCR = 0xc020692a + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFIB = 0xc020695c + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc024698a + SIOCGIFGROUP = 0xc0246988 + SIOCGIFINDEX = 0xc0206920 + SIOCGIFMAC = 0xc0206926 + SIOCGIFMEDIA = 0xc0286938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFSTATUS = 0xc331693b + SIOCGIFXMEDIA = 0xc028698b + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGPRIVATE_0 = 0xc0206950 + SIOCGPRIVATE_1 = 0xc0206951 + SIOCGTUNFIB = 0xc020695e + SIOCIFCREATE = 0xc020697a + SIOCIFCREATE2 = 0xc020697c + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc00c6978 + SIOCSDRVSPEC = 0x801c697b + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020691e + SIOCSIFDESCR = 0x80206929 + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFIB = 0x8020695d + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206927 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNAME = 0x80206928 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPHYS = 0x80206936 + SIOCSIFRVNET = 0xc020695b + SIOCSIFVNET = 0xc020695a + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SIOCSTUNFIB = 0x8020695f + SOCK_CLOEXEC = 0x10000000 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_NONBLOCK = 0x20000000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BINTIME = 0x2000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1009 + SO_LINGER = 0x80 + SO_LISTENINCQLEN = 0x1013 + SO_LISTENQLEN = 0x1012 + SO_LISTENQLIMIT = 0x1011 + SO_NOSIGPIPE = 0x800 + SO_NO_DDP = 0x8000 + SO_NO_OFFLOAD = 0x4000 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1010 + SO_PROTOCOL = 0x1016 + SO_PROTOTYPE = 0x1016 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SETFIB = 0x1014 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SO_USER_COOKIE = 0x1015 + SO_VENDOR = 0x80000000 + TAB0 = 0x0 + TAB3 = 0x4 + TABDLY = 0x4 + TCIFLUSH = 0x1 + TCIOFF = 0x3 + TCIOFLUSH = 0x3 + TCION = 0x4 + TCOFLUSH = 0x2 + TCOOFF = 0x1 + TCOON = 0x2 + TCP_CA_NAME_MAX = 0x10 + TCP_CCALGOOPT = 0x41 + TCP_CONGESTION = 0x40 + TCP_FASTOPEN = 0x401 + TCP_FUNCTION_BLK = 0x2000 + TCP_FUNCTION_NAME_LEN_MAX = 0x20 + TCP_INFO = 0x20 + TCP_KEEPCNT = 0x400 + TCP_KEEPIDLE = 0x100 + TCP_KEEPINIT = 0x80 + TCP_KEEPINTVL = 0x200 + TCP_MAXBURST = 0x4 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x10 + TCP_MINMSS = 0xd8 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_PCAP_IN = 0x1000 + TCP_PCAP_OUT = 0x800 + TCP_VENDOR = 0x80000000 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGPTN = 0x4004740f + TIOCGSID = 0x40047463 + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DCD = 0x40 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTMASTER = 0x2000741c + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2004745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40087459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VERASE2 = 0x7 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x4 + WCOREFLAG = 0x80 + WEXITED = 0x10 + WLINUXCLONE = 0x80000000 + WNOHANG = 0x1 + WNOWAIT = 0x8 + WSTOPPED = 0x2 + WTRAPPED = 0x20 + WUNTRACED = 0x2 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go index 2afbe2d5e..c5c6f13e5 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go @@ -1,5 +1,5 @@ // mkerrors.sh -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build arm,freebsd @@ -11,1442 +11,1428 @@ package unix import "syscall" const ( - AF_APPLETALK = 0x10 - AF_ARP = 0x23 - AF_ATM = 0x1e - AF_BLUETOOTH = 0x24 - AF_CCITT = 0xa - AF_CHAOS = 0x5 - AF_CNT = 0x15 - AF_COIP = 0x14 - AF_DATAKIT = 0x9 - AF_DECnet = 0xc - AF_DLI = 0xd - AF_E164 = 0x1a - AF_ECMA = 0x8 - AF_HYLINK = 0xf - AF_IEEE80211 = 0x25 - AF_IMPLINK = 0x3 - AF_INET = 0x2 - AF_INET6 = 0x1c - AF_INET6_SDP = 0x2a - AF_INET_SDP = 0x28 - AF_IPX = 0x17 - AF_ISDN = 0x1a - AF_ISO = 0x7 - AF_LAT = 0xe - AF_LINK = 0x12 - AF_LOCAL = 0x1 - AF_MAX = 0x2a - AF_NATM = 0x1d - AF_NETBIOS = 0x6 - AF_NETGRAPH = 0x20 - AF_OSI = 0x7 - AF_PUP = 0x4 - AF_ROUTE = 0x11 - AF_SCLUSTER = 0x22 - AF_SIP = 0x18 - AF_SLOW = 0x21 - AF_SNA = 0xb - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VENDOR00 = 0x27 - AF_VENDOR01 = 0x29 - AF_VENDOR02 = 0x2b - AF_VENDOR03 = 0x2d - AF_VENDOR04 = 0x2f - AF_VENDOR05 = 0x31 - AF_VENDOR06 = 0x33 - AF_VENDOR07 = 0x35 - AF_VENDOR08 = 0x37 - AF_VENDOR09 = 0x39 - AF_VENDOR10 = 0x3b - AF_VENDOR11 = 0x3d - AF_VENDOR12 = 0x3f - AF_VENDOR13 = 0x41 - AF_VENDOR14 = 0x43 - AF_VENDOR15 = 0x45 - AF_VENDOR16 = 0x47 - AF_VENDOR17 = 0x49 - AF_VENDOR18 = 0x4b - AF_VENDOR19 = 0x4d - AF_VENDOR20 = 0x4f - AF_VENDOR21 = 0x51 - AF_VENDOR22 = 0x53 - AF_VENDOR23 = 0x55 - AF_VENDOR24 = 0x57 - AF_VENDOR25 = 0x59 - AF_VENDOR26 = 0x5b - AF_VENDOR27 = 0x5d - AF_VENDOR28 = 0x5f - AF_VENDOR29 = 0x61 - AF_VENDOR30 = 0x63 - AF_VENDOR31 = 0x65 - AF_VENDOR32 = 0x67 - AF_VENDOR33 = 0x69 - AF_VENDOR34 = 0x6b - AF_VENDOR35 = 0x6d - AF_VENDOR36 = 0x6f - AF_VENDOR37 = 0x71 - AF_VENDOR38 = 0x73 - AF_VENDOR39 = 0x75 - AF_VENDOR40 = 0x77 - AF_VENDOR41 = 0x79 - AF_VENDOR42 = 0x7b - AF_VENDOR43 = 0x7d - AF_VENDOR44 = 0x7f - AF_VENDOR45 = 0x81 - AF_VENDOR46 = 0x83 - AF_VENDOR47 = 0x85 - B0 = 0x0 - B110 = 0x6e - B115200 = 0x1c200 - B1200 = 0x4b0 - B134 = 0x86 - B14400 = 0x3840 - B150 = 0x96 - B1800 = 0x708 - B19200 = 0x4b00 - B200 = 0xc8 - B230400 = 0x38400 - B2400 = 0x960 - B28800 = 0x7080 - B300 = 0x12c - B38400 = 0x9600 - B460800 = 0x70800 - B4800 = 0x12c0 - B50 = 0x32 - B57600 = 0xe100 - B600 = 0x258 - B7200 = 0x1c20 - B75 = 0x4b - B76800 = 0x12c00 - B921600 = 0xe1000 - B9600 = 0x2580 - BIOCFEEDBACK = 0x8004427c - BIOCFLUSH = 0x20004268 - BIOCGBLEN = 0x40044266 - BIOCGDIRECTION = 0x40044276 - BIOCGDLT = 0x4004426a - BIOCGDLTLIST = 0xc0084279 - BIOCGETBUFMODE = 0x4004427d - BIOCGETIF = 0x4020426b - BIOCGETZMAX = 0x4004427f - BIOCGHDRCMPLT = 0x40044274 - BIOCGRSIG = 0x40044272 - BIOCGRTIMEOUT = 0x4008426e - BIOCGSEESENT = 0x40044276 - BIOCGSTATS = 0x4008426f - BIOCGTSTAMP = 0x40044283 - BIOCIMMEDIATE = 0x80044270 - BIOCLOCK = 0x2000427a - BIOCPROMISC = 0x20004269 - BIOCROTZBUF = 0x400c4280 - BIOCSBLEN = 0xc0044266 - BIOCSDIRECTION = 0x80044277 - BIOCSDLT = 0x80044278 - BIOCSETBUFMODE = 0x8004427e - BIOCSETF = 0x80084267 - BIOCSETFNR = 0x80084282 - BIOCSETIF = 0x8020426c - BIOCSETWF = 0x8008427b - BIOCSETZBUF = 0x800c4281 - BIOCSHDRCMPLT = 0x80044275 - BIOCSRSIG = 0x80044273 - BIOCSRTIMEOUT = 0x8008426d - BIOCSSEESENT = 0x80044277 - BIOCSTSTAMP = 0x80044284 - BIOCVERSION = 0x40044271 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ALIGNMENT = 0x4 - BPF_ALU = 0x4 - BPF_AND = 0x50 - BPF_B = 0x10 - BPF_BUFMODE_BUFFER = 0x1 - BPF_BUFMODE_ZBUF = 0x2 - BPF_DIV = 0x30 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JMP = 0x5 - BPF_JSET = 0x40 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXBUFSIZE = 0x80000 - BPF_MAXINSNS = 0x200 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINBUFSIZE = 0x20 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_OR = 0x40 - BPF_RELEASE = 0x30bb6 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAX = 0x0 - BPF_TXA = 0x80 - BPF_T_BINTIME = 0x2 - BPF_T_BINTIME_FAST = 0x102 - BPF_T_BINTIME_MONOTONIC = 0x202 - BPF_T_BINTIME_MONOTONIC_FAST = 0x302 - BPF_T_FAST = 0x100 - BPF_T_FLAG_MASK = 0x300 - BPF_T_FORMAT_MASK = 0x3 - BPF_T_MICROTIME = 0x0 - BPF_T_MICROTIME_FAST = 0x100 - BPF_T_MICROTIME_MONOTONIC = 0x200 - BPF_T_MICROTIME_MONOTONIC_FAST = 0x300 - BPF_T_MONOTONIC = 0x200 - BPF_T_MONOTONIC_FAST = 0x300 - BPF_T_NANOTIME = 0x1 - BPF_T_NANOTIME_FAST = 0x101 - BPF_T_NANOTIME_MONOTONIC = 0x201 - BPF_T_NANOTIME_MONOTONIC_FAST = 0x301 - BPF_T_NONE = 0x3 - BPF_T_NORMAL = 0x0 - BPF_W = 0x0 - BPF_X = 0x8 - BRKINT = 0x2 - CFLUSH = 0xf - CLOCAL = 0x8000 - CREAD = 0x800 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x14 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - CTL_MAXNAME = 0x18 - CTL_NET = 0x4 - DLT_A429 = 0xb8 - DLT_A653_ICM = 0xb9 - DLT_AIRONET_HEADER = 0x78 - DLT_AOS = 0xde - DLT_APPLE_IP_OVER_IEEE1394 = 0x8a - DLT_ARCNET = 0x7 - DLT_ARCNET_LINUX = 0x81 - DLT_ATM_CLIP = 0x13 - DLT_ATM_RFC1483 = 0xb - DLT_AURORA = 0x7e - DLT_AX25 = 0x3 - DLT_AX25_KISS = 0xca - DLT_BACNET_MS_TP = 0xa5 - DLT_BLUETOOTH_HCI_H4 = 0xbb - DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 - DLT_CAN20B = 0xbe - DLT_CAN_SOCKETCAN = 0xe3 - DLT_CHAOS = 0x5 - DLT_CHDLC = 0x68 - DLT_CISCO_IOS = 0x76 - DLT_C_HDLC = 0x68 - DLT_C_HDLC_WITH_DIR = 0xcd - DLT_DBUS = 0xe7 - DLT_DECT = 0xdd - DLT_DOCSIS = 0x8f - DLT_DVB_CI = 0xeb - DLT_ECONET = 0x73 - DLT_EN10MB = 0x1 - DLT_EN3MB = 0x2 - DLT_ENC = 0x6d - DLT_ERF = 0xc5 - DLT_ERF_ETH = 0xaf - DLT_ERF_POS = 0xb0 - DLT_FC_2 = 0xe0 - DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 - DLT_FDDI = 0xa - DLT_FLEXRAY = 0xd2 - DLT_FRELAY = 0x6b - DLT_FRELAY_WITH_DIR = 0xce - DLT_GCOM_SERIAL = 0xad - DLT_GCOM_T1E1 = 0xac - DLT_GPF_F = 0xab - DLT_GPF_T = 0xaa - DLT_GPRS_LLC = 0xa9 - DLT_GSMTAP_ABIS = 0xda - DLT_GSMTAP_UM = 0xd9 - DLT_HHDLC = 0x79 - DLT_IBM_SN = 0x92 - DLT_IBM_SP = 0x91 - DLT_IEEE802 = 0x6 - DLT_IEEE802_11 = 0x69 - DLT_IEEE802_11_RADIO = 0x7f - DLT_IEEE802_11_RADIO_AVS = 0xa3 - DLT_IEEE802_15_4 = 0xc3 - DLT_IEEE802_15_4_LINUX = 0xbf - DLT_IEEE802_15_4_NOFCS = 0xe6 - DLT_IEEE802_15_4_NONASK_PHY = 0xd7 - DLT_IEEE802_16_MAC_CPS = 0xbc - DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 - DLT_IPFILTER = 0x74 - DLT_IPMB = 0xc7 - DLT_IPMB_LINUX = 0xd1 - DLT_IPNET = 0xe2 - DLT_IPOIB = 0xf2 - DLT_IPV4 = 0xe4 - DLT_IPV6 = 0xe5 - DLT_IP_OVER_FC = 0x7a - DLT_JUNIPER_ATM1 = 0x89 - DLT_JUNIPER_ATM2 = 0x87 - DLT_JUNIPER_ATM_CEMIC = 0xee - DLT_JUNIPER_CHDLC = 0xb5 - DLT_JUNIPER_ES = 0x84 - DLT_JUNIPER_ETHER = 0xb2 - DLT_JUNIPER_FIBRECHANNEL = 0xea - DLT_JUNIPER_FRELAY = 0xb4 - DLT_JUNIPER_GGSN = 0x85 - DLT_JUNIPER_ISM = 0xc2 - DLT_JUNIPER_MFR = 0x86 - DLT_JUNIPER_MLFR = 0x83 - DLT_JUNIPER_MLPPP = 0x82 - DLT_JUNIPER_MONITOR = 0xa4 - DLT_JUNIPER_PIC_PEER = 0xae - DLT_JUNIPER_PPP = 0xb3 - DLT_JUNIPER_PPPOE = 0xa7 - DLT_JUNIPER_PPPOE_ATM = 0xa8 - DLT_JUNIPER_SERVICES = 0x88 - DLT_JUNIPER_SRX_E2E = 0xe9 - DLT_JUNIPER_ST = 0xc8 - DLT_JUNIPER_VP = 0xb7 - DLT_JUNIPER_VS = 0xe8 - DLT_LAPB_WITH_DIR = 0xcf - DLT_LAPD = 0xcb - DLT_LIN = 0xd4 - DLT_LINUX_EVDEV = 0xd8 - DLT_LINUX_IRDA = 0x90 - DLT_LINUX_LAPD = 0xb1 - DLT_LINUX_PPP_WITHDIRECTION = 0xa6 - DLT_LINUX_SLL = 0x71 - DLT_LOOP = 0x6c - DLT_LTALK = 0x72 - DLT_MATCHING_MAX = 0xf6 - DLT_MATCHING_MIN = 0x68 - DLT_MFR = 0xb6 - DLT_MOST = 0xd3 - DLT_MPEG_2_TS = 0xf3 - DLT_MPLS = 0xdb - DLT_MTP2 = 0x8c - DLT_MTP2_WITH_PHDR = 0x8b - DLT_MTP3 = 0x8d - DLT_MUX27010 = 0xec - DLT_NETANALYZER = 0xf0 - DLT_NETANALYZER_TRANSPARENT = 0xf1 - DLT_NFC_LLCP = 0xf5 - DLT_NFLOG = 0xef - DLT_NG40 = 0xf4 - DLT_NULL = 0x0 - DLT_PCI_EXP = 0x7d - DLT_PFLOG = 0x75 - DLT_PFSYNC = 0x79 - DLT_PPI = 0xc0 - DLT_PPP = 0x9 - DLT_PPP_BSDOS = 0x10 - DLT_PPP_ETHER = 0x33 - DLT_PPP_PPPD = 0xa6 - DLT_PPP_SERIAL = 0x32 - DLT_PPP_WITH_DIR = 0xcc - DLT_PPP_WITH_DIRECTION = 0xa6 - DLT_PRISM_HEADER = 0x77 - DLT_PRONET = 0x4 - DLT_RAIF1 = 0xc6 - DLT_RAW = 0xc - DLT_RIO = 0x7c - DLT_SCCP = 0x8e - DLT_SITA = 0xc4 - DLT_SLIP = 0x8 - DLT_SLIP_BSDOS = 0xf - DLT_STANAG_5066_D_PDU = 0xed - DLT_SUNATM = 0x7b - DLT_SYMANTEC_FIREWALL = 0x63 - DLT_TZSP = 0x80 - DLT_USB = 0xba - DLT_USB_LINUX = 0xbd - DLT_USB_LINUX_MMAPPED = 0xdc - DLT_USER0 = 0x93 - DLT_USER1 = 0x94 - DLT_USER10 = 0x9d - DLT_USER11 = 0x9e - DLT_USER12 = 0x9f - DLT_USER13 = 0xa0 - DLT_USER14 = 0xa1 - DLT_USER15 = 0xa2 - DLT_USER2 = 0x95 - DLT_USER3 = 0x96 - DLT_USER4 = 0x97 - DLT_USER5 = 0x98 - DLT_USER6 = 0x99 - DLT_USER7 = 0x9a - DLT_USER8 = 0x9b - DLT_USER9 = 0x9c - DLT_WIHART = 0xdf - DLT_X2E_SERIAL = 0xd5 - DLT_X2E_XORAYA = 0xd6 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - EVFILT_AIO = -0x3 - EVFILT_FS = -0x9 - EVFILT_LIO = -0xa - EVFILT_PROC = -0x5 - EVFILT_READ = -0x1 - EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0xb - EVFILT_TIMER = -0x7 - EVFILT_USER = -0xb - EVFILT_VNODE = -0x4 - EVFILT_WRITE = -0x2 - EV_ADD = 0x1 - EV_CLEAR = 0x20 - EV_DELETE = 0x2 - EV_DISABLE = 0x8 - EV_DISPATCH = 0x80 - EV_DROP = 0x1000 - EV_ENABLE = 0x4 - EV_EOF = 0x8000 - EV_ERROR = 0x4000 - EV_FLAG1 = 0x2000 - EV_ONESHOT = 0x10 - EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 - EXTA = 0x4b00 - EXTATTR_NAMESPACE_EMPTY = 0x0 - EXTATTR_NAMESPACE_SYSTEM = 0x2 - EXTATTR_NAMESPACE_USER = 0x1 - EXTB = 0x9600 - EXTPROC = 0x800 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FLUSHO = 0x800000 - F_CANCEL = 0x5 - F_DUP2FD = 0xa - F_DUP2FD_CLOEXEC = 0x12 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x11 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLK = 0xb - F_GETOWN = 0x5 - F_OGETLK = 0x7 - F_OK = 0x0 - F_OSETLK = 0x8 - F_OSETLKW = 0x9 - F_RDAHEAD = 0x10 - F_RDLCK = 0x1 - F_READAHEAD = 0xf - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLK = 0xc - F_SETLKW = 0xd - F_SETLK_REMOTE = 0xe - F_SETOWN = 0x6 - F_UNLCK = 0x2 - F_UNLCKSYS = 0x4 - F_WRLCK = 0x3 - HUPCL = 0x4000 - ICANON = 0x100 - ICMP6_FILTER = 0x12 - ICRNL = 0x100 - IEXTEN = 0x400 - IFAN_ARRIVAL = 0x0 - IFAN_DEPARTURE = 0x1 - IFF_ALLMULTI = 0x200 - IFF_ALTPHYS = 0x4000 - IFF_BROADCAST = 0x2 - IFF_CANTCHANGE = 0x218f72 - IFF_CANTCONFIG = 0x10000 - IFF_DEBUG = 0x4 - IFF_DRV_OACTIVE = 0x400 - IFF_DRV_RUNNING = 0x40 - IFF_DYING = 0x200000 - IFF_LINK0 = 0x1000 - IFF_LINK1 = 0x2000 - IFF_LINK2 = 0x4000 - IFF_LOOPBACK = 0x8 - IFF_MONITOR = 0x40000 - IFF_MULTICAST = 0x8000 - IFF_NOARP = 0x80 - IFF_OACTIVE = 0x400 - IFF_POINTOPOINT = 0x10 - IFF_PPROMISC = 0x20000 - IFF_PROMISC = 0x100 - IFF_RENAMING = 0x400000 - IFF_RUNNING = 0x40 - IFF_SIMPLEX = 0x800 - IFF_SMART = 0x20 - IFF_STATICARP = 0x80000 - IFF_UP = 0x1 - IFNAMSIZ = 0x10 - IFT_1822 = 0x2 - IFT_A12MPPSWITCH = 0x82 - IFT_AAL2 = 0xbb - IFT_AAL5 = 0x31 - IFT_ADSL = 0x5e - IFT_AFLANE8023 = 0x3b - IFT_AFLANE8025 = 0x3c - IFT_ARAP = 0x58 - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ASYNC = 0x54 - IFT_ATM = 0x25 - IFT_ATMDXI = 0x69 - IFT_ATMFUNI = 0x6a - IFT_ATMIMA = 0x6b - IFT_ATMLOGICAL = 0x50 - IFT_ATMRADIO = 0xbd - IFT_ATMSUBINTERFACE = 0x86 - IFT_ATMVCIENDPT = 0xc2 - IFT_ATMVIRTUAL = 0x95 - IFT_BGPPOLICYACCOUNTING = 0xa2 - IFT_BRIDGE = 0xd1 - IFT_BSC = 0x53 - IFT_CARP = 0xf8 - IFT_CCTEMUL = 0x3d - IFT_CEPT = 0x13 - IFT_CES = 0x85 - IFT_CHANNEL = 0x46 - IFT_CNR = 0x55 - IFT_COFFEE = 0x84 - IFT_COMPOSITELINK = 0x9b - IFT_DCN = 0x8d - IFT_DIGITALPOWERLINE = 0x8a - IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba - IFT_DLSW = 0x4a - IFT_DOCSCABLEDOWNSTREAM = 0x80 - IFT_DOCSCABLEMACLAYER = 0x7f - IFT_DOCSCABLEUPSTREAM = 0x81 - IFT_DS0 = 0x51 - IFT_DS0BUNDLE = 0x52 - IFT_DS1FDL = 0xaa - IFT_DS3 = 0x1e - IFT_DTM = 0x8c - IFT_DVBASILN = 0xac - IFT_DVBASIOUT = 0xad - IFT_DVBRCCDOWNSTREAM = 0x93 - IFT_DVBRCCMACLAYER = 0x92 - IFT_DVBRCCUPSTREAM = 0x94 - IFT_ENC = 0xf4 - IFT_EON = 0x19 - IFT_EPLRS = 0x57 - IFT_ESCON = 0x49 - IFT_ETHER = 0x6 - IFT_FAITH = 0xf2 - IFT_FAST = 0x7d - IFT_FASTETHER = 0x3e - IFT_FASTETHERFX = 0x45 - IFT_FDDI = 0xf - IFT_FIBRECHANNEL = 0x38 - IFT_FRAMERELAYINTERCONNECT = 0x3a - IFT_FRAMERELAYMPI = 0x5c - IFT_FRDLCIENDPT = 0xc1 - IFT_FRELAY = 0x20 - IFT_FRELAYDCE = 0x2c - IFT_FRF16MFRBUNDLE = 0xa3 - IFT_FRFORWARD = 0x9e - IFT_G703AT2MB = 0x43 - IFT_G703AT64K = 0x42 - IFT_GIF = 0xf0 - IFT_GIGABITETHERNET = 0x75 - IFT_GR303IDT = 0xb2 - IFT_GR303RDT = 0xb1 - IFT_H323GATEKEEPER = 0xa4 - IFT_H323PROXY = 0xa5 - IFT_HDH1822 = 0x3 - IFT_HDLC = 0x76 - IFT_HDSL2 = 0xa8 - IFT_HIPERLAN2 = 0xb7 - IFT_HIPPI = 0x2f - IFT_HIPPIINTERFACE = 0x39 - IFT_HOSTPAD = 0x5a - IFT_HSSI = 0x2e - IFT_HY = 0xe - IFT_IBM370PARCHAN = 0x48 - IFT_IDSL = 0x9a - IFT_IEEE1394 = 0x90 - IFT_IEEE80211 = 0x47 - IFT_IEEE80212 = 0x37 - IFT_IEEE8023ADLAG = 0xa1 - IFT_IFGSN = 0x91 - IFT_IMT = 0xbe - IFT_INFINIBAND = 0xc7 - IFT_INTERLEAVE = 0x7c - IFT_IP = 0x7e - IFT_IPFORWARD = 0x8e - IFT_IPOVERATM = 0x72 - IFT_IPOVERCDLC = 0x6d - IFT_IPOVERCLAW = 0x6e - IFT_IPSWITCH = 0x4e - IFT_IPXIP = 0xf9 - IFT_ISDN = 0x3f - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_ISDNS = 0x4b - IFT_ISDNU = 0x4c - IFT_ISO88022LLC = 0x29 - IFT_ISO88023 = 0x7 - IFT_ISO88024 = 0x8 - IFT_ISO88025 = 0x9 - IFT_ISO88025CRFPINT = 0x62 - IFT_ISO88025DTR = 0x56 - IFT_ISO88025FIBER = 0x73 - IFT_ISO88026 = 0xa - IFT_ISUP = 0xb3 - IFT_L2VLAN = 0x87 - IFT_L3IPVLAN = 0x88 - IFT_L3IPXVLAN = 0x89 - IFT_LAPB = 0x10 - IFT_LAPD = 0x4d - IFT_LAPF = 0x77 - IFT_LOCALTALK = 0x2a - IFT_LOOP = 0x18 - IFT_MEDIAMAILOVERIP = 0x8b - IFT_MFSIGLINK = 0xa7 - IFT_MIOX25 = 0x26 - IFT_MODEM = 0x30 - IFT_MPC = 0x71 - IFT_MPLS = 0xa6 - IFT_MPLSTUNNEL = 0x96 - IFT_MSDSL = 0x8f - IFT_MVL = 0xbf - IFT_MYRINET = 0x63 - IFT_NFAS = 0xaf - IFT_NSIP = 0x1b - IFT_OPTICALCHANNEL = 0xc3 - IFT_OPTICALTRANSPORT = 0xc4 - IFT_OTHER = 0x1 - IFT_P10 = 0xc - IFT_P80 = 0xd - IFT_PARA = 0x22 - IFT_PFLOG = 0xf6 - IFT_PFSYNC = 0xf7 - IFT_PLC = 0xae - IFT_POS = 0xab - IFT_PPP = 0x17 - IFT_PPPMULTILINKBUNDLE = 0x6c - IFT_PROPBWAP2MP = 0xb8 - IFT_PROPCNLS = 0x59 - IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 - IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 - IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 - IFT_PROPMUX = 0x36 - IFT_PROPVIRTUAL = 0x35 - IFT_PROPWIRELESSP2P = 0x9d - IFT_PTPSERIAL = 0x16 - IFT_PVC = 0xf1 - IFT_QLLC = 0x44 - IFT_RADIOMAC = 0xbc - IFT_RADSL = 0x5f - IFT_REACHDSL = 0xc0 - IFT_RFC1483 = 0x9f - IFT_RS232 = 0x21 - IFT_RSRB = 0x4f - IFT_SDLC = 0x11 - IFT_SDSL = 0x60 - IFT_SHDSL = 0xa9 - IFT_SIP = 0x1f - IFT_SLIP = 0x1c - IFT_SMDSDXI = 0x2b - IFT_SMDSICIP = 0x34 - IFT_SONET = 0x27 - IFT_SONETOVERHEADCHANNEL = 0xb9 - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SRP = 0x97 - IFT_SS7SIGLINK = 0x9c - IFT_STACKTOSTACK = 0x6f - IFT_STARLAN = 0xb - IFT_STF = 0xd7 - IFT_T1 = 0x12 - IFT_TDLC = 0x74 - IFT_TERMPAD = 0x5b - IFT_TR008 = 0xb0 - IFT_TRANSPHDLC = 0x7b - IFT_TUNNEL = 0x83 - IFT_ULTRA = 0x1d - IFT_USB = 0xa0 - IFT_V11 = 0x40 - IFT_V35 = 0x2d - IFT_V36 = 0x41 - IFT_V37 = 0x78 - IFT_VDSL = 0x61 - IFT_VIRTUALIPADDRESS = 0x70 - IFT_VOICEEM = 0x64 - IFT_VOICEENCAP = 0x67 - IFT_VOICEFXO = 0x65 - IFT_VOICEFXS = 0x66 - IFT_VOICEOVERATM = 0x98 - IFT_VOICEOVERFRAMERELAY = 0x99 - IFT_VOICEOVERIP = 0x68 - IFT_X213 = 0x5d - IFT_X25 = 0x5 - IFT_X25DDN = 0x4 - IFT_X25HUNTGROUP = 0x7a - IFT_X25MLP = 0x79 - IFT_X25PLE = 0x28 - IFT_XETHER = 0x1a - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLASSD_HOST = 0xfffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 0x1c - IN_LOOPBACKNET = 0x7f - IN_RFC3021_MASK = 0xfffffffe - IPPROTO_3PC = 0x22 - IPPROTO_ADFS = 0x44 - IPPROTO_AH = 0x33 - IPPROTO_AHIP = 0x3d - IPPROTO_APES = 0x63 - IPPROTO_ARGUS = 0xd - IPPROTO_AX25 = 0x5d - IPPROTO_BHA = 0x31 - IPPROTO_BLT = 0x1e - IPPROTO_BRSATMON = 0x4c - IPPROTO_CARP = 0x70 - IPPROTO_CFTP = 0x3e - IPPROTO_CHAOS = 0x10 - IPPROTO_CMTP = 0x26 - IPPROTO_CPHB = 0x49 - IPPROTO_CPNX = 0x48 - IPPROTO_DDP = 0x25 - IPPROTO_DGP = 0x56 - IPPROTO_DIVERT = 0x102 - IPPROTO_DONE = 0x101 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_EMCON = 0xe - IPPROTO_ENCAP = 0x62 - IPPROTO_EON = 0x50 - IPPROTO_ESP = 0x32 - IPPROTO_ETHERIP = 0x61 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GGP = 0x3 - IPPROTO_GMTP = 0x64 - IPPROTO_GRE = 0x2f - IPPROTO_HELLO = 0x3f - IPPROTO_HIP = 0x8b - IPPROTO_HMP = 0x14 - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IDPR = 0x23 - IPPROTO_IDRP = 0x2d - IPPROTO_IGMP = 0x2 - IPPROTO_IGP = 0x55 - IPPROTO_IGRP = 0x58 - IPPROTO_IL = 0x28 - IPPROTO_INLSP = 0x34 - IPPROTO_INP = 0x20 - IPPROTO_IP = 0x0 - IPPROTO_IPCOMP = 0x6c - IPPROTO_IPCV = 0x47 - IPPROTO_IPEIP = 0x5e - IPPROTO_IPIP = 0x4 - IPPROTO_IPPC = 0x43 - IPPROTO_IPV4 = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_IRTP = 0x1c - IPPROTO_KRYPTOLAN = 0x41 - IPPROTO_LARP = 0x5b - IPPROTO_LEAF1 = 0x19 - IPPROTO_LEAF2 = 0x1a - IPPROTO_MAX = 0x100 - IPPROTO_MAXID = 0x34 - IPPROTO_MEAS = 0x13 - IPPROTO_MH = 0x87 - IPPROTO_MHRP = 0x30 - IPPROTO_MICP = 0x5f - IPPROTO_MOBILE = 0x37 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_MUX = 0x12 - IPPROTO_ND = 0x4d - IPPROTO_NHRP = 0x36 - IPPROTO_NONE = 0x3b - IPPROTO_NSP = 0x1f - IPPROTO_NVPII = 0xb - IPPROTO_OLD_DIVERT = 0xfe - IPPROTO_OSPFIGP = 0x59 - IPPROTO_PFSYNC = 0xf0 - IPPROTO_PGM = 0x71 - IPPROTO_PIGP = 0x9 - IPPROTO_PIM = 0x67 - IPPROTO_PRM = 0x15 - IPPROTO_PUP = 0xc - IPPROTO_PVP = 0x4b - IPPROTO_RAW = 0xff - IPPROTO_RCCMON = 0xa - IPPROTO_RDP = 0x1b - IPPROTO_RESERVED_253 = 0xfd - IPPROTO_RESERVED_254 = 0xfe - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_RVD = 0x42 - IPPROTO_SATEXPAK = 0x40 - IPPROTO_SATMON = 0x45 - IPPROTO_SCCSP = 0x60 - IPPROTO_SCTP = 0x84 - IPPROTO_SDRP = 0x2a - IPPROTO_SEND = 0x103 - IPPROTO_SEP = 0x21 - IPPROTO_SHIM6 = 0x8c - IPPROTO_SKIP = 0x39 - IPPROTO_SPACER = 0x7fff - IPPROTO_SRPC = 0x5a - IPPROTO_ST = 0x7 - IPPROTO_SVMTP = 0x52 - IPPROTO_SWIPE = 0x35 - IPPROTO_TCF = 0x57 - IPPROTO_TCP = 0x6 - IPPROTO_TLSP = 0x38 - IPPROTO_TP = 0x1d - IPPROTO_TPXX = 0x27 - IPPROTO_TRUNK1 = 0x17 - IPPROTO_TRUNK2 = 0x18 - IPPROTO_TTP = 0x54 - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPPROTO_VINES = 0x53 - IPPROTO_VISA = 0x46 - IPPROTO_VMTP = 0x51 - IPPROTO_WBEXPAK = 0x4f - IPPROTO_WBMON = 0x4e - IPPROTO_WSN = 0x4a - IPPROTO_XNET = 0xf - IPPROTO_XTP = 0x24 - IPV6_AUTOFLOWLABEL = 0x3b - IPV6_BINDANY = 0x40 - IPV6_BINDV6ONLY = 0x1b - IPV6_CHECKSUM = 0x1a - IPV6_DEFAULT_MULTICAST_HOPS = 0x1 - IPV6_DEFAULT_MULTICAST_LOOP = 0x1 - IPV6_DEFHLIM = 0x40 - IPV6_DONTFRAG = 0x3e - IPV6_DSTOPTS = 0x32 - IPV6_FAITH = 0x1d - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - IPV6_FRAGTTL = 0x78 - IPV6_FW_ADD = 0x1e - IPV6_FW_DEL = 0x1f - IPV6_FW_FLUSH = 0x20 - IPV6_FW_GET = 0x22 - IPV6_FW_ZERO = 0x21 - IPV6_HLIMDEC = 0x1 - IPV6_HOPLIMIT = 0x2f - IPV6_HOPOPTS = 0x31 - IPV6_IPSEC_POLICY = 0x1c - IPV6_JOIN_GROUP = 0xc - IPV6_LEAVE_GROUP = 0xd - IPV6_MAXHLIM = 0xff - IPV6_MAXOPTHDR = 0x800 - IPV6_MAXPACKET = 0xffff - IPV6_MAX_GROUP_SRC_FILTER = 0x200 - IPV6_MAX_MEMBERSHIPS = 0xfff - IPV6_MAX_SOCK_SRC_FILTER = 0x80 - IPV6_MIN_MEMBERSHIPS = 0x1f - IPV6_MMTU = 0x500 - IPV6_MSFILTER = 0x4a - IPV6_MULTICAST_HOPS = 0xa - IPV6_MULTICAST_IF = 0x9 - IPV6_MULTICAST_LOOP = 0xb - IPV6_NEXTHOP = 0x30 - IPV6_PATHMTU = 0x2c - IPV6_PKTINFO = 0x2e - IPV6_PORTRANGE = 0xe - IPV6_PORTRANGE_DEFAULT = 0x0 - IPV6_PORTRANGE_HIGH = 0x1 - IPV6_PORTRANGE_LOW = 0x2 - IPV6_PREFER_TEMPADDR = 0x3f - IPV6_RECVDSTOPTS = 0x28 - IPV6_RECVHOPLIMIT = 0x25 - IPV6_RECVHOPOPTS = 0x27 - IPV6_RECVPATHMTU = 0x2b - IPV6_RECVPKTINFO = 0x24 - IPV6_RECVRTHDR = 0x26 - IPV6_RECVTCLASS = 0x39 - IPV6_RTHDR = 0x33 - IPV6_RTHDRDSTOPTS = 0x23 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_SOCKOPT_RESERVED1 = 0x3 - IPV6_TCLASS = 0x3d - IPV6_UNICAST_HOPS = 0x4 - IPV6_USE_MIN_MTU = 0x2a - IPV6_V6ONLY = 0x1b - IPV6_VERSION = 0x60 - IPV6_VERSION_MASK = 0xf0 - IP_ADD_MEMBERSHIP = 0xc - IP_ADD_SOURCE_MEMBERSHIP = 0x46 - IP_BINDANY = 0x18 - IP_BLOCK_SOURCE = 0x48 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DONTFRAG = 0x43 - IP_DROP_MEMBERSHIP = 0xd - IP_DROP_SOURCE_MEMBERSHIP = 0x47 - IP_DUMMYNET3 = 0x31 - IP_DUMMYNET_CONFIGURE = 0x3c - IP_DUMMYNET_DEL = 0x3d - IP_DUMMYNET_FLUSH = 0x3e - IP_DUMMYNET_GET = 0x40 - IP_FAITH = 0x16 - IP_FW3 = 0x30 - IP_FW_ADD = 0x32 - IP_FW_DEL = 0x33 - IP_FW_FLUSH = 0x34 - IP_FW_GET = 0x36 - IP_FW_NAT_CFG = 0x38 - IP_FW_NAT_DEL = 0x39 - IP_FW_NAT_GET_CONFIG = 0x3a - IP_FW_NAT_GET_LOG = 0x3b - IP_FW_RESETLOG = 0x37 - IP_FW_TABLE_ADD = 0x28 - IP_FW_TABLE_DEL = 0x29 - IP_FW_TABLE_FLUSH = 0x2a - IP_FW_TABLE_GETSIZE = 0x2b - IP_FW_TABLE_LIST = 0x2c - IP_FW_ZERO = 0x35 - IP_HDRINCL = 0x2 - IP_IPSEC_POLICY = 0x15 - IP_MAXPACKET = 0xffff - IP_MAX_GROUP_SRC_FILTER = 0x200 - IP_MAX_MEMBERSHIPS = 0xfff - IP_MAX_SOCK_MUTE_FILTER = 0x80 - IP_MAX_SOCK_SRC_FILTER = 0x80 - IP_MAX_SOURCE_FILTER = 0x400 - IP_MF = 0x2000 - IP_MINTTL = 0x42 - IP_MIN_MEMBERSHIPS = 0x1f - IP_MSFILTER = 0x4a - IP_MSS = 0x240 - IP_MULTICAST_IF = 0x9 - IP_MULTICAST_LOOP = 0xb - IP_MULTICAST_TTL = 0xa - IP_MULTICAST_VIF = 0xe - IP_OFFMASK = 0x1fff - IP_ONESBCAST = 0x17 - IP_OPTIONS = 0x1 - IP_PORTRANGE = 0x13 - IP_PORTRANGE_DEFAULT = 0x0 - IP_PORTRANGE_HIGH = 0x1 - IP_PORTRANGE_LOW = 0x2 - IP_RECVDSTADDR = 0x7 - IP_RECVIF = 0x14 - IP_RECVOPTS = 0x5 - IP_RECVRETOPTS = 0x6 - IP_RECVTOS = 0x44 - IP_RECVTTL = 0x41 - IP_RETOPTS = 0x8 - IP_RF = 0x8000 - IP_RSVP_OFF = 0x10 - IP_RSVP_ON = 0xf - IP_RSVP_VIF_OFF = 0x12 - IP_RSVP_VIF_ON = 0x11 - IP_SENDSRCADDR = 0x7 - IP_TOS = 0x3 - IP_TTL = 0x4 - IP_UNBLOCK_SOURCE = 0x49 - ISIG = 0x80 - ISTRIP = 0x20 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - MADV_AUTOSYNC = 0x7 - MADV_CORE = 0x9 - MADV_DONTNEED = 0x4 - MADV_FREE = 0x5 - MADV_NOCORE = 0x8 - MADV_NORMAL = 0x0 - MADV_NOSYNC = 0x6 - MADV_PROTECT = 0xa - MADV_RANDOM = 0x1 - MADV_SEQUENTIAL = 0x2 - MADV_WILLNEED = 0x3 - MAP_ALIGNED_SUPER = 0x1000000 - MAP_ALIGNMENT_MASK = -0x1000000 - MAP_ALIGNMENT_SHIFT = 0x18 - MAP_ANON = 0x1000 - MAP_ANONYMOUS = 0x1000 - MAP_COPY = 0x2 - MAP_EXCL = 0x4000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_HASSEMAPHORE = 0x200 - MAP_NOCORE = 0x20000 - MAP_NORESERVE = 0x40 - MAP_NOSYNC = 0x800 - MAP_PREFAULT_READ = 0x40000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_RESERVED0080 = 0x80 - MAP_RESERVED0100 = 0x100 - MAP_SHARED = 0x1 - MAP_STACK = 0x400 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MSG_CMSG_CLOEXEC = 0x40000 - MSG_COMPAT = 0x8000 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_NBIO = 0x4000 - MSG_NOSIGNAL = 0x20000 - MSG_NOTIFICATION = 0x2000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MS_ASYNC = 0x1 - MS_INVALIDATE = 0x2 - MS_SYNC = 0x0 - NAME_MAX = 0xff - NET_RT_DUMP = 0x1 - NET_RT_FLAGS = 0x2 - NET_RT_IFLIST = 0x3 - NET_RT_IFLISTL = 0x5 - NET_RT_IFMALIST = 0x4 - NET_RT_MAXID = 0x6 - NOFLSH = 0x80000000 - NOTE_ATTRIB = 0x8 - NOTE_CHILD = 0x4 - NOTE_DELETE = 0x1 - NOTE_EXEC = 0x20000000 - NOTE_EXIT = 0x80000000 - NOTE_EXTEND = 0x4 - NOTE_FFAND = 0x40000000 - NOTE_FFCOPY = 0xc0000000 - NOTE_FFCTRLMASK = 0xc0000000 - NOTE_FFLAGSMASK = 0xffffff - NOTE_FFNOP = 0x0 - NOTE_FFOR = 0x80000000 - NOTE_FORK = 0x40000000 - NOTE_LINK = 0x10 - NOTE_LOWAT = 0x1 - NOTE_PCTRLMASK = 0xf0000000 - NOTE_PDATAMASK = 0xfffff - NOTE_RENAME = 0x20 - NOTE_REVOKE = 0x40 - NOTE_TRACK = 0x1 - NOTE_TRACKERR = 0x2 - NOTE_TRIGGER = 0x1000000 - NOTE_WRITE = 0x2 - OCRNL = 0x10 - ONLCR = 0x2 - ONLRET = 0x40 - ONOCR = 0x20 - ONOEOT = 0x8 - OPOST = 0x1 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x100000 - O_CREAT = 0x200 - O_DIRECT = 0x10000 - O_DIRECTORY = 0x20000 - O_EXCL = 0x800 - O_EXEC = 0x40000 - O_EXLOCK = 0x20 - O_FSYNC = 0x80 - O_NDELAY = 0x4 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x100 - O_NONBLOCK = 0x4 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_SHLOCK = 0x10 - O_SYNC = 0x80 - O_TRUNC = 0x400 - O_TTY_INIT = 0x80000 - O_WRONLY = 0x1 - PARENB = 0x1000 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROT_EXEC = 0x4 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - RLIMIT_AS = 0xa - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_NOFILE = 0x8 - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0x7fffffffffffffff - RTAX_AUTHOR = 0x6 - RTAX_BRD = 0x7 - RTAX_DST = 0x0 - RTAX_GATEWAY = 0x1 - RTAX_GENMASK = 0x3 - RTAX_IFA = 0x5 - RTAX_IFP = 0x4 - RTAX_MAX = 0x8 - RTAX_NETMASK = 0x2 - RTA_AUTHOR = 0x40 - RTA_BRD = 0x80 - RTA_DST = 0x1 - RTA_GATEWAY = 0x2 - RTA_GENMASK = 0x8 - RTA_IFA = 0x20 - RTA_IFP = 0x10 - RTA_NETMASK = 0x4 - RTF_BLACKHOLE = 0x1000 - RTF_BROADCAST = 0x400000 - RTF_DONE = 0x40 - RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x1004d808 - RTF_GATEWAY = 0x2 - RTF_GWFLAG_COMPAT = 0x80000000 - RTF_HOST = 0x4 - RTF_LLDATA = 0x400 - RTF_LLINFO = 0x400 - RTF_LOCAL = 0x200000 - RTF_MODIFIED = 0x20 - RTF_MULTICAST = 0x800000 - RTF_PINNED = 0x100000 - RTF_PRCLONING = 0x10000 - RTF_PROTO1 = 0x8000 - RTF_PROTO2 = 0x4000 - RTF_PROTO3 = 0x40000 - RTF_REJECT = 0x8 - RTF_RNH_LOCKED = 0x40000000 - RTF_STATIC = 0x800 - RTF_STICKY = 0x10000000 - RTF_UP = 0x1 - RTF_XRESOLVE = 0x200 - RTM_ADD = 0x1 - RTM_CHANGE = 0x3 - RTM_DELADDR = 0xd - RTM_DELETE = 0x2 - RTM_DELMADDR = 0x10 - RTM_GET = 0x4 - RTM_IEEE80211 = 0x12 - RTM_IFANNOUNCE = 0x11 - RTM_IFINFO = 0xe - RTM_LOCK = 0x8 - RTM_LOSING = 0x5 - RTM_MISS = 0x7 - RTM_NEWADDR = 0xc - RTM_NEWMADDR = 0xf - RTM_OLDADD = 0x9 - RTM_OLDDEL = 0xa - RTM_REDIRECT = 0x6 - RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 - RTM_VERSION = 0x5 - RTV_EXPIRE = 0x4 - RTV_HOPCOUNT = 0x2 - RTV_MTU = 0x1 - RTV_RPIPE = 0x8 - RTV_RTT = 0x40 - RTV_RTTVAR = 0x80 - RTV_SPIPE = 0x10 - RTV_SSTHRESH = 0x20 - RTV_WEIGHT = 0x100 - RT_ALL_FIBS = -0x1 - RT_CACHING_CONTEXT = 0x1 - RT_DEFAULT_FIB = 0x0 - RT_NORTREF = 0x2 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_BINTIME = 0x4 - SCM_CREDS = 0x3 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x2 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDMULTI = 0x80206931 - SIOCADDRT = 0x8030720a - SIOCAIFADDR = 0x8040691a - SIOCAIFGROUP = 0x80246987 - SIOCALIFADDR = 0x8118691b - SIOCATMARK = 0x40047307 - SIOCDELMULTI = 0x80206932 - SIOCDELRT = 0x8030720b - SIOCDIFADDR = 0x80206919 - SIOCDIFGROUP = 0x80246989 - SIOCDIFPHYADDR = 0x80206949 - SIOCDLIFADDR = 0x8118691d - SIOCGDRVSPEC = 0xc01c697b - SIOCGETSGCNT = 0xc0147210 - SIOCGETVIFCNT = 0xc014720f - SIOCGHIWAT = 0x40047301 - SIOCGIFADDR = 0xc0206921 - SIOCGIFBRDADDR = 0xc0206923 - SIOCGIFCAP = 0xc020691f - SIOCGIFCONF = 0xc0086924 - SIOCGIFDESCR = 0xc020692a - SIOCGIFDSTADDR = 0xc0206922 - SIOCGIFFIB = 0xc020695c - SIOCGIFFLAGS = 0xc0206911 - SIOCGIFGENERIC = 0xc020693a - SIOCGIFGMEMB = 0xc024698a - SIOCGIFGROUP = 0xc0246988 - SIOCGIFINDEX = 0xc0206920 - SIOCGIFMAC = 0xc0206926 - SIOCGIFMEDIA = 0xc0286938 - SIOCGIFMETRIC = 0xc0206917 - SIOCGIFMTU = 0xc0206933 - SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206948 - SIOCGIFPHYS = 0xc0206935 - SIOCGIFPSRCADDR = 0xc0206947 - SIOCGIFSTATUS = 0xc331693b - SIOCGLIFADDR = 0xc118691c - SIOCGLIFPHYADDR = 0xc118694b - SIOCGLOWAT = 0x40047303 - SIOCGPGRP = 0x40047309 - SIOCGPRIVATE_0 = 0xc0206950 - SIOCGPRIVATE_1 = 0xc0206951 - SIOCIFCREATE = 0xc020697a - SIOCIFCREATE2 = 0xc020697c - SIOCIFDESTROY = 0x80206979 - SIOCIFGCLONERS = 0xc00c6978 - SIOCSDRVSPEC = 0x801c697b - SIOCSHIWAT = 0x80047300 - SIOCSIFADDR = 0x8020690c - SIOCSIFBRDADDR = 0x80206913 - SIOCSIFCAP = 0x8020691e - SIOCSIFDESCR = 0x80206929 - SIOCSIFDSTADDR = 0x8020690e - SIOCSIFFIB = 0x8020695d - SIOCSIFFLAGS = 0x80206910 - SIOCSIFGENERIC = 0x80206939 - SIOCSIFLLADDR = 0x8020693c - SIOCSIFMAC = 0x80206927 - SIOCSIFMEDIA = 0xc0206937 - SIOCSIFMETRIC = 0x80206918 - SIOCSIFMTU = 0x80206934 - SIOCSIFNAME = 0x80206928 - SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x80406946 - SIOCSIFPHYS = 0x80206936 - SIOCSIFRVNET = 0xc020695b - SIOCSIFVNET = 0xc020695a - SIOCSLIFPHYADDR = 0x8118694a - SIOCSLOWAT = 0x80047302 - SIOCSPGRP = 0x80047308 - SOCK_CLOEXEC = 0x10000000 - SOCK_DGRAM = 0x2 - SOCK_MAXADDRLEN = 0xff - SOCK_NONBLOCK = 0x20000000 - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0xffff - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x2 - SO_ACCEPTFILTER = 0x1000 - SO_BINTIME = 0x2000 - SO_BROADCAST = 0x20 - SO_DEBUG = 0x1 - SO_DONTROUTE = 0x10 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x8 - SO_LABEL = 0x1009 - SO_LINGER = 0x80 - SO_LISTENINCQLEN = 0x1013 - SO_LISTENQLEN = 0x1012 - SO_LISTENQLIMIT = 0x1011 - SO_NOSIGPIPE = 0x800 - SO_NO_DDP = 0x8000 - SO_NO_OFFLOAD = 0x4000 - SO_OOBINLINE = 0x100 - SO_PEERLABEL = 0x1010 - SO_PROTOCOL = 0x1016 - SO_PROTOTYPE = 0x1016 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_SETFIB = 0x1014 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x400 - SO_TYPE = 0x1008 - SO_USELOOPBACK = 0x40 - SO_USER_COOKIE = 0x1015 - SO_VENDOR = 0x80000000 - TCIFLUSH = 0x1 - TCIOFLUSH = 0x3 - TCOFLUSH = 0x2 - TCP_CA_NAME_MAX = 0x10 - TCP_CONGESTION = 0x40 - TCP_INFO = 0x20 - TCP_KEEPCNT = 0x400 - TCP_KEEPIDLE = 0x100 - TCP_KEEPINIT = 0x80 - TCP_KEEPINTVL = 0x200 - TCP_MAXBURST = 0x4 - TCP_MAXHLEN = 0x3c - TCP_MAXOLEN = 0x28 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_SACK = 0x4 - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0x10 - TCP_MINMSS = 0xd8 - TCP_MSS = 0x218 - TCP_NODELAY = 0x1 - TCP_NOOPT = 0x8 - TCP_NOPUSH = 0x4 - TCP_VENDOR = 0x80000000 - TCSAFLUSH = 0x2 - TIOCCBRK = 0x2000747a - TIOCCDTR = 0x20007478 - TIOCCONS = 0x80047462 - TIOCDRAIN = 0x2000745e - TIOCEXCL = 0x2000740d - TIOCEXT = 0x80047460 - TIOCFLUSH = 0x80047410 - TIOCGDRAINWAIT = 0x40047456 - TIOCGETA = 0x402c7413 - TIOCGETD = 0x4004741a - TIOCGPGRP = 0x40047477 - TIOCGPTN = 0x4004740f - TIOCGSID = 0x40047463 - TIOCGWINSZ = 0x40087468 - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGDTRWAIT = 0x4004745a - TIOCMGET = 0x4004746a - TIOCMSDTRWAIT = 0x8004745b - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DCD = 0x40 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCPTMASTER = 0x2000741c - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007461 - TIOCSDRAINWAIT = 0x80047457 - TIOCSDTR = 0x20007479 - TIOCSETA = 0x802c7414 - TIOCSETAF = 0x802c7416 - TIOCSETAW = 0x802c7415 - TIOCSETD = 0x8004741b - TIOCSIG = 0x2004745f - TIOCSPGRP = 0x80047476 - TIOCSTART = 0x2000746e - TIOCSTAT = 0x20007465 - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCTIMESTAMP = 0x40087459 - TIOCUCNTL = 0x80047466 - TOSTOP = 0x400000 - VDISCARD = 0xf - VDSUSP = 0xb - VEOF = 0x0 - VEOL = 0x1 - VEOL2 = 0x2 - VERASE = 0x3 - VERASE2 = 0x7 - VINTR = 0x8 - VKILL = 0x5 - VLNEXT = 0xe - VMIN = 0x10 - VQUIT = 0x9 - VREPRINT = 0x6 - VSTART = 0xc - VSTATUS = 0x12 - VSTOP = 0xd - VSUSP = 0xa - VTIME = 0x11 - VWERASE = 0x4 - WCONTINUED = 0x4 - WCOREFLAG = 0x80 - WEXITED = 0x10 - WLINUXCLONE = 0x80000000 - WNOHANG = 0x1 - WNOWAIT = 0x8 - WSTOPPED = 0x2 - WTRAPPED = 0x20 - WUNTRACED = 0x2 + AF_APPLETALK = 0x10 + AF_ARP = 0x23 + AF_ATM = 0x1e + AF_BLUETOOTH = 0x24 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1c + AF_INET6_SDP = 0x2a + AF_INET_SDP = 0x28 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x2a + AF_NATM = 0x1d + AF_NETBIOS = 0x6 + AF_NETGRAPH = 0x20 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SCLUSTER = 0x22 + AF_SIP = 0x18 + AF_SLOW = 0x21 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VENDOR00 = 0x27 + AF_VENDOR01 = 0x29 + AF_VENDOR02 = 0x2b + AF_VENDOR03 = 0x2d + AF_VENDOR04 = 0x2f + AF_VENDOR05 = 0x31 + AF_VENDOR06 = 0x33 + AF_VENDOR07 = 0x35 + AF_VENDOR08 = 0x37 + AF_VENDOR09 = 0x39 + AF_VENDOR10 = 0x3b + AF_VENDOR11 = 0x3d + AF_VENDOR12 = 0x3f + AF_VENDOR13 = 0x41 + AF_VENDOR14 = 0x43 + AF_VENDOR15 = 0x45 + AF_VENDOR16 = 0x47 + AF_VENDOR17 = 0x49 + AF_VENDOR18 = 0x4b + AF_VENDOR19 = 0x4d + AF_VENDOR20 = 0x4f + AF_VENDOR21 = 0x51 + AF_VENDOR22 = 0x53 + AF_VENDOR23 = 0x55 + AF_VENDOR24 = 0x57 + AF_VENDOR25 = 0x59 + AF_VENDOR26 = 0x5b + AF_VENDOR27 = 0x5d + AF_VENDOR28 = 0x5f + AF_VENDOR29 = 0x61 + AF_VENDOR30 = 0x63 + AF_VENDOR31 = 0x65 + AF_VENDOR32 = 0x67 + AF_VENDOR33 = 0x69 + AF_VENDOR34 = 0x6b + AF_VENDOR35 = 0x6d + AF_VENDOR36 = 0x6f + AF_VENDOR37 = 0x71 + AF_VENDOR38 = 0x73 + AF_VENDOR39 = 0x75 + AF_VENDOR40 = 0x77 + AF_VENDOR41 = 0x79 + AF_VENDOR42 = 0x7b + AF_VENDOR43 = 0x7d + AF_VENDOR44 = 0x7f + AF_VENDOR45 = 0x81 + AF_VENDOR46 = 0x83 + AF_VENDOR47 = 0x85 + ALTWERASE = 0x200 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B460800 = 0x70800 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B921600 = 0xe1000 + B9600 = 0x2580 + BIOCFEEDBACK = 0x8004427c + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDIRECTION = 0x40044276 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0084279 + BIOCGETBUFMODE = 0x4004427d + BIOCGETIF = 0x4020426b + BIOCGETZMAX = 0x4004427f + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4010426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCGTSTAMP = 0x40044283 + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x2000427a + BIOCPROMISC = 0x20004269 + BIOCROTZBUF = 0x400c4280 + BIOCSBLEN = 0xc0044266 + BIOCSDIRECTION = 0x80044277 + BIOCSDLT = 0x80044278 + BIOCSETBUFMODE = 0x8004427e + BIOCSETF = 0x80084267 + BIOCSETFNR = 0x80084282 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x8008427b + BIOCSETZBUF = 0x800c4281 + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8010426d + BIOCSSEESENT = 0x80044277 + BIOCSTSTAMP = 0x80044284 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_BUFMODE_BUFFER = 0x1 + BPF_BUFMODE_ZBUF = 0x2 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MOD = 0x90 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_T_BINTIME = 0x2 + BPF_T_BINTIME_FAST = 0x102 + BPF_T_BINTIME_MONOTONIC = 0x202 + BPF_T_BINTIME_MONOTONIC_FAST = 0x302 + BPF_T_FAST = 0x100 + BPF_T_FLAG_MASK = 0x300 + BPF_T_FORMAT_MASK = 0x3 + BPF_T_MICROTIME = 0x0 + BPF_T_MICROTIME_FAST = 0x100 + BPF_T_MICROTIME_MONOTONIC = 0x200 + BPF_T_MICROTIME_MONOTONIC_FAST = 0x300 + BPF_T_MONOTONIC = 0x200 + BPF_T_MONOTONIC_FAST = 0x300 + BPF_T_NANOTIME = 0x1 + BPF_T_NANOTIME_FAST = 0x101 + BPF_T_NANOTIME_MONOTONIC = 0x201 + BPF_T_NANOTIME_MONOTONIC_FAST = 0x301 + BPF_T_NONE = 0x3 + BPF_T_NORMAL = 0x0 + BPF_W = 0x0 + BPF_X = 0x8 + BPF_XOR = 0xa0 + BRKINT = 0x2 + CAP_ACCEPT = 0x200000020000000 + CAP_ACL_CHECK = 0x400000000010000 + CAP_ACL_DELETE = 0x400000000020000 + CAP_ACL_GET = 0x400000000040000 + CAP_ACL_SET = 0x400000000080000 + CAP_ALL0 = 0x20007ffffffffff + CAP_ALL1 = 0x4000000001fffff + CAP_BIND = 0x200000040000000 + CAP_BINDAT = 0x200008000000400 + CAP_CHFLAGSAT = 0x200000000001400 + CAP_CONNECT = 0x200000080000000 + CAP_CONNECTAT = 0x200010000000400 + CAP_CREATE = 0x200000000000040 + CAP_EVENT = 0x400000000000020 + CAP_EXTATTR_DELETE = 0x400000000001000 + CAP_EXTATTR_GET = 0x400000000002000 + CAP_EXTATTR_LIST = 0x400000000004000 + CAP_EXTATTR_SET = 0x400000000008000 + CAP_FCHDIR = 0x200000000000800 + CAP_FCHFLAGS = 0x200000000001000 + CAP_FCHMOD = 0x200000000002000 + CAP_FCHMODAT = 0x200000000002400 + CAP_FCHOWN = 0x200000000004000 + CAP_FCHOWNAT = 0x200000000004400 + CAP_FCNTL = 0x200000000008000 + CAP_FCNTL_ALL = 0x78 + CAP_FCNTL_GETFL = 0x8 + CAP_FCNTL_GETOWN = 0x20 + CAP_FCNTL_SETFL = 0x10 + CAP_FCNTL_SETOWN = 0x40 + CAP_FEXECVE = 0x200000000000080 + CAP_FLOCK = 0x200000000010000 + CAP_FPATHCONF = 0x200000000020000 + CAP_FSCK = 0x200000000040000 + CAP_FSTAT = 0x200000000080000 + CAP_FSTATAT = 0x200000000080400 + CAP_FSTATFS = 0x200000000100000 + CAP_FSYNC = 0x200000000000100 + CAP_FTRUNCATE = 0x200000000000200 + CAP_FUTIMES = 0x200000000200000 + CAP_FUTIMESAT = 0x200000000200400 + CAP_GETPEERNAME = 0x200000100000000 + CAP_GETSOCKNAME = 0x200000200000000 + CAP_GETSOCKOPT = 0x200000400000000 + CAP_IOCTL = 0x400000000000080 + CAP_IOCTLS_ALL = 0x7fffffff + CAP_KQUEUE = 0x400000000100040 + CAP_KQUEUE_CHANGE = 0x400000000100000 + CAP_KQUEUE_EVENT = 0x400000000000040 + CAP_LINKAT_SOURCE = 0x200020000000400 + CAP_LINKAT_TARGET = 0x200000000400400 + CAP_LISTEN = 0x200000800000000 + CAP_LOOKUP = 0x200000000000400 + CAP_MAC_GET = 0x400000000000001 + CAP_MAC_SET = 0x400000000000002 + CAP_MKDIRAT = 0x200000000800400 + CAP_MKFIFOAT = 0x200000001000400 + CAP_MKNODAT = 0x200000002000400 + CAP_MMAP = 0x200000000000010 + CAP_MMAP_R = 0x20000000000001d + CAP_MMAP_RW = 0x20000000000001f + CAP_MMAP_RWX = 0x20000000000003f + CAP_MMAP_RX = 0x20000000000003d + CAP_MMAP_W = 0x20000000000001e + CAP_MMAP_WX = 0x20000000000003e + CAP_MMAP_X = 0x20000000000003c + CAP_PDGETPID = 0x400000000000200 + CAP_PDKILL = 0x400000000000800 + CAP_PDWAIT = 0x400000000000400 + CAP_PEELOFF = 0x200001000000000 + CAP_POLL_EVENT = 0x400000000000020 + CAP_PREAD = 0x20000000000000d + CAP_PWRITE = 0x20000000000000e + CAP_READ = 0x200000000000001 + CAP_RECV = 0x200000000000001 + CAP_RENAMEAT_SOURCE = 0x200000004000400 + CAP_RENAMEAT_TARGET = 0x200040000000400 + CAP_RIGHTS_VERSION = 0x0 + CAP_RIGHTS_VERSION_00 = 0x0 + CAP_SEEK = 0x20000000000000c + CAP_SEEK_TELL = 0x200000000000004 + CAP_SEM_GETVALUE = 0x400000000000004 + CAP_SEM_POST = 0x400000000000008 + CAP_SEM_WAIT = 0x400000000000010 + CAP_SEND = 0x200000000000002 + CAP_SETSOCKOPT = 0x200002000000000 + CAP_SHUTDOWN = 0x200004000000000 + CAP_SOCK_CLIENT = 0x200007780000003 + CAP_SOCK_SERVER = 0x200007f60000003 + CAP_SYMLINKAT = 0x200000008000400 + CAP_TTYHOOK = 0x400000000000100 + CAP_UNLINKAT = 0x200000010000400 + CAP_UNUSED0_44 = 0x200080000000000 + CAP_UNUSED0_57 = 0x300000000000000 + CAP_UNUSED1_22 = 0x400000000200000 + CAP_UNUSED1_57 = 0x500000000000000 + CAP_WRITE = 0x200000000000002 + CFLUSH = 0xf + CLOCAL = 0x8000 + CLOCK_MONOTONIC = 0x4 + CLOCK_MONOTONIC_FAST = 0xc + CLOCK_MONOTONIC_PRECISE = 0xb + CLOCK_PROCESS_CPUTIME_ID = 0xf + CLOCK_PROF = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_FAST = 0xa + CLOCK_REALTIME_PRECISE = 0x9 + CLOCK_SECOND = 0xd + CLOCK_THREAD_CPUTIME_ID = 0xe + CLOCK_UPTIME = 0x5 + CLOCK_UPTIME_FAST = 0x8 + CLOCK_UPTIME_PRECISE = 0x7 + CLOCK_VIRTUAL = 0x1 + CREAD = 0x800 + CRTSCTS = 0x30000 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0x18 + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_BREDR_BB = 0xff + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_BLUETOOTH_LE_LL = 0xfb + DLT_BLUETOOTH_LE_LL_WITH_PHDR = 0x100 + DLT_BLUETOOTH_LINUX_MONITOR = 0xfe + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_CLASS_NETBSD_RAWAF = 0x2240000 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DBUS = 0xe7 + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_DVB_CI = 0xeb + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_EPON = 0x103 + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NOFCS = 0xe6 + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_INFINIBAND = 0xf7 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPMI_HPM_2 = 0x104 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xf2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_ISO_14443 = 0x108 + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_ATM_CEMIC = 0xee + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FIBRECHANNEL = 0xea + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_SRX_E2E = 0xe9 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_JUNIPER_VS = 0xe8 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_PPP_WITHDIRECTION = 0xa6 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MATCHING_MAX = 0x109 + DLT_MATCHING_MIN = 0x68 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPEG_2_TS = 0xf3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_MUX27010 = 0xec + DLT_NETANALYZER = 0xf0 + DLT_NETANALYZER_TRANSPARENT = 0xf1 + DLT_NETLINK = 0xfd + DLT_NFC_LLCP = 0xf5 + DLT_NFLOG = 0xef + DLT_NG40 = 0xf4 + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x79 + DLT_PKTAP = 0x102 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0xe + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PPP_WITH_DIRECTION = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PROFIBUS_DL = 0x101 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RDS = 0x109 + DLT_REDBACK_SMARTEDGE = 0x20 + DLT_RIO = 0x7c + DLT_RTAC_SERIAL = 0xfa + DLT_SCCP = 0x8e + DLT_SCTP = 0xf8 + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xd + DLT_STANAG_5066_D_PDU = 0xed + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USBPCAP = 0xf9 + DLT_USB_FREEBSD = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DLT_WATTSTOPPER_DLM = 0x107 + DLT_WIHART = 0xdf + DLT_WIRESHARK_UPPER_PDU = 0xfc + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DLT_ZWAVE_R1_R2 = 0x105 + DLT_ZWAVE_R3 = 0x106 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_LIO = -0xa + EVFILT_PROC = -0x5 + EVFILT_PROCDESC = -0x8 + EVFILT_READ = -0x1 + EVFILT_SENDFILE = -0xc + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xc + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xb + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_DROP = 0x1000 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_FLAG2 = 0x4000 + EV_FORCEONESHOT = 0x100 + EV_ONESHOT = 0x10 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTATTR_NAMESPACE_EMPTY = 0x0 + EXTATTR_NAMESPACE_SYSTEM = 0x2 + EXTATTR_NAMESPACE_USER = 0x1 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_CANCEL = 0x5 + F_DUP2FD = 0xa + F_DUP2FD_CLOEXEC = 0x12 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x11 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0xb + F_GETOWN = 0x5 + F_OGETLK = 0x7 + F_OK = 0x0 + F_OSETLK = 0x8 + F_OSETLKW = 0x9 + F_RDAHEAD = 0x10 + F_RDLCK = 0x1 + F_READAHEAD = 0xf + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0xc + F_SETLKW = 0xd + F_SETLK_REMOTE = 0xe + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_UNLCKSYS = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x218f52 + IFF_CANTCONFIG = 0x10000 + IFF_DEBUG = 0x4 + IFF_DRV_OACTIVE = 0x400 + IFF_DRV_RUNNING = 0x40 + IFF_DYING = 0x200000 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MONITOR = 0x40000 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PPROMISC = 0x20000 + IFF_PROMISC = 0x100 + IFF_RENAMING = 0x400000 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_STATICARP = 0x80000 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_BRIDGE = 0xd1 + IFT_CARP = 0xf8 + IFT_IEEE1394 = 0x90 + IFT_INFINIBAND = 0xc7 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_PPP = 0x17 + IFT_PROPVIRTUAL = 0x35 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IN_RFC3021_MASK = 0xfffffffe + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CARP = 0x70 + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0x102 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HIP = 0x8b + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MEAS = 0x13 + IPPROTO_MH = 0x87 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MOBILE = 0x37 + IPPROTO_MPLS = 0x89 + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OLD_DIVERT = 0xfe + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_RESERVED_253 = 0xfd + IPPROTO_RESERVED_254 = 0xfe + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEND = 0x103 + IPPROTO_SEP = 0x21 + IPPROTO_SHIM6 = 0x8c + IPPROTO_SKIP = 0x39 + IPPROTO_SPACER = 0x7fff + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TLSP = 0x38 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_BINDANY = 0x40 + IPV6_BINDMULTI = 0x41 + IPV6_BINDV6ONLY = 0x1b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FLOWID = 0x43 + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FLOWTYPE = 0x44 + IPV6_FRAGTTL = 0x78 + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MSFILTER = 0x4a + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_PREFER_TEMPADDR = 0x3f + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVFLOWID = 0x46 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRSSBUCKETID = 0x47 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RSSBUCKETID = 0x45 + IPV6_RSS_LISTEN_BUCKET = 0x42 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BINDANY = 0x18 + IP_BINDMULTI = 0x19 + IP_BLOCK_SOURCE = 0x48 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DONTFRAG = 0x43 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET3 = 0x31 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FLOWID = 0x5a + IP_FLOWTYPE = 0x5b + IP_FW3 = 0x30 + IP_FW_ADD = 0x32 + IP_FW_DEL = 0x33 + IP_FW_FLUSH = 0x34 + IP_FW_GET = 0x36 + IP_FW_NAT_CFG = 0x38 + IP_FW_NAT_DEL = 0x39 + IP_FW_NAT_GET_CONFIG = 0x3a + IP_FW_NAT_GET_LOG = 0x3b + IP_FW_RESETLOG = 0x37 + IP_FW_TABLE_ADD = 0x28 + IP_FW_TABLE_DEL = 0x29 + IP_FW_TABLE_FLUSH = 0x2a + IP_FW_TABLE_GETSIZE = 0x2b + IP_FW_TABLE_LIST = 0x2c + IP_FW_ZERO = 0x35 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MAX_SOURCE_FILTER = 0x400 + IP_MF = 0x2000 + IP_MINTTL = 0x42 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_OFFMASK = 0x1fff + IP_ONESBCAST = 0x17 + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVFLOWID = 0x5d + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVRSSBUCKETID = 0x5e + IP_RECVTOS = 0x44 + IP_RECVTTL = 0x41 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSSBUCKETID = 0x5c + IP_RSS_LISTEN_BUCKET = 0x1a + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_SENDSRCADDR = 0x7 + IP_TOS = 0x3 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_AUTOSYNC = 0x7 + MADV_CORE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_NOCORE = 0x8 + MADV_NORMAL = 0x0 + MADV_NOSYNC = 0x6 + MADV_PROTECT = 0xa + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MAP_ALIGNED_SUPER = 0x1000000 + MAP_ALIGNMENT_MASK = -0x1000000 + MAP_ALIGNMENT_SHIFT = 0x18 + MAP_ANON = 0x1000 + MAP_ANONYMOUS = 0x1000 + MAP_COPY = 0x2 + MAP_EXCL = 0x4000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GUARD = 0x2000 + MAP_HASSEMAPHORE = 0x200 + MAP_NOCORE = 0x20000 + MAP_NOSYNC = 0x800 + MAP_PREFAULT_READ = 0x40000 + MAP_PRIVATE = 0x2 + MAP_RESERVED0020 = 0x20 + MAP_RESERVED0040 = 0x40 + MAP_RESERVED0080 = 0x80 + MAP_RESERVED0100 = 0x100 + MAP_SHARED = 0x1 + MAP_STACK = 0x400 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CMSG_CLOEXEC = 0x40000 + MSG_COMPAT = 0x8000 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_NBIO = 0x4000 + MSG_NOSIGNAL = 0x20000 + MSG_NOTIFICATION = 0x2000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MSG_WAITFORONE = 0x80000 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x0 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLISTL = 0x5 + NET_RT_IFMALIST = 0x4 + NOFLSH = 0x80000000 + NOKERNINFO = 0x2000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_CLOSE = 0x100 + NOTE_CLOSE_WRITE = 0x200 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FILE_POLL = 0x2 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_MSECONDS = 0x2 + NOTE_NSECONDS = 0x8 + NOTE_OPEN = 0x80 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_READ = 0x400 + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_SECONDS = 0x1 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_USECONDS = 0x4 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + OXTABS = 0x4 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x100000 + O_CREAT = 0x200 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x20000 + O_EXCL = 0x800 + O_EXEC = 0x40000 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_TTY_INIT = 0x80000 + O_VERIFY = 0x200000 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_MEMLOCK = 0x6 + RLIMIT_NOFILE = 0x8 + RLIMIT_NPROC = 0x7 + RLIMIT_RSS = 0x5 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_FIXEDMTU = 0x80000 + RTF_FMASK = 0x1004d808 + RTF_GATEWAY = 0x2 + RTF_GWFLAG_COMPAT = 0x80000000 + RTF_HOST = 0x4 + RTF_LLDATA = 0x400 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_PINNED = 0x100000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_REJECT = 0x8 + RTF_RNH_LOCKED = 0x40000000 + RTF_STATIC = 0x800 + RTF_STICKY = 0x10000000 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x12 + RTM_IFANNOUNCE = 0x11 + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RTV_WEIGHT = 0x100 + RT_ALL_FIBS = -0x1 + RT_BLACKHOLE = 0x40 + RT_CACHING_CONTEXT = 0x1 + RT_DEFAULT_FIB = 0x0 + RT_HAS_GW = 0x80 + RT_HAS_HEADER = 0x10 + RT_HAS_HEADER_BIT = 0x4 + RT_L2_ME = 0x4 + RT_L2_ME_BIT = 0x2 + RT_LLE_CACHE = 0x100 + RT_MAY_LOOP = 0x8 + RT_MAY_LOOP_BIT = 0x3 + RT_NORTREF = 0x2 + RT_REJECT = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_BINTIME = 0x4 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCAIFGROUP = 0x80246987 + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFGROUP = 0x80246989 + SIOCDIFPHYADDR = 0x80206949 + SIOCGDRVSPEC = 0xc01c697b + SIOCGETSGCNT = 0xc0147210 + SIOCGETVIFCNT = 0xc014720f + SIOCGHIWAT = 0x40047301 + SIOCGHWADDR = 0xc020693e + SIOCGI2C = 0xc020693d + SIOCGIFADDR = 0xc0206921 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020691f + SIOCGIFCONF = 0xc0086924 + SIOCGIFDESCR = 0xc020692a + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFIB = 0xc020695c + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc024698a + SIOCGIFGROUP = 0xc0246988 + SIOCGIFINDEX = 0xc0206920 + SIOCGIFMAC = 0xc0206926 + SIOCGIFMEDIA = 0xc0286938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFSTATUS = 0xc331693b + SIOCGIFXMEDIA = 0xc028698b + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGPRIVATE_0 = 0xc0206950 + SIOCGPRIVATE_1 = 0xc0206951 + SIOCGTUNFIB = 0xc020695e + SIOCIFCREATE = 0xc020697a + SIOCIFCREATE2 = 0xc020697c + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc00c6978 + SIOCSDRVSPEC = 0x801c697b + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020691e + SIOCSIFDESCR = 0x80206929 + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFIB = 0x8020695d + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206927 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNAME = 0x80206928 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPHYS = 0x80206936 + SIOCSIFRVNET = 0xc020695b + SIOCSIFVNET = 0xc020695a + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SIOCSTUNFIB = 0x8020695f + SOCK_CLOEXEC = 0x10000000 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_NONBLOCK = 0x20000000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BINTIME = 0x2000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1009 + SO_LINGER = 0x80 + SO_LISTENINCQLEN = 0x1013 + SO_LISTENQLEN = 0x1012 + SO_LISTENQLIMIT = 0x1011 + SO_NOSIGPIPE = 0x800 + SO_NO_DDP = 0x8000 + SO_NO_OFFLOAD = 0x4000 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1010 + SO_PROTOCOL = 0x1016 + SO_PROTOTYPE = 0x1016 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SETFIB = 0x1014 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SO_USER_COOKIE = 0x1015 + SO_VENDOR = 0x80000000 + TAB0 = 0x0 + TAB3 = 0x4 + TABDLY = 0x4 + TCIFLUSH = 0x1 + TCIOFF = 0x3 + TCIOFLUSH = 0x3 + TCION = 0x4 + TCOFLUSH = 0x2 + TCOOFF = 0x1 + TCOON = 0x2 + TCP_CA_NAME_MAX = 0x10 + TCP_CCALGOOPT = 0x41 + TCP_CONGESTION = 0x40 + TCP_FASTOPEN = 0x401 + TCP_FUNCTION_BLK = 0x2000 + TCP_FUNCTION_NAME_LEN_MAX = 0x20 + TCP_INFO = 0x20 + TCP_KEEPCNT = 0x400 + TCP_KEEPIDLE = 0x100 + TCP_KEEPINIT = 0x80 + TCP_KEEPINTVL = 0x200 + TCP_MAXBURST = 0x4 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x10 + TCP_MINMSS = 0xd8 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_PCAP_IN = 0x1000 + TCP_PCAP_OUT = 0x800 + TCP_VENDOR = 0x80000000 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGPTN = 0x4004740f + TIOCGSID = 0x40047463 + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DCD = 0x40 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTMASTER = 0x2000741c + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2004745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40107459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VERASE2 = 0x7 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x4 + WCOREFLAG = 0x80 + WEXITED = 0x10 + WLINUXCLONE = 0x80000000 + WNOHANG = 0x1 + WNOWAIT = 0x8 + WSTOPPED = 0x2 + WTRAPPED = 0x20 + WUNTRACED = 0x2 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index a6b3b5f14..4066ad1e0 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x1000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -507,6 +512,19 @@ const ( F_ULOCK = 0x0 F_UNLCK = 0x2 F_WRLCK = 0x1 + GENL_ADMIN_PERM = 0x1 + GENL_CMD_CAP_DO = 0x2 + GENL_CMD_CAP_DUMP = 0x4 + GENL_CMD_CAP_HASPOL = 0x8 + GENL_HDRLEN = 0x4 + GENL_ID_CTRL = 0x10 + GENL_ID_PMCRAID = 0x12 + GENL_ID_VFS_DQUOT = 0x11 + GENL_MAX_ID = 0x3ff + GENL_MIN_ID = 0x10 + GENL_NAMSIZ = 0x10 + GENL_START_ALLOC = 0x13 + GENL_UNS_ADMIN_PERM = 0x10 GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 HUPCL = 0x400 @@ -644,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -658,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -674,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -689,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -732,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -769,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -902,6 +930,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -916,6 +945,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -934,6 +964,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -954,8 +985,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1012,6 +1045,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1268,7 +1302,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1312,6 +1346,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1320,6 +1355,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1341,10 +1377,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1359,8 +1396,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1371,6 +1408,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1401,6 +1439,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1539,6 +1578,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1547,11 +1587,13 @@ const ( SO_ERROR = 0x4 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa @@ -1559,6 +1601,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f SO_PRIORITY = 0xc @@ -1626,6 +1669,12 @@ const ( TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 + TASKSTATS_CMD_ATTR_MAX = 0x4 + TASKSTATS_CMD_MAX = 0x2 + TASKSTATS_GENL_NAME = "TASKSTATS" + TASKSTATS_GENL_VERSION = 0x1 + TASKSTATS_TYPE_MAX = 0x6 + TASKSTATS_VERSION = 0x8 TCFLSH = 0x540b TCGETA = 0x5405 TCGETS = 0x5401 @@ -1649,6 +1698,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1708,6 +1758,7 @@ const ( TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e TIOCGSID = 0x5429 @@ -1765,6 +1816,7 @@ const ( TIOCSWINSZ = 0x5414 TIOCVHANGUP = 0x5437 TOSTOP = 0x100 + TS_COMM_LEN = 0x20 TUNATTACHFILTER = 0x400854d5 TUNDETACHFILTER = 0x400854d6 TUNGETFEATURES = 0x800454cf @@ -1999,7 +2051,6 @@ const ( SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) - SIGUNUSED = syscall.Signal(0x1f) SIGURG = syscall.Signal(0x17) SIGUSR1 = syscall.Signal(0xa) SIGUSR2 = syscall.Signal(0xc) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index 4ffc8d29c..c9f53b0b3 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x1000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -507,6 +512,19 @@ const ( F_ULOCK = 0x0 F_UNLCK = 0x2 F_WRLCK = 0x1 + GENL_ADMIN_PERM = 0x1 + GENL_CMD_CAP_DO = 0x2 + GENL_CMD_CAP_DUMP = 0x4 + GENL_CMD_CAP_HASPOL = 0x8 + GENL_HDRLEN = 0x4 + GENL_ID_CTRL = 0x10 + GENL_ID_PMCRAID = 0x12 + GENL_ID_VFS_DQUOT = 0x11 + GENL_MAX_ID = 0x3ff + GENL_MIN_ID = 0x10 + GENL_NAMSIZ = 0x10 + GENL_START_ALLOC = 0x13 + GENL_UNS_ADMIN_PERM = 0x10 GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 HUPCL = 0x400 @@ -644,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -658,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -674,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -689,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -732,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -769,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -902,6 +930,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -916,6 +945,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -934,6 +964,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -954,8 +985,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1012,6 +1045,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1269,7 +1303,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1313,6 +1347,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1321,6 +1356,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1342,10 +1378,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1360,8 +1397,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1372,6 +1409,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1402,6 +1440,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1540,6 +1579,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1548,11 +1588,13 @@ const ( SO_ERROR = 0x4 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa @@ -1560,6 +1602,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f SO_PRIORITY = 0xc @@ -1627,6 +1670,12 @@ const ( TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 + TASKSTATS_CMD_ATTR_MAX = 0x4 + TASKSTATS_CMD_MAX = 0x2 + TASKSTATS_GENL_NAME = "TASKSTATS" + TASKSTATS_GENL_VERSION = 0x1 + TASKSTATS_TYPE_MAX = 0x6 + TASKSTATS_VERSION = 0x8 TCFLSH = 0x540b TCGETA = 0x5405 TCGETS = 0x5401 @@ -1650,6 +1699,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1709,6 +1759,7 @@ const ( TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e TIOCGSID = 0x5429 @@ -1766,6 +1817,7 @@ const ( TIOCSWINSZ = 0x5414 TIOCVHANGUP = 0x5437 TOSTOP = 0x100 + TS_COMM_LEN = 0x20 TUNATTACHFILTER = 0x401054d5 TUNDETACHFILTER = 0x401054d6 TUNGETFEATURES = 0x800454cf @@ -2000,7 +2052,6 @@ const ( SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) - SIGUNUSED = syscall.Signal(0x1f) SIGURG = syscall.Signal(0x17) SIGUSR1 = syscall.Signal(0xa) SIGUSR2 = syscall.Signal(0xc) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index f4b178ef1..3e8c2c7aa 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x1000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -507,6 +512,19 @@ const ( F_ULOCK = 0x0 F_UNLCK = 0x2 F_WRLCK = 0x1 + GENL_ADMIN_PERM = 0x1 + GENL_CMD_CAP_DO = 0x2 + GENL_CMD_CAP_DUMP = 0x4 + GENL_CMD_CAP_HASPOL = 0x8 + GENL_HDRLEN = 0x4 + GENL_ID_CTRL = 0x10 + GENL_ID_PMCRAID = 0x12 + GENL_ID_VFS_DQUOT = 0x11 + GENL_MAX_ID = 0x3ff + GENL_MIN_ID = 0x10 + GENL_NAMSIZ = 0x10 + GENL_START_ALLOC = 0x13 + GENL_UNS_ADMIN_PERM = 0x10 GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 HUPCL = 0x400 @@ -644,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -658,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -674,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -689,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -732,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -769,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -901,6 +929,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -915,6 +944,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -933,6 +963,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -953,8 +984,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1011,6 +1044,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1273,7 +1307,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1317,6 +1351,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1325,6 +1360,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1346,10 +1382,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1364,8 +1401,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1376,6 +1413,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1406,6 +1444,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1544,6 +1583,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1552,11 +1592,13 @@ const ( SO_ERROR = 0x4 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa @@ -1564,6 +1606,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f SO_PRIORITY = 0xc @@ -1631,6 +1674,12 @@ const ( TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 + TASKSTATS_CMD_ATTR_MAX = 0x4 + TASKSTATS_CMD_MAX = 0x2 + TASKSTATS_GENL_NAME = "TASKSTATS" + TASKSTATS_GENL_VERSION = 0x1 + TASKSTATS_TYPE_MAX = 0x6 + TASKSTATS_VERSION = 0x8 TCFLSH = 0x540b TCGETA = 0x5405 TCGETS = 0x5401 @@ -1654,6 +1703,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1713,6 +1763,7 @@ const ( TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e TIOCGSID = 0x5429 @@ -1770,6 +1821,7 @@ const ( TIOCSWINSZ = 0x5414 TIOCVHANGUP = 0x5437 TOSTOP = 0x100 + TS_COMM_LEN = 0x20 TUNATTACHFILTER = 0x400854d5 TUNDETACHFILTER = 0x400854d6 TUNGETFEATURES = 0x800454cf @@ -2004,7 +2056,6 @@ const ( SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) - SIGUNUSED = syscall.Signal(0x1f) SIGURG = syscall.Signal(0x17) SIGUSR1 = syscall.Signal(0xa) SIGUSR2 = syscall.Signal(0xc) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index 495f13b61..383453349 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -393,6 +395,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -441,6 +444,7 @@ const ( EXTA = 0xe EXTB = 0xf EXTPROC = 0x10000 + EXTRA_MAGIC = 0x45585401 FALLOC_FL_COLLAPSE_RANGE = 0x8 FALLOC_FL_INSERT_RANGE = 0x20 FALLOC_FL_KEEP_SIZE = 0x1 @@ -454,6 +458,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x1000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -508,6 +514,19 @@ const ( F_ULOCK = 0x0 F_UNLCK = 0x2 F_WRLCK = 0x1 + GENL_ADMIN_PERM = 0x1 + GENL_CMD_CAP_DO = 0x2 + GENL_CMD_CAP_DUMP = 0x4 + GENL_CMD_CAP_HASPOL = 0x8 + GENL_HDRLEN = 0x4 + GENL_ID_CTRL = 0x10 + GENL_ID_PMCRAID = 0x12 + GENL_ID_VFS_DQUOT = 0x11 + GENL_MAX_ID = 0x3ff + GENL_MIN_ID = 0x10 + GENL_NAMSIZ = 0x10 + GENL_START_ALLOC = 0x13 + GENL_UNS_ADMIN_PERM = 0x10 GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 HUPCL = 0x400 @@ -645,8 +664,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -659,12 +680,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -675,8 +698,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -690,7 +715,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -733,6 +760,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -770,6 +798,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -902,6 +931,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -916,6 +946,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -934,6 +965,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -954,8 +986,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1012,6 +1046,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1258,7 +1293,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1302,6 +1337,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1310,6 +1346,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1331,10 +1368,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1349,8 +1387,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1361,6 +1399,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1391,6 +1430,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1529,6 +1569,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1537,11 +1578,13 @@ const ( SO_ERROR = 0x4 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa @@ -1549,6 +1592,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f SO_PRIORITY = 0xc @@ -1616,6 +1660,12 @@ const ( TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 + TASKSTATS_CMD_ATTR_MAX = 0x4 + TASKSTATS_CMD_MAX = 0x2 + TASKSTATS_GENL_NAME = "TASKSTATS" + TASKSTATS_GENL_VERSION = 0x1 + TASKSTATS_TYPE_MAX = 0x6 + TASKSTATS_VERSION = 0x8 TCFLSH = 0x540b TCGETA = 0x5405 TCGETS = 0x5401 @@ -1639,6 +1689,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1698,6 +1749,7 @@ const ( TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e TIOCGSID = 0x5429 @@ -1755,6 +1807,7 @@ const ( TIOCSWINSZ = 0x5414 TIOCVHANGUP = 0x5437 TOSTOP = 0x100 + TS_COMM_LEN = 0x20 TUNATTACHFILTER = 0x401054d5 TUNDETACHFILTER = 0x401054d6 TUNGETFEATURES = 0x800454cf @@ -1989,7 +2042,6 @@ const ( SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) - SIGUNUSED = syscall.Signal(0x1f) SIGURG = syscall.Signal(0x17) SIGUSR1 = syscall.Signal(0xa) SIGUSR2 = syscall.Signal(0xc) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index 59651e415..bde8f7d02 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x2000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -507,6 +512,19 @@ const ( F_ULOCK = 0x0 F_UNLCK = 0x2 F_WRLCK = 0x1 + GENL_ADMIN_PERM = 0x1 + GENL_CMD_CAP_DO = 0x2 + GENL_CMD_CAP_DUMP = 0x4 + GENL_CMD_CAP_HASPOL = 0x8 + GENL_HDRLEN = 0x4 + GENL_ID_CTRL = 0x10 + GENL_ID_PMCRAID = 0x12 + GENL_ID_VFS_DQUOT = 0x11 + GENL_MAX_ID = 0x3ff + GENL_MIN_ID = 0x10 + GENL_NAMSIZ = 0x10 + GENL_START_ALLOC = 0x13 + GENL_UNS_ADMIN_PERM = 0x10 GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 HUPCL = 0x400 @@ -644,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -658,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -674,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -689,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -732,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -769,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -902,6 +930,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -916,6 +945,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -934,6 +964,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -954,8 +985,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1012,6 +1045,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1270,7 +1304,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1314,6 +1348,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1322,6 +1357,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1343,10 +1379,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1361,8 +1398,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1373,6 +1410,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1403,6 +1441,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1541,6 +1580,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1549,11 +1589,13 @@ const ( SO_ERROR = 0x1007 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0x100 @@ -1561,6 +1603,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1e SO_PRIORITY = 0xc @@ -1629,6 +1672,12 @@ const ( TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 + TASKSTATS_CMD_ATTR_MAX = 0x4 + TASKSTATS_CMD_MAX = 0x2 + TASKSTATS_GENL_NAME = "TASKSTATS" + TASKSTATS_GENL_VERSION = 0x1 + TASKSTATS_TYPE_MAX = 0x6 + TASKSTATS_VERSION = 0x8 TCFLSH = 0x5407 TCGETA = 0x5401 TCGETS = 0x540d @@ -1651,6 +1700,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1709,6 +1759,7 @@ const ( TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x4020542e TIOCGSERIAL = 0x5484 TIOCGSID = 0x7416 @@ -1769,6 +1820,7 @@ const ( TIOCSWINSZ = 0x80087467 TIOCVHANGUP = 0x5437 TOSTOP = 0x8000 + TS_COMM_LEN = 0x20 TUNATTACHFILTER = 0x800854d5 TUNDETACHFILTER = 0x800854d6 TUNGETFEATURES = 0x400454cf diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index a09bf9b18..42b6397d5 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x2000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -507,6 +512,19 @@ const ( F_ULOCK = 0x0 F_UNLCK = 0x2 F_WRLCK = 0x1 + GENL_ADMIN_PERM = 0x1 + GENL_CMD_CAP_DO = 0x2 + GENL_CMD_CAP_DUMP = 0x4 + GENL_CMD_CAP_HASPOL = 0x8 + GENL_HDRLEN = 0x4 + GENL_ID_CTRL = 0x10 + GENL_ID_PMCRAID = 0x12 + GENL_ID_VFS_DQUOT = 0x11 + GENL_MAX_ID = 0x3ff + GENL_MIN_ID = 0x10 + GENL_NAMSIZ = 0x10 + GENL_START_ALLOC = 0x13 + GENL_UNS_ADMIN_PERM = 0x10 GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 HUPCL = 0x400 @@ -644,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -658,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -674,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -689,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -732,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -769,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -902,6 +930,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -916,6 +945,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -934,6 +964,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -954,8 +985,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1012,6 +1045,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1270,7 +1304,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1314,6 +1348,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1322,6 +1357,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1343,10 +1379,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1361,8 +1398,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1373,6 +1410,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1403,6 +1441,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1541,6 +1580,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1549,11 +1589,13 @@ const ( SO_ERROR = 0x1007 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0x100 @@ -1561,6 +1603,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1e SO_PRIORITY = 0xc @@ -1629,6 +1672,12 @@ const ( TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 + TASKSTATS_CMD_ATTR_MAX = 0x4 + TASKSTATS_CMD_MAX = 0x2 + TASKSTATS_GENL_NAME = "TASKSTATS" + TASKSTATS_GENL_VERSION = 0x1 + TASKSTATS_TYPE_MAX = 0x6 + TASKSTATS_VERSION = 0x8 TCFLSH = 0x5407 TCGETA = 0x5401 TCGETS = 0x540d @@ -1651,6 +1700,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1709,6 +1759,7 @@ const ( TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x4020542e TIOCGSERIAL = 0x5484 TIOCGSID = 0x7416 @@ -1769,6 +1820,7 @@ const ( TIOCSWINSZ = 0x80087467 TIOCVHANGUP = 0x5437 TOSTOP = 0x8000 + TS_COMM_LEN = 0x20 TUNATTACHFILTER = 0x801054d5 TUNDETACHFILTER = 0x801054d6 TUNGETFEATURES = 0x400454cf diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index 72a0083c4..bd4ff8147 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x2000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -507,6 +512,19 @@ const ( F_ULOCK = 0x0 F_UNLCK = 0x2 F_WRLCK = 0x1 + GENL_ADMIN_PERM = 0x1 + GENL_CMD_CAP_DO = 0x2 + GENL_CMD_CAP_DUMP = 0x4 + GENL_CMD_CAP_HASPOL = 0x8 + GENL_HDRLEN = 0x4 + GENL_ID_CTRL = 0x10 + GENL_ID_PMCRAID = 0x12 + GENL_ID_VFS_DQUOT = 0x11 + GENL_MAX_ID = 0x3ff + GENL_MIN_ID = 0x10 + GENL_NAMSIZ = 0x10 + GENL_START_ALLOC = 0x13 + GENL_UNS_ADMIN_PERM = 0x10 GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 HUPCL = 0x400 @@ -644,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -658,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -674,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -689,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -732,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -769,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -902,6 +930,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -916,6 +945,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -934,6 +964,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -954,8 +985,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1012,6 +1045,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1270,7 +1304,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1314,6 +1348,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1322,6 +1357,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1343,10 +1379,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1361,8 +1398,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1373,6 +1410,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1403,6 +1441,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1541,6 +1580,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1549,11 +1589,13 @@ const ( SO_ERROR = 0x1007 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0x100 @@ -1561,6 +1603,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1e SO_PRIORITY = 0xc @@ -1629,6 +1672,12 @@ const ( TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 + TASKSTATS_CMD_ATTR_MAX = 0x4 + TASKSTATS_CMD_MAX = 0x2 + TASKSTATS_GENL_NAME = "TASKSTATS" + TASKSTATS_GENL_VERSION = 0x1 + TASKSTATS_TYPE_MAX = 0x6 + TASKSTATS_VERSION = 0x8 TCFLSH = 0x5407 TCGETA = 0x5401 TCGETS = 0x540d @@ -1651,6 +1700,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1709,6 +1759,7 @@ const ( TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x4020542e TIOCGSERIAL = 0x5484 TIOCGSID = 0x7416 @@ -1769,6 +1820,7 @@ const ( TIOCSWINSZ = 0x80087467 TIOCVHANGUP = 0x5437 TOSTOP = 0x8000 + TS_COMM_LEN = 0x20 TUNATTACHFILTER = 0x801054d5 TUNDETACHFILTER = 0x801054d6 TUNGETFEATURES = 0x400454cf diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index 84c0e3cc1..6dfc95c40 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x2000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -507,6 +512,19 @@ const ( F_ULOCK = 0x0 F_UNLCK = 0x2 F_WRLCK = 0x1 + GENL_ADMIN_PERM = 0x1 + GENL_CMD_CAP_DO = 0x2 + GENL_CMD_CAP_DUMP = 0x4 + GENL_CMD_CAP_HASPOL = 0x8 + GENL_HDRLEN = 0x4 + GENL_ID_CTRL = 0x10 + GENL_ID_PMCRAID = 0x12 + GENL_ID_VFS_DQUOT = 0x11 + GENL_MAX_ID = 0x3ff + GENL_MIN_ID = 0x10 + GENL_NAMSIZ = 0x10 + GENL_START_ALLOC = 0x13 + GENL_UNS_ADMIN_PERM = 0x10 GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 HUPCL = 0x400 @@ -644,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -658,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -674,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -689,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -732,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -769,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -902,6 +930,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -916,6 +945,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -934,6 +964,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -954,8 +985,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1012,6 +1045,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1270,7 +1304,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1314,6 +1348,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1322,6 +1357,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1343,10 +1379,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1361,8 +1398,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1373,6 +1410,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1403,6 +1441,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1541,6 +1580,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1549,11 +1589,13 @@ const ( SO_ERROR = 0x1007 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0x100 @@ -1561,6 +1603,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1e SO_PRIORITY = 0xc @@ -1629,6 +1672,12 @@ const ( TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 + TASKSTATS_CMD_ATTR_MAX = 0x4 + TASKSTATS_CMD_MAX = 0x2 + TASKSTATS_GENL_NAME = "TASKSTATS" + TASKSTATS_GENL_VERSION = 0x1 + TASKSTATS_TYPE_MAX = 0x6 + TASKSTATS_VERSION = 0x8 TCFLSH = 0x5407 TCGETA = 0x5401 TCGETS = 0x540d @@ -1651,6 +1700,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1709,6 +1759,7 @@ const ( TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x4020542e TIOCGSERIAL = 0x5484 TIOCGSID = 0x7416 @@ -1769,6 +1820,7 @@ const ( TIOCSWINSZ = 0x80087467 TIOCVHANGUP = 0x5437 TOSTOP = 0x8000 + TS_COMM_LEN = 0x20 TUNATTACHFILTER = 0x800854d5 TUNDETACHFILTER = 0x800854d6 TUNGETFEATURES = 0x400454cf diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 8e4606e06..46b09d320 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x17 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x4000 FFDLY = 0x4000 FLUSHO = 0x800000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -507,6 +512,19 @@ const ( F_ULOCK = 0x0 F_UNLCK = 0x2 F_WRLCK = 0x1 + GENL_ADMIN_PERM = 0x1 + GENL_CMD_CAP_DO = 0x2 + GENL_CMD_CAP_DUMP = 0x4 + GENL_CMD_CAP_HASPOL = 0x8 + GENL_HDRLEN = 0x4 + GENL_ID_CTRL = 0x10 + GENL_ID_PMCRAID = 0x12 + GENL_ID_VFS_DQUOT = 0x11 + GENL_MAX_ID = 0x3ff + GENL_MIN_ID = 0x10 + GENL_NAMSIZ = 0x10 + GENL_START_ALLOC = 0x13 + GENL_UNS_ADMIN_PERM = 0x10 GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 HUPCL = 0x4000 @@ -644,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -658,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -674,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -689,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -732,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -769,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -901,6 +929,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -915,6 +944,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -933,6 +963,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -955,8 +986,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1013,6 +1046,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1326,7 +1360,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1370,6 +1404,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1378,6 +1413,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1399,10 +1435,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1417,8 +1454,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1429,6 +1466,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1459,6 +1497,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1597,6 +1636,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1605,11 +1645,13 @@ const ( SO_ERROR = 0x4 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa @@ -1617,6 +1659,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x15 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f SO_PRIORITY = 0xc @@ -1684,6 +1727,12 @@ const ( TAB2 = 0x800 TAB3 = 0xc00 TABDLY = 0xc00 + TASKSTATS_CMD_ATTR_MAX = 0x4 + TASKSTATS_CMD_MAX = 0x2 + TASKSTATS_GENL_NAME = "TASKSTATS" + TASKSTATS_GENL_VERSION = 0x1 + TASKSTATS_TYPE_MAX = 0x6 + TASKSTATS_VERSION = 0x8 TCFLSH = 0x2000741f TCGETA = 0x40147417 TCGETS = 0x402c7413 @@ -1705,6 +1754,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1761,6 +1811,7 @@ const ( TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e TIOCGSID = 0x5429 @@ -1827,6 +1878,7 @@ const ( TIOCSWINSZ = 0x80087467 TIOCVHANGUP = 0x5437 TOSTOP = 0x400000 + TS_COMM_LEN = 0x20 TUNATTACHFILTER = 0x801054d5 TUNDETACHFILTER = 0x801054d6 TUNGETFEATURES = 0x400454cf @@ -2061,7 +2113,6 @@ const ( SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) - SIGUNUSED = syscall.Signal(0x1f) SIGURG = syscall.Signal(0x17) SIGUSR1 = syscall.Signal(0xa) SIGUSR2 = syscall.Signal(0xc) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index 16ed19311..08adb1d8f 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x17 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x4000 FFDLY = 0x4000 FLUSHO = 0x800000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -507,6 +512,19 @@ const ( F_ULOCK = 0x0 F_UNLCK = 0x2 F_WRLCK = 0x1 + GENL_ADMIN_PERM = 0x1 + GENL_CMD_CAP_DO = 0x2 + GENL_CMD_CAP_DUMP = 0x4 + GENL_CMD_CAP_HASPOL = 0x8 + GENL_HDRLEN = 0x4 + GENL_ID_CTRL = 0x10 + GENL_ID_PMCRAID = 0x12 + GENL_ID_VFS_DQUOT = 0x11 + GENL_MAX_ID = 0x3ff + GENL_MIN_ID = 0x10 + GENL_NAMSIZ = 0x10 + GENL_START_ALLOC = 0x13 + GENL_UNS_ADMIN_PERM = 0x10 GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 HUPCL = 0x4000 @@ -644,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -658,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -674,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -689,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -732,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -769,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -901,6 +929,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -915,6 +944,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -933,6 +963,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -955,8 +986,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1013,6 +1046,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1326,7 +1360,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1370,6 +1404,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1378,6 +1413,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1399,10 +1435,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1417,8 +1454,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1429,6 +1466,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1459,6 +1497,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1597,6 +1636,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1605,11 +1645,13 @@ const ( SO_ERROR = 0x4 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa @@ -1617,6 +1659,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x15 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f SO_PRIORITY = 0xc @@ -1684,6 +1727,12 @@ const ( TAB2 = 0x800 TAB3 = 0xc00 TABDLY = 0xc00 + TASKSTATS_CMD_ATTR_MAX = 0x4 + TASKSTATS_CMD_MAX = 0x2 + TASKSTATS_GENL_NAME = "TASKSTATS" + TASKSTATS_GENL_VERSION = 0x1 + TASKSTATS_TYPE_MAX = 0x6 + TASKSTATS_VERSION = 0x8 TCFLSH = 0x2000741f TCGETA = 0x40147417 TCGETS = 0x402c7413 @@ -1705,6 +1754,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1761,6 +1811,7 @@ const ( TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e TIOCGSID = 0x5429 @@ -1827,6 +1878,7 @@ const ( TIOCSWINSZ = 0x80087467 TIOCVHANGUP = 0x5437 TOSTOP = 0x400000 + TS_COMM_LEN = 0x20 TUNATTACHFILTER = 0x801054d5 TUNDETACHFILTER = 0x801054d6 TUNGETFEATURES = 0x400454cf @@ -2061,7 +2113,6 @@ const ( SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) - SIGUNUSED = syscall.Signal(0x1f) SIGURG = syscall.Signal(0x17) SIGUSR1 = syscall.Signal(0xa) SIGUSR2 = syscall.Signal(0xc) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index bd385f809..70bc1a2fc 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x1000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -507,6 +512,19 @@ const ( F_ULOCK = 0x0 F_UNLCK = 0x2 F_WRLCK = 0x1 + GENL_ADMIN_PERM = 0x1 + GENL_CMD_CAP_DO = 0x2 + GENL_CMD_CAP_DUMP = 0x4 + GENL_CMD_CAP_HASPOL = 0x8 + GENL_HDRLEN = 0x4 + GENL_ID_CTRL = 0x10 + GENL_ID_PMCRAID = 0x12 + GENL_ID_VFS_DQUOT = 0x11 + GENL_MAX_ID = 0x3ff + GENL_MIN_ID = 0x10 + GENL_NAMSIZ = 0x10 + GENL_START_ALLOC = 0x13 + GENL_UNS_ADMIN_PERM = 0x10 GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 HUPCL = 0x400 @@ -644,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -658,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -674,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -689,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -732,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -769,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -901,6 +929,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -915,6 +944,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -933,6 +963,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -953,8 +984,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1011,6 +1044,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1330,7 +1364,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1374,6 +1408,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1382,6 +1417,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1403,10 +1439,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1421,8 +1458,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1433,6 +1470,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1463,6 +1501,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1601,6 +1640,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1609,11 +1649,13 @@ const ( SO_ERROR = 0x4 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa @@ -1621,6 +1663,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f SO_PRIORITY = 0xc @@ -1688,6 +1731,12 @@ const ( TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 + TASKSTATS_CMD_ATTR_MAX = 0x4 + TASKSTATS_CMD_MAX = 0x2 + TASKSTATS_GENL_NAME = "TASKSTATS" + TASKSTATS_GENL_VERSION = 0x1 + TASKSTATS_TYPE_MAX = 0x6 + TASKSTATS_VERSION = 0x8 TCFLSH = 0x540b TCGETA = 0x5405 TCGETS = 0x5401 @@ -1711,6 +1760,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1770,6 +1820,7 @@ const ( TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e TIOCGSID = 0x5429 @@ -1827,6 +1878,7 @@ const ( TIOCSWINSZ = 0x5414 TIOCVHANGUP = 0x5437 TOSTOP = 0x100 + TS_COMM_LEN = 0x20 TUNATTACHFILTER = 0x401054d5 TUNDETACHFILTER = 0x401054d6 TUNGETFEATURES = 0x800454cf @@ -2061,7 +2113,6 @@ const ( SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) - SIGUNUSED = syscall.Signal(0x1f) SIGURG = syscall.Signal(0x17) SIGUSR1 = syscall.Signal(0xa) SIGUSR2 = syscall.Signal(0xc) diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go index ac85ca645..206c75f09 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go @@ -1006,6 +1006,9 @@ const ( MSG_TRUNC = 0x10 MSG_USERFLAGS = 0xffffff MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x4 NAME_MAX = 0x1ff NET_RT_DUMP = 0x1 NET_RT_FLAGS = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go new file mode 100644 index 000000000..3ed0b2602 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go @@ -0,0 +1,1586 @@ +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- _const.go + +// +build arm,openbsd + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_BLUETOOTH = 0x20 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_ENCAP = 0x1c + AF_HYLINK = 0xf + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x18 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_KEY = 0x1e + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x24 + AF_MPLS = 0x21 + AF_NATM = 0x1b + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SIP = 0x1d + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + ARPHRD_ETHER = 0x1 + ARPHRD_FRELAY = 0xf + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDIRFILT = 0x4004427c + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc008427b + BIOCGETIF = 0x4020426b + BIOCGFILDROP = 0x40044278 + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044273 + BIOCGRTIMEOUT = 0x400c426e + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x20004276 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDIRFILT = 0x8004427d + BIOCSDLT = 0x8004427a + BIOCSETF = 0x80084267 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x80084277 + BIOCSFILDROP = 0x80044279 + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044272 + BIOCSRTIMEOUT = 0x800c426d + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIRECTION_IN = 0x1 + BPF_DIRECTION_OUT = 0x2 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x200000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0xff + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DIOCOSFPFLUSH = 0x2000444e + DLT_ARCNET = 0x7 + DLT_ATM_RFC1483 = 0xb + DLT_AX25 = 0x3 + DLT_CHAOS = 0x5 + DLT_C_HDLC = 0x68 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0xd + DLT_FDDI = 0xa + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_LOOP = 0xc + DLT_MPLS = 0xdb + DLT_NULL = 0x0 + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_SERIAL = 0x32 + DLT_PRONET = 0x4 + DLT_RAW = 0xe + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EMT_TAGOVF = 0x1 + EMUL_ENABLED = 0x1 + EMUL_NATIVE = 0x2 + ENDRUNDISC = 0x9 + ETHERMIN = 0x2e + ETHERMTU = 0x5dc + ETHERTYPE_8023 = 0x4 + ETHERTYPE_AARP = 0x80f3 + ETHERTYPE_ACCTON = 0x8390 + ETHERTYPE_AEONIC = 0x8036 + ETHERTYPE_ALPHA = 0x814a + ETHERTYPE_AMBER = 0x6008 + ETHERTYPE_AMOEBA = 0x8145 + ETHERTYPE_AOE = 0x88a2 + ETHERTYPE_APOLLO = 0x80f7 + ETHERTYPE_APOLLODOMAIN = 0x8019 + ETHERTYPE_APPLETALK = 0x809b + ETHERTYPE_APPLITEK = 0x80c7 + ETHERTYPE_ARGONAUT = 0x803a + ETHERTYPE_ARP = 0x806 + ETHERTYPE_AT = 0x809b + ETHERTYPE_ATALK = 0x809b + ETHERTYPE_ATOMIC = 0x86df + ETHERTYPE_ATT = 0x8069 + ETHERTYPE_ATTSTANFORD = 0x8008 + ETHERTYPE_AUTOPHON = 0x806a + ETHERTYPE_AXIS = 0x8856 + ETHERTYPE_BCLOOP = 0x9003 + ETHERTYPE_BOFL = 0x8102 + ETHERTYPE_CABLETRON = 0x7034 + ETHERTYPE_CHAOS = 0x804 + ETHERTYPE_COMDESIGN = 0x806c + ETHERTYPE_COMPUGRAPHIC = 0x806d + ETHERTYPE_COUNTERPOINT = 0x8062 + ETHERTYPE_CRONUS = 0x8004 + ETHERTYPE_CRONUSVLN = 0x8003 + ETHERTYPE_DCA = 0x1234 + ETHERTYPE_DDE = 0x807b + ETHERTYPE_DEBNI = 0xaaaa + ETHERTYPE_DECAM = 0x8048 + ETHERTYPE_DECCUST = 0x6006 + ETHERTYPE_DECDIAG = 0x6005 + ETHERTYPE_DECDNS = 0x803c + ETHERTYPE_DECDTS = 0x803e + ETHERTYPE_DECEXPER = 0x6000 + ETHERTYPE_DECLAST = 0x8041 + ETHERTYPE_DECLTM = 0x803f + ETHERTYPE_DECMUMPS = 0x6009 + ETHERTYPE_DECNETBIOS = 0x8040 + ETHERTYPE_DELTACON = 0x86de + ETHERTYPE_DIDDLE = 0x4321 + ETHERTYPE_DLOG1 = 0x660 + ETHERTYPE_DLOG2 = 0x661 + ETHERTYPE_DN = 0x6003 + ETHERTYPE_DOGFIGHT = 0x1989 + ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_ECMA = 0x803 + ETHERTYPE_ENCRYPT = 0x803d + ETHERTYPE_ES = 0x805d + ETHERTYPE_EXCELAN = 0x8010 + ETHERTYPE_EXPERDATA = 0x8049 + ETHERTYPE_FLIP = 0x8146 + ETHERTYPE_FLOWCONTROL = 0x8808 + ETHERTYPE_FRARP = 0x808 + ETHERTYPE_GENDYN = 0x8068 + ETHERTYPE_HAYES = 0x8130 + ETHERTYPE_HIPPI_FP = 0x8180 + ETHERTYPE_HITACHI = 0x8820 + ETHERTYPE_HP = 0x8005 + ETHERTYPE_IEEEPUP = 0xa00 + ETHERTYPE_IEEEPUPAT = 0xa01 + ETHERTYPE_IMLBL = 0x4c42 + ETHERTYPE_IMLBLDIAG = 0x424c + ETHERTYPE_IP = 0x800 + ETHERTYPE_IPAS = 0x876c + ETHERTYPE_IPV6 = 0x86dd + ETHERTYPE_IPX = 0x8137 + ETHERTYPE_IPXNEW = 0x8037 + ETHERTYPE_KALPANA = 0x8582 + ETHERTYPE_LANBRIDGE = 0x8038 + ETHERTYPE_LANPROBE = 0x8888 + ETHERTYPE_LAT = 0x6004 + ETHERTYPE_LBACK = 0x9000 + ETHERTYPE_LITTLE = 0x8060 + ETHERTYPE_LLDP = 0x88cc + ETHERTYPE_LOGICRAFT = 0x8148 + ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MATRA = 0x807a + ETHERTYPE_MAX = 0xffff + ETHERTYPE_MERIT = 0x807c + ETHERTYPE_MICP = 0x873a + ETHERTYPE_MOPDL = 0x6001 + ETHERTYPE_MOPRC = 0x6002 + ETHERTYPE_MOTOROLA = 0x818d + ETHERTYPE_MPLS = 0x8847 + ETHERTYPE_MPLS_MCAST = 0x8848 + ETHERTYPE_MUMPS = 0x813f + ETHERTYPE_NBPCC = 0x3c04 + ETHERTYPE_NBPCLAIM = 0x3c09 + ETHERTYPE_NBPCLREQ = 0x3c05 + ETHERTYPE_NBPCLRSP = 0x3c06 + ETHERTYPE_NBPCREQ = 0x3c02 + ETHERTYPE_NBPCRSP = 0x3c03 + ETHERTYPE_NBPDG = 0x3c07 + ETHERTYPE_NBPDGB = 0x3c08 + ETHERTYPE_NBPDLTE = 0x3c0a + ETHERTYPE_NBPRAR = 0x3c0c + ETHERTYPE_NBPRAS = 0x3c0b + ETHERTYPE_NBPRST = 0x3c0d + ETHERTYPE_NBPSCD = 0x3c01 + ETHERTYPE_NBPVCD = 0x3c00 + ETHERTYPE_NBS = 0x802 + ETHERTYPE_NCD = 0x8149 + ETHERTYPE_NESTAR = 0x8006 + ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NOVELL = 0x8138 + ETHERTYPE_NS = 0x600 + ETHERTYPE_NSAT = 0x601 + ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NTRAILER = 0x10 + ETHERTYPE_OS9 = 0x7007 + ETHERTYPE_OS9NET = 0x7009 + ETHERTYPE_PACER = 0x80c6 + ETHERTYPE_PAE = 0x888e + ETHERTYPE_PCS = 0x4242 + ETHERTYPE_PLANNING = 0x8044 + ETHERTYPE_PPP = 0x880b + ETHERTYPE_PPPOE = 0x8864 + ETHERTYPE_PPPOEDISC = 0x8863 + ETHERTYPE_PRIMENTS = 0x7031 + ETHERTYPE_PUP = 0x200 + ETHERTYPE_PUPAT = 0x200 + ETHERTYPE_QINQ = 0x88a8 + ETHERTYPE_RACAL = 0x7030 + ETHERTYPE_RATIONAL = 0x8150 + ETHERTYPE_RAWFR = 0x6559 + ETHERTYPE_RCL = 0x1995 + ETHERTYPE_RDP = 0x8739 + ETHERTYPE_RETIX = 0x80f2 + ETHERTYPE_REVARP = 0x8035 + ETHERTYPE_SCA = 0x6007 + ETHERTYPE_SECTRA = 0x86db + ETHERTYPE_SECUREDATA = 0x876d + ETHERTYPE_SGITW = 0x817e + ETHERTYPE_SG_BOUNCE = 0x8016 + ETHERTYPE_SG_DIAG = 0x8013 + ETHERTYPE_SG_NETGAMES = 0x8014 + ETHERTYPE_SG_RESV = 0x8015 + ETHERTYPE_SIMNET = 0x5208 + ETHERTYPE_SLOW = 0x8809 + ETHERTYPE_SNA = 0x80d5 + ETHERTYPE_SNMP = 0x814c + ETHERTYPE_SONIX = 0xfaf5 + ETHERTYPE_SPIDER = 0x809f + ETHERTYPE_SPRITE = 0x500 + ETHERTYPE_STP = 0x8181 + ETHERTYPE_TALARIS = 0x812b + ETHERTYPE_TALARISMC = 0x852b + ETHERTYPE_TCPCOMP = 0x876b + ETHERTYPE_TCPSM = 0x9002 + ETHERTYPE_TEC = 0x814f + ETHERTYPE_TIGAN = 0x802f + ETHERTYPE_TRAIL = 0x1000 + ETHERTYPE_TRANSETHER = 0x6558 + ETHERTYPE_TYMSHARE = 0x802e + ETHERTYPE_UBBST = 0x7005 + ETHERTYPE_UBDEBUG = 0x900 + ETHERTYPE_UBDIAGLOOP = 0x7002 + ETHERTYPE_UBDL = 0x7000 + ETHERTYPE_UBNIU = 0x7001 + ETHERTYPE_UBNMC = 0x7003 + ETHERTYPE_VALID = 0x1600 + ETHERTYPE_VARIAN = 0x80dd + ETHERTYPE_VAXELN = 0x803b + ETHERTYPE_VEECO = 0x8067 + ETHERTYPE_VEXP = 0x805b + ETHERTYPE_VGLAB = 0x8131 + ETHERTYPE_VINES = 0xbad + ETHERTYPE_VINESECHO = 0xbaf + ETHERTYPE_VINESLOOP = 0xbae + ETHERTYPE_VITAL = 0xff00 + ETHERTYPE_VLAN = 0x8100 + ETHERTYPE_VLTLMAN = 0x8080 + ETHERTYPE_VPROD = 0x805c + ETHERTYPE_VURESERVED = 0x8147 + ETHERTYPE_WATERLOO = 0x8130 + ETHERTYPE_WELLFLEET = 0x8103 + ETHERTYPE_X25 = 0x805 + ETHERTYPE_X75 = 0x801 + ETHERTYPE_XNSSM = 0x9001 + ETHERTYPE_XTP = 0x817d + ETHER_ADDR_LEN = 0x6 + ETHER_ALIGN = 0x2 + ETHER_CRC_LEN = 0x4 + ETHER_CRC_POLY_BE = 0x4c11db6 + ETHER_CRC_POLY_LE = 0xedb88320 + ETHER_HDR_LEN = 0xe + ETHER_MAX_DIX_LEN = 0x600 + ETHER_MAX_LEN = 0x5ee + ETHER_MIN_LEN = 0x40 + ETHER_TYPE_LEN = 0x2 + ETHER_VLAN_ENCAP_LEN = 0x4 + EVFILT_AIO = -0x3 + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0x7 + EVFILT_TIMER = -0x7 + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0xa + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETOWN = 0x5 + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFA_ROUTE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x8e52 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BLUETOOTH = 0xf8 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf7 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DUMMY = 0xf1 + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ECONET = 0xce + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf3 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LINEGROUP = 0xd2 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf5 + IFT_PFLOW = 0xf9 + IFT_PFSYNC = 0xf6 + IFT_PLC = 0xae + IFT_PON155 = 0xcf + IFT_PON622 = 0xd0 + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPATM = 0xc5 + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf2 + IFT_Q2931 = 0xc9 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SIPSIG = 0xcc + IFT_SIPTG = 0xcb + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TELINK = 0xc8 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VIRTUALTG = 0xca + IFT_VOICEDID = 0xd5 + IFT_VOICEEM = 0x64 + IFT_VOICEEMFGD = 0xd3 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFGDEANA = 0xd4 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERCABLE = 0xc6 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IN_RFC3021_HOST = 0x1 + IN_RFC3021_NET = 0xfffffffe + IN_RFC3021_NSHIFT = 0x1f + IPPROTO_AH = 0x33 + IPPROTO_CARP = 0x70 + IPPROTO_DIVERT = 0x102 + IPPROTO_DIVERT_INIT = 0x2 + IPPROTO_DIVERT_RESP = 0x1 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPIP = 0x4 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x103 + IPPROTO_MOBILE = 0x37 + IPPROTO_MPLS = 0x89 + IPPROTO_NONE = 0x3b + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPV6_AUTH_LEVEL = 0x35 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_ESP_NETWORK_LEVEL = 0x37 + IPV6_ESP_TRANS_LEVEL = 0x36 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPCOMP_LEVEL = 0x3c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_OPTIONS = 0x1 + IPV6_PATHMTU = 0x2c + IPV6_PIPEX = 0x3f + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVDSTPORT = 0x40 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTABLE = 0x1021 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_AUTH_LEVEL = 0x14 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DIVERTFL = 0x1022 + IP_DROP_MEMBERSHIP = 0xd + IP_ESP_NETWORK_LEVEL = 0x16 + IP_ESP_TRANS_LEVEL = 0x15 + IP_HDRINCL = 0x2 + IP_IPCOMP_LEVEL = 0x1d + IP_IPSECFLOWINFO = 0x24 + IP_IPSEC_LOCAL_AUTH = 0x1b + IP_IPSEC_LOCAL_CRED = 0x19 + IP_IPSEC_LOCAL_ID = 0x17 + IP_IPSEC_REMOTE_AUTH = 0x1c + IP_IPSEC_REMOTE_CRED = 0x1a + IP_IPSEC_REMOTE_ID = 0x18 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0xfff + IP_MF = 0x2000 + IP_MINTTL = 0x20 + IP_MIN_MEMBERSHIPS = 0xf + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x1 + IP_PIPEX = 0x22 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVDSTPORT = 0x21 + IP_RECVIF = 0x1e + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVRTABLE = 0x23 + IP_RECVTTL = 0x1f + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RTABLE = 0x1021 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LCNT_OVERLOAD_FLUSH = 0x6 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x6 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_SPACEAVAIL = 0x5 + MADV_WILLNEED = 0x3 + MAP_ANON = 0x1000 + MAP_ANONYMOUS = 0x1000 + MAP_COPY = 0x2 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_FLAGMASK = 0x3ff7 + MAP_HASSEMAPHORE = 0x0 + MAP_INHERIT = 0x0 + MAP_INHERIT_COPY = 0x1 + MAP_INHERIT_NONE = 0x2 + MAP_INHERIT_SHARE = 0x0 + MAP_INHERIT_ZERO = 0x3 + MAP_NOEXTEND = 0x0 + MAP_NORESERVE = 0x0 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x0 + MAP_SHARED = 0x1 + MAP_TRYFIXED = 0x0 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_BCAST = 0x100 + MSG_CMSG_CLOEXEC = 0x800 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOR = 0x8 + MSG_MCAST = 0x200 + MSG_NOSIGNAL = 0x400 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x4 + MS_SYNC = 0x2 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_MAXID = 0x6 + NET_RT_STATS = 0x4 + NET_RT_TABLE = 0x5 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EOF = 0x2 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRUNCATE = 0x80 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x80 + ONOCR = 0x40 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x10000 + O_CREAT = 0x200 + O_DIRECTORY = 0x20000 + O_DSYNC = 0x80 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x80 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PF_FLUSH = 0x1 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_LABEL = 0xa + RTAX_MAX = 0xb + RTAX_NETMASK = 0x2 + RTAX_SRC = 0x8 + RTAX_SRCMASK = 0x9 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_LABEL = 0x400 + RTA_NETMASK = 0x4 + RTA_SRC = 0x100 + RTA_SRCMASK = 0x200 + RTF_ANNOUNCE = 0x4000 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_CLONED = 0x10000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_FMASK = 0x70f808 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MASK = 0x80 + RTF_MODIFIED = 0x20 + RTF_MPATH = 0x40000 + RTF_MPLS = 0x100000 + RTF_PERMANENT_ARP = 0x2000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x2000 + RTF_REJECT = 0x8 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_USETRAILERS = 0x8000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DESYNC = 0x10 + RTM_GET = 0x4 + RTM_IFANNOUNCE = 0xf + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MAXSIZE = 0x800 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RT_TABLEID_MAX = 0xff + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x4 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCAIFGROUP = 0x80246987 + SIOCALIFADDR = 0x8218691c + SIOCATMARK = 0x40047307 + SIOCBRDGADD = 0x8054693c + SIOCBRDGADDS = 0x80546941 + SIOCBRDGARL = 0x806e694d + SIOCBRDGDADDR = 0x81286947 + SIOCBRDGDEL = 0x8054693d + SIOCBRDGDELS = 0x80546942 + SIOCBRDGFLUSH = 0x80546948 + SIOCBRDGFRL = 0x806e694e + SIOCBRDGGCACHE = 0xc0146941 + SIOCBRDGGFD = 0xc0146952 + SIOCBRDGGHT = 0xc0146951 + SIOCBRDGGIFFLGS = 0xc054693e + SIOCBRDGGMA = 0xc0146953 + SIOCBRDGGPARAM = 0xc03c6958 + SIOCBRDGGPRI = 0xc0146950 + SIOCBRDGGRL = 0xc028694f + SIOCBRDGGSIFS = 0xc054693c + SIOCBRDGGTO = 0xc0146946 + SIOCBRDGIFS = 0xc0546942 + SIOCBRDGRTS = 0xc0186943 + SIOCBRDGSADDR = 0xc1286944 + SIOCBRDGSCACHE = 0x80146940 + SIOCBRDGSFD = 0x80146952 + SIOCBRDGSHT = 0x80146951 + SIOCBRDGSIFCOST = 0x80546955 + SIOCBRDGSIFFLGS = 0x8054693f + SIOCBRDGSIFPRIO = 0x80546954 + SIOCBRDGSMA = 0x80146953 + SIOCBRDGSPRI = 0x80146950 + SIOCBRDGSPROTO = 0x8014695a + SIOCBRDGSTO = 0x80146945 + SIOCBRDGSTXHC = 0x80146959 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFGROUP = 0x80246989 + SIOCDIFPHYADDR = 0x80206949 + SIOCDLIFADDR = 0x8218691e + SIOCGETKALIVE = 0xc01869a4 + SIOCGETLABEL = 0x8020699a + SIOCGETPFLOW = 0xc02069fe + SIOCGETPFSYNC = 0xc02069f8 + SIOCGETSGCNT = 0xc0147534 + SIOCGETVIFCNT = 0xc0147533 + SIOCGETVLAN = 0xc0206990 + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFASYNCMAP = 0xc020697c + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCONF = 0xc0086924 + SIOCGIFDATA = 0xc020691b + SIOCGIFDESCR = 0xc0206981 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGATTR = 0xc024698b + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc024698a + SIOCGIFGROUP = 0xc0246988 + SIOCGIFHARDMTU = 0xc02069a5 + SIOCGIFMEDIA = 0xc0286936 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc020697e + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPRIORITY = 0xc020699c + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFRDOMAIN = 0xc02069a0 + SIOCGIFRTLABEL = 0xc0206983 + SIOCGIFRXR = 0x802069aa + SIOCGIFTIMESLOT = 0xc0206986 + SIOCGIFXFLAGS = 0xc020699e + SIOCGLIFADDR = 0xc218691d + SIOCGLIFPHYADDR = 0xc218694b + SIOCGLIFPHYRTABLE = 0xc02069a2 + SIOCGLIFPHYTTL = 0xc02069a9 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGSPPPPARAMS = 0xc0206994 + SIOCGVH = 0xc02069f6 + SIOCGVNETID = 0xc02069a7 + SIOCIFCREATE = 0x8020697a + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc00c6978 + SIOCSETKALIVE = 0x801869a3 + SIOCSETLABEL = 0x80206999 + SIOCSETPFLOW = 0x802069fd + SIOCSETPFSYNC = 0x802069f7 + SIOCSETVLAN = 0x8020698f + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFASYNCMAP = 0x8020697d + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFDESCR = 0x80206980 + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGATTR = 0x8024698c + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020691f + SIOCSIFMEDIA = 0xc0206935 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x8020697f + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPRIORITY = 0x8020699b + SIOCSIFRDOMAIN = 0x8020699f + SIOCSIFRTLABEL = 0x80206982 + SIOCSIFTIMESLOT = 0x80206985 + SIOCSIFXFLAGS = 0x8020699d + SIOCSLIFPHYADDR = 0x8218694a + SIOCSLIFPHYRTABLE = 0x802069a1 + SIOCSLIFPHYTTL = 0x802069a8 + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SIOCSSPPPPARAMS = 0x80206993 + SIOCSVH = 0xc02069f5 + SIOCSVNETID = 0x802069a6 + SOCK_CLOEXEC = 0x8000 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x4000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_BINDANY = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_NETPROC = 0x1020 + SO_OOBINLINE = 0x100 + SO_PEERCRED = 0x1022 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_RTABLE = 0x1021 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_SPLICE = 0x1023 + SO_TIMESTAMP = 0x800 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_MAXBURST = 0x4 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x3 + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x4 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOPUSH = 0x10 + TCP_NSTATES = 0xb + TCP_SACK_ENABLE = 0x8 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLAG_CLOCAL = 0x2 + TIOCFLAG_CRTSCTS = 0x4 + TIOCFLAG_MDMBUF = 0x8 + TIOCFLAG_PPS = 0x10 + TIOCFLAG_SOFTCAR = 0x1 + TIOCFLUSH = 0x80047410 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGFLAGS = 0x4004745d + TIOCGPGRP = 0x40047477 + TIOCGSID = 0x40047463 + TIOCGTSTAMP = 0x400c745b + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGET = 0x4004746a + TIOCMODG = 0x4004746a + TIOCMODS = 0x8004746d + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSFLAGS = 0x8004745c + TIOCSIG = 0x8004745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x80047465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSTSTAMP = 0x8008745a + TIOCSWINSZ = 0x80087467 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WALTSIG = 0x4 + WCONTINUED = 0x8 + WCOREFLAG = 0x80 + WNOHANG = 0x1 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x58) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x59) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EIPSEC = syscall.Errno(0x52) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x5b) + ELOOP = syscall.Errno(0x3e) + EMEDIUMTYPE = syscall.Errno(0x56) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x53) + ENOBUFS = syscall.Errno(0x37) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOMEDIUM = syscall.Errno(0x55) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x5a) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x5b) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x57) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHR = syscall.Signal(0x20) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "connection timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "IPsec processing failure", + 83: "attribute not found", + 84: "illegal byte sequence", + 85: "no medium found", + 86: "wrong medium type", + 87: "value too large to be stored in data type", + 88: "operation canceled", + 89: "identifier removed", + 90: "no message of desired type", + 91: "not supported", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "stopped (signal)", + 18: "stopped", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "thread AST", +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go index 43f67b2d6..10491e9ed 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go @@ -266,6 +266,106 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Madvise(b []byte, behav int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) if e1 != 0 { @@ -298,6 +398,16 @@ func kill(pid int, signum int, posix int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -895,74 +1005,6 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Open(path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go index 790d0b17b..5f1f6bfef 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go @@ -266,6 +266,106 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Madvise(b []byte, behav int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) if e1 != 0 { @@ -298,6 +398,16 @@ func kill(pid int, signum int, posix int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -895,74 +1005,6 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Open(path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go index d516409db..7a4097459 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go @@ -1,5 +1,5 @@ -// mksyscall.pl -l32 -tags darwin,arm syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// mksyscall.pl -tags darwin,arm syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go +// Code generated by the command above; see README.md. DO NOT EDIT. // +build darwin,arm @@ -221,7 +221,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) if e1 != 0 { err = errnoErr(e1) } @@ -266,6 +266,106 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Madvise(b []byte, behav int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) if e1 != 0 { @@ -298,6 +398,16 @@ func kill(pid int, signum int, posix int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -456,6 +566,21 @@ func Exit(code int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fchdir(fd int) (err error) { _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) if e1 != 0 { @@ -486,6 +611,21 @@ func Fchmod(fd int, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fchown(fd int, uid int, gid int) (err error) { _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { @@ -496,6 +636,21 @@ func Fchown(fd int, uid int, gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flock(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) if e1 != 0 { @@ -745,6 +900,26 @@ func Link(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Listen(s int, backlog int) (err error) { _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) if e1 != 0 { @@ -785,6 +960,21 @@ func Mkdir(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mkfifo(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -815,74 +1005,6 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Open(path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -899,6 +1021,22 @@ func Open(path string, mode int, perm uint32) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Pathconf(path string, name int) (val int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -988,6 +1126,28 @@ func Readlink(path string, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Rename(from string, to string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(from) @@ -1008,6 +1168,26 @@ func Rename(from string, to string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Renameat(fromfd int, from string, tofd int, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Revoke(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1245,6 +1425,26 @@ func Symlink(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() (err error) { _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) if e1 != 0 { @@ -1308,6 +1508,21 @@ func Unlink(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Unmount(path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go index e97759c35..07c6ebc9f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go @@ -1,5 +1,5 @@ // mksyscall.pl -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build darwin,arm64 @@ -266,6 +266,106 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Madvise(b []byte, behav int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) if e1 != 0 { @@ -298,6 +398,16 @@ func kill(pid int, signum int, posix int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -456,6 +566,21 @@ func Exit(code int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fchdir(fd int) (err error) { _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) if e1 != 0 { @@ -486,6 +611,21 @@ func Fchmod(fd int, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fchown(fd int, uid int, gid int) (err error) { _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { @@ -496,6 +636,21 @@ func Fchown(fd int, uid int, gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flock(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) if e1 != 0 { @@ -745,6 +900,26 @@ func Link(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Listen(s int, backlog int) (err error) { _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) if e1 != 0 { @@ -785,6 +960,21 @@ func Mkdir(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mkfifo(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -815,74 +1005,6 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Open(path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -899,6 +1021,22 @@ func Open(path string, mode int, perm uint32) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Pathconf(path string, name int) (val int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -988,6 +1126,28 @@ func Readlink(path string, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Rename(from string, to string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(from) @@ -1008,6 +1168,26 @@ func Rename(from string, to string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Renameat(fromfd int, from string, tofd int, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Revoke(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1245,6 +1425,26 @@ func Symlink(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() (err error) { _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) if e1 != 0 { @@ -1308,6 +1508,21 @@ func Unlink(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Unmount(path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go index eafceb8e8..7fa205cd0 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go @@ -266,6 +266,106 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Madvise(b []byte, behav int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe() (r int, w int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) r = int(r0) @@ -829,74 +929,6 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1391,3 +1423,18 @@ func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go index f53801cee..1a0bb4cb0 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go @@ -1,5 +1,5 @@ // mksyscall.pl -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build freebsd,386 @@ -266,6 +266,106 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Madvise(b []byte, behav int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe() (r int, w int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) r = int(r0) @@ -278,6 +378,16 @@ func pipe() (r int, w int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -303,6 +413,36 @@ func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func CapEnter() (err error) { + _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func capRightsGet(version int, fd int, rightsp *CapRights) (err error) { + _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func capRightsLimit(fd int, rightsp *CapRights) (err error) { + _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Chdir(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -640,6 +780,21 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fchdir(fd int) (err error) { _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) if e1 != 0 { @@ -670,6 +825,21 @@ func Fchmod(fd int, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fchown(fd int, uid int, gid int) (err error) { _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { @@ -680,6 +850,21 @@ func Fchown(fd int, uid int, gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flock(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) if e1 != 0 { @@ -949,6 +1134,26 @@ func Link(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Listen(s int, backlog int) (err error) { _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) if e1 != 0 { @@ -989,6 +1194,21 @@ func Mkdir(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mkfifo(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1019,74 +1239,6 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1113,6 +1265,22 @@ func Open(path string, mode int, perm uint32) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Pathconf(path string, name int) (val int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1202,6 +1370,28 @@ func Readlink(path string, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Rename(from string, to string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(from) @@ -1222,6 +1412,26 @@ func Rename(from string, to string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Renameat(fromfd int, from string, tofd int, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Revoke(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1469,6 +1679,26 @@ func Symlink(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() (err error) { _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) if e1 != 0 { @@ -1532,6 +1762,21 @@ func Unlink(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Unmount(path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1615,3 +1860,18 @@ func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go index a2a5895d7..ac1e8e013 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go @@ -266,6 +266,106 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Madvise(b []byte, behav int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe() (r int, w int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) r = int(r0) @@ -278,6 +378,16 @@ func pipe() (r int, w int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -670,6 +780,21 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fchdir(fd int) (err error) { _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) if e1 != 0 { @@ -700,6 +825,21 @@ func Fchmod(fd int, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fchown(fd int, uid int, gid int) (err error) { _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { @@ -710,6 +850,21 @@ func Fchown(fd int, uid int, gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flock(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) if e1 != 0 { @@ -979,6 +1134,26 @@ func Link(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Listen(s int, backlog int) (err error) { _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) if e1 != 0 { @@ -1019,6 +1194,21 @@ func Mkdir(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mkfifo(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1049,74 +1239,6 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1248,6 +1370,28 @@ func Readlink(path string, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Rename(from string, to string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(from) @@ -1268,6 +1412,26 @@ func Rename(from string, to string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Renameat(fromfd int, from string, tofd int, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Revoke(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1515,6 +1679,26 @@ func Symlink(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() (err error) { _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) if e1 != 0 { @@ -1578,6 +1762,21 @@ func Unlink(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Unmount(path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1661,3 +1860,18 @@ func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go index 0e9b42bf4..2b4e6acf0 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go @@ -1,5 +1,5 @@ // mksyscall.pl -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build freebsd,arm @@ -266,6 +266,106 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Madvise(b []byte, behav int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe() (r int, w int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) r = int(r0) @@ -278,6 +378,16 @@ func pipe() (r int, w int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -303,6 +413,36 @@ func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func CapEnter() (err error) { + _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func capRightsGet(version int, fd int, rightsp *CapRights) (err error) { + _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func capRightsLimit(fd int, rightsp *CapRights) (err error) { + _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Chdir(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -640,6 +780,21 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fchdir(fd int) (err error) { _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) if e1 != 0 { @@ -670,6 +825,21 @@ func Fchmod(fd int, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fchown(fd int, uid int, gid int) (err error) { _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { @@ -680,6 +850,21 @@ func Fchown(fd int, uid int, gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flock(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) if e1 != 0 { @@ -949,6 +1134,26 @@ func Link(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Listen(s int, backlog int) (err error) { _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) if e1 != 0 { @@ -989,6 +1194,21 @@ func Mkdir(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mkfifo(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1019,74 +1239,6 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1113,6 +1265,22 @@ func Open(path string, mode int, perm uint32) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Pathconf(path string, name int) (val int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1202,6 +1370,28 @@ func Readlink(path string, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Rename(from string, to string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(from) @@ -1222,6 +1412,26 @@ func Rename(from string, to string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Renameat(fromfd int, from string, tofd int, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Revoke(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1469,6 +1679,26 @@ func Symlink(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() (err error) { _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) if e1 != 0 { @@ -1532,6 +1762,21 @@ func Unlink(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Unmount(path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1615,3 +1860,18 @@ func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go index 6c0845071..000a46833 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go @@ -1234,6 +1234,16 @@ func Sync() { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Syncfs(fd int) (err error) { + _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sysinfo(info *Sysinfo_t) (err error) { _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) if e1 != 0 { @@ -1436,14 +1446,8 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1452,8 +1456,30 @@ func Munlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go index f34418dd1..712dffde4 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go @@ -1234,6 +1234,16 @@ func Sync() { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Syncfs(fd int) (err error) { + _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sysinfo(info *Sysinfo_t) (err error) { _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) if e1 != 0 { @@ -1436,14 +1446,8 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1452,8 +1456,30 @@ func Munlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go index 92b4716ef..338796d90 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go @@ -1234,6 +1234,16 @@ func Sync() { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Syncfs(fd int) (err error) { + _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sysinfo(info *Sysinfo_t) (err error) { _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) if e1 != 0 { @@ -1436,14 +1446,8 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1452,8 +1456,30 @@ func Munlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go index ec5592043..fc3006d97 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go @@ -1234,6 +1234,16 @@ func Sync() { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Syncfs(fd int) (err error) { + _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sysinfo(info *Sysinfo_t) (err error) { _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) if e1 != 0 { @@ -1436,14 +1446,8 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1452,8 +1456,30 @@ func Munlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go index e6c2bf52a..4b0ef2076 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go @@ -1234,6 +1234,16 @@ func Sync() { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Syncfs(fd int) (err error) { + _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sysinfo(info *Sysinfo_t) (err error) { _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) if e1 != 0 { @@ -1436,14 +1446,8 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1452,8 +1456,30 @@ func Munlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go index f77f1d096..31eb98c7d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go @@ -1234,6 +1234,16 @@ func Sync() { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Syncfs(fd int) (err error) { + _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sysinfo(info *Sysinfo_t) (err error) { _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) if e1 != 0 { @@ -1436,14 +1446,8 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1452,8 +1456,30 @@ func Munlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go index d6ce86112..875ffa33f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go @@ -1234,6 +1234,16 @@ func Sync() { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Syncfs(fd int) (err error) { + _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sysinfo(info *Sysinfo_t) (err error) { _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) if e1 != 0 { @@ -1436,14 +1446,8 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1452,8 +1456,30 @@ func Munlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go index c0134065a..6863e81aa 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go @@ -1234,6 +1234,16 @@ func Sync() { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Syncfs(fd int) (err error) { + _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sysinfo(info *Sysinfo_t) (err error) { _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) if e1 != 0 { @@ -1436,14 +1446,8 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1452,8 +1456,30 @@ func Munlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go index 6b7a291cd..39eacd630 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -1234,6 +1234,16 @@ func Sync() { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Syncfs(fd int) (err error) { + _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sysinfo(info *Sysinfo_t) (err error) { _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) if e1 != 0 { @@ -1436,14 +1446,8 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1452,8 +1456,30 @@ func Munlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go index 7585277ed..2a79746bf 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -1234,6 +1234,16 @@ func Sync() { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Syncfs(fd int) (err error) { + _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sysinfo(info *Sysinfo_t) (err error) { _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) if e1 != 0 { @@ -1436,14 +1446,8 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1452,8 +1456,30 @@ func Munlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go index 987ce8664..49021966f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go @@ -1234,6 +1234,16 @@ func Sync() { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Syncfs(fd int) (err error) { + _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sysinfo(info *Sysinfo_t) (err error) { _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) if e1 != 0 { @@ -1436,14 +1446,8 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1452,8 +1456,30 @@ func Munlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go index 3182345ec..db99fd0c9 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go @@ -1,5 +1,5 @@ // mksyscall.pl -l32 -netbsd -tags netbsd,386 syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build netbsd,386 @@ -266,6 +266,106 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Madvise(b []byte, behav int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe() (fd1 int, fd2 int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) fd1 = int(r0) @@ -777,74 +877,6 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1297,3 +1329,18 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) { } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go index 74ba8189a..7b6c2c87e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go @@ -1,5 +1,5 @@ // mksyscall.pl -netbsd -tags netbsd,amd64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build netbsd,amd64 @@ -266,6 +266,106 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Madvise(b []byte, behav int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe() (fd1 int, fd2 int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) fd1 = int(r0) @@ -777,74 +877,6 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1297,3 +1329,18 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) { } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go index 1f346e2f5..0f4cc3b52 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go @@ -1,5 +1,5 @@ -// mksyscall.pl -l32 -arm -tags netbsd,arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// mksyscall.pl -l32 -netbsd -arm -tags netbsd,arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go +// Code generated by the command above; see README.md. DO NOT EDIT. // +build netbsd,arm @@ -266,6 +266,106 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Madvise(b []byte, behav int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe() (fd1 int, fd2 int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) fd1 = int(r0) @@ -777,74 +877,6 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1297,3 +1329,18 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) { } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index ca3e81392..7baea87c7 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -1,5 +1,5 @@ // mksyscall.pl -l32 -openbsd -tags openbsd,386 syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build openbsd,386 @@ -266,6 +266,106 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Madvise(b []byte, behav int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe(p *[2]_C_int) (err error) { _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) if e1 != 0 { @@ -785,74 +885,6 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1355,3 +1387,18 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) { } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index bf63d552e..0d69ce6b5 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -1,5 +1,5 @@ // mksyscall.pl -openbsd -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build openbsd,amd64 @@ -266,6 +266,106 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Madvise(b []byte, behav int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe(p *[2]_C_int) (err error) { _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) if e1 != 0 { @@ -785,74 +885,6 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1355,3 +1387,18 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) { } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go new file mode 100644 index 000000000..41572c26e --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -0,0 +1,1404 @@ +// mksyscall.pl -l32 -openbsd -arm -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go +// Code generated by the command above; see README.md. DO NOT EDIT. + +// +build openbsd,arm + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, behav int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]_C_int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0) + newoffset = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go index d1ed02103..32b0209a5 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go @@ -43,6 +43,7 @@ import ( //go:cgo_import_dynamic libc_fchown fchown "libc.so" //go:cgo_import_dynamic libc_fchownat fchownat "libc.so" //go:cgo_import_dynamic libc_fdatasync fdatasync "libc.so" +//go:cgo_import_dynamic libc_flock flock "libc.so" //go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so" //go:cgo_import_dynamic libc_fstat fstat "libc.so" //go:cgo_import_dynamic libc_fstatvfs fstatvfs "libc.so" @@ -128,7 +129,6 @@ import ( //go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so" //go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so" //go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so" -//go:cgo_import_dynamic libc_sysconf sysconf "libc.so" //go:linkname procpipe libc_pipe //go:linkname procgetsockname libc_getsockname @@ -163,6 +163,7 @@ import ( //go:linkname procFchown libc_fchown //go:linkname procFchownat libc_fchownat //go:linkname procFdatasync libc_fdatasync +//go:linkname procFlock libc_flock //go:linkname procFpathconf libc_fpathconf //go:linkname procFstat libc_fstat //go:linkname procFstatvfs libc_fstatvfs @@ -248,7 +249,6 @@ import ( //go:linkname procgetpeername libc_getpeername //go:linkname procsetsockopt libc_setsockopt //go:linkname procrecvfrom libc_recvfrom -//go:linkname procsysconf libc_sysconf var ( procpipe, @@ -284,6 +284,7 @@ var ( procFchown, procFchownat, procFdatasync, + procFlock, procFpathconf, procFstat, procFstatvfs, @@ -368,8 +369,7 @@ var ( proc__xnet_getsockopt, procgetpeername, procsetsockopt, - procrecvfrom, - procsysconf syscallFunc + procrecvfrom syscallFunc ) func pipe(p *[2]_C_int) (n int, err error) { @@ -702,6 +702,14 @@ func Fdatasync(fd int) (err error) { return } +func Flock(fd int, how int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFlock)), 2, uintptr(fd), uintptr(how), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + func Fpathconf(fd int, name int) (val int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0) val = int(r0) @@ -1578,12 +1586,3 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl } return } - -func sysconf(name int) (n int64, err error) { - r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsysconf)), 1, uintptr(name), 0, 0, 0, 0, 0) - n = int64(r0) - if e1 != 0 { - err = e1 - } - return -} diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go index b8c9aea85..41cb6ed39 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go @@ -1,5 +1,5 @@ -// mksysnum_darwin.pl /usr/include/sys/syscall.h -// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT +// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/sys/syscall.h +// Code generated by the command above; see README.md. DO NOT EDIT. // +build arm,darwin @@ -121,12 +121,14 @@ const ( SYS_CSOPS = 169 SYS_CSOPS_AUDITTOKEN = 170 SYS_WAITID = 173 + SYS_KDEBUG_TYPEFILTER = 177 + SYS_KDEBUG_TRACE_STRING = 178 + SYS_KDEBUG_TRACE64 = 179 SYS_KDEBUG_TRACE = 180 SYS_SETGID = 181 SYS_SETEGID = 182 SYS_SETEUID = 183 SYS_SIGRETURN = 184 - SYS_CHUD = 185 SYS_FDATASYNC = 187 SYS_STAT = 188 SYS_FSTAT = 189 @@ -140,17 +142,10 @@ const ( SYS_LSEEK = 199 SYS_TRUNCATE = 200 SYS_FTRUNCATE = 201 - SYS___SYSCTL = 202 + SYS_SYSCTL = 202 SYS_MLOCK = 203 SYS_MUNLOCK = 204 SYS_UNDELETE = 205 - SYS_ATSOCKET = 206 - SYS_ATGETMSG = 207 - SYS_ATPUTMSG = 208 - SYS_ATPSNDREQ = 209 - SYS_ATPSNDRSP = 210 - SYS_ATPGETREQ = 211 - SYS_ATPGETRSP = 212 SYS_OPEN_DPROTECTED_NP = 216 SYS_GETATTRLIST = 220 SYS_SETATTRLIST = 221 @@ -202,9 +197,7 @@ const ( SYS_SEM_WAIT = 271 SYS_SEM_TRYWAIT = 272 SYS_SEM_POST = 273 - SYS_SEM_GETVALUE = 274 - SYS_SEM_INIT = 275 - SYS_SEM_DESTROY = 276 + SYS_SYSCTLBYNAME = 274 SYS_OPEN_EXTENDED = 277 SYS_UMASK_EXTENDED = 278 SYS_STAT_EXTENDED = 279 @@ -286,7 +279,6 @@ const ( SYS_KQUEUE = 362 SYS_KEVENT = 363 SYS_LCHOWN = 364 - SYS_STACK_SNAPSHOT = 365 SYS_BSDTHREAD_REGISTER = 366 SYS_WORKQ_OPEN = 367 SYS_WORKQ_KERNRETURN = 368 @@ -295,6 +287,7 @@ const ( SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371 SYS_THREAD_SELFID = 372 SYS_LEDGER = 373 + SYS_KEVENT_QOS = 374 SYS___MAC_EXECVE = 380 SYS___MAC_SYSCALL = 381 SYS___MAC_GET_FILE = 382 @@ -306,11 +299,8 @@ const ( SYS___MAC_GET_FD = 388 SYS___MAC_SET_FD = 389 SYS___MAC_GET_PID = 390 - SYS___MAC_GET_LCID = 391 - SYS___MAC_GET_LCTX = 392 - SYS___MAC_SET_LCTX = 393 - SYS_SETLCID = 394 - SYS_GETLCID = 395 + SYS_PSELECT = 394 + SYS_PSELECT_NOCANCEL = 395 SYS_READ_NOCANCEL = 396 SYS_WRITE_NOCANCEL = 397 SYS_OPEN_NOCANCEL = 398 @@ -354,5 +344,83 @@ const ( SYS_PID_SHUTDOWN_SOCKETS = 436 SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438 SYS_KAS_INFO = 439 - SYS_MAXSYSCALL = 440 + SYS_MEMORYSTATUS_CONTROL = 440 + SYS_GUARDED_OPEN_NP = 441 + SYS_GUARDED_CLOSE_NP = 442 + SYS_GUARDED_KQUEUE_NP = 443 + SYS_CHANGE_FDGUARD_NP = 444 + SYS_USRCTL = 445 + SYS_PROC_RLIMIT_CONTROL = 446 + SYS_CONNECTX = 447 + SYS_DISCONNECTX = 448 + SYS_PEELOFF = 449 + SYS_SOCKET_DELEGATE = 450 + SYS_TELEMETRY = 451 + SYS_PROC_UUID_POLICY = 452 + SYS_MEMORYSTATUS_GET_LEVEL = 453 + SYS_SYSTEM_OVERRIDE = 454 + SYS_VFS_PURGE = 455 + SYS_SFI_CTL = 456 + SYS_SFI_PIDCTL = 457 + SYS_COALITION = 458 + SYS_COALITION_INFO = 459 + SYS_NECP_MATCH_POLICY = 460 + SYS_GETATTRLISTBULK = 461 + SYS_CLONEFILEAT = 462 + SYS_OPENAT = 463 + SYS_OPENAT_NOCANCEL = 464 + SYS_RENAMEAT = 465 + SYS_FACCESSAT = 466 + SYS_FCHMODAT = 467 + SYS_FCHOWNAT = 468 + SYS_FSTATAT = 469 + SYS_FSTATAT64 = 470 + SYS_LINKAT = 471 + SYS_UNLINKAT = 472 + SYS_READLINKAT = 473 + SYS_SYMLINKAT = 474 + SYS_MKDIRAT = 475 + SYS_GETATTRLISTAT = 476 + SYS_PROC_TRACE_LOG = 477 + SYS_BSDTHREAD_CTL = 478 + SYS_OPENBYID_NP = 479 + SYS_RECVMSG_X = 480 + SYS_SENDMSG_X = 481 + SYS_THREAD_SELFUSAGE = 482 + SYS_CSRCTL = 483 + SYS_GUARDED_OPEN_DPROTECTED_NP = 484 + SYS_GUARDED_WRITE_NP = 485 + SYS_GUARDED_PWRITE_NP = 486 + SYS_GUARDED_WRITEV_NP = 487 + SYS_RENAMEATX_NP = 488 + SYS_MREMAP_ENCRYPTED = 489 + SYS_NETAGENT_TRIGGER = 490 + SYS_STACK_SNAPSHOT_WITH_CONFIG = 491 + SYS_MICROSTACKSHOT = 492 + SYS_GRAB_PGO_DATA = 493 + SYS_PERSONA = 494 + SYS_WORK_INTERVAL_CTL = 499 + SYS_GETENTROPY = 500 + SYS_NECP_OPEN = 501 + SYS_NECP_CLIENT_ACTION = 502 + SYS___NEXUS_OPEN = 503 + SYS___NEXUS_REGISTER = 504 + SYS___NEXUS_DEREGISTER = 505 + SYS___NEXUS_CREATE = 506 + SYS___NEXUS_DESTROY = 507 + SYS___NEXUS_GET_OPT = 508 + SYS___NEXUS_SET_OPT = 509 + SYS___CHANNEL_OPEN = 510 + SYS___CHANNEL_GET_INFO = 511 + SYS___CHANNEL_SYNC = 512 + SYS___CHANNEL_GET_OPT = 513 + SYS___CHANNEL_SET_OPT = 514 + SYS_ULOCK_WAIT = 515 + SYS_ULOCK_WAKE = 516 + SYS_FCLONEFILEAT = 517 + SYS_FS_SNAPSHOT = 518 + SYS_TERMINATE_WITH_PAYLOAD = 520 + SYS_ABORT_WITH_PAYLOAD = 521 + SYS_MAXSYSCALL = 522 + SYS_INVALID = 63 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go index 26677ebbf..075816c34 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go @@ -1,5 +1,5 @@ -// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/include/sys/syscall.h -// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT +// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/sys/syscall.h +// Code generated by the command above; see README.md. DO NOT EDIT. // +build arm64,darwin @@ -121,13 +121,14 @@ const ( SYS_CSOPS = 169 SYS_CSOPS_AUDITTOKEN = 170 SYS_WAITID = 173 + SYS_KDEBUG_TYPEFILTER = 177 + SYS_KDEBUG_TRACE_STRING = 178 SYS_KDEBUG_TRACE64 = 179 SYS_KDEBUG_TRACE = 180 SYS_SETGID = 181 SYS_SETEGID = 182 SYS_SETEUID = 183 SYS_SIGRETURN = 184 - SYS_CHUD = 185 SYS_FDATASYNC = 187 SYS_STAT = 188 SYS_FSTAT = 189 @@ -278,7 +279,6 @@ const ( SYS_KQUEUE = 362 SYS_KEVENT = 363 SYS_LCHOWN = 364 - SYS_STACK_SNAPSHOT = 365 SYS_BSDTHREAD_REGISTER = 366 SYS_WORKQ_OPEN = 367 SYS_WORKQ_KERNRETURN = 368 @@ -287,6 +287,7 @@ const ( SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371 SYS_THREAD_SELFID = 372 SYS_LEDGER = 373 + SYS_KEVENT_QOS = 374 SYS___MAC_EXECVE = 380 SYS___MAC_SYSCALL = 381 SYS___MAC_GET_FILE = 382 @@ -298,11 +299,8 @@ const ( SYS___MAC_GET_FD = 388 SYS___MAC_SET_FD = 389 SYS___MAC_GET_PID = 390 - SYS___MAC_GET_LCID = 391 - SYS___MAC_GET_LCTX = 392 - SYS___MAC_SET_LCTX = 393 - SYS_SETLCID = 394 - SYS_GETLCID = 395 + SYS_PSELECT = 394 + SYS_PSELECT_NOCANCEL = 395 SYS_READ_NOCANCEL = 396 SYS_WRITE_NOCANCEL = 397 SYS_OPEN_NOCANCEL = 398 @@ -351,6 +349,7 @@ const ( SYS_GUARDED_CLOSE_NP = 442 SYS_GUARDED_KQUEUE_NP = 443 SYS_CHANGE_FDGUARD_NP = 444 + SYS_USRCTL = 445 SYS_PROC_RLIMIT_CONTROL = 446 SYS_CONNECTX = 447 SYS_DISCONNECTX = 448 @@ -367,6 +366,7 @@ const ( SYS_COALITION_INFO = 459 SYS_NECP_MATCH_POLICY = 460 SYS_GETATTRLISTBULK = 461 + SYS_CLONEFILEAT = 462 SYS_OPENAT = 463 SYS_OPENAT_NOCANCEL = 464 SYS_RENAMEAT = 465 @@ -392,7 +392,35 @@ const ( SYS_GUARDED_WRITE_NP = 485 SYS_GUARDED_PWRITE_NP = 486 SYS_GUARDED_WRITEV_NP = 487 - SYS_RENAME_EXT = 488 + SYS_RENAMEATX_NP = 488 SYS_MREMAP_ENCRYPTED = 489 - SYS_MAXSYSCALL = 490 + SYS_NETAGENT_TRIGGER = 490 + SYS_STACK_SNAPSHOT_WITH_CONFIG = 491 + SYS_MICROSTACKSHOT = 492 + SYS_GRAB_PGO_DATA = 493 + SYS_PERSONA = 494 + SYS_WORK_INTERVAL_CTL = 499 + SYS_GETENTROPY = 500 + SYS_NECP_OPEN = 501 + SYS_NECP_CLIENT_ACTION = 502 + SYS___NEXUS_OPEN = 503 + SYS___NEXUS_REGISTER = 504 + SYS___NEXUS_DEREGISTER = 505 + SYS___NEXUS_CREATE = 506 + SYS___NEXUS_DESTROY = 507 + SYS___NEXUS_GET_OPT = 508 + SYS___NEXUS_SET_OPT = 509 + SYS___CHANNEL_OPEN = 510 + SYS___CHANNEL_GET_INFO = 511 + SYS___CHANNEL_SYNC = 512 + SYS___CHANNEL_GET_OPT = 513 + SYS___CHANNEL_SET_OPT = 514 + SYS_ULOCK_WAIT = 515 + SYS_ULOCK_WAKE = 516 + SYS_FCLONEFILEAT = 517 + SYS_FS_SNAPSHOT = 518 + SYS_TERMINATE_WITH_PAYLOAD = 520 + SYS_ABORT_WITH_PAYLOAD = 521 + SYS_MAXSYSCALL = 522 + SYS_INVALID = 63 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go index 262a84536..b64a8122c 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go @@ -1,5 +1,5 @@ // mksysnum_freebsd.pl -// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build 386,freebsd @@ -7,345 +7,347 @@ package unix const ( // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int - SYS_EXIT = 1 // { void sys_exit(int rval); } exit \ - SYS_FORK = 2 // { int fork(void); } - SYS_READ = 3 // { ssize_t read(int fd, void *buf, \ - SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \ - SYS_OPEN = 5 // { int open(char *path, int flags, int mode); } - SYS_CLOSE = 6 // { int close(int fd); } - SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \ - SYS_LINK = 9 // { int link(char *path, char *link); } - SYS_UNLINK = 10 // { int unlink(char *path); } - SYS_CHDIR = 12 // { int chdir(char *path); } - SYS_FCHDIR = 13 // { int fchdir(int fd); } - SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); } - SYS_CHMOD = 15 // { int chmod(char *path, int mode); } - SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } - SYS_OBREAK = 17 // { int obreak(char *nsize); } break \ - SYS_GETPID = 20 // { pid_t getpid(void); } - SYS_MOUNT = 21 // { int mount(char *type, char *path, \ - SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); } - SYS_SETUID = 23 // { int setuid(uid_t uid); } - SYS_GETUID = 24 // { uid_t getuid(void); } - SYS_GETEUID = 25 // { uid_t geteuid(void); } - SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \ - SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \ - SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \ - SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \ - SYS_ACCEPT = 30 // { int accept(int s, \ - SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \ - SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \ - SYS_ACCESS = 33 // { int access(char *path, int amode); } - SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); } - SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); } - SYS_SYNC = 36 // { int sync(void); } - SYS_KILL = 37 // { int kill(int pid, int signum); } - SYS_GETPPID = 39 // { pid_t getppid(void); } - SYS_DUP = 41 // { int dup(u_int fd); } - SYS_PIPE = 42 // { int pipe(void); } - SYS_GETEGID = 43 // { gid_t getegid(void); } - SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \ - SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \ - SYS_GETGID = 47 // { gid_t getgid(void); } - SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \ - SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); } - SYS_ACCT = 51 // { int acct(char *path); } - SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \ - SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \ - SYS_REBOOT = 55 // { int reboot(int opt); } - SYS_REVOKE = 56 // { int revoke(char *path); } - SYS_SYMLINK = 57 // { int symlink(char *path, char *link); } - SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \ - SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \ - SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \ - SYS_CHROOT = 61 // { int chroot(char *path); } - SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \ - SYS_VFORK = 66 // { int vfork(void); } - SYS_SBRK = 69 // { int sbrk(int incr); } - SYS_SSTK = 70 // { int sstk(int incr); } - SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \ - SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); } - SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \ - SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \ - SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \ - SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \ - SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \ - SYS_GETPGRP = 81 // { int getpgrp(void); } - SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); } - SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \ - SYS_SWAPON = 85 // { int swapon(char *name); } - SYS_GETITIMER = 86 // { int getitimer(u_int which, \ - SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); } - SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); } - SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); } - SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \ - SYS_FSYNC = 95 // { int fsync(int fd); } - SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \ - SYS_SOCKET = 97 // { int socket(int domain, int type, \ - SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \ - SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); } - SYS_BIND = 104 // { int bind(int s, caddr_t name, \ - SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \ - SYS_LISTEN = 106 // { int listen(int s, int backlog); } - SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \ - SYS_GETRUSAGE = 117 // { int getrusage(int who, \ - SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \ - SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \ - SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \ - SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \ - SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); } - SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); } - SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); } - SYS_SETREGID = 127 // { int setregid(int rgid, int egid); } - SYS_RENAME = 128 // { int rename(char *from, char *to); } - SYS_FLOCK = 131 // { int flock(int fd, int how); } - SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); } - SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \ - SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } - SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \ - SYS_MKDIR = 136 // { int mkdir(char *path, int mode); } - SYS_RMDIR = 137 // { int rmdir(char *path); } - SYS_UTIMES = 138 // { int utimes(char *path, \ - SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \ - SYS_SETSID = 147 // { int setsid(void); } - SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \ - SYS_LGETFH = 160 // { int lgetfh(char *fname, \ - SYS_GETFH = 161 // { int getfh(char *fname, \ - SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } - SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \ - SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \ - SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \ - SYS_SETFIB = 175 // { int setfib(int fibnum); } - SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } - SYS_SETGID = 181 // { int setgid(gid_t gid); } - SYS_SETEGID = 182 // { int setegid(gid_t egid); } - SYS_SETEUID = 183 // { int seteuid(uid_t euid); } - SYS_STAT = 188 // { int stat(char *path, struct stat *ub); } - SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); } - SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); } - SYS_PATHCONF = 191 // { int pathconf(char *path, int name); } - SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); } - SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \ - SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \ - SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \ - SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \ - SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \ - SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \ - SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \ - SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \ - SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); } - SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); } - SYS_UNDELETE = 205 // { int undelete(char *path); } - SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); } - SYS_GETPGID = 207 // { int getpgid(pid_t pid); } - SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \ - SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \ - SYS_CLOCK_SETTIME = 233 // { int clock_settime( \ - SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \ - SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \ - SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); } - SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \ - SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \ - SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); } - SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \ - SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); } - SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \ - SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \ - SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\ - SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); } - SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \ - SYS_RFORK = 251 // { int rfork(int flags); } - SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \ - SYS_ISSETUGID = 253 // { int issetugid(void); } - SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } - SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \ - SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } - SYS_LUTIMES = 276 // { int lutimes(char *path, \ - SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); } - SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); } - SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); } - SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \ - SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \ - SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \ - SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \ - SYS_MODNEXT = 300 // { int modnext(int modid); } - SYS_MODSTAT = 301 // { int modstat(int modid, \ - SYS_MODFNEXT = 302 // { int modfnext(int modid); } - SYS_MODFIND = 303 // { int modfind(const char *name); } - SYS_KLDLOAD = 304 // { int kldload(const char *file); } - SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); } - SYS_KLDFIND = 306 // { int kldfind(const char *file); } - SYS_KLDNEXT = 307 // { int kldnext(int fileid); } - SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \ - SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); } - SYS_GETSID = 310 // { int getsid(pid_t pid); } - SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \ - SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \ - SYS_YIELD = 321 // { int yield(void); } - SYS_MLOCKALL = 324 // { int mlockall(int how); } - SYS_MUNLOCKALL = 325 // { int munlockall(void); } - SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); } - SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \ - SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \ - SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \ - SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); } - SYS_SCHED_YIELD = 331 // { int sched_yield (void); } - SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); } - SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); } - SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \ - SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); } - SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \ - SYS_JAIL = 338 // { int jail(struct jail *jail); } - SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \ - SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); } - SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); } - SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \ - SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \ - SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \ - SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \ - SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \ - SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \ - SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \ - SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \ - SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \ - SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \ - SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \ - SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \ - SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \ - SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \ - SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \ - SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \ - SYS_KQUEUE = 362 // { int kqueue(void); } - SYS_KEVENT = 363 // { int kevent(int fd, \ - SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \ - SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \ - SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \ - SYS___SETUGID = 374 // { int __setugid(int flag); } - SYS_EACCESS = 376 // { int eaccess(char *path, int amode); } - SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \ - SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); } - SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); } - SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \ - SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \ - SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \ - SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \ - SYS_KENV = 390 // { int kenv(int what, const char *name, \ - SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \ - SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \ - SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \ - SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \ - SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \ - SYS_STATFS = 396 // { int statfs(char *path, \ - SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); } - SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \ - SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \ - SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \ - SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \ - SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \ - SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \ - SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \ - SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \ - SYS_SIGACTION = 416 // { int sigaction(int sig, \ - SYS_SIGRETURN = 417 // { int sigreturn( \ - SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); } - SYS_SETCONTEXT = 422 // { int setcontext( \ - SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \ - SYS_SWAPOFF = 424 // { int swapoff(const char *name); } - SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \ - SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \ - SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \ - SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \ - SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \ - SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \ - SYS_THR_EXIT = 431 // { void thr_exit(long *state); } - SYS_THR_SELF = 432 // { int thr_self(long *id); } - SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); } - SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); } - SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); } - SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); } - SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \ - SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \ - SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \ - SYS_THR_SUSPEND = 442 // { int thr_suspend( \ - SYS_THR_WAKE = 443 // { int thr_wake(long id); } - SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); } - SYS_AUDIT = 445 // { int audit(const void *record, \ - SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \ - SYS_GETAUID = 447 // { int getauid(uid_t *auid); } - SYS_SETAUID = 448 // { int setauid(uid_t *auid); } - SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); } - SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); } - SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \ - SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \ - SYS_AUDITCTL = 453 // { int auditctl(char *path); } - SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \ - SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \ - SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); } - SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); } - SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); } - SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \ - SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); } - SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ - SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \ - SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ - SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \ - SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \ - SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \ - SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \ - SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); } - SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); } - SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); } - SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \ - SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); } - SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); } - SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \ - SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \ - SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \ - SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \ - SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \ - SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \ - SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \ - SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \ - SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \ - SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \ - SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \ - SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); } - SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); } - SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \ - SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \ - SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \ - SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \ - SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \ - SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); } - SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); } - SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \ - SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \ - SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); } - SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); } - SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); } - SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); } - SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \ - SYS_CAP_ENTER = 516 // { int cap_enter(void); } - SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); } - SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); } - SYS_PDKILL = 519 // { int pdkill(int fd, int signum); } - SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); } - SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \ - SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \ - SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); } - SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \ - SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \ - SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \ - SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \ - SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \ - SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \ - SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \ - SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \ - SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \ - SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \ - SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \ - SYS_ACCEPT4 = 541 // { int accept4(int s, \ - SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); } - SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \ - SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \ + SYS_EXIT = 1 // { void sys_exit(int rval); } exit \ + SYS_FORK = 2 // { int fork(void); } + SYS_READ = 3 // { ssize_t read(int fd, void *buf, \ + SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \ + SYS_OPEN = 5 // { int open(char *path, int flags, int mode); } + SYS_CLOSE = 6 // { int close(int fd); } + SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \ + SYS_LINK = 9 // { int link(char *path, char *link); } + SYS_UNLINK = 10 // { int unlink(char *path); } + SYS_CHDIR = 12 // { int chdir(char *path); } + SYS_FCHDIR = 13 // { int fchdir(int fd); } + SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); } + SYS_CHMOD = 15 // { int chmod(char *path, int mode); } + SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } + SYS_OBREAK = 17 // { int obreak(char *nsize); } break \ + SYS_GETPID = 20 // { pid_t getpid(void); } + SYS_MOUNT = 21 // { int mount(char *type, char *path, \ + SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); } + SYS_SETUID = 23 // { int setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t getuid(void); } + SYS_GETEUID = 25 // { uid_t geteuid(void); } + SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \ + SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \ + SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \ + SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \ + SYS_ACCEPT = 30 // { int accept(int s, \ + SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \ + SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \ + SYS_ACCESS = 33 // { int access(char *path, int amode); } + SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); } + SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); } + SYS_SYNC = 36 // { int sync(void); } + SYS_KILL = 37 // { int kill(int pid, int signum); } + SYS_GETPPID = 39 // { pid_t getppid(void); } + SYS_DUP = 41 // { int dup(u_int fd); } + SYS_PIPE = 42 // { int pipe(void); } + SYS_GETEGID = 43 // { gid_t getegid(void); } + SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \ + SYS_GETGID = 47 // { gid_t getgid(void); } + SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \ + SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); } + SYS_ACCT = 51 // { int acct(char *path); } + SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \ + SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \ + SYS_REBOOT = 55 // { int reboot(int opt); } + SYS_REVOKE = 56 // { int revoke(char *path); } + SYS_SYMLINK = 57 // { int symlink(char *path, char *link); } + SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \ + SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \ + SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \ + SYS_CHROOT = 61 // { int chroot(char *path); } + SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \ + SYS_VFORK = 66 // { int vfork(void); } + SYS_SBRK = 69 // { int sbrk(int incr); } + SYS_SSTK = 70 // { int sstk(int incr); } + SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \ + SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \ + SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \ + SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \ + SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \ + SYS_GETPGRP = 81 // { int getpgrp(void); } + SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); } + SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \ + SYS_SWAPON = 85 // { int swapon(char *name); } + SYS_GETITIMER = 86 // { int getitimer(u_int which, \ + SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); } + SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); } + SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); } + SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \ + SYS_FSYNC = 95 // { int fsync(int fd); } + SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \ + SYS_SOCKET = 97 // { int socket(int domain, int type, \ + SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \ + SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); } + SYS_BIND = 104 // { int bind(int s, caddr_t name, \ + SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int listen(int s, int backlog); } + SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \ + SYS_GETRUSAGE = 117 // { int getrusage(int who, \ + SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \ + SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \ + SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \ + SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); } + SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); } + SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); } + SYS_SETREGID = 127 // { int setregid(int rgid, int egid); } + SYS_RENAME = 128 // { int rename(char *from, char *to); } + SYS_FLOCK = 131 // { int flock(int fd, int how); } + SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); } + SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \ + SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \ + SYS_MKDIR = 136 // { int mkdir(char *path, int mode); } + SYS_RMDIR = 137 // { int rmdir(char *path); } + SYS_UTIMES = 138 // { int utimes(char *path, \ + SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \ + SYS_SETSID = 147 // { int setsid(void); } + SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \ + SYS_LGETFH = 160 // { int lgetfh(char *fname, \ + SYS_GETFH = 161 // { int getfh(char *fname, \ + SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } + SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \ + SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \ + SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \ + SYS_SETFIB = 175 // { int setfib(int fibnum); } + SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int setgid(gid_t gid); } + SYS_SETEGID = 182 // { int setegid(gid_t egid); } + SYS_SETEUID = 183 // { int seteuid(uid_t euid); } + SYS_STAT = 188 // { int stat(char *path, struct stat *ub); } + SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); } + SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); } + SYS_PATHCONF = 191 // { int pathconf(char *path, int name); } + SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \ + SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \ + SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \ + SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \ + SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \ + SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \ + SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \ + SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \ + SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int undelete(char *path); } + SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); } + SYS_GETPGID = 207 // { int getpgid(pid_t pid); } + SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \ + SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 233 // { int clock_settime( \ + SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \ + SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \ + SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); } + SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \ + SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \ + SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); } + SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \ + SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); } + SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \ + SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \ + SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\ + SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); } + SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \ + SYS_RFORK = 251 // { int rfork(int flags); } + SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \ + SYS_ISSETUGID = 253 // { int issetugid(void); } + SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } + SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \ + SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } + SYS_LUTIMES = 276 // { int lutimes(char *path, \ + SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); } + SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); } + SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); } + SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \ + SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \ + SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \ + SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \ + SYS_MODNEXT = 300 // { int modnext(int modid); } + SYS_MODSTAT = 301 // { int modstat(int modid, \ + SYS_MODFNEXT = 302 // { int modfnext(int modid); } + SYS_MODFIND = 303 // { int modfind(const char *name); } + SYS_KLDLOAD = 304 // { int kldload(const char *file); } + SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); } + SYS_KLDFIND = 306 // { int kldfind(const char *file); } + SYS_KLDNEXT = 307 // { int kldnext(int fileid); } + SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \ + SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); } + SYS_GETSID = 310 // { int getsid(pid_t pid); } + SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \ + SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \ + SYS_YIELD = 321 // { int yield(void); } + SYS_MLOCKALL = 324 // { int mlockall(int how); } + SYS_MUNLOCKALL = 325 // { int munlockall(void); } + SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); } + SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \ + SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \ + SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \ + SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); } + SYS_SCHED_YIELD = 331 // { int sched_yield (void); } + SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); } + SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); } + SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \ + SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); } + SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \ + SYS_JAIL = 338 // { int jail(struct jail *jail); } + SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \ + SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); } + SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); } + SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \ + SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \ + SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \ + SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \ + SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \ + SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \ + SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \ + SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \ + SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \ + SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \ + SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \ + SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \ + SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \ + SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \ + SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \ + SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \ + SYS_KQUEUE = 362 // { int kqueue(void); } + SYS_KEVENT = 363 // { int kevent(int fd, \ + SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \ + SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \ + SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \ + SYS___SETUGID = 374 // { int __setugid(int flag); } + SYS_EACCESS = 376 // { int eaccess(char *path, int amode); } + SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \ + SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); } + SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); } + SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \ + SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \ + SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \ + SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \ + SYS_KENV = 390 // { int kenv(int what, const char *name, \ + SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \ + SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \ + SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \ + SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \ + SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \ + SYS_STATFS = 396 // { int statfs(char *path, \ + SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \ + SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \ + SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \ + SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \ + SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \ + SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \ + SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \ + SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \ + SYS_SIGACTION = 416 // { int sigaction(int sig, \ + SYS_SIGRETURN = 417 // { int sigreturn( \ + SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); } + SYS_SETCONTEXT = 422 // { int setcontext( \ + SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \ + SYS_SWAPOFF = 424 // { int swapoff(const char *name); } + SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \ + SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \ + SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \ + SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \ + SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \ + SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \ + SYS_THR_EXIT = 431 // { void thr_exit(long *state); } + SYS_THR_SELF = 432 // { int thr_self(long *id); } + SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); } + SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); } + SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); } + SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); } + SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \ + SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \ + SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \ + SYS_THR_SUSPEND = 442 // { int thr_suspend( \ + SYS_THR_WAKE = 443 // { int thr_wake(long id); } + SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); } + SYS_AUDIT = 445 // { int audit(const void *record, \ + SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \ + SYS_GETAUID = 447 // { int getauid(uid_t *auid); } + SYS_SETAUID = 448 // { int setauid(uid_t *auid); } + SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); } + SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); } + SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \ + SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \ + SYS_AUDITCTL = 453 // { int auditctl(char *path); } + SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \ + SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \ + SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); } + SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); } + SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); } + SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \ + SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \ + SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \ + SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \ + SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \ + SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); } + SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); } + SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); } + SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \ + SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); } + SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); } + SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \ + SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \ + SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \ + SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \ + SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \ + SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \ + SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \ + SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \ + SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \ + SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \ + SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \ + SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); } + SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); } + SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \ + SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \ + SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \ + SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \ + SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \ + SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); } + SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); } + SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \ + SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \ + SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); } + SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); } + SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); } + SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, \ + SYS_CAP_ENTER = 516 // { int cap_enter(void); } + SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); } + SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); } + SYS_PDKILL = 519 // { int pdkill(int fd, int signum); } + SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); } + SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \ + SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \ + SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); } + SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \ + SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \ + SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \ + SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \ + SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \ + SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \ + SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \ + SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \ + SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, \ + SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, \ + SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, \ + SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, \ + SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, \ + SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \ + SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \ + SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \ + SYS_ACCEPT4 = 541 // { int accept4(int s, \ + SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); } + SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \ + SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \ + SYS_FUTIMENS = 546 // { int futimens(int fd, \ + SYS_UTIMENSAT = 547 // { int utimensat(int fd, \ ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go index 206b9f612..448831418 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go @@ -1,5 +1,5 @@ // mksysnum_freebsd.pl -// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build arm,freebsd @@ -7,345 +7,347 @@ package unix const ( // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int - SYS_EXIT = 1 // { void sys_exit(int rval); } exit \ - SYS_FORK = 2 // { int fork(void); } - SYS_READ = 3 // { ssize_t read(int fd, void *buf, \ - SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \ - SYS_OPEN = 5 // { int open(char *path, int flags, int mode); } - SYS_CLOSE = 6 // { int close(int fd); } - SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \ - SYS_LINK = 9 // { int link(char *path, char *link); } - SYS_UNLINK = 10 // { int unlink(char *path); } - SYS_CHDIR = 12 // { int chdir(char *path); } - SYS_FCHDIR = 13 // { int fchdir(int fd); } - SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); } - SYS_CHMOD = 15 // { int chmod(char *path, int mode); } - SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } - SYS_OBREAK = 17 // { int obreak(char *nsize); } break \ - SYS_GETPID = 20 // { pid_t getpid(void); } - SYS_MOUNT = 21 // { int mount(char *type, char *path, \ - SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); } - SYS_SETUID = 23 // { int setuid(uid_t uid); } - SYS_GETUID = 24 // { uid_t getuid(void); } - SYS_GETEUID = 25 // { uid_t geteuid(void); } - SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \ - SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \ - SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \ - SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \ - SYS_ACCEPT = 30 // { int accept(int s, \ - SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \ - SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \ - SYS_ACCESS = 33 // { int access(char *path, int amode); } - SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); } - SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); } - SYS_SYNC = 36 // { int sync(void); } - SYS_KILL = 37 // { int kill(int pid, int signum); } - SYS_GETPPID = 39 // { pid_t getppid(void); } - SYS_DUP = 41 // { int dup(u_int fd); } - SYS_PIPE = 42 // { int pipe(void); } - SYS_GETEGID = 43 // { gid_t getegid(void); } - SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \ - SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \ - SYS_GETGID = 47 // { gid_t getgid(void); } - SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \ - SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); } - SYS_ACCT = 51 // { int acct(char *path); } - SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \ - SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \ - SYS_REBOOT = 55 // { int reboot(int opt); } - SYS_REVOKE = 56 // { int revoke(char *path); } - SYS_SYMLINK = 57 // { int symlink(char *path, char *link); } - SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \ - SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \ - SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \ - SYS_CHROOT = 61 // { int chroot(char *path); } - SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \ - SYS_VFORK = 66 // { int vfork(void); } - SYS_SBRK = 69 // { int sbrk(int incr); } - SYS_SSTK = 70 // { int sstk(int incr); } - SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \ - SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); } - SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \ - SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \ - SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \ - SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \ - SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \ - SYS_GETPGRP = 81 // { int getpgrp(void); } - SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); } - SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \ - SYS_SWAPON = 85 // { int swapon(char *name); } - SYS_GETITIMER = 86 // { int getitimer(u_int which, \ - SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); } - SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); } - SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); } - SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \ - SYS_FSYNC = 95 // { int fsync(int fd); } - SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \ - SYS_SOCKET = 97 // { int socket(int domain, int type, \ - SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \ - SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); } - SYS_BIND = 104 // { int bind(int s, caddr_t name, \ - SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \ - SYS_LISTEN = 106 // { int listen(int s, int backlog); } - SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \ - SYS_GETRUSAGE = 117 // { int getrusage(int who, \ - SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \ - SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \ - SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \ - SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \ - SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); } - SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); } - SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); } - SYS_SETREGID = 127 // { int setregid(int rgid, int egid); } - SYS_RENAME = 128 // { int rename(char *from, char *to); } - SYS_FLOCK = 131 // { int flock(int fd, int how); } - SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); } - SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \ - SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } - SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \ - SYS_MKDIR = 136 // { int mkdir(char *path, int mode); } - SYS_RMDIR = 137 // { int rmdir(char *path); } - SYS_UTIMES = 138 // { int utimes(char *path, \ - SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \ - SYS_SETSID = 147 // { int setsid(void); } - SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \ - SYS_LGETFH = 160 // { int lgetfh(char *fname, \ - SYS_GETFH = 161 // { int getfh(char *fname, \ - SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } - SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \ - SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \ - SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \ - SYS_SETFIB = 175 // { int setfib(int fibnum); } - SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } - SYS_SETGID = 181 // { int setgid(gid_t gid); } - SYS_SETEGID = 182 // { int setegid(gid_t egid); } - SYS_SETEUID = 183 // { int seteuid(uid_t euid); } - SYS_STAT = 188 // { int stat(char *path, struct stat *ub); } - SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); } - SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); } - SYS_PATHCONF = 191 // { int pathconf(char *path, int name); } - SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); } - SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \ - SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \ - SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \ - SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \ - SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \ - SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \ - SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \ - SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \ - SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); } - SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); } - SYS_UNDELETE = 205 // { int undelete(char *path); } - SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); } - SYS_GETPGID = 207 // { int getpgid(pid_t pid); } - SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \ - SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \ - SYS_CLOCK_SETTIME = 233 // { int clock_settime( \ - SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \ - SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \ - SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); } - SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \ - SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \ - SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); } - SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \ - SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); } - SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \ - SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \ - SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\ - SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); } - SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \ - SYS_RFORK = 251 // { int rfork(int flags); } - SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \ - SYS_ISSETUGID = 253 // { int issetugid(void); } - SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } - SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \ - SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } - SYS_LUTIMES = 276 // { int lutimes(char *path, \ - SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); } - SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); } - SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); } - SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \ - SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \ - SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \ - SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \ - SYS_MODNEXT = 300 // { int modnext(int modid); } - SYS_MODSTAT = 301 // { int modstat(int modid, \ - SYS_MODFNEXT = 302 // { int modfnext(int modid); } - SYS_MODFIND = 303 // { int modfind(const char *name); } - SYS_KLDLOAD = 304 // { int kldload(const char *file); } - SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); } - SYS_KLDFIND = 306 // { int kldfind(const char *file); } - SYS_KLDNEXT = 307 // { int kldnext(int fileid); } - SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \ - SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); } - SYS_GETSID = 310 // { int getsid(pid_t pid); } - SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \ - SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \ - SYS_YIELD = 321 // { int yield(void); } - SYS_MLOCKALL = 324 // { int mlockall(int how); } - SYS_MUNLOCKALL = 325 // { int munlockall(void); } - SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); } - SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \ - SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \ - SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \ - SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); } - SYS_SCHED_YIELD = 331 // { int sched_yield (void); } - SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); } - SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); } - SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \ - SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); } - SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \ - SYS_JAIL = 338 // { int jail(struct jail *jail); } - SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \ - SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); } - SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); } - SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \ - SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \ - SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \ - SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \ - SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \ - SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \ - SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \ - SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \ - SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \ - SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \ - SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \ - SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \ - SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \ - SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \ - SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \ - SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \ - SYS_KQUEUE = 362 // { int kqueue(void); } - SYS_KEVENT = 363 // { int kevent(int fd, \ - SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \ - SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \ - SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \ - SYS___SETUGID = 374 // { int __setugid(int flag); } - SYS_EACCESS = 376 // { int eaccess(char *path, int amode); } - SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \ - SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); } - SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); } - SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \ - SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \ - SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \ - SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \ - SYS_KENV = 390 // { int kenv(int what, const char *name, \ - SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \ - SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \ - SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \ - SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \ - SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \ - SYS_STATFS = 396 // { int statfs(char *path, \ - SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); } - SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \ - SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \ - SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \ - SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \ - SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \ - SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \ - SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \ - SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \ - SYS_SIGACTION = 416 // { int sigaction(int sig, \ - SYS_SIGRETURN = 417 // { int sigreturn( \ - SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); } - SYS_SETCONTEXT = 422 // { int setcontext( \ - SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \ - SYS_SWAPOFF = 424 // { int swapoff(const char *name); } - SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \ - SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \ - SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \ - SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \ - SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \ - SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \ - SYS_THR_EXIT = 431 // { void thr_exit(long *state); } - SYS_THR_SELF = 432 // { int thr_self(long *id); } - SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); } - SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); } - SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); } - SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); } - SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \ - SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \ - SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \ - SYS_THR_SUSPEND = 442 // { int thr_suspend( \ - SYS_THR_WAKE = 443 // { int thr_wake(long id); } - SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); } - SYS_AUDIT = 445 // { int audit(const void *record, \ - SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \ - SYS_GETAUID = 447 // { int getauid(uid_t *auid); } - SYS_SETAUID = 448 // { int setauid(uid_t *auid); } - SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); } - SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); } - SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \ - SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \ - SYS_AUDITCTL = 453 // { int auditctl(char *path); } - SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \ - SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \ - SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); } - SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); } - SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); } - SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \ - SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); } - SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ - SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \ - SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ - SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \ - SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \ - SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \ - SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \ - SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); } - SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); } - SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); } - SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \ - SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); } - SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); } - SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \ - SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \ - SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \ - SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \ - SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \ - SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \ - SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \ - SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \ - SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \ - SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \ - SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \ - SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); } - SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); } - SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \ - SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \ - SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \ - SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \ - SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \ - SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); } - SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); } - SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \ - SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \ - SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); } - SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); } - SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); } - SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); } - SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \ - SYS_CAP_ENTER = 516 // { int cap_enter(void); } - SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); } - SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); } - SYS_PDKILL = 519 // { int pdkill(int fd, int signum); } - SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); } - SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \ - SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \ - SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); } - SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \ - SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \ - SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \ - SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \ - SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \ - SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \ - SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \ - SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \ - SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \ - SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \ - SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \ - SYS_ACCEPT4 = 541 // { int accept4(int s, \ - SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); } - SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \ - SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \ + SYS_EXIT = 1 // { void sys_exit(int rval); } exit \ + SYS_FORK = 2 // { int fork(void); } + SYS_READ = 3 // { ssize_t read(int fd, void *buf, \ + SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \ + SYS_OPEN = 5 // { int open(char *path, int flags, int mode); } + SYS_CLOSE = 6 // { int close(int fd); } + SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \ + SYS_LINK = 9 // { int link(char *path, char *link); } + SYS_UNLINK = 10 // { int unlink(char *path); } + SYS_CHDIR = 12 // { int chdir(char *path); } + SYS_FCHDIR = 13 // { int fchdir(int fd); } + SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); } + SYS_CHMOD = 15 // { int chmod(char *path, int mode); } + SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } + SYS_OBREAK = 17 // { int obreak(char *nsize); } break \ + SYS_GETPID = 20 // { pid_t getpid(void); } + SYS_MOUNT = 21 // { int mount(char *type, char *path, \ + SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); } + SYS_SETUID = 23 // { int setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t getuid(void); } + SYS_GETEUID = 25 // { uid_t geteuid(void); } + SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \ + SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \ + SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \ + SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \ + SYS_ACCEPT = 30 // { int accept(int s, \ + SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \ + SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \ + SYS_ACCESS = 33 // { int access(char *path, int amode); } + SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); } + SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); } + SYS_SYNC = 36 // { int sync(void); } + SYS_KILL = 37 // { int kill(int pid, int signum); } + SYS_GETPPID = 39 // { pid_t getppid(void); } + SYS_DUP = 41 // { int dup(u_int fd); } + SYS_PIPE = 42 // { int pipe(void); } + SYS_GETEGID = 43 // { gid_t getegid(void); } + SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \ + SYS_GETGID = 47 // { gid_t getgid(void); } + SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \ + SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); } + SYS_ACCT = 51 // { int acct(char *path); } + SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \ + SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \ + SYS_REBOOT = 55 // { int reboot(int opt); } + SYS_REVOKE = 56 // { int revoke(char *path); } + SYS_SYMLINK = 57 // { int symlink(char *path, char *link); } + SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \ + SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \ + SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \ + SYS_CHROOT = 61 // { int chroot(char *path); } + SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \ + SYS_VFORK = 66 // { int vfork(void); } + SYS_SBRK = 69 // { int sbrk(int incr); } + SYS_SSTK = 70 // { int sstk(int incr); } + SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \ + SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \ + SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \ + SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \ + SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \ + SYS_GETPGRP = 81 // { int getpgrp(void); } + SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); } + SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \ + SYS_SWAPON = 85 // { int swapon(char *name); } + SYS_GETITIMER = 86 // { int getitimer(u_int which, \ + SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); } + SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); } + SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); } + SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \ + SYS_FSYNC = 95 // { int fsync(int fd); } + SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \ + SYS_SOCKET = 97 // { int socket(int domain, int type, \ + SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \ + SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); } + SYS_BIND = 104 // { int bind(int s, caddr_t name, \ + SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int listen(int s, int backlog); } + SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \ + SYS_GETRUSAGE = 117 // { int getrusage(int who, \ + SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \ + SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \ + SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \ + SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); } + SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); } + SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); } + SYS_SETREGID = 127 // { int setregid(int rgid, int egid); } + SYS_RENAME = 128 // { int rename(char *from, char *to); } + SYS_FLOCK = 131 // { int flock(int fd, int how); } + SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); } + SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \ + SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \ + SYS_MKDIR = 136 // { int mkdir(char *path, int mode); } + SYS_RMDIR = 137 // { int rmdir(char *path); } + SYS_UTIMES = 138 // { int utimes(char *path, \ + SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \ + SYS_SETSID = 147 // { int setsid(void); } + SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \ + SYS_LGETFH = 160 // { int lgetfh(char *fname, \ + SYS_GETFH = 161 // { int getfh(char *fname, \ + SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } + SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \ + SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \ + SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \ + SYS_SETFIB = 175 // { int setfib(int fibnum); } + SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int setgid(gid_t gid); } + SYS_SETEGID = 182 // { int setegid(gid_t egid); } + SYS_SETEUID = 183 // { int seteuid(uid_t euid); } + SYS_STAT = 188 // { int stat(char *path, struct stat *ub); } + SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); } + SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); } + SYS_PATHCONF = 191 // { int pathconf(char *path, int name); } + SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \ + SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \ + SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \ + SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \ + SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \ + SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \ + SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \ + SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \ + SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int undelete(char *path); } + SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); } + SYS_GETPGID = 207 // { int getpgid(pid_t pid); } + SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \ + SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 233 // { int clock_settime( \ + SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \ + SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \ + SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); } + SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \ + SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \ + SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); } + SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \ + SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); } + SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \ + SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \ + SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\ + SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); } + SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \ + SYS_RFORK = 251 // { int rfork(int flags); } + SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \ + SYS_ISSETUGID = 253 // { int issetugid(void); } + SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } + SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \ + SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } + SYS_LUTIMES = 276 // { int lutimes(char *path, \ + SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); } + SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); } + SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); } + SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \ + SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \ + SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \ + SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \ + SYS_MODNEXT = 300 // { int modnext(int modid); } + SYS_MODSTAT = 301 // { int modstat(int modid, \ + SYS_MODFNEXT = 302 // { int modfnext(int modid); } + SYS_MODFIND = 303 // { int modfind(const char *name); } + SYS_KLDLOAD = 304 // { int kldload(const char *file); } + SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); } + SYS_KLDFIND = 306 // { int kldfind(const char *file); } + SYS_KLDNEXT = 307 // { int kldnext(int fileid); } + SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \ + SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); } + SYS_GETSID = 310 // { int getsid(pid_t pid); } + SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \ + SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \ + SYS_YIELD = 321 // { int yield(void); } + SYS_MLOCKALL = 324 // { int mlockall(int how); } + SYS_MUNLOCKALL = 325 // { int munlockall(void); } + SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); } + SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \ + SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \ + SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \ + SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); } + SYS_SCHED_YIELD = 331 // { int sched_yield (void); } + SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); } + SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); } + SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \ + SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); } + SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \ + SYS_JAIL = 338 // { int jail(struct jail *jail); } + SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \ + SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); } + SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); } + SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \ + SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \ + SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \ + SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \ + SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \ + SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \ + SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \ + SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \ + SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \ + SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \ + SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \ + SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \ + SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \ + SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \ + SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \ + SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \ + SYS_KQUEUE = 362 // { int kqueue(void); } + SYS_KEVENT = 363 // { int kevent(int fd, \ + SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \ + SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \ + SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \ + SYS___SETUGID = 374 // { int __setugid(int flag); } + SYS_EACCESS = 376 // { int eaccess(char *path, int amode); } + SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \ + SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); } + SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); } + SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \ + SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \ + SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \ + SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \ + SYS_KENV = 390 // { int kenv(int what, const char *name, \ + SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \ + SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \ + SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \ + SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \ + SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \ + SYS_STATFS = 396 // { int statfs(char *path, \ + SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \ + SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \ + SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \ + SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \ + SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \ + SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \ + SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \ + SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \ + SYS_SIGACTION = 416 // { int sigaction(int sig, \ + SYS_SIGRETURN = 417 // { int sigreturn( \ + SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); } + SYS_SETCONTEXT = 422 // { int setcontext( \ + SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \ + SYS_SWAPOFF = 424 // { int swapoff(const char *name); } + SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \ + SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \ + SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \ + SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \ + SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \ + SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \ + SYS_THR_EXIT = 431 // { void thr_exit(long *state); } + SYS_THR_SELF = 432 // { int thr_self(long *id); } + SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); } + SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); } + SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); } + SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); } + SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \ + SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \ + SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \ + SYS_THR_SUSPEND = 442 // { int thr_suspend( \ + SYS_THR_WAKE = 443 // { int thr_wake(long id); } + SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); } + SYS_AUDIT = 445 // { int audit(const void *record, \ + SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \ + SYS_GETAUID = 447 // { int getauid(uid_t *auid); } + SYS_SETAUID = 448 // { int setauid(uid_t *auid); } + SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); } + SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); } + SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \ + SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \ + SYS_AUDITCTL = 453 // { int auditctl(char *path); } + SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \ + SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \ + SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); } + SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); } + SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); } + SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \ + SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \ + SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \ + SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \ + SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \ + SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); } + SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); } + SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); } + SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \ + SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); } + SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); } + SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \ + SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \ + SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \ + SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \ + SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \ + SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \ + SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \ + SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \ + SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \ + SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \ + SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \ + SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); } + SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); } + SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \ + SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \ + SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \ + SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \ + SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \ + SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); } + SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); } + SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \ + SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \ + SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); } + SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); } + SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); } + SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, \ + SYS_CAP_ENTER = 516 // { int cap_enter(void); } + SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); } + SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); } + SYS_PDKILL = 519 // { int pdkill(int fd, int signum); } + SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); } + SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \ + SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \ + SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); } + SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \ + SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \ + SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \ + SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \ + SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \ + SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \ + SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \ + SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \ + SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, \ + SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, \ + SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, \ + SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, \ + SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, \ + SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \ + SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \ + SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \ + SYS_ACCEPT4 = 541 // { int accept4(int s, \ + SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); } + SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \ + SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \ + SYS_FUTIMENS = 546 // { int futimens(int fd, \ + SYS_UTIMENSAT = 547 // { int utimensat(int fd, \ ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go index cef4fed02..95ab12903 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -385,4 +385,6 @@ const ( SYS_PKEY_MPROTECT = 380 SYS_PKEY_ALLOC = 381 SYS_PKEY_FREE = 382 + SYS_STATX = 383 + SYS_ARCH_PRCTL = 384 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go index 49bfa1270..c5dabf2e4 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -338,4 +338,5 @@ const ( SYS_PKEY_MPROTECT = 329 SYS_PKEY_ALLOC = 330 SYS_PKEY_FREE = 331 + SYS_STATX = 332 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go index 97b182ef5..ab7fa5fd3 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -358,4 +358,5 @@ const ( SYS_PKEY_MPROTECT = 394 SYS_PKEY_ALLOC = 395 SYS_PKEY_FREE = 396 + SYS_STATX = 397 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index 640784357..b1c6b4bd3 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -282,4 +282,5 @@ const ( SYS_PKEY_MPROTECT = 288 SYS_PKEY_ALLOC = 289 SYS_PKEY_FREE = 290 + SYS_STATX = 291 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go index 939567c09..2e9aa7a3e 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go @@ -371,4 +371,5 @@ const ( SYS_PKEY_MPROTECT = 4363 SYS_PKEY_ALLOC = 4364 SYS_PKEY_FREE = 4365 + SYS_STATX = 4366 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go index 09db95969..92827635a 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -331,4 +331,5 @@ const ( SYS_PKEY_MPROTECT = 5323 SYS_PKEY_ALLOC = 5324 SYS_PKEY_FREE = 5325 + SYS_STATX = 5326 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go index d1b872a09..45bd3fd6c 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -331,4 +331,5 @@ const ( SYS_PKEY_MPROTECT = 5323 SYS_PKEY_ALLOC = 5324 SYS_PKEY_FREE = 5325 + SYS_STATX = 5326 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go index 82ba20f28..62ccac4b7 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go @@ -371,4 +371,5 @@ const ( SYS_PKEY_MPROTECT = 4363 SYS_PKEY_ALLOC = 4364 SYS_PKEY_FREE = 4365 + SYS_STATX = 4366 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go index 8944448ae..dfe5dab67 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -366,4 +366,5 @@ const ( SYS_PREADV2 = 380 SYS_PWRITEV2 = 381 SYS_KEXEC_FILE_LOAD = 382 + SYS_STATX = 383 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go index 90a039be4..eca97f738 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -366,4 +366,5 @@ const ( SYS_PREADV2 = 380 SYS_PWRITEV2 = 381 SYS_KEXEC_FILE_LOAD = 382 + SYS_STATX = 383 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go index aab0cdb18..8ea18e6c2 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -306,6 +306,8 @@ const ( SYS_COPY_FILE_RANGE = 375 SYS_PREADV2 = 376 SYS_PWRITEV2 = 377 + SYS_S390_GUARDED_STORAGE = 378 + SYS_STATX = 379 SYS_SELECT = 142 SYS_GETRLIMIT = 191 SYS_LCHOWN = 198 diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go index f60d8f988..8afda9c45 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go @@ -134,6 +134,7 @@ const ( SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); } SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); } SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); } + SYS_MSYNC = 277 // { int|sys|13|msync(void *addr, size_t len, int flags); } SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); } SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); } SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); } diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go index 48a91d464..aea8dbec4 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go @@ -134,6 +134,7 @@ const ( SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); } SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); } SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); } + SYS_MSYNC = 277 // { int|sys|13|msync(void *addr, size_t len, int flags); } SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); } SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); } SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); } diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go index 612ba662c..c6158a7ef 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go @@ -134,6 +134,7 @@ const ( SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); } SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); } SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); } + SYS_MSYNC = 277 // { int|sys|13|msync(void *addr, size_t len, int flags); } SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); } SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); } SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); } diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go new file mode 100644 index 000000000..32653e53c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go @@ -0,0 +1,213 @@ +// mksysnum_openbsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build arm,openbsd + +package unix + +const ( + SYS_EXIT = 1 // { void sys_exit(int rval); } + SYS_FORK = 2 // { int sys_fork(void); } + SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); } + SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \ + SYS_OPEN = 5 // { int sys_open(const char *path, \ + SYS_CLOSE = 6 // { int sys_close(int fd); } + SYS_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); } + SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \ + SYS_LINK = 9 // { int sys_link(const char *path, const char *link); } + SYS_UNLINK = 10 // { int sys_unlink(const char *path); } + SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \ + SYS_CHDIR = 12 // { int sys_chdir(const char *path); } + SYS_FCHDIR = 13 // { int sys_fchdir(int fd); } + SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \ + SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); } + SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \ + SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break + SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } + SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \ + SYS_GETPID = 20 // { pid_t sys_getpid(void); } + SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \ + SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); } + SYS_SETUID = 23 // { int sys_setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t sys_getuid(void); } + SYS_GETEUID = 25 // { uid_t sys_geteuid(void); } + SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \ + SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ + SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, \ + SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \ + SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, \ + SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, \ + SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, \ + SYS_ACCESS = 33 // { int sys_access(const char *path, int amode); } + SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); } + SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); } + SYS_SYNC = 36 // { void sys_sync(void); } + SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); } + SYS_GETPPID = 39 // { pid_t sys_getppid(void); } + SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); } + SYS_DUP = 41 // { int sys_dup(int fd); } + SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \ + SYS_GETEGID = 43 // { gid_t sys_getegid(void); } + SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \ + SYS_SIGACTION = 46 // { int sys_sigaction(int signum, \ + SYS_GETGID = 47 // { gid_t sys_getgid(void); } + SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); } + SYS_GETLOGIN = 49 // { int sys_getlogin(char *namebuf, u_int namelen); } + SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); } + SYS_ACCT = 51 // { int sys_acct(const char *path); } + SYS_SIGPENDING = 52 // { int sys_sigpending(void); } + SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); } + SYS_IOCTL = 54 // { int sys_ioctl(int fd, \ + SYS_REBOOT = 55 // { int sys_reboot(int opt); } + SYS_REVOKE = 56 // { int sys_revoke(const char *path); } + SYS_SYMLINK = 57 // { int sys_symlink(const char *path, \ + SYS_READLINK = 58 // { ssize_t sys_readlink(const char *path, \ + SYS_EXECVE = 59 // { int sys_execve(const char *path, \ + SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); } + SYS_CHROOT = 61 // { int sys_chroot(const char *path); } + SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \ + SYS_STATFS = 63 // { int sys_statfs(const char *path, \ + SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \ + SYS_VFORK = 66 // { int sys_vfork(void); } + SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \ + SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \ + SYS_SETITIMER = 69 // { int sys_setitimer(int which, \ + SYS_GETITIMER = 70 // { int sys_getitimer(int which, \ + SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \ + SYS_KEVENT = 72 // { int sys_kevent(int fd, \ + SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \ + SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \ + SYS_UTIMES = 76 // { int sys_utimes(const char *path, \ + SYS_FUTIMES = 77 // { int sys_futimes(int fd, \ + SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \ + SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \ + SYS_GETPGRP = 81 // { int sys_getpgrp(void); } + SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, pid_t pgid); } + SYS_SENDSYSLOG = 83 // { int sys_sendsyslog(const void *buf, size_t nbyte); } + SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \ + SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \ + SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \ + SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \ + SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } + SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \ + SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } + SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, \ + SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \ + SYS_FSYNC = 95 // { int sys_fsync(int fd); } + SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); } + SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); } + SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \ + SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); } + SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); } + SYS_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); } + SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); } + SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } + SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \ + SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); } + SYS_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, \ + SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \ + SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \ + SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } + SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { ssize_t sys_readv(int fd, \ + SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \ + SYS_KILL = 122 // { int sys_kill(int pid, int signum); } + SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); } + SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); } + SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); } + SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); } + SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); } + SYS_FLOCK = 131 // { int sys_flock(int fd, int how); } + SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); } + SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, \ + SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \ + SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); } + SYS_RMDIR = 137 // { int sys_rmdir(const char *path); } + SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \ + SYS_SETSID = 147 // { int sys_setsid(void); } + SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \ + SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); } + SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); } + SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); } + SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, \ + SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, \ + SYS_SETGID = 181 // { int sys_setgid(gid_t gid); } + SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); } + SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); } + SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); } + SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); } + SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); } + SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, \ + SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, \ + SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, \ + SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \ + SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \ + SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); } + SYS___SYSCTL = 202 // { int sys___sysctl(const int *name, u_int namelen, \ + SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); } + SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } + SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \ + SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); } + SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); } + SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \ + SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \ + SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \ + SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); } + SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \ + SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \ + SYS_ISSETUGID = 253 // { int sys_issetugid(void); } + SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); } + SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); } + SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); } + SYS_PIPE = 263 // { int sys_pipe(int *fdp); } + SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); } + SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \ + SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \ + SYS_KQUEUE = 269 // { int sys_kqueue(void); } + SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); } + SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); } + SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \ + SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, \ + SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, \ + SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, \ + SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, \ + SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); } + SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \ + SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); } + SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \ + SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \ + SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \ + SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \ + SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \ + SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); } + SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); } + SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \ + SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } + SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \ + SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } + SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \ + SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); } + SYS_GETRTABLE = 311 // { int sys_getrtable(void); } + SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \ + SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \ + SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \ + SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \ + SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \ + SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \ + SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, \ + SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, \ + SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, \ + SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \ + SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \ + SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \ + SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } + SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go index 062bdff21..e61d78a54 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go @@ -447,6 +447,13 @@ type Termios struct { Ospeed uint32 } +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + const ( AT_FDCWD = -0x2 AT_REMOVEDIR = 0x80 diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go index 590067f01..2619155ff 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go @@ -457,6 +457,13 @@ type Termios struct { Ospeed uint64 } +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + const ( AT_FDCWD = -0x2 AT_REMOVEDIR = 0x80 diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go index 66df363ce..4dca0d4db 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go @@ -447,3 +447,17 @@ type Termios struct { Ispeed uint32 Ospeed uint32 } + +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + +const ( + AT_FDCWD = -0x2 + AT_REMOVEDIR = 0x80 + AT_SYMLINK_FOLLOW = 0x40 + AT_SYMLINK_NOFOLLOW = 0x20 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go index 85d56eabd..f2881fd14 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go @@ -455,3 +455,17 @@ type Termios struct { Ispeed uint64 Ospeed uint64 } + +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + +const ( + AT_FDCWD = -0x2 + AT_REMOVEDIR = 0x80 + AT_SYMLINK_FOLLOW = 0x40 + AT_SYMLINK_NOFOLLOW = 0x20 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go index e585c893a..67c6bf883 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go @@ -441,3 +441,8 @@ type Termios struct { Ispeed uint32 Ospeed uint32 } + +const ( + AT_FDCWD = 0xfffafdcd + AT_SYMLINK_NOFOLLOW = 0x1 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go index 8cf30947b..5b28bcbba 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go @@ -1,6 +1,7 @@ +// cgo -godefs types_freebsd.go | go run mkpost.go +// Code generated by the command above; see README.md. DO NOT EDIT. + // +build 386,freebsd -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_freebsd.go package unix @@ -85,7 +86,7 @@ type Stat_t struct { Ctimespec Timespec Size int64 Blocks int64 - Blksize uint32 + Blksize int32 Flags uint32 Gen uint32 Lspare int32 @@ -288,9 +289,9 @@ type FdSet struct { } const ( - sizeofIfMsghdr = 0x64 + sizeofIfMsghdr = 0xa8 SizeofIfMsghdr = 0x60 - sizeofIfData = 0x54 + sizeofIfData = 0x98 SizeofIfData = 0x50 SizeofIfaMsghdr = 0x14 SizeofIfmaMsghdr = 0x10 @@ -322,31 +323,31 @@ type IfMsghdr struct { } type ifData struct { - Type uint8 - Physical uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Vhid uint8 - Baudrate_pf uint8 - Datalen uint8 - Mtu uint32 - Metric uint32 - Baudrate uint32 - Ipackets uint32 - Ierrors uint32 - Opackets uint32 - Oerrors uint32 - Collisions uint32 - Ibytes uint32 - Obytes uint32 - Imcasts uint32 - Omcasts uint32 - Iqdrops uint32 - Noproto uint32 - Hwassist uint64 - Epoch int32 - Lastchange Timeval + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Vhid uint8 + Datalen uint16 + Mtu uint32 + Metric uint32 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Oqdrops uint64 + Noproto uint64 + Hwassist uint64 + X__ifi_epoch [8]byte + X__ifi_lastchange [16]byte } type IfData struct { @@ -500,3 +501,21 @@ type Termios struct { Ispeed uint32 Ospeed uint32 } + +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x800 + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x200 +) + +type CapRights struct { + Rights [2]uint64 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go index 091c10ae7..c65d89e49 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go @@ -505,6 +505,20 @@ type Termios struct { Ospeed uint32 } +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x800 + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x200 +) + type CapRights struct { Rights [2]uint64 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go index 5472b5428..42c0a502c 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go @@ -1,5 +1,5 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -fsigned-char types_freebsd.go +// cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go +// Code generated by the command above; see README.md. DO NOT EDIT. // +build arm,freebsd @@ -88,7 +88,7 @@ type Stat_t struct { Ctimespec Timespec Size int64 Blocks int64 - Blksize uint32 + Blksize int32 Flags uint32 Gen uint32 Lspare int32 @@ -142,6 +142,15 @@ type Fsid struct { Val [2]int32 } +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 +) + type RawSockaddrInet4 struct { Len uint8 Family uint8 @@ -282,9 +291,9 @@ type FdSet struct { } const ( - sizeofIfMsghdr = 0x70 + sizeofIfMsghdr = 0xa8 SizeofIfMsghdr = 0x70 - sizeofIfData = 0x60 + sizeofIfData = 0x98 SizeofIfData = 0x60 SizeofIfaMsghdr = 0x14 SizeofIfmaMsghdr = 0x10 @@ -316,31 +325,31 @@ type IfMsghdr struct { } type ifData struct { - Type uint8 - Physical uint8 - Addrlen uint8 - Hdrlen uint8 - Link_state uint8 - Vhid uint8 - Baudrate_pf uint8 - Datalen uint8 - Mtu uint32 - Metric uint32 - Baudrate uint32 - Ipackets uint32 - Ierrors uint32 - Opackets uint32 - Oerrors uint32 - Collisions uint32 - Ibytes uint32 - Obytes uint32 - Imcasts uint32 - Omcasts uint32 - Iqdrops uint32 - Noproto uint32 - Hwassist uint64 - Epoch int64 - Lastchange Timeval + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Vhid uint8 + Datalen uint16 + Mtu uint32 + Metric uint32 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Oqdrops uint64 + Noproto uint64 + Hwassist uint64 + X__ifi_epoch [8]byte + X__ifi_lastchange [16]byte } type IfData struct { @@ -495,3 +504,21 @@ type Termios struct { Ispeed uint32 Ospeed uint32 } + +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x800 + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x200 +) + +type CapRights struct { + Rights [2]uint64 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go index fe539a065..8b30c6997 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -285,6 +285,13 @@ type IPv6Mreq struct { Interface uint32 } +type PacketMreq struct { + Ifindex int32 + Type uint16 + Alen uint16 + Address [8]uint8 +} + type Msghdr struct { Name *byte Namelen uint32 @@ -373,9 +380,11 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 + SizeofIovec = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc SizeofIPv6Mreq = 0x14 + SizeofPacketMreq = 0x10 SizeofMsghdr = 0x1c SizeofCmsghdr = 0xc SizeofInet4Pktinfo = 0xc @@ -416,7 +425,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -664,8 +673,6 @@ const RNDGETENTCNT = 0x80045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 @@ -683,3 +690,104 @@ type Winsize struct { Xpixel uint16 Ypixel uint16 } + +type Taskstats struct { + Version uint16 + Pad_cgo_0 [2]byte + Ac_exitcode uint32 + Ac_flag uint8 + Ac_nice uint8 + Pad_cgo_1 [6]byte + Cpu_count uint64 + Cpu_delay_total uint64 + Blkio_count uint64 + Blkio_delay_total uint64 + Swapin_count uint64 + Swapin_delay_total uint64 + Cpu_run_real_total uint64 + Cpu_run_virtual_total uint64 + Ac_comm [32]int8 + Ac_sched uint8 + Ac_pad [3]uint8 + Pad_cgo_2 [4]byte + Ac_uid uint32 + Ac_gid uint32 + Ac_pid uint32 + Ac_ppid uint32 + Ac_btime uint32 + Pad_cgo_3 [4]byte + Ac_etime uint64 + Ac_utime uint64 + Ac_stime uint64 + Ac_minflt uint64 + Ac_majflt uint64 + Coremem uint64 + Virtmem uint64 + Hiwater_rss uint64 + Hiwater_vm uint64 + Read_char uint64 + Write_char uint64 + Read_syscalls uint64 + Write_syscalls uint64 + Read_bytes uint64 + Write_bytes uint64 + Cancelled_write_bytes uint64 + Nvcsw uint64 + Nivcsw uint64 + Ac_utimescaled uint64 + Ac_stimescaled uint64 + Cpu_scaled_run_real_total uint64 + Freepages_count uint64 + Freepages_delay_total uint64 +} + +const ( + TASKSTATS_CMD_UNSPEC = 0x0 + TASKSTATS_CMD_GET = 0x1 + TASKSTATS_CMD_NEW = 0x2 + TASKSTATS_TYPE_UNSPEC = 0x0 + TASKSTATS_TYPE_PID = 0x1 + TASKSTATS_TYPE_TGID = 0x2 + TASKSTATS_TYPE_STATS = 0x3 + TASKSTATS_TYPE_AGGR_PID = 0x4 + TASKSTATS_TYPE_AGGR_TGID = 0x5 + TASKSTATS_TYPE_NULL = 0x6 + TASKSTATS_CMD_ATTR_UNSPEC = 0x0 + TASKSTATS_CMD_ATTR_PID = 0x1 + TASKSTATS_CMD_ATTR_TGID = 0x2 + TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 + TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 +) + +type Genlmsghdr struct { + Cmd uint8 + Version uint8 + Reserved uint16 +} + +const ( + CTRL_CMD_UNSPEC = 0x0 + CTRL_CMD_NEWFAMILY = 0x1 + CTRL_CMD_DELFAMILY = 0x2 + CTRL_CMD_GETFAMILY = 0x3 + CTRL_CMD_NEWOPS = 0x4 + CTRL_CMD_DELOPS = 0x5 + CTRL_CMD_GETOPS = 0x6 + CTRL_CMD_NEWMCAST_GRP = 0x7 + CTRL_CMD_DELMCAST_GRP = 0x8 + CTRL_CMD_GETMCAST_GRP = 0x9 + CTRL_ATTR_UNSPEC = 0x0 + CTRL_ATTR_FAMILY_ID = 0x1 + CTRL_ATTR_FAMILY_NAME = 0x2 + CTRL_ATTR_VERSION = 0x3 + CTRL_ATTR_HDRSIZE = 0x4 + CTRL_ATTR_MAXATTR = 0x5 + CTRL_ATTR_OPS = 0x6 + CTRL_ATTR_MCAST_GROUPS = 0x7 + CTRL_ATTR_OP_UNSPEC = 0x0 + CTRL_ATTR_OP_ID = 0x1 + CTRL_ATTR_OP_FLAGS = 0x2 + CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 + CTRL_ATTR_MCAST_GRP_NAME = 0x1 + CTRL_ATTR_MCAST_GRP_ID = 0x2 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index e99cd797a..cf0358986 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -287,6 +287,13 @@ type IPv6Mreq struct { Interface uint32 } +type PacketMreq struct { + Ifindex int32 + Type uint16 + Alen uint16 + Address [8]uint8 +} + type Msghdr struct { Name *byte Namelen uint32 @@ -377,9 +384,11 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 + SizeofIovec = 0x10 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc SizeofIPv6Mreq = 0x14 + SizeofPacketMreq = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 SizeofInet4Pktinfo = 0xc @@ -420,7 +429,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -682,8 +691,6 @@ const RNDGETENTCNT = 0x80045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 @@ -701,3 +708,104 @@ type Winsize struct { Xpixel uint16 Ypixel uint16 } + +type Taskstats struct { + Version uint16 + Pad_cgo_0 [2]byte + Ac_exitcode uint32 + Ac_flag uint8 + Ac_nice uint8 + Pad_cgo_1 [6]byte + Cpu_count uint64 + Cpu_delay_total uint64 + Blkio_count uint64 + Blkio_delay_total uint64 + Swapin_count uint64 + Swapin_delay_total uint64 + Cpu_run_real_total uint64 + Cpu_run_virtual_total uint64 + Ac_comm [32]int8 + Ac_sched uint8 + Ac_pad [3]uint8 + Pad_cgo_2 [4]byte + Ac_uid uint32 + Ac_gid uint32 + Ac_pid uint32 + Ac_ppid uint32 + Ac_btime uint32 + Pad_cgo_3 [4]byte + Ac_etime uint64 + Ac_utime uint64 + Ac_stime uint64 + Ac_minflt uint64 + Ac_majflt uint64 + Coremem uint64 + Virtmem uint64 + Hiwater_rss uint64 + Hiwater_vm uint64 + Read_char uint64 + Write_char uint64 + Read_syscalls uint64 + Write_syscalls uint64 + Read_bytes uint64 + Write_bytes uint64 + Cancelled_write_bytes uint64 + Nvcsw uint64 + Nivcsw uint64 + Ac_utimescaled uint64 + Ac_stimescaled uint64 + Cpu_scaled_run_real_total uint64 + Freepages_count uint64 + Freepages_delay_total uint64 +} + +const ( + TASKSTATS_CMD_UNSPEC = 0x0 + TASKSTATS_CMD_GET = 0x1 + TASKSTATS_CMD_NEW = 0x2 + TASKSTATS_TYPE_UNSPEC = 0x0 + TASKSTATS_TYPE_PID = 0x1 + TASKSTATS_TYPE_TGID = 0x2 + TASKSTATS_TYPE_STATS = 0x3 + TASKSTATS_TYPE_AGGR_PID = 0x4 + TASKSTATS_TYPE_AGGR_TGID = 0x5 + TASKSTATS_TYPE_NULL = 0x6 + TASKSTATS_CMD_ATTR_UNSPEC = 0x0 + TASKSTATS_CMD_ATTR_PID = 0x1 + TASKSTATS_CMD_ATTR_TGID = 0x2 + TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 + TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 +) + +type Genlmsghdr struct { + Cmd uint8 + Version uint8 + Reserved uint16 +} + +const ( + CTRL_CMD_UNSPEC = 0x0 + CTRL_CMD_NEWFAMILY = 0x1 + CTRL_CMD_DELFAMILY = 0x2 + CTRL_CMD_GETFAMILY = 0x3 + CTRL_CMD_NEWOPS = 0x4 + CTRL_CMD_DELOPS = 0x5 + CTRL_CMD_GETOPS = 0x6 + CTRL_CMD_NEWMCAST_GRP = 0x7 + CTRL_CMD_DELMCAST_GRP = 0x8 + CTRL_CMD_GETMCAST_GRP = 0x9 + CTRL_ATTR_UNSPEC = 0x0 + CTRL_ATTR_FAMILY_ID = 0x1 + CTRL_ATTR_FAMILY_NAME = 0x2 + CTRL_ATTR_VERSION = 0x3 + CTRL_ATTR_HDRSIZE = 0x4 + CTRL_ATTR_MAXATTR = 0x5 + CTRL_ATTR_OPS = 0x6 + CTRL_ATTR_MCAST_GROUPS = 0x7 + CTRL_ATTR_OP_UNSPEC = 0x0 + CTRL_ATTR_OP_ID = 0x1 + CTRL_ATTR_OP_FLAGS = 0x2 + CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 + CTRL_ATTR_MCAST_GRP_NAME = 0x1 + CTRL_ATTR_MCAST_GRP_ID = 0x2 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index 0857aa6e9..8ef7d85f1 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -289,6 +289,13 @@ type IPv6Mreq struct { Interface uint32 } +type PacketMreq struct { + Ifindex int32 + Type uint16 + Alen uint16 + Address [8]uint8 +} + type Msghdr struct { Name *byte Namelen uint32 @@ -377,9 +384,11 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 + SizeofIovec = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc SizeofIPv6Mreq = 0x14 + SizeofPacketMreq = 0x10 SizeofMsghdr = 0x1c SizeofCmsghdr = 0xc SizeofInet4Pktinfo = 0xc @@ -420,7 +429,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -653,8 +662,6 @@ const RNDGETENTCNT = 0x80045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 @@ -672,3 +679,104 @@ type Winsize struct { Xpixel uint16 Ypixel uint16 } + +type Taskstats struct { + Version uint16 + Pad_cgo_0 [2]byte + Ac_exitcode uint32 + Ac_flag uint8 + Ac_nice uint8 + Pad_cgo_1 [6]byte + Cpu_count uint64 + Cpu_delay_total uint64 + Blkio_count uint64 + Blkio_delay_total uint64 + Swapin_count uint64 + Swapin_delay_total uint64 + Cpu_run_real_total uint64 + Cpu_run_virtual_total uint64 + Ac_comm [32]uint8 + Ac_sched uint8 + Ac_pad [3]uint8 + Pad_cgo_2 [4]byte + Ac_uid uint32 + Ac_gid uint32 + Ac_pid uint32 + Ac_ppid uint32 + Ac_btime uint32 + Pad_cgo_3 [4]byte + Ac_etime uint64 + Ac_utime uint64 + Ac_stime uint64 + Ac_minflt uint64 + Ac_majflt uint64 + Coremem uint64 + Virtmem uint64 + Hiwater_rss uint64 + Hiwater_vm uint64 + Read_char uint64 + Write_char uint64 + Read_syscalls uint64 + Write_syscalls uint64 + Read_bytes uint64 + Write_bytes uint64 + Cancelled_write_bytes uint64 + Nvcsw uint64 + Nivcsw uint64 + Ac_utimescaled uint64 + Ac_stimescaled uint64 + Cpu_scaled_run_real_total uint64 + Freepages_count uint64 + Freepages_delay_total uint64 +} + +const ( + TASKSTATS_CMD_UNSPEC = 0x0 + TASKSTATS_CMD_GET = 0x1 + TASKSTATS_CMD_NEW = 0x2 + TASKSTATS_TYPE_UNSPEC = 0x0 + TASKSTATS_TYPE_PID = 0x1 + TASKSTATS_TYPE_TGID = 0x2 + TASKSTATS_TYPE_STATS = 0x3 + TASKSTATS_TYPE_AGGR_PID = 0x4 + TASKSTATS_TYPE_AGGR_TGID = 0x5 + TASKSTATS_TYPE_NULL = 0x6 + TASKSTATS_CMD_ATTR_UNSPEC = 0x0 + TASKSTATS_CMD_ATTR_PID = 0x1 + TASKSTATS_CMD_ATTR_TGID = 0x2 + TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 + TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 +) + +type Genlmsghdr struct { + Cmd uint8 + Version uint8 + Reserved uint16 +} + +const ( + CTRL_CMD_UNSPEC = 0x0 + CTRL_CMD_NEWFAMILY = 0x1 + CTRL_CMD_DELFAMILY = 0x2 + CTRL_CMD_GETFAMILY = 0x3 + CTRL_CMD_NEWOPS = 0x4 + CTRL_CMD_DELOPS = 0x5 + CTRL_CMD_GETOPS = 0x6 + CTRL_CMD_NEWMCAST_GRP = 0x7 + CTRL_CMD_DELMCAST_GRP = 0x8 + CTRL_CMD_GETMCAST_GRP = 0x9 + CTRL_ATTR_UNSPEC = 0x0 + CTRL_ATTR_FAMILY_ID = 0x1 + CTRL_ATTR_FAMILY_NAME = 0x2 + CTRL_ATTR_VERSION = 0x3 + CTRL_ATTR_HDRSIZE = 0x4 + CTRL_ATTR_MAXATTR = 0x5 + CTRL_ATTR_OPS = 0x6 + CTRL_ATTR_MCAST_GROUPS = 0x7 + CTRL_ATTR_OP_UNSPEC = 0x0 + CTRL_ATTR_OP_ID = 0x1 + CTRL_ATTR_OP_FLAGS = 0x2 + CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 + CTRL_ATTR_MCAST_GRP_NAME = 0x1 + CTRL_ATTR_MCAST_GRP_ID = 0x2 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index fb1c90a9e..311026867 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -288,6 +288,13 @@ type IPv6Mreq struct { Interface uint32 } +type PacketMreq struct { + Ifindex int32 + Type uint16 + Alen uint16 + Address [8]uint8 +} + type Msghdr struct { Name *byte Namelen uint32 @@ -378,9 +385,11 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 + SizeofIovec = 0x10 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc SizeofIPv6Mreq = 0x14 + SizeofPacketMreq = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 SizeofInet4Pktinfo = 0xc @@ -421,7 +430,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -661,8 +670,6 @@ const RNDGETENTCNT = 0x80045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 @@ -680,3 +687,104 @@ type Winsize struct { Xpixel uint16 Ypixel uint16 } + +type Taskstats struct { + Version uint16 + Pad_cgo_0 [2]byte + Ac_exitcode uint32 + Ac_flag uint8 + Ac_nice uint8 + Pad_cgo_1 [6]byte + Cpu_count uint64 + Cpu_delay_total uint64 + Blkio_count uint64 + Blkio_delay_total uint64 + Swapin_count uint64 + Swapin_delay_total uint64 + Cpu_run_real_total uint64 + Cpu_run_virtual_total uint64 + Ac_comm [32]int8 + Ac_sched uint8 + Ac_pad [3]uint8 + Pad_cgo_2 [4]byte + Ac_uid uint32 + Ac_gid uint32 + Ac_pid uint32 + Ac_ppid uint32 + Ac_btime uint32 + Pad_cgo_3 [4]byte + Ac_etime uint64 + Ac_utime uint64 + Ac_stime uint64 + Ac_minflt uint64 + Ac_majflt uint64 + Coremem uint64 + Virtmem uint64 + Hiwater_rss uint64 + Hiwater_vm uint64 + Read_char uint64 + Write_char uint64 + Read_syscalls uint64 + Write_syscalls uint64 + Read_bytes uint64 + Write_bytes uint64 + Cancelled_write_bytes uint64 + Nvcsw uint64 + Nivcsw uint64 + Ac_utimescaled uint64 + Ac_stimescaled uint64 + Cpu_scaled_run_real_total uint64 + Freepages_count uint64 + Freepages_delay_total uint64 +} + +const ( + TASKSTATS_CMD_UNSPEC = 0x0 + TASKSTATS_CMD_GET = 0x1 + TASKSTATS_CMD_NEW = 0x2 + TASKSTATS_TYPE_UNSPEC = 0x0 + TASKSTATS_TYPE_PID = 0x1 + TASKSTATS_TYPE_TGID = 0x2 + TASKSTATS_TYPE_STATS = 0x3 + TASKSTATS_TYPE_AGGR_PID = 0x4 + TASKSTATS_TYPE_AGGR_TGID = 0x5 + TASKSTATS_TYPE_NULL = 0x6 + TASKSTATS_CMD_ATTR_UNSPEC = 0x0 + TASKSTATS_CMD_ATTR_PID = 0x1 + TASKSTATS_CMD_ATTR_TGID = 0x2 + TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 + TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 +) + +type Genlmsghdr struct { + Cmd uint8 + Version uint8 + Reserved uint16 +} + +const ( + CTRL_CMD_UNSPEC = 0x0 + CTRL_CMD_NEWFAMILY = 0x1 + CTRL_CMD_DELFAMILY = 0x2 + CTRL_CMD_GETFAMILY = 0x3 + CTRL_CMD_NEWOPS = 0x4 + CTRL_CMD_DELOPS = 0x5 + CTRL_CMD_GETOPS = 0x6 + CTRL_CMD_NEWMCAST_GRP = 0x7 + CTRL_CMD_DELMCAST_GRP = 0x8 + CTRL_CMD_GETMCAST_GRP = 0x9 + CTRL_ATTR_UNSPEC = 0x0 + CTRL_ATTR_FAMILY_ID = 0x1 + CTRL_ATTR_FAMILY_NAME = 0x2 + CTRL_ATTR_VERSION = 0x3 + CTRL_ATTR_HDRSIZE = 0x4 + CTRL_ATTR_MAXATTR = 0x5 + CTRL_ATTR_OPS = 0x6 + CTRL_ATTR_MCAST_GROUPS = 0x7 + CTRL_ATTR_OP_UNSPEC = 0x0 + CTRL_ATTR_OP_ID = 0x1 + CTRL_ATTR_OP_FLAGS = 0x2 + CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 + CTRL_ATTR_MCAST_GRP_NAME = 0x1 + CTRL_ATTR_MCAST_GRP_ID = 0x2 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go index d15c9f4a4..d2c1bc2c8 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go @@ -288,6 +288,13 @@ type IPv6Mreq struct { Interface uint32 } +type PacketMreq struct { + Ifindex int32 + Type uint16 + Alen uint16 + Address [8]uint8 +} + type Msghdr struct { Name *byte Namelen uint32 @@ -376,9 +383,11 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 + SizeofIovec = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc SizeofIPv6Mreq = 0x14 + SizeofPacketMreq = 0x10 SizeofMsghdr = 0x1c SizeofCmsghdr = 0xc SizeofInet4Pktinfo = 0xc @@ -419,7 +428,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -658,8 +667,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 @@ -677,3 +684,104 @@ type Winsize struct { Xpixel uint16 Ypixel uint16 } + +type Taskstats struct { + Version uint16 + Pad_cgo_0 [2]byte + Ac_exitcode uint32 + Ac_flag uint8 + Ac_nice uint8 + Pad_cgo_1 [6]byte + Cpu_count uint64 + Cpu_delay_total uint64 + Blkio_count uint64 + Blkio_delay_total uint64 + Swapin_count uint64 + Swapin_delay_total uint64 + Cpu_run_real_total uint64 + Cpu_run_virtual_total uint64 + Ac_comm [32]int8 + Ac_sched uint8 + Ac_pad [3]uint8 + Pad_cgo_2 [4]byte + Ac_uid uint32 + Ac_gid uint32 + Ac_pid uint32 + Ac_ppid uint32 + Ac_btime uint32 + Pad_cgo_3 [4]byte + Ac_etime uint64 + Ac_utime uint64 + Ac_stime uint64 + Ac_minflt uint64 + Ac_majflt uint64 + Coremem uint64 + Virtmem uint64 + Hiwater_rss uint64 + Hiwater_vm uint64 + Read_char uint64 + Write_char uint64 + Read_syscalls uint64 + Write_syscalls uint64 + Read_bytes uint64 + Write_bytes uint64 + Cancelled_write_bytes uint64 + Nvcsw uint64 + Nivcsw uint64 + Ac_utimescaled uint64 + Ac_stimescaled uint64 + Cpu_scaled_run_real_total uint64 + Freepages_count uint64 + Freepages_delay_total uint64 +} + +const ( + TASKSTATS_CMD_UNSPEC = 0x0 + TASKSTATS_CMD_GET = 0x1 + TASKSTATS_CMD_NEW = 0x2 + TASKSTATS_TYPE_UNSPEC = 0x0 + TASKSTATS_TYPE_PID = 0x1 + TASKSTATS_TYPE_TGID = 0x2 + TASKSTATS_TYPE_STATS = 0x3 + TASKSTATS_TYPE_AGGR_PID = 0x4 + TASKSTATS_TYPE_AGGR_TGID = 0x5 + TASKSTATS_TYPE_NULL = 0x6 + TASKSTATS_CMD_ATTR_UNSPEC = 0x0 + TASKSTATS_CMD_ATTR_PID = 0x1 + TASKSTATS_CMD_ATTR_TGID = 0x2 + TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 + TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 +) + +type Genlmsghdr struct { + Cmd uint8 + Version uint8 + Reserved uint16 +} + +const ( + CTRL_CMD_UNSPEC = 0x0 + CTRL_CMD_NEWFAMILY = 0x1 + CTRL_CMD_DELFAMILY = 0x2 + CTRL_CMD_GETFAMILY = 0x3 + CTRL_CMD_NEWOPS = 0x4 + CTRL_CMD_DELOPS = 0x5 + CTRL_CMD_GETOPS = 0x6 + CTRL_CMD_NEWMCAST_GRP = 0x7 + CTRL_CMD_DELMCAST_GRP = 0x8 + CTRL_CMD_GETMCAST_GRP = 0x9 + CTRL_ATTR_UNSPEC = 0x0 + CTRL_ATTR_FAMILY_ID = 0x1 + CTRL_ATTR_FAMILY_NAME = 0x2 + CTRL_ATTR_VERSION = 0x3 + CTRL_ATTR_HDRSIZE = 0x4 + CTRL_ATTR_MAXATTR = 0x5 + CTRL_ATTR_OPS = 0x6 + CTRL_ATTR_MCAST_GROUPS = 0x7 + CTRL_ATTR_OP_UNSPEC = 0x0 + CTRL_ATTR_OP_ID = 0x1 + CTRL_ATTR_OP_FLAGS = 0x2 + CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 + CTRL_ATTR_MCAST_GRP_NAME = 0x1 + CTRL_ATTR_MCAST_GRP_ID = 0x2 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index a39d3624d..ec7a0cd27 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -288,6 +288,13 @@ type IPv6Mreq struct { Interface uint32 } +type PacketMreq struct { + Ifindex int32 + Type uint16 + Alen uint16 + Address [8]uint8 +} + type Msghdr struct { Name *byte Namelen uint32 @@ -378,9 +385,11 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 + SizeofIovec = 0x10 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc SizeofIPv6Mreq = 0x14 + SizeofPacketMreq = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 SizeofInet4Pktinfo = 0xc @@ -421,7 +430,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -663,8 +672,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 @@ -682,3 +689,104 @@ type Winsize struct { Xpixel uint16 Ypixel uint16 } + +type Taskstats struct { + Version uint16 + Pad_cgo_0 [2]byte + Ac_exitcode uint32 + Ac_flag uint8 + Ac_nice uint8 + Pad_cgo_1 [6]byte + Cpu_count uint64 + Cpu_delay_total uint64 + Blkio_count uint64 + Blkio_delay_total uint64 + Swapin_count uint64 + Swapin_delay_total uint64 + Cpu_run_real_total uint64 + Cpu_run_virtual_total uint64 + Ac_comm [32]int8 + Ac_sched uint8 + Ac_pad [3]uint8 + Pad_cgo_2 [4]byte + Ac_uid uint32 + Ac_gid uint32 + Ac_pid uint32 + Ac_ppid uint32 + Ac_btime uint32 + Pad_cgo_3 [4]byte + Ac_etime uint64 + Ac_utime uint64 + Ac_stime uint64 + Ac_minflt uint64 + Ac_majflt uint64 + Coremem uint64 + Virtmem uint64 + Hiwater_rss uint64 + Hiwater_vm uint64 + Read_char uint64 + Write_char uint64 + Read_syscalls uint64 + Write_syscalls uint64 + Read_bytes uint64 + Write_bytes uint64 + Cancelled_write_bytes uint64 + Nvcsw uint64 + Nivcsw uint64 + Ac_utimescaled uint64 + Ac_stimescaled uint64 + Cpu_scaled_run_real_total uint64 + Freepages_count uint64 + Freepages_delay_total uint64 +} + +const ( + TASKSTATS_CMD_UNSPEC = 0x0 + TASKSTATS_CMD_GET = 0x1 + TASKSTATS_CMD_NEW = 0x2 + TASKSTATS_TYPE_UNSPEC = 0x0 + TASKSTATS_TYPE_PID = 0x1 + TASKSTATS_TYPE_TGID = 0x2 + TASKSTATS_TYPE_STATS = 0x3 + TASKSTATS_TYPE_AGGR_PID = 0x4 + TASKSTATS_TYPE_AGGR_TGID = 0x5 + TASKSTATS_TYPE_NULL = 0x6 + TASKSTATS_CMD_ATTR_UNSPEC = 0x0 + TASKSTATS_CMD_ATTR_PID = 0x1 + TASKSTATS_CMD_ATTR_TGID = 0x2 + TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 + TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 +) + +type Genlmsghdr struct { + Cmd uint8 + Version uint8 + Reserved uint16 +} + +const ( + CTRL_CMD_UNSPEC = 0x0 + CTRL_CMD_NEWFAMILY = 0x1 + CTRL_CMD_DELFAMILY = 0x2 + CTRL_CMD_GETFAMILY = 0x3 + CTRL_CMD_NEWOPS = 0x4 + CTRL_CMD_DELOPS = 0x5 + CTRL_CMD_GETOPS = 0x6 + CTRL_CMD_NEWMCAST_GRP = 0x7 + CTRL_CMD_DELMCAST_GRP = 0x8 + CTRL_CMD_GETMCAST_GRP = 0x9 + CTRL_ATTR_UNSPEC = 0x0 + CTRL_ATTR_FAMILY_ID = 0x1 + CTRL_ATTR_FAMILY_NAME = 0x2 + CTRL_ATTR_VERSION = 0x3 + CTRL_ATTR_HDRSIZE = 0x4 + CTRL_ATTR_MAXATTR = 0x5 + CTRL_ATTR_OPS = 0x6 + CTRL_ATTR_MCAST_GROUPS = 0x7 + CTRL_ATTR_OP_UNSPEC = 0x0 + CTRL_ATTR_OP_ID = 0x1 + CTRL_ATTR_OP_FLAGS = 0x2 + CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 + CTRL_ATTR_MCAST_GRP_NAME = 0x1 + CTRL_ATTR_MCAST_GRP_ID = 0x2 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index a05f082ec..bbe08d7db 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -288,6 +288,13 @@ type IPv6Mreq struct { Interface uint32 } +type PacketMreq struct { + Ifindex int32 + Type uint16 + Alen uint16 + Address [8]uint8 +} + type Msghdr struct { Name *byte Namelen uint32 @@ -378,9 +385,11 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 + SizeofIovec = 0x10 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc SizeofIPv6Mreq = 0x14 + SizeofPacketMreq = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 SizeofInet4Pktinfo = 0xc @@ -421,7 +430,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -663,8 +672,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 @@ -682,3 +689,104 @@ type Winsize struct { Xpixel uint16 Ypixel uint16 } + +type Taskstats struct { + Version uint16 + Pad_cgo_0 [2]byte + Ac_exitcode uint32 + Ac_flag uint8 + Ac_nice uint8 + Pad_cgo_1 [6]byte + Cpu_count uint64 + Cpu_delay_total uint64 + Blkio_count uint64 + Blkio_delay_total uint64 + Swapin_count uint64 + Swapin_delay_total uint64 + Cpu_run_real_total uint64 + Cpu_run_virtual_total uint64 + Ac_comm [32]int8 + Ac_sched uint8 + Ac_pad [3]uint8 + Pad_cgo_2 [4]byte + Ac_uid uint32 + Ac_gid uint32 + Ac_pid uint32 + Ac_ppid uint32 + Ac_btime uint32 + Pad_cgo_3 [4]byte + Ac_etime uint64 + Ac_utime uint64 + Ac_stime uint64 + Ac_minflt uint64 + Ac_majflt uint64 + Coremem uint64 + Virtmem uint64 + Hiwater_rss uint64 + Hiwater_vm uint64 + Read_char uint64 + Write_char uint64 + Read_syscalls uint64 + Write_syscalls uint64 + Read_bytes uint64 + Write_bytes uint64 + Cancelled_write_bytes uint64 + Nvcsw uint64 + Nivcsw uint64 + Ac_utimescaled uint64 + Ac_stimescaled uint64 + Cpu_scaled_run_real_total uint64 + Freepages_count uint64 + Freepages_delay_total uint64 +} + +const ( + TASKSTATS_CMD_UNSPEC = 0x0 + TASKSTATS_CMD_GET = 0x1 + TASKSTATS_CMD_NEW = 0x2 + TASKSTATS_TYPE_UNSPEC = 0x0 + TASKSTATS_TYPE_PID = 0x1 + TASKSTATS_TYPE_TGID = 0x2 + TASKSTATS_TYPE_STATS = 0x3 + TASKSTATS_TYPE_AGGR_PID = 0x4 + TASKSTATS_TYPE_AGGR_TGID = 0x5 + TASKSTATS_TYPE_NULL = 0x6 + TASKSTATS_CMD_ATTR_UNSPEC = 0x0 + TASKSTATS_CMD_ATTR_PID = 0x1 + TASKSTATS_CMD_ATTR_TGID = 0x2 + TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 + TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 +) + +type Genlmsghdr struct { + Cmd uint8 + Version uint8 + Reserved uint16 +} + +const ( + CTRL_CMD_UNSPEC = 0x0 + CTRL_CMD_NEWFAMILY = 0x1 + CTRL_CMD_DELFAMILY = 0x2 + CTRL_CMD_GETFAMILY = 0x3 + CTRL_CMD_NEWOPS = 0x4 + CTRL_CMD_DELOPS = 0x5 + CTRL_CMD_GETOPS = 0x6 + CTRL_CMD_NEWMCAST_GRP = 0x7 + CTRL_CMD_DELMCAST_GRP = 0x8 + CTRL_CMD_GETMCAST_GRP = 0x9 + CTRL_ATTR_UNSPEC = 0x0 + CTRL_ATTR_FAMILY_ID = 0x1 + CTRL_ATTR_FAMILY_NAME = 0x2 + CTRL_ATTR_VERSION = 0x3 + CTRL_ATTR_HDRSIZE = 0x4 + CTRL_ATTR_MAXATTR = 0x5 + CTRL_ATTR_OPS = 0x6 + CTRL_ATTR_MCAST_GROUPS = 0x7 + CTRL_ATTR_OP_UNSPEC = 0x0 + CTRL_ATTR_OP_ID = 0x1 + CTRL_ATTR_OP_FLAGS = 0x2 + CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 + CTRL_ATTR_MCAST_GRP_NAME = 0x1 + CTRL_ATTR_MCAST_GRP_ID = 0x2 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go index 2ecdddcd8..75ee05ab4 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go @@ -288,6 +288,13 @@ type IPv6Mreq struct { Interface uint32 } +type PacketMreq struct { + Ifindex int32 + Type uint16 + Alen uint16 + Address [8]uint8 +} + type Msghdr struct { Name *byte Namelen uint32 @@ -376,9 +383,11 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 + SizeofIovec = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc SizeofIPv6Mreq = 0x14 + SizeofPacketMreq = 0x10 SizeofMsghdr = 0x1c SizeofCmsghdr = 0xc SizeofInet4Pktinfo = 0xc @@ -419,7 +428,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -658,8 +667,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 @@ -677,3 +684,104 @@ type Winsize struct { Xpixel uint16 Ypixel uint16 } + +type Taskstats struct { + Version uint16 + Pad_cgo_0 [2]byte + Ac_exitcode uint32 + Ac_flag uint8 + Ac_nice uint8 + Pad_cgo_1 [6]byte + Cpu_count uint64 + Cpu_delay_total uint64 + Blkio_count uint64 + Blkio_delay_total uint64 + Swapin_count uint64 + Swapin_delay_total uint64 + Cpu_run_real_total uint64 + Cpu_run_virtual_total uint64 + Ac_comm [32]int8 + Ac_sched uint8 + Ac_pad [3]uint8 + Pad_cgo_2 [4]byte + Ac_uid uint32 + Ac_gid uint32 + Ac_pid uint32 + Ac_ppid uint32 + Ac_btime uint32 + Pad_cgo_3 [4]byte + Ac_etime uint64 + Ac_utime uint64 + Ac_stime uint64 + Ac_minflt uint64 + Ac_majflt uint64 + Coremem uint64 + Virtmem uint64 + Hiwater_rss uint64 + Hiwater_vm uint64 + Read_char uint64 + Write_char uint64 + Read_syscalls uint64 + Write_syscalls uint64 + Read_bytes uint64 + Write_bytes uint64 + Cancelled_write_bytes uint64 + Nvcsw uint64 + Nivcsw uint64 + Ac_utimescaled uint64 + Ac_stimescaled uint64 + Cpu_scaled_run_real_total uint64 + Freepages_count uint64 + Freepages_delay_total uint64 +} + +const ( + TASKSTATS_CMD_UNSPEC = 0x0 + TASKSTATS_CMD_GET = 0x1 + TASKSTATS_CMD_NEW = 0x2 + TASKSTATS_TYPE_UNSPEC = 0x0 + TASKSTATS_TYPE_PID = 0x1 + TASKSTATS_TYPE_TGID = 0x2 + TASKSTATS_TYPE_STATS = 0x3 + TASKSTATS_TYPE_AGGR_PID = 0x4 + TASKSTATS_TYPE_AGGR_TGID = 0x5 + TASKSTATS_TYPE_NULL = 0x6 + TASKSTATS_CMD_ATTR_UNSPEC = 0x0 + TASKSTATS_CMD_ATTR_PID = 0x1 + TASKSTATS_CMD_ATTR_TGID = 0x2 + TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 + TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 +) + +type Genlmsghdr struct { + Cmd uint8 + Version uint8 + Reserved uint16 +} + +const ( + CTRL_CMD_UNSPEC = 0x0 + CTRL_CMD_NEWFAMILY = 0x1 + CTRL_CMD_DELFAMILY = 0x2 + CTRL_CMD_GETFAMILY = 0x3 + CTRL_CMD_NEWOPS = 0x4 + CTRL_CMD_DELOPS = 0x5 + CTRL_CMD_GETOPS = 0x6 + CTRL_CMD_NEWMCAST_GRP = 0x7 + CTRL_CMD_DELMCAST_GRP = 0x8 + CTRL_CMD_GETMCAST_GRP = 0x9 + CTRL_ATTR_UNSPEC = 0x0 + CTRL_ATTR_FAMILY_ID = 0x1 + CTRL_ATTR_FAMILY_NAME = 0x2 + CTRL_ATTR_VERSION = 0x3 + CTRL_ATTR_HDRSIZE = 0x4 + CTRL_ATTR_MAXATTR = 0x5 + CTRL_ATTR_OPS = 0x6 + CTRL_ATTR_MCAST_GROUPS = 0x7 + CTRL_ATTR_OP_UNSPEC = 0x0 + CTRL_ATTR_OP_ID = 0x1 + CTRL_ATTR_OP_FLAGS = 0x2 + CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 + CTRL_ATTR_MCAST_GRP_NAME = 0x1 + CTRL_ATTR_MCAST_GRP_ID = 0x2 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index 33b8e55cf..30a257f83 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -289,6 +289,13 @@ type IPv6Mreq struct { Interface uint32 } +type PacketMreq struct { + Ifindex int32 + Type uint16 + Alen uint16 + Address [8]uint8 +} + type Msghdr struct { Name *byte Namelen uint32 @@ -379,9 +386,11 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 + SizeofIovec = 0x10 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc SizeofIPv6Mreq = 0x14 + SizeofPacketMreq = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 SizeofInet4Pktinfo = 0xc @@ -422,7 +431,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -671,8 +680,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 @@ -690,3 +697,104 @@ type Winsize struct { Xpixel uint16 Ypixel uint16 } + +type Taskstats struct { + Version uint16 + Pad_cgo_0 [2]byte + Ac_exitcode uint32 + Ac_flag uint8 + Ac_nice uint8 + Pad_cgo_1 [6]byte + Cpu_count uint64 + Cpu_delay_total uint64 + Blkio_count uint64 + Blkio_delay_total uint64 + Swapin_count uint64 + Swapin_delay_total uint64 + Cpu_run_real_total uint64 + Cpu_run_virtual_total uint64 + Ac_comm [32]uint8 + Ac_sched uint8 + Ac_pad [3]uint8 + Pad_cgo_2 [4]byte + Ac_uid uint32 + Ac_gid uint32 + Ac_pid uint32 + Ac_ppid uint32 + Ac_btime uint32 + Pad_cgo_3 [4]byte + Ac_etime uint64 + Ac_utime uint64 + Ac_stime uint64 + Ac_minflt uint64 + Ac_majflt uint64 + Coremem uint64 + Virtmem uint64 + Hiwater_rss uint64 + Hiwater_vm uint64 + Read_char uint64 + Write_char uint64 + Read_syscalls uint64 + Write_syscalls uint64 + Read_bytes uint64 + Write_bytes uint64 + Cancelled_write_bytes uint64 + Nvcsw uint64 + Nivcsw uint64 + Ac_utimescaled uint64 + Ac_stimescaled uint64 + Cpu_scaled_run_real_total uint64 + Freepages_count uint64 + Freepages_delay_total uint64 +} + +const ( + TASKSTATS_CMD_UNSPEC = 0x0 + TASKSTATS_CMD_GET = 0x1 + TASKSTATS_CMD_NEW = 0x2 + TASKSTATS_TYPE_UNSPEC = 0x0 + TASKSTATS_TYPE_PID = 0x1 + TASKSTATS_TYPE_TGID = 0x2 + TASKSTATS_TYPE_STATS = 0x3 + TASKSTATS_TYPE_AGGR_PID = 0x4 + TASKSTATS_TYPE_AGGR_TGID = 0x5 + TASKSTATS_TYPE_NULL = 0x6 + TASKSTATS_CMD_ATTR_UNSPEC = 0x0 + TASKSTATS_CMD_ATTR_PID = 0x1 + TASKSTATS_CMD_ATTR_TGID = 0x2 + TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 + TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 +) + +type Genlmsghdr struct { + Cmd uint8 + Version uint8 + Reserved uint16 +} + +const ( + CTRL_CMD_UNSPEC = 0x0 + CTRL_CMD_NEWFAMILY = 0x1 + CTRL_CMD_DELFAMILY = 0x2 + CTRL_CMD_GETFAMILY = 0x3 + CTRL_CMD_NEWOPS = 0x4 + CTRL_CMD_DELOPS = 0x5 + CTRL_CMD_GETOPS = 0x6 + CTRL_CMD_NEWMCAST_GRP = 0x7 + CTRL_CMD_DELMCAST_GRP = 0x8 + CTRL_CMD_GETMCAST_GRP = 0x9 + CTRL_ATTR_UNSPEC = 0x0 + CTRL_ATTR_FAMILY_ID = 0x1 + CTRL_ATTR_FAMILY_NAME = 0x2 + CTRL_ATTR_VERSION = 0x3 + CTRL_ATTR_HDRSIZE = 0x4 + CTRL_ATTR_MAXATTR = 0x5 + CTRL_ATTR_OPS = 0x6 + CTRL_ATTR_MCAST_GROUPS = 0x7 + CTRL_ATTR_OP_UNSPEC = 0x0 + CTRL_ATTR_OP_ID = 0x1 + CTRL_ATTR_OP_FLAGS = 0x2 + CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 + CTRL_ATTR_MCAST_GRP_NAME = 0x1 + CTRL_ATTR_MCAST_GRP_ID = 0x2 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index 987d48149..bebed6f11 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -289,6 +289,13 @@ type IPv6Mreq struct { Interface uint32 } +type PacketMreq struct { + Ifindex int32 + Type uint16 + Alen uint16 + Address [8]uint8 +} + type Msghdr struct { Name *byte Namelen uint32 @@ -379,9 +386,11 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 + SizeofIovec = 0x10 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc SizeofIPv6Mreq = 0x14 + SizeofPacketMreq = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 SizeofInet4Pktinfo = 0xc @@ -422,7 +431,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -671,8 +680,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 @@ -690,3 +697,104 @@ type Winsize struct { Xpixel uint16 Ypixel uint16 } + +type Taskstats struct { + Version uint16 + Pad_cgo_0 [2]byte + Ac_exitcode uint32 + Ac_flag uint8 + Ac_nice uint8 + Pad_cgo_1 [6]byte + Cpu_count uint64 + Cpu_delay_total uint64 + Blkio_count uint64 + Blkio_delay_total uint64 + Swapin_count uint64 + Swapin_delay_total uint64 + Cpu_run_real_total uint64 + Cpu_run_virtual_total uint64 + Ac_comm [32]uint8 + Ac_sched uint8 + Ac_pad [3]uint8 + Pad_cgo_2 [4]byte + Ac_uid uint32 + Ac_gid uint32 + Ac_pid uint32 + Ac_ppid uint32 + Ac_btime uint32 + Pad_cgo_3 [4]byte + Ac_etime uint64 + Ac_utime uint64 + Ac_stime uint64 + Ac_minflt uint64 + Ac_majflt uint64 + Coremem uint64 + Virtmem uint64 + Hiwater_rss uint64 + Hiwater_vm uint64 + Read_char uint64 + Write_char uint64 + Read_syscalls uint64 + Write_syscalls uint64 + Read_bytes uint64 + Write_bytes uint64 + Cancelled_write_bytes uint64 + Nvcsw uint64 + Nivcsw uint64 + Ac_utimescaled uint64 + Ac_stimescaled uint64 + Cpu_scaled_run_real_total uint64 + Freepages_count uint64 + Freepages_delay_total uint64 +} + +const ( + TASKSTATS_CMD_UNSPEC = 0x0 + TASKSTATS_CMD_GET = 0x1 + TASKSTATS_CMD_NEW = 0x2 + TASKSTATS_TYPE_UNSPEC = 0x0 + TASKSTATS_TYPE_PID = 0x1 + TASKSTATS_TYPE_TGID = 0x2 + TASKSTATS_TYPE_STATS = 0x3 + TASKSTATS_TYPE_AGGR_PID = 0x4 + TASKSTATS_TYPE_AGGR_TGID = 0x5 + TASKSTATS_TYPE_NULL = 0x6 + TASKSTATS_CMD_ATTR_UNSPEC = 0x0 + TASKSTATS_CMD_ATTR_PID = 0x1 + TASKSTATS_CMD_ATTR_TGID = 0x2 + TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 + TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 +) + +type Genlmsghdr struct { + Cmd uint8 + Version uint8 + Reserved uint16 +} + +const ( + CTRL_CMD_UNSPEC = 0x0 + CTRL_CMD_NEWFAMILY = 0x1 + CTRL_CMD_DELFAMILY = 0x2 + CTRL_CMD_GETFAMILY = 0x3 + CTRL_CMD_NEWOPS = 0x4 + CTRL_CMD_DELOPS = 0x5 + CTRL_CMD_GETOPS = 0x6 + CTRL_CMD_NEWMCAST_GRP = 0x7 + CTRL_CMD_DELMCAST_GRP = 0x8 + CTRL_CMD_GETMCAST_GRP = 0x9 + CTRL_ATTR_UNSPEC = 0x0 + CTRL_ATTR_FAMILY_ID = 0x1 + CTRL_ATTR_FAMILY_NAME = 0x2 + CTRL_ATTR_VERSION = 0x3 + CTRL_ATTR_HDRSIZE = 0x4 + CTRL_ATTR_MAXATTR = 0x5 + CTRL_ATTR_OPS = 0x6 + CTRL_ATTR_MCAST_GROUPS = 0x7 + CTRL_ATTR_OP_UNSPEC = 0x0 + CTRL_ATTR_OP_ID = 0x1 + CTRL_ATTR_OP_FLAGS = 0x2 + CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 + CTRL_ATTR_MCAST_GRP_NAME = 0x1 + CTRL_ATTR_MCAST_GRP_ID = 0x2 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go index cf539ca9d..286661b35 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -288,6 +288,13 @@ type IPv6Mreq struct { Interface uint32 } +type PacketMreq struct { + Ifindex int32 + Type uint16 + Alen uint16 + Address [8]uint8 +} + type Msghdr struct { Name *byte Namelen uint32 @@ -378,9 +385,11 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 + SizeofIovec = 0x10 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc SizeofIPv6Mreq = 0x14 + SizeofPacketMreq = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 SizeofInet4Pktinfo = 0xc @@ -421,7 +430,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -688,8 +697,6 @@ const RNDGETENTCNT = 0x80045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 @@ -707,3 +714,104 @@ type Winsize struct { Xpixel uint16 Ypixel uint16 } + +type Taskstats struct { + Version uint16 + _ [2]byte + Ac_exitcode uint32 + Ac_flag uint8 + Ac_nice uint8 + _ [6]byte + Cpu_count uint64 + Cpu_delay_total uint64 + Blkio_count uint64 + Blkio_delay_total uint64 + Swapin_count uint64 + Swapin_delay_total uint64 + Cpu_run_real_total uint64 + Cpu_run_virtual_total uint64 + Ac_comm [32]int8 + Ac_sched uint8 + Ac_pad [3]uint8 + _ [4]byte + Ac_uid uint32 + Ac_gid uint32 + Ac_pid uint32 + Ac_ppid uint32 + Ac_btime uint32 + _ [4]byte + Ac_etime uint64 + Ac_utime uint64 + Ac_stime uint64 + Ac_minflt uint64 + Ac_majflt uint64 + Coremem uint64 + Virtmem uint64 + Hiwater_rss uint64 + Hiwater_vm uint64 + Read_char uint64 + Write_char uint64 + Read_syscalls uint64 + Write_syscalls uint64 + Read_bytes uint64 + Write_bytes uint64 + Cancelled_write_bytes uint64 + Nvcsw uint64 + Nivcsw uint64 + Ac_utimescaled uint64 + Ac_stimescaled uint64 + Cpu_scaled_run_real_total uint64 + Freepages_count uint64 + Freepages_delay_total uint64 +} + +const ( + TASKSTATS_CMD_UNSPEC = 0x0 + TASKSTATS_CMD_GET = 0x1 + TASKSTATS_CMD_NEW = 0x2 + TASKSTATS_TYPE_UNSPEC = 0x0 + TASKSTATS_TYPE_PID = 0x1 + TASKSTATS_TYPE_TGID = 0x2 + TASKSTATS_TYPE_STATS = 0x3 + TASKSTATS_TYPE_AGGR_PID = 0x4 + TASKSTATS_TYPE_AGGR_TGID = 0x5 + TASKSTATS_TYPE_NULL = 0x6 + TASKSTATS_CMD_ATTR_UNSPEC = 0x0 + TASKSTATS_CMD_ATTR_PID = 0x1 + TASKSTATS_CMD_ATTR_TGID = 0x2 + TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 + TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 +) + +type Genlmsghdr struct { + Cmd uint8 + Version uint8 + Reserved uint16 +} + +const ( + CTRL_CMD_UNSPEC = 0x0 + CTRL_CMD_NEWFAMILY = 0x1 + CTRL_CMD_DELFAMILY = 0x2 + CTRL_CMD_GETFAMILY = 0x3 + CTRL_CMD_NEWOPS = 0x4 + CTRL_CMD_DELOPS = 0x5 + CTRL_CMD_GETOPS = 0x6 + CTRL_CMD_NEWMCAST_GRP = 0x7 + CTRL_CMD_DELMCAST_GRP = 0x8 + CTRL_CMD_GETMCAST_GRP = 0x9 + CTRL_ATTR_UNSPEC = 0x0 + CTRL_ATTR_FAMILY_ID = 0x1 + CTRL_ATTR_FAMILY_NAME = 0x2 + CTRL_ATTR_VERSION = 0x3 + CTRL_ATTR_HDRSIZE = 0x4 + CTRL_ATTR_MAXATTR = 0x5 + CTRL_ATTR_OPS = 0x6 + CTRL_ATTR_MCAST_GROUPS = 0x7 + CTRL_ATTR_OP_UNSPEC = 0x0 + CTRL_ATTR_OP_ID = 0x1 + CTRL_ATTR_OP_FLAGS = 0x2 + CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 + CTRL_ATTR_MCAST_GRP_NAME = 0x1 + CTRL_ATTR_MCAST_GRP_ID = 0x2 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go index caf755fb8..42f99c0a3 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go @@ -382,6 +382,11 @@ type Termios struct { Ospeed int32 } +const ( + AT_FDCWD = -0x64 + AT_SYMLINK_NOFOLLOW = 0x200 +) + type Sysctlnode struct { Flags uint32 Num int32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go index 91b4a5305..ff290ba06 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go @@ -389,6 +389,11 @@ type Termios struct { Ospeed int32 } +const ( + AT_FDCWD = -0x64 + AT_SYMLINK_NOFOLLOW = 0x200 +) + type Sysctlnode struct { Flags uint32 Num int32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go index c0758f9d3..66dbd7c05 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go @@ -387,6 +387,11 @@ type Termios struct { Ospeed int32 } +const ( + AT_FDCWD = -0x64 + AT_SYMLINK_NOFOLLOW = 0x200 +) + type Sysctlnode struct { Flags uint32 Num int32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go index 860a46979..20fc9f450 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go @@ -439,3 +439,8 @@ type Termios struct { Ispeed int32 Ospeed int32 } + +const ( + AT_FDCWD = -0x64 + AT_SYMLINK_NOFOLLOW = 0x2 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go index 23c52727f..46fe9490c 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go @@ -446,3 +446,8 @@ type Termios struct { Ispeed int32 Ospeed int32 } + +const ( + AT_FDCWD = -0x64 + AT_SYMLINK_NOFOLLOW = 0x2 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go new file mode 100644 index 000000000..62e1f7c04 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go @@ -0,0 +1,439 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_openbsd.go + +// +build arm,openbsd + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int32 +} + +type Timeval struct { + Sec int64 + Usec int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Mode uint32 + Dev int32 + Ino uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev int32 + Atim Timespec + Mtim Timespec + Ctim Timespec + Size int64 + Blocks int64 + Blksize int32 + Flags uint32 + Gen uint32 + X__st_birthtim Timespec +} + +type Statfs_t struct { + F_flags uint32 + F_bsize uint32 + F_iosize uint32 + F_blocks uint64 + F_bfree uint64 + F_bavail int64 + F_files uint64 + F_ffree uint64 + F_favail int64 + F_syncwrites uint64 + F_syncreads uint64 + F_asyncwrites uint64 + F_asyncreads uint64 + F_fsid Fsid + F_namemax uint32 + F_owner uint32 + F_ctime uint64 + F_fstypename [16]uint8 + F_mntonname [90]uint8 + F_mntfromname [90]uint8 + F_mntfromspec [90]uint8 + Pad_cgo_0 [2]byte + Mount_info [160]byte +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Dirent struct { + Fileno uint64 + Off int64 + Reclen uint16 + Type uint8 + Namlen uint8 + X__d_padding [4]uint8 + Name [256]uint8 +} + +type Fsid struct { + Val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [24]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen uint32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x20 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter int16 + Flags uint16 + Fflags uint32 + Data int64 + Udata *byte +} + +type FdSet struct { + Bits [32]uint32 +} + +const ( + SizeofIfMsghdr = 0x98 + SizeofIfData = 0x80 + SizeofIfaMsghdr = 0x18 + SizeofIfAnnounceMsghdr = 0x1a + SizeofRtMsghdr = 0x60 + SizeofRtMetrics = 0x38 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Pad1 uint8 + Pad2 uint8 + Addrs int32 + Flags int32 + Xflags int32 + Data IfData +} + +type IfData struct { + Type uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Mtu uint32 + Metric uint32 + Pad uint32 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Capabilities uint32 + Lastchange Timeval +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Pad1 uint8 + Pad2 uint8 + Addrs int32 + Flags int32 + Metric int32 +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + What uint16 + Name [16]uint8 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Priority uint8 + Mpls uint8 + Addrs int32 + Flags int32 + Fmask int32 + Pid int32 + Seq int32 + Errno int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Pksent uint64 + Expire int64 + Locks uint32 + Mtu uint32 + Refcnt uint32 + Hopcount uint32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pad uint32 +} + +type Mclpool struct{} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type BpfTimeval struct { + Sec uint32 + Usec uint32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} + +const ( + AT_FDCWD = -0x64 + AT_SYMLINK_NOFOLLOW = 0x2 +) diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 518250e70..9b5ed549a 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -71,12 +71,17 @@ func UTF16PtrFromString(s string) (*uint16, error) { func Getpagesize() int { return 4096 } -// Converts a Go function to a function pointer conforming -// to the stdcall or cdecl calling convention. This is useful when -// interoperating with Windows code requiring callbacks. -// Implemented in runtime/syscall_windows.goc -func NewCallback(fn interface{}) uintptr -func NewCallbackCDecl(fn interface{}) uintptr +// NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention. +// This is useful when interoperating with Windows code requiring callbacks. +func NewCallback(fn interface{}) uintptr { + return syscall.NewCallback(fn) +} + +// NewCallbackCDecl converts a Go function to a function pointer conforming to the cdecl calling convention. +// This is useful when interoperating with Windows code requiring callbacks. +func NewCallbackCDecl(fn interface{}) uintptr { + return syscall.NewCallbackCDecl(fn) +} // windows api calls @@ -176,6 +181,8 @@ func NewCallbackCDecl(fn interface{}) uintptr //sys RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) = advapi32.RegQueryValueExW //sys getCurrentProcessId() (pid uint32) = kernel32.GetCurrentProcessId //sys GetConsoleMode(console Handle, mode *uint32) (err error) = kernel32.GetConsoleMode +//sys SetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode +//sys GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo //sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW //sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW //sys CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot @@ -186,8 +193,12 @@ func NewCallbackCDecl(fn interface{}) uintptr //sys CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) [failretval&0xff==0] = CreateSymbolicLinkW //sys CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) [failretval&0xff==0] = CreateHardLinkW //sys GetCurrentThreadId() (id uint32) -//sys CreateEvent(eventAttrs *syscall.SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) = kernel32.CreateEventW +//sys CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) = kernel32.CreateEventW +//sys CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) = kernel32.CreateEventExW +//sys OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) = kernel32.OpenEventW //sys SetEvent(event Handle) (err error) = kernel32.SetEvent +//sys ResetEvent(event Handle) (err error) = kernel32.ResetEvent +//sys PulseEvent(event Handle) (err error) = kernel32.PulseEvent // syscall interface implementation for other packages diff --git a/vendor/golang.org/x/sys/windows/ztypes_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go similarity index 96% rename from vendor/golang.org/x/sys/windows/ztypes_windows.go rename to vendor/golang.org/x/sys/windows/types_windows.go index c99a3fe5f..401a5f2d9 100644 --- a/vendor/golang.org/x/sys/windows/ztypes_windows.go +++ b/vendor/golang.org/x/sys/windows/types_windows.go @@ -1233,3 +1233,50 @@ const ( IfOperStatusNotPresent = 6 IfOperStatusLowerLayerDown = 7 ) + +// Console related constants used for the mode parameter to SetConsoleMode. See +// https://docs.microsoft.com/en-us/windows/console/setconsolemode for details. + +const ( + ENABLE_PROCESSED_INPUT = 0x1 + ENABLE_LINE_INPUT = 0x2 + ENABLE_ECHO_INPUT = 0x4 + ENABLE_WINDOW_INPUT = 0x8 + ENABLE_MOUSE_INPUT = 0x10 + ENABLE_INSERT_MODE = 0x20 + ENABLE_QUICK_EDIT_MODE = 0x40 + ENABLE_EXTENDED_FLAGS = 0x80 + ENABLE_AUTO_POSITION = 0x100 + ENABLE_VIRTUAL_TERMINAL_INPUT = 0x200 + + ENABLE_PROCESSED_OUTPUT = 0x1 + ENABLE_WRAP_AT_EOL_OUTPUT = 0x2 + ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x4 + DISABLE_NEWLINE_AUTO_RETURN = 0x8 + ENABLE_LVB_GRID_WORLDWIDE = 0x10 +) + +type Coord struct { + X int16 + Y int16 +} + +type SmallRect struct { + Left int16 + Top int16 + Right int16 + Bottom int16 +} + +// Used with GetConsoleScreenBuffer to retreive information about a console +// screen buffer. See +// https://docs.microsoft.com/en-us/windows/console/console-screen-buffer-info-str +// for details. + +type ConsoleScreenBufferInfo struct { + Size Coord + CursorPosition Coord + Attributes uint16 + Window SmallRect + MaximumWindowSize Coord +} diff --git a/vendor/golang.org/x/sys/windows/ztypes_windows_386.go b/vendor/golang.org/x/sys/windows/types_windows_386.go similarity index 100% rename from vendor/golang.org/x/sys/windows/ztypes_windows_386.go rename to vendor/golang.org/x/sys/windows/types_windows_386.go diff --git a/vendor/golang.org/x/sys/windows/ztypes_windows_amd64.go b/vendor/golang.org/x/sys/windows/types_windows_amd64.go similarity index 100% rename from vendor/golang.org/x/sys/windows/ztypes_windows_amd64.go rename to vendor/golang.org/x/sys/windows/types_windows_amd64.go diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index d588e1d03..2f893d2ef 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -161,6 +161,8 @@ var ( procRegQueryValueExW = modadvapi32.NewProc("RegQueryValueExW") procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId") procGetConsoleMode = modkernel32.NewProc("GetConsoleMode") + procSetConsoleMode = modkernel32.NewProc("SetConsoleMode") + procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo") procWriteConsoleW = modkernel32.NewProc("WriteConsoleW") procReadConsoleW = modkernel32.NewProc("ReadConsoleW") procCreateToolhelp32Snapshot = modkernel32.NewProc("CreateToolhelp32Snapshot") @@ -171,7 +173,11 @@ var ( procCreateHardLinkW = modkernel32.NewProc("CreateHardLinkW") procGetCurrentThreadId = modkernel32.NewProc("GetCurrentThreadId") procCreateEventW = modkernel32.NewProc("CreateEventW") + procCreateEventExW = modkernel32.NewProc("CreateEventExW") + procOpenEventW = modkernel32.NewProc("OpenEventW") procSetEvent = modkernel32.NewProc("SetEvent") + procResetEvent = modkernel32.NewProc("ResetEvent") + procPulseEvent = modkernel32.NewProc("PulseEvent") procWSAStartup = modws2_32.NewProc("WSAStartup") procWSACleanup = modws2_32.NewProc("WSACleanup") procWSAIoctl = modws2_32.NewProc("WSAIoctl") @@ -1629,6 +1635,30 @@ func GetConsoleMode(console Handle, mode *uint32) (err error) { return } +func SetConsoleMode(console Handle, mode uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(console), uintptr(mode), 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) { + r1, _, e1 := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(info)), 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) { r1, _, e1 := syscall.Syscall6(procWriteConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved)), 0) if r1 == 0 { @@ -1732,7 +1762,7 @@ func GetCurrentThreadId() (id uint32) { return } -func CreateEvent(eventAttrs *syscall.SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) { +func CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) { r0, _, e1 := syscall.Syscall6(procCreateEventW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(manualReset), uintptr(initialState), uintptr(unsafe.Pointer(name)), 0, 0) handle = Handle(r0) if handle == 0 { @@ -1745,6 +1775,38 @@ func CreateEvent(eventAttrs *syscall.SecurityAttributes, manualReset uint32, ini return } +func CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall6(procCreateEventExW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) { + var _p0 uint32 + if inheritHandle { + _p0 = 1 + } else { + _p0 = 0 + } + r0, _, e1 := syscall.Syscall(procOpenEventW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name))) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + func SetEvent(event Handle) (err error) { r1, _, e1 := syscall.Syscall(procSetEvent.Addr(), 1, uintptr(event), 0, 0) if r1 == 0 { @@ -1757,6 +1819,30 @@ func SetEvent(event Handle) (err error) { return } +func ResetEvent(event Handle) (err error) { + r1, _, e1 := syscall.Syscall(procResetEvent.Addr(), 1, uintptr(event), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func PulseEvent(event Handle) (err error) { + r1, _, e1 := syscall.Syscall(procPulseEvent.Addr(), 1, uintptr(event), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + func WSAStartup(verreq uint32, data *WSAData) (sockerr error) { r0, _, _ := syscall.Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(unsafe.Pointer(data)), 0) if r0 != 0 { diff --git a/vendor/google.golang.org/api/.gitignore b/vendor/google.golang.org/api/.gitignore new file mode 100644 index 000000000..50d2a9bd6 --- /dev/null +++ b/vendor/google.golang.org/api/.gitignore @@ -0,0 +1,12 @@ +_obj/ +*_testmain.go +clientid.dat +clientsecret.dat +/google-api-go-generator/google-api-go-generator + +*.6 +*.8 +*~ +*.out +*.test +*.exe diff --git a/vendor/google.golang.org/api/.hgignore b/vendor/google.golang.org/api/.hgignore deleted file mode 100644 index d31fc45fd..000000000 --- a/vendor/google.golang.org/api/.hgignore +++ /dev/null @@ -1,11 +0,0 @@ -_obj -_testmain.go -clientid.dat -clientsecret.dat -google-api-go-generator/google-api-go-gen - -syntax:glob -*.6 -*.8 -*~ -*.out diff --git a/vendor/google.golang.org/api/Makefile b/vendor/google.golang.org/api/Makefile deleted file mode 100644 index 0d841b1d4..000000000 --- a/vendor/google.golang.org/api/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -API_JSON = $(wildcard */*/*-api.json */*/*/*-api.json) - -# Download all API specifications and rebuild Go bindings. -# All downloaded files are cached in $TMPDIR for reuse with 'cached' below. -all: generator - $(GOPATH)/bin/google-api-go-generator -cache=false -install -api=* - -# Reuse cached API specifications in $TMPDIR and rebuild Go bindings. -cached: generator - $(GOPATH)/bin/google-api-go-generator -cache=true -install -api=* - -# Only rebuild Go bindings, do not modify API specifications. -# For every existing */*/*-api.json file, */*/*-gen.go will be built. -local: $(API_JSON:-api.json=-gen.go) - -# Pattern rule for the 'local' target. -# Translates otherwise unnamed targets with a -gen.go suffix into the -# matching input file with a -api.json suffix. $< is the input file. -%-gen.go: %-api.json generator - $(GOPATH)/bin/google-api-go-generator -api_json_file=$< - -# Rebuild and install $(GOPATH)/bin/google-api-go-generator -generator: - go install google.golang.org/api/googleapi - go install google.golang.org/api/google-api-go-generator - -.PHONY: all cached local generator diff --git a/vendor/google.golang.org/api/README.md b/vendor/google.golang.org/api/README.md index 90053150f..097d3308f 100644 --- a/vendor/google.golang.org/api/README.md +++ b/vendor/google.golang.org/api/README.md @@ -1,20 +1,50 @@ # Google APIs Client Library for Go -## Library maintenance -This client library is supported, but in maintenance mode only. -We are fixing necessary bugs and adding essential features to ensure this -library continues to meet your needs for accessing Google APIs. -Non-critical issues will be closed. -Any issue may be reopened if it is causing ongoing problems. +## Getting Started + +``` +$ go get google.golang.org/api/tasks/v1 +$ go get google.golang.org/api/moderator/v1 +$ go get google.golang.org/api/urlshortener/v1 +... etc ... +``` + +and using: + +```go +package main + +import ( + "net/http" + + "google.golang.org/api/urlshortener/v1" +) + +func main() { + svc, err := urlshortener.New(http.DefaultClient) + // ... +} +``` + +* For a longer tutorial, see the [Getting Started guide](https://github.com/google/google-api-go-client/blob/master/GettingStarted.md). +* For examples, see the [examples directory](https://github.com/google/google-api-go-client/tree/master/examples). +* For support, use the [golang-nuts](https://groups.google.com/group/golang-nuts) mailing list. ## Status [![Build Status](https://travis-ci.org/google/google-api-go-client.png)](https://travis-ci.org/google/google-api-go-client) +[![GoDoc](https://godoc.org/google.golang.org/api?status.svg)](https://godoc.org/google.golang.org/api) These are auto-generated Go libraries from the Google Discovery Service's JSON description files of the available "new style" Google APIs. Due to the auto-generated nature of this collection of libraries, complete APIs or specific versions can appear or go away without notice. As a result, you should always locally vendor any API(s) that your code relies upon. +This client library is supported, but in maintenance mode only. +We are fixing necessary bugs and adding essential features to ensure this +library continues to meet your needs for accessing Google APIs. +Non-critical issues will be closed. +Any issue may be reopened if it is causing ongoing problems. + If you're working with Google Cloud Platform APIs such as Datastore or Pub/Sub, consider using the [Cloud Client Libraries for Go](https://github.com/GoogleCloudPlatform/google-cloud-go) @@ -25,37 +55,6 @@ The generator itself and the code it produces are beta. Some APIs are alpha/beta, and indicated as such in the import path (e.g., "google.golang.org/api/someapi/v1alpha"). -Announcement email: - -* http://groups.google.com/group/golang-nuts/browse_thread/thread/6c7281450be9a21e - -Getting started documentation: - -* https://github.com/google/google-api-go-client/blob/master/GettingStarted.md - -In summary: - -``` -$ go get google.golang.org/api/storage/v1 -$ go get google.golang.org/api/tasks/v1 -$ go get google.golang.org/api/moderator/v1 -... etc ... -``` - -For docs, see e.g.: - -* https://godoc.org/google.golang.org/api/storage/v1 - -The package of a given import is the second-to-last component, before the version number. - -For examples, see: - -* https://github.com/google/google-api-go-client/tree/master/examples - -For support, use the golang-nuts@ mailing list: - -* https://groups.google.com/group/golang-nuts - ## Application Default Credentials Example Application Default Credentials provide a simplified way to obtain credentials @@ -68,13 +67,13 @@ applications that run on Google Compute Engine or Google App Engine. Default credentials are provided by the `golang.org/x/oauth2/google` package. To use them, add the following import: -``` +```go import "golang.org/x/oauth2/google" ``` Some credentials types require you to specify scopes, and service entry points may not inject them. If you encounter this situation you may need to specify scopes as follows: -``` +```go import ( "golang.org/x/net/context" "golang.org/x/oauth2/google" @@ -98,7 +97,7 @@ func main() { If you need a `oauth2.TokenSource`, use the `DefaultTokenSource` function: -``` +```go ts, err := google.DefaultTokenSource(ctx, scope1, scope2, ...) if err != nil { //... diff --git a/vendor/google.golang.org/api/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-api.json b/vendor/google.golang.org/api/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-api.json index 8f07bb48c..b9e5d033f 100644 --- a/vendor/google.golang.org/api/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-api.json +++ b/vendor/google.golang.org/api/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-api.json @@ -1,4 +1,5 @@ { + "basePath": "", "ownerDomain": "google.com", "name": "acceleratedmobilepageurl", "batchPath": "batch", @@ -6,41 +7,31 @@ "documentationLink": "https://developers.google.com/amp/cache/", "revision": "20170718", "title": "Accelerated Mobile Pages (AMP) URL API", - "discoveryVersion": "v1", "ownerName": "Google", + "discoveryVersion": "v1", "version_module": "True", "resources": { "ampUrls": { "methods": { "batchGet": { - "description": "Returns AMP URL(s) and equivalent\n[AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format).", "request": { "$ref": "BatchGetAmpUrlsRequest" }, + "description": "Returns AMP URL(s) and equivalent\n[AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format).", + "httpMethod": "POST", + "parameterOrder": [], "response": { "$ref": "BatchGetAmpUrlsResponse" }, - "parameterOrder": [], - "httpMethod": "POST", "parameters": {}, "flatPath": "v1/ampUrls:batchGet", - "id": "acceleratedmobilepageurl.ampUrls.batchGet", - "path": "v1/ampUrls:batchGet" + "path": "v1/ampUrls:batchGet", + "id": "acceleratedmobilepageurl.ampUrls.batchGet" } } } }, "parameters": { - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "bearer_token": { - "type": "string", - "location": "query", - "description": "OAuth bearer token." - }, "upload_protocol": { "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", @@ -53,35 +44,34 @@ "type": "boolean" }, "uploadType": { + "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", "type": "string", "location": "query" }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, "callback": { - "location": "query", "description": "JSONP", - "type": "string" + "type": "string", + "location": "query" }, "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", "enum": [ "1", "2" ], "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" + "type": "string" }, "alt": { - "default": "json", "enum": [ "json", "media", @@ -94,7 +84,8 @@ "Responses with Content-Type of application/x-protobuf" ], "location": "query", - "description": "Data format for response." + "description": "Data format for response.", + "default": "json" }, "access_token": { "location": "query", @@ -102,68 +93,39 @@ "type": "string" }, "key": { - "location": "query", "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.", - "type": "string" + "type": "string", + "location": "query" }, "quotaUser": { - "location": "query", "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.", - "type": "string" + "type": "string", + "location": "query" }, "pp": { "description": "Pretty-print response.", "default": "true", "type": "boolean", "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" } }, "schemas": { - "BatchGetAmpUrlsResponse": { - "description": "Batch AMP URL response.", - "type": "object", - "properties": { - "urlErrors": { - "items": { - "$ref": "AmpUrlError" - }, - "type": "array", - "description": "The errors for requested URLs that have no AMP URL." - }, - "ampUrls": { - "description": "For each URL in BatchAmpUrlsRequest, the URL response. The response might\nnot be in the same order as URLs in the batch request.\nIf BatchAmpUrlsRequest contains duplicate URLs, AmpUrl is generated\nonly once.", - "items": { - "$ref": "AmpUrl" - }, - "type": "array" - } - }, - "id": "BatchGetAmpUrlsResponse" - }, - "AmpUrl": { - "description": "AMP URL response for a requested URL.", - "type": "object", - "properties": { - "cdnAmpUrl": { - "type": "string", - "description": "The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to\nthe cached document in the Google AMP Cache." - }, - "ampUrl": { - "description": "The AMP URL pointing to the publisher's web server.", - "type": "string" - }, - "originalUrl": { - "type": "string", - "description": "The original non-AMP URL." - } - }, - "id": "AmpUrl" - }, "AmpUrlError": { "description": "AMP URL Error resource for a requested URL that couldn't be found.", "type": "object", "properties": { "errorCode": { + "description": "The error code of an API call.", "type": "string", "enumDescriptions": [ "Not specified error.", @@ -180,8 +142,7 @@ "APPLICATION_ERROR", "URL_IS_VALID_AMP", "URL_IS_INVALID_AMP" - ], - "description": "The error code of an API call." + ] }, "originalUrl": { "description": "The original non-AMP URL.", @@ -198,13 +159,6 @@ "description": "AMP URL request for a batch of URLs.", "type": "object", "properties": { - "urls": { - "description": "List of URLs to look up for the paired AMP URLs.\nThe URLs are case-sensitive. Up to 50 URLs per lookup\n(see [Usage Limits](/amp/cache/reference/limits)).", - "items": { - "type": "string" - }, - "type": "array" - }, "lookupStrategy": { "enumDescriptions": [ "FETCH_LIVE_DOC strategy involves live document fetch of URLs not found in\nthe index. Any request URL not found in the index is crawled in realtime\nto validate if there is a corresponding AMP URL. This strategy has higher\ncoverage but with extra latency introduced by realtime crawling. This is\nthe default strategy. Applications using this strategy should set higher\nHTTP timeouts of the API calls.", @@ -216,9 +170,56 @@ ], "description": "The lookup_strategy being requested.", "type": "string" + }, + "urls": { + "description": "List of URLs to look up for the paired AMP URLs.\nThe URLs are case-sensitive. Up to 50 URLs per lookup\n(see [Usage Limits](/amp/cache/reference/limits)).", + "items": { + "type": "string" + }, + "type": "array" } }, "id": "BatchGetAmpUrlsRequest" + }, + "BatchGetAmpUrlsResponse": { + "description": "Batch AMP URL response.", + "type": "object", + "properties": { + "urlErrors": { + "description": "The errors for requested URLs that have no AMP URL.", + "items": { + "$ref": "AmpUrlError" + }, + "type": "array" + }, + "ampUrls": { + "description": "For each URL in BatchAmpUrlsRequest, the URL response. The response might\nnot be in the same order as URLs in the batch request.\nIf BatchAmpUrlsRequest contains duplicate URLs, AmpUrl is generated\nonly once.", + "items": { + "$ref": "AmpUrl" + }, + "type": "array" + } + }, + "id": "BatchGetAmpUrlsResponse" + }, + "AmpUrl": { + "description": "AMP URL response for a requested URL.", + "type": "object", + "properties": { + "cdnAmpUrl": { + "description": "The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to\nthe cached document in the Google AMP Cache.", + "type": "string" + }, + "ampUrl": { + "description": "The AMP URL pointing to the publisher's web server.", + "type": "string" + }, + "originalUrl": { + "description": "The original non-AMP URL.", + "type": "string" + } + }, + "id": "AmpUrl" } }, "protocol": "rest", @@ -228,9 +229,8 @@ }, "version": "v1", "baseUrl": "https://acceleratedmobilepageurl.googleapis.com/", - "servicePath": "", - "description": "Retrieves the list of AMP URLs (and equivalent AMP Cache URLs) for a given list of public URL(s).\n", "kind": "discovery#restDescription", - "rootUrl": "https://acceleratedmobilepageurl.googleapis.com/", - "basePath": "" + "description": "Retrieves the list of AMP URLs (and equivalent AMP Cache URLs) for a given list of public URL(s).\n", + "servicePath": "", + "rootUrl": "https://acceleratedmobilepageurl.googleapis.com/" } diff --git a/vendor/google.golang.org/api/adexchangebuyer/v1.2/adexchangebuyer-api.json b/vendor/google.golang.org/api/adexchangebuyer/v1.2/adexchangebuyer-api.json index 77b7e8652..5dfdc4bbc 100644 --- a/vendor/google.golang.org/api/adexchangebuyer/v1.2/adexchangebuyer-api.json +++ b/vendor/google.golang.org/api/adexchangebuyer/v1.2/adexchangebuyer-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/0_pkDGZUigw6P9-q8PUQy4V9Lvo\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/-1DKqIhPUpLfO8DBj8P3gNrIPtE\"", "discoveryVersion": "v1", "id": "adexchangebuyer:v1.2", "name": "adexchangebuyer", "canonicalName": "Ad Exchange Buyer", "version": "v1.2", - "revision": "20170504", + "revision": "20170810", "title": "Ad Exchange Buyer API", "description": "Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/adexchangebuyer/v1.3/adexchangebuyer-api.json b/vendor/google.golang.org/api/adexchangebuyer/v1.3/adexchangebuyer-api.json index a9f3eaa2d..91b4a6f62 100644 --- a/vendor/google.golang.org/api/adexchangebuyer/v1.3/adexchangebuyer-api.json +++ b/vendor/google.golang.org/api/adexchangebuyer/v1.3/adexchangebuyer-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/AyER-m-NeyHqidJeSDw3qhKYlvg\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/_RwUq281eKa7d-tJKPdh-IE_OEk\"", "discoveryVersion": "v1", "id": "adexchangebuyer:v1.3", "name": "adexchangebuyer", "canonicalName": "Ad Exchange Buyer", "version": "v1.3", - "revision": "20170504", + "revision": "20170810", "title": "Ad Exchange Buyer API", "description": "Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/adexchangebuyer/v1.4/adexchangebuyer-api.json b/vendor/google.golang.org/api/adexchangebuyer/v1.4/adexchangebuyer-api.json index 723786341..bc64ec9a9 100644 --- a/vendor/google.golang.org/api/adexchangebuyer/v1.4/adexchangebuyer-api.json +++ b/vendor/google.golang.org/api/adexchangebuyer/v1.4/adexchangebuyer-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/XvWFbU-Khae3KqVnoqt96DoRPGo\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/nD15-sVgx0hSdEaD_RN4E40IFV8\"", "discoveryVersion": "v1", "id": "adexchangebuyer:v1.4", "name": "adexchangebuyer", "canonicalName": "Ad Exchange Buyer", "version": "v1.4", - "revision": "20170504", + "revision": "20170810", "title": "Ad Exchange Buyer API", "description": "Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.", "ownerDomain": "google.com", @@ -2160,7 +2160,7 @@ "properties": { "accountId": { "type": "string", - "description": "The account id of the seller." + "description": "Deprecated: use the seller.account_id. The account id of the seller." }, "audience": { "type": "string", diff --git a/vendor/google.golang.org/api/adexchangebuyer/v1.4/adexchangebuyer-gen.go b/vendor/google.golang.org/api/adexchangebuyer/v1.4/adexchangebuyer-gen.go index f65404f9c..76bd017ff 100644 --- a/vendor/google.golang.org/api/adexchangebuyer/v1.4/adexchangebuyer-gen.go +++ b/vendor/google.golang.org/api/adexchangebuyer/v1.4/adexchangebuyer-gen.go @@ -3361,7 +3361,8 @@ func (s *Proposal) MarshalJSON() ([]byte, error) { } type PublisherProfileApiProto struct { - // AccountId: The account id of the seller. + // AccountId: Deprecated: use the seller.account_id. The account id of + // the seller. AccountId string `json:"accountId,omitempty"` // Audience: Publisher provided info on its audience. diff --git a/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json b/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json index bc78e545d..a7b53b4b2 100644 --- a/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json +++ b/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json @@ -1,657 +1,1496 @@ { - "id": "adexchangebuyer2:v2beta1", - "documentationLink": "https://developers.google.com/ad-exchange/buyer-rest/reference/rest/", - "revision": "20170802", - "discoveryVersion": "v1", - "version_module": "True", - "schemas": { - "Date": { - "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", - "type": "object", - "properties": { - "day": { - "format": "int32", - "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", - "type": "integer" - }, - "year": { - "format": "int32", - "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", - "type": "integer" - }, - "month": { - "format": "int32", - "description": "Month of year. Must be from 1 to 12.", - "type": "integer" - } - }, - "id": "Date" - }, - "RowDimensions": { - "properties": { - "timeInterval": { - "$ref": "TimeInterval", - "description": "The time interval that this row represents." - } - }, - "id": "RowDimensions", - "description": "A response may include multiple rows, breaking down along various dimensions.\nEncapsulates the values of all dimensions for a given row.", - "type": "object" - }, - "Empty": { - "properties": {}, - "id": "Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object" - }, - "AppContext": { - "properties": { - "appTypes": { - "enumDescriptions": [ - "Native app context.", - "Mobile web app context." - ], - "description": "The app types this restriction applies to.", - "items": { - "enum": [ - "NATIVE", - "WEB" - ], - "type": "string" - }, - "type": "array" - } - }, - "id": "AppContext", - "description": "@OutputOnly The app type the restriction applies to for mobile device.", - "type": "object" - }, - "ListFilteredBidsResponse": { - "properties": { - "creativeStatusRows": { - "description": "List of rows, with counts of filtered bids aggregated by filtering reason\n(i.e. creative status).", - "items": { - "$ref": "CreativeStatusRow" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListFilteredBidsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBids.list\nmethod to retrieve the next page of results.", - "type": "string" - } - }, - "id": "ListFilteredBidsResponse", - "description": "Response message for listing all reasons that bids were filtered from the\nauction.", - "type": "object" - }, - "SecurityContext": { - "properties": { - "securities": { - "description": "The security types in this context.", - "items": { - "enum": [ - "INSECURE", - "SSL" - ], - "type": "string" - }, - "type": "array", - "enumDescriptions": [ - "Matches impressions that require insecure compatibility.", - "Matches impressions that require SSL compatibility." - ] - } - }, - "id": "SecurityContext", - "description": "@OutputOnly A security context.", - "type": "object" - }, - "HtmlContent": { - "properties": { - "height": { - "format": "int32", - "description": "The height of the HTML snippet in pixels.", - "type": "integer" - }, - "width": { - "format": "int32", - "description": "The width of the HTML snippet in pixels.", - "type": "integer" - }, - "snippet": { - "description": "The HTML snippet that displays the ad when inserted in the web page.", - "type": "string" - } - }, - "id": "HtmlContent", - "description": "HTML content for a creative.", - "type": "object" - }, - "ListCreativesResponse": { - "properties": { - "creatives": { - "description": "The list of creatives.", - "items": { - "$ref": "Creative" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListCreativesRequest.page_token\nfield in the subsequent call to `ListCreatives` method to retrieve the next\npage of results.", - "type": "string" - } - }, - "id": "ListCreativesResponse", - "description": "A response for listing creatives.", - "type": "object" - }, - "ListFilteredBidRequestsResponse": { - "properties": { - "calloutStatusRows": { - "description": "List of rows, with counts of filtered bid requests aggregated by callout\nstatus.", - "items": { - "$ref": "CalloutStatusRow" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListFilteredBidRequestsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBidRequests.list\nmethod to retrieve the next page of results.", - "type": "string" - } - }, - "id": "ListFilteredBidRequestsResponse", - "description": "Response message for listing all reasons that bid requests were filtered and\nnot sent to the buyer.", - "type": "object" - }, - "ListBidMetricsResponse": { - "description": "Response message for listing the metrics that are measured in number of bids.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListBidMetricsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.bidMetrics.list\nmethod to retrieve the next page of results.", - "type": "string" - }, - "bidMetricsRows": { - "description": "List of rows, each containing a set of bid metrics.", - "items": { - "$ref": "BidMetricsRow" - }, - "type": "array" - } - }, - "id": "ListBidMetricsResponse" - }, - "Reason": { - "properties": { - "status": { - "format": "int32", - "description": "The filtering status code. Please refer to the\n[creative-status-codes.txt](https://storage.googleapis.com/adx-rtb-dictionaries/creative-status-codes.txt)\nfile for different statuses.", - "type": "integer" - }, - "count": { - "format": "int64", - "description": "The number of times the creative was filtered for the status. The\ncount is aggregated across all publishers on the exchange.", - "type": "string" - } - }, - "id": "Reason", - "description": "A specific filtering status and how many times it occurred.", - "type": "object" - }, - "VideoContent": { - "properties": { - "videoUrl": { - "description": "The URL to fetch a video ad.", - "type": "string" - } - }, - "id": "VideoContent", - "description": "Video content for a creative.", - "type": "object" - }, - "ListLosingBidsResponse": { - "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListLosingBidsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.losingBids.list\nmethod to retrieve the next page of results.", - "type": "string" - }, - "creativeStatusRows": { - "description": "List of rows, with counts of losing bids aggregated by loss reason (i.e.\ncreative status).", - "items": { - "$ref": "CreativeStatusRow" - }, - "type": "array" - } - }, - "id": "ListLosingBidsResponse", - "description": "Response message for listing all reasons that bids lost in the auction.", - "type": "object" - }, - "ListNonBillableWinningBidsResponse": { - "properties": { - "nonBillableWinningBidStatusRows": { - "description": "List of rows, with counts of bids not billed aggregated by reason.", - "items": { - "$ref": "NonBillableWinningBidStatusRow" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListNonBillableWinningBidsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.nonBillableWinningBids.list\nmethod to retrieve the next page of results.", - "type": "string" - } - }, - "id": "ListNonBillableWinningBidsResponse", - "description": "Response message for listing all reasons for which a buyer was not billed for\na winning bid.", - "type": "object" - }, - "ImpressionMetricsRow": { - "description": "The set of metrics that are measured in numbers of impressions, representing\nhow many impressions with the specified dimension values were considered\neligible at each stage of the bidding funnel.", - "type": "object", - "properties": { - "responsesWithBids": { - "$ref": "MetricValue", - "description": "The number of impressions for which Ad Exchange received a response from\nthe buyer that contained at least one applicable bid." - }, - "successfulResponses": { - "$ref": "MetricValue", - "description": "The number of impressions for which the buyer successfully sent a response\nto Ad Exchange." - }, - "availableImpressions": { - "description": "The number of impressions available to the buyer on Ad Exchange.\nIn some cases this value may be unavailable.", - "$ref": "MetricValue" - }, - "rowDimensions": { - "description": "The values of all dimensions associated with metric values in this row.", - "$ref": "RowDimensions" - }, - "inventoryMatches": { - "$ref": "MetricValue", - "description": "The number of impressions that match the buyer's inventory pretargeting." - }, - "bidRequests": { - "description": "The number of impressions for which Ad Exchange sent the buyer a bid\nrequest.", - "$ref": "MetricValue" - } - }, - "id": "ImpressionMetricsRow" - }, - "AuctionContext": { - "properties": { - "auctionTypes": { - "description": "The auction types this restriction applies to.", - "items": { - "enum": [ - "OPEN_AUCTION", - "DIRECT_DEALS" - ], - "type": "string" - }, - "type": "array", - "enumDescriptions": [ - "The restriction applies to open auction.", - "The restriction applies to direct deals." - ] - } - }, - "id": "AuctionContext", - "description": "@OutputOnly The auction type the restriction applies to.", - "type": "object" - }, - "ListImpressionMetricsResponse": { - "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListImpressionMetricsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.impressionMetrics.list\nmethod to retrieve the next page of results.", - "type": "string" - }, - "impressionMetricsRows": { - "description": "List of rows, each containing a set of impression metrics.", - "items": { - "$ref": "ImpressionMetricsRow" - }, - "type": "array" - } - }, - "id": "ListImpressionMetricsResponse", - "description": "Response message for listing the metrics that are measured in number of\nimpressions.", - "type": "object" - }, - "BidMetricsRow": { - "properties": { - "measurableImpressions": { - "$ref": "MetricValue", - "description": "The number of bids for which the corresponding impression was measurable\nfor viewability (as defined by Active View)." - }, - "bids": { - "description": "The number of bids that Ad Exchange received from the buyer.", - "$ref": "MetricValue" - }, - "billedImpressions": { - "$ref": "MetricValue", - "description": "The number of bids for which the buyer was billed." - }, - "bidsInAuction": { - "$ref": "MetricValue", - "description": "The number of bids that were permitted to compete in the auction." - }, - "rowDimensions": { - "description": "The values of all dimensions associated with metric values in this row.", - "$ref": "RowDimensions" - }, - "viewableImpressions": { - "$ref": "MetricValue", - "description": "The number of bids for which the corresponding impression was viewable (as\ndefined by Active View)." - }, - "impressionsWon": { - "$ref": "MetricValue", - "description": "The number of bids that won an impression." - } - }, - "id": "BidMetricsRow", - "description": "The set of metrics that are measured in numbers of bids, representing how\nmany bids with the specified dimension values were considered eligible at\neach stage of the bidding funnel;", - "type": "object" - }, - "ListBidResponseErrorsResponse": { - "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListBidResponseErrorsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.bidResponseErrors.list\nmethod to retrieve the next page of results.", - "type": "string" - }, - "calloutStatusRows": { - "description": "List of rows, with counts of bid responses aggregated by callout status.", - "items": { - "$ref": "CalloutStatusRow" - }, - "type": "array" - } - }, - "id": "ListBidResponseErrorsResponse", - "description": "Response message for listing all reasons that bid responses resulted in an\nerror.", - "type": "object" - }, - "CreativeStatusRow": { - "description": "The number of bids with the specified dimension values that did not win the\nauction (either were filtered pre-auction or lost the auction), as described\nby the specified creative status.", - "type": "object", - "properties": { - "rowDimensions": { - "$ref": "RowDimensions", - "description": "The values of all dimensions associated with metric values in this row." - }, - "creativeStatusId": { - "format": "int32", - "description": "The ID of the creative status.\nSee [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes).", - "type": "integer" - }, - "bidCount": { - "description": "The number of bids with the specified status.", - "$ref": "MetricValue" - } - }, - "id": "CreativeStatusRow" - }, - "RealtimeTimeRange": { - "properties": { - "startTimestamp": { - "format": "google-datetime", - "description": "The start timestamp of the real-time RTB metrics aggregation.", - "type": "string" - } - }, - "id": "RealtimeTimeRange", - "description": "An open-ended realtime time range specified by the start timestamp.\nFor filter sets that specify a realtime time range RTB metrics continue to\nbe aggregated throughout the lifetime of the filter set.", - "type": "object" - }, - "NonBillableWinningBidStatusRow": { - "description": "The number of winning bids with the specified dimension values for which the\nbuyer was not billed, as described by the specified status.", - "type": "object", - "properties": { - "rowDimensions": { - "$ref": "RowDimensions", - "description": "The values of all dimensions associated with metric values in this row." - }, - "bidCount": { - "$ref": "MetricValue", - "description": "The number of bids with the specified status." - }, - "status": { - "enum": [ - "STATUS_UNSPECIFIED", - "AD_NOT_RENDERED", - "INVALID_IMPRESSION" - ], - "description": "The status specifying why the winning bids were not billed.", - "type": "string", - "enumDescriptions": [ - "A placeholder for an undefined status.\nThis value will never be returned in responses.", - "The buyer was not billed because the ad was not rendered by the\npublisher.", - "The buyer was not billed because the impression won by the bid was\ndetermined to be invalid." - ] - } - }, - "id": "NonBillableWinningBidStatusRow" - }, - "FilteredBidDetailRow": { - "description": "The number of filtered bids with the specified dimension values, among those\nfiltered due to the requested filtering reason (i.e. creative status), that\nhave the specified detail.", - "type": "object", - "properties": { - "rowDimensions": { - "description": "The values of all dimensions associated with metric values in this row.", - "$ref": "RowDimensions" - }, - "detailId": { - "format": "int32", - "description": "The ID of the detail. The associated value can be looked up in the\ndictionary file corresponding to the DetailType in the response message.", - "type": "integer" - }, - "bidCount": { - "$ref": "MetricValue", - "description": "The number of bids with the specified detail." - } - }, - "id": "FilteredBidDetailRow" - }, - "AbsoluteDateRange": { - "properties": { - "startDate": { - "description": "The start date of the range (inclusive).\nMust be within the 30 days leading up to current date, and must be equal to\nor before end_date.", - "$ref": "Date" - }, - "endDate": { - "description": "The end date of the range (inclusive).\nMust be within the 30 days leading up to current date, and must be equal to\nor after start_date.", - "$ref": "Date" - } - }, - "id": "AbsoluteDateRange", - "description": "An absolute date range, specified by its start date and end date.\nThe supported range of dates begins 30 days before today and ends today.\nValidity checked upon filter set creation. If a filter set with an absolute\ndate range is run at a later date more than 30 days after start_date, it will\nfail.", - "type": "object" - }, - "AddDealAssociationRequest": { - "properties": { - "association": { - "description": "The association between a creative and a deal that should be added.", - "$ref": "CreativeDealAssociation" - } - }, - "id": "AddDealAssociationRequest", - "description": "A request for associating a deal and a creative.", - "type": "object" - }, - "WatchCreativeRequest": { - "properties": { - "topic": { - "description": "The Pub/Sub topic to publish notifications to.\nThis topic must already exist and must give permission to\nad-exchange-buyside-reports@google.com to write to the topic.\nThis should be the full resource name in\n\"projects/{project_id}/topics/{topic_id}\" format.", - "type": "string" - } - }, - "id": "WatchCreativeRequest", - "description": "A request for watching changes to creative Status.", - "type": "object" - }, - "TimeInterval": { - "description": "An interval of time, with an absolute start and end.\nThis is included in the response, for several reasons:\n1) The request may have specified start or end times relative to the time the\n request was sent; the response indicates the corresponding absolute time\n interval.\n2) The request may have specified an end time past the latest time for which\n data was available (e.g. if requesting data for the today); the response\n indicates the latest time for which data was actually returned.\n3) The response data for a single request may be broken down into multiple\n time intervals, if a time series was requested.", - "type": "object", - "properties": { - "startTime": { - "format": "google-datetime", - "description": "The timestamp marking the start of the range (inclusive) for which data is\nincluded.", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "The timestamp marking the end of the range (exclusive) for which data is\nincluded.", - "type": "string" - } - }, - "id": "TimeInterval" - }, - "FilteredBidCreativeRow": { - "description": "The number of filtered bids with the specified dimension values that have the\nspecified creative.", - "type": "object", - "properties": { - "rowDimensions": { - "description": "The values of all dimensions associated with metric values in this row.", - "$ref": "RowDimensions" - }, - "bidCount": { - "$ref": "MetricValue", - "description": "The number of bids with the specified creative." - }, - "creativeId": { - "description": "The ID of the creative.", - "type": "string" - } - }, - "id": "FilteredBidCreativeRow" - }, - "RelativeDateRange": { - "description": "A relative date range, specified by an offset and a duration.\nThe supported range of dates begins 30 days before today and ends today.\nI.e. the limits for these values are:\noffset_days \u003e= 0\nduration_days \u003e= 1\noffset_days + duration_days \u003c= 30", - "type": "object", - "properties": { - "durationDays": { - "format": "int32", - "description": "The number of days in the requested date range. E.g. for a range spanning\ntoday, 1. For a range spanning the last 7 days, 7.", - "type": "integer" - }, - "offsetDays": { - "format": "int32", - "description": "The end date of the filter set, specified as the number of days before\ntoday. E.g. for a range where the last date is today, 0.", - "type": "integer" - } - }, - "id": "RelativeDateRange" - }, - "NativeContent": { - "properties": { - "body": { - "description": "A long description of the ad.", - "type": "string" - }, - "starRating": { - "format": "double", - "description": "The app rating in the app store. Must be in the range [0-5].", - "type": "number" - }, - "videoUrl": { - "description": "The URL to fetch a native video ad.", - "type": "string" - }, - "logo": { - "$ref": "Image", - "description": "A smaller image, for the advertiser's logo." - }, - "clickLinkUrl": { - "description": "The URL that the browser/SDK will load when the user clicks the ad.", - "type": "string" - }, - "priceDisplayText": { - "description": "The price of the promoted app including currency info.", - "type": "string" - }, - "image": { - "description": "A large image.", - "$ref": "Image" - }, - "clickTrackingUrl": { - "description": "The URL to use for click tracking.", - "type": "string" - }, - "advertiserName": { - "description": "The name of the advertiser or sponsor, to be displayed in the ad creative.", - "type": "string" - }, - "storeUrl": { - "description": "The URL to the app store to purchase/download the promoted app.", - "type": "string" - }, - "headline": { - "description": "A short title for the ad.", - "type": "string" - }, - "appIcon": { - "description": "The app icon, for app download ads.", - "$ref": "Image" - }, - "callToAction": { - "description": "A label for the button that the user is supposed to click.", - "type": "string" - } - }, - "id": "NativeContent", - "description": "Native content for a creative.", - "type": "object" - }, - "ListClientsResponse": { - "type": "object", - "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListClientsRequest.pageToken\nfield in the subsequent call to the\naccounts.clients.list method\nto retrieve the next page of results.", - "type": "string" - }, + "ownerDomain": "google.com", + "name": "adexchangebuyer2", + "batchPath": "batch", + "title": "Ad Exchange Buyer API II", + "ownerName": "Google", + "resources": { + "accounts": { + "resources": { "clients": { - "description": "The returned list of clients.", - "items": { - "$ref": "Client" + "methods": { + "list": { + "description": "Lists all the clients for the current sponsor buyer.", + "httpMethod": "GET", + "response": { + "$ref": "ListClientsResponse" + }, + "parameterOrder": [ + "accountId" + ], + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientsResponse.nextPageToken\nreturned from the previous call to the\naccounts.clients.list method.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Requested page size. The server may return fewer clients than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Unique numerical account ID of the sponsor buyer to list the clients for.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/accounts/{accountId}/clients", + "path": "v2beta1/accounts/{accountId}/clients", + "id": "adexchangebuyer2.accounts.clients.list" + }, + "get": { + "description": "Gets a client buyer with a given client account ID.", + "response": { + "$ref": "Client" + }, + "parameterOrder": [ + "accountId", + "clientAccountId" + ], + "httpMethod": "GET", + "parameters": { + "accountId": { + "format": "int64", + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "type": "string", + "required": true, + "location": "path" + }, + "clientAccountId": { + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client buyer to retrieve. (required)", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", + "id": "adexchangebuyer2.accounts.clients.get", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}" + }, + "update": { + "description": "Updates an existing client buyer.", + "request": { + "$ref": "Client" + }, + "response": { + "$ref": "Client" + }, + "parameterOrder": [ + "accountId", + "clientAccountId" + ], + "httpMethod": "PUT", + "parameters": { + "accountId": { + "location": "path", + "format": "int64", + "description": "Unique numerical account ID for the buyer of which the client buyer\nis a customer; the sponsor buyer to update a client for. (required)", + "type": "string", + "required": true + }, + "clientAccountId": { + "format": "int64", + "description": "Unique numerical account ID of the client to update. (required)", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", + "id": "adexchangebuyer2.accounts.clients.update", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}" + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "accountId" + ], + "response": { + "$ref": "Client" + }, + "parameters": { + "accountId": { + "location": "path", + "format": "int64", + "description": "Unique numerical account ID for the buyer of which the client buyer\nis a customer; the sponsor buyer to create a client for. (required)", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/clients", + "path": "v2beta1/accounts/{accountId}/clients", + "id": "adexchangebuyer2.accounts.clients.create", + "description": "Creates a new client buyer.", + "request": { + "$ref": "Client" + } + } }, - "type": "array" - } - }, - "id": "ListClientsResponse" - }, - "ListBidResponsesWithoutBidsResponse": { - "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListBidResponsesWithoutBidsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.bidResponsesWithoutBids.list\nmethod to retrieve the next page of results.", - "type": "string" + "resources": { + "users": { + "methods": { + "get": { + "description": "Retrieves an existing client user.", + "httpMethod": "GET", + "response": { + "$ref": "ClientUser" + }, + "parameterOrder": [ + "accountId", + "clientAccountId", + "userId" + ], + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "accountId": { + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "type": "string", + "required": true + }, + "clientAccountId": { + "format": "int64", + "description": "Numerical account ID of the client buyer\nthat the user to be retrieved is associated with. (required)", + "type": "string", + "required": true, + "location": "path" + }, + "userId": { + "location": "path", + "format": "int64", + "description": "Numerical identifier of the user to retrieve. (required)", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", + "id": "adexchangebuyer2.accounts.clients.users.get" + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "accountId", + "clientAccountId" + ], + "response": { + "$ref": "ListClientUsersResponse" + }, + "parameters": { + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientUsersResponse.nextPageToken\nreturned from the previous call to the\naccounts.clients.users.list method.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Requested page size. The server may return fewer clients than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "accountId": { + "format": "int64", + "description": "Numerical account ID of the sponsor buyer of the client to list users for.\n(required)", + "type": "string", + "required": true, + "location": "path" + }, + "clientAccountId": { + "location": "path", + "description": "The account ID of the client buyer to list users for. (required)\nYou must specify either a string representation of a\nnumerical account identifier or the `-` character\nto list all the client users for all the clients\nof a given sponsor buyer.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users", + "id": "adexchangebuyer2.accounts.clients.users.list", + "description": "Lists all the known client users for a specified\nsponsor buyer account ID." + }, + "update": { + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", + "id": "adexchangebuyer2.accounts.clients.users.update", + "description": "Updates an existing client user.\nOnly the user status can be changed on update.", + "request": { + "$ref": "ClientUser" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "accountId", + "clientAccountId", + "userId" + ], + "response": { + "$ref": "ClientUser" + }, + "parameters": { + "accountId": { + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "type": "string", + "required": true + }, + "clientAccountId": { + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client buyer that the user to be retrieved\nis associated with. (required)", + "type": "string", + "required": true + }, + "userId": { + "location": "path", + "format": "int64", + "description": "Numerical identifier of the user to retrieve. (required)", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ] + } + } + }, + "invitations": { + "methods": { + "list": { + "description": "Lists all the client users invitations for a client\nwith a given account ID.", + "httpMethod": "GET", + "parameterOrder": [ + "accountId", + "clientAccountId" + ], + "response": { + "$ref": "ListClientUserInvitationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageSize": { + "format": "int32", + "description": "Requested page size. Server may return fewer clients than requested.\nIf unspecified, server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "accountId": { + "format": "int64", + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "type": "string", + "required": true, + "location": "path" + }, + "clientAccountId": { + "description": "Numerical account ID of the client buyer to list invitations for.\n(required)\nYou must either specify a string representation of a\nnumerical account identifier or the `-` character\nto list all the invitations for all the clients\nof a given sponsor buyer.", + "type": "string", + "required": true, + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientUserInvitationsResponse.nextPageToken\nreturned from the previous call to the\nclients.invitations.list\nmethod.", + "type": "string" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", + "id": "adexchangebuyer2.accounts.clients.invitations.list" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "accountId", + "clientAccountId", + "invitationId" + ], + "response": { + "$ref": "ClientUserInvitation" + }, + "parameters": { + "invitationId": { + "format": "int64", + "description": "Numerical identifier of the user invitation to retrieve. (required)", + "type": "string", + "required": true, + "location": "path" + }, + "accountId": { + "format": "int64", + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "type": "string", + "required": true, + "location": "path" + }, + "clientAccountId": { + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client buyer that the user invitation\nto be retrieved is associated with. (required)", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}", + "id": "adexchangebuyer2.accounts.clients.invitations.get", + "description": "Retrieves an existing client user invitation." + }, + "create": { + "description": "Creates and sends out an email invitation to access\nan Ad Exchange client buyer account.", + "request": { + "$ref": "ClientUserInvitation" + }, + "response": { + "$ref": "ClientUserInvitation" + }, + "parameterOrder": [ + "accountId", + "clientAccountId" + ], + "httpMethod": "POST", + "parameters": { + "accountId": { + "format": "int64", + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "type": "string", + "required": true, + "location": "path" + }, + "clientAccountId": { + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client buyer that the user\nshould be associated with. (required)", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", + "id": "adexchangebuyer2.accounts.clients.invitations.create", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations" + } + } + } + } }, - "bidResponseWithoutBidsStatusRows": { - "description": "List of rows, with counts of bid responses without bids aggregated by\nstatus.", - "items": { - "$ref": "BidResponseWithoutBidsStatusRow" + "creatives": { + "methods": { + "get": { + "description": "Gets a creative.", + "httpMethod": "GET", + "response": { + "$ref": "Creative" + }, + "parameterOrder": [ + "accountId", + "creativeId" + ], + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "accountId": { + "location": "path", + "description": "The account the creative belongs to.", + "type": "string", + "required": true + }, + "creativeId": { + "description": "The ID of the creative to retrieve.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}", + "id": "adexchangebuyer2.accounts.creatives.get" + }, + "watch": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "accountId", + "creativeId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "accountId": { + "description": "The account of the creative to watch.", + "type": "string", + "required": true, + "location": "path" + }, + "creativeId": { + "location": "path", + "description": "The creative ID to watch for status changes.\nSpecify \"-\" to watch all creatives under the above account.\nIf both creative-level and account-level notifications are\nsent, only a single notification will be sent to the\ncreative-level notification topic.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch", + "id": "adexchangebuyer2.accounts.creatives.watch", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch", + "request": { + "$ref": "WatchCreativeRequest" + }, + "description": "Watches a creative. Will result in push notifications being sent to the\ntopic when the creative changes status." + }, + "update": { + "description": "Updates a creative.", + "request": { + "$ref": "Creative" + }, + "response": { + "$ref": "Creative" + }, + "parameterOrder": [ + "accountId", + "creativeId" + ], + "httpMethod": "PUT", + "parameters": { + "accountId": { + "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "string", + "required": true, + "location": "path" + }, + "creativeId": { + "location": "path", + "description": "The buyer-defined creative ID of this creative.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}", + "id": "adexchangebuyer2.accounts.creatives.update", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}" + }, + "list": { + "description": "Lists creatives.", + "response": { + "$ref": "ListCreativesResponse" + }, + "parameterOrder": [ + "accountId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer creatives than requested\n(due to timeout constraint) even if more are available via another call.\nIf unspecified, server will pick an appropriate default.\nAcceptable values are 1 to 1000, inclusive.", + "type": "integer" + }, + "accountId": { + "location": "path", + "description": "The account to list the creatives from.\nSpecify \"-\" to list all creatives the current user has access to.", + "type": "string", + "required": true + }, + "query": { + "location": "query", + "description": "An optional query string to filter creatives. If no filter is specified,\nall active creatives will be returned.\nSupported queries are:\n\u003cul\u003e\n\u003cli\u003eaccountId=\u003ci\u003eaccount_id_string\u003c/i\u003e\n\u003cli\u003ecreativeId=\u003ci\u003ecreative_id_string\u003c/i\u003e\n\u003cli\u003edealsStatus: {approved, conditionally_approved, disapproved,\n not_checked}\n\u003cli\u003eopenAuctionStatus: {approved, conditionally_approved, disapproved,\n not_checked}\n\u003cli\u003eattribute: {a numeric attribute from the list of attributes}\n\u003cli\u003edisapprovalReason: {a reason from DisapprovalReason\n\u003c/ul\u003e\nExample: 'accountId=12345 AND (dealsStatus:disapproved AND disapprovalReason:unacceptable_content) OR attribute:47'", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativesResponse.next_page_token\nreturned from the previous call to 'ListCreatives' method.", + "type": "string" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/creatives", + "id": "adexchangebuyer2.accounts.creatives.list", + "path": "v2beta1/accounts/{accountId}/creatives" + }, + "create": { + "response": { + "$ref": "Creative" + }, + "parameterOrder": [ + "accountId" + ], + "httpMethod": "POST", + "parameters": { + "accountId": { + "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "string", + "required": true, + "location": "path" + }, + "duplicateIdMode": { + "description": "Indicates if multiple creatives can share an ID or not. Default is\nNO_DUPLICATES (one ID per creative).", + "type": "string", + "location": "query", + "enum": [ + "NO_DUPLICATES", + "FORCE_ENABLE_DUPLICATE_IDS" + ] + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives", + "id": "adexchangebuyer2.accounts.creatives.create", + "path": "v2beta1/accounts/{accountId}/creatives", + "description": "Creates a creative.", + "request": { + "$ref": "Creative" + } + }, + "stopWatching": { + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching", + "id": "adexchangebuyer2.accounts.creatives.stopWatching", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching", + "description": "Stops watching a creative. Will stop push notifications being sent to the\ntopics when the creative changes status.", + "request": { + "$ref": "StopWatchingCreativeRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "accountId", + "creativeId" + ], + "httpMethod": "POST", + "parameters": { + "accountId": { + "description": "The account of the creative to stop notifications for.", + "type": "string", + "required": true, + "location": "path" + }, + "creativeId": { + "location": "path", + "description": "The creative ID of the creative to stop notifications for.\nSpecify \"-\" to specify stopping account level notifications.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ] + } }, - "type": "array" + "resources": { + "dealAssociations": { + "methods": { + "list": { + "description": "List all creative-deal associations.", + "response": { + "$ref": "ListDealAssociationsResponse" + }, + "parameterOrder": [ + "accountId", + "creativeId" + ], + "httpMethod": "GET", + "parameters": { + "pageSize": { + "format": "int32", + "description": "Requested page size. Server may return fewer associations than requested.\nIf unspecified, server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "accountId": { + "location": "path", + "description": "The account to list the associations from.\nSpecify \"-\" to list all creatives the current user has access to.", + "type": "string", + "required": true + }, + "query": { + "location": "query", + "description": "An optional query string to filter deal associations. If no filter is\nspecified, all associations will be returned.\nSupported queries are:\n\u003cul\u003e\n\u003cli\u003eaccountId=\u003ci\u003eaccount_id_string\u003c/i\u003e\n\u003cli\u003ecreativeId=\u003ci\u003ecreative_id_string\u003c/i\u003e\n\u003cli\u003edealsId=\u003ci\u003edeals_id_string\u003c/i\u003e\n\u003cli\u003edealsStatus:{approved, conditionally_approved, disapproved,\n not_checked}\n\u003cli\u003eopenAuctionStatus:{approved, conditionally_approved, disapproved,\n not_checked}\n\u003c/ul\u003e\nExample: 'dealsId=12345 AND dealsStatus:disapproved'", + "type": "string" + }, + "creativeId": { + "description": "The creative ID to list the associations from.\nSpecify \"-\" to list all creatives under the above account.", + "type": "string", + "required": true, + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListDealAssociationsResponse.next_page_token\nreturned from the previous call to 'ListDealAssociations' method.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations", + "id": "adexchangebuyer2.accounts.creatives.dealAssociations.list", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations" + }, + "remove": { + "description": "Remove the association between a deal and a creative.", + "request": { + "$ref": "RemoveDealAssociationRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "accountId", + "creativeId" + ], + "httpMethod": "POST", + "parameters": { + "accountId": { + "location": "path", + "description": "The account the creative belongs to.", + "type": "string", + "required": true + }, + "creativeId": { + "description": "The ID of the creative associated with the deal.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove", + "id": "adexchangebuyer2.accounts.creatives.dealAssociations.remove", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove" + }, + "add": { + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add", + "id": "adexchangebuyer2.accounts.creatives.dealAssociations.add", + "request": { + "$ref": "AddDealAssociationRequest" + }, + "description": "Associate an existing deal with a creative.", + "httpMethod": "POST", + "parameterOrder": [ + "accountId", + "creativeId" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "accountId": { + "description": "The account the creative belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "creativeId": { + "location": "path", + "description": "The ID of the creative associated with the deal.", + "type": "string", + "required": true + } + } + } + } + } + } + }, + "filterSets": { + "methods": { + "delete": { + "description": "Deletes the requested filter set from the account with the given account\nID.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "httpMethod": "DELETE", + "parameters": { + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + }, + "filterSetId": { + "location": "path", + "format": "int64", + "description": "The ID of the filter set to delete.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}", + "id": "adexchangebuyer2.accounts.filterSets.delete", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}" + }, + "list": { + "response": { + "$ref": "ListFilterSetsResponse" + }, + "parameterOrder": [ + "accountId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilterSetsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.list\nmethod.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/accounts/{accountId}/filterSets", + "id": "adexchangebuyer2.accounts.filterSets.list", + "path": "v2beta1/accounts/{accountId}/filterSets", + "description": "Lists all filter sets for the account with the given account ID." + }, + "get": { + "description": "Retrieves the requested filter set for the account with the given account\nID.", + "response": { + "$ref": "FilterSet" + }, + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "httpMethod": "GET", + "parameters": { + "accountId": { + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true, + "location": "path" + }, + "filterSetId": { + "format": "int64", + "description": "The ID of the filter set to get.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}", + "id": "adexchangebuyer2.accounts.filterSets.get", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}" + }, + "create": { + "request": { + "$ref": "FilterSet" + }, + "description": "Creates the specified filter set for the account with the given account ID.", + "httpMethod": "POST", + "parameterOrder": [ + "accountId" + ], + "response": { + "$ref": "FilterSet" + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "isTransient": { + "description": "Whether the filter set is transient, or should be persisted indefinitely.\nBy default, filter sets are not transient.\nIf transient, it will be available for at least 1 hour after creation.", + "type": "boolean", + "location": "query" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/accounts/{accountId}/filterSets", + "path": "v2beta1/accounts/{accountId}/filterSets", + "id": "adexchangebuyer2.accounts.filterSets.create" + } + }, + "resources": { + "bidResponseErrors": { + "methods": { + "list": { + "description": "List all errors that occurred in bid responses, with the number of bid\nresponses affected for each reason.", + "response": { + "$ref": "ListBidResponseErrorsResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidResponseErrorsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.bidResponseErrors.list\nmethod.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + }, + "filterSetId": { + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponseErrors", + "id": "adexchangebuyer2.accounts.filterSets.bidResponseErrors.list", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponseErrors" + } + } + }, + "bidResponsesWithoutBids": { + "methods": { + "list": { + "description": "List all reasons for which bid responses were considered to have no\napplicable bids, with the number of bid responses affected for each reason.", + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "response": { + "$ref": "ListBidResponsesWithoutBidsResponse" + }, + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidResponsesWithoutBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.bidResponsesWithoutBids.list\nmethod.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + }, + "filterSetId": { + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponsesWithoutBids", + "id": "adexchangebuyer2.accounts.filterSets.bidResponsesWithoutBids.list", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponsesWithoutBids" + } + } + }, + "filteredBidRequests": { + "methods": { + "list": { + "description": "List all reasons that caused a bid request not to be sent for an\nimpression, with the number of bid requests not sent for each reason.", + "response": { + "$ref": "ListFilteredBidRequestsResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilteredBidRequestsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBidRequests.list\nmethod.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "accountId": { + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true, + "location": "path" + }, + "filterSetId": { + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBidRequests", + "id": "adexchangebuyer2.accounts.filterSets.filteredBidRequests.list", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBidRequests" + } + } + }, + "nonBillableWinningBids": { + "methods": { + "list": { + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "response": { + "$ref": "ListNonBillableWinningBidsResponse" + }, + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListNonBillableWinningBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.nonBillableWinningBids.list\nmethod.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + }, + "filterSetId": { + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/nonBillableWinningBids", + "id": "adexchangebuyer2.accounts.filterSets.nonBillableWinningBids.list", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/nonBillableWinningBids", + "description": "List all reasons for which winning bids were not billable, with the number\nof bids not billed for each reason." + } + } + }, + "filteredBids": { + "methods": { + "list": { + "description": "List all reasons for which bids were filtered, with the number of bids\nfiltered for each reason.", + "response": { + "$ref": "ListFilteredBidsResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "httpMethod": "GET", + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer" + }, + "accountId": { + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true, + "location": "path" + }, + "filterSetId": { + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true, + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilteredBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBids.list\nmethod.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids", + "id": "adexchangebuyer2.accounts.filterSets.filteredBids.list", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids" + } + }, + "resources": { + "creatives": { + "methods": { + "list": { + "description": "List all creatives associated with a specific reason for which bids were\nfiltered, with the number of bids filtered for each creative.", + "httpMethod": "GET", + "parameterOrder": [ + "accountId", + "filterSetId", + "creativeStatusId" + ], + "response": { + "$ref": "ListCreativeStatusBreakdownByCreativeResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageSize": { + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + }, + "filterSetId": { + "location": "path", + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativeStatusBreakdownByCreativeResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBids.creatives.list\nmethod.", + "type": "string", + "location": "query" + }, + "creativeStatusId": { + "format": "int32", + "description": "The ID of the creative status for which to retrieve a breakdown by\ncreative.\nSee\n[creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes).", + "type": "integer", + "required": true, + "location": "path" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/creatives", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/creatives", + "id": "adexchangebuyer2.accounts.filterSets.filteredBids.creatives.list" + } + } + }, + "details": { + "methods": { + "list": { + "description": "List all details associated with a specific reason for which bids were\nfiltered, with the number of bids filtered for each detail.", + "response": { + "$ref": "ListCreativeStatusBreakdownByDetailResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId", + "creativeStatusId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativeStatusBreakdownByDetailResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBids.details.list\nmethod.", + "type": "string", + "location": "query" + }, + "creativeStatusId": { + "location": "path", + "format": "int32", + "description": "The ID of the creative status for which to retrieve a breakdown by detail.\nSee\n[creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes).\nDetails are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87.", + "type": "integer", + "required": true + }, + "pageSize": { + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "accountId": { + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true, + "location": "path" + }, + "filterSetId": { + "location": "path", + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/details", + "id": "adexchangebuyer2.accounts.filterSets.filteredBids.details.list", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/details" + } + } + } + } + }, + "losingBids": { + "methods": { + "list": { + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/losingBids", + "id": "adexchangebuyer2.accounts.filterSets.losingBids.list", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/losingBids", + "description": "List all reasons for which bids lost in the auction, with the number of\nbids that lost for each reason.", + "response": { + "$ref": "ListLosingBidsResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListLosingBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.losingBids.list\nmethod.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + }, + "filterSetId": { + "location": "path", + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ] + } + } + }, + "impressionMetrics": { + "methods": { + "list": { + "description": "Lists all metrics that are measured in terms of number of impressions.", + "response": { + "$ref": "ListImpressionMetricsResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "httpMethod": "GET", + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer" + }, + "accountId": { + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true, + "location": "path" + }, + "filterSetId": { + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true, + "location": "path" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListImpressionMetricsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.impressionMetrics.list\nmethod.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/impressionMetrics", + "id": "adexchangebuyer2.accounts.filterSets.impressionMetrics.list", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/impressionMetrics" + } + } + }, + "bidMetrics": { + "methods": { + "list": { + "description": "Lists all metrics that are measured in terms of number of bids.", + "response": { + "$ref": "ListBidMetricsResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageSize": { + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "accountId": { + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true, + "location": "path" + }, + "filterSetId": { + "location": "path", + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true + }, + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidMetricsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.bidMetrics.list\nmethod.", + "type": "string" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidMetrics", + "id": "adexchangebuyer2.accounts.filterSets.bidMetrics.list", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidMetrics" + } + } + } + } } - }, - "id": "ListBidResponsesWithoutBidsResponse", - "description": "Response message for listing all reasons that bid responses were considered\nto have no applicable bids.", - "type": "object" + } + } + }, + "parameters": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "type": "string", + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "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.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + } + }, + "version": "v2beta1", + "baseUrl": "https://adexchangebuyer.googleapis.com/", + "servicePath": "", + "description": "Accesses the latest features for managing Ad Exchange accounts, Real-Time Bidding configurations and auction metrics, and Marketplace programmatic deals.", + "kind": "discovery#restDescription", + "basePath": "", + "revision": "20170815", + "documentationLink": "https://developers.google.com/ad-exchange/buyer-rest/reference/rest/", + "id": "adexchangebuyer2:v2beta1", + "discoveryVersion": "v1", + "version_module": true, + "schemas": { "ServingContext": { "description": "The serving context for this restriction.", "type": "object", "properties": { - "auctionType": { - "$ref": "AuctionContext", - "description": "Matches impressions for a particular auction type." - }, "all": { + "description": "Matches all contexts.", + "type": "string", "enumDescriptions": [ "A simple context." ], "enum": [ "SIMPLE_CONTEXT" - ], - "description": "Matches all contexts.", - "type": "string" + ] }, "appType": { "description": "Matches impressions for a particular app type.", @@ -662,12 +1501,16 @@ "$ref": "SecurityContext" }, "platform": { - "description": "Matches impressions coming from a particular platform.", - "$ref": "PlatformContext" + "$ref": "PlatformContext", + "description": "Matches impressions coming from a particular platform." }, "location": { "description": "Matches impressions coming from users *or* publishers in a specific\nlocation.", "$ref": "LocationContext" + }, + "auctionType": { + "description": "Matches impressions for a particular auction type.", + "$ref": "AuctionContext" } }, "id": "ServingContext" @@ -676,11 +1519,6 @@ "description": "An image resource. You may provide a larger image than was requested,\nso long as the aspect ratio is preserved.", "type": "object", "properties": { - "height": { - "format": "int32", - "description": "Image height in pixels.", - "type": "integer" - }, "width": { "format": "int32", "description": "Image width in pixels.", @@ -689,6 +1527,11 @@ "url": { "description": "The URL of the image.", "type": "string" + }, + "height": { + "format": "int32", + "description": "Image height in pixels.", + "type": "integer" } }, "id": "Image" @@ -712,22 +1555,14 @@ "id": "ListFilterSetsResponse" }, "BidResponseWithoutBidsStatusRow": { + "description": "The number of impressions with the specified dimension values that were\nconsidered to have no applicable bids, as described by the specified status.", + "type": "object", "properties": { - "rowDimensions": { - "description": "The values of all dimensions associated with metric values in this row.", - "$ref": "RowDimensions" - }, "impressionCount": { - "description": "The number of impressions for which there was a bid response with the\nspecified status.", - "$ref": "MetricValue" + "$ref": "MetricValue", + "description": "The number of impressions for which there was a bid response with the\nspecified status." }, "status": { - "enum": [ - "STATUS_UNSPECIFIED", - "RESPONSES_WITHOUT_BIDS", - "RESPONSES_WITHOUT_BIDS_FOR_ACCOUNT", - "RESPONSES_WITHOUT_BIDS_FOR_DEAL" - ], "description": "The status specifying why the bid responses were considered to have no\napplicable bids.", "type": "string", "enumDescriptions": [ @@ -735,19 +1570,25 @@ "The response had no bids.", "The response had no bids for the specified account, though it may have\nincluded bids on behalf of other accounts.", "The response had no bids for the specified deal, though it may have\nincluded bids on other deals on behalf of the account to which the deal\nbelongs." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "RESPONSES_WITHOUT_BIDS", + "RESPONSES_WITHOUT_BIDS_FOR_ACCOUNT", + "RESPONSES_WITHOUT_BIDS_FOR_DEAL" ] + }, + "rowDimensions": { + "description": "The values of all dimensions associated with metric values in this row.", + "$ref": "RowDimensions" } }, - "id": "BidResponseWithoutBidsStatusRow", - "description": "The number of impressions with the specified dimension values that were\nconsidered to have no applicable bids, as described by the specified status.", - "type": "object" + "id": "BidResponseWithoutBidsStatusRow" }, "ClientUserInvitation": { + "description": "An invitation for a new client user to get access to the Ad Exchange\nBuyer UI.\nAll fields are required unless otherwise specified.", + "type": "object", "properties": { - "email": { - "description": "The email address to which the invitation is sent. Email\naddresses should be unique among all client users under each sponsor\nbuyer.", - "type": "string" - }, "clientAccountId": { "format": "int64", "description": "Numerical account ID of the client buyer\nthat the invited user is associated with.\nThe value of this field is ignored in create operations.", @@ -757,64 +1598,13 @@ "format": "int64", "description": "The unique numerical ID of the invitation that is sent to the user.\nThe value of this field is ignored in create operations.", "type": "string" - } - }, - "id": "ClientUserInvitation", - "description": "An invitation for a new client user to get access to the Ad Exchange\nBuyer UI.\nAll fields are required unless otherwise specified.", - "type": "object" - }, - "ListCreativeStatusBreakdownByDetailResponse": { - "description": "Response message for listing all details associated with a given filtered bid\nreason.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListCreativeStatusBreakdownByDetailRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBids.details.list\nmethod to retrieve the next page of results.", - "type": "string" }, - "filteredBidDetailRows": { - "description": "List of rows, with counts of bids with a given creative status aggregated\nby detail.", - "items": { - "$ref": "FilteredBidDetailRow" - }, - "type": "array" - }, - "detailType": { - "enumDescriptions": [ - "A placeholder for an undefined status.\nThis value will never be returned in responses.", - "Indicates that the detail ID refers to a creative attribute; see\n[publisher-excludable-creative-attributes](https://developers.google.com/ad-exchange/rtb/downloads/publisher-excludable-creative-attributes).", - "Indicates that the detail ID refers to a vendor; see\n[vendors](https://developers.google.com/ad-exchange/rtb/downloads/vendors).", - "Indicates that the detail ID refers to a sensitive category; see\n[ad-sensitive-categories](https://developers.google.com/ad-exchange/rtb/downloads/ad-sensitive-categories).", - "Indicates that the detail ID refers to a product category; see\n[ad-product-categories](https://developers.google.com/ad-exchange/rtb/downloads/ad-product-categories)." - ], - "enum": [ - "DETAIL_TYPE_UNSPECIFIED", - "CREATIVE_ATTRIBUTE", - "VENDOR", - "SENSITIVE_CATEGORY", - "PRODUCT_CATEGORY" - ], - "description": "The type of detail that the detail IDs represent.", + "email": { + "description": "The email address to which the invitation is sent. Email\naddresses should be unique among all client users under each sponsor\nbuyer.", "type": "string" } }, - "id": "ListCreativeStatusBreakdownByDetailResponse" - }, - "ListClientUsersResponse": { - "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListClientUsersRequest.pageToken\nfield in the subsequent call to the\nclients.invitations.list\nmethod to retrieve the next\npage of results.", - "type": "string" - }, - "users": { - "description": "The returned list of client users.", - "items": { - "$ref": "ClientUser" - }, - "type": "array" - } - }, - "id": "ListClientUsersResponse", - "type": "object" + "id": "ClientUserInvitation" }, "ListClientUserInvitationsResponse": { "type": "object", @@ -833,7 +1623,64 @@ }, "id": "ListClientUserInvitationsResponse" }, + "ListClientUsersResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListClientUsersRequest.pageToken\nfield in the subsequent call to the\nclients.invitations.list\nmethod to retrieve the next\npage of results.", + "type": "string" + }, + "users": { + "description": "The returned list of client users.", + "items": { + "$ref": "ClientUser" + }, + "type": "array" + } + }, + "id": "ListClientUsersResponse" + }, + "ListCreativeStatusBreakdownByDetailResponse": { + "description": "Response message for listing all details associated with a given filtered bid\nreason.", + "type": "object", + "properties": { + "detailType": { + "enumDescriptions": [ + "A placeholder for an undefined status.\nThis value will never be returned in responses.", + "Indicates that the detail ID refers to a creative attribute; see\n[publisher-excludable-creative-attributes](https://developers.google.com/ad-exchange/rtb/downloads/publisher-excludable-creative-attributes).", + "Indicates that the detail ID refers to a vendor; see\n[vendors](https://developers.google.com/ad-exchange/rtb/downloads/vendors).", + "Indicates that the detail ID refers to a sensitive category; see\n[ad-sensitive-categories](https://developers.google.com/ad-exchange/rtb/downloads/ad-sensitive-categories).", + "Indicates that the detail ID refers to a product category; see\n[ad-product-categories](https://developers.google.com/ad-exchange/rtb/downloads/ad-product-categories).", + "Indicates that the detail ID refers to a disapproval reason; see\nDisapprovalReason enum in [snippet-status-report-proto](https://developers.google.com/ad-exchange/rtb/downloads/snippet-status-report-proto)." + ], + "enum": [ + "DETAIL_TYPE_UNSPECIFIED", + "CREATIVE_ATTRIBUTE", + "VENDOR", + "SENSITIVE_CATEGORY", + "PRODUCT_CATEGORY", + "DISAPPROVAL_REASON" + ], + "description": "The type of detail that the detail IDs represent.", + "type": "string" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListCreativeStatusBreakdownByDetailRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBids.details.list\nmethod to retrieve the next page of results.", + "type": "string" + }, + "filteredBidDetailRows": { + "description": "List of rows, with counts of bids with a given creative status aggregated\nby detail.", + "items": { + "$ref": "FilteredBidDetailRow" + }, + "type": "array" + } + }, + "id": "ListCreativeStatusBreakdownByDetailResponse" + }, "LocationContext": { + "description": "@OutputOnly The Geo criteria the restriction applies to.", + "type": "object", "properties": { "geoCriteriaIds": { "description": "IDs representing the geo location for this context.\nPlease refer to the\n[geo-table.csv](https://storage.googleapis.com/adx-rtb-dictionaries/geo-table.csv)\nfile for different geo criteria IDs.", @@ -844,11 +1691,11 @@ "type": "array" } }, - "id": "LocationContext", - "description": "@OutputOnly The Geo criteria the restriction applies to.", - "type": "object" + "id": "LocationContext" }, "PlatformContext": { + "description": "@OutputOnly The type of platform the restriction applies to.", + "type": "object", "properties": { "platforms": { "enumDescriptions": [ @@ -868,11 +1715,11 @@ "type": "array" } }, - "id": "PlatformContext", - "description": "@OutputOnly The type of platform the restriction applies to.", - "type": "object" + "id": "PlatformContext" }, "MetricValue": { + "description": "A metric value, with an expected value and a variance; represents a count\nthat may be either exact or estimated (i.e. when sampled).", + "type": "object", "properties": { "variance": { "format": "int64", @@ -885,21 +1732,12 @@ "type": "string" } }, - "id": "MetricValue", - "description": "A metric value, with an expected value and a variance; represents a count\nthat may be either exact or estimated (i.e. when sampled).", - "type": "object" + "id": "MetricValue" }, "ClientUser": { + "description": "A client user is created under a client buyer and has restricted access to\nthe Ad Exchange Marketplace and certain other sections\nof the Ad Exchange Buyer UI based on the role\ngranted to the associated client buyer.\n\nThe only way a new client user can be created is via accepting an\nemail invitation\n(see the\naccounts.clients.invitations.create\nmethod).\n\nAll fields are required unless otherwise specified.", + "type": "object", "properties": { - "email": { - "description": "User's email address. The value of this field\nis ignored in an update operation.", - "type": "string" - }, - "userId": { - "format": "int64", - "description": "The unique numerical ID of the client user\nthat has accepted an invitation.\nThe value of this field is ignored in an update operation.", - "type": "string" - }, "clientAccountId": { "format": "int64", "description": "Numerical account ID of the client buyer\nwith which the user is associated; the\nbuyer must be a client of the current sponsor buyer.\nThe value of this field is ignored in an update operation.", @@ -920,11 +1758,18 @@ ], "description": "The status of the client user.", "type": "string" + }, + "email": { + "description": "User's email address. The value of this field\nis ignored in an update operation.", + "type": "string" + }, + "userId": { + "format": "int64", + "description": "The unique numerical ID of the client user\nthat has accepted an invitation.\nThe value of this field is ignored in an update operation.", + "type": "string" } }, - "id": "ClientUser", - "description": "A client user is created under a client buyer and has restricted access to\nthe Ad Exchange Marketplace and certain other sections\nof the Ad Exchange Buyer UI based on the role\ngranted to the associated client buyer.\n\nThe only way a new client user can be created is via accepting an\nemail invitation\n(see the\naccounts.clients.invitations.create\nmethod).\n\nAll fields are required unless otherwise specified.", - "type": "object" + "id": "ClientUser" }, "CreativeDealAssociation": { "description": "The association between a creative and a deal.", @@ -946,11 +1791,44 @@ "id": "CreativeDealAssociation" }, "Creative": { + "description": "A creative and its classification data.", + "type": "object", "properties": { - "adChoicesDestinationUrl": { - "description": "The link to AdChoices destination page.", + "creativeId": { + "description": "The buyer-defined creative ID of this creative.\nCan be used to filter the response of the\ncreatives.list\nmethod.", "type": "string" }, + "accountId": { + "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "string" + }, + "native": { + "$ref": "NativeContent", + "description": "A native creative." + }, + "servingRestrictions": { + "description": "@OutputOnly The granular status of this ad in specific contexts.\nA context here relates to where something ultimately serves (for example,\na physical location, a platform, an HTTPS vs HTTP request, or the type\nof auction).", + "items": { + "$ref": "ServingRestriction" + }, + "type": "array" + }, + "video": { + "$ref": "VideoContent", + "description": "A video creative." + }, + "agencyId": { + "format": "int64", + "description": "The agency ID for this creative.", + "type": "string" + }, + "clickThroughUrls": { + "description": "The set of destination URLs for the creative.", + "items": { + "type": "string" + }, + "type": "array" + }, "detectedSensitiveCategories": { "description": "@OutputOnly Detected sensitive categories, if any.\nSee the ad-sensitive-categories.txt file in the technical documentation for\na list of IDs. You should use these IDs along with the\nexcluded-sensitive-category field in the bid request to filter your bids.", "items": { @@ -959,6 +1837,10 @@ }, "type": "array" }, + "adChoicesDestinationUrl": { + "description": "The link to AdChoices destination page.", + "type": "string" + }, "restrictedCategories": { "enumDescriptions": [ "The ad has no restricted categories", @@ -966,11 +1848,11 @@ ], "description": "All restricted categories for the ads that may be shown from this creative.", "items": { + "type": "string", "enum": [ "NO_RESTRICTED_CATEGORIES", "ALCOHOL" - ], - "type": "string" + ] }, "type": "array" }, @@ -1014,13 +1896,6 @@ "type": "array" }, "dealsStatus": { - "enum": [ - "STATUS_UNSPECIFIED", - "NOT_CHECKED", - "CONDITIONALLY_APPROVED", - "APPROVED", - "DISAPPROVED" - ], "description": "@OutputOnly The top-level deals status of this creative.\nIf disapproved, an entry for 'auctionType=DIRECT_DEALS' (or 'ALL') in\nserving_restrictions will also exist. Note\nthat this may be nuanced with other contextual restrictions, in which case,\nit may be preferable to read from serving_restrictions directly.\nCan be used to filter the response of the\ncreatives.list\nmethod.", "type": "string", "enumDescriptions": [ @@ -1029,9 +1904,18 @@ "The creative has been conditionally approved.\nSee serving_restrictions for details.", "The creative has been approved.", "The creative has been disapproved." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "NOT_CHECKED", + "CONDITIONALLY_APPROVED", + "APPROVED", + "DISAPPROVED" ] }, "openAuctionStatus": { + "description": "@OutputOnly The top-level open auction status of this creative.\nIf disapproved, an entry for 'auctionType = OPEN_AUCTION' (or 'ALL') in\nserving_restrictions will also exist. Note\nthat this may be nuanced with other contextual restrictions, in which case,\nit may be preferable to read from serving_restrictions directly.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "string", "enumDescriptions": [ "The status is unknown.", "The creative has not been checked.", @@ -1045,9 +1929,7 @@ "CONDITIONALLY_APPROVED", "APPROVED", "DISAPPROVED" - ], - "description": "@OutputOnly The top-level open auction status of this creative.\nIf disapproved, an entry for 'auctionType = OPEN_AUCTION' (or 'ALL') in\nserving_restrictions will also exist. Note\nthat this may be nuanced with other contextual restrictions, in which case,\nit may be preferable to read from serving_restrictions directly.\nCan be used to filter the response of the\ncreatives.list\nmethod.", - "type": "string" + ] }, "advertiserName": { "description": "The name of the company being advertised in the creative.", @@ -1073,6 +1955,32 @@ "description": "@OutputOnly The filtering stats for this creative." }, "attributes": { + "enumDescriptions": [ + "Do not use. This is a placeholder value only.", + "The creative is tagged.", + "The creative is cookie targeted.", + "The creative is user interest targeted.", + "The creative does not expand.", + "The creative expands up.", + "The creative expands down.", + "The creative expands left.", + "The creative expands right.", + "The creative expands up and left.", + "The creative expands up and right.", + "The creative expands down and left.", + "The creative expands down and right.", + "The creative expands up or down.", + "The creative expands left or right.", + "The creative expands on any diagonal.", + "The creative expands when rolled over.", + "The instream vast video type is vpaid flash.", + "The creative is MRAID", + "The creative is SSL.", + "The creative is an interstitial.", + "The creative is eligible for native.", + "The creative is not eligible for native.", + "The creative can dynamically resize to fill a variety of slot sizes." + ], "description": "All attributes for the ads that may be shown from this creative.\nCan be used to filter the response of the\ncreatives.list\nmethod.", "items": { "enum": [ @@ -1103,33 +2011,7 @@ ], "type": "string" }, - "type": "array", - "enumDescriptions": [ - "Do not use. This is a placeholder value only.", - "The creative is tagged.", - "The creative is cookie targeted.", - "The creative is user interest targeted.", - "The creative does not expand.", - "The creative expands up.", - "The creative expands down.", - "The creative expands left.", - "The creative expands right.", - "The creative expands up and left.", - "The creative expands up and right.", - "The creative expands down and left.", - "The creative expands down and right.", - "The creative expands up or down.", - "The creative expands left or right.", - "The creative expands on any diagonal.", - "The creative expands when rolled over.", - "The instream vast video type is vpaid flash.", - "The creative is MRAID", - "The creative is SSL.", - "The creative is an interstitial.", - "The creative is eligible for native.", - "The creative is not eligible for native.", - "The creative can dynamically resize to fill a variety of slot sizes." - ] + "type": "array" }, "apiUpdateTime": { "format": "google-datetime", @@ -1142,46 +2024,9 @@ "type": "string" }, "type": "array" - }, - "creativeId": { - "description": "The buyer-defined creative ID of this creative.\nCan be used to filter the response of the\ncreatives.list\nmethod.", - "type": "string" - }, - "accountId": { - "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.", - "type": "string" - }, - "native": { - "$ref": "NativeContent", - "description": "A native creative." - }, - "servingRestrictions": { - "description": "@OutputOnly The granular status of this ad in specific contexts.\nA context here relates to where something ultimately serves (for example,\na physical location, a platform, an HTTPS vs HTTP request, or the type\nof auction).", - "items": { - "$ref": "ServingRestriction" - }, - "type": "array" - }, - "video": { - "$ref": "VideoContent", - "description": "A video creative." - }, - "agencyId": { - "format": "int64", - "description": "The agency ID for this creative.", - "type": "string" - }, - "clickThroughUrls": { - "description": "The set of destination URLs for the creative.", - "items": { - "type": "string" - }, - "type": "array" } }, - "id": "Creative", - "description": "A creative and its classification data.", - "type": "object" + "id": "Creative" }, "FilteringStats": { "description": "@OutputOnly Filtering reasons for this creative during a period of a single\nday (from midnight to midnight Pacific).", @@ -1202,30 +2047,30 @@ "id": "FilteringStats" }, "RemoveDealAssociationRequest": { + "description": "A request for removing the association between a deal and a creative.", + "type": "object", "properties": { "association": { "description": "The association between a creative and a deal that should be removed.", "$ref": "CreativeDealAssociation" } }, - "id": "RemoveDealAssociationRequest", - "description": "A request for removing the association between a deal and a creative.", - "type": "object" + "id": "RemoveDealAssociationRequest" }, "ListCreativeStatusBreakdownByCreativeResponse": { "description": "Response message for listing all creatives associated with a given filtered\nbid reason.", "type": "object", "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListCreativeStatusBreakdownByCreativeRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBids.creatives.list\nmethod to retrieve the next page of results.", - "type": "string" - }, "filteredBidCreativeRows": { "description": "List of rows, with counts of bids with a given creative status aggregated\nby creative.", "items": { "$ref": "FilteredBidCreativeRow" }, "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListCreativeStatusBreakdownByCreativeRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBids.creatives.list\nmethod to retrieve the next page of results.", + "type": "string" } }, "id": "ListCreativeStatusBreakdownByCreativeResponse" @@ -1234,31 +2079,7 @@ "description": "A client resource represents a client buyer—an agency,\na brand, or an advertiser customer of the sponsor buyer.\nUsers associated with the client buyer have restricted access to\nthe Ad Exchange Marketplace and certain other sections\nof the Ad Exchange Buyer UI based on the role\ngranted to the client buyer.\nAll fields are required unless otherwise specified.", "type": "object", "properties": { - "entityName": { - "description": "The name of the entity. This field is automatically fetched based on\nthe type and ID.\nThe value of this field is ignored in create and update operations.", - "type": "string" - }, - "status": { - "enum": [ - "CLIENT_STATUS_UNSPECIFIED", - "DISABLED", - "ACTIVE" - ], - "description": "The status of the client buyer.", - "type": "string", - "enumDescriptions": [ - "A placeholder for an undefined client status.", - "A client that is currently disabled.", - "A client that is currently active." - ] - }, "entityType": { - "enum": [ - "ENTITY_TYPE_UNSPECIFIED", - "ADVERTISER", - "BRAND", - "AGENCY" - ], "description": "The type of the client entity: `ADVERTISER`, `BRAND`, or `AGENCY`.", "type": "string", "enumDescriptions": [ @@ -1266,6 +2087,12 @@ "An advertiser.", "A brand.", "An advertising agency." + ], + "enum": [ + "ENTITY_TYPE_UNSPECIFIED", + "ADVERTISER", + "BRAND", + "AGENCY" ] }, "clientName": { @@ -1273,12 +2100,6 @@ "type": "string" }, "role": { - "enum": [ - "CLIENT_ROLE_UNSPECIFIED", - "CLIENT_DEAL_VIEWER", - "CLIENT_DEAL_NEGOTIATOR", - "CLIENT_DEAL_APPROVER" - ], "description": "The role which is assigned to the client buyer. Each role implies a set of\npermissions granted to the client. Must be one of `CLIENT_DEAL_VIEWER`,\n`CLIENT_DEAL_NEGOTIATOR` or `CLIENT_DEAL_APPROVER`.", "type": "string", "enumDescriptions": [ @@ -1286,6 +2107,12 @@ "Users associated with this client can see publisher deal offers\nin the Marketplace.\nThey can neither negotiate proposals nor approve deals.\nIf this client is visible to publishers, they can send deal proposals\nto this client.", "Users associated with this client can respond to deal proposals\nsent to them by publishers. They can also initiate deal proposals\nof their own.", "Users associated with this client can approve eligible deals\non your behalf. Some deals may still explicitly require publisher\nfinalization. If this role is not selected, the sponsor buyer\nwill need to manually approve each of their deals." + ], + "enum": [ + "CLIENT_ROLE_UNSPECIFIED", + "CLIENT_DEAL_VIEWER", + "CLIENT_DEAL_NEGOTIATOR", + "CLIENT_DEAL_APPROVER" ] }, "visibleToSeller": { @@ -1301,27 +2128,35 @@ "format": "int64", "description": "The globally-unique numerical ID of the client.\nThe value of this field is ignored in create and update operations.", "type": "string" + }, + "entityName": { + "description": "The name of the entity. This field is automatically fetched based on\nthe type and ID.\nThe value of this field is ignored in create and update operations.", + "type": "string" + }, + "status": { + "description": "The status of the client buyer.", + "type": "string", + "enumDescriptions": [ + "A placeholder for an undefined client status.", + "A client that is currently disabled.", + "A client that is currently active." + ], + "enum": [ + "CLIENT_STATUS_UNSPECIFIED", + "DISABLED", + "ACTIVE" + ] } }, "id": "Client" }, "Correction": { + "description": "@OutputOnly Shows any corrections that were applied to this creative.", + "type": "object", "properties": { - "contexts": { - "description": "The contexts for the correction.", - "items": { - "$ref": "ServingContext" - }, - "type": "array" - }, - "details": { - "description": "Additional details about what was corrected.", - "items": { - "type": "string" - }, - "type": "array" - }, "type": { + "description": "The type of correction that was applied to the creative.", + "type": "string", "enumDescriptions": [ "The correction type is unknown. Refer to the details for more information.", "The ad's declared vendors did not match the vendors that were detected.\nThe detected vendors were added.", @@ -1349,17 +2184,52 @@ "MRAID_ATTRIBUTE_ADDED", "FLASH_ATTRIBUTE_REMOVED", "VIDEO_IN_SNIPPET_ATTRIBUTE_ADDED" - ], - "description": "The type of correction that was applied to the creative.", - "type": "string" + ] + }, + "contexts": { + "description": "The contexts for the correction.", + "items": { + "$ref": "ServingContext" + }, + "type": "array" + }, + "details": { + "description": "Additional details about what was corrected.", + "items": { + "type": "string" + }, + "type": "array" } }, - "id": "Correction", - "description": "@OutputOnly Shows any corrections that were applied to this creative.", - "type": "object" + "id": "Correction" }, "FilterSet": { + "description": "A set of filters that is applied to a request for data.\nWithin a filter set, an AND operation is performed across the filters\nrepresented by each field. An OR operation is performed across the filters\nrepresented by the multiple values of a repeated field. E.g.\n\"format=VIDEO AND deal_id=12 AND (seller_network_id=34 OR\nseller_network_id=56)\"", + "type": "object", "properties": { + "absoluteDateRange": { + "description": "An absolute date range, defined by a start date and an end date.\nInterpreted relative to Pacific time zone.", + "$ref": "AbsoluteDateRange" + }, + "buyerAccountId": { + "format": "int64", + "description": "The ID of the buyer account on which to filter; optional.", + "type": "string" + }, + "environment": { + "enumDescriptions": [ + "A placeholder for an undefined environment; indicates that no environment\nfilter will be applied.", + "The ad impression appears on the web.", + "The ad impression appears in an app." + ], + "enum": [ + "ENVIRONMENT_UNSPECIFIED", + "WEB", + "APP" + ], + "description": "The environment on which to filter; optional.", + "type": "string" + }, "dealId": { "format": "int64", "description": "The ID of the deal on which to filter; optional.", @@ -1380,17 +2250,17 @@ "type": "string" }, "timeSeriesGranularity": { - "enum": [ - "TIME_SERIES_GRANULARITY_UNSPECIFIED", - "HOURLY", - "DAILY" - ], "description": "The granularity of time intervals if a time series breakdown is desired;\noptional.", "type": "string", "enumDescriptions": [ "A placeholder for an unspecified interval; no time series is applied.\nAll rows in response will contain data for the entire requested time range.", "Indicates that data will be broken down by the hour.", "Indicates that data will be broken down by the day." + ], + "enum": [ + "TIME_SERIES_GRANULARITY_UNSPECIFIED", + "HOURLY", + "DAILY" ] }, "filterSetId": { @@ -1399,8 +2269,8 @@ "type": "string" }, "realtimeTimeRange": { - "$ref": "RealtimeTimeRange", - "description": "An open-ended realtime time range, defined by the aggregation start\ntimestamp." + "description": "An open-ended realtime time range, defined by the aggregation start\ntimestamp.", + "$ref": "RealtimeTimeRange" }, "creativeId": { "description": "The ID of the creative on which to filter; optional.", @@ -1415,19 +2285,19 @@ ], "description": "The list of platforms on which to filter; may be empty. The filters\nrepresented by multiple platforms are ORed together (i.e. if non-empty,\nresults must match any one of the platforms).", "items": { + "type": "string", "enum": [ "PLATFORM_UNSPECIFIED", "DESKTOP", "TABLET", "MOBILE" - ], - "type": "string" + ] }, "type": "array" }, "relativeDateRange": { - "description": "A relative date range, defined by an offset from today and a duration.\nInterpreted relative to Pacific time zone.", - "$ref": "RelativeDateRange" + "$ref": "RelativeDateRange", + "description": "A relative date range, defined by an offset from today and a duration.\nInterpreted relative to Pacific time zone." }, "sellerNetworkIds": { "description": "The list of IDs of the seller (publisher) networks on which to filter;\nmay be empty. The filters represented by multiple seller network IDs are\nORed together (i.e. if non-empty, results must match any one of the\npublisher networks).\nSee [seller-network-ids](https://developers.google.com/ad-exchange/rtb/downloads/seller-network-ids)\nfile for the set of existing seller network IDs.", @@ -1441,49 +2311,24 @@ "format": "int64", "description": "The account ID of the buyer who owns this filter set.\nThe value of this field is ignored in create operations.", "type": "string" - }, - "absoluteDateRange": { - "$ref": "AbsoluteDateRange", - "description": "An absolute date range, defined by a start date and an end date.\nInterpreted relative to Pacific time zone." - }, - "buyerAccountId": { - "format": "int64", - "description": "The ID of the buyer account on which to filter; optional.", - "type": "string" - }, - "environment": { - "enumDescriptions": [ - "A placeholder for an undefined environment; indicates that no environment\nfilter will be applied.", - "The ad impression appears on the web.", - "The ad impression appears in an app." - ], - "enum": [ - "ENVIRONMENT_UNSPECIFIED", - "WEB", - "APP" - ], - "description": "The environment on which to filter; optional.", - "type": "string" } }, - "id": "FilterSet", - "description": "A set of filters that is applied to a request for data.\nWithin a filter set, an AND operation is performed across the filters\nrepresented by each field. An OR operation is performed across the filters\nrepresented by the multiple values of a repeated field. E.g.\n\"format=VIDEO AND deal_id=12 AND (seller_network_id=34 OR\nseller_network_id=56)\"", - "type": "object" + "id": "FilterSet" }, "ListDealAssociationsResponse": { "description": "A response for listing creative and deal associations", "type": "object", "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListDealAssociationsRequest.page_token\nfield in the subsequent call to 'ListDealAssociation' method to retrieve\nthe next page of results.", - "type": "string" - }, "associations": { "description": "The list of associations.", "items": { "$ref": "CreativeDealAssociation" }, "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListDealAssociationsRequest.page_token\nfield in the subsequent call to 'ListDealAssociation' method to retrieve\nthe next page of results.", + "type": "string" } }, "id": "ListDealAssociationsResponse" @@ -1492,18 +2337,18 @@ "description": "The number of impressions with the specified dimension values where the\ncorresponding bid request or bid response was not successful, as described by\nthe specified callout status.", "type": "object", "properties": { - "rowDimensions": { - "$ref": "RowDimensions", - "description": "The values of all dimensions associated with metric values in this row." - }, "calloutStatusId": { "format": "int32", "description": "The ID of the callout status.\nSee [callout-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/callout-status-codes).", "type": "integer" }, "impressionCount": { - "description": "The number of impressions for which there was a bid request or bid response\nwith the specified callout status.", - "$ref": "MetricValue" + "$ref": "MetricValue", + "description": "The number of impressions for which there was a bid request or bid response\nwith the specified callout status." + }, + "rowDimensions": { + "description": "The values of all dimensions associated with metric values in this row.", + "$ref": "RowDimensions" } }, "id": "CalloutStatusRow" @@ -1520,6 +2365,102 @@ "type": "array" }, "reason": { + "enumDescriptions": [ + "The length of the image animation is longer than allowed.", + "The click through URL doesn't work properly.", + "Something is wrong with the creative itself.", + "The ad makes a fourth party call to an unapproved vendor.", + "The ad targets consumers using remarketing lists and/or collects\ndata for subsequent use in retargeting, but does not correctly declare\nthat use.", + "Clicking on the ad leads to an error page.", + "The ad size when rendered does not match the declaration.", + "Ads with a white background require a border, which was missing.", + "The creative attempts to set cookies from a fourth party that is not\ncertified.", + "The creative sets an LSO object.", + "The ad serves a blank.", + "The ad uses rotation, but not all destination URLs were declared.", + "There is a problem with the way the click macro is used.", + "The ad technology declaration is not accurate.", + "The actual destination URL does not match the declared destination URL.", + "The declared expanding direction does not match the actual direction.", + "The ad does not expand in a supported direction.", + "The ad uses an expandable vendor that is not supported.", + "There was an issue with the expandable ad.", + "The ad uses a video vendor that is not supported.", + "The length of the video ad is not supported.", + "The format of the video ad is not supported.", + "There was an issue with the video ad.", + "The landing page does not conform to Ad Exchange policy.", + "The ad or the landing page may contain malware.", + "The ad contains adult images or video content.", + "The ad contains text that is unclear or inaccurate.", + "The ad promotes counterfeit designer goods.", + "The ad causes a popup window to appear.", + "The creative does not follow policies set for the RTB protocol.", + "The ad contains a URL that uses a numeric IP address for the domain.", + "The ad or landing page contains unacceptable content because it initiated\na software or executable download.", + "The ad set an unauthorized cookie on a Google domain.", + "Flash content found when no flash was declared.", + "SSL support declared but not working correctly.", + "Rich Media - Direct Download in Ad (ex. PDF download).", + "Maximum download size exceeded.", + "Bad Destination URL: Site Not Crawlable.", + "Bad URL: Legal disapproval.", + "Pharmaceuticals, Gambling, Alcohol not allowed and at least one was\ndetected.", + "Dynamic DNS at Destination URL.", + "Poor Image / Video Quality.", + "For example, Image Trick to Click.", + "Incorrect Image Layout.", + "Irrelevant Image / Video.", + "Broken back button.", + "Misleading/Inaccurate claims in ads.", + "Restricted Products.", + "Unacceptable content. For example, malware.", + "The ad automatically redirects to the destination site without a click,\nor reports a click when none were made.", + "The ad uses URL protocols that do not exist or are not allowed on AdX.", + "Restricted content (for example, alcohol) was found in the ad but not\ndeclared.", + "Violation of the remarketing list policy.", + "The destination site's robot.txt file prevents it from being crawled.", + "Click to download must link to an app.", + "A review extension must be an accurate review.", + "Sexually explicit content.", + "The ad tries to gain an unfair traffic advantage.", + "The ad tries to circumvent Google's advertising systems.", + "The ad promotes dangerous knives.", + "The ad promotes explosives.", + "The ad promotes guns & parts.", + "The ad promotes recreational drugs/services & related equipment.", + "The ad promotes tobacco products/services & related equipment.", + "The ad promotes weapons.", + "The ad is unclear or irrelevant to the destination site.", + "The ad does not meet professional standards.", + "The promotion is unnecessarily difficult to navigate.", + "Violation of Google's policy for interest-based ads.", + "Misuse of personal information.", + "Omission of relevant information.", + "Unavailable promotions.", + "Misleading or unrealistic promotions.", + "Offensive or inappropriate content.", + "Capitalizing on sensitive events.", + "Shocking content.", + "Products & Services that enable dishonest behavior.", + "The ad does not meet technical requirements.", + "Restricted political content.", + "Unsupported content.", + "Invalid bidding method.", + "Video length exceeds limits.", + "Unacceptable content: Japanese healthcare.", + "Online pharmacy ID required.", + "Unacceptable content: Abortion.", + "Unacceptable content: Birth control.", + "Restricted in China.", + "Unacceptable content: Korean healthcare.", + "Non-family safe or adult content.", + "Clinical trial recruitment.", + "Maximum number of HTTP calls exceeded.", + "Maximum number of cookies exceeded.", + "Financial service ad does not adhere to specifications.", + "Flash content was found in an unsupported context." + ], "enum": [ "LENGTH_OF_IMAGE_ANIMATION", "BROKEN_URL", @@ -1617,123 +2558,24 @@ "UNSUPPORTED_FLASH_CONTENT" ], "description": "The categorized reason for disapproval.", - "type": "string", - "enumDescriptions": [ - "The length of the image animation is longer than allowed.", - "The click through URL doesn't work properly.", - "Something is wrong with the creative itself.", - "The ad makes a fourth party call to an unapproved vendor.", - "The ad targets consumers using remarketing lists and/or collects\ndata for subsequent use in retargeting, but does not correctly declare\nthat use.", - "Clicking on the ad leads to an error page.", - "The ad size when rendered does not match the declaration.", - "Ads with a white background require a border, which was missing.", - "The creative attempts to set cookies from a fourth party that is not\ncertified.", - "The creative sets an LSO object.", - "The ad serves a blank.", - "The ad uses rotation, but not all destination URLs were declared.", - "There is a problem with the way the click macro is used.", - "The ad technology declaration is not accurate.", - "The actual destination URL does not match the declared destination URL.", - "The declared expanding direction does not match the actual direction.", - "The ad does not expand in a supported direction.", - "The ad uses an expandable vendor that is not supported.", - "There was an issue with the expandable ad.", - "The ad uses a video vendor that is not supported.", - "The length of the video ad is not supported.", - "The format of the video ad is not supported.", - "There was an issue with the video ad.", - "The landing page does not conform to Ad Exchange policy.", - "The ad or the landing page may contain malware.", - "The ad contains adult images or video content.", - "The ad contains text that is unclear or inaccurate.", - "The ad promotes counterfeit designer goods.", - "The ad causes a popup window to appear.", - "The creative does not follow policies set for the RTB protocol.", - "The ad contains a URL that uses a numeric IP address for the domain.", - "The ad or landing page contains unacceptable content because it initiated\na software or executable download.", - "The ad set an unauthorized cookie on a Google domain.", - "Flash content found when no flash was declared.", - "SSL support declared but not working correctly.", - "Rich Media - Direct Download in Ad (ex. PDF download).", - "Maximum download size exceeded.", - "Bad Destination URL: Site Not Crawlable.", - "Bad URL: Legal disapproval.", - "Pharmaceuticals, Gambling, Alcohol not allowed and at least one was\ndetected.", - "Dynamic DNS at Destination URL.", - "Poor Image / Video Quality.", - "For example, Image Trick to Click.", - "Incorrect Image Layout.", - "Irrelevant Image / Video.", - "Broken back button.", - "Misleading/Inaccurate claims in ads.", - "Restricted Products.", - "Unacceptable content. For example, malware.", - "The ad automatically redirects to the destination site without a click,\nor reports a click when none were made.", - "The ad uses URL protocols that do not exist or are not allowed on AdX.", - "Restricted content (for example, alcohol) was found in the ad but not\ndeclared.", - "Violation of the remarketing list policy.", - "The destination site's robot.txt file prevents it from being crawled.", - "Click to download must link to an app.", - "A review extension must be an accurate review.", - "Sexually explicit content.", - "The ad tries to gain an unfair traffic advantage.", - "The ad tries to circumvent Google's advertising systems.", - "The ad promotes dangerous knives.", - "The ad promotes explosives.", - "The ad promotes guns & parts.", - "The ad promotes recreational drugs/services & related equipment.", - "The ad promotes tobacco products/services & related equipment.", - "The ad promotes weapons.", - "The ad is unclear or irrelevant to the destination site.", - "The ad does not meet professional standards.", - "The promotion is unnecessarily difficult to navigate.", - "Violation of Google's policy for interest-based ads.", - "Misuse of personal information.", - "Omission of relevant information.", - "Unavailable promotions.", - "Misleading or unrealistic promotions.", - "Offensive or inappropriate content.", - "Capitalizing on sensitive events.", - "Shocking content.", - "Products & Services that enable dishonest behavior.", - "The ad does not meet technical requirements.", - "Restricted political content.", - "Unsupported content.", - "Invalid bidding method.", - "Video length exceeds limits.", - "Unacceptable content: Japanese healthcare.", - "Online pharmacy ID required.", - "Unacceptable content: Abortion.", - "Unacceptable content: Birth control.", - "Restricted in China.", - "Unacceptable content: Korean healthcare.", - "Non-family safe or adult content.", - "Clinical trial recruitment.", - "Maximum number of HTTP calls exceeded.", - "Maximum number of cookies exceeded.", - "Financial service ad does not adhere to specifications.", - "Flash content was found in an unsupported context." - ] + "type": "string" } }, "id": "Disapproval" }, "StopWatchingCreativeRequest": { - "properties": {}, - "id": "StopWatchingCreativeRequest", "description": "A request for stopping notifications for changes to creative Status.", - "type": "object" + "type": "object", + "properties": {}, + "id": "StopWatchingCreativeRequest" }, "ServingRestriction": { + "description": "@OutputOnly A representation of the status of an ad in a\nspecific context. A context here relates to where something ultimately serves\n(for example, a user or publisher geo, a platform, an HTTPS vs HTTP request,\nor the type of auction).", + "type": "object", "properties": { - "contexts": { - "description": "The contexts for the restriction.", - "items": { - "$ref": "ServingContext" - }, - "type": "array" - }, "status": { + "description": "The status of the creative in this context (for example, it has been\nexplicitly disapproved or is pending review).", + "type": "string", "enumDescriptions": [ "The status is not known.", "The ad was disapproved in this context.", @@ -1743,9 +2585,7 @@ "STATUS_UNSPECIFIED", "DISAPPROVAL", "PENDING_REVIEW" - ], - "description": "The status of the creative in this context (for example, it has been\nexplicitly disapproved or is pending review).", - "type": "string" + ] }, "disapprovalReasons": { "description": "Any disapprovals bound to this restriction.\nOnly present if status=DISAPPROVED.\nCan be used to filter the response of the\ncreatives.list\nmethod.", @@ -1753,18 +2593,653 @@ "$ref": "Disapproval" }, "type": "array" + }, + "contexts": { + "description": "The contexts for the restriction.", + "items": { + "$ref": "ServingContext" + }, + "type": "array" } }, - "id": "ServingRestriction", - "description": "@OutputOnly A representation of the status of an ad in a\nspecific context. A context here relates to where something ultimately serves\n(for example, a user or publisher geo, a platform, an HTTPS vs HTTP request,\nor the type of auction).", - "type": "object" + "id": "ServingRestriction" + }, + "Date": { + "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", + "type": "object", + "properties": { + "day": { + "format": "int32", + "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", + "type": "integer" + }, + "year": { + "format": "int32", + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "type": "integer" + }, + "month": { + "format": "int32", + "description": "Month of year. Must be from 1 to 12.", + "type": "integer" + } + }, + "id": "Date" + }, + "RowDimensions": { + "description": "A response may include multiple rows, breaking down along various dimensions.\nEncapsulates the values of all dimensions for a given row.", + "type": "object", + "properties": { + "timeInterval": { + "description": "The time interval that this row represents.", + "$ref": "TimeInterval" + } + }, + "id": "RowDimensions" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "AppContext": { + "description": "@OutputOnly The app type the restriction applies to for mobile device.", + "type": "object", + "properties": { + "appTypes": { + "description": "The app types this restriction applies to.", + "items": { + "enum": [ + "NATIVE", + "WEB" + ], + "type": "string" + }, + "type": "array", + "enumDescriptions": [ + "Native app context.", + "Mobile web app context." + ] + } + }, + "id": "AppContext" + }, + "ListFilteredBidsResponse": { + "description": "Response message for listing all reasons that bids were filtered from the\nauction.", + "type": "object", + "properties": { + "creativeStatusRows": { + "description": "List of rows, with counts of filtered bids aggregated by filtering reason\n(i.e. creative status).", + "items": { + "$ref": "CreativeStatusRow" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListFilteredBidsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBids.list\nmethod to retrieve the next page of results.", + "type": "string" + } + }, + "id": "ListFilteredBidsResponse" + }, + "SecurityContext": { + "description": "@OutputOnly A security context.", + "type": "object", + "properties": { + "securities": { + "description": "The security types in this context.", + "items": { + "enum": [ + "INSECURE", + "SSL" + ], + "type": "string" + }, + "type": "array", + "enumDescriptions": [ + "Matches impressions that require insecure compatibility.", + "Matches impressions that require SSL compatibility." + ] + } + }, + "id": "SecurityContext" + }, + "ListFilteredBidRequestsResponse": { + "description": "Response message for listing all reasons that bid requests were filtered and\nnot sent to the buyer.", + "type": "object", + "properties": { + "calloutStatusRows": { + "description": "List of rows, with counts of filtered bid requests aggregated by callout\nstatus.", + "items": { + "$ref": "CalloutStatusRow" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListFilteredBidRequestsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBidRequests.list\nmethod to retrieve the next page of results.", + "type": "string" + } + }, + "id": "ListFilteredBidRequestsResponse" + }, + "ListCreativesResponse": { + "description": "A response for listing creatives.", + "type": "object", + "properties": { + "creatives": { + "description": "The list of creatives.", + "items": { + "$ref": "Creative" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListCreativesRequest.page_token\nfield in the subsequent call to `ListCreatives` method to retrieve the next\npage of results.", + "type": "string" + } + }, + "id": "ListCreativesResponse" + }, + "HtmlContent": { + "description": "HTML content for a creative.", + "type": "object", + "properties": { + "height": { + "format": "int32", + "description": "The height of the HTML snippet in pixels.", + "type": "integer" + }, + "width": { + "format": "int32", + "description": "The width of the HTML snippet in pixels.", + "type": "integer" + }, + "snippet": { + "description": "The HTML snippet that displays the ad when inserted in the web page.", + "type": "string" + } + }, + "id": "HtmlContent" + }, + "ListBidMetricsResponse": { + "description": "Response message for listing the metrics that are measured in number of bids.", + "type": "object", + "properties": { + "bidMetricsRows": { + "description": "List of rows, each containing a set of bid metrics.", + "items": { + "$ref": "BidMetricsRow" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListBidMetricsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.bidMetrics.list\nmethod to retrieve the next page of results.", + "type": "string" + } + }, + "id": "ListBidMetricsResponse" + }, + "Reason": { + "description": "A specific filtering status and how many times it occurred.", + "type": "object", + "properties": { + "status": { + "format": "int32", + "description": "The filtering status code. Please refer to the\n[creative-status-codes.txt](https://storage.googleapis.com/adx-rtb-dictionaries/creative-status-codes.txt)\nfile for different statuses.", + "type": "integer" + }, + "count": { + "format": "int64", + "description": "The number of times the creative was filtered for the status. The\ncount is aggregated across all publishers on the exchange.", + "type": "string" + } + }, + "id": "Reason" + }, + "VideoContent": { + "description": "Video content for a creative.", + "type": "object", + "properties": { + "videoUrl": { + "description": "The URL to fetch a video ad.", + "type": "string" + } + }, + "id": "VideoContent" + }, + "ListLosingBidsResponse": { + "description": "Response message for listing all reasons that bids lost in the auction.", + "type": "object", + "properties": { + "creativeStatusRows": { + "description": "List of rows, with counts of losing bids aggregated by loss reason (i.e.\ncreative status).", + "items": { + "$ref": "CreativeStatusRow" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListLosingBidsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.losingBids.list\nmethod to retrieve the next page of results.", + "type": "string" + } + }, + "id": "ListLosingBidsResponse" + }, + "ListNonBillableWinningBidsResponse": { + "description": "Response message for listing all reasons for which a buyer was not billed for\na winning bid.", + "type": "object", + "properties": { + "nonBillableWinningBidStatusRows": { + "description": "List of rows, with counts of bids not billed aggregated by reason.", + "items": { + "$ref": "NonBillableWinningBidStatusRow" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListNonBillableWinningBidsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.nonBillableWinningBids.list\nmethod to retrieve the next page of results.", + "type": "string" + } + }, + "id": "ListNonBillableWinningBidsResponse" + }, + "ImpressionMetricsRow": { + "description": "The set of metrics that are measured in numbers of impressions, representing\nhow many impressions with the specified dimension values were considered\neligible at each stage of the bidding funnel.", + "type": "object", + "properties": { + "availableImpressions": { + "$ref": "MetricValue", + "description": "The number of impressions available to the buyer on Ad Exchange.\nIn some cases this value may be unavailable." + }, + "rowDimensions": { + "description": "The values of all dimensions associated with metric values in this row.", + "$ref": "RowDimensions" + }, + "bidRequests": { + "$ref": "MetricValue", + "description": "The number of impressions for which Ad Exchange sent the buyer a bid\nrequest." + }, + "inventoryMatches": { + "description": "The number of impressions that match the buyer's inventory pretargeting.", + "$ref": "MetricValue" + }, + "responsesWithBids": { + "$ref": "MetricValue", + "description": "The number of impressions for which Ad Exchange received a response from\nthe buyer that contained at least one applicable bid." + }, + "successfulResponses": { + "description": "The number of impressions for which the buyer successfully sent a response\nto Ad Exchange.", + "$ref": "MetricValue" + } + }, + "id": "ImpressionMetricsRow" + }, + "AuctionContext": { + "description": "@OutputOnly The auction type the restriction applies to.", + "type": "object", + "properties": { + "auctionTypes": { + "description": "The auction types this restriction applies to.", + "items": { + "enum": [ + "OPEN_AUCTION", + "DIRECT_DEALS" + ], + "type": "string" + }, + "type": "array", + "enumDescriptions": [ + "The restriction applies to open auction.", + "The restriction applies to direct deals." + ] + } + }, + "id": "AuctionContext" + }, + "ListImpressionMetricsResponse": { + "description": "Response message for listing the metrics that are measured in number of\nimpressions.", + "type": "object", + "properties": { + "impressionMetricsRows": { + "description": "List of rows, each containing a set of impression metrics.", + "items": { + "$ref": "ImpressionMetricsRow" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListImpressionMetricsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.impressionMetrics.list\nmethod to retrieve the next page of results.", + "type": "string" + } + }, + "id": "ListImpressionMetricsResponse" + }, + "BidMetricsRow": { + "description": "The set of metrics that are measured in numbers of bids, representing how\nmany bids with the specified dimension values were considered eligible at\neach stage of the bidding funnel;", + "type": "object", + "properties": { + "rowDimensions": { + "$ref": "RowDimensions", + "description": "The values of all dimensions associated with metric values in this row." + }, + "impressionsWon": { + "description": "The number of bids that won an impression.", + "$ref": "MetricValue" + }, + "viewableImpressions": { + "$ref": "MetricValue", + "description": "The number of bids for which the corresponding impression was viewable (as\ndefined by Active View)." + }, + "measurableImpressions": { + "description": "The number of bids for which the corresponding impression was measurable\nfor viewability (as defined by Active View).", + "$ref": "MetricValue" + }, + "bids": { + "description": "The number of bids that Ad Exchange received from the buyer.", + "$ref": "MetricValue" + }, + "billedImpressions": { + "description": "The number of bids for which the buyer was billed.", + "$ref": "MetricValue" + }, + "bidsInAuction": { + "description": "The number of bids that were permitted to compete in the auction.", + "$ref": "MetricValue" + } + }, + "id": "BidMetricsRow" + }, + "ListBidResponseErrorsResponse": { + "description": "Response message for listing all reasons that bid responses resulted in an\nerror.", + "type": "object", + "properties": { + "calloutStatusRows": { + "description": "List of rows, with counts of bid responses aggregated by callout status.", + "items": { + "$ref": "CalloutStatusRow" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListBidResponseErrorsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.bidResponseErrors.list\nmethod to retrieve the next page of results.", + "type": "string" + } + }, + "id": "ListBidResponseErrorsResponse" + }, + "CreativeStatusRow": { + "description": "The number of bids with the specified dimension values that did not win the\nauction (either were filtered pre-auction or lost the auction), as described\nby the specified creative status.", + "type": "object", + "properties": { + "rowDimensions": { + "$ref": "RowDimensions", + "description": "The values of all dimensions associated with metric values in this row." + }, + "creativeStatusId": { + "format": "int32", + "description": "The ID of the creative status.\nSee [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes).", + "type": "integer" + }, + "bidCount": { + "$ref": "MetricValue", + "description": "The number of bids with the specified status." + } + }, + "id": "CreativeStatusRow" + }, + "RealtimeTimeRange": { + "description": "An open-ended realtime time range specified by the start timestamp.\nFor filter sets that specify a realtime time range RTB metrics continue to\nbe aggregated throughout the lifetime of the filter set.", + "type": "object", + "properties": { + "startTimestamp": { + "format": "google-datetime", + "description": "The start timestamp of the real-time RTB metrics aggregation.", + "type": "string" + } + }, + "id": "RealtimeTimeRange" + }, + "NonBillableWinningBidStatusRow": { + "description": "The number of winning bids with the specified dimension values for which the\nbuyer was not billed, as described by the specified status.", + "type": "object", + "properties": { + "bidCount": { + "description": "The number of bids with the specified status.", + "$ref": "MetricValue" + }, + "status": { + "description": "The status specifying why the winning bids were not billed.", + "type": "string", + "enumDescriptions": [ + "A placeholder for an undefined status.\nThis value will never be returned in responses.", + "The buyer was not billed because the ad was not rendered by the\npublisher.", + "The buyer was not billed because the impression won by the bid was\ndetermined to be invalid." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "AD_NOT_RENDERED", + "INVALID_IMPRESSION" + ] + }, + "rowDimensions": { + "$ref": "RowDimensions", + "description": "The values of all dimensions associated with metric values in this row." + } + }, + "id": "NonBillableWinningBidStatusRow" + }, + "FilteredBidDetailRow": { + "description": "The number of filtered bids with the specified dimension values, among those\nfiltered due to the requested filtering reason (i.e. creative status), that\nhave the specified detail.", + "type": "object", + "properties": { + "detailId": { + "format": "int32", + "description": "The ID of the detail. The associated value can be looked up in the\ndictionary file corresponding to the DetailType in the response message.", + "type": "integer" + }, + "bidCount": { + "description": "The number of bids with the specified detail.", + "$ref": "MetricValue" + }, + "rowDimensions": { + "$ref": "RowDimensions", + "description": "The values of all dimensions associated with metric values in this row." + } + }, + "id": "FilteredBidDetailRow" + }, + "AbsoluteDateRange": { + "description": "An absolute date range, specified by its start date and end date.\nThe supported range of dates begins 30 days before today and ends today.\nValidity checked upon filter set creation. If a filter set with an absolute\ndate range is run at a later date more than 30 days after start_date, it will\nfail.", + "type": "object", + "properties": { + "endDate": { + "description": "The end date of the range (inclusive).\nMust be within the 30 days leading up to current date, and must be equal to\nor after start_date.", + "$ref": "Date" + }, + "startDate": { + "description": "The start date of the range (inclusive).\nMust be within the 30 days leading up to current date, and must be equal to\nor before end_date.", + "$ref": "Date" + } + }, + "id": "AbsoluteDateRange" + }, + "AddDealAssociationRequest": { + "description": "A request for associating a deal and a creative.", + "type": "object", + "properties": { + "association": { + "$ref": "CreativeDealAssociation", + "description": "The association between a creative and a deal that should be added." + } + }, + "id": "AddDealAssociationRequest" + }, + "WatchCreativeRequest": { + "description": "A request for watching changes to creative Status.", + "type": "object", + "properties": { + "topic": { + "description": "The Pub/Sub topic to publish notifications to.\nThis topic must already exist and must give permission to\nad-exchange-buyside-reports@google.com to write to the topic.\nThis should be the full resource name in\n\"projects/{project_id}/topics/{topic_id}\" format.", + "type": "string" + } + }, + "id": "WatchCreativeRequest" + }, + "TimeInterval": { + "description": "An interval of time, with an absolute start and end.\nThis is included in the response, for several reasons:\n1) The request may have specified start or end times relative to the time the\n request was sent; the response indicates the corresponding absolute time\n interval.\n2) The request may have specified an end time past the latest time for which\n data was available (e.g. if requesting data for the today); the response\n indicates the latest time for which data was actually returned.\n3) The response data for a single request may be broken down into multiple\n time intervals, if a time series was requested.", + "type": "object", + "properties": { + "endTime": { + "format": "google-datetime", + "description": "The timestamp marking the end of the range (exclusive) for which data is\nincluded.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "The timestamp marking the start of the range (inclusive) for which data is\nincluded.", + "type": "string" + } + }, + "id": "TimeInterval" + }, + "FilteredBidCreativeRow": { + "description": "The number of filtered bids with the specified dimension values that have the\nspecified creative.", + "type": "object", + "properties": { + "rowDimensions": { + "description": "The values of all dimensions associated with metric values in this row.", + "$ref": "RowDimensions" + }, + "bidCount": { + "$ref": "MetricValue", + "description": "The number of bids with the specified creative." + }, + "creativeId": { + "description": "The ID of the creative.", + "type": "string" + } + }, + "id": "FilteredBidCreativeRow" + }, + "RelativeDateRange": { + "description": "A relative date range, specified by an offset and a duration.\nThe supported range of dates begins 30 days before today and ends today.\nI.e. the limits for these values are:\noffset_days \u003e= 0\nduration_days \u003e= 1\noffset_days + duration_days \u003c= 30", + "type": "object", + "properties": { + "durationDays": { + "format": "int32", + "description": "The number of days in the requested date range. E.g. for a range spanning\ntoday, 1. For a range spanning the last 7 days, 7.", + "type": "integer" + }, + "offsetDays": { + "format": "int32", + "description": "The end date of the filter set, specified as the number of days before\ntoday. E.g. for a range where the last date is today, 0.", + "type": "integer" + } + }, + "id": "RelativeDateRange" + }, + "NativeContent": { + "description": "Native content for a creative.", + "type": "object", + "properties": { + "body": { + "description": "A long description of the ad.", + "type": "string" + }, + "starRating": { + "format": "double", + "description": "The app rating in the app store. Must be in the range [0-5].", + "type": "number" + }, + "videoUrl": { + "description": "The URL to fetch a native video ad.", + "type": "string" + }, + "clickLinkUrl": { + "description": "The URL that the browser/SDK will load when the user clicks the ad.", + "type": "string" + }, + "logo": { + "$ref": "Image", + "description": "A smaller image, for the advertiser's logo." + }, + "priceDisplayText": { + "description": "The price of the promoted app including currency info.", + "type": "string" + }, + "clickTrackingUrl": { + "description": "The URL to use for click tracking.", + "type": "string" + }, + "image": { + "$ref": "Image", + "description": "A large image." + }, + "advertiserName": { + "description": "The name of the advertiser or sponsor, to be displayed in the ad creative.", + "type": "string" + }, + "storeUrl": { + "description": "The URL to the app store to purchase/download the promoted app.", + "type": "string" + }, + "headline": { + "description": "A short title for the ad.", + "type": "string" + }, + "appIcon": { + "$ref": "Image", + "description": "The app icon, for app download ads." + }, + "callToAction": { + "description": "A label for the button that the user is supposed to click.", + "type": "string" + } + }, + "id": "NativeContent" + }, + "ListClientsResponse": { + "type": "object", + "properties": { + "clients": { + "description": "The returned list of clients.", + "items": { + "$ref": "Client" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListClientsRequest.pageToken\nfield in the subsequent call to the\naccounts.clients.list method\nto retrieve the next page of results.", + "type": "string" + } + }, + "id": "ListClientsResponse" + }, + "ListBidResponsesWithoutBidsResponse": { + "description": "Response message for listing all reasons that bid responses were considered\nto have no applicable bids.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListBidResponsesWithoutBidsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.bidResponsesWithoutBids.list\nmethod to retrieve the next page of results.", + "type": "string" + }, + "bidResponseWithoutBidsStatusRows": { + "description": "List of rows, with counts of bid responses without bids aggregated by\nstatus.", + "items": { + "$ref": "BidResponseWithoutBidsStatusRow" + }, + "type": "array" + } + }, + "id": "ListBidResponsesWithoutBidsResponse" } }, - "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, + "protocol": "rest", "canonicalName": "AdExchangeBuyerII", "auth": { "oauth2": { @@ -1775,1478 +3250,5 @@ } } }, - "rootUrl": "https://adexchangebuyer.googleapis.com/", - "ownerDomain": "google.com", - "name": "adexchangebuyer2", - "batchPath": "batch", - "title": "Ad Exchange Buyer API II", - "ownerName": "Google", - "resources": { - "accounts": { - "resources": { - "clients": { - "methods": { - "list": { - "path": "v2beta1/accounts/{accountId}/clients", - "id": "adexchangebuyer2.accounts.clients.list", - "description": "Lists all the clients for the current sponsor buyer.", - "httpMethod": "GET", - "response": { - "$ref": "ListClientsResponse" - }, - "parameterOrder": [ - "accountId" - ], - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientsResponse.nextPageToken\nreturned from the previous call to the\naccounts.clients.list method.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer clients than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer" - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Unique numerical account ID of the sponsor buyer to list the clients for.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/clients" - }, - "get": { - "description": "Gets a client buyer with a given client account ID.", - "httpMethod": "GET", - "response": { - "$ref": "Client" - }, - "parameterOrder": [ - "accountId", - "clientAccountId" - ], - "parameters": { - "accountId": { - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client's sponsor buyer. (required)", - "type": "string", - "required": true - }, - "clientAccountId": { - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client buyer to retrieve. (required)", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", - "id": "adexchangebuyer2.accounts.clients.get" - }, - "update": { - "id": "adexchangebuyer2.accounts.clients.update", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", - "request": { - "$ref": "Client" - }, - "description": "Updates an existing client buyer.", - "response": { - "$ref": "Client" - }, - "parameterOrder": [ - "accountId", - "clientAccountId" - ], - "httpMethod": "PUT", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "accountId": { - "format": "int64", - "description": "Unique numerical account ID for the buyer of which the client buyer\nis a customer; the sponsor buyer to update a client for. (required)", - "type": "string", - "required": true, - "location": "path" - }, - "clientAccountId": { - "format": "int64", - "description": "Unique numerical account ID of the client to update. (required)", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}" - }, - "create": { - "id": "adexchangebuyer2.accounts.clients.create", - "path": "v2beta1/accounts/{accountId}/clients", - "request": { - "$ref": "Client" - }, - "description": "Creates a new client buyer.", - "response": { - "$ref": "Client" - }, - "parameterOrder": [ - "accountId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "accountId": { - "location": "path", - "format": "int64", - "description": "Unique numerical account ID for the buyer of which the client buyer\nis a customer; the sponsor buyer to create a client for. (required)", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/clients" - } - }, - "resources": { - "invitations": { - "methods": { - "create": { - "response": { - "$ref": "ClientUserInvitation" - }, - "parameterOrder": [ - "accountId", - "clientAccountId" - ], - "httpMethod": "POST", - "parameters": { - "accountId": { - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client's sponsor buyer. (required)", - "type": "string", - "required": true - }, - "clientAccountId": { - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client buyer that the user\nshould be associated with. (required)", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", - "id": "adexchangebuyer2.accounts.clients.invitations.create", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", - "description": "Creates and sends out an email invitation to access\nan Ad Exchange client buyer account.", - "request": { - "$ref": "ClientUserInvitation" - } - }, - "list": { - "response": { - "$ref": "ListClientUserInvitationsResponse" - }, - "parameterOrder": [ - "accountId", - "clientAccountId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientUserInvitationsResponse.nextPageToken\nreturned from the previous call to the\nclients.invitations.list\nmethod.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. Server may return fewer clients than requested.\nIf unspecified, server will pick an appropriate default.", - "type": "integer" - }, - "accountId": { - "format": "int64", - "description": "Numerical account ID of the client's sponsor buyer. (required)", - "type": "string", - "required": true, - "location": "path" - }, - "clientAccountId": { - "location": "path", - "description": "Numerical account ID of the client buyer to list invitations for.\n(required)\nYou must either specify a string representation of a\nnumerical account identifier or the `-` character\nto list all the invitations for all the clients\nof a given sponsor buyer.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", - "id": "adexchangebuyer2.accounts.clients.invitations.list", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", - "description": "Lists all the client users invitations for a client\nwith a given account ID." - }, - "get": { - "id": "adexchangebuyer2.accounts.clients.invitations.get", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}", - "description": "Retrieves an existing client user invitation.", - "response": { - "$ref": "ClientUserInvitation" - }, - "parameterOrder": [ - "accountId", - "clientAccountId", - "invitationId" - ], - "httpMethod": "GET", - "parameters": { - "accountId": { - "format": "int64", - "description": "Numerical account ID of the client's sponsor buyer. (required)", - "type": "string", - "required": true, - "location": "path" - }, - "clientAccountId": { - "format": "int64", - "description": "Numerical account ID of the client buyer that the user invitation\nto be retrieved is associated with. (required)", - "type": "string", - "required": true, - "location": "path" - }, - "invitationId": { - "location": "path", - "format": "int64", - "description": "Numerical identifier of the user invitation to retrieve. (required)", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}" - } - } - }, - "users": { - "methods": { - "get": { - "description": "Retrieves an existing client user.", - "response": { - "$ref": "ClientUser" - }, - "parameterOrder": [ - "accountId", - "clientAccountId", - "userId" - ], - "httpMethod": "GET", - "parameters": { - "userId": { - "location": "path", - "format": "int64", - "description": "Numerical identifier of the user to retrieve. (required)", - "type": "string", - "required": true - }, - "accountId": { - "format": "int64", - "description": "Numerical account ID of the client's sponsor buyer. (required)", - "type": "string", - "required": true, - "location": "path" - }, - "clientAccountId": { - "format": "int64", - "description": "Numerical account ID of the client buyer\nthat the user to be retrieved is associated with. (required)", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", - "id": "adexchangebuyer2.accounts.clients.users.get", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}" - }, - "list": { - "response": { - "$ref": "ListClientUsersResponse" - }, - "parameterOrder": [ - "accountId", - "clientAccountId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "pageToken": { - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientUsersResponse.nextPageToken\nreturned from the previous call to the\naccounts.clients.users.list method.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "Requested page size. The server may return fewer clients than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer", - "location": "query" - }, - "accountId": { - "format": "int64", - "description": "Numerical account ID of the sponsor buyer of the client to list users for.\n(required)", - "type": "string", - "required": true, - "location": "path" - }, - "clientAccountId": { - "location": "path", - "description": "The account ID of the client buyer to list users for. (required)\nYou must specify either a string representation of a\nnumerical account identifier or the `-` character\nto list all the client users for all the clients\nof a given sponsor buyer.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users", - "id": "adexchangebuyer2.accounts.clients.users.list", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users", - "description": "Lists all the known client users for a specified\nsponsor buyer account ID." - }, - "update": { - "httpMethod": "PUT", - "parameterOrder": [ - "accountId", - "clientAccountId", - "userId" - ], - "response": { - "$ref": "ClientUser" - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "userId": { - "format": "int64", - "description": "Numerical identifier of the user to retrieve. (required)", - "type": "string", - "required": true, - "location": "path" - }, - "accountId": { - "format": "int64", - "description": "Numerical account ID of the client's sponsor buyer. (required)", - "type": "string", - "required": true, - "location": "path" - }, - "clientAccountId": { - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client buyer that the user to be retrieved\nis associated with. (required)", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", - "id": "adexchangebuyer2.accounts.clients.users.update", - "request": { - "$ref": "ClientUser" - }, - "description": "Updates an existing client user.\nOnly the user status can be changed on update." - } - } - } - } - }, - "creatives": { - "resources": { - "dealAssociations": { - "methods": { - "list": { - "httpMethod": "GET", - "response": { - "$ref": "ListDealAssociationsResponse" - }, - "parameterOrder": [ - "accountId", - "creativeId" - ], - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "creativeId": { - "description": "The creative ID to list the associations from.\nSpecify \"-\" to list all creatives under the above account.", - "type": "string", - "required": true, - "location": "path" - }, - "pageToken": { - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListDealAssociationsResponse.next_page_token\nreturned from the previous call to 'ListDealAssociations' method.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "Requested page size. Server may return fewer associations than requested.\nIf unspecified, server will pick an appropriate default.", - "type": "integer", - "location": "query" - }, - "accountId": { - "location": "path", - "description": "The account to list the associations from.\nSpecify \"-\" to list all creatives the current user has access to.", - "type": "string", - "required": true - }, - "query": { - "location": "query", - "description": "An optional query string to filter deal associations. If no filter is\nspecified, all associations will be returned.\nSupported queries are:\n\u003cul\u003e\n\u003cli\u003eaccountId=\u003ci\u003eaccount_id_string\u003c/i\u003e\n\u003cli\u003ecreativeId=\u003ci\u003ecreative_id_string\u003c/i\u003e\n\u003cli\u003edealsId=\u003ci\u003edeals_id_string\u003c/i\u003e\n\u003cli\u003edealsStatus:{approved, conditionally_approved, disapproved,\n not_checked}\n\u003cli\u003eopenAuctionStatus:{approved, conditionally_approved, disapproved,\n not_checked}\n\u003c/ul\u003e\nExample: 'dealsId=12345 AND dealsStatus:disapproved'", - "type": "string" - } - }, - "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations", - "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations", - "id": "adexchangebuyer2.accounts.creatives.dealAssociations.list", - "description": "List all creative-deal associations." - }, - "remove": { - "httpMethod": "POST", - "parameterOrder": [ - "accountId", - "creativeId" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "accountId": { - "description": "The account the creative belongs to.", - "type": "string", - "required": true, - "location": "path" - }, - "creativeId": { - "location": "path", - "description": "The ID of the creative associated with the deal.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove", - "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove", - "id": "adexchangebuyer2.accounts.creatives.dealAssociations.remove", - "description": "Remove the association between a deal and a creative.", - "request": { - "$ref": "RemoveDealAssociationRequest" - } - }, - "add": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "accountId", - "creativeId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "creativeId": { - "description": "The ID of the creative associated with the deal.", - "type": "string", - "required": true, - "location": "path" - }, - "accountId": { - "description": "The account the creative belongs to.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add", - "id": "adexchangebuyer2.accounts.creatives.dealAssociations.add", - "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add", - "request": { - "$ref": "AddDealAssociationRequest" - }, - "description": "Associate an existing deal with a creative." - } - } - } - }, - "methods": { - "get": { - "httpMethod": "GET", - "response": { - "$ref": "Creative" - }, - "parameterOrder": [ - "accountId", - "creativeId" - ], - "parameters": { - "creativeId": { - "description": "The ID of the creative to retrieve.", - "type": "string", - "required": true, - "location": "path" - }, - "accountId": { - "description": "The account the creative belongs to.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}", - "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}", - "id": "adexchangebuyer2.accounts.creatives.get", - "description": "Gets a creative." - }, - "watch": { - "id": "adexchangebuyer2.accounts.creatives.watch", - "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch", - "request": { - "$ref": "WatchCreativeRequest" - }, - "description": "Watches a creative. Will result in push notifications being sent to the\ntopic when the creative changes status.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "accountId", - "creativeId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "accountId": { - "description": "The account of the creative to watch.", - "type": "string", - "required": true, - "location": "path" - }, - "creativeId": { - "location": "path", - "description": "The creative ID to watch for status changes.\nSpecify \"-\" to watch all creatives under the above account.\nIf both creative-level and account-level notifications are\nsent, only a single notification will be sent to the\ncreative-level notification topic.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch" - }, - "update": { - "httpMethod": "PUT", - "parameterOrder": [ - "accountId", - "creativeId" - ], - "response": { - "$ref": "Creative" - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "creativeId": { - "description": "The buyer-defined creative ID of this creative.\nCan be used to filter the response of the\ncreatives.list\nmethod.", - "type": "string", - "required": true, - "location": "path" - }, - "accountId": { - "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}", - "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}", - "id": "adexchangebuyer2.accounts.creatives.update", - "request": { - "$ref": "Creative" - }, - "description": "Updates a creative." - }, - "list": { - "description": "Lists creatives.", - "httpMethod": "GET", - "response": { - "$ref": "ListCreativesResponse" - }, - "parameterOrder": [ - "accountId" - ], - "parameters": { - "pageToken": { - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativesResponse.next_page_token\nreturned from the previous call to 'ListCreatives' method.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "Requested page size. The server may return fewer creatives than requested\n(due to timeout constraint) even if more are available via another call.\nIf unspecified, server will pick an appropriate default.\nAcceptable values are 1 to 1000, inclusive.", - "type": "integer", - "location": "query" - }, - "accountId": { - "location": "path", - "description": "The account to list the creatives from.\nSpecify \"-\" to list all creatives the current user has access to.", - "type": "string", - "required": true - }, - "query": { - "description": "An optional query string to filter creatives. If no filter is specified,\nall active creatives will be returned.\nSupported queries are:\n\u003cul\u003e\n\u003cli\u003eaccountId=\u003ci\u003eaccount_id_string\u003c/i\u003e\n\u003cli\u003ecreativeId=\u003ci\u003ecreative_id_string\u003c/i\u003e\n\u003cli\u003edealsStatus: {approved, conditionally_approved, disapproved,\n not_checked}\n\u003cli\u003eopenAuctionStatus: {approved, conditionally_approved, disapproved,\n not_checked}\n\u003cli\u003eattribute: {a numeric attribute from the list of attributes}\n\u003cli\u003edisapprovalReason: {a reason from DisapprovalReason\n\u003c/ul\u003e\nExample: 'accountId=12345 AND (dealsStatus:disapproved AND disapprovalReason:unacceptable_content) OR attribute:47'", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/creatives", - "path": "v2beta1/accounts/{accountId}/creatives", - "id": "adexchangebuyer2.accounts.creatives.list" - }, - "create": { - "response": { - "$ref": "Creative" - }, - "parameterOrder": [ - "accountId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "duplicateIdMode": { - "location": "query", - "enum": [ - "NO_DUPLICATES", - "FORCE_ENABLE_DUPLICATE_IDS" - ], - "description": "Indicates if multiple creatives can share an ID or not. Default is\nNO_DUPLICATES (one ID per creative).", - "type": "string" - }, - "accountId": { - "location": "path", - "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/creatives", - "id": "adexchangebuyer2.accounts.creatives.create", - "path": "v2beta1/accounts/{accountId}/creatives", - "request": { - "$ref": "Creative" - }, - "description": "Creates a creative." - }, - "stopWatching": { - "request": { - "$ref": "StopWatchingCreativeRequest" - }, - "description": "Stops watching a creative. Will stop push notifications being sent to the\ntopics when the creative changes status.", - "httpMethod": "POST", - "parameterOrder": [ - "accountId", - "creativeId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "creativeId": { - "location": "path", - "description": "The creative ID of the creative to stop notifications for.\nSpecify \"-\" to specify stopping account level notifications.", - "type": "string", - "required": true - }, - "accountId": { - "description": "The account of the creative to stop notifications for.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching", - "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching", - "id": "adexchangebuyer2.accounts.creatives.stopWatching" - } - } - }, - "filterSets": { - "methods": { - "create": { - "request": { - "$ref": "FilterSet" - }, - "description": "Creates the specified filter set for the account with the given account ID.", - "response": { - "$ref": "FilterSet" - }, - "parameterOrder": [ - "accountId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "isTransient": { - "location": "query", - "description": "Whether the filter set is transient, or should be persisted indefinitely.\nBy default, filter sets are not transient.\nIf transient, it will be available for at least 1 hour after creation.", - "type": "boolean" - }, - "accountId": { - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v2beta1/accounts/{accountId}/filterSets", - "id": "adexchangebuyer2.accounts.filterSets.create", - "path": "v2beta1/accounts/{accountId}/filterSets" - }, - "delete": { - "description": "Deletes the requested filter set from the account with the given account\nID.", - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "parameters": { - "accountId": { - "location": "path", - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true - }, - "filterSetId": { - "format": "int64", - "description": "The ID of the filter set to delete.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}", - "id": "adexchangebuyer2.accounts.filterSets.delete" - }, - "list": { - "response": { - "$ref": "ListFilterSetsResponse" - }, - "parameterOrder": [ - "accountId" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilterSetsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.list\nmethod.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer" - }, - "accountId": { - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/filterSets", - "id": "adexchangebuyer2.accounts.filterSets.list", - "path": "v2beta1/accounts/{accountId}/filterSets", - "description": "Lists all filter sets for the account with the given account ID." - }, - "get": { - "httpMethod": "GET", - "response": { - "$ref": "FilterSet" - }, - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "accountId": { - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true, - "location": "path" - }, - "filterSetId": { - "location": "path", - "format": "int64", - "description": "The ID of the filter set to get.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}", - "id": "adexchangebuyer2.accounts.filterSets.get", - "description": "Retrieves the requested filter set for the account with the given account\nID." - } - }, - "resources": { - "filteredBidRequests": { - "methods": { - "list": { - "httpMethod": "GET", - "response": { - "$ref": "ListFilteredBidRequestsResponse" - }, - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "filterSetId": { - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true, - "location": "path" - }, - "pageToken": { - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilteredBidRequestsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBidRequests.list\nmethod.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer" - }, - "accountId": { - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBidRequests", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBidRequests", - "id": "adexchangebuyer2.accounts.filterSets.filteredBidRequests.list", - "description": "List all reasons that caused a bid request not to be sent for an\nimpression, with the number of bid requests not sent for each reason." - } - } - }, - "nonBillableWinningBids": { - "methods": { - "list": { - "id": "adexchangebuyer2.accounts.filterSets.nonBillableWinningBids.list", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/nonBillableWinningBids", - "description": "List all reasons for which winning bids were not billable, with the number\nof bids not billed for each reason.", - "response": { - "$ref": "ListNonBillableWinningBidsResponse" - }, - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "filterSetId": { - "location": "path", - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true - }, - "pageToken": { - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListNonBillableWinningBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.nonBillableWinningBids.list\nmethod.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer" - }, - "accountId": { - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/nonBillableWinningBids" - } - } - }, - "filteredBids": { - "methods": { - "list": { - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids", - "id": "adexchangebuyer2.accounts.filterSets.filteredBids.list", - "description": "List all reasons for which bids were filtered, with the number of bids\nfiltered for each reason.", - "httpMethod": "GET", - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "response": { - "$ref": "ListFilteredBidsResponse" - }, - "parameters": { - "pageToken": { - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilteredBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBids.list\nmethod.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer", - "location": "query" - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true - }, - "filterSetId": { - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids" - } - }, - "resources": { - "creatives": { - "methods": { - "list": { - "description": "List all creatives associated with a specific reason for which bids were\nfiltered, with the number of bids filtered for each creative.", - "httpMethod": "GET", - "parameterOrder": [ - "accountId", - "filterSetId", - "creativeStatusId" - ], - "response": { - "$ref": "ListCreativeStatusBreakdownByCreativeResponse" - }, - "parameters": { - "filterSetId": { - "location": "path", - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true - }, - "pageToken": { - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativeStatusBreakdownByCreativeResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBids.creatives.list\nmethod.", - "type": "string", - "location": "query" - }, - "creativeStatusId": { - "location": "path", - "format": "int32", - "description": "The ID of the creative status for which to retrieve a breakdown by\ncreative.\nSee\n[creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes).", - "type": "integer", - "required": true - }, - "pageSize": { - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer", - "location": "query" - }, - "accountId": { - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/creatives", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/creatives", - "id": "adexchangebuyer2.accounts.filterSets.filteredBids.creatives.list" - } - } - }, - "details": { - "methods": { - "list": { - "id": "adexchangebuyer2.accounts.filterSets.filteredBids.details.list", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/details", - "description": "List all details associated with a specific reason for which bids were\nfiltered, with the number of bids filtered for each detail.", - "response": { - "$ref": "ListCreativeStatusBreakdownByDetailResponse" - }, - "parameterOrder": [ - "accountId", - "filterSetId", - "creativeStatusId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "filterSetId": { - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true, - "location": "path" - }, - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativeStatusBreakdownByDetailResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBids.details.list\nmethod.", - "type": "string" - }, - "creativeStatusId": { - "location": "path", - "format": "int32", - "description": "The ID of the creative status for which to retrieve a breakdown by detail.\nSee\n[creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes).\nDetails are only available for statuses 14, 15, 17, 18, 19, 86, and 87.", - "type": "integer", - "required": true - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer" - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/details" - } - } - } - } - }, - "losingBids": { - "methods": { - "list": { - "description": "List all reasons for which bids lost in the auction, with the number of\nbids that lost for each reason.", - "response": { - "$ref": "ListLosingBidsResponse" - }, - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListLosingBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.losingBids.list\nmethod.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer" - }, - "accountId": { - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true, - "location": "path" - }, - "filterSetId": { - "location": "path", - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/losingBids", - "id": "adexchangebuyer2.accounts.filterSets.losingBids.list", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/losingBids" - } - } - }, - "impressionMetrics": { - "methods": { - "list": { - "response": { - "$ref": "ListImpressionMetricsResponse" - }, - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListImpressionMetricsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.impressionMetrics.list\nmethod.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer" - }, - "accountId": { - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true, - "location": "path" - }, - "filterSetId": { - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/impressionMetrics", - "id": "adexchangebuyer2.accounts.filterSets.impressionMetrics.list", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/impressionMetrics", - "description": "Lists all metrics that are measured in terms of number of impressions." - } - } - }, - "bidMetrics": { - "methods": { - "list": { - "response": { - "$ref": "ListBidMetricsResponse" - }, - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "httpMethod": "GET", - "parameters": { - "filterSetId": { - "location": "path", - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true - }, - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidMetricsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.bidMetrics.list\nmethod.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer", - "location": "query" - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidMetrics", - "id": "adexchangebuyer2.accounts.filterSets.bidMetrics.list", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidMetrics", - "description": "Lists all metrics that are measured in terms of number of bids." - } - } - }, - "bidResponseErrors": { - "methods": { - "list": { - "response": { - "$ref": "ListBidResponseErrorsResponse" - }, - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "pageToken": { - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidResponseErrorsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.bidResponseErrors.list\nmethod.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer", - "location": "query" - }, - "accountId": { - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true, - "location": "path" - }, - "filterSetId": { - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponseErrors", - "id": "adexchangebuyer2.accounts.filterSets.bidResponseErrors.list", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponseErrors", - "description": "List all errors that occurred in bid responses, with the number of bid\nresponses affected for each reason." - } - } - }, - "bidResponsesWithoutBids": { - "methods": { - "list": { - "response": { - "$ref": "ListBidResponsesWithoutBidsResponse" - }, - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidResponsesWithoutBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.bidResponsesWithoutBids.list\nmethod.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer" - }, - "accountId": { - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true, - "location": "path" - }, - "filterSetId": { - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponsesWithoutBids", - "id": "adexchangebuyer2.accounts.filterSets.bidResponsesWithoutBids.list", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponsesWithoutBids", - "description": "List all reasons for which bid responses were considered to have no\napplicable bids, with the number of bid responses affected for each reason." - } - } - } - } - } - } - } - }, - "parameters": { - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "alt": { - "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", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "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.", - "type": "string", - "location": "query" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - } - }, - "version": "v2beta1", - "baseUrl": "https://adexchangebuyer.googleapis.com/", - "servicePath": "", - "kind": "discovery#restDescription", - "description": "Accesses the latest features for managing Ad Exchange accounts, Real-Time Bidding configurations and auction metrics, and Marketplace programmatic deals.", - "basePath": "" + "rootUrl": "https://adexchangebuyer.googleapis.com/" } diff --git a/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go b/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go index 2ad25614f..e1aa12884 100644 --- a/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go +++ b/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go @@ -2172,6 +2172,11 @@ type ListCreativeStatusBreakdownByDetailResponse struct { // see // [ad-product-categories](https://developers.google.com/ad-exchange/ // rtb/downloads/ad-product-categories). + // "DISAPPROVAL_REASON" - Indicates that the detail ID refers to a + // disapproval reason; see + // DisapprovalReason enum in + // [snippet-status-report-proto](https://developers.google.com/ad-exchang + // e/rtb/downloads/snippet-status-report-proto). DetailType string `json:"detailType,omitempty"` // FilteredBidDetailRows: List of rows, with counts of bids with a given @@ -8415,7 +8420,7 @@ func (c *AccountsFilterSetsFilteredBidsDetailsListCall) Do(opts ...googleapi.Cal // "type": "string" // }, // "creativeStatusId": { - // "description": "The ID of the creative status for which to retrieve a breakdown by detail.\nSee\n[creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes).\nDetails are only available for statuses 14, 15, 17, 18, 19, 86, and 87.", + // "description": "The ID of the creative status for which to retrieve a breakdown by detail.\nSee\n[creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes).\nDetails are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87.", // "format": "int32", // "location": "path", // "required": true, diff --git a/vendor/google.golang.org/api/adexperiencereport/v1/adexperiencereport-api.json b/vendor/google.golang.org/api/adexperiencereport/v1/adexperiencereport-api.json index 47b676f76..1a98c33cd 100644 --- a/vendor/google.golang.org/api/adexperiencereport/v1/adexperiencereport-api.json +++ b/vendor/google.golang.org/api/adexperiencereport/v1/adexperiencereport-api.json @@ -1,37 +1,196 @@ { + "ownerDomain": "google.com", + "name": "adexperiencereport", + "batchPath": "batch", + "title": "Google Ad Experience Report API", + "ownerName": "Google", + "resources": { + "sites": { + "methods": { + "get": { + "response": { + "$ref": "SiteSummaryResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "location": "path", + "description": "The required site name. It should be the site property whose ad experiences\nmay have been reviewed, and it should be URL-encoded. For example,\nsites/https%3A%2F%2Fwww.google.com. The server will return an error of\nBAD_REQUEST if this field is not filled in. Note that if the site property\nis not yet verified in Search Console, the reportUrl field returned by the\nAPI will lead to the verification page, prompting the user to go through\nthat process before they can gain access to the Ad Experience Report.", + "type": "string", + "required": true, + "pattern": "^sites/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/xapi.zoo" + ], + "flatPath": "v1/sites/{sitesId}", + "id": "adexperiencereport.sites.get", + "path": "v1/{+name}", + "description": "Gets a summary of the ad experience rating of a site." + } + } + }, + "violatingSites": { + "methods": { + "list": { + "description": "Lists sites with Ad Experience Report statuses of \"Failing\" or \"Warning\".", + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ViolatingSitesResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/xapi.zoo" + ], + "flatPath": "v1/violatingSites", + "path": "v1/violatingSites", + "id": "adexperiencereport.violatingSites.list" + } + } + } + }, + "parameters": { + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "key": { + "location": "query", + "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.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + } + }, + "version": "v1", + "baseUrl": "https://adexperiencereport.googleapis.com/", "kind": "discovery#restDescription", "description": "View Ad Experience Report data, and get a list of sites that have a significant number of annoying ads.", "servicePath": "", "basePath": "", - "revision": "20170731", + "revision": "20170819", "documentationLink": "https://developers.google.com/ad-experience-report/", "id": "adexperiencereport:v1", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "ViolatingSitesResponse": { + "description": "Response message for ListViolatingSites.", + "type": "object", + "properties": { + "violatingSites": { + "description": "A list of summaries of violating sites.", + "items": { + "$ref": "SiteSummaryResponse" + }, + "type": "array" + } + }, + "id": "ViolatingSitesResponse" + }, + "SiteSummaryResponse": { + "description": "Response message for GetSiteSummary.", + "type": "object", + "properties": { + "mobileSummary": { + "$ref": "PlatformSummary", + "description": "Summary for the mobile review of the site." + }, + "reviewedSite": { + "description": "The name of the site reviewed.", + "type": "string" + }, + "desktopSummary": { + "$ref": "PlatformSummary", + "description": "Summary for the desktop review of the site." + } + }, + "id": "SiteSummaryResponse" + }, "PlatformSummary": { "description": "Summary of the ad experience rating of a site for a specific platform.", "type": "object", "properties": { - "lastChangeTime": { - "format": "google-datetime", - "description": "The last time that the site changed status.", - "type": "string" - }, - "egregiousStatus": { - "enumDescriptions": [ - "Not reviewed.", - "Passing.", - "Failing." - ], - "enum": [ - "UNKNOWN", - "PASSING", - "FAILING" - ], - "description": "The status of the site reviewed for egregious ads.", - "type": "string" - }, "betterAdsStatus": { "enumDescriptions": [ "Not reviewed.", @@ -48,12 +207,21 @@ "description": "The status of the site reviewed for the Better Ads Standards.", "type": "string" }, - "region": { + "abusiveStatus": { + "description": "The status of the site reviewed for abusive ads.", + "type": "string", "enumDescriptions": [ - "Ad standard not yet defined for your region.", - "Region A.", - "Region B." + "Not reviewed.", + "Passing.", + "Failing." ], + "enum": [ + "UNKNOWN", + "PASSING", + "FAILING" + ] + }, + "region": { "description": "The assigned regions for the site and platform.", "items": { "type": "string", @@ -63,7 +231,12 @@ "REGION_B" ] }, - "type": "array" + "type": "array", + "enumDescriptions": [ + "Ad standard not yet defined for your region.", + "Region A.", + "Region B." + ] }, "enforcementTime": { "format": "google-datetime", @@ -95,49 +268,21 @@ "reportUrl": { "description": "A link that leads to a full ad experience report.", "type": "string" + }, + "lastChangeTime": { + "format": "google-datetime", + "description": "The last time that the site changed status.", + "type": "string" } }, "id": "PlatformSummary" - }, - "ViolatingSitesResponse": { - "description": "Response message for ListViolatingSites.", - "type": "object", - "properties": { - "violatingSites": { - "description": "A list of summaries of violating sites.", - "items": { - "$ref": "SiteSummaryResponse" - }, - "type": "array" - } - }, - "id": "ViolatingSitesResponse" - }, - "SiteSummaryResponse": { - "description": "Response message for GetSiteSummary.", - "type": "object", - "properties": { - "reviewedSite": { - "description": "The name of the site reviewed.", - "type": "string" - }, - "desktopSummary": { - "$ref": "PlatformSummary", - "description": "Summary for the desktop review of the site." - }, - "mobileSummary": { - "description": "Summary for the mobile review of the site.", - "$ref": "PlatformSummary" - } - }, - "id": "SiteSummaryResponse" } }, - "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, "canonicalName": "Ad Experience Report", "auth": { "oauth2": { @@ -148,150 +293,5 @@ } } }, - "rootUrl": "https://adexperiencereport.googleapis.com/", - "ownerDomain": "google.com", - "name": "adexperiencereport", - "batchPath": "batch", - "title": "Google Ad Experience Report API", - "ownerName": "Google", - "resources": { - "sites": { - "methods": { - "get": { - "description": "Gets a summary of the ad experience rating of a site.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "SiteSummaryResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/xapi.zoo" - ], - "parameters": { - "name": { - "description": "The required site name. It should be the site property whose ad experiences\nmay have been reviewed, and it should be URL encoded. For example,\nhttps%3A%2F%2Fwww.google.com. The server will return an error of\nBAD_REQUEST if this field is not filled in. Note that if the site property\nis not yet verified in Search Console, the reportUrl field returned by the\nAPI will lead to the verification page, prompting the user to go through\nthat process before they can gain access to the Ad Experience Report.", - "type": "string", - "required": true, - "pattern": "^sites/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/sites/{sitesId}", - "path": "v1/{+name}", - "id": "adexperiencereport.sites.get" - } - } - }, - "violatingSites": { - "methods": { - "list": { - "description": "Lists sites with Ad Experience Report statuses of \"Failing\" or \"Warning\".", - "response": { - "$ref": "ViolatingSitesResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/xapi.zoo" - ], - "parameters": {}, - "flatPath": "v1/violatingSites", - "id": "adexperiencereport.violatingSites.list", - "path": "v1/violatingSites" - } - } - } - }, - "parameters": { - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "alt": { - "type": "string", - "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", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ] - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "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.", - "type": "string", - "location": "query" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - } - }, - "version": "v1", - "baseUrl": "https://adexperiencereport.googleapis.com/" + "rootUrl": "https://adexperiencereport.googleapis.com/" } diff --git a/vendor/google.golang.org/api/adexperiencereport/v1/adexperiencereport-gen.go b/vendor/google.golang.org/api/adexperiencereport/v1/adexperiencereport-gen.go index 14578dc77..ea2be9ec5 100644 --- a/vendor/google.golang.org/api/adexperiencereport/v1/adexperiencereport-gen.go +++ b/vendor/google.golang.org/api/adexperiencereport/v1/adexperiencereport-gen.go @@ -99,6 +99,14 @@ type ViolatingSitesService struct { // PlatformSummary: Summary of the ad experience rating of a site for a // specific platform. type PlatformSummary struct { + // AbusiveStatus: The status of the site reviewed for abusive ads. + // + // Possible values: + // "UNKNOWN" - Not reviewed. + // "PASSING" - Passing. + // "FAILING" - Failing. + AbusiveStatus string `json:"abusiveStatus,omitempty"` + // BetterAdsStatus: The status of the site reviewed for the Better Ads // Standards. // @@ -109,14 +117,6 @@ type PlatformSummary struct { // "FAILING" - Failing. BetterAdsStatus string `json:"betterAdsStatus,omitempty"` - // EgregiousStatus: The status of the site reviewed for egregious ads. - // - // Possible values: - // "UNKNOWN" - Not reviewed. - // "PASSING" - Passing. - // "FAILING" - Failing. - EgregiousStatus string `json:"egregiousStatus,omitempty"` - // EnforcementTime: The date on which ad filtering begins. EnforcementTime string `json:"enforcementTime,omitempty"` @@ -147,7 +147,7 @@ type PlatformSummary struct { // UnderReview: Whether the site is currently under review. UnderReview bool `json:"underReview,omitempty"` - // ForceSendFields is a list of field names (e.g. "BetterAdsStatus") to + // ForceSendFields is a list of field names (e.g. "AbusiveStatus") 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 @@ -155,13 +155,12 @@ type PlatformSummary struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BetterAdsStatus") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "AbusiveStatus") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -364,7 +363,7 @@ func (c *SitesGetCall) Do(opts ...googleapi.CallOption) (*SiteSummaryResponse, e // ], // "parameters": { // "name": { - // "description": "The required site name. It should be the site property whose ad experiences\nmay have been reviewed, and it should be URL encoded. For example,\nhttps%3A%2F%2Fwww.google.com. The server will return an error of\nBAD_REQUEST if this field is not filled in. Note that if the site property\nis not yet verified in Search Console, the reportUrl field returned by the\nAPI will lead to the verification page, prompting the user to go through\nthat process before they can gain access to the Ad Experience Report.", + // "description": "The required site name. It should be the site property whose ad experiences\nmay have been reviewed, and it should be URL-encoded. For example,\nsites/https%3A%2F%2Fwww.google.com. The server will return an error of\nBAD_REQUEST if this field is not filled in. Note that if the site property\nis not yet verified in Search Console, the reportUrl field returned by the\nAPI will lead to the verification page, prompting the user to go through\nthat process before they can gain access to the Ad Experience Report.", // "location": "path", // "pattern": "^sites/[^/]+$", // "required": true, diff --git a/vendor/google.golang.org/api/adsense/v1.4/adsense-api.json b/vendor/google.golang.org/api/adsense/v1.4/adsense-api.json index 43d2156c9..53e5bb33e 100644 --- a/vendor/google.golang.org/api/adsense/v1.4/adsense-api.json +++ b/vendor/google.golang.org/api/adsense/v1.4/adsense-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/ZPtwp1J-B1sy3-qRXXf2y9wrQDQ\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/JUHnWdtkgRO5aAK7_Wqm8rZ_rJ8\"", "discoveryVersion": "v1", "id": "adsense:v1.4", "name": "adsense", "canonicalName": "AdSense", "version": "v1.4", - "revision": "20170606", + "revision": "20170910", "title": "AdSense Management API", "description": "Accesses AdSense publishers' inventory and generates performance reports.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/adsensehost/v4.1/adsensehost-api.json b/vendor/google.golang.org/api/adsensehost/v4.1/adsensehost-api.json index 4a8aa51b4..5f76d5269 100644 --- a/vendor/google.golang.org/api/adsensehost/v4.1/adsensehost-api.json +++ b/vendor/google.golang.org/api/adsensehost/v4.1/adsensehost-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/GUIZYIY3cfuYjkhoORNXzoLuN-o\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/QFztQ_ABS3emSn-gE83ENFOi4tE\"", "discoveryVersion": "v1", "id": "adsensehost:v4.1", "name": "adsensehost", "canonicalName": "AdSense Host", "version": "v4.1", - "revision": "20170606", + "revision": "20170910", "title": "AdSense Host API", "description": "Generates performance reports, generates ad codes, and provides publisher management capabilities for AdSense Hosts.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/analytics/v2.4/analytics-api.json b/vendor/google.golang.org/api/analytics/v2.4/analytics-api.json index 0e35423a9..7add3aa62 100644 --- a/vendor/google.golang.org/api/analytics/v2.4/analytics-api.json +++ b/vendor/google.golang.org/api/analytics/v2.4/analytics-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/uF7o_i10s0Ir7WGM7zLi8NwSHXI\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/kYN47VW3boRYzE7pkj4HK3FyEC0\"", "discoveryVersion": "v1", "id": "analytics:v2.4", "name": "analytics", "version": "v2.4", - "revision": "20170321", + "revision": "20170807", "title": "Google Analytics API", "description": "Views and manages your Google Analytics data.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/analytics/v3/analytics-api.json b/vendor/google.golang.org/api/analytics/v3/analytics-api.json index da7d4cb7f..a5e3aecc3 100644 --- a/vendor/google.golang.org/api/analytics/v3/analytics-api.json +++ b/vendor/google.golang.org/api/analytics/v3/analytics-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/-SiQlGIRBbnzY0JcLS-jmuPpVII\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/DSG2TEF18bxTdYooKf_C2-FmmME\"", "discoveryVersion": "v1", "id": "analytics:v3", "name": "analytics", "version": "v3", - "revision": "20170726", + "revision": "20170807", "title": "Google Analytics API", "description": "Views and manages your Google Analytics data.", "ownerDomain": "google.com", @@ -505,6 +505,13 @@ "type": "string" } }, + "schema": { + "type": "array", + "description": "Collection of schema headers of the custom data source.", + "items": { + "type": "string" + } + }, "selfLink": { "type": "string", "description": "Link for this Analytics custom data source." @@ -519,7 +526,8 @@ "format": "date-time" }, "uploadType": { - "type": "string" + "type": "string", + "description": "Upload type of the custom data source." }, "webPropertyId": { "type": "string", @@ -3253,6 +3261,11 @@ "status": { "type": "string", "description": "Upload status. Possible values: PENDING, COMPLETED, FAILED, DELETING, DELETED." + }, + "uploadTime": { + "type": "string", + "description": "Time this file is uploaded.", + "format": "date-time" } } }, diff --git a/vendor/google.golang.org/api/analytics/v3/analytics-gen.go b/vendor/google.golang.org/api/analytics/v3/analytics-gen.go index 5c5efccbf..7b70fb9c7 100644 --- a/vendor/google.golang.org/api/analytics/v3/analytics-gen.go +++ b/vendor/google.golang.org/api/analytics/v3/analytics-gen.go @@ -960,6 +960,9 @@ type CustomDataSource struct { // source. ProfilesLinked []string `json:"profilesLinked,omitempty"` + // Schema: Collection of schema headers of the custom data source. + Schema []string `json:"schema,omitempty"` + // SelfLink: Link for this Analytics custom data source. SelfLink string `json:"selfLink,omitempty"` @@ -969,6 +972,7 @@ type CustomDataSource struct { // Updated: Time this custom data source was last modified. Updated string `json:"updated,omitempty"` + // UploadType: Upload type of the custom data source. UploadType string `json:"uploadType,omitempty"` // WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this @@ -5077,6 +5081,9 @@ type Upload struct { // DELETING, DELETED. Status string `json:"status,omitempty"` + // UploadTime: Time this file is uploaded. + UploadTime string `json:"uploadTime,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -16341,11 +16348,7 @@ type ManagementUploadsUploadDataCall struct { webPropertyId string customDataSourceId string urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater + mediaInfo_ *gensupport.MediaInfo ctx_ context.Context header_ http.Header } @@ -16368,12 +16371,7 @@ func (r *ManagementUploadsService) UploadData(accountId string, webPropertyId st // supplied. // At most one of Media and ResumableMedia may be set. func (c *ManagementUploadsUploadDataCall) Media(r io.Reader, options ...googleapi.MediaOption) *ManagementUploadsUploadDataCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -16388,11 +16386,7 @@ func (c *ManagementUploadsUploadDataCall) Media(r io.Reader, options ...googleap // supersede any context previously provided to the Context method. func (c *ManagementUploadsUploadDataCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ManagementUploadsUploadDataCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -16401,7 +16395,7 @@ func (c *ManagementUploadsUploadDataCall) ResumableMedia(ctx context.Context, r // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *ManagementUploadsUploadDataCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ManagementUploadsUploadDataCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -16441,27 +16435,16 @@ func (c *ManagementUploadsUploadDataCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -16499,20 +16482,10 @@ func (c *ManagementUploadsUploadDataCall) Do(opts ...googleapi.CallOption) (*Upl if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() diff --git a/vendor/google.golang.org/api/analyticsreporting/v4/analyticsreporting-api.json b/vendor/google.golang.org/api/analyticsreporting/v4/analyticsreporting-api.json index aa510e755..8b6e57955 100644 --- a/vendor/google.golang.org/api/analyticsreporting/v4/analyticsreporting-api.json +++ b/vendor/google.golang.org/api/analyticsreporting/v4/analyticsreporting-api.json @@ -1,458 +1,142 @@ { - "revision": "20170705", + "rootUrl": "https://analyticsreporting.googleapis.com/", + "ownerDomain": "google.com", + "name": "analyticsreporting", + "batchPath": "batch", + "title": "Google Analytics Reporting API", + "ownerName": "Google", + "resources": { + "reports": { + "methods": { + "batchGet": { + "description": "Returns the Analytics data.", + "request": { + "$ref": "GetReportsRequest" + }, + "response": { + "$ref": "GetReportsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/analytics", + "https://www.googleapis.com/auth/analytics.readonly" + ], + "flatPath": "v4/reports:batchGet", + "id": "analyticsreporting.reports.batchGet", + "path": "v4/reports:batchGet" + } + } + } + }, + "parameters": { + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "type": "string", + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." + }, + "$.xgafv": { + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ] + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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", + "description": "Data format for response.", + "default": "json" + }, + "key": { + "type": "string", + "location": "query", + "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." + }, + "access_token": { + "type": "string", + "location": "query", + "description": "OAuth access token." + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "bearer_token": { + "type": "string", + "location": "query", + "description": "OAuth bearer token." + }, + "oauth_token": { + "type": "string", + "location": "query", + "description": "OAuth 2.0 token for the current user." + }, + "upload_protocol": { + "type": "string", + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + } + }, + "version": "v4", + "baseUrl": "https://analyticsreporting.googleapis.com/", + "servicePath": "", + "description": "Accesses Analytics report data.", + "kind": "discovery#restDescription", + "basePath": "", "id": "analyticsreporting:v4", "documentationLink": "https://developers.google.com/analytics/devguides/reporting/core/v4/", + "revision": "20170705", "discoveryVersion": "v1", "version_module": "True", "schemas": { - "PivotHeaderEntry": { - "description": "The headers for the each of the metric column corresponding to the metrics\nrequested in the pivots section of the response.", - "type": "object", - "properties": { - "metric": { - "$ref": "MetricHeaderEntry", - "description": "The metric header for the metric in the pivot." - }, - "dimensionNames": { - "description": "The name of the dimensions in the pivot response.", - "items": { - "type": "string" - }, - "type": "array" - }, - "dimensionValues": { - "items": { - "type": "string" - }, - "type": "array", - "description": "The values for the dimensions in the pivot." - } - }, - "id": "PivotHeaderEntry" - }, - "SegmentFilter": { - "description": "SegmentFilter defines the segment to be either a simple or a sequence\nsegment. A simple segment condition contains dimension and metric conditions\nto select the sessions or users. A sequence segment condition can be used to\nselect users or sessions based on sequential conditions.", - "type": "object", - "properties": { - "sequenceSegment": { - "$ref": "SequenceSegment", - "description": "Sequence conditions consist of one or more steps, where each step is\ndefined by one or more dimension/metric conditions. Multiple steps can\nbe combined with special sequence operators." - }, - "not": { - "type": "boolean", - "description": "If true, match the complement of simple or sequence segment.\nFor example, to match all visits not from \"New York\", we can define the\nsegment as follows:\n\n \"sessionSegment\": {\n \"segmentFilters\": [{\n \"simpleSegment\" :{\n \"orFiltersForSegment\": [{\n \"segmentFilterClauses\":[{\n \"dimensionFilter\": {\n \"dimensionName\": \"ga:city\",\n \"expressions\": [\"New York\"]\n }\n }]\n }]\n },\n \"not\": \"True\"\n }]\n }," - }, - "simpleSegment": { - "description": "A Simple segment conditions consist of one or more dimension/metric\nconditions that can be combined", - "$ref": "SimpleSegment" - } - }, - "id": "SegmentFilter" - }, - "SegmentDefinition": { - "description": "SegmentDefinition defines the segment to be a set of SegmentFilters which\nare combined together with a logical `AND` operation.", - "type": "object", - "properties": { - "segmentFilters": { - "description": "A segment is defined by a set of segment filters which are combined\ntogether with a logical `AND` operation.", - "items": { - "$ref": "SegmentFilter" - }, - "type": "array" - } - }, - "id": "SegmentDefinition" - }, - "MetricHeaderEntry": { - "type": "object", - "properties": { - "name": { - "description": "The name of the header.", - "type": "string" - }, - "type": { - "enumDescriptions": [ - "Metric type is unspecified.", - "Integer metric.", - "Float metric.", - "Currency metric.", - "Percentage metric.", - "Time metric in `HH:MM:SS` format." - ], - "enum": [ - "METRIC_TYPE_UNSPECIFIED", - "INTEGER", - "FLOAT", - "CURRENCY", - "PERCENT", - "TIME" - ], - "description": "The type of the metric, for example `INTEGER`.", - "type": "string" - } - }, - "id": "MetricHeaderEntry", - "description": "Header for the metrics." - }, - "ReportData": { - "type": "object", - "properties": { - "samplingSpaceSizes": { - "description": "If the results are\n[sampled](https://support.google.com/analytics/answer/2637192),\nthis returns the total number of\nsamples present, one entry per date range. If the results are not sampled\nthis field will not be defined. See\n[developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)\nfor details.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "minimums": { - "description": "Minimum and maximum values seen over all matching rows. These are both\nempty when `hideValueRanges` in the request is false, or when\nrowCount is zero.", - "items": { - "$ref": "DateRangeValues" - }, - "type": "array" - }, - "totals": { - "description": "For each requested date range, for the set of all rows that match\nthe query, every requested value format gets a total. The total\nfor a value format is computed by first totaling the metrics\nmentioned in the value format and then evaluating the value\nformat as a scalar expression. E.g., The \"totals\" for\n`3 / (ga:sessions + 2)` we compute\n`3 / ((sum of all relevant ga:sessions) + 2)`.\nTotals are computed before pagination.", - "items": { - "$ref": "DateRangeValues" - }, - "type": "array" - }, - "samplesReadCounts": { - "description": "If the results are\n[sampled](https://support.google.com/analytics/answer/2637192),\nthis returns the total number of samples read, one entry per date range.\nIf the results are not sampled this field will not be defined. See\n[developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)\nfor details.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "isDataGolden": { - "type": "boolean", - "description": "Indicates if response to this request is golden or not. Data is\ngolden when the exact same request will not produce any new results if\nasked at a later point in time." - }, - "rows": { - "description": "There's one ReportRow for every unique combination of dimensions.", - "items": { - "$ref": "ReportRow" - }, - "type": "array" - }, - "rowCount": { - "format": "int32", - "description": "Total number of matching rows for this query.", - "type": "integer" - }, - "dataLastRefreshed": { - "format": "google-datetime", - "description": "The last time the data in the report was refreshed. All the hits received\nbefore this timestamp are included in the calculation of the report.", - "type": "string" - }, - "maximums": { - "description": "Minimum and maximum values seen over all matching rows. These are both\nempty when `hideValueRanges` in the request is false, or when\nrowCount is zero.", - "items": { - "$ref": "DateRangeValues" - }, - "type": "array" - } - }, - "id": "ReportData", - "description": "The data part of the report." - }, - "DimensionFilter": { - "description": "Dimension filter specifies the filtering options on a dimension.", - "type": "object", - "properties": { - "expressions": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Strings or regular expression to match against. Only the first value of\nthe list is used for comparison unless the operator is `IN_LIST`.\nIf `IN_LIST` operator, then the entire list is used to filter the\ndimensions as explained in the description of the `IN_LIST` operator." - }, - "not": { - "description": "Logical `NOT` operator. If this boolean is set to true, then the matching\ndimension values will be excluded in the report. The default is false.", - "type": "boolean" - }, - "caseSensitive": { - "description": "Should the match be case sensitive? Default is false.", - "type": "boolean" - }, - "operator": { - "enum": [ - "OPERATOR_UNSPECIFIED", - "REGEXP", - "BEGINS_WITH", - "ENDS_WITH", - "PARTIAL", - "EXACT", - "NUMERIC_EQUAL", - "NUMERIC_GREATER_THAN", - "NUMERIC_LESS_THAN", - "IN_LIST" - ], - "description": "How to match the dimension to the expression. The default is REGEXP.", - "type": "string", - "enumDescriptions": [ - "If the match type is unspecified, it is treated as a `REGEXP`.", - "The match expression is treated as a regular expression. All match types\nare not treated as regular expressions.", - "Matches the value which begin with the match expression provided.", - "Matches the values which end with the match expression provided.", - "Substring match.", - "The value should match the match expression entirely.", - "Integer comparison filters.\ncase sensitivity is ignored for these and the expression\nis assumed to be a string representing an integer.\nFailure conditions:\n\n- If expression is not a valid int64, the client should expect\n an error.\n- Input dimensions that are not valid int64 values will never match the\n filter.", - "Checks if the dimension is numerically greater than the match\nexpression. Read the description for `NUMERIC_EQUALS` for restrictions.", - "Checks if the dimension is numerically less than the match expression.\nRead the description for `NUMERIC_EQUALS` for restrictions.", - "This option is used to specify a dimension filter whose expression can\ntake any value from a selected list of values. This helps avoiding\nevaluating multiple exact match dimension filters which are OR'ed for\nevery single response row. For example:\n\n expressions: [\"A\", \"B\", \"C\"]\n\nAny response row whose dimension has it is value as A, B or C, matches\nthis DimensionFilter." - ] - }, - "dimensionName": { - "description": "The dimension to filter on. A DimensionFilter must contain a dimension.", - "type": "string" - } - }, - "id": "DimensionFilter" - }, - "Segment": { - "properties": { - "dynamicSegment": { - "description": "A dynamic segment definition in the request.", - "$ref": "DynamicSegment" - }, - "segmentId": { - "description": "The segment ID of a built-in or custom segment, for example `gaid::-3`.", - "type": "string" - } - }, - "id": "Segment", - "description": "The segment definition, if the report needs to be segmented.\nA Segment is a subset of the Analytics data. For example, of the entire\nset of users, one Segment might be users from a particular country or city.", - "type": "object" - }, - "OrderBy": { - "properties": { - "orderType": { - "enumDescriptions": [ - "Unspecified order type will be treated as sort based on value.", - "The sort order is based on the value of the chosen column; looks only at\nthe first date range.", - "The sort order is based on the difference of the values of the chosen\ncolumn between the first two date ranges. Usable only if there are\nexactly two date ranges.", - "The sort order is based on weighted value of the chosen column. If\ncolumn has n/d format, then weighted value of this ratio will\nbe `(n + totals.n)/(d + totals.d)` Usable only for metrics that\nrepresent ratios.", - "Histogram order type is applicable only to dimension columns with\nnon-empty histogram-buckets.", - "If the dimensions are fixed length numbers, ordinary sort would just\nwork fine. `DIMENSION_AS_INTEGER` can be used if the dimensions are\nvariable length numbers." - ], - "enum": [ - "ORDER_TYPE_UNSPECIFIED", - "VALUE", - "DELTA", - "SMART", - "HISTOGRAM_BUCKET", - "DIMENSION_AS_INTEGER" - ], - "description": "The order type. The default orderType is `VALUE`.", - "type": "string" - }, - "fieldName": { - "description": "The field which to sort by. The default sort order is ascending. Example:\n`ga:browser`.\nNote, that you can only specify one field for sort here. For example,\n`ga:browser, ga:city` is not valid.", - "type": "string" - }, - "sortOrder": { - "enum": [ - "SORT_ORDER_UNSPECIFIED", - "ASCENDING", - "DESCENDING" - ], - "description": "The sorting order for the field.", - "type": "string", - "enumDescriptions": [ - "If the sort order is unspecified, the default is ascending.", - "Ascending sort. The field will be sorted in an ascending manner.", - "Descending sort. The field will be sorted in a descending manner." - ] - } - }, - "id": "OrderBy", - "description": "Specifies the sorting options.", - "type": "object" - }, - "SegmentDimensionFilter": { - "description": "Dimension filter specifies the filtering options on a dimension.", - "type": "object", - "properties": { - "minComparisonValue": { - "description": "Minimum comparison values for `BETWEEN` match type.", - "type": "string" - }, - "maxComparisonValue": { - "description": "Maximum comparison values for `BETWEEN` match type.", - "type": "string" - }, - "dimensionName": { - "description": "Name of the dimension for which the filter is being applied.", - "type": "string" - }, - "operator": { - "type": "string", - "enumDescriptions": [ - "If the match type is unspecified, it is treated as a REGEXP.", - "The match expression is treated as a regular expression. All other match\ntypes are not treated as regular expressions.", - "Matches the values which begin with the match expression provided.", - "Matches the values which end with the match expression provided.", - "Substring match.", - "The value should match the match expression entirely.", - "This option is used to specify a dimension filter whose expression can\ntake any value from a selected list of values. This helps avoiding\nevaluating multiple exact match dimension filters which are OR'ed for\nevery single response row. For example:\n\n expressions: [\"A\", \"B\", \"C\"]\n\nAny response row whose dimension has it is value as A, B or C, matches\nthis DimensionFilter.", - "Integer comparison filters.\ncase sensitivity is ignored for these and the expression\nis assumed to be a string representing an integer.\nFailure conditions:\n\n- if expression is not a valid int64, the client should expect\n an error.\n- input dimensions that are not valid int64 values will never match the\n filter.\n\nChecks if the dimension is numerically less than the match expression.", - "Checks if the dimension is numerically greater than the match\nexpression.", - "Checks if the dimension is numerically between the minimum and maximum\nof the match expression, boundaries excluded." - ], - "enum": [ - "OPERATOR_UNSPECIFIED", - "REGEXP", - "BEGINS_WITH", - "ENDS_WITH", - "PARTIAL", - "EXACT", - "IN_LIST", - "NUMERIC_LESS_THAN", - "NUMERIC_GREATER_THAN", - "NUMERIC_BETWEEN" - ], - "description": "The operator to use to match the dimension with the expressions." - }, - "expressions": { - "description": "The list of expressions, only the first element is used for all operators", - "items": { - "type": "string" - }, - "type": "array" - }, - "caseSensitive": { - "description": "Should the match be case sensitive, ignored for `IN_LIST` operator.", - "type": "boolean" - } - }, - "id": "SegmentDimensionFilter" - }, - "SegmentSequenceStep": { - "description": "A segment sequence definition.", - "type": "object", - "properties": { - "orFiltersForSegment": { - "description": "A sequence is specified with a list of Or grouped filters which are\ncombined with `AND` operator.", - "items": { - "$ref": "OrFiltersForSegment" - }, - "type": "array" - }, - "matchType": { - "enumDescriptions": [ - "Unspecified match type is treated as precedes.", - "Operator indicates that the previous step precedes the next step.", - "Operator indicates that the previous step immediately precedes the next\nstep." - ], - "enum": [ - "UNSPECIFIED_MATCH_TYPE", - "PRECEDES", - "IMMEDIATELY_PRECEDES" - ], - "description": "Specifies if the step immediately precedes or can be any time before the\nnext step.", - "type": "string" - } - }, - "id": "SegmentSequenceStep" - }, - "Metric": { - "description": "[Metrics](https://support.google.com/analytics/answer/1033861)\nare the quantitative measurements. For example, the metric `ga:users`\nindicates the total number of users for the requested time period.", - "type": "object", - "properties": { - "formattingType": { - "description": "Specifies how the metric expression should be formatted, for example\n`INTEGER`.", - "type": "string", - "enumDescriptions": [ - "Metric type is unspecified.", - "Integer metric.", - "Float metric.", - "Currency metric.", - "Percentage metric.", - "Time metric in `HH:MM:SS` format." - ], - "enum": [ - "METRIC_TYPE_UNSPECIFIED", - "INTEGER", - "FLOAT", - "CURRENCY", - "PERCENT", - "TIME" - ] - }, - "alias": { - "type": "string", - "description": "An alias for the metric expression is an alternate name for the\nexpression. The alias can be used for filtering and sorting. This field\nis optional and is useful if the expression is not a single metric but\na complex expression which cannot be used in filtering and sorting.\nThe alias is also used in the response column header." - }, - "expression": { - "description": "A metric expression in the request. An expression is constructed from one\nor more metrics and numbers. Accepted operators include: Plus (+), Minus\n(-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis,\nPositive cardinal numbers (0-9), can include decimals and is limited to\n1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the\nmetric expression is just a single metric name like `ga:users`.\nAdding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics\nwill result in unexpected results.", - "type": "string" - } - }, - "id": "Metric" - }, - "PivotValueRegion": { - "description": "The metric values in the pivot region.", - "type": "object", - "properties": { - "values": { - "description": "The values of the metrics in each of the pivot regions.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "PivotValueRegion" - }, - "Report": { - "id": "Report", - "description": "The data response corresponding to the request.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Page token to retrieve the next page of results in the list.", - "type": "string" - }, - "data": { - "$ref": "ReportData", - "description": "Response data." - }, - "columnHeader": { - "$ref": "ColumnHeader", - "description": "The column headers." - } - } - }, - "PivotHeader": { - "properties": { - "pivotHeaderEntries": { - "description": "A single pivot section header.", - "items": { - "$ref": "PivotHeaderEntry" - }, - "type": "array" - }, - "totalPivotGroupsCount": { - "format": "int32", - "description": "The total number of groups for this pivot.", - "type": "integer" - } - }, - "id": "PivotHeader", - "description": "The headers for each of the pivot sections defined in the request.", - "type": "object" - }, "DateRange": { "description": "A contiguous set of days: startDate, startDate + 1 day, ..., endDate.\nThe start and end dates are specified in\n[ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.", "type": "object", "properties": { "endDate": { - "description": "The end date for the query in the format `YYYY-MM-DD`.", - "type": "string" + "type": "string", + "description": "The end date for the query in the format `YYYY-MM-DD`." }, "startDate": { "description": "The start date for the query in the format `YYYY-MM-DD`.", @@ -472,21 +156,21 @@ "type": "array" }, "pageSize": { + "type": "integer", "format": "int32", - "description": "Page size is for paging and specifies the maximum number of returned rows.\nPage size should be \u003e= 0. A query returns the default of 1,000 rows.\nThe Analytics Core Reporting API returns a maximum of 10,000 rows per\nrequest, no matter how many you ask for. It can also return fewer rows\nthan requested, if there aren't as many dimension segments as you expect.\nFor instance, there are fewer than 300 possible values for `ga:country`,\nso when segmenting only by country, you can't get more than 300 rows,\neven if you set `pageSize` to a higher value.", - "type": "integer" + "description": "Page size is for paging and specifies the maximum number of returned rows.\nPage size should be \u003e= 0. A query returns the default of 1,000 rows.\nThe Analytics Core Reporting API returns a maximum of 10,000 rows per\nrequest, no matter how many you ask for. It can also return fewer rows\nthan requested, if there aren't as many dimension segments as you expect.\nFor instance, there are fewer than 300 possible values for `ga:country`,\nso when segmenting only by country, you can't get more than 300 rows,\neven if you set `pageSize` to a higher value." + }, + "hideTotals": { + "type": "boolean", + "description": "If set to true, hides the total of all metrics for all the matching rows,\nfor every date range. The default false and will return the totals." }, "hideValueRanges": { "description": "If set to true, hides the minimum and maximum across all matching rows.\nThe default is false and the value ranges are returned.", "type": "boolean" }, - "hideTotals": { - "description": "If set to true, hides the total of all metrics for all the matching rows,\nfor every date range. The default false and will return the totals.", - "type": "boolean" - }, "filtersExpression": { - "description": "Dimension or metric filters that restrict the data returned for your\nrequest. To use the `filtersExpression`, supply a dimension or metric on\nwhich to filter, followed by the filter expression. For example, the\nfollowing expression selects `ga:browser` dimension which starts with\nFirefox; `ga:browser=~^Firefox`. For more information on dimensions\nand metric filters, see\n[Filters reference](https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters).", - "type": "string" + "type": "string", + "description": "Dimension or metric filters that restrict the data returned for your\nrequest. To use the `filtersExpression`, supply a dimension or metric on\nwhich to filter, followed by the filter expression. For example, the\nfollowing expression selects `ga:browser` dimension which starts with\nFirefox; `ga:browser=~^Firefox`. For more information on dimensions\nand metric filters, see\n[Filters reference](https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters)." }, "cohortGroup": { "$ref": "CohortGroup", @@ -504,18 +188,18 @@ "type": "array" }, "dimensionFilterClauses": { - "description": "The dimension filter clauses for filtering Dimension Values. They are\nlogically combined with the `AND` operator. Note that filtering occurs\nbefore any dimensions are aggregated, so that the returned metrics\nrepresent the total for only the relevant dimensions.", "items": { "$ref": "DimensionFilterClause" }, - "type": "array" + "type": "array", + "description": "The dimension filter clauses for filtering Dimension Values. They are\nlogically combined with the `AND` operator. Note that filtering occurs\nbefore any dimensions are aggregated, so that the returned metrics\nrepresent the total for only the relevant dimensions." }, "orderBys": { - "description": "Sort order on output rows. To compare two rows, the elements of the\nfollowing are applied in order until a difference is found. All date\nranges in the output get the same row order.", "items": { "$ref": "OrderBy" }, - "type": "array" + "type": "array", + "description": "Sort order on output rows. To compare two rows, the elements of the\nfollowing are applied in order until a difference is found. All date\nranges in the output get the same row order." }, "segments": { "description": "Segment the data returned for the request. A segment definition helps look\nat a subset of the segment request. A request can contain up to four\nsegments. Every [ReportRequest](#ReportRequest) within a\n`batchGet` method must contain the same `segments` definition. Requests\nwith segments must have the `ga:segment` dimension.", @@ -548,26 +232,26 @@ "type": "array" }, "dateRanges": { - "description": "Date ranges in the request. The request can have a maximum of 2 date\nranges. The response will contain a set of metric values for each\ncombination of the dimensions for each date range in the request. So, if\nthere are two date ranges, there will be two set of metric values, one for\nthe original date range and one for the second date range.\nThe `reportRequest.dateRanges` field should not be specified for cohorts\nor Lifetime value requests.\nIf a date range is not provided, the default date range is (startDate:\ncurrent date - 7 days, endDate: current date - 1 day). Every\n[ReportRequest](#ReportRequest) within a `batchGet` method must\ncontain the same `dateRanges` definition.", "items": { "$ref": "DateRange" }, - "type": "array" + "type": "array", + "description": "Date ranges in the request. The request can have a maximum of 2 date\nranges. The response will contain a set of metric values for each\ncombination of the dimensions for each date range in the request. So, if\nthere are two date ranges, there will be two set of metric values, one for\nthe original date range and one for the second date range.\nThe `reportRequest.dateRanges` field should not be specified for cohorts\nor Lifetime value requests.\nIf a date range is not provided, the default date range is (startDate:\ncurrent date - 7 days, endDate: current date - 1 day). Every\n[ReportRequest](#ReportRequest) within a `batchGet` method must\ncontain the same `dateRanges` definition." }, "pageToken": { - "description": "A continuation token to get the next page of the results. Adding this to\nthe request will return the rows after the pageToken. The pageToken should\nbe the value returned in the nextPageToken parameter in the response to\nthe GetReports request.", - "type": "string" + "type": "string", + "description": "A continuation token to get the next page of the results. Adding this to\nthe request will return the rows after the pageToken. The pageToken should\nbe the value returned in the nextPageToken parameter in the response to\nthe GetReports request." }, "pivots": { - "description": "The pivot definitions. Requests can have a maximum of 2 pivots.", "items": { "$ref": "Pivot" }, - "type": "array" + "type": "array", + "description": "The pivot definitions. Requests can have a maximum of 2 pivots." }, "includeEmptyRows": { - "description": "If set to false, the response does not include rows if all the retrieved\nmetrics are equal to zero. The default is false which will exclude these\nrows.", - "type": "boolean" + "type": "boolean", + "description": "If set to false, the response does not include rows if all the retrieved\nmetrics are equal to zero. The default is false which will exclude these\nrows." } }, "id": "ReportRequest", @@ -577,23 +261,11 @@ "description": "MetricFilter specifies the filter on a metric.", "type": "object", "properties": { - "metricName": { - "description": "The metric that will be filtered on. A metricFilter must contain a metric\nname. A metric name can be an alias earlier defined as a metric or it can\nalso be a metric expression.", - "type": "string" - }, "comparisonValue": { - "description": "The value to compare against.", - "type": "string" + "type": "string", + "description": "The value to compare against." }, "operator": { - "enum": [ - "OPERATOR_UNSPECIFIED", - "EQUAL", - "LESS_THAN", - "GREATER_THAN", - "IS_MISSING" - ], - "description": "Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the\ncomparisonValue, the default is `EQUAL`. If the operator is\n`IS_MISSING`, checks if the metric is missing and would ignore the\ncomparisonValue.", "type": "string", "enumDescriptions": [ "If the operator is not specified, it is treated as `EQUAL`.", @@ -601,54 +273,49 @@ "Should the value of the metric be less than to the comparison value.", "Should the value of the metric be greater than to the comparison value.", "Validates if the metric is missing.\nDoesn't take comparisonValue into account." - ] + ], + "enum": [ + "OPERATOR_UNSPECIFIED", + "EQUAL", + "LESS_THAN", + "GREATER_THAN", + "IS_MISSING" + ], + "description": "Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the\ncomparisonValue, the default is `EQUAL`. If the operator is\n`IS_MISSING`, checks if the metric is missing and would ignore the\ncomparisonValue." }, "not": { - "type": "boolean", - "description": "Logical `NOT` operator. If this boolean is set to true, then the matching\nmetric values will be excluded in the report. The default is false." + "description": "Logical `NOT` operator. If this boolean is set to true, then the matching\nmetric values will be excluded in the report. The default is false.", + "type": "boolean" + }, + "metricName": { + "type": "string", + "description": "The metric that will be filtered on. A metricFilter must contain a metric\nname. A metric name can be an alias earlier defined as a metric or it can\nalso be a metric expression." } }, "id": "MetricFilter" }, "Dimension": { - "description": "[Dimensions](https://support.google.com/analytics/answer/1033861)\nare attributes of your data. For example, the dimension `ga:city`\nindicates the city, for example, \"Paris\" or \"New York\", from which\na session originates.", "type": "object", "properties": { "histogramBuckets": { - "description": "If non-empty, we place dimension values into buckets after string to\nint64. Dimension values that are not the string representation of an\nintegral value will be converted to zero. The bucket values have to be in\nincreasing order. Each bucket is closed on the lower end, and open on the\nupper end. The \"first\" bucket includes all values less than the first\nboundary, the \"last\" bucket includes all values up to infinity. Dimension\nvalues that fall in a bucket get transformed to a new dimension value. For\nexample, if one gives a list of \"0, 1, 3, 4, 7\", then we return the\nfollowing buckets:\n\n- bucket #1: values \u003c 0, dimension value \"\u003c0\"\n- bucket #2: values in [0,1), dimension value \"0\"\n- bucket #3: values in [1,3), dimension value \"1-2\"\n- bucket #4: values in [3,4), dimension value \"3\"\n- bucket #5: values in [4,7), dimension value \"4-6\"\n- bucket #6: values \u003e= 7, dimension value \"7+\"\n\nNOTE: If you are applying histogram mutation on any dimension, and using\nthat dimension in sort, you will want to use the sort type\n`HISTOGRAM_BUCKET` for that purpose. Without that the dimension values\nwill be sorted according to dictionary\n(lexicographic) order. For example the ascending dictionary order is:\n\n \"\u003c50\", \"1001+\", \"121-1000\", \"50-120\"\n\nAnd the ascending `HISTOGRAM_BUCKET` order is:\n\n \"\u003c50\", \"50-120\", \"121-1000\", \"1001+\"\n\nThe client has to explicitly request `\"orderType\": \"HISTOGRAM_BUCKET\"`\nfor a histogram-mutated dimension.", "items": { "format": "int64", "type": "string" }, - "type": "array" + "type": "array", + "description": "If non-empty, we place dimension values into buckets after string to\nint64. Dimension values that are not the string representation of an\nintegral value will be converted to zero. The bucket values have to be in\nincreasing order. Each bucket is closed on the lower end, and open on the\nupper end. The \"first\" bucket includes all values less than the first\nboundary, the \"last\" bucket includes all values up to infinity. Dimension\nvalues that fall in a bucket get transformed to a new dimension value. For\nexample, if one gives a list of \"0, 1, 3, 4, 7\", then we return the\nfollowing buckets:\n\n- bucket #1: values \u003c 0, dimension value \"\u003c0\"\n- bucket #2: values in [0,1), dimension value \"0\"\n- bucket #3: values in [1,3), dimension value \"1-2\"\n- bucket #4: values in [3,4), dimension value \"3\"\n- bucket #5: values in [4,7), dimension value \"4-6\"\n- bucket #6: values \u003e= 7, dimension value \"7+\"\n\nNOTE: If you are applying histogram mutation on any dimension, and using\nthat dimension in sort, you will want to use the sort type\n`HISTOGRAM_BUCKET` for that purpose. Without that the dimension values\nwill be sorted according to dictionary\n(lexicographic) order. For example the ascending dictionary order is:\n\n \"\u003c50\", \"1001+\", \"121-1000\", \"50-120\"\n\nAnd the ascending `HISTOGRAM_BUCKET` order is:\n\n \"\u003c50\", \"50-120\", \"121-1000\", \"1001+\"\n\nThe client has to explicitly request `\"orderType\": \"HISTOGRAM_BUCKET\"`\nfor a histogram-mutated dimension." }, "name": { "description": "Name of the dimension to fetch, for example `ga:browser`.", "type": "string" } }, - "id": "Dimension" - }, - "SimpleSegment": { - "properties": { - "orFiltersForSegment": { - "description": "A list of segment filters groups which are combined with logical `AND`\noperator.", - "items": { - "$ref": "OrFiltersForSegment" - }, - "type": "array" - } - }, - "id": "SimpleSegment", - "description": "A Simple segment conditions consist of one or more dimension/metric\nconditions that can be combined.", - "type": "object" + "id": "Dimension", + "description": "[Dimensions](https://support.google.com/analytics/answer/1033861)\nare attributes of your data. For example, the dimension `ga:city`\nindicates the city, for example, \"Paris\" or \"New York\", from which\na session originates." }, "DynamicSegment": { + "type": "object", "properties": { - "name": { - "description": "The name of the dynamic segment.", - "type": "string" - }, "userSegment": { "$ref": "SegmentDefinition", "description": "User Segment to select users to include in the segment." @@ -656,29 +323,46 @@ "sessionSegment": { "$ref": "SegmentDefinition", "description": "Session Segment to select sessions to include in the segment." + }, + "name": { + "description": "The name of the dynamic segment.", + "type": "string" } }, "id": "DynamicSegment", - "description": "Dynamic segment definition for defining the segment within the request.\nA segment can select users, sessions or both.", - "type": "object" + "description": "Dynamic segment definition for defining the segment within the request.\nA segment can select users, sessions or both." + }, + "SimpleSegment": { + "type": "object", + "properties": { + "orFiltersForSegment": { + "items": { + "$ref": "OrFiltersForSegment" + }, + "type": "array", + "description": "A list of segment filters groups which are combined with logical `AND`\noperator." + } + }, + "id": "SimpleSegment", + "description": "A Simple segment conditions consist of one or more dimension/metric\nconditions that can be combined." }, "ColumnHeader": { - "id": "ColumnHeader", "description": "Column headers.", "type": "object", "properties": { + "metricHeader": { + "$ref": "MetricHeader", + "description": "Metric headers for the metrics in the response." + }, "dimensions": { - "description": "The dimension names in the response.", "items": { "type": "string" }, - "type": "array" - }, - "metricHeader": { - "description": "Metric headers for the metrics in the response.", - "$ref": "MetricHeader" + "type": "array", + "description": "The dimension names in the response." } - } + }, + "id": "ColumnHeader" }, "SegmentFilterClause": { "description": "Filter Clause to be used in a segment definition, can be wither a metric or\na dimension filter.", @@ -689,63 +373,63 @@ "description": "Metric Filter for the segment definition." }, "not": { - "description": "Matches the complement (`!`) of the filter.", - "type": "boolean" + "type": "boolean", + "description": "Matches the complement (`!`) of the filter." }, "dimensionFilter": { - "description": "Dimension Filter for the segment definition.", - "$ref": "SegmentDimensionFilter" + "$ref": "SegmentDimensionFilter", + "description": "Dimension Filter for the segment definition." } }, "id": "SegmentFilterClause" }, "ReportRow": { + "description": "A row in the report.", "type": "object", "properties": { "metrics": { - "description": "List of metrics for each requested DateRange.", "items": { "$ref": "DateRangeValues" }, - "type": "array" + "type": "array", + "description": "List of metrics for each requested DateRange." }, "dimensions": { + "description": "List of requested dimensions.", "items": { "type": "string" }, - "type": "array", - "description": "List of requested dimensions." + "type": "array" } }, - "id": "ReportRow", - "description": "A row in the report." + "id": "ReportRow" }, "Cohort": { - "id": "Cohort", - "description": "Defines a cohort. A cohort is a group of users who share a common\ncharacteristic. For example, all users with the same acquisition date\nbelong to the same cohort.", "type": "object", "properties": { + "dateRange": { + "$ref": "DateRange", + "description": "This is used for `FIRST_VISIT_DATE` cohort, the cohort selects users\nwhose first visit date is between start date and end date defined in the\nDateRange. The date ranges should be aligned for cohort requests. If the\nrequest contains `ga:cohortNthDay` it should be exactly one day long,\nif `ga:cohortNthWeek` it should be aligned to the week boundary (starting\nat Sunday and ending Saturday), and for `ga:cohortNthMonth` the date range\nshould be aligned to the month (starting at the first and ending on the\nlast day of the month).\nFor LTV requests there are no such restrictions.\nYou do not need to supply a date range for the\n`reportsRequest.dateRanges` field." + }, + "name": { + "type": "string", + "description": "A unique name for the cohort. If not defined name will be auto-generated\nwith values cohort_[1234...]." + }, "type": { - "enum": [ - "UNSPECIFIED_COHORT_TYPE", - "FIRST_VISIT_DATE" - ], - "description": "Type of the cohort. The only supported type as of now is\n`FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated\nas `FIRST_VISIT_DATE` type cohort.", "type": "string", "enumDescriptions": [ "If unspecified it's treated as `FIRST_VISIT_DATE`.", "Cohorts that are selected based on first visit date." - ] - }, - "dateRange": { - "description": "This is used for `FIRST_VISIT_DATE` cohort, the cohort selects users\nwhose first visit date is between start date and end date defined in the\nDateRange. The date ranges should be aligned for cohort requests. If the\nrequest contains `ga:cohortNthDay` it should be exactly one day long,\nif `ga:cohortNthWeek` it should be aligned to the week boundary (starting\nat Sunday and ending Saturday), and for `ga:cohortNthMonth` the date range\nshould be aligned to the month (starting at the first and ending on the\nlast day of the month).\nFor LTV requests there are no such restrictions.\nYou do not need to supply a date range for the\n`reportsRequest.dateRanges` field.", - "$ref": "DateRange" - }, - "name": { - "description": "A unique name for the cohort. If not defined name will be auto-generated\nwith values cohort_[1234...].", - "type": "string" + ], + "enum": [ + "UNSPECIFIED_COHORT_TYPE", + "FIRST_VISIT_DATE" + ], + "description": "Type of the cohort. The only supported type as of now is\n`FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated\nas `FIRST_VISIT_DATE` type cohort." } - } + }, + "id": "Cohort", + "description": "Defines a cohort. A cohort is a group of users who share a common\ncharacteristic. For example, all users with the same acquisition date\nbelong to the same cohort." }, "MetricFilterClause": { "description": "Represents a group of metric filters.\nSet the operator value to specify how the filters are logically combined.", @@ -759,24 +443,23 @@ "type": "array" }, "operator": { + "enum": [ + "OPERATOR_UNSPECIFIED", + "OR", + "AND" + ], "description": "The operator for combining multiple metric filters. If unspecified, it is\ntreated as an `OR`.", "type": "string", "enumDescriptions": [ "Unspecified operator. It is treated as an `OR`.", "The logical `OR` operator.", "The logical `AND` operator." - ], - "enum": [ - "OPERATOR_UNSPECIFIED", - "OR", - "AND" ] } }, "id": "MetricFilterClause" }, "OrFiltersForSegment": { - "description": "A list of segment filters in the `OR` group are combined with the logical OR\noperator.", "type": "object", "properties": { "segmentFilterClauses": { @@ -787,25 +470,26 @@ "description": "List of segment filters to be combined with a `OR` operator." } }, - "id": "OrFiltersForSegment" + "id": "OrFiltersForSegment", + "description": "A list of segment filters in the `OR` group are combined with the logical OR\noperator." }, "MetricHeader": { "description": "The headers for the metrics.", "type": "object", "properties": { - "metricHeaderEntries": { - "description": "Headers for the metrics in the response.", - "items": { - "$ref": "MetricHeaderEntry" - }, - "type": "array" - }, "pivotHeaders": { "description": "Headers for the pivots in the response.", "items": { "$ref": "PivotHeader" }, "type": "array" + }, + "metricHeaderEntries": { + "items": { + "$ref": "MetricHeaderEntry" + }, + "type": "array", + "description": "Headers for the metrics in the response." } }, "id": "MetricHeader" @@ -815,13 +499,14 @@ "type": "object", "properties": { "filters": { - "description": "The repeated set of filters. They are logically combined based on the\noperator specified.", "items": { "$ref": "DimensionFilter" }, - "type": "array" + "type": "array", + "description": "The repeated set of filters. They are logically combined based on the\noperator specified." }, "operator": { + "type": "string", "enumDescriptions": [ "Unspecified operator. It is treated as an `OR`.", "The logical `OR` operator.", @@ -832,15 +517,12 @@ "OR", "AND" ], - "description": "The operator for combining multiple dimension filters. If unspecified, it\nis treated as an `OR`.", - "type": "string" + "description": "The operator for combining multiple dimension filters. If unspecified, it\nis treated as an `OR`." } }, "id": "DimensionFilterClause" }, "GetReportsResponse": { - "id": "GetReportsResponse", - "description": "The main response class which holds the reports from the Reporting API\n`batchGet` call.", "type": "object", "properties": { "reports": { @@ -850,47 +532,37 @@ }, "type": "array" } - } + }, + "id": "GetReportsResponse", + "description": "The main response class which holds the reports from the Reporting API\n`batchGet` call." }, "SequenceSegment": { - "description": "Sequence conditions consist of one or more steps, where each step is defined\nby one or more dimension/metric conditions. Multiple steps can be combined\nwith special sequence operators.", "type": "object", "properties": { + "firstStepShouldMatchFirstHit": { + "type": "boolean", + "description": "If set, first step condition must match the first hit of the visitor (in\nthe date range)." + }, "segmentSequenceSteps": { "description": "The list of steps in the sequence.", "items": { "$ref": "SegmentSequenceStep" }, "type": "array" - }, - "firstStepShouldMatchFirstHit": { - "description": "If set, first step condition must match the first hit of the visitor (in\nthe date range).", - "type": "boolean" } }, - "id": "SequenceSegment" + "id": "SequenceSegment", + "description": "Sequence conditions consist of one or more steps, where each step is defined\nby one or more dimension/metric conditions. Multiple steps can be combined\nwith special sequence operators." }, "SegmentMetricFilter": { - "id": "SegmentMetricFilter", "description": "Metric filter to be used in a segment filter clause.", "type": "object", "properties": { - "maxComparisonValue": { - "description": "Max comparison value is only used for `BETWEEN` operator.", - "type": "string" - }, "comparisonValue": { - "description": "The value to compare against. If the operator is `BETWEEN`, this value is\ntreated as minimum comparison value.", - "type": "string" + "type": "string", + "description": "The value to compare against. If the operator is `BETWEEN`, this value is\ntreated as minimum comparison value." }, "operator": { - "enumDescriptions": [ - "Unspecified operator is treated as `LESS_THAN` operator.", - "Checks if the metric value is less than comparison value.", - "Checks if the metric value is greater than comparison value.", - "Equals operator.", - "For between operator, both the minimum and maximum are exclusive.\nWe will use `LT` and `GT` for comparison." - ], "enum": [ "UNSPECIFIED_OPERATOR", "LESS_THAN", @@ -899,13 +571,27 @@ "BETWEEN" ], "description": "Specifies is the operation to perform to compare the metric. The default\nis `EQUAL`.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Unspecified operator is treated as `LESS_THAN` operator.", + "Checks if the metric value is less than comparison value.", + "Checks if the metric value is greater than comparison value.", + "Equals operator.", + "For between operator, both the minimum and maximum are exclusive.\nWe will use `LT` and `GT` for comparison." + ] }, "metricName": { "description": "The metric that will be filtered on. A `metricFilter` must contain a\nmetric name.", "type": "string" }, "scope": { + "enum": [ + "UNSPECIFIED_SCOPE", + "PRODUCT", + "HIT", + "SESSION", + "USER" + ], "description": "Scope for a metric defines the level at which that metric is defined. The\nspecified metric scope must be equal to or greater than its primary scope\nas defined in the data model. The primary scope is defined by if the\nsegment is selecting users or sessions.", "type": "string", "enumDescriptions": [ @@ -914,46 +600,42 @@ "Hit scope.", "Session scope.", "User scope." - ], - "enum": [ - "UNSPECIFIED_SCOPE", - "PRODUCT", - "HIT", - "SESSION", - "USER" ] + }, + "maxComparisonValue": { + "description": "Max comparison value is only used for `BETWEEN` operator.", + "type": "string" } - } + }, + "id": "SegmentMetricFilter" }, "DateRangeValues": { + "description": "Used to return a list of metrics for a single DateRange / dimension\ncombination", + "type": "object", "properties": { + "values": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Each value corresponds to each Metric in the request." + }, "pivotValueRegions": { "items": { "$ref": "PivotValueRegion" }, "type": "array", "description": "The values of each pivot region." - }, - "values": { - "description": "Each value corresponds to each Metric in the request.", - "items": { - "type": "string" - }, - "type": "array" } }, - "id": "DateRangeValues", - "description": "Used to return a list of metrics for a single DateRange / dimension\ncombination", - "type": "object" + "id": "DateRangeValues" }, "CohortGroup": { - "id": "CohortGroup", - "description": "Defines a cohort group.\nFor example:\n\n \"cohortGroup\": {\n \"cohorts\": [{\n \"name\": \"cohort 1\",\n \"type\": \"FIRST_VISIT_DATE\",\n \"dateRange\": { \"startDate\": \"2015-08-01\", \"endDate\": \"2015-08-01\" }\n },{\n \"name\": \"cohort 2\"\n \"type\": \"FIRST_VISIT_DATE\"\n \"dateRange\": { \"startDate\": \"2015-07-01\", \"endDate\": \"2015-07-01\" }\n }]\n }", "type": "object", "properties": { "lifetimeValue": { - "type": "boolean", - "description": "Enable Life Time Value (LTV). LTV measures lifetime value for users\nacquired through different channels.\nPlease see:\n[Cohort Analysis](https://support.google.com/analytics/answer/6074676) and\n[Lifetime Value](https://support.google.com/analytics/answer/6182550)\nIf the value of lifetimeValue is false:\n\n- The metric values are similar to the values in the web interface cohort\n report.\n- The cohort definition date ranges must be aligned to the calendar week\n and month. i.e. while requesting `ga:cohortNthWeek` the `startDate` in\n the cohort definition should be a Sunday and the `endDate` should be the\n following Saturday, and for `ga:cohortNthMonth`, the `startDate`\n should be the 1st of the month and `endDate` should be the last day\n of the month.\n\nWhen the lifetimeValue is true:\n\n- The metric values will correspond to the values in the web interface\n LifeTime value report.\n- The Lifetime Value report shows you how user value (Revenue) and\n engagement (Appviews, Goal Completions, Sessions, and Session Duration)\n grow during the 90 days after a user is acquired.\n- The metrics are calculated as a cumulative average per user per the time\n increment.\n- The cohort definition date ranges need not be aligned to the calendar\n week and month boundaries.\n- The `viewId` must be an\n [app view ID](https://support.google.com/analytics/answer/2649553#WebVersusAppViews)" + "description": "Enable Life Time Value (LTV). LTV measures lifetime value for users\nacquired through different channels.\nPlease see:\n[Cohort Analysis](https://support.google.com/analytics/answer/6074676) and\n[Lifetime Value](https://support.google.com/analytics/answer/6182550)\nIf the value of lifetimeValue is false:\n\n- The metric values are similar to the values in the web interface cohort\n report.\n- The cohort definition date ranges must be aligned to the calendar week\n and month. i.e. while requesting `ga:cohortNthWeek` the `startDate` in\n the cohort definition should be a Sunday and the `endDate` should be the\n following Saturday, and for `ga:cohortNthMonth`, the `startDate`\n should be the 1st of the month and `endDate` should be the last day\n of the month.\n\nWhen the lifetimeValue is true:\n\n- The metric values will correspond to the values in the web interface\n LifeTime value report.\n- The Lifetime Value report shows you how user value (Revenue) and\n engagement (Appviews, Goal Completions, Sessions, and Session Duration)\n grow during the 90 days after a user is acquired.\n- The metrics are calculated as a cumulative average per user per the time\n increment.\n- The cohort definition date ranges need not be aligned to the calendar\n week and month boundaries.\n- The `viewId` must be an\n [app view ID](https://support.google.com/analytics/answer/2649553#WebVersusAppViews)", + "type": "boolean" }, "cohorts": { "description": "The definition for the cohort.", @@ -962,44 +644,31 @@ }, "type": "array" } - } + }, + "id": "CohortGroup", + "description": "Defines a cohort group.\nFor example:\n\n \"cohortGroup\": {\n \"cohorts\": [{\n \"name\": \"cohort 1\",\n \"type\": \"FIRST_VISIT_DATE\",\n \"dateRange\": { \"startDate\": \"2015-08-01\", \"endDate\": \"2015-08-01\" }\n },{\n \"name\": \"cohort 2\"\n \"type\": \"FIRST_VISIT_DATE\"\n \"dateRange\": { \"startDate\": \"2015-07-01\", \"endDate\": \"2015-07-01\" }\n }]\n }" }, "GetReportsRequest": { "description": "The batch request containing multiple report request.", "type": "object", "properties": { "reportRequests": { - "description": "Requests, each request will have a separate response.\nThere can be a maximum of 5 requests. All requests should have the same\n`dateRanges`, `viewId`, `segments`, `samplingLevel`, and `cohortGroup`.", "items": { "$ref": "ReportRequest" }, - "type": "array" + "type": "array", + "description": "Requests, each request will have a separate response.\nThere can be a maximum of 5 requests. All requests should have the same\n`dateRanges`, `viewId`, `segments`, `samplingLevel`, and `cohortGroup`." } }, "id": "GetReportsRequest" }, "Pivot": { - "description": "The Pivot describes the pivot section in the request.\nThe Pivot helps rearrange the information in the table for certain reports\nby pivoting your data on a second dimension.", "type": "object", "properties": { - "dimensionFilterClauses": { - "description": "DimensionFilterClauses are logically combined with an `AND` operator: only\ndata that is included by all these DimensionFilterClauses contributes to\nthe values in this pivot region. Dimension filters can be used to restrict\nthe columns shown in the pivot region. For example if you have\n`ga:browser` as the requested dimension in the pivot region, and you\nspecify key filters to restrict `ga:browser` to only \"IE\" or \"Firefox\",\nthen only those two browsers would show up as columns.", - "items": { - "$ref": "DimensionFilterClause" - }, - "type": "array" - }, - "dimensions": { - "description": "A list of dimensions to show as pivot columns. A Pivot can have a maximum\nof 4 dimensions. Pivot dimensions are part of the restriction on the\ntotal number of dimensions allowed in the request.", - "items": { - "$ref": "Dimension" - }, - "type": "array" - }, "maxGroupCount": { + "type": "integer", "format": "int32", - "description": "Specifies the maximum number of groups to return.\nThe default value is 10, also the maximum value is 1,000.", - "type": "integer" + "description": "Specifies the maximum number of groups to return.\nThe default value is 10, also the maximum value is 1,000." }, "startGroup": { "format": "int32", @@ -1007,14 +676,470 @@ "type": "integer" }, "metrics": { - "description": "The pivot metrics. Pivot metrics are part of the\nrestriction on total number of metrics allowed in the request.", "items": { "$ref": "Metric" }, + "type": "array", + "description": "The pivot metrics. Pivot metrics are part of the\nrestriction on total number of metrics allowed in the request." + }, + "dimensionFilterClauses": { + "items": { + "$ref": "DimensionFilterClause" + }, + "type": "array", + "description": "DimensionFilterClauses are logically combined with an `AND` operator: only\ndata that is included by all these DimensionFilterClauses contributes to\nthe values in this pivot region. Dimension filters can be used to restrict\nthe columns shown in the pivot region. For example if you have\n`ga:browser` as the requested dimension in the pivot region, and you\nspecify key filters to restrict `ga:browser` to only \"IE\" or \"Firefox\",\nthen only those two browsers would show up as columns." + }, + "dimensions": { + "description": "A list of dimensions to show as pivot columns. A Pivot can have a maximum\nof 4 dimensions. Pivot dimensions are part of the restriction on the\ntotal number of dimensions allowed in the request.", + "items": { + "$ref": "Dimension" + }, "type": "array" } }, - "id": "Pivot" + "id": "Pivot", + "description": "The Pivot describes the pivot section in the request.\nThe Pivot helps rearrange the information in the table for certain reports\nby pivoting your data on a second dimension." + }, + "PivotHeaderEntry": { + "type": "object", + "properties": { + "metric": { + "$ref": "MetricHeaderEntry", + "description": "The metric header for the metric in the pivot." + }, + "dimensionNames": { + "description": "The name of the dimensions in the pivot response.", + "items": { + "type": "string" + }, + "type": "array" + }, + "dimensionValues": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The values for the dimensions in the pivot." + } + }, + "id": "PivotHeaderEntry", + "description": "The headers for the each of the metric column corresponding to the metrics\nrequested in the pivots section of the response." + }, + "SegmentFilter": { + "type": "object", + "properties": { + "sequenceSegment": { + "$ref": "SequenceSegment", + "description": "Sequence conditions consist of one or more steps, where each step is\ndefined by one or more dimension/metric conditions. Multiple steps can\nbe combined with special sequence operators." + }, + "not": { + "description": "If true, match the complement of simple or sequence segment.\nFor example, to match all visits not from \"New York\", we can define the\nsegment as follows:\n\n \"sessionSegment\": {\n \"segmentFilters\": [{\n \"simpleSegment\" :{\n \"orFiltersForSegment\": [{\n \"segmentFilterClauses\":[{\n \"dimensionFilter\": {\n \"dimensionName\": \"ga:city\",\n \"expressions\": [\"New York\"]\n }\n }]\n }]\n },\n \"not\": \"True\"\n }]\n },", + "type": "boolean" + }, + "simpleSegment": { + "$ref": "SimpleSegment", + "description": "A Simple segment conditions consist of one or more dimension/metric\nconditions that can be combined" + } + }, + "id": "SegmentFilter", + "description": "SegmentFilter defines the segment to be either a simple or a sequence\nsegment. A simple segment condition contains dimension and metric conditions\nto select the sessions or users. A sequence segment condition can be used to\nselect users or sessions based on sequential conditions." + }, + "SegmentDefinition": { + "description": "SegmentDefinition defines the segment to be a set of SegmentFilters which\nare combined together with a logical `AND` operation.", + "type": "object", + "properties": { + "segmentFilters": { + "description": "A segment is defined by a set of segment filters which are combined\ntogether with a logical `AND` operation.", + "items": { + "$ref": "SegmentFilter" + }, + "type": "array" + } + }, + "id": "SegmentDefinition" + }, + "MetricHeaderEntry": { + "description": "Header for the metrics.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enumDescriptions": [ + "Metric type is unspecified.", + "Integer metric.", + "Float metric.", + "Currency metric.", + "Percentage metric.", + "Time metric in `HH:MM:SS` format." + ], + "enum": [ + "METRIC_TYPE_UNSPECIFIED", + "INTEGER", + "FLOAT", + "CURRENCY", + "PERCENT", + "TIME" + ], + "description": "The type of the metric, for example `INTEGER`." + }, + "name": { + "description": "The name of the header.", + "type": "string" + } + }, + "id": "MetricHeaderEntry" + }, + "ReportData": { + "type": "object", + "properties": { + "minimums": { + "description": "Minimum and maximum values seen over all matching rows. These are both\nempty when `hideValueRanges` in the request is false, or when\nrowCount is zero.", + "items": { + "$ref": "DateRangeValues" + }, + "type": "array" + }, + "samplingSpaceSizes": { + "items": { + "format": "int64", + "type": "string" + }, + "type": "array", + "description": "If the results are\n[sampled](https://support.google.com/analytics/answer/2637192),\nthis returns the total number of\nsamples present, one entry per date range. If the results are not sampled\nthis field will not be defined. See\n[developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)\nfor details." + }, + "totals": { + "description": "For each requested date range, for the set of all rows that match\nthe query, every requested value format gets a total. The total\nfor a value format is computed by first totaling the metrics\nmentioned in the value format and then evaluating the value\nformat as a scalar expression. E.g., The \"totals\" for\n`3 / (ga:sessions + 2)` we compute\n`3 / ((sum of all relevant ga:sessions) + 2)`.\nTotals are computed before pagination.", + "items": { + "$ref": "DateRangeValues" + }, + "type": "array" + }, + "samplesReadCounts": { + "items": { + "format": "int64", + "type": "string" + }, + "type": "array", + "description": "If the results are\n[sampled](https://support.google.com/analytics/answer/2637192),\nthis returns the total number of samples read, one entry per date range.\nIf the results are not sampled this field will not be defined. See\n[developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)\nfor details." + }, + "rowCount": { + "format": "int32", + "description": "Total number of matching rows for this query.", + "type": "integer" + }, + "rows": { + "items": { + "$ref": "ReportRow" + }, + "type": "array", + "description": "There's one ReportRow for every unique combination of dimensions." + }, + "isDataGolden": { + "type": "boolean", + "description": "Indicates if response to this request is golden or not. Data is\ngolden when the exact same request will not produce any new results if\nasked at a later point in time." + }, + "dataLastRefreshed": { + "type": "string", + "format": "google-datetime", + "description": "The last time the data in the report was refreshed. All the hits received\nbefore this timestamp are included in the calculation of the report." + }, + "maximums": { + "items": { + "$ref": "DateRangeValues" + }, + "type": "array", + "description": "Minimum and maximum values seen over all matching rows. These are both\nempty when `hideValueRanges` in the request is false, or when\nrowCount is zero." + } + }, + "id": "ReportData", + "description": "The data part of the report." + }, + "DimensionFilter": { + "type": "object", + "properties": { + "caseSensitive": { + "type": "boolean", + "description": "Should the match be case sensitive? Default is false." + }, + "operator": { + "enum": [ + "OPERATOR_UNSPECIFIED", + "REGEXP", + "BEGINS_WITH", + "ENDS_WITH", + "PARTIAL", + "EXACT", + "NUMERIC_EQUAL", + "NUMERIC_GREATER_THAN", + "NUMERIC_LESS_THAN", + "IN_LIST" + ], + "description": "How to match the dimension to the expression. The default is REGEXP.", + "type": "string", + "enumDescriptions": [ + "If the match type is unspecified, it is treated as a `REGEXP`.", + "The match expression is treated as a regular expression. All match types\nare not treated as regular expressions.", + "Matches the value which begin with the match expression provided.", + "Matches the values which end with the match expression provided.", + "Substring match.", + "The value should match the match expression entirely.", + "Integer comparison filters.\ncase sensitivity is ignored for these and the expression\nis assumed to be a string representing an integer.\nFailure conditions:\n\n- If expression is not a valid int64, the client should expect\n an error.\n- Input dimensions that are not valid int64 values will never match the\n filter.", + "Checks if the dimension is numerically greater than the match\nexpression. Read the description for `NUMERIC_EQUALS` for restrictions.", + "Checks if the dimension is numerically less than the match expression.\nRead the description for `NUMERIC_EQUALS` for restrictions.", + "This option is used to specify a dimension filter whose expression can\ntake any value from a selected list of values. This helps avoiding\nevaluating multiple exact match dimension filters which are OR'ed for\nevery single response row. For example:\n\n expressions: [\"A\", \"B\", \"C\"]\n\nAny response row whose dimension has it is value as A, B or C, matches\nthis DimensionFilter." + ] + }, + "dimensionName": { + "description": "The dimension to filter on. A DimensionFilter must contain a dimension.", + "type": "string" + }, + "expressions": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Strings or regular expression to match against. Only the first value of\nthe list is used for comparison unless the operator is `IN_LIST`.\nIf `IN_LIST` operator, then the entire list is used to filter the\ndimensions as explained in the description of the `IN_LIST` operator." + }, + "not": { + "type": "boolean", + "description": "Logical `NOT` operator. If this boolean is set to true, then the matching\ndimension values will be excluded in the report. The default is false." + } + }, + "id": "DimensionFilter", + "description": "Dimension filter specifies the filtering options on a dimension." + }, + "SegmentDimensionFilter": { + "description": "Dimension filter specifies the filtering options on a dimension.", + "type": "object", + "properties": { + "minComparisonValue": { + "type": "string", + "description": "Minimum comparison values for `BETWEEN` match type." + }, + "maxComparisonValue": { + "type": "string", + "description": "Maximum comparison values for `BETWEEN` match type." + }, + "dimensionName": { + "type": "string", + "description": "Name of the dimension for which the filter is being applied." + }, + "operator": { + "enum": [ + "OPERATOR_UNSPECIFIED", + "REGEXP", + "BEGINS_WITH", + "ENDS_WITH", + "PARTIAL", + "EXACT", + "IN_LIST", + "NUMERIC_LESS_THAN", + "NUMERIC_GREATER_THAN", + "NUMERIC_BETWEEN" + ], + "description": "The operator to use to match the dimension with the expressions.", + "type": "string", + "enumDescriptions": [ + "If the match type is unspecified, it is treated as a REGEXP.", + "The match expression is treated as a regular expression. All other match\ntypes are not treated as regular expressions.", + "Matches the values which begin with the match expression provided.", + "Matches the values which end with the match expression provided.", + "Substring match.", + "The value should match the match expression entirely.", + "This option is used to specify a dimension filter whose expression can\ntake any value from a selected list of values. This helps avoiding\nevaluating multiple exact match dimension filters which are OR'ed for\nevery single response row. For example:\n\n expressions: [\"A\", \"B\", \"C\"]\n\nAny response row whose dimension has it is value as A, B or C, matches\nthis DimensionFilter.", + "Integer comparison filters.\ncase sensitivity is ignored for these and the expression\nis assumed to be a string representing an integer.\nFailure conditions:\n\n- if expression is not a valid int64, the client should expect\n an error.\n- input dimensions that are not valid int64 values will never match the\n filter.\n\nChecks if the dimension is numerically less than the match expression.", + "Checks if the dimension is numerically greater than the match\nexpression.", + "Checks if the dimension is numerically between the minimum and maximum\nof the match expression, boundaries excluded." + ] + }, + "expressions": { + "description": "The list of expressions, only the first element is used for all operators", + "items": { + "type": "string" + }, + "type": "array" + }, + "caseSensitive": { + "type": "boolean", + "description": "Should the match be case sensitive, ignored for `IN_LIST` operator." + } + }, + "id": "SegmentDimensionFilter" + }, + "OrderBy": { + "description": "Specifies the sorting options.", + "type": "object", + "properties": { + "orderType": { + "type": "string", + "enumDescriptions": [ + "Unspecified order type will be treated as sort based on value.", + "The sort order is based on the value of the chosen column; looks only at\nthe first date range.", + "The sort order is based on the difference of the values of the chosen\ncolumn between the first two date ranges. Usable only if there are\nexactly two date ranges.", + "The sort order is based on weighted value of the chosen column. If\ncolumn has n/d format, then weighted value of this ratio will\nbe `(n + totals.n)/(d + totals.d)` Usable only for metrics that\nrepresent ratios.", + "Histogram order type is applicable only to dimension columns with\nnon-empty histogram-buckets.", + "If the dimensions are fixed length numbers, ordinary sort would just\nwork fine. `DIMENSION_AS_INTEGER` can be used if the dimensions are\nvariable length numbers." + ], + "enum": [ + "ORDER_TYPE_UNSPECIFIED", + "VALUE", + "DELTA", + "SMART", + "HISTOGRAM_BUCKET", + "DIMENSION_AS_INTEGER" + ], + "description": "The order type. The default orderType is `VALUE`." + }, + "fieldName": { + "description": "The field which to sort by. The default sort order is ascending. Example:\n`ga:browser`.\nNote, that you can only specify one field for sort here. For example,\n`ga:browser, ga:city` is not valid.", + "type": "string" + }, + "sortOrder": { + "enum": [ + "SORT_ORDER_UNSPECIFIED", + "ASCENDING", + "DESCENDING" + ], + "description": "The sorting order for the field.", + "type": "string", + "enumDescriptions": [ + "If the sort order is unspecified, the default is ascending.", + "Ascending sort. The field will be sorted in an ascending manner.", + "Descending sort. The field will be sorted in a descending manner." + ] + } + }, + "id": "OrderBy" + }, + "Segment": { + "description": "The segment definition, if the report needs to be segmented.\nA Segment is a subset of the Analytics data. For example, of the entire\nset of users, one Segment might be users from a particular country or city.", + "type": "object", + "properties": { + "dynamicSegment": { + "$ref": "DynamicSegment", + "description": "A dynamic segment definition in the request." + }, + "segmentId": { + "description": "The segment ID of a built-in or custom segment, for example `gaid::-3`.", + "type": "string" + } + }, + "id": "Segment" + }, + "SegmentSequenceStep": { + "type": "object", + "properties": { + "orFiltersForSegment": { + "items": { + "$ref": "OrFiltersForSegment" + }, + "type": "array", + "description": "A sequence is specified with a list of Or grouped filters which are\ncombined with `AND` operator." + }, + "matchType": { + "type": "string", + "enumDescriptions": [ + "Unspecified match type is treated as precedes.", + "Operator indicates that the previous step precedes the next step.", + "Operator indicates that the previous step immediately precedes the next\nstep." + ], + "enum": [ + "UNSPECIFIED_MATCH_TYPE", + "PRECEDES", + "IMMEDIATELY_PRECEDES" + ], + "description": "Specifies if the step immediately precedes or can be any time before the\nnext step." + } + }, + "id": "SegmentSequenceStep", + "description": "A segment sequence definition." + }, + "Metric": { + "type": "object", + "properties": { + "expression": { + "description": "A metric expression in the request. An expression is constructed from one\nor more metrics and numbers. Accepted operators include: Plus (+), Minus\n(-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis,\nPositive cardinal numbers (0-9), can include decimals and is limited to\n1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the\nmetric expression is just a single metric name like `ga:users`.\nAdding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics\nwill result in unexpected results.", + "type": "string" + }, + "formattingType": { + "type": "string", + "enumDescriptions": [ + "Metric type is unspecified.", + "Integer metric.", + "Float metric.", + "Currency metric.", + "Percentage metric.", + "Time metric in `HH:MM:SS` format." + ], + "enum": [ + "METRIC_TYPE_UNSPECIFIED", + "INTEGER", + "FLOAT", + "CURRENCY", + "PERCENT", + "TIME" + ], + "description": "Specifies how the metric expression should be formatted, for example\n`INTEGER`." + }, + "alias": { + "type": "string", + "description": "An alias for the metric expression is an alternate name for the\nexpression. The alias can be used for filtering and sorting. This field\nis optional and is useful if the expression is not a single metric but\na complex expression which cannot be used in filtering and sorting.\nThe alias is also used in the response column header." + } + }, + "id": "Metric", + "description": "[Metrics](https://support.google.com/analytics/answer/1033861)\nare the quantitative measurements. For example, the metric `ga:users`\nindicates the total number of users for the requested time period." + }, + "PivotValueRegion": { + "type": "object", + "properties": { + "values": { + "description": "The values of the metrics in each of the pivot regions.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "PivotValueRegion", + "description": "The metric values in the pivot region." + }, + "Report": { + "description": "The data response corresponding to the request.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Page token to retrieve the next page of results in the list.", + "type": "string" + }, + "data": { + "$ref": "ReportData", + "description": "Response data." + }, + "columnHeader": { + "$ref": "ColumnHeader", + "description": "The column headers." + } + }, + "id": "Report" + }, + "PivotHeader": { + "description": "The headers for each of the pivot sections defined in the request.", + "type": "object", + "properties": { + "pivotHeaderEntries": { + "description": "A single pivot section header.", + "items": { + "$ref": "PivotHeaderEntry" + }, + "type": "array" + }, + "totalPivotGroupsCount": { + "type": "integer", + "format": "int32", + "description": "The total number of groups for this pivot." + } + }, + "id": "PivotHeader" } }, "icons": { @@ -1026,138 +1151,13 @@ "auth": { "oauth2": { "scopes": { - "https://www.googleapis.com/auth/analytics.readonly": { - "description": "View your Google Analytics data" - }, "https://www.googleapis.com/auth/analytics": { "description": "View and manage your Google Analytics data" + }, + "https://www.googleapis.com/auth/analytics.readonly": { + "description": "View your Google Analytics data" } } } - }, - "rootUrl": "https://analyticsreporting.googleapis.com/", - "ownerDomain": "google.com", - "name": "analyticsreporting", - "batchPath": "batch", - "title": "Google Analytics Reporting API", - "ownerName": "Google", - "resources": { - "reports": { - "methods": { - "batchGet": { - "flatPath": "v4/reports:batchGet", - "path": "v4/reports:batchGet", - "id": "analyticsreporting.reports.batchGet", - "request": { - "$ref": "GetReportsRequest" - }, - "description": "Returns the Analytics data.", - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "GetReportsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics", - "https://www.googleapis.com/auth/analytics.readonly" - ], - "parameters": {} - } - } - } - }, - "parameters": { - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "uploadType": { - "type": "string", - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ] - }, - "alt": { - "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", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "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.", - "type": "string", - "location": "query" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - } - }, - "version": "v4", - "baseUrl": "https://analyticsreporting.googleapis.com/", - "servicePath": "", - "description": "Accesses Analytics report data.", - "kind": "discovery#restDescription", - "basePath": "" + } } diff --git a/vendor/google.golang.org/api/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json b/vendor/google.golang.org/api/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json index 09d0a3d38..b4b5d4e20 100644 --- a/vendor/google.golang.org/api/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json +++ b/vendor/google.golang.org/api/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json @@ -1,49 +1,56 @@ { + "canonicalName": "Android Provisioning Partner", + "kind": "discovery#restDescription", + "description": "Automates reseller integration into Zero Touch Provisioning by assigning devices to customers and creating device reports.", + "servicePath": "", + "rootUrl": "https://androiddeviceprovisioning.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "androiddeviceprovisioning", "batchPath": "batch", - "documentationLink": "https://developers.google.com/zero-touch/", - "revision": "20170729", "id": "androiddeviceprovisioning:v1", + "documentationLink": "https://developers.google.com/zero-touch/", + "revision": "20170903", "title": "Android Device Provisioning Partner API", - "discoveryVersion": "v1", "ownerName": "Google", - "version_module": "True", + "discoveryVersion": "v1", + "version_module": true, "resources": { "partners": { "resources": { - "customers": { + "devices": { "methods": { - "list": { - "id": "androiddeviceprovisioning.partners.customers.list", - "path": "v1/partners/{+partnerId}/customers", - "description": "List all the customers that has delegates some role to this customer.", + "unclaim": { + "description": "Unclaim the device identified by the `device_id` or the `deviceIdentifier`.", + "request": { + "$ref": "UnclaimDeviceRequest" + }, "response": { - "$ref": "ListCustomersResponse" + "$ref": "Empty" }, "parameterOrder": [ "partnerId" ], - "httpMethod": "GET", + "httpMethod": "POST", "parameters": { "partnerId": { + "location": "path", + "description": "ID of the partner.", "pattern": "^[^/]+$", "format": "int64", "required": true, - "type": "string", - "location": "path", - "description": "the id of the partner." + "type": "string" } }, - "flatPath": "v1/partners/{partnersId}/customers" - } - } - }, - "devices": { - "methods": { + "flatPath": "v1/partners/{partnersId}/devices:unclaim", + "path": "v1/partners/{+partnerId}/devices:unclaim", + "id": "androiddeviceprovisioning.partners.devices.unclaim" + }, "findByOwner": { - "description": "Find devices by ownership.", "request": { "$ref": "FindDevicesByOwnerRequest" }, + "description": "Find devices by ownership.", "response": { "$ref": "FindDevicesByOwnerResponse" }, @@ -53,17 +60,17 @@ "httpMethod": "POST", "parameters": { "partnerId": { - "location": "path", - "description": "id of the partner.", - "pattern": "^[^/]+$", "format": "int64", "required": true, - "type": "string" + "type": "string", + "location": "path", + "description": "ID of the partner.", + "pattern": "^[^/]+$" } }, "flatPath": "v1/partners/{partnersId}/devices:findByOwner", - "id": "androiddeviceprovisioning.partners.devices.findByOwner", - "path": "v1/partners/{+partnerId}/devices:findByOwner" + "path": "v1/partners/{+partnerId}/devices:findByOwner", + "id": "androiddeviceprovisioning.partners.devices.findByOwner" }, "claim": { "response": { @@ -75,23 +82,29 @@ "httpMethod": "POST", "parameters": { "partnerId": { - "format": "int64", - "required": true, - "type": "string", "location": "path", - "description": "Id of the partner.", - "pattern": "^[^/]+$" + "description": "ID of the partner.", + "pattern": "^[^/]+$", + "format": "int64", + "type": "string", + "required": true } }, "flatPath": "v1/partners/{partnersId}/devices:claim", - "id": "androiddeviceprovisioning.partners.devices.claim", "path": "v1/partners/{+partnerId}/devices:claim", + "id": "androiddeviceprovisioning.partners.devices.claim", "request": { "$ref": "ClaimDeviceRequest" }, "description": "Claim the device identified by device identifier." }, "claimAsync": { + "path": "v1/partners/{+partnerId}/devices:claimAsync", + "id": "androiddeviceprovisioning.partners.devices.claimAsync", + "request": { + "$ref": "ClaimDevicesRequest" + }, + "description": "Claim devices asynchronously.", "response": { "$ref": "Operation" }, @@ -101,7 +114,7 @@ "httpMethod": "POST", "parameters": { "partnerId": { - "description": "partner id.", + "description": "Partner ID.", "pattern": "^[^/]+$", "format": "int64", "type": "string", @@ -109,19 +122,9 @@ "location": "path" } }, - "flatPath": "v1/partners/{partnersId}/devices:claimAsync", - "id": "androiddeviceprovisioning.partners.devices.claimAsync", - "path": "v1/partners/{+partnerId}/devices:claimAsync", - "request": { - "$ref": "ClaimDevicesRequest" - }, - "description": "Claim devices asynchronously" + "flatPath": "v1/partners/{partnersId}/devices:claimAsync" }, "findByIdentifier": { - "description": "Find devices by device identifier.", - "request": { - "$ref": "FindDevicesByDeviceIdentifierRequest" - }, "response": { "$ref": "FindDevicesByDeviceIdentifierResponse" }, @@ -131,37 +134,41 @@ "httpMethod": "POST", "parameters": { "partnerId": { - "format": "int64", - "type": "string", - "required": true, "location": "path", - "description": "id of the partner.", - "pattern": "^[^/]+$" - } - }, - "flatPath": "v1/partners/{partnersId}/devices:findByIdentifier", - "id": "androiddeviceprovisioning.partners.devices.findByIdentifier", - "path": "v1/partners/{+partnerId}/devices:findByIdentifier" - }, - "unclaimAsync": { - "description": "Unclaim devices asynchronously", - "request": { - "$ref": "UnclaimDevicesRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "partnerId" - ], - "httpMethod": "POST", - "parameters": { - "partnerId": { - "description": "partner id.", + "description": "ID of the partner.", "pattern": "^[^/]+$", "format": "int64", "required": true, + "type": "string" + } + }, + "flatPath": "v1/partners/{partnersId}/devices:findByIdentifier", + "path": "v1/partners/{+partnerId}/devices:findByIdentifier", + "id": "androiddeviceprovisioning.partners.devices.findByIdentifier", + "description": "Find devices by device identifier.", + "request": { + "$ref": "FindDevicesByDeviceIdentifierRequest" + } + }, + "unclaimAsync": { + "request": { + "$ref": "UnclaimDevicesRequest" + }, + "description": "Unclaim devices asynchronously.", + "httpMethod": "POST", + "parameterOrder": [ + "partnerId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "partnerId": { + "description": "Partner ID.", + "pattern": "^[^/]+$", + "format": "int64", "type": "string", + "required": true, "location": "path" } }, @@ -170,6 +177,12 @@ "path": "v1/partners/{+partnerId}/devices:unclaimAsync" }, "metadata": { + "path": "v1/partners/{+metadataOwnerId}/devices/{+deviceId}/metadata", + "id": "androiddeviceprovisioning.partners.devices.metadata", + "description": "Update the metadata.", + "request": { + "$ref": "UpdateDeviceMetadataRequest" + }, "response": { "$ref": "DeviceMetadata" }, @@ -185,24 +198,18 @@ "type": "string", "required": true, "location": "path", - "description": "The owner of the newly set metadata. Should be partner id itself." + "description": "The owner of the newly set metadata. Set this to the partner ID." }, "deviceId": { + "format": "int64", "required": true, "type": "string", "location": "path", - "description": "id of the partner.", - "pattern": "^[^/]+$", - "format": "int64" + "description": "ID of the partner.", + "pattern": "^[^/]+$" } }, - "flatPath": "v1/partners/{partnersId}/devices/{devicesId}/metadata", - "id": "androiddeviceprovisioning.partners.devices.metadata", - "path": "v1/partners/{+metadataOwnerId}/devices/{+deviceId}/metadata", - "description": "Update the metadata", - "request": { - "$ref": "UpdateDeviceMetadataRequest" - } + "flatPath": "v1/partners/{partnersId}/devices/{devicesId}/metadata" }, "updateMetadataAsync": { "response": { @@ -212,71 +219,97 @@ "partnerId" ], "httpMethod": "POST", - "parameters": { - "partnerId": { - "description": "partner id.", - "pattern": "^[^/]+$", - "format": "int64", - "required": true, - "type": "string", - "location": "path" - } - }, - "flatPath": "v1/partners/{partnersId}/devices:updateMetadataAsync", - "id": "androiddeviceprovisioning.partners.devices.updateMetadataAsync", - "path": "v1/partners/{+partnerId}/devices:updateMetadataAsync", - "description": "Set metadata in batch asynchronously.", - "request": { - "$ref": "UpdateDeviceMetadataInBatchRequest" - } - }, - "get": { - "description": "Get a device", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Device" - }, - "parameters": { - "name": { - "description": "resource name in 'partners/[PARTNER_ID]/devices/[DEVICE_ID]'.", - "type": "string", - "required": true, - "pattern": "^partners/[^/]+/devices/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/partners/{partnersId}/devices/{devicesId}", - "path": "v1/{+name}", - "id": "androiddeviceprovisioning.partners.devices.get" - }, - "unclaim": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "partnerId" - ], - "httpMethod": "POST", "parameters": { "partnerId": { "location": "path", - "description": "Id of the partner.", + "description": "Partner ID.", "pattern": "^[^/]+$", "format": "int64", "required": true, "type": "string" } }, - "flatPath": "v1/partners/{partnersId}/devices:unclaim", - "id": "androiddeviceprovisioning.partners.devices.unclaim", - "path": "v1/partners/{+partnerId}/devices:unclaim", - "description": "Unclaim the device identified by device_id or identifier.", + "flatPath": "v1/partners/{partnersId}/devices:updateMetadataAsync", + "path": "v1/partners/{+partnerId}/devices:updateMetadataAsync", + "id": "androiddeviceprovisioning.partners.devices.updateMetadataAsync", + "description": "Set metadata in batch asynchronously.", "request": { - "$ref": "UnclaimDeviceRequest" + "$ref": "UpdateDeviceMetadataInBatchRequest" } + }, + "get": { + "description": "Get a device.", + "response": { + "$ref": "Device" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "pattern": "^partners/[^/]+/devices/[^/]+$", + "location": "path", + "description": "Resource name in `partners/[PARTNER_ID]/devices/[DEVICE_ID]`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/partners/{partnersId}/devices/{devicesId}", + "path": "v1/{+name}", + "id": "androiddeviceprovisioning.partners.devices.get" + } + } + }, + "customers": { + "methods": { + "create": { + "description": "A customer for Zero Touch Provisioning will be created.\nAfter a Customer is created, their admins and owners will be able to manage\ndevices on partner.android.com/zerotouch or via their API.", + "request": { + "$ref": "CreateCustomerRequest" + }, + "response": { + "$ref": "Company" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "parent": { + "description": "The parent resource in format `partners/[PARTNER_ID]'.", + "required": true, + "type": "string", + "pattern": "^partners/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/partners/{partnersId}/customers", + "path": "v1/{+parent}/customers", + "id": "androiddeviceprovisioning.partners.customers.create" + }, + "list": { + "id": "androiddeviceprovisioning.partners.customers.list", + "path": "v1/partners/{+partnerId}/customers", + "description": "List the customers that are enrolled to the reseller identified by the\n`partnerId` argument. This list includes customers that the reseller\ncreated and customers that enrolled themselves using the portal.", + "httpMethod": "GET", + "response": { + "$ref": "ListCustomersResponse" + }, + "parameterOrder": [ + "partnerId" + ], + "parameters": { + "partnerId": { + "location": "path", + "description": "The ID of the partner.", + "pattern": "^[^/]+$", + "format": "int64", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/partners/{partnersId}/customers" } } } @@ -285,87 +318,94 @@ "operations": { "methods": { "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "httpMethod": "GET", "response": { "$ref": "Operation" }, "parameterOrder": [ "name" ], + "httpMethod": "GET", "parameters": { "name": { "pattern": "^operations/.+$", "location": "path", "description": "The name of the operation resource.", - "type": "string", - "required": true + "required": true, + "type": "string" } }, "flatPath": "v1/operations/{operationsId}", "path": "v1/{+name}", - "id": "androiddeviceprovisioning.operations.get" + "id": "androiddeviceprovisioning.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." } } } }, "parameters": { + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, "pp": { "location": "query", "description": "Pretty-print response.", - "default": "true", - "type": "boolean" + "type": "boolean", + "default": "true" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" }, "bearer_token": { "location": "query", "description": "OAuth bearer token.", "type": "string" }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, "upload_protocol": { "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string" }, "prettyPrint": { - "location": "query", "description": "Returns response with indentations and line breaks.", + "type": "boolean", "default": "true", - "type": "boolean" - }, - "uploadType": { - "type": "string", - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." + "location": "query" }, "fields": { - "type": "string", "location": "query", - "description": "Selector specifying which fields to include in a partial response." + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" }, "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], "location": "query", "enum": [ "1", "2" ], "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ] + "type": "string" }, "callback": { + "location": "query", "description": "JSONP", - "type": "string", - "location": "query" + "type": "string" }, "alt": { + "description": "Data format for response.", + "default": "json", "enum": [ "json", "media", @@ -377,394 +417,102 @@ "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], - "location": "query", - "description": "Data format for response.", - "default": "json" + "location": "query" }, "access_token": { + "description": "OAuth access token.", "type": "string", - "location": "query", - "description": "OAuth access token." + "location": "query" }, "key": { - "location": "query", "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.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" + "type": "string", + "location": "query" } }, "schemas": { - "DevicesLongRunningOperationMetadata": { - "description": "Long running operation metadata.", - "type": "object", - "properties": { - "processingStatus": { - "description": "The overall processing status.", - "type": "string", - "enumDescriptions": [ - "Invalid code. Shouldn't be used.", - "Pending", - "In progress", - "Processed.\nThis doesn't mean all items were processed sucessfully, you should\ncheck the `response` field for the result of every item." - ], - "enum": [ - "BATCH_PROCESS_STATUS_UNSPECIFIED", - "BATCH_PROCESS_PENDING", - "BATCH_PROCESS_IN_PROGRESS", - "BATCH_PROCESS_PROCESSED" - ] - }, - "progress": { - "format": "int32", - "description": "Processing progress from 0 to 100.", - "type": "integer" - }, - "devicesCount": { - "format": "int32", - "description": "Number of devices parsed in your requests.", - "type": "integer" - } - }, - "id": "DevicesLongRunningOperationMetadata" - }, - "ClaimDeviceRequest": { - "id": "ClaimDeviceRequest", - "description": "Request message to claim a device on behalf of a customer.", - "type": "object", - "properties": { - "customerId": { - "format": "int64", - "description": "The customer to claim for.", - "type": "string" - }, - "deviceIdentifier": { - "$ref": "DeviceIdentifier", - "description": "The device identifier of the device to claim." - }, - "sectionType": { - "enumDescriptions": [ - "Unspecified", - "Zero touch" - ], - "enum": [ - "SECTION_TYPE_UNSPECIFIED", - "SECTION_TYPE_ZERO_TOUCH" - ], - "description": "Section to claim", - "type": "string" - } - } - }, - "UpdateDeviceMetadataInBatchRequest": { - "type": "object", - "properties": { - "updates": { - "description": "list of metadata updates.", - "items": { - "$ref": "UpdateMetadataArguments" - }, - "type": "array" - } - }, - "id": "UpdateDeviceMetadataInBatchRequest", - "description": "Request to update device metadata in batch." - }, - "ClaimDeviceResponse": { - "description": "Response message containing device id of the claim.", - "type": "object", - "properties": { - "deviceName": { - "description": "the resource name of the device in\n'partners/[PARTNER_ID]/devices/[DEVICE_ID]'.", - "type": "string" - }, - "deviceId": { - "format": "int64", - "description": "the device id of the claimed device.", - "type": "string" - } - }, - "id": "ClaimDeviceResponse" - }, - "ListCustomersResponse": { - "type": "object", - "properties": { - "customers": { - "description": "List of customers related to this partner.", - "items": { - "$ref": "Company" - }, - "type": "array" - } - }, - "id": "ListCustomersResponse", - "description": "Response message of all customers related to this partner." - }, - "UpdateMetadataArguments": { - "description": "Identifies metdata updates to one device.", - "type": "object", - "properties": { - "deviceMetadata": { - "description": "The metadata to update.", - "$ref": "DeviceMetadata" - }, - "deviceIdentifier": { - "description": "device identifier.", - "$ref": "DeviceIdentifier" - }, - "deviceId": { - "format": "int64", - "description": "device id of the device.", - "type": "string" - } - }, - "id": "UpdateMetadataArguments" - }, - "Device": { - "properties": { - "deviceId": { - "type": "string", - "format": "int64", - "description": "Device id" - }, - "deviceMetadata": { - "description": "Device metadata", - "$ref": "DeviceMetadata" - }, - "deviceIdentifier": { - "$ref": "DeviceIdentifier", - "description": "Device identifier" - }, - "name": { - "description": "Resource name in 'partners/[PARTNER_ID]/devices/[DEVICE_ID]'.", - "type": "string" - }, - "claims": { - "description": "claims", - "items": { - "$ref": "DeviceClaim" - }, - "type": "array" - } - }, - "id": "Device", - "description": "Device", - "type": "object" - }, - "Company": { - "description": "Company", - "type": "object", - "properties": { - "companyName": { - "description": "company name", - "type": "string" - }, - "companyId": { - "format": "int64", - "description": "company id", - "type": "string" - } - }, - "id": "Company" - }, - "UpdateDeviceMetadataRequest": { - "description": "Request to set metadata for a device.", - "type": "object", - "properties": { - "deviceMetadata": { - "description": "The metdata to set.", - "$ref": "DeviceMetadata" - } - }, - "id": "UpdateDeviceMetadataRequest" - }, - "PartnerUnclaim": { - "description": "Identifies one unclaim request.", - "type": "object", - "properties": { - "deviceIdentifier": { - "$ref": "DeviceIdentifier", - "description": "device identifier of the device." - }, - "sectionType": { - "enum": [ - "SECTION_TYPE_UNSPECIFIED", - "SECTION_TYPE_ZERO_TOUCH" - ], - "description": "section type to unclaim.", - "type": "string", - "enumDescriptions": [ - "Unspecified", - "Zero touch" - ] - }, - "deviceId": { - "format": "int64", - "description": "device id of the device.", - "type": "string" - } - }, - "id": "PartnerUnclaim" - }, - "Empty": { - "properties": {}, - "id": "Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object" - }, - "FindDevicesByDeviceIdentifierResponse": { - "description": "Response containing found devices.", - "type": "object", - "properties": { - "devices": { - "description": "Found devices.", - "items": { - "$ref": "Device" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Page token of next page", - "type": "string" - } - }, - "id": "FindDevicesByDeviceIdentifierResponse" - }, - "PartnerClaim": { - "type": "object", - "properties": { - "deviceMetadata": { - "$ref": "DeviceMetadata", - "description": "metadata to set at claim." - }, - "deviceIdentifier": { - "$ref": "DeviceIdentifier", - "description": "Device identifier of the device." - }, - "sectionType": { - "description": "section type to claim.", - "type": "string", - "enumDescriptions": [ - "Unspecified", - "Zero touch" - ], - "enum": [ - "SECTION_TYPE_UNSPECIFIED", - "SECTION_TYPE_ZERO_TOUCH" - ] - }, - "customerId": { - "format": "int64", - "description": "customer id to claim for.", - "type": "string" - } - }, - "id": "PartnerClaim", - "description": "Identifies one claim request." - }, - "UnclaimDeviceRequest": { - "description": "Request message to unclaim a device.", - "type": "object", - "properties": { - "deviceIdentifier": { - "$ref": "DeviceIdentifier", - "description": "The device identifier you use when you claimed this device." - }, - "sectionType": { - "description": "The section type to unclaim for.", - "type": "string", - "enumDescriptions": [ - "Unspecified", - "Zero touch" - ], - "enum": [ - "SECTION_TYPE_UNSPECIFIED", - "SECTION_TYPE_ZERO_TOUCH" - ] - }, - "deviceId": { - "format": "int64", - "description": "The device id returned by ClaimDevice.", - "type": "string" - } - }, - "id": "UnclaimDeviceRequest" - }, "DeviceMetadata": { "properties": { "entries": { - "type": "object", "additionalProperties": { "type": "string" }, - "description": "Metadata entries" + "description": "Metadata entries", + "type": "object" } }, "id": "DeviceMetadata", - "description": "metadata", + "description": "A key-value pair of the device metadata.", "type": "object" }, "DevicesLongRunningOperationResponse": { - "id": "DevicesLongRunningOperationResponse", - "description": "Long running operation response.", - "type": "object", "properties": { "successCount": { - "format": "int32", "description": "Number of succeesfully processed ones.", + "format": "int32", "type": "integer" }, "perDeviceStatus": { - "description": "processing status for each device.\nOne PerDeviceStatus per device. The order is the same as in your requests.", + "description": "Processing status for each device.\nOne `PerDeviceStatus` per device. The order is the same as in your requests.", + "type": "array", "items": { "$ref": "OperationPerDevice" - }, - "type": "array" + } } - } + }, + "id": "DevicesLongRunningOperationResponse", + "description": "Long running operation response.", + "type": "object" }, "DeviceClaim": { - "description": "containing the necessary info about a claim for a partner.", + "description": "Information about a device claimed for a partner.", "type": "object", "properties": { + "ownerCompanyId": { + "description": "Owner ID.", + "format": "int64", + "type": "string" + }, "sectionType": { - "enumDescriptions": [ - "Unspecified", - "Zero touch" - ], "enum": [ "SECTION_TYPE_UNSPECIFIED", "SECTION_TYPE_ZERO_TOUCH" ], - "description": "section type.", - "type": "string" - }, - "ownerCompanyId": { - "format": "int64", - "description": "owner id", - "type": "string" + "description": "Section type of the device claim.", + "type": "string", + "enumDescriptions": [ + "Unspecified section type.", + "Zero touch section type." + ] } }, "id": "DeviceClaim" }, "PerDeviceStatusInBatch": { - "description": "Stores the processing result for each device.", - "type": "object", "properties": { + "errorIdentifier": { + "description": "Error identifier.", + "type": "string" + }, + "errorMessage": { + "description": "Error message.", + "type": "string" + }, + "deviceId": { + "description": "Device ID of the device if process succeeds.", + "format": "int64", + "type": "string" + }, "status": { - "type": "string", "enumDescriptions": [ - "Invalid code. Shouldn' be used.", - "Unknown error.\nUnknown error is we don't expect it here.", - "Other error.\nOther error is we know/expect this error, but not having proper error\ncode yet.", + "Invalid code. Shouldn't be used.", + "Unknown error.\nWe don't expect this error to occur here.", + "Other error.\nWe know/expect this error, but there's no defined error code for the\nerror.", "Success.", - "Permission denied", + "Permission denied.", "Invalid device identifier.", "Invalid section type.", - "This section is claimed by other company." + "This section is claimed by another company." ], "enum": [ "SINGLE_DEVICE_STATUS_UNSPECIFIED", @@ -776,105 +524,72 @@ "SINGLE_DEVICE_STATUS_INVALID_SECTION_TYPE", "SINGLE_DEVICE_STATUS_SECTION_NOT_YOURS" ], - "description": "Process result." - }, - "errorIdentifier": { - "description": "Error identifier.", + "description": "Process result.", "type": "string" - }, - "errorMessage": { - "description": "Error message", - "type": "string" - }, - "deviceId": { - "type": "string", - "format": "int64", - "description": "device id of the device if process succeeds." } }, - "id": "PerDeviceStatusInBatch" - }, - "ClaimDevicesRequest": { - "description": "Request to claim devices asynchronously in batch.", - "type": "object", - "properties": { - "claims": { - "description": "list of claims.", - "items": { - "$ref": "PartnerClaim" - }, - "type": "array" - } - }, - "id": "ClaimDevicesRequest" + "id": "PerDeviceStatusInBatch", + "description": "Stores the processing result for each device.", + "type": "object" }, "FindDevicesByOwnerRequest": { + "description": "Request to find devices by customers.", + "type": "object", "properties": { "limit": { - "format": "int64", "description": "The number of devices to show in the result.", + "format": "int64", + "type": "string" + }, + "pageToken": { + "description": "Page token.", "type": "string" }, "sectionType": { + "enumDescriptions": [ + "Unspecified section type.", + "Zero touch section type." + ], "enum": [ "SECTION_TYPE_UNSPECIFIED", "SECTION_TYPE_ZERO_TOUCH" ], "description": "The section type.", - "type": "string", - "enumDescriptions": [ - "Unspecified", - "Zero touch" - ] - }, - "pageToken": { - "type": "string", - "description": "Page token" + "type": "string" }, "customerId": { - "description": "List of customer ids to search for.", + "description": "List of customer IDs to search for.", + "type": "array", "items": { "format": "int64", "type": "string" - }, - "type": "array" + } } }, - "id": "FindDevicesByOwnerRequest", - "description": "Request to find devices by customers.", - "type": "object" + "id": "FindDevicesByOwnerRequest" }, - "DeviceIdentifier": { - "description": "DeviceIdentifiers identifies an unique device.", - "type": "object", + "ClaimDevicesRequest": { "properties": { - "model": { - "description": "Model to match android.os.Build.MODEL (required).", - "type": "string" - }, - "imei": { - "description": "IMEI (either IMEI or MEID is required).", - "type": "string" - }, - "manufacturer": { - "description": "Manufacturer to match android.os.Build.MANUFACTURER (required).", - "type": "string" - }, - "meid": { - "description": "MEID", - "type": "string" - }, - "serialNumber": { - "description": "Serial number (optional)", - "type": "string" + "claims": { + "description": "List of claims.", + "type": "array", + "items": { + "$ref": "PartnerClaim" + } } }, - "id": "DeviceIdentifier" + "id": "ClaimDevicesRequest", + "description": "Request to claim devices asynchronously in batch.", + "type": "object" }, "Operation": { "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, "response": { "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", @@ -888,59 +603,78 @@ "type": "string" }, "error": { - "$ref": "Status", - "description": "This field will always be not set if the operation is created by `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`. In this case, error information for each device is set in `response.perDeviceStatus.result.status`." + "description": "This field will always be not set if the operation is created by `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`. In this case, error information for each device is set in `response.perDeviceStatus.result.status`.", + "$ref": "Status" }, "metadata": { - "description": "This field will contain a `DevicesLongRunningOperationMetadata` object if the operation is created by `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`.", - "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - } - }, - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" + }, + "description": "This field will contain a `DevicesLongRunningOperationMetadata` object if the operation is created by `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`.", + "type": "object" } }, "id": "Operation" }, - "UnclaimDevicesRequest": { + "DeviceIdentifier": { + "description": "Identifies a unique device.", "type": "object", + "properties": { + "imei": { + "description": "IMEI number.", + "type": "string" + }, + "meid": { + "description": "MEID number.", + "type": "string" + }, + "manufacturer": { + "description": "Manufacturer name to match `android.os.Build.MANUFACTURER` (required).\nAllowed values listed in\n[manufacturer names](/zero-touch/resources/manufacturer-names).", + "type": "string" + }, + "serialNumber": { + "description": "Serial number (optional).", + "type": "string" + } + }, + "id": "DeviceIdentifier" + }, + "UnclaimDevicesRequest": { "properties": { "unclaims": { - "description": "list of unclaims.", + "description": "List of devices to unclaim.", + "type": "array", "items": { "$ref": "PartnerUnclaim" - }, - "type": "array" + } } }, "id": "UnclaimDevicesRequest", - "description": "Request to unclaim devices asynchronously in batch." + "description": "Request to unclaim devices asynchronously in batch.", + "type": "object" }, "Status": { "properties": { - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - }, "details": { "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "type": "array", "items": { "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, "type": "object" - }, - "type": "array" + } }, "code": { - "format": "int32", "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" } }, "id": "Status", @@ -948,65 +682,393 @@ "type": "object" }, "FindDevicesByDeviceIdentifierRequest": { - "type": "object", "properties": { - "limit": { - "type": "string", - "format": "int64", - "description": "Number of devices to show." - }, "deviceIdentifier": { "$ref": "DeviceIdentifier", - "description": "The device identifier to search" + "description": "The device identifier to search." }, "pageToken": { - "description": "Page token", + "description": "Page token.", + "type": "string" + }, + "limit": { + "description": "Number of devices to show.", + "format": "int64", "type": "string" } }, "id": "FindDevicesByDeviceIdentifierRequest", - "description": "Request to find devices." + "description": "Request to find devices.", + "type": "object" }, "OperationPerDevice": { + "description": "Operation the server received for every device.", "type": "object", "properties": { + "claim": { + "$ref": "PartnerClaim", + "description": "Request to claim a device." + }, + "updateMetadata": { + "description": "Request to set metadata for a device.", + "$ref": "UpdateMetadataArguments" + }, + "unclaim": { + "description": "Request to unclaim a device.", + "$ref": "PartnerUnclaim" + }, "result": { "$ref": "PerDeviceStatusInBatch", "description": "Processing result for every device." - }, - "unclaim": { - "$ref": "PartnerUnclaim", - "description": "Request to unclaim a device." - }, - "claim": { - "description": "Request to claim a device.", - "$ref": "PartnerClaim" - }, - "updateMetadata": { - "$ref": "UpdateMetadataArguments", - "description": "Request to set metadata for a device." } }, - "id": "OperationPerDevice", - "description": "Operation the server received for every device." + "id": "OperationPerDevice" }, "FindDevicesByOwnerResponse": { "description": "Response containing found devices.", "type": "object", "properties": { - "nextPageToken": { - "description": "Page token of next page", - "type": "string" - }, "devices": { "description": "Devices found.", + "type": "array", "items": { "$ref": "Device" - }, - "type": "array" + } + }, + "nextPageToken": { + "description": "Page token of the next page.", + "type": "string" } }, "id": "FindDevicesByOwnerResponse" + }, + "DevicesLongRunningOperationMetadata": { + "description": "Long running operation metadata.", + "type": "object", + "properties": { + "devicesCount": { + "description": "Number of devices parsed in your requests.", + "format": "int32", + "type": "integer" + }, + "processingStatus": { + "enumDescriptions": [ + "Invalid code. Shouldn't be used.", + "Pending.", + "In progress.", + "Processed.\nThis doesn't mean all items were processed sucessfully, you should\ncheck the `response` field for the result of every item." + ], + "enum": [ + "BATCH_PROCESS_STATUS_UNSPECIFIED", + "BATCH_PROCESS_PENDING", + "BATCH_PROCESS_IN_PROGRESS", + "BATCH_PROCESS_PROCESSED" + ], + "description": "The overall processing status.", + "type": "string" + }, + "progress": { + "description": "Processing progress from 0 to 100.", + "format": "int32", + "type": "integer" + } + }, + "id": "DevicesLongRunningOperationMetadata" + }, + "ClaimDeviceRequest": { + "properties": { + "deviceIdentifier": { + "description": "The device identifier of the device to claim.", + "$ref": "DeviceIdentifier" + }, + "sectionType": { + "enum": [ + "SECTION_TYPE_UNSPECIFIED", + "SECTION_TYPE_ZERO_TOUCH" + ], + "description": "The section to claim.", + "type": "string", + "enumDescriptions": [ + "Unspecified section type.", + "Zero touch section type." + ] + }, + "customerId": { + "description": "The customer to claim for.", + "format": "int64", + "type": "string" + } + }, + "id": "ClaimDeviceRequest", + "description": "Request message to claim a device on behalf of a customer.", + "type": "object" + }, + "UpdateDeviceMetadataInBatchRequest": { + "description": "Request to update device metadata in batch.", + "type": "object", + "properties": { + "updates": { + "description": "List of metadata updates.", + "type": "array", + "items": { + "$ref": "UpdateMetadataArguments" + } + } + }, + "id": "UpdateDeviceMetadataInBatchRequest" + }, + "UpdateMetadataArguments": { + "properties": { + "deviceId": { + "description": "Device ID of the device.", + "format": "int64", + "type": "string" + }, + "deviceIdentifier": { + "description": "Device identifier.", + "$ref": "DeviceIdentifier" + }, + "deviceMetadata": { + "$ref": "DeviceMetadata", + "description": "The metadata to update." + } + }, + "id": "UpdateMetadataArguments", + "description": "Identifies metdata updates to one device.", + "type": "object" + }, + "ClaimDeviceResponse": { + "description": "Response message containing device id of the claim.", + "type": "object", + "properties": { + "deviceId": { + "description": "The device ID of the claimed device.", + "format": "int64", + "type": "string" + }, + "deviceName": { + "description": "The resource name of the device in the format\n`partners/[PARTNER_ID]/devices/[DEVICE_ID]`.", + "type": "string" + } + }, + "id": "ClaimDeviceResponse" + }, + "ListCustomersResponse": { + "description": "Response message of all customers related to this partner.", + "type": "object", + "properties": { + "customers": { + "description": "List of customers related to this partner.", + "type": "array", + "items": { + "$ref": "Company" + } + } + }, + "id": "ListCustomersResponse" + }, + "Device": { + "description": "An Android device.", + "type": "object", + "properties": { + "deviceId": { + "description": "Device ID.", + "format": "int64", + "type": "string" + }, + "configuration": { + "description": "The resource name of the configuration.\nOnly set for customers.", + "type": "string" + }, + "claims": { + "description": "Claims.", + "type": "array", + "items": { + "$ref": "DeviceClaim" + } + }, + "deviceIdentifier": { + "description": "Device identifier.", + "$ref": "DeviceIdentifier" + }, + "deviceMetadata": { + "$ref": "DeviceMetadata", + "description": "Device metadata." + }, + "name": { + "description": "Resource name in `partners/[PARTNER_ID]/devices/[DEVICE_ID]`.", + "type": "string" + } + }, + "id": "Device" + }, + "CreateCustomerRequest": { + "description": "Request message to create a customer.", + "type": "object", + "properties": { + "customer": { + "$ref": "Company", + "description": "The customer to create." + } + }, + "id": "CreateCustomerRequest" + }, + "Company": { + "properties": { + "ownerEmails": { + "description": "Owner emails.\nOwners are able to operate on the portal, and modify admins or other\nowners. This field is a write-only field at creation time.", + "type": "array", + "items": { + "type": "string" + } + }, + "companyId": { + "description": "Company ID.", + "format": "int64", + "type": "string" + }, + "companyName": { + "description": "Company name.", + "type": "string" + }, + "name": { + "description": "The API resource name of the company in the format\n`partners/[PARTNER_ID]/customers/[CUSTOMER_ID]`.", + "type": "string" + }, + "adminEmails": { + "description": "Admin emails.\nAdmins are able to operate on the portal.\nThis field is a write-only field at creation time.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "Company", + "description": "Company", + "type": "object" + }, + "UpdateDeviceMetadataRequest": { + "properties": { + "deviceMetadata": { + "$ref": "DeviceMetadata", + "description": "The metdata to set." + } + }, + "id": "UpdateDeviceMetadataRequest", + "description": "Request to set metadata for a device.", + "type": "object" + }, + "PartnerUnclaim": { + "description": "Identifies one unclaim request.", + "type": "object", + "properties": { + "deviceId": { + "description": "Device ID of the device.", + "format": "int64", + "type": "string" + }, + "deviceIdentifier": { + "description": "Device identifier of the device.", + "$ref": "DeviceIdentifier" + }, + "sectionType": { + "enum": [ + "SECTION_TYPE_UNSPECIFIED", + "SECTION_TYPE_ZERO_TOUCH" + ], + "description": "Section type to unclaim.", + "type": "string", + "enumDescriptions": [ + "Unspecified section type.", + "Zero touch section type." + ] + } + }, + "id": "PartnerUnclaim" + }, + "Empty": { + "properties": {}, + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object" + }, + "FindDevicesByDeviceIdentifierResponse": { + "properties": { + "nextPageToken": { + "description": "Page token of the next page.", + "type": "string" + }, + "devices": { + "description": "Found devices.", + "type": "array", + "items": { + "$ref": "Device" + } + } + }, + "id": "FindDevicesByDeviceIdentifierResponse", + "description": "Response containing found devices.", + "type": "object" + }, + "PartnerClaim": { + "properties": { + "deviceIdentifier": { + "description": "Device identifier of the device.", + "$ref": "DeviceIdentifier" + }, + "deviceMetadata": { + "description": "Metadata to set at claim.", + "$ref": "DeviceMetadata" + }, + "sectionType": { + "enum": [ + "SECTION_TYPE_UNSPECIFIED", + "SECTION_TYPE_ZERO_TOUCH" + ], + "description": "Section type to claim.", + "type": "string", + "enumDescriptions": [ + "Unspecified section type.", + "Zero touch section type." + ] + }, + "customerId": { + "description": "Customer ID to claim for.", + "format": "int64", + "type": "string" + } + }, + "id": "PartnerClaim", + "description": "Identifies one claim request.", + "type": "object" + }, + "UnclaimDeviceRequest": { + "properties": { + "deviceId": { + "description": "The device ID returned by `ClaimDevice`.", + "format": "int64", + "type": "string" + }, + "deviceIdentifier": { + "$ref": "DeviceIdentifier", + "description": "The device identifier you used when you claimed this device." + }, + "sectionType": { + "enumDescriptions": [ + "Unspecified section type.", + "Zero touch section type." + ], + "enum": [ + "SECTION_TYPE_UNSPECIFIED", + "SECTION_TYPE_ZERO_TOUCH" + ], + "description": "The section type to unclaim for.", + "type": "string" + } + }, + "id": "UnclaimDeviceRequest", + "description": "Request message to unclaim a device.", + "type": "object" } }, "protocol": "rest", @@ -1015,13 +1077,5 @@ "x32": "http://www.google.com/images/icons/product/search-32.gif" }, "version": "v1", - "baseUrl": "https://androiddeviceprovisioning.googleapis.com/", - "canonicalName": "Android Provisioning Partner", - "servicePath": "", - "description": "Android Device Provisioning Partner API", - "kind": "discovery#restDescription", - "rootUrl": "https://androiddeviceprovisioning.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "androiddeviceprovisioning" + "baseUrl": "https://androiddeviceprovisioning.googleapis.com/" } diff --git a/vendor/google.golang.org/api/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go b/vendor/google.golang.org/api/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go index 777982ad4..cc6f9415c 100644 --- a/vendor/google.golang.org/api/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go +++ b/vendor/google.golang.org/api/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go @@ -123,11 +123,11 @@ type ClaimDeviceRequest struct { // DeviceIdentifier: The device identifier of the device to claim. DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"` - // SectionType: Section to claim + // SectionType: The section to claim. // // Possible values: - // "SECTION_TYPE_UNSPECIFIED" - Unspecified - // "SECTION_TYPE_ZERO_TOUCH" - Zero touch + // "SECTION_TYPE_UNSPECIFIED" - Unspecified section type. + // "SECTION_TYPE_ZERO_TOUCH" - Zero touch section type. SectionType string `json:"sectionType,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomerId") to @@ -156,12 +156,12 @@ func (s *ClaimDeviceRequest) MarshalJSON() ([]byte, error) { // ClaimDeviceResponse: Response message containing device id of the // claim. type ClaimDeviceResponse struct { - // DeviceId: the device id of the claimed device. + // DeviceId: The device ID of the claimed device. DeviceId int64 `json:"deviceId,omitempty,string"` - // DeviceName: the resource name of the device - // in - // 'partners/[PARTNER_ID]/devices/[DEVICE_ID]'. + // DeviceName: The resource name of the device in the + // format + // `partners/[PARTNER_ID]/devices/[DEVICE_ID]`. DeviceName string `json:"deviceName,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -194,7 +194,7 @@ func (s *ClaimDeviceResponse) MarshalJSON() ([]byte, error) { // ClaimDevicesRequest: Request to claim devices asynchronously in // batch. type ClaimDevicesRequest struct { - // Claims: list of claims. + // Claims: List of claims. Claims []*PartnerClaim `json:"claims,omitempty"` // ForceSendFields is a list of field names (e.g. "Claims") to @@ -222,13 +222,33 @@ func (s *ClaimDevicesRequest) MarshalJSON() ([]byte, error) { // Company: Company type Company struct { - // CompanyId: company id + // AdminEmails: Admin emails. + // Admins are able to operate on the portal. + // This field is a write-only field at creation time. + AdminEmails []string `json:"adminEmails,omitempty"` + + // CompanyId: Company ID. CompanyId int64 `json:"companyId,omitempty,string"` - // CompanyName: company name + // CompanyName: Company name. CompanyName string `json:"companyName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CompanyId") to + // Name: The API resource name of the company in the + // format + // `partners/[PARTNER_ID]/customers/[CUSTOMER_ID]`. + Name string `json:"name,omitempty"` + + // OwnerEmails: Owner emails. + // Owners are able to operate on the portal, and modify admins or + // other + // owners. This field is a write-only field at creation time. + OwnerEmails []string `json:"ownerEmails,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AdminEmails") 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 @@ -236,10 +256,10 @@ type Company struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompanyId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AdminEmails") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -251,21 +271,53 @@ func (s *Company) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Device: Device +// CreateCustomerRequest: Request message to create a customer. +type CreateCustomerRequest struct { + // Customer: The customer to create. + Customer *Company `json:"customer,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Customer") 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. "Customer") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateCustomerRequest) MarshalJSON() ([]byte, error) { + type noMethod CreateCustomerRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Device: An Android device. type Device struct { - // Claims: claims + // Claims: Claims. Claims []*DeviceClaim `json:"claims,omitempty"` - // DeviceId: Device id + // Configuration: The resource name of the configuration. + // Only set for customers. + Configuration string `json:"configuration,omitempty"` + + // DeviceId: Device ID. DeviceId int64 `json:"deviceId,omitempty,string"` - // DeviceIdentifier: Device identifier + // DeviceIdentifier: Device identifier. DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"` - // DeviceMetadata: Device metadata + // DeviceMetadata: Device metadata. DeviceMetadata *DeviceMetadata `json:"deviceMetadata,omitempty"` - // Name: Resource name in 'partners/[PARTNER_ID]/devices/[DEVICE_ID]'. + // Name: Resource name in `partners/[PARTNER_ID]/devices/[DEVICE_ID]`. Name string `json:"name,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -295,17 +347,16 @@ func (s *Device) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DeviceClaim: containing the necessary info about a claim for a -// partner. +// DeviceClaim: Information about a device claimed for a partner. type DeviceClaim struct { - // OwnerCompanyId: owner id + // OwnerCompanyId: Owner ID. OwnerCompanyId int64 `json:"ownerCompanyId,omitempty,string"` - // SectionType: section type. + // SectionType: Section type of the device claim. // // Possible values: - // "SECTION_TYPE_UNSPECIFIED" - Unspecified - // "SECTION_TYPE_ZERO_TOUCH" - Zero touch + // "SECTION_TYPE_UNSPECIFIED" - Unspecified section type. + // "SECTION_TYPE_ZERO_TOUCH" - Zero touch section type. SectionType string `json:"sectionType,omitempty"` // ForceSendFields is a list of field names (e.g. "OwnerCompanyId") to @@ -332,22 +383,21 @@ func (s *DeviceClaim) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DeviceIdentifier: DeviceIdentifiers identifies an unique device. +// DeviceIdentifier: Identifies a unique device. type DeviceIdentifier struct { - // Imei: IMEI (either IMEI or MEID is required). + // Imei: IMEI number. Imei string `json:"imei,omitempty"` - // Manufacturer: Manufacturer to match android.os.Build.MANUFACTURER - // (required). + // Manufacturer: Manufacturer name to match + // `android.os.Build.MANUFACTURER` (required). + // Allowed values listed in + // [manufacturer names](/zero-touch/resources/manufacturer-names). Manufacturer string `json:"manufacturer,omitempty"` - // Meid: MEID + // Meid: MEID number. Meid string `json:"meid,omitempty"` - // Model: Model to match android.os.Build.MODEL (required). - Model string `json:"model,omitempty"` - - // SerialNumber: Serial number (optional) + // SerialNumber: Serial number (optional). SerialNumber string `json:"serialNumber,omitempty"` // ForceSendFields is a list of field names (e.g. "Imei") to @@ -373,7 +423,7 @@ func (s *DeviceIdentifier) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DeviceMetadata: metadata +// DeviceMetadata: A key-value pair of the device metadata. type DeviceMetadata struct { // Entries: Metadata entries Entries map[string]string `json:"entries,omitempty"` @@ -415,8 +465,8 @@ type DevicesLongRunningOperationMetadata struct { // Possible values: // "BATCH_PROCESS_STATUS_UNSPECIFIED" - Invalid code. Shouldn't be // used. - // "BATCH_PROCESS_PENDING" - Pending - // "BATCH_PROCESS_IN_PROGRESS" - In progress + // "BATCH_PROCESS_PENDING" - Pending. + // "BATCH_PROCESS_IN_PROGRESS" - In progress. // "BATCH_PROCESS_PROCESSED" - Processed. // This doesn't mean all items were processed sucessfully, you // should @@ -451,8 +501,8 @@ func (s *DevicesLongRunningOperationMetadata) MarshalJSON() ([]byte, error) { // DevicesLongRunningOperationResponse: Long running operation response. type DevicesLongRunningOperationResponse struct { - // PerDeviceStatus: processing status for each device. - // One PerDeviceStatus per device. The order is the same as in your + // PerDeviceStatus: Processing status for each device. + // One `PerDeviceStatus` per device. The order is the same as in your // requests. PerDeviceStatus []*OperationPerDevice `json:"perDeviceStatus,omitempty"` @@ -503,13 +553,13 @@ type Empty struct { // FindDevicesByDeviceIdentifierRequest: Request to find devices. type FindDevicesByDeviceIdentifierRequest struct { - // DeviceIdentifier: The device identifier to search + // DeviceIdentifier: The device identifier to search. DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"` // Limit: Number of devices to show. Limit int64 `json:"limit,omitempty,string"` - // PageToken: Page token + // PageToken: Page token. PageToken string `json:"pageToken,omitempty"` // ForceSendFields is a list of field names (e.g. "DeviceIdentifier") to @@ -542,7 +592,7 @@ type FindDevicesByDeviceIdentifierResponse struct { // Devices: Found devices. Devices []*Device `json:"devices,omitempty"` - // NextPageToken: Page token of next page + // NextPageToken: Page token of the next page. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -574,20 +624,20 @@ func (s *FindDevicesByDeviceIdentifierResponse) MarshalJSON() ([]byte, error) { // FindDevicesByOwnerRequest: Request to find devices by customers. type FindDevicesByOwnerRequest struct { - // CustomerId: List of customer ids to search for. + // CustomerId: List of customer IDs to search for. CustomerId googleapi.Int64s `json:"customerId,omitempty"` // Limit: The number of devices to show in the result. Limit int64 `json:"limit,omitempty,string"` - // PageToken: Page token + // PageToken: Page token. PageToken string `json:"pageToken,omitempty"` // SectionType: The section type. // // Possible values: - // "SECTION_TYPE_UNSPECIFIED" - Unspecified - // "SECTION_TYPE_ZERO_TOUCH" - Zero touch + // "SECTION_TYPE_UNSPECIFIED" - Unspecified section type. + // "SECTION_TYPE_ZERO_TOUCH" - Zero touch section type. SectionType string `json:"sectionType,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomerId") to @@ -618,7 +668,7 @@ type FindDevicesByOwnerResponse struct { // Devices: Devices found. Devices []*Device `json:"devices,omitempty"` - // NextPageToken: Page token of next page + // NextPageToken: Page token of the next page. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -687,8 +737,8 @@ func (s *ListCustomersResponse) MarshalJSON() ([]byte, error) { type Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` @@ -781,20 +831,20 @@ func (s *OperationPerDevice) MarshalJSON() ([]byte, error) { // PartnerClaim: Identifies one claim request. type PartnerClaim struct { - // CustomerId: customer id to claim for. + // CustomerId: Customer ID to claim for. CustomerId int64 `json:"customerId,omitempty,string"` // DeviceIdentifier: Device identifier of the device. DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"` - // DeviceMetadata: metadata to set at claim. + // DeviceMetadata: Metadata to set at claim. DeviceMetadata *DeviceMetadata `json:"deviceMetadata,omitempty"` - // SectionType: section type to claim. + // SectionType: Section type to claim. // // Possible values: - // "SECTION_TYPE_UNSPECIFIED" - Unspecified - // "SECTION_TYPE_ZERO_TOUCH" - Zero touch + // "SECTION_TYPE_UNSPECIFIED" - Unspecified section type. + // "SECTION_TYPE_ZERO_TOUCH" - Zero touch section type. SectionType string `json:"sectionType,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomerId") to @@ -822,17 +872,17 @@ func (s *PartnerClaim) MarshalJSON() ([]byte, error) { // PartnerUnclaim: Identifies one unclaim request. type PartnerUnclaim struct { - // DeviceId: device id of the device. + // DeviceId: Device ID of the device. DeviceId int64 `json:"deviceId,omitempty,string"` - // DeviceIdentifier: device identifier of the device. + // DeviceIdentifier: Device identifier of the device. DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"` - // SectionType: section type to unclaim. + // SectionType: Section type to unclaim. // // Possible values: - // "SECTION_TYPE_UNSPECIFIED" - Unspecified - // "SECTION_TYPE_ZERO_TOUCH" - Zero touch + // "SECTION_TYPE_UNSPECIFIED" - Unspecified section type. + // "SECTION_TYPE_ZERO_TOUCH" - Zero touch section type. SectionType string `json:"sectionType,omitempty"` // ForceSendFields is a list of field names (e.g. "DeviceId") to @@ -860,33 +910,33 @@ func (s *PartnerUnclaim) MarshalJSON() ([]byte, error) { // PerDeviceStatusInBatch: Stores the processing result for each device. type PerDeviceStatusInBatch struct { - // DeviceId: device id of the device if process succeeds. + // DeviceId: Device ID of the device if process succeeds. DeviceId int64 `json:"deviceId,omitempty,string"` // ErrorIdentifier: Error identifier. ErrorIdentifier string `json:"errorIdentifier,omitempty"` - // ErrorMessage: Error message + // ErrorMessage: Error message. ErrorMessage string `json:"errorMessage,omitempty"` // Status: Process result. // // Possible values: - // "SINGLE_DEVICE_STATUS_UNSPECIFIED" - Invalid code. Shouldn' be + // "SINGLE_DEVICE_STATUS_UNSPECIFIED" - Invalid code. Shouldn't be // used. // "SINGLE_DEVICE_STATUS_UNKNOWN_ERROR" - Unknown error. - // Unknown error is we don't expect it here. + // We don't expect this error to occur here. // "SINGLE_DEVICE_STATUS_OTHER_ERROR" - Other error. - // Other error is we know/expect this error, but not having proper - // error - // code yet. + // We know/expect this error, but there's no defined error code for + // the + // error. // "SINGLE_DEVICE_STATUS_SUCCESS" - Success. - // "SINGLE_DEVICE_STATUS_PERMISSION_DENIED" - Permission denied + // "SINGLE_DEVICE_STATUS_PERMISSION_DENIED" - Permission denied. // "SINGLE_DEVICE_STATUS_INVALID_DEVICE_IDENTIFIER" - Invalid device // identifier. // "SINGLE_DEVICE_STATUS_INVALID_SECTION_TYPE" - Invalid section type. // "SINGLE_DEVICE_STATUS_SECTION_NOT_YOURS" - This section is claimed - // by other company. + // by another company. Status string `json:"status,omitempty"` // ForceSendFields is a list of field names (e.g. "DeviceId") to @@ -1033,18 +1083,18 @@ func (s *Status) MarshalJSON() ([]byte, error) { // UnclaimDeviceRequest: Request message to unclaim a device. type UnclaimDeviceRequest struct { - // DeviceId: The device id returned by ClaimDevice. + // DeviceId: The device ID returned by `ClaimDevice`. DeviceId int64 `json:"deviceId,omitempty,string"` - // DeviceIdentifier: The device identifier you use when you claimed this - // device. + // DeviceIdentifier: The device identifier you used when you claimed + // this device. DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"` // SectionType: The section type to unclaim for. // // Possible values: - // "SECTION_TYPE_UNSPECIFIED" - Unspecified - // "SECTION_TYPE_ZERO_TOUCH" - Zero touch + // "SECTION_TYPE_UNSPECIFIED" - Unspecified section type. + // "SECTION_TYPE_ZERO_TOUCH" - Zero touch section type. SectionType string `json:"sectionType,omitempty"` // ForceSendFields is a list of field names (e.g. "DeviceId") to @@ -1073,7 +1123,7 @@ func (s *UnclaimDeviceRequest) MarshalJSON() ([]byte, error) { // UnclaimDevicesRequest: Request to unclaim devices asynchronously in // batch. type UnclaimDevicesRequest struct { - // Unclaims: list of unclaims. + // Unclaims: List of devices to unclaim. Unclaims []*PartnerUnclaim `json:"unclaims,omitempty"` // ForceSendFields is a list of field names (e.g. "Unclaims") to @@ -1102,7 +1152,7 @@ func (s *UnclaimDevicesRequest) MarshalJSON() ([]byte, error) { // UpdateDeviceMetadataInBatchRequest: Request to update device metadata // in batch. type UpdateDeviceMetadataInBatchRequest struct { - // Updates: list of metadata updates. + // Updates: List of metadata updates. Updates []*UpdateMetadataArguments `json:"updates,omitempty"` // ForceSendFields is a list of field names (e.g. "Updates") to @@ -1159,10 +1209,10 @@ func (s *UpdateDeviceMetadataRequest) MarshalJSON() ([]byte, error) { // UpdateMetadataArguments: Identifies metdata updates to one device. type UpdateMetadataArguments struct { - // DeviceId: device id of the device. + // DeviceId: Device ID of the device. DeviceId int64 `json:"deviceId,omitempty,string"` - // DeviceIdentifier: device identifier. + // DeviceIdentifier: Device identifier. DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"` // DeviceMetadata: The metadata to update. @@ -1331,6 +1381,141 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) } +// method id "androiddeviceprovisioning.partners.customers.create": + +type PartnersCustomersCreateCall struct { + s *Service + parent string + createcustomerrequest *CreateCustomerRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: A customer for Zero Touch Provisioning will be created. +// After a Customer is created, their admins and owners will be able to +// manage +// devices on partner.android.com/zerotouch or via their API. +func (r *PartnersCustomersService) Create(parent string, createcustomerrequest *CreateCustomerRequest) *PartnersCustomersCreateCall { + c := &PartnersCustomersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.createcustomerrequest = createcustomerrequest + 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 *PartnersCustomersCreateCall) Fields(s ...googleapi.Field) *PartnersCustomersCreateCall { + 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 *PartnersCustomersCreateCall) Context(ctx context.Context) *PartnersCustomersCreateCall { + 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 *PartnersCustomersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PartnersCustomersCreateCall) 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.createcustomerrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customers") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "androiddeviceprovisioning.partners.customers.create" call. +// Exactly one of *Company or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Company.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *PartnersCustomersCreateCall) Do(opts ...googleapi.CallOption) (*Company, 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 := &Company{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "A customer for Zero Touch Provisioning will be created.\nAfter a Customer is created, their admins and owners will be able to manage\ndevices on partner.android.com/zerotouch or via their API.", + // "flatPath": "v1/partners/{partnersId}/customers", + // "httpMethod": "POST", + // "id": "androiddeviceprovisioning.partners.customers.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The parent resource in format `partners/[PARTNER_ID]'.", + // "location": "path", + // "pattern": "^partners/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/customers", + // "request": { + // "$ref": "CreateCustomerRequest" + // }, + // "response": { + // "$ref": "Company" + // } + // } + +} + // method id "androiddeviceprovisioning.partners.customers.list": type PartnersCustomersListCall struct { @@ -1342,8 +1527,11 @@ type PartnersCustomersListCall struct { header_ http.Header } -// List: List all the customers that has delegates some role to this -// customer. +// List: List the customers that are enrolled to the reseller identified +// by the +// `partnerId` argument. This list includes customers that the +// reseller +// created and customers that enrolled themselves using the portal. func (r *PartnersCustomersService) List(partnerId int64) *PartnersCustomersListCall { c := &PartnersCustomersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.partnerId = partnerId @@ -1444,7 +1632,7 @@ func (c *PartnersCustomersListCall) Do(opts ...googleapi.CallOption) (*ListCusto } return ret, nil // { - // "description": "List all the customers that has delegates some role to this customer.", + // "description": "List the customers that are enrolled to the reseller identified by the\n`partnerId` argument. This list includes customers that the reseller\ncreated and customers that enrolled themselves using the portal.", // "flatPath": "v1/partners/{partnersId}/customers", // "httpMethod": "GET", // "id": "androiddeviceprovisioning.partners.customers.list", @@ -1453,7 +1641,7 @@ func (c *PartnersCustomersListCall) Do(opts ...googleapi.CallOption) (*ListCusto // ], // "parameters": { // "partnerId": { - // "description": "the id of the partner.", + // "description": "The ID of the partner.", // "format": "int64", // "location": "path", // "pattern": "^[^/]+$", @@ -1583,7 +1771,7 @@ func (c *PartnersDevicesClaimCall) Do(opts ...googleapi.CallOption) (*ClaimDevic // ], // "parameters": { // "partnerId": { - // "description": "Id of the partner.", + // "description": "ID of the partner.", // "format": "int64", // "location": "path", // "pattern": "^[^/]+$", @@ -1613,7 +1801,7 @@ type PartnersDevicesClaimAsyncCall struct { header_ http.Header } -// ClaimAsync: Claim devices asynchronously +// ClaimAsync: Claim devices asynchronously. func (r *PartnersDevicesService) ClaimAsync(partnerId int64, claimdevicesrequest *ClaimDevicesRequest) *PartnersDevicesClaimAsyncCall { c := &PartnersDevicesClaimAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.partnerId = partnerId @@ -1707,7 +1895,7 @@ func (c *PartnersDevicesClaimAsyncCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Claim devices asynchronously", + // "description": "Claim devices asynchronously.", // "flatPath": "v1/partners/{partnersId}/devices:claimAsync", // "httpMethod": "POST", // "id": "androiddeviceprovisioning.partners.devices.claimAsync", @@ -1716,7 +1904,7 @@ func (c *PartnersDevicesClaimAsyncCall) Do(opts ...googleapi.CallOption) (*Opera // ], // "parameters": { // "partnerId": { - // "description": "partner id.", + // "description": "Partner ID.", // "format": "int64", // "location": "path", // "pattern": "^[^/]+$", @@ -1850,7 +2038,7 @@ func (c *PartnersDevicesFindByIdentifierCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "partnerId": { - // "description": "id of the partner.", + // "description": "ID of the partner.", // "format": "int64", // "location": "path", // "pattern": "^[^/]+$", @@ -2004,7 +2192,7 @@ func (c *PartnersDevicesFindByOwnerCall) Do(opts ...googleapi.CallOption) (*Find // ], // "parameters": { // "partnerId": { - // "description": "id of the partner.", + // "description": "ID of the partner.", // "format": "int64", // "location": "path", // "pattern": "^[^/]+$", @@ -2055,7 +2243,7 @@ type PartnersDevicesGetCall struct { header_ http.Header } -// Get: Get a device +// Get: Get a device. func (r *PartnersDevicesService) Get(name string) *PartnersDevicesGetCall { c := &PartnersDevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -2156,7 +2344,7 @@ func (c *PartnersDevicesGetCall) Do(opts ...googleapi.CallOption) (*Device, erro } return ret, nil // { - // "description": "Get a device", + // "description": "Get a device.", // "flatPath": "v1/partners/{partnersId}/devices/{devicesId}", // "httpMethod": "GET", // "id": "androiddeviceprovisioning.partners.devices.get", @@ -2165,7 +2353,7 @@ func (c *PartnersDevicesGetCall) Do(opts ...googleapi.CallOption) (*Device, erro // ], // "parameters": { // "name": { - // "description": "resource name in 'partners/[PARTNER_ID]/devices/[DEVICE_ID]'.", + // "description": "Resource name in `partners/[PARTNER_ID]/devices/[DEVICE_ID]`.", // "location": "path", // "pattern": "^partners/[^/]+/devices/[^/]+$", // "required": true, @@ -2192,7 +2380,7 @@ type PartnersDevicesMetadataCall struct { header_ http.Header } -// Metadata: Update the metadata +// Metadata: Update the metadata. func (r *PartnersDevicesService) Metadata(metadataOwnerId int64, deviceId int64, updatedevicemetadatarequest *UpdateDeviceMetadataRequest) *PartnersDevicesMetadataCall { c := &PartnersDevicesMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.metadataOwnerId = metadataOwnerId @@ -2288,7 +2476,7 @@ func (c *PartnersDevicesMetadataCall) Do(opts ...googleapi.CallOption) (*DeviceM } return ret, nil // { - // "description": "Update the metadata", + // "description": "Update the metadata.", // "flatPath": "v1/partners/{partnersId}/devices/{devicesId}/metadata", // "httpMethod": "POST", // "id": "androiddeviceprovisioning.partners.devices.metadata", @@ -2298,7 +2486,7 @@ func (c *PartnersDevicesMetadataCall) Do(opts ...googleapi.CallOption) (*DeviceM // ], // "parameters": { // "deviceId": { - // "description": "id of the partner.", + // "description": "ID of the partner.", // "format": "int64", // "location": "path", // "pattern": "^[^/]+$", @@ -2306,7 +2494,7 @@ func (c *PartnersDevicesMetadataCall) Do(opts ...googleapi.CallOption) (*DeviceM // "type": "string" // }, // "metadataOwnerId": { - // "description": "The owner of the newly set metadata. Should be partner id itself.", + // "description": "The owner of the newly set metadata. Set this to the partner ID.", // "format": "int64", // "location": "path", // "pattern": "^[^/]+$", @@ -2336,7 +2524,8 @@ type PartnersDevicesUnclaimCall struct { header_ http.Header } -// Unclaim: Unclaim the device identified by device_id or identifier. +// Unclaim: Unclaim the device identified by the `device_id` or the +// `deviceIdentifier`. func (r *PartnersDevicesService) Unclaim(partnerId int64, unclaimdevicerequest *UnclaimDeviceRequest) *PartnersDevicesUnclaimCall { c := &PartnersDevicesUnclaimCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.partnerId = partnerId @@ -2430,7 +2619,7 @@ func (c *PartnersDevicesUnclaimCall) Do(opts ...googleapi.CallOption) (*Empty, e } return ret, nil // { - // "description": "Unclaim the device identified by device_id or identifier.", + // "description": "Unclaim the device identified by the `device_id` or the `deviceIdentifier`.", // "flatPath": "v1/partners/{partnersId}/devices:unclaim", // "httpMethod": "POST", // "id": "androiddeviceprovisioning.partners.devices.unclaim", @@ -2439,7 +2628,7 @@ func (c *PartnersDevicesUnclaimCall) Do(opts ...googleapi.CallOption) (*Empty, e // ], // "parameters": { // "partnerId": { - // "description": "Id of the partner.", + // "description": "ID of the partner.", // "format": "int64", // "location": "path", // "pattern": "^[^/]+$", @@ -2469,7 +2658,7 @@ type PartnersDevicesUnclaimAsyncCall struct { header_ http.Header } -// UnclaimAsync: Unclaim devices asynchronously +// UnclaimAsync: Unclaim devices asynchronously. func (r *PartnersDevicesService) UnclaimAsync(partnerId int64, unclaimdevicesrequest *UnclaimDevicesRequest) *PartnersDevicesUnclaimAsyncCall { c := &PartnersDevicesUnclaimAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.partnerId = partnerId @@ -2563,7 +2752,7 @@ func (c *PartnersDevicesUnclaimAsyncCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Unclaim devices asynchronously", + // "description": "Unclaim devices asynchronously.", // "flatPath": "v1/partners/{partnersId}/devices:unclaimAsync", // "httpMethod": "POST", // "id": "androiddeviceprovisioning.partners.devices.unclaimAsync", @@ -2572,7 +2761,7 @@ func (c *PartnersDevicesUnclaimAsyncCall) Do(opts ...googleapi.CallOption) (*Ope // ], // "parameters": { // "partnerId": { - // "description": "partner id.", + // "description": "Partner ID.", // "format": "int64", // "location": "path", // "pattern": "^[^/]+$", @@ -2705,7 +2894,7 @@ func (c *PartnersDevicesUpdateMetadataAsyncCall) Do(opts ...googleapi.CallOption // ], // "parameters": { // "partnerId": { - // "description": "partner id.", + // "description": "Partner ID.", // "format": "int64", // "location": "path", // "pattern": "^[^/]+$", diff --git a/vendor/google.golang.org/api/androidenterprise/v1/androidenterprise-api.json b/vendor/google.golang.org/api/androidenterprise/v1/androidenterprise-api.json index 56f70dce3..67aa53970 100644 --- a/vendor/google.golang.org/api/androidenterprise/v1/androidenterprise-api.json +++ b/vendor/google.golang.org/api/androidenterprise/v1/androidenterprise-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/DGIUP89Ib5-EtHtiJPYksWeqJMc\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/RhIHx1SwfJ96Awey5il5_fqGJDg\"", "discoveryVersion": "v1", "id": "androidenterprise:v1", "name": "androidenterprise", "canonicalName": "Android Enterprise", "version": "v1", - "revision": "20170726", + "revision": "20170830", "title": "Google Play EMM API", "description": "Manages the deployment of apps to Android for Work users.", "ownerDomain": "google.com", @@ -493,7 +493,7 @@ "GroupLicense": { "id": "GroupLicense", "type": "object", - "description": "A group license object indicates a product that an enterprise admin has approved for use in the enterprise. The product may be free or paid. For free products, a group license object is created in these cases: if the enterprise admin approves a product in Google Play, if the product is added to a collection, or if an entitlement for the product is created for a user via the API. For paid products, a group license object is only created as part of the first bulk purchase of that product in Google Play by the enterprise admin.\n\nThe API can be used to query group licenses; the available information includes the total number of licenses purchased (for paid products) and the total number of licenses that have been provisioned, that is, the total number of user entitlements in existence for the product.\n\nGroup license objects are never deleted. If, for example, a free app is added to a collection and then removed, the group license will remain, allowing the enterprise admin to keep track of any remaining entitlements. An enterprise admin may indicate they are no longer interested in the group license by marking it as unapproved in Google Play.", + "description": "Group license objects allow you to keep track of licenses (called entitlements) for both free and paid apps. For a free app, a group license is created when an enterprise admin first approves the product in Google Play or when the first entitlement for the product is created for a user via the API. For a paid app, a group license object is only created when an enterprise admin purchases the product in Google Play for the first time.\n\nUse the API to query group licenses. A Grouplicenses resource includes the total number of licenses purchased (paid apps only) and the total number of licenses currently in use. Iyn other words, the total number of Entitlements that exist for the product.\n\nOnly one group license object is created per product and group license objects are never deleted. If a product is unapproved, its group license remains. This allows enterprise admins to keep track of any remaining entitlements for the product.", "properties": { "acquisitionKind": { "type": "string", @@ -933,7 +933,7 @@ "properties": { "appVersion": { "type": "array", - "description": "App versions currently available for this product. The returned list contains only public versions. Alpha and beta versions are not included.", + "description": "App versions currently available for this product.", "items": { "$ref": "AppVersion" } @@ -971,6 +971,10 @@ "type": "boolean", "description": "Deprecated." }, + "signingCertificate": { + "$ref": "ProductSigningCertificate", + "description": "The certificate used to sign this product." + }, "smallIconUrl": { "type": "string", "description": "A link to a smaller image that can be used as an icon for the product. This image is suitable for use at up to 128px x 128px." @@ -1072,7 +1076,21 @@ }, "productSetBehavior": { "type": "string", - "description": "The interpretation of this product set. \"unknown\" should never be sent and is ignored if received. \"whitelist\" means that the user is entitled to access the product set. \"includeAll\" means that all products are accessible, including products that are approved, products with revoked approval, and products that have never been approved. \"allApproved\" means that the user is entitled to access all products that are approved for the enterprise. If the value is \"allApproved\" or \"includeAll\", the productId field is ignored. If no value is provided, it is interpreted as \"whitelist\" for backwards compatibility." + "description": "The interpretation of this product set. \"unknown\" should never be sent and is ignored if received. \"whitelist\" means that the user is entitled to access the product set. \"includeAll\" means that all products are accessible, including products that are approved, products with revoked approval, and products that have never been approved. \"allApproved\" means that the user is entitled to access all products that are approved for the enterprise. If the value is \"allApproved\" or \"includeAll\", the productId field is ignored. If no value is provided, it is interpreted as \"whitelist\" for backwards compatibility. Further \"allApproved\" or \"includeAll\" does not enable automatic visibility of \"alpha\" or \"beta\" tracks for Android app. Use ProductVisibility to enable \"alpha\" or \"beta\" tracks per user." + } + } + }, + "ProductSigningCertificate": { + "id": "ProductSigningCertificate", + "type": "object", + "properties": { + "certificateHashSha1": { + "type": "string", + "description": "The base64 urlsafe encoded SHA1 hash of the certificate. (This field is deprecated in favor of SHA2-256. It should not be used and may be removed at any time.)" + }, + "certificateHashSha256": { + "type": "string", + "description": "The base64 urlsafe encoded SHA2-256 hash of the certificate." } } }, @@ -1900,7 +1918,7 @@ "id": "androidenterprise.enterprises.sendTestPushNotification", "path": "enterprises/{enterpriseId}/sendTestPushNotification", "httpMethod": "POST", - "description": "Sends a test push notification to validate the EMM integration with the Google Cloud Pub/Sub service for this enterprise.", + "description": "Sends a test notification to validate the EMM integration with the Google Cloud Pub/Sub service for this enterprise.", "parameters": { "enterpriseId": { "type": "string", diff --git a/vendor/google.golang.org/api/androidenterprise/v1/androidenterprise-gen.go b/vendor/google.golang.org/api/androidenterprise/v1/androidenterprise-gen.go index 7b02de763..109451dec 100644 --- a/vendor/google.golang.org/api/androidenterprise/v1/androidenterprise-gen.go +++ b/vendor/google.golang.org/api/androidenterprise/v1/androidenterprise-gen.go @@ -1113,28 +1113,23 @@ func (s *EntitlementsListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GroupLicense: A group license object indicates a product that an -// enterprise admin has approved for use in the enterprise. The product -// may be free or paid. For free products, a group license object is -// created in these cases: if the enterprise admin approves a product in -// Google Play, if the product is added to a collection, or if an -// entitlement for the product is created for a user via the API. For -// paid products, a group license object is only created as part of the -// first bulk purchase of that product in Google Play by the enterprise -// admin. +// GroupLicense: Group license objects allow you to keep track of +// licenses (called entitlements) for both free and paid apps. For a +// free app, a group license is created when an enterprise admin first +// approves the product in Google Play or when the first entitlement for +// the product is created for a user via the API. For a paid app, a +// group license object is only created when an enterprise admin +// purchases the product in Google Play for the first time. // -// The API can be used to query group licenses; the available -// information includes the total number of licenses purchased (for paid -// products) and the total number of licenses that have been -// provisioned, that is, the total number of user entitlements in -// existence for the product. +// Use the API to query group licenses. A Grouplicenses resource +// includes the total number of licenses purchased (paid apps only) and +// the total number of licenses currently in use. Iyn other words, the +// total number of Entitlements that exist for the product. // -// Group license objects are never deleted. If, for example, a free app -// is added to a collection and then removed, the group license will -// remain, allowing the enterprise admin to keep track of any remaining -// entitlements. An enterprise admin may indicate they are no longer -// interested in the group license by marking it as unapproved in Google -// Play. +// Only one group license object is created per product and group +// license objects are never deleted. If a product is unapproved, its +// group license remains. This allows enterprise admins to keep track of +// any remaining entitlements for the product. type GroupLicense struct { // AcquisitionKind: How this group license was acquired. "bulkPurchase" // means that this Grouplicenses resource was created because the @@ -1960,9 +1955,7 @@ func (s *Permission) MarshalJSON() ([]byte, error) { // to the full Google Play details page) is intended to allow a basic // representation of the product within an EMM user interface. type Product struct { - // AppVersion: App versions currently available for this product. The - // returned list contains only public versions. Alpha and beta versions - // are not included. + // AppVersion: App versions currently available for this product. AppVersion []*AppVersion `json:"appVersion,omitempty"` // AuthorName: The name of the author of the product (for example, the @@ -2003,6 +1996,9 @@ type Product struct { // RequiresContainerApp: Deprecated. RequiresContainerApp bool `json:"requiresContainerApp,omitempty"` + // SigningCertificate: The certificate used to sign this product. + SigningCertificate *ProductSigningCertificate `json:"signingCertificate,omitempty"` + // SmallIconUrl: A link to a smaller image that can be used as an icon // for the product. This image is suitable for use at up to 128px x // 128px. @@ -2208,7 +2204,10 @@ type ProductSet struct { // access all products that are approved for the enterprise. If the // value is "allApproved" or "includeAll", the productId field is // ignored. If no value is provided, it is interpreted as "whitelist" - // for backwards compatibility. + // for backwards compatibility. Further "allApproved" or "includeAll" + // does not enable automatic visibility of "alpha" or "beta" tracks for + // Android app. Use ProductVisibility to enable "alpha" or "beta" tracks + // per user. ProductSetBehavior string `json:"productSetBehavior,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -2238,6 +2237,40 @@ func (s *ProductSet) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ProductSigningCertificate struct { + // CertificateHashSha1: The base64 urlsafe encoded SHA1 hash of the + // certificate. (This field is deprecated in favor of SHA2-256. It + // should not be used and may be removed at any time.) + CertificateHashSha1 string `json:"certificateHashSha1,omitempty"` + + // CertificateHashSha256: The base64 urlsafe encoded SHA2-256 hash of + // the certificate. + CertificateHashSha256 string `json:"certificateHashSha256,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CertificateHashSha1") + // 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. "CertificateHashSha1") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ProductSigningCertificate) MarshalJSON() ([]byte, error) { + type noMethod ProductSigningCertificate + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ProductsApproveRequest struct { // ApprovalUrlInfo: The approval URL that was shown to the user. Only // the permissions shown to the user with that URL will be accepted, @@ -5325,8 +5358,8 @@ type EnterprisesSendTestPushNotificationCall struct { header_ http.Header } -// SendTestPushNotification: Sends a test push notification to validate -// the EMM integration with the Google Cloud Pub/Sub service for this +// SendTestPushNotification: Sends a test notification to validate the +// EMM integration with the Google Cloud Pub/Sub service for this // enterprise. func (r *EnterprisesService) SendTestPushNotification(enterpriseId string) *EnterprisesSendTestPushNotificationCall { c := &EnterprisesSendTestPushNotificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -5417,7 +5450,7 @@ func (c *EnterprisesSendTestPushNotificationCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Sends a test push notification to validate the EMM integration with the Google Cloud Pub/Sub service for this enterprise.", + // "description": "Sends a test notification to validate the EMM integration with the Google Cloud Pub/Sub service for this enterprise.", // "httpMethod": "POST", // "id": "androidenterprise.enterprises.sendTestPushNotification", // "parameterOrder": [ diff --git a/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-api.json b/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-api.json index 5877430b3..b4fb4a3ab 100644 --- a/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-api.json +++ b/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-api.json @@ -1,5 +1,14 @@ { "id": "androidmanagement:v1", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/androidmanagement": { + "description": "Manage Android devices and apps for your customers" + } + } + } + }, "description": "The Android Management API provides remote enterprise management of Android devices and apps.", "protocol": "rest", "title": "Android Management API", @@ -17,7 +26,7 @@ "httpMethod": "POST", "parameters": { "callbackUrl": { - "description": "The callback URL to which the admin will be redirected after successfully\ncreating an enterprise. Before redirecting there the system will add a\nquery parameter to this URL named `enterpriseToken` which will\ncontain an opaque token to be used for the\n[create enterprise](/android/management/reference/rest/v1/enterprises/create)\nrequest. The URL will be parsed then reformatted in order to add the\n`enterpriseToken` parameter, so there may be some minor formatting changes.", + "description": "The callback URL to which the admin will be redirected after successfully creating an enterprise. Before redirecting there the system will add a query parameter to this URL named enterpriseToken which will contain an opaque token to be used for the create enterprise request. The URL will be parsed then reformatted in order to add the enterpriseToken parameter, so there may be some minor formatting changes.", "location": "query", "type": "string" }, @@ -27,7 +36,10 @@ "type": "string" } }, - "path": "v1/signupUrls" + "path": "v1/signupUrls", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] } } }, @@ -48,14 +60,17 @@ "httpMethod": "GET", "parameters": { "name": { - "description": "The name of the policy in the form\n`enterprises/{enterpriseId}/policies/{policyId}`", + "description": "The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}", "required": true, "pattern": "^enterprises/[^/]+/policies/[^/]+$", "location": "path", "type": "string" } }, - "path": "v1/{+name}" + "path": "v1/{+name}", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] }, "list": { "id": "androidmanagement.enterprises.policies.list", @@ -70,13 +85,13 @@ "httpMethod": "GET", "parameters": { "pageSize": { - "description": "The requested page size. The actual page size may be fixed to a min or max\nvalue.", + "description": "The requested page size. The actual page size may be fixed to a min or max value.", "location": "query", "type": "integer", "format": "int32" }, "parent": { - "description": "The name of the enterprise in the form\n`enterprises/{enterpriseId}`", + "description": "The name of the enterprise in the form enterprises/{enterpriseId}", "required": true, "pattern": "^enterprises/[^/]+$", "location": "path", @@ -88,7 +103,10 @@ "type": "string" } }, - "path": "v1/{+parent}/policies" + "path": "v1/{+parent}/policies", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] }, "patch": { "id": "androidmanagement.enterprises.policies.patch", @@ -106,20 +124,23 @@ "httpMethod": "PATCH", "parameters": { "updateMask": { - "description": "The field mask indicating the fields to update.\nIf not set, all modifiable fields will be modified.", + "description": "The field mask indicating the fields to update. If not set, all modifiable fields will be modified.", "location": "query", "type": "string", "format": "google-fieldmask" }, "name": { - "description": "The name of the policy in the form\n`enterprises/{enterpriseId}/policies/{policyId}`", + "description": "The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}", "required": true, "pattern": "^enterprises/[^/]+/policies/[^/]+$", "location": "path", "type": "string" } }, - "path": "v1/{+name}" + "path": "v1/{+name}", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] }, "delete": { "id": "androidmanagement.enterprises.policies.delete", @@ -129,19 +150,22 @@ "parameterOrder": [ "name" ], - "description": "Deletes a policy. This operation is only permitted if no devices are\ncurrently referencing the policy.", + "description": "Deletes a policy. This operation is only permitted if no devices are currently referencing the policy.", "flatPath": "v1/enterprises/{enterprisesId}/policies/{policiesId}", "httpMethod": "DELETE", "parameters": { "name": { - "description": "The name of the policy in the form\n`enterprises/{enterpriseId}/policies/{policyId}`", + "description": "The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}", "required": true, "pattern": "^enterprises/[^/]+/policies/[^/]+$", "location": "path", "type": "string" } }, - "path": "v1/{+name}" + "path": "v1/{+name}", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] } } }, @@ -160,19 +184,22 @@ "httpMethod": "GET", "parameters": { "languageCode": { - "description": "The preferred language for localized application info, as a BCP47 tag\n(e.g. \"en-US\", \"de\"). If not specified the default language of the\napplication will be used.", + "description": "The preferred language for localized application info, as a BCP47 tag (e.g. \"en-US\", \"de\"). If not specified the default language of the application will be used.", "location": "query", "type": "string" }, "name": { - "description": "The name of the application in the form\n`enterprises/{enterpriseId}/applications/{package_name}`", + "description": "The name of the application in the form enterprises/{enterpriseId}/applications/{package_name}", "required": true, "pattern": "^enterprises/[^/]+/applications/[^/]+$", "location": "path", "type": "string" } }, - "path": "v1/{+name}" + "path": "v1/{+name}", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] } } }, @@ -194,14 +221,17 @@ "httpMethod": "POST", "parameters": { "parent": { - "description": "The name of the enterprise in the form\n`enterprises/{enterpriseId}`", + "description": "The name of the enterprise in the form enterprises/{enterpriseId}", "required": true, "pattern": "^enterprises/[^/]+$", "location": "path", "type": "string" } }, - "path": "v1/{+parent}/enrollmentTokens" + "path": "v1/{+parent}/enrollmentTokens", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] }, "delete": { "id": "androidmanagement.enterprises.enrollmentTokens.delete", @@ -216,14 +246,17 @@ "httpMethod": "DELETE", "parameters": { "name": { - "description": "The name of the enrollment token in the form\n`enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}`", + "description": "The name of the enrollment token in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}", "required": true, "pattern": "^enterprises/[^/]+/enrollmentTokens/[^/]+$", "location": "path", "type": "string" } }, - "path": "v1/{+name}" + "path": "v1/{+name}", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] } } }, @@ -237,7 +270,7 @@ "parameterOrder": [ "parent" ], - "description": "Creates a web token to access an embeddable managed Google Play web UI for\na given enterprise.", + "description": "Creates a web token to access an embeddable managed Google Play web UI for a given enterprise.", "request": { "$ref": "WebToken" }, @@ -245,14 +278,17 @@ "httpMethod": "POST", "parameters": { "parent": { - "description": "The name of the enterprise in the form\n`enterprises/{enterpriseId}`", + "description": "The name of the enterprise in the form enterprises/{enterpriseId}", "required": true, "pattern": "^enterprises/[^/]+$", "location": "path", "type": "string" } }, - "path": "v1/{+parent}/webTokens" + "path": "v1/{+parent}/webTokens", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] } } }, @@ -268,7 +304,7 @@ "parameterOrder": [ "name" ], - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", "flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}/operations/{operationsId}", "httpMethod": "GET", "parameters": { @@ -280,7 +316,10 @@ "type": "string" } }, - "path": "v1/{+name}" + "path": "v1/{+name}", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] }, "list": { "id": "androidmanagement.enterprises.devices.operations.list", @@ -290,7 +329,7 @@ "parameterOrder": [ "name" ], - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + "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/enterprises/{enterprisesId}/devices/{devicesId}/operations", "httpMethod": "GET", "parameters": { @@ -318,7 +357,10 @@ "type": "string" } }, - "path": "v1/{+name}" + "path": "v1/{+name}", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] }, "delete": { "id": "androidmanagement.enterprises.devices.operations.delete", @@ -328,7 +370,7 @@ "parameterOrder": [ "name" ], - "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", "flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}/operations/{operationsId}", "httpMethod": "DELETE", "parameters": { @@ -340,7 +382,10 @@ "type": "string" } }, - "path": "v1/{+name}" + "path": "v1/{+name}", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] }, "cancel": { "id": "androidmanagement.enterprises.devices.operations.cancel", @@ -350,7 +395,7 @@ "parameterOrder": [ "name" ], - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", "flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}/operations/{operationsId}:cancel", "httpMethod": "POST", "parameters": { @@ -362,7 +407,10 @@ "type": "string" } }, - "path": "v1/{+name}:cancel" + "path": "v1/{+name}:cancel", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] } } } @@ -381,14 +429,17 @@ "httpMethod": "GET", "parameters": { "name": { - "description": "The name of the device in the form\n`enterprises/{enterpriseId}/devices/{deviceId}`", + "description": "The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}", "required": true, "pattern": "^enterprises/[^/]+/devices/[^/]+$", "location": "path", "type": "string" } }, - "path": "v1/{+name}" + "path": "v1/{+name}", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] }, "list": { "id": "androidmanagement.enterprises.devices.list", @@ -403,13 +454,13 @@ "httpMethod": "GET", "parameters": { "pageSize": { - "description": "The requested page size. The actual page size may be fixed to a min or max\nvalue.", + "description": "The requested page size. The actual page size may be fixed to a min or max value.", "location": "query", "type": "integer", "format": "int32" }, "parent": { - "description": "The name of the enterprise in the form\n`enterprises/{enterpriseId}`", + "description": "The name of the enterprise in the form enterprises/{enterpriseId}", "required": true, "pattern": "^enterprises/[^/]+$", "location": "path", @@ -421,7 +472,10 @@ "type": "string" } }, - "path": "v1/{+parent}/devices" + "path": "v1/{+parent}/devices", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] }, "issueCommand": { "id": "androidmanagement.enterprises.devices.issueCommand", @@ -431,7 +485,7 @@ "parameterOrder": [ "name" ], - "description": "Issues a command to a device. The\n[`Operation`](/android/management/reference/rest/v1/enterprises.devices.operations#Operation)\nresource returned contains a\n[`Command`](/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command)\nin its `metadata` field.\nUse the\n[get operation method](/android/management/reference/rest/v1/enterprises.devices.operations/get)\nto get the status of the command.", + "description": "Issues a command to a device. The Operation resource returned contains a Command in its metadata field. Use the get operation method to get the status of the command.", "request": { "$ref": "Command" }, @@ -439,14 +493,17 @@ "httpMethod": "POST", "parameters": { "name": { - "description": "The name of the device in the form\n`enterprises/{enterpriseId}/devices/{deviceId}`", + "description": "The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}", "required": true, "pattern": "^enterprises/[^/]+/devices/[^/]+$", "location": "path", "type": "string" } }, - "path": "v1/{+name}:issueCommand" + "path": "v1/{+name}:issueCommand", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] }, "patch": { "id": "androidmanagement.enterprises.devices.patch", @@ -464,20 +521,23 @@ "httpMethod": "PATCH", "parameters": { "updateMask": { - "description": "The field mask indicating the fields to update.\nIf not set, all modifiable fields will be modified.", + "description": "The field mask indicating the fields to update. If not set, all modifiable fields will be modified.", "location": "query", "type": "string", "format": "google-fieldmask" }, "name": { - "description": "The name of the device in the form\n`enterprises/{enterpriseId}/devices/{deviceId}`", + "description": "The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}", "required": true, "pattern": "^enterprises/[^/]+/devices/[^/]+$", "location": "path", "type": "string" } }, - "path": "v1/{+name}" + "path": "v1/{+name}", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] }, "delete": { "id": "androidmanagement.enterprises.devices.delete", @@ -492,14 +552,17 @@ "httpMethod": "DELETE", "parameters": { "name": { - "description": "The name of the device in the form\n`enterprises/{enterpriseId}/devices/{deviceId}`", + "description": "The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}", "required": true, "pattern": "^enterprises/[^/]+/devices/[^/]+$", "location": "path", "type": "string" } }, - "path": "v1/{+name}" + "path": "v1/{+name}", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] } } } @@ -519,7 +582,7 @@ "httpMethod": "POST", "parameters": { "signupUrlName": { - "description": "The name of the\n[`SignupUrl`](/android/management/reference/rest/v1/signupUrls#SignupUrl)\nused to sign up for the enterprise.", + "description": "The name of the SignupUrl used to sign up for the enterprise.", "location": "query", "type": "string" }, @@ -534,7 +597,10 @@ "type": "string" } }, - "path": "v1/enterprises" + "path": "v1/enterprises", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] }, "get": { "id": "androidmanagement.enterprises.get", @@ -549,14 +615,17 @@ "httpMethod": "GET", "parameters": { "name": { - "description": "The name of the enterprise in the form\n`enterprises/{enterpriseId}`", + "description": "The name of the enterprise in the form enterprises/{enterpriseId}", "required": true, "pattern": "^enterprises/[^/]+$", "location": "path", "type": "string" } }, - "path": "v1/{+name}" + "path": "v1/{+name}", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] }, "patch": { "id": "androidmanagement.enterprises.patch", @@ -574,39 +643,42 @@ "httpMethod": "PATCH", "parameters": { "updateMask": { - "description": "The field mask indicating the fields to update.\nIf not set, all modifiable fields will be modified.", + "description": "The field mask indicating the fields to update. If not set, all modifiable fields will be modified.", "location": "query", "type": "string", "format": "google-fieldmask" }, "name": { - "description": "The name of the enterprise in the form\n`enterprises/{enterpriseId}`", + "description": "The name of the enterprise in the form enterprises/{enterpriseId}", "required": true, "pattern": "^enterprises/[^/]+$", "location": "path", "type": "string" } }, - "path": "v1/{+name}" + "path": "v1/{+name}", + "scopes": [ + "https://www.googleapis.com/auth/androidmanagement" + ] } } } }, "schemas": { "Device": { - "description": "A device owned by an enterprise.\nUnless otherwise noted, all fields are read-only and cannot be modified by\nan update device request.", + "description": "A device owned by an enterprise. Unless otherwise noted, all fields are read-only and cannot be modified by an update device request.", "type": "object", "properties": { "userName": { - "description": "The resource name of the user of the device in the form\n`enterprises/{enterpriseId}/users/{userId}`. This is the name of the\ndevice account automatically created for this device.", + "description": "The resource name of the user of the device in the form enterprises/{enterpriseId}/users/{userId}. This is the name of the device account automatically created for this device.", "type": "string" }, "disabledReason": { - "description": "If the device state is `DISABLED`, an optional message that is displayed on\nthe device indicating the reason the device is disabled. This field may be\nmodified by an update request.", + "description": "If the device state is DISABLED, an optional message that is displayed on the device indicating the reason the device is disabled. This field may be modified by an update request.", "$ref": "UserFacingMessage" }, "policyName": { - "description": "The name of the policy that is intended to be applied to the device. If\nempty, the policy with id `default` is applied.\nThis field may be modified by an update request.\nThe name of the policy is in the form\n`enterprises/{enterpriseId}/policies/{policyId}`.\nIt is also permissible to only specify the `policyId` when updating this\nfield as long as the `policyId` contains no slashes since the rest of the\npolicy name can be inferred from context.", + "description": "The name of the policy that is intended to be applied to the device. If empty, the policy with id default is applied. This field may be modified by an update request. The name of the policy is in the form enterprises/{enterpriseId}/policies/{policyId}. It is also permissible to only specify the policyId when updating this field as long as the policyId contains no slashes since the rest of the policy name can be inferred from context.", "type": "string" }, "lastPolicyComplianceReportTime": { @@ -627,7 +699,7 @@ "format": "google-datetime" }, "networkInfo": { - "description": "Device network information. This information is only available when\n`networkInfoEnabled` is true in the device's policy.", + "description": "Device network information. This information is only available when networkInfoEnabled is true in the device's policy.", "$ref": "NetworkInfo" }, "appliedState": { @@ -643,25 +715,25 @@ "This value is disallowed.", "The device is active.", "The device is disabled.", - "The device was deleted. This state will never be returned by an API call,\nbut will be used in the final policy compliance report published to Cloud\nPub/Sub when the device acknowledges the deletion.", - "The device is being provisioned. Newly enrolled devices will be in this\nstate until they have applied policy." + "The device was deleted. This state will never be returned by an API call, but will be used in the final policy compliance report published to Cloud Pub/Sub when the device acknowledges the deletion.", + "The device is being provisioned. Newly enrolled devices will be in this state until they have applied policy." ], "type": "string" }, "enrollmentTokenData": { - "description": "If this device was enrolled with an enrollment token with additional data\nprovided, this field contains that data.", + "description": "If this device was enrolled with an enrollment token with additional data provided, this field contains that data.", "type": "string" }, "enrollmentTokenName": { - "description": "If this device was enrolled with an enrollment token, this field contains\nthe name of the token.", + "description": "If this device was enrolled with an enrollment token, this field contains the name of the token.", "type": "string" }, "memoryInfo": { - "description": "Memory information. This information is only available when\n`memoryInfoEnabled` is true in the device's policy.", + "description": "Memory information. This information is only available when memoryInfoEnabled is true in the device's policy.", "$ref": "MemoryInfo" }, "state": { - "description": "The state that is intended to be applied to the device. This field may be\nmodified by an update request.\nNote that UpdateDevice only handles toggling between `ACTIVE` and\n`DISABLED` states. Use the\n[delete device method](/android/management/reference/rest/v1/enterprises.devices/delete)\nto cause the device to enter the `DELETED` state.", + "description": "The state that is intended to be applied to the device. This field may be modified by an update request. Note that UpdateDevice only handles toggling between ACTIVE and DISABLED states. Use the delete device method to cause the device to enter the DELETED state.", "enum": [ "DEVICE_STATE_UNSPECIFIED", "ACTIVE", @@ -673,24 +745,24 @@ "This value is disallowed.", "The device is active.", "The device is disabled.", - "The device was deleted. This state will never be returned by an API call,\nbut will be used in the final policy compliance report published to Cloud\nPub/Sub when the device acknowledges the deletion.", - "The device is being provisioned. Newly enrolled devices will be in this\nstate until they have applied policy." + "The device was deleted. This state will never be returned by an API call, but will be used in the final policy compliance report published to Cloud Pub/Sub when the device acknowledges the deletion.", + "The device is being provisioned. Newly enrolled devices will be in this state until they have applied policy." ], "type": "string" }, "softwareInfo": { - "description": "Detailed information about the device software. This information is only\navailable when `softwareInfoEnabled` is true in the device's policy.", + "description": "Detailed information about the device software. This information is only available when softwareInfoEnabled is true in the device's policy.", "$ref": "SoftwareInfo" }, "memoryEvents": { - "description": "Events related to memory and storage measurements in chronological order.\nThis information is only available when `memoryInfoEnabled` is true in the\ndevice's policy.", + "description": "Events related to memory and storage measurements in chronological order. This information is only available when memoryInfoEnabled is true in the device's policy.", "type": "array", "items": { "$ref": "MemoryEvent" } }, "previousDeviceNames": { - "description": "The previous device names used for the same physical device when it has\nbeen enrolled multiple times. The serial number is used as the unique\nidentifier to determine if the same physical device has enrolled\npreviously. The names are in chronological order.", + "description": "The previous device names used for the same physical device when it has been enrolled multiple times. The serial number is used as the unique identifier to determine if the same physical device has enrolled previously. The names are in chronological order.", "type": "array", "items": { "type": "string" @@ -706,11 +778,11 @@ "format": "google-datetime" }, "name": { - "description": "The name of the device in the form\n`enterprises/{enterpriseId}/devices/{deviceId}`", + "description": "The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}", "type": "string" }, "hardwareStatusSamples": { - "description": "Hardware status samples in chronological order. This information is only\navailable when `hardwareStatusEnabled` is true in the device's policy.", + "description": "Hardware status samples in chronological order. This information is only available when hardwareStatusEnabled is true in the device's policy.", "type": "array", "items": { "$ref": "HardwareStatus" @@ -740,14 +812,14 @@ "type": "string" }, "displays": { - "description": "Displays on the device. This information is only available when\n`displayInfoEnabled` is true in the device's policy.", + "description": "Displays on the device. This information is only available when displayInfoEnabled is true in the device's policy.", "type": "array", "items": { "$ref": "Display" } }, "powerManagementEvents": { - "description": "Power management events on the device in chronological order. This\ninformation is only available when `powerManagementEventsEnabled` is true\nin the device's policy.", + "description": "Power management events on the device in chronological order. This information is only available when powerManagementEventsEnabled is true in the device's policy.", "type": "array", "items": { "$ref": "PowerManagementEvent" @@ -761,7 +833,7 @@ "type": "object", "properties": { "permission": { - "description": "The android permission, e.g. `android.permission.READ_CALENDAR`.", + "description": "The android permission, e.g. android.permission.READ_CALENDAR.", "type": "string" }, "policy": { @@ -773,7 +845,7 @@ "DENY" ], "enumDescriptions": [ - "Policy not specified. If no policy is specified for a permission at any\nlevel, then the `PROMPT` behavior is used by default.", + "Policy not specified. If no policy is specified for a permission at any level, then the PROMPT behavior is used by default.", "Prompt the user to grant a permission.", "Automatically grant a permission.", "Automatically deny a permission." @@ -788,7 +860,7 @@ "type": "object", "properties": { "managedProperties": { - "description": "The set of managed properties available to be pre-configured for the\napplication.", + "description": "The set of managed properties available to be pre-configured for the application.", "type": "array", "items": { "$ref": "ManagedProperty" @@ -806,14 +878,14 @@ } }, "name": { - "description": "The name of the application in the form\n`enterprises/{enterpriseId}/applications/{package_name}`", + "description": "The name of the application in the form enterprises/{enterpriseId}/applications/{package_name}", "type": "string" } }, "id": "Application" }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "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.", "type": "object", "properties": { "code": { @@ -822,7 +894,7 @@ "format": "int32" }, "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", "type": "array", "items": { "additionalProperties": { @@ -833,7 +905,7 @@ } }, "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "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" } }, @@ -848,14 +920,14 @@ "type": "boolean" }, "permissionGrants": { - "description": "Explicit permission grants or denials for the app. These values override\nthe `default_permission_policy`.", + "description": "Explicit permission grants or denials for the app. These values override the default_permission_policy.", "type": "array", "items": { "$ref": "PermissionGrant" } }, "managedConfiguration": { - "description": "Managed configuration applied to the app. The format for the configuration\nis dictated by the\n[`ManagedProperty`](/android/management/reference/rest/v1/enterprises.applications#ManagedProperty)\nvalues supported by the app. Each field name in the managed configuration\nmust match the `key` field of the `ManagedProperty`. The field value must\nbe compatible with the `type` of the `ManagedProperty`:\n\u003ctable\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ci\u003etype\u003c/i\u003e\u003c/td\u003e\u003ctd\u003e\u003ci\u003eJSON value\u003c/i\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e`BOOL`\u003c/td\u003e\u003ctd\u003e`true` or `false`\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e`STRING`\u003c/td\u003e\u003ctd\u003estring\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e`INTEGER`\u003c/td\u003e\u003ctd\u003enumber\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e`CHOICE`\u003c/td\u003e\u003ctd\u003estring\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e`MULTISELECT`\u003c/td\u003e\u003ctd\u003earray of strings\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e`HIDDEN`\u003c/td\u003e\u003ctd\u003estring\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e`BUNDLE_ARRAY`\u003c/td\u003e\u003ctd\u003earray of objects\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e", + "description": "Managed configuration applied to the app. The format for the configuration is dictated by the ManagedProperty values supported by the app. Each field name in the managed configuration must match the key field of the ManagedProperty. The field value must be compatible with the type of the ManagedProperty: \u003ctable\u003e \u003ctr\u003e\u003ctd\u003e\u003ci\u003etype\u003c/i\u003e\u003c/td\u003e\u003ctd\u003e\u003ci\u003eJSON value\u003c/i\u003e\u003c/td\u003e\u003c/tr\u003e \u003ctr\u003e\u003ctd\u003eBOOL\u003c/td\u003e\u003ctd\u003etrue or false\u003c/td\u003e\u003c/tr\u003e \u003ctr\u003e\u003ctd\u003eSTRING\u003c/td\u003e\u003ctd\u003estring\u003c/td\u003e\u003c/tr\u003e \u003ctr\u003e\u003ctd\u003eINTEGER\u003c/td\u003e\u003ctd\u003enumber\u003c/td\u003e\u003c/tr\u003e \u003ctr\u003e\u003ctd\u003eCHOICE\u003c/td\u003e\u003ctd\u003estring\u003c/td\u003e\u003c/tr\u003e \u003ctr\u003e\u003ctd\u003eMULTISELECT\u003c/td\u003e\u003ctd\u003earray of strings\u003c/td\u003e\u003c/tr\u003e \u003ctr\u003e\u003ctd\u003eHIDDEN\u003c/td\u003e\u003ctd\u003estring\u003c/td\u003e\u003c/tr\u003e \u003ctr\u003e\u003ctd\u003eBUNDLE_ARRAY\u003c/td\u003e\u003ctd\u003earray of objects\u003c/td\u003e\u003c/tr\u003e \u003c/table\u003e", "additionalProperties": { "description": "Properties of the object.", "type": "any" @@ -863,7 +935,7 @@ "type": "object" }, "packageName": { - "description": "The package name of the app, e.g. `com.google.android.youtube` for the\nYouTube app.", + "description": "The package name of the app, e.g. com.google.android.youtube for the YouTube app.", "type": "string" }, "installType": { @@ -874,14 +946,14 @@ "FORCE_INSTALLED" ], "enumDescriptions": [ - "No automatic installation is performed. Any other app policies will be\napplied if the user installs the app.", - "The application is automatically installed and can be removed by the\nuser.", - "The application is automatically installed and cannot be removed by the\nuser." + "No automatic installation is performed. Any other app policies will be applied if the user installs the app.", + "The application is automatically installed and can be removed by the user.", + "The application is automatically installed and cannot be removed by the user." ], "type": "string" }, "defaultPermissionPolicy": { - "description": "The default policy for all permissions requested by the app. If specified,\nthis overrides the policy-level `default_permission_policy` which applies\nto all apps.", + "description": "The default policy for all permissions requested by the app. If specified, this overrides the policy-level default_permission_policy which applies to all apps.", "enum": [ "PERMISSION_POLICY_UNSPECIFIED", "PROMPT", @@ -889,7 +961,7 @@ "DENY" ], "enumDescriptions": [ - "Policy not specified. If no policy is specified for a permission at any\nlevel, then the `PROMPT` behavior is used by default.", + "Policy not specified. If no policy is specified for a permission at any level, then the PROMPT behavior is used by default.", "Prompt the user to grant a permission.", "Automatically grant a permission.", "Automatically deny a permission." @@ -904,7 +976,7 @@ "type": "object", "properties": { "description": { - "description": "A longer description of the permission, giving more details of\nwhat it affects. Localized.", + "description": "A longer description of the permission, giving more details of what it affects. Localized.", "type": "string" }, "permissionId": { @@ -923,18 +995,18 @@ "type": "object", "properties": { "nestedProperties": { - "description": "For `BUNDLE_ARRAY` properties, the list of nested properties. A\n`BUNDLE_ARRAY` property is at most two levels deep.", + "description": "For BUNDLE_ARRAY properties, the list of nested properties. A BUNDLE_ARRAY property is at most two levels deep.", "type": "array", "items": { "$ref": "ManagedProperty" } }, "description": { - "description": "A longer description of the property, giving more detail of what it\naffects. Localized.", + "description": "A longer description of the property, giving more detail of what it affects. Localized.", "type": "string" }, "defaultValue": { - "description": "The default value of the properties. `BUNDLE_ARRAY` properties\nnever have a default value.", + "description": "The default value of the properties. BUNDLE_ARRAY properties never have a default value.", "type": "any" }, "title": { @@ -942,11 +1014,11 @@ "type": "string" }, "key": { - "description": "The unique key that the application uses to identify the property,\ne.g. \"com.google.android.gm.fieldname\".", + "description": "The unique key that the application uses to identify the property, e.g. \"com.google.android.gm.fieldname\".", "type": "string" }, "entries": { - "description": "For `CHOICE` or `MULTISELECT` properties, the list\nof possible entries.", + "description": "For CHOICE or MULTISELECT properties, the list of possible entries.", "type": "array", "items": { "$ref": "ManagedPropertyEntry" @@ -971,7 +1043,7 @@ "A property of integer type.", "A choice of one item from a set.", "A choice of multiple items from a set.", - "A hidden restriction of string type (the default value can be used\nto pass along information that cannot be modified, such as a version\ncode).", + "A hidden restriction of string type (the default value can be used to pass along information that cannot be modified, such as a version code).", "An array of property bundles." ], "type": "string" @@ -980,7 +1052,7 @@ "id": "ManagedProperty" }, "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "description": "This resource represents a long-running operation that is the result of a network API call.", "type": "object", "properties": { "error": { @@ -988,11 +1060,11 @@ "$ref": "Status" }, "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", "type": "boolean" }, "metadata": { - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" @@ -1000,7 +1072,7 @@ "type": "object" }, "response": { - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" @@ -1008,18 +1080,18 @@ "type": "object" }, "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", "type": "string" } }, "id": "Operation" }, "NonComplianceDetailCondition": { - "description": "A compliance rule condition which is satisfied if there exists *any*\nmatching\n[`NonComplianceDetail`](/android/management/reference/rest/v1/enterprises.devices#NonComplianceDetail)\nfor the device. A `NonComplianceDetail` matches a\n`NonComplianceDetailCondition` if *all* the fields which are set within the\n`NonComplianceDetailCondition` match the corresponding `NonComplianceDetail`\nfields.", + "description": "A compliance rule condition which is satisfied if there exists any matching NonComplianceDetail for the device. A NonComplianceDetail matches a NonComplianceDetailCondition if all the fields which are set within the NonComplianceDetailCondition match the corresponding NonComplianceDetail fields.", "type": "object", "properties": { "nonComplianceReason": { - "description": "The reason the device is not in compliance with the setting. If not set,\nthen this condition matches any reason.", + "description": "The reason the device is not in compliance with the setting. If not set, then this condition matches any reason.", "enum": [ "NON_COMPLIANCE_REASON_UNSPECIFIED", "API_LEVEL", @@ -1030,28 +1102,30 @@ "UNSUPPORTED", "APP_INSTALLED", "PENDING", - "APP_INCOMPATIBLE" + "APP_INCOMPATIBLE", + "APP_NOT_UPDATED" ], "enumDescriptions": [ "This value is disallowed.", - "The setting is not supported in the API level of Android OS version the\ndevice is running.", - "The admin type (profile owner, device owner, etc.) does not support the\nsetting.", + "The setting is not supported in the API level of Android OS version the device is running.", + "The admin type (profile owner, device owner, etc.) does not support the setting.", "The user has not taken required action to comply with the setting.", "The setting has an invalid value.", "The application required to implement the policy is not installed.", - "The policy is not supported by the version of Android Device Policy on\nthe device.", + "The policy is not supported by the version of Android Device Policy on the device.", "A blocked application is installed.", - "The setting was not applied yet at the time of the report, but is\nexpected to be applied shortly.", - "The setting cannot be applied to the application because its target SDK\nversion is not high enough." + "The setting was not applied yet at the time of the report, but is expected to be applied shortly.", + "The setting cannot be applied to the application because its target SDK version is not high enough.", + "The application is installed but not updated to the minimum version code specified by policy" ], "type": "string" }, "settingName": { - "description": "The name of the policy setting. This is the JSON field name of a top-level\n[`Policy`](/android/management/reference/rest/v1/enterprises.policies#Policy)\nfield. If not set, then this condition matches any setting name.", + "description": "The name of the policy setting. This is the JSON field name of a top-level Policy field. If not set, then this condition matches any setting name.", "type": "string" }, "packageName": { - "description": "The package name indicating which application is out of compliance. If not\nset, then this condition matches any package name. If this field is set,\nthen `setting_name` must be unset or set to `applications`; otherwise, the\ncondition would never be satisfied.", + "description": "The package name indicating which application is out of compliance. If not set, then this condition matches any package name. If this field is set, then setting_name must be unset or set to applications; otherwise, the condition would never be satisfied.", "type": "string" } }, @@ -1062,19 +1136,19 @@ "type": "object", "properties": { "settingName": { - "description": "The name of the policy setting. This is the JSON field name of a top-level\n[`Policy`](/android/management/reference/rest/v1/enterprises.policies#Policy)\n field.", + "description": "The name of the policy setting. This is the JSON field name of a top-level Policy field.", "type": "string" }, "currentValue": { - "description": "If the policy setting could not be applied, the current value of the\nsetting on the device.", + "description": "If the policy setting could not be applied, the current value of the setting on the device.", "type": "any" }, "packageName": { - "description": "The package name indicating which application is out of compliance, if\napplicable.", + "description": "The package name indicating which application is out of compliance, if applicable.", "type": "string" }, "installationFailureReason": { - "description": "If `package_name` is set and the non-compliance reason is\n`APP_NOT_INSTALLED`, the detailed reason the app cannot be installed.", + "description": "If package_name is set and the non-compliance reason is APP_NOT_INSTALLED, the detailed reason the app cannot be installed.", "enum": [ "INSTALLATION_FAILURE_REASON_UNSPECIFIED", "INSTALLATION_FAILURE_REASON_UNKNOWN", @@ -1090,7 +1164,7 @@ ], "enumDescriptions": [ "This value is disallowed.", - "An unknown condition is preventing the app from being installed. Some\npotential reaons are that the device does not have enough storage, the\ndevice network connection is unreliable, or the installation is taking\nlonger than expected. The installation will be retried automatically.", + "An unknown condition is preventing the app from being installed. Some potential reaons are that the device does not have enough storage, the device network connection is unreliable, or the installation is taking longer than expected. The installation will be retried automatically.", "The installation is still in progress.", "The app was not found in Play.", "The app is incompatible with the device.", @@ -1098,13 +1172,13 @@ "The app has new permissions that have not been accepted by the admin.", "The app is not available in the user's country.", "There are no more licenses to assign to the user.", - "The enterprise is no longer enrolled with Play for Work or Android Device\nPolicy is not enabled for the enterprise.", + "The enterprise is no longer enrolled with Play for Work or Android Device Policy is not enabled for the enterprise.", "The user is no longer valid. The user may have been deleted or disabled." ], "type": "string" }, "fieldPath": { - "description": "For settings with nested fields, if a particular nested field is out of\ncompliance, this specifies the full path to the offending field. The path\nis formatted in the same way the policy JSON field would be referenced in\nJavaScript, that is:\n1) For object-typed fields, the field name is followed by a dot then by a\n subfield name.\n2) For array-typed fields, the field name is followed by the array index\n enclosed in brackets.\nFor example, to indicate a problem with the `url` field in the\n`externalData` field in the 3rd application, the path would be\n`applications[2].externalData.url`", + "description": "For settings with nested fields, if a particular nested field is out of compliance, this specifies the full path to the offending field. The path is formatted in the same way the policy JSON field would be referenced in JavaScript, that is: 1) For object-typed fields, the field name is followed by a dot then by a subfield name. 2) For array-typed fields, the field name is followed by the array index enclosed in brackets. For example, to indicate a problem with the url field in the externalData field in the 3rd application, the path would be applications[2].externalData.url", "type": "string" }, "nonComplianceReason": { @@ -1119,19 +1193,21 @@ "UNSUPPORTED", "APP_INSTALLED", "PENDING", - "APP_INCOMPATIBLE" + "APP_INCOMPATIBLE", + "APP_NOT_UPDATED" ], "enumDescriptions": [ "This value is disallowed.", - "The setting is not supported in the API level of Android OS version the\ndevice is running.", - "The admin type (profile owner, device owner, etc.) does not support the\nsetting.", + "The setting is not supported in the API level of Android OS version the device is running.", + "The admin type (profile owner, device owner, etc.) does not support the setting.", "The user has not taken required action to comply with the setting.", "The setting has an invalid value.", "The application required to implement the policy is not installed.", - "The policy is not supported by the version of Android Device Policy on\nthe device.", + "The policy is not supported by the version of Android Device Policy on the device.", "A blocked application is installed.", - "The setting was not applied yet at the time of the report, but is\nexpected to be applied shortly.", - "The setting cannot be applied to the application because its target SDK\nversion is not high enough." + "The setting was not applied yet at the time of the report, but is expected to be applied shortly.", + "The setting cannot be applied to the application because its target SDK version is not high enough.", + "The application is installed but not updated to the minimum version code specified by policy" ], "type": "string" } @@ -1157,22 +1233,22 @@ "id": "ListDevicesResponse" }, "PersistentPreferredActivity": { - "description": "A default activity for handling intents that match a particular intent\nfilter.", + "description": "A default activity for handling intents that match a particular intent filter.", "type": "object", "properties": { "receiverActivity": { - "description": "The activity that should be the default intent handler. This should be an\nAndroid component name, e.g. `com.android.enterprise.app/.MainActivity`.\nAlternatively, the value may be the package name of an app, which causes\nAndroid Device Policy to choose an appropriate activity from the app to\nhandle the intent.", + "description": "The activity that should be the default intent handler. This should be an Android component name, e.g. com.android.enterprise.app/.MainActivity. Alternatively, the value may be the package name of an app, which causes Android Device Policy to choose an appropriate activity from the app to handle the intent.", "type": "string" }, "actions": { - "description": "The intent actions to match in the filter. If any actions are included in\nthe filter, then an intent's action must be one of those values for it to\nmatch. If no actions are included, the intent action is ignored.", + "description": "The intent actions to match in the filter. If any actions are included in the filter, then an intent's action must be one of those values for it to match. If no actions are included, the intent action is ignored.", "type": "array", "items": { "type": "string" } }, "categories": { - "description": "The intent categories to match in the filter. An intent includes the\ncategories that it requires, all of which must be included in the filter in\norder to match. In other words, adding a category to the filter has no\nimpact on matching unless that category is specified in the intent.", + "description": "The intent categories to match in the filter. An intent includes the categories that it requires, all of which must be included in the filter in order to match. In other words, adding a category to the filter has no impact on matching unless that category is specified in the intent.", "type": "array", "items": { "type": "string" @@ -1186,7 +1262,7 @@ "type": "object", "properties": { "openNetworkConfiguration": { - "description": "Network configuration for the device. See\n[configure networks](/android/management/configure-networks)\nfor more information.", + "description": "Network configuration for the device. See configure networks for more information.", "additionalProperties": { "description": "Properties of the object.", "type": "any" @@ -1214,7 +1290,7 @@ "type": "boolean" }, "funDisabled": { - "description": "Whether the user is allowed to have fun. Controls whether the Easter egg\ngame in Settings is disabled.", + "description": "Whether the user is allowed to have fun. Controls whether the Easter egg game in Settings is disabled.", "type": "boolean" }, "applications": { @@ -1228,19 +1304,31 @@ "description": "Whether rebooting the device into safe boot is disabled.", "type": "boolean" }, + "wifiConfigsLockdownEnabled": { + "description": "Whether WiFi networks defined in Open Network Configuration are locked so they cannot be edited by the user.", + "type": "boolean" + }, "complianceRules": { - "description": "Rules declaring which mitigating actions to take when a device is not\ncompliant with its policy. When the conditions for multiple rules are\nsatisfied, all of the mitigating actions for the rules are taken. There is\na maximum limit of 100 rules.", + "description": "Rules declaring which mitigating actions to take when a device is not compliant with its policy. When the conditions for multiple rules are satisfied, all of the mitigating actions for the rules are taken. There is a maximum limit of 100 rules.", "type": "array", "items": { "$ref": "ComplianceRule" } }, + "wifiConfigDisabled": { + "description": "Whether configuring WiFi access points is disabled.", + "type": "boolean" + }, "unmuteMicrophoneDisabled": { - "description": "Whether the microphone is muted and adjusting microphone volume is\ndisabled.", + "description": "Whether the microphone is muted and adjusting microphone volume is disabled.", "type": "boolean" }, "installUnknownSourcesAllowed": { - "description": "Whether the user is allowed to enable the \"Unknown Sources\" setting,\nwhich allows installation of apps from unknown sources.", + "description": "Whether the user is allowed to enable the \"Unknown Sources\" setting, which allows installation of apps from unknown sources.", + "type": "boolean" + }, + "autoTimeRequired": { + "description": "Whether auto time is required, which prevents the user from manually setting the date and time.", "type": "boolean" }, "removeUserDisabled": { @@ -1248,11 +1336,11 @@ "type": "boolean" }, "statusBarDisabled": { - "description": "Whether the status bar is disabled. This disables notifications, quick\nsettings and other screen overlays that allow escape from full-screen mode.", + "description": "Whether the status bar is disabled. This disables notifications, quick settings and other screen overlays that allow escape from full-screen mode.", "type": "boolean" }, "stayOnPluggedModes": { - "description": "The battery plugged in modes for which the device stays on. When using this\nsetting, it is recommended to clear `maximum_time_to_lock` so that the\ndevice doesn't lock itself while it stays on.", + "description": "The battery plugged in modes for which the device stays on. When using this setting, it is recommended to clear maximum_time_to_lock so that the device doesn't lock itself while it stays on.", "enumDescriptions": [ "This value is ignored.", "Power source is an AC charger.", @@ -1275,7 +1363,7 @@ "type": "boolean" }, "blockApplicationsEnabled": { - "description": "Whether applications other than the ones configured in `applications` are\nblocked from being installed. When set, applications that were\ninstalled under a previous policy but no longer appear in the policy are\nautomatically uninstalled.", + "description": "Whether applications other than the ones configured in applications are blocked from being installed. When set, applications that were installed under a previous policy but no longer appear in the policy are automatically uninstalled.", "type": "boolean" }, "debuggingFeaturesAllowed": { @@ -1283,12 +1371,12 @@ "type": "boolean" }, "maximumTimeToLock": { - "description": "Maximum time in milliseconds for user activity until the device will lock.\nA value of 0 means there is no restriction.", + "description": "Maximum time in milliseconds for user activity until the device will lock. A value of 0 means there is no restriction.", "type": "string", "format": "int64" }, "name": { - "description": "The name of the policy in the form\n`enterprises/{enterpriseId}/policies/{policyId}`", + "description": "The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}", "type": "string" }, "defaultPermissionPolicy": { @@ -1300,7 +1388,7 @@ "DENY" ], "enumDescriptions": [ - "Policy not specified. If no policy is specified for a permission at any\nlevel, then the `PROMPT` behavior is used by default.", + "Policy not specified. If no policy is specified for a permission at any level, then the PROMPT behavior is used by default.", "Prompt the user to grant a permission.", "Automatically grant a permission.", "Automatically deny a permission." @@ -1315,22 +1403,22 @@ } }, "networkEscapeHatchEnabled": { - "description": "Flag to specify if network escape hatch is enabled. If this flag has been\nenabled then upon device boot if device has no network connection, then an\nactivity will be shown that allows the user to temporarily connect to a\nnetwork to fetch the latest policy. The launched activity will time out if\nno network has been connected for a given while and will return to the\nprevious activity that was shown.", + "description": "Flag to specify if network escape hatch is enabled. If this flag has been enabled then upon device boot if device has no network connection, then an activity will be shown that allows the user to temporarily connect to a network to fetch the latest policy. The launched activity will time out if no network has been connected for a given while and will return to the previous activity that was shown.", "type": "boolean" }, "systemUpdate": { - "description": "The system update policy, which controls how OS updates are applied. If the\nupdate type is `WINDOWED` and the device has a device account, the update\nwindow will automatically apply to Play app updates as well.", + "description": "The system update policy, which controls how OS updates are applied. If the update type is WINDOWED and the device has a device account, the update window will automatically apply to Play app updates as well.", "$ref": "SystemUpdate" }, "frpAdminEmails": { - "description": "Email addresses of device administrators for factory reset protection.\nWhen the device is factory reset, it will require one of these admins to\nlog in with the Google account email and password to unlock the device.\nIf no admins are specified, the device will not provide factory reset\nprotection.", + "description": "Email addresses of device administrators for factory reset protection. When the device is factory reset, it will require one of these admins to log in with the Google account email and password to unlock the device. If no admins are specified, the device will not provide factory reset protection.", "type": "array", "items": { "type": "string" } }, "version": { - "description": "The version of the policy. This is a read-only field. The version is\nincremented each time the policy is updated.", + "description": "The version of the policy. This is a read-only field. The version is incremented each time the policy is updated.", "type": "string", "format": "int64" }, @@ -1354,12 +1442,12 @@ "type": "object", "properties": { "duration": { - "description": "The duration for which the command is valid. The command will expire if not\nexecuted by the device during this time. The default duration if\nunspecified is ten minutes. There is no maximum duration.", + "description": "The duration for which the command is valid. The command will expire if not executed by the device during this time. The default duration if unspecified is ten minutes. There is no maximum duration.", "type": "string", "format": "google-duration" }, "newPassword": { - "description": "For commands of type `RESET_PASSWORD`, optionally specifies the new\npassword.", + "description": "For commands of type RESET_PASSWORD, optionally specifies the new password.", "type": "string" }, "type": { @@ -1379,15 +1467,15 @@ "type": "string" }, "createTime": { - "description": "The timestamp at which the command was created. The timestamp is\nautomatically generated by the server.", + "description": "The timestamp at which the command was created. The timestamp is automatically generated by the server.", "type": "string", "format": "google-datetime" }, "resetPasswordFlags": { - "description": "For commands of type `RESET_PASSWORD`, optionally specifies flags.", + "description": "For commands of type RESET_PASSWORD, optionally specifies flags.", "enumDescriptions": [ "This value is ignored.", - "Don't allow other admins to change the password again until the user has\nentered it.", + "Don't allow other admins to change the password again until the user has entered it.", "Don't ask for user credentials on device boot." ], "type": "array", @@ -1404,19 +1492,19 @@ "id": "Command" }, "ComplianceRule": { - "description": "A rule declaring which mitigating actions to take when a device is not\ncompliant with its policy. For every rule, there is always an implicit\nmitigating action to set `policy_compliant` to false for the\n[`Device`](/android/management/reference/rest/v1/enterprises.devices#Device)\nresource, and display a message on the device indicating that the device is\nnot compliant with its policy. Other mitigating actions may optionally be\ntaken as well, depending on the field values in the rule.", + "description": "A rule declaring which mitigating actions to take when a device is not compliant with its policy. For every rule, there is always an implicit mitigating action to set policy_compliant to false for the Device resource, and display a message on the device indicating that the device is not compliant with its policy. Other mitigating actions may optionally be taken as well, depending on the field values in the rule.", "type": "object", "properties": { "nonComplianceDetailCondition": { - "description": "A condition which is satisfied if there exists *any* matching\n[`NonComplianceDetail`](/android/management/reference/rest/v1/enterprises.devices#NonComplianceDetail)\nfor the device.", + "description": "A condition which is satisfied if there exists any matching NonComplianceDetail for the device.", "$ref": "NonComplianceDetailCondition" }, "disableApps": { - "description": "If set to true, the rule includes a mitigating action to disable\napplications so that the device is effectively disabled, but application\ndata is preserved. If the device is running an app in locked task mode, the\napp will be closed and a UI showing the reason for non-compliance will be\ndisplayed.", + "description": "If set to true, the rule includes a mitigating action to disable applications so that the device is effectively disabled, but application data is preserved. If the device is running an app in locked task mode, the app will be closed and a UI showing the reason for non-compliance will be displayed.", "type": "boolean" }, "apiLevelCondition": { - "description": "A condition which is satisfied if the Android Framework API level on the\ndevice does not meet a minimum requirement.", + "description": "A condition which is satisfied if the Android Framework API level on the device does not meet a minimum requirement.", "$ref": "ApiLevelCondition" } }, @@ -1530,11 +1618,11 @@ "type": "object", "properties": { "url": { - "description": "A URL under which the Admin can sign up for an enterprise.\nThe page pointed to cannot be rendered in an iframe.", + "description": "A URL under which the Admin can sign up for an enterprise. The page pointed to cannot be rendered in an iframe.", "type": "string" }, "name": { - "description": "The name of the resource. This must be included in the\n[create enterprise](/android/management/reference/rest/v1/enterprises/create)\nrequest at the end of the signup flow.", + "description": "The name of the resource. This must be included in the create enterprise request at the end of the signup flow.", "type": "string" } }, @@ -1545,33 +1633,33 @@ "type": "object", "properties": { "expirationTimestamp": { - "description": "The expiration time of the token. This is a read-only field generated by\nthe server.", + "description": "The expiration time of the token. This is a read-only field generated by the server.", "type": "string", "format": "google-datetime" }, "policyName": { - "description": "The name of the policy that will be initially applied to the enrolled\ndevice in the form `enterprises/{enterpriseId}/policies/{policyId}`.\nIf not specified, the policy with id `default` is applied.\nIt is permissible to only specify the `policyId` when updating this\nfield as long as the `policyId` contains no slashes since the rest of the\npolicy name can be inferred from context.", + "description": "The name of the policy that will be initially applied to the enrolled device in the form enterprises/{enterpriseId}/policies/{policyId}. If not specified, the policy with id default is applied. It is permissible to only specify the policyId when updating this field as long as the policyId contains no slashes since the rest of the policy name can be inferred from context.", "type": "string" }, "name": { - "description": "The name of the enrollment token, which is generated by the server during\ncreation, in the form\n`enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}`", + "description": "The name of the enrollment token, which is generated by the server during creation, in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}", "type": "string" }, "duration": { - "description": "The duration of the token. If not specified, the duration will be 1 hour.\nThe allowed range is 1 minute to 30 days.", + "description": "The duration of the token. If not specified, the duration will be 1 hour. The allowed range is 1 minute to 30 days.", "type": "string", "format": "google-duration" }, "value": { - "description": "The token value which is passed to the device and authorizes the device to\nenroll. This is a read-only field generated by the server.", + "description": "The token value which is passed to the device and authorizes the device to enroll. This is a read-only field generated by the server.", "type": "string" }, "additionalData": { - "description": "Optional, arbitrary data associated with the enrollment token.\nThis could contain, for example, the id of an org unit to which the device\nis assigned after enrollment.\nAfter a device enrolls with the token, this data will be exposed in the\n`enrollment_token_data` field of the\n[`Device`](/android/management/reference/rest/v1/enterprises.devices#Device)\nresource. The data must be 1024 characters or less; otherwise, the creation\nrequest will fail.", + "description": "Optional, arbitrary data associated with the enrollment token. This could contain, for example, the id of an org unit to which the device is assigned after enrollment. After a device enrolls with the token, this data will be exposed in the enrollment_token_data field of the Device resource. The data must be 1024 characters or less; otherwise, the creation request will fail.", "type": "string" }, "qrCode": { - "description": "A JSON string whose UTF-8 representation can be used to generate a QR code\nto enroll a device with this enrollment token. To enroll a device using\nNFC, the NFC record must contain a serialized `java.util.Properties`\nrepresentation of the properties in the JSON.", + "description": "A JSON string whose UTF-8 representation can be used to generate a QR code to enroll a device with this enrollment token. To enroll a device using NFC, the NFC record must contain a serialized java.util.Properties representation of the properties in the JSON.", "type": "string" } }, @@ -1582,11 +1670,11 @@ "type": "object", "properties": { "androidVersion": { - "description": "The user visible Android version string, e.g. `6.0.1`.", + "description": "The user visible Android version string, e.g. 6.0.1.", "type": "string" }, "androidBuildNumber": { - "description": "Android build Id string meant for displaying to the user,\ne.g. `shamu-userdebug 6.0.1 MOB30I 2756745 dev-keys`.", + "description": "Android build Id string meant for displaying to the user, e.g. shamu-userdebug 6.0.1 MOB30I 2756745 dev-keys.", "type": "string" }, "androidBuildTime": { @@ -1595,15 +1683,15 @@ "format": "google-datetime" }, "bootloaderVersion": { - "description": "The system bootloader version number, e.g. `0.6.7`.", + "description": "The system bootloader version number, e.g. 0.6.7.", "type": "string" }, "securityPatchLevel": { - "description": "Security patch level, e.g. `2016-05-01`.", + "description": "Security patch level, e.g. 2016-05-01.", "type": "string" }, "deviceKernelVersion": { - "description": "Kernel version, e.g. `2.6.32.9-g103d848`.", + "description": "Kernel version, e.g. 2.6.32.9-g103d848.", "type": "string" } }, @@ -1614,7 +1702,7 @@ "type": "object", "properties": { "value": { - "description": "The machine-readable value of the entry, which should be used in the\nconfiguration. Not localized.", + "description": "The machine-readable value of the entry, which should be used in the configuration. Not localized.", "type": "string" }, "name": { @@ -1629,11 +1717,11 @@ "type": "object", "properties": { "value": { - "description": "The token value which is used in the hosting page to generate the iframe\nwith the embedded UI. This is a read-only field generated by the server.", + "description": "The token value which is used in the hosting page to generate the iframe with the embedded UI. This is a read-only field generated by the server.", "type": "string" }, "permissions": { - "description": "Permissions the admin may exercise in the embedded UI. The admin must have\nall of these permissions in order to view the UI.", + "description": "Permissions the admin may exercise in the embedded UI. The admin must have all of these permissions in order to view the UI.", "enumDescriptions": [ "This value is ignored.", "The permission to approve apps for the enterprise." @@ -1648,11 +1736,11 @@ } }, "name": { - "description": "The name of the web token, which is generated by the server during\ncreation, in the form\n`enterprises/{enterpriseId}/webTokens/{webTokenId}`.", + "description": "The name of the web token, which is generated by the server during creation, in the form enterprises/{enterpriseId}/webTokens/{webTokenId}.", "type": "string" }, "parentFrameUrl": { - "description": "The URL of the parent frame hosting the iframe with the embedded UI. To\nprevent XSS, the iframe may not be hosted at other URLs. The URL must use\nthe https scheme.", + "description": "The URL of the parent frame hosting the iframe with the embedded UI. To prevent XSS, the iframe may not be hosted at other URLs. The URL must use the https scheme.", "type": "string" } }, @@ -1663,11 +1751,11 @@ "type": "object", "properties": { "pubsubTopic": { - "description": "When Cloud Pub/Sub notifications are enabled, this field is required to\nindicate the topic to which the notifications will be published. The format\nof this field is `projects/{project}/topics/{topic}`. You must have granted\nthe publish permission on this topic to\nandroid-cloud-policy@system.gserviceaccount.com", + "description": "When Cloud Pub/Sub notifications are enabled, this field is required to indicate the topic to which the notifications will be published. The format of this field is projects/{project}/topics/{topic}. You must have granted the publish permission on this topic to android-cloud-policy@system.gserviceaccount.com", "type": "string" }, "logo": { - "description": "An image displayed as a logo during device provisioning. Supported types\nare: image/bmp, image/gif, image/x-ico, image/jpeg, image/png, image/webp,\nimage/vnd.wap.wbmp, image/x-adobe-dng.", + "description": "An image displayed as a logo during device provisioning. Supported types are: image/bmp, image/gif, image/x-ico, image/jpeg, image/png, image/webp, image/vnd.wap.wbmp, image/x-adobe-dng.", "$ref": "ExternalData" }, "enabledNotificationTypes": { @@ -1692,16 +1780,16 @@ } }, "name": { - "description": "The name of the enterprise which is generated by the server during\ncreation, in the form\n`enterprises/{enterpriseId}`", + "description": "The name of the enterprise which is generated by the server during creation, in the form enterprises/{enterpriseId}", "type": "string" }, "primaryColor": { - "description": "A color in RGB format indicating the predominant color to display in the\ndevice management app UI. The color components are stored as follows:\n`(red \u003c\u003c 16) | (green \u003c\u003c 8) | blue`, where each component may take a value\nbetween 0 and 255 inclusive.", + "description": "A color in RGB format indicating the predominant color to display in the device management app UI. The color components are stored as follows: (red \u003c\u003c 16) | (green \u003c\u003c 8) | blue, where each component may take a value between 0 and 255 inclusive.", "type": "integer", "format": "int32" }, "appAutoApprovalEnabled": { - "description": "Whether app auto-approval is enabled. When enabled, apps installed via\npolicy for this enterprise have all permissions automatically approved.\nWhen enabled, it is the caller's responsibility to display the permissions\nrequired by an app to the enterprise admin before setting the app to be\ninstalled in a policy.", + "description": "Whether app auto-approval is enabled. When enabled, apps installed via policy for this enterprise have all permissions automatically approved. When enabled, it is the caller's responsibility to display the permissions required by an app to the enterprise admin before setting the app to be installed in a policy.", "type": "boolean" }, "enterpriseDisplayName": { @@ -1734,7 +1822,7 @@ "type": "object", "properties": { "byteCount": { - "description": "The number of free bytes in the medium, or for `EXTERNAL_STORAGE_DETECTED`,\nthe total capacity in bytes of the storage medium.", + "description": "The number of free bytes in the medium, or for EXTERNAL_STORAGE_DETECTED, the total capacity in bytes of the storage medium.", "type": "string", "format": "int64" }, @@ -1752,7 +1840,7 @@ "Unspecified. No events have this type.", "Free space in RAM was measured.", "Free space in internal storage was measured.", - "A new external storage medium was detected. The reported byte count is\nthe total capacity of the storage medium.", + "A new external storage medium was detected. The reported byte count is the total capacity of the storage medium.", "An external storage medium was removed. The reported byte count is zero.", "Free space in an external storage medium was measured." ], @@ -1767,33 +1855,33 @@ "id": "MemoryEvent" }, "ExternalData": { - "description": "Data hosted at an external location. The data is to be downloaded by Android\nDevice Policy and verified against the hash.", + "description": "Data hosted at an external location. The data is to be downloaded by Android Device Policy and verified against the hash.", "type": "object", "properties": { "url": { - "description": "The absolute URL to the data, which must use either the http or https\nscheme. Android Device Policy does not provide any credentials in the GET\nrequest, so the URL must be publicly accessible. Including a long, random\ncomponent in the URL may be used to prevent attackers from discovering the\nURL.", + "description": "The absolute URL to the data, which must use either the http or https scheme. Android Device Policy does not provide any credentials in the GET request, so the URL must be publicly accessible. Including a long, random component in the URL may be used to prevent attackers from discovering the URL.", "type": "string" }, "sha256Hash": { - "description": "The base-64 encoded SHA-256 hash of the content hosted at url. If the\ncontent does not match this hash, Android Device Policy will not use the\ndata.", + "description": "The base-64 encoded SHA-256 hash of the content hosted at url. If the content does not match this hash, Android Device Policy will not use the data.", "type": "string" } }, "id": "ExternalData" }, "UserFacingMessage": { - "description": "Provides user facing message with locale info. The maximum message length is\n4096 characters.", + "description": "Provides user facing message with locale info. The maximum message length is 4096 characters.", "type": "object", "properties": { "localizedMessages": { - "description": "A map which contains \u003clocale, message\u003e pairs.\nThe locale is a BCP 47 language code, e.g. en-US, es-ES, fr.", + "description": "A map which contains \u003clocale, message\u003e pairs. The locale is a BCP 47 language code, e.g. en-US, es-ES, fr.", "additionalProperties": { "type": "string" }, "type": "object" }, "defaultMessage": { - "description": "The default message that gets displayed if no localized message is\nspecified, or the user's locale does not match with any of the localized\nmessages. A default message must be provided if any localized messages are\nprovided.", + "description": "The default message that gets displayed if no localized message is specified, or the user's locale does not match with any of the localized messages. A default message must be provided if any localized messages are provided.", "type": "string" } }, @@ -1804,7 +1892,7 @@ "type": "object", "properties": { "batteryLevel": { - "description": "For `BATTERY_LEVEL_COLLECTED` events, the battery level as a percentage.", + "description": "For BATTERY_LEVEL_COLLECTED events, the battery level as a percentage.", "type": "number", "format": "float" }, @@ -1845,27 +1933,27 @@ "type": "object", "properties": { "passwordMinimumNumeric": { - "description": "Minimum number of numerical digits required in the password.\nOnly enforced when `password_quality` is `COMPLEX`.", + "description": "Minimum number of numerical digits required in the password. Only enforced when password_quality is COMPLEX.", "type": "integer", "format": "int32" }, "passwordMinimumNonLetter": { - "description": "Minimum number of non-letter characters (numerical digits or symbols)\nrequired in the password.\nOnly enforced when `password_quality` is `COMPLEX`.", + "description": "Minimum number of non-letter characters (numerical digits or symbols) required in the password. Only enforced when password_quality is COMPLEX.", "type": "integer", "format": "int32" }, "maximumFailedPasswordsForWipe": { - "description": "A device will be wiped after too many incorrect device-unlock passwords\nhave been entered. A value of 0 means there is no restriction.", + "description": "A device will be wiped after too many incorrect device-unlock passwords have been entered. A value of 0 means there is no restriction.", "type": "integer", "format": "int32" }, "passwordMinimumLetters": { - "description": "Minimum number of letters required in the password.\nOnly enforced when `password_quality` is `COMPLEX`.", + "description": "Minimum number of letters required in the password. Only enforced when password_quality is COMPLEX.", "type": "integer", "format": "int32" }, "passwordMinimumUpperCase": { - "description": "Minimum number of upper case letters required in the password.\nOnly enforced when `password_quality` is `COMPLEX`.", + "description": "Minimum number of upper case letters required in the password. Only enforced when password_quality is COMPLEX.", "type": "integer", "format": "int32" }, @@ -1882,17 +1970,17 @@ ], "enumDescriptions": [ "There are no requirements for the password.", - "There must be a password, but there are no restrictions on its\ncharacters.", + "There must be a password, but there are no restrictions on its characters.", "The password must contain numeric characters.", - "The password must contain numeric characters with no repeating (4444) or\nordered (1234, 4321, 2468) sequences.", + "The password must contain numeric characters with no repeating (4444) or ordered (1234, 4321, 2468) sequences.", "The password must contain alphabetic (or symbol) characters.", - "The password must contain at both numeric and alphabetic (or symbol)\ncharacters.", - "The password must contain at least a letter, a numerical digit and a\nspecial symbol. Other password constraints, for example,\n`password_minimum_letters` are enforced." + "The password must contain at both numeric and alphabetic (or symbol) characters.", + "The password must contain at least a letter, a numerical digit and a special symbol. Other password constraints, for example, password_minimum_letters are enforced." ], "type": "string" }, "passwordMinimumLength": { - "description": "The minimum allowed password length. A value of 0 means there is no\nrestriction.\nOnly enforced when `password_quality` is `NUMERIC`, `NUMERIC_COMPLEX`,\n`ALPHABETIC`, `ALPHANUMERIC`, or `COMPLEX`.", + "description": "The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when password_quality is NUMERIC, NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, or COMPLEX.", "type": "integer", "format": "int32" }, @@ -1902,17 +1990,17 @@ "format": "google-duration" }, "passwordMinimumSymbols": { - "description": "Minimum number of symbols required in the password.\nOnly enforced when `password_quality` is `COMPLEX`.", + "description": "Minimum number of symbols required in the password. Only enforced when password_quality is COMPLEX.", "type": "integer", "format": "int32" }, "passwordHistoryLength": { - "description": "The length of the password history. After setting this, the user will\nnot be able to enter a new password that is the same as any password in\nthe history. A value of 0 means there is no restriction.", + "description": "The length of the password history. After setting this, the user will not be able to enter a new password that is the same as any password in the history. A value of 0 means there is no restriction.", "type": "integer", "format": "int32" }, "passwordMinimumLowerCase": { - "description": "Minimum number of lower case letters required in the password.\nOnly enforced when `password_quality` is `COMPLEX`.", + "description": "Minimum number of lower case letters required in the password. Only enforced when password_quality is COMPLEX.", "type": "integer", "format": "int32" } @@ -1920,11 +2008,11 @@ "id": "PasswordRequirements" }, "HardwareInfo": { - "description": "Information about device hardware. The fields related to temperature\nthresholds are only available when hardwareStatusEnabled is true in the\ndevice's policy.", + "description": "Information about device hardware. The fields related to temperature thresholds are only available when hardwareStatusEnabled is true in the device's policy.", "type": "object", "properties": { "gpuThrottlingTemperatures": { - "description": "GPU throttling temperature thresholds in Celsius for each GPU on the\ndevice.", + "description": "GPU throttling temperature thresholds in Celsius for each GPU on the device.", "type": "array", "items": { "type": "number", @@ -1948,11 +2036,11 @@ } }, "manufacturer": { - "description": "Manufacturer, e.g. `Motorola`.", + "description": "Manufacturer, e.g. Motorola.", "type": "string" }, "model": { - "description": "The model of the device, e.g. `Asus Nexus 7`.", + "description": "The model of the device, e.g. Asus Nexus 7.", "type": "string" }, "serialNumber": { @@ -1960,11 +2048,11 @@ "type": "string" }, "brand": { - "description": "Brand of the device, e.g. `Google`.", + "description": "Brand of the device, e.g. Google.", "type": "string" }, "cpuThrottlingTemperatures": { - "description": "CPU throttling temperature thresholds in Celsius for each CPU on the\ndevice.", + "description": "CPU throttling temperature thresholds in Celsius for each CPU on the device.", "type": "array", "items": { "type": "number", @@ -1980,11 +2068,11 @@ } }, "deviceBasebandVersion": { - "description": "Baseband version, e.g. `MDM9625_104662.22.05.34p`.", + "description": "Baseband version, e.g. MDM9625_104662.22.05.34p.", "type": "string" }, "hardware": { - "description": "Name of the hardware, e.g. `Angler`.", + "description": "Name of the hardware, e.g. Angler.", "type": "string" }, "skinShutdownTemperatures": { @@ -1996,7 +2084,7 @@ } }, "batteryShutdownTemperatures": { - "description": "Battery shutdown temperature thresholds in Celsius for each battery on the\ndevice.", + "description": "Battery shutdown temperature thresholds in Celsius for each battery on the device.", "type": "array", "items": { "type": "number", @@ -2004,7 +2092,7 @@ } }, "batteryThrottlingTemperatures": { - "description": "Battery throttling temperature thresholds in Celsius for each battery on\nthe device.", + "description": "Battery throttling temperature thresholds in Celsius for each battery on the device.", "type": "array", "items": { "type": "number", @@ -2015,7 +2103,7 @@ "id": "HardwareInfo" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "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 {}.", "type": "object", "properties": {}, "id": "Empty" @@ -2025,15 +2113,15 @@ "type": "object", "properties": { "meid": { - "description": "MEID number of the CDMA device, e.g. `A00000292788E1`.", + "description": "MEID number of the CDMA device, e.g. A00000292788E1.", "type": "string" }, "wifiMacAddress": { - "description": "WiFi MAC address of the device, e.g. `7c:11:11:11:11:11`.", + "description": "WiFi MAC address of the device, e.g. 7c:11:11:11:11:11.", "type": "string" }, "imei": { - "description": "IMEI number of the GSM device, e.g. `A1000031212`.", + "description": "IMEI number of the GSM device, e.g. A1000031212.", "type": "string" } }, @@ -2057,11 +2145,11 @@ "id": "MemoryInfo" }, "ApiLevelCondition": { - "description": "A compliance rule condition which is satisfied if the Android Framework API\nlevel on the device does not meet a minimum requirement. There can only be\none rule with this type of condition per policy.", + "description": "A compliance rule condition which is satisfied if the Android Framework API level on the device does not meet a minimum requirement. There can only be one rule with this type of condition per policy.", "type": "object", "properties": { "minApiLevel": { - "description": "The minimum desired Android Framework API level. If the device does not\nmeet the minimum requirement, this condition is satisfied. Must be greater\nthan zero.", + "description": "The minimum desired Android Framework API level. If the device does not meet the minimum requirement, this condition is satisfied. Must be greater than zero.", "type": "integer", "format": "int32" } @@ -2073,7 +2161,7 @@ "type": "object", "properties": { "startMinutes": { - "description": "If the type is `WINDOWED`, the start of the maintenance window, measured as\nthe number of minutes after midnight in device local time. This value must\nbe between 0 and 1439, inclusive.", + "description": "If the type is WINDOWED, the start of the maintenance window, measured as the number of minutes after midnight in device local time. This value must be between 0 and 1439, inclusive.", "type": "integer", "format": "int32" }, @@ -2086,15 +2174,15 @@ "POSTPONE" ], "enumDescriptions": [ - "Follow the default update behavior for the device, which typically\nrequires the user to accept system updates.", + "Follow the default update behavior for the device, which typically requires the user to accept system updates.", "Install automatically as soon as an update is available.", - "Install automatically within a daily maintenance window. If the device\nhas a device account, this also configures Play apps to be updated within\nthe window. This is strongly recommended for kiosk devices because this\nis the only way apps persistently pinned to the foreground can be updated\nby Play.", + "Install automatically within a daily maintenance window. If the device has a device account, this also configures Play apps to be updated within the window. This is strongly recommended for kiosk devices because this is the only way apps persistently pinned to the foreground can be updated by Play.", "Postpone automatic install up to a maximum of 30 days." ], "type": "string" }, "endMinutes": { - "description": "If the type is `WINDOWED`, the end of the maintenance window, measured as\nthe number of minutes after midnight in device local time. This value must\nbe between 0 and 1439, inclusive. If this value is less than\n`start_minutes`, then the maintenance window spans midnight. If the\nmaintenance window specified is smaller than 30 minutes, the actual window\nis extended to 30 minutes beyond the start time.", + "description": "If the type is WINDOWED, the end of the maintenance window, measured as the number of minutes after midnight in device local time. This value must be between 0 and 1439, inclusive. If this value is less than start_minutes, then the maintenance window spans midnight. If the maintenance window specified is smaller than 30 minutes, the actual window is extended to 30 minutes beyond the start time.", "type": "integer", "format": "int32" } @@ -2102,11 +2190,11 @@ "id": "SystemUpdate" }, "HardwareStatus": { - "description": "Hardware status. Temperatures may be compared to the temperature thresholds\navailable in `hardwareInfo` to determine hardware health.", + "description": "Hardware status. Temperatures may be compared to the temperature thresholds available in hardwareInfo to determine hardware health.", "type": "object", "properties": { "fanSpeeds": { - "description": "Fan speeds in RPM for each fan on the device. Empty array means that there\nare no fans or fan speed is not supported on the system.", + "description": "Fan speeds in RPM for each fan on the device. Empty array means that there are no fans or fan speed is not supported on the system.", "type": "array", "items": { "type": "number", @@ -2151,7 +2239,7 @@ } }, "cpuUsages": { - "description": "CPU usages in percentage for each core available on the device.\nUsage is 0 for each unplugged core. Empty array implies that CPU usage\nis not supported in the system.", + "description": "CPU usages in percentage for each core available on the device. Usage is 0 for each unplugged core. Empty array implies that CPU usage is not supported in the system.", "type": "array", "items": { "type": "number", @@ -2162,13 +2250,13 @@ "id": "HardwareStatus" } }, - "revision": "20170724", + "revision": "20170905", "basePath": "", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "version_module": "True", + "version_module": true, "canonicalName": "Android Management", "discoveryVersion": "v1", "fullyEncodeReservedExpansion": true, diff --git a/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-gen.go b/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-gen.go index 940d26d64..f30b7ca8e 100644 --- a/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-gen.go +++ b/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-gen.go @@ -45,6 +45,12 @@ const apiName = "androidmanagement" const apiVersion = "v1" const basePath = "https://androidmanagement.googleapis.com/" +// OAuth2 scopes used by this API. +const ( + // Manage Android devices and apps for your customers + AndroidmanagementScope = "https://www.googleapis.com/auth/androidmanagement" +) + func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -163,16 +169,13 @@ type SignupUrlsService struct { } // ApiLevelCondition: A compliance rule condition which is satisfied if -// the Android Framework API -// level on the device does not meet a minimum requirement. There can -// only be -// one rule with this type of condition per policy. +// the Android Framework API level on the device does not meet a minimum +// requirement. There can only be one rule with this type of condition +// per policy. type ApiLevelCondition struct { // MinApiLevel: The minimum desired Android Framework API level. If the - // device does not - // meet the minimum requirement, this condition is satisfied. Must be - // greater - // than zero. + // device does not meet the minimum requirement, this condition is + // satisfied. Must be greater than zero. MinApiLevel int64 `json:"minApiLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "MinApiLevel") to @@ -201,13 +204,11 @@ func (s *ApiLevelCondition) MarshalJSON() ([]byte, error) { // Application: Application information. type Application struct { // ManagedProperties: The set of managed properties available to be - // pre-configured for the - // application. + // pre-configured for the application. ManagedProperties []*ManagedProperty `json:"managedProperties,omitempty"` - // Name: The name of the application in the - // form - // `enterprises/{enterpriseId}/applications/{package_name}` + // Name: The name of the application in the form + // enterprises/{enterpriseId}/applications/{package_name} Name string `json:"name,omitempty"` // Permissions: The permissions required by the app. @@ -247,8 +248,7 @@ func (s *Application) MarshalJSON() ([]byte, error) { // ApplicationPermission: Application permission. type ApplicationPermission struct { // Description: A longer description of the permission, giving more - // details of - // what it affects. Localized. + // details of what it affects. Localized. Description string `json:"description,omitempty"` // Name: The name of the permission. Localized. @@ -284,15 +284,13 @@ func (s *ApplicationPermission) MarshalJSON() ([]byte, error) { // ApplicationPolicy: Policy for an individual app. type ApplicationPolicy struct { // DefaultPermissionPolicy: The default policy for all permissions - // requested by the app. If specified, - // this overrides the policy-level `default_permission_policy` which - // applies - // to all apps. + // requested by the app. If specified, this overrides the policy-level + // default_permission_policy which applies to all apps. // // Possible values: // "PERMISSION_POLICY_UNSPECIFIED" - Policy not specified. If no - // policy is specified for a permission at any - // level, then the `PROMPT` behavior is used by default. + // policy is specified for a permission at any level, then the PROMPT + // behavior is used by default. // "PROMPT" - Prompt the user to grant a permission. // "GRANT" - Automatically grant a permission. // "DENY" - Automatically deny a permission. @@ -302,14 +300,12 @@ type ApplicationPolicy struct { // // Possible values: // "INSTALL_TYPE_UNSPECIFIED" - No automatic installation is - // performed. Any other app policies will be - // applied if the user installs the app. + // performed. Any other app policies will be applied if the user + // installs the app. // "PREINSTALLED" - The application is automatically installed and can - // be removed by the - // user. + // be removed by the user. // "FORCE_INSTALLED" - The application is automatically installed and - // cannot be removed by the - // user. + // cannot be removed by the user. InstallType string `json:"installType,omitempty"` // LockTaskAllowed: Whether the application is allowed to lock itself in @@ -317,43 +313,26 @@ type ApplicationPolicy struct { LockTaskAllowed bool `json:"lockTaskAllowed,omitempty"` // ManagedConfiguration: Managed configuration applied to the app. The - // format for the configuration - // is dictated by - // the - // [`ManagedProperty`](/android/management/reference/rest/v1/enterpri - // ses.applications#ManagedProperty) + // format for the configuration is dictated by the ManagedProperty // values supported by the app. Each field name in the managed - // configuration - // must match the `key` field of the `ManagedProperty`. The field value - // must - // be compatible with the `type` of the - // `ManagedProperty`: - // - // - // - // - // - // < - // /tr> - // - // - // - //
typeJSON - // value
`BOOL``true` or - // `false`
`STRING`string
`I - // NTEGER`number
`CHOICE`string
`MULTISELECT`array of - // strings
`HIDDEN`string
`B - // UNDLE_ARRAY`array of objects
+ // configuration must match the key field of the ManagedProperty. The + // field value must be compatible with the type of the ManagedProperty: + // + // + // + // + // + // + // + //
typeJSON value
BOOLtrue or false
STRINGstring
INTEGERnumber
CHOICEstring
MULTISELECTarray of strings
HIDDENstring
BUNDLE_ARRAYarray of objects
ManagedConfiguration googleapi.RawMessage `json:"managedConfiguration,omitempty"` // PackageName: The package name of the app, e.g. - // `com.google.android.youtube` for the - // YouTube app. + // com.google.android.youtube for the YouTube app. PackageName string `json:"packageName,omitempty"` // PermissionGrants: Explicit permission grants or denials for the app. - // These values override - // the `default_permission_policy`. + // These values override the default_permission_policy. PermissionGrants []*PermissionGrant `json:"permissionGrants,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -384,30 +363,26 @@ func (s *ApplicationPolicy) MarshalJSON() ([]byte, error) { // Command: A command. type Command struct { // CreateTime: The timestamp at which the command was created. The - // timestamp is - // automatically generated by the server. + // timestamp is automatically generated by the server. CreateTime string `json:"createTime,omitempty"` // Duration: The duration for which the command is valid. The command - // will expire if not - // executed by the device during this time. The default duration - // if - // unspecified is ten minutes. There is no maximum duration. + // will expire if not executed by the device during this time. The + // default duration if unspecified is ten minutes. There is no maximum + // duration. Duration string `json:"duration,omitempty"` - // NewPassword: For commands of type `RESET_PASSWORD`, optionally - // specifies the new - // password. + // NewPassword: For commands of type RESET_PASSWORD, optionally + // specifies the new password. NewPassword string `json:"newPassword,omitempty"` - // ResetPasswordFlags: For commands of type `RESET_PASSWORD`, optionally + // ResetPasswordFlags: For commands of type RESET_PASSWORD, optionally // specifies flags. // // Possible values: // "RESET_PASSWORD_FLAG_UNSPECIFIED" - This value is ignored. // "REQUIRE_ENTRY" - Don't allow other admins to change the password - // again until the user has - // entered it. + // again until the user has entered it. // "DO_NOT_ASK_CREDENTIALS_ON_BOOT" - Don't ask for user credentials // on device boot. ResetPasswordFlags []string `json:"resetPasswordFlags,omitempty"` @@ -446,41 +421,27 @@ func (s *Command) MarshalJSON() ([]byte, error) { } // ComplianceRule: A rule declaring which mitigating actions to take -// when a device is not -// compliant with its policy. For every rule, there is always an -// implicit -// mitigating action to set `policy_compliant` to false for -// the -// [`Device`](/android/management/reference/rest/v1/enterprises.devic -// es#Device) -// resource, and display a message on the device indicating that the -// device is -// not compliant with its policy. Other mitigating actions may -// optionally be -// taken as well, depending on the field values in the rule. +// when a device is not compliant with its policy. For every rule, there +// is always an implicit mitigating action to set policy_compliant to +// false for the Device resource, and display a message on the device +// indicating that the device is not compliant with its policy. Other +// mitigating actions may optionally be taken as well, depending on the +// field values in the rule. type ComplianceRule struct { // ApiLevelCondition: A condition which is satisfied if the Android - // Framework API level on the - // device does not meet a minimum requirement. + // Framework API level on the device does not meet a minimum + // requirement. ApiLevelCondition *ApiLevelCondition `json:"apiLevelCondition,omitempty"` // DisableApps: If set to true, the rule includes a mitigating action to - // disable - // applications so that the device is effectively disabled, but - // application - // data is preserved. If the device is running an app in locked task - // mode, the - // app will be closed and a UI showing the reason for non-compliance - // will be - // displayed. + // disable applications so that the device is effectively disabled, but + // application data is preserved. If the device is running an app in + // locked task mode, the app will be closed and a UI showing the reason + // for non-compliance will be displayed. DisableApps bool `json:"disableApps,omitempty"` // NonComplianceDetailCondition: A condition which is satisfied if there - // exists *any* - // matching - // [`NonComplianceDetail`](/android/management/reference/rest/v1 - // /enterprises.devices#NonComplianceDetail) - // for the device. + // exists any matching NonComplianceDetail for the device. NonComplianceDetailCondition *NonComplianceDetailCondition `json:"nonComplianceDetailCondition,omitempty"` // ForceSendFields is a list of field names (e.g. "ApiLevelCondition") @@ -507,10 +468,9 @@ func (s *ComplianceRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Device: A device owned by an enterprise. -// Unless otherwise noted, all fields are read-only and cannot be -// modified by -// an update device request. +// Device: A device owned by an enterprise. Unless otherwise noted, all +// fields are read-only and cannot be modified by an update device +// request. type Device struct { // ApiLevel: The API level of the Android platform version running on // the device. @@ -531,47 +491,39 @@ type Device struct { // "ACTIVE" - The device is active. // "DISABLED" - The device is disabled. // "DELETED" - The device was deleted. This state will never be - // returned by an API call, - // but will be used in the final policy compliance report published to - // Cloud - // Pub/Sub when the device acknowledges the deletion. + // returned by an API call, but will be used in the final policy + // compliance report published to Cloud Pub/Sub when the device + // acknowledges the deletion. // "PROVISIONING" - The device is being provisioned. Newly enrolled - // devices will be in this - // state until they have applied policy. + // devices will be in this state until they have applied policy. AppliedState string `json:"appliedState,omitempty"` - // DisabledReason: If the device state is `DISABLED`, an optional - // message that is displayed on - // the device indicating the reason the device is disabled. This field - // may be - // modified by an update request. + // DisabledReason: If the device state is DISABLED, an optional message + // that is displayed on the device indicating the reason the device is + // disabled. This field may be modified by an update request. DisabledReason *UserFacingMessage `json:"disabledReason,omitempty"` // Displays: Displays on the device. This information is only available - // when - // `displayInfoEnabled` is true in the device's policy. + // when displayInfoEnabled is true in the device's policy. Displays []*Display `json:"displays,omitempty"` // EnrollmentTime: The time of device enrollment. EnrollmentTime string `json:"enrollmentTime,omitempty"` // EnrollmentTokenData: If this device was enrolled with an enrollment - // token with additional data - // provided, this field contains that data. + // token with additional data provided, this field contains that data. EnrollmentTokenData string `json:"enrollmentTokenData,omitempty"` // EnrollmentTokenName: If this device was enrolled with an enrollment - // token, this field contains - // the name of the token. + // token, this field contains the name of the token. EnrollmentTokenName string `json:"enrollmentTokenName,omitempty"` // HardwareInfo: Detailed information about the device hardware. HardwareInfo *HardwareInfo `json:"hardwareInfo,omitempty"` // HardwareStatusSamples: Hardware status samples in chronological - // order. This information is only - // available when `hardwareStatusEnabled` is true in the device's - // policy. + // order. This information is only available when hardwareStatusEnabled + // is true in the device's policy. HardwareStatusSamples []*HardwareStatus `json:"hardwareStatusSamples,omitempty"` // LastPolicyComplianceReportTime: The last time the device sent a @@ -585,25 +537,20 @@ type Device struct { LastStatusReportTime string `json:"lastStatusReportTime,omitempty"` // MemoryEvents: Events related to memory and storage measurements in - // chronological order. - // This information is only available when `memoryInfoEnabled` is true - // in the - // device's policy. + // chronological order. This information is only available when + // memoryInfoEnabled is true in the device's policy. MemoryEvents []*MemoryEvent `json:"memoryEvents,omitempty"` // MemoryInfo: Memory information. This information is only available - // when - // `memoryInfoEnabled` is true in the device's policy. + // when memoryInfoEnabled is true in the device's policy. MemoryInfo *MemoryInfo `json:"memoryInfo,omitempty"` - // Name: The name of the device in the - // form - // `enterprises/{enterpriseId}/devices/{deviceId}` + // Name: The name of the device in the form + // enterprises/{enterpriseId}/devices/{deviceId} Name string `json:"name,omitempty"` // NetworkInfo: Device network information. This information is only - // available when - // `networkInfoEnabled` is true in the device's policy. + // available when networkInfoEnabled is true in the device's policy. NetworkInfo *NetworkInfo `json:"networkInfo,omitempty"` // NonComplianceDetails: Details about policy settings for which the @@ -614,69 +561,50 @@ type Device struct { PolicyCompliant bool `json:"policyCompliant,omitempty"` // PolicyName: The name of the policy that is intended to be applied to - // the device. If - // empty, the policy with id `default` is applied. - // This field may be modified by an update request. - // The name of the policy is in the - // form - // `enterprises/{enterpriseId}/policies/{policyId}`. - // It is also permissible to only specify the `policyId` when updating - // this - // field as long as the `policyId` contains no slashes since the rest of - // the - // policy name can be inferred from context. + // the device. If empty, the policy with id default is applied. This + // field may be modified by an update request. The name of the policy is + // in the form enterprises/{enterpriseId}/policies/{policyId}. It is + // also permissible to only specify the policyId when updating this + // field as long as the policyId contains no slashes since the rest of + // the policy name can be inferred from context. PolicyName string `json:"policyName,omitempty"` // PowerManagementEvents: Power management events on the device in - // chronological order. This - // information is only available when `powerManagementEventsEnabled` is - // true - // in the device's policy. + // chronological order. This information is only available when + // powerManagementEventsEnabled is true in the device's policy. PowerManagementEvents []*PowerManagementEvent `json:"powerManagementEvents,omitempty"` // PreviousDeviceNames: The previous device names used for the same - // physical device when it has - // been enrolled multiple times. The serial number is used as the - // unique - // identifier to determine if the same physical device has - // enrolled - // previously. The names are in chronological order. + // physical device when it has been enrolled multiple times. The serial + // number is used as the unique identifier to determine if the same + // physical device has enrolled previously. The names are in + // chronological order. PreviousDeviceNames []string `json:"previousDeviceNames,omitempty"` // SoftwareInfo: Detailed information about the device software. This - // information is only - // available when `softwareInfoEnabled` is true in the device's policy. + // information is only available when softwareInfoEnabled is true in the + // device's policy. SoftwareInfo *SoftwareInfo `json:"softwareInfo,omitempty"` // State: The state that is intended to be applied to the device. This - // field may be - // modified by an update request. - // Note that UpdateDevice only handles toggling between `ACTIVE` - // and - // `DISABLED` states. Use the - // [delete device - // method](/android/management/reference/rest/v1/enterprises.devices/dele - // te) - // to cause the device to enter the `DELETED` state. + // field may be modified by an update request. Note that UpdateDevice + // only handles toggling between ACTIVE and DISABLED states. Use the + // delete device method to cause the device to enter the DELETED state. // // Possible values: // "DEVICE_STATE_UNSPECIFIED" - This value is disallowed. // "ACTIVE" - The device is active. // "DISABLED" - The device is disabled. // "DELETED" - The device was deleted. This state will never be - // returned by an API call, - // but will be used in the final policy compliance report published to - // Cloud - // Pub/Sub when the device acknowledges the deletion. + // returned by an API call, but will be used in the final policy + // compliance report published to Cloud Pub/Sub when the device + // acknowledges the deletion. // "PROVISIONING" - The device is being provisioned. Newly enrolled - // devices will be in this - // state until they have applied policy. + // devices will be in this state until they have applied policy. State string `json:"state,omitempty"` - // UserName: The resource name of the user of the device in the - // form - // `enterprises/{enterpriseId}/users/{userId}`. This is the name of - // the + // UserName: The resource name of the user of the device in the form + // enterprises/{enterpriseId}/users/{userId}. This is the name of the // device account automatically created for this device. UserName string `json:"userName,omitempty"` @@ -761,17 +689,14 @@ func (s *Display) MarshalJSON() ([]byte, error) { } // 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 +// 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 `{}`. +// } +// The JSON representation for Empty is empty JSON object {}. type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -781,62 +706,44 @@ type Empty struct { // EnrollmentToken: An enrollment token. type EnrollmentToken struct { // AdditionalData: Optional, arbitrary data associated with the - // enrollment token. - // This could contain, for example, the id of an org unit to which the - // device - // is assigned after enrollment. - // After a device enrolls with the token, this data will be exposed in - // the - // `enrollment_token_data` field of - // the - // [`Device`](/android/management/reference/rest/v1/enterprises.devic - // es#Device) - // resource. The data must be 1024 characters or less; otherwise, the - // creation - // request will fail. + // enrollment token. This could contain, for example, the id of an org + // unit to which the device is assigned after enrollment. After a device + // enrolls with the token, this data will be exposed in the + // enrollment_token_data field of the Device resource. The data must be + // 1024 characters or less; otherwise, the creation request will fail. AdditionalData string `json:"additionalData,omitempty"` // Duration: The duration of the token. If not specified, the duration - // will be 1 hour. - // The allowed range is 1 minute to 30 days. + // will be 1 hour. The allowed range is 1 minute to 30 days. Duration string `json:"duration,omitempty"` // ExpirationTimestamp: The expiration time of the token. This is a - // read-only field generated by - // the server. + // read-only field generated by the server. ExpirationTimestamp string `json:"expirationTimestamp,omitempty"` // Name: The name of the enrollment token, which is generated by the - // server during - // creation, in the - // form - // `enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}` + // server during creation, in the form + // enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId} Name string `json:"name,omitempty"` // PolicyName: The name of the policy that will be initially applied to - // the enrolled - // device in the form - // `enterprises/{enterpriseId}/policies/{policyId}`. - // If not specified, the policy with id `default` is applied. - // It is permissible to only specify the `policyId` when updating - // this - // field as long as the `policyId` contains no slashes since the rest of - // the - // policy name can be inferred from context. + // the enrolled device in the form + // enterprises/{enterpriseId}/policies/{policyId}. If not specified, the + // policy with id default is applied. It is permissible to only specify + // the policyId when updating this field as long as the policyId + // contains no slashes since the rest of the policy name can be inferred + // from context. PolicyName string `json:"policyName,omitempty"` // QrCode: A JSON string whose UTF-8 representation can be used to - // generate a QR code - // to enroll a device with this enrollment token. To enroll a device - // using - // NFC, the NFC record must contain a serialized - // `java.util.Properties` - // representation of the properties in the JSON. + // generate a QR code to enroll a device with this enrollment token. To + // enroll a device using NFC, the NFC record must contain a serialized + // java.util.Properties representation of the properties in the JSON. QrCode string `json:"qrCode,omitempty"` // Value: The token value which is passed to the device and authorizes - // the device to - // enroll. This is a read-only field generated by the server. + // the device to enroll. This is a read-only field generated by the + // server. Value string `json:"value,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -870,14 +777,10 @@ func (s *EnrollmentToken) MarshalJSON() ([]byte, error) { // Enterprise: The configuration applied to an enterprise. type Enterprise struct { // AppAutoApprovalEnabled: Whether app auto-approval is enabled. When - // enabled, apps installed via - // policy for this enterprise have all permissions automatically - // approved. - // When enabled, it is the caller's responsibility to display the - // permissions - // required by an app to the enterprise admin before setting the app to - // be - // installed in a policy. + // enabled, apps installed via policy for this enterprise have all + // permissions automatically approved. When enabled, it is the caller's + // responsibility to display the permissions required by an app to the + // enterprise admin before setting the app to be installed in a policy. AppAutoApprovalEnabled bool `json:"appAutoApprovalEnabled,omitempty"` // EnabledNotificationTypes: The notification types to enable via Google @@ -899,35 +802,25 @@ type Enterprise struct { EnterpriseDisplayName string `json:"enterpriseDisplayName,omitempty"` // Logo: An image displayed as a logo during device provisioning. - // Supported types - // are: image/bmp, image/gif, image/x-ico, image/jpeg, image/png, - // image/webp, - // image/vnd.wap.wbmp, image/x-adobe-dng. + // Supported types are: image/bmp, image/gif, image/x-ico, image/jpeg, + // image/png, image/webp, image/vnd.wap.wbmp, image/x-adobe-dng. Logo *ExternalData `json:"logo,omitempty"` // Name: The name of the enterprise which is generated by the server - // during - // creation, in the form - // `enterprises/{enterpriseId}` + // during creation, in the form enterprises/{enterpriseId} Name string `json:"name,omitempty"` // PrimaryColor: A color in RGB format indicating the predominant color - // to display in the - // device management app UI. The color components are stored as - // follows: - // `(red << 16) | (green << 8) | blue`, where each component may take a - // value - // between 0 and 255 inclusive. + // to display in the device management app UI. The color components are + // stored as follows: (red << 16) | (green << 8) | blue, where each + // component may take a value between 0 and 255 inclusive. PrimaryColor int64 `json:"primaryColor,omitempty"` // PubsubTopic: When Cloud Pub/Sub notifications are enabled, this field - // is required to - // indicate the topic to which the notifications will be published. The - // format - // of this field is `projects/{project}/topics/{topic}`. You must have - // granted - // the publish permission on this topic - // to + // is required to indicate the topic to which the notifications will be + // published. The format of this field is + // projects/{project}/topics/{topic}. You must have granted the publish + // permission on this topic to // android-cloud-policy@system.gserviceaccount.com PubsubTopic string `json:"pubsubTopic,omitempty"` @@ -961,25 +854,18 @@ func (s *Enterprise) MarshalJSON() ([]byte, error) { } // ExternalData: Data hosted at an external location. The data is to be -// downloaded by Android -// Device Policy and verified against the hash. +// downloaded by Android Device Policy and verified against the hash. type ExternalData struct { // Sha256Hash: The base-64 encoded SHA-256 hash of the content hosted at - // url. If the - // content does not match this hash, Android Device Policy will not use - // the - // data. + // url. If the content does not match this hash, Android Device Policy + // will not use the data. Sha256Hash string `json:"sha256Hash,omitempty"` // Url: The absolute URL to the data, which must use either the http or - // https - // scheme. Android Device Policy does not provide any credentials in the - // GET - // request, so the URL must be publicly accessible. Including a long, - // random - // component in the URL may be used to prevent attackers from - // discovering the - // URL. + // https scheme. Android Device Policy does not provide any credentials + // in the GET request, so the URL must be publicly accessible. Including + // a long, random component in the URL may be used to prevent attackers + // from discovering the URL. Url string `json:"url,omitempty"` // ForceSendFields is a list of field names (e.g. "Sha256Hash") to @@ -1006,22 +892,18 @@ func (s *ExternalData) MarshalJSON() ([]byte, error) { } // HardwareInfo: Information about device hardware. The fields related -// to temperature -// thresholds are only available when hardwareStatusEnabled is true in -// the -// device's policy. +// to temperature thresholds are only available when +// hardwareStatusEnabled is true in the device's policy. type HardwareInfo struct { // BatteryShutdownTemperatures: Battery shutdown temperature thresholds - // in Celsius for each battery on the - // device. + // in Celsius for each battery on the device. BatteryShutdownTemperatures []float64 `json:"batteryShutdownTemperatures,omitempty"` // BatteryThrottlingTemperatures: Battery throttling temperature - // thresholds in Celsius for each battery on - // the device. + // thresholds in Celsius for each battery on the device. BatteryThrottlingTemperatures []float64 `json:"batteryThrottlingTemperatures,omitempty"` - // Brand: Brand of the device, e.g. `Google`. + // Brand: Brand of the device, e.g. Google. Brand string `json:"brand,omitempty"` // CpuShutdownTemperatures: CPU shutdown temperature thresholds in @@ -1029,12 +911,11 @@ type HardwareInfo struct { CpuShutdownTemperatures []float64 `json:"cpuShutdownTemperatures,omitempty"` // CpuThrottlingTemperatures: CPU throttling temperature thresholds in - // Celsius for each CPU on the - // device. + // Celsius for each CPU on the device. CpuThrottlingTemperatures []float64 `json:"cpuThrottlingTemperatures,omitempty"` // DeviceBasebandVersion: Baseband version, e.g. - // `MDM9625_104662.22.05.34p`. + // MDM9625_104662.22.05.34p. DeviceBasebandVersion string `json:"deviceBasebandVersion,omitempty"` // GpuShutdownTemperatures: GPU shutdown temperature thresholds in @@ -1042,17 +923,16 @@ type HardwareInfo struct { GpuShutdownTemperatures []float64 `json:"gpuShutdownTemperatures,omitempty"` // GpuThrottlingTemperatures: GPU throttling temperature thresholds in - // Celsius for each GPU on the - // device. + // Celsius for each GPU on the device. GpuThrottlingTemperatures []float64 `json:"gpuThrottlingTemperatures,omitempty"` - // Hardware: Name of the hardware, e.g. `Angler`. + // Hardware: Name of the hardware, e.g. Angler. Hardware string `json:"hardware,omitempty"` - // Manufacturer: Manufacturer, e.g. `Motorola`. + // Manufacturer: Manufacturer, e.g. Motorola. Manufacturer string `json:"manufacturer,omitempty"` - // Model: The model of the device, e.g. `Asus Nexus 7`. + // Model: The model of the device, e.g. Asus Nexus 7. Model string `json:"model,omitempty"` // SerialNumber: The device serial number. @@ -1092,8 +972,8 @@ func (s *HardwareInfo) MarshalJSON() ([]byte, error) { } // HardwareStatus: Hardware status. Temperatures may be compared to the -// temperature thresholds -// available in `hardwareInfo` to determine hardware health. +// temperature thresholds available in hardwareInfo to determine +// hardware health. type HardwareStatus struct { // BatteryTemperatures: Current battery temperatures in Celsius for each // battery on the device. @@ -1104,18 +984,16 @@ type HardwareStatus struct { CpuTemperatures []float64 `json:"cpuTemperatures,omitempty"` // CpuUsages: CPU usages in percentage for each core available on the - // device. - // Usage is 0 for each unplugged core. Empty array implies that CPU - // usage - // is not supported in the system. + // device. Usage is 0 for each unplugged core. Empty array implies that + // CPU usage is not supported in the system. CpuUsages []float64 `json:"cpuUsages,omitempty"` // CreateTime: The time the measurements were taken. CreateTime string `json:"createTime,omitempty"` // FanSpeeds: Fan speeds in RPM for each fan on the device. Empty array - // means that there - // are no fans or fan speed is not supported on the system. + // means that there are no fans or fan speed is not supported on the + // system. FanSpeeds []float64 `json:"fanSpeeds,omitempty"` // GpuTemperatures: Current GPU temperatures in Celsius for each GPU on @@ -1262,28 +1140,24 @@ func (s *ListPoliciesResponse) MarshalJSON() ([]byte, error) { // ManagedProperty: Managed property. type ManagedProperty struct { - // DefaultValue: The default value of the properties. `BUNDLE_ARRAY` - // properties - // never have a default value. + // DefaultValue: The default value of the properties. BUNDLE_ARRAY + // properties never have a default value. DefaultValue interface{} `json:"defaultValue,omitempty"` // Description: A longer description of the property, giving more detail - // of what it - // affects. Localized. + // of what it affects. Localized. Description string `json:"description,omitempty"` - // Entries: For `CHOICE` or `MULTISELECT` properties, the list - // of possible entries. + // Entries: For CHOICE or MULTISELECT properties, the list of possible + // entries. Entries []*ManagedPropertyEntry `json:"entries,omitempty"` // Key: The unique key that the application uses to identify the - // property, - // e.g. "com.google.android.gm.fieldname". + // property, e.g. "com.google.android.gm.fieldname". Key string `json:"key,omitempty"` - // NestedProperties: For `BUNDLE_ARRAY` properties, the list of nested - // properties. A - // `BUNDLE_ARRAY` property is at most two levels deep. + // NestedProperties: For BUNDLE_ARRAY properties, the list of nested + // properties. A BUNDLE_ARRAY property is at most two levels deep. NestedProperties []*ManagedProperty `json:"nestedProperties,omitempty"` // Title: The name of the property. Localized. @@ -1299,10 +1173,8 @@ type ManagedProperty struct { // "CHOICE" - A choice of one item from a set. // "MULTISELECT" - A choice of multiple items from a set. // "HIDDEN" - A hidden restriction of string type (the default value - // can be used - // to pass along information that cannot be modified, such as a - // version - // code). + // can be used to pass along information that cannot be modified, such + // as a version code). // "BUNDLE_ARRAY" - An array of property bundles. Type string `json:"type,omitempty"` @@ -1335,8 +1207,7 @@ type ManagedPropertyEntry struct { Name string `json:"name,omitempty"` // Value: The machine-readable value of the entry, which should be used - // in the - // configuration. Not localized. + // in the configuration. Not localized. Value string `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to @@ -1365,8 +1236,8 @@ func (s *ManagedPropertyEntry) MarshalJSON() ([]byte, error) { // MemoryEvent: An event related to memory and storage measurements. type MemoryEvent struct { // ByteCount: The number of free bytes in the medium, or for - // `EXTERNAL_STORAGE_DETECTED`, - // the total capacity in bytes of the storage medium. + // EXTERNAL_STORAGE_DETECTED, the total capacity in bytes of the storage + // medium. ByteCount int64 `json:"byteCount,omitempty,string"` // CreateTime: The creation time of the event. @@ -1381,8 +1252,8 @@ type MemoryEvent struct { // "INTERNAL_STORAGE_MEASURED" - Free space in internal storage was // measured. // "EXTERNAL_STORAGE_DETECTED" - A new external storage medium was - // detected. The reported byte count is - // the total capacity of the storage medium. + // detected. The reported byte count is the total capacity of the + // storage medium. // "EXTERNAL_STORAGE_REMOVED" - An external storage medium was // removed. The reported byte count is zero. // "EXTERNAL_STORAGE_MEASURED" - Free space in an external storage @@ -1447,14 +1318,14 @@ func (s *MemoryInfo) MarshalJSON() ([]byte, error) { // NetworkInfo: Device network info. type NetworkInfo struct { - // Imei: IMEI number of the GSM device, e.g. `A1000031212`. + // Imei: IMEI number of the GSM device, e.g. A1000031212. Imei string `json:"imei,omitempty"` - // Meid: MEID number of the CDMA device, e.g. `A00000292788E1`. + // Meid: MEID number of the CDMA device, e.g. A00000292788E1. Meid string `json:"meid,omitempty"` // WifiMacAddress: WiFi MAC address of the device, e.g. - // `7c:11:11:11:11:11`. + // 7c:11:11:11:11:11. WifiMacAddress string `json:"wifiMacAddress,omitempty"` // ForceSendFields is a list of field names (e.g. "Imei") to @@ -1484,44 +1355,32 @@ func (s *NetworkInfo) MarshalJSON() ([]byte, error) { // policy setting. type NonComplianceDetail struct { // CurrentValue: If the policy setting could not be applied, the current - // value of the - // setting on the device. + // value of the setting on the device. CurrentValue interface{} `json:"currentValue,omitempty"` // FieldPath: For settings with nested fields, if a particular nested - // field is out of - // compliance, this specifies the full path to the offending field. The - // path - // is formatted in the same way the policy JSON field would be - // referenced in - // JavaScript, that is: - // 1) For object-typed fields, the field name is followed by a dot then - // by a - // subfield name. - // 2) For array-typed fields, the field name is followed by the array - // index - // enclosed in brackets. - // For example, to indicate a problem with the `url` field in - // the - // `externalData` field in the 3rd application, the path would - // be - // `applications[2].externalData.url` + // field is out of compliance, this specifies the full path to the + // offending field. The path is formatted in the same way the policy + // JSON field would be referenced in JavaScript, that is: 1) For + // object-typed fields, the field name is followed by a dot then by a + // subfield name. 2) For array-typed fields, the field name is followed + // by the array index enclosed in brackets. For example, to indicate a + // problem with the url field in the externalData field in the 3rd + // application, the path would be applications[2].externalData.url FieldPath string `json:"fieldPath,omitempty"` - // InstallationFailureReason: If `package_name` is set and the - // non-compliance reason is - // `APP_NOT_INSTALLED`, the detailed reason the app cannot be installed. + // InstallationFailureReason: If package_name is set and the + // non-compliance reason is APP_NOT_INSTALLED, the detailed reason the + // app cannot be installed. // // Possible values: // "INSTALLATION_FAILURE_REASON_UNSPECIFIED" - This value is // disallowed. // "INSTALLATION_FAILURE_REASON_UNKNOWN" - An unknown condition is - // preventing the app from being installed. Some - // potential reaons are that the device does not have enough storage, - // the - // device network connection is unreliable, or the installation is - // taking - // longer than expected. The installation will be retried automatically. + // preventing the app from being installed. Some potential reaons are + // that the device does not have enough storage, the device network + // connection is unreliable, or the installation is taking longer than + // expected. The installation will be retried automatically. // "IN_PROGRESS" - The installation is still in progress. // "NOT_FOUND" - The app was not found in Play. // "NOT_COMPATIBLE_WITH_DEVICE" - The app is incompatible with the @@ -1534,8 +1393,7 @@ type NonComplianceDetail struct { // "NO_LICENSES_REMAINING" - There are no more licenses to assign to // the user. // "NOT_ENROLLED" - The enterprise is no longer enrolled with Play for - // Work or Android Device - // Policy is not enabled for the enterprise. + // Work or Android Device Policy is not enabled for the enterprise. // "USER_INVALID" - The user is no longer valid. The user may have // been deleted or disabled. InstallationFailureReason string `json:"installationFailureReason,omitempty"` @@ -1546,39 +1404,31 @@ type NonComplianceDetail struct { // Possible values: // "NON_COMPLIANCE_REASON_UNSPECIFIED" - This value is disallowed. // "API_LEVEL" - The setting is not supported in the API level of - // Android OS version the - // device is running. + // Android OS version the device is running. // "ADMIN_TYPE" - The admin type (profile owner, device owner, etc.) - // does not support the - // setting. + // does not support the setting. // "USER_ACTION" - The user has not taken required action to comply // with the setting. // "INVALID_VALUE" - The setting has an invalid value. // "APP_NOT_INSTALLED" - The application required to implement the // policy is not installed. // "UNSUPPORTED" - The policy is not supported by the version of - // Android Device Policy on - // the device. + // Android Device Policy on the device. // "APP_INSTALLED" - A blocked application is installed. // "PENDING" - The setting was not applied yet at the time of the - // report, but is - // expected to be applied shortly. + // report, but is expected to be applied shortly. // "APP_INCOMPATIBLE" - The setting cannot be applied to the - // application because its target SDK - // version is not high enough. + // application because its target SDK version is not high enough. + // "APP_NOT_UPDATED" - The application is installed but not updated to + // the minimum version code specified by policy NonComplianceReason string `json:"nonComplianceReason,omitempty"` // PackageName: The package name indicating which application is out of - // compliance, if - // applicable. + // compliance, if applicable. PackageName string `json:"packageName,omitempty"` // SettingName: The name of the policy setting. This is the JSON field - // name of a - // top-level - // [`Policy`](/android/management/reference/rest/v1/enterprises - // .policies#Policy) - // field. + // name of a top-level Policy field. SettingName string `json:"settingName,omitempty"` // ForceSendFields is a list of field names (e.g. "CurrentValue") to @@ -1605,63 +1455,46 @@ func (s *NonComplianceDetail) MarshalJSON() ([]byte, error) { } // NonComplianceDetailCondition: A compliance rule condition which is -// satisfied if there exists -// *any* -// matching -// [`NonComplianceDetail`](/android/management/reference/r -// est/v1/enterprises.devices#NonComplianceDetail) -// for the device. A `NonComplianceDetail` matches -// a -// `NonComplianceDetailCondition` if *all* the fields which are set -// within the -// `NonComplianceDetailCondition` match the corresponding -// `NonComplianceDetail` -// fields. +// satisfied if there exists any matching NonComplianceDetail for the +// device. A NonComplianceDetail matches a NonComplianceDetailCondition +// if all the fields which are set within the +// NonComplianceDetailCondition match the corresponding +// NonComplianceDetail fields. type NonComplianceDetailCondition struct { // NonComplianceReason: The reason the device is not in compliance with - // the setting. If not set, - // then this condition matches any reason. + // the setting. If not set, then this condition matches any reason. // // Possible values: // "NON_COMPLIANCE_REASON_UNSPECIFIED" - This value is disallowed. // "API_LEVEL" - The setting is not supported in the API level of - // Android OS version the - // device is running. + // Android OS version the device is running. // "ADMIN_TYPE" - The admin type (profile owner, device owner, etc.) - // does not support the - // setting. + // does not support the setting. // "USER_ACTION" - The user has not taken required action to comply // with the setting. // "INVALID_VALUE" - The setting has an invalid value. // "APP_NOT_INSTALLED" - The application required to implement the // policy is not installed. // "UNSUPPORTED" - The policy is not supported by the version of - // Android Device Policy on - // the device. + // Android Device Policy on the device. // "APP_INSTALLED" - A blocked application is installed. // "PENDING" - The setting was not applied yet at the time of the - // report, but is - // expected to be applied shortly. + // report, but is expected to be applied shortly. // "APP_INCOMPATIBLE" - The setting cannot be applied to the - // application because its target SDK - // version is not high enough. + // application because its target SDK version is not high enough. + // "APP_NOT_UPDATED" - The application is installed but not updated to + // the minimum version code specified by policy NonComplianceReason string `json:"nonComplianceReason,omitempty"` // PackageName: The package name indicating which application is out of - // compliance. If not - // set, then this condition matches any package name. If this field is - // set, - // then `setting_name` must be unset or set to `applications`; - // otherwise, the - // condition would never be satisfied. + // compliance. If not set, then this condition matches any package name. + // If this field is set, then setting_name must be unset or set to + // applications; otherwise, the condition would never be satisfied. PackageName string `json:"packageName,omitempty"` // SettingName: The name of the policy setting. This is the JSON field - // name of a - // top-level - // [`Policy`](/android/management/reference/rest/v1/enterprises - // .policies#Policy) - // field. If not set, then this condition matches any setting name. + // name of a top-level Policy field. If not set, then this condition + // matches any setting name. SettingName string `json:"settingName,omitempty"` // ForceSendFields is a list of field names (e.g. "NonComplianceReason") @@ -1689,51 +1522,37 @@ func (s *NonComplianceDetailCondition) MarshalJSON() ([]byte, error) { } // Operation: This resource represents a long-running operation that is -// the result of a -// network API call. +// the result of a network API call. type Operation struct { - // Done: If the value is `false`, it means the operation is still in - // progress. - // If true, the operation is completed, and either `error` or `response` - // is - // available. + // Done: If the value is false, it means the operation is still in + // progress. If true, the operation is completed, and either error or + // response is available. Done bool `json:"done,omitempty"` // Error: The error result of the operation in case of failure or // cancellation. Error *Status `json:"error,omitempty"` - // Metadata: Service-specific metadata associated with the operation. - // It typically - // contains progress information and common metadata such as create - // time. - // Some services might not provide such metadata. Any method that - // returns a - // long-running operation should document the metadata type, if any. + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. Metadata googleapi.RawMessage `json:"metadata,omitempty"` // Name: The server-assigned name, which is only unique within the same - // service that - // originally returns it. If you use the default HTTP mapping, - // the - // `name` should have the format of `operations/some/unique/name`. + // service that originally returns it. If you use the default HTTP + // mapping, the name should have the format of + // operations/some/unique/name. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. - // If the original - // method returns no data on success, such as `Delete`, the response - // is - // `google.protobuf.Empty`. If the original method is - // standard - // `Get`/`Create`/`Update`, the response should be the resource. For - // other - // methods, the response should have the type `XxxResponse`, where - // `Xxx` - // is the original method name. For example, if the original method - // name - // is `TakeSnapshot()`, the inferred response type - // is - // `TakeSnapshotResponse`. + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as Delete, the + // response is google.protobuf.Empty. If the original method is standard + // Get/Create/Update, the response should be the resource. For other + // methods, the response should have the type XxxResponse, where Xxx is + // the original method name. For example, if the original method name is + // TakeSnapshot(), the inferred response type is TakeSnapshotResponse. Response googleapi.RawMessage `json:"response,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1767,57 +1586,50 @@ func (s *Operation) MarshalJSON() ([]byte, error) { // device. type PasswordRequirements struct { // MaximumFailedPasswordsForWipe: A device will be wiped after too many - // incorrect device-unlock passwords - // have been entered. A value of 0 means there is no restriction. + // incorrect device-unlock passwords have been entered. A value of 0 + // means there is no restriction. MaximumFailedPasswordsForWipe int64 `json:"maximumFailedPasswordsForWipe,omitempty"` // PasswordExpirationTimeout: Password expiration timeout. PasswordExpirationTimeout string `json:"passwordExpirationTimeout,omitempty"` // PasswordHistoryLength: The length of the password history. After - // setting this, the user will - // not be able to enter a new password that is the same as any password - // in - // the history. A value of 0 means there is no restriction. + // setting this, the user will not be able to enter a new password that + // is the same as any password in the history. A value of 0 means there + // is no restriction. PasswordHistoryLength int64 `json:"passwordHistoryLength,omitempty"` // PasswordMinimumLength: The minimum allowed password length. A value - // of 0 means there is no - // restriction. - // Only enforced when `password_quality` is `NUMERIC`, - // `NUMERIC_COMPLEX`, - // `ALPHABETIC`, `ALPHANUMERIC`, or `COMPLEX`. + // of 0 means there is no restriction. Only enforced when + // password_quality is NUMERIC, NUMERIC_COMPLEX, ALPHABETIC, + // ALPHANUMERIC, or COMPLEX. PasswordMinimumLength int64 `json:"passwordMinimumLength,omitempty"` // PasswordMinimumLetters: Minimum number of letters required in the - // password. - // Only enforced when `password_quality` is `COMPLEX`. + // password. Only enforced when password_quality is COMPLEX. PasswordMinimumLetters int64 `json:"passwordMinimumLetters,omitempty"` // PasswordMinimumLowerCase: Minimum number of lower case letters - // required in the password. - // Only enforced when `password_quality` is `COMPLEX`. + // required in the password. Only enforced when password_quality is + // COMPLEX. PasswordMinimumLowerCase int64 `json:"passwordMinimumLowerCase,omitempty"` // PasswordMinimumNonLetter: Minimum number of non-letter characters - // (numerical digits or symbols) - // required in the password. - // Only enforced when `password_quality` is `COMPLEX`. + // (numerical digits or symbols) required in the password. Only enforced + // when password_quality is COMPLEX. PasswordMinimumNonLetter int64 `json:"passwordMinimumNonLetter,omitempty"` // PasswordMinimumNumeric: Minimum number of numerical digits required - // in the password. - // Only enforced when `password_quality` is `COMPLEX`. + // in the password. Only enforced when password_quality is COMPLEX. PasswordMinimumNumeric int64 `json:"passwordMinimumNumeric,omitempty"` // PasswordMinimumSymbols: Minimum number of symbols required in the - // password. - // Only enforced when `password_quality` is `COMPLEX`. + // password. Only enforced when password_quality is COMPLEX. PasswordMinimumSymbols int64 `json:"passwordMinimumSymbols,omitempty"` // PasswordMinimumUpperCase: Minimum number of upper case letters - // required in the password. - // Only enforced when `password_quality` is `COMPLEX`. + // required in the password. Only enforced when password_quality is + // COMPLEX. PasswordMinimumUpperCase int64 `json:"passwordMinimumUpperCase,omitempty"` // PasswordQuality: The required password quality. @@ -1826,22 +1638,17 @@ type PasswordRequirements struct { // "PASSWORD_QUALITY_UNSPECIFIED" - There are no requirements for the // password. // "SOMETHING" - There must be a password, but there are no - // restrictions on its - // characters. + // restrictions on its characters. // "NUMERIC" - The password must contain numeric characters. // "NUMERIC_COMPLEX" - The password must contain numeric characters - // with no repeating (4444) or - // ordered (1234, 4321, 2468) sequences. + // with no repeating (4444) or ordered (1234, 4321, 2468) sequences. // "ALPHABETIC" - The password must contain alphabetic (or symbol) // characters. // "ALPHANUMERIC" - The password must contain at both numeric and - // alphabetic (or symbol) - // characters. + // alphabetic (or symbol) characters. // "COMPLEX" - The password must contain at least a letter, a - // numerical digit and a - // special symbol. Other password constraints, for - // example, - // `password_minimum_letters` are enforced. + // numerical digit and a special symbol. Other password constraints, for + // example, password_minimum_letters are enforced. PasswordQuality string `json:"passwordQuality,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -1873,15 +1680,15 @@ func (s *PasswordRequirements) MarshalJSON() ([]byte, error) { // grant state. type PermissionGrant struct { // Permission: The android permission, e.g. - // `android.permission.READ_CALENDAR`. + // android.permission.READ_CALENDAR. Permission string `json:"permission,omitempty"` // Policy: The policy for granting the permission. // // Possible values: // "PERMISSION_POLICY_UNSPECIFIED" - Policy not specified. If no - // policy is specified for a permission at any - // level, then the `PROMPT` behavior is used by default. + // policy is specified for a permission at any level, then the PROMPT + // behavior is used by default. // "PROMPT" - Prompt the user to grant a permission. // "GRANT" - Automatically grant a permission. // "DENY" - Automatically deny a permission. @@ -1911,34 +1718,26 @@ func (s *PermissionGrant) MarshalJSON() ([]byte, error) { } // PersistentPreferredActivity: A default activity for handling intents -// that match a particular intent -// filter. +// that match a particular intent filter. type PersistentPreferredActivity struct { - // Actions: The intent actions to match in the filter. If any actions - // are included in - // the filter, then an intent's action must be one of those values for - // it to - // match. If no actions are included, the intent action is ignored. + // Actions: The intent actions to match in the filter. If any actions + // are included in the filter, then an intent's action must be one of + // those values for it to match. If no actions are included, the intent + // action is ignored. Actions []string `json:"actions,omitempty"` - // Categories: The intent categories to match in the filter. An intent - // includes the - // categories that it requires, all of which must be included in the - // filter in - // order to match. In other words, adding a category to the filter has - // no - // impact on matching unless that category is specified in the intent. + // Categories: The intent categories to match in the filter. An intent + // includes the categories that it requires, all of which must be + // included in the filter in order to match. In other words, adding a + // category to the filter has no impact on matching unless that category + // is specified in the intent. Categories []string `json:"categories,omitempty"` // ReceiverActivity: The activity that should be the default intent - // handler. This should be an - // Android component name, e.g. - // `com.android.enterprise.app/.MainActivity`. - // Alternatively, the value may be the package name of an app, which - // causes - // Android Device Policy to choose an appropriate activity from the app - // to - // handle the intent. + // handler. This should be an Android component name, e.g. + // com.android.enterprise.app/.MainActivity. Alternatively, the value + // may be the package name of an app, which causes Android Device Policy + // to choose an appropriate activity from the app to handle the intent. ReceiverActivity string `json:"receiverActivity,omitempty"` // ForceSendFields is a list of field names (e.g. "Actions") to @@ -1976,25 +1775,23 @@ type Policy struct { // Applications: Policy applied to apps. Applications []*ApplicationPolicy `json:"applications,omitempty"` + // AutoTimeRequired: Whether auto time is required, which prevents the + // user from manually setting the date and time. + AutoTimeRequired bool `json:"autoTimeRequired,omitempty"` + // BlockApplicationsEnabled: Whether applications other than the ones - // configured in `applications` are - // blocked from being installed. When set, applications that - // were - // installed under a previous policy but no longer appear in the policy - // are - // automatically uninstalled. + // configured in applications are blocked from being installed. When + // set, applications that were installed under a previous policy but no + // longer appear in the policy are automatically uninstalled. BlockApplicationsEnabled bool `json:"blockApplicationsEnabled,omitempty"` // CameraDisabled: Whether all cameras on the device are disabled. CameraDisabled bool `json:"cameraDisabled,omitempty"` // ComplianceRules: Rules declaring which mitigating actions to take - // when a device is not - // compliant with its policy. When the conditions for multiple rules - // are - // satisfied, all of the mitigating actions for the rules are taken. - // There is - // a maximum limit of 100 rules. + // when a device is not compliant with its policy. When the conditions + // for multiple rules are satisfied, all of the mitigating actions for + // the rules are taken. There is a maximum limit of 100 rules. ComplianceRules []*ComplianceRule `json:"complianceRules,omitempty"` // DebuggingFeaturesAllowed: Whether the user is allowed to enable @@ -2006,8 +1803,8 @@ type Policy struct { // // Possible values: // "PERMISSION_POLICY_UNSPECIFIED" - Policy not specified. If no - // policy is specified for a permission at any - // level, then the `PROMPT` behavior is used by default. + // policy is specified for a permission at any level, then the PROMPT + // behavior is used by default. // "PROMPT" - Prompt the user to grant a permission. // "GRANT" - Automatically grant a permission. // "DENY" - Automatically deny a permission. @@ -2018,60 +1815,48 @@ type Policy struct { FactoryResetDisabled bool `json:"factoryResetDisabled,omitempty"` // FrpAdminEmails: Email addresses of device administrators for factory - // reset protection. - // When the device is factory reset, it will require one of these admins - // to - // log in with the Google account email and password to unlock the - // device. - // If no admins are specified, the device will not provide factory - // reset - // protection. + // reset protection. When the device is factory reset, it will require + // one of these admins to log in with the Google account email and + // password to unlock the device. If no admins are specified, the device + // will not provide factory reset protection. FrpAdminEmails []string `json:"frpAdminEmails,omitempty"` // FunDisabled: Whether the user is allowed to have fun. Controls - // whether the Easter egg - // game in Settings is disabled. + // whether the Easter egg game in Settings is disabled. FunDisabled bool `json:"funDisabled,omitempty"` // InstallUnknownSourcesAllowed: Whether the user is allowed to enable - // the "Unknown Sources" setting, - // which allows installation of apps from unknown sources. + // the "Unknown Sources" setting, which allows installation of apps from + // unknown sources. InstallUnknownSourcesAllowed bool `json:"installUnknownSourcesAllowed,omitempty"` // KeyguardDisabled: Whether the keyguard is disabled. KeyguardDisabled bool `json:"keyguardDisabled,omitempty"` // MaximumTimeToLock: Maximum time in milliseconds for user activity - // until the device will lock. - // A value of 0 means there is no restriction. + // until the device will lock. A value of 0 means there is no + // restriction. MaximumTimeToLock int64 `json:"maximumTimeToLock,omitempty,string"` // ModifyAccountsDisabled: Whether adding or removing accounts is // disabled. ModifyAccountsDisabled bool `json:"modifyAccountsDisabled,omitempty"` - // Name: The name of the policy in the - // form - // `enterprises/{enterpriseId}/policies/{policyId}` + // Name: The name of the policy in the form + // enterprises/{enterpriseId}/policies/{policyId} Name string `json:"name,omitempty"` // NetworkEscapeHatchEnabled: Flag to specify if network escape hatch is - // enabled. If this flag has been - // enabled then upon device boot if device has no network connection, - // then an - // activity will be shown that allows the user to temporarily connect to - // a - // network to fetch the latest policy. The launched activity will time - // out if - // no network has been connected for a given while and will return to - // the - // previous activity that was shown. + // enabled. If this flag has been enabled then upon device boot if + // device has no network connection, then an activity will be shown that + // allows the user to temporarily connect to a network to fetch the + // latest policy. The launched activity will time out if no network has + // been connected for a given while and will return to the previous + // activity that was shown. NetworkEscapeHatchEnabled bool `json:"networkEscapeHatchEnabled,omitempty"` - // OpenNetworkConfiguration: Network configuration for the device. - // See - // [configure networks](/android/management/configure-networks) - // for more information. + // OpenNetworkConfiguration: Network configuration for the device. See + // configure networks for more information. OpenNetworkConfiguration googleapi.RawMessage `json:"openNetworkConfiguration,omitempty"` // PasswordRequirements: Password requirements. @@ -2091,19 +1876,17 @@ type Policy struct { ScreenCaptureDisabled bool `json:"screenCaptureDisabled,omitempty"` // StatusBarDisabled: Whether the status bar is disabled. This disables - // notifications, quick - // settings and other screen overlays that allow escape from full-screen - // mode. + // notifications, quick settings and other screen overlays that allow + // escape from full-screen mode. StatusBarDisabled bool `json:"statusBarDisabled,omitempty"` // StatusReportingSettings: Status reporting settings StatusReportingSettings *StatusReportingSettings `json:"statusReportingSettings,omitempty"` // StayOnPluggedModes: The battery plugged in modes for which the device - // stays on. When using this - // setting, it is recommended to clear `maximum_time_to_lock` so that - // the - // device doesn't lock itself while it stays on. + // stays on. When using this setting, it is recommended to clear + // maximum_time_to_lock so that the device doesn't lock itself while it + // stays on. // // Possible values: // "BATTERY_PLUGGED_MODE_UNSPECIFIED" - This value is ignored. @@ -2113,22 +1896,28 @@ type Policy struct { StayOnPluggedModes []string `json:"stayOnPluggedModes,omitempty"` // SystemUpdate: The system update policy, which controls how OS updates - // are applied. If the - // update type is `WINDOWED` and the device has a device account, the - // update - // window will automatically apply to Play app updates as well. + // are applied. If the update type is WINDOWED and the device has a + // device account, the update window will automatically apply to Play + // app updates as well. SystemUpdate *SystemUpdate `json:"systemUpdate,omitempty"` // UnmuteMicrophoneDisabled: Whether the microphone is muted and - // adjusting microphone volume is - // disabled. + // adjusting microphone volume is disabled. UnmuteMicrophoneDisabled bool `json:"unmuteMicrophoneDisabled,omitempty"` // Version: The version of the policy. This is a read-only field. The - // version is - // incremented each time the policy is updated. + // version is incremented each time the policy is updated. Version int64 `json:"version,omitempty,string"` + // WifiConfigDisabled: Whether configuring WiFi access points is + // disabled. + WifiConfigDisabled bool `json:"wifiConfigDisabled,omitempty"` + + // WifiConfigsLockdownEnabled: Whether WiFi networks defined in Open + // Network Configuration are locked so they cannot be edited by the + // user. + WifiConfigsLockdownEnabled bool `json:"wifiConfigsLockdownEnabled,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -2159,7 +1948,7 @@ func (s *Policy) MarshalJSON() ([]byte, error) { // PowerManagementEvent: A power management event. type PowerManagementEvent struct { - // BatteryLevel: For `BATTERY_LEVEL_COLLECTED` events, the battery level + // BatteryLevel: For BATTERY_LEVEL_COLLECTED events, the battery level // as a percentage. BatteryLevel float64 `json:"batteryLevel,omitempty"` @@ -2219,15 +2008,12 @@ func (s *PowerManagementEvent) UnmarshalJSON(data []byte) error { // SignupUrl: An enterprise signup URL. type SignupUrl struct { - // Name: The name of the resource. This must be included in the - // [create - // enterprise](/android/management/reference/rest/v1/enterprises/create) - // - // request at the end of the signup flow. + // Name: The name of the resource. This must be included in the create + // enterprise request at the end of the signup flow. Name string `json:"name,omitempty"` - // Url: A URL under which the Admin can sign up for an enterprise. - // The page pointed to cannot be rendered in an iframe. + // Url: A URL under which the Admin can sign up for an enterprise. The + // page pointed to cannot be rendered in an iframe. Url string `json:"url,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -2260,25 +2046,22 @@ func (s *SignupUrl) MarshalJSON() ([]byte, error) { // SoftwareInfo: Information about device software. type SoftwareInfo struct { // AndroidBuildNumber: Android build Id string meant for displaying to - // the user, - // e.g. `shamu-userdebug 6.0.1 MOB30I 2756745 dev-keys`. + // the user, e.g. shamu-userdebug 6.0.1 MOB30I 2756745 dev-keys. AndroidBuildNumber string `json:"androidBuildNumber,omitempty"` // AndroidBuildTime: Build time. AndroidBuildTime string `json:"androidBuildTime,omitempty"` - // AndroidVersion: The user visible Android version string, e.g. - // `6.0.1`. + // AndroidVersion: The user visible Android version string, e.g. 6.0.1. AndroidVersion string `json:"androidVersion,omitempty"` - // BootloaderVersion: The system bootloader version number, e.g. - // `0.6.7`. + // BootloaderVersion: The system bootloader version number, e.g. 0.6.7. BootloaderVersion string `json:"bootloaderVersion,omitempty"` - // DeviceKernelVersion: Kernel version, e.g. `2.6.32.9-g103d848`. + // DeviceKernelVersion: Kernel version, e.g. 2.6.32.9-g103d848. DeviceKernelVersion string `json:"deviceKernelVersion,omitempty"` - // SecurityPatchLevel: Security patch level, e.g. `2016-05-01`. + // SecurityPatchLevel: Security patch level, e.g. 2016-05-01. SecurityPatchLevel string `json:"securityPatchLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "AndroidBuildNumber") @@ -2305,100 +2088,57 @@ func (s *SoftwareInfo) MarshalJSON() ([]byte, error) { 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 needs -// -// # Overview -// -// The `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 +// 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 mapping -// -// The `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 +// 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 uses -// -// The 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. +// 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: 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. + // 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 @@ -2472,43 +2212,33 @@ func (s *StatusReportingSettings) MarshalJSON() ([]byte, error) { // SystemUpdate: Configuration for managing system updates type SystemUpdate struct { - // EndMinutes: If the type is `WINDOWED`, the end of the maintenance - // window, measured as - // the number of minutes after midnight in device local time. This value - // must - // be between 0 and 1439, inclusive. If this value is less - // than - // `start_minutes`, then the maintenance window spans midnight. If - // the - // maintenance window specified is smaller than 30 minutes, the actual - // window - // is extended to 30 minutes beyond the start time. + // EndMinutes: If the type is WINDOWED, the end of the maintenance + // window, measured as the number of minutes after midnight in device + // local time. This value must be between 0 and 1439, inclusive. If this + // value is less than start_minutes, then the maintenance window spans + // midnight. If the maintenance window specified is smaller than 30 + // minutes, the actual window is extended to 30 minutes beyond the start + // time. EndMinutes int64 `json:"endMinutes,omitempty"` - // StartMinutes: If the type is `WINDOWED`, the start of the maintenance - // window, measured as - // the number of minutes after midnight in device local time. This value - // must - // be between 0 and 1439, inclusive. + // StartMinutes: If the type is WINDOWED, the start of the maintenance + // window, measured as the number of minutes after midnight in device + // local time. This value must be between 0 and 1439, inclusive. StartMinutes int64 `json:"startMinutes,omitempty"` // Type: The type of system update to configure. // // Possible values: // "SYSTEM_UPDATE_TYPE_UNSPECIFIED" - Follow the default update - // behavior for the device, which typically - // requires the user to accept system updates. + // behavior for the device, which typically requires the user to accept + // system updates. // "AUTOMATIC" - Install automatically as soon as an update is // available. // "WINDOWED" - Install automatically within a daily maintenance - // window. If the device - // has a device account, this also configures Play apps to be updated - // within - // the window. This is strongly recommended for kiosk devices because - // this - // is the only way apps persistently pinned to the foreground can be - // updated - // by Play. + // window. If the device has a device account, this also configures Play + // apps to be updated within the window. This is strongly recommended + // for kiosk devices because this is the only way apps persistently + // pinned to the foreground can be updated by Play. // "POSTPONE" - Postpone automatic install up to a maximum of 30 days. Type string `json:"type,omitempty"` @@ -2536,20 +2266,16 @@ func (s *SystemUpdate) MarshalJSON() ([]byte, error) { } // UserFacingMessage: Provides user facing message with locale info. The -// maximum message length is -// 4096 characters. +// maximum message length is 4096 characters. type UserFacingMessage struct { // DefaultMessage: The default message that gets displayed if no - // localized message is - // specified, or the user's locale does not match with any of the - // localized - // messages. A default message must be provided if any localized - // messages are - // provided. + // localized message is specified, or the user's locale does not match + // with any of the localized messages. A default message must be + // provided if any localized messages are provided. DefaultMessage string `json:"defaultMessage,omitempty"` - // LocalizedMessages: A map which contains pairs. - // The locale is a BCP 47 language code, e.g. en-US, es-ES, fr. + // LocalizedMessages: A map which contains pairs. The + // locale is a BCP 47 language code, e.g. en-US, es-ES, fr. LocalizedMessages map[string]string `json:"localizedMessages,omitempty"` // ForceSendFields is a list of field names (e.g. "DefaultMessage") to @@ -2580,22 +2306,17 @@ func (s *UserFacingMessage) MarshalJSON() ([]byte, error) { // Play web UI. type WebToken struct { // Name: The name of the web token, which is generated by the server - // during - // creation, in the - // form - // `enterprises/{enterpriseId}/webTokens/{webTokenId}`. + // during creation, in the form + // enterprises/{enterpriseId}/webTokens/{webTokenId}. Name string `json:"name,omitempty"` // ParentFrameUrl: The URL of the parent frame hosting the iframe with - // the embedded UI. To - // prevent XSS, the iframe may not be hosted at other URLs. The URL must - // use - // the https scheme. + // the embedded UI. To prevent XSS, the iframe may not be hosted at + // other URLs. The URL must use the https scheme. ParentFrameUrl string `json:"parentFrameUrl,omitempty"` // Permissions: Permissions the admin may exercise in the embedded UI. - // The admin must have - // all of these permissions in order to view the UI. + // The admin must have all of these permissions in order to view the UI. // // Possible values: // "WEB_TOKEN_PERMISSION_UNSPECIFIED" - This value is ignored. @@ -2603,9 +2324,8 @@ type WebToken struct { Permissions []string `json:"permissions,omitempty"` // Value: The token value which is used in the hosting page to generate - // the iframe - // with the embedded UI. This is a read-only field generated by the - // server. + // the iframe with the embedded UI. This is a read-only field generated + // by the server. Value string `json:"value,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -2668,11 +2388,7 @@ func (c *EnterprisesCreateCall) ProjectId(projectId string) *EnterprisesCreateCa } // SignupUrlName sets the optional parameter "signupUrlName": The name -// of -// the -// [`SignupUrl`](/android/management/reference/rest/v1/signupUrls#Sig -// nupUrl) -// used to sign up for the enterprise. +// of the SignupUrl used to sign up for the enterprise. func (c *EnterprisesCreateCall) SignupUrlName(signupUrlName string) *EnterprisesCreateCall { c.urlParams_.Set("signupUrlName", signupUrlName) return c @@ -2778,7 +2494,7 @@ func (c *EnterprisesCreateCall) Do(opts ...googleapi.CallOption) (*Enterprise, e // "type": "string" // }, // "signupUrlName": { - // "description": "The name of the\n[`SignupUrl`](/android/management/reference/rest/v1/signupUrls#SignupUrl)\nused to sign up for the enterprise.", + // "description": "The name of the SignupUrl used to sign up for the enterprise.", // "location": "query", // "type": "string" // } @@ -2789,7 +2505,10 @@ func (c *EnterprisesCreateCall) Do(opts ...googleapi.CallOption) (*Enterprise, e // }, // "response": { // "$ref": "Enterprise" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -2915,7 +2634,7 @@ func (c *EnterprisesGetCall) Do(opts ...googleapi.CallOption) (*Enterprise, erro // ], // "parameters": { // "name": { - // "description": "The name of the enterprise in the form\n`enterprises/{enterpriseId}`", + // "description": "The name of the enterprise in the form enterprises/{enterpriseId}", // "location": "path", // "pattern": "^enterprises/[^/]+$", // "required": true, @@ -2925,7 +2644,10 @@ func (c *EnterprisesGetCall) Do(opts ...googleapi.CallOption) (*Enterprise, erro // "path": "v1/{+name}", // "response": { // "$ref": "Enterprise" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -2950,8 +2672,8 @@ func (r *EnterprisesService) Patch(name string, enterprise *Enterprise) *Enterpr } // UpdateMask sets the optional parameter "updateMask": The field mask -// indicating the fields to update. -// If not set, all modifiable fields will be modified. +// indicating the fields to update. If not set, all modifiable fields +// will be modified. func (c *EnterprisesPatchCall) UpdateMask(updateMask string) *EnterprisesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -3052,14 +2774,14 @@ func (c *EnterprisesPatchCall) Do(opts ...googleapi.CallOption) (*Enterprise, er // ], // "parameters": { // "name": { - // "description": "The name of the enterprise in the form\n`enterprises/{enterpriseId}`", + // "description": "The name of the enterprise in the form enterprises/{enterpriseId}", // "location": "path", // "pattern": "^enterprises/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "The field mask indicating the fields to update.\nIf not set, all modifiable fields will be modified.", + // "description": "The field mask indicating the fields to update. If not set, all modifiable fields will be modified.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -3071,7 +2793,10 @@ func (c *EnterprisesPatchCall) Do(opts ...googleapi.CallOption) (*Enterprise, er // }, // "response": { // "$ref": "Enterprise" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -3095,10 +2820,8 @@ func (r *EnterprisesApplicationsService) Get(name string) *EnterprisesApplicatio } // LanguageCode sets the optional parameter "languageCode": The -// preferred language for localized application info, as a BCP47 -// tag -// (e.g. "en-US", "de"). If not specified the default language of -// the +// preferred language for localized application info, as a BCP47 tag +// (e.g. "en-US", "de"). If not specified the default language of the // application will be used. func (c *EnterprisesApplicationsGetCall) LanguageCode(languageCode string) *EnterprisesApplicationsGetCall { c.urlParams_.Set("languageCode", languageCode) @@ -3208,12 +2931,12 @@ func (c *EnterprisesApplicationsGetCall) Do(opts ...googleapi.CallOption) (*Appl // ], // "parameters": { // "languageCode": { - // "description": "The preferred language for localized application info, as a BCP47 tag\n(e.g. \"en-US\", \"de\"). If not specified the default language of the\napplication will be used.", + // "description": "The preferred language for localized application info, as a BCP47 tag (e.g. \"en-US\", \"de\"). If not specified the default language of the application will be used.", // "location": "query", // "type": "string" // }, // "name": { - // "description": "The name of the application in the form\n`enterprises/{enterpriseId}/applications/{package_name}`", + // "description": "The name of the application in the form enterprises/{enterpriseId}/applications/{package_name}", // "location": "path", // "pattern": "^enterprises/[^/]+/applications/[^/]+$", // "required": true, @@ -3223,7 +2946,10 @@ func (c *EnterprisesApplicationsGetCall) Do(opts ...googleapi.CallOption) (*Appl // "path": "v1/{+name}", // "response": { // "$ref": "Application" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -3335,7 +3061,7 @@ func (c *EnterprisesDevicesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, // ], // "parameters": { // "name": { - // "description": "The name of the device in the form\n`enterprises/{enterpriseId}/devices/{deviceId}`", + // "description": "The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}", // "location": "path", // "pattern": "^enterprises/[^/]+/devices/[^/]+$", // "required": true, @@ -3345,7 +3071,10 @@ func (c *EnterprisesDevicesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, // "path": "v1/{+name}", // "response": { // "$ref": "Empty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -3471,7 +3200,7 @@ func (c *EnterprisesDevicesGetCall) Do(opts ...googleapi.CallOption) (*Device, e // ], // "parameters": { // "name": { - // "description": "The name of the device in the form\n`enterprises/{enterpriseId}/devices/{deviceId}`", + // "description": "The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}", // "location": "path", // "pattern": "^enterprises/[^/]+/devices/[^/]+$", // "required": true, @@ -3481,7 +3210,10 @@ func (c *EnterprisesDevicesGetCall) Do(opts ...googleapi.CallOption) (*Device, e // "path": "v1/{+name}", // "response": { // "$ref": "Device" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -3497,20 +3229,9 @@ type EnterprisesDevicesIssueCommandCall struct { header_ http.Header } -// IssueCommand: Issues a command to a device. -// The -// [`Operation`](/android/management/reference/rest/v1/enterprises.de -// vices.operations#Operation) -// resource returned contains -// a -// [`Command`](/android/management/reference/rest/v1/enterprises.device -// s/issueCommand#Command) -// in its `metadata` field. -// Use the -// [get operation -// method](/android/management/reference/rest/v1/enterprises.devices.oper -// ations/get) -// to get the status of the command. +// IssueCommand: Issues a command to a device. The Operation resource +// returned contains a Command in its metadata field. Use the get +// operation method to get the status of the command. func (r *EnterprisesDevicesService) IssueCommand(name string, command *Command) *EnterprisesDevicesIssueCommandCall { c := &EnterprisesDevicesIssueCommandCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3604,7 +3325,7 @@ func (c *EnterprisesDevicesIssueCommandCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Issues a command to a device. The\n[`Operation`](/android/management/reference/rest/v1/enterprises.devices.operations#Operation)\nresource returned contains a\n[`Command`](/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command)\nin its `metadata` field.\nUse the\n[get operation method](/android/management/reference/rest/v1/enterprises.devices.operations/get)\nto get the status of the command.", + // "description": "Issues a command to a device. The Operation resource returned contains a Command in its metadata field. Use the get operation method to get the status of the command.", // "flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}:issueCommand", // "httpMethod": "POST", // "id": "androidmanagement.enterprises.devices.issueCommand", @@ -3613,7 +3334,7 @@ func (c *EnterprisesDevicesIssueCommandCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "name": { - // "description": "The name of the device in the form\n`enterprises/{enterpriseId}/devices/{deviceId}`", + // "description": "The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}", // "location": "path", // "pattern": "^enterprises/[^/]+/devices/[^/]+$", // "required": true, @@ -3626,7 +3347,10 @@ func (c *EnterprisesDevicesIssueCommandCall) Do(opts ...googleapi.CallOption) (* // }, // "response": { // "$ref": "Operation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -3650,8 +3374,7 @@ func (r *EnterprisesDevicesService) List(parent string) *EnterprisesDevicesListC } // PageSize sets the optional parameter "pageSize": The requested page -// size. The actual page size may be fixed to a min or max -// value. +// size. The actual page size may be fixed to a min or max value. func (c *EnterprisesDevicesListCall) PageSize(pageSize int64) *EnterprisesDevicesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -3767,7 +3490,7 @@ func (c *EnterprisesDevicesListCall) Do(opts ...googleapi.CallOption) (*ListDevi // ], // "parameters": { // "pageSize": { - // "description": "The requested page size. The actual page size may be fixed to a min or max\nvalue.", + // "description": "The requested page size. The actual page size may be fixed to a min or max value.", // "format": "int32", // "location": "query", // "type": "integer" @@ -3778,7 +3501,7 @@ func (c *EnterprisesDevicesListCall) Do(opts ...googleapi.CallOption) (*ListDevi // "type": "string" // }, // "parent": { - // "description": "The name of the enterprise in the form\n`enterprises/{enterpriseId}`", + // "description": "The name of the enterprise in the form enterprises/{enterpriseId}", // "location": "path", // "pattern": "^enterprises/[^/]+$", // "required": true, @@ -3788,7 +3511,10 @@ func (c *EnterprisesDevicesListCall) Do(opts ...googleapi.CallOption) (*ListDevi // "path": "v1/{+parent}/devices", // "response": { // "$ref": "ListDevicesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -3834,8 +3560,8 @@ func (r *EnterprisesDevicesService) Patch(name string, device *Device) *Enterpri } // UpdateMask sets the optional parameter "updateMask": The field mask -// indicating the fields to update. -// If not set, all modifiable fields will be modified. +// indicating the fields to update. If not set, all modifiable fields +// will be modified. func (c *EnterprisesDevicesPatchCall) UpdateMask(updateMask string) *EnterprisesDevicesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -3936,14 +3662,14 @@ func (c *EnterprisesDevicesPatchCall) Do(opts ...googleapi.CallOption) (*Device, // ], // "parameters": { // "name": { - // "description": "The name of the device in the form\n`enterprises/{enterpriseId}/devices/{deviceId}`", + // "description": "The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}", // "location": "path", // "pattern": "^enterprises/[^/]+/devices/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "The field mask indicating the fields to update.\nIf not set, all modifiable fields will be modified.", + // "description": "The field mask indicating the fields to update. If not set, all modifiable fields will be modified.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -3955,7 +3681,10 @@ func (c *EnterprisesDevicesPatchCall) Do(opts ...googleapi.CallOption) (*Device, // }, // "response": { // "$ref": "Device" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -3971,23 +3700,15 @@ type EnterprisesDevicesOperationsCancelCall struct { } // Cancel: Starts asynchronous cancellation on a long-running operation. -// The server -// makes a best effort to cancel the operation, but success is -// not -// guaranteed. If the server doesn't support this method, it -// returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can -// use -// Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether -// the -// operation completed despite cancellation. On successful -// cancellation, -// the operation is not deleted; instead, it becomes an operation -// with -// an Operation.error value with a google.rpc.Status.code of -// 1, -// corresponding to `Code.CANCELLED`. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns google.rpc.Code.UNIMPLEMENTED. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// Code.CANCELLED. func (r *EnterprisesDevicesOperationsService) Cancel(name string) *EnterprisesDevicesOperationsCancelCall { c := &EnterprisesDevicesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4075,7 +3796,7 @@ func (c *EnterprisesDevicesOperationsCancelCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", // "flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}/operations/{operationsId}:cancel", // "httpMethod": "POST", // "id": "androidmanagement.enterprises.devices.operations.cancel", @@ -4094,7 +3815,10 @@ func (c *EnterprisesDevicesOperationsCancelCall) Do(opts ...googleapi.CallOption // "path": "v1/{+name}:cancel", // "response": { // "$ref": "Empty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -4110,12 +3834,9 @@ type EnterprisesDevicesOperationsDeleteCall struct { } // Delete: Deletes a long-running operation. This method indicates that -// the client is -// no longer interested in the operation result. It does not cancel -// the -// operation. If the server doesn't support this method, it -// returns -// `google.rpc.Code.UNIMPLEMENTED`. +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns google.rpc.Code.UNIMPLEMENTED. func (r *EnterprisesDevicesOperationsService) Delete(name string) *EnterprisesDevicesOperationsDeleteCall { c := &EnterprisesDevicesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4203,7 +3924,7 @@ func (c *EnterprisesDevicesOperationsDeleteCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", // "flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}/operations/{operationsId}", // "httpMethod": "DELETE", // "id": "androidmanagement.enterprises.devices.operations.delete", @@ -4222,7 +3943,10 @@ func (c *EnterprisesDevicesOperationsDeleteCall) Do(opts ...googleapi.CallOption // "path": "v1/{+name}", // "response": { // "$ref": "Empty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -4238,11 +3962,9 @@ type EnterprisesDevicesOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this -// method to poll the operation result at intervals as recommended by -// the API -// service. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. func (r *EnterprisesDevicesOperationsService) Get(name string) *EnterprisesDevicesOperationsGetCall { c := &EnterprisesDevicesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4343,7 +4065,7 @@ func (c *EnterprisesDevicesOperationsGetCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", // "flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}/operations/{operationsId}", // "httpMethod": "GET", // "id": "androidmanagement.enterprises.devices.operations.get", @@ -4362,7 +4084,10 @@ func (c *EnterprisesDevicesOperationsGetCall) Do(opts ...googleapi.CallOption) ( // "path": "v1/{+name}", // "response": { // "$ref": "Operation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -4379,22 +4104,15 @@ type EnterprisesDevicesOperationsListCall struct { } // List: 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. +// 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. func (r *EnterprisesDevicesOperationsService) List(name string) *EnterprisesDevicesOperationsListCall { c := &EnterprisesDevicesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4516,7 +4234,7 @@ func (c *EnterprisesDevicesOperationsListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + // "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/enterprises/{enterprisesId}/devices/{devicesId}/operations", // "httpMethod": "GET", // "id": "androidmanagement.enterprises.devices.operations.list", @@ -4551,7 +4269,10 @@ func (c *EnterprisesDevicesOperationsListCall) Do(opts ...googleapi.CallOption) // "path": "v1/{+name}", // "response": { // "$ref": "ListOperationsResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -4691,7 +4412,7 @@ func (c *EnterprisesEnrollmentTokensCreateCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "parent": { - // "description": "The name of the enterprise in the form\n`enterprises/{enterpriseId}`", + // "description": "The name of the enterprise in the form enterprises/{enterpriseId}", // "location": "path", // "pattern": "^enterprises/[^/]+$", // "required": true, @@ -4704,7 +4425,10 @@ func (c *EnterprisesEnrollmentTokensCreateCall) Do(opts ...googleapi.CallOption) // }, // "response": { // "$ref": "EnrollmentToken" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -4817,7 +4541,7 @@ func (c *EnterprisesEnrollmentTokensDeleteCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "name": { - // "description": "The name of the enrollment token in the form\n`enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}`", + // "description": "The name of the enrollment token in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}", // "location": "path", // "pattern": "^enterprises/[^/]+/enrollmentTokens/[^/]+$", // "required": true, @@ -4827,7 +4551,10 @@ func (c *EnterprisesEnrollmentTokensDeleteCall) Do(opts ...googleapi.CallOption) // "path": "v1/{+name}", // "response": { // "$ref": "Empty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -4843,8 +4570,7 @@ type EnterprisesPoliciesDeleteCall struct { } // Delete: Deletes a policy. This operation is only permitted if no -// devices are -// currently referencing the policy. +// devices are currently referencing the policy. func (r *EnterprisesPoliciesService) Delete(name string) *EnterprisesPoliciesDeleteCall { c := &EnterprisesPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4932,7 +4658,7 @@ func (c *EnterprisesPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty } return ret, nil // { - // "description": "Deletes a policy. This operation is only permitted if no devices are\ncurrently referencing the policy.", + // "description": "Deletes a policy. This operation is only permitted if no devices are currently referencing the policy.", // "flatPath": "v1/enterprises/{enterprisesId}/policies/{policiesId}", // "httpMethod": "DELETE", // "id": "androidmanagement.enterprises.policies.delete", @@ -4941,7 +4667,7 @@ func (c *EnterprisesPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty // ], // "parameters": { // "name": { - // "description": "The name of the policy in the form\n`enterprises/{enterpriseId}/policies/{policyId}`", + // "description": "The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}", // "location": "path", // "pattern": "^enterprises/[^/]+/policies/[^/]+$", // "required": true, @@ -4951,7 +4677,10 @@ func (c *EnterprisesPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty // "path": "v1/{+name}", // "response": { // "$ref": "Empty" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -5077,7 +4806,7 @@ func (c *EnterprisesPoliciesGetCall) Do(opts ...googleapi.CallOption) (*Policy, // ], // "parameters": { // "name": { - // "description": "The name of the policy in the form\n`enterprises/{enterpriseId}/policies/{policyId}`", + // "description": "The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}", // "location": "path", // "pattern": "^enterprises/[^/]+/policies/[^/]+$", // "required": true, @@ -5087,7 +4816,10 @@ func (c *EnterprisesPoliciesGetCall) Do(opts ...googleapi.CallOption) (*Policy, // "path": "v1/{+name}", // "response": { // "$ref": "Policy" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -5111,8 +4843,7 @@ func (r *EnterprisesPoliciesService) List(parent string) *EnterprisesPoliciesLis } // PageSize sets the optional parameter "pageSize": The requested page -// size. The actual page size may be fixed to a min or max -// value. +// size. The actual page size may be fixed to a min or max value. func (c *EnterprisesPoliciesListCall) PageSize(pageSize int64) *EnterprisesPoliciesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -5228,7 +4959,7 @@ func (c *EnterprisesPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListPol // ], // "parameters": { // "pageSize": { - // "description": "The requested page size. The actual page size may be fixed to a min or max\nvalue.", + // "description": "The requested page size. The actual page size may be fixed to a min or max value.", // "format": "int32", // "location": "query", // "type": "integer" @@ -5239,7 +4970,7 @@ func (c *EnterprisesPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListPol // "type": "string" // }, // "parent": { - // "description": "The name of the enterprise in the form\n`enterprises/{enterpriseId}`", + // "description": "The name of the enterprise in the form enterprises/{enterpriseId}", // "location": "path", // "pattern": "^enterprises/[^/]+$", // "required": true, @@ -5249,7 +4980,10 @@ func (c *EnterprisesPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListPol // "path": "v1/{+parent}/policies", // "response": { // "$ref": "ListPoliciesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -5295,8 +5029,8 @@ func (r *EnterprisesPoliciesService) Patch(name string, policy *Policy) *Enterpr } // UpdateMask sets the optional parameter "updateMask": The field mask -// indicating the fields to update. -// If not set, all modifiable fields will be modified. +// indicating the fields to update. If not set, all modifiable fields +// will be modified. func (c *EnterprisesPoliciesPatchCall) UpdateMask(updateMask string) *EnterprisesPoliciesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -5397,14 +5131,14 @@ func (c *EnterprisesPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Policy // ], // "parameters": { // "name": { - // "description": "The name of the policy in the form\n`enterprises/{enterpriseId}/policies/{policyId}`", + // "description": "The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}", // "location": "path", // "pattern": "^enterprises/[^/]+/policies/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "The field mask indicating the fields to update.\nIf not set, all modifiable fields will be modified.", + // "description": "The field mask indicating the fields to update. If not set, all modifiable fields will be modified.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -5416,7 +5150,10 @@ func (c *EnterprisesPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Policy // }, // "response": { // "$ref": "Policy" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -5433,8 +5170,7 @@ type EnterprisesWebTokensCreateCall struct { } // Create: Creates a web token to access an embeddable managed Google -// Play web UI for -// a given enterprise. +// Play web UI for a given enterprise. func (r *EnterprisesWebTokensService) Create(parent string, webtoken *WebToken) *EnterprisesWebTokensCreateCall { c := &EnterprisesWebTokensCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -5528,7 +5264,7 @@ func (c *EnterprisesWebTokensCreateCall) Do(opts ...googleapi.CallOption) (*WebT } return ret, nil // { - // "description": "Creates a web token to access an embeddable managed Google Play web UI for\na given enterprise.", + // "description": "Creates a web token to access an embeddable managed Google Play web UI for a given enterprise.", // "flatPath": "v1/enterprises/{enterprisesId}/webTokens", // "httpMethod": "POST", // "id": "androidmanagement.enterprises.webTokens.create", @@ -5537,7 +5273,7 @@ func (c *EnterprisesWebTokensCreateCall) Do(opts ...googleapi.CallOption) (*WebT // ], // "parameters": { // "parent": { - // "description": "The name of the enterprise in the form\n`enterprises/{enterpriseId}`", + // "description": "The name of the enterprise in the form enterprises/{enterpriseId}", // "location": "path", // "pattern": "^enterprises/[^/]+$", // "required": true, @@ -5550,7 +5286,10 @@ func (c *EnterprisesWebTokensCreateCall) Do(opts ...googleapi.CallOption) (*WebT // }, // "response": { // "$ref": "WebToken" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } @@ -5571,19 +5310,12 @@ func (r *SignupUrlsService) Create() *SignupUrlsCreateCall { } // CallbackUrl sets the optional parameter "callbackUrl": The callback -// URL to which the admin will be redirected after successfully -// creating an enterprise. Before redirecting there the system will add -// a -// query parameter to this URL named `enterpriseToken` which -// will -// contain an opaque token to be used for the -// [create -// enterprise](/android/management/reference/rest/v1/enterprises/create) -// -// request. The URL will be parsed then reformatted in order to add -// the -// `enterpriseToken` parameter, so there may be some minor formatting -// changes. +// URL to which the admin will be redirected after successfully creating +// an enterprise. Before redirecting there the system will add a query +// parameter to this URL named enterpriseToken which will contain an +// opaque token to be used for the create enterprise request. The URL +// will be parsed then reformatted in order to add the enterpriseToken +// parameter, so there may be some minor formatting changes. func (c *SignupUrlsCreateCall) CallbackUrl(callbackUrl string) *SignupUrlsCreateCall { c.urlParams_.Set("callbackUrl", callbackUrl) return c @@ -5681,7 +5413,7 @@ func (c *SignupUrlsCreateCall) Do(opts ...googleapi.CallOption) (*SignupUrl, err // "parameterOrder": [], // "parameters": { // "callbackUrl": { - // "description": "The callback URL to which the admin will be redirected after successfully\ncreating an enterprise. Before redirecting there the system will add a\nquery parameter to this URL named `enterpriseToken` which will\ncontain an opaque token to be used for the\n[create enterprise](/android/management/reference/rest/v1/enterprises/create)\nrequest. The URL will be parsed then reformatted in order to add the\n`enterpriseToken` parameter, so there may be some minor formatting changes.", + // "description": "The callback URL to which the admin will be redirected after successfully creating an enterprise. Before redirecting there the system will add a query parameter to this URL named enterpriseToken which will contain an opaque token to be used for the create enterprise request. The URL will be parsed then reformatted in order to add the enterpriseToken parameter, so there may be some minor formatting changes.", // "location": "query", // "type": "string" // }, @@ -5694,7 +5426,10 @@ func (c *SignupUrlsCreateCall) Do(opts ...googleapi.CallOption) (*SignupUrl, err // "path": "v1/signupUrls", // "response": { // "$ref": "SignupUrl" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidmanagement" + // ] // } } diff --git a/vendor/google.golang.org/api/androidpublisher/v1.1/androidpublisher-api.json b/vendor/google.golang.org/api/androidpublisher/v1.1/androidpublisher-api.json index 7b7dde8d6..65e19ef35 100644 --- a/vendor/google.golang.org/api/androidpublisher/v1.1/androidpublisher-api.json +++ b/vendor/google.golang.org/api/androidpublisher/v1.1/androidpublisher-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/jAh44-3E4QU-_OC0i2RcuiwRQzw\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/LIbYVZb_4AVNYXTI7gW6jjbQKZE\"", "discoveryVersion": "v1", "id": "androidpublisher:v1.1", "name": "androidpublisher", "canonicalName": "Android Publisher", "version": "v1.1", - "revision": "20170504", + "revision": "20170815", "title": "Google Play Developer API", "description": "Lets Android application developers access their Google Play accounts.", "ownerDomain": "google.com", @@ -96,6 +96,10 @@ "description": "This kind represents an inappPurchase object in the androidpublisher service.", "default": "androidpublisher#inappPurchase" }, + "orderId": { + "type": "string", + "description": "The order id associated with the purchase of the inapp product." + }, "purchaseState": { "type": "integer", "description": "The purchase state of the order. Possible values are: \n- Purchased \n- Cancelled", diff --git a/vendor/google.golang.org/api/androidpublisher/v1.1/androidpublisher-gen.go b/vendor/google.golang.org/api/androidpublisher/v1.1/androidpublisher-gen.go index c4d799f6b..b27c4d8b7 100644 --- a/vendor/google.golang.org/api/androidpublisher/v1.1/androidpublisher-gen.go +++ b/vendor/google.golang.org/api/androidpublisher/v1.1/androidpublisher-gen.go @@ -113,6 +113,10 @@ type InappPurchase struct { // androidpublisher service. Kind string `json:"kind,omitempty"` + // OrderId: The order id associated with the purchase of the inapp + // product. + OrderId string `json:"orderId,omitempty"` + // PurchaseState: The purchase state of the order. Possible values are: // // - Purchased diff --git a/vendor/google.golang.org/api/androidpublisher/v1/androidpublisher-api.json b/vendor/google.golang.org/api/androidpublisher/v1/androidpublisher-api.json index c5ffc4781..ecb5e403d 100644 --- a/vendor/google.golang.org/api/androidpublisher/v1/androidpublisher-api.json +++ b/vendor/google.golang.org/api/androidpublisher/v1/androidpublisher-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/JYnXSSeS9snUxwUvBiIlGUwDhtI\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/GFmAPKnOg_ftPo6thNMuQykGE_I\"", "discoveryVersion": "v1", "id": "androidpublisher:v1", "name": "androidpublisher", "canonicalName": "Android Publisher", "version": "v1", - "revision": "20170504", + "revision": "20170815", "title": "Google Play Developer API", "description": "Lets Android application developers access their Google Play accounts.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/androidpublisher/v2/androidpublisher-api.json b/vendor/google.golang.org/api/androidpublisher/v2/androidpublisher-api.json index deaed42ee..31abcf835 100644 --- a/vendor/google.golang.org/api/androidpublisher/v2/androidpublisher-api.json +++ b/vendor/google.golang.org/api/androidpublisher/v2/androidpublisher-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/fkMKFYhAB3V0ia83SVxm8xZB5LU\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/e4AtolObWHB9RMWbWiGGnmazpNA\"", "discoveryVersion": "v1", "id": "androidpublisher:v2", "name": "androidpublisher", "canonicalName": "Android Publisher", "version": "v2", - "revision": "20170504", + "revision": "20170815", "title": "Google Play Developer API", "description": "Lets Android application developers access their Google Play accounts.", "ownerDomain": "google.com", @@ -100,6 +100,10 @@ "sha1": { "type": "string", "description": "A sha1 hash of the APK payload, encoded as a hex string and matching the output of the sha1sum command." + }, + "sha256": { + "type": "string", + "description": "A sha256 hash of the APK payload, encoded as a hex string and matching the output of the sha256sum command." } } }, @@ -830,6 +834,10 @@ "description": "This kind represents an inappPurchase object in the androidpublisher service.", "default": "androidpublisher#productPurchase" }, + "orderId": { + "type": "string", + "description": "The order id associated with the purchase of the inapp product." + }, "purchaseState": { "type": "integer", "description": "The purchase state of the order. Possible values are: \n- Purchased \n- Cancelled", @@ -998,9 +1006,13 @@ "description": "This kind represents a subscriptionPurchase object in the androidpublisher service.", "default": "androidpublisher#subscriptionPurchase" }, + "orderId": { + "type": "string", + "description": "The order id of the latest recurring order associated with the purchase of the subscription." + }, "paymentState": { "type": "integer", - "description": "The payment state of the subscription. Possible values are: \n- Payment pending \n- Payment received", + "description": "The payment state of the subscription. Possible values are: \n- Payment pending \n- Payment received \n- Free trial", "format": "int32" }, "priceAmountMicros": { @@ -3491,7 +3503,7 @@ "parameters": { "endTime": { "type": "string", - "description": "The time, in milliseconds since the Epoch, of the newest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be greater than the current time and is ignored if a pagination token is set. Default value is current time.", + "description": "The time, in milliseconds since the Epoch, of the newest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be greater than the current time and is ignored if a pagination token is set. Default value is current time. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.", "format": "int64", "location": "query" }, @@ -3513,7 +3525,7 @@ }, "startTime": { "type": "string", - "description": "The time, in milliseconds since the Epoch, of the oldest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be older than 30 days and is ignored if a pagination token is set. Default value is current time minus 30 days.", + "description": "The time, in milliseconds since the Epoch, of the oldest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be older than 30 days and is ignored if a pagination token is set. Default value is current time minus 30 days. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.", "format": "int64", "location": "query" }, diff --git a/vendor/google.golang.org/api/androidpublisher/v2/androidpublisher-gen.go b/vendor/google.golang.org/api/androidpublisher/v2/androidpublisher-gen.go index bd23a7ca8..812e1c78c 100644 --- a/vendor/google.golang.org/api/androidpublisher/v2/androidpublisher-gen.go +++ b/vendor/google.golang.org/api/androidpublisher/v2/androidpublisher-gen.go @@ -317,6 +317,10 @@ type ApkBinary struct { // matching the output of the sha1sum command. Sha1 string `json:"sha1,omitempty"` + // Sha256: A sha256 hash of the APK payload, encoded as a hex string and + // matching the output of the sha256sum command. + Sha256 string `json:"sha256,omitempty"` + // ForceSendFields is a list of field names (e.g. "Sha1") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -1696,6 +1700,10 @@ type ProductPurchase struct { // androidpublisher service. Kind string `json:"kind,omitempty"` + // OrderId: The order id associated with the purchase of the inapp + // product. + OrderId string `json:"orderId,omitempty"` + // PurchaseState: The purchase state of the order. Possible values are: // // - Purchased @@ -2032,10 +2040,15 @@ type SubscriptionPurchase struct { // androidpublisher service. Kind string `json:"kind,omitempty"` + // OrderId: The order id of the latest recurring order associated with + // the purchase of the subscription. + OrderId string `json:"orderId,omitempty"` + // PaymentState: The payment state of the subscription. Possible values // are: // - Payment pending // - Payment received + // - Free trial PaymentState *int64 `json:"paymentState,omitempty"` // PriceAmountMicros: Price of the subscription, not including tax. @@ -4325,17 +4338,13 @@ func (c *EditsApksListCall) Do(opts ...googleapi.CallOption) (*ApksListResponse, // method id "androidpublisher.edits.apks.upload": type EditsApksUploadCall struct { - s *Service - packageNameid string - editId string - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + packageNameid string + editId string + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Upload: @@ -4355,12 +4364,7 @@ func (r *EditsApksService) Upload(packageNameid string, editId string) *EditsApk // supplied. // At most one of Media and ResumableMedia may be set. func (c *EditsApksUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *EditsApksUploadCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -4375,11 +4379,7 @@ func (c *EditsApksUploadCall) Media(r io.Reader, options ...googleapi.MediaOptio // supersede any context previously provided to the Context method. func (c *EditsApksUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *EditsApksUploadCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -4388,7 +4388,7 @@ func (c *EditsApksUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *EditsApksUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *EditsApksUploadCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -4428,27 +4428,16 @@ func (c *EditsApksUploadCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}/apks") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -4485,20 +4474,10 @@ func (c *EditsApksUploadCall) Do(opts ...googleapi.CallOption) (*Apk, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -4582,11 +4561,7 @@ type EditsDeobfuscationfilesUploadCall struct { apkVersionCode int64 deobfuscationFileType string urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater + mediaInfo_ *gensupport.MediaInfo ctx_ context.Context header_ http.Header } @@ -4611,12 +4586,7 @@ func (r *EditsDeobfuscationfilesService) Upload(packageNameid string, editId str // supplied. // At most one of Media and ResumableMedia may be set. func (c *EditsDeobfuscationfilesUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *EditsDeobfuscationfilesUploadCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -4631,11 +4601,7 @@ func (c *EditsDeobfuscationfilesUploadCall) Media(r io.Reader, options ...google // supersede any context previously provided to the Context method. func (c *EditsDeobfuscationfilesUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *EditsDeobfuscationfilesUploadCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -4644,7 +4610,7 @@ func (c *EditsDeobfuscationfilesUploadCall) ResumableMedia(ctx context.Context, // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *EditsDeobfuscationfilesUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *EditsDeobfuscationfilesUploadCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -4684,27 +4650,16 @@ func (c *EditsDeobfuscationfilesUploadCall) doRequest(alt string) (*http.Respons var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}/apks/{apkVersionCode}/deobfuscationFiles/{deobfuscationFileType}") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -4743,20 +4698,10 @@ func (c *EditsDeobfuscationfilesUploadCall) Do(opts ...googleapi.CallOption) (*D if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -5816,11 +5761,7 @@ type EditsExpansionfilesUploadCall struct { apkVersionCode int64 expansionFileType string urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater + mediaInfo_ *gensupport.MediaInfo ctx_ context.Context header_ http.Header } @@ -5845,12 +5786,7 @@ func (r *EditsExpansionfilesService) Upload(packageNameid string, editId string, // supplied. // At most one of Media and ResumableMedia may be set. func (c *EditsExpansionfilesUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *EditsExpansionfilesUploadCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -5865,11 +5801,7 @@ func (c *EditsExpansionfilesUploadCall) Media(r io.Reader, options ...googleapi. // supersede any context previously provided to the Context method. func (c *EditsExpansionfilesUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *EditsExpansionfilesUploadCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -5878,7 +5810,7 @@ func (c *EditsExpansionfilesUploadCall) ResumableMedia(ctx context.Context, r io // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *EditsExpansionfilesUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *EditsExpansionfilesUploadCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -5918,27 +5850,16 @@ func (c *EditsExpansionfilesUploadCall) doRequest(alt string) (*http.Response, e var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}/apks/{apkVersionCode}/expansionFiles/{expansionFileType}") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -5977,20 +5898,10 @@ func (c *EditsExpansionfilesUploadCall) Do(opts ...googleapi.CallOption) (*Expan if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -6609,19 +6520,15 @@ func (c *EditsImagesListCall) Do(opts ...googleapi.CallOption) (*ImagesListRespo // method id "androidpublisher.edits.images.upload": type EditsImagesUploadCall struct { - s *Service - packageNameid string - editId string - language string - imageType string - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + packageNameid string + editId string + language string + imageType string + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Upload: Uploads a new image and adds it to the list of images for the @@ -6644,12 +6551,7 @@ func (r *EditsImagesService) Upload(packageNameid string, editId string, languag // supplied. // At most one of Media and ResumableMedia may be set. func (c *EditsImagesUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *EditsImagesUploadCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -6664,11 +6566,7 @@ func (c *EditsImagesUploadCall) Media(r io.Reader, options ...googleapi.MediaOpt // supersede any context previously provided to the Context method. func (c *EditsImagesUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *EditsImagesUploadCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -6677,7 +6575,7 @@ func (c *EditsImagesUploadCall) ResumableMedia(ctx context.Context, r io.ReaderA // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *EditsImagesUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *EditsImagesUploadCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -6717,27 +6615,16 @@ func (c *EditsImagesUploadCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}/listings/{language}/{imageType}") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -6776,20 +6663,10 @@ func (c *EditsImagesUploadCall) Do(opts ...googleapi.CallOption) (*ImagesUploadR if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -10901,7 +10778,10 @@ func (r *PurchasesVoidedpurchasesService) List(packageName string) *PurchasesVoi // milliseconds since the Epoch, of the newest voided in-app product // purchase that you want to see in the response. The value of this // parameter cannot be greater than the current time and is ignored if a -// pagination token is set. Default value is current time. +// pagination token is set. Default value is current time. Note: This +// filter is applied on the time at which the record is seen as voided +// by our systems and not the actual voided time returned in the +// response. func (c *PurchasesVoidedpurchasesListCall) EndTime(endTime int64) *PurchasesVoidedpurchasesListCall { c.urlParams_.Set("endTime", fmt.Sprint(endTime)) return c @@ -10923,7 +10803,10 @@ func (c *PurchasesVoidedpurchasesListCall) StartIndex(startIndex int64) *Purchas // milliseconds since the Epoch, of the oldest voided in-app product // purchase that you want to see in the response. The value of this // parameter cannot be older than 30 days and is ignored if a pagination -// token is set. Default value is current time minus 30 days. +// token is set. Default value is current time minus 30 days. Note: This +// filter is applied on the time at which the record is seen as voided +// by our systems and not the actual voided time returned in the +// response. func (c *PurchasesVoidedpurchasesListCall) StartTime(startTime int64) *PurchasesVoidedpurchasesListCall { c.urlParams_.Set("startTime", fmt.Sprint(startTime)) return c @@ -11037,7 +10920,7 @@ func (c *PurchasesVoidedpurchasesListCall) Do(opts ...googleapi.CallOption) (*Vo // ], // "parameters": { // "endTime": { - // "description": "The time, in milliseconds since the Epoch, of the newest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be greater than the current time and is ignored if a pagination token is set. Default value is current time.", + // "description": "The time, in milliseconds since the Epoch, of the newest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be greater than the current time and is ignored if a pagination token is set. Default value is current time. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.", // "format": "int64", // "location": "query", // "type": "string" @@ -11059,7 +10942,7 @@ func (c *PurchasesVoidedpurchasesListCall) Do(opts ...googleapi.CallOption) (*Vo // "type": "integer" // }, // "startTime": { - // "description": "The time, in milliseconds since the Epoch, of the oldest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be older than 30 days and is ignored if a pagination token is set. Default value is current time minus 30 days.", + // "description": "The time, in milliseconds since the Epoch, of the oldest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be older than 30 days and is ignored if a pagination token is set. Default value is current time minus 30 days. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.", // "format": "int64", // "location": "query", // "type": "string" diff --git a/vendor/google.golang.org/api/api-list.json b/vendor/google.golang.org/api/api-list.json index 4f0408e45..51a5b381c 100644 --- a/vendor/google.golang.org/api/api-list.json +++ b/vendor/google.golang.org/api/api-list.json @@ -279,7 +279,7 @@ "name": "androiddeviceprovisioning", "version": "v1", "title": "Android Device Provisioning Partner API", - "description": "Android Device Provisioning Partner API", + "description": "Automates reseller integration into zero-touch enrollment by assigning devices to customers and creating device reports.", "discoveryRestUrl": "https://androiddeviceprovisioning.googleapis.com/$discovery/rest?version=v1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", @@ -929,6 +929,21 @@ }, "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "container:v1alpha1", + "name": "container", + "version": "v1alpha1", + "title": "Google Container Engine API", + "description": "The Google Container Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.", + "discoveryRestUrl": "https://container.googleapis.com/$discovery/rest?version=v1alpha1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/container-engine/", + "preferred": false + }, { "kind": "discovery#directoryItem", "id": "container:v1", @@ -944,6 +959,21 @@ "documentationLink": "https://cloud.google.com/container-engine/", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "container:v1beta1", + "name": "container", + "version": "v1beta1", + "title": "Google Container Engine API", + "description": "The Google Container Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.", + "discoveryRestUrl": "https://container.googleapis.com/$discovery/rest?version=v1beta1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/container-engine/", + "preferred": false + }, { "kind": "discovery#directoryItem", "id": "content:v2sandbox", @@ -1052,6 +1082,21 @@ "documentationLink": "https://cloud.google.com/datastore/", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "datastore:v1beta1", + "name": "datastore", + "version": "v1beta1", + "title": "Google Cloud Datastore API", + "description": "Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.", + "discoveryRestUrl": "https://datastore.googleapis.com/$discovery/rest?version=v1beta1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/datastore/", + "preferred": false + }, { "kind": "discovery#directoryItem", "id": "datastore:v1beta3", @@ -1292,6 +1337,21 @@ "documentationLink": "https://firebase.google.com/docs/dynamic-links/", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "firebaseremoteconfig:v1", + "name": "firebaseremoteconfig", + "version": "v1", + "title": "Firebase Remote Config API", + "description": "Firebase Remote Config API allows the 3P clients to manage Remote Config conditions and parameters for Firebase applications.", + "discoveryRestUrl": "https://firebaseremoteconfig.googleapis.com/$discovery/rest?version=v1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://firebase.google.com/docs/remote-config/", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "firebaserules:v1", @@ -2175,7 +2235,7 @@ "name": "safebrowsing", "version": "v4", "title": "Google Safe Browsing API", - "description": "The Safe Browsing API is an experimental API that allows client applications to check URLs against Google's constantly-updated blacklists of suspected phishing and malware pages. Your client application can use the API to download an encrypted table for local, client-side lookups of URLs.", + "description": "Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources.", "discoveryRestUrl": "https://safebrowsing.googleapis.com/$discovery/rest?version=v4", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", @@ -2190,7 +2250,7 @@ "name": "script", "version": "v1", "title": "Google Apps Script Execution API", - "description": "Executes Google Apps Script projects.", + "description": "Executes functions in Google Apps Script projects.", "discoveryRestUrl": "https://script.googleapis.com/$discovery/rest?version=v1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", @@ -2595,6 +2655,21 @@ "documentationLink": "https://developers.google.com/google-apps/tasks/firstapp", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "testing:v1", + "name": "testing", + "version": "v1", + "title": "Google Cloud Testing API", + "description": "Allows developers to run automated tests for their mobile applications on Google infrastructure.", + "discoveryRestUrl": "https://testing.googleapis.com/$discovery/rest?version=v1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://developers.google.com/cloud-test-lab/", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "toolresults:v1beta3firstparty", 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 a0738da85..067402fed 100644 --- a/vendor/google.golang.org/api/appengine/v1/appengine-api.json +++ b/vendor/google.golang.org/api/appengine/v1/appengine-api.json @@ -1,958 +1,870 @@ { - "ownerDomain": "google.com", - "name": "appengine", - "batchPath": "batch", - "revision": "20170724", - "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", - "id": "appengine:v1", - "title": "Google App Engine Admin API", - "discoveryVersion": "v1", - "ownerName": "Google", - "version_module": "True", - "resources": { - "apps": { - "resources": { - "services": { - "resources": { - "versions": { - "methods": { - "patch": { - "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.", - "request": { - "$ref": "Version" - }, - "httpMethod": "PATCH", - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "updateMask": { - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", - "type": "string", - "location": "query" - }, - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", - "type": "string", - "required": true, - "location": "path" - }, - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "id": "appengine.apps.services.versions.patch" - }, - "get": { - "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.", - "httpMethod": "GET", - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "response": { - "$ref": "Version" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "view": { - "location": "query", - "enum": [ - "BASIC", - "FULL" - ], - "description": "Controls the set of fields returned in the Get response.", - "type": "string" - }, - "versionsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "id": "appengine.apps.services.versions.get" - }, - "list": { - "description": "Lists the versions of a service.", - "response": { - "$ref": "ListVersionsResponse" - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer" - }, - "view": { - "location": "query", - "enum": [ - "BASIC", - "FULL" - ], - "description": "Controls the set of fields returned in the List response.", - "type": "string" - }, - "servicesId": { - "location": "path", - "description": "Part of `parent`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "pageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string", - "location": "query" - }, - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions", - "id": "appengine.apps.services.versions.list", - "path": "v1/apps/{appsId}/services/{servicesId}/versions" - }, - "create": { - "id": "appengine.apps.services.versions.create", - "path": "v1/apps/{appsId}/services/{servicesId}/versions", - "request": { - "$ref": "Version" - }, - "description": "Deploys code and resource files to a new version.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "servicesId": { - "description": "Part of `parent`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions" - }, - "delete": { - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "id": "appengine.apps.services.versions.delete", - "description": "Deletes an existing Version resource.", - "httpMethod": "DELETE", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", - "type": "string", - "required": true - }, - "versionsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - } - } - }, - "resources": { - "instances": { - "methods": { - "delete": { - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "id": "appengine.apps.services.versions.instances.delete", - "description": "Stops a running instance.", - "httpMethod": "DELETE", - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "instancesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true, - "location": "path" - }, - "versionsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}" - }, - "get": { - "description": "Gets instance information.", - "response": { - "$ref": "Instance" - }, - "httpMethod": "GET", - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "instancesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true, - "location": "path" - }, - "versionsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "id": "appengine.apps.services.versions.instances.get", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}" - }, - "list": { - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", - "id": "appengine.apps.services.versions.instances.list", - "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).", - "httpMethod": "GET", - "response": { - "$ref": "ListInstancesResponse" - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "servicesId": { - "description": "Part of `parent`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "pageToken": { - "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "appsId": { - "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.", - "type": "string", - "required": true, - "location": "path" - }, - "pageSize": { - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" - }, - "versionsId": { - "location": "path", - "description": "Part of `parent`. See documentation of `appsId`.", - "type": "string", - "required": true - } - } - }, - "debug": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "instancesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", - "id": "appengine.apps.services.versions.instances.debug", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", - "request": { - "$ref": "DebugInstanceRequest" - }, - "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment." - } - } - } - } - } + "schemas": { + "ReadinessCheck": { + "description": "Readiness checking configuration for VM instances. Unhealthy instances are removed from traffic rotation.", + "type": "object", + "properties": { + "appStartTimeout": { + "format": "google-duration", + "description": "A maximum time limit on application initialization, measured from moment the application successfully replies to a healthcheck until it is ready to serve traffic.", + "type": "string" + }, + "path": { + "description": "The request path.", + "type": "string" + }, + "host": { + "description": "Host header to send when performing a HTTP Readiness check. Example: \"myapp.appspot.com\"", + "type": "string" + }, + "successThreshold": { + "format": "uint32", + "description": "Number of consecutive successful checks required before receiving traffic.", + "type": "integer" + }, + "checkInterval": { + "format": "google-duration", + "description": "Interval between health checks.", + "type": "string" + }, + "timeout": { + "format": "google-duration", + "description": "Time before the check is considered failed.", + "type": "string" + }, + "failureThreshold": { + "format": "uint32", + "description": "Number of consecutive failed checks required before removing traffic.", + "type": "integer" + } + }, + "id": "ReadinessCheck" + }, + "DebugInstanceRequest": { + "description": "Request message for Instances.DebugInstance.", + "type": "object", + "properties": { + "sshKey": { + "description": "Public SSH key to add to the instance. Examples:\n[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]\n[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {\"userName\":\"[USERNAME]\",\"expireOn\":\"[EXPIRE_TIME]\"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).", + "type": "string" + } + }, + "id": "DebugInstanceRequest" + }, + "OperationMetadataV1Beta5": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "method": { + "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "insertTime": { + "type": "string", + "format": "google-datetime", + "description": "Timestamp that this operation was created.@OutputOnly" + }, + "endTime": { + "format": "google-datetime", + "description": "Timestamp that this operation completed.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataV1Beta5" + }, + "Version": { + "description": "A Version resource is a specific set of source code and configuration files that are deployed into a service.", + "type": "object", + "properties": { + "defaultExpiration": { + "format": "google-duration", + "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.", + "type": "string" + }, + "libraries": { + "description": "Configuration for third-party Python runtime libraries that are required by the application.Only returned in GET requests if view=FULL is set.", + "items": { + "$ref": "Library" }, - "methods": { - "patch": { - "httpMethod": "PATCH", - "parameterOrder": [ - "appsId", - "servicesId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", - "type": "string" - }, - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", - "type": "string", - "required": true, - "location": "path" - }, - "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).", - "type": "boolean", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/apps/{appsId}/services/{servicesId}", - "path": "v1/apps/{appsId}/services/{servicesId}", - "id": "appengine.apps.services.patch", - "description": "Updates the configuration of the specified service.", - "request": { - "$ref": "Service" - } - }, - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "appsId", - "servicesId" - ], - "response": { - "$ref": "Service" - }, - "parameters": { - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", - "type": "string", - "required": true, - "location": "path" - }, - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/apps/{appsId}/services/{servicesId}", - "path": "v1/apps/{appsId}/services/{servicesId}", - "id": "appengine.apps.services.get", - "description": "Gets the current configuration of the specified service." - }, - "list": { - "response": { - "$ref": "ListServicesResponse" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageSize": { - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" - }, - "pageToken": { - "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "appsId": { - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/apps/{appsId}/services", - "id": "appengine.apps.services.list", - "path": "v1/apps/{appsId}/services", - "description": "Lists all the services in the application." - }, - "delete": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "httpMethod": "DELETE", - "parameters": { - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/apps/{appsId}/services/{servicesId}", - "id": "appengine.apps.services.delete", - "path": "v1/apps/{appsId}/services/{servicesId}", - "description": "Deletes the specified service and all enclosed versions." - } - } + "type": "array" }, - "operations": { - "methods": { - "get": { - "httpMethod": "GET", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "operationsId" - ], - "parameters": { - "appsId": { - "description": "Part of `name`. The name of the operation resource.", - "type": "string", - "required": true, - "location": "path" - }, - "operationsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/apps/{appsId}/operations/{operationsId}", - "path": "v1/apps/{appsId}/operations/{operationsId}", - "id": "appengine.apps.operations.get", - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." - }, - "list": { - "path": "v1/apps/{appsId}/operations", - "id": "appengine.apps.operations.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.", - "httpMethod": "GET", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [ - "appsId" - ], - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - }, - "pageToken": { - "location": "query", - "description": "The standard list page token.", - "type": "string" - }, - "appsId": { - "description": "Part of `name`. The name of the operation's parent resource.", - "type": "string", - "required": true, - "location": "path" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - } - }, - "flatPath": "v1/apps/{appsId}/operations" - } - } + "nobuildFilesRegex": { + "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.", + "type": "string" }, - "locations": { - "methods": { - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "appsId", - "locationsId" - ], - "response": { - "$ref": "Location" - }, - "parameters": { - "locationsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "description": "Part of `name`. Resource name for the location.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/apps/{appsId}/locations/{locationsId}", - "path": "v1/apps/{appsId}/locations/{locationsId}", - "id": "appengine.apps.locations.get", - "description": "Get information about a location." - }, - "list": { - "response": { - "$ref": "ListLocationsResponse" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" - }, - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "appsId": { - "description": "Part of `name`. The resource that owns the locations collection, if applicable.", - "type": "string", - "required": true, - "location": "path" - }, - "pageSize": { - "format": "int32", - "description": "The standard list page size.", - "type": "integer", - "location": "query" - } - }, - "flatPath": "v1/apps/{appsId}/locations", - "id": "appengine.apps.locations.list", - "path": "v1/apps/{appsId}/locations", - "description": "Lists information about the supported locations for this service." - } + "basicScaling": { + "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", + "$ref": "BasicScaling" + }, + "runtime": { + "description": "Desired runtime. Example: python27.", + "type": "string" + }, + "id": { + "description": "Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\".", + "type": "string" + }, + "createdBy": { + "description": "Email address of the user who created this version.@OutputOnly", + "type": "string" + }, + "envVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables available to the application.Only returned in GET requests if view=FULL is set.", + "type": "object" + }, + "livenessCheck": { + "$ref": "LivenessCheck", + "description": "Configures liveness health checking for VM instances. Unhealthy instances are stopped and replaced with new instancesOnly returned in GET requests if view=FULL is set." + }, + "network": { + "description": "Extra network settings. Only applicable for App Engine flexible environment versions.", + "$ref": "Network" + }, + "betaSettings": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata settings that are supplied to this version to enable beta runtime features.", + "type": "object" + }, + "env": { + "description": "App Engine execution environment for this version.Defaults to standard.", + "type": "string" + }, + "handlers": { + "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", + "items": { + "$ref": "UrlMap" + }, + "type": "array" + }, + "automaticScaling": { + "$ref": "AutomaticScaling", + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics." + }, + "diskUsageBytes": { + "format": "int64", + "description": "Total size in bytes of all the files that are included in this version and curerntly hosted on the App Engine disk.@OutputOnly", + "type": "string" + }, + "healthCheck": { + "description": "Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set.", + "$ref": "HealthCheck" + }, + "threadsafe": { + "description": "Whether multiple requests can be dispatched to this version at once.", + "type": "boolean" + }, + "readinessCheck": { + "$ref": "ReadinessCheck", + "description": "Configures readiness health checking for VM instances. Unhealthy instances are not put into the backend traffic rotation.Only returned in GET requests if view=FULL is set." + }, + "manualScaling": { + "$ref": "ManualScaling", + "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time." + }, + "name": { + "description": "Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly", + "type": "string" + }, + "apiConfig": { + "$ref": "ApiConfigHandler", + "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set." + }, + "endpointsApiService": { + "$ref": "EndpointsApiService", + "description": "Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app." + }, + "versionUrl": { + "description": "Serving URL for this version. Example: \"https://myversion-dot-myservice-dot-myapp.appspot.com\"@OutputOnly", + "type": "string" + }, + "vm": { + "description": "Whether to deploy this version in a container on a virtual machine.", + "type": "boolean" + }, + "instanceClass": { + "description": "Instance class that is used to run this version. Valid values are:\nAutomaticScaling: F1, F2, F4, F4_1G\nManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.", + "type": "string" + }, + "servingStatus": { + "enum": [ + "SERVING_STATUS_UNSPECIFIED", + "SERVING", + "STOPPED" + ], + "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", + "type": "string", + "enumDescriptions": [ + "Not specified.", + "Currently serving. Instances are created according to the scaling settings of the version.", + "Disabled. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." + ] + }, + "deployment": { + "$ref": "Deployment", + "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set." + }, + "runtimeApiVersion": { + "description": "The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/\u003clanguage\u003e/config/appref", + "type": "string" + }, + "createTime": { + "format": "google-datetime", + "description": "Time that this version was created.@OutputOnly", + "type": "string" + }, + "resources": { + "description": "Machine resources for this version. Only applicable for VM runtimes.", + "$ref": "Resources" + }, + "inboundServices": { + "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", + "items": { + "enum": [ + "INBOUND_SERVICE_UNSPECIFIED", + "INBOUND_SERVICE_MAIL", + "INBOUND_SERVICE_MAIL_BOUNCE", + "INBOUND_SERVICE_XMPP_ERROR", + "INBOUND_SERVICE_XMPP_MESSAGE", + "INBOUND_SERVICE_XMPP_SUBSCRIBE", + "INBOUND_SERVICE_XMPP_PRESENCE", + "INBOUND_SERVICE_CHANNEL_PRESENCE", + "INBOUND_SERVICE_WARMUP" + ], + "type": "string" + }, + "type": "array", + "enumDescriptions": [ + "Not specified.", + "Allows an application to receive mail.", + "Allows an application to receive email-bound notifications.", + "Allows an application to receive error stanzas.", + "Allows an application to receive instant messages.", + "Allows an application to receive user subscription POSTs.", + "Allows an application to receive a user's chat presence.", + "Registers an application for notifications when a client connects or disconnects from a channel.", + "Enables warmup requests." + ] + }, + "errorHandlers": { + "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", + "items": { + "$ref": "ErrorHandler" + }, + "type": "array" + } + }, + "id": "Version" + }, + "RepairApplicationRequest": { + "description": "Request message for 'Applications.RepairApplication'.", + "type": "object", + "properties": {}, + "id": "RepairApplicationRequest" + }, + "CertificateRawData": { + "type": "object", + "properties": { + "privateKey": { + "type": "string", + "description": "Unencrypted PEM encoded RSA private key. This field is set once on certificate creation and then encrypted. The key size must be 2048 bits or fewer. Must include the header and footer. Example: \u003cpre\u003e -----BEGIN RSA PRIVATE KEY----- \u003cunencrypted_key_value\u003e -----END RSA PRIVATE KEY----- \u003c/pre\u003e @InputOnly" + }, + "publicCertificate": { + "type": "string", + "description": "PEM encoded x.509 public key certificate. This field is set once on certificate creation. Must include the header and footer. Example: \u003cpre\u003e -----BEGIN CERTIFICATE----- \u003ccertificate_value\u003e -----END CERTIFICATE----- \u003c/pre\u003e" + } + }, + "id": "CertificateRawData", + "description": "An SSL certificate obtained from a certificate authority." + }, + "FileInfo": { + "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", + "type": "object", + "properties": { + "sourceUrl": { + "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", + "type": "string" + }, + "sha1Sum": { + "description": "The SHA1 hash of the file, in hex.", + "type": "string" + }, + "mimeType": { + "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", + "type": "string" + } + }, + "id": "FileInfo" + }, + "ScriptHandler": { + "description": "Executes a script to handle the request that matches the URL pattern.", + "type": "object", + "properties": { + "scriptPath": { + "description": "Path to the script from the application root directory.", + "type": "string" + } + }, + "id": "ScriptHandler" + }, + "OperationMetadataExperimental": { + "type": "object", + "properties": { + "method": { + "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", + "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataExperimental", + "description": "Metadata for the given google.longrunning.Operation." + }, + "AuthorizedDomain": { + "properties": { + "id": { + "description": "Fully qualified domain name of the domain authorized for use. Example: example.com.", + "type": "string" + }, + "name": { + "description": "Full path to the AuthorizedDomain resource in the API. Example: apps/myapp/authorizedDomains/example.com.@OutputOnly", + "type": "string" + } + }, + "id": "AuthorizedDomain", + "description": "A domain that a user has been authorized to administer. To authorize use of a domain, verify ownership via Webmaster Central (https://www.google.com/webmasters/verification/home).", + "type": "object" + }, + "TrafficSplit": { + "description": "Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.", + "type": "object", + "properties": { + "allocations": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", + "type": "object" + }, + "shardBy": { + "enum": [ + "UNSPECIFIED", + "COOKIE", + "IP", + "RANDOM" + ], + "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", + "type": "string", + "enumDescriptions": [ + "Diversion method unspecified.", + "Diversion based on a specially named cookie, \"GOOGAPPUID.\" The cookie must be set by the application itself or no diversion will occur.", + "Diversion based on applying the modulus operation to a fingerprint of the IP address.", + "Diversion based on weighted random assignment. An incoming request is randomly routed to a version in the traffic split, with probability proportional to the version's traffic share." + ] + } + }, + "id": "TrafficSplit" + }, + "OperationMetadataV1Beta": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + }, + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + }, + "target": { + "type": "string", + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataV1Beta" + }, + "ListServicesResponse": { + "description": "Response message for Services.ListServices.", + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "Continuation token for fetching the next page of results." + }, + "services": { + "items": { + "$ref": "Service" + }, + "type": "array", + "description": "The services belonging to the requested application." + } + }, + "id": "ListServicesResponse" + }, + "Deployment": { + "description": "Code and application artifacts used to deploy a version to App Engine.", + "type": "object", + "properties": { + "zip": { + "description": "The zip file for this deployment, if this is a zip deployment.", + "$ref": "ZipInfo" + }, + "container": { + "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment.", + "$ref": "ContainerInfo" + }, + "files": { + "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", + "type": "object", + "additionalProperties": { + "$ref": "FileInfo" } } }, - "methods": { - "patch": { - "flatPath": "v1/apps/{appsId}", - "path": "v1/apps/{appsId}", - "id": "appengine.apps.patch", - "request": { - "$ref": "Application" - }, - "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain - Google authentication domain for controlling user access to the application.\ndefault_cookie_expiration - Cookie expiration policy for the application.", - "httpMethod": "PATCH", - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "updateMask": { - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", - "type": "string", - "location": "query" - }, - "appsId": { - "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", - "type": "string", - "required": true, - "location": "path" - } - } + "id": "Deployment" + }, + "Resources": { + "description": "Machine resources for a version.", + "type": "object", + "properties": { + "memoryGb": { + "format": "double", + "description": "Memory (GB) needed.", + "type": "number" }, - "get": { - "description": "Gets information about an application.", - "httpMethod": "GET", - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "Application" - }, - "parameters": { - "appsId": { - "description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/apps/{appsId}", - "path": "v1/apps/{appsId}", - "id": "appengine.apps.get" + "cpu": { + "format": "double", + "description": "Number of CPU cores needed.", + "type": "number" }, - "create": { - "response": { - "$ref": "Operation" + "volumes": { + "description": "User specified volumes.", + "items": { + "$ref": "Volume" }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {}, - "flatPath": "v1/apps", - "id": "appengine.apps.create", - "path": "v1/apps", - "request": { - "$ref": "Application" - }, - "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/)." + "type": "array" }, - "repair": { - "httpMethod": "POST", - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the application to repair. Example: apps/myapp", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/apps/{appsId}:repair", - "path": "v1/apps/{appsId}:repair", - "id": "appengine.apps.repair", - "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account.", - "request": { - "$ref": "RepairApplicationRequest" - } + "diskGb": { + "format": "double", + "description": "Disk size (GB) needed.", + "type": "number" + } + }, + "id": "Resources" + }, + "Volume": { + "id": "Volume", + "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "volumeType": { + "type": "string", + "description": "Underlying volume type, e.g. 'tmpfs'." + }, + "sizeGb": { + "type": "number", + "format": "double", + "description": "Volume size in gigabytes." + }, + "name": { + "description": "Unique name for the volume.", + "type": "string" } } - } - }, - "parameters": { - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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", - "description": "Data format for response.", - "default": "json" }, - "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.", - "type": "string", - "location": "query" + "ListInstancesResponse": { + "description": "Response message for Instances.ListInstances.", + "type": "object", + "properties": { + "instances": { + "description": "The instances belonging to the requested version.", + "items": { + "$ref": "Instance" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + } + }, + "id": "ListInstancesResponse" }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" + "ListDomainMappingsResponse": { + "description": "Response message for DomainMappings.ListDomainMappings.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "domainMappings": { + "description": "The domain mappings for the application.", + "items": { + "$ref": "DomainMapping" + }, + "type": "array" + } + }, + "id": "ListDomainMappingsResponse" }, - "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.", - "type": "string", - "location": "query" + "OperationMetadataV1Alpha": { + "type": "object", + "properties": { + "user": { + "type": "string", + "description": "User who requested this operation.@OutputOnly" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "type": "string", + "description": "API method that initiated this operation. Example: google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly" + }, + "endTime": { + "type": "string", + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly" + }, + "insertTime": { + "type": "string", + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly" + }, + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "OperationMetadataV1Alpha", + "description": "Metadata for the given google.longrunning.Operation." }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" + "UrlDispatchRule": { + "description": "Rules to match an HTTP request and dispatch that request to a service.", + "type": "object", + "properties": { + "service": { + "type": "string", + "description": "Resource ID of a service in this application that should serve the matched request. The service must already exist. Example: default." + }, + "domain": { + "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\".", + "type": "string" + }, + "path": { + "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path.The sum of the lengths of the domain and path may not exceed 100 characters.", + "type": "string" + } + }, + "id": "UrlDispatchRule" }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" + "ListVersionsResponse": { + "properties": { + "versions": { + "description": "The versions belonging to the requested service.", + "items": { + "$ref": "Version" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + } + }, + "id": "ListVersionsResponse", + "description": "Response message for Versions.ListVersions.", + "type": "object" }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" + "ListAuthorizedDomainsResponse": { + "id": "ListAuthorizedDomainsResponse", + "description": "Response message for AuthorizedDomains.ListAuthorizedDomains.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "domains": { + "description": "The authorized domains belonging to the user.", + "items": { + "$ref": "AuthorizedDomain" + }, + "type": "array" + } + } }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "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 {}.", + "type": "object", + "properties": {}, + "id": "Empty" }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" + "ApiEndpointHandler": { + "id": "ApiEndpointHandler", + "description": "Uses Google Cloud Endpoints to handle requests.", + "type": "object", + "properties": { + "scriptPath": { + "description": "Path to the script from the application root directory.", + "type": "string" + } + } }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" + "DomainMapping": { + "description": "A domain serving an App Engine application.", + "type": "object", + "properties": { + "sslSettings": { + "$ref": "SslSettings", + "description": "SSL configuration for this domain. If unconfigured, this domain will not serve with SSL." + }, + "name": { + "description": "Full path to the DomainMapping resource in the API. Example: apps/myapp/domainMapping/example.com.@OutputOnly", + "type": "string" + }, + "resourceRecords": { + "description": "The resource records required to configure this domain mapping. These records must be added to the domain's DNS configuration in order to serve the application via this domain mapping.@OutputOnly", + "items": { + "$ref": "ResourceRecord" + }, + "type": "array" + }, + "id": { + "description": "Relative name of the domain serving the application. Example: example.com.", + "type": "string" + } + }, + "id": "DomainMapping" }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" + "ZipInfo": { + "properties": { + "filesCount": { + "format": "int32", + "description": "An estimate of the number of files in a zip for a zip deployment. If set, must be greater than or equal to the actual number of files. Used for optimizing performance; if not provided, deployment may be slow.", + "type": "integer" + }, + "sourceUrl": { + "type": "string", + "description": "URL of the zip file to deploy from. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'." + } + }, + "id": "ZipInfo", + "description": "The zip file information for a zip deployment.", + "type": "object" }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" + "AutomaticScaling": { + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", + "type": "object", + "properties": { + "diskUtilization": { + "$ref": "DiskUtilization", + "description": "Target scaling by disk usage." + }, + "minPendingLatency": { + "format": "google-duration", + "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", + "type": "string" + }, + "maxIdleInstances": { + "format": "int32", + "description": "Maximum number of idle instances that should be maintained for this version.", + "type": "integer" + }, + "requestUtilization": { + "description": "Target scaling by request utilization.", + "$ref": "RequestUtilization" + }, + "minIdleInstances": { + "format": "int32", + "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service.", + "type": "integer" + }, + "maxTotalInstances": { + "format": "int32", + "description": "Maximum number of instances that should be started to handle requests.", + "type": "integer" + }, + "minTotalInstances": { + "format": "int32", + "description": "Minimum number of instances that should be maintained for this version.", + "type": "integer" + }, + "networkUtilization": { + "description": "Target scaling by network usage.", + "$ref": "NetworkUtilization" + }, + "maxConcurrentRequests": { + "format": "int32", + "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", + "type": "integer" + }, + "coolDownPeriod": { + "format": "google-duration", + "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 for VM runtimes.", + "type": "string" + }, + "maxPendingLatency": { + "format": "google-duration", + "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.", + "type": "string" + }, + "cpuUtilization": { + "$ref": "CpuUtilization", + "description": "Target scaling by CPU usage." + } + }, + "id": "AutomaticScaling" + }, + "AuthorizedCertificate": { + "properties": { + "visibleDomainMappings": { + "description": "The full paths to user visible Domain Mapping resources that have this certificate mapped. Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped domain mappings if the user does not have VIEWER permissions on all of the applications that have this certificate mapped. See domain_mappings_count for a complete count.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "expireTime": { + "format": "google-datetime", + "description": "The time when this certificate expires. To update the renewal time on this certificate, upload an SSL certificate with a different expiration time using AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly", + "type": "string" + }, + "name": { + "description": "Full path to the AuthorizedCertificate resource in the API. Example: apps/myapp/authorizedCertificates/12345.@OutputOnly", + "type": "string" + }, + "domainMappingsCount": { + "format": "int32", + "description": "Aggregate count of the domain mappings with this certificate mapped. This count includes domain mappings on applications for which the user does not have VIEWER permissions.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", + "type": "integer" + }, + "domainNames": { + "description": "Topmost applicable domains of this certificate. This certificate applies to these domains and their subdomains. Example: example.com.@OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "Relative name of the certificate. This is a unique value autogenerated on AuthorizedCertificate resource creation. Example: 12345.@OutputOnly", + "type": "string" + }, + "displayName": { + "type": "string", + "description": "The user-specified display name of the certificate. This is not guaranteed to be unique. Example: My Certificate." + }, + "certificateRawData": { + "$ref": "CertificateRawData", + "description": "The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority." + } + }, + "id": "AuthorizedCertificate", + "description": "An SSL certificate that a user has been authorized to administer. A user is authorized to administer any certificate that applies to one of their authorized domains.", + "type": "object" + }, + "ResourceRecord": { + "description": "A DNS resource record.", + "type": "object", + "properties": { + "name": { + "description": "Relative name of the object affected by this record. Only applicable for CNAME records. Example: 'www'.", + "type": "string" + }, + "type": { + "enum": [ + "RECORD_TYPE_UNSPECIFIED", + "A", + "AAAA", + "CNAME" + ], + "description": "Resource record type. Example: AAAA.", + "type": "string", + "enumDescriptions": [ + "An unknown resource record.", + "An A resource record. Data is an IPv4 address.", + "An AAAA resource record. Data is an IPv6 address.", + "A CNAME resource record. Data is a domain name to be aliased." + ] + }, + "rrdata": { + "description": "Data for this record. Values vary by record type, as defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).", + "type": "string" + } + }, + "id": "ResourceRecord" }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - } - }, - "schemas": { "Library": { "description": "Third-party Python runtime library that is required by the application.", "type": "object", "properties": { - "name": { - "description": "Name of the library. Example: \"django\".", - "type": "string" - }, "version": { "description": "Version of the library to select, or \"latest\".", "type": "string" + }, + "name": { + "description": "Name of the library. Example: \"django\".", + "type": "string" } }, "id": "Library" @@ -961,70 +873,50 @@ "description": "The response message for Locations.ListLocations.", "type": "object", "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, "locations": { "description": "A list of locations that matches the specified filter in the request.", "items": { "$ref": "Location" }, "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" } }, "id": "ListLocationsResponse" }, "ContainerInfo": { - "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment.", - "type": "object", "properties": { "image": { "description": "URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"", "type": "string" } }, - "id": "ContainerInfo" + "id": "ContainerInfo", + "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment.", + "type": "object" }, "RequestUtilization": { "description": "Target scaling by request utilization. Only applicable for VM runtimes.", "type": "object", "properties": { - "targetRequestCountPerSecond": { - "format": "int32", - "description": "Target requests per second.", - "type": "integer" - }, "targetConcurrentRequests": { "format": "int32", "description": "Target number of concurrent requests.", "type": "integer" + }, + "targetRequestCountPerSecond": { + "format": "int32", + "description": "Target requests per second.", + "type": "integer" } }, "id": "RequestUtilization" }, "UrlMap": { - "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", - "type": "object", "properties": { - "redirectHttpResponseCode": { - "enumDescriptions": [ - "Not specified. 302 is assumed.", - "301 Moved Permanently code.", - "302 Moved Temporarily code.", - "303 See Other code.", - "307 Temporary Redirect code." - ], - "enum": [ - "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", - "REDIRECT_HTTP_RESPONSE_CODE_301", - "REDIRECT_HTTP_RESPONSE_CODE_302", - "REDIRECT_HTTP_RESPONSE_CODE_303", - "REDIRECT_HTTP_RESPONSE_CODE_307" - ], - "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", - "type": "string" - }, "securityLevel": { "enumDescriptions": [ "Not specified.", @@ -1082,17 +974,40 @@ "type": "string" }, "apiEndpoint": { - "$ref": "ApiEndpointHandler", - "description": "Uses API Endpoints to handle requests." + "description": "Uses API Endpoints to handle requests.", + "$ref": "ApiEndpointHandler" }, "staticFiles": { - "$ref": "StaticFilesHandler", - "description": "Returns the contents of a file, such as an image, as the response." + "description": "Returns the contents of a file, such as an image, as the response.", + "$ref": "StaticFilesHandler" + }, + "redirectHttpResponseCode": { + "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", + "type": "string", + "enumDescriptions": [ + "Not specified. 302 is assumed.", + "301 Moved Permanently code.", + "302 Moved Temporarily code.", + "303 See Other code.", + "307 Temporary Redirect code." + ], + "enum": [ + "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", + "REDIRECT_HTTP_RESPONSE_CODE_301", + "REDIRECT_HTTP_RESPONSE_CODE_302", + "REDIRECT_HTTP_RESPONSE_CODE_303", + "REDIRECT_HTTP_RESPONSE_CODE_307" + ] } }, - "id": "UrlMap" + "id": "UrlMap", + "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", + "type": "object" }, "EndpointsApiService": { + "id": "EndpointsApiService", + "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", + "type": "object", "properties": { "configId": { "description": "Endpoints service configuration id as specified by the Service Management API. For example \"2016-09-19r1\"", @@ -1102,18 +1017,48 @@ "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" } + } + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object", + "properties": { + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + }, + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + } }, - "id": "EndpointsApiService", - "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", - "type": "object" + "id": "Operation" }, "ApiConfigHandler": { "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", "type": "object", "properties": { "securityLevel": { - "description": "Security (HTTPS) enforcement for this URL.", - "type": "string", "enumDescriptions": [ "Not specified.", "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", @@ -1127,7 +1072,9 @@ "SECURE_NEVER", "SECURE_OPTIONAL", "SECURE_ALWAYS" - ] + ], + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string" }, "authFailAction": { "enumDescriptions": [ @@ -1148,6 +1095,8 @@ "type": "string" }, "login": { + "description": "Level of login required to access this resource. Defaults to optional.", + "type": "string", "enumDescriptions": [ "Not specified. LOGIN_OPTIONAL is assumed.", "Does not require that the user is signed in.", @@ -1159,9 +1108,7 @@ "LOGIN_OPTIONAL", "LOGIN_ADMIN", "LOGIN_REQUIRED" - ], - "description": "Level of login required to access this resource. Defaults to optional.", - "type": "string" + ] }, "url": { "description": "URL to serve the endpoint at.", @@ -1170,42 +1117,9 @@ }, "id": "ApiConfigHandler" }, - "Operation": { - "properties": { - "done": { - "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", - "type": "boolean" - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", - "type": "string" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - } - }, - "id": "Operation", - "description": "This resource represents a long-running operation that is the result of a network API call.", - "type": "object" - }, "StaticFilesHandler": { + "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", + "type": "object", "properties": { "expiration": { "format": "google-duration", @@ -1217,11 +1131,11 @@ "type": "boolean" }, "httpHeaders": { - "description": "HTTP headers to use for all responses from these URLs.", - "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "HTTP headers to use for all responses from these URLs.", + "type": "object" }, "uploadPathRegex": { "description": "Regular expression that matches the file paths for all files that should be referenced by this handler.", @@ -1240,19 +1154,29 @@ "type": "boolean" } }, - "id": "StaticFilesHandler", - "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", - "type": "object" + "id": "StaticFilesHandler" + }, + "BasicScaling": { + "type": "object", + "properties": { + "idleTimeout": { + "format": "google-duration", + "description": "Duration of time after the last request that an instance must wait before the instance is shut down.", + "type": "string" + }, + "maxInstances": { + "format": "int32", + "description": "Maximum number of instances to create for this version.", + "type": "integer" + } + }, + "id": "BasicScaling", + "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity." }, "DiskUtilization": { "description": "Target scaling by disk usage. Only applicable for VM runtimes.", "type": "object", "properties": { - "targetWriteOpsPerSecond": { - "format": "int32", - "description": "Target ops written per second.", - "type": "integer" - }, "targetWriteBytesPerSecond": { "format": "int32", "description": "Target bytes written per second.", @@ -1267,27 +1191,15 @@ "format": "int32", "description": "Target bytes read per second.", "type": "integer" + }, + "targetWriteOpsPerSecond": { + "format": "int32", + "description": "Target ops written per second.", + "type": "integer" } }, "id": "DiskUtilization" }, - "BasicScaling": { - "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", - "type": "object", - "properties": { - "maxInstances": { - "format": "int32", - "description": "Maximum number of instances to create for this version.", - "type": "integer" - }, - "idleTimeout": { - "format": "google-duration", - "description": "Duration of time after the last request that an instance must wait before the instance is shut down.", - "type": "string" - } - }, - "id": "BasicScaling" - }, "CpuUtilization": { "properties": { "aggregationWindowLength": { @@ -1305,33 +1217,19 @@ "description": "Target scaling by CPU usage.", "type": "object" }, - "IdentityAwareProxy": { - "properties": { - "oauth2ClientSecretSha256": { - "description": "Hex-encoded SHA-256 hash of the client secret.@OutputOnly", - "type": "string" - }, - "enabled": { - "description": "Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty.", - "type": "boolean" - }, - "oauth2ClientSecret": { - "description": "OAuth2 client secret to use for the authentication flow.For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly", - "type": "string" - }, - "oauth2ClientId": { - "description": "OAuth2 client ID to use for the authentication flow.", - "type": "string" - } - }, - "id": "IdentityAwareProxy", - "description": "Identity-Aware Proxy", - "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.", "type": "object", "properties": { + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "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" + }, "details": { "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", "items": { @@ -1342,19 +1240,33 @@ "type": "object" }, "type": "array" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "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" } }, "id": "Status" }, + "IdentityAwareProxy": { + "properties": { + "oauth2ClientSecret": { + "description": "OAuth2 client secret to use for the authentication flow.For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly", + "type": "string" + }, + "oauth2ClientId": { + "description": "OAuth2 client ID to use for the authentication flow.", + "type": "string" + }, + "oauth2ClientSecretSha256": { + "description": "Hex-encoded SHA-256 hash of the client secret.@OutputOnly", + "type": "string" + }, + "enabled": { + "description": "Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty.", + "type": "boolean" + } + }, + "id": "IdentityAwareProxy", + "description": "Identity-Aware Proxy", + "type": "object" + }, "ManualScaling": { "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", "type": "object", @@ -1368,35 +1280,35 @@ "id": "ManualScaling" }, "LocationMetadata": { - "description": "Metadata for the given google.cloud.location.Location.", "type": "object", "properties": { - "standardEnvironmentAvailable": { - "description": "App Engine Standard Environment is available in the given location.@OutputOnly", - "type": "boolean" - }, "flexibleEnvironmentAvailable": { "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", "type": "boolean" + }, + "standardEnvironmentAvailable": { + "description": "App Engine Standard Environment is available in the given location.@OutputOnly", + "type": "boolean" } }, - "id": "LocationMetadata" + "id": "LocationMetadata", + "description": "Metadata for the given google.cloud.location.Location." }, "Service": { "description": "A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle tasks such as backend data analysis or API requests from mobile devices. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.", "type": "object", "properties": { + "name": { + "description": "Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, "split": { - "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the service.", - "$ref": "TrafficSplit" + "$ref": "TrafficSplit", + "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the service." }, "id": { "description": "Relative name of the service within the application. Example: default.@OutputOnly", "type": "string" - }, - "name": { - "description": "Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" } }, "id": "Service" @@ -1423,19 +1335,14 @@ "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { - "insertTime": { - "format": "google-datetime", - "description": "Timestamp that this operation was created.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", - "type": "string" - }, "user": { "description": "User who requested this operation.@OutputOnly", "type": "string" }, + "target": { + "type": "string", + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly" + }, "method": { "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", "type": "string" @@ -1448,14 +1355,75 @@ "operationType": { "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Timestamp that this operation was created.@OutputOnly", + "type": "string" } }, "id": "OperationMetadata" }, + "ListAuthorizedCertificatesResponse": { + "description": "Response message for AuthorizedCertificates.ListAuthorizedCertificates.", + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "Continuation token for fetching the next page of results." + }, + "certificates": { + "items": { + "$ref": "AuthorizedCertificate" + }, + "type": "array", + "description": "The SSL certificates the user is authorized to administer." + } + }, + "id": "ListAuthorizedCertificatesResponse" + }, + "FeatureSettings": { + "description": "The feature specific settings to be used in the application. These define behaviors that are user configurable.", + "type": "object", + "properties": { + "splitHealthChecks": { + "description": "Boolean value indicating if split health checks should be used instead of the legacy health checks. At an app.yaml level, this means defaulting to 'readiness_check' and 'liveness_check' values instead of 'health_check' ones. Once the legacy 'health_check' behavior is deprecated, and this value is always true, this setting can be removed.", + "type": "boolean" + } + }, + "id": "FeatureSettings" + }, + "SslSettings": { + "type": "object", + "properties": { + "certificateId": { + "description": "ID of the AuthorizedCertificate resource configuring SSL for the application. Clearing this field will remove SSL support. Example: 12345.", + "type": "string" + } + }, + "id": "SslSettings", + "description": "SSL configuration for a DomainMapping resource." + }, "OperationMetadataV1": { "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "type": "string", + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, "endTime": { "format": "google-datetime", "description": "Time that this operation completed.@OutputOnly", @@ -1472,22 +1440,6 @@ "format": "google-datetime", "description": "Time that this operation was created.@OutputOnly", "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly", - "type": "string" } }, "id": "OperationMetadataV1" @@ -1526,59 +1478,43 @@ "id": "ErrorHandler" }, "Network": { - "description": "Extra network settings. Only applicable for VM runtimes.", + "id": "Network", + "description": "Extra network settings. Only applicable for App Engine flexible environment versions", "type": "object", "properties": { "subnetworkName": { - "description": "Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network.\nIf the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range.\nIf the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network.\nIf the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the Flex app.", + "description": "Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network.\nIf the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range.\nIf the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network.\nIf the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the App Engine flexible environment application.", "type": "string" }, "instanceTag": { - "description": "Tag to apply to the VM instance during creation.", + "description": "Tag to apply to the VM instance during creation. Only applicable for for App Engine flexible environment versions.", "type": "string" }, "forwardedPorts": { - "description": "List of ports, or port pairs, to forward from the virtual machine to the application container.", + "description": "List of ports, or port pairs, to forward from the virtual machine to the application container. Only applicable for App Engine flexible environment versions.", "items": { "type": "string" }, "type": "array" }, "name": { - "description": "Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default.", + "description": "Google Compute Engine network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default.", "type": "string" } - }, - "id": "Network" + } }, "Application": { "description": "An Application resource contains the top-level configuration of an App Engine application. Next tag: 20", "type": "object", "properties": { - "locationId": { - "description": "Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US", - "type": "string" - }, - "servingStatus": { - "enum": [ - "UNSPECIFIED", - "SERVING", - "USER_DISABLED", - "SYSTEM_DISABLED" - ], - "description": "Serving status of this application.", - "type": "string", - "enumDescriptions": [ - "Serving status is unspecified.", - "Application is serving.", - "Application has been disabled by the user.", - "Application has been disabled by the system." - ] - }, "defaultHostname": { "description": "Hostname used to reach this application, as resolved by App Engine.@OutputOnly", "type": "string" }, + "featureSettings": { + "$ref": "FeatureSettings", + "description": "The feature specific settings to be used in the application." + }, "authDomain": { "description": "Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account.", "type": "string" @@ -1602,46 +1538,61 @@ "type": "array" }, "gcrDomain": { - "description": "The Google Container Registry domain used for storing managed build docker images for this application.", - "type": "string" + "type": "string", + "description": "The Google Container Registry domain used for storing managed build docker images for this application." }, "name": { "description": "Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly", "type": "string" }, "id": { - "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp.", - "type": "string" + "type": "string", + "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp." }, "defaultCookieExpiration": { "format": "google-duration", "description": "Cookie expiration policy for this application.", "type": "string" + }, + "locationId": { + "description": "Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US", + "type": "string" + }, + "servingStatus": { + "description": "Serving status of this application.", + "type": "string", + "enumDescriptions": [ + "Serving status is unspecified.", + "Application is serving.", + "Application has been disabled by the user.", + "Application has been disabled by the system." + ], + "enum": [ + "UNSPECIFIED", + "SERVING", + "USER_DISABLED", + "SYSTEM_DISABLED" + ] } }, "id": "Application" }, "Instance": { - "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", "type": "object", "properties": { - "vmName": { - "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, - "vmId": { - "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, "qps": { "format": "float", "description": "Average queries per second (QPS) over the last minute.@OutputOnly", "type": "number" }, - "name": { - "description": "Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly", + "vmId": { + "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "string" }, + "name": { + "type": "string", + "description": "Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly" + }, "vmZoneName": { "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "string" @@ -1651,41 +1602,41 @@ "description": "Average latency (ms) over the last minute.@OutputOnly", "type": "integer" }, + "id": { + "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly", + "type": "string" + }, "memoryUsage": { "format": "int64", "description": "Total memory in use (bytes).@OutputOnly", "type": "string" }, - "id": { - "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly", - "type": "string" - }, "vmIp": { "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "string" }, - "vmStatus": { - "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" + "errors": { + "format": "int32", + "description": "Number of errors since this instance was started.@OutputOnly", + "type": "integer" }, "availability": { - "enumDescriptions": [ - "", - "", - "" - ], "enum": [ "UNSPECIFIED", "RESIDENT", "DYNAMIC" ], "description": "Availability of the instance.@OutputOnly", - "type": "string" + "type": "string", + "enumDescriptions": [ + "", + "", + "" + ] }, - "errors": { - "format": "int32", - "description": "Number of errors since this instance was started.@OutputOnly", - "type": "integer" + "vmStatus": { + "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" }, "startTime": { "format": "google-datetime", @@ -1704,11 +1655,18 @@ "appEngineRelease": { "description": "App Engine release this instance is running on.@OutputOnly", "type": "string" + }, + "vmName": { + "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" } }, - "id": "Instance" + "id": "Instance", + "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application." }, "LivenessCheck": { + "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances.", + "type": "object", "properties": { "path": { "description": "The request path.", @@ -1728,30 +1686,63 @@ "description": "Interval between health checks.", "type": "string" }, - "timeout": { - "format": "google-duration", - "description": "Time before the check is considered failed.", - "type": "string" - }, "failureThreshold": { "format": "uint32", "description": "Number of consecutive failed checks required before considering the VM unhealthy.", "type": "integer" }, + "timeout": { + "format": "google-duration", + "description": "Time before the check is considered failed.", + "type": "string" + }, "initialDelay": { "format": "google-duration", "description": "The initial delay before starting to execute the checks.", "type": "string" } }, - "id": "LivenessCheck", - "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances.", - "type": "object" + "id": "LivenessCheck" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "type": "object", + "properties": { + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", + "type": "string" + }, + "locationId": { + "type": "string", + "description": "The canonical id for this location. For example: \"us-east1\"." + }, + "metadata": { + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + }, + "id": "Location" }, "NetworkUtilization": { "description": "Target scaling by network usage. Only applicable for VM runtimes.", "type": "object", "properties": { + "targetReceivedPacketsPerSecond": { + "format": "int32", + "description": "Target packets received per second.", + "type": "integer" + }, "targetSentBytesPerSecond": { "format": "int32", "description": "Target bytes sent per second.", @@ -1766,54 +1757,14 @@ "format": "int32", "description": "Target packets sent per second.", "type": "integer" - }, - "targetReceivedPacketsPerSecond": { - "format": "int32", - "description": "Target packets received per second.", - "type": "integer" } }, "id": "NetworkUtilization" }, - "Location": { - "properties": { - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", - "type": "object" - }, - "name": { - "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", - "type": "string" - }, - "locationId": { - "description": "The canonical id for this location. For example: \"us-east1\".", - "type": "string" - }, - "metadata": { - "description": "Service-specific metadata. For example the available capacity at the given location.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - } - }, - "id": "Location", - "description": "A resource that represents Google Cloud Platform location.", - "type": "object" - }, "HealthCheck": { "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", "type": "object", "properties": { - "timeout": { - "format": "google-duration", - "description": "Time before the health check is considered failed.", - "type": "string" - }, "unhealthyThreshold": { "format": "uint32", "description": "Number of consecutive failed health checks required before removing traffic.", @@ -1827,701 +1778,28 @@ "description": "Host header to send when performing an HTTP health check. Example: \"myapp.appspot.com\"", "type": "string" }, - "healthyThreshold": { - "format": "uint32", - "description": "Number of consecutive successful health checks required before receiving traffic.", - "type": "integer" - }, "restartThreshold": { "format": "uint32", "description": "Number of consecutive failed health checks required before an instance is restarted.", "type": "integer" }, + "healthyThreshold": { + "type": "integer", + "format": "uint32", + "description": "Number of consecutive successful health checks required before receiving traffic." + }, "checkInterval": { "format": "google-duration", "description": "Interval between health checks.", "type": "string" + }, + "timeout": { + "format": "google-duration", + "description": "Time before the health check is considered failed.", + "type": "string" } }, "id": "HealthCheck" - }, - "ReadinessCheck": { - "description": "Readiness checking configuration for VM instances. Unhealthy instances are removed from traffic rotation.", - "type": "object", - "properties": { - "host": { - "description": "Host header to send when performing a HTTP Readiness check. Example: \"myapp.appspot.com\"", - "type": "string" - }, - "successThreshold": { - "format": "uint32", - "description": "Number of consecutive successful checks required before receiving traffic.", - "type": "integer" - }, - "checkInterval": { - "format": "google-duration", - "description": "Interval between health checks.", - "type": "string" - }, - "failureThreshold": { - "format": "uint32", - "description": "Number of consecutive failed checks required before removing traffic.", - "type": "integer" - }, - "timeout": { - "format": "google-duration", - "description": "Time before the check is considered failed.", - "type": "string" - }, - "appStartTimeout": { - "format": "google-duration", - "description": "A maximum time limit on application initialization, measured from moment the application successfully replies to a healthcheck until it is ready to serve traffic.", - "type": "string" - }, - "path": { - "description": "The request path.", - "type": "string" - } - }, - "id": "ReadinessCheck" - }, - "DebugInstanceRequest": { - "description": "Request message for Instances.DebugInstance.", - "type": "object", - "properties": { - "sshKey": { - "description": "Public SSH key to add to the instance. Examples:\n[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]\n[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {\"userName\":\"[USERNAME]\",\"expireOn\":\"[EXPIRE_TIME]\"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).", - "type": "string" - } - }, - "id": "DebugInstanceRequest" - }, - "OperationMetadataV1Beta5": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "method": { - "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", - "type": "string" - }, - "insertTime": { - "format": "google-datetime", - "description": "Timestamp that this operation was created.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Timestamp that this operation completed.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataV1Beta5" - }, - "Version": { - "description": "A Version resource is a specific set of source code and configuration files that are deployed into a service.", - "type": "object", - "properties": { - "apiConfig": { - "$ref": "ApiConfigHandler", - "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set." - }, - "endpointsApiService": { - "$ref": "EndpointsApiService", - "description": "Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app." - }, - "vm": { - "description": "Whether to deploy this version in a container on a virtual machine.", - "type": "boolean" - }, - "versionUrl": { - "description": "Serving URL for this version. Example: \"https://myversion-dot-myservice-dot-myapp.appspot.com\"@OutputOnly", - "type": "string" - }, - "instanceClass": { - "description": "Instance class that is used to run this version. Valid values are:\nAutomaticScaling: F1, F2, F4, F4_1G\nManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.", - "type": "string" - }, - "servingStatus": { - "enumDescriptions": [ - "Not specified.", - "Currently serving. Instances are created according to the scaling settings of the version.", - "Disabled. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." - ], - "enum": [ - "SERVING_STATUS_UNSPECIFIED", - "SERVING", - "STOPPED" - ], - "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", - "type": "string" - }, - "deployment": { - "$ref": "Deployment", - "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set." - }, - "runtimeApiVersion": { - "description": "The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/\u003clanguage\u003e/config/appref", - "type": "string" - }, - "createTime": { - "format": "google-datetime", - "description": "Time that this version was created.@OutputOnly", - "type": "string" - }, - "resources": { - "description": "Machine resources for this version. Only applicable for VM runtimes.", - "$ref": "Resources" - }, - "inboundServices": { - "enumDescriptions": [ - "Not specified.", - "Allows an application to receive mail.", - "Allows an application to receive email-bound notifications.", - "Allows an application to receive error stanzas.", - "Allows an application to receive instant messages.", - "Allows an application to receive user subscription POSTs.", - "Allows an application to receive a user's chat presence.", - "Registers an application for notifications when a client connects or disconnects from a channel.", - "Enables warmup requests." - ], - "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", - "items": { - "enum": [ - "INBOUND_SERVICE_UNSPECIFIED", - "INBOUND_SERVICE_MAIL", - "INBOUND_SERVICE_MAIL_BOUNCE", - "INBOUND_SERVICE_XMPP_ERROR", - "INBOUND_SERVICE_XMPP_MESSAGE", - "INBOUND_SERVICE_XMPP_SUBSCRIBE", - "INBOUND_SERVICE_XMPP_PRESENCE", - "INBOUND_SERVICE_CHANNEL_PRESENCE", - "INBOUND_SERVICE_WARMUP" - ], - "type": "string" - }, - "type": "array" - }, - "errorHandlers": { - "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "ErrorHandler" - }, - "type": "array" - }, - "defaultExpiration": { - "format": "google-duration", - "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.", - "type": "string" - }, - "libraries": { - "description": "Configuration for third-party Python runtime libraries that are required by the application.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "Library" - }, - "type": "array" - }, - "nobuildFilesRegex": { - "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.", - "type": "string" - }, - "basicScaling": { - "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", - "$ref": "BasicScaling" - }, - "runtime": { - "description": "Desired runtime. Example: python27.", - "type": "string" - }, - "id": { - "description": "Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\".", - "type": "string" - }, - "createdBy": { - "description": "Email address of the user who created this version.@OutputOnly", - "type": "string" - }, - "envVariables": { - "additionalProperties": { - "type": "string" - }, - "description": "Environment variables available to the application.Only returned in GET requests if view=FULL is set.", - "type": "object" - }, - "livenessCheck": { - "$ref": "LivenessCheck", - "description": "Configures liveness health checking for VM instances. Unhealthy instances are stopped and replaced with new instancesOnly returned in GET requests if view=FULL is set." - }, - "network": { - "$ref": "Network", - "description": "Extra network settings. Only applicable for VM runtimes." - }, - "betaSettings": { - "description": "Metadata settings that are supplied to this version to enable beta runtime features.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "env": { - "description": "App Engine execution environment for this version.Defaults to standard.", - "type": "string" - }, - "handlers": { - "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "UrlMap" - }, - "type": "array" - }, - "automaticScaling": { - "$ref": "AutomaticScaling", - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics." - }, - "diskUsageBytes": { - "format": "int64", - "description": "Total size in bytes of all the files that are included in this version and curerntly hosted on the App Engine disk.@OutputOnly", - "type": "string" - }, - "healthCheck": { - "description": "Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set.", - "$ref": "HealthCheck" - }, - "threadsafe": { - "description": "Whether multiple requests can be dispatched to this version at once.", - "type": "boolean" - }, - "readinessCheck": { - "description": "Configures readiness health checking for VM instances. Unhealthy instances are not put into the backend traffic rotation.Only returned in GET requests if view=FULL is set.", - "$ref": "ReadinessCheck" - }, - "manualScaling": { - "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", - "$ref": "ManualScaling" - }, - "name": { - "description": "Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly", - "type": "string" - } - }, - "id": "Version" - }, - "RepairApplicationRequest": { - "description": "Request message for 'Applications.RepairApplication'.", - "type": "object", - "properties": {}, - "id": "RepairApplicationRequest" - }, - "FileInfo": { - "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", - "type": "object", - "properties": { - "sha1Sum": { - "description": "The SHA1 hash of the file, in hex.", - "type": "string" - }, - "mimeType": { - "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", - "type": "string" - }, - "sourceUrl": { - "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", - "type": "string" - } - }, - "id": "FileInfo" - }, - "ScriptHandler": { - "description": "Executes a script to handle the request that matches the URL pattern.", - "type": "object", - "properties": { - "scriptPath": { - "description": "Path to the script from the application root directory.", - "type": "string" - } - }, - "id": "ScriptHandler" - }, - "OperationMetadataExperimental": { - "properties": { - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataExperimental", - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object" - }, - "TrafficSplit": { - "description": "Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.", - "type": "object", - "properties": { - "allocations": { - "description": "Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", - "type": "object", - "additionalProperties": { - "format": "double", - "type": "number" - } - }, - "shardBy": { - "enum": [ - "UNSPECIFIED", - "COOKIE", - "IP", - "RANDOM" - ], - "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", - "type": "string", - "enumDescriptions": [ - "Diversion method unspecified.", - "Diversion based on a specially named cookie, \"GOOGAPPUID.\" The cookie must be set by the application itself or no diversion will occur.", - "Diversion based on applying the modulus operation to a fingerprint of the IP address.", - "Diversion based on weighted random assignment. An incoming request is randomly routed to a version in the traffic split, with probability proportional to the version's traffic share." - ] - } - }, - "id": "TrafficSplit" - }, - "OperationMetadataV1Beta": { - "properties": { - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - }, - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataV1Beta", - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object" - }, - "ListServicesResponse": { - "description": "Response message for Services.ListServices.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "services": { - "description": "The services belonging to the requested application.", - "items": { - "$ref": "Service" - }, - "type": "array" - } - }, - "id": "ListServicesResponse" - }, - "Resources": { - "description": "Machine resources for a version.", - "type": "object", - "properties": { - "volumes": { - "description": "User specified volumes.", - "items": { - "$ref": "Volume" - }, - "type": "array" - }, - "diskGb": { - "format": "double", - "description": "Disk size (GB) needed.", - "type": "number" - }, - "memoryGb": { - "format": "double", - "description": "Memory (GB) needed.", - "type": "number" - }, - "cpu": { - "format": "double", - "description": "Number of CPU cores needed.", - "type": "number" - } - }, - "id": "Resources" - }, - "Deployment": { - "description": "Code and application artifacts used to deploy a version to App Engine.", - "type": "object", - "properties": { - "zip": { - "$ref": "ZipInfo", - "description": "The zip file for this deployment, if this is a zip deployment." - }, - "container": { - "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment.", - "$ref": "ContainerInfo" - }, - "files": { - "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", - "type": "object", - "additionalProperties": { - "$ref": "FileInfo" - } - } - }, - "id": "Deployment" - }, - "Volume": { - "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", - "type": "object", - "properties": { - "volumeType": { - "description": "Underlying volume type, e.g. 'tmpfs'.", - "type": "string" - }, - "sizeGb": { - "format": "double", - "description": "Volume size in gigabytes.", - "type": "number" - }, - "name": { - "description": "Unique name for the volume.", - "type": "string" - } - }, - "id": "Volume" - }, - "ListInstancesResponse": { - "description": "Response message for Instances.ListInstances.", - "type": "object", - "properties": { - "instances": { - "description": "The instances belonging to the requested version.", - "items": { - "$ref": "Instance" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - } - }, - "id": "ListInstancesResponse" - }, - "OperationMetadataV1Alpha": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - }, - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataV1Alpha" - }, - "UrlDispatchRule": { - "description": "Rules to match an HTTP request and dispatch that request to a service.", - "type": "object", - "properties": { - "path": { - "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path.The sum of the lengths of the domain and path may not exceed 100 characters.", - "type": "string" - }, - "service": { - "description": "Resource ID of a service in this application that should serve the matched request. The service must already exist. Example: default.", - "type": "string" - }, - "domain": { - "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\".", - "type": "string" - } - }, - "id": "UrlDispatchRule" - }, - "ListVersionsResponse": { - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "versions": { - "description": "The versions belonging to the requested service.", - "items": { - "$ref": "Version" - }, - "type": "array" - } - }, - "id": "ListVersionsResponse", - "description": "Response message for Versions.ListVersions.", - "type": "object" - }, - "ApiEndpointHandler": { - "description": "Uses Google Cloud Endpoints to handle requests.", - "type": "object", - "properties": { - "scriptPath": { - "description": "Path to the script from the application root directory.", - "type": "string" - } - }, - "id": "ApiEndpointHandler" - }, - "ZipInfo": { - "description": "The zip file information for a zip deployment.", - "type": "object", - "properties": { - "sourceUrl": { - "description": "URL of the zip file to deploy from. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", - "type": "string" - }, - "filesCount": { - "format": "int32", - "description": "An estimate of the number of files in a zip for a zip deployment. If set, must be greater than or equal to the actual number of files. Used for optimizing performance; if not provided, deployment may be slow.", - "type": "integer" - } - }, - "id": "ZipInfo" - }, - "AutomaticScaling": { - "properties": { - "minPendingLatency": { - "format": "google-duration", - "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", - "type": "string" - }, - "requestUtilization": { - "$ref": "RequestUtilization", - "description": "Target scaling by request utilization." - }, - "maxIdleInstances": { - "format": "int32", - "description": "Maximum number of idle instances that should be maintained for this version.", - "type": "integer" - }, - "minIdleInstances": { - "format": "int32", - "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service.", - "type": "integer" - }, - "maxTotalInstances": { - "format": "int32", - "description": "Maximum number of instances that should be started to handle requests.", - "type": "integer" - }, - "minTotalInstances": { - "format": "int32", - "description": "Minimum number of instances that should be maintained for this version.", - "type": "integer" - }, - "networkUtilization": { - "$ref": "NetworkUtilization", - "description": "Target scaling by network usage." - }, - "coolDownPeriod": { - "format": "google-duration", - "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 for VM runtimes.", - "type": "string" - }, - "maxConcurrentRequests": { - "format": "int32", - "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", - "type": "integer" - }, - "maxPendingLatency": { - "format": "google-duration", - "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.", - "type": "string" - }, - "cpuUtilization": { - "description": "Target scaling by CPU usage.", - "$ref": "CpuUtilization" - }, - "diskUtilization": { - "description": "Target scaling by disk usage.", - "$ref": "DiskUtilization" - } - }, - "id": "AutomaticScaling", - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", - "type": "object" } }, "protocol": "rest", @@ -2546,9 +1824,1354 @@ } } }, - "kind": "discovery#restDescription", - "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", "servicePath": "", + "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", + "kind": "discovery#restDescription", "rootUrl": "https://appengine.googleapis.com/", - "basePath": "" + "basePath": "", + "ownerDomain": "google.com", + "name": "appengine", + "batchPath": "batch", + "id": "appengine:v1", + "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", + "revision": "20170901", + "title": "Google App Engine Admin API", + "ownerName": "Google", + "discoveryVersion": "v1", + "version_module": true, + "resources": { + "apps": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Get information about a location.", + "response": { + "$ref": "Location" + }, + "parameterOrder": [ + "appsId", + "locationsId" + ], + "httpMethod": "GET", + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Resource name for the location.", + "type": "string", + "required": true + }, + "locationsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/locations/{locationsId}", + "id": "appengine.apps.locations.get", + "path": "v1/apps/{appsId}/locations/{locationsId}" + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "response": { + "$ref": "ListLocationsResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "parameters": { + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. The resource that owns the locations collection, if applicable.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/locations", + "id": "appengine.apps.locations.list", + "path": "v1/apps/{appsId}/locations" + } + } + }, + "authorizedCertificates": { + "methods": { + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "appsId", + "authorizedCertificatesId" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "authorizedCertificatesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "id": "appengine.apps.authorizedCertificates.delete", + "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "description": "Deletes the specified SSL certificate." + }, + "patch": { + "request": { + "$ref": "AuthorizedCertificate" + }, + "description": "Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.", + "response": { + "$ref": "AuthorizedCertificate" + }, + "parameterOrder": [ + "appsId", + "authorizedCertificatesId" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "authorizedCertificatesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "updateMask": { + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated. Updates are only supported on the certificate_raw_data and display_name fields.", + "type": "string", + "location": "query" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "id": "appengine.apps.authorizedCertificates.patch", + "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}" + }, + "get": { + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.", + "type": "string", + "required": true + }, + "view": { + "description": "Controls the set of fields returned in the GET response.", + "type": "string", + "location": "query", + "enum": [ + "BASIC_CERTIFICATE", + "FULL_CERTIFICATE" + ] + }, + "authorizedCertificatesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "id": "appengine.apps.authorizedCertificates.get", + "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "description": "Gets the specified SSL certificate.", + "response": { + "$ref": "AuthorizedCertificate" + }, + "parameterOrder": [ + "appsId", + "authorizedCertificatesId" + ], + "httpMethod": "GET" + }, + "list": { + "path": "v1/apps/{appsId}/authorizedCertificates", + "id": "appengine.apps.authorizedCertificates.list", + "description": "Lists all SSL certificates the user is authorized to administer.", + "httpMethod": "GET", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "ListAuthorizedCertificatesResponse" + }, + "parameters": { + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "appsId": { + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true, + "location": "path" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + }, + "view": { + "location": "query", + "enum": [ + "BASIC_CERTIFICATE", + "FULL_CERTIFICATE" + ], + "description": "Controls the set of fields returned in the LIST response.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/authorizedCertificates" + }, + "create": { + "description": "Uploads the specified SSL certificate.", + "request": { + "$ref": "AuthorizedCertificate" + }, + "response": { + "$ref": "AuthorizedCertificate" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "POST", + "parameters": { + "appsId": { + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}/authorizedCertificates", + "id": "appengine.apps.authorizedCertificates.create", + "path": "v1/apps/{appsId}/authorizedCertificates" + } + } + }, + "services": { + "methods": { + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "appsId", + "servicesId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", + "type": "string", + "required": true, + "location": "path" + }, + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/apps/{appsId}/services/{servicesId}", + "path": "v1/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.delete", + "description": "Deletes the specified service and all enclosed versions." + }, + "patch": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId" + ], + "httpMethod": "PATCH", + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", + "type": "string", + "required": true, + "location": "path" + }, + "migrateTraffic": { + "location": "query", + "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).", + "type": "boolean" + }, + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.patch", + "path": "v1/apps/{appsId}/services/{servicesId}", + "description": "Updates the configuration of the specified service.", + "request": { + "$ref": "Service" + } + }, + "get": { + "id": "appengine.apps.services.get", + "path": "v1/apps/{appsId}/services/{servicesId}", + "description": "Gets the current configuration of the specified service.", + "response": { + "$ref": "Service" + }, + "parameterOrder": [ + "appsId", + "servicesId" + ], + "httpMethod": "GET", + "parameters": { + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/services/{servicesId}" + }, + "list": { + "description": "Lists all the services in the application.", + "response": { + "$ref": "ListServicesResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "appsId": { + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true, + "location": "path" + }, + "pageSize": { + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/services", + "id": "appengine.apps.services.list", + "path": "v1/apps/{appsId}/services" + } + }, + "resources": { + "versions": { + "methods": { + "delete": { + "description": "Deletes an existing Version resource.", + "httpMethod": "DELETE", + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1." + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.delete" + }, + "patch": { + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.patch", + "request": { + "$ref": "Version" + }, + "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.", + "httpMethod": "PATCH", + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "updateMask": { + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string", + "location": "query" + }, + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", + "type": "string", + "required": true + } + } + }, + "get": { + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.get", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.", + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "httpMethod": "GET", + "response": { + "$ref": "Version" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", + "type": "string", + "required": true + }, + "view": { + "location": "query", + "enum": [ + "BASIC", + "FULL" + ], + "description": "Controls the set of fields returned in the Get response.", + "type": "string" + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + } + }, + "list": { + "response": { + "$ref": "ListVersionsResponse" + }, + "parameterOrder": [ + "appsId", + "servicesId" + ], + "httpMethod": "GET", + "parameters": { + "servicesId": { + "description": "Part of `parent`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + }, + "view": { + "type": "string", + "location": "query", + "enum": [ + "BASIC", + "FULL" + ], + "description": "Controls the set of fields returned in the List response." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions", + "id": "appengine.apps.services.versions.list", + "path": "v1/apps/{appsId}/services/{servicesId}/versions", + "description": "Lists the versions of a service." + }, + "create": { + "description": "Deploys code and resource files to a new version.", + "request": { + "$ref": "Version" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId" + ], + "httpMethod": "POST", + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `parent`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions", + "id": "appengine.apps.services.versions.create", + "path": "v1/apps/{appsId}/services/{servicesId}/versions" + } + }, + "resources": { + "instances": { + "methods": { + "delete": { + "parameters": { + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.services.versions.instances.delete", + "description": "Stops a running instance.", + "httpMethod": "DELETE", + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "response": { + "$ref": "Operation" + } + }, + "get": { + "description": "Gets instance information.", + "response": { + "$ref": "Instance" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "instancesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.services.versions.instances.get", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}" + }, + "list": { + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", + "id": "appengine.apps.services.versions.instances.list", + "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).", + "httpMethod": "GET", + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "response": { + "$ref": "ListInstancesResponse" + }, + "parameters": { + "servicesId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `parent`. See documentation of `appsId`." + }, + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "appsId": { + "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.", + "type": "string", + "required": true, + "location": "path" + }, + "pageSize": { + "type": "integer", + "location": "query", + "format": "int32", + "description": "Maximum results to return per page." + }, + "versionsId": { + "location": "path", + "description": "Part of `parent`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances" + }, + "debug": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", + "id": "appengine.apps.services.versions.instances.debug", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", + "request": { + "$ref": "DebugInstanceRequest" + }, + "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "httpMethod": "POST" + } + } + } + } + } + } + }, + "authorizedDomains": { + "methods": { + "list": { + "response": { + "$ref": "ListAuthorizedDomainsResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/authorizedDomains", + "id": "appengine.apps.authorizedDomains.list", + "path": "v1/apps/{appsId}/authorizedDomains", + "description": "Lists all domains the user is authorized to administer." + } + } + }, + "operations": { + "methods": { + "get": { + "parameters": { + "operationsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "description": "Part of `name`. The name of the operation resource.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/operations/{operationsId}", + "id": "appengine.apps.operations.get", + "path": "v1/apps/{appsId}/operations/{operationsId}", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "operationsId" + ], + "httpMethod": "GET" + }, + "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.", + "httpMethod": "GET", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "appsId": { + "description": "Part of `name`. The name of the operation's parent resource.", + "type": "string", + "required": true, + "location": "path" + }, + "pageSize": { + "format": "int32", + "description": "The standard list page size.", + "type": "integer", + "location": "query" + } + }, + "flatPath": "v1/apps/{appsId}/operations", + "path": "v1/apps/{appsId}/operations", + "id": "appengine.apps.operations.list" + } + } + }, + "domainMappings": { + "methods": { + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}/domainMappings", + "path": "v1/apps/{appsId}/domainMappings", + "id": "appengine.apps.domainMappings.create", + "description": "Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.", + "request": { + "$ref": "DomainMapping" + } + }, + "delete": { + "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "domainMappingsId" + ], + "httpMethod": "DELETE", + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.", + "type": "string", + "required": true, + "location": "path" + }, + "domainMappingsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + "id": "appengine.apps.domainMappings.delete", + "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}" + }, + "patch": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "domainMappingsId" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "domainMappingsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "updateMask": { + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string", + "location": "query" + }, + "appsId": { + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + "id": "appengine.apps.domainMappings.patch", + "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + "request": { + "$ref": "DomainMapping" + }, + "description": "Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource." + }, + "get": { + "id": "appengine.apps.domainMappings.get", + "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + "description": "Gets the specified domain mapping.", + "response": { + "$ref": "DomainMapping" + }, + "parameterOrder": [ + "appsId", + "domainMappingsId" + ], + "httpMethod": "GET", + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.", + "type": "string", + "required": true + }, + "domainMappingsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}" + }, + "list": { + "path": "v1/apps/{appsId}/domainMappings", + "id": "appengine.apps.domainMappings.list", + "description": "Lists the domain mappings on an application.", + "httpMethod": "GET", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "ListDomainMappingsResponse" + }, + "parameters": { + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true, + "location": "path" + }, + "pageSize": { + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/domainMappings" + } + } + } + }, + "methods": { + "create": { + "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).", + "request": { + "$ref": "Application" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Operation" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps", + "path": "v1/apps", + "id": "appengine.apps.create" + }, + "repair": { + "id": "appengine.apps.repair", + "path": "v1/apps/{appsId}:repair", + "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account.", + "request": { + "$ref": "RepairApplicationRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "POST", + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the application to repair. Example: apps/myapp", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}:repair" + }, + "patch": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string", + "location": "query" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/apps/{appsId}", + "id": "appengine.apps.patch", + "path": "v1/apps/{appsId}", + "request": { + "$ref": "Application" + }, + "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain - Google authentication domain for controlling user access to the application.\ndefault_cookie_expiration - Cookie expiration policy for the application." + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "Application" + }, + "parameterOrder": [ + "appsId" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}", + "path": "v1/apps/{appsId}", + "id": "appengine.apps.get", + "description": "Gets information about an application." + } + } + } + }, + "parameters": { + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "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.", + "type": "string", + "location": "query" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "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 09571ebdb..239717eb1 100644 --- a/vendor/google.golang.org/api/appengine/v1/appengine-gen.go +++ b/vendor/google.golang.org/api/appengine/v1/appengine-gen.go @@ -83,6 +83,9 @@ func (s *APIService) userAgent() string { func NewAppsService(s *APIService) *AppsService { rs := &AppsService{s: s} + rs.AuthorizedCertificates = NewAppsAuthorizedCertificatesService(s) + rs.AuthorizedDomains = NewAppsAuthorizedDomainsService(s) + rs.DomainMappings = NewAppsDomainMappingsService(s) rs.Locations = NewAppsLocationsService(s) rs.Operations = NewAppsOperationsService(s) rs.Services = NewAppsServicesService(s) @@ -92,6 +95,12 @@ func NewAppsService(s *APIService) *AppsService { type AppsService struct { s *APIService + AuthorizedCertificates *AppsAuthorizedCertificatesService + + AuthorizedDomains *AppsAuthorizedDomainsService + + DomainMappings *AppsDomainMappingsService + Locations *AppsLocationsService Operations *AppsOperationsService @@ -99,6 +108,33 @@ type AppsService struct { Services *AppsServicesService } +func NewAppsAuthorizedCertificatesService(s *APIService) *AppsAuthorizedCertificatesService { + rs := &AppsAuthorizedCertificatesService{s: s} + return rs +} + +type AppsAuthorizedCertificatesService struct { + s *APIService +} + +func NewAppsAuthorizedDomainsService(s *APIService) *AppsAuthorizedDomainsService { + rs := &AppsAuthorizedDomainsService{s: s} + return rs +} + +type AppsAuthorizedDomainsService struct { + s *APIService +} + +func NewAppsDomainMappingsService(s *APIService) *AppsDomainMappingsService { + rs := &AppsDomainMappingsService{s: s} + return rs +} + +type AppsDomainMappingsService struct { + s *APIService +} + func NewAppsLocationsService(s *APIService) *AppsLocationsService { rs := &AppsLocationsService{s: s} return rs @@ -291,6 +327,10 @@ type Application struct { // supported.@OutputOnly DispatchRules []*UrlDispatchRule `json:"dispatchRules,omitempty"` + // FeatureSettings: The feature specific settings to be used in the + // application. + FeatureSettings *FeatureSettings `json:"featureSettings,omitempty"` + // GcrDomain: The Google Container Registry domain used for storing // managed build docker images for this application. GcrDomain string `json:"gcrDomain,omitempty"` @@ -349,6 +389,120 @@ func (s *Application) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AuthorizedCertificate: An SSL certificate that a user has been +// authorized to administer. A user is authorized to administer any +// certificate that applies to one of their authorized domains. +type AuthorizedCertificate struct { + // CertificateRawData: The SSL certificate serving the + // AuthorizedCertificate resource. This must be obtained independently + // from a certificate authority. + CertificateRawData *CertificateRawData `json:"certificateRawData,omitempty"` + + // DisplayName: The user-specified display name of the certificate. This + // is not guaranteed to be unique. Example: My Certificate. + DisplayName string `json:"displayName,omitempty"` + + // DomainMappingsCount: Aggregate count of the domain mappings with this + // certificate mapped. This count includes domain mappings on + // applications for which the user does not have VIEWER permissions.Only + // returned by GET or LIST requests when specifically requested by the + // view=FULL_CERTIFICATE option.@OutputOnly + DomainMappingsCount int64 `json:"domainMappingsCount,omitempty"` + + // DomainNames: Topmost applicable domains of this certificate. This + // certificate applies to these domains and their subdomains. Example: + // example.com.@OutputOnly + DomainNames []string `json:"domainNames,omitempty"` + + // ExpireTime: The time when this certificate expires. To update the + // renewal time on this certificate, upload an SSL certificate with a + // different expiration time using + // AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly + ExpireTime string `json:"expireTime,omitempty"` + + // Id: Relative name of the certificate. This is a unique value + // autogenerated on AuthorizedCertificate resource creation. Example: + // 12345.@OutputOnly + Id string `json:"id,omitempty"` + + // Name: Full path to the AuthorizedCertificate resource in the API. + // Example: apps/myapp/authorizedCertificates/12345.@OutputOnly + Name string `json:"name,omitempty"` + + // VisibleDomainMappings: The full paths to user visible Domain Mapping + // resources that have this certificate mapped. Example: + // apps/myapp/domainMappings/example.com.This may not represent the full + // list of mapped domain mappings if the user does not have VIEWER + // permissions on all of the applications that have this certificate + // mapped. See domain_mappings_count for a complete count.Only returned + // by GET or LIST requests when specifically requested by the + // view=FULL_CERTIFICATE option.@OutputOnly + VisibleDomainMappings []string `json:"visibleDomainMappings,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CertificateRawData") + // 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. "CertificateRawData") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuthorizedCertificate) MarshalJSON() ([]byte, error) { + type noMethod AuthorizedCertificate + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AuthorizedDomain: A domain that a user has been authorized to +// administer. To authorize use of a domain, verify ownership via +// Webmaster Central +// (https://www.google.com/webmasters/verification/home). +type AuthorizedDomain struct { + // Id: Fully qualified domain name of the domain authorized for use. + // Example: example.com. + Id string `json:"id,omitempty"` + + // Name: Full path to the AuthorizedDomain resource in the API. Example: + // apps/myapp/authorizedDomains/example.com.@OutputOnly + Name string `json:"name,omitempty"` + + // 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 *AuthorizedDomain) MarshalJSON() ([]byte, error) { + type noMethod AuthorizedDomain + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AutomaticScaling: Automatic scaling is based on request rate, // response latencies, and other application metrics. type AutomaticScaling struct { @@ -459,6 +613,46 @@ func (s *BasicScaling) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CertificateRawData: An SSL certificate obtained from a certificate +// authority. +type CertificateRawData struct { + // PrivateKey: Unencrypted PEM encoded RSA private key. This field is + // set once on certificate creation and then encrypted. The key size + // must be 2048 bits or fewer. Must include the header and footer. + // Example:
 -----BEGIN RSA PRIVATE KEY-----
+	//  -----END RSA PRIVATE KEY----- 
+ // @InputOnly + PrivateKey string `json:"privateKey,omitempty"` + + // PublicCertificate: PEM encoded x.509 public key certificate. This + // field is set once on certificate creation. Must include the header + // and footer. Example:
 -----BEGIN CERTIFICATE-----
+	//  -----END CERTIFICATE----- 
+ PublicCertificate string `json:"publicCertificate,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PrivateKey") 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. "PrivateKey") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CertificateRawData) MarshalJSON() ([]byte, error) { + type noMethod CertificateRawData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ContainerInfo: Docker image that is used to create a container and // start a VM instance for the version that you deploy. Only applicable // for instances running in the App Engine flexible environment. @@ -655,6 +849,68 @@ func (s *DiskUtilization) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DomainMapping: A domain serving an App Engine application. +type DomainMapping struct { + // Id: Relative name of the domain serving the application. Example: + // example.com. + Id string `json:"id,omitempty"` + + // Name: Full path to the DomainMapping resource in the API. Example: + // apps/myapp/domainMapping/example.com.@OutputOnly + Name string `json:"name,omitempty"` + + // ResourceRecords: The resource records required to configure this + // domain mapping. These records must be added to the domain's DNS + // configuration in order to serve the application via this domain + // mapping.@OutputOnly + ResourceRecords []*ResourceRecord `json:"resourceRecords,omitempty"` + + // SslSettings: SSL configuration for this domain. If unconfigured, this + // domain will not serve with SSL. + SslSettings *SslSettings `json:"sslSettings,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 *DomainMapping) MarshalJSON() ([]byte, error) { + type noMethod DomainMapping + 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:"-"` +} + // EndpointsApiService: Cloud Endpoints // (https://cloud.google.com/endpoints) configuration. The Endpoints API // Service provides tooling for serving Open API and gRPC endpoints via @@ -740,6 +996,41 @@ func (s *ErrorHandler) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// FeatureSettings: The feature specific settings to be used in the +// application. These define behaviors that are user configurable. +type FeatureSettings struct { + // SplitHealthChecks: Boolean value indicating if split health checks + // should be used instead of the legacy health checks. At an app.yaml + // level, this means defaulting to 'readiness_check' and + // 'liveness_check' values instead of 'health_check' ones. Once the + // legacy 'health_check' behavior is deprecated, and this value is + // always true, this setting can be removed. + SplitHealthChecks bool `json:"splitHealthChecks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SplitHealthChecks") + // 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. "SplitHealthChecks") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *FeatureSettings) MarshalJSON() ([]byte, error) { + type noMethod FeatureSettings + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // FileInfo: Single source file that is part of the version to be // deployed. Each source file that is deployed must be specified // separately. @@ -1021,6 +1312,119 @@ func (s *Library) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListAuthorizedCertificatesResponse: Response message for +// AuthorizedCertificates.ListAuthorizedCertificates. +type ListAuthorizedCertificatesResponse struct { + // Certificates: The SSL certificates the user is authorized to + // administer. + Certificates []*AuthorizedCertificate `json:"certificates,omitempty"` + + // NextPageToken: Continuation token for fetching the next page of + // results. + 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. "Certificates") 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. "Certificates") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListAuthorizedCertificatesResponse) MarshalJSON() ([]byte, error) { + type noMethod ListAuthorizedCertificatesResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListAuthorizedDomainsResponse: Response message for +// AuthorizedDomains.ListAuthorizedDomains. +type ListAuthorizedDomainsResponse struct { + // Domains: The authorized domains belonging to the user. + Domains []*AuthorizedDomain `json:"domains,omitempty"` + + // NextPageToken: Continuation token for fetching the next page of + // results. + 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. "Domains") 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. "Domains") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListAuthorizedDomainsResponse) MarshalJSON() ([]byte, error) { + type noMethod ListAuthorizedDomainsResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListDomainMappingsResponse: Response message for +// DomainMappings.ListDomainMappings. +type ListDomainMappingsResponse struct { + // DomainMappings: The domain mappings for the application. + DomainMappings []*DomainMapping `json:"domainMappings,omitempty"` + + // NextPageToken: Continuation token for fetching the next page of + // results. + 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. "DomainMappings") 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. "DomainMappings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListDomainMappingsResponse) MarshalJSON() ([]byte, error) { + type noMethod ListDomainMappingsResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListInstancesResponse: Response message for Instances.ListInstances. type ListInstancesResponse struct { // Instances: The instances belonging to the requested version. @@ -1371,16 +1775,19 @@ func (s *ManualScaling) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Network: Extra network settings. Only applicable for VM runtimes. +// Network: Extra network settings. Only applicable for App Engine +// flexible environment versions type Network struct { // ForwardedPorts: List of ports, or port pairs, to forward from the - // virtual machine to the application container. + // virtual machine to the application container. Only applicable for App + // Engine flexible environment versions. ForwardedPorts []string `json:"forwardedPorts,omitempty"` - // InstanceTag: Tag to apply to the VM instance during creation. + // InstanceTag: Tag to apply to the VM instance during creation. Only + // applicable for for App Engine flexible environment versions. InstanceTag string `json:"instanceTag,omitempty"` - // Name: Google Cloud Platform network where the virtual machines are + // Name: Google Compute Engine network where the virtual machines are // created. Specify the short name, not the resource path.Defaults to // default. Name string `json:"name,omitempty"` @@ -1398,8 +1805,8 @@ type Network struct { // If the network the VM instance is being created in is a custom Subnet // Mode Network, then the subnetwork_name must be specified and the IP // address is created from the IPCidrRange of the subnetwork.If - // specified, the subnetwork must exist in the same region as the Flex - // app. + // specified, the subnetwork must exist in the same region as the App + // Engine flexible environment application. SubnetworkName string `json:"subnetworkName,omitempty"` // ForceSendFields is a list of field names (e.g. "ForwardedPorts") to @@ -1906,6 +2313,49 @@ func (s *RequestUtilization) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ResourceRecord: A DNS resource record. +type ResourceRecord struct { + // Name: Relative name of the object affected by this record. Only + // applicable for CNAME records. Example: 'www'. + Name string `json:"name,omitempty"` + + // Rrdata: Data for this record. Values vary by record type, as defined + // in RFC 1035 (section 5) and RFC 1034 (section 3.6.1). + Rrdata string `json:"rrdata,omitempty"` + + // Type: Resource record type. Example: AAAA. + // + // Possible values: + // "RECORD_TYPE_UNSPECIFIED" - An unknown resource record. + // "A" - An A resource record. Data is an IPv4 address. + // "AAAA" - An AAAA resource record. Data is an IPv6 address. + // "CNAME" - A CNAME resource record. Data is a domain name to be + // aliased. + Type string `json:"type,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 *ResourceRecord) MarshalJSON() ([]byte, error) { + type noMethod ResourceRecord + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Resources: Machine resources for a version. type Resources struct { // Cpu: Number of CPU cores needed. @@ -2037,6 +2487,36 @@ func (s *Service) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SslSettings: SSL configuration for a DomainMapping resource. +type SslSettings struct { + // CertificateId: ID of the AuthorizedCertificate resource configuring + // SSL for the application. Clearing this field will remove SSL support. + // Example: 12345. + CertificateId string `json:"certificateId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CertificateId") 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. "CertificateId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SslSettings) MarshalJSON() ([]byte, error) { + type noMethod SslSettings + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // StaticFilesHandler: Files served directly to the user for a given // URL, such as images, CSS stylesheets, or JavaScript source files. // Static file handlers describe which files in the application @@ -2500,7 +2980,8 @@ type Version struct { // apps/myapp/services/default/versions/v1.@OutputOnly Name string `json:"name,omitempty"` - // Network: Extra network settings. Only applicable for VM runtimes. + // Network: Extra network settings. Only applicable for App Engine + // flexible environment versions. Network *Network `json:"network,omitempty"` // NobuildFilesRegex: Files that match this pattern will not be built @@ -3220,6 +3701,1770 @@ func (c *AppsRepairCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } +// method id "appengine.apps.authorizedCertificates.create": + +type AppsAuthorizedCertificatesCreateCall struct { + s *APIService + appsId string + authorizedcertificate *AuthorizedCertificate + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Uploads the specified SSL certificate. +func (r *AppsAuthorizedCertificatesService) Create(appsId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesCreateCall { + c := &AppsAuthorizedCertificatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + c.authorizedcertificate = authorizedcertificate + 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 *AppsAuthorizedCertificatesCreateCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesCreateCall { + 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 *AppsAuthorizedCertificatesCreateCall) Context(ctx context.Context) *AppsAuthorizedCertificatesCreateCall { + 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 *AppsAuthorizedCertificatesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsAuthorizedCertificatesCreateCall) 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.authorizedcertificate) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.authorizedCertificates.create" call. +// Exactly one of *AuthorizedCertificate or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AuthorizedCertificate.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AppsAuthorizedCertificatesCreateCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, 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 := &AuthorizedCertificate{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Uploads the specified SSL certificate.", + // "flatPath": "v1/apps/{appsId}/authorizedCertificates", + // "httpMethod": "POST", + // "id": "appengine.apps.authorizedCertificates.create", + // "parameterOrder": [ + // "appsId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/authorizedCertificates", + // "request": { + // "$ref": "AuthorizedCertificate" + // }, + // "response": { + // "$ref": "AuthorizedCertificate" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "appengine.apps.authorizedCertificates.delete": + +type AppsAuthorizedCertificatesDeleteCall struct { + s *APIService + appsId string + authorizedCertificatesId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified SSL certificate. +func (r *AppsAuthorizedCertificatesService) Delete(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesDeleteCall { + c := &AppsAuthorizedCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + c.authorizedCertificatesId = authorizedCertificatesId + 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 *AppsAuthorizedCertificatesDeleteCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesDeleteCall { + 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 *AppsAuthorizedCertificatesDeleteCall) Context(ctx context.Context) *AppsAuthorizedCertificatesDeleteCall { + 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 *AppsAuthorizedCertificatesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsAuthorizedCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + "authorizedCertificatesId": c.authorizedCertificatesId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.authorizedCertificates.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 *AppsAuthorizedCertificatesDeleteCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified SSL certificate.", + // "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + // "httpMethod": "DELETE", + // "id": "appengine.apps.authorizedCertificates.delete", + // "parameterOrder": [ + // "appsId", + // "authorizedCertificatesId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "authorizedCertificatesId": { + // "description": "Part of `name`. See documentation of `appsId`.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "appengine.apps.authorizedCertificates.get": + +type AppsAuthorizedCertificatesGetCall struct { + s *APIService + appsId string + authorizedCertificatesId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the specified SSL certificate. +func (r *AppsAuthorizedCertificatesService) Get(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesGetCall { + c := &AppsAuthorizedCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + c.authorizedCertificatesId = authorizedCertificatesId + return c +} + +// View sets the optional parameter "view": Controls the set of fields +// returned in the GET response. +// +// Possible values: +// "BASIC_CERTIFICATE" +// "FULL_CERTIFICATE" +func (c *AppsAuthorizedCertificatesGetCall) View(view string) *AppsAuthorizedCertificatesGetCall { + 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 *AppsAuthorizedCertificatesGetCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesGetCall { + 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 *AppsAuthorizedCertificatesGetCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesGetCall { + 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 *AppsAuthorizedCertificatesGetCall) Context(ctx context.Context) *AppsAuthorizedCertificatesGetCall { + 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 *AppsAuthorizedCertificatesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsAuthorizedCertificatesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + "authorizedCertificatesId": c.authorizedCertificatesId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.authorizedCertificates.get" call. +// Exactly one of *AuthorizedCertificate or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AuthorizedCertificate.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AppsAuthorizedCertificatesGetCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, 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 := &AuthorizedCertificate{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the specified SSL certificate.", + // "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + // "httpMethod": "GET", + // "id": "appengine.apps.authorizedCertificates.get", + // "parameterOrder": [ + // "appsId", + // "authorizedCertificatesId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "authorizedCertificatesId": { + // "description": "Part of `name`. See documentation of `appsId`.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Controls the set of fields returned in the GET response.", + // "enum": [ + // "BASIC_CERTIFICATE", + // "FULL_CERTIFICATE" + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + // "response": { + // "$ref": "AuthorizedCertificate" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/appengine.admin", + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// method id "appengine.apps.authorizedCertificates.list": + +type AppsAuthorizedCertificatesListCall struct { + s *APIService + appsId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all SSL certificates the user is authorized to +// administer. +func (r *AppsAuthorizedCertificatesService) List(appsId string) *AppsAuthorizedCertificatesListCall { + c := &AppsAuthorizedCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum results to +// return per page. +func (c *AppsAuthorizedCertificatesListCall) PageSize(pageSize int64) *AppsAuthorizedCertificatesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Continuation token +// for fetching the next page of results. +func (c *AppsAuthorizedCertificatesListCall) PageToken(pageToken string) *AppsAuthorizedCertificatesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// View sets the optional parameter "view": Controls the set of fields +// returned in the LIST response. +// +// Possible values: +// "BASIC_CERTIFICATE" +// "FULL_CERTIFICATE" +func (c *AppsAuthorizedCertificatesListCall) View(view string) *AppsAuthorizedCertificatesListCall { + 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 *AppsAuthorizedCertificatesListCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesListCall { + 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 *AppsAuthorizedCertificatesListCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesListCall { + 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 *AppsAuthorizedCertificatesListCall) Context(ctx context.Context) *AppsAuthorizedCertificatesListCall { + 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 *AppsAuthorizedCertificatesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsAuthorizedCertificatesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.authorizedCertificates.list" call. +// Exactly one of *ListAuthorizedCertificatesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListAuthorizedCertificatesResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AppsAuthorizedCertificatesListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedCertificatesResponse, 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 := &ListAuthorizedCertificatesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all SSL certificates the user is authorized to administer.", + // "flatPath": "v1/apps/{appsId}/authorizedCertificates", + // "httpMethod": "GET", + // "id": "appengine.apps.authorizedCertificates.list", + // "parameterOrder": [ + // "appsId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum results to return per page.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Continuation token for fetching the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "view": { + // "description": "Controls the set of fields returned in the LIST response.", + // "enum": [ + // "BASIC_CERTIFICATE", + // "FULL_CERTIFICATE" + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/authorizedCertificates", + // "response": { + // "$ref": "ListAuthorizedCertificatesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/appengine.admin", + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// 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 *AppsAuthorizedCertificatesListCall) Pages(ctx context.Context, f func(*ListAuthorizedCertificatesResponse) 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 "appengine.apps.authorizedCertificates.patch": + +type AppsAuthorizedCertificatesPatchCall struct { + s *APIService + appsId string + authorizedCertificatesId string + authorizedcertificate *AuthorizedCertificate + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified SSL certificate. To renew a certificate +// and maintain its existing domain mappings, update certificate_data +// with a new certificate. The new certificate must be applicable to the +// same domains as the original certificate. The certificate +// display_name may also be updated. +func (r *AppsAuthorizedCertificatesService) Patch(appsId string, authorizedCertificatesId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesPatchCall { + c := &AppsAuthorizedCertificatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + c.authorizedCertificatesId = authorizedCertificatesId + c.authorizedcertificate = authorizedcertificate + return c +} + +// UpdateMask sets the optional parameter "updateMask": Standard field +// mask for the set of fields to be updated. Updates are only supported +// on the certificate_raw_data and display_name fields. +func (c *AppsAuthorizedCertificatesPatchCall) UpdateMask(updateMask string) *AppsAuthorizedCertificatesPatchCall { + 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 *AppsAuthorizedCertificatesPatchCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesPatchCall { + 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 *AppsAuthorizedCertificatesPatchCall) Context(ctx context.Context) *AppsAuthorizedCertificatesPatchCall { + 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 *AppsAuthorizedCertificatesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsAuthorizedCertificatesPatchCall) 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.authorizedcertificate) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + "authorizedCertificatesId": c.authorizedCertificatesId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.authorizedCertificates.patch" call. +// Exactly one of *AuthorizedCertificate or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AuthorizedCertificate.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AppsAuthorizedCertificatesPatchCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, 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 := &AuthorizedCertificate{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.", + // "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + // "httpMethod": "PATCH", + // "id": "appengine.apps.authorizedCertificates.patch", + // "parameterOrder": [ + // "appsId", + // "authorizedCertificatesId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "authorizedCertificatesId": { + // "description": "Part of `name`. See documentation of `appsId`.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Standard field mask for the set of fields to be updated. Updates are only supported on the certificate_raw_data and display_name fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + // "request": { + // "$ref": "AuthorizedCertificate" + // }, + // "response": { + // "$ref": "AuthorizedCertificate" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "appengine.apps.authorizedDomains.list": + +type AppsAuthorizedDomainsListCall struct { + s *APIService + appsId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all domains the user is authorized to administer. +func (r *AppsAuthorizedDomainsService) List(appsId string) *AppsAuthorizedDomainsListCall { + c := &AppsAuthorizedDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum results to +// return per page. +func (c *AppsAuthorizedDomainsListCall) PageSize(pageSize int64) *AppsAuthorizedDomainsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Continuation token +// for fetching the next page of results. +func (c *AppsAuthorizedDomainsListCall) PageToken(pageToken string) *AppsAuthorizedDomainsListCall { + 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 *AppsAuthorizedDomainsListCall) Fields(s ...googleapi.Field) *AppsAuthorizedDomainsListCall { + 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 *AppsAuthorizedDomainsListCall) IfNoneMatch(entityTag string) *AppsAuthorizedDomainsListCall { + 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 *AppsAuthorizedDomainsListCall) Context(ctx context.Context) *AppsAuthorizedDomainsListCall { + 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 *AppsAuthorizedDomainsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsAuthorizedDomainsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedDomains") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.authorizedDomains.list" call. +// Exactly one of *ListAuthorizedDomainsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListAuthorizedDomainsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AppsAuthorizedDomainsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedDomainsResponse, 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 := &ListAuthorizedDomainsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all domains the user is authorized to administer.", + // "flatPath": "v1/apps/{appsId}/authorizedDomains", + // "httpMethod": "GET", + // "id": "appengine.apps.authorizedDomains.list", + // "parameterOrder": [ + // "appsId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum results to return per page.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Continuation token for fetching the next page of results.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/authorizedDomains", + // "response": { + // "$ref": "ListAuthorizedDomainsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/appengine.admin", + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// 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 *AppsAuthorizedDomainsListCall) Pages(ctx context.Context, f func(*ListAuthorizedDomainsResponse) 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 "appengine.apps.domainMappings.create": + +type AppsDomainMappingsCreateCall struct { + s *APIService + appsId string + domainmapping *DomainMapping + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Maps a domain to an application. A user must be authorized to +// administer a domain in order to map it to an application. For a list +// of available authorized domains, see +// AuthorizedDomains.ListAuthorizedDomains. +func (r *AppsDomainMappingsService) Create(appsId string, domainmapping *DomainMapping) *AppsDomainMappingsCreateCall { + c := &AppsDomainMappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + c.domainmapping = domainmapping + 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 *AppsDomainMappingsCreateCall) Fields(s ...googleapi.Field) *AppsDomainMappingsCreateCall { + 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 *AppsDomainMappingsCreateCall) Context(ctx context.Context) *AppsDomainMappingsCreateCall { + 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 *AppsDomainMappingsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsDomainMappingsCreateCall) 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.domainmapping) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.domainMappings.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AppsDomainMappingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.", + // "flatPath": "v1/apps/{appsId}/domainMappings", + // "httpMethod": "POST", + // "id": "appengine.apps.domainMappings.create", + // "parameterOrder": [ + // "appsId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/domainMappings", + // "request": { + // "$ref": "DomainMapping" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "appengine.apps.domainMappings.delete": + +type AppsDomainMappingsDeleteCall struct { + s *APIService + appsId string + domainMappingsId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified domain mapping. A user must be +// authorized to administer the associated domain in order to delete a +// DomainMapping resource. +func (r *AppsDomainMappingsService) Delete(appsId string, domainMappingsId string) *AppsDomainMappingsDeleteCall { + c := &AppsDomainMappingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + c.domainMappingsId = domainMappingsId + 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 *AppsDomainMappingsDeleteCall) Fields(s ...googleapi.Field) *AppsDomainMappingsDeleteCall { + 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 *AppsDomainMappingsDeleteCall) Context(ctx context.Context) *AppsDomainMappingsDeleteCall { + 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 *AppsDomainMappingsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsDomainMappingsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + "domainMappingsId": c.domainMappingsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.domainMappings.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AppsDomainMappingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.", + // "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + // "httpMethod": "DELETE", + // "id": "appengine.apps.domainMappings.delete", + // "parameterOrder": [ + // "appsId", + // "domainMappingsId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "domainMappingsId": { + // "description": "Part of `name`. See documentation of `appsId`.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "appengine.apps.domainMappings.get": + +type AppsDomainMappingsGetCall struct { + s *APIService + appsId string + domainMappingsId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the specified domain mapping. +func (r *AppsDomainMappingsService) Get(appsId string, domainMappingsId string) *AppsDomainMappingsGetCall { + c := &AppsDomainMappingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + c.domainMappingsId = domainMappingsId + 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 *AppsDomainMappingsGetCall) Fields(s ...googleapi.Field) *AppsDomainMappingsGetCall { + 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 *AppsDomainMappingsGetCall) IfNoneMatch(entityTag string) *AppsDomainMappingsGetCall { + 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 *AppsDomainMappingsGetCall) Context(ctx context.Context) *AppsDomainMappingsGetCall { + 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 *AppsDomainMappingsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsDomainMappingsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + "domainMappingsId": c.domainMappingsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.domainMappings.get" call. +// Exactly one of *DomainMapping or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DomainMapping.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AppsDomainMappingsGetCall) Do(opts ...googleapi.CallOption) (*DomainMapping, 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 := &DomainMapping{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the specified domain mapping.", + // "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + // "httpMethod": "GET", + // "id": "appengine.apps.domainMappings.get", + // "parameterOrder": [ + // "appsId", + // "domainMappingsId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "domainMappingsId": { + // "description": "Part of `name`. See documentation of `appsId`.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + // "response": { + // "$ref": "DomainMapping" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/appengine.admin", + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// method id "appengine.apps.domainMappings.list": + +type AppsDomainMappingsListCall struct { + s *APIService + appsId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the domain mappings on an application. +func (r *AppsDomainMappingsService) List(appsId string) *AppsDomainMappingsListCall { + c := &AppsDomainMappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum results to +// return per page. +func (c *AppsDomainMappingsListCall) PageSize(pageSize int64) *AppsDomainMappingsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Continuation token +// for fetching the next page of results. +func (c *AppsDomainMappingsListCall) PageToken(pageToken string) *AppsDomainMappingsListCall { + 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 *AppsDomainMappingsListCall) Fields(s ...googleapi.Field) *AppsDomainMappingsListCall { + 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 *AppsDomainMappingsListCall) IfNoneMatch(entityTag string) *AppsDomainMappingsListCall { + 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 *AppsDomainMappingsListCall) Context(ctx context.Context) *AppsDomainMappingsListCall { + 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 *AppsDomainMappingsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsDomainMappingsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.domainMappings.list" call. +// Exactly one of *ListDomainMappingsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListDomainMappingsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AppsDomainMappingsListCall) Do(opts ...googleapi.CallOption) (*ListDomainMappingsResponse, 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 := &ListDomainMappingsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the domain mappings on an application.", + // "flatPath": "v1/apps/{appsId}/domainMappings", + // "httpMethod": "GET", + // "id": "appengine.apps.domainMappings.list", + // "parameterOrder": [ + // "appsId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum results to return per page.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Continuation token for fetching the next page of results.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/domainMappings", + // "response": { + // "$ref": "ListDomainMappingsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/appengine.admin", + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// 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 *AppsDomainMappingsListCall) Pages(ctx context.Context, f func(*ListDomainMappingsResponse) 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 "appengine.apps.domainMappings.patch": + +type AppsDomainMappingsPatchCall struct { + s *APIService + appsId string + domainMappingsId string + domainmapping *DomainMapping + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified domain mapping. To map an SSL +// certificate to a domain mapping, update certificate_id to point to an +// AuthorizedCertificate resource. A user must be authorized to +// administer the associated domain in order to update a DomainMapping +// resource. +func (r *AppsDomainMappingsService) Patch(appsId string, domainMappingsId string, domainmapping *DomainMapping) *AppsDomainMappingsPatchCall { + c := &AppsDomainMappingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + c.domainMappingsId = domainMappingsId + c.domainmapping = domainmapping + return c +} + +// UpdateMask sets the optional parameter "updateMask": Standard field +// mask for the set of fields to be updated. +func (c *AppsDomainMappingsPatchCall) UpdateMask(updateMask string) *AppsDomainMappingsPatchCall { + 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 *AppsDomainMappingsPatchCall) Fields(s ...googleapi.Field) *AppsDomainMappingsPatchCall { + 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 *AppsDomainMappingsPatchCall) Context(ctx context.Context) *AppsDomainMappingsPatchCall { + 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 *AppsDomainMappingsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsDomainMappingsPatchCall) 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.domainmapping) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + "domainMappingsId": c.domainMappingsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.domainMappings.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AppsDomainMappingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource.", + // "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + // "httpMethod": "PATCH", + // "id": "appengine.apps.domainMappings.patch", + // "parameterOrder": [ + // "appsId", + // "domainMappingsId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "domainMappingsId": { + // "description": "Part of `name`. See documentation of `appsId`.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Standard field mask for the set of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + // "request": { + // "$ref": "DomainMapping" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "appengine.apps.locations.get": type AppsLocationsGetCall struct { @@ -5302,6 +7547,27 @@ type AppsServicesVersionsPatchCall struct { // pps.services.versions#Version.FIELDS.automatic_scaling): For Version // resources that use automatic scaling and run in the App Engine // standard environment. +// automatic_scaling.min_total_instances +// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a +// pps.services.versions#Version.FIELDS.automatic_scaling): For Version +// resources that use automatic scaling and run in the App Engine +// Flexible environment. +// automatic_scaling.max_total_instances +// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a +// pps.services.versions#Version.FIELDS.automatic_scaling): For Version +// resources that use automatic scaling and run in the App Engine +// Flexible environment. +// automatic_scaling.cool_down_period_sec +// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a +// pps.services.versions#Version.FIELDS.automatic_scaling): For Version +// resources that use automatic scaling and run in the App Engine +// Flexible +// environment. +// automatic_scaling.cpu_utilization.target_utilization +// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a +// pps.services.versions#Version.FIELDS.automatic_scaling): For Version +// resources that use automatic scaling and run in the App Engine +// Flexible environment. func (r *AppsServicesVersionsService) Patch(appsId string, servicesId string, versionsId string, version *Version) *AppsServicesVersionsPatchCall { c := &AppsServicesVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.appsId = appsId @@ -5406,7 +7672,7 @@ func (c *AppsServicesVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.", + // "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.", // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", // "httpMethod": "PATCH", // "id": "appengine.apps.services.versions.patch", diff --git a/vendor/google.golang.org/api/appengine/v1alpha/appengine-api.json b/vendor/google.golang.org/api/appengine/v1alpha/appengine-api.json index b6a4f1653..2a8e1306f 100644 --- a/vendor/google.golang.org/api/appengine/v1alpha/appengine-api.json +++ b/vendor/google.golang.org/api/appengine/v1alpha/appengine-api.json @@ -1,218 +1,38 @@ { - "discoveryVersion": "v1", + "batchPath": "batch", + "id": "appengine:v1alpha", + "revision": "20170901", + "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", + "title": "Google App Engine Admin API", "ownerName": "Google", + "discoveryVersion": "v1", "resources": { "apps": { "resources": { - "authorizedCertificates": { - "methods": { - "delete": { - "description": "Deletes the specified SSL certificate.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "appsId", - "authorizedCertificatesId" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "authorizedCertificatesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.", - "type": "string", - "required": true - } - }, - "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "id": "appengine.apps.authorizedCertificates.delete", - "path": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}" - }, - "patch": { - "httpMethod": "PATCH", - "parameterOrder": [ - "appsId", - "authorizedCertificatesId" - ], - "response": { - "$ref": "AuthorizedCertificate" - }, - "parameters": { - "authorizedCertificatesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated. Updates are only supported on the certificate_raw_data and display_name fields.", - "type": "string" - }, - "appsId": { - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "path": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "id": "appengine.apps.authorizedCertificates.patch", - "description": "Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.", - "request": { - "$ref": "AuthorizedCertificate" - } - }, - "get": { - "description": "Gets the specified SSL certificate.", - "httpMethod": "GET", - "response": { - "$ref": "AuthorizedCertificate" - }, - "parameterOrder": [ - "appsId", - "authorizedCertificatesId" - ], - "parameters": { - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.", - "type": "string", - "required": true, - "location": "path" - }, - "view": { - "location": "query", - "enum": [ - "BASIC_CERTIFICATE", - "FULL_CERTIFICATE" - ], - "description": "Controls the set of fields returned in the GET response.", - "type": "string" - }, - "authorizedCertificatesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "path": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "id": "appengine.apps.authorizedCertificates.get" - }, - "list": { - "response": { - "$ref": "ListAuthorizedCertificatesResponse" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string", - "location": "query" - }, - "appsId": { - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true, - "location": "path" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer" - }, - "view": { - "location": "query", - "enum": [ - "BASIC_CERTIFICATE", - "FULL_CERTIFICATE" - ], - "description": "Controls the set of fields returned in the LIST response.", - "type": "string" - } - }, - "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates", - "id": "appengine.apps.authorizedCertificates.list", - "path": "v1alpha/apps/{appsId}/authorizedCertificates", - "description": "Lists all SSL certificates the user is authorized to administer." - }, - "create": { - "response": { - "$ref": "AuthorizedCertificate" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true - } - }, - "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates", - "id": "appengine.apps.authorizedCertificates.create", - "path": "v1alpha/apps/{appsId}/authorizedCertificates", - "request": { - "$ref": "AuthorizedCertificate" - }, - "description": "Uploads the specified SSL certificate." - } - } - }, "authorizedDomains": { "methods": { "list": { "flatPath": "v1alpha/apps/{appsId}/authorizedDomains", - "path": "v1alpha/apps/{appsId}/authorizedDomains", "id": "appengine.apps.authorizedDomains.list", + "path": "v1alpha/apps/{appsId}/authorizedDomains", "description": "Lists all domains the user is authorized to administer.", - "httpMethod": "GET", - "parameterOrder": [ - "appsId" - ], "response": { "$ref": "ListAuthorizedDomainsResponse" }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "parameters": { "pageToken": { + "location": "query", "description": "Continuation token for fetching the next page of results.", - "type": "string", - "location": "query" + "type": "string" }, "appsId": { "location": "path", @@ -226,12 +46,7 @@ "description": "Maximum results to return per page.", "type": "integer" } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] + } } } }, @@ -246,11 +61,6 @@ "operationsId" ], "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "parameters": { "appsId": { "description": "Part of `name`. The name of the operation resource.", @@ -265,13 +75,17 @@ "required": true } }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "flatPath": "v1alpha/apps/{appsId}/operations/{operationsId}", "id": "appengine.apps.operations.get", "path": "v1alpha/apps/{appsId}/operations/{operationsId}", "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." }, "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.", "response": { "$ref": "ListOperationsResponse" }, @@ -280,94 +94,16 @@ ], "httpMethod": "GET", "parameters": { - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" - }, "pageToken": { - "location": "query", "description": "The standard list page token.", - "type": "string" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. The name of the operation's parent resource.", "type": "string", - "required": true - }, - "pageSize": { - "format": "int32", - "description": "The standard list page size.", - "type": "integer", "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1alpha/apps/{appsId}/operations", - "id": "appengine.apps.operations.list", - "path": "v1alpha/apps/{appsId}/operations" - } - } - }, - "locations": { - "methods": { - "get": { - "description": "Get information about a location.", - "response": { - "$ref": "Location" - }, - "parameterOrder": [ - "appsId", - "locationsId" - ], - "httpMethod": "GET", - "parameters": { - "locationsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" }, "appsId": { - "description": "Part of `name`. Resource name for the location.", "type": "string", "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1alpha/apps/{appsId}/locations/{locationsId}", - "id": "appengine.apps.locations.get", - "path": "v1alpha/apps/{appsId}/locations/{locationsId}" - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "ListLocationsResponse" - }, - "parameters": { - "pageToken": { - "location": "query", - "description": "The standard list page token.", - "type": "string" - }, - "appsId": { "location": "path", - "description": "Part of `name`. The resource that owns the locations collection, if applicable.", - "type": "string", - "required": true + "description": "Part of `name`. The name of the operation's parent resource." }, "pageSize": { "location": "query", @@ -386,9 +122,88 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], + "flatPath": "v1alpha/apps/{appsId}/operations", + "id": "appengine.apps.operations.list", + "path": "v1alpha/apps/{appsId}/operations", + "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." + } + } + }, + "locations": { + "methods": { + "get": { + "response": { + "$ref": "Location" + }, + "parameterOrder": [ + "appsId", + "locationsId" + ], + "httpMethod": "GET", + "parameters": { + "appsId": { + "description": "Part of `name`. Resource name for the location.", + "type": "string", + "required": true, + "location": "path" + }, + "locationsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1alpha/apps/{appsId}/locations/{locationsId}", + "id": "appengine.apps.locations.get", + "path": "v1alpha/apps/{appsId}/locations/{locationsId}", + "description": "Get information about a location." + }, + "list": { + "response": { + "$ref": "ListLocationsResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "pageSize": { + "format": "int32", + "description": "The standard list page size.", + "type": "integer", + "location": "query" + }, + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "appsId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `name`. The resource that owns the locations collection, if applicable." + } + }, "flatPath": "v1alpha/apps/{appsId}/locations", - "path": "v1alpha/apps/{appsId}/locations", "id": "appengine.apps.locations.list", + "path": "v1alpha/apps/{appsId}/locations", "description": "Lists information about the supported locations for this service." } } @@ -396,7 +211,6 @@ "domainMappings": { "methods": { "delete": { - "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.", "response": { "$ref": "Operation" }, @@ -405,74 +219,74 @@ "domainMappingsId" ], "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.", + "type": "string", + "required": true, + "location": "path" + }, + "domainMappingsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}", + "id": "appengine.apps.domainMappings.delete", + "path": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}", + "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource." + }, + "patch": { + "httpMethod": "PATCH", + "parameterOrder": [ + "appsId", + "domainMappingsId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.", + "type": "string", + "required": true + }, "domainMappingsId": { "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true, "location": "path" }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}", - "id": "appengine.apps.domainMappings.delete", - "path": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}" - }, - "patch": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "domainMappingsId" - ], - "httpMethod": "PATCH", - "parameters": { - "domainMappingsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, "noManagedCertificate": { "location": "query", "description": "Whether a managed certificate should be provided by App Engine. If true, a certificate ID must be manually set in the DomainMapping resource to configure SSL for this domain. If false, a managed certificate will be provisioned and a certificate ID will be automatically populated. Only applicable if ssl_settings.certificate_id is specified in the update mask.", "type": "boolean" }, "updateMask": { + "location": "query", "format": "google-fieldmask", "description": "Standard field mask for the set of fields to be updated.", - "type": "string", - "location": "query" - }, - "appsId": { - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.", - "type": "string", - "required": true, - "location": "path" + "type": "string" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}", - "id": "appengine.apps.domainMappings.patch", "path": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}", + "id": "appengine.apps.domainMappings.patch", "description": "Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource.", "request": { "$ref": "DomainMapping" } }, "get": { - "flatPath": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}", "path": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}", "id": "appengine.apps.domainMappings.get", "description": "Gets the specified domain mapping.", @@ -490,34 +304,22 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ], "parameters": { - "domainMappingsId": { - "description": "Part of `name`. See documentation of `appsId`.", + "appsId": { "type": "string", "required": true, - "location": "path" - }, - "appsId": { "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com." + }, + "domainMappingsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true } - } + }, + "flatPath": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}" }, "list": { - "description": "Lists the domain mappings on an application.", - "response": { - "$ref": "ListDomainMappingsResponse" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "parameters": { "pageToken": { "location": "query", @@ -525,27 +327,36 @@ "type": "string" }, "appsId": { + "location": "path", "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", "type": "string", - "required": true, - "location": "path" + "required": true }, "pageSize": { + "location": "query", "format": "int32", "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" + "type": "integer" } }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "flatPath": "v1alpha/apps/{appsId}/domainMappings", "id": "appengine.apps.domainMappings.list", - "path": "v1alpha/apps/{appsId}/domainMappings" + "path": "v1alpha/apps/{appsId}/domainMappings", + "description": "Lists the domain mappings on an application.", + "response": { + "$ref": "ListDomainMappingsResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET" }, "create": { - "request": { - "$ref": "DomainMapping" - }, - "description": "Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.", "httpMethod": "POST", "parameterOrder": [ "appsId" @@ -553,15 +364,47 @@ "response": { "$ref": "Operation" }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { + "appsId": { + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true, + "location": "path" + }, "noManagedCertificate": { "location": "query", "description": "Whether a managed certificate should be provided by App Engine. If true, a certificate ID must be manaually set in the DomainMapping resource to configure SSL for this domain. If false, a managed certificate will be provisioned and a certificate ID will be automatically populated.", "type": "boolean" - }, + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1alpha/apps/{appsId}/domainMappings", + "path": "v1alpha/apps/{appsId}/domainMappings", + "id": "appengine.apps.domainMappings.create", + "description": "Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.", + "request": { + "$ref": "DomainMapping" + } + } + } + }, + "authorizedCertificates": { + "methods": { + "create": { + "description": "Uploads the specified SSL certificate.", + "request": { + "$ref": "AuthorizedCertificate" + }, + "response": { + "$ref": "AuthorizedCertificate" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "POST", + "parameters": { "appsId": { "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", "type": "string", @@ -569,9 +412,171 @@ "location": "path" } }, - "flatPath": "v1alpha/apps/{appsId}/domainMappings", - "path": "v1alpha/apps/{appsId}/domainMappings", - "id": "appengine.apps.domainMappings.create" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates", + "id": "appengine.apps.authorizedCertificates.create", + "path": "v1alpha/apps/{appsId}/authorizedCertificates" + }, + "delete": { + "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "id": "appengine.apps.authorizedCertificates.delete", + "path": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "description": "Deletes the specified SSL certificate.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "appsId", + "authorizedCertificatesId" + ], + "httpMethod": "DELETE", + "parameters": { + "authorizedCertificatesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "path": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "id": "appengine.apps.authorizedCertificates.patch", + "description": "Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.", + "request": { + "$ref": "AuthorizedCertificate" + }, + "httpMethod": "PATCH", + "parameterOrder": [ + "appsId", + "authorizedCertificatesId" + ], + "response": { + "$ref": "AuthorizedCertificate" + }, + "parameters": { + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated. Updates are only supported on the certificate_raw_data and display_name fields.", + "type": "string" + }, + "appsId": { + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.", + "type": "string", + "required": true, + "location": "path" + }, + "authorizedCertificatesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the specified SSL certificate.", + "response": { + "$ref": "AuthorizedCertificate" + }, + "parameterOrder": [ + "appsId", + "authorizedCertificatesId" + ], + "httpMethod": "GET", + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.", + "type": "string", + "required": true + }, + "view": { + "enum": [ + "BASIC_CERTIFICATE", + "FULL_CERTIFICATE" + ], + "description": "Controls the set of fields returned in the GET response.", + "type": "string", + "location": "query" + }, + "authorizedCertificatesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "id": "appengine.apps.authorizedCertificates.get", + "path": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}" + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "ListAuthorizedCertificatesResponse" + }, + "parameters": { + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + }, + "view": { + "location": "query", + "enum": [ + "BASIC_CERTIFICATE", + "FULL_CERTIFICATE" + ], + "description": "Controls the set of fields returned in the LIST response.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates", + "path": "v1alpha/apps/{appsId}/authorizedCertificates", + "id": "appengine.apps.authorizedCertificates.list", + "description": "Lists all SSL certificates the user is authorized to administer." } } } @@ -580,30 +585,30 @@ }, "parameters": { "upload_protocol": { + "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" }, "prettyPrint": { + "location": "query", "description": "Returns response with indentations and line breaks.", "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" + "type": "boolean" }, "uploadType": { "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, - "callback": { + "fields": { + "type": "string", "location": "query", + "description": "Selector specifying which fields to include in a partial response." + }, + "callback": { "description": "JSONP", - "type": "string" + "type": "string", + "location": "query" }, "$.xgafv": { "enumDescriptions": [ @@ -619,12 +624,6 @@ "type": "string" }, "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", @@ -632,28 +631,34 @@ ], "location": "query", "description": "Data format for response.", - "default": "json" + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "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.", + "type": "string", + "location": "query" }, "access_token": { "location": "query", "description": "OAuth access token.", "type": "string" }, - "key": { - "location": "query", - "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.", - "type": "string" - }, "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.", "type": "string", "location": "query" }, "pp": { - "description": "Pretty-print response.", "default": "true", "type": "boolean", - "location": "query" + "location": "query", + "description": "Pretty-print response." }, "oauth_token": { "location": "query", @@ -661,12 +666,389 @@ "type": "string" }, "bearer_token": { - "location": "query", "description": "OAuth bearer token.", - "type": "string" + "type": "string", + "location": "query" } }, "schemas": { + "OperationMetadataV1Alpha": { + "properties": { + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataV1Alpha", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object" + }, + "OperationMetadataExperimental": { + "type": "object", + "properties": { + "method": { + "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", + "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataExperimental", + "description": "Metadata for the given google.longrunning.Operation." + }, + "AuthorizedDomain": { + "properties": { + "name": { + "description": "Full path to the AuthorizedDomain resource in the API. Example: apps/myapp/authorizedDomains/example.com.@OutputOnly", + "type": "string" + }, + "id": { + "description": "Fully qualified domain name of the domain authorized for use. Example: example.com.", + "type": "string" + } + }, + "id": "AuthorizedDomain", + "description": "A domain that a user has been authorized to administer. To authorize use of a domain, verify ownership via Webmaster Central (https://www.google.com/webmasters/verification/home).", + "type": "object" + }, + "ListAuthorizedDomainsResponse": { + "description": "Response message for AuthorizedDomains.ListAuthorizedDomains.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "domains": { + "description": "The authorized domains belonging to the user.", + "items": { + "$ref": "AuthorizedDomain" + }, + "type": "array" + } + }, + "id": "ListAuthorizedDomainsResponse" + }, + "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.", + "type": "object", + "properties": { + "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" + }, + "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": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + }, + "type": "object" + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + } + }, + "id": "Status" + }, + "LocationMetadata": { + "type": "object", + "properties": { + "flexibleEnvironmentAvailable": { + "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", + "type": "boolean" + }, + "standardEnvironmentAvailable": { + "description": "App Engine Standard Environment is available in the given location.@OutputOnly", + "type": "boolean" + } + }, + "id": "LocationMetadata", + "description": "Metadata for the given google.cloud.location.Location." + }, + "DomainMapping": { + "description": "A domain serving an App Engine application.", + "type": "object", + "properties": { + "resourceRecords": { + "description": "The resource records required to configure this domain mapping. These records must be added to the domain's DNS configuration in order to serve the application via this domain mapping.@OutputOnly", + "items": { + "$ref": "ResourceRecord" + }, + "type": "array" + }, + "id": { + "description": "Relative name of the domain serving the application. Example: example.com.", + "type": "string" + }, + "sslSettings": { + "$ref": "SslSettings", + "description": "SSL configuration for this domain. If unconfigured, this domain will not serve with SSL." + }, + "name": { + "description": "Full path to the DomainMapping resource in the API. Example: apps/myapp/domainMapping/example.com.@OutputOnly", + "type": "string" + } + }, + "id": "DomainMapping" + }, + "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 {}.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "OperationMetadataV1Beta": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataV1Beta" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "type": "object", + "properties": { + "labels": { + "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", + "type": "string" + }, + "locationId": { + "description": "The canonical id for this location. For example: \"us-east1\".", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + } + }, + "id": "Location" + }, + "AuthorizedCertificate": { + "id": "AuthorizedCertificate", + "description": "An SSL certificate that a user has been authorized to administer. A user is authorized to administer any certificate that applies to one of their authorized domains.", + "type": "object", + "properties": { + "displayName": { + "description": "The user-specified display name of the certificate. This is not guaranteed to be unique. Example: My Certificate.", + "type": "string" + }, + "managedCertificate": { + "$ref": "ManagedCertificate", + "description": "Only applicable if this certificate is managed by App Engine. Managed certificates are tied to the lifecycle of a DomainMapping and cannot be updated or deleted via the AuthorizedCertificates API. If this certificate is manually administered by the user, this field will be empty.@OutputOnly" + }, + "certificateRawData": { + "$ref": "CertificateRawData", + "description": "The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority." + }, + "visibleDomainMappings": { + "description": "The full paths to user visible Domain Mapping resources that have this certificate mapped. Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped domain mappings if the user does not have VIEWER permissions on all of the applications that have this certificate mapped. See domain_mappings_count for a complete count.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "expireTime": { + "format": "google-datetime", + "description": "The time when this certificate expires. To update the renewal time on this certificate, upload an SSL certificate with a different expiration time using AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly", + "type": "string" + }, + "name": { + "description": "Full path to the AuthorizedCertificate resource in the API. Example: apps/myapp/authorizedCertificates/12345.@OutputOnly", + "type": "string" + }, + "domainMappingsCount": { + "format": "int32", + "description": "Aggregate count of the domain mappings with this certificate mapped. This count includes domain mappings on applications for which the user does not have VIEWER permissions.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", + "type": "integer" + }, + "domainNames": { + "description": "Topmost applicable domains of this certificate. This certificate applies to these domains and their subdomains. Example: example.com.@OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "Relative name of the certificate. This is a unique value autogenerated on AuthorizedCertificate resource creation. Example: 12345.@OutputOnly", + "type": "string" + } + } + }, + "ResourceRecord": { + "description": "A DNS resource record.", + "type": "object", + "properties": { + "name": { + "description": "Relative name of the object affected by this record. Only applicable for CNAME records. Example: 'www'.", + "type": "string" + }, + "type": { + "enum": [ + "A", + "AAAA", + "CNAME" + ], + "description": "Resource record type. Example: AAAA.", + "type": "string", + "enumDescriptions": [ + "An A resource record. Data is an IPv4 address.", + "An AAAA resource record. Data is an IPv6 address.", + "A CNAME resource record. Data is a domain name to be aliased." + ] + }, + "rrdata": { + "description": "Data for this record. Values vary by record type, as defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).", + "type": "string" + } + }, + "id": "ResourceRecord" + }, + "ListOperationsResponse": { + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + } + }, + "OperationMetadata": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Timestamp that this operation completed.@OutputOnly", + "type": "string" + }, + "operationType": { + "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", + "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Timestamp that this operation was created.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadata" + }, "ListAuthorizedCertificatesResponse": { "description": "Response message for AuthorizedCertificates.ListAuthorizedCertificates.", "type": "object", @@ -733,8 +1115,6 @@ "id": "ListLocationsResponse" }, "ManagedCertificate": { - "description": "A certificate managed by App Engine.", - "type": "object", "properties": { "lastRenewalTime": { "format": "google-datetime", @@ -762,26 +1142,11 @@ ] } }, - "id": "ManagedCertificate" - }, - "CertificateRawData": { - "description": "An SSL certificate obtained from a certificate authority.", - "type": "object", - "properties": { - "privateKey": { - "description": "Unencrypted PEM encoded RSA private key. This field is set once on certificate creation and then encrypted. The key size must be 2048 bits or fewer. Must include the header and footer. Example: \u003cpre\u003e -----BEGIN RSA PRIVATE KEY----- \u003cunencrypted_key_value\u003e -----END RSA PRIVATE KEY----- \u003c/pre\u003e @InputOnly", - "type": "string" - }, - "publicCertificate": { - "description": "PEM encoded x.509 public key certificate. This field is set once on certificate creation. Must include the header and footer. Example: \u003cpre\u003e -----BEGIN CERTIFICATE----- \u003ccertificate_value\u003e -----END CERTIFICATE----- \u003c/pre\u003e", - "type": "string" - } - }, - "id": "CertificateRawData" + "id": "ManagedCertificate", + "description": "A certificate managed by App Engine.", + "type": "object" }, "SslSettings": { - "description": "SSL configuration for a DomainMapping resource.", - "type": "object", "properties": { "isManagedCertificate": { "description": "Whether the mapped certificate is an App Engine managed certificate. Managed certificates are created by default with a domain mapping. To opt out, specify no_managed_certificate on a CREATE or UPDATE request.@OutputOnly", @@ -792,12 +1157,27 @@ "type": "string" } }, - "id": "SslSettings" + "id": "SslSettings", + "description": "SSL configuration for a DomainMapping resource.", + "type": "object" }, "OperationMetadataV1": { + "id": "OperationMetadataV1", "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { + "warning": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Durable messages that persist on every operation poll. @OutputOnly" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + }, "user": { "description": "User who requested this operation.@OutputOnly", "type": "string" @@ -815,49 +1195,39 @@ "type": "string" }, "endTime": { + "type": "string", "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", + "description": "Time that this operation completed.@OutputOnly" + } + } + }, + "CertificateRawData": { + "description": "An SSL certificate obtained from a certificate authority.", + "type": "object", + "properties": { + "privateKey": { + "description": "Unencrypted PEM encoded RSA private key. This field is set once on certificate creation and then encrypted. The key size must be 2048 bits or fewer. Must include the header and footer. Example: \u003cpre\u003e -----BEGIN RSA PRIVATE KEY----- \u003cunencrypted_key_value\u003e -----END RSA PRIVATE KEY----- \u003c/pre\u003e @InputOnly", "type": "string" }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", + "publicCertificate": { + "description": "PEM encoded x.509 public key certificate. This field is set once on certificate creation. Must include the header and footer. Example: \u003cpre\u003e -----BEGIN CERTIFICATE----- \u003ccertificate_value\u003e -----END CERTIFICATE----- \u003c/pre\u003e", "type": "string" - }, - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" } }, - "id": "OperationMetadataV1" + "id": "CertificateRawData" }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "type": "object", "properties": { - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", - "type": "string" - }, "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." }, "metadata": { "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." }, "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", "type": "object" @@ -865,6 +1235,18 @@ "done": { "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", "type": "boolean" + }, + "response": { + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" } }, "id": "Operation" @@ -874,11 +1256,11 @@ "type": "object", "properties": { "domainMappings": { - "description": "The domain mappings for the application.", "items": { "$ref": "DomainMapping" }, - "type": "array" + "type": "array", + "description": "The domain mappings for the application." }, "nextPageToken": { "description": "Continuation token for fetching the next page of results.", @@ -886,383 +1268,6 @@ } }, "id": "ListDomainMappingsResponse" - }, - "OperationMetadataExperimental": { - "properties": { - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataExperimental", - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object" - }, - "OperationMetadataV1Alpha": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataV1Alpha" - }, - "ListAuthorizedDomainsResponse": { - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "domains": { - "description": "The authorized domains belonging to the user.", - "items": { - "$ref": "AuthorizedDomain" - }, - "type": "array" - } - }, - "id": "ListAuthorizedDomainsResponse", - "description": "Response message for AuthorizedDomains.ListAuthorizedDomains.", - "type": "object" - }, - "Status": { - "properties": { - "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" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "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" - } - }, - "id": "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.", - "type": "object" - }, - "AuthorizedDomain": { - "description": "A domain that a user has been authorized to administer. To authorize use of a domain, verify ownership via Webmaster Central (https://www.google.com/webmasters/verification/home).", - "type": "object", - "properties": { - "id": { - "description": "Fully qualified domain name of the domain authorized for use. Example: example.com.", - "type": "string" - }, - "name": { - "description": "Full path to the AuthorizedDomain resource in the API. Example: apps/myapp/authorizedDomains/example.com.@OutputOnly", - "type": "string" - } - }, - "id": "AuthorizedDomain" - }, - "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 {}.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "DomainMapping": { - "description": "A domain serving an App Engine application.", - "type": "object", - "properties": { - "resourceRecords": { - "description": "The resource records required to configure this domain mapping. These records must be added to the domain's DNS configuration in order to serve the application via this domain mapping.@OutputOnly", - "items": { - "$ref": "ResourceRecord" - }, - "type": "array" - }, - "id": { - "description": "Relative name of the domain serving the application. Example: example.com.", - "type": "string" - }, - "sslSettings": { - "$ref": "SslSettings", - "description": "SSL configuration for this domain. If unconfigured, this domain will not serve with SSL." - }, - "name": { - "description": "Full path to the DomainMapping resource in the API. Example: apps/myapp/domainMapping/example.com.@OutputOnly", - "type": "string" - } - }, - "id": "DomainMapping" - }, - "LocationMetadata": { - "properties": { - "flexibleEnvironmentAvailable": { - "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", - "type": "boolean" - }, - "standardEnvironmentAvailable": { - "description": "App Engine Standard Environment is available in the given location.@OutputOnly", - "type": "boolean" - } - }, - "id": "LocationMetadata", - "description": "Metadata for the given google.cloud.location.Location.", - "type": "object" - }, - "OperationMetadataV1Beta": { - "properties": { - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - }, - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataV1Beta", - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object" - }, - "Location": { - "description": "A resource that represents Google Cloud Platform location.", - "type": "object", - "properties": { - "labels": { - "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "name": { - "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", - "type": "string" - }, - "locationId": { - "description": "The canonical id for this location. For example: \"us-east1\".", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata. For example the available capacity at the given location.", - "type": "object" - } - }, - "id": "Location" - }, - "AuthorizedCertificate": { - "description": "An SSL certificate that a user has been authorized to administer. A user is authorized to administer any certificate that applies to one of their authorized domains.", - "type": "object", - "properties": { - "name": { - "description": "Full path to the AuthorizedCertificate resource in the API. Example: apps/myapp/authorizedCertificates/12345.@OutputOnly", - "type": "string" - }, - "domainMappingsCount": { - "format": "int32", - "description": "Aggregate count of the domain mappings with this certificate mapped. This count includes domain mappings on applications for which the user does not have VIEWER permissions.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", - "type": "integer" - }, - "domainNames": { - "description": "Topmost applicable domains of this certificate. This certificate applies to these domains and their subdomains. Example: example.com.@OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "Relative name of the certificate. This is a unique value autogenerated on AuthorizedCertificate resource creation. Example: 12345.@OutputOnly", - "type": "string" - }, - "displayName": { - "description": "The user-specified display name of the certificate. This is not guaranteed to be unique. Example: My Certificate.", - "type": "string" - }, - "certificateRawData": { - "$ref": "CertificateRawData", - "description": "The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority." - }, - "managedCertificate": { - "$ref": "ManagedCertificate", - "description": "Only applicable if this certificate is managed by App Engine. Managed certificates are tied to the lifecycle of a DomainMapping and cannot be updated or deleted via the AuthorizedCertificates API. If this certificate is manually administered by the user, this field will be empty.@OutputOnly" - }, - "visibleDomainMappings": { - "description": "The full paths to user visible Domain Mapping resources that have this certificate mapped. Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped domain mappings if the user does not have VIEWER permissions on all of the applications that have this certificate mapped. See domain_mappings_count for a complete count.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "expireTime": { - "format": "google-datetime", - "description": "The time when this certificate expires. To update the renewal time on this certificate, upload an SSL certificate with a different expiration time using AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly", - "type": "string" - } - }, - "id": "AuthorizedCertificate" - }, - "ResourceRecord": { - "description": "A DNS resource record.", - "type": "object", - "properties": { - "type": { - "enum": [ - "A", - "AAAA", - "CNAME" - ], - "description": "Resource record type. Example: AAAA.", - "type": "string", - "enumDescriptions": [ - "An A resource record. Data is an IPv4 address.", - "An AAAA resource record. Data is an IPv6 address.", - "A CNAME resource record. Data is a domain name to be aliased." - ] - }, - "rrdata": { - "description": "Data for this record. Values vary by record type, as defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).", - "type": "string" - }, - "name": { - "description": "Relative name of the object affected by this record. Only applicable for CNAME records. Example: 'www'.", - "type": "string" - } - }, - "id": "ResourceRecord" - }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - } - }, - "id": "ListOperationsResponse" - }, - "OperationMetadata": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "insertTime": { - "format": "google-datetime", - "description": "Timestamp that this operation was created.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Timestamp that this operation completed.@OutputOnly", - "type": "string" - }, - "operationType": { - "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadata" } }, "protocol": "rest", @@ -1293,10 +1298,5 @@ "rootUrl": "https://appengine.googleapis.com/", "basePath": "", "ownerDomain": "google.com", - "name": "appengine", - "batchPath": "batch", - "id": "appengine:v1alpha", - "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", - "revision": "20170724", - "title": "Google App Engine Admin API" + "name": "appengine" } diff --git a/vendor/google.golang.org/api/appengine/v1beta/appengine-api.json b/vendor/google.golang.org/api/appengine/v1beta/appengine-api.json index 45d9e61b6..6a0a5c017 100644 --- a/vendor/google.golang.org/api/appengine/v1beta/appengine-api.json +++ b/vendor/google.golang.org/api/appengine/v1beta/appengine-api.json @@ -1,11 +1,47 @@ { + "ownerDomain": "google.com", + "name": "appengine", + "batchPath": "batch", + "id": "appengine:v1beta", + "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", + "revision": "20170901", "title": "Google App Engine Admin API", "ownerName": "Google", "discoveryVersion": "v1", "resources": { "apps": { "methods": { + "repair": { + "id": "appengine.apps.repair", + "path": "v1beta/apps/{appsId}:repair", + "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account.", + "request": { + "$ref": "RepairApplicationRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "POST", + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the application to repair. Example: apps/myapp", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta/apps/{appsId}:repair" + }, "patch": { + "flatPath": "v1beta/apps/{appsId}", + "path": "v1beta/apps/{appsId}", + "id": "appengine.apps.patch", "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain - Google authentication domain for controlling user access to the application.\ndefault_cookie_expiration - Cookie expiration policy for the application.", "request": { "$ref": "Application" @@ -18,41 +54,37 @@ "$ref": "Operation" }, "parameters": { - "appsId": { - "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", - "type": "string", - "required": true, - "location": "path" - }, "updateMask": { + "location": "query", "format": "google-fieldmask", "description": "Standard field mask for the set of fields to be updated.", + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", "type": "string", - "location": "query" + "required": true } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta/apps/{appsId}", - "path": "v1beta/apps/{appsId}", - "id": "appengine.apps.patch" + ] }, "get": { - "description": "Gets information about an application.", - "httpMethod": "GET", - "parameterOrder": [ - "appsId" - ], "response": { "$ref": "Application" }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", "parameters": { "appsId": { + "location": "path", "description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.", "type": "string", - "required": true, - "location": "path" + "required": true } }, "scopes": [ @@ -61,355 +93,63 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ], "flatPath": "v1beta/apps/{appsId}", + "id": "appengine.apps.get", "path": "v1beta/apps/{appsId}", - "id": "appengine.apps.get" + "description": "Gets information about an application." }, "create": { - "request": { - "$ref": "Application" - }, - "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).", + "httpMethod": "POST", + "parameterOrder": [], "response": { "$ref": "Operation" }, - "parameterOrder": [], - "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": {}, "flatPath": "v1beta/apps", + "path": "v1beta/apps", "id": "appengine.apps.create", - "path": "v1beta/apps" - }, - "repair": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the application to repair. Example: apps/myapp", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta/apps/{appsId}:repair", - "id": "appengine.apps.repair", - "path": "v1beta/apps/{appsId}:repair", "request": { - "$ref": "RepairApplicationRequest" + "$ref": "Application" }, - "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account." + "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/)." } }, "resources": { - "authorizedDomains": { - "methods": { - "list": { - "path": "v1beta/apps/{appsId}/authorizedDomains", - "id": "appengine.apps.authorizedDomains.list", - "description": "Lists all domains the user is authorized to administer.", - "httpMethod": "GET", - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "ListAuthorizedDomainsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer" - } - }, - "flatPath": "v1beta/apps/{appsId}/authorizedDomains" - } - } - }, - "operations": { - "methods": { - "get": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "operationsId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. The name of the operation resource.", - "type": "string", - "required": true - }, - "operationsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta/apps/{appsId}/operations/{operationsId}", - "id": "appengine.apps.operations.get", - "path": "v1beta/apps/{appsId}/operations/{operationsId}", - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." - }, - "list": { - "id": "appengine.apps.operations.list", - "path": "v1beta/apps/{appsId}/operations", - "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.", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "GET", - "parameters": { - "pageSize": { - "format": "int32", - "description": "The standard list page size.", - "type": "integer", - "location": "query" - }, - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" - }, - "pageToken": { - "location": "query", - "description": "The standard list page token.", - "type": "string" - }, - "appsId": { - "description": "Part of `name`. The name of the operation's parent resource.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta/apps/{appsId}/operations" - } - } - }, - "domainMappings": { - "methods": { - "patch": { - "description": "Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource.", - "request": { - "$ref": "DomainMapping" - }, - "httpMethod": "PATCH", - "parameterOrder": [ - "appsId", - "domainMappingsId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "domainMappingsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "updateMask": { - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", - "type": "string", - "location": "query" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", - "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", - "id": "appengine.apps.domainMappings.patch" - }, - "get": { - "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", - "id": "appengine.apps.domainMappings.get", - "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", - "description": "Gets the specified domain mapping.", - "response": { - "$ref": "DomainMapping" - }, - "parameterOrder": [ - "appsId", - "domainMappingsId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.", - "type": "string", - "required": true, - "location": "path" - }, - "domainMappingsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - } - }, - "list": { - "id": "appengine.apps.domainMappings.list", - "path": "v1beta/apps/{appsId}/domainMappings", - "description": "Lists the domain mappings on an application.", - "response": { - "$ref": "ListDomainMappingsResponse" - }, - "httpMethod": "GET", - "parameterOrder": [ - "appsId" - ], - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer" - } - }, - "flatPath": "v1beta/apps/{appsId}/domainMappings" - }, - "create": { - "request": { - "$ref": "DomainMapping" - }, - "description": "Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta/apps/{appsId}/domainMappings", - "id": "appengine.apps.domainMappings.create", - "path": "v1beta/apps/{appsId}/domainMappings" - }, - "delete": { - "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", - "id": "appengine.apps.domainMappings.delete", - "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", - "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "domainMappingsId" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.", - "type": "string", - "required": true - }, - "domainMappingsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - } - } - } - }, "firewall": { "resources": { "ingressRules": { "methods": { + "create": { + "response": { + "$ref": "FirewallRule" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "description": "Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules", + "id": "appengine.apps.firewall.ingressRules.create", + "path": "v1beta/apps/{appsId}/firewall/ingressRules", + "request": { + "$ref": "FirewallRule" + }, + "description": "Creates a firewall rule for the application." + }, "get": { "description": "Gets the specified firewall rule.", - "httpMethod": "GET", "parameterOrder": [ "appsId", "ingressRulesId" @@ -417,6 +157,7 @@ "response": { "$ref": "FirewallRule" }, + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", @@ -424,38 +165,38 @@ ], "parameters": { "appsId": { - "location": "path", "description": "Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100.", "type": "string", - "required": true - }, - "ingressRulesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", "required": true, "location": "path" + }, + "ingressRulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true } }, "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", - "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", - "id": "appengine.apps.firewall.ingressRules.get" + "id": "appengine.apps.firewall.ingressRules.get", + "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}" }, "patch": { + "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + "id": "appengine.apps.firewall.ingressRules.patch", + "description": "Updates the specified firewall rule.", "request": { "$ref": "FirewallRule" }, - "description": "Updates the specified firewall rule.", - "response": { - "$ref": "FirewallRule" - }, + "httpMethod": "PATCH", "parameterOrder": [ "appsId", "ingressRulesId" ], - "httpMethod": "PATCH", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], + "response": { + "$ref": "FirewallRule" + }, "parameters": { "appsId": { "description": "Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100.", @@ -464,30 +205,23 @@ "location": "path" }, "ingressRulesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true + "required": true, + "location": "path", + "description": "Part of `name`. See documentation of `appsId`." }, "updateMask": { + "location": "query", "format": "google-fieldmask", "description": "Standard field mask for the set of fields to be updated.", - "type": "string", - "location": "query" + "type": "string" } }, - "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", - "id": "appengine.apps.firewall.ingressRules.patch", - "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, "batchUpdate": { - "httpMethod": "POST", - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "BatchUpdateIngressRulesResponse" - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], @@ -500,53 +234,79 @@ } }, "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate", - "path": "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate", "id": "appengine.apps.firewall.ingressRules.batchUpdate", + "path": "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate", "request": { "$ref": "BatchUpdateIngressRulesRequest" }, - "description": "Replaces the entire firewall ruleset in one bulk operation. This overrides and replaces the rules of an existing firewall with the new rules.If the final rule does not match traffic with the '*' wildcard IP range, then an \"allow all\" rule is explicitly added to the end of the list." + "description": "Replaces the entire firewall ruleset in one bulk operation. This overrides and replaces the rules of an existing firewall with the new rules.If the final rule does not match traffic with the '*' wildcard IP range, then an \"allow all\" rule is explicitly added to the end of the list.", + "response": { + "$ref": "BatchUpdateIngressRulesResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "POST" }, "delete": { - "description": "Deletes the specified firewall rule.", "response": { "$ref": "Empty" }, - "httpMethod": "DELETE", "parameterOrder": [ "appsId", "ingressRulesId" ], + "httpMethod": "DELETE", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { - "ingressRulesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, "appsId": { "description": "Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100.", "type": "string", "required": true, "location": "path" + }, + "ingressRulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true } }, "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", "id": "appengine.apps.firewall.ingressRules.delete", - "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}" + "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + "description": "Deletes the specified firewall rule." }, "list": { + "path": "v1beta/apps/{appsId}/firewall/ingressRules", + "id": "appengine.apps.firewall.ingressRules.list", + "description": "Lists the firewall rules of an application.", + "httpMethod": "GET", "response": { "$ref": "ListIngressRulesResponse" }, "parameterOrder": [ "appsId" ], - "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "parameters": { + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.", + "type": "string", + "required": true + }, "pageSize": { "format": "int32", "description": "Maximum results to return per page.", @@ -554,58 +314,12 @@ "location": "query" }, "matchingAddress": { - "description": "A valid IP Address. If set, only rules matching this address will be returned. The first returned rule will be the rule that fires on requests from this IP.", - "type": "string", - "location": "query" - }, - "pageToken": { "location": "query", - "description": "Continuation token for fetching the next page of results.", + "description": "A valid IP Address. If set, only rules matching this address will be returned. The first returned rule will be the rule that fires on requests from this IP.", "type": "string" - }, - "appsId": { - "description": "Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.", - "type": "string", - "required": true, - "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules", - "id": "appengine.apps.firewall.ingressRules.list", - "path": "v1beta/apps/{appsId}/firewall/ingressRules", - "description": "Lists the firewall rules of an application." - }, - "create": { - "request": { - "$ref": "FirewallRule" - }, - "description": "Creates a firewall rule for the application.", - "response": { - "$ref": "FirewallRule" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules", - "id": "appengine.apps.firewall.ingressRules.create", - "path": "v1beta/apps/{appsId}/firewall/ingressRules" + "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules" } } } @@ -614,7 +328,6 @@ "locations": { "methods": { "get": { - "description": "Get information about a location.", "response": { "$ref": "Location" }, @@ -631,10 +344,10 @@ "location": "path" }, "locationsId": { - "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true + "required": true, + "location": "path" } }, "scopes": [ @@ -644,23 +357,30 @@ ], "flatPath": "v1beta/apps/{appsId}/locations/{locationsId}", "id": "appengine.apps.locations.get", - "path": "v1beta/apps/{appsId}/locations/{locationsId}" + "path": "v1beta/apps/{appsId}/locations/{locationsId}", + "description": "Get information about a location." }, "list": { "description": "Lists information about the supported locations for this service.", "httpMethod": "GET", - "parameterOrder": [ - "appsId" - ], "response": { "$ref": "ListLocationsResponse" }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" + "parameterOrder": [ + "appsId" ], "parameters": { + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. The resource that owns the locations collection, if applicable.", + "type": "string", + "required": true + }, "pageSize": { "location": "query", "format": "int32", @@ -671,19 +391,13 @@ "description": "The standard list filter.", "type": "string", "location": "query" - }, - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. The resource that owns the locations collection, if applicable.", - "type": "string", - "required": true } }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "flatPath": "v1beta/apps/{appsId}/locations", "path": "v1beta/apps/{appsId}/locations", "id": "appengine.apps.locations.list" @@ -692,82 +406,59 @@ }, "authorizedCertificates": { "methods": { - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "AuthorizedCertificate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta/apps/{appsId}/authorizedCertificates", - "path": "v1beta/apps/{appsId}/authorizedCertificates", - "id": "appengine.apps.authorizedCertificates.create", - "request": { - "$ref": "AuthorizedCertificate" - }, - "description": "Uploads the specified SSL certificate." - }, "delete": { - "response": { - "$ref": "Empty" - }, + "httpMethod": "DELETE", "parameterOrder": [ "appsId", "authorizedCertificatesId" ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], + "response": { + "$ref": "Empty" + }, "parameters": { - "authorizedCertificatesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, "appsId": { "location": "path", "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.", "type": "string", "required": true + }, + "authorizedCertificatesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "id": "appengine.apps.authorizedCertificates.delete", "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "id": "appengine.apps.authorizedCertificates.delete", "description": "Deletes the specified SSL certificate." }, "patch": { - "response": { + "request": { "$ref": "AuthorizedCertificate" }, + "description": "Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.", + "httpMethod": "PATCH", "parameterOrder": [ "appsId", "authorizedCertificatesId" ], - "httpMethod": "PATCH", + "response": { + "$ref": "AuthorizedCertificate" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "appsId": { - "location": "path", "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.", "type": "string", - "required": true + "required": true, + "location": "path" }, "authorizedCertificatesId": { "description": "Part of `name`. See documentation of `appsId`.", @@ -783,22 +474,19 @@ } }, "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "id": "appengine.apps.authorizedCertificates.patch", "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "request": { - "$ref": "AuthorizedCertificate" - }, - "description": "Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated." + "id": "appengine.apps.authorizedCertificates.patch" }, "get": { + "description": "Gets the specified SSL certificate.", "httpMethod": "GET", - "response": { - "$ref": "AuthorizedCertificate" - }, "parameterOrder": [ "appsId", "authorizedCertificatesId" ], + "response": { + "$ref": "AuthorizedCertificate" + }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", @@ -815,10 +503,10 @@ "type": "string" }, "authorizedCertificatesId": { + "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true, - "location": "path" + "required": true }, "appsId": { "location": "path", @@ -829,24 +517,39 @@ }, "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "id": "appengine.apps.authorizedCertificates.get", - "description": "Gets the specified SSL certificate." + "id": "appengine.apps.authorizedCertificates.get" }, "list": { "description": "Lists all SSL certificates the user is authorized to administer.", "httpMethod": "GET", - "response": { - "$ref": "ListAuthorizedCertificatesResponse" - }, "parameterOrder": [ "appsId" ], + "response": { + "$ref": "ListAuthorizedCertificatesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "parameters": { + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true, + "location": "path" + }, "pageSize": { + "type": "integer", "location": "query", "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer" + "description": "Maximum results to return per page." }, "view": { "location": "query", @@ -856,12 +559,21 @@ ], "description": "Controls the set of fields returned in the LIST response.", "type": "string" - }, - "pageToken": { - "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, + } + }, + "flatPath": "v1beta/apps/{appsId}/authorizedCertificates", + "path": "v1beta/apps/{appsId}/authorizedCertificates", + "id": "appengine.apps.authorizedCertificates.list" + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "AuthorizedCertificate" + }, + "parameters": { "appsId": { "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", "type": "string", @@ -870,30 +582,33 @@ } }, "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" + "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1beta/apps/{appsId}/authorizedCertificates", "path": "v1beta/apps/{appsId}/authorizedCertificates", - "id": "appengine.apps.authorizedCertificates.list" + "id": "appengine.apps.authorizedCertificates.create", + "description": "Uploads the specified SSL certificate.", + "request": { + "$ref": "AuthorizedCertificate" + } } } }, "services": { "methods": { "delete": { - "path": "v1beta/apps/{appsId}/services/{servicesId}", - "id": "appengine.apps.services.delete", "description": "Deletes the specified service and all enclosed versions.", - "httpMethod": "DELETE", + "response": { + "$ref": "Operation" + }, "parameterOrder": [ "appsId", "servicesId" ], - "response": { - "$ref": "Operation" - }, + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "servicesId": { "location": "path", @@ -908,25 +623,32 @@ "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}" + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.delete", + "path": "v1beta/apps/{appsId}/services/{servicesId}" }, "patch": { - "description": "Updates the configuration of the specified service.", - "request": { - "$ref": "Service" - }, - "response": { - "$ref": "Operation" - }, + "httpMethod": "PATCH", "parameterOrder": [ "appsId", "servicesId" ], - "httpMethod": "PATCH", + "response": { + "$ref": "Operation" + }, "parameters": { + "updateMask": { + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string", + "location": "query" + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, "appsId": { "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", "type": "string", @@ -934,42 +656,31 @@ "location": "path" }, "migrateTraffic": { + "type": "boolean", "location": "query", - "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/v1beta/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/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).", - "type": "boolean" - }, - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", - "type": "string" - }, - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true + "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/v1beta/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/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)." } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1beta/apps/{appsId}/services/{servicesId}", + "path": "v1beta/apps/{appsId}/services/{servicesId}", "id": "appengine.apps.services.patch", - "path": "v1beta/apps/{appsId}/services/{servicesId}" + "description": "Updates the configuration of the specified service.", + "request": { + "$ref": "Service" + } }, "get": { - "id": "appengine.apps.services.get", - "path": "v1beta/apps/{appsId}/services/{servicesId}", - "description": "Gets the current configuration of the specified service.", - "response": { - "$ref": "Service" - }, "parameterOrder": [ "appsId", "servicesId" ], "httpMethod": "GET", + "response": { + "$ref": "Service" + }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", @@ -977,34 +688,34 @@ ], "parameters": { "servicesId": { - "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", - "type": "string", "required": true, "location": "path" + }, + "appsId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default." } }, - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}" + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.get", + "path": "v1beta/apps/{appsId}/services/{servicesId}", + "description": "Gets the current configuration of the specified service." }, "list": { - "description": "Lists all the services in the application.", - "response": { - "$ref": "ListServicesResponse" - }, - "parameterOrder": [ - "appsId" + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "httpMethod": "GET", "parameters": { "pageToken": { + "type": "string", "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" + "description": "Continuation token for fetching the next page of results." }, "appsId": { "location": "path", @@ -1019,25 +730,24 @@ "location": "query" } }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "flatPath": "v1beta/apps/{appsId}/services", "id": "appengine.apps.services.list", - "path": "v1beta/apps/{appsId}/services" + "path": "v1beta/apps/{appsId}/services", + "description": "Lists all the services in the application.", + "response": { + "$ref": "ListServicesResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET" } }, "resources": { "versions": { "methods": { - "patch": { - "request": { - "$ref": "Version" - }, - "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.", - "httpMethod": "PATCH", + "delete": { + "httpMethod": "DELETE", "parameterOrder": [ "appsId", "servicesId", @@ -1046,57 +756,6 @@ "response": { "$ref": "Operation" }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "updateMask": { - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", - "type": "string", - "location": "query" - }, - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", - "type": "string", - "required": true - }, - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "id": "appengine.apps.services.versions.patch" - }, - "get": { - "id": "appengine.apps.services.versions.get", - "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.", - "response": { - "$ref": "Version" - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "parameters": { "appsId": { "location": "path", @@ -1104,21 +763,59 @@ "type": "string", "required": true }, - "view": { - "description": "Controls the set of fields returned in the Get response.", - "type": "string", - "location": "query", - "enum": [ - "BASIC", - "FULL" - ] - }, "versionsId": { - "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", + "required": true, + "location": "path" + }, + "servicesId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `name`. See documentation of `appsId`." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.delete", + "description": "Deletes an existing Version resource." + }, + "patch": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", + "type": "string", "required": true }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "updateMask": { + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string", + "location": "query" + }, "servicesId": { "location": "path", "description": "Part of `name`. See documentation of `appsId`.", @@ -1126,40 +823,79 @@ "required": true } }, - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}" + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.patch", + "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "request": { + "$ref": "Version" + }, + "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment." }, - "list": { - "description": "Lists the versions of a service.", + "get": { "httpMethod": "GET", "parameterOrder": [ "appsId", - "servicesId" + "servicesId", + "versionsId" ], "response": { - "$ref": "ListVersionsResponse" + "$ref": "Version" }, "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer" - }, "view": { - "description": "Controls the set of fields returned in the List response.", - "type": "string", "location": "query", "enum": [ "BASIC", "FULL" - ] + ], + "description": "Controls the set of fields returned in the Get response.", + "type": "string" }, - "servicesId": { + "versionsId": { "location": "path", - "description": "Part of `parent`. See documentation of `appsId`.", + "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true }, + "servicesId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `name`. See documentation of `appsId`." + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.get", + "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource." + }, + "list": { + "response": { + "$ref": "ListVersionsResponse" + }, + "parameterOrder": [ + "appsId", + "servicesId" + ], + "httpMethod": "GET", + "parameters": { + "servicesId": { + "description": "Part of `parent`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, "pageToken": { "location": "query", "description": "Continuation token for fetching the next page of results.", @@ -1170,6 +906,21 @@ "description": "Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.", "type": "string", "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + }, + "view": { + "location": "query", + "enum": [ + "BASIC", + "FULL" + ], + "description": "Controls the set of fields returned in the List response.", + "type": "string" } }, "scopes": [ @@ -1178,14 +929,15 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ], "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions", + "id": "appengine.apps.services.versions.list", "path": "v1beta/apps/{appsId}/services/{servicesId}/versions", - "id": "appengine.apps.services.versions.list" + "description": "Lists the versions of a service." }, "create": { - "description": "Deploys code and resource files to a new version.", "request": { "$ref": "Version" }, + "description": "Deploys code and resource files to a new version.", "response": { "$ref": "Operation" }, @@ -1194,64 +946,26 @@ "servicesId" ], "httpMethod": "POST", - "parameters": { - "servicesId": { - "description": "Part of `parent`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.", - "type": "string", - "required": true, - "location": "path" - } - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.", + "type": "string", + "required": true + }, + "servicesId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `parent`. See documentation of `appsId`." + } + }, "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions", "id": "appengine.apps.services.versions.create", "path": "v1beta/apps/{appsId}/services/{servicesId}/versions" - }, - "delete": { - "description": "Deletes an existing Version resource.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", - "type": "string", - "required": true - }, - "versionsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "id": "appengine.apps.services.versions.delete", - "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}" } }, "resources": { @@ -1274,28 +988,28 @@ "httpMethod": "POST", "parameters": { "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "instancesId": { "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true, "location": "path" }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true - }, - "versionsId": { + "instancesId": { "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true + }, + "appsId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1." + }, + "versionsId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `name`. See documentation of `appsId`." } }, "scopes": [ @@ -1319,10 +1033,10 @@ "httpMethod": "DELETE", "parameters": { "servicesId": { + "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true, - "location": "path" + "required": true }, "instancesId": { "description": "Part of `name`. See documentation of `appsId`.", @@ -1351,8 +1065,6 @@ "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}" }, "get": { - "id": "appengine.apps.services.versions.instances.get", - "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", "description": "Gets instance information.", "response": { "$ref": "Instance" @@ -1371,23 +1083,23 @@ ], "parameters": { "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "instancesId": { "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "instancesId": { + "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true, "location": "path" }, + "appsId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1." + }, "versionsId": { "location": "path", "description": "Part of `name`. See documentation of `appsId`.", @@ -1395,45 +1107,27 @@ "required": true } }, - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}" + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.services.versions.instances.get", + "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}" }, "list": { - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", - "id": "appengine.apps.services.versions.instances.list", - "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).", - "response": { - "$ref": "ListInstancesResponse" - }, + "httpMethod": "GET", "parameterOrder": [ "appsId", "servicesId", "versionsId" ], - "httpMethod": "GET", + "response": { + "$ref": "ListInstancesResponse" + }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], "parameters": { - "servicesId": { - "location": "path", - "description": "Part of `parent`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "pageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string", - "location": "query" - }, - "appsId": { - "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.", - "type": "string", - "required": true, - "location": "path" - }, "pageSize": { "location": "query", "format": "int32", @@ -1445,14 +1139,326 @@ "type": "string", "required": true, "location": "path" + }, + "servicesId": { + "location": "path", + "description": "Part of `parent`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.", + "type": "string", + "required": true } - } + }, + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", + "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", + "id": "appengine.apps.services.versions.instances.list" } } } } } } + }, + "authorizedDomains": { + "methods": { + "list": { + "description": "Lists all domains the user is authorized to administer.", + "httpMethod": "GET", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "ListAuthorizedDomainsResponse" + }, + "parameters": { + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true, + "location": "path" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta/apps/{appsId}/authorizedDomains", + "path": "v1beta/apps/{appsId}/authorizedDomains", + "id": "appengine.apps.authorizedDomains.list" + } + } + }, + "operations": { + "methods": { + "get": { + "flatPath": "v1beta/apps/{appsId}/operations/{operationsId}", + "path": "v1beta/apps/{appsId}/operations/{operationsId}", + "id": "appengine.apps.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "httpMethod": "GET", + "parameterOrder": [ + "appsId", + "operationsId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "operationsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "location": "path", + "description": "Part of `name`. The name of the operation resource.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "list": { + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. The name of the operation's parent resource.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + } + }, + "flatPath": "v1beta/apps/{appsId}/operations", + "id": "appengine.apps.operations.list", + "path": "v1beta/apps/{appsId}/operations", + "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.", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET" + } + } + }, + "domainMappings": { + "methods": { + "delete": { + "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.", + "httpMethod": "DELETE", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "domainMappingsId" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.", + "type": "string", + "required": true, + "location": "path" + }, + "domainMappingsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", + "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", + "id": "appengine.apps.domainMappings.delete" + }, + "patch": { + "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", + "id": "appengine.apps.domainMappings.patch", + "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", + "request": { + "$ref": "DomainMapping" + }, + "description": "Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "domainMappingsId" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string", + "location": "query" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.", + "type": "string", + "required": true + }, + "domainMappingsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + } + }, + "get": { + "description": "Gets the specified domain mapping.", + "response": { + "$ref": "DomainMapping" + }, + "parameterOrder": [ + "appsId", + "domainMappingsId" + ], + "httpMethod": "GET", + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.", + "type": "string", + "required": true, + "location": "path" + }, + "domainMappingsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", + "id": "appengine.apps.domainMappings.get", + "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}" + }, + "list": { + "path": "v1beta/apps/{appsId}/domainMappings", + "id": "appengine.apps.domainMappings.list", + "description": "Lists the domain mappings on an application.", + "httpMethod": "GET", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "ListDomainMappingsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true + }, + "pageSize": { + "type": "integer", + "location": "query", + "format": "int32", + "description": "Maximum results to return per page." + } + }, + "flatPath": "v1beta/apps/{appsId}/domainMappings" + }, + "create": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta/apps/{appsId}/domainMappings", + "path": "v1beta/apps/{appsId}/domainMappings", + "id": "appengine.apps.domainMappings.create", + "request": { + "$ref": "DomainMapping" + }, + "description": "Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.", + "httpMethod": "POST", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "Operation" + } + } + } } } } @@ -1470,19 +1476,14 @@ "type": "boolean" }, "uploadType": { + "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" }, "fields": { + "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" + "type": "string" }, "$.xgafv": { "description": "V1 error format.", @@ -1497,7 +1498,13 @@ "2" ] }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, "alt": { + "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", @@ -1510,13 +1517,12 @@ "json", "media", "proto" - ], - "type": "string" + ] }, "access_token": { + "location": "query", "description": "OAuth access token.", - "type": "string", - "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.", @@ -1529,344 +1535,66 @@ "location": "query" }, "pp": { - "location": "query", "description": "Pretty-print response.", "default": "true", - "type": "boolean" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", + "type": "boolean", "location": "query" }, "bearer_token": { - "location": "query", "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", "type": "string" } }, "schemas": { - "Service": { - "description": "A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle tasks such as backend data analysis or API requests from mobile devices. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.", - "type": "object", - "properties": { - "split": { - "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the service.", - "$ref": "TrafficSplit" - }, - "id": { - "description": "Relative name of the service within the application. Example: default.@OutputOnly", - "type": "string" - }, - "name": { - "description": "Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - } - }, - "id": "Service" - }, - "ListOperationsResponse": { - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - } - }, - "id": "ListOperationsResponse", - "description": "The response message for Operations.ListOperations.", - "type": "object" - }, - "OperationMetadata": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Timestamp that this operation completed.@OutputOnly", - "type": "string" - }, - "operationType": { - "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", - "type": "string" - }, - "insertTime": { - "format": "google-datetime", - "description": "Timestamp that this operation was created.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadata" - }, - "FirewallRule": { - "description": "A single firewall rule that is evaluated against incoming traffic and provides an action to take on matched requests.", - "type": "object", - "properties": { - "priority": { - "format": "int32", - "description": "A positive integer between 1, Int32.MaxValue-1 that defines the order of rule evaluation. Rules with the lowest priority are evaluated first.A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic when no previous rule matches. Only the action of this rule can be modified by the user.", - "type": "integer" - }, - "action": { - "enumDescriptions": [ - "", - "Matching requests are allowed.", - "Matching requests are denied." - ], - "enum": [ - "UNSPECIFIED_ACTION", - "ALLOW", - "DENY" - ], - "description": "The action to take on matched requests.", - "type": "string" - }, - "description": { - "description": "An optional string description of this rule. This field has a maximum length of 100 characters.", - "type": "string" - }, - "sourceRange": { - "description": "IP address or range, defined using CIDR notation, of requests that this rule applies to. You can use the wildcard character \"*\" to match all IPs equivalent to \"0/0\" and \"::/0\" together. Examples: 192.168.1.1 or 192.168.0.0/16 or 2001:db8::/32 or 2001:0db8:0000:0042:0000:8a2e:0370:7334.\u003cp\u003eTruncation will be silently performed on addresses which are not properly truncated. For example, 1.2.3.4/24 is accepted as the same address as 1.2.3.0/24. Similarly, for IPv6, 2001:db8::1/32 is accepted as the same address as 2001:db8::/32.", - "type": "string" - } - }, - "id": "FirewallRule" - }, - "ListAuthorizedCertificatesResponse": { - "description": "Response message for AuthorizedCertificates.ListAuthorizedCertificates.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "certificates": { - "description": "The SSL certificates the user is authorized to administer.", - "items": { - "$ref": "AuthorizedCertificate" - }, - "type": "array" - } - }, - "id": "ListAuthorizedCertificatesResponse" - }, - "FeatureSettings": { - "description": "The feature specific settings to be used in the application. These define behaviors that are user configurable.", - "type": "object", - "properties": { - "splitHealthChecks": { - "description": "Boolean value indicating if split health checks should be used instead of the legacy health checks. At an app.yaml level, this means defaulting to 'readiness_check' and 'liveness_check' values instead of 'health_check' ones. Once the legacy 'health_check' behavior is deprecated, and this value is always true, this setting can be removed.", - "type": "boolean" - } - }, - "id": "FeatureSettings" - }, - "OperationMetadataV1": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataV1" - }, - "SslSettings": { - "description": "SSL configuration for a DomainMapping resource.", - "type": "object", - "properties": { - "certificateId": { - "description": "ID of the AuthorizedCertificate resource configuring SSL for the application. Clearing this field will remove SSL support. Example: 12345.", - "type": "string" - } - }, - "id": "SslSettings" - }, - "ErrorHandler": { - "description": "Custom static error page to be served when an error occurs.", - "type": "object", - "properties": { - "mimeType": { - "description": "MIME type of file. Defaults to text/html.", - "type": "string" - }, - "errorCode": { - "enumDescriptions": [ - "Not specified. ERROR_CODE_DEFAULT is assumed.", - "All other error types.", - "Application has exceeded a resource quota.", - "Client blocked by the application's Denial of Service protection configuration.", - "Deadline reached before the application responds." - ], - "enum": [ - "ERROR_CODE_UNSPECIFIED", - "ERROR_CODE_DEFAULT", - "ERROR_CODE_OVER_QUOTA", - "ERROR_CODE_DOS_API_DENIAL", - "ERROR_CODE_TIMEOUT" - ], - "description": "Error condition this handler applies to.", - "type": "string" - }, - "staticFile": { - "description": "Static file content to be served for this error.", - "type": "string" - } - }, - "id": "ErrorHandler" - }, - "Network": { - "description": "Extra network settings. Only applicable for VM runtimes.", - "type": "object", - "properties": { - "subnetworkName": { - "description": "Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network.\nIf the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range.\nIf the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network.\nIf the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the Flex app.", - "type": "string" - }, - "instanceTag": { - "description": "Tag to apply to the VM instance during creation.", - "type": "string" - }, - "forwardedPorts": { - "description": "List of ports, or port pairs, to forward from the virtual machine to the application container.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default.", - "type": "string" - } - }, - "id": "Network" - }, - "Application": { - "description": "An Application resource contains the top-level configuration of an App Engine application. Next tag: 20", - "type": "object", - "properties": { - "locationId": { - "description": "Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US", - "type": "string" - }, - "servingStatus": { - "enumDescriptions": [ - "Serving status is unspecified.", - "Application is serving.", - "Application has been disabled by the user.", - "Application has been disabled by the system." - ], - "enum": [ - "UNSPECIFIED", - "SERVING", - "USER_DISABLED", - "SYSTEM_DISABLED" - ], - "description": "Serving status of this application.", - "type": "string" - }, - "defaultHostname": { - "description": "Hostname used to reach this application, as resolved by App Engine.@OutputOnly", - "type": "string" - }, - "featureSettings": { - "description": "The feature specific settings to be used in the application.", - "$ref": "FeatureSettings" - }, - "iap": { - "$ref": "IdentityAwareProxy" - }, - "authDomain": { - "description": "Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account.", - "type": "string" - }, - "codeBucket": { - "description": "Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly", - "type": "string" - }, - "defaultBucket": { - "description": "Google Cloud Storage bucket that can be used by this application to store content.@OutputOnly", - "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.@OutputOnly", - "items": { - "$ref": "UrlDispatchRule" - }, - "type": "array" - }, - "gcrDomain": { - "description": "The Google Container Registry domain used for storing managed build docker images for this application.", - "type": "string" - }, - "name": { - "description": "Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly", - "type": "string" - }, - "defaultCookieExpiration": { - "format": "google-duration", - "description": "Cookie expiration policy for this application.", - "type": "string" - }, - "id": { - "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp.", - "type": "string" - } - }, - "id": "Application" - }, "Instance": { "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", "type": "object", "properties": { + "vmName": { + "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "qps": { + "format": "float", + "description": "Average queries per second (QPS) over the last minute.@OutputOnly", + "type": "number" + }, + "vmId": { + "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "vmZoneName": { + "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "name": { + "description": "Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly", + "type": "string" + }, + "averageLatency": { + "format": "int32", + "description": "Average latency (ms) over the last minute.@OutputOnly", + "type": "integer" + }, + "id": { + "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly", + "type": "string" + }, + "vmIp": { + "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "memoryUsage": { + "format": "int64", + "description": "Total memory in use (bytes).@OutputOnly", + "type": "string" + }, "vmStatus": { "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "string" @@ -1877,8 +1605,6 @@ "type": "integer" }, "availability": { - "description": "Availability of the instance.@OutputOnly", - "type": "string", "enumDescriptions": [ "", "", @@ -1888,7 +1614,9 @@ "UNSPECIFIED", "RESIDENT", "DYNAMIC" - ] + ], + "description": "Availability of the instance.@OutputOnly", + "type": "string" }, "startTime": { "format": "google-datetime", @@ -1907,88 +1635,49 @@ "appEngineRelease": { "description": "App Engine release this instance is running on.@OutputOnly", "type": "string" - }, - "vmName": { - "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, - "vmId": { - "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, - "qps": { - "format": "float", - "description": "Average queries per second (QPS) over the last minute.@OutputOnly", - "type": "number" - }, - "vmZoneName": { - "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, - "name": { - "description": "Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly", - "type": "string" - }, - "averageLatency": { - "format": "int32", - "description": "Average latency (ms) over the last minute.@OutputOnly", - "type": "integer" - }, - "vmIp": { - "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, - "memoryUsage": { - "format": "int64", - "description": "Total memory in use (bytes).@OutputOnly", - "type": "string" - }, - "id": { - "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly", - "type": "string" } }, "id": "Instance" }, "LivenessCheck": { - "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances.", - "type": "object", "properties": { - "initialDelay": { - "format": "google-duration", - "description": "The initial delay before starting to execute the checks.", - "type": "string" - }, - "path": { - "description": "The request path.", - "type": "string" - }, - "host": { - "description": "Host header to send when performing a HTTP Liveness check. Example: \"myapp.appspot.com\"", - "type": "string" - }, - "successThreshold": { + "failureThreshold": { "format": "uint32", - "description": "Number of consecutive successful checks required before considering the VM healthy.", + "description": "Number of consecutive failed checks required before considering the VM unhealthy.", "type": "integer" }, - "checkInterval": { - "format": "google-duration", - "description": "Interval between health checks.", - "type": "string" - }, "timeout": { "format": "google-duration", "description": "Time before the check is considered failed.", "type": "string" }, - "failureThreshold": { + "initialDelay": { + "format": "google-duration", + "description": "The initial delay before starting to execute the checks.", + "type": "string" + }, + "path": { + "type": "string", + "description": "The request path." + }, + "successThreshold": { "format": "uint32", - "description": "Number of consecutive failed checks required before considering the VM unhealthy.", + "description": "Number of consecutive successful checks required before considering the VM healthy.", "type": "integer" + }, + "host": { + "description": "Host header to send when performing a HTTP Liveness check. Example: \"myapp.appspot.com\"", + "type": "string" + }, + "checkInterval": { + "format": "google-duration", + "description": "Interval between health checks.", + "type": "string" } }, - "id": "LivenessCheck" + "id": "LivenessCheck", + "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances.", + "type": "object" }, "BatchUpdateIngressRulesRequest": { "description": "Request message for Firewall.BatchUpdateIngressRules.", @@ -2008,6 +1697,11 @@ "description": "Target scaling by network usage. Only applicable for VM runtimes.", "type": "object", "properties": { + "targetReceivedPacketsPerSecond": { + "format": "int32", + "description": "Target packets received per second.", + "type": "integer" + }, "targetSentBytesPerSecond": { "format": "int32", "description": "Target bytes sent per second.", @@ -2022,11 +1716,6 @@ "format": "int32", "description": "Target packets sent per second.", "type": "integer" - }, - "targetReceivedPacketsPerSecond": { - "format": "int32", - "description": "Target packets received per second.", - "type": "integer" } }, "id": "NetworkUtilization" @@ -2035,14 +1724,6 @@ "description": "A resource that represents Google Cloud Platform location.", "type": "object", "properties": { - "name": { - "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", - "type": "string" - }, - "locationId": { - "description": "The canonical id for this location. For example: \"us-east1\".", - "type": "string" - }, "metadata": { "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", @@ -2057,32 +1738,33 @@ }, "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", + "type": "string" + }, + "locationId": { + "description": "The canonical id for this location. For example: \"us-east1\".", + "type": "string" } }, "id": "Location" }, "HealthCheck": { + "id": "HealthCheck", "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", "type": "object", "properties": { - "disableHealthCheck": { - "description": "Whether to explicitly disable health checks for this instance.", - "type": "boolean" - }, - "host": { - "description": "Host header to send when performing an HTTP health check. Example: \"myapp.appspot.com\"", - "type": "string" + "healthyThreshold": { + "format": "uint32", + "description": "Number of consecutive successful health checks required before receiving traffic.", + "type": "integer" }, "restartThreshold": { "format": "uint32", "description": "Number of consecutive failed health checks required before an instance is restarted.", "type": "integer" }, - "healthyThreshold": { - "format": "uint32", - "description": "Number of consecutive successful health checks required before receiving traffic.", - "type": "integer" - }, "checkInterval": { "format": "google-duration", "description": "Interval between health checks.", @@ -2097,12 +1779,34 @@ "format": "uint32", "description": "Number of consecutive failed health checks required before removing traffic.", "type": "integer" + }, + "disableHealthCheck": { + "description": "Whether to explicitly disable health checks for this instance.", + "type": "boolean" + }, + "host": { + "description": "Host header to send when performing an HTTP health check. Example: \"myapp.appspot.com\"", + "type": "string" } - }, - "id": "HealthCheck" + } }, "ReadinessCheck": { + "description": "Readiness checking configuration for VM instances. Unhealthy instances are removed from traffic rotation.", + "type": "object", "properties": { + "path": { + "description": "The request path.", + "type": "string" + }, + "successThreshold": { + "format": "uint32", + "description": "Number of consecutive successful checks required before receiving traffic.", + "type": "integer" + }, + "host": { + "description": "Host header to send when performing a HTTP Readiness check. Example: \"myapp.appspot.com\"", + "type": "string" + }, "checkInterval": { "format": "google-duration", "description": "Interval between health checks.", @@ -2122,24 +1826,36 @@ "format": "google-duration", "description": "A maximum time limit on application initialization, measured from moment the application successfully replies to a healthcheck until it is ready to serve traffic.", "type": "string" - }, - "path": { - "description": "The request path.", - "type": "string" - }, - "successThreshold": { - "format": "uint32", - "description": "Number of consecutive successful checks required before receiving traffic.", - "type": "integer" - }, - "host": { - "description": "Host header to send when performing a HTTP Readiness check. Example: \"myapp.appspot.com\"", - "type": "string" } }, - "id": "ReadinessCheck", - "description": "Readiness checking configuration for VM instances. Unhealthy instances are removed from traffic rotation.", - "type": "object" + "id": "ReadinessCheck" + }, + "StandardSchedulerSettings": { + "description": "Scheduler settings for standard environment.", + "type": "object", + "properties": { + "targetCpuUtilization": { + "type": "number", + "format": "double", + "description": "Target CPU utilization ratio to maintain when scaling." + }, + "targetThroughputUtilization": { + "format": "double", + "description": "Target throughput utilization ratio to maintain when scaling", + "type": "number" + }, + "maxInstances": { + "type": "integer", + "format": "int32", + "description": "Maximum number of instances for an app version. Set to a non-positive value (0 by convention) to disable max_instances configuration." + }, + "minInstances": { + "format": "int32", + "description": "Minimum number of instances for an app version. Set to a non-positive value (0 by convention) to disable min_instances configuration.", + "type": "integer" + } + }, + "id": "StandardSchedulerSettings" }, "DebugInstanceRequest": { "properties": { @@ -2152,37 +1868,13 @@ "description": "Request message for Instances.DebugInstance.", "type": "object" }, - "StandardSchedulerSettings": { - "description": "Scheduler settings for standard environment.", - "type": "object", - "properties": { - "targetThroughputUtilization": { - "format": "double", - "description": "Target throughput utilization ratio to maintain when scaling", - "type": "number" - }, - "maxInstances": { - "format": "int32", - "description": "Maximum number of instances for an app version. Set to a non-positive value (0 by convention) to disable max_instances configuration.", - "type": "integer" - }, - "minInstances": { - "format": "int32", - "description": "Minimum number of instances for an app version. Set to a non-positive value (0 by convention) to disable min_instances configuration.", - "type": "integer" - }, - "targetCpuUtilization": { - "format": "double", - "description": "Target CPU utilization ratio to maintain when scaling.", - "type": "number" - } - }, - "id": "StandardSchedulerSettings" - }, "OperationMetadataV1Beta5": { - "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { + "method": { + "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", + "type": "string" + }, "insertTime": { "format": "google-datetime", "description": "Timestamp that this operation was created.@OutputOnly", @@ -2200,122 +1892,16 @@ "user": { "description": "User who requested this operation.@OutputOnly", "type": "string" - }, - "method": { - "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", - "type": "string" } }, - "id": "OperationMetadataV1Beta5" + "id": "OperationMetadataV1Beta5", + "description": "Metadata for the given google.longrunning.Operation." }, "Version": { + "id": "Version", "description": "A Version resource is a specific set of source code and configuration files that are deployed into a service.", "type": "object", "properties": { - "envVariables": { - "additionalProperties": { - "type": "string" - }, - "description": "Environment variables available to the application.Only returned in GET requests if view=FULL is set.", - "type": "object" - }, - "livenessCheck": { - "$ref": "LivenessCheck", - "description": "Configures liveness health checking for VM instances. Unhealthy instances are stopped and replaced with new instancesOnly returned in GET requests if view=FULL is set." - }, - "network": { - "description": "Extra network settings. Only applicable for VM runtimes.", - "$ref": "Network" - }, - "betaSettings": { - "additionalProperties": { - "type": "string" - }, - "description": "Metadata settings that are supplied to this version to enable beta runtime features.", - "type": "object" - }, - "env": { - "description": "App Engine execution environment for this version.Defaults to standard.", - "type": "string" - }, - "handlers": { - "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "UrlMap" - }, - "type": "array" - }, - "automaticScaling": { - "$ref": "AutomaticScaling", - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics." - }, - "diskUsageBytes": { - "format": "int64", - "description": "Total size in bytes of all the files that are included in this version and curerntly hosted on the App Engine disk.@OutputOnly", - "type": "string" - }, - "healthCheck": { - "description": "Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set.", - "$ref": "HealthCheck" - }, - "threadsafe": { - "description": "Whether multiple requests can be dispatched to this version at once.", - "type": "boolean" - }, - "readinessCheck": { - "description": "Configures readiness health checking for VM instances. Unhealthy instances are not put into the backend traffic rotation.Only returned in GET requests if view=FULL is set.", - "$ref": "ReadinessCheck" - }, - "manualScaling": { - "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", - "$ref": "ManualScaling" - }, - "name": { - "description": "Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly", - "type": "string" - }, - "apiConfig": { - "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set.", - "$ref": "ApiConfigHandler" - }, - "endpointsApiService": { - "description": "Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app.", - "$ref": "EndpointsApiService" - }, - "vm": { - "description": "Whether to deploy this version in a container on a virtual machine.", - "type": "boolean" - }, - "versionUrl": { - "description": "Serving URL for this version. Example: \"https://myversion-dot-myservice-dot-myapp.appspot.com\"@OutputOnly", - "type": "string" - }, - "instanceClass": { - "description": "Instance class that is used to run this version. Valid values are:\nAutomaticScaling: F1, F2, F4, F4_1G\nManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.", - "type": "string" - }, - "servingStatus": { - "enum": [ - "SERVING_STATUS_UNSPECIFIED", - "SERVING", - "STOPPED" - ], - "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", - "type": "string", - "enumDescriptions": [ - "Not specified.", - "Currently serving. Instances are created according to the scaling settings of the version.", - "Disabled. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." - ] - }, - "deployment": { - "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set.", - "$ref": "Deployment" - }, - "runtimeApiVersion": { - "description": "The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/\u003clanguage\u003e/config/appref", - "type": "string" - }, "createTime": { "format": "google-datetime", "description": "Time that this version was created.@OutputOnly", @@ -2324,7 +1910,6 @@ "inboundServices": { "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", "items": { - "type": "string", "enum": [ "INBOUND_SERVICE_UNSPECIFIED", "INBOUND_SERVICE_MAIL", @@ -2335,7 +1920,8 @@ "INBOUND_SERVICE_XMPP_PRESENCE", "INBOUND_SERVICE_CHANNEL_PRESENCE", "INBOUND_SERVICE_WARMUP" - ] + ], + "type": "string" }, "type": "array", "enumDescriptions": [ @@ -2355,11 +1941,11 @@ "$ref": "Resources" }, "errorHandlers": { - "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", "items": { "$ref": "ErrorHandler" }, - "type": "array" + "type": "array", + "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set." }, "defaultExpiration": { "format": "google-duration", @@ -2386,21 +1972,124 @@ "type": "string" }, "id": { - "description": "Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\".", - "type": "string" + "type": "string", + "description": "Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\"." }, "createdBy": { "description": "Email address of the user who created this version.@OutputOnly", "type": "string" + }, + "envVariables": { + "description": "Environment variables available to the application.Only returned in GET requests if view=FULL is set.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "livenessCheck": { + "$ref": "LivenessCheck", + "description": "Configures liveness health checking for VM instances. Unhealthy instances are stopped and replaced with new instancesOnly returned in GET requests if view=FULL is set." + }, + "network": { + "$ref": "Network", + "description": "Extra network settings. Only applicable for App Engine flexible environment versions." + }, + "betaSettings": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata settings that are supplied to this version to enable beta runtime features.", + "type": "object" + }, + "env": { + "description": "App Engine execution environment for this version.Defaults to standard.", + "type": "string" + }, + "handlers": { + "items": { + "$ref": "UrlMap" + }, + "type": "array", + "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set." + }, + "automaticScaling": { + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", + "$ref": "AutomaticScaling" + }, + "diskUsageBytes": { + "format": "int64", + "description": "Total size in bytes of all the files that are included in this version and curerntly hosted on the App Engine disk.@OutputOnly", + "type": "string" + }, + "healthCheck": { + "$ref": "HealthCheck", + "description": "Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set." + }, + "threadsafe": { + "description": "Whether multiple requests can be dispatched to this version at once.", + "type": "boolean" + }, + "readinessCheck": { + "$ref": "ReadinessCheck", + "description": "Configures readiness health checking for VM instances. Unhealthy instances are not put into the backend traffic rotation.Only returned in GET requests if view=FULL is set." + }, + "manualScaling": { + "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", + "$ref": "ManualScaling" + }, + "name": { + "description": "Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly", + "type": "string" + }, + "apiConfig": { + "$ref": "ApiConfigHandler", + "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set." + }, + "endpointsApiService": { + "description": "Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app.", + "$ref": "EndpointsApiService" + }, + "vm": { + "description": "Whether to deploy this version in a container on a virtual machine.", + "type": "boolean" + }, + "versionUrl": { + "description": "Serving URL for this version. Example: \"https://myversion-dot-myservice-dot-myapp.appspot.com\"@OutputOnly", + "type": "string" + }, + "instanceClass": { + "description": "Instance class that is used to run this version. Valid values are:\nAutomaticScaling: F1, F2, F4, F4_1G\nManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.", + "type": "string" + }, + "servingStatus": { + "enumDescriptions": [ + "Not specified.", + "Currently serving. Instances are created according to the scaling settings of the version.", + "Disabled. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." + ], + "enum": [ + "SERVING_STATUS_UNSPECIFIED", + "SERVING", + "STOPPED" + ], + "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", + "type": "string" + }, + "runtimeApiVersion": { + "type": "string", + "description": "The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/\u003clanguage\u003e/config/appref" + }, + "deployment": { + "$ref": "Deployment", + "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set." } - }, - "id": "Version" + } }, "RepairApplicationRequest": { + "id": "RepairApplicationRequest", "description": "Request message for 'Applications.RepairApplication'.", "type": "object", - "properties": {}, - "id": "RepairApplicationRequest" + "properties": {} }, "CertificateRawData": { "description": "An SSL certificate obtained from a certificate authority.", @@ -2428,6 +2117,25 @@ }, "id": "BuildInfo" }, + "FileInfo": { + "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", + "type": "object", + "properties": { + "sha1Sum": { + "description": "The SHA1 hash of the file, in hex.", + "type": "string" + }, + "mimeType": { + "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", + "type": "string" + }, + "sourceUrl": { + "type": "string", + "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'." + } + }, + "id": "FileInfo" + }, "ScriptHandler": { "description": "Executes a script to handle the request that matches the URL pattern.", "type": "object", @@ -2439,34 +2147,19 @@ }, "id": "ScriptHandler" }, - "FileInfo": { - "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", - "type": "object", - "properties": { - "mimeType": { - "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", - "type": "string" - }, - "sourceUrl": { - "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", - "type": "string" - }, - "sha1Sum": { - "description": "The SHA1 hash of the file, in hex.", - "type": "string" - } - }, - "id": "FileInfo" - }, "OperationMetadataExperimental": { "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", + "method": { + "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", "type": "string" }, + "insertTime": { + "type": "string", + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly" + }, "endTime": { "format": "google-datetime", "description": "Time that this operation completed.@OutputOnly", @@ -2479,28 +2172,24 @@ "user": { "description": "User who requested this operation.@OutputOnly", "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", - "type": "string" } }, "id": "OperationMetadataExperimental" }, "AuthorizedDomain": { - "properties": { - "id": { - "description": "Fully qualified domain name of the domain authorized for use. Example: example.com.", - "type": "string" - }, - "name": { - "description": "Full path to the AuthorizedDomain resource in the API. Example: apps/myapp/authorizedDomains/example.com.@OutputOnly", - "type": "string" - } - }, "id": "AuthorizedDomain", "description": "A domain that a user has been authorized to administer. To authorize use of a domain, verify ownership via Webmaster Central (https://www.google.com/webmasters/verification/home).", - "type": "object" + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fully qualified domain name of the domain authorized for use. Example: example.com." + }, + "name": { + "type": "string", + "description": "Full path to the AuthorizedDomain resource in the API. Example: apps/myapp/authorizedDomains/example.com.@OutputOnly" + } + } }, "TrafficSplit": { "description": "Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.", @@ -2515,6 +2204,12 @@ "type": "object" }, "shardBy": { + "enum": [ + "UNSPECIFIED", + "COOKIE", + "IP", + "RANDOM" + ], "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", "type": "string", "enumDescriptions": [ @@ -2522,41 +2217,22 @@ "Diversion based on a specially named cookie, \"GOOGAPPUID.\" The cookie must be set by the application itself or no diversion will occur.", "Diversion based on applying the modulus operation to a fingerprint of the IP address.", "Diversion based on weighted random assignment. An incoming request is randomly routed to a version in the traffic split, with probability proportional to the version's traffic share." - ], - "enum": [ - "UNSPECIFIED", - "COOKIE", - "IP", - "RANDOM" ] } }, "id": "TrafficSplit" }, "OperationMetadataV1Beta": { - "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", "type": "string" }, - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, "user": { "description": "User who requested this operation.@OutputOnly", "type": "string" }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, "ephemeralMessage": { "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", "type": "string" @@ -2569,27 +2245,22 @@ "format": "google-datetime", "description": "Time that this operation completed.@OutputOnly", "type": "string" - } - }, - "id": "OperationMetadataV1Beta" - }, - "ListIngressRulesResponse": { - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" }, - "ingressRules": { - "description": "The ingress FirewallRules for this application.", + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", "items": { - "$ref": "FirewallRule" + "type": "string" }, "type": "array" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" } }, - "id": "ListIngressRulesResponse", - "description": "Response message for Firewall.ListIngressRules.", - "type": "object" + "id": "OperationMetadataV1Beta", + "description": "Metadata for the given google.longrunning.Operation." }, "ListServicesResponse": { "description": "Response message for Services.ListServices.", @@ -2609,8 +2280,37 @@ }, "id": "ListServicesResponse" }, - "Resources": { + "ListIngressRulesResponse": { "properties": { + "ingressRules": { + "description": "The ingress FirewallRules for this application.", + "items": { + "$ref": "FirewallRule" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + } + }, + "id": "ListIngressRulesResponse", + "description": "Response message for Firewall.ListIngressRules.", + "type": "object" + }, + "Resources": { + "type": "object", + "properties": { + "memoryGb": { + "format": "double", + "description": "Memory (GB) needed.", + "type": "number" + }, + "cpu": { + "type": "number", + "format": "double", + "description": "Number of CPU cores needed." + }, "volumes": { "description": "User specified volumes.", "items": { @@ -2622,21 +2322,10 @@ "format": "double", "description": "Disk size (GB) needed.", "type": "number" - }, - "memoryGb": { - "format": "double", - "description": "Memory (GB) needed.", - "type": "number" - }, - "cpu": { - "format": "double", - "description": "Number of CPU cores needed.", - "type": "number" } }, "id": "Resources", - "description": "Machine resources for a version.", - "type": "object" + "description": "Machine resources for a version." }, "Deployment": { "description": "Code and application artifacts used to deploy a version to App Engine.", @@ -2647,12 +2336,12 @@ "$ref": "ZipInfo" }, "container": { - "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment.", - "$ref": "ContainerInfo" + "$ref": "ContainerInfo", + "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment." }, "build": { - "description": "Google Cloud Container Builder build information.", - "$ref": "BuildInfo" + "$ref": "BuildInfo", + "description": "Google Cloud Container Builder build information." }, "files": { "additionalProperties": { @@ -2665,13 +2354,7 @@ "id": "Deployment" }, "Volume": { - "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", - "type": "object", "properties": { - "volumeType": { - "description": "Underlying volume type, e.g. 'tmpfs'.", - "type": "string" - }, "sizeGb": { "format": "double", "description": "Volume size in gigabytes.", @@ -2680,11 +2363,19 @@ "name": { "description": "Unique name for the volume.", "type": "string" + }, + "volumeType": { + "description": "Underlying volume type, e.g. 'tmpfs'.", + "type": "string" } }, - "id": "Volume" + "id": "Volume", + "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", + "type": "object" }, "BatchUpdateIngressRulesResponse": { + "description": "Response message for Firewall.UpdateAllIngressRules.", + "type": "object", "properties": { "ingressRules": { "description": "The full list of ingress FirewallRules for this application.", @@ -2694,13 +2385,39 @@ "type": "array" } }, - "id": "BatchUpdateIngressRulesResponse", - "description": "Response message for Firewall.UpdateAllIngressRules.", - "type": "object" + "id": "BatchUpdateIngressRulesResponse" + }, + "ManagedCertificate": { + "description": "A certificate managed by App Engine.", + "type": "object", + "properties": { + "lastRenewalTime": { + "format": "google-datetime", + "description": "Time at which the certificate was last renewed. The renewal process is fully managed. Certificate renewal will automatically occur before the certificate expires. Renewal errors can be tracked via ManagementStatus.@OutputOnly", + "type": "string" + }, + "status": { + "type": "string", + "enumDescriptions": [ + "", + "Certificate was successfully obtained and inserted into the serving system.", + "Certificate is under active attempts to acquire or renew.", + "Most recent renewal failed due to an invalid DNS setup and will be retried. Renewal attempts will continue to fail until the certificate domain's DNS configuration is fixed. The last successfully provisioned certificate may still be serving.", + "All renewal attempts have been exhausted, likely due to an invalid DNS setup." + ], + "enum": [ + "MANAGEMENT_STATUS_UNSPECIFIED", + "OK", + "PENDING", + "FAILED_RETRYING_NOT_VISIBLE", + "FAILED_PERMANENT" + ], + "description": "Status of certificate management. Refers to the most recent certificate acquisition or renewal attempt.@OutputOnly" + } + }, + "id": "ManagedCertificate" }, "ListInstancesResponse": { - "description": "Response message for Instances.ListInstances.", - "type": "object", "properties": { "nextPageToken": { "description": "Continuation token for fetching the next page of results.", @@ -2714,30 +2431,53 @@ "type": "array" } }, - "id": "ListInstancesResponse" + "id": "ListInstancesResponse", + "description": "Response message for Instances.ListInstances.", + "type": "object" }, "ListDomainMappingsResponse": { - "description": "Response message for DomainMappings.ListDomainMappings.", - "type": "object", "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, "domainMappings": { "description": "The domain mappings for the application.", "items": { "$ref": "DomainMapping" }, "type": "array" - }, - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" } }, - "id": "ListDomainMappingsResponse" + "id": "ListDomainMappingsResponse", + "description": "Response message for DomainMappings.ListDomainMappings.", + "type": "object" }, "OperationMetadataV1Alpha": { "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { + "target": { + "type": "string", + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly" + }, + "user": { + "type": "string", + "description": "User who requested this operation.@OutputOnly" + }, + "ephemeralMessage": { + "type": "string", + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + }, "warning": { "description": "Durable messages that persist on every operation poll. @OutputOnly", "items": { @@ -2749,35 +2489,16 @@ "format": "google-datetime", "description": "Time that this operation was created.@OutputOnly", "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" } }, "id": "OperationMetadataV1Alpha" }, "UrlDispatchRule": { - "description": "Rules to match an HTTP request and dispatch that request to a service.", - "type": "object", "properties": { + "path": { + "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path.The sum of the lengths of the domain and path may not exceed 100 characters.", + "type": "string" + }, "service": { "description": "Resource ID of a service in this application that should serve the matched request. The service must already exist. Example: default.", "type": "string" @@ -2785,16 +2506,13 @@ "domain": { "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\".", "type": "string" - }, - "path": { - "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path.The sum of the lengths of the domain and path may not exceed 100 characters.", - "type": "string" } }, - "id": "UrlDispatchRule" + "id": "UrlDispatchRule", + "description": "Rules to match an HTTP request and dispatch that request to a service.", + "type": "object" }, "ListVersionsResponse": { - "description": "Response message for Versions.ListVersions.", "type": "object", "properties": { "versions": { @@ -2809,7 +2527,8 @@ "type": "string" } }, - "id": "ListVersionsResponse" + "id": "ListVersionsResponse", + "description": "Response message for Versions.ListVersions." }, "ListAuthorizedDomainsResponse": { "description": "Response message for AuthorizedDomains.ListAuthorizedDomains.", @@ -2820,22 +2539,40 @@ "type": "string" }, "domains": { - "description": "The authorized domains belonging to the user.", "items": { "$ref": "AuthorizedDomain" }, - "type": "array" + "type": "array", + "description": "The authorized domains belonging to the user." } }, "id": "ListAuthorizedDomainsResponse" }, + "ApiEndpointHandler": { + "properties": { + "scriptPath": { + "description": "Path to the script from the application root directory.", + "type": "string" + } + }, + "id": "ApiEndpointHandler", + "description": "Uses Google Cloud Endpoints to handle requests.", + "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 {}.", + "type": "object", + "properties": {}, + "id": "Empty" + }, "DomainMapping": { + "id": "DomainMapping", "description": "A domain serving an App Engine application.", "type": "object", "properties": { "sslSettings": { - "description": "SSL configuration for this domain. If unconfigured, this domain will not serve with SSL.", - "$ref": "SslSettings" + "$ref": "SslSettings", + "description": "SSL configuration for this domain. If unconfigured, this domain will not serve with SSL." }, "name": { "description": "Full path to the DomainMapping resource in the API. Example: apps/myapp/domainMapping/example.com.@OutputOnly", @@ -2852,30 +2589,51 @@ "description": "Relative name of the domain serving the application. Example: example.com.", "type": "string" } - }, - "id": "DomainMapping" + } }, - "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 {}.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "ApiEndpointHandler": { - "description": "Uses Google Cloud Endpoints to handle requests.", + "ZipInfo": { "type": "object", "properties": { - "scriptPath": { - "description": "Path to the script from the application root directory.", + "filesCount": { + "type": "integer", + "format": "int32", + "description": "An estimate of the number of files in a zip for a zip deployment. If set, must be greater than or equal to the actual number of files. Used for optimizing performance; if not provided, deployment may be slow." + }, + "sourceUrl": { + "description": "URL of the zip file to deploy from. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", "type": "string" } }, - "id": "ApiEndpointHandler" + "id": "ZipInfo", + "description": "The zip file information for a zip deployment." }, "AutomaticScaling": { "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", "type": "object", "properties": { + "minPendingLatency": { + "format": "google-duration", + "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", + "type": "string" + }, + "maxIdleInstances": { + "format": "int32", + "description": "Maximum number of idle instances that should be maintained for this version.", + "type": "integer" + }, + "requestUtilization": { + "$ref": "RequestUtilization", + "description": "Target scaling by request utilization." + }, + "standardSchedulerSettings": { + "$ref": "StandardSchedulerSettings", + "description": "Scheduler settings for standard environment." + }, + "minIdleInstances": { + "format": "int32", + "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service.", + "type": "integer" + }, "maxTotalInstances": { "format": "int32", "description": "Maximum number of instances that should be started to handle requests.", @@ -2906,59 +2664,44 @@ "type": "string" }, "cpuUtilization": { - "description": "Target scaling by CPU usage.", - "$ref": "CpuUtilization" + "$ref": "CpuUtilization", + "description": "Target scaling by CPU usage." }, "diskUtilization": { - "$ref": "DiskUtilization", - "description": "Target scaling by disk usage." - }, - "minPendingLatency": { - "format": "google-duration", - "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", - "type": "string" - }, - "requestUtilization": { - "description": "Target scaling by request utilization.", - "$ref": "RequestUtilization" - }, - "maxIdleInstances": { - "format": "int32", - "description": "Maximum number of idle instances that should be maintained for this version.", - "type": "integer" - }, - "standardSchedulerSettings": { - "$ref": "StandardSchedulerSettings", - "description": "Scheduler settings for standard environment." - }, - "minIdleInstances": { - "format": "int32", - "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service.", - "type": "integer" + "description": "Target scaling by disk usage.", + "$ref": "DiskUtilization" } }, "id": "AutomaticScaling" }, - "ZipInfo": { - "description": "The zip file information for a zip deployment.", - "type": "object", - "properties": { - "sourceUrl": { - "description": "URL of the zip file to deploy from. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", - "type": "string" - }, - "filesCount": { - "format": "int32", - "description": "An estimate of the number of files in a zip for a zip deployment. If set, must be greater than or equal to the actual number of files. Used for optimizing performance; if not provided, deployment may be slow.", - "type": "integer" - } - }, - "id": "ZipInfo" - }, "AuthorizedCertificate": { "description": "An SSL certificate that a user has been authorized to administer. A user is authorized to administer any certificate that applies to one of their authorized domains.", "type": "object", "properties": { + "displayName": { + "description": "The user-specified display name of the certificate. This is not guaranteed to be unique. Example: My Certificate.", + "type": "string" + }, + "managedCertificate": { + "$ref": "ManagedCertificate", + "description": "Only applicable if this certificate is managed by App Engine. Managed certificates are tied to the lifecycle of a DomainMapping and cannot be updated or deleted via the AuthorizedCertificates API. If this certificate is manually administered by the user, this field will be empty.@OutputOnly" + }, + "certificateRawData": { + "$ref": "CertificateRawData", + "description": "The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority." + }, + "visibleDomainMappings": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The full paths to user visible Domain Mapping resources that have this certificate mapped. Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped domain mappings if the user does not have VIEWER permissions on all of the applications that have this certificate mapped. See domain_mappings_count for a complete count.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly" + }, + "expireTime": { + "format": "google-datetime", + "description": "The time when this certificate expires. To update the renewal time on this certificate, upload an SSL certificate with a different expiration time using AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly", + "type": "string" + }, "name": { "description": "Full path to the AuthorizedCertificate resource in the API. Example: apps/myapp/authorizedCertificates/12345.@OutputOnly", "type": "string" @@ -2978,32 +2721,28 @@ "id": { "description": "Relative name of the certificate. This is a unique value autogenerated on AuthorizedCertificate resource creation. Example: 12345.@OutputOnly", "type": "string" - }, - "displayName": { - "description": "The user-specified display name of the certificate. This is not guaranteed to be unique. Example: My Certificate.", - "type": "string" - }, - "certificateRawData": { - "description": "The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority.", - "$ref": "CertificateRawData" - }, - "visibleDomainMappings": { - "description": "The full paths to user visible Domain Mapping resources that have this certificate mapped. Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped domain mappings if the user does not have VIEWER permissions on all of the applications that have this certificate mapped. See domain_mappings_count for a complete count.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "expireTime": { - "format": "google-datetime", - "description": "The time when this certificate expires. To update the renewal time on this certificate, upload an SSL certificate with a different expiration time using AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly", - "type": "string" } }, "id": "AuthorizedCertificate" }, "ResourceRecord": { + "description": "A DNS resource record.", + "type": "object", "properties": { + "type": { + "enum": [ + "A", + "AAAA", + "CNAME" + ], + "description": "Resource record type. Example: AAAA.", + "type": "string", + "enumDescriptions": [ + "An A resource record. Data is an IPv4 address.", + "An AAAA resource record. Data is an IPv6 address.", + "A CNAME resource record. Data is a domain name to be aliased." + ] + }, "rrdata": { "description": "Data for this record. Values vary by record type, as defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).", "type": "string" @@ -3011,55 +2750,39 @@ "name": { "description": "Relative name of the object affected by this record. Only applicable for CNAME records. Example: 'www'.", "type": "string" - }, - "type": { - "enumDescriptions": [ - "An A resource record. Data is an IPv4 address.", - "An AAAA resource record. Data is an IPv6 address.", - "A CNAME resource record. Data is a domain name to be aliased." - ], - "enum": [ - "A", - "AAAA", - "CNAME" - ], - "description": "Resource record type. Example: AAAA.", - "type": "string" } }, - "id": "ResourceRecord", - "description": "A DNS resource record.", - "type": "object" + "id": "ResourceRecord" }, "Library": { + "description": "Third-party Python runtime library that is required by the application.", + "type": "object", "properties": { "name": { "description": "Name of the library. Example: \"django\".", "type": "string" }, "version": { - "description": "Version of the library to select, or \"latest\".", - "type": "string" + "type": "string", + "description": "Version of the library to select, or \"latest\"." } }, - "id": "Library", - "description": "Third-party Python runtime library that is required by the application.", - "type": "object" + "id": "Library" }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "type": "object", "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, "locations": { "description": "A list of locations that matches the specified filter in the request.", "items": { "$ref": "Location" }, "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" } }, "id": "ListLocationsResponse" @@ -3092,25 +2815,42 @@ }, "id": "RequestUtilization" }, - "EndpointsApiService": { - "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", - "type": "object", - "properties": { - "configId": { - "description": "Endpoints service configuration id as specified by the Service Management API. For example \"2016-09-19r1\"", - "type": "string" - }, - "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" - } - }, - "id": "EndpointsApiService" - }, "UrlMap": { "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", "type": "object", "properties": { + "securityLevel": { + "enum": [ + "SECURE_UNSPECIFIED", + "SECURE_DEFAULT", + "SECURE_NEVER", + "SECURE_OPTIONAL", + "SECURE_ALWAYS" + ], + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string", + "enumDescriptions": [ + "Not specified.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", + "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." + ] + }, + "authFailAction": { + "type": "string", + "enumDescriptions": [ + "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", + "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", + "Rejects request with a 401 HTTP status code and an error message." + ], + "enum": [ + "AUTH_FAIL_ACTION_UNSPECIFIED", + "AUTH_FAIL_ACTION_REDIRECT", + "AUTH_FAIL_ACTION_UNAUTHORIZED" + ], + "description": "Action to take when users access resources that require authentication. Defaults to redirect." + }, "script": { "description": "Executes a script to handle the request that matches this URL pattern.", "$ref": "ScriptHandler" @@ -3140,17 +2880,10 @@ "description": "Uses API Endpoints to handle requests." }, "staticFiles": { - "description": "Returns the contents of a file, such as an image, as the response.", - "$ref": "StaticFilesHandler" + "$ref": "StaticFilesHandler", + "description": "Returns the contents of a file, such as an image, as the response." }, "redirectHttpResponseCode": { - "enumDescriptions": [ - "Not specified. 302 is assumed.", - "301 Moved Permanently code.", - "302 Moved Temporarily code.", - "303 See Other code.", - "307 Temporary Redirect code." - ], "enum": [ "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", "REDIRECT_HTTP_RESPONSE_CODE_301", @@ -3159,47 +2892,86 @@ "REDIRECT_HTTP_RESPONSE_CODE_307" ], "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", - "type": "string" - }, - "securityLevel": { - "enum": [ - "SECURE_UNSPECIFIED", - "SECURE_DEFAULT", - "SECURE_NEVER", - "SECURE_OPTIONAL", - "SECURE_ALWAYS" - ], - "description": "Security (HTTPS) enforcement for this URL.", "type": "string", "enumDescriptions": [ - "Not specified.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", - "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", - "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." + "Not specified. 302 is assumed.", + "301 Moved Permanently code.", + "302 Moved Temporarily code.", + "303 See Other code.", + "307 Temporary Redirect code." ] + } + }, + "id": "UrlMap" + }, + "EndpointsApiService": { + "properties": { + "configId": { + "description": "Endpoints service configuration id as specified by the Service Management API. For example \"2016-09-19r1\"", + "type": "string" }, + "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" + } + }, + "id": "EndpointsApiService", + "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", + "type": "object" + }, + "Operation": { + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object", + "properties": { + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + } + } + }, + "ApiConfigHandler": { + "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", + "type": "object", + "properties": { "authFailAction": { + "enumDescriptions": [ + "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", + "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", + "Rejects request with a 401 HTTP status code and an error message." + ], "enum": [ "AUTH_FAIL_ACTION_UNSPECIFIED", "AUTH_FAIL_ACTION_REDIRECT", "AUTH_FAIL_ACTION_UNAUTHORIZED" ], "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "type": "string", - "enumDescriptions": [ - "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", - "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", - "Rejects request with a 401 HTTP status code and an error message." - ] - } - }, - "id": "UrlMap" - }, - "ApiConfigHandler": { - "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", - "type": "object", - "properties": { + "type": "string" + }, "script": { "description": "Path to the script from the application root directory.", "type": "string" @@ -3225,8 +2997,6 @@ "type": "string" }, "securityLevel": { - "description": "Security (HTTPS) enforcement for this URL.", - "type": "string", "enumDescriptions": [ "Not specified.", "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", @@ -3240,62 +3010,26 @@ "SECURE_NEVER", "SECURE_OPTIONAL", "SECURE_ALWAYS" - ] - }, - "authFailAction": { - "enumDescriptions": [ - "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", - "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", - "Rejects request with a 401 HTTP status code and an error message." ], - "enum": [ - "AUTH_FAIL_ACTION_UNSPECIFIED", - "AUTH_FAIL_ACTION_REDIRECT", - "AUTH_FAIL_ACTION_UNAUTHORIZED" - ], - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "description": "Security (HTTPS) enforcement for this URL.", "type": "string" } }, "id": "ApiConfigHandler" }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a network API call.", - "type": "object", - "properties": { - "done": { - "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", - "type": "boolean" - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", - "type": "string" - }, - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object" - } - }, - "id": "Operation" - }, "StaticFilesHandler": { "properties": { + "httpHeaders": { + "additionalProperties": { + "type": "string" + }, + "description": "HTTP headers to use for all responses from these URLs.", + "type": "object" + }, + "applicationReadable": { + "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", + "type": "boolean" + }, "uploadPathRegex": { "description": "Regular expression that matches the file paths for all files that should be referenced by this handler.", "type": "string" @@ -3305,8 +3039,8 @@ "type": "string" }, "mimeType": { - "description": "MIME type used to serve all files served by this handler.Defaults to file-specific MIME types, which are derived from each file's filename extension.", - "type": "string" + "type": "string", + "description": "MIME type used to serve all files served by this handler.Defaults to file-specific MIME types, which are derived from each file's filename extension." }, "requireMatchingFile": { "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", @@ -3316,17 +3050,6 @@ "format": "google-duration", "description": "Time a static file served by this handler should be cached by web proxies and browsers.", "type": "string" - }, - "applicationReadable": { - "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", - "type": "boolean" - }, - "httpHeaders": { - "additionalProperties": { - "type": "string" - }, - "description": "HTTP headers to use for all responses from these URLs.", - "type": "object" } }, "id": "StaticFilesHandler", @@ -3334,6 +3057,8 @@ "type": "object" }, "BasicScaling": { + "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", + "type": "object", "properties": { "maxInstances": { "format": "int32", @@ -3346,12 +3071,22 @@ "type": "string" } }, - "id": "BasicScaling", - "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", - "type": "object" + "id": "BasicScaling" }, "DiskUtilization": { + "description": "Target scaling by disk usage. Only applicable for VM runtimes.", + "type": "object", "properties": { + "targetWriteOpsPerSecond": { + "format": "int32", + "description": "Target ops written per second.", + "type": "integer" + }, + "targetWriteBytesPerSecond": { + "type": "integer", + "format": "int32", + "description": "Target bytes written per second." + }, "targetReadOpsPerSecond": { "format": "int32", "description": "Target ops read per seconds.", @@ -3361,35 +3096,23 @@ "format": "int32", "description": "Target bytes read per second.", "type": "integer" - }, - "targetWriteOpsPerSecond": { - "format": "int32", - "description": "Target ops written per second.", - "type": "integer" - }, - "targetWriteBytesPerSecond": { - "format": "int32", - "description": "Target bytes written per second.", - "type": "integer" } }, - "id": "DiskUtilization", - "description": "Target scaling by disk usage. Only applicable for VM runtimes.", - "type": "object" + "id": "DiskUtilization" }, "CpuUtilization": { "description": "Target scaling by CPU usage.", "type": "object", "properties": { - "aggregationWindowLength": { - "format": "google-duration", - "description": "Period of time over which CPU utilization is calculated.", - "type": "string" - }, "targetUtilization": { "format": "double", "description": "Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1.", "type": "number" + }, + "aggregationWindowLength": { + "format": "google-duration", + "description": "Period of time over which CPU utilization is calculated.", + "type": "string" } }, "id": "CpuUtilization" @@ -3398,6 +3121,15 @@ "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.", "type": "object", "properties": { + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "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" + }, "details": { "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", "items": { @@ -3408,48 +3140,39 @@ "type": "object" }, "type": "array" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "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" } }, "id": "Status" }, "IdentityAwareProxy": { + "description": "Identity-Aware Proxy", + "type": "object", "properties": { - "oauth2ClientSecret": { - "description": "OAuth2 client secret to use for the authentication flow.For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly", - "type": "string" - }, "oauth2ClientId": { "description": "OAuth2 client ID to use for the authentication flow.", "type": "string" }, "oauth2ClientSecretSha256": { - "description": "Hex-encoded SHA-256 hash of the client secret.@OutputOnly", - "type": "string" + "type": "string", + "description": "Hex-encoded SHA-256 hash of the client secret.@OutputOnly" }, "enabled": { "description": "Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty.", "type": "boolean" + }, + "oauth2ClientSecret": { + "description": "OAuth2 client secret to use for the authentication flow.For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly", + "type": "string" } }, - "id": "IdentityAwareProxy", - "description": "Identity-Aware Proxy", - "type": "object" + "id": "IdentityAwareProxy" }, "ManualScaling": { "properties": { "instances": { + "type": "integer", "format": "int32", - "description": "Number of instances to assign to the service at the start. This number can later be altered by using the Modules API (https://cloud.google.com/appengine/docs/python/modules/functions) set_num_instances() function.", - "type": "integer" + "description": "Number of instances to assign to the service at the start. This number can later be altered by using the Modules API (https://cloud.google.com/appengine/docs/python/modules/functions) set_num_instances() function." } }, "id": "ManualScaling", @@ -3457,25 +3180,358 @@ "type": "object" }, "LocationMetadata": { - "description": "Metadata for the given google.cloud.location.Location.", "type": "object", "properties": { - "standardEnvironmentAvailable": { - "description": "App Engine Standard Environment is available in the given location.@OutputOnly", - "type": "boolean" - }, "flexibleEnvironmentAvailable": { - "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", + "type": "boolean", + "description": "App Engine Flexible Environment is available in the given location.@OutputOnly" + }, + "standardEnvironmentAvailable": { + "type": "boolean", + "description": "App Engine Standard Environment is available in the given location.@OutputOnly" + } + }, + "id": "LocationMetadata", + "description": "Metadata for the given google.cloud.location.Location." + }, + "Service": { + "id": "Service", + "description": "A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle tasks such as backend data analysis or API requests from mobile devices. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.", + "type": "object", + "properties": { + "id": { + "description": "Relative name of the service within the application. Example: default.@OutputOnly", + "type": "string" + }, + "name": { + "description": "Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "split": { + "$ref": "TrafficSplit", + "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the service." + } + } + }, + "ListOperationsResponse": { + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations.", + "type": "object" + }, + "OperationMetadata": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Timestamp that this operation completed.@OutputOnly", + "type": "string" + }, + "operationType": { + "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", + "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Timestamp that this operation was created.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadata" + }, + "FirewallRule": { + "description": "A single firewall rule that is evaluated against incoming traffic and provides an action to take on matched requests.", + "type": "object", + "properties": { + "sourceRange": { + "description": "IP address or range, defined using CIDR notation, of requests that this rule applies to. You can use the wildcard character \"*\" to match all IPs equivalent to \"0/0\" and \"::/0\" together. Examples: 192.168.1.1 or 192.168.0.0/16 or 2001:db8::/32 or 2001:0db8:0000:0042:0000:8a2e:0370:7334.\u003cp\u003eTruncation will be silently performed on addresses which are not properly truncated. For example, 1.2.3.4/24 is accepted as the same address as 1.2.3.0/24. Similarly, for IPv6, 2001:db8::1/32 is accepted as the same address as 2001:db8::/32.", + "type": "string" + }, + "priority": { + "format": "int32", + "description": "A positive integer between 1, Int32.MaxValue-1 that defines the order of rule evaluation. Rules with the lowest priority are evaluated first.A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic when no previous rule matches. Only the action of this rule can be modified by the user.", + "type": "integer" + }, + "action": { + "type": "string", + "enumDescriptions": [ + "", + "Matching requests are allowed.", + "Matching requests are denied." + ], + "enum": [ + "UNSPECIFIED_ACTION", + "ALLOW", + "DENY" + ], + "description": "The action to take on matched requests." + }, + "description": { + "description": "An optional string description of this rule. This field has a maximum length of 100 characters.", + "type": "string" + } + }, + "id": "FirewallRule" + }, + "ListAuthorizedCertificatesResponse": { + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "certificates": { + "description": "The SSL certificates the user is authorized to administer.", + "items": { + "$ref": "AuthorizedCertificate" + }, + "type": "array" + } + }, + "id": "ListAuthorizedCertificatesResponse", + "description": "Response message for AuthorizedCertificates.ListAuthorizedCertificates.", + "type": "object" + }, + "FeatureSettings": { + "description": "The feature specific settings to be used in the application. These define behaviors that are user configurable.", + "type": "object", + "properties": { + "splitHealthChecks": { + "description": "Boolean value indicating if split health checks should be used instead of the legacy health checks. At an app.yaml level, this means defaulting to 'readiness_check' and 'liveness_check' values instead of 'health_check' ones. Once the legacy 'health_check' behavior is deprecated, and this value is always true, this setting can be removed.", "type": "boolean" } }, - "id": "LocationMetadata" + "id": "FeatureSettings" + }, + "ErrorHandler": { + "properties": { + "mimeType": { + "description": "MIME type of file. Defaults to text/html.", + "type": "string" + }, + "errorCode": { + "enumDescriptions": [ + "Not specified. ERROR_CODE_DEFAULT is assumed.", + "All other error types.", + "Application has exceeded a resource quota.", + "Client blocked by the application's Denial of Service protection configuration.", + "Deadline reached before the application responds." + ], + "enum": [ + "ERROR_CODE_UNSPECIFIED", + "ERROR_CODE_DEFAULT", + "ERROR_CODE_OVER_QUOTA", + "ERROR_CODE_DOS_API_DENIAL", + "ERROR_CODE_TIMEOUT" + ], + "description": "Error condition this handler applies to.", + "type": "string" + }, + "staticFile": { + "type": "string", + "description": "Static file content to be served for this error." + } + }, + "id": "ErrorHandler", + "description": "Custom static error page to be served when an error occurs.", + "type": "object" + }, + "SslSettings": { + "id": "SslSettings", + "description": "SSL configuration for a DomainMapping resource.", + "type": "object", + "properties": { + "pendingManagedCertificateId": { + "description": "ID of the managed AuthorizedCertificate resource currently being provisioned, if applicable. Until the new managed certificate has been successfully provisioned, the previous SSL state will be preserved. Once the provisioning process completes, the certificate_id field will reflect the new managed certificate and this field will be left empty. To remove SSL support while there is still a pending managed certificate, clear the certificate_id field with an UpdateDomainMappingRequest.@OutputOnly", + "type": "string" + }, + "sslManagementType": { + "enumDescriptions": [ + "SSL support for this domain is configured automatically. The mapped SSL certificate will be automatically renewed.", + "SSL support for this domain is configured manually by the user. Either the domain has no SSL support or a user-obtained SSL certificate has been explictly mapped to this domain." + ], + "enum": [ + "AUTOMATIC", + "MANUAL" + ], + "description": "SSL management type for this domain. If AUTOMATIC, a managed certificate is automatically provisioned. If MANUAL, certificate_id must be manually specified in order to configure SSL for this domain.", + "type": "string" + }, + "certificateId": { + "description": "ID of the AuthorizedCertificate resource configuring SSL for the application. Clearing this field will remove SSL support.By default, a managed certificate is automatically created for every domain mapping. To omit SSL support or to configure SSL manually, specify SslManagementType.MANUAL on a CREATE or UPDATE request. You must be authorized to administer the AuthorizedCertificate resource to manually map it to a DomainMapping resource. Example: 12345.", + "type": "string" + } + } + }, + "OperationMetadataV1": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + }, + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataV1" + }, + "Application": { + "description": "An Application resource contains the top-level configuration of an App Engine application. Next tag: 20", + "type": "object", + "properties": { + "codeBucket": { + "type": "string", + "description": "Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly" + }, + "defaultBucket": { + "type": "string", + "description": "Google Cloud Storage bucket that can be used by this application to store content.@OutputOnly" + }, + "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.@OutputOnly", + "items": { + "$ref": "UrlDispatchRule" + }, + "type": "array" + }, + "gcrDomain": { + "description": "The Google Container Registry domain used for storing managed build docker images for this application.", + "type": "string" + }, + "name": { + "description": "Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly", + "type": "string" + }, + "id": { + "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp.", + "type": "string" + }, + "defaultCookieExpiration": { + "format": "google-duration", + "description": "Cookie expiration policy for this application.", + "type": "string" + }, + "locationId": { + "description": "Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US", + "type": "string" + }, + "servingStatus": { + "enum": [ + "UNSPECIFIED", + "SERVING", + "USER_DISABLED", + "SYSTEM_DISABLED" + ], + "description": "Serving status of this application.", + "type": "string", + "enumDescriptions": [ + "Serving status is unspecified.", + "Application is serving.", + "Application has been disabled by the user.", + "Application has been disabled by the system." + ] + }, + "defaultHostname": { + "description": "Hostname used to reach this application, as resolved by App Engine.@OutputOnly", + "type": "string" + }, + "featureSettings": { + "description": "The feature specific settings to be used in the application.", + "$ref": "FeatureSettings" + }, + "authDomain": { + "type": "string", + "description": "Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account." + }, + "iap": { + "$ref": "IdentityAwareProxy" + } + }, + "id": "Application" + }, + "Network": { + "description": "Extra network settings. Only applicable for App Engine flexible environment versions", + "type": "object", + "properties": { + "subnetworkName": { + "description": "Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network.\nIf the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range.\nIf the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network.\nIf the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the App Engine flexible environment application.", + "type": "string" + }, + "instanceTag": { + "description": "Tag to apply to the VM instance during creation. Only applicable for for App Engine flexible environment versions.", + "type": "string" + }, + "forwardedPorts": { + "description": "List of ports, or port pairs, to forward from the virtual machine to the application container. Only applicable for App Engine flexible environment versions.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Google Compute Engine network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default.", + "type": "string" + } + }, + "id": "Network" } }, "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, "version": "v1beta", "baseUrl": "https://appengine.googleapis.com/", @@ -3494,15 +3550,9 @@ } } }, - "kind": "discovery#restDescription", - "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", "servicePath": "", + "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", + "kind": "discovery#restDescription", "rootUrl": "https://appengine.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "appengine", - "batchPath": "batch", - "revision": "20170724", - "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", - "id": "appengine:v1beta" + "basePath": "" } diff --git a/vendor/google.golang.org/api/appengine/v1beta/appengine-gen.go b/vendor/google.golang.org/api/appengine/v1beta/appengine-gen.go index 3650a22de..544dceb62 100644 --- a/vendor/google.golang.org/api/appengine/v1beta/appengine-gen.go +++ b/vendor/google.golang.org/api/appengine/v1beta/appengine-gen.go @@ -449,6 +449,13 @@ type AuthorizedCertificate struct { // 12345.@OutputOnly Id string `json:"id,omitempty"` + // ManagedCertificate: Only applicable if this certificate is managed by + // App Engine. Managed certificates are tied to the lifecycle of a + // DomainMapping and cannot be updated or deleted via the + // AuthorizedCertificates API. If this certificate is manually + // administered by the user, this field will be empty.@OutputOnly + ManagedCertificate *ManagedCertificate `json:"managedCertificate,omitempty"` + // Name: Full path to the AuthorizedCertificate resource in the API. // Example: apps/myapp/authorizedCertificates/12345.@OutputOnly Name string `json:"name,omitempty"` @@ -1962,6 +1969,56 @@ func (s *LocationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ManagedCertificate: A certificate managed by App Engine. +type ManagedCertificate struct { + // LastRenewalTime: Time at which the certificate was last renewed. The + // renewal process is fully managed. Certificate renewal will + // automatically occur before the certificate expires. Renewal errors + // can be tracked via ManagementStatus.@OutputOnly + LastRenewalTime string `json:"lastRenewalTime,omitempty"` + + // Status: Status of certificate management. Refers to the most recent + // certificate acquisition or renewal attempt.@OutputOnly + // + // Possible values: + // "MANAGEMENT_STATUS_UNSPECIFIED" + // "OK" - Certificate was successfully obtained and inserted into the + // serving system. + // "PENDING" - Certificate is under active attempts to acquire or + // renew. + // "FAILED_RETRYING_NOT_VISIBLE" - Most recent renewal failed due to + // an invalid DNS setup and will be retried. Renewal attempts will + // continue to fail until the certificate domain's DNS configuration is + // fixed. The last successfully provisioned certificate may still be + // serving. + // "FAILED_PERMANENT" - All renewal attempts have been exhausted, + // likely due to an invalid DNS setup. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LastRenewalTime") 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. "LastRenewalTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ManagedCertificate) MarshalJSON() ([]byte, error) { + type noMethod ManagedCertificate + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ManualScaling: A service with manual scaling runs continuously, // allowing you to perform complex initialization and rely on the state // of its memory over time. @@ -1995,16 +2052,19 @@ func (s *ManualScaling) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Network: Extra network settings. Only applicable for VM runtimes. +// Network: Extra network settings. Only applicable for App Engine +// flexible environment versions type Network struct { // ForwardedPorts: List of ports, or port pairs, to forward from the - // virtual machine to the application container. + // virtual machine to the application container. Only applicable for App + // Engine flexible environment versions. ForwardedPorts []string `json:"forwardedPorts,omitempty"` - // InstanceTag: Tag to apply to the VM instance during creation. + // InstanceTag: Tag to apply to the VM instance during creation. Only + // applicable for for App Engine flexible environment versions. InstanceTag string `json:"instanceTag,omitempty"` - // Name: Google Cloud Platform network where the virtual machines are + // Name: Google Compute Engine network where the virtual machines are // created. Specify the short name, not the resource path.Defaults to // default. Name string `json:"name,omitempty"` @@ -2022,8 +2082,8 @@ type Network struct { // If the network the VM instance is being created in is a custom Subnet // Mode Network, then the subnetwork_name must be specified and the IP // address is created from the IPCidrRange of the subnetwork.If - // specified, the subnetwork must exist in the same region as the Flex - // app. + // specified, the subnetwork must exist in the same region as the App + // Engine flexible environment application. SubnetworkName string `json:"subnetworkName,omitempty"` // ForceSendFields is a list of field names (e.g. "ForwardedPorts") to @@ -2706,10 +2766,39 @@ func (s *Service) MarshalJSON() ([]byte, error) { // SslSettings: SSL configuration for a DomainMapping resource. type SslSettings struct { // CertificateId: ID of the AuthorizedCertificate resource configuring - // SSL for the application. Clearing this field will remove SSL support. - // Example: 12345. + // SSL for the application. Clearing this field will remove SSL + // support.By default, a managed certificate is automatically created + // for every domain mapping. To omit SSL support or to configure SSL + // manually, specify SslManagementType.MANUAL on a CREATE or UPDATE + // request. You must be authorized to administer the + // AuthorizedCertificate resource to manually map it to a DomainMapping + // resource. Example: 12345. CertificateId string `json:"certificateId,omitempty"` + // PendingManagedCertificateId: ID of the managed AuthorizedCertificate + // resource currently being provisioned, if applicable. Until the new + // managed certificate has been successfully provisioned, the previous + // SSL state will be preserved. Once the provisioning process completes, + // the certificate_id field will reflect the new managed certificate and + // this field will be left empty. To remove SSL support while there is + // still a pending managed certificate, clear the certificate_id field + // with an UpdateDomainMappingRequest.@OutputOnly + PendingManagedCertificateId string `json:"pendingManagedCertificateId,omitempty"` + + // SslManagementType: SSL management type for this domain. If AUTOMATIC, + // a managed certificate is automatically provisioned. If MANUAL, + // certificate_id must be manually specified in order to configure SSL + // for this domain. + // + // Possible values: + // "AUTOMATIC" - SSL support for this domain is configured + // automatically. The mapped SSL certificate will be automatically + // renewed. + // "MANUAL" - SSL support for this domain is configured manually by + // the user. Either the domain has no SSL support or a user-obtained SSL + // certificate has been explictly mapped to this domain. + SslManagementType string `json:"sslManagementType,omitempty"` + // ForceSendFields is a list of field names (e.g. "CertificateId") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -3257,7 +3346,8 @@ type Version struct { // apps/myapp/services/default/versions/v1.@OutputOnly Name string `json:"name,omitempty"` - // Network: Extra network settings. Only applicable for VM runtimes. + // Network: Extra network settings. Only applicable for App Engine + // flexible environment versions. Network *Network `json:"network,omitempty"` // NobuildFilesRegex: Files that match this pattern will not be built @@ -8737,6 +8827,27 @@ type AppsServicesVersionsPatchCall struct { // ta/apps.services.versions#Version.FIELDS.automatic_scaling): For // Version resources that use automatic scaling and run in the App // Engine standard environment. +// automatic_scaling.min_total_instances +// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be +// ta/apps.services.versions#Version.FIELDS.automatic_scaling): For +// Version resources that use automatic scaling and run in the App +// Engine Flexible environment. +// automatic_scaling.max_total_instances +// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be +// ta/apps.services.versions#Version.FIELDS.automatic_scaling): For +// Version resources that use automatic scaling and run in the App +// Engine Flexible environment. +// automatic_scaling.cool_down_period_sec +// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be +// ta/apps.services.versions#Version.FIELDS.automatic_scaling): For +// Version resources that use automatic scaling and run in the App +// Engine Flexible +// environment. +// automatic_scaling.cpu_utilization.target_utilization +// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be +// ta/apps.services.versions#Version.FIELDS.automatic_scaling): For +// Version resources that use automatic scaling and run in the App +// Engine Flexible environment. func (r *AppsServicesVersionsService) Patch(appsId string, servicesId string, versionsId string, version *Version) *AppsServicesVersionsPatchCall { c := &AppsServicesVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.appsId = appsId @@ -8841,7 +8952,7 @@ func (c *AppsServicesVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.", + // "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.", // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", // "httpMethod": "PATCH", // "id": "appengine.apps.services.versions.patch", diff --git a/vendor/google.golang.org/api/appengine/v1beta4/appengine-api.json b/vendor/google.golang.org/api/appengine/v1beta4/appengine-api.json index 1d9f4a823..15d4f68de 100644 --- a/vendor/google.golang.org/api/appengine/v1beta4/appengine-api.json +++ b/vendor/google.golang.org/api/appengine/v1beta4/appengine-api.json @@ -1,35 +1,98 @@ { - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/appengine.admin": { - "description": "View and manage your applications deployed on Google App Engine" - } - } - } - }, - "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", - "kind": "discovery#restDescription", - "servicePath": "", - "rootUrl": "https://appengine.googleapis.com/", "basePath": "", "ownerDomain": "google.com", "name": "appengine", "batchPath": "batch", "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", "id": "appengine:v1beta4", - "revision": "20170724", + "revision": "20170901", "title": "Google App Engine Admin API", "ownerName": "Google", "discoveryVersion": "v1", "resources": { "apps": { + "methods": { + "create": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1beta4/apps", + "id": "appengine.apps.create", + "path": "v1beta4/apps", + "request": { + "$ref": "Application" + }, + "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/)." + }, + "patch": { + "httpMethod": "PATCH", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", + "type": "string", + "required": true, + "location": "path" + }, + "mask": { + "location": "query", + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta4/apps/{appsId}", + "path": "v1beta4/apps/{appsId}", + "id": "appengine.apps.patch", + "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.auth_domain)\ndefault_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration)", + "request": { + "$ref": "Application" + } + }, + "get": { + "flatPath": "v1beta4/apps/{appsId}", + "id": "appengine.apps.get", + "path": "v1beta4/apps/{appsId}", + "description": "Gets information about an application.", + "response": { + "$ref": "Application" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "parameters": { + "ensureResourcesExist": { + "location": "query", + "description": "Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the GET operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete.", + "type": "boolean" + }, + "appsId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `name`. Name of the application to get. Example: apps/myapp." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "modules": { "methods": { @@ -50,21 +113,21 @@ "location": "path" }, "migrateTraffic": { - "location": "query", "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/v1beta4/apps.modules.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules#shardby) field in the Module 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).", - "type": "boolean" + "type": "boolean", + "location": "query" }, "mask": { + "type": "string", "location": "query", "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", - "type": "string" + "description": "Standard field mask for the set of fields to be updated." }, "modulesId": { - "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "Part of `name`. See documentation of `appsId`." } }, "scopes": [ @@ -79,14 +142,13 @@ } }, "list": { - "description": "Lists all the modules in the application.", - "response": { - "$ref": "ListModulesResponse" - }, + "httpMethod": "GET", "parameterOrder": [ "appsId" ], - "httpMethod": "GET", + "response": { + "$ref": "ListModulesResponse" + }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", @@ -99,10 +161,10 @@ "type": "string" }, "appsId": { + "location": "path", "description": "Part of `name`. Name of the resource requested. Example: apps/myapp.", "type": "string", - "required": true, - "location": "path" + "required": true }, "pageSize": { "location": "query", @@ -112,10 +174,13 @@ } }, "flatPath": "v1beta4/apps/{appsId}/modules", + "path": "v1beta4/apps/{appsId}/modules", "id": "appengine.apps.modules.list", - "path": "v1beta4/apps/{appsId}/modules" + "description": "Lists all the modules in the application." }, "get": { + "id": "appengine.apps.modules.get", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}", "description": "Gets the current configuration of the specified module.", "response": { "$ref": "Module" @@ -126,17 +191,17 @@ ], "httpMethod": "GET", "parameters": { + "modulesId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `name`. See documentation of `appsId`." + }, "appsId": { + "location": "path", "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.", "type": "string", - "required": true, - "location": "path" - }, - "modulesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" + "required": true } }, "scopes": [ @@ -144,9 +209,7 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}", - "id": "appengine.apps.modules.get", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}" + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}" }, "delete": { "httpMethod": "DELETE", @@ -168,10 +231,10 @@ "location": "path" }, "modulesId": { + "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true, - "location": "path" + "required": true } }, "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}", @@ -183,23 +246,99 @@ "resources": { "versions": { "methods": { - "patch": { - "httpMethod": "PATCH", + "create": { + "id": "appengine.apps.modules.versions.create", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", + "request": { + "$ref": "Version" + }, + "description": "Deploys code and resource files to a new version.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "modulesId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default.", + "type": "string", + "required": true, + "location": "path" + }, + "modulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions" + }, + "delete": { + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", + "id": "appengine.apps.modules.versions.delete", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", + "description": "Deletes an existing version.", + "response": { + "$ref": "Operation" + }, "parameterOrder": [ "appsId", "modulesId", "versionsId" ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.", + "type": "string", + "required": true + }, + "versionsId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `name`. See documentation of `appsId`." + }, + "modulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + } + }, + "patch": { + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", + "id": "appengine.apps.modules.versions.patch", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", + "request": { + "$ref": "Version" + }, + "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.", "response": { "$ref": "Operation" }, + "parameterOrder": [ + "appsId", + "modulesId", + "versionsId" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { - "appsId": { - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default/versions/1.", - "type": "string", - "required": true, - "location": "path" - }, "mask": { "location": "query", "format": "google-fieldmask", @@ -207,31 +346,26 @@ "type": "string" }, "versionsId": { - "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "Part of `name`. See documentation of `appsId`." }, "modulesId": { + "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true, - "location": "path" + "required": true + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default/versions/1.", + "type": "string", + "required": true } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", - "id": "appengine.apps.modules.versions.patch", - "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.", - "request": { - "$ref": "Version" } }, "list": { - "description": "Lists the versions of a module.", "response": { "$ref": "ListVersionsResponse" }, @@ -252,10 +386,10 @@ "type": "string" }, "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.", "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default." }, "pageSize": { "format": "int32", @@ -281,30 +415,25 @@ }, "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", "id": "appengine.apps.modules.versions.list", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions" + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", + "description": "Lists the versions of a module." }, "get": { - "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.", - "response": { - "$ref": "Version" - }, "httpMethod": "GET", "parameterOrder": [ "appsId", "modulesId", "versionsId" ], - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], + "response": { + "$ref": "Version" + }, "parameters": { "appsId": { + "location": "path", "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.", "type": "string", - "required": true, - "location": "path" + "required": true }, "view": { "location": "query", @@ -322,102 +451,130 @@ "required": true }, "modulesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", - "id": "appengine.apps.modules.versions.get", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}" - }, - "create": { - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", - "id": "appengine.apps.modules.versions.create", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", - "request": { - "$ref": "Version" - }, - "description": "Deploys code and resource files to a new version.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "modulesId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "modulesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default.", - "type": "string", - "required": true - } - } - }, - "delete": { - "description": "Deletes an existing version.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "modulesId", - "versionsId" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.", - "type": "string", - "required": true - }, - "versionsId": { "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true, "location": "path" - }, - "modulesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true } }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", - "id": "appengine.apps.modules.versions.delete", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}" + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", + "id": "appengine.apps.modules.versions.get", + "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource." } }, "resources": { "instances": { "methods": { + "debug": { + "httpMethod": "POST", + "parameterOrder": [ + "appsId", + "modulesId", + "versionsId", + "instancesId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "modulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "instancesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}:debug", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}:debug", + "id": "appengine.apps.modules.versions.instances.debug", + "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.", + "request": { + "$ref": "DebugInstanceRequest" + } + }, + "delete": { + "id": "appengine.apps.modules.versions.instances.delete", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", + "description": "Stops a running instance.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "modulesId", + "versionsId", + "instancesId" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "instancesId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `name`. See documentation of `appsId`." + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true, + "location": "path" + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "modulesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}" + }, "list": { - "httpMethod": "GET", + "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).", + "response": { + "$ref": "ListInstancesResponse" + }, "parameterOrder": [ "appsId", "modulesId", "versionsId" ], - "response": { - "$ref": "ListInstancesResponse" - }, + "httpMethod": "GET", "parameters": { "pageToken": { "description": "Continuation token for fetching the next page of results.", @@ -431,10 +588,10 @@ "location": "path" }, "pageSize": { + "location": "query", "format": "int32", "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" + "type": "integer" }, "versionsId": { "location": "path", @@ -455,25 +612,20 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ], "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances", "id": "appengine.apps.modules.versions.instances.list", - "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)." + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances" }, "get": { - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", - "id": "appengine.apps.modules.versions.instances.get", - "description": "Gets instance information.", "httpMethod": "GET", + "response": { + "$ref": "Instance" + }, "parameterOrder": [ "appsId", "modulesId", "versionsId", "instancesId" ], - "response": { - "$ref": "Instance" - }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", @@ -481,50 +633,17 @@ ], "parameters": { "instancesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true - }, - "versionsId": { "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true, "location": "path" }, - "modulesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", "type": "string", - "required": true - } - } - }, - "debug": { - "request": { - "$ref": "DebugInstanceRequest" - }, - "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.", - "httpMethod": "POST", - "parameterOrder": [ - "appsId", - "modulesId", - "versionsId", - "instancesId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { + "required": true, + "location": "path" + }, "versionsId": { "location": "path", "description": "Part of `name`. See documentation of `appsId`.", @@ -536,68 +655,12 @@ "type": "string", "required": true, "location": "path" - }, - "instancesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true } }, - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}:debug", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}:debug", - "id": "appengine.apps.modules.versions.instances.debug" - }, - "delete": { "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", - "id": "appengine.apps.modules.versions.instances.delete", "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", - "description": "Stops a running instance.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "modulesId", - "versionsId", - "instancesId" - ], - "httpMethod": "DELETE", - "parameters": { - "instancesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true, - "location": "path" - }, - "versionsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "modulesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "id": "appengine.apps.modules.versions.instances.get", + "description": "Gets instance information." } } } @@ -641,14 +704,18 @@ "id": "appengine.apps.operations.get" }, "list": { - "httpMethod": "GET", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [ - "appsId" - ], "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + }, + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, "pageToken": { "description": "The standard list page token.", "type": "string", @@ -659,17 +726,6 @@ "type": "string", "required": true, "location": "path" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - }, - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" } }, "scopes": [ @@ -678,9 +734,16 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ], "flatPath": "v1beta4/apps/{appsId}/operations", - "path": "v1beta4/apps/{appsId}/operations", "id": "appengine.apps.operations.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." + "path": "v1beta4/apps/{appsId}/operations", + "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.", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET" } } }, @@ -688,50 +751,55 @@ "methods": { "get": { "httpMethod": "GET", + "response": { + "$ref": "Location" + }, "parameterOrder": [ "appsId", "locationsId" ], - "response": { - "$ref": "Location" + "parameters": { + "locationsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "description": "Part of `name`. Resource name for the location.", + "type": "string", + "required": true, + "location": "path" + } }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "parameters": { - "locationsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Resource name for the location.", - "type": "string", - "required": true - } - }, "flatPath": "v1beta4/apps/{appsId}/locations/{locationsId}", "path": "v1beta4/apps/{appsId}/locations/{locationsId}", "id": "appengine.apps.locations.get", "description": "Get information about a location." }, "list": { + "httpMethod": "GET", "response": { "$ref": "ListLocationsResponse" }, "parameterOrder": [ "appsId" ], - "httpMethod": "GET", "parameters": { + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, "pageToken": { + "location": "query", "description": "The standard list page token.", - "type": "string", - "location": "query" + "type": "string" }, "appsId": { "location": "path", @@ -744,11 +812,6 @@ "description": "The standard list page size.", "type": "integer", "location": "query" - }, - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" } }, "scopes": [ @@ -757,122 +820,54 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ], "flatPath": "v1beta4/apps/{appsId}/locations", - "id": "appengine.apps.locations.list", "path": "v1beta4/apps/{appsId}/locations", + "id": "appengine.apps.locations.list", "description": "Lists information about the supported locations for this service." } } } - }, - "methods": { - "patch": { - "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.auth_domain)\ndefault_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration)", - "request": { - "$ref": "Application" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "PATCH", - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", - "type": "string", - "required": true - }, - "mask": { - "location": "query", - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta4/apps/{appsId}", - "id": "appengine.apps.patch", - "path": "v1beta4/apps/{appsId}" - }, - "get": { - "description": "Gets information about an application.", - "response": { - "$ref": "Application" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "ensureResourcesExist": { - "description": "Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the GET operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete.", - "type": "boolean", - "location": "query" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the application to get. Example: apps/myapp.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta4/apps/{appsId}", - "id": "appengine.apps.get", - "path": "v1beta4/apps/{appsId}" - }, - "create": { - "request": { - "$ref": "Application" - }, - "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {}, - "flatPath": "v1beta4/apps", - "id": "appengine.apps.create", - "path": "v1beta4/apps" - } } } }, "parameters": { - "upload_protocol": { + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "bearer_token": { + "type": "string", "location": "query", + "description": "OAuth bearer token." + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "upload_protocol": { "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" + "type": "string", + "location": "query" }, "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", "default": "true", - "type": "boolean" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" + "type": "boolean", + "location": "query", + "description": "Returns response with indentations and line breaks." }, "fields": { + "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" }, "$.xgafv": { - "description": "V1 error format.", - "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -881,7 +876,9 @@ "enum": [ "1", "2" - ] + ], + "description": "V1 error format.", + "type": "string" }, "callback": { "location": "query", @@ -889,11 +886,6 @@ "type": "string" }, "alt": { - "enum": [ - "json", - "media", - "proto" - ], "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", @@ -902,61 +894,1185 @@ ], "location": "query", "description": "Data format for response.", - "default": "json" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] }, "key": { + "location": "query", "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.", - "type": "string", - "location": "query" + "type": "string" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" }, "quotaUser": { "location": "query", "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.", "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" } }, "schemas": { + "ApiEndpointHandler": { + "properties": { + "scriptPath": { + "description": "Path to the script from the application root directory.", + "type": "string" + } + }, + "id": "ApiEndpointHandler", + "description": "Uses Google Cloud Endpoints to handle requests.", + "type": "object" + }, + "AutomaticScaling": { + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", + "type": "object", + "properties": { + "maxIdleInstances": { + "format": "int32", + "description": "Maximum number of idle instances that should be maintained for this version.", + "type": "integer" + }, + "requestUtilization": { + "description": "Target scaling by request utilization.", + "$ref": "RequestUtilization" + }, + "minIdleInstances": { + "format": "int32", + "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a module.", + "type": "integer" + }, + "maxTotalInstances": { + "format": "int32", + "description": "Maximum number of instances that should be started to handle requests.", + "type": "integer" + }, + "minTotalInstances": { + "format": "int32", + "description": "Minimum number of instances that should be maintained for this version.", + "type": "integer" + }, + "networkUtilization": { + "description": "Target scaling by network usage.", + "$ref": "NetworkUtilization" + }, + "maxConcurrentRequests": { + "format": "int32", + "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", + "type": "integer" + }, + "coolDownPeriod": { + "format": "google-duration", + "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 for VM runtimes.", + "type": "string" + }, + "maxPendingLatency": { + "format": "google-duration", + "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.", + "type": "string" + }, + "cpuUtilization": { + "$ref": "CpuUtilization", + "description": "Target scaling by CPU usage." + }, + "diskUtilization": { + "description": "Target scaling by disk usage.", + "$ref": "DiskUtilization" + }, + "minPendingLatency": { + "format": "google-duration", + "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", + "type": "string" + } + }, + "id": "AutomaticScaling" + }, + "StaticDirectoryHandler": { + "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static directory handlers make it easy to serve the entire contents of a directory as static files.", + "type": "object", + "properties": { + "applicationReadable": { + "description": "Whether files should also be uploaded as code data. By default, files declared in static directory handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", + "type": "boolean" + }, + "httpHeaders": { + "additionalProperties": { + "type": "string" + }, + "description": "HTTP headers to use for all responses from these URLs.", + "type": "object" + }, + "directory": { + "description": "Path to the directory containing the static files from the application root directory. Everything after the end of the matched URL pattern is appended to static_dir to form the full path to the requested file.", + "type": "string" + }, + "mimeType": { + "description": "MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are direved from each file's filename extension.", + "type": "string" + }, + "requireMatchingFile": { + "type": "boolean", + "description": "Whether this handler should match the request if the file referenced by the handler does not exist." + }, + "expiration": { + "format": "google-duration", + "description": "Time a static file served by this handler should be cached.", + "type": "string" + } + }, + "id": "StaticDirectoryHandler" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "type": "object", + "properties": { + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", + "type": "string" + }, + "locationId": { + "description": "The canonical id for this location. For example: \"us-east1\".", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", + "type": "object" + } + }, + "id": "Location" + }, + "NetworkUtilization": { + "description": "Target scaling by network usage. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "targetReceivedBytesPerSec": { + "format": "int32", + "description": "Target bytes received per second.", + "type": "integer" + }, + "targetSentPacketsPerSec": { + "format": "int32", + "description": "Target packets sent per second.", + "type": "integer" + }, + "targetReceivedPacketsPerSec": { + "format": "int32", + "description": "Target packets received per second.", + "type": "integer" + }, + "targetSentBytesPerSec": { + "format": "int32", + "description": "Target bytes sent per second.", + "type": "integer" + } + }, + "id": "NetworkUtilization" + }, + "HealthCheck": { + "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", + "type": "object", + "properties": { + "unhealthyThreshold": { + "format": "uint32", + "description": "Number of consecutive failed health checks required before removing traffic.", + "type": "integer" + }, + "disableHealthCheck": { + "description": "Whether to explicitly disable health checks for this instance.", + "type": "boolean" + }, + "host": { + "type": "string", + "description": "Host header to send when performing an HTTP health check. Example: \"myapp.appspot.com\"" + }, + "healthyThreshold": { + "format": "uint32", + "description": "Number of consecutive successful health checks required before receiving traffic.", + "type": "integer" + }, + "restartThreshold": { + "format": "uint32", + "description": "Number of consecutive failed health checks required before an instance is restarted.", + "type": "integer" + }, + "checkInterval": { + "format": "google-duration", + "description": "Interval between health checks.", + "type": "string" + }, + "timeout": { + "format": "google-duration", + "description": "Time before the health check is considered failed.", + "type": "string" + } + }, + "id": "HealthCheck" + }, + "DebugInstanceRequest": { + "type": "object", + "properties": { + "sshKey": { + "description": "Public SSH key to add to the instance. Examples:\n[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]\n[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {\"userName\":\"[USERNAME]\",\"expireOn\":\"[EXPIRE_TIME]\"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).", + "type": "string" + } + }, + "id": "DebugInstanceRequest", + "description": "Request message for Instances.DebugInstance." + }, + "SourceReference": { + "description": "Reference to a particular snapshot of the source tree used to build and deploy the application.", + "type": "object", + "properties": { + "revisionId": { + "description": "The canonical, persistent identifier of the deployed revision. Aliases that include tags or branch names are not allowed. Example (git): \"2198322f89e0bb2e25021667c2ed489d1fd34e6b\"", + "type": "string" + }, + "repository": { + "description": "URI string identifying the repository. Example: \"https://source.developers.google.com/p/app-123/r/default\"", + "type": "string" + } + }, + "id": "SourceReference" + }, + "Library": { + "description": "Third-party Python runtime library that is required by the application.", + "type": "object", + "properties": { + "name": { + "description": "Name of the library. Example: \"django\".", + "type": "string" + }, + "version": { + "type": "string", + "description": "Version of the library to select, or \"latest\"." + } + }, + "id": "Library" + }, + "OperationMetadataV1Beta5": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "method": { + "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Timestamp that this operation was created.@OutputOnly", + "type": "string" + }, + "endTime": { + "type": "string", + "format": "google-datetime", + "description": "Timestamp that this operation completed.@OutputOnly" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataV1Beta5" + }, + "ListLocationsResponse": { + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + } + }, + "id": "ListLocationsResponse", + "description": "The response message for Locations.ListLocations.", + "type": "object" + }, + "Version": { + "description": "A Version resource is a specific set of source code and configuration files that are deployed into a module.", + "type": "object", + "properties": { + "vm": { + "description": "Whether to deploy this version in a container on a virtual machine.", + "type": "boolean" + }, + "instanceClass": { + "type": "string", + "description": "Instance class that is used to run this version. Valid values are:\nAutomaticScaling: F1, F2, F4, F4_1G\nManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling." + }, + "servingStatus": { + "enumDescriptions": [ + "Not specified.", + "Currently serving. Instances are created according to the scaling settings of the version.", + "Disabled. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." + ], + "enum": [ + "SERVING_STATUS_UNSPECIFIED", + "SERVING", + "STOPPED" + ], + "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", + "type": "string" + }, + "deployment": { + "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set.", + "$ref": "Deployment" + }, + "runtimeApiVersion": { + "description": "The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/\u003clanguage\u003e/config/appref", + "type": "string" + }, + "inboundServices": { + "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", + "items": { + "enum": [ + "INBOUND_SERVICE_UNSPECIFIED", + "INBOUND_SERVICE_MAIL", + "INBOUND_SERVICE_MAIL_BOUNCE", + "INBOUND_SERVICE_XMPP_ERROR", + "INBOUND_SERVICE_XMPP_MESSAGE", + "INBOUND_SERVICE_XMPP_SUBSCRIBE", + "INBOUND_SERVICE_XMPP_PRESENCE", + "INBOUND_SERVICE_CHANNEL_PRESENCE", + "INBOUND_SERVICE_WARMUP" + ], + "type": "string" + }, + "type": "array", + "enumDescriptions": [ + "Not specified.", + "Allows an application to receive mail.", + "Allows an application to receive email-bound notifications.", + "Allows an application to receive error stanzas.", + "Allows an application to receive instant messages.", + "Allows an application to receive user subscription POSTs.", + "Allows an application to receive a user's chat presence.", + "Registers an application for notifications when a client connects or disconnects from a channel.", + "Enables warmup requests." + ] + }, + "resources": { + "$ref": "Resources", + "description": "Machine resources for this version. Only applicable for VM runtimes." + }, + "errorHandlers": { + "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", + "items": { + "$ref": "ErrorHandler" + }, + "type": "array" + }, + "defaultExpiration": { + "format": "google-duration", + "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.", + "type": "string" + }, + "libraries": { + "description": "Configuration for third-party Python runtime libraries required by the application.Only returned in GET requests if view=FULL is set.", + "items": { + "$ref": "Library" + }, + "type": "array" + }, + "nobuildFilesRegex": { + "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.", + "type": "string" + }, + "creationTime": { + "format": "google-datetime", + "description": "Time that this version was created.@OutputOnly", + "type": "string" + }, + "basicScaling": { + "description": "A module with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", + "$ref": "BasicScaling" + }, + "runtime": { + "type": "string", + "description": "Desired runtime. Example: python27." + }, + "id": { + "description": "Relative name of the version within the module. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\".", + "type": "string" + }, + "envVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables made available to the application.Only returned in GET requests if view=FULL is set.", + "type": "object" + }, + "network": { + "description": "Extra network settings. Only applicable for VM runtimes.", + "$ref": "Network" + }, + "betaSettings": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Metadata settings that are supplied to this version to enable beta runtime features." + }, + "env": { + "description": "App Engine execution environment to use for this version.Defaults to 1.", + "type": "string" + }, + "handlers": { + "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", + "items": { + "$ref": "UrlMap" + }, + "type": "array" + }, + "deployer": { + "description": "Email address of the user who created this version.@OutputOnly", + "type": "string" + }, + "automaticScaling": { + "$ref": "AutomaticScaling", + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics." + }, + "healthCheck": { + "description": "Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set.", + "$ref": "HealthCheck" + }, + "threadsafe": { + "description": "Whether multiple requests can be dispatched to this version at once.", + "type": "boolean" + }, + "manualScaling": { + "description": "A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", + "$ref": "ManualScaling" + }, + "name": { + "description": "Full path to the Version resource in the API. Example: apps/myapp/modules/default/versions/v1.@OutputOnly", + "type": "string" + }, + "apiConfig": { + "$ref": "ApiConfigHandler", + "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set." + } + }, + "id": "Version" + }, + "ContainerInfo": { + "properties": { + "image": { + "description": "URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"", + "type": "string" + } + }, + "id": "ContainerInfo", + "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment.", + "type": "object" + }, + "RequestUtilization": { + "type": "object", + "properties": { + "targetConcurrentRequests": { + "format": "int32", + "description": "Target number of concurrent requests.", + "type": "integer" + }, + "targetRequestCountPerSec": { + "format": "int32", + "description": "Target requests per second.", + "type": "integer" + } + }, + "id": "RequestUtilization", + "description": "Target scaling by request utilization. Only applicable for VM runtimes." + }, + "UrlMap": { + "id": "UrlMap", + "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code, or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", + "type": "object", + "properties": { + "staticDirectory": { + "$ref": "StaticDirectoryHandler", + "description": "Serves the entire contents of a directory as static files.This attribute is deprecated. You can mimic the behavior of static directories using static files." + }, + "staticFiles": { + "description": "Returns the contents of a file, such as an image, as the response.", + "$ref": "StaticFilesHandler" + }, + "redirectHttpResponseCode": { + "enumDescriptions": [ + "Not specified. 302 is assumed.", + "301 Moved Permanently code.", + "302 Moved Temporarily code.", + "303 See Other code.", + "307 Temporary Redirect code." + ], + "enum": [ + "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", + "REDIRECT_HTTP_RESPONSE_CODE_301", + "REDIRECT_HTTP_RESPONSE_CODE_302", + "REDIRECT_HTTP_RESPONSE_CODE_303", + "REDIRECT_HTTP_RESPONSE_CODE_307" + ], + "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", + "type": "string" + }, + "securityLevel": { + "enum": [ + "SECURE_UNSPECIFIED", + "SECURE_DEFAULT", + "SECURE_NEVER", + "SECURE_OPTIONAL", + "SECURE_ALWAYS" + ], + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string", + "enumDescriptions": [ + "Not specified.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", + "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." + ] + }, + "authFailAction": { + "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "type": "string", + "enumDescriptions": [ + "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", + "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", + "Rejects request with a 401 HTTP status code and an error message." + ], + "enum": [ + "AUTH_FAIL_ACTION_UNSPECIFIED", + "AUTH_FAIL_ACTION_REDIRECT", + "AUTH_FAIL_ACTION_UNAUTHORIZED" + ] + }, + "script": { + "description": "Executes a script to handle the request that matches this URL pattern.", + "$ref": "ScriptHandler" + }, + "urlRegex": { + "description": "A URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.", + "type": "string" + }, + "login": { + "enum": [ + "LOGIN_UNSPECIFIED", + "LOGIN_OPTIONAL", + "LOGIN_ADMIN", + "LOGIN_REQUIRED" + ], + "description": "Level of login required to access this resource.", + "type": "string", + "enumDescriptions": [ + "Not specified. LOGIN_OPTIONAL is assumed.", + "Does not require that the user is signed in.", + "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", + "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." + ] + }, + "apiEndpoint": { + "$ref": "ApiEndpointHandler", + "description": "Uses API Endpoints to handle requests." + } + } + }, + "ApiConfigHandler": { + "id": "ApiConfigHandler", + "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", + "type": "object", + "properties": { + "securityLevel": { + "enumDescriptions": [ + "Not specified.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", + "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." + ], + "enum": [ + "SECURE_UNSPECIFIED", + "SECURE_DEFAULT", + "SECURE_NEVER", + "SECURE_OPTIONAL", + "SECURE_ALWAYS" + ], + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string" + }, + "authFailAction": { + "enumDescriptions": [ + "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", + "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", + "Rejects request with a 401 HTTP status code and an error message." + ], + "enum": [ + "AUTH_FAIL_ACTION_UNSPECIFIED", + "AUTH_FAIL_ACTION_REDIRECT", + "AUTH_FAIL_ACTION_UNAUTHORIZED" + ], + "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "type": "string" + }, + "script": { + "description": "Path to the script from the application root directory.", + "type": "string" + }, + "login": { + "enumDescriptions": [ + "Not specified. LOGIN_OPTIONAL is assumed.", + "Does not require that the user is signed in.", + "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", + "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." + ], + "enum": [ + "LOGIN_UNSPECIFIED", + "LOGIN_OPTIONAL", + "LOGIN_ADMIN", + "LOGIN_REQUIRED" + ], + "description": "Level of login required to access this resource. Defaults to optional.", + "type": "string" + }, + "url": { + "type": "string", + "description": "URL to serve the endpoint at." + } + } + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object", + "properties": { + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + } + }, + "id": "Operation" + }, + "ScriptHandler": { + "description": "Executes a script to handle the request that matches the URL pattern.", + "type": "object", + "properties": { + "scriptPath": { + "description": "Path to the script from the application root directory.", + "type": "string" + } + }, + "id": "ScriptHandler" + }, + "FileInfo": { + "type": "object", + "properties": { + "sha1Sum": { + "description": "The SHA1 hash of the file, in hex.", + "type": "string" + }, + "mimeType": { + "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", + "type": "string" + }, + "sourceUrl": { + "type": "string", + "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'." + } + }, + "id": "FileInfo", + "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately." + }, + "StaticFilesHandler": { + "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", + "type": "object", + "properties": { + "expiration": { + "format": "google-duration", + "description": "Time a static file served by this handler should be cached.", + "type": "string" + }, + "httpHeaders": { + "additionalProperties": { + "type": "string" + }, + "description": "HTTP headers to use for all responses from these URLs.", + "type": "object" + }, + "applicationReadable": { + "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", + "type": "boolean" + }, + "uploadPathRegex": { + "description": "Regular expression that matches the file paths for all files that should be referenced by this handler.", + "type": "string" + }, + "path": { + "type": "string", + "description": "Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern." + }, + "mimeType": { + "description": "MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are derived from each file's filename extension.", + "type": "string" + }, + "requireMatchingFile": { + "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", + "type": "boolean" + } + }, + "id": "StaticFilesHandler" + }, + "BasicScaling": { + "description": "A module with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", + "type": "object", + "properties": { + "maxInstances": { + "format": "int32", + "description": "Maximum number of instances to create for this version.", + "type": "integer" + }, + "idleTimeout": { + "format": "google-duration", + "description": "Duration of time after the last request that an instance must wait before the instance is shut down.", + "type": "string" + } + }, + "id": "BasicScaling" + }, + "DiskUtilization": { + "description": "Target scaling by disk usage. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "targetReadOpsPerSec": { + "format": "int32", + "description": "Target ops read per second.", + "type": "integer" + }, + "targetReadBytesPerSec": { + "format": "int32", + "description": "Target bytes read per second.", + "type": "integer" + }, + "targetWriteOpsPerSec": { + "format": "int32", + "description": "Target ops written per second.", + "type": "integer" + }, + "targetWriteBytesPerSec": { + "format": "int32", + "description": "Target bytes written per second.", + "type": "integer" + } + }, + "id": "DiskUtilization" + }, + "OperationMetadataExperimental": { + "id": "OperationMetadataExperimental", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "method": { + "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", + "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + }, + "endTime": { + "type": "string", + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", + "type": "string" + }, + "user": { + "type": "string", + "description": "User who requested this operation.@OutputOnly" + } + } + }, + "CpuUtilization": { + "properties": { + "aggregationWindowLength": { + "format": "google-duration", + "description": "Period of time over which CPU utilization is calculated.", + "type": "string" + }, + "targetUtilization": { + "format": "double", + "description": "Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1.", + "type": "number" + } + }, + "id": "CpuUtilization", + "description": "Target scaling by CPU usage.", + "type": "object" + }, + "IdentityAwareProxy": { + "description": "Identity-Aware Proxy", + "type": "object", + "properties": { + "oauth2ClientSecret": { + "description": "For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly", + "type": "string" + }, + "oauth2ClientId": { + "type": "string", + "description": "OAuth2 client ID to use for the authentication flow." + }, + "oauth2ClientSecretSha256": { + "description": "Hex-encoded SHA-256 hash of the client secret.@OutputOnly", + "type": "string" + }, + "enabled": { + "type": "boolean", + "description": "Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty." + } + }, + "id": "IdentityAwareProxy" + }, + "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.", + "type": "object", + "properties": { + "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" + }, + "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" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + } + }, + "id": "Status" + }, + "TrafficSplit": { + "description": "Traffic routing configuration for versions within a single module. Traffic splits define how traffic directed to the module is assigned to versions.", + "type": "object", + "properties": { + "allocations": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "Mapping from version IDs within the module to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the module may not have any traffic allocation. Modules that have traffic allocated cannot be deleted until either the module is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", + "type": "object" + }, + "shardBy": { + "enumDescriptions": [ + "Diversion method unspecified.", + "Diversion based on a specially named cookie, \"GOOGAPPUID.\" The cookie must be set by the application itself or else no diversion will occur.", + "Diversion based on applying the modulus operation to a fingerprint of the IP address." + ], + "enum": [ + "UNSPECIFIED", + "COOKIE", + "IP" + ], + "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", + "type": "string" + } + }, + "id": "TrafficSplit" + }, + "ManualScaling": { + "properties": { + "instances": { + "format": "int32", + "description": "Number of instances to assign to the module at the start. This number can later be altered by using the Modules API (https://cloud.google.com/appengine/docs/python/modules/functions) set_num_instances() function.", + "type": "integer" + } + }, + "id": "ManualScaling", + "description": "A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", + "type": "object" + }, + "LocationMetadata": { + "type": "object", + "properties": { + "standardEnvironmentAvailable": { + "description": "App Engine Standard Environment is available in the given location.@OutputOnly", + "type": "boolean" + }, + "flexibleEnvironmentAvailable": { + "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", + "type": "boolean" + } + }, + "id": "LocationMetadata", + "description": "Metadata for the given google.cloud.location.Location." + }, + "OperationMetadataV1Beta": { + "properties": { + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + }, + "insertTime": { + "type": "string", + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly" + }, + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataV1Beta", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object" + }, + "ListModulesResponse": { + "properties": { + "nextPageToken": { + "type": "string", + "description": "Continuation token for fetching the next page of results." + }, + "modules": { + "items": { + "$ref": "Module" + }, + "type": "array", + "description": "The modules belonging to the requested application." + } + }, + "id": "ListModulesResponse", + "description": "Response message for Modules.ListModules.", + "type": "object" + }, + "Deployment": { + "description": "Code and application artifacts used to deploy a version to App Engine.", + "type": "object", + "properties": { + "sourceReferences": { + "description": "Origin of the source code for this deployment. There can be more than one source reference per version if source code is distributed among multiple repositories.", + "items": { + "$ref": "SourceReference" + }, + "type": "array" + }, + "container": { + "$ref": "ContainerInfo", + "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment." + }, + "files": { + "type": "object", + "additionalProperties": { + "$ref": "FileInfo" + }, + "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call." + } + }, + "id": "Deployment" + }, + "Resources": { + "description": "Machine resources for a version.", + "type": "object", + "properties": { + "diskGb": { + "format": "double", + "description": "Disk size (GB) needed.", + "type": "number" + }, + "memoryGb": { + "type": "number", + "format": "double", + "description": "Memory (GB) needed." + }, + "cpu": { + "type": "number", + "format": "double", + "description": "Number of CPU cores needed." + }, + "volumes": { + "description": "User specified volumes.", + "items": { + "$ref": "Volume" + }, + "type": "array" + } + }, + "id": "Resources" + }, + "Volume": { + "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "volumeType": { + "description": "Underlying volume type, e.g. 'tmpfs'.", + "type": "string" + }, + "sizeGb": { + "format": "double", + "description": "Volume size in gigabytes.", + "type": "number" + }, + "name": { + "description": "Unique name for the volume.", + "type": "string" + } + }, + "id": "Volume" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "id": "ListOperationsResponse" + }, + "OperationMetadata": { + "id": "OperationMetadata", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Timestamp that this operation completed.@OutputOnly", + "type": "string" + }, + "operationType": { + "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", + "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Timestamp that this operation was created.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", + "type": "string" + } + } + }, "ListInstancesResponse": { "description": "Response message for Instances.ListInstances.", "type": "object", "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, "instances": { - "description": "The instances belonging to the requested version.", "items": { "$ref": "Instance" }, - "type": "array" + "type": "array", + "description": "The instances belonging to the requested version." + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" } }, "id": "ListInstancesResponse" }, "ErrorHandler": { + "id": "ErrorHandler", + "description": "Custom static error page to be served when an error occurs.", + "type": "object", "properties": { + "staticFile": { + "description": "Static file content to be served for this error.", + "type": "string" + }, "mimeType": { "description": "MIME type of file. Defaults to text/html.", "type": "string" @@ -978,17 +2094,11 @@ ], "description": "Error condition this handler applies to.", "type": "string" - }, - "staticFile": { - "description": "Static file content to be served for this error.", - "type": "string" } - }, - "id": "ErrorHandler", - "description": "Custom static error page to be served when an error occurs.", - "type": "object" + } }, "OperationMetadataV1": { + "type": "object", "properties": { "warning": { "description": "Durable messages that persist on every operation poll. @OutputOnly", @@ -1025,25 +2135,11 @@ } }, "id": "OperationMetadataV1", - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object" + "description": "Metadata for the given google.longrunning.Operation." }, "OperationMetadataV1Alpha": { - "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" - }, "method": { "description": "API method that initiated this operation. Example: google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly", "type": "string" @@ -1053,22 +2149,37 @@ "description": "Time that this operation completed.@OutputOnly", "type": "string" }, - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, "insertTime": { "format": "google-datetime", "description": "Time that this operation was created.@OutputOnly", "type": "string" + }, + "warning": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Durable messages that persist on every operation poll. @OutputOnly" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" } }, - "id": "OperationMetadataV1Alpha" + "id": "OperationMetadataV1Alpha", + "description": "Metadata for the given google.longrunning.Operation." }, "Network": { + "description": "Extra network settings. Only applicable for VM runtimes.", + "type": "object", "properties": { "instanceTag": { "description": "Tag to apply to the VM instance during creation.", @@ -1086,24 +2197,15 @@ "type": "string" } }, - "id": "Network", - "description": "Extra network settings. Only applicable for VM runtimes.", - "type": "object" + "id": "Network" }, "Application": { "description": "An Application resource contains the top-level configuration of an App Engine application.", "type": "object", "properties": { - "dispatchRules": { - "description": "HTTP path dispatch rules for requests to the application that do not explicitly target a module or version. Rules are order-dependent.@OutputOnly", - "items": { - "$ref": "UrlDispatchRule" - }, - "type": "array" - }, "defaultHostname": { - "description": "Hostname used to reach the application, as resolved by App Engine.@OutputOnly", - "type": "string" + "type": "string", + "description": "Hostname used to reach the application, as resolved by App Engine.@OutputOnly" }, "name": { "description": "Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly", @@ -1116,15 +2218,15 @@ "description": "Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account.", "type": "string" }, - "id": { - "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp.", - "type": "string" - }, "defaultCookieExpiration": { "format": "google-duration", "description": "Cookie expiration policy for this application.", "type": "string" }, + "id": { + "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp.", + "type": "string" + }, "codeBucket": { "description": "Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly", "type": "string" @@ -1136,97 +2238,17 @@ "defaultBucket": { "description": "Google Cloud Storage bucket that can be used by this application to store content.@OutputOnly", "type": "string" + }, + "dispatchRules": { + "description": "HTTP path dispatch rules for requests to the application that do not explicitly target a module or version. Rules are order-dependent.@OutputOnly", + "items": { + "$ref": "UrlDispatchRule" + }, + "type": "array" } }, "id": "Application" }, - "Instance": { - "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", - "type": "object", - "properties": { - "vmId": { - "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, - "qps": { - "format": "float", - "description": "Average queries per second (QPS) over the last minute.@OutputOnly", - "type": "number" - }, - "vmUnlocked": { - "description": "Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "boolean" - }, - "name": { - "description": "Full path to the Instance resource in the API. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.@OutputOnly", - "type": "string" - }, - "vmZoneName": { - "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, - "averageLatency": { - "format": "int32", - "description": "Average latency (ms) over the last minute.@OutputOnly", - "type": "integer" - }, - "vmIp": { - "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, - "memoryUsage": { - "format": "int64", - "description": "Total memory in use (bytes).@OutputOnly", - "type": "string" - }, - "id": { - "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly", - "type": "string" - }, - "vmStatus": { - "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, - "availability": { - "enum": [ - "UNSPECIFIED", - "RESIDENT", - "DYNAMIC" - ], - "description": "Availability of the instance.@OutputOnly", - "type": "string", - "enumDescriptions": [ - "", - "", - "" - ] - }, - "errors": { - "format": "uint32", - "description": "Number of errors since this instance was started.@OutputOnly", - "type": "integer" - }, - "requests": { - "format": "int32", - "description": "Number of requests since this instance was started.@OutputOnly", - "type": "integer" - }, - "appEngineRelease": { - "description": "App Engine release this instance is running on.@OutputOnly", - "type": "string" - }, - "startTimestamp": { - "format": "google-datetime", - "description": "Time that this instance was started.@OutputOnly", - "type": "string" - }, - "vmName": { - "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - } - }, - "id": "Instance" - }, "UrlDispatchRule": { "description": "Rules to match an HTTP request and dispatch that request to a module.", "type": "object", @@ -1246,1177 +2268,155 @@ }, "id": "UrlDispatchRule" }, - "Module": { - "description": "A Module resource is a logical component of an application that can share state and communicate in a secure fashion with other modules. For example, an application that handles customer requests might include separate modules to handle tasks such as backend data analysis or API requests from mobile devices. Each module has a collection of versions that define a specific set of code used to implement the functionality of that module.", + "Instance": { + "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", "type": "object", "properties": { - "id": { - "description": "Relative name of the module within the application. Example: default.@OutputOnly", + "vmZoneName": { + "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "string" }, + "vmUnlocked": { + "description": "Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "boolean" + }, "name": { - "description": "Full path to the Module resource in the API. Example: apps/myapp/modules/default.@OutputOnly", + "description": "Full path to the Instance resource in the API. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.@OutputOnly", "type": "string" }, - "split": { - "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the module.", - "$ref": "TrafficSplit" + "averageLatency": { + "format": "int32", + "description": "Average latency (ms) over the last minute.@OutputOnly", + "type": "integer" + }, + "vmIp": { + "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "memoryUsage": { + "format": "int64", + "description": "Total memory in use (bytes).@OutputOnly", + "type": "string" + }, + "id": { + "type": "string", + "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly" + }, + "vmStatus": { + "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "errors": { + "format": "uint32", + "description": "Number of errors since this instance was started.@OutputOnly", + "type": "integer" + }, + "availability": { + "enumDescriptions": [ + "", + "", + "" + ], + "enum": [ + "UNSPECIFIED", + "RESIDENT", + "DYNAMIC" + ], + "description": "Availability of the instance.@OutputOnly", + "type": "string" + }, + "requests": { + "format": "int32", + "description": "Number of requests since this instance was started.@OutputOnly", + "type": "integer" + }, + "appEngineRelease": { + "description": "App Engine release this instance is running on.@OutputOnly", + "type": "string" + }, + "startTimestamp": { + "type": "string", + "format": "google-datetime", + "description": "Time that this instance was started.@OutputOnly" + }, + "vmName": { + "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "vmId": { + "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "qps": { + "format": "float", + "description": "Average queries per second (QPS) over the last minute.@OutputOnly", + "type": "number" } }, - "id": "Module" + "id": "Instance" }, "ListVersionsResponse": { - "description": "Response message for Versions.ListVersions.", "type": "object", "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, "versions": { "description": "The versions belonging to the requested module.", "items": { "$ref": "Version" }, "type": "array" - }, - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" } }, - "id": "ListVersionsResponse" + "id": "ListVersionsResponse", + "description": "Response message for Versions.ListVersions." }, - "ApiEndpointHandler": { - "description": "Uses Google Cloud Endpoints to handle requests.", + "Module": { + "description": "A Module resource is a logical component of an application that can share state and communicate in a secure fashion with other modules. For example, an application that handles customer requests might include separate modules to handle tasks such as backend data analysis or API requests from mobile devices. Each module has a collection of versions that define a specific set of code used to implement the functionality of that module.", "type": "object", "properties": { - "scriptPath": { - "description": "Path to the script from the application root directory.", - "type": "string" - } - }, - "id": "ApiEndpointHandler" - }, - "StaticDirectoryHandler": { - "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static directory handlers make it easy to serve the entire contents of a directory as static files.", - "type": "object", - "properties": { - "applicationReadable": { - "description": "Whether files should also be uploaded as code data. By default, files declared in static directory handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", - "type": "boolean" - }, - "httpHeaders": { - "description": "HTTP headers to use for all responses from these URLs.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "directory": { - "description": "Path to the directory containing the static files from the application root directory. Everything after the end of the matched URL pattern is appended to static_dir to form the full path to the requested file.", - "type": "string" - }, - "mimeType": { - "description": "MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are direved from each file's filename extension.", - "type": "string" - }, - "requireMatchingFile": { - "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", - "type": "boolean" - }, - "expiration": { - "format": "google-duration", - "description": "Time a static file served by this handler should be cached.", - "type": "string" - } - }, - "id": "StaticDirectoryHandler" - }, - "AutomaticScaling": { - "properties": { - "minPendingLatency": { - "format": "google-duration", - "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", - "type": "string" - }, - "requestUtilization": { - "description": "Target scaling by request utilization.", - "$ref": "RequestUtilization" - }, - "maxIdleInstances": { - "format": "int32", - "description": "Maximum number of idle instances that should be maintained for this version.", - "type": "integer" - }, - "minIdleInstances": { - "format": "int32", - "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a module.", - "type": "integer" - }, - "maxTotalInstances": { - "format": "int32", - "description": "Maximum number of instances that should be started to handle requests.", - "type": "integer" - }, - "minTotalInstances": { - "format": "int32", - "description": "Minimum number of instances that should be maintained for this version.", - "type": "integer" - }, - "networkUtilization": { - "description": "Target scaling by network usage.", - "$ref": "NetworkUtilization" - }, - "coolDownPeriod": { - "format": "google-duration", - "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 for VM runtimes.", - "type": "string" - }, - "maxConcurrentRequests": { - "format": "int32", - "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", - "type": "integer" - }, - "maxPendingLatency": { - "format": "google-duration", - "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.", - "type": "string" - }, - "cpuUtilization": { - "$ref": "CpuUtilization", - "description": "Target scaling by CPU usage." - }, - "diskUtilization": { - "description": "Target scaling by disk usage.", - "$ref": "DiskUtilization" - } - }, - "id": "AutomaticScaling", - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", - "type": "object" - }, - "NetworkUtilization": { - "description": "Target scaling by network usage. Only applicable for VM runtimes.", - "type": "object", - "properties": { - "targetReceivedBytesPerSec": { - "format": "int32", - "description": "Target bytes received per second.", - "type": "integer" - }, - "targetSentPacketsPerSec": { - "format": "int32", - "description": "Target packets sent per second.", - "type": "integer" - }, - "targetReceivedPacketsPerSec": { - "format": "int32", - "description": "Target packets received per second.", - "type": "integer" - }, - "targetSentBytesPerSec": { - "format": "int32", - "description": "Target bytes sent per second.", - "type": "integer" - } - }, - "id": "NetworkUtilization" - }, - "Location": { - "description": "A resource that represents Google Cloud Platform location.", - "type": "object", - "properties": { - "locationId": { - "description": "The canonical id for this location. For example: \"us-east1\".", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata. For example the available capacity at the given location.", - "type": "object" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", - "type": "object" - }, "name": { - "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", - "type": "string" - } - }, - "id": "Location" - }, - "HealthCheck": { - "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", - "type": "object", - "properties": { - "host": { - "description": "Host header to send when performing an HTTP health check. Example: \"myapp.appspot.com\"", + "description": "Full path to the Module resource in the API. Example: apps/myapp/modules/default.@OutputOnly", "type": "string" }, - "healthyThreshold": { - "format": "uint32", - "description": "Number of consecutive successful health checks required before receiving traffic.", - "type": "integer" - }, - "restartThreshold": { - "format": "uint32", - "description": "Number of consecutive failed health checks required before an instance is restarted.", - "type": "integer" - }, - "checkInterval": { - "format": "google-duration", - "description": "Interval between health checks.", - "type": "string" - }, - "timeout": { - "format": "google-duration", - "description": "Time before the health check is considered failed.", - "type": "string" - }, - "unhealthyThreshold": { - "format": "uint32", - "description": "Number of consecutive failed health checks required before removing traffic.", - "type": "integer" - }, - "disableHealthCheck": { - "description": "Whether to explicitly disable health checks for this instance.", - "type": "boolean" - } - }, - "id": "HealthCheck" - }, - "SourceReference": { - "description": "Reference to a particular snapshot of the source tree used to build and deploy the application.", - "type": "object", - "properties": { - "revisionId": { - "description": "The canonical, persistent identifier of the deployed revision. Aliases that include tags or branch names are not allowed. Example (git): \"2198322f89e0bb2e25021667c2ed489d1fd34e6b\"", - "type": "string" - }, - "repository": { - "description": "URI string identifying the repository. Example: \"https://source.developers.google.com/p/app-123/r/default\"", - "type": "string" - } - }, - "id": "SourceReference" - }, - "DebugInstanceRequest": { - "description": "Request message for Instances.DebugInstance.", - "type": "object", - "properties": { - "sshKey": { - "description": "Public SSH key to add to the instance. Examples:\n[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]\n[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {\"userName\":\"[USERNAME]\",\"expireOn\":\"[EXPIRE_TIME]\"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).", - "type": "string" - } - }, - "id": "DebugInstanceRequest" - }, - "OperationMetadataV1Beta5": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "method": { - "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", - "type": "string" - }, - "insertTime": { - "format": "google-datetime", - "description": "Timestamp that this operation was created.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Timestamp that this operation completed.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataV1Beta5" - }, - "Library": { - "description": "Third-party Python runtime library that is required by the application.", - "type": "object", - "properties": { - "version": { - "description": "Version of the library to select, or \"latest\".", - "type": "string" - }, - "name": { - "description": "Name of the library. Example: \"django\".", - "type": "string" - } - }, - "id": "Library" - }, - "ListLocationsResponse": { - "description": "The response message for Locations.ListLocations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "locations": { - "description": "A list of locations that matches the specified filter in the request.", - "items": { - "$ref": "Location" - }, - "type": "array" - } - }, - "id": "ListLocationsResponse" - }, - "ContainerInfo": { - "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment.", - "type": "object", - "properties": { - "image": { - "description": "URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"", - "type": "string" - } - }, - "id": "ContainerInfo" - }, - "Version": { - "description": "A Version resource is a specific set of source code and configuration files that are deployed into a module.", - "type": "object", - "properties": { - "vm": { - "description": "Whether to deploy this version in a container on a virtual machine.", - "type": "boolean" - }, - "instanceClass": { - "description": "Instance class that is used to run this version. Valid values are:\nAutomaticScaling: F1, F2, F4, F4_1G\nManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.", - "type": "string" - }, - "servingStatus": { - "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", - "type": "string", - "enumDescriptions": [ - "Not specified.", - "Currently serving. Instances are created according to the scaling settings of the version.", - "Disabled. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." - ], - "enum": [ - "SERVING_STATUS_UNSPECIFIED", - "SERVING", - "STOPPED" - ] - }, - "deployment": { - "$ref": "Deployment", - "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set." - }, - "runtimeApiVersion": { - "description": "The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/\u003clanguage\u003e/config/appref", - "type": "string" - }, - "inboundServices": { - "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", - "items": { - "enum": [ - "INBOUND_SERVICE_UNSPECIFIED", - "INBOUND_SERVICE_MAIL", - "INBOUND_SERVICE_MAIL_BOUNCE", - "INBOUND_SERVICE_XMPP_ERROR", - "INBOUND_SERVICE_XMPP_MESSAGE", - "INBOUND_SERVICE_XMPP_SUBSCRIBE", - "INBOUND_SERVICE_XMPP_PRESENCE", - "INBOUND_SERVICE_CHANNEL_PRESENCE", - "INBOUND_SERVICE_WARMUP" - ], - "type": "string" - }, - "type": "array", - "enumDescriptions": [ - "Not specified.", - "Allows an application to receive mail.", - "Allows an application to receive email-bound notifications.", - "Allows an application to receive error stanzas.", - "Allows an application to receive instant messages.", - "Allows an application to receive user subscription POSTs.", - "Allows an application to receive a user's chat presence.", - "Registers an application for notifications when a client connects or disconnects from a channel.", - "Enables warmup requests." - ] - }, - "resources": { - "description": "Machine resources for this version. Only applicable for VM runtimes.", - "$ref": "Resources" - }, - "errorHandlers": { - "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "ErrorHandler" - }, - "type": "array" - }, - "defaultExpiration": { - "format": "google-duration", - "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.", - "type": "string" - }, - "libraries": { - "description": "Configuration for third-party Python runtime libraries required by the application.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "Library" - }, - "type": "array" - }, - "nobuildFilesRegex": { - "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.", - "type": "string" - }, - "creationTime": { - "format": "google-datetime", - "description": "Time that this version was created.@OutputOnly", - "type": "string" - }, - "basicScaling": { - "$ref": "BasicScaling", - "description": "A module with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity." - }, - "runtime": { - "description": "Desired runtime. Example: python27.", - "type": "string" + "split": { + "$ref": "TrafficSplit", + "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the module." }, "id": { - "description": "Relative name of the version within the module. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\".", - "type": "string" - }, - "envVariables": { - "additionalProperties": { - "type": "string" - }, - "description": "Environment variables made available to the application.Only returned in GET requests if view=FULL is set.", - "type": "object" - }, - "network": { - "description": "Extra network settings. Only applicable for VM runtimes.", - "$ref": "Network" - }, - "betaSettings": { - "additionalProperties": { - "type": "string" - }, - "description": "Metadata settings that are supplied to this version to enable beta runtime features.", - "type": "object" - }, - "env": { - "description": "App Engine execution environment to use for this version.Defaults to 1.", - "type": "string" - }, - "handlers": { - "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "UrlMap" - }, - "type": "array" - }, - "deployer": { - "description": "Email address of the user who created this version.@OutputOnly", - "type": "string" - }, - "automaticScaling": { - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", - "$ref": "AutomaticScaling" - }, - "healthCheck": { - "$ref": "HealthCheck", - "description": "Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set." - }, - "threadsafe": { - "description": "Whether multiple requests can be dispatched to this version at once.", - "type": "boolean" - }, - "manualScaling": { - "description": "A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", - "$ref": "ManualScaling" - }, - "name": { - "description": "Full path to the Version resource in the API. Example: apps/myapp/modules/default/versions/v1.@OutputOnly", - "type": "string" - }, - "apiConfig": { - "$ref": "ApiConfigHandler", - "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set." - } - }, - "id": "Version" - }, - "RequestUtilization": { - "description": "Target scaling by request utilization. Only applicable for VM runtimes.", - "type": "object", - "properties": { - "targetConcurrentRequests": { - "format": "int32", - "description": "Target number of concurrent requests.", - "type": "integer" - }, - "targetRequestCountPerSec": { - "format": "int32", - "description": "Target requests per second.", - "type": "integer" - } - }, - "id": "RequestUtilization" - }, - "UrlMap": { - "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code, or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", - "type": "object", - "properties": { - "staticDirectory": { - "description": "Serves the entire contents of a directory as static files.This attribute is deprecated. You can mimic the behavior of static directories using static files.", - "$ref": "StaticDirectoryHandler" - }, - "staticFiles": { - "description": "Returns the contents of a file, such as an image, as the response.", - "$ref": "StaticFilesHandler" - }, - "redirectHttpResponseCode": { - "enum": [ - "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", - "REDIRECT_HTTP_RESPONSE_CODE_301", - "REDIRECT_HTTP_RESPONSE_CODE_302", - "REDIRECT_HTTP_RESPONSE_CODE_303", - "REDIRECT_HTTP_RESPONSE_CODE_307" - ], - "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", - "type": "string", - "enumDescriptions": [ - "Not specified. 302 is assumed.", - "301 Moved Permanently code.", - "302 Moved Temporarily code.", - "303 See Other code.", - "307 Temporary Redirect code." - ] - }, - "securityLevel": { - "enumDescriptions": [ - "Not specified.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", - "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", - "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." - ], - "enum": [ - "SECURE_UNSPECIFIED", - "SECURE_DEFAULT", - "SECURE_NEVER", - "SECURE_OPTIONAL", - "SECURE_ALWAYS" - ], - "description": "Security (HTTPS) enforcement for this URL.", - "type": "string" - }, - "authFailAction": { - "enumDescriptions": [ - "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", - "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", - "Rejects request with a 401 HTTP status code and an error message." - ], - "enum": [ - "AUTH_FAIL_ACTION_UNSPECIFIED", - "AUTH_FAIL_ACTION_REDIRECT", - "AUTH_FAIL_ACTION_UNAUTHORIZED" - ], - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "type": "string" - }, - "script": { - "description": "Executes a script to handle the request that matches this URL pattern.", - "$ref": "ScriptHandler" - }, - "urlRegex": { - "description": "A URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.", - "type": "string" - }, - "login": { - "description": "Level of login required to access this resource.", - "type": "string", - "enumDescriptions": [ - "Not specified. LOGIN_OPTIONAL is assumed.", - "Does not require that the user is signed in.", - "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", - "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." - ], - "enum": [ - "LOGIN_UNSPECIFIED", - "LOGIN_OPTIONAL", - "LOGIN_ADMIN", - "LOGIN_REQUIRED" - ] - }, - "apiEndpoint": { - "$ref": "ApiEndpointHandler", - "description": "Uses API Endpoints to handle requests." - } - }, - "id": "UrlMap" - }, - "ApiConfigHandler": { - "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", - "type": "object", - "properties": { - "login": { - "description": "Level of login required to access this resource. Defaults to optional.", - "type": "string", - "enumDescriptions": [ - "Not specified. LOGIN_OPTIONAL is assumed.", - "Does not require that the user is signed in.", - "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", - "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." - ], - "enum": [ - "LOGIN_UNSPECIFIED", - "LOGIN_OPTIONAL", - "LOGIN_ADMIN", - "LOGIN_REQUIRED" - ] - }, - "url": { - "description": "URL to serve the endpoint at.", - "type": "string" - }, - "securityLevel": { - "enumDescriptions": [ - "Not specified.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", - "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", - "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." - ], - "enum": [ - "SECURE_UNSPECIFIED", - "SECURE_DEFAULT", - "SECURE_NEVER", - "SECURE_OPTIONAL", - "SECURE_ALWAYS" - ], - "description": "Security (HTTPS) enforcement for this URL.", - "type": "string" - }, - "authFailAction": { - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "type": "string", - "enumDescriptions": [ - "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", - "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", - "Rejects request with a 401 HTTP status code and an error message." - ], - "enum": [ - "AUTH_FAIL_ACTION_UNSPECIFIED", - "AUTH_FAIL_ACTION_REDIRECT", - "AUTH_FAIL_ACTION_UNAUTHORIZED" - ] - }, - "script": { - "description": "Path to the script from the application root directory.", + "description": "Relative name of the module within the application. Example: default.@OutputOnly", "type": "string" } }, - "id": "ApiConfigHandler" - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a network API call.", - "type": "object", - "properties": { - "done": { - "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", - "type": "boolean" - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", - "type": "string" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object" - } - }, - "id": "Operation" - }, - "ScriptHandler": { - "description": "Executes a script to handle the request that matches the URL pattern.", - "type": "object", - "properties": { - "scriptPath": { - "description": "Path to the script from the application root directory.", - "type": "string" - } - }, - "id": "ScriptHandler" - }, - "FileInfo": { - "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", - "type": "object", - "properties": { - "mimeType": { - "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", - "type": "string" - }, - "sourceUrl": { - "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", - "type": "string" - }, - "sha1Sum": { - "description": "The SHA1 hash of the file, in hex.", - "type": "string" - } - }, - "id": "FileInfo" - }, - "StaticFilesHandler": { - "properties": { - "requireMatchingFile": { - "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", - "type": "boolean" - }, - "expiration": { - "format": "google-duration", - "description": "Time a static file served by this handler should be cached.", - "type": "string" - }, - "httpHeaders": { - "additionalProperties": { - "type": "string" - }, - "description": "HTTP headers to use for all responses from these URLs.", - "type": "object" - }, - "applicationReadable": { - "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", - "type": "boolean" - }, - "uploadPathRegex": { - "description": "Regular expression that matches the file paths for all files that should be referenced by this handler.", - "type": "string" - }, - "path": { - "description": "Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.", - "type": "string" - }, - "mimeType": { - "description": "MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are derived from each file's filename extension.", - "type": "string" - } - }, - "id": "StaticFilesHandler", - "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", - "type": "object" - }, - "BasicScaling": { - "description": "A module with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", - "type": "object", - "properties": { - "idleTimeout": { - "format": "google-duration", - "description": "Duration of time after the last request that an instance must wait before the instance is shut down.", - "type": "string" - }, - "maxInstances": { - "format": "int32", - "description": "Maximum number of instances to create for this version.", - "type": "integer" - } - }, - "id": "BasicScaling" - }, - "DiskUtilization": { - "description": "Target scaling by disk usage. Only applicable for VM runtimes.", - "type": "object", - "properties": { - "targetReadBytesPerSec": { - "format": "int32", - "description": "Target bytes read per second.", - "type": "integer" - }, - "targetWriteOpsPerSec": { - "format": "int32", - "description": "Target ops written per second.", - "type": "integer" - }, - "targetWriteBytesPerSec": { - "format": "int32", - "description": "Target bytes written per second.", - "type": "integer" - }, - "targetReadOpsPerSec": { - "format": "int32", - "description": "Target ops read per second.", - "type": "integer" - } - }, - "id": "DiskUtilization" - }, - "OperationMetadataExperimental": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "method": { - "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", - "type": "string" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataExperimental" - }, - "CpuUtilization": { - "properties": { - "aggregationWindowLength": { - "format": "google-duration", - "description": "Period of time over which CPU utilization is calculated.", - "type": "string" - }, - "targetUtilization": { - "format": "double", - "description": "Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1.", - "type": "number" - } - }, - "id": "CpuUtilization", - "description": "Target scaling by CPU usage.", - "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.", - "type": "object", - "properties": { - "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" - }, - "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" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - } - }, - "id": "Status" - }, - "IdentityAwareProxy": { - "description": "Identity-Aware Proxy", - "type": "object", - "properties": { - "enabled": { - "description": "Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty.", - "type": "boolean" - }, - "oauth2ClientSecret": { - "description": "For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly", - "type": "string" - }, - "oauth2ClientId": { - "description": "OAuth2 client ID to use for the authentication flow.", - "type": "string" - }, - "oauth2ClientSecretSha256": { - "description": "Hex-encoded SHA-256 hash of the client secret.@OutputOnly", - "type": "string" - } - }, - "id": "IdentityAwareProxy" - }, - "ManualScaling": { - "description": "A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", - "type": "object", - "properties": { - "instances": { - "format": "int32", - "description": "Number of instances to assign to the module at the start. This number can later be altered by using the Modules API (https://cloud.google.com/appengine/docs/python/modules/functions) set_num_instances() function.", - "type": "integer" - } - }, - "id": "ManualScaling" - }, - "TrafficSplit": { - "description": "Traffic routing configuration for versions within a single module. Traffic splits define how traffic directed to the module is assigned to versions.", - "type": "object", - "properties": { - "allocations": { - "additionalProperties": { - "format": "double", - "type": "number" - }, - "description": "Mapping from version IDs within the module to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the module may not have any traffic allocation. Modules that have traffic allocated cannot be deleted until either the module is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", - "type": "object" - }, - "shardBy": { - "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", - "type": "string", - "enumDescriptions": [ - "Diversion method unspecified.", - "Diversion based on a specially named cookie, \"GOOGAPPUID.\" The cookie must be set by the application itself or else no diversion will occur.", - "Diversion based on applying the modulus operation to a fingerprint of the IP address." - ], - "enum": [ - "UNSPECIFIED", - "COOKIE", - "IP" - ] - } - }, - "id": "TrafficSplit" - }, - "LocationMetadata": { - "description": "Metadata for the given google.cloud.location.Location.", - "type": "object", - "properties": { - "flexibleEnvironmentAvailable": { - "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", - "type": "boolean" - }, - "standardEnvironmentAvailable": { - "description": "App Engine Standard Environment is available in the given location.@OutputOnly", - "type": "boolean" - } - }, - "id": "LocationMetadata" - }, - "OperationMetadataV1Beta": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataV1Beta" - }, - "ListModulesResponse": { - "description": "Response message for Modules.ListModules.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "modules": { - "description": "The modules belonging to the requested application.", - "items": { - "$ref": "Module" - }, - "type": "array" - } - }, - "id": "ListModulesResponse" - }, - "Deployment": { - "description": "Code and application artifacts used to deploy a version to App Engine.", - "type": "object", - "properties": { - "files": { - "additionalProperties": { - "$ref": "FileInfo" - }, - "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", - "type": "object" - }, - "sourceReferences": { - "description": "Origin of the source code for this deployment. There can be more than one source reference per version if source code is distributed among multiple repositories.", - "items": { - "$ref": "SourceReference" - }, - "type": "array" - }, - "container": { - "$ref": "ContainerInfo", - "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment." - } - }, - "id": "Deployment" - }, - "Resources": { - "description": "Machine resources for a version.", - "type": "object", - "properties": { - "volumes": { - "description": "User specified volumes.", - "items": { - "$ref": "Volume" - }, - "type": "array" - }, - "diskGb": { - "format": "double", - "description": "Disk size (GB) needed.", - "type": "number" - }, - "memoryGb": { - "format": "double", - "description": "Memory (GB) needed.", - "type": "number" - }, - "cpu": { - "format": "double", - "description": "Number of CPU cores needed.", - "type": "number" - } - }, - "id": "Resources" - }, - "Volume": { - "properties": { - "sizeGb": { - "format": "double", - "description": "Volume size in gigabytes.", - "type": "number" - }, - "name": { - "description": "Unique name for the volume.", - "type": "string" - }, - "volumeType": { - "description": "Underlying volume type, e.g. 'tmpfs'.", - "type": "string" - } - }, - "id": "Volume", - "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", - "type": "object" - }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - } - }, - "id": "ListOperationsResponse" - }, - "OperationMetadata": { - "properties": { - "endTime": { - "format": "google-datetime", - "description": "Timestamp that this operation completed.@OutputOnly", - "type": "string" - }, - "operationType": { - "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", - "type": "string" - }, - "insertTime": { - "format": "google-datetime", - "description": "Timestamp that this operation was created.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadata", - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object" + "id": "Module" } }, - "protocol": "rest", "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, + "protocol": "rest", "version": "v1beta4", - "baseUrl": "https://appengine.googleapis.com/" + "baseUrl": "https://appengine.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/appengine.admin": { + "description": "View and manage your applications deployed on Google App Engine" + } + } + } + }, + "servicePath": "", + "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", + "kind": "discovery#restDescription", + "rootUrl": "https://appengine.googleapis.com/" } diff --git a/vendor/google.golang.org/api/appengine/v1beta5/appengine-api.json b/vendor/google.golang.org/api/appengine/v1beta5/appengine-api.json index aeaa6b9ee..5229d3c74 100644 --- a/vendor/google.golang.org/api/appengine/v1beta5/appengine-api.json +++ b/vendor/google.golang.org/api/appengine/v1beta5/appengine-api.json @@ -1,143 +1,33 @@ { - "version": "v1beta5", - "baseUrl": "https://appengine.googleapis.com/", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/appengine.admin": { - "description": "View and manage your applications deployed on Google App Engine" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "kind": "discovery#restDescription", - "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", - "servicePath": "", - "rootUrl": "https://appengine.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "appengine", - "batchPath": "batch", - "revision": "20170724", - "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", - "id": "appengine:v1beta5", "title": "Google App Engine Admin API", "discoveryVersion": "v1", "ownerName": "Google", "resources": { "apps": { - "methods": { - "create": { - "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).", - "request": { - "$ref": "Application" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta5/apps", - "id": "appengine.apps.create", - "path": "v1beta5/apps" - }, - "patch": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "PATCH", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", - "type": "string", - "required": true - }, - "mask": { - "location": "query", - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", - "type": "string" - } - }, - "flatPath": "v1beta5/apps/{appsId}", - "id": "appengine.apps.patch", - "path": "v1beta5/apps/{appsId}", - "request": { - "$ref": "Application" - }, - "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.auth_domain)\ndefault_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.default_cookie_expiration)" - }, - "get": { - "httpMethod": "GET", - "response": { - "$ref": "Application" - }, - "parameterOrder": [ - "appsId" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "ensureResourcesExist": { - "description": "Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the GET operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete. Note: This parameter will be deprecated in a future version of the API.", - "type": "boolean", - "location": "query" - }, - "appsId": { - "description": "Part of `name`. Name of the application to get. Example: apps/myapp.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta5/apps/{appsId}", - "path": "v1beta5/apps/{appsId}", - "id": "appengine.apps.get", - "description": "Gets information about an application." - } - }, "resources": { "operations": { "methods": { "get": { - "response": { - "$ref": "Operation" - }, + "httpMethod": "GET", "parameterOrder": [ "appsId", "operationsId" ], - "httpMethod": "GET", + "response": { + "$ref": "Operation" + }, "parameters": { + "appsId": { + "description": "Part of `name`. The name of the operation resource.", + "type": "string", + "required": true, + "location": "path" + }, "operationsId": { "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true - }, - "appsId": { - "location": "path", - "description": "Part of `name`. The name of the operation resource.", - "type": "string", - "required": true } }, "scopes": [ @@ -146,22 +36,18 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ], "flatPath": "v1beta5/apps/{appsId}/operations/{operationsId}", - "id": "appengine.apps.operations.get", "path": "v1beta5/apps/{appsId}/operations/{operationsId}", + "id": "appengine.apps.operations.get", "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." }, "list": { - "parameterOrder": [ - "appsId" - ], + "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.", "httpMethod": "GET", "response": { "$ref": "ListOperationsResponse" }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" + "parameterOrder": [ + "appsId" ], "parameters": { "filter": { @@ -170,9 +56,9 @@ "location": "query" }, "pageToken": { - "location": "query", "description": "The standard list page token.", - "type": "string" + "type": "string", + "location": "query" }, "appsId": { "description": "Part of `name`. The name of the operation's parent resource.", @@ -181,16 +67,20 @@ "location": "path" }, "pageSize": { + "location": "query", "format": "int32", "description": "The standard list page size.", - "type": "integer", - "location": "query" + "type": "integer" } }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "flatPath": "v1beta5/apps/{appsId}/operations", - "id": "appengine.apps.operations.list", "path": "v1beta5/apps/{appsId}/operations", - "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." + "id": "appengine.apps.operations.list" } } }, @@ -198,78 +88,78 @@ "methods": { "get": { "httpMethod": "GET", - "response": { - "$ref": "Location" - }, "parameterOrder": [ "appsId", "locationsId" ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Resource name for the location.", - "type": "string", - "required": true - }, - "locationsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } + "response": { + "$ref": "Location" }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], + "parameters": { + "locationsId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `name`. See documentation of `appsId`." + }, + "appsId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `name`. Resource name for the location." + } + }, "flatPath": "v1beta5/apps/{appsId}/locations/{locationsId}", "path": "v1beta5/apps/{appsId}/locations/{locationsId}", "id": "appengine.apps.locations.get", "description": "Get information about a location." }, "list": { - "id": "appengine.apps.locations.list", - "path": "v1beta5/apps/{appsId}/locations", "description": "Lists information about the supported locations for this service.", + "httpMethod": "GET", "parameterOrder": [ "appsId" ], - "httpMethod": "GET", "response": { "$ref": "ListLocationsResponse" }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "parameters": { - "filter": { - "description": "The standard list filter.", - "type": "string", + "pageSize": { + "format": "int32", + "description": "The standard list page size.", + "type": "integer", "location": "query" }, + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, "pageToken": { + "location": "query", "description": "The standard list page token.", - "type": "string", - "location": "query" + "type": "string" }, "appsId": { "location": "path", "description": "Part of `name`. The resource that owns the locations collection, if applicable.", "type": "string", "required": true - }, - "pageSize": { - "format": "int32", - "description": "The standard list page size.", - "type": "integer", - "location": "query" } }, - "flatPath": "v1beta5/apps/{appsId}/locations" + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta5/apps/{appsId}/locations", + "path": "v1beta5/apps/{appsId}/locations", + "id": "appengine.apps.locations.list" } } }, @@ -277,6 +167,7 @@ "methods": { "delete": { "description": "Deletes the specified service and all enclosed versions.", + "httpMethod": "DELETE", "response": { "$ref": "Operation" }, @@ -284,41 +175,36 @@ "appsId", "servicesId" ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, "appsId": { "location": "path", "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", "type": "string", "required": true + }, + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}", - "id": "appengine.apps.services.delete", - "path": "v1beta5/apps/{appsId}/services/{servicesId}" + "path": "v1beta5/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.delete" }, "patch": { - "request": { - "$ref": "Service" + "response": { + "$ref": "Operation" }, - "description": "Updates the configuration of the specified service.", - "httpMethod": "PATCH", "parameterOrder": [ "appsId", "servicesId" ], - "response": { - "$ref": "Operation" - }, + "httpMethod": "PATCH", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], @@ -330,15 +216,15 @@ "required": true }, "appsId": { + "location": "path", "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", "type": "string", - "required": true, - "location": "path" + "required": true }, "migrateTraffic": { + "location": "query", "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/v1beta5/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/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).", - "type": "boolean", - "location": "query" + "type": "boolean" }, "mask": { "format": "google-fieldmask", @@ -348,49 +234,51 @@ } }, "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.patch", "path": "v1beta5/apps/{appsId}/services/{servicesId}", - "id": "appengine.apps.services.patch" + "request": { + "$ref": "Service" + }, + "description": "Updates the configuration of the specified service." }, "list": { + "description": "Lists all the services in the application.", "response": { "$ref": "ListServicesResponse" }, + "httpMethod": "GET", "parameterOrder": [ "appsId" ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer" - }, "pageToken": { + "type": "string", "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" + "description": "Continuation token for fetching the next page of results." }, "appsId": { "location": "path", "description": "Part of `name`. Name of the resource requested. Example: apps/myapp.", "type": "string", "required": true + }, + "pageSize": { + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer", + "location": "query" } }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "flatPath": "v1beta5/apps/{appsId}/services", "id": "appengine.apps.services.list", - "path": "v1beta5/apps/{appsId}/services", - "description": "Lists all the services in the application." + "path": "v1beta5/apps/{appsId}/services" }, "get": { - "id": "appengine.apps.services.get", - "path": "v1beta5/apps/{appsId}/services/{servicesId}", "description": "Gets the current configuration of the specified service.", "response": { "$ref": "Service" @@ -407,10 +295,10 @@ ], "parameters": { "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "Part of `name`. See documentation of `appsId`." }, "appsId": { "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", @@ -419,48 +307,17 @@ "location": "path" } }, - "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}" + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.get", + "path": "v1beta5/apps/{appsId}/services/{servicesId}" } }, "resources": { "versions": { "methods": { - "create": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "httpMethod": "POST", - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to update. For example: \"apps/myapp/services/default\".", - "type": "string", - "required": true - }, - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions", - "id": "appengine.apps.services.versions.create", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions", - "description": "Deploys new code and resource files to a new version.", - "request": { - "$ref": "Version" - } - }, "delete": { "description": "Deletes an existing version.", + "httpMethod": "DELETE", "response": { "$ref": "Operation" }, @@ -469,10 +326,6 @@ "servicesId", "versionsId" ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { "servicesId": { "description": "Part of `name`. See documentation of `appsId`.", @@ -493,11 +346,21 @@ "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "id": "appengine.apps.services.versions.delete", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}" + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.delete" }, "patch": { + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.patch", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.", + "request": { + "$ref": "Version" + }, "response": { "$ref": "Operation" }, @@ -507,15 +370,18 @@ "versionsId" ], "httpMethod": "PATCH", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { - "appsId": { - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", + "servicesId": { "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "Part of `name`. See documentation of `appsId`." + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", + "type": "string", + "required": true }, "mask": { "format": "google-fieldmask", @@ -528,43 +394,44 @@ "type": "string", "required": true, "location": "path" - }, - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" } }, - "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "id": "appengine.apps.services.versions.patch", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "request": { - "$ref": "Version" - }, - "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment." + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, "list": { "description": "Lists the versions of a service.", - "response": { - "$ref": "ListVersionsResponse" - }, + "httpMethod": "GET", "parameterOrder": [ "appsId", "servicesId" ], - "httpMethod": "GET", + "response": { + "$ref": "ListVersionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, "pageToken": { + "type": "string", "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" + "description": "Continuation token for fetching the next page of results." }, "appsId": { + "location": "path", "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", "type": "string", - "required": true, - "location": "path" + "required": true }, "pageSize": { "format": "int32", @@ -573,43 +440,30 @@ "location": "query" }, "view": { + "type": "string", "location": "query", "enum": [ "BASIC", "FULL" ], - "description": "Controls the set of fields returned in the List response.", - "type": "string" - }, - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true + "description": "Controls the set of fields returned in the List response." } }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions", - "id": "appengine.apps.services.versions.list", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions" + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions", + "id": "appengine.apps.services.versions.list" }, "get": { - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "id": "appengine.apps.services.versions.get", "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.", "httpMethod": "GET", - "response": { - "$ref": "Version" - }, "parameterOrder": [ "appsId", "servicesId", "versionsId" ], + "response": { + "$ref": "Version" + }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", @@ -617,25 +471,25 @@ ], "parameters": { "appsId": { + "location": "path", "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", "type": "string", - "required": true, - "location": "path" + "required": true }, "view": { + "location": "query", "enum": [ "BASIC", "FULL" ], "description": "Controls the set of fields returned in the Get response.", - "type": "string", - "location": "query" + "type": "string" }, "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true + "required": true, + "location": "path", + "description": "Part of `name`. See documentation of `appsId`." }, "servicesId": { "location": "path", @@ -644,13 +498,95 @@ "required": true } }, - "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}" + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.get" + }, + "create": { + "description": "Deploys new code and resource files to a new version.", + "request": { + "$ref": "Version" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId" + ], + "httpMethod": "POST", + "parameters": { + "servicesId": { + "type": "string", + "required": true, + "location": "path", + "description": "Part of `name`. See documentation of `appsId`." + }, + "appsId": { + "description": "Part of `name`. Name of the resource to update. For example: \"apps/myapp/services/default\".", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions", + "id": "appengine.apps.services.versions.create", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions" } }, "resources": { "instances": { "methods": { + "delete": { + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.services.versions.instances.delete", + "description": "Stops a running instance.", + "httpMethod": "DELETE", + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. For example: \"apps/myapp/services/default/versions/v1/instances/instance-1\".", + "type": "string", + "required": true, + "location": "path" + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}" + }, "list": { + "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).", "httpMethod": "GET", "parameterOrder": [ "appsId", @@ -668,15 +604,15 @@ "required": true }, "pageToken": { + "type": "string", "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" + "description": "Continuation token for fetching the next page of results." }, "appsId": { - "location": "path", "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", "type": "string", - "required": true + "required": true, + "location": "path" }, "pageSize": { "format": "int32", @@ -685,10 +621,10 @@ "location": "query" }, "versionsId": { - "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true + "required": true, + "location": "path" } }, "scopes": [ @@ -698,13 +634,9 @@ ], "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", - "id": "appengine.apps.services.versions.instances.list", - "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)." + "id": "appengine.apps.services.versions.instances.list" }, "get": { - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "id": "appengine.apps.services.versions.instances.get", - "description": "Gets instance information.", "httpMethod": "GET", "parameterOrder": [ "appsId", @@ -716,6 +648,12 @@ "$ref": "Instance" }, "parameters": { + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, "servicesId": { "location": "path", "description": "Part of `name`. See documentation of `appsId`.", @@ -729,16 +667,10 @@ "location": "path" }, "appsId": { + "location": "path", "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", "type": "string", - "required": true, - "location": "path" - }, - "versionsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" + "required": true } }, "scopes": [ @@ -746,13 +678,12 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}" + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.services.versions.instances.get", + "description": "Gets instance information." }, "debug": { - "request": { - "$ref": "DebugInstanceRequest" - }, - "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.", "response": { "$ref": "Operation" }, @@ -767,79 +698,38 @@ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, "instancesId": { - "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "type": "string", "required": true, "location": "path" }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true + }, "versionsId": { "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true } }, "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", "id": "appengine.apps.services.versions.instances.debug", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug" - }, - "delete": { - "description": "Stops a running instance.", - "httpMethod": "DELETE", - "response": { - "$ref": "Operation" + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", + "request": { + "$ref": "DebugInstanceRequest" }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "parameters": { - "versionsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "instancesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. For example: \"apps/myapp/services/default/versions/v1/instances/instance-1\".", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "id": "appengine.apps.services.versions.instances.delete" + "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment." } } } @@ -847,79 +737,106 @@ } } } + }, + "methods": { + "patch": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "PATCH", + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", + "type": "string", + "required": true + }, + "mask": { + "location": "query", + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta5/apps/{appsId}", + "id": "appengine.apps.patch", + "path": "v1beta5/apps/{appsId}", + "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.auth_domain)\ndefault_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.default_cookie_expiration)", + "request": { + "$ref": "Application" + } + }, + "get": { + "id": "appengine.apps.get", + "path": "v1beta5/apps/{appsId}", + "description": "Gets information about an application.", + "response": { + "$ref": "Application" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the application to get. Example: apps/myapp.", + "type": "string", + "required": true, + "location": "path" + }, + "ensureResourcesExist": { + "location": "query", + "description": "Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the GET operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete. Note: This parameter will be deprecated in a future version of the API.", + "type": "boolean" + } + }, + "flatPath": "v1beta5/apps/{appsId}" + }, + "create": { + "request": { + "$ref": "Application" + }, + "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1beta5/apps", + "path": "v1beta5/apps", + "id": "appengine.apps.create" + } } } }, "parameters": { - "upload_protocol": { + "access_token": { "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ] - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "alt": { - "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", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], + "description": "OAuth access token.", "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.", "type": "string", - "location": "query" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" + "location": "query", + "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." }, "quotaUser": { + "location": "query", "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.", - "type": "string", - "location": "query" + "type": "string" }, "pp": { "description": "Pretty-print response.", @@ -928,29 +845,84 @@ "location": "query" }, "bearer_token": { + "location": "query", "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", "type": "string", "location": "query" }, - "oauth_token": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "uploadType": { "location": "query", - "description": "OAuth 2.0 token for the current user.", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ] + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ] } }, "schemas": { "ListInstancesResponse": { "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, "instances": { "description": "The instances belonging to the requested version.", "items": { "$ref": "Instance" }, "type": "array" + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" } }, "id": "ListInstancesResponse", @@ -958,14 +930,14 @@ "type": "object" }, "ErrorHandler": { + "description": "Custom static error page to be served when an error occurs.", + "type": "object", "properties": { "mimeType": { - "description": "MIME type of file. Defaults to text/html.", - "type": "string" + "type": "string", + "description": "MIME type of file. Defaults to text/html." }, "errorCode": { - "description": "Error condition this handler applies to.", - "type": "string", "enumDescriptions": [ "Not specified. ERROR_CODE_DEFAULT is assumed.", "All other error types.", @@ -979,30 +951,21 @@ "ERROR_CODE_OVER_QUOTA", "ERROR_CODE_DOS_API_DENIAL", "ERROR_CODE_TIMEOUT" - ] + ], + "description": "Error condition this handler applies to.", + "type": "string" }, "staticFile": { "description": "Static file content to be served for this error.", "type": "string" } }, - "id": "ErrorHandler", - "description": "Custom static error page to be served when an error occurs.", - "type": "object" + "id": "ErrorHandler" }, "OperationMetadataV1": { "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - }, "warning": { "description": "Durable messages that persist on every operation poll. @OutputOnly", "items": { @@ -1026,39 +989,42 @@ "ephemeralMessage": { "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "type": "string", + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly" } }, "id": "OperationMetadataV1" }, "OperationMetadataV1Alpha": { - "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" + "type": "string", + "description": "User who requested this operation.@OutputOnly" }, "target": { "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", "type": "string" }, "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" + "type": "string", + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly" }, "method": { "description": "API method that initiated this operation. Example: google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly", "type": "string" }, "endTime": { + "type": "string", "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" + "description": "Time that this operation completed.@OutputOnly" }, "warning": { "description": "Durable messages that persist on every operation poll. @OutputOnly", @@ -1066,45 +1032,20 @@ "type": "string" }, "type": "array" - } - }, - "id": "OperationMetadataV1Alpha" - }, - "Network": { - "description": "Extra network settings. Only applicable for VM runtimes.", - "type": "object", - "properties": { - "subnetworkName": { - "description": "Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network.\nIf the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range.\nIf the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network.\nIf the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the Flex app.", - "type": "string" }, - "instanceTag": { - "description": "Tag to apply to the VM instance during creation.", - "type": "string" - }, - "forwardedPorts": { - "description": "List of ports, or port pairs, to forward from the virtual machine to the application container.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default.", + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", "type": "string" } }, - "id": "Network" + "id": "OperationMetadataV1Alpha", + "description": "Metadata for the given google.longrunning.Operation." }, "Application": { + "description": "An Application resource contains the top-level configuration of an App Engine application.", + "type": "object", "properties": { - "dispatchRules": { - "description": "HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent.@OutputOnly", - "items": { - "$ref": "UrlDispatchRule" - }, - "type": "array" - }, "defaultHostname": { "description": "Hostname used to reach the application, as resolved by App Engine.@OutputOnly", "type": "string" @@ -1134,41 +1075,67 @@ "type": "string" }, "location": { - "description": "Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US", - "type": "string" + "type": "string", + "description": "Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US" }, "defaultBucket": { "description": "A Google Cloud Storage bucket that can be used by the application to store content.@OutputOnly", "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.@OutputOnly", + "items": { + "$ref": "UrlDispatchRule" + }, + "type": "array" } }, - "id": "Application", - "description": "An Application resource contains the top-level configuration of an App Engine application.", - "type": "object" + "id": "Application" }, - "UrlDispatchRule": { + "Network": { + "id": "Network", + "description": "Extra network settings. Only applicable for VM runtimes.", + "type": "object", "properties": { - "service": { - "description": "Resource id of a service in this application that should serve the matched request. The service must already exist. Example: default.", + "subnetworkName": { + "description": "Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network.\nIf the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range.\nIf the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network.\nIf the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the Flex app.", "type": "string" }, - "domain": { - "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\".", + "instanceTag": { + "description": "Tag to apply to the VM instance during creation.", "type": "string" }, - "path": { - "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters.", - "type": "string" + "forwardedPorts": { + "description": "List of ports, or port pairs, to forward from the virtual machine to the application container.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "type": "string", + "description": "Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default." } - }, - "id": "UrlDispatchRule", - "description": "Rules to match an HTTP request and dispatch that request to a service.", - "type": "object" + } }, "Instance": { "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", "type": "object", "properties": { + "requests": { + "format": "int32", + "description": "Number of requests since this instance was started.@OutputOnly", + "type": "integer" + }, + "appEngineRelease": { + "description": "App Engine release this instance is running on.@OutputOnly", + "type": "string" + }, + "startTimestamp": { + "format": "google-datetime", + "description": "Time that this instance was started.@OutputOnly", + "type": "string" + }, "vmName": { "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "string" @@ -1182,10 +1149,6 @@ "description": "Average queries per second (QPS) over the last minute.@OutputOnly", "type": "number" }, - "name": { - "description": "Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly", - "type": "string" - }, "vmZoneName": { "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "string" @@ -1194,6 +1157,10 @@ "description": "Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "boolean" }, + "name": { + "description": "Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly", + "type": "string" + }, "averageLatency": { "format": "int32", "description": "Average latency (ms) over the last minute.@OutputOnly", @@ -1212,63 +1179,68 @@ "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly", "type": "string" }, + "vmStatus": { + "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, "availability": { + "enumDescriptions": [ + "", + "", + "" + ], "enum": [ "UNSPECIFIED", "RESIDENT", "DYNAMIC" ], "description": "Availability of the instance.@OutputOnly", - "type": "string", - "enumDescriptions": [ - "", - "", - "" - ] - }, - "vmStatus": { - "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "string" }, "errors": { "format": "uint32", "description": "Number of errors since this instance was started.@OutputOnly", "type": "integer" - }, - "requests": { - "format": "int32", - "description": "Number of requests since this instance was started.@OutputOnly", - "type": "integer" - }, - "appEngineRelease": { - "description": "App Engine release this instance is running on.@OutputOnly", - "type": "string" - }, - "startTimestamp": { - "format": "google-datetime", - "description": "Time that this instance was started.@OutputOnly", - "type": "string" } }, "id": "Instance" }, - "ListVersionsResponse": { + "UrlDispatchRule": { + "id": "UrlDispatchRule", + "description": "Rules to match an HTTP request and dispatch that request to a service.", + "type": "object", "properties": { + "service": { + "description": "Resource id of a service in this application that should serve the matched request. The service must already exist. Example: default.", + "type": "string" + }, + "domain": { + "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\".", + "type": "string" + }, + "path": { + "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters.", + "type": "string" + } + } + }, + "ListVersionsResponse": { + "description": "Response message for Versions.ListVersions.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, "versions": { "description": "The versions belonging to the requested service.", "items": { "$ref": "Version" }, "type": "array" - }, - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" } }, - "id": "ListVersionsResponse", - "description": "Response message for Versions.ListVersions.", - "type": "object" + "id": "ListVersionsResponse" }, "ApiEndpointHandler": { "description": "Uses Google Cloud Endpoints to handle requests.", @@ -1285,6 +1257,11 @@ "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", "type": "object", "properties": { + "maxTotalInstances": { + "format": "int32", + "description": "Maximum number of instances that should be started to handle requests.", + "type": "integer" + }, "minTotalInstances": { "format": "int32", "description": "Minimum number of instances that should be maintained for this version.", @@ -1314,8 +1291,8 @@ "description": "Target scaling by CPU usage." }, "diskUtilization": { - "description": "Target scaling by disk usage.", - "$ref": "DiskUtilization" + "$ref": "DiskUtilization", + "description": "Target scaling by disk usage." }, "minPendingLatency": { "format": "google-duration", @@ -1335,45 +1312,10 @@ "format": "int32", "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a module.", "type": "integer" - }, - "maxTotalInstances": { - "format": "int32", - "description": "Maximum number of instances that should be started to handle requests.", - "type": "integer" } }, "id": "AutomaticScaling" }, - "Location": { - "description": "A resource that represents Google Cloud Platform location.", - "type": "object", - "properties": { - "name": { - "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", - "type": "string" - }, - "locationId": { - "description": "The canonical id for this location. For example: \"us-east1\".", - "type": "string" - }, - "metadata": { - "description": "Service-specific metadata. For example the available capacity at the given location.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "labels": { - "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "id": "Location" - }, "NetworkUtilization": { "description": "Target scaling by network usage. Only applicable for VM runtimes.", "type": "object", @@ -1389,9 +1331,9 @@ "type": "integer" }, "targetReceivedPacketsPerSec": { + "type": "integer", "format": "int32", - "description": "Target packets received per second.", - "type": "integer" + "description": "Target packets received per second." }, "targetSentBytesPerSec": { "format": "int32", @@ -1401,10 +1343,45 @@ }, "id": "NetworkUtilization" }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "type": "object", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", + "type": "string" + }, + "locationId": { + "description": "The canonical id for this location. For example: \"us-east1\".", + "type": "string" + }, + "metadata": { + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + }, + "id": "Location" + }, "HealthCheck": { "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", "type": "object", "properties": { + "unhealthyThreshold": { + "format": "uint32", + "description": "Number of consecutive failed health checks required before removing traffic.", + "type": "integer" + }, "disableHealthCheck": { "description": "Whether to explicitly disable health checks for this instance.", "type": "boolean" @@ -1432,11 +1409,6 @@ "format": "google-duration", "description": "Time before the health check is considered failed.", "type": "string" - }, - "unhealthyThreshold": { - "format": "uint32", - "description": "Number of consecutive failed health checks required before removing traffic.", - "type": "integer" } }, "id": "HealthCheck" @@ -1471,13 +1443,13 @@ "description": "Third-party Python runtime library that is required by the application.", "type": "object", "properties": { - "version": { - "description": "Version of the library to select, or \"latest\".", - "type": "string" - }, "name": { "description": "Name of the library. Example: \"django\".", "type": "string" + }, + "version": { + "description": "Version of the library to select, or \"latest\".", + "type": "string" } }, "id": "Library" @@ -1486,16 +1458,6 @@ "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { - "insertTime": { - "format": "google-datetime", - "description": "Timestamp that this operation was created.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Timestamp that this operation completed.@OutputOnly", - "type": "string" - }, "target": { "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", "type": "string" @@ -1507,114 +1469,42 @@ "method": { "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Timestamp that this operation was created.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Timestamp that this operation completed.@OutputOnly", + "type": "string" } }, "id": "OperationMetadataV1Beta5" }, "ListLocationsResponse": { - "description": "The response message for Locations.ListLocations.", - "type": "object", "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, "locations": { "description": "A list of locations that matches the specified filter in the request.", "items": { "$ref": "Location" }, "type": "array" - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" } }, - "id": "ListLocationsResponse" - }, - "ContainerInfo": { - "properties": { - "image": { - "description": "URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"", - "type": "string" - } - }, - "id": "ContainerInfo", - "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment.", + "id": "ListLocationsResponse", + "description": "The response message for Locations.ListLocations.", "type": "object" }, "Version": { "description": "A Version resource is a specific set of source code and configuration files that are deployed into a service.", "type": "object", "properties": { - "apiConfig": { - "$ref": "ApiConfigHandler", - "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set." - }, - "endpointsApiService": { - "$ref": "EndpointsApiService", - "description": "Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app." - }, - "vm": { - "description": "Whether to deploy this version in a container on a virtual machine.", - "type": "boolean" - }, - "instanceClass": { - "description": "Instance class that is used to run this version. Valid values are:\nAutomaticScaling: F1, F2, F4, F4_1G\nManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.", - "type": "string" - }, - "servingStatus": { - "enumDescriptions": [ - "Not specified.", - "Currently serving. Instances are created according to the scaling settings of the version.", - "Disabled from serving. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." - ], - "enum": [ - "SERVING_STATUS_UNSPECIFIED", - "SERVING", - "STOPPED" - ], - "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", - "type": "string" - }, - "deployment": { - "$ref": "Deployment", - "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set." - }, - "runtimeApiVersion": { - "description": "The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/\u003clanguage\u003e/config/appref", - "type": "string" - }, - "resources": { - "description": "Machine resources for this version. Only applicable for VM runtimes.", - "$ref": "Resources" - }, - "inboundServices": { - "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", - "items": { - "enum": [ - "INBOUND_SERVICE_UNSPECIFIED", - "INBOUND_SERVICE_MAIL", - "INBOUND_SERVICE_MAIL_BOUNCE", - "INBOUND_SERVICE_XMPP_ERROR", - "INBOUND_SERVICE_XMPP_MESSAGE", - "INBOUND_SERVICE_XMPP_SUBSCRIBE", - "INBOUND_SERVICE_XMPP_PRESENCE", - "INBOUND_SERVICE_CHANNEL_PRESENCE", - "INBOUND_SERVICE_WARMUP" - ], - "type": "string" - }, - "type": "array", - "enumDescriptions": [ - "Not specified.", - "Allows an application to receive mail.", - "Allows an application to receive email-bound notifications.", - "Allows an application to receive error stanzas.", - "Allows an application to receive instant messages.", - "Allows an application to receive user subscription POSTs.", - "Allows an application to receive a user's chat presence.", - "Registers an application for notifications when a client connects or disconnects from a channel.", - "Enables warmup requests." - ] - }, "errorHandlers": { "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", "items": { @@ -1634,15 +1524,15 @@ }, "type": "array" }, - "nobuildFilesRegex": { - "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.", - "type": "string" - }, "creationTime": { "format": "google-datetime", "description": "Time that this version was created.@OutputOnly", "type": "string" }, + "nobuildFilesRegex": { + "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.", + "type": "string" + }, "basicScaling": { "$ref": "BasicScaling", "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity." @@ -1663,15 +1553,15 @@ } }, "network": { - "description": "Extra network settings. Only applicable for VM runtimes.", - "$ref": "Network" + "$ref": "Network", + "description": "Extra network settings. Only applicable for VM runtimes." }, "betaSettings": { - "description": "Metadata settings that are supplied to this version to enable beta runtime features.", - "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "Metadata settings that are supplied to this version to enable beta runtime features.", + "type": "object" }, "env": { "description": "App Engine execution environment to use for this version.Defaults to 1.", @@ -1706,18 +1596,99 @@ "type": "boolean" }, "manualScaling": { - "$ref": "ManualScaling", - "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time." + "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", + "$ref": "ManualScaling" }, "name": { "description": "Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly", "type": "string" + }, + "apiConfig": { + "$ref": "ApiConfigHandler", + "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set." + }, + "endpointsApiService": { + "description": "Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app.", + "$ref": "EndpointsApiService" + }, + "vm": { + "description": "Whether to deploy this version in a container on a virtual machine.", + "type": "boolean" + }, + "instanceClass": { + "description": "Instance class that is used to run this version. Valid values are:\nAutomaticScaling: F1, F2, F4, F4_1G\nManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.", + "type": "string" + }, + "servingStatus": { + "type": "string", + "enumDescriptions": [ + "Not specified.", + "Currently serving. Instances are created according to the scaling settings of the version.", + "Disabled from serving. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." + ], + "enum": [ + "SERVING_STATUS_UNSPECIFIED", + "SERVING", + "STOPPED" + ], + "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING." + }, + "runtimeApiVersion": { + "type": "string", + "description": "The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/\u003clanguage\u003e/config/appref" + }, + "deployment": { + "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set.", + "$ref": "Deployment" + }, + "inboundServices": { + "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", + "items": { + "type": "string", + "enum": [ + "INBOUND_SERVICE_UNSPECIFIED", + "INBOUND_SERVICE_MAIL", + "INBOUND_SERVICE_MAIL_BOUNCE", + "INBOUND_SERVICE_XMPP_ERROR", + "INBOUND_SERVICE_XMPP_MESSAGE", + "INBOUND_SERVICE_XMPP_SUBSCRIBE", + "INBOUND_SERVICE_XMPP_PRESENCE", + "INBOUND_SERVICE_CHANNEL_PRESENCE", + "INBOUND_SERVICE_WARMUP" + ] + }, + "type": "array", + "enumDescriptions": [ + "Not specified.", + "Allows an application to receive mail.", + "Allows an application to receive email-bound notifications.", + "Allows an application to receive error stanzas.", + "Allows an application to receive instant messages.", + "Allows an application to receive user subscription POSTs.", + "Allows an application to receive a user's chat presence.", + "Registers an application for notifications when a client connects or disconnects from a channel.", + "Enables warmup requests." + ] + }, + "resources": { + "$ref": "Resources", + "description": "Machine resources for this version. Only applicable for VM runtimes." } }, "id": "Version" }, + "ContainerInfo": { + "type": "object", + "properties": { + "image": { + "description": "URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"", + "type": "string" + } + }, + "id": "ContainerInfo", + "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment." + }, "RequestUtilization": { - "description": "Target scaling by request utilization. Only applicable for VM runtimes.", "type": "object", "properties": { "targetConcurrentRequests": { @@ -1731,22 +1702,8 @@ "type": "integer" } }, - "id": "RequestUtilization" - }, - "EndpointsApiService": { - "properties": { - "configId": { - "description": "Endpoints service configuration id as specified by the Service Management API. For example \"2016-09-19r1\"", - "type": "string" - }, - "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" - } - }, - "id": "EndpointsApiService", - "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", - "type": "object" + "id": "RequestUtilization", + "description": "Target scaling by request utilization. Only applicable for VM runtimes." }, "UrlMap": { "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code, or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", @@ -1775,13 +1732,6 @@ ] }, "securityLevel": { - "enumDescriptions": [ - "Not specified.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", - "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", - "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." - ], "enum": [ "SECURE_UNSPECIFIED", "SECURE_DEFAULT", @@ -1790,7 +1740,14 @@ "SECURE_ALWAYS" ], "description": "Security (HTTPS) enforcement for this URL.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Not specified.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", + "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." + ] }, "authFailAction": { "enumDescriptions": [ @@ -1815,12 +1772,6 @@ "type": "string" }, "login": { - "enumDescriptions": [ - "Not specified. LOGIN_OPTIONAL is assumed.", - "Does not require that the user is signed in.", - "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", - "If the user has signed in, the handler proceeds normally. Otherwise, the action given in auth_fail_action is taken." - ], "enum": [ "LOGIN_UNSPECIFIED", "LOGIN_OPTIONAL", @@ -1828,7 +1779,13 @@ "LOGIN_REQUIRED" ], "description": "Level of login required to access this resource.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Not specified. LOGIN_OPTIONAL is assumed.", + "Does not require that the user is signed in.", + "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", + "If the user has signed in, the handler proceeds normally. Otherwise, the action given in auth_fail_action is taken." + ] }, "apiEndpoint": { "description": "Uses API Endpoints to handle requests.", @@ -1837,10 +1794,39 @@ }, "id": "UrlMap" }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a network API call.", + "EndpointsApiService": { + "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", "type": "object", "properties": { + "configId": { + "type": "string", + "description": "Endpoints service configuration id as specified by the Service Management API. For example \"2016-09-19r1\"" + }, + "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" + } + }, + "id": "EndpointsApiService" + }, + "Operation": { + "properties": { + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + }, + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any." + }, "done": { "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", "type": "boolean" @@ -1852,25 +1838,11 @@ }, "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", - "type": "string" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object" } }, - "id": "Operation" + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object" }, "ApiConfigHandler": { "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", @@ -1897,6 +1869,7 @@ "type": "string" }, "securityLevel": { + "type": "string", "enumDescriptions": [ "Not specified.", "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", @@ -1911,12 +1884,9 @@ "SECURE_OPTIONAL", "SECURE_ALWAYS" ], - "description": "Security (HTTPS) enforcement for this URL.", - "type": "string" + "description": "Security (HTTPS) enforcement for this URL." }, "authFailAction": { - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "type": "string", "enumDescriptions": [ "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", @@ -1926,7 +1896,9 @@ "AUTH_FAIL_ACTION_UNSPECIFIED", "AUTH_FAIL_ACTION_REDIRECT", "AUTH_FAIL_ACTION_UNAUTHORIZED" - ] + ], + "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "type": "string" }, "script": { "description": "Path to the script from the application root directory.", @@ -1935,34 +1907,29 @@ }, "id": "ApiConfigHandler" }, - "ScriptHandler": { + "FileInfo": { "properties": { - "scriptPath": { - "description": "Path to the script from the application root directory.", + "sha1Sum": { + "description": "The SHA1 hash of the file, in hex.", + "type": "string" + }, + "mimeType": { + "type": "string", + "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage." + }, + "sourceUrl": { + "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", "type": "string" } }, - "id": "ScriptHandler", - "description": "Executes a script to handle the request that matches the URL pattern.", + "id": "FileInfo", + "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", "type": "object" }, "StaticFilesHandler": { "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", "type": "object", "properties": { - "requireMatchingFile": { - "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", - "type": "boolean" - }, - "expiration": { - "format": "google-duration", - "description": "Time a static file served by this handler should be cached.", - "type": "string" - }, - "applicationReadable": { - "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", - "type": "boolean" - }, "httpHeaders": { "additionalProperties": { "type": "string" @@ -1970,6 +1937,10 @@ "description": "HTTP headers to use for all responses from these URLs.", "type": "object" }, + "applicationReadable": { + "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", + "type": "boolean" + }, "uploadPathRegex": { "description": "Regular expression that matches the file paths for all files that should be referenced by this handler.", "type": "string" @@ -1981,50 +1952,39 @@ "mimeType": { "description": "MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are derived from each file's filename extension.", "type": "string" + }, + "requireMatchingFile": { + "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", + "type": "boolean" + }, + "expiration": { + "format": "google-duration", + "description": "Time a static file served by this handler should be cached.", + "type": "string" } }, "id": "StaticFilesHandler" }, - "FileInfo": { + "ScriptHandler": { + "id": "ScriptHandler", + "description": "Executes a script to handle the request that matches the URL pattern.", + "type": "object", "properties": { - "mimeType": { - "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", - "type": "string" - }, - "sourceUrl": { - "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", - "type": "string" - }, - "sha1Sum": { - "description": "The SHA1 hash of the file, in hex.", - "type": "string" + "scriptPath": { + "type": "string", + "description": "Path to the script from the application root directory." } - }, - "id": "FileInfo", - "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", - "type": "object" - }, - "BasicScaling": { - "properties": { - "maxInstances": { - "format": "int32", - "description": "Maximum number of instances to create for this version.", - "type": "integer" - }, - "idleTimeout": { - "format": "google-duration", - "description": "Duration of time after the last request that an instance must wait before the instance is shut down.", - "type": "string" - } - }, - "id": "BasicScaling", - "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", - "type": "object" + } }, "DiskUtilization": { "description": "Target scaling by disk usage. Only applicable for VM runtimes.", "type": "object", "properties": { + "targetWriteBytesPerSec": { + "format": "int32", + "description": "Target bytes written per second.", + "type": "integer" + }, "targetReadOpsPerSec": { "format": "int32", "description": "Target ops read per second.", @@ -2039,19 +1999,39 @@ "format": "int32", "description": "Target ops written per second.", "type": "integer" - }, - "targetWriteBytesPerSec": { - "format": "int32", - "description": "Target bytes written per second.", - "type": "integer" } }, "id": "DiskUtilization" }, + "BasicScaling": { + "id": "BasicScaling", + "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", + "type": "object", + "properties": { + "maxInstances": { + "format": "int32", + "description": "Maximum number of instances to create for this version.", + "type": "integer" + }, + "idleTimeout": { + "format": "google-duration", + "description": "Duration of time after the last request that an instance must wait before the instance is shut down.", + "type": "string" + } + } + }, "OperationMetadataExperimental": { "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, "method": { "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", "type": "string" @@ -2065,14 +2045,6 @@ "format": "google-datetime", "description": "Time that this operation completed.@OutputOnly", "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" } }, "id": "OperationMetadataExperimental" @@ -2082,9 +2054,9 @@ "type": "object", "properties": { "aggregationWindowLength": { + "type": "string", "format": "google-duration", - "description": "Period of time over which CPU utilization is calculated.", - "type": "string" + "description": "Period of time over which CPU utilization is calculated." }, "targetUtilization": { "format": "double", @@ -2094,14 +2066,37 @@ }, "id": "CpuUtilization" }, + "Status": { + "type": "object", + "properties": { + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "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" + }, + "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" + } + }, + "id": "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." + }, "IdentityAwareProxy": { "description": "Identity-Aware Proxy", "type": "object", "properties": { - "enabled": { - "description": "Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty.", - "type": "boolean" - }, "oauth2ClientSecret": { "description": "For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly", "type": "string" @@ -2113,38 +2108,16 @@ "oauth2ClientSecretSha256": { "description": "Hex-encoded SHA-256 hash of the client secret.@OutputOnly", "type": "string" + }, + "enabled": { + "type": "boolean", + "description": "Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty." } }, "id": "IdentityAwareProxy" }, - "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.", - "type": "object", - "properties": { - "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" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "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" - } - }, - "id": "Status" - }, "ManualScaling": { + "type": "object", "properties": { "instances": { "format": "int32", @@ -2153,20 +2126,19 @@ } }, "id": "ManualScaling", - "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", - "type": "object" + "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time." }, "TrafficSplit": { "description": "Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.", "type": "object", "properties": { "allocations": { - "description": "Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", - "type": "object", "additionalProperties": { "format": "double", "type": "number" - } + }, + "description": "Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", + "type": "object" }, "shardBy": { "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", @@ -2189,13 +2161,13 @@ "description": "Metadata for the given google.cloud.location.Location.", "type": "object", "properties": { - "standardEnvironmentAvailable": { - "description": "App Engine Standard Environment is available in the given location.@OutputOnly", - "type": "boolean" - }, "flexibleEnvironmentAvailable": { "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", "type": "boolean" + }, + "standardEnvironmentAvailable": { + "description": "App Engine Standard Environment is available in the given location.@OutputOnly", + "type": "boolean" } }, "id": "LocationMetadata" @@ -2204,26 +2176,14 @@ "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" + "user": { + "type": "string", + "description": "User who requested this operation.@OutputOnly" }, "target": { "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", "type": "string" }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, "ephemeralMessage": { "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", "type": "string" @@ -2236,11 +2196,26 @@ "format": "google-datetime", "description": "Time that this operation completed.@OutputOnly", "type": "string" + }, + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" } }, "id": "OperationMetadataV1Beta" }, "ListServicesResponse": { + "id": "ListServicesResponse", + "description": "Response message for Services.ListServices.", + "type": "object", "properties": { "nextPageToken": { "description": "Continuation token for fetching the next page of results.", @@ -2253,10 +2228,36 @@ }, "type": "array" } - }, - "id": "ListServicesResponse", - "description": "Response message for Services.ListServices.", - "type": "object" + } + }, + "Resources": { + "id": "Resources", + "description": "Machine resources for a version.", + "type": "object", + "properties": { + "volumes": { + "description": "Volumes mounted within the app container.", + "items": { + "$ref": "Volume" + }, + "type": "array" + }, + "diskGb": { + "type": "number", + "format": "double", + "description": "Disk size (GB) needed." + }, + "memoryGb": { + "format": "double", + "description": "Memory (GB) needed.", + "type": "number" + }, + "cpu": { + "format": "double", + "description": "Number of CPU cores needed.", + "type": "number" + } + } }, "Deployment": { "description": "Code and application artifacts used to deploy a version to App Engine.", @@ -2274,52 +2275,23 @@ "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment." }, "files": { + "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", + "type": "object", "additionalProperties": { "$ref": "FileInfo" - }, - "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", - "type": "object" + } } }, "id": "Deployment" }, - "Resources": { - "description": "Machine resources for a version.", - "type": "object", - "properties": { - "volumes": { - "description": "Volumes mounted within the app container.", - "items": { - "$ref": "Volume" - }, - "type": "array" - }, - "diskGb": { - "format": "double", - "description": "Disk size (GB) needed.", - "type": "number" - }, - "memoryGb": { - "format": "double", - "description": "Memory (GB) needed.", - "type": "number" - }, - "cpu": { - "format": "double", - "description": "Number of CPU cores needed.", - "type": "number" - } - }, - "id": "Resources" - }, "Volume": { "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", "type": "object", "properties": { "sizeGb": { + "type": "number", "format": "double", - "description": "Volume size in gigabytes.", - "type": "number" + "description": "Volume size in gigabytes." }, "name": { "description": "Unique name for the volume.", @@ -2333,6 +2305,8 @@ "id": "Volume" }, "Service": { + "description": "A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle other tasks such as API requests from mobile devices or backend data analysis. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.", + "type": "object", "properties": { "name": { "description": "Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly", @@ -2347,49 +2321,31 @@ "type": "string" } }, - "id": "Service", - "description": "A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle other tasks such as API requests from mobile devices or backend data analysis. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.", - "type": "object" + "id": "Service" }, "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", "type": "object", "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, "operations": { - "description": "A list of operations that matches the specified filter in the request.", "items": { "$ref": "Operation" }, - "type": "array" + "type": "array", + "description": "A list of operations that matches the specified filter in the request." + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" } }, - "id": "ListOperationsResponse" + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations." }, "OperationMetadata": { + "id": "OperationMetadata", "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { - "insertTime": { - "format": "google-datetime", - "description": "Timestamp that this operation was created.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", - "type": "string" - }, "endTime": { "format": "google-datetime", "description": "Timestamp that this operation completed.@OutputOnly", @@ -2398,14 +2354,58 @@ "operationType": { "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Timestamp that this operation was created.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", + "type": "string" } - }, - "id": "OperationMetadata" + } } }, - "protocol": "rest", "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - } + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "protocol": "rest", + "version": "v1beta5", + "baseUrl": "https://appengine.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/appengine.admin": { + "description": "View and manage your applications deployed on Google App Engine" + }, + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "servicePath": "", + "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", + "kind": "discovery#restDescription", + "rootUrl": "https://appengine.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "appengine", + "batchPath": "batch", + "revision": "20170901", + "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", + "id": "appengine:v1beta5" } diff --git a/vendor/google.golang.org/api/appsactivity/v1/appsactivity-api.json b/vendor/google.golang.org/api/appsactivity/v1/appsactivity-api.json index d475776b3..f743ed15f 100644 --- a/vendor/google.golang.org/api/appsactivity/v1/appsactivity-api.json +++ b/vendor/google.golang.org/api/appsactivity/v1/appsactivity-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/y29Ei9gfsS6BekrALyS-uw4tzTU\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/pDZ7o52oB1KPiP4jc8rmQ24ThMo\"", "discoveryVersion": "v1", "id": "appsactivity:v1", "name": "appsactivity", "version": "v1", - "revision": "20170215", + "revision": "20170619", "title": "G Suite Activity API", "description": "Provides a historical view of activity.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/appstate/v1/appstate-api.json b/vendor/google.golang.org/api/appstate/v1/appstate-api.json index b8ecc75d0..abc0e34f5 100644 --- a/vendor/google.golang.org/api/appstate/v1/appstate-api.json +++ b/vendor/google.golang.org/api/appstate/v1/appstate-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/u4lihwP33J0GgUtvl1xqXUmPaak\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/mbrci8GXE-W50F0APQRstWksGH8\"", "discoveryVersion": "v1", "id": "appstate:v1", "name": "appstate", "canonicalName": "App State", "version": "v1", - "revision": "20170601", + "revision": "20170831", "title": "Google App State API", "description": "The Google App State API.", "ownerDomain": "google.com", 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 5718b7d66..a19e34771 100644 --- a/vendor/google.golang.org/api/bigquery/v2/bigquery-api.json +++ b/vendor/google.golang.org/api/bigquery/v2/bigquery-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/13U3pV34J3OFMsQ27oCh5yZ4wck\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/9Y-B0QHiU2mw4FGTgPCBJA_ja7U\"", "discoveryVersion": "v1", "id": "bigquery:v2", "name": "bigquery", "version": "v2", - "revision": "20170730", + "revision": "20170903", "title": "BigQuery API", "description": "A data platform for customers to create, manage, share and query data.", "ownerDomain": "google.com", @@ -20,7 +20,7 @@ "basePath": "/bigquery/v2/", "rootUrl": "https://www.googleapis.com/", "servicePath": "bigquery/v2/", - "batchPath": "batch", + "batchPath": "batch/bigquery/v2", "parameters": { "alt": { "type": "string", @@ -377,6 +377,16 @@ } } }, + "EncryptionConfiguration": { + "id": "EncryptionConfiguration", + "type": "object", + "properties": { + "kmsKeyName": { + "type": "string", + "description": "[Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key." + } + } + }, "ErrorProto": { "id": "ErrorProto", "type": "object", @@ -403,6 +413,16 @@ "id": "ExplainQueryStage", "type": "object", "properties": { + "computeMsAvg": { + "type": "string", + "description": "Milliseconds the average shard spent on CPU-bound tasks.", + "format": "int64" + }, + "computeMsMax": { + "type": "string", + "description": "Milliseconds the slowest shard spent on CPU-bound tasks.", + "format": "int64" + }, "computeRatioAvg": { "type": "number", "description": "Relative amount of time the average shard spent on CPU-bound tasks.", @@ -422,6 +442,16 @@ "type": "string", "description": "Human-readable name for stage." }, + "readMsAvg": { + "type": "string", + "description": "Milliseconds the average shard spent reading input.", + "format": "int64" + }, + "readMsMax": { + "type": "string", + "description": "Milliseconds the slowest shard spent reading input.", + "format": "int64" + }, "readRatioAvg": { "type": "number", "description": "Relative amount of time the average shard spent reading input.", @@ -442,6 +472,16 @@ "description": "Number of records written by the stage.", "format": "int64" }, + "shuffleOutputBytes": { + "type": "string", + "description": "Total number of bytes written to shuffle.", + "format": "int64" + }, + "shuffleOutputBytesSpilled": { + "type": "string", + "description": "Total number of bytes written to shuffle and spilled to disk.", + "format": "int64" + }, "status": { "type": "string", "description": "Current status for the stage." @@ -453,6 +493,16 @@ "$ref": "ExplainQueryStep" } }, + "waitMsAvg": { + "type": "string", + "description": "Milliseconds the average shard spent waiting to be scheduled.", + "format": "int64" + }, + "waitMsMax": { + "type": "string", + "description": "Milliseconds the slowest shard spent waiting to be scheduled.", + "format": "int64" + }, "waitRatioAvg": { "type": "number", "description": "Relative amount of time the average shard spent waiting to be scheduled.", @@ -463,6 +513,16 @@ "description": "Relative amount of time the slowest shard spent waiting to be scheduled.", "format": "double" }, + "writeMsAvg": { + "type": "string", + "description": "Milliseconds the average shard spent on writing output.", + "format": "int64" + }, + "writeMsMax": { + "type": "string", + "description": "Milliseconds the slowest shard spent on writing output.", + "format": "int64" + }, "writeRatioAvg": { "type": "number", "description": "Relative amount of time the average shard spent on writing output.", @@ -535,7 +595,7 @@ }, "sourceUris": { "type": "array", - "description": "[Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified, and it must end with '.backup_info'. Also, the '*' wildcard character is not allowed.", + "description": "[Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '*' wildcard character is not allowed.", "items": { "type": "string" } @@ -606,6 +666,21 @@ } } }, + "GetServiceAccountResponse": { + "id": "GetServiceAccountResponse", + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The service account email address." + }, + "kind": { + "type": "string", + "description": "The resource type of the response.", + "default": "bigquery#getServiceAccountResponse" + } + } + }, "GoogleSheetsOptions": { "id": "GoogleSheetsOptions", "type": "object", @@ -766,6 +841,10 @@ "type": "string", "description": "[Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion." }, + "destinationEncryptionConfiguration": { + "$ref": "EncryptionConfiguration", + "description": "[Experimental] Custom encryption configuration (e.g., Cloud KMS keys)." + }, "destinationTable": { "$ref": "TableReference", "description": "[Required] The destination table to load the data into." @@ -834,11 +913,15 @@ }, "sourceUris": { "type": "array", - "description": "[Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups: Exactly one URI can be specified, and it must end with '.backup_info'. Also, the '*' wildcard character is not allowed.", + "description": "[Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups: Exactly one URI can be specified. Also, the '*' wildcard character is not allowed.", "items": { "type": "string" } }, + "timePartitioning": { + "$ref": "TimePartitioning", + "description": "[Experimental] If specified, configures time-based partitioning for the destination table." + }, "writeDisposition": { "type": "string", "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." @@ -862,6 +945,10 @@ "$ref": "DatasetReference", "description": "[Optional] Specifies the default dataset to use for unqualified table names in the query." }, + "destinationEncryptionConfiguration": { + "$ref": "EncryptionConfiguration", + "description": "[Experimental] Custom encryption configuration (e.g., Cloud KMS keys)." + }, "destinationTable": { "$ref": "TableReference", "description": "[Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results. This property must be set for large results that exceed the maximum response size." @@ -919,6 +1006,10 @@ "$ref": "ExternalDataConfiguration" } }, + "timePartitioning": { + "$ref": "TimePartitioning", + "description": "[Experimental] If specified, configures time-based partitioning for the destination table." + }, "useLegacySql": { "type": "boolean", "description": "Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ When useLegacySql is set to false, the value of flattenResults is ignored; query will be run as if flattenResults is false." @@ -949,6 +1040,10 @@ "type": "string", "description": "[Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion." }, + "destinationEncryptionConfiguration": { + "$ref": "EncryptionConfiguration", + "description": "[Experimental] Custom encryption configuration (e.g., Cloud KMS keys)." + }, "destinationTable": { "$ref": "TableReference", "description": "[Required] The destination table" @@ -1533,6 +1628,10 @@ "type": "string", "description": "[Optional] A user-friendly description of this table." }, + "encryptionConfiguration": { + "$ref": "EncryptionConfiguration", + "description": "[Experimental] Custom encryption configuration (e.g., Cloud KMS keys)." + }, "etag": { "type": "string", "description": "[Output-only] A hash of this resource." @@ -1904,9 +2003,13 @@ "description": "[Optional] Number of milliseconds for which to keep the storage for a partition.", "format": "int64" }, + "field": { + "type": "string", + "description": "[Experimental] [Optional] If not set, the table is partitioned by pseudo column '_PARTITIONTIME'; if set, the table is partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED." + }, "type": { "type": "string", - "description": "[Required] The only type supported is DAY, which will generate one partition per day based on data loading time." + "description": "[Required] The only type supported is DAY, which will generate one partition per day." } } }, @@ -2425,6 +2528,31 @@ }, "projects": { "methods": { + "getServiceAccount": { + "id": "bigquery.projects.getServiceAccount", + "path": "projects/{projectId}/serviceAccount", + "httpMethod": "GET", + "description": "Returns the email address of the service account for your project used for interactions with Google Cloud KMS.", + "parameters": { + "projectId": { + "type": "string", + "description": "Project ID for which the service account is requested.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "GetServiceAccountResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, "list": { "id": "bigquery.projects.list", "path": "projects", 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 68d353546..0b53fd4e0 100644 --- a/vendor/google.golang.org/api/bigquery/v2/bigquery-gen.go +++ b/vendor/google.golang.org/api/bigquery/v2/bigquery-gen.go @@ -660,6 +660,36 @@ func (s *DatasetReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type EncryptionConfiguration struct { + // KmsKeyName: [Optional] Describes the Cloud KMS encryption key that + // will be used to protect destination BigQuery table. The BigQuery + // Service Account associated with your project requires access to this + // encryption key. + KmsKeyName string `json:"kmsKeyName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "KmsKeyName") 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. "KmsKeyName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *EncryptionConfiguration) MarshalJSON() ([]byte, error) { + type noMethod EncryptionConfiguration + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ErrorProto struct { // DebugInfo: Debugging information. This property is internal to Google // and should not be used. @@ -698,6 +728,14 @@ func (s *ErrorProto) MarshalJSON() ([]byte, error) { } type ExplainQueryStage struct { + // ComputeMsAvg: Milliseconds the average shard spent on CPU-bound + // tasks. + ComputeMsAvg int64 `json:"computeMsAvg,omitempty,string"` + + // ComputeMsMax: Milliseconds the slowest shard spent on CPU-bound + // tasks. + ComputeMsMax int64 `json:"computeMsMax,omitempty,string"` + // ComputeRatioAvg: Relative amount of time the average shard spent on // CPU-bound tasks. ComputeRatioAvg float64 `json:"computeRatioAvg,omitempty"` @@ -712,6 +750,12 @@ type ExplainQueryStage struct { // Name: Human-readable name for stage. Name string `json:"name,omitempty"` + // ReadMsAvg: Milliseconds the average shard spent reading input. + ReadMsAvg int64 `json:"readMsAvg,omitempty,string"` + + // ReadMsMax: Milliseconds the slowest shard spent reading input. + ReadMsMax int64 `json:"readMsMax,omitempty,string"` + // ReadRatioAvg: Relative amount of time the average shard spent reading // input. ReadRatioAvg float64 `json:"readRatioAvg,omitempty"` @@ -726,6 +770,13 @@ type ExplainQueryStage struct { // RecordsWritten: Number of records written by the stage. RecordsWritten int64 `json:"recordsWritten,omitempty,string"` + // ShuffleOutputBytes: Total number of bytes written to shuffle. + ShuffleOutputBytes int64 `json:"shuffleOutputBytes,omitempty,string"` + + // ShuffleOutputBytesSpilled: Total number of bytes written to shuffle + // and spilled to disk. + ShuffleOutputBytesSpilled int64 `json:"shuffleOutputBytesSpilled,omitempty,string"` + // Status: Current status for the stage. Status string `json:"status,omitempty"` @@ -733,6 +784,14 @@ type ExplainQueryStage struct { // (approximately chronological). Steps []*ExplainQueryStep `json:"steps,omitempty"` + // WaitMsAvg: Milliseconds the average shard spent waiting to be + // scheduled. + WaitMsAvg int64 `json:"waitMsAvg,omitempty,string"` + + // WaitMsMax: Milliseconds the slowest shard spent waiting to be + // scheduled. + WaitMsMax int64 `json:"waitMsMax,omitempty,string"` + // WaitRatioAvg: Relative amount of time the average shard spent waiting // to be scheduled. WaitRatioAvg float64 `json:"waitRatioAvg,omitempty"` @@ -741,6 +800,12 @@ type ExplainQueryStage struct { // to be scheduled. WaitRatioMax float64 `json:"waitRatioMax,omitempty"` + // WriteMsAvg: Milliseconds the average shard spent on writing output. + WriteMsAvg int64 `json:"writeMsAvg,omitempty,string"` + + // WriteMsMax: Milliseconds the slowest shard spent on writing output. + WriteMsMax int64 `json:"writeMsMax,omitempty,string"` + // WriteRatioAvg: Relative amount of time the average shard spent on // writing output. WriteRatioAvg float64 `json:"writeRatioAvg,omitempty"` @@ -749,7 +814,7 @@ type ExplainQueryStage struct { // writing output. WriteRatioMax float64 `json:"writeRatioMax,omitempty"` - // ForceSendFields is a list of field names (e.g. "ComputeRatioAvg") to + // ForceSendFields is a list of field names (e.g. "ComputeMsAvg") 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 @@ -757,13 +822,12 @@ type ExplainQueryStage struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ComputeRatioAvg") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "ComputeMsAvg") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -894,8 +958,8 @@ type ExternalDataConfiguration struct { // data sources. For Google Cloud Bigtable URIs: Exactly one URI can be // specified and it has be a fully specified and valid HTTPS URL for a // Google Cloud Bigtable table. For Google Cloud Datastore backups, - // exactly one URI can be specified, and it must end with - // '.backup_info'. Also, the '*' wildcard character is not allowed. + // exactly one URI can be specified. Also, the '*' wildcard character is + // not allowed. SourceUris []string `json:"sourceUris,omitempty"` // ForceSendFields is a list of field names (e.g. "Autodetect") to @@ -1004,6 +1068,40 @@ func (s *GetQueryResultsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type GetServiceAccountResponse struct { + // Email: The service account email address. + Email string `json:"email,omitempty"` + + // Kind: The resource type of the response. + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Email") 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. "Email") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GetServiceAccountResponse) MarshalJSON() ([]byte, error) { + type noMethod GetServiceAccountResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type GoogleSheetsOptions struct { // SkipLeadingRows: [Optional] The number of rows at the top of a sheet // that BigQuery will skip when reading the data. The default value is @@ -1271,6 +1369,10 @@ type JobConfigurationLoad struct { // one atomic update upon job completion. CreateDisposition string `json:"createDisposition,omitempty"` + // DestinationEncryptionConfiguration: [Experimental] Custom encryption + // configuration (e.g., Cloud KMS keys). + DestinationEncryptionConfiguration *EncryptionConfiguration `json:"destinationEncryptionConfiguration,omitempty"` + // DestinationTable: [Required] The destination table to load the data // into. DestinationTable *TableReference `json:"destinationTable,omitempty"` @@ -1381,10 +1483,14 @@ type JobConfigurationLoad struct { // data sources. For Google Cloud Bigtable URIs: Exactly one URI can be // specified and it has be a fully specified and valid HTTPS URL for a // Google Cloud Bigtable table. For Google Cloud Datastore backups: - // Exactly one URI can be specified, and it must end with - // '.backup_info'. Also, the '*' wildcard character is not allowed. + // Exactly one URI can be specified. Also, the '*' wildcard character is + // not allowed. SourceUris []string `json:"sourceUris,omitempty"` + // TimePartitioning: [Experimental] If specified, configures time-based + // partitioning for the destination table. + TimePartitioning *TimePartitioning `json:"timePartitioning,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 @@ -1443,6 +1549,10 @@ type JobConfigurationQuery struct { // unqualified table names in the query. DefaultDataset *DatasetReference `json:"defaultDataset,omitempty"` + // DestinationEncryptionConfiguration: [Experimental] Custom encryption + // configuration (e.g., Cloud KMS keys). + DestinationEncryptionConfiguration *EncryptionConfiguration `json:"destinationEncryptionConfiguration,omitempty"` + // DestinationTable: [Optional] Describes the table where the query // results should be stored. If not present, a new table will be created // to store the results. This property must be set for large results @@ -1510,6 +1620,10 @@ type JobConfigurationQuery struct { // source can then be queried as if it were a standard BigQuery table. TableDefinitions map[string]ExternalDataConfiguration `json:"tableDefinitions,omitempty"` + // TimePartitioning: [Experimental] If specified, configures time-based + // partitioning for the destination table. + TimePartitioning *TimePartitioning `json:"timePartitioning,omitempty"` + // UseLegacySql: Specifies whether to use BigQuery's legacy SQL dialect // for this query. The default value is true. If set to false, the query // will use BigQuery's standard SQL: @@ -1577,6 +1691,10 @@ type JobConfigurationTableCopy struct { // one atomic update upon job completion. CreateDisposition string `json:"createDisposition,omitempty"` + // DestinationEncryptionConfiguration: [Experimental] Custom encryption + // configuration (e.g., Cloud KMS keys). + DestinationEncryptionConfiguration *EncryptionConfiguration `json:"destinationEncryptionConfiguration,omitempty"` + // DestinationTable: [Required] The destination table DestinationTable *TableReference `json:"destinationTable,omitempty"` @@ -2444,6 +2562,10 @@ type Table struct { // Description: [Optional] A user-friendly description of this table. Description string `json:"description,omitempty"` + // EncryptionConfiguration: [Experimental] Custom encryption + // configuration (e.g., Cloud KMS keys). + EncryptionConfiguration *EncryptionConfiguration `json:"encryptionConfiguration,omitempty"` + // Etag: [Output-only] A hash of this resource. Etag string `json:"etag,omitempty"` @@ -3039,8 +3161,14 @@ type TimePartitioning struct { // storage for a partition. ExpirationMs int64 `json:"expirationMs,omitempty,string"` + // Field: [Experimental] [Optional] If not set, the table is partitioned + // by pseudo column '_PARTITIONTIME'; if set, the table is partitioned + // by this field. The field must be a top-level TIMESTAMP or DATE field. + // Its mode must be NULLABLE or REQUIRED. + Field string `json:"field,omitempty"` + // Type: [Required] The only type supported is DAY, which will generate - // one partition per day based on data loading time. + // one partition per day. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "ExpirationMs") to @@ -4563,17 +4691,13 @@ func (c *JobsGetQueryResultsCall) Pages(ctx context.Context, f func(*GetQueryRes // method id "bigquery.jobs.insert": type JobsInsertCall struct { - s *Service - projectId string - job *Job - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + projectId string + job *Job + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Insert: Starts a new asynchronous job. Requires the Can View project @@ -4594,12 +4718,7 @@ func (r *JobsService) Insert(projectId string, job *Job) *JobsInsertCall { // supplied. // At most one of Media and ResumableMedia may be set. func (c *JobsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *JobsInsertCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -4614,11 +4733,7 @@ func (c *JobsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *J // supersede any context previously provided to the Context method. func (c *JobsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *JobsInsertCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -4627,7 +4742,7 @@ func (c *JobsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *JobsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *JobsInsertCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -4672,27 +4787,16 @@ func (c *JobsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/jobs") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -4728,20 +4832,10 @@ func (c *JobsInsertCall) Do(opts ...googleapi.CallOption) (*Job, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -5204,6 +5298,146 @@ func (c *JobsQueryCall) Do(opts ...googleapi.CallOption) (*QueryResponse, error) } +// method id "bigquery.projects.getServiceAccount": + +type ProjectsGetServiceAccountCall struct { + s *Service + projectId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetServiceAccount: Returns the email address of the service account +// for your project used for interactions with Google Cloud KMS. +func (r *ProjectsService) GetServiceAccount(projectId string) *ProjectsGetServiceAccountCall { + c := &ProjectsGetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + 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 *ProjectsGetServiceAccountCall) Fields(s ...googleapi.Field) *ProjectsGetServiceAccountCall { + 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 *ProjectsGetServiceAccountCall) IfNoneMatch(entityTag string) *ProjectsGetServiceAccountCall { + 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 *ProjectsGetServiceAccountCall) Context(ctx context.Context) *ProjectsGetServiceAccountCall { + 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 *ProjectsGetServiceAccountCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsGetServiceAccountCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/serviceAccount") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "bigquery.projects.getServiceAccount" call. +// Exactly one of *GetServiceAccountResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GetServiceAccountResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsGetServiceAccountCall) Do(opts ...googleapi.CallOption) (*GetServiceAccountResponse, 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 := &GetServiceAccountResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the email address of the service account for your project used for interactions with Google Cloud KMS.", + // "httpMethod": "GET", + // "id": "bigquery.projects.getServiceAccount", + // "parameterOrder": [ + // "projectId" + // ], + // "parameters": { + // "projectId": { + // "description": "Project ID for which the service account is requested.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{projectId}/serviceAccount", + // "response": { + // "$ref": "GetServiceAccountResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + // method id "bigquery.projects.list": type ProjectsListCall struct { diff --git a/vendor/google.golang.org/api/bigquerydatatransfer/v1/bigquerydatatransfer-api.json b/vendor/google.golang.org/api/bigquerydatatransfer/v1/bigquerydatatransfer-api.json index c7cbc8d97..15009f30f 100644 --- a/vendor/google.golang.org/api/bigquerydatatransfer/v1/bigquerydatatransfer-api.json +++ b/vendor/google.golang.org/api/bigquerydatatransfer/v1/bigquerydatatransfer-api.json @@ -1,12 +1,13 @@ { + "ownerDomain": "google.com", + "name": "bigquerydatatransfer", + "batchPath": "batch", + "title": "BigQuery Data Transfer Service API", + "ownerName": "Google", "resources": { "projects": { "methods": { "isEnabled": { - "request": { - "$ref": "IsEnabledRequest" - }, - "description": "Returns true if data transfer is enabled for a project.", "response": { "$ref": "IsEnabledResponse" }, @@ -21,18 +22,24 @@ ], "parameters": { "name": { + "description": "The name of the project resource in the form:\n`projects/{project_id}`", "type": "string", "required": true, "pattern": "^projects/[^/]+$", - "location": "path", - "description": "The name of the project resource in the form:\n`projects/{project_id}`" + "location": "path" } }, "flatPath": "v1/projects/{projectsId}:isEnabled", "id": "bigquerydatatransfer.projects.isEnabled", - "path": "v1/{+name}:isEnabled" + "path": "v1/{+name}:isEnabled", + "request": { + "$ref": "IsEnabledRequest" + }, + "description": "Returns true if data transfer is enabled for a project." }, "setEnabled": { + "id": "bigquerydatatransfer.projects.setEnabled", + "path": "v1/{+name}:setEnabled", "description": "Enables or disables data transfer for a project. This\nmethod requires the additional scope of\n'https://www.googleapis.com/auth/cloudplatformprojects'\nto manage the cloud project permissions.", "request": { "$ref": "SetEnabledRequest" @@ -56,15 +63,83 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1/projects/{projectsId}:setEnabled", - "id": "bigquerydatatransfer.projects.setEnabled", - "path": "v1/{+name}:setEnabled" + "flatPath": "v1/projects/{projectsId}:setEnabled" } }, "resources": { - "locations": { + "transferConfigs": { "methods": { + "create": { + "request": { + "$ref": "TransferConfig" + }, + "description": "Creates a new data transfer configuration.", + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "TransferConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "parent": { + "description": "The BigQuery project id where the transfer configuration should be created.\nMust be in the format /projects/{project_id}/locations/{location_id}\nor\n/projects/{project_id}/locations/-\nIn case when '-' is specified as location_id, location is infered from\nthe destination dataset region.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "authorizationCode": { + "location": "query", + "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nThis is required if new credentials are needed, as indicated by\n`CheckValidCreds`.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application.", + "type": "string" + } + }, + "flatPath": "v1/projects/{projectsId}/transferConfigs", + "path": "v1/{+parent}/transferConfigs", + "id": "bigquerydatatransfer.projects.transferConfigs.create" + }, + "scheduleRuns": { + "description": "Creates transfer runs for a time range [range_start_time, range_end_time].\nFor each date - or whatever granularity the data source supports - in the\nrange, one transfer run is created.\nNote that runs are created per UTC time in the time range.", + "request": { + "$ref": "ScheduleTransferRunsRequest" + }, + "response": { + "$ref": "ScheduleTransferRunsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "parent": { + "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", + "location": "path", + "description": "Transfer configuration name in the form:\n`projects/{project_id}/transferConfigs/{config_id}`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}:scheduleRuns", + "id": "bigquerydatatransfer.projects.transferConfigs.scheduleRuns", + "path": "v1/{+parent}:scheduleRuns" + }, "get": { + "response": { + "$ref": "TransferConfig" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/bigquery", "https://www.googleapis.com/auth/cloud-platform", @@ -72,54 +147,114 @@ ], "parameters": { "name": { - "pattern": "^projects/[^/]+/locations/[^/]+$", + "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", "location": "path", - "description": "Resource name for the location.", + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}`", "type": "string", "required": true } }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", - "id": "bigquerydatatransfer.projects.locations.get", + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}", + "id": "bigquerydatatransfer.projects.transferConfigs.get", "path": "v1/{+name}", - "description": "Get information about a location.", - "response": { - "$ref": "Location" + "description": "Returns information about a data transfer config." + }, + "patch": { + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The resource name of the transfer run.\nTransfer run names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer run.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", + "location": "path" + }, + "authorizationCode": { + "location": "query", + "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nIf it is provided, the transfer configuration will be associated with the\ngaia id of the authorizing user.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application.", + "type": "string" + }, + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Required list of fields to be updated in this request.", + "type": "string" + } }, + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}", + "path": "v1/{+name}", + "id": "bigquerydatatransfer.projects.transferConfigs.patch", + "request": { + "$ref": "TransferConfig" + }, + "description": "Updates a data transfer configuration.\nAll fields must be set, even if they are not updated.", + "httpMethod": "PATCH", "parameterOrder": [ "name" ], - "httpMethod": "GET" + "response": { + "$ref": "TransferConfig" + } + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}", + "path": "v1/{+name}", + "id": "bigquerydatatransfer.projects.transferConfigs.delete", + "description": "Deletes a data transfer configuration,\nincluding any associated transfer runs and logs." }, "list": { "response": { - "$ref": "ListLocationsResponse" + "$ref": "ListTransferConfigsResponse" }, "parameterOrder": [ - "name" + "parent" ], "httpMethod": "GET", "parameters": { - "filter": { - "description": "The standard list filter.", + "dataSourceIds": { + "description": "When specified, only configurations of requested data sources are returned.", "type": "string", + "repeated": true, "location": "query" }, + "parent": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "The BigQuery project id for which data sources\nshould be returned: `projects/{project_id}`.", + "type": "string", + "required": true + }, "pageToken": { "location": "query", - "description": "The standard list page token.", + "description": "Pagination token, which can be used to request a specific page\nof `ListTransfersRequest` list results. For multiple-page\nresults, `ListTransfersResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", "type": "string" }, - "name": { - "location": "path", - "description": "The resource that owns the locations collection, if applicable.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - }, "pageSize": { "format": "int32", - "description": "The standard list page size.", + "description": "Page size. The default page size is the maximum value of 1000 results.", "type": "integer", "location": "query" } @@ -129,12 +264,294 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "flatPath": "v1/projects/{projectsId}/locations", - "id": "bigquerydatatransfer.projects.locations.list", - "path": "v1/{+name}/locations", - "description": "Lists information about the supported locations for this service." + "flatPath": "v1/projects/{projectsId}/transferConfigs", + "id": "bigquerydatatransfer.projects.transferConfigs.list", + "path": "v1/{+parent}/transferConfigs", + "description": "Returns information about all data transfers in the project." + } + }, + "resources": { + "runs": { + "methods": { + "delete": { + "id": "bigquerydatatransfer.projects.transferConfigs.runs.delete", + "path": "v1/{+name}", + "description": "Deletes the specified transfer run.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs/{runsId}" + }, + "list": { + "path": "v1/{+parent}/runs", + "id": "bigquerydatatransfer.projects.transferConfigs.runs.list", + "description": "Returns information about running and completed jobs.", + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListTransferRunsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "parent": { + "description": "Name of transfer configuration for which transfer runs should be retrieved.\nFormat of transfer configuration resource name is:\n`projects/{project_id}/transferConfigs/{config_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", + "location": "path" + }, + "pageToken": { + "description": "Pagination token, which can be used to request a specific page\nof `ListTransferRunsRequest` list results. For multiple-page\nresults, `ListTransferRunsResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Page size. The default page size is the maximum value of 1000 results.", + "type": "integer" + }, + "states": { + "repeated": true, + "location": "query", + "enum": [ + "TRANSFER_STATE_UNSPECIFIED", + "INACTIVE", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED", + "CANCELLED" + ], + "description": "When specified, only transfer runs with requested states are returned.", + "type": "string" + }, + "runAttempt": { + "description": "Indicates how run attempts are to be pulled.", + "type": "string", + "location": "query", + "enum": [ + "RUN_ATTEMPT_UNSPECIFIED", + "LATEST" + ] + } + }, + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs" + }, + "get": { + "parameters": { + "name": { + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs/{runsId}", + "path": "v1/{+name}", + "id": "bigquerydatatransfer.projects.transferConfigs.runs.get", + "description": "Returns information about the particular transfer run.", + "httpMethod": "GET", + "response": { + "$ref": "TransferRun" + }, + "parameterOrder": [ + "name" + ] + } + }, + "resources": { + "transferLogs": { + "methods": { + "list": { + "id": "bigquerydatatransfer.projects.transferConfigs.runs.transferLogs.list", + "path": "v1/{+parent}/transferLogs", + "description": "Returns user facing log messages for the data transfer run.", + "response": { + "$ref": "ListTransferLogsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "description": "Pagination token, which can be used to request a specific page\nof `ListTransferLogsRequest` list results. For multiple-page\nresults, `ListTransferLogsResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Page size. The default page size is the maximum value of 1000 results.", + "type": "integer", + "location": "query" + }, + "messageTypes": { + "repeated": true, + "location": "query", + "enum": [ + "MESSAGE_SEVERITY_UNSPECIFIED", + "INFO", + "WARNING", + "ERROR" + ], + "description": "Message types to return. If not populated - INFO, WARNING and ERROR\nmessages are returned.", + "type": "string" + }, + "parent": { + "description": "Transfer run name in the form:\n`projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs/{runsId}/transferLogs" + } + } + } + } + } + } + }, + "dataSources": { + "methods": { + "checkValidCreds": { + "parameters": { + "name": { + "pattern": "^projects/[^/]+/dataSources/[^/]+$", + "location": "path", + "description": "The data source in the form:\n`projects/{project_id}/dataSources/{data_source_id}`", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/dataSources/{dataSourcesId}:checkValidCreds", + "path": "v1/{+name}:checkValidCreds", + "id": "bigquerydatatransfer.projects.dataSources.checkValidCreds", + "description": "Returns true if valid credentials exist for the given data source and\nrequesting user.", + "request": { + "$ref": "CheckValidCredsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "CheckValidCredsResponse" + } }, + "list": { + "description": "Lists supported data sources and returns their settings,\nwhich can be used for UI rendering.", + "response": { + "$ref": "ListDataSourcesResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "parent": { + "description": "The BigQuery project id for which data sources should be returned.\nMust be in the form: `projects/{project_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "Pagination token, which can be used to request a specific page\nof `ListDataSourcesRequest` list results. For multiple-page\nresults, `ListDataSourcesResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Page size. The default page size is the maximum value of 1000 results.", + "type": "integer" + } + }, + "flatPath": "v1/projects/{projectsId}/dataSources", + "id": "bigquerydatatransfer.projects.dataSources.list", + "path": "v1/{+parent}/dataSources" + }, + "get": { + "response": { + "$ref": "DataSource" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/dataSources/{data_source_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/dataSources/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/dataSources/{dataSourcesId}", + "id": "bigquerydatatransfer.projects.dataSources.get", + "path": "v1/{+name}", + "description": "Retrieves a supported data source and returns its settings,\nwhich can be used for UI rendering." + } + } + }, + "locations": { + "methods": { "isEnabled": { + "id": "bigquerydatatransfer.projects.locations.isEnabled", + "path": "v1/{+name}:isEnabled", "request": { "$ref": "IsEnabledRequest" }, @@ -151,34 +568,6 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path", - "description": "The name of the project resource in the form:\n`projects/{project_id}`" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:isEnabled", - "id": "bigquerydatatransfer.projects.locations.isEnabled", - "path": "v1/{+name}:isEnabled" - }, - "setEnabled": { - "request": { - "$ref": "SetEnabledRequest" - }, - "description": "Enables or disables data transfer for a project. This\nmethod requires the additional scope of\n'https://www.googleapis.com/auth/cloudplatformprojects'\nto manage the cloud project permissions.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { "name": { "description": "The name of the project resource in the form:\n`projects/{project_id}`", @@ -188,93 +577,118 @@ "location": "path" } }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:isEnabled" + }, + "setEnabled": { + "description": "Enables or disables data transfer for a project. This\nmethod requires the additional scope of\n'https://www.googleapis.com/auth/cloudplatformprojects'\nto manage the cloud project permissions.", + "request": { + "$ref": "SetEnabledRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path", + "description": "The name of the project resource in the form:\n`projects/{project_id}`", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:setEnabled", "id": "bigquerydatatransfer.projects.locations.setEnabled", "path": "v1/{+name}:setEnabled" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "path": "v1/{+name}", + "id": "bigquerydatatransfer.projects.locations.get", + "description": "Get information about a location." + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "response": { + "$ref": "ListLocationsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "name": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "The resource that owns the locations collection, if applicable.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/locations", + "id": "bigquerydatatransfer.projects.locations.list", + "path": "v1/{+name}/locations" } }, "resources": { "transferConfigs": { "methods": { - "get": { - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "name": { - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}", - "path": "v1/{+name}", - "id": "bigquerydatatransfer.projects.locations.transferConfigs.get", - "description": "Returns information about a data transfer config.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "TransferConfig" - } - }, - "patch": { - "request": { - "$ref": "TransferConfig" - }, - "description": "Updates a data transfer configuration.\nAll fields must be set, even if they are not updated.", - "response": { - "$ref": "TransferConfig" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PATCH", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "authorizationCode": { - "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nIf it is provided, the transfer configuration will be associated with the\ngaia id of the authorizing user.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application.", - "type": "string", - "location": "query" - }, - "updateMask": { - "format": "google-fieldmask", - "description": "Required list of fields to be updated in this request.", - "type": "string", - "location": "query" - }, - "name": { - "description": "The resource name of the transfer run.\nTransfer run names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer run.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}", - "id": "bigquerydatatransfer.projects.locations.transferConfigs.patch", - "path": "v1/{+name}" - }, "delete": { + "parameterOrder": [ + "name" + ], "response": { "$ref": "Empty" }, - "parameterOrder": [ - "name" - ], "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { "name": { "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", @@ -284,6 +698,10 @@ "required": true } }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}", "id": "bigquerydatatransfer.projects.locations.transferConfigs.delete", "path": "v1/{+name}", @@ -298,12 +716,18 @@ "parent" ], "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "parameters": { + "pageToken": { + "location": "query", + "description": "Pagination token, which can be used to request a specific page\nof `ListTransfersRequest` list results. For multiple-page\nresults, `ListTransfersResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Page size. The default page size is the maximum value of 1000 results.", + "type": "integer" + }, "dataSourceIds": { "description": "When specified, only configurations of requested data sources are returned.", "type": "string", @@ -311,70 +735,68 @@ "location": "query" }, "parent": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path", - "description": "The BigQuery project id for which data sources\nshould be returned: `projects/{project_id}`." - }, - "pageToken": { - "location": "query", - "description": "Pagination token, which can be used to request a specific page\nof `ListTransfersRequest` list results. For multiple-page\nresults, `ListTransfersResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Page size. The default page size is the maximum value of 1000 results.", - "type": "integer", - "location": "query" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs", - "id": "bigquerydatatransfer.projects.locations.transferConfigs.list", - "path": "v1/{+parent}/transferConfigs" - }, - "create": { - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs", - "path": "v1/{+parent}/transferConfigs", - "id": "bigquerydatatransfer.projects.locations.transferConfigs.create", - "request": { - "$ref": "TransferConfig" - }, - "description": "Creates a new data transfer configuration.", - "httpMethod": "POST", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "TransferConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "authorizationCode": { - "location": "query", - "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nThis is required if new credentials are needed, as indicated by\n`CheckValidCreds`.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application.", - "type": "string" - }, - "parent": { - "description": "The BigQuery project id where the transfer configuration should be created.\nMust be in the format /projects/{project_id}/locations/{location_id}\nor\n/projects/{project_id}/locations/-\nIn case when '-' is specified as location_id, location is infered from\nthe destination dataset region.", + "description": "The BigQuery project id for which data sources\nshould be returned: `projects/{project_id}`.", "type": "string", "required": true, "pattern": "^projects/[^/]+/locations/[^/]+$", "location": "path" } - } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.list", + "path": "v1/{+parent}/transferConfigs" }, - "scheduleRuns": { + "create": { "httpMethod": "POST", "parameterOrder": [ "parent" ], + "response": { + "$ref": "TransferConfig" + }, + "parameters": { + "authorizationCode": { + "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nThis is required if new credentials are needed, as indicated by\n`CheckValidCreds`.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application.", + "type": "string", + "location": "query" + }, + "parent": { + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path", + "description": "The BigQuery project id where the transfer configuration should be created.\nMust be in the format /projects/{project_id}/locations/{location_id}\nor\n/projects/{project_id}/locations/-\nIn case when '-' is specified as location_id, location is infered from\nthe destination dataset region.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs", + "path": "v1/{+parent}/transferConfigs", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.create", + "description": "Creates a new data transfer configuration.", + "request": { + "$ref": "TransferConfig" + } + }, + "scheduleRuns": { + "request": { + "$ref": "ScheduleTransferRunsRequest" + }, + "description": "Creates transfer runs for a time range [range_start_time, range_end_time].\nFor each date - or whatever granularity the data source supports - in the\nrange, one transfer run is created.\nNote that runs are created per UTC time in the time range.", "response": { "$ref": "ScheduleTransferRunsResponse" }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/bigquery", "https://www.googleapis.com/auth/cloud-platform" @@ -389,16 +811,196 @@ } }, "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}:scheduleRuns", - "path": "v1/{+parent}:scheduleRuns", "id": "bigquerydatatransfer.projects.locations.transferConfigs.scheduleRuns", - "request": { - "$ref": "ScheduleTransferRunsRequest" + "path": "v1/{+parent}:scheduleRuns" + }, + "get": { + "description": "Returns information about a data transfer config.", + "response": { + "$ref": "TransferConfig" }, - "description": "Creates transfer runs for a time range [range_start_time, range_end_time].\nFor each date - or whatever granularity the data source supports - in the\nrange, one transfer run is created.\nNote that runs are created per UTC time in the time range." + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", + "location": "path", + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}`", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.get", + "path": "v1/{+name}" + }, + "patch": { + "path": "v1/{+name}", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.patch", + "request": { + "$ref": "TransferConfig" + }, + "description": "Updates a data transfer configuration.\nAll fields must be set, even if they are not updated.", + "httpMethod": "PATCH", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "TransferConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", + "location": "path", + "description": "The resource name of the transfer run.\nTransfer run names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer run.", + "type": "string", + "required": true + }, + "authorizationCode": { + "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nIf it is provided, the transfer configuration will be associated with the\ngaia id of the authorizing user.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application.", + "type": "string", + "location": "query" + }, + "updateMask": { + "format": "google-fieldmask", + "description": "Required list of fields to be updated in this request.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}" } }, "resources": { "runs": { + "methods": { + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", + "location": "path", + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}/runs/{runsId}", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.runs.delete", + "path": "v1/{+name}", + "description": "Deletes the specified transfer run." + }, + "list": { + "path": "v1/{+parent}/runs", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.runs.list", + "description": "Returns information about running and completed jobs.", + "httpMethod": "GET", + "response": { + "$ref": "ListTransferRunsResponse" + }, + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "Pagination token, which can be used to request a specific page\nof `ListTransferRunsRequest` list results. For multiple-page\nresults, `ListTransferRunsResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Page size. The default page size is the maximum value of 1000 results.", + "type": "integer" + }, + "states": { + "repeated": true, + "location": "query", + "enum": [ + "TRANSFER_STATE_UNSPECIFIED", + "INACTIVE", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED", + "CANCELLED" + ], + "description": "When specified, only transfer runs with requested states are returned.", + "type": "string" + }, + "runAttempt": { + "description": "Indicates how run attempts are to be pulled.", + "type": "string", + "location": "query", + "enum": [ + "RUN_ATTEMPT_UNSPECIFIED", + "LATEST" + ] + }, + "parent": { + "description": "Name of transfer configuration for which transfer runs should be retrieved.\nFormat of transfer configuration resource name is:\n`projects/{project_id}/transferConfigs/{config_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}/runs" + }, + "get": { + "path": "v1/{+name}", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.runs.get", + "description": "Returns information about the particular transfer run.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "TransferRun" + }, + "parameters": { + "name": { + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}/runs/{runsId}" + } + }, "resources": { "transferLogs": { "methods": { @@ -413,11 +1015,6 @@ "response": { "$ref": "ListTransferLogsResponse" }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "parameters": { "pageToken": { "location": "query", @@ -425,22 +1022,22 @@ "type": "string" }, "pageSize": { + "location": "query", "format": "int32", "description": "Page size. The default page size is the maximum value of 1000 results.", - "type": "integer", - "location": "query" + "type": "integer" }, "messageTypes": { + "description": "Message types to return. If not populated - INFO, WARNING and ERROR\nmessages are returned.", + "type": "string", + "repeated": true, "location": "query", "enum": [ "MESSAGE_SEVERITY_UNSPECIFIED", "INFO", "WARNING", "ERROR" - ], - "description": "Message types to return. If not populated - INFO, WARNING and ERROR\nmessages are returned.", - "type": "string", - "repeated": true + ] }, "parent": { "description": "Transfer run name in the form:\n`projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`.", @@ -450,199 +1047,28 @@ "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}/runs/{runsId}/transferLogs" } } } - }, - "methods": { - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "ListTransferRunsResponse" - }, - "parameters": { - "runAttempt": { - "description": "Indicates how run attempts are to be pulled.", - "type": "string", - "location": "query", - "enum": [ - "RUN_ATTEMPT_UNSPECIFIED", - "LATEST" - ] - }, - "parent": { - "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", - "location": "path", - "description": "Name of transfer configuration for which transfer runs should be retrieved.\nFormat of transfer configuration resource name is:\n`projects/{project_id}/transferConfigs/{config_id}`.", - "type": "string", - "required": true - }, - "pageToken": { - "location": "query", - "description": "Pagination token, which can be used to request a specific page\nof `ListTransferRunsRequest` list results. For multiple-page\nresults, `ListTransferRunsResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Page size. The default page size is the maximum value of 1000 results.", - "type": "integer", - "location": "query" - }, - "statuses": { - "enum": [ - "TRANSFER_STATUS_UNSPECIFIED", - "INACTIVE", - "PENDING", - "RUNNING", - "SUCCEEDED", - "FAILED", - "CANCELLED" - ], - "description": "When specified, only transfer runs with requested statuses are returned.", - "type": "string", - "repeated": true, - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}/runs", - "path": "v1/{+parent}/runs", - "id": "bigquerydatatransfer.projects.locations.transferConfigs.runs.list", - "description": "Returns information about running and completed jobs." - }, - "get": { - "description": "Returns information about the particular transfer run.", - "response": { - "$ref": "TransferRun" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "name": { - "location": "path", - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}/runs/{runsId}", - "id": "bigquerydatatransfer.projects.locations.transferConfigs.runs.get", - "path": "v1/{+name}" - }, - "delete": { - "id": "bigquerydatatransfer.projects.locations.transferConfigs.runs.delete", - "path": "v1/{+name}", - "description": "Deletes the specified transfer run.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}/runs/{runsId}" - } } } } }, "dataSources": { "methods": { - "list": { - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataSources", - "path": "v1/{+parent}/dataSources", - "id": "bigquerydatatransfer.projects.locations.dataSources.list", - "description": "Lists supported data sources and returns their settings,\nwhich can be used for UI rendering.", - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "ListDataSourcesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageToken": { - "description": "Pagination token, which can be used to request a specific page\nof `ListDataSourcesRequest` list results. For multiple-page\nresults, `ListDataSourcesResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "Page size. The default page size is the maximum value of 1000 results.", - "type": "integer", - "location": "query" - }, - "parent": { - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path", - "description": "The BigQuery project id for which data sources should be returned.\nMust be in the form: `projects/{project_id}`", - "type": "string", - "required": true - } - } - }, - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "DataSource" - }, - "parameters": { - "name": { - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/dataSources/{data_source_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/dataSources/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataSources/{dataSourcesId}", - "path": "v1/{+name}", - "id": "bigquerydatatransfer.projects.locations.dataSources.get", - "description": "Retrieves a supported data source and returns its settings,\nwhich can be used for UI rendering." - }, "checkValidCreds": { + "path": "v1/{+name}:checkValidCreds", + "id": "bigquerydatatransfer.projects.locations.dataSources.checkValidCreds", + "request": { + "$ref": "CheckValidCredsRequest" + }, + "description": "Returns true if valid credentials exist for the given data source and\nrequesting user.", "httpMethod": "POST", "parameterOrder": [ "name" @@ -657,327 +1083,61 @@ ], "parameters": { "name": { - "type": "string", - "required": true, "pattern": "^projects/[^/]+/locations/[^/]+/dataSources/[^/]+$", "location": "path", - "description": "The data source in the form:\n`projects/{project_id}/dataSources/{data_source_id}`" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataSources/{dataSourcesId}:checkValidCreds", - "path": "v1/{+name}:checkValidCreds", - "id": "bigquerydatatransfer.projects.locations.dataSources.checkValidCreds", - "request": { - "$ref": "CheckValidCredsRequest" - }, - "description": "Returns true if valid credentials exist for the given data source and\nrequesting user." - } - } - } - } - }, - "transferConfigs": { - "methods": { - "delete": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}", - "id": "bigquerydatatransfer.projects.transferConfigs.delete", - "path": "v1/{+name}", - "description": "Deletes a data transfer configuration,\nincluding any associated transfer runs and logs." - }, - "list": { - "response": { - "$ref": "ListTransferConfigsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "dataSourceIds": { - "repeated": true, - "location": "query", - "description": "When specified, only configurations of requested data sources are returned.", - "type": "string" - }, - "parent": { - "location": "path", - "description": "The BigQuery project id for which data sources\nshould be returned: `projects/{project_id}`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - }, - "pageToken": { - "description": "Pagination token, which can be used to request a specific page\nof `ListTransfersRequest` list results. For multiple-page\nresults, `ListTransfersResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Page size. The default page size is the maximum value of 1000 results.", - "type": "integer" - } - }, - "flatPath": "v1/projects/{projectsId}/transferConfigs", - "id": "bigquerydatatransfer.projects.transferConfigs.list", - "path": "v1/{+parent}/transferConfigs", - "description": "Returns information about all data transfers in the project." - }, - "create": { - "description": "Creates a new data transfer configuration.", - "request": { - "$ref": "TransferConfig" - }, - "httpMethod": "POST", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "TransferConfig" - }, - "parameters": { - "parent": { - "location": "path", - "description": "The BigQuery project id where the transfer configuration should be created.\nMust be in the format /projects/{project_id}/locations/{location_id}\nor\n/projects/{project_id}/locations/-\nIn case when '-' is specified as location_id, location is infered from\nthe destination dataset region.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - }, - "authorizationCode": { - "type": "string", - "location": "query", - "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nThis is required if new credentials are needed, as indicated by\n`CheckValidCreds`.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/transferConfigs", - "path": "v1/{+parent}/transferConfigs", - "id": "bigquerydatatransfer.projects.transferConfigs.create" - }, - "scheduleRuns": { - "id": "bigquerydatatransfer.projects.transferConfigs.scheduleRuns", - "path": "v1/{+parent}:scheduleRuns", - "description": "Creates transfer runs for a time range [range_start_time, range_end_time].\nFor each date - or whatever granularity the data source supports - in the\nrange, one transfer run is created.\nNote that runs are created per UTC time in the time range.", - "request": { - "$ref": "ScheduleTransferRunsRequest" - }, - "response": { - "$ref": "ScheduleTransferRunsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "parameters": { - "parent": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", - "location": "path", - "description": "Transfer configuration name in the form:\n`projects/{project_id}/transferConfigs/{config_id}`." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}:scheduleRuns" - }, - "patch": { - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}", - "path": "v1/{+name}", - "id": "bigquerydatatransfer.projects.transferConfigs.patch", - "description": "Updates a data transfer configuration.\nAll fields must be set, even if they are not updated.", - "request": { - "$ref": "TransferConfig" - }, - "httpMethod": "PATCH", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "TransferConfig" - }, - "parameters": { - "updateMask": { - "format": "google-fieldmask", - "description": "Required list of fields to be updated in this request.", - "type": "string", - "location": "query" - }, - "name": { - "location": "path", - "description": "The resource name of the transfer run.\nTransfer run names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer run.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/transferConfigs/[^/]+$" - }, - "authorizationCode": { - "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nIf it is provided, the transfer configuration will be associated with the\ngaia id of the authorizing user.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application.", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Returns information about a data transfer config.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "TransferConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "name": { - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}", - "path": "v1/{+name}", - "id": "bigquerydatatransfer.projects.transferConfigs.get" - } - }, - "resources": { - "runs": { - "methods": { - "delete": { - "path": "v1/{+name}", - "id": "bigquerydatatransfer.projects.transferConfigs.runs.delete", - "description": "Deletes the specified transfer run.", - "httpMethod": "DELETE", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "name": { - "pattern": "^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", - "location": "path", - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`", + "description": "The data source in the form:\n`projects/{project_id}/dataSources/{data_source_id}`", "type": "string", "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs/{runsId}" + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataSources/{dataSourcesId}:checkValidCreds" }, "list": { - "description": "Returns information about running and completed jobs.", - "httpMethod": "GET", + "parameters": { + "parent": { + "description": "The BigQuery project id for which data sources should be returned.\nMust be in the form: `projects/{project_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + }, + "pageToken": { + "description": "Pagination token, which can be used to request a specific page\nof `ListDataSourcesRequest` list results. For multiple-page\nresults, `ListDataSourcesResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Page size. The default page size is the maximum value of 1000 results.", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataSources", + "id": "bigquerydatatransfer.projects.locations.dataSources.list", + "path": "v1/{+parent}/dataSources", + "description": "Lists supported data sources and returns their settings,\nwhich can be used for UI rendering.", + "response": { + "$ref": "ListDataSourcesResponse" + }, "parameterOrder": [ "parent" ], - "response": { - "$ref": "ListTransferRunsResponse" - }, - "parameters": { - "runAttempt": { - "type": "string", - "location": "query", - "enum": [ - "RUN_ATTEMPT_UNSPECIFIED", - "LATEST" - ], - "description": "Indicates how run attempts are to be pulled." - }, - "parent": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", - "location": "path", - "description": "Name of transfer configuration for which transfer runs should be retrieved.\nFormat of transfer configuration resource name is:\n`projects/{project_id}/transferConfigs/{config_id}`." - }, - "pageToken": { - "type": "string", - "location": "query", - "description": "Pagination token, which can be used to request a specific page\nof `ListTransferRunsRequest` list results. For multiple-page\nresults, `ListTransferRunsResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results." - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Page size. The default page size is the maximum value of 1000 results.", - "type": "integer" - }, - "statuses": { - "location": "query", - "enum": [ - "TRANSFER_STATUS_UNSPECIFIED", - "INACTIVE", - "PENDING", - "RUNNING", - "SUCCEEDED", - "FAILED", - "CANCELLED" - ], - "description": "When specified, only transfer runs with requested statuses are returned.", - "type": "string", - "repeated": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs", - "path": "v1/{+parent}/runs", - "id": "bigquerydatatransfer.projects.transferConfigs.runs.list" + "httpMethod": "GET" }, "get": { + "response": { + "$ref": "DataSource" + }, + "httpMethod": "GET", "parameterOrder": [ "name" ], - "response": { - "$ref": "TransferRun" - }, - "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/bigquery", "https://www.googleapis.com/auth/cloud-platform", @@ -985,173 +1145,18 @@ ], "parameters": { "name": { - "pattern": "^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/dataSources/[^/]+$", "location": "path", - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`", + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/dataSources/{data_source_id}`", "type": "string", "required": true } }, - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs/{runsId}", - "id": "bigquerydatatransfer.projects.transferConfigs.runs.get", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataSources/{dataSourcesId}", + "id": "bigquerydatatransfer.projects.locations.dataSources.get", "path": "v1/{+name}", - "description": "Returns information about the particular transfer run." + "description": "Retrieves a supported data source and returns its settings,\nwhich can be used for UI rendering." } - }, - "resources": { - "transferLogs": { - "methods": { - "list": { - "description": "Returns user facing log messages for the data transfer run.", - "response": { - "$ref": "ListTransferLogsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "Pagination token, which can be used to request a specific page\nof `ListTransferLogsRequest` list results. For multiple-page\nresults, `ListTransferLogsResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Page size. The default page size is the maximum value of 1000 results.", - "type": "integer" - }, - "messageTypes": { - "location": "query", - "enum": [ - "MESSAGE_SEVERITY_UNSPECIFIED", - "INFO", - "WARNING", - "ERROR" - ], - "description": "Message types to return. If not populated - INFO, WARNING and ERROR\nmessages are returned.", - "type": "string", - "repeated": true - }, - "parent": { - "pattern": "^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", - "location": "path", - "description": "Transfer run name in the form:\n`projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs/{runsId}/transferLogs", - "id": "bigquerydatatransfer.projects.transferConfigs.runs.transferLogs.list", - "path": "v1/{+parent}/transferLogs" - } - } - } - } - } - } - }, - "dataSources": { - "methods": { - "list": { - "description": "Lists supported data sources and returns their settings,\nwhich can be used for UI rendering.", - "httpMethod": "GET", - "response": { - "$ref": "ListDataSourcesResponse" - }, - "parameterOrder": [ - "parent" - ], - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageToken": { - "type": "string", - "location": "query", - "description": "Pagination token, which can be used to request a specific page\nof `ListDataSourcesRequest` list results. For multiple-page\nresults, `ListDataSourcesResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results." - }, - "pageSize": { - "format": "int32", - "description": "Page size. The default page size is the maximum value of 1000 results.", - "type": "integer", - "location": "query" - }, - "parent": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "The BigQuery project id for which data sources should be returned.\nMust be in the form: `projects/{project_id}`", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectsId}/dataSources", - "path": "v1/{+parent}/dataSources", - "id": "bigquerydatatransfer.projects.dataSources.list" - }, - "get": { - "path": "v1/{+name}", - "id": "bigquerydatatransfer.projects.dataSources.get", - "description": "Retrieves a supported data source and returns its settings,\nwhich can be used for UI rendering.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "DataSource" - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "name": { - "location": "path", - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/dataSources/{data_source_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/dataSources/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/dataSources/{dataSourcesId}" - }, - "checkValidCreds": { - "response": { - "$ref": "CheckValidCredsResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "description": "The data source in the form:\n`projects/{project_id}/dataSources/{data_source_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/dataSources/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}/dataSources/{dataSourcesId}:checkValidCreds", - "id": "bigquerydatatransfer.projects.dataSources.checkValidCreds", - "path": "v1/{+name}:checkValidCreds", - "description": "Returns true if valid credentials exist for the given data source and\nrequesting user.", - "request": { - "$ref": "CheckValidCredsRequest" } } } @@ -1172,14 +1177,14 @@ "type": "boolean" }, "fields": { - "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string" + "type": "string", + "location": "query" }, "uploadType": { - "type": "string", "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" }, "callback": { "location": "query", @@ -1187,6 +1192,8 @@ "type": "string" }, "$.xgafv": { + "description": "V1 error format.", + "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -1195,9 +1202,7 @@ "enum": [ "1", "2" - ], - "description": "V1 error format.", - "type": "string" + ] }, "alt": { "enum": [ @@ -1221,30 +1226,30 @@ "type": "string" }, "access_token": { - "location": "query", "description": "OAuth access token.", - "type": "string" + "type": "string", + "location": "query" }, "quotaUser": { - "location": "query", "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.", - "type": "string" + "type": "string", + "location": "query" }, "pp": { - "default": "true", - "type": "boolean", "location": "query", - "description": "Pretty-print response." + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" }, "oauth_token": { - "type": "string", "location": "query", - "description": "OAuth 2.0 token for the current user." + "description": "OAuth 2.0 token for the current user.", + "type": "string" }, "bearer_token": { - "location": "query", "description": "OAuth bearer token.", - "type": "string" + "type": "string", + "location": "query" } }, "version": "v1", @@ -1253,34 +1258,322 @@ "description": "Transfers data from partner SaaS applications to Google BigQuery on a scheduled, managed basis.", "kind": "discovery#restDescription", "basePath": "", + "revision": "20170911", "documentationLink": "https://cloud.google.com/bigquery/", "id": "bigquerydatatransfer:v1", - "revision": "20170731", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "Location": { + "id": "Location", + "description": "A resource that represents Google Cloud Platform location.", + "type": "object", + "properties": { + "name": { + "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + } + } + }, + "TransferConfig": { + "id": "TransferConfig", + "description": "Represents a data transfer configuration. A transfer configuration\ncontains all metadata needed to perform a data transfer. For example,\n`destination_dataset_id` specifies where data should be stored.\nWhen a new transfer configuration is created, the specified\n`destination_dataset_id` is created when needed and shared with the\nappropriate data source service account.", + "type": "object", + "properties": { + "disabled": { + "description": "Is this config disabled. When set to true, no runs are scheduled\nfor a given transfer.", + "type": "boolean" + }, + "nextRunTime": { + "format": "google-datetime", + "description": "Next time when data transfer will run.\nOutput only.", + "type": "string" + }, + "updateTime": { + "format": "google-datetime", + "description": "Data transfer modification time. Ignored by server on input.\nOutput only.", + "type": "string" + }, + "schedule": { + "description": "Data transfer schedule.\nIf the data source does not support a custom schedule, this should be\nempty. If it is empty, the default value for the data source will be\nused.\nThe specified times are in UTC.\nExamples of valid format:\n`1st,3rd monday of month 15:30`,\n`every wed,fri of jan,jun 13:15`, and\n`first sunday of quarter 00:00`.\nSee more explanation about the format here:\nhttps://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format\nNOTE: the granularity should be at least 8 hours, or less frequent.", + "type": "string" + }, + "dataRefreshWindowDays": { + "format": "int32", + "description": "The number of days to look back to automatically refresh the data.\nFor example, if `data_refresh_window_days = 10`, then every day\nBigQuery reingests data for [today-10, today-1], rather than ingesting data\nfor just [today-1].\nOnly valid if the data source supports the feature. Set the value to 0\nto use the default value.", + "type": "integer" + }, + "dataSourceId": { + "description": "Data source id. Cannot be changed once data transfer is created.", + "type": "string" + }, + "state": { + "enumDescriptions": [ + "State placeholder.", + "Data transfer is inactive.", + "Data transfer is scheduled and is waiting to be picked up by\ndata transfer backend.", + "Data transfer is in progress.", + "Data transfer completed successsfully.", + "Data transfer failed.", + "Data transfer is cancelled." + ], + "enum": [ + "TRANSFER_STATE_UNSPECIFIED", + "INACTIVE", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED", + "CANCELLED" + ], + "description": "State of the most recently updated transfer run.\nOutput only.", + "type": "string" + }, + "name": { + "description": "The resource name of the transfer run.\nTransfer run names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer run.", + "type": "string" + }, + "userId": { + "format": "int64", + "description": "GaiaID of the user on whose behalf transfer is done. Applicable only\nto data sources that do not support service accounts. When set to 0,\nthe data source service account credentials are used.\nOutput only.", + "type": "string" + }, + "destinationDatasetId": { + "description": "The BigQuery target dataset id.", + "type": "string" + }, + "params": { + "description": "Data transfer specific parameters.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + } + }, + "datasetRegion": { + "description": "Region in which BigQuery dataset is located. Currently possible values are:\n\"US\" and \"EU\".\nOutput only.", + "type": "string" + }, + "displayName": { + "description": "User specified display name for the data transfer.", + "type": "string" + } + } + }, + "TransferRun": { + "description": "Represents a data transfer run.", + "type": "object", + "properties": { + "destinationDatasetId": { + "description": "The BigQuery target dataset id.", + "type": "string" + }, + "name": { + "description": "The resource name of the transfer run.\nTransfer run names have the form\n`projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`.\nThe name is ignored when creating a transfer run.", + "type": "string" + }, + "userId": { + "format": "int64", + "description": "The user id for this transfer run.\nOutput only.", + "type": "string" + }, + "params": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Data transfer specific parameters.", + "type": "object" + }, + "endTime": { + "format": "google-datetime", + "description": "Time when transfer run ended. Parameter ignored by server for input\nrequests.\nOutput only.", + "type": "string" + }, + "datasetRegion": { + "description": "Region in which BigQuery dataset is located. Currently possible values are:\n\"US\" and \"EU\".\nOutput only.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "Time when transfer run was started. Parameter ignored by server for input\nrequests.\nOutput only.", + "type": "string" + }, + "scheduleTime": { + "format": "google-datetime", + "description": "Minimum time after which a transfer run can be started.", + "type": "string" + }, + "schedule": { + "description": "Describes the schedule of this transfer run if it was created as part of\na regular schedule. For batch transfer runs that are directly created,\nthis is empty.\nNOTE: the system might choose to delay the schedule depending on the\ncurrent load, so `schedule_time` doesn't always matches this.\nOutput only.", + "type": "string" + }, + "updateTime": { + "format": "google-datetime", + "description": "Last time the data transfer run state was updated.\nOutput only.", + "type": "string" + }, + "runTime": { + "format": "google-datetime", + "description": "For batch transfer runs, specifies the date and time that\ndata should be ingested.", + "type": "string" + }, + "dataSourceId": { + "description": "Data source id.\nOutput only.", + "type": "string" + }, + "state": { + "description": "Data transfer run state. Ignored for input requests.\nOutput only.", + "type": "string", + "enumDescriptions": [ + "State placeholder.", + "Data transfer is inactive.", + "Data transfer is scheduled and is waiting to be picked up by\ndata transfer backend.", + "Data transfer is in progress.", + "Data transfer completed successsfully.", + "Data transfer failed.", + "Data transfer is cancelled." + ], + "enum": [ + "TRANSFER_STATE_UNSPECIFIED", + "INACTIVE", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED", + "CANCELLED" + ] + } + }, + "id": "TransferRun" + }, + "CheckValidCredsRequest": { + "id": "CheckValidCredsRequest", + "description": "A request to determine whether the user has valid credentials. This method\nis used to limit the number of OAuth popups in the user interface. The\nuser id is inferred from the API call context.\nIf the data source has the Google+ authorization type, this method\nreturns false, as it cannot be determined whether the credentials are\nalready valid merely based on the user id.", + "type": "object", + "properties": {} + }, + "CheckValidCredsResponse": { + "id": "CheckValidCredsResponse", + "description": "A response indicating whether the credentials exist and are valid.", + "type": "object", + "properties": { + "hasValidCreds": { + "description": "If set to `true`, the credentials exist and are valid.", + "type": "boolean" + } + } + }, + "ScheduleTransferRunsResponse": { + "description": "A response to schedule transfer runs for a time range.", + "type": "object", + "properties": { + "createdRuns": { + "description": "The transfer runs that were created.", + "items": { + "$ref": "TransferRun" + }, + "type": "array" + } + }, + "id": "ScheduleTransferRunsResponse" + }, + "TransferMessage": { + "description": "Represents a user facing message for a particular data transfer run.", + "type": "object", + "properties": { + "messageText": { + "description": "Message text.", + "type": "string" + }, + "severity": { + "description": "Message severity.", + "type": "string", + "enumDescriptions": [ + "No severity specified.", + "Informational message.", + "Warning message.", + "Error message." + ], + "enum": [ + "MESSAGE_SEVERITY_UNSPECIFIED", + "INFO", + "WARNING", + "ERROR" + ] + }, + "messageTime": { + "format": "google-datetime", + "description": "Time when message was logged.", + "type": "string" + } + }, + "id": "TransferMessage" + }, + "ListTransferLogsResponse": { + "description": "The returned list transfer run messages.", + "type": "object", + "properties": { + "transferMessages": { + "description": "The stored pipeline transfer messages.\nOutput only.", + "items": { + "$ref": "TransferMessage" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The next-pagination token. For multiple-page list results,\nthis token can be used as the\n`GetTransferRunLogRequest.page_token`\nto request the next page of list results.\nOutput only.", + "type": "string" + } + }, + "id": "ListTransferLogsResponse" + }, "ListDataSourcesResponse": { - "id": "ListDataSourcesResponse", "description": "Returns list of supported data sources and their metadata.", "type": "object", "properties": { "dataSources": { + "description": "List of supported data sources and their transfer settings.", "items": { "$ref": "DataSource" }, - "type": "array", - "description": "List of supported data sources and their transfer settings." + "type": "array" }, "nextPageToken": { "description": "The next-pagination token. For multiple-page list results,\nthis token can be used as the\n`ListDataSourcesRequest.page_token`\nto request the next page of list results.\n@OutputOnly", "type": "string" } - } + }, + "id": "ListDataSourcesResponse" }, "DataSourceParameter": { + "id": "DataSourceParameter", "description": "Represents a data source parameter with validation rules, so that\nparameters can be rendered in the UI. These parameters are given to us by\nsupported data sources, and include all needed information for rendering\nand validation.\nThus, whoever uses this api can decide to generate either generic ui,\nor custom data source specific forms.", "type": "object", "properties": { + "recurse": { + "description": "If set to true, schema should be taken from the parent with the same\nparameter_id. Only applicable when parameter type is RECORD.", + "type": "boolean" + }, "description": { "description": "Parameter description.", "type": "string" @@ -1314,21 +1607,21 @@ "type": "boolean" }, "repeated": { - "type": "boolean", - "description": "Can parameter have multiple values." + "description": "Can parameter have multiple values.", + "type": "boolean" }, "displayName": { "description": "Parameter display name in the user interface.", "type": "string" }, - "validationDescription": { - "description": "Description of the requirements for this field, in case the user input does\nnot fulfill the regex pattern or min/max values.", - "type": "string" - }, "immutable": { "description": "Cannot be changed after initial creation.", "type": "boolean" }, + "validationDescription": { + "description": "Description of the requirements for this field, in case the user input does\nnot fulfill the regex pattern or min/max values.", + "type": "string" + }, "fields": { "description": "When parameter is a record, describes child fields.", "items": { @@ -1342,6 +1635,8 @@ "type": "number" }, "type": { + "description": "Parameter type.", + "type": "string", "enumDescriptions": [ "Type unspecified.", "String parameter.", @@ -1359,36 +1654,12 @@ "BOOLEAN", "RECORD", "PLUS_PAGE" - ], - "description": "Parameter type.", - "type": "string" - }, - "recurse": { - "description": "If set to true, schema should be taken from the parent with the same\nparameter_id. Only applicable when parameter type is RECORD.", - "type": "boolean" + ] } - }, - "id": "DataSourceParameter" - }, - "ListTransferRunsResponse": { - "description": "The returned list of pipelines in the project.", - "type": "object", - "properties": { - "transferRuns": { - "description": "The stored pipeline transfer runs.\n@OutputOnly", - "items": { - "$ref": "TransferRun" - }, - "type": "array" - }, - "nextPageToken": { - "description": "The next-pagination token. For multiple-page list results,\nthis token can be used as the\n`ListTransferRunsRequest.page_token`\nto request the next page of list results.\n@OutputOnly", - "type": "string" - } - }, - "id": "ListTransferRunsResponse" + } }, "ListLocationsResponse": { + "id": "ListLocationsResponse", "description": "The response message for Locations.ListLocations.", "type": "object", "properties": { @@ -1403,8 +1674,25 @@ "description": "The standard List next-page token.", "type": "string" } - }, - "id": "ListLocationsResponse" + } + }, + "ListTransferRunsResponse": { + "id": "ListTransferRunsResponse", + "description": "The returned list of pipelines in the project.", + "type": "object", + "properties": { + "transferRuns": { + "description": "The stored pipeline transfer runs.\nOutput only.", + "items": { + "$ref": "TransferRun" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The next-pagination token. For multiple-page list results,\nthis token can be used as the\n`ListTransferRunsRequest.page_token`\nto request the next page of list results.\nOutput only.", + "type": "string" + } + } }, "IsEnabledRequest": { "description": "A request to determine whether data transfer is enabled for the project.", @@ -1413,6 +1701,7 @@ "id": "IsEnabledRequest" }, "SetEnabledRequest": { + "id": "SetEnabledRequest", "description": "A request to set whether data transfer is enabled or disabled for a project.", "type": "object", "properties": { @@ -1420,125 +1709,56 @@ "description": "Whether data transfer should be enabled or disabled for the project.", "type": "boolean" } - }, - "id": "SetEnabledRequest" + } }, "ListTransferConfigsResponse": { - "id": "ListTransferConfigsResponse", "description": "The returned list of pipelines in the project.", "type": "object", "properties": { - "nextPageToken": { - "description": "The next-pagination token. For multiple-page list results,\nthis token can be used as the\n`ListTransferConfigsRequest.page_token`\nto request the next page of list results.\n@OutputOnly", - "type": "string" - }, "transferConfigs": { + "description": "The stored pipeline transfer configurations.\nOutput only.", "items": { "$ref": "TransferConfig" }, - "type": "array", - "description": "The stored pipeline transfer configurations.\n@OutputOnly" + "type": "array" + }, + "nextPageToken": { + "description": "The next-pagination token. For multiple-page list results,\nthis token can be used as the\n`ListTransferConfigsRequest.page_token`\nto request the next page of list results.\nOutput only.", + "type": "string" } - } + }, + "id": "ListTransferConfigsResponse" }, "IsEnabledResponse": { + "id": "IsEnabledResponse", + "description": "A response to indicate whether data transfer is enabled for the project.", "type": "object", "properties": { "enabled": { "description": "Indicates whether the project is enabled.", "type": "boolean" } - }, - "id": "IsEnabledResponse", - "description": "A response to indicate whether data transfer is enabled for the project." + } }, "DataSource": { "description": "Represents data source metadata. Metadata is sufficient to\nrender UI and request proper OAuth tokens.", "type": "object", "properties": { - "displayName": { - "description": "User friendly data source name.", - "type": "string" - }, - "dataRefreshType": { - "enumDescriptions": [ - "The data source won't support data auto refresh, which is default value.", - "The data source supports data auto refresh, and runs will be scheduled\nfor the past few days. Does not allow custom values to be set for each\ntransfer config.", - "The data source supports data auto refresh, and runs will be scheduled\nfor the past few days. Allows custom values to be set for each transfer\nconfig." - ], - "enum": [ - "NONE", - "SLIDING_WINDOW", - "CUSTOM_SLIDING_WINDOW" - ], - "description": "Specifies whether the data source supports automatic data refresh for the\npast few days, and how it's supported.\nFor some data sources, data might not be complete until a few days later,\nso it's useful to refresh data automatically.", - "type": "string" - }, - "parameters": { - "description": "Data source parameters.", + "scopes": { + "description": "Api auth scopes for which refresh token needs to be obtained. Only valid\nwhen `client_id` is specified. Ignored otherwise. These are scopes needed\nby a data source to prepare data and ingest them into BigQuery,\ne.g., https://www.googleapis.com/auth/bigquery", "items": { - "$ref": "DataSourceParameter" + "type": "string" }, "type": "array" }, - "helpUrl": { - "type": "string", - "description": "Url for the help document for this data source." - }, - "defaultSchedule": { - "description": "Default data transfer schedule.\nExamples of valid schedules include:\n`1st,3rd monday of month 15:30`,\n`every wed,fri of jan,jun 13:15`, and\n`first sunday of quarter 00:00`.", - "type": "string" - }, - "supportsMultipleTransfers": { - "type": "boolean", - "description": "Indicates whether the data source supports multiple transfers\nto different BigQuery targets." - }, - "statusUpdateDeadlineSeconds": { - "format": "int32", - "description": "The number of seconds to wait for a status update from the data source\nbefore BigQuery marks the transfer as failed.", - "type": "integer" - }, - "manualRunsDisabled": { - "description": "Disables backfilling and manual run scheduling\nfor the data source.", - "type": "boolean" - }, - "defaultDataRefreshWindowDays": { - "format": "int32", - "description": "Default data refresh window on days.\nOnly meaningful when `data_refresh_type` = `SLIDING_WINDOW`.", - "type": "integer" - }, - "transferType": { - "enumDescriptions": [ - "Invalid or Unknown transfer type placeholder.", - "Batch data transfer.", - "Streaming data transfer. Streaming data source currently doesn't\nsupport multiple transfer configs per project." - ], - "enum": [ - "TRANSFER_TYPE_UNSPECIFIED", - "BATCH", - "STREAMING" - ], - "description": "Transfer type. Currently supports only batch transfers,\nwhich are transfers that use the BigQuery batch APIs (load or\nquery) to ingest the data.", - "type": "string" - }, - "description": { - "description": "User friendly data source description string.", - "type": "string" - }, - "dataSourceId": { - "description": "Data source id.", - "type": "string" - }, "name": { "description": "Data source resource name.", "type": "string" }, - "scopes": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Api auth scopes for which refresh token needs to be obtained. Only valid\nwhen `client_id` is specified. Ignored otherwise. These are scopes needed\nby a data source to prepare data and ingest them into BigQuery,\ne.g., https://www.googleapis.com/auth/bigquery" + "minimumScheduleInterval": { + "format": "google-duration", + "description": "The minimum interval between two consecutive scheduled runs.", + "type": "string" }, "clientId": { "description": "Data source client id which should be used to receive refresh token.\nWhen not supplied, no offline credentials are populated for data transfer.", @@ -1561,342 +1781,127 @@ "supportsCustomSchedule": { "description": "Specifies whether the data source supports a user defined schedule, or\noperates on the default schedule.\nWhen set to `true`, user can override default schedule.", "type": "boolean" + }, + "displayName": { + "description": "User friendly data source name.", + "type": "string" + }, + "updateDeadlineSeconds": { + "format": "int32", + "description": "The number of seconds to wait for an update from the data source\nbefore BigQuery marks the transfer as failed.", + "type": "integer" + }, + "dataRefreshType": { + "description": "Specifies whether the data source supports automatic data refresh for the\npast few days, and how it's supported.\nFor some data sources, data might not be complete until a few days later,\nso it's useful to refresh data automatically.", + "type": "string", + "enumDescriptions": [ + "The data source won't support data auto refresh, which is default value.", + "The data source supports data auto refresh, and runs will be scheduled\nfor the past few days. Does not allow custom values to be set for each\ntransfer config.", + "The data source supports data auto refresh, and runs will be scheduled\nfor the past few days. Allows custom values to be set for each transfer\nconfig." + ], + "enum": [ + "DATA_REFRESH_TYPE_UNSPECIFIED", + "SLIDING_WINDOW", + "CUSTOM_SLIDING_WINDOW" + ] + }, + "parameters": { + "description": "Data source parameters.", + "items": { + "$ref": "DataSourceParameter" + }, + "type": "array" + }, + "helpUrl": { + "description": "Url for the help document for this data source.", + "type": "string" + }, + "defaultSchedule": { + "description": "Default data transfer schedule.\nExamples of valid schedules include:\n`1st,3rd monday of month 15:30`,\n`every wed,fri of jan,jun 13:15`, and\n`first sunday of quarter 00:00`.", + "type": "string" + }, + "supportsMultipleTransfers": { + "description": "Indicates whether the data source supports multiple transfers\nto different BigQuery targets.", + "type": "boolean" + }, + "defaultDataRefreshWindowDays": { + "format": "int32", + "description": "Default data refresh window on days.\nOnly meaningful when `data_refresh_type` = `SLIDING_WINDOW`.", + "type": "integer" + }, + "manualRunsDisabled": { + "description": "Disables backfilling and manual run scheduling\nfor the data source.", + "type": "boolean" + }, + "transferType": { + "description": "Transfer type. Currently supports only batch transfers,\nwhich are transfers that use the BigQuery batch APIs (load or\nquery) to ingest the data.", + "type": "string", + "enumDescriptions": [ + "Invalid or Unknown transfer type placeholder.", + "Batch data transfer.", + "Streaming data transfer. Streaming data source currently doesn't\nsupport multiple transfer configs per project." + ], + "enum": [ + "TRANSFER_TYPE_UNSPECIFIED", + "BATCH", + "STREAMING" + ] + }, + "description": { + "description": "User friendly data source description string.", + "type": "string" + }, + "dataSourceId": { + "description": "Data source id.", + "type": "string" } }, "id": "DataSource" }, "ScheduleTransferRunsRequest": { + "description": "A request to schedule transfer runs for a time range.", "type": "object", "properties": { - "rangeStartTime": { - "format": "google-datetime", - "description": "Start time of the range of transfer runs.", - "type": "string" - }, "rangeEndTime": { "format": "google-datetime", "description": "End time of the range of transfer runs.", "type": "string" + }, + "rangeStartTime": { + "format": "google-datetime", + "description": "Start time of the range of transfer runs.", + "type": "string" } }, - "id": "ScheduleTransferRunsRequest", - "description": "A request to schedule transfer runs for a time range." + "id": "ScheduleTransferRunsRequest" }, "Empty": { + "id": "Empty", "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "type": "object", - "properties": {}, - "id": "Empty" - }, - "Location": { - "description": "A resource that represents Google Cloud Platform location.", - "type": "object", - "properties": { - "name": { - "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", - "type": "string" - }, - "locationId": { - "description": "The canonical id for this location. For example: `\"us-east1\"`.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", - "type": "object" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", - "type": "object" - } - }, - "id": "Location" - }, - "TransferConfig": { - "description": "Represents a data transfer configuration. A transfer configuration\ncontains all metadata needed to perform a data transfer. For example,\n`destination_dataset_id` specifies where data should be stored.\nWhen a new transfer configuration is created, the specified\n`destination_dataset_id` is created when needed and shared with the\nappropriate data source service account.", - "type": "object", - "properties": { - "dataSourceId": { - "description": "Data source id. Cannot be changed once data transfer is created.", - "type": "string" - }, - "status": { - "enumDescriptions": [ - "Status placeholder.", - "Data transfer is inactive.", - "Data transfer is scheduled and is waiting to be picked up by\ndata transfer backend.", - "Data transfer is in progress.", - "Data transfer completed successsfully.", - "Data transfer failed.", - "Data transfer is cancelled." - ], - "enum": [ - "TRANSFER_STATUS_UNSPECIFIED", - "INACTIVE", - "PENDING", - "RUNNING", - "SUCCEEDED", - "FAILED", - "CANCELLED" - ], - "description": "Status of the most recently updated transfer run.\n@OutputOnly", - "type": "string" - }, - "destinationDatasetId": { - "description": "The BigQuery target dataset id.", - "type": "string" - }, - "userId": { - "format": "int64", - "description": "GaiaID of the user on whose behalf transfer is done. Applicable only\nto data sources that do not support service accounts. When set to 0,\nthe data source service account credentials are used.\n@OutputOnly", - "type": "string" - }, - "name": { - "description": "The resource name of the transfer run.\nTransfer run names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer run.", - "type": "string" - }, - "params": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Data transfer specific parameters." - }, - "datasetRegion": { - "description": "Region in which BigQuery dataset is located. Currently possible values are:\n\"US\" and \"EU\".\n@OutputOnly", - "type": "string" - }, - "displayName": { - "description": "User specified display name for the data transfer.", - "type": "string" - }, - "nextRunTime": { - "format": "google-datetime", - "description": "Next time when data transfer will run. Output only. Applicable\nonly for batch data transfers.\n@OutputOnly", - "type": "string" - }, - "disabled": { - "type": "boolean", - "description": "Is this config disabled. When set to true, no runs are scheduled\nfor a given transfer." - }, - "schedule": { - "description": "Data transfer schedule in GROC format.\nIf the data source does not support a custom schedule, this should be\nempty. If it is empty, the default value for the data source will be\nused.\nThe specified times are in UTC.\nExamples of valid GROC include:\n`1st,3rd monday of month 15:30`,\n`every wed,fri of jan,jun 13:15`, and\n`first sunday of quarter 00:00`.", - "type": "string" - }, - "updateTime": { - "format": "google-datetime", - "description": "Data transfer modification time. Ignored by server on input.\n@OutputOnly", - "type": "string" - }, - "dataRefreshWindowDays": { - "type": "integer", - "format": "int32", - "description": "The number of days to look back to automatically refresh the data.\nFor example, if `data_refresh_window_days = 10`, then every day\nBigQuery reingests data for [today-10, today-1], rather than ingesting data\nfor just [today-1].\nOnly valid if the data source supports the feature. Set the value to 0\nto use the default value." - } - }, - "id": "TransferConfig" - }, - "TransferRun": { - "id": "TransferRun", - "description": "Represents a data transfer run.", - "type": "object", - "properties": { - "dataSourceId": { - "description": "Data source id.\n@OutputOnly", - "type": "string" - }, - "status": { - "enumDescriptions": [ - "Status placeholder.", - "Data transfer is inactive.", - "Data transfer is scheduled and is waiting to be picked up by\ndata transfer backend.", - "Data transfer is in progress.", - "Data transfer completed successsfully.", - "Data transfer failed.", - "Data transfer is cancelled." - ], - "enum": [ - "TRANSFER_STATUS_UNSPECIFIED", - "INACTIVE", - "PENDING", - "RUNNING", - "SUCCEEDED", - "FAILED", - "CANCELLED" - ], - "description": "Data transfer run status. Ignored for input requests.\n@OutputOnly", - "type": "string" - }, - "userId": { - "format": "int64", - "description": "The user id for this transfer run.\n@OutputOnly", - "type": "string" - }, - "name": { - "description": "The resource name of the transfer run.\nTransfer run names have the form\n`projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`.\nThe name is ignored when creating a transfer run.", - "type": "string" - }, - "destinationDatasetId": { - "type": "string", - "description": "The BigQuery target dataset id." - }, - "params": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Data transfer specific parameters.", - "type": "object" - }, - "endTime": { - "format": "google-datetime", - "description": "Time when transfer run ended. Parameter ignored by server for input\nrequests.\n@OutputOnly", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "Time when transfer run was started. Parameter ignored by server for input\nrequests.\n@OutputOnly", - "type": "string" - }, - "datasetRegion": { - "description": "Region in which BigQuery dataset is located. Currently possible values are:\n\"US\" and \"EU\".\n@OutputOnly", - "type": "string" - }, - "scheduleTime": { - "format": "google-datetime", - "description": "Minimum time after which a transfer run can be started.", - "type": "string" - }, - "schedule": { - "description": "Describes the schedule of this transfer run if it was created as part of\na regular schedule. For batch transfer runs that are directly created,\nthis is empty.\nNOTE: the system might choose to delay the schedule depending on the\ncurrent load, so `schedule_time` doesn't always matches this.\n@OutputOnly", - "type": "string" - }, - "updateTime": { - "format": "google-datetime", - "description": "Last time the data transfer run status was updated.\n@OutputOnly", - "type": "string" - }, - "runTime": { - "format": "google-datetime", - "description": "For batch transfer runs, specifies the date and time that\ndata should be ingested.", - "type": "string" - } - } - }, - "CheckValidCredsRequest": { - "description": "A request to determine whether the user has valid credentials. This method\nis used to limit the number of OAuth popups in the user interface. The\nuser id is inferred from the API call context.\nIf the data source has the Google+ authorization type, this method\nreturns false, as it cannot be determined whether the credentials are\nalready valid merely based on the user id.", - "type": "object", - "properties": {}, - "id": "CheckValidCredsRequest" - }, - "CheckValidCredsResponse": { - "id": "CheckValidCredsResponse", - "description": "A response indicating whether the credentials exist and are valid.", - "type": "object", - "properties": { - "hasValidCreds": { - "description": "If set to `true`, the credentials exist and are valid.", - "type": "boolean" - } - } - }, - "ScheduleTransferRunsResponse": { - "id": "ScheduleTransferRunsResponse", - "description": "A response to schedule transfer runs for a time range.", - "type": "object", - "properties": { - "createdRuns": { - "description": "The transfer runs that were created.", - "items": { - "$ref": "TransferRun" - }, - "type": "array" - } - } - }, - "ListTransferLogsResponse": { - "id": "ListTransferLogsResponse", - "description": "The returned list transfer run messages.", - "type": "object", - "properties": { - "transferMessages": { - "description": "The stored pipeline transfer messages.\n@OutputOnly", - "items": { - "$ref": "TransferMessage" - }, - "type": "array" - }, - "nextPageToken": { - "type": "string", - "description": "The next-pagination token. For multiple-page list results,\nthis token can be used as the\n`GetTransferRunLogRequest.page_token`\nto request the next page of list results.\n@OutputOnly" - } - } - }, - "TransferMessage": { - "description": "Represents a user facing message for a particular data transfer run.", - "type": "object", - "properties": { - "messageText": { - "description": "Message text.", - "type": "string" - }, - "severity": { - "enumDescriptions": [ - "No severity specified.", - "Informational message.", - "Warning message.", - "Error message." - ], - "enum": [ - "MESSAGE_SEVERITY_UNSPECIFIED", - "INFO", - "WARNING", - "ERROR" - ], - "description": "Message severity.", - "type": "string" - }, - "messageTime": { - "format": "google-datetime", - "description": "Time when message was logged.", - "type": "string" - } - }, - "id": "TransferMessage" + "properties": {} } }, - "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, "canonicalName": "BigQuery Data Transfer", "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/bigquery": { "description": "View and manage your data in Google BigQuery" }, "https://www.googleapis.com/auth/cloud-platform.read-only": { "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" } } } }, - "rootUrl": "https://bigquerydatatransfer.googleapis.com/", - "ownerDomain": "google.com", - "name": "bigquerydatatransfer", - "batchPath": "batch", - "title": "BigQuery Data Transfer Service API", - "ownerName": "Google" + "rootUrl": "https://bigquerydatatransfer.googleapis.com/" } diff --git a/vendor/google.golang.org/api/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go b/vendor/google.golang.org/api/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go index 1a362e14a..99d228367 100644 --- a/vendor/google.golang.org/api/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go +++ b/vendor/google.golang.org/api/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go @@ -274,8 +274,8 @@ type DataSource struct { // so it's useful to refresh data automatically. // // Possible values: - // "NONE" - The data source won't support data auto refresh, which is - // default value. + // "DATA_REFRESH_TYPE_UNSPECIFIED" - The data source won't support + // data auto refresh, which is default value. // "SLIDING_WINDOW" - The data source supports data auto refresh, and // runs will be scheduled // for the past few days. Does not allow custom values to be set for @@ -317,6 +317,10 @@ type DataSource struct { // for the data source. ManualRunsDisabled bool `json:"manualRunsDisabled,omitempty"` + // MinimumScheduleInterval: The minimum interval between two consecutive + // scheduled runs. + MinimumScheduleInterval string `json:"minimumScheduleInterval,omitempty"` + // Name: Data source resource name. Name string `json:"name,omitempty"` @@ -331,11 +335,6 @@ type DataSource struct { // e.g., https://www.googleapis.com/auth/bigquery Scopes []string `json:"scopes,omitempty"` - // StatusUpdateDeadlineSeconds: The number of seconds to wait for a - // status update from the data source - // before BigQuery marks the transfer as failed. - StatusUpdateDeadlineSeconds int64 `json:"statusUpdateDeadlineSeconds,omitempty"` - // SupportsCustomSchedule: Specifies whether the data source supports a // user defined schedule, or // operates on the default schedule. @@ -361,6 +360,11 @@ type DataSource struct { // support multiple transfer configs per project. TransferType string `json:"transferType,omitempty"` + // UpdateDeadlineSeconds: The number of seconds to wait for an update + // from the data source + // before BigQuery marks the transfer as failed. + UpdateDeadlineSeconds int64 `json:"updateDeadlineSeconds,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -646,12 +650,11 @@ type ListTransferConfigsResponse struct { // the // `ListTransferConfigsRequest.page_token` // to request the next page of list results. - // @OutputOnly + // Output only. NextPageToken string `json:"nextPageToken,omitempty"` - // TransferConfigs: The stored pipeline transfer - // configurations. - // @OutputOnly + // TransferConfigs: The stored pipeline transfer configurations. + // Output only. TransferConfigs []*TransferConfig `json:"transferConfigs,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -689,11 +692,11 @@ type ListTransferLogsResponse struct { // the // `GetTransferRunLogRequest.page_token` // to request the next page of list results. - // @OutputOnly + // Output only. NextPageToken string `json:"nextPageToken,omitempty"` // TransferMessages: The stored pipeline transfer messages. - // @OutputOnly + // Output only. TransferMessages []*TransferMessage `json:"transferMessages,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -731,11 +734,11 @@ type ListTransferRunsResponse struct { // this token can be used as the // `ListTransferRunsRequest.page_token` // to request the next page of list results. - // @OutputOnly + // Output only. NextPageToken string `json:"nextPageToken,omitempty"` // TransferRuns: The stored pipeline transfer runs. - // @OutputOnly + // Output only. TransferRuns []*TransferRun `json:"transferRuns,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -938,7 +941,7 @@ type TransferConfig struct { // DatasetRegion: Region in which BigQuery dataset is located. Currently // possible values are: // "US" and "EU". - // @OutputOnly + // Output only. DatasetRegion string `json:"datasetRegion,omitempty"` // DestinationDatasetId: The BigQuery target dataset id. @@ -961,33 +964,36 @@ type TransferConfig struct { // run. Name string `json:"name,omitempty"` - // NextRunTime: Next time when data transfer will run. Output only. - // Applicable - // only for batch data transfers. - // @OutputOnly + // NextRunTime: Next time when data transfer will run. + // Output only. NextRunTime string `json:"nextRunTime,omitempty"` // Params: Data transfer specific parameters. Params googleapi.RawMessage `json:"params,omitempty"` - // Schedule: Data transfer schedule in GROC format. + // Schedule: Data transfer schedule. // If the data source does not support a custom schedule, this should // be // empty. If it is empty, the default value for the data source will // be // used. // The specified times are in UTC. - // Examples of valid GROC include: + // Examples of valid format: // `1st,3rd monday of month 15:30`, // `every wed,fri of jan,jun 13:15`, and // `first sunday of quarter 00:00`. + // See more explanation about the format + // here: + // https://cloud.google.com/appengine/docs/flexible/python/scheduli + // ng-jobs-with-cron-yaml#the_schedule_format + // NOTE: the granularity should be at least 8 hours, or less frequent. Schedule string `json:"schedule,omitempty"` - // Status: Status of the most recently updated transfer run. - // @OutputOnly + // State: State of the most recently updated transfer run. + // Output only. // // Possible values: - // "TRANSFER_STATUS_UNSPECIFIED" - Status placeholder. + // "TRANSFER_STATE_UNSPECIFIED" - State placeholder. // "INACTIVE" - Data transfer is inactive. // "PENDING" - Data transfer is scheduled and is waiting to be picked // up by @@ -996,11 +1002,11 @@ type TransferConfig struct { // "SUCCEEDED" - Data transfer completed successsfully. // "FAILED" - Data transfer failed. // "CANCELLED" - Data transfer is cancelled. - Status string `json:"status,omitempty"` + State string `json:"state,omitempty"` // UpdateTime: Data transfer modification time. Ignored by server on // input. - // @OutputOnly + // Output only. UpdateTime string `json:"updateTime,omitempty"` // UserId: GaiaID of the user on whose behalf transfer is done. @@ -1008,7 +1014,7 @@ type TransferConfig struct { // to data sources that do not support service accounts. When set to // 0, // the data source service account credentials are used. - // @OutputOnly + // Output only. UserId int64 `json:"userId,omitempty,string"` // ServerResponse contains the HTTP response code and headers from the @@ -1084,13 +1090,13 @@ func (s *TransferMessage) MarshalJSON() ([]byte, error) { // TransferRun: Represents a data transfer run. type TransferRun struct { // DataSourceId: Data source id. - // @OutputOnly + // Output only. DataSourceId string `json:"dataSourceId,omitempty"` // DatasetRegion: Region in which BigQuery dataset is located. Currently // possible values are: // "US" and "EU". - // @OutputOnly + // Output only. DatasetRegion string `json:"datasetRegion,omitempty"` // DestinationDatasetId: The BigQuery target dataset id. @@ -1099,7 +1105,7 @@ type TransferRun struct { // EndTime: Time when transfer run ended. Parameter ignored by server // for input // requests. - // @OutputOnly + // Output only. EndTime string `json:"endTime,omitempty"` // Name: The resource name of the transfer run. @@ -1125,9 +1131,8 @@ type TransferRun struct { // this is empty. // NOTE: the system might choose to delay the schedule depending on // the - // current load, so `schedule_time` doesn't always matches - // this. - // @OutputOnly + // current load, so `schedule_time` doesn't always matches this. + // Output only. Schedule string `json:"schedule,omitempty"` // ScheduleTime: Minimum time after which a transfer run can be started. @@ -1136,15 +1141,14 @@ type TransferRun struct { // StartTime: Time when transfer run was started. Parameter ignored by // server for input // requests. - // @OutputOnly + // Output only. StartTime string `json:"startTime,omitempty"` - // Status: Data transfer run status. Ignored for input - // requests. - // @OutputOnly + // State: Data transfer run state. Ignored for input requests. + // Output only. // // Possible values: - // "TRANSFER_STATUS_UNSPECIFIED" - Status placeholder. + // "TRANSFER_STATE_UNSPECIFIED" - State placeholder. // "INACTIVE" - Data transfer is inactive. // "PENDING" - Data transfer is scheduled and is waiting to be picked // up by @@ -1153,15 +1157,14 @@ type TransferRun struct { // "SUCCEEDED" - Data transfer completed successsfully. // "FAILED" - Data transfer failed. // "CANCELLED" - Data transfer is cancelled. - Status string `json:"status,omitempty"` + State string `json:"state,omitempty"` - // UpdateTime: Last time the data transfer run status was - // updated. - // @OutputOnly + // UpdateTime: Last time the data transfer run state was updated. + // Output only. UpdateTime string `json:"updateTime,omitempty"` // UserId: The user id for this transfer run. - // @OutputOnly + // Output only. UserId int64 `json:"userId,omitempty,string"` // ServerResponse contains the HTTP response code and headers from the @@ -4320,19 +4323,19 @@ func (c *ProjectsLocationsTransferConfigsRunsListCall) RunAttempt(runAttempt str return c } -// Statuses sets the optional parameter "statuses": When specified, only -// transfer runs with requested statuses are returned. +// States sets the optional parameter "states": When specified, only +// transfer runs with requested states are returned. // // Possible values: -// "TRANSFER_STATUS_UNSPECIFIED" +// "TRANSFER_STATE_UNSPECIFIED" // "INACTIVE" // "PENDING" // "RUNNING" // "SUCCEEDED" // "FAILED" // "CANCELLED" -func (c *ProjectsLocationsTransferConfigsRunsListCall) Statuses(statuses ...string) *ProjectsLocationsTransferConfigsRunsListCall { - c.urlParams_.SetMulti("statuses", append([]string{}, statuses...)) +func (c *ProjectsLocationsTransferConfigsRunsListCall) States(states ...string) *ProjectsLocationsTransferConfigsRunsListCall { + c.urlParams_.SetMulti("states", append([]string{}, states...)) return c } @@ -4465,10 +4468,10 @@ func (c *ProjectsLocationsTransferConfigsRunsListCall) Do(opts ...googleapi.Call // "location": "query", // "type": "string" // }, - // "statuses": { - // "description": "When specified, only transfer runs with requested statuses are returned.", + // "states": { + // "description": "When specified, only transfer runs with requested states are returned.", // "enum": [ - // "TRANSFER_STATUS_UNSPECIFIED", + // "TRANSFER_STATE_UNSPECIFIED", // "INACTIVE", // "PENDING", // "RUNNING", @@ -6018,19 +6021,19 @@ func (c *ProjectsTransferConfigsRunsListCall) RunAttempt(runAttempt string) *Pro return c } -// Statuses sets the optional parameter "statuses": When specified, only -// transfer runs with requested statuses are returned. +// States sets the optional parameter "states": When specified, only +// transfer runs with requested states are returned. // // Possible values: -// "TRANSFER_STATUS_UNSPECIFIED" +// "TRANSFER_STATE_UNSPECIFIED" // "INACTIVE" // "PENDING" // "RUNNING" // "SUCCEEDED" // "FAILED" // "CANCELLED" -func (c *ProjectsTransferConfigsRunsListCall) Statuses(statuses ...string) *ProjectsTransferConfigsRunsListCall { - c.urlParams_.SetMulti("statuses", append([]string{}, statuses...)) +func (c *ProjectsTransferConfigsRunsListCall) States(states ...string) *ProjectsTransferConfigsRunsListCall { + c.urlParams_.SetMulti("states", append([]string{}, states...)) return c } @@ -6163,10 +6166,10 @@ func (c *ProjectsTransferConfigsRunsListCall) Do(opts ...googleapi.CallOption) ( // "location": "query", // "type": "string" // }, - // "statuses": { - // "description": "When specified, only transfer runs with requested statuses are returned.", + // "states": { + // "description": "When specified, only transfer runs with requested states are returned.", // "enum": [ - // "TRANSFER_STATUS_UNSPECIFIED", + // "TRANSFER_STATE_UNSPECIFIED", // "INACTIVE", // "PENDING", // "RUNNING", diff --git a/vendor/google.golang.org/api/books/v1/books-api.json b/vendor/google.golang.org/api/books/v1/books-api.json index 1e043022d..1e2667517 100644 --- a/vendor/google.golang.org/api/books/v1/books-api.json +++ b/vendor/google.golang.org/api/books/v1/books-api.json @@ -20,7 +20,7 @@ "basePath": "/books/v1/", "rootUrl": "https://www.googleapis.com/", "servicePath": "books/v1/", - "batchPath": "batch", + "batchPath": "batch/books/v1", "parameters": { "alt": { "type": "string", diff --git a/vendor/google.golang.org/api/calendar/v3/calendar-api.json b/vendor/google.golang.org/api/calendar/v3/calendar-api.json index e9c4a9f0a..413ce8230 100644 --- a/vendor/google.golang.org/api/calendar/v3/calendar-api.json +++ b/vendor/google.golang.org/api/calendar/v3/calendar-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/h_kaqUFBJHsu0TsHlTyJklsHyzA\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/o_EybjCqMtVYBedHGweVn2CP_Ko\"", "discoveryVersion": "v1", "id": "calendar:v3", "name": "calendar", "version": "v3", - "revision": "20170723", + "revision": "20170903", "title": "Calendar API", "description": "Manipulates events and other calendar data.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/classroom/v1/classroom-api.json b/vendor/google.golang.org/api/classroom/v1/classroom-api.json index fa64fb370..d13a4daa3 100644 --- a/vendor/google.golang.org/api/classroom/v1/classroom-api.json +++ b/vendor/google.golang.org/api/classroom/v1/classroom-api.json @@ -1,17 +1,94 @@ { - "basePath": "", - "ownerDomain": "google.com", - "name": "classroom", - "batchPath": "batch", - "revision": "20170804", - "id": "classroom:v1", + "revision": "20170909", "documentationLink": "https://developers.google.com/classroom/", + "id": "classroom:v1", "title": "Google Classroom API", "discoveryVersion": "v1", "ownerName": "Google", "resources": { "invitations": { "methods": { + "list": { + "id": "classroom.invitations.list", + "path": "v1/invitations", + "description": "Returns a list of invitations that the requesting user is permitted to\nview, restricted to those that match the list request.\n\n*Note:* At least one of `user_id` or `course_id` must be supplied. Both\nfields can be supplied.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` for access errors.", + "response": { + "$ref": "ListInvitationsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ], + "parameters": { + "courseId": { + "description": "Restricts returned invitations to those for a course with the specified\nidentifier.", + "type": "string", + "location": "query" + }, + "pageToken": { + "description": "nextPageToken\nvalue returned from a previous\nlist call, indicating\nthat the subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", + "type": "string", + "location": "query" + }, + "userId": { + "location": "query", + "description": "Restricts returned invitations to those for a specific user. The identifier\ncan be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Maximum number of items to return. Zero means no maximum.\n\nThe server may return fewer than the specified number of results.", + "type": "integer", + "location": "query" + } + }, + "flatPath": "v1/invitations" + }, + "get": { + "flatPath": "v1/invitations/{id}", + "id": "classroom.invitations.get", + "path": "v1/invitations/{id}", + "description": "Returns an invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view the\nrequested invitation or for access errors.\n* `NOT_FOUND` if no invitation exists with the requested ID.", + "response": { + "$ref": "Invitation" + }, + "httpMethod": "GET", + "parameterOrder": [ + "id" + ], + "parameters": { + "id": { + "description": "Identifier of the invitation to return.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ] + }, + "create": { + "id": "classroom.invitations.create", + "path": "v1/invitations", + "request": { + "$ref": "Invitation" + }, + "description": "Creates an invitation. Only one invitation for a user and course may exist\nat a time. Delete and re-create an invitation to make changes.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\ninvitations for this course or for access errors.\n* `NOT_FOUND` if the course or the user does not exist.\n* `FAILED_PRECONDITION` if the requested user's account is disabled or if\nthe user already has this role or a role with greater permissions.\n* `ALREADY_EXISTS` if an invitation for the specified user and course\nalready exists.", + "response": { + "$ref": "Invitation" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters" + ], + "parameters": {}, + "flatPath": "v1/invitations" + }, "accept": { "response": { "$ref": "Empty" @@ -37,9 +114,6 @@ "description": "Accepts an invitation, removing it and adding the invited user to the\nteachers or students (as appropriate) of the specified course. Only the\ninvited user may accept an invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to accept the\nrequested invitation or for access errors.\n* `FAILED_PRECONDITION` for the following request errors:\n * CourseMemberLimitReached\n * CourseNotModifiable\n * CourseTeacherLimitReached\n * UserGroupsMembershipLimitReached\n* `NOT_FOUND` if no invitation exists with the requested ID." }, "delete": { - "id": "classroom.invitations.delete", - "path": "v1/invitations/{id}", - "description": "Deletes an invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete the\nrequested invitation or for access errors.\n* `NOT_FOUND` if no invitation exists with the requested ID.", "response": { "$ref": "Empty" }, @@ -58,88 +132,10 @@ "required": true } }, - "flatPath": "v1/invitations/{id}" - }, - "list": { - "parameterOrder": [], - "httpMethod": "GET", - "response": { - "$ref": "ListInvitationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters", - "https://www.googleapis.com/auth/classroom.rosters.readonly" - ], - "parameters": { - "pageToken": { - "description": "nextPageToken\nvalue returned from a previous\nlist call, indicating\nthat the subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", - "type": "string", - "location": "query" - }, - "userId": { - "description": "Restricts returned invitations to those for a specific user. The identifier\ncan be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum number of items to return. Zero means no maximum.\n\nThe server may return fewer than the specified number of results.", - "type": "integer" - }, - "courseId": { - "type": "string", - "location": "query", - "description": "Restricts returned invitations to those for a course with the specified\nidentifier." - } - }, - "flatPath": "v1/invitations", - "id": "classroom.invitations.list", - "path": "v1/invitations", - "description": "Returns a list of invitations that the requesting user is permitted to\nview, restricted to those that match the list request.\n\n*Note:* At least one of `user_id` or `course_id` must be supplied. Both\nfields can be supplied.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` for access errors." - }, - "get": { - "id": "classroom.invitations.get", + "flatPath": "v1/invitations/{id}", + "id": "classroom.invitations.delete", "path": "v1/invitations/{id}", - "description": "Returns an invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view the\nrequested invitation or for access errors.\n* `NOT_FOUND` if no invitation exists with the requested ID.", - "response": { - "$ref": "Invitation" - }, - "parameterOrder": [ - "id" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters", - "https://www.googleapis.com/auth/classroom.rosters.readonly" - ], - "parameters": { - "id": { - "type": "string", - "required": true, - "location": "path", - "description": "Identifier of the invitation to return." - } - }, - "flatPath": "v1/invitations/{id}" - }, - "create": { - "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters" - ], - "parameters": {}, - "flatPath": "v1/invitations", - "path": "v1/invitations", - "id": "classroom.invitations.create", - "request": { - "$ref": "Invitation" - }, - "description": "Creates an invitation. Only one invitation for a user and course may exist\nat a time. Delete and re-create an invitation to make changes.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\ninvitations for this course or for access errors.\n* `NOT_FOUND` if the course or the user does not exist.\n* `FAILED_PRECONDITION` if the requested user's account is disabled or if\nthe user already has this role or a role with greater permissions.\n* `ALREADY_EXISTS` if an invitation for the specified user and course\nalready exists.", - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "Invitation" - } + "description": "Deletes an invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete the\nrequested invitation or for access errors.\n* `NOT_FOUND` if no invitation exists with the requested ID." } } }, @@ -154,20 +150,20 @@ "userId" ], "httpMethod": "GET", - "parameters": { - "userId": { - "description": "Identifier of the profile to return. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string", - "required": true, - "location": "path" - } - }, "scopes": [ "https://www.googleapis.com/auth/classroom.profile.emails", "https://www.googleapis.com/auth/classroom.profile.photos", "https://www.googleapis.com/auth/classroom.rosters", "https://www.googleapis.com/auth/classroom.rosters.readonly" ], + "parameters": { + "userId": { + "location": "path", + "description": "Identifier of the profile to return. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string", + "required": true + } + }, "flatPath": "v1/userProfiles/{userId}", "id": "classroom.userProfiles.get", "path": "v1/userProfiles/{userId}" @@ -185,56 +181,59 @@ "invitationId" ], "httpMethod": "PATCH", - "parameters": { - "updateMask": { - "type": "string", - "location": "query", - "format": "google-fieldmask", - "description": "Mask that identifies which fields on the course to update.\nThis field is required to do an update. The update will fail if invalid\nfields are specified. The following fields are valid:\n\n* `state`\n\nWhen set in a query parameter, this field should be specified as\n\n`updateMask=\u003cfield1\u003e,\u003cfield2\u003e,...`" - }, - "invitationId": { - "location": "path", - "description": "The `id` field of the `GuardianInvitation` to be modified.", - "type": "string", - "required": true - }, - "studentId": { - "description": "The ID of the student whose guardian invitation is to be modified.", - "type": "string", - "required": true, - "location": "path" - } - }, "scopes": [ "https://www.googleapis.com/auth/classroom.guardianlinks.students" ], + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "description": "Mask that identifies which fields on the course to update.\nThis field is required to do an update. The update will fail if invalid\nfields are specified. The following fields are valid:\n\n* `state`\n\nWhen set in a query parameter, this field should be specified as\n\n`updateMask=\u003cfield1\u003e,\u003cfield2\u003e,...`", + "type": "string", + "location": "query" + }, + "invitationId": { + "description": "The `id` field of the `GuardianInvitation` to be modified.", + "type": "string", + "required": true, + "location": "path" + }, + "studentId": { + "location": "path", + "description": "The ID of the student whose guardian invitation is to be modified.", + "type": "string", + "required": true + } + }, "flatPath": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", "id": "classroom.userProfiles.guardianInvitations.patch", "path": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", - "description": "Modifies a guardian invitation.\n\nCurrently, the only valid modification is to change the `state` from\n`PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the current user does not have permission to\n manage guardians, if guardians are not enabled for the domain in question\n or for other access errors.\n* `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state.\n* `INVALID_ARGUMENT` if the format of the student ID provided\n cannot be recognized (it is not an email address, nor a `user_id` from\n this API), or if the passed `GuardianInvitation` has a `state` other than\n `COMPLETE`, or if it modifies fields other than `state`.\n* `NOT_FOUND` if the student ID provided is a valid student ID, but\n Classroom has no record of that student, or if the `id` field does not\n refer to a guardian invitation known to Classroom.", "request": { "$ref": "GuardianInvitation" - } + }, + "description": "Modifies a guardian invitation.\n\nCurrently, the only valid modification is to change the `state` from\n`PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the current user does not have permission to\n manage guardians, if guardians are not enabled for the domain in question\n or for other access errors.\n* `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state.\n* `INVALID_ARGUMENT` if the format of the student ID provided\n cannot be recognized (it is not an email address, nor a `user_id` from\n this API), or if the passed `GuardianInvitation` has a `state` other than\n `COMPLETE`, or if it modifies fields other than `state`.\n* `NOT_FOUND` if the student ID provided is a valid student ID, but\n Classroom has no record of that student, or if the `id` field does not\n refer to a guardian invitation known to Classroom." }, "get": { - "flatPath": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", - "path": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", "id": "classroom.userProfiles.guardianInvitations.get", + "path": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", "description": "Returns a specific guardian invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view\n guardian invitations for the student identified by the `student_id`, if\n guardians are not enabled for the domain in question, or for other\n access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`).\n* `NOT_FOUND` if Classroom cannot find any record of the given student or\n `invitation_id`. May also be returned if the student exists, but the\n requesting user does not have access to see that student.", - "httpMethod": "GET", "parameterOrder": [ "studentId", "invitationId" ], + "httpMethod": "GET", "response": { "$ref": "GuardianInvitation" }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.guardianlinks.students", + "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly" + ], "parameters": { "invitationId": { + "location": "path", "description": "The `id` field of the `GuardianInvitation` being requested.", "type": "string", - "required": true, - "location": "path" + "required": true }, "studentId": { "location": "path", @@ -243,138 +242,105 @@ "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.guardianlinks.students", - "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly" - ] + "flatPath": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}" }, "list": { - "parameterOrder": [ - "studentId" - ], + "description": "Returns a list of guardian invitations that the requesting user is\npermitted to view, filtered by the parameters provided.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if a `student_id` is specified, and the requesting\n user is not permitted to view guardian invitations for that student, if\n `\"-\"` is specified as the `student_id` and the user is not a domain\n administrator, if guardians are not enabled for the domain in question,\n or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`). May also be returned if an invalid\n `page_token` or `state` is provided.\n* `NOT_FOUND` if a `student_id` is specified, and its format can be\n recognized, but Classroom has no record of that student.", "response": { "$ref": "ListGuardianInvitationsResponse" }, + "parameterOrder": [ + "studentId" + ], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/classroom.guardianlinks.students", + "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly" + ], "parameters": { - "studentId": { - "location": "path", - "description": "The ID of the student whose guardian invitations are to be returned.\nThe identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user\n* the string literal `\"-\"`, indicating that results should be returned for\n all students that the requesting user is permitted to view guardian\n invitations.", - "type": "string", - "required": true - }, "pageToken": { - "location": "query", "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", - "type": "string" + "type": "string", + "location": "query" }, "pageSize": { - "type": "integer", - "location": "query", "format": "int32", - "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results." + "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + "type": "integer", + "location": "query" }, "states": { + "repeated": true, + "location": "query", "enum": [ "GUARDIAN_INVITATION_STATE_UNSPECIFIED", "PENDING", "COMPLETE" ], "description": "If specified, only results with the specified `state` values will be\nreturned. Otherwise, results with a `state` of `PENDING` will be returned.", - "type": "string", - "repeated": true, - "location": "query" + "type": "string" }, "invitedEmailAddress": { - "type": "string", "location": "query", - "description": "If specified, only results with the specified `invited_email_address`\nwill be returned." + "description": "If specified, only results with the specified `invited_email_address`\nwill be returned.", + "type": "string" + }, + "studentId": { + "location": "path", + "description": "The ID of the student whose guardian invitations are to be returned.\nThe identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user\n* the string literal `\"-\"`, indicating that results should be returned for\n all students that the requesting user is permitted to view guardian\n invitations.", + "type": "string", + "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.guardianlinks.students", - "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly" - ], "flatPath": "v1/userProfiles/{studentId}/guardianInvitations", "id": "classroom.userProfiles.guardianInvitations.list", - "path": "v1/userProfiles/{studentId}/guardianInvitations", - "description": "Returns a list of guardian invitations that the requesting user is\npermitted to view, filtered by the parameters provided.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if a `student_id` is specified, and the requesting\n user is not permitted to view guardian invitations for that student, if\n `\"-\"` is specified as the `student_id` and the user is not a domain\n administrator, if guardians are not enabled for the domain in question,\n or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`). May also be returned if an invalid\n `page_token` or `state` is provided.\n* `NOT_FOUND` if a `student_id` is specified, and its format can be\n recognized, but Classroom has no record of that student." + "path": "v1/userProfiles/{studentId}/guardianInvitations" }, "create": { - "response": { - "$ref": "GuardianInvitation" - }, + "httpMethod": "POST", "parameterOrder": [ "studentId" ], - "httpMethod": "POST", + "response": { + "$ref": "GuardianInvitation" + }, + "parameters": { + "studentId": { + "description": "ID of the student (in standard format)", + "type": "string", + "required": true, + "location": "path" + } + }, "scopes": [ "https://www.googleapis.com/auth/classroom.guardianlinks.students" ], - "parameters": { - "studentId": { - "type": "string", - "required": true, - "location": "path", - "description": "ID of the student (in standard format)" - } - }, "flatPath": "v1/userProfiles/{studentId}/guardianInvitations", - "id": "classroom.userProfiles.guardianInvitations.create", "path": "v1/userProfiles/{studentId}/guardianInvitations", + "id": "classroom.userProfiles.guardianInvitations.create", + "description": "Creates a guardian invitation, and sends an email to the guardian asking\nthem to confirm that they are the student's guardian.\n\nOnce the guardian accepts the invitation, their `state` will change to\n`COMPLETED` and they will start receiving guardian notifications. A\n`Guardian` resource will also be created to represent the active guardian.\n\nThe request object must have the `student_id` and\n`invited_email_address` fields set. Failing to set these fields, or\nsetting any other fields in the request, will result in an error.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the current user does not have permission to\n manage guardians, if the guardian in question has already rejected\n too many requests for that student, if guardians are not enabled for the\n domain in question, or for other access errors.\n* `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian\n link limit.\n* `INVALID_ARGUMENT` if the guardian email address is not valid (for\n example, if it is too long), or if the format of the student ID provided\n cannot be recognized (it is not an email address, nor a `user_id` from\n this API). This error will also be returned if read-only fields are set,\n or if the `state` field is set to to a value other than `PENDING`.\n* `NOT_FOUND` if the student ID provided is a valid student ID, but\n Classroom has no record of that student.\n* `ALREADY_EXISTS` if there is already a pending guardian invitation for\n the student and `invited_email_address` provided, or if the provided\n `invited_email_address` matches the Google account of an existing\n `Guardian` for this user.", "request": { "$ref": "GuardianInvitation" - }, - "description": "Creates a guardian invitation, and sends an email to the guardian asking\nthem to confirm that they are the student's guardian.\n\nOnce the guardian accepts the invitation, their `state` will change to\n`COMPLETED` and they will start receiving guardian notifications. A\n`Guardian` resource will also be created to represent the active guardian.\n\nThe request object must have the `student_id` and\n`invited_email_address` fields set. Failing to set these fields, or\nsetting any other fields in the request, will result in an error.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the current user does not have permission to\n manage guardians, if the guardian in question has already rejected\n too many requests for that student, if guardians are not enabled for the\n domain in question, or for other access errors.\n* `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian\n link limit.\n* `INVALID_ARGUMENT` if the guardian email address is not valid (for\n example, if it is too long), or if the format of the student ID provided\n cannot be recognized (it is not an email address, nor a `user_id` from\n this API). This error will also be returned if read-only fields are set,\n or if the `state` field is set to to a value other than `PENDING`.\n* `NOT_FOUND` if the student ID provided is a valid student ID, but\n Classroom has no record of that student.\n* `ALREADY_EXISTS` if there is already a pending guardian invitation for\n the student and `invited_email_address` provided, or if the provided\n `invited_email_address` matches the Google account of an existing\n `Guardian` for this user." + } } } }, "guardians": { "methods": { "delete": { + "description": "Deletes a guardian.\n\nThe guardian will no longer receive guardian notifications and the guardian\nwill no longer be accessible via the API.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if no user that matches the provided `student_id`\n is visible to the requesting user, if the requesting user is not\n permitted to manage guardians for the student identified by the\n `student_id`, if guardians are not enabled for the domain in question,\n or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API).\n* `NOT_FOUND` if the requesting user is permitted to modify guardians for\n the requested `student_id`, but no `Guardian` record exists for that\n student with the provided `guardian_id`.", "httpMethod": "DELETE", - "parameterOrder": [ - "studentId", - "guardianId" - ], "response": { "$ref": "Empty" }, - "parameters": { - "studentId": { - "description": "The student whose guardian is to be deleted. One of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string", - "required": true, - "location": "path" - }, - "guardianId": { - "type": "string", - "required": true, - "location": "path", - "description": "The `id` field from a `Guardian`." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.guardianlinks.students" - ], - "flatPath": "v1/userProfiles/{studentId}/guardians/{guardianId}", - "path": "v1/userProfiles/{studentId}/guardians/{guardianId}", - "id": "classroom.userProfiles.guardians.delete", - "description": "Deletes a guardian.\n\nThe guardian will no longer receive guardian notifications and the guardian\nwill no longer be accessible via the API.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if no user that matches the provided `student_id`\n is visible to the requesting user, if the requesting user is not\n permitted to manage guardians for the student identified by the\n `student_id`, if guardians are not enabled for the domain in question,\n or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API).\n* `NOT_FOUND` if the requesting user is permitted to modify guardians for\n the requested `student_id`, but no `Guardian` record exists for that\n student with the provided `guardian_id`." - }, - "get": { - "response": { - "$ref": "Guardian" - }, "parameterOrder": [ "studentId", "guardianId" ], - "httpMethod": "GET", "parameters": { "studentId": { "location": "path", - "description": "The student whose guardian is being requested. One of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "description": "The student whose guardian is to be deleted. One of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", "type": "string", "required": true }, @@ -385,28 +351,59 @@ "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.guardianlinks.students" + ], + "flatPath": "v1/userProfiles/{studentId}/guardians/{guardianId}", + "path": "v1/userProfiles/{studentId}/guardians/{guardianId}", + "id": "classroom.userProfiles.guardians.delete" + }, + "get": { + "parameterOrder": [ + "studentId", + "guardianId" + ], + "response": { + "$ref": "Guardian" + }, + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly", "https://www.googleapis.com/auth/classroom.guardianlinks.students", "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly" ], + "parameters": { + "studentId": { + "type": "string", + "required": true, + "location": "path", + "description": "The student whose guardian is being requested. One of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user" + }, + "guardianId": { + "description": "The `id` field from a `Guardian`.", + "type": "string", + "required": true, + "location": "path" + } + }, "flatPath": "v1/userProfiles/{studentId}/guardians/{guardianId}", "id": "classroom.userProfiles.guardians.get", "path": "v1/userProfiles/{studentId}/guardians/{guardianId}", "description": "Returns a specific guardian.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if no user that matches the provided `student_id`\n is visible to the requesting user, if the requesting user is not\n permitted to view guardian information for the student identified by the\n `student_id`, if guardians are not enabled for the domain in question,\n or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`).\n* `NOT_FOUND` if the requesting user is permitted to view guardians for\n the requested `student_id`, but no `Guardian` record exists for that\n student that matches the provided `guardian_id`." }, "list": { - "flatPath": "v1/userProfiles/{studentId}/guardians", - "path": "v1/userProfiles/{studentId}/guardians", - "id": "classroom.userProfiles.guardians.list", - "description": "Returns a list of guardians that the requesting user is permitted to\nview, restricted to those that match the request.\n\nTo list guardians for any student that the requesting user may view\nguardians for, use the literal character `-` for the student ID.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if a `student_id` is specified, and the requesting\n user is not permitted to view guardian information for that student, if\n `\"-\"` is specified as the `student_id` and the user is not a domain\n administrator, if guardians are not enabled for the domain in question,\n if the `invited_email_address` filter is set by a user who is not a\n domain administrator, or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`). May also be returned if an invalid\n `page_token` is provided.\n* `NOT_FOUND` if a `student_id` is specified, and its format can be\n recognized, but Classroom has no record of that student.", - "httpMethod": "GET", "response": { "$ref": "ListGuardiansResponse" }, "parameterOrder": [ "studentId" ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly", + "https://www.googleapis.com/auth/classroom.guardianlinks.students", + "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly" + ], "parameters": { "studentId": { "description": "Filter results by the student who the guardian is linked to.\nThe identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user\n* the string literal `\"-\"`, indicating that results should be returned for\n all students that the requesting user has access to view.", @@ -415,15 +412,15 @@ "location": "path" }, "pageToken": { - "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", "type": "string", - "location": "query" + "location": "query", + "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token." }, "pageSize": { - "type": "integer", "location": "query", "format": "int32", - "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results." + "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + "type": "integer" }, "invitedEmailAddress": { "location": "query", @@ -431,11 +428,10 @@ "type": "string" } }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly", - "https://www.googleapis.com/auth/classroom.guardianlinks.students", - "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly" - ] + "flatPath": "v1/userProfiles/{studentId}/guardians", + "id": "classroom.userProfiles.guardians.list", + "path": "v1/userProfiles/{studentId}/guardians", + "description": "Returns a list of guardians that the requesting user is permitted to\nview, restricted to those that match the request.\n\nTo list guardians for any student that the requesting user may view\nguardians for, use the literal character `-` for the student ID.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if a `student_id` is specified, and the requesting\n user is not permitted to view guardian information for that student, if\n `\"-\"` is specified as the `student_id` and the user is not a domain\n administrator, if guardians are not enabled for the domain in question,\n if the `invited_email_address` filter is set by a user who is not a\n domain administrator, or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`). May also be returned if an invalid\n `page_token` is provided.\n* `NOT_FOUND` if a `student_id` is specified, and its format can be\n recognized, but Classroom has no record of that student." } } } @@ -443,133 +439,81 @@ }, "courses": { "methods": { - "list": { - "description": "Returns a list of courses that the requesting user is permitted to view,\nrestricted to those that match the request.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` for access errors.\n* `INVALID_ARGUMENT` if the query argument is malformed.\n* `NOT_FOUND` if any users specified in the query arguments do not exist.", - "response": { - "$ref": "ListCoursesResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses", - "https://www.googleapis.com/auth/classroom.courses.readonly" - ], - "parameters": { - "studentId": { - "description": "Restricts returned courses to those having a student with the specified\nidentifier. The identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string", - "location": "query" - }, - "pageToken": { - "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", - "type": "integer", - "location": "query" - }, - "courseStates": { - "enum": [ - "COURSE_STATE_UNSPECIFIED", - "ACTIVE", - "ARCHIVED", - "PROVISIONED", - "DECLINED", - "SUSPENDED" - ], - "description": "Restricts returned courses to those in one of the specified states\nThe default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED.", - "type": "string", - "repeated": true, - "location": "query" - }, - "teacherId": { - "description": "Restricts returned courses to those having a teacher with the specified\nidentifier. The identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1/courses", - "id": "classroom.courses.list", - "path": "v1/courses" - }, "create": { - "httpMethod": "POST", - "parameterOrder": [], + "request": { + "$ref": "Course" + }, + "description": "Creates a course.\n\nThe user specified in `ownerId` is the owner of the created course\nand added as a teacher.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\ncourses or for access errors.\n* `NOT_FOUND` if the primary teacher is not a valid user.\n* `FAILED_PRECONDITION` if the course owner's account is disabled or for\nthe following request errors:\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if an alias was specified in the `id` and\nalready exists.", "response": { "$ref": "Course" }, - "parameters": {}, + "parameterOrder": [], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/classroom.courses" ], + "parameters": {}, "flatPath": "v1/courses", - "path": "v1/courses", "id": "classroom.courses.create", - "description": "Creates a course.\n\nThe user specified in `ownerId` is the owner of the created course\nand added as a teacher.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\ncourses or for access errors.\n* `NOT_FOUND` if the primary teacher is not a valid user.\n* `FAILED_PRECONDITION` if the course owner's account is disabled or for\nthe following request errors:\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if an alias was specified in the `id` and\nalready exists.", - "request": { - "$ref": "Course" - } + "path": "v1/courses" }, "get": { + "response": { + "$ref": "Course" + }, + "httpMethod": "GET", + "parameterOrder": [ + "id" + ], "scopes": [ "https://www.googleapis.com/auth/classroom.courses", "https://www.googleapis.com/auth/classroom.courses.readonly" ], "parameters": { "id": { + "location": "path", "description": "Identifier of the course to return.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", "type": "string", - "required": true, - "location": "path" + "required": true } }, "flatPath": "v1/courses/{id}", "id": "classroom.courses.get", "path": "v1/courses/{id}", - "description": "Returns a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID.", - "response": { - "$ref": "Course" - }, - "parameterOrder": [ - "id" - ], - "httpMethod": "GET" + "description": "Returns a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID." }, "patch": { - "description": "Updates one or more fields in a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to modify the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID.\n* `INVALID_ARGUMENT` if invalid fields are specified in the update mask or\nif no update mask is supplied.\n* `FAILED_PRECONDITION` for the following request errors:\n * CourseNotModifiable", - "request": { - "$ref": "Course" - }, - "response": { - "$ref": "Course" - }, + "httpMethod": "PATCH", "parameterOrder": [ "id" ], - "httpMethod": "PATCH", - "parameters": { - "id": { - "description": "Identifier of the course to update.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true, - "location": "path" - }, - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Mask that identifies which fields on the course to update.\nThis field is required to do an update. The update will fail if invalid\nfields are specified. The following fields are valid:\n\n* `name`\n* `section`\n* `descriptionHeading`\n* `description`\n* `room`\n* `courseState`\n\nWhen set in a query parameter, this field should be specified as\n\n`updateMask=\u003cfield1\u003e,\u003cfield2\u003e,...`", - "type": "string" - } + "response": { + "$ref": "Course" }, "scopes": [ "https://www.googleapis.com/auth/classroom.courses" ], + "parameters": { + "id": { + "location": "path", + "description": "Identifier of the course to update.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + }, + "updateMask": { + "type": "string", + "location": "query", + "format": "google-fieldmask", + "description": "Mask that identifies which fields on the course to update.\nThis field is required to do an update. The update will fail if invalid\nfields are specified. The following fields are valid:\n\n* `name`\n* `section`\n* `descriptionHeading`\n* `description`\n* `room`\n* `courseState`\n* `ownerId`\n\nNote: patches to ownerId are treated as being effective immediately, but in\npractice it may take some time for the ownership transfer of all affected\nresources to complete.\n\nWhen set in a query parameter, this field should be specified as\n\n`updateMask=\u003cfield1\u003e,\u003cfield2\u003e,...`" + } + }, "flatPath": "v1/courses/{id}", + "path": "v1/courses/{id}", "id": "classroom.courses.patch", - "path": "v1/courses/{id}" + "request": { + "$ref": "Course" + }, + "description": "Updates one or more fields in a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to modify the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID.\n* `INVALID_ARGUMENT` if invalid fields are specified in the update mask or\nif no update mask is supplied.\n* `FAILED_PRECONDITION` for the following request errors:\n * CourseNotModifiable" }, "update": { "response": { @@ -600,100 +544,87 @@ }, "delete": { "description": "Deletes a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID.", - "httpMethod": "DELETE", "response": { "$ref": "Empty" }, "parameterOrder": [ "id" ], + "httpMethod": "DELETE", "scopes": [ "https://www.googleapis.com/auth/classroom.courses" ], "parameters": { "id": { + "location": "path", "description": "Identifier of the course to delete.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", "type": "string", - "required": true, - "location": "path" + "required": true } }, "flatPath": "v1/courses/{id}", - "path": "v1/courses/{id}", - "id": "classroom.courses.delete" + "id": "classroom.courses.delete", + "path": "v1/courses/{id}" + }, + "list": { + "description": "Returns a list of courses that the requesting user is permitted to view,\nrestricted to those that match the request. Returned courses are ordered by\ncreation time, with the most recently created coming first.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` for access errors.\n* `INVALID_ARGUMENT` if the query argument is malformed.\n* `NOT_FOUND` if any users specified in the query arguments do not exist.", + "httpMethod": "GET", + "response": { + "$ref": "ListCoursesResponse" + }, + "parameterOrder": [], + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses", + "https://www.googleapis.com/auth/classroom.courses.readonly" + ], + "parameters": { + "studentId": { + "location": "query", + "description": "Restricts returned courses to those having a student with the specified\nidentifier. The identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string" + }, + "pageToken": { + "type": "string", + "location": "query", + "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token." + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + "type": "integer" + }, + "courseStates": { + "description": "Restricts returned courses to those in one of the specified states\nThe default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED.", + "type": "string", + "repeated": true, + "location": "query", + "enum": [ + "COURSE_STATE_UNSPECIFIED", + "ACTIVE", + "ARCHIVED", + "PROVISIONED", + "DECLINED", + "SUSPENDED" + ] + }, + "teacherId": { + "location": "query", + "description": "Restricts returned courses to those having a teacher with the specified\nidentifier. The identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string" + } + }, + "flatPath": "v1/courses", + "path": "v1/courses", + "id": "classroom.courses.list" } }, "resources": { "aliases": { "methods": { - "delete": { - "description": "Deletes an alias of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to remove the\nalias or for access errors.\n* `NOT_FOUND` if the alias does not exist.\n* `FAILED_PRECONDITION` if the alias requested does not make sense for the\n requesting user or course (for example, if a user not in a domain\n attempts to delete a domain-scoped alias).", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "courseId", - "alias" - ], - "httpMethod": "DELETE", - "parameters": { - "alias": { - "location": "path", - "description": "Alias to delete.\nThis may not be the Classroom-assigned identifier.", - "type": "string", - "required": true - }, - "courseId": { - "location": "path", - "description": "Identifier of the course whose alias should be deleted.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses" - ], - "flatPath": "v1/courses/{courseId}/aliases/{alias}", - "id": "classroom.courses.aliases.delete", - "path": "v1/courses/{courseId}/aliases/{alias}" - }, - "list": { - "flatPath": "v1/courses/{courseId}/aliases", - "id": "classroom.courses.aliases.list", - "path": "v1/courses/{courseId}/aliases", - "description": "Returns a list of aliases for a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\ncourse or for access errors.\n* `NOT_FOUND` if the course does not exist.", - "response": { - "$ref": "ListCourseAliasesResponse" - }, - "parameterOrder": [ - "courseId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses", - "https://www.googleapis.com/auth/classroom.courses.readonly" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", - "type": "integer", - "location": "query" - }, - "courseId": { - "type": "string", - "required": true, - "location": "path", - "description": "The identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." - } - } - }, "create": { + "path": "v1/courses/{courseId}/aliases", + "id": "classroom.courses.aliases.create", "request": { "$ref": "CourseAlias" }, @@ -716,178 +647,55 @@ "required": true } }, - "flatPath": "v1/courses/{courseId}/aliases", - "path": "v1/courses/{courseId}/aliases", - "id": "classroom.courses.aliases.create" - } - } - }, - "students": { - "methods": { + "flatPath": "v1/courses/{courseId}/aliases" + }, "delete": { + "description": "Deletes an alias of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to remove the\nalias or for access errors.\n* `NOT_FOUND` if the alias does not exist.\n* `FAILED_PRECONDITION` if the alias requested does not make sense for the\n requesting user or course (for example, if a user not in a domain\n attempts to delete a domain-scoped alias).", + "httpMethod": "DELETE", "parameterOrder": [ "courseId", - "userId" + "alias" ], "response": { "$ref": "Empty" }, - "httpMethod": "DELETE", "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters" + "https://www.googleapis.com/auth/classroom.courses" ], "parameters": { - "courseId": { - "type": "string", - "required": true, + "alias": { "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." - }, - "userId": { - "location": "path", - "description": "Identifier of the student to delete. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "description": "Alias to delete.\nThis may not be the Classroom-assigned identifier.", "type": "string", "required": true - } - }, - "flatPath": "v1/courses/{courseId}/students/{userId}", - "id": "classroom.courses.students.delete", - "path": "v1/courses/{courseId}/students/{userId}", - "description": "Deletes a student of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete\nstudents of this course or for access errors.\n* `NOT_FOUND` if no student of this course has the requested ID or if the\ncourse does not exist." - }, - "list": { - "flatPath": "v1/courses/{courseId}/students", - "path": "v1/courses/{courseId}/students", - "id": "classroom.courses.students.list", - "description": "Returns a list of students of this course that the requester\nis permitted to view.\n\nThis method returns the following error codes:\n\n* `NOT_FOUND` if the course does not exist.\n* `PERMISSION_DENIED` for access errors.", - "httpMethod": "GET", - "response": { - "$ref": "ListStudentsResponse" - }, - "parameterOrder": [ - "courseId" - ], - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters", - "https://www.googleapis.com/auth/classroom.rosters.readonly" - ], - "parameters": { - "pageSize": { - "format": "int32", - "description": "Maximum number of items to return. Zero means no maximum.\n\nThe server may return fewer than the specified number of results.", - "type": "integer", - "location": "query" }, "courseId": { - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "description": "Identifier of the course whose alias should be deleted.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", "type": "string", "required": true, "location": "path" - }, - "pageToken": { - "description": "nextPageToken\nvalue returned from a previous\nlist call, indicating that\nthe subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", - "type": "string", - "location": "query" } - } + }, + "flatPath": "v1/courses/{courseId}/aliases/{alias}", + "path": "v1/courses/{courseId}/aliases/{alias}", + "id": "classroom.courses.aliases.delete" }, - "get": { - "flatPath": "v1/courses/{courseId}/students/{userId}", - "path": "v1/courses/{courseId}/students/{userId}", - "id": "classroom.courses.students.get", - "description": "Returns a student of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view\nstudents of this course or for access errors.\n* `NOT_FOUND` if no student of this course has the requested ID or if the\ncourse does not exist.", - "httpMethod": "GET", - "parameterOrder": [ - "courseId", - "userId" - ], - "response": { - "$ref": "Student" - }, - "parameters": { - "courseId": { - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true - }, - "userId": { - "location": "path", - "description": "Identifier of the student to return. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters", - "https://www.googleapis.com/auth/classroom.rosters.readonly" - ] - }, - "create": { - "description": "Adds a user as a student of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\nstudents in this course or for access errors.\n* `NOT_FOUND` if the requested course ID does not exist.\n* `FAILED_PRECONDITION` if the requested user's account is disabled,\nfor the following request errors:\n * CourseMemberLimitReached\n * CourseNotModifiable\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if the user is already a student or teacher in the\ncourse.", - "request": { - "$ref": "Student" - }, - "httpMethod": "POST", - "parameterOrder": [ - "courseId" - ], - "response": { - "$ref": "Student" - }, - "parameters": { - "enrollmentCode": { - "type": "string", - "location": "query", - "description": "Enrollment code of the course to create the student in.\nThis code is required if userId\ncorresponds to the requesting user; it may be omitted if the requesting\nuser has administrative permissions to create students for any user." - }, - "courseId": { - "location": "path", - "description": "Identifier of the course to create the student in.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters" - ], - "flatPath": "v1/courses/{courseId}/students", - "path": "v1/courses/{courseId}/students", - "id": "classroom.courses.students.create" - } - } - }, - "courseWork": { - "methods": { "list": { "response": { - "$ref": "ListCourseWorkResponse" + "$ref": "ListCourseAliasesResponse" }, "parameterOrder": [ "courseId" ], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses", + "https://www.googleapis.com/auth/classroom.courses.readonly" + ], "parameters": { - "courseId": { - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true - }, "pageToken": { - "type": "string", "location": "query", - "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token." - }, - "orderBy": { - "location": "query", - "description": "Optional sort ordering for results. A comma-separated list of fields with\nan optional sort direction keyword. Supported fields are `updateTime`\nand `dueDate`. Supported direction keywords are `asc` and `desc`.\nIf not specified, `updateTime desc` is the default behavior.\nExamples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`", + "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", "type": "string" }, "pageSize": { @@ -896,8 +704,221 @@ "format": "int32", "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results." }, - "courseWorkStates": { + "courseId": { + "location": "path", + "description": "The identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/courses/{courseId}/aliases", + "id": "classroom.courses.aliases.list", + "path": "v1/courses/{courseId}/aliases", + "description": "Returns a list of aliases for a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\ncourse or for access errors.\n* `NOT_FOUND` if the course does not exist." + } + } + }, + "students": { + "methods": { + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "courseId", + "userId" + ], + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters" + ], + "parameters": { + "userId": { + "description": "Identifier of the student to delete. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string", + "required": true, + "location": "path" + }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/courses/{courseId}/students/{userId}", + "path": "v1/courses/{courseId}/students/{userId}", + "id": "classroom.courses.students.delete", + "description": "Deletes a student of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete\nstudents of this course or for access errors.\n* `NOT_FOUND` if no student of this course has the requested ID or if the\ncourse does not exist." + }, + "list": { + "parameterOrder": [ + "courseId" + ], + "httpMethod": "GET", + "response": { + "$ref": "ListStudentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ], + "parameters": { + "courseId": { + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true, + "location": "path" + }, + "pageToken": { "location": "query", + "description": "nextPageToken\nvalue returned from a previous\nlist call, indicating that\nthe subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum number of items to return. Zero means no maximum.\n\nThe server may return fewer than the specified number of results.", + "type": "integer" + } + }, + "flatPath": "v1/courses/{courseId}/students", + "id": "classroom.courses.students.list", + "path": "v1/courses/{courseId}/students", + "description": "Returns a list of students of this course that the requester\nis permitted to view.\n\nThis method returns the following error codes:\n\n* `NOT_FOUND` if the course does not exist.\n* `PERMISSION_DENIED` for access errors." + }, + "get": { + "response": { + "$ref": "Student" + }, + "parameterOrder": [ + "courseId", + "userId" + ], + "httpMethod": "GET", + "parameters": { + "userId": { + "description": "Identifier of the student to return. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string", + "required": true, + "location": "path" + }, + "courseId": { + "type": "string", + "required": true, + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ], + "flatPath": "v1/courses/{courseId}/students/{userId}", + "id": "classroom.courses.students.get", + "path": "v1/courses/{courseId}/students/{userId}", + "description": "Returns a student of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view\nstudents of this course or for access errors.\n* `NOT_FOUND` if no student of this course has the requested ID or if the\ncourse does not exist." + }, + "create": { + "flatPath": "v1/courses/{courseId}/students", + "path": "v1/courses/{courseId}/students", + "id": "classroom.courses.students.create", + "request": { + "$ref": "Student" + }, + "description": "Adds a user as a student of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\nstudents in this course or for access errors.\n* `NOT_FOUND` if the requested course ID does not exist.\n* `FAILED_PRECONDITION` if the requested user's account is disabled,\nfor the following request errors:\n * CourseMemberLimitReached\n * CourseNotModifiable\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if the user is already a student or teacher in the\ncourse.", + "httpMethod": "POST", + "parameterOrder": [ + "courseId" + ], + "response": { + "$ref": "Student" + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters" + ], + "parameters": { + "courseId": { + "location": "path", + "description": "Identifier of the course to create the student in.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + }, + "enrollmentCode": { + "location": "query", + "description": "Enrollment code of the course to create the student in.\nThis code is required if userId\ncorresponds to the requesting user; it may be omitted if the requesting\nuser has administrative permissions to create students for any user.", + "type": "string" + } + } + } + } + }, + "courseWork": { + "methods": { + "delete": { + "description": "Deletes a course work.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding course work, if the requesting user is not permitted\nto delete the requested course or for access errors.\n* `FAILED_PRECONDITION` if the requested course work has already been\ndeleted.\n* `NOT_FOUND` if no course exists with the requested ID.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "courseId", + "id" + ], + "httpMethod": "DELETE", + "parameters": { + "id": { + "description": "Identifier of the course work to delete.\nThis identifier is a Classroom-assigned identifier.", + "type": "string", + "required": true, + "location": "path" + }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.students" + ], + "flatPath": "v1/courses/{courseId}/courseWork/{id}", + "id": "classroom.courses.courseWork.delete", + "path": "v1/courses/{courseId}/courseWork/{id}" + }, + "list": { + "description": "Returns a list of course work that the requester is permitted to view.\n\nCourse students may only view `PUBLISHED` course work. Course teachers\nand domain administrators may view all course work.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access\nthe requested course or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist.", + "httpMethod": "GET", + "parameterOrder": [ + "courseId" + ], + "response": { + "$ref": "ListCourseWorkResponse" + }, + "parameters": { + "pageToken": { + "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", + "type": "string", + "location": "query" + }, + "orderBy": { + "location": "query", + "description": "Optional sort ordering for results. A comma-separated list of fields with\nan optional sort direction keyword. Supported fields are `updateTime`\nand `dueDate`. Supported direction keywords are `asc` and `desc`.\nIf not specified, `updateTime desc` is the default behavior.\nExamples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + "type": "integer" + }, + "courseWorkStates": { "enum": [ "COURSE_WORK_STATE_UNSPECIFIED", "PUBLISHED", @@ -906,7 +927,14 @@ ], "description": "Restriction on the work status to return. Only courseWork that matches\nis returned. If unspecified, items with a work status of `PUBLISHED`\nis returned.", "type": "string", - "repeated": true + "repeated": true, + "location": "query" + }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true } }, "scopes": [ @@ -916,25 +944,30 @@ "https://www.googleapis.com/auth/classroom.coursework.students.readonly" ], "flatPath": "v1/courses/{courseId}/courseWork", - "id": "classroom.courses.courseWork.list", "path": "v1/courses/{courseId}/courseWork", - "description": "Returns a list of course work that the requester is permitted to view.\n\nCourse students may only view `PUBLISHED` course work. Course teachers\nand domain administrators may view all course work.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access\nthe requested course or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist." + "id": "classroom.courses.courseWork.list" }, "get": { - "response": { - "$ref": "CourseWork" - }, + "httpMethod": "GET", "parameterOrder": [ "courseId", "id" ], - "httpMethod": "GET", + "response": { + "$ref": "CourseWork" + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me", + "https://www.googleapis.com/auth/classroom.coursework.me.readonly", + "https://www.googleapis.com/auth/classroom.coursework.students", + "https://www.googleapis.com/auth/classroom.coursework.students.readonly" + ], "parameters": { "courseId": { + "location": "path", "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", "type": "string", - "required": true, - "location": "path" + "required": true }, "id": { "location": "path", @@ -943,15 +976,9 @@ "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me", - "https://www.googleapis.com/auth/classroom.coursework.me.readonly", - "https://www.googleapis.com/auth/classroom.coursework.students", - "https://www.googleapis.com/auth/classroom.coursework.students.readonly" - ], "flatPath": "v1/courses/{courseId}/courseWork/{id}", - "id": "classroom.courses.courseWork.get", "path": "v1/courses/{courseId}/courseWork/{id}", + "id": "classroom.courses.courseWork.get", "description": "Returns course work.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course or course work does not exist." }, "patch": { @@ -965,10 +992,10 @@ }, "parameters": { "courseId": { - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." }, "id": { "location": "path", @@ -995,13 +1022,17 @@ } }, "create": { - "response": { + "request": { "$ref": "CourseWork" }, + "description": "Creates course work.\n\nThe resulting course work (and corresponding student submissions) are\nassociated with the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\nmake the request. Classroom API requests to modify course work and student\nsubmissions must be made with an OAuth client ID from the associated\nDeveloper Console project.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course, create course work in the requested course, share a\nDrive attachment, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist.\n* `FAILED_PRECONDITION` for the following request error:\n * AttachmentNotVisible", + "httpMethod": "POST", "parameterOrder": [ "courseId" ], - "httpMethod": "POST", + "response": { + "$ref": "CourseWork" + }, "scopes": [ "https://www.googleapis.com/auth/classroom.coursework.students" ], @@ -1014,49 +1045,61 @@ } }, "flatPath": "v1/courses/{courseId}/courseWork", - "id": "classroom.courses.courseWork.create", "path": "v1/courses/{courseId}/courseWork", - "request": { - "$ref": "CourseWork" - }, - "description": "Creates course work.\n\nThe resulting course work (and corresponding student submissions) are\nassociated with the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\nmake the request. Classroom API requests to modify course work and student\nsubmissions must be made with an OAuth client ID from the associated\nDeveloper Console project.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course, create course work in the requested course, share a\nDrive attachment, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist.\n* `FAILED_PRECONDITION` for the following request error:\n * AttachmentNotVisible" - }, - "delete": { - "description": "Deletes a course work.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding course work, if the requesting user is not permitted\nto delete the requested course or for access errors.\n* `FAILED_PRECONDITION` if the requested course work has already been\ndeleted.\n* `NOT_FOUND` if no course exists with the requested ID.", - "parameterOrder": [ - "courseId", - "id" - ], - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.students" - ], - "parameters": { - "courseId": { - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true, - "location": "path" - }, - "id": { - "description": "Identifier of the course work to delete.\nThis identifier is a Classroom-assigned identifier.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/courses/{courseId}/courseWork/{id}", - "id": "classroom.courses.courseWork.delete", - "path": "v1/courses/{courseId}/courseWork/{id}" + "id": "classroom.courses.courseWork.create" } }, "resources": { "studentSubmissions": { "methods": { + "get": { + "description": "Returns a student submission.\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course, course work, or student submission or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", + "response": { + "$ref": "StudentSubmission" + }, + "parameterOrder": [ + "courseId", + "courseWorkId", + "id" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me", + "https://www.googleapis.com/auth/classroom.coursework.me.readonly", + "https://www.googleapis.com/auth/classroom.coursework.students", + "https://www.googleapis.com/auth/classroom.coursework.students.readonly", + "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly", + "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly" + ], + "parameters": { + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + }, + "id": { + "location": "path", + "description": "Identifier of the student submission.", + "type": "string", + "required": true + }, + "courseWorkId": { + "location": "path", + "description": "Identifier of the course work.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}", + "id": "classroom.courses.courseWork.studentSubmissions.get", + "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}" + }, "patch": { + "request": { + "$ref": "StudentSubmission" + }, + "description": "Updates one or more fields of a student submission.\n\nSee google.classroom.v1.StudentSubmission for details\nof which fields may be updated and who may change them.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding course work, if the user is not permitted to make the\nrequested modification to the student submission, or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", "httpMethod": "PATCH", "parameterOrder": [ "courseId", @@ -1066,212 +1109,208 @@ "response": { "$ref": "StudentSubmission" }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me", + "https://www.googleapis.com/auth/classroom.coursework.students" + ], "parameters": { - "courseWorkId": { - "location": "path", - "description": "Identifier of the course work.", - "type": "string", - "required": true - }, - "courseId": { - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true - }, - "id": { - "location": "path", - "description": "Identifier of the student submission.", - "type": "string", - "required": true - }, "updateMask": { + "location": "query", "format": "google-fieldmask", "description": "Mask that identifies which fields on the student submission to update.\nThis field is required to do an update. The update fails if invalid\nfields are specified.\n\nThe following fields may be specified by teachers:\n* `draft_grade`\n* `assigned_grade`", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me", - "https://www.googleapis.com/auth/classroom.coursework.students" - ], - "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}", - "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}", - "id": "classroom.courses.courseWork.studentSubmissions.patch", - "description": "Updates one or more fields of a student submission.\n\nSee google.classroom.v1.StudentSubmission for details\nof which fields may be updated and who may change them.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding course work, if the user is not permitted to make the\nrequested modification to the student submission, or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", - "request": { - "$ref": "StudentSubmission" - } - }, - "get": { - "httpMethod": "GET", - "response": { - "$ref": "StudentSubmission" - }, - "parameterOrder": [ - "courseId", - "courseWorkId", - "id" - ], - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me", - "https://www.googleapis.com/auth/classroom.coursework.me.readonly", - "https://www.googleapis.com/auth/classroom.coursework.students", - "https://www.googleapis.com/auth/classroom.coursework.students.readonly", - "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly", - "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly" - ], - "parameters": { - "courseId": { + "type": "string" + }, + "courseWorkId": { "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "description": "Identifier of the course work.", "type": "string", "required": true }, - "id": { - "description": "Identifier of the student submission.", + "courseId": { + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", "type": "string", "required": true, "location": "path" }, - "courseWorkId": { - "description": "Identifier of the course work.", + "id": { + "location": "path", + "description": "Identifier of the student submission.", "type": "string", - "required": true, - "location": "path" + "required": true } }, "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}", "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}", - "id": "classroom.courses.courseWork.studentSubmissions.get", - "description": "Returns a student submission.\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course, course work, or student submission or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist." + "id": "classroom.courses.courseWork.studentSubmissions.patch" }, "return": { - "httpMethod": "POST", - "parameterOrder": [ - "courseId", - "courseWorkId", - "id" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.students" - ], - "parameters": { - "courseId": { - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true - }, - "id": { - "description": "Identifier of the student submission.", - "type": "string", - "required": true, - "location": "path" - }, - "courseWorkId": { - "description": "Identifier of the course work.", - "type": "string", - "required": true, - "location": "path" - } - }, "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return", "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return", "id": "classroom.courses.courseWork.studentSubmissions.return", + "description": "Returns a student submission.\n\nReturning a student submission transfers ownership of attached Drive\nfiles to the student and may also update the submission state.\nUnlike the Classroom application, returning a student submission does not\nset assignedGrade to the draftGrade value.\n\nOnly a teacher of the course that contains the requested student submission\nmay call this method.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, return the requested student submission,\nor for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", "request": { "$ref": "ReturnStudentSubmissionRequest" }, - "description": "Returns a student submission.\n\nReturning a student submission transfers ownership of attached Drive\nfiles to the student and may also update the submission state.\nUnlike the Classroom application, returning a student submission does not\nset assignedGrade to the draftGrade value.\n\nOnly a teacher of the course that contains the requested student submission\nmay call this method.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, return the requested student submission,\nor for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist." + "httpMethod": "POST", + "parameterOrder": [ + "courseId", + "courseWorkId", + "id" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "courseWorkId": { + "type": "string", + "required": true, + "location": "path", + "description": "Identifier of the course work." + }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + }, + "id": { + "location": "path", + "description": "Identifier of the student submission.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.students" + ] }, "reclaim": { - "description": "Reclaims a student submission on behalf of the student that owns it.\n\nReclaiming a student submission transfers ownership of attached Drive\nfiles to the student and update the submission state.\n\nOnly the student that owns the requested student submission may call this\nmethod, and only for a student submission that has been turned in.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, unsubmit the requested student submission,\nor for access errors.\n* `FAILED_PRECONDITION` if the student submission has not been turned in.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "courseId", + "courseWorkId", + "id" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me" + ], + "parameters": { + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + }, + "id": { + "description": "Identifier of the student submission.", + "type": "string", + "required": true, + "location": "path" + }, + "courseWorkId": { + "location": "path", + "description": "Identifier of the course work.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim", + "id": "classroom.courses.courseWork.studentSubmissions.reclaim", + "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim", "request": { "$ref": "ReclaimStudentSubmissionRequest" }, - "httpMethod": "POST", - "parameterOrder": [ - "courseId", - "courseWorkId", - "id" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "courseId": { - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true, - "location": "path" - }, - "id": { - "location": "path", - "description": "Identifier of the student submission.", - "type": "string", - "required": true - }, - "courseWorkId": { - "location": "path", - "description": "Identifier of the course work.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me" - ], - "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim", - "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim", - "id": "classroom.courses.courseWork.studentSubmissions.reclaim" + "description": "Reclaims a student submission on behalf of the student that owns it.\n\nReclaiming a student submission transfers ownership of attached Drive\nfiles to the student and update the submission state.\n\nOnly the student that owns the requested student submission may call this\nmethod, and only for a student submission that has been turned in.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, unsubmit the requested student submission,\nor for access errors.\n* `FAILED_PRECONDITION` if the student submission has not been turned in.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist." }, "turnIn": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "courseId", - "courseWorkId", - "id" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me" - ], - "parameters": { - "courseWorkId": { - "location": "path", - "description": "Identifier of the course work.", - "type": "string", - "required": true - }, - "courseId": { - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true, - "location": "path" - }, - "id": { - "location": "path", - "description": "Identifier of the student submission.", - "type": "string", - "required": true - } - }, "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn", "id": "classroom.courses.courseWork.studentSubmissions.turnIn", "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn", "request": { "$ref": "TurnInStudentSubmissionRequest" }, - "description": "Turns in a student submission.\n\nTurning in a student submission transfers ownership of attached Drive\nfiles to the teacher and may also update the submission state.\n\nThis may only be called by the student that owns the specified student\nsubmission.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, turn in the requested student submission,\nor for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist." + "description": "Turns in a student submission.\n\nTurning in a student submission transfers ownership of attached Drive\nfiles to the teacher and may also update the submission state.\n\nThis may only be called by the student that owns the specified student\nsubmission.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, turn in the requested student submission,\nor for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "courseId", + "courseWorkId", + "id" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me" + ], + "parameters": { + "courseId": { + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true, + "location": "path" + }, + "id": { + "location": "path", + "description": "Identifier of the student submission.", + "type": "string", + "required": true + }, + "courseWorkId": { + "type": "string", + "required": true, + "location": "path", + "description": "Identifier of the course work." + } + } + }, + "modifyAttachments": { + "request": { + "$ref": "ModifyAttachmentsRequest" + }, + "description": "Modifies attachments of student submission.\n\nAttachments may only be added to student submissions belonging to course\nwork objects with a `workType` of `ASSIGNMENT`.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, if the user is not permitted to modify\nattachments on the requested student submission, or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", + "response": { + "$ref": "StudentSubmission" + }, + "parameterOrder": [ + "courseId", + "courseWorkId", + "id" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me", + "https://www.googleapis.com/auth/classroom.coursework.students" + ], + "parameters": { + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + }, + "id": { + "description": "Identifier of the student submission.", + "type": "string", + "required": true, + "location": "path" + }, + "courseWorkId": { + "location": "path", + "description": "Identifier of the course work.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments", + "id": "classroom.courses.courseWork.studentSubmissions.modifyAttachments", + "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments" }, "list": { "description": "Returns a list of student submissions that the requester is permitted to\nview, factoring in the OAuth scopes of the request.\n`-` may be specified as the `course_work_id` to include student\nsubmissions for multiple course work items.\n\nCourse students may only view their own work. Course teachers\nand domain administrators may view all student submissions.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist.", + "httpMethod": "GET", "response": { "$ref": "ListStudentSubmissionsResponse" }, @@ -1279,7 +1318,6 @@ "courseId", "courseWorkId" ], - "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/classroom.coursework.me", "https://www.googleapis.com/auth/classroom.coursework.me.readonly", @@ -1289,6 +1327,23 @@ "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly" ], "parameters": { + "userId": { + "type": "string", + "location": "query", + "description": "Optional argument to restrict returned student work to those owned by the\nstudent with the specified identifier. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user" + }, + "courseWorkId": { + "description": "Identifier of the student work to request.\nThis may be set to the string literal `\"-\"` to request student work for\nall course work in the specified course.", + "type": "string", + "required": true, + "location": "path" + }, + "courseId": { + "type": "string", + "required": true, + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." + }, "late": { "location": "query", "enum": [ @@ -1300,11 +1355,21 @@ "type": "string" }, "pageToken": { - "location": "query", "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", - "type": "string" + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + "type": "integer" }, "states": { + "description": "Requested submission states. If specified, returned student submissions\nmatch one of the specified submission states.", + "type": "string", + "repeated": true, + "location": "query", "enum": [ "SUBMISSION_STATE_UNSPECIFIED", "NEW", @@ -1312,81 +1377,12 @@ "TURNED_IN", "RETURNED", "RECLAIMED_BY_STUDENT" - ], - "description": "Requested submission states. If specified, returned student submissions\nmatch one of the specified submission states.", - "type": "string", - "repeated": true, - "location": "query" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results." - }, - "userId": { - "location": "query", - "description": "Optional argument to restrict returned student work to those owned by the\nstudent with the specified identifier. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string" - }, - "courseWorkId": { - "description": "Identifer of the student work to request.\nThis may be set to the string literal `\"-\"` to request student work for\nall course work in the specified course.", - "type": "string", - "required": true, - "location": "path" - }, - "courseId": { - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true + ] } }, "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions", - "id": "classroom.courses.courseWork.studentSubmissions.list", - "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions" - }, - "modifyAttachments": { - "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments", - "id": "classroom.courses.courseWork.studentSubmissions.modifyAttachments", - "request": { - "$ref": "ModifyAttachmentsRequest" - }, - "description": "Modifies attachments of student submission.\n\nAttachments may only be added to student submissions belonging to course\nwork objects with a `workType` of `ASSIGNMENT`.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, if the user is not permitted to modify\nattachments on the requested student submission, or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", - "httpMethod": "POST", - "parameterOrder": [ - "courseId", - "courseWorkId", - "id" - ], - "response": { - "$ref": "StudentSubmission" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me", - "https://www.googleapis.com/auth/classroom.coursework.students" - ], - "parameters": { - "id": { - "description": "Identifier of the student submission.", - "type": "string", - "required": true, - "location": "path" - }, - "courseWorkId": { - "location": "path", - "description": "Identifier of the course work.", - "type": "string", - "required": true - }, - "courseId": { - "type": "string", - "required": true, - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." - } - }, - "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments" + "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions", + "id": "classroom.courses.courseWork.studentSubmissions.list" } } } @@ -1394,8 +1390,23 @@ }, "teachers": { "methods": { - "delete": { + "create": { + "id": "classroom.courses.teachers.create", + "path": "v1/courses/{courseId}/teachers", + "request": { + "$ref": "Teacher" + }, + "description": "Creates a teacher of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\nteachers in this course or for access errors.\n* `NOT_FOUND` if the requested course ID does not exist.\n* `FAILED_PRECONDITION` if the requested user's account is disabled,\nfor the following request errors:\n * CourseMemberLimitReached\n * CourseNotModifiable\n * CourseTeacherLimitReached\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if the user is already a teacher or student in the\ncourse.", + "response": { + "$ref": "Teacher" + }, + "parameterOrder": [ + "courseId" + ], + "httpMethod": "POST", "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", "https://www.googleapis.com/auth/classroom.rosters" ], "parameters": { @@ -1404,30 +1415,42 @@ "type": "string", "required": true, "location": "path" - }, - "userId": { - "description": "Identifier of the teacher to delete. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string", - "required": true, - "location": "path" } }, - "flatPath": "v1/courses/{courseId}/teachers/{userId}", - "path": "v1/courses/{courseId}/teachers/{userId}", + "flatPath": "v1/courses/{courseId}/teachers" + }, + "delete": { "id": "classroom.courses.teachers.delete", + "path": "v1/courses/{courseId}/teachers/{userId}", "description": "Deletes a teacher of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete\nteachers of this course or for access errors.\n* `NOT_FOUND` if no teacher of this course has the requested ID or if the\ncourse does not exist.\n* `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher\nof this course.", - "httpMethod": "DELETE", "response": { "$ref": "Empty" }, "parameterOrder": [ "courseId", "userId" - ] + ], + "httpMethod": "DELETE", + "parameters": { + "userId": { + "location": "path", + "description": "Identifier of the teacher to delete. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string", + "required": true + }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters" + ], + "flatPath": "v1/courses/{courseId}/teachers/{userId}" }, "list": { - "id": "classroom.courses.teachers.list", - "path": "v1/courses/{courseId}/teachers", "description": "Returns a list of teachers of this course that the requester\nis permitted to view.\n\nThis method returns the following error codes:\n\n* `NOT_FOUND` if the course does not exist.\n* `PERMISSION_DENIED` for access errors.", "response": { "$ref": "ListTeachersResponse" @@ -1436,13 +1459,13 @@ "courseId" ], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ], "parameters": { - "courseId": { - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true - }, "pageToken": { "description": "nextPageToken\nvalue returned from a previous\nlist call, indicating that\nthe subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", "type": "string", @@ -1453,18 +1476,20 @@ "description": "Maximum number of items to return. Zero means no maximum.\n\nThe server may return fewer than the specified number of results.", "type": "integer", "location": "query" + }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters", - "https://www.googleapis.com/auth/classroom.rosters.readonly" - ], - "flatPath": "v1/courses/{courseId}/teachers" + "flatPath": "v1/courses/{courseId}/teachers", + "id": "classroom.courses.teachers.list", + "path": "v1/courses/{courseId}/teachers" }, "get": { - "description": "Returns a teacher of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view\nteachers of this course or for access errors.\n* `NOT_FOUND` if no teacher of this course has the requested ID or if the\ncourse does not exist.", + "httpMethod": "GET", "response": { "$ref": "Teacher" }, @@ -1472,7 +1497,6 @@ "courseId", "userId" ], - "httpMethod": "GET", "parameters": { "userId": { "location": "path", @@ -1494,37 +1518,9 @@ "https://www.googleapis.com/auth/classroom.rosters.readonly" ], "flatPath": "v1/courses/{courseId}/teachers/{userId}", + "path": "v1/courses/{courseId}/teachers/{userId}", "id": "classroom.courses.teachers.get", - "path": "v1/courses/{courseId}/teachers/{userId}" - }, - "create": { - "request": { - "$ref": "Teacher" - }, - "description": "Creates a teacher of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\nteachers in this course or for access errors.\n* `NOT_FOUND` if the requested course ID does not exist.\n* `FAILED_PRECONDITION` if the requested user's account is disabled,\nfor the following request errors:\n * CourseMemberLimitReached\n * CourseNotModifiable\n * CourseTeacherLimitReached\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if the user is already a teacher or student in the\ncourse.", - "httpMethod": "POST", - "parameterOrder": [ - "courseId" - ], - "response": { - "$ref": "Teacher" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters" - ], - "parameters": { - "courseId": { - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/courses/{courseId}/teachers", - "path": "v1/courses/{courseId}/teachers", - "id": "classroom.courses.teachers.create" + "description": "Returns a teacher of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view\nteachers of this course or for access errors.\n* `NOT_FOUND` if no teacher of this course has the requested ID or if the\ncourse does not exist." } } } @@ -1532,27 +1528,6 @@ } }, "parameters": { - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, "$.xgafv": { "enumDescriptions": [ "v1 error format", @@ -1572,12 +1547,6 @@ "type": "string" }, "alt": { - "type": "string", - "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", "description": "Data format for response.", "default": "json", @@ -1585,279 +1554,68 @@ "json", "media", "proto" - ] - }, - "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.", + ], "type": "string", - "location": "query" + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ] }, "access_token": { "description": "OAuth access token.", "type": "string", "location": "query" }, - "quotaUser": { - "type": "string", + "key": { "location": "query", - "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." + "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.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" }, "pp": { - "description": "Pretty-print response.", "default": "true", "type": "boolean", - "location": "query" + "location": "query", + "description": "Pretty-print response." }, "bearer_token": { - "location": "query", "description": "OAuth bearer token.", - "type": "string" + "type": "string", + "location": "query" }, "oauth_token": { "location": "query", "description": "OAuth 2.0 token for the current user.", "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" } }, "schemas": { - "GuardianInvitation": { - "properties": { - "invitedEmailAddress": { - "description": "Email address that the invitation was sent to.\nThis field is only visible to domain administrators.", - "type": "string" - }, - "creationTime": { - "type": "string", - "format": "google-datetime", - "description": "The time that this invitation was created.\n\nRead-only." - }, - "invitationId": { - "type": "string", - "description": "Unique identifier for this invitation.\n\nRead-only." - }, - "state": { - "type": "string", - "enumDescriptions": [ - "Should never be returned.", - "The invitation is active and awaiting a response.", - "The invitation is no longer active. It may have been accepted, declined,\nwithdrawn or it may have expired." - ], - "enum": [ - "GUARDIAN_INVITATION_STATE_UNSPECIFIED", - "PENDING", - "COMPLETE" - ], - "description": "The state that this invitation is in." - }, - "studentId": { - "description": "ID of the student (in standard format)", - "type": "string" - } - }, - "id": "GuardianInvitation", - "description": "An invitation to become the guardian of a specified user, sent to a specified\nemail address.", - "type": "object" - }, - "Attachment": { - "description": "Attachment added to student assignment work.\n\nWhen creating attachments, setting the `form` field is not supported.", - "type": "object", - "properties": { - "youTubeVideo": { - "$ref": "YouTubeVideo", - "description": "Youtube video attachment." - }, - "driveFile": { - "$ref": "DriveFile", - "description": "Google Drive file attachment." - }, - "form": { - "$ref": "Form", - "description": "Google Forms attachment." - }, - "link": { - "description": "Link attachment.", - "$ref": "Link" - } - }, - "id": "Attachment" - }, - "StateHistory": { - "description": "The history of each state this submission has been in.", - "type": "object", - "properties": { - "state": { - "description": "The workflow pipeline stage.", - "type": "string", - "enumDescriptions": [ - "No state specified. This should never be returned.", - "The Submission has been created.", - "The student has turned in an assigned document, which may or may not be\na template.", - "The teacher has returned the assigned document to the student.", - "The student turned in the assigned document, and then chose to\n\"unsubmit\" the assignment, giving the student control again as the\nowner.", - "The student edited their submission after turning it in. Currently,\nonly used by Questions, when the student edits their answer." - ], - "enum": [ - "STATE_UNSPECIFIED", - "CREATED", - "TURNED_IN", - "RETURNED", - "RECLAIMED_BY_STUDENT", - "STUDENT_EDITED_AFTER_TURN_IN" - ] - }, - "stateTimestamp": { - "type": "string", - "format": "google-datetime", - "description": "When the submission entered this state." - }, - "actorUserId": { - "description": "The teacher or student who made the change", - "type": "string" - } - }, - "id": "StateHistory" - }, - "CourseMaterialSet": { - "description": "A set of materials that appears on the \"About\" page of the course.\nThese materials might include a syllabus, schedule, or other background\ninformation relating to the course as a whole.", - "type": "object", - "properties": { - "materials": { - "description": "Materials attached to this set.", - "items": { - "$ref": "CourseMaterial" - }, - "type": "array" - }, - "title": { - "description": "Title for this set.", - "type": "string" - } - }, - "id": "CourseMaterialSet" - }, - "TimeOfDay": { - "description": "Represents a time of day. The date and time zone are either not significant\nor are specified elsewhere. An API may choose to allow leap seconds. Related\ntypes are google.type.Date and `google.protobuf.Timestamp`.", - "type": "object", - "properties": { - "nanos": { - "format": "int32", - "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", - "type": "integer" - }, - "seconds": { - "format": "int32", - "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may\nallow the value 60 if it allows leap-seconds.", - "type": "integer" - }, - "minutes": { - "format": "int32", - "description": "Minutes of hour of day. Must be from 0 to 59.", - "type": "integer" - }, - "hours": { - "format": "int32", - "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose\nto allow the value \"24:00:00\" for scenarios like business closing time.", - "type": "integer" - } - }, - "id": "TimeOfDay" - }, - "ListCoursesResponse": { - "id": "ListCoursesResponse", - "description": "Response when listing courses.", - "type": "object", - "properties": { - "courses": { - "description": "Courses that match the list request.", - "items": { - "$ref": "Course" - }, - "type": "array" - }, - "nextPageToken": { - "type": "string", - "description": "Token identifying the next page of results to return. If empty, no further\nresults are available." - } - } - }, - "Form": { - "description": "Google Forms item.", - "type": "object", - "properties": { - "responseUrl": { - "description": "URL of the form responses document.\nOnly set if respsonses have been recorded and only when the\nrequesting user is an editor of the form.\n\nRead-only.", - "type": "string" - }, - "formUrl": { - "description": "URL of the form.", - "type": "string" - }, - "title": { - "description": "Title of the Form.\n\nRead-only.", - "type": "string" - }, - "thumbnailUrl": { - "description": "URL of a thumbnail image of the Form.\n\nRead-only.", - "type": "string" - } - }, - "id": "Form" - }, - "ListTeachersResponse": { - "description": "Response when listing teachers.", - "type": "object", - "properties": { - "teachers": { - "description": "Teachers who match the list request.", - "items": { - "$ref": "Teacher" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", - "type": "string" - } - }, - "id": "ListTeachersResponse" - }, - "Link": { - "properties": { - "thumbnailUrl": { - "description": "URL of a thumbnail image of the target URL.\n\nRead-only.", - "type": "string" - }, - "url": { - "description": "URL to link to.\nThis must be a valid UTF-8 string containing between 1 and 2024 characters.", - "type": "string" - }, - "title": { - "description": "Title of the target of the URL.\n\nRead-only.", - "type": "string" - } - }, - "id": "Link", - "description": "URL item.", - "type": "object" - }, - "ListGuardiansResponse": { - "description": "Response when listing guardians.", - "type": "object", - "properties": { - "guardians": { - "items": { - "$ref": "Guardian" - }, - "type": "array", - "description": "Guardians on this page of results that met the criteria specified in\nthe request." - }, - "nextPageToken": { - "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", - "type": "string" - } - }, - "id": "ListGuardiansResponse" - }, "CourseAlias": { "description": "Alternative identifier for a course.\n\nAn alias uniquely identifies a course. It must be unique within one of the\nfollowing scopes:\n\n* domain: A domain-scoped alias is visible to all users within the alias\ncreator's domain and can be created only by a domain admin. A domain-scoped\nalias is often used when a course has an identifier external to Classroom.\n\n* project: A project-scoped alias is visible to any request from an\napplication using the Developer Console project ID that created the alias\nand can be created by any project. A project-scoped alias is often used when\nan application has alternative identifiers. A random value can also be used\nto avoid duplicate courses in the event of transmission failures, as retrying\na request will return `ALREADY_EXISTS` if a previous one has succeeded.", "type": "object", @@ -1870,24 +1628,26 @@ "id": "CourseAlias" }, "ListGuardianInvitationsResponse": { - "description": "Response when listing guardian invitations.", - "type": "object", "properties": { "nextPageToken": { - "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", - "type": "string" + "type": "string", + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available." }, "guardianInvitations": { - "description": "Guardian invitations that matched the list request.", "items": { "$ref": "GuardianInvitation" }, - "type": "array" + "type": "array", + "description": "Guardian invitations that matched the list request." } }, - "id": "ListGuardianInvitationsResponse" + "id": "ListGuardianInvitationsResponse", + "description": "Response when listing guardian invitations.", + "type": "object" }, "ListCourseAliasesResponse": { + "description": "Response when listing course aliases.", + "type": "object", "properties": { "aliases": { "description": "The course aliases.", @@ -1901,11 +1661,10 @@ "type": "string" } }, - "id": "ListCourseAliasesResponse", - "description": "Response when listing course aliases.", - "type": "object" + "id": "ListCourseAliasesResponse" }, "Date": { + "id": "Date", "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", "type": "object", "properties": { @@ -1924,8 +1683,7 @@ "description": "Month of year. Must be from 1 to 12.", "type": "integer" } - }, - "id": "Date" + } }, "MultipleChoiceSubmission": { "description": "Student work for a multiple-choice question.", @@ -1939,12 +1697,10 @@ "id": "MultipleChoiceSubmission" }, "Name": { - "description": "Details of the user's name.", - "type": "object", "properties": { "familyName": { - "description": "The user's last name.\n\nRead-only.", - "type": "string" + "type": "string", + "description": "The user's last name.\n\nRead-only." }, "givenName": { "description": "The user's first name.\n\nRead-only.", @@ -1955,51 +1711,48 @@ "type": "string" } }, - "id": "Name" + "id": "Name", + "description": "Details of the user's name.", + "type": "object" }, "CourseMaterial": { + "id": "CourseMaterial", "description": "A material attached to a course as part of a material set.", "type": "object", "properties": { + "form": { + "$ref": "Form", + "description": "Google Forms attachment." + }, "link": { "$ref": "Link", "description": "Link atatchment." }, "youTubeVideo": { - "$ref": "YouTubeVideo", - "description": "Youtube video attachment." + "description": "Youtube video attachment.", + "$ref": "YouTubeVideo" }, "driveFile": { - "$ref": "DriveFile", - "description": "Google Drive file attachment." - }, - "form": { - "$ref": "Form", - "description": "Google Forms attachment." + "description": "Google Drive file attachment.", + "$ref": "DriveFile" } - }, - "id": "CourseMaterial" + } }, "Assignment": { "description": "Additional details for assignments.", "type": "object", "properties": { "studentWorkFolder": { - "description": "Drive folder where attachments from student submissions are placed.\nThis is only populated for course teachers and administrators.", - "$ref": "DriveFolder" + "$ref": "DriveFolder", + "description": "Drive folder where attachments from student submissions are placed.\nThis is only populated for course teachers and administrators." } }, "id": "Assignment" }, "SharedDriveFile": { + "type": "object", "properties": { "shareMode": { - "enumDescriptions": [ - "No sharing mode specified. This should never be returned.", - "Students can view the shared file.", - "Students can edit the shared file.", - "Students have a personal copy of the shared file." - ], "enum": [ "UNKNOWN_SHARE_MODE", "VIEW", @@ -2007,7 +1760,13 @@ "STUDENT_COPY" ], "description": "Mechanism by which students access the Drive item.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "No sharing mode specified. This should never be returned.", + "Students can view the shared file.", + "Students can edit the shared file.", + "Students have a personal copy of the shared file." + ] }, "driveFile": { "description": "Drive file details.", @@ -2015,8 +1774,7 @@ } }, "id": "SharedDriveFile", - "description": "Drive file that is used as material for course work.", - "type": "object" + "description": "Drive file that is used as material for course work." }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", @@ -2042,34 +1800,21 @@ "description": "A Course in Classroom.", "type": "object", "properties": { - "description": { - "description": "Optional description.\nFor example, \"We'll be learning about the structure of living\ncreatures from a combination of textbooks, guest lectures, and lab work.\nExpect to be excited!\"\nIf set, this field must be a valid UTF-8 string and no longer than 30,000\ncharacters.", - "type": "string" - }, - "teacherGroupEmail": { - "description": "The email address of a Google group containing all teachers of the course.\nThis group does not accept email and can only be used for permissions.\n\nRead-only.", - "type": "string" - }, - "creationTime": { - "format": "google-datetime", - "description": "Creation time of the course.\nSpecifying this field in a course update mask results in an error.\n\nRead-only.", - "type": "string" + "teacherFolder": { + "description": "Information about a Drive Folder that is shared with all teachers of the\ncourse.\n\nThis field will only be set for teachers of the course and domain administrators.\n\nRead-only.", + "$ref": "DriveFolder" }, "name": { "description": "Name of the course.\nFor example, \"10th Grade Biology\".\nThe name is required. It must be between 1 and 750 characters and a valid\nUTF-8 string.", "type": "string" }, - "teacherFolder": { - "description": "Information about a Drive Folder that is shared with all teachers of the\ncourse.\n\nThis field will only be set for teachers of the course and domain administrators.\n\nRead-only.", - "$ref": "DriveFolder" - }, "section": { "description": "Section of the course.\nFor example, \"Period 2\".\nIf set, this field must be a valid UTF-8 string and no longer than 2800\ncharacters.", "type": "string" }, "id": { - "description": "Identifier for this course assigned by Classroom.\n\nWhen\ncreating a course,\nyou may optionally set this identifier to an\nalias string in the\nrequest to create a corresponding alias. The `id` is still assigned by\nClassroom and cannot be updated after the course is created.\n\nSpecifying this field in a course update mask results in an error.", - "type": "string" + "type": "string", + "description": "Identifier for this course assigned by Classroom.\n\nWhen\ncreating a course,\nyou may optionally set this identifier to an\nalias string in the\nrequest to create a corresponding alias. The `id` is still assigned by\nClassroom and cannot be updated after the course is created.\n\nSpecifying this field in a course update mask results in an error." }, "room": { "description": "Optional room location.\nFor example, \"301\".\nIf set, this field must be a valid UTF-8 string and no longer than 650\ncharacters.", @@ -2094,28 +1839,26 @@ "description": "Optional heading for the description.\nFor example, \"Welcome to 10th Grade Biology.\"\nIf set, this field must be a valid UTF-8 string and no longer than 3600\ncharacters.", "type": "string" }, - "calendarId": { - "description": "The Calendar ID for a calendar that all course members can see, to which\nClassroom adds events for course work and announcements in the course.\n\nRead-only.", - "type": "string" - }, "updateTime": { "format": "google-datetime", "description": "Time of the most recent update to this course.\nSpecifying this field in a course update mask results in an error.\n\nRead-only.", "type": "string" }, + "calendarId": { + "description": "The Calendar ID for a calendar that all course members can see, to which\nClassroom adds events for course work and announcements in the course.\n\nRead-only.", + "type": "string" + }, "alternateLink": { "description": "Absolute link to this course in the Classroom web UI.\n\nRead-only.", "type": "string" }, "guardiansEnabled": { - "type": "boolean", - "description": "Whether or not guardian notifications are enabled for this course.\n\nRead-only." - }, - "ownerId": { - "description": "The identifier of the owner of a course.\n\nWhen specified as a parameter of a\ncreate course request, this\nfield is required.\nThe identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user\n\nThis must be set in a create request. Specifying this field in a course\nupdate mask results in an `INVALID_ARGUMENT` error.", - "type": "string" + "description": "Whether or not guardian notifications are enabled for this course.\n\nRead-only.", + "type": "boolean" }, "courseState": { + "description": "State of the course.\nIf unspecified, the default state is `PROVISIONED`.", + "type": "string", "enumDescriptions": [ "No course state. No returned Course message will use this value.", "The course is active.", @@ -2131,15 +1874,29 @@ "PROVISIONED", "DECLINED", "SUSPENDED" - ], - "description": "State of the course.\nIf unspecified, the default state is `PROVISIONED`.", + ] + }, + "ownerId": { + "description": "The identifier of the owner of a course.\n\nWhen specified as a parameter of a\ncreate course request, this\nfield is required.\nThe identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user\n\nThis must be set in a create request. Admins can also specify this field\nin a patch course request to\ntransfer ownership. In other contexts, it is read-only.", + "type": "string" + }, + "description": { + "description": "Optional description.\nFor example, \"We'll be learning about the structure of living\ncreatures from a combination of textbooks, guest lectures, and lab work.\nExpect to be excited!\"\nIf set, this field must be a valid UTF-8 string and no longer than 30,000\ncharacters.", + "type": "string" + }, + "teacherGroupEmail": { + "description": "The email address of a Google group containing all teachers of the course.\nThis group does not accept email and can only be used for permissions.\n\nRead-only.", + "type": "string" + }, + "creationTime": { + "format": "google-datetime", + "description": "Creation time of the course.\nSpecifying this field in a course update mask results in an error.\n\nRead-only.", "type": "string" } }, "id": "Course" }, "DriveFile": { - "id": "DriveFile", "description": "Representation of a Google Drive file.", "type": "object", "properties": { @@ -2159,9 +1916,17 @@ "type": "string", "description": "Title of the Drive item.\n\nRead-only." } - } + }, + "id": "DriveFile" + }, + "ReturnStudentSubmissionRequest": { + "properties": {}, + "id": "ReturnStudentSubmissionRequest", + "description": "Request to return a student submission.", + "type": "object" }, "GlobalPermission": { + "id": "GlobalPermission", "description": "Global user permission description.", "type": "object", "properties": { @@ -2177,37 +1942,34 @@ "description": "Permission value.", "type": "string" } - }, - "id": "GlobalPermission" - }, - "ReturnStudentSubmissionRequest": { - "description": "Request to return a student submission.", - "type": "object", - "properties": {}, - "id": "ReturnStudentSubmissionRequest" + } }, "Teacher": { + "description": "Teacher of a course.", "type": "object", "properties": { - "userId": { - "description": "Identifier of the user.\n\nWhen specified as a parameter of a request, this identifier can be one of\nthe following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string" - }, "courseId": { - "type": "string", - "description": "Identifier of the course.\n\nRead-only." + "description": "Identifier of the course.\n\nRead-only.", + "type": "string" }, "profile": { "$ref": "UserProfile", "description": "Global user information for the teacher.\n\nRead-only." + }, + "userId": { + "description": "Identifier of the user.\n\nWhen specified as a parameter of a request, this identifier can be one of\nthe following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string" } }, - "id": "Teacher", - "description": "Teacher of a course." + "id": "Teacher" + }, + "ReclaimStudentSubmissionRequest": { + "id": "ReclaimStudentSubmissionRequest", + "description": "Request to reclaim a student submission.", + "type": "object", + "properties": {} }, "GradeHistory": { - "description": "The history of each grade on this submission.", - "type": "object", "properties": { "maxPoints": { "format": "double", @@ -2220,8 +1982,8 @@ "type": "number" }, "actorUserId": { - "description": "The teacher who made the grade change.", - "type": "string" + "type": "string", + "description": "The teacher who made the grade change." }, "gradeChangeType": { "enumDescriptions": [ @@ -2245,12 +2007,8 @@ "type": "string" } }, - "id": "GradeHistory" - }, - "ReclaimStudentSubmissionRequest": { - "properties": {}, - "id": "ReclaimStudentSubmissionRequest", - "description": "Request to reclaim a student submission.", + "id": "GradeHistory", + "description": "The history of each grade on this submission.", "type": "object" }, "AssignmentSubmission": { @@ -2271,6 +2029,10 @@ "description": "Material attached to course work.\n\nWhen creating attachments, setting the `form` field is not supported.", "type": "object", "properties": { + "form": { + "$ref": "Form", + "description": "Google Forms material." + }, "link": { "$ref": "Link", "description": "Link material. On creation, will be upgraded to a more appropriate type\nif possible, and this will be reflected in the response." @@ -2282,22 +2044,66 @@ "driveFile": { "$ref": "SharedDriveFile", "description": "Google Drive file material." - }, - "form": { - "$ref": "Form", - "description": "Google Forms material." } }, "id": "Material" }, "CourseWork": { - "id": "CourseWork", - "description": "Course work created by a teacher for students of the course.", "type": "object", "properties": { + "dueDate": { + "description": "Optional date, in UTC, that submissions for this this course work are due.\nThis must be specified if `due_time` is specified.", + "$ref": "Date" + }, + "submissionModificationMode": { + "enumDescriptions": [ + "No modification mode specified. This is never returned.", + "Submisisons can be modified before being turned in.", + "Submisisons can be modified at any time." + ], + "enum": [ + "SUBMISSION_MODIFICATION_MODE_UNSPECIFIED", + "MODIFIABLE_UNTIL_TURNED_IN", + "MODIFIABLE" + ], + "description": "Setting to determine when students are allowed to modify submissions.\nIf unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.", + "type": "string" + }, + "state": { + "enum": [ + "COURSE_WORK_STATE_UNSPECIFIED", + "PUBLISHED", + "DRAFT", + "DELETED" + ], + "description": "Status of this course work.\nIf unspecified, the default state is `DRAFT`.", + "type": "string", + "enumDescriptions": [ + "No state specified. This is never returned.", + "Status for work that has been published.\nThis is the default state.", + "Status for work that is not yet published.\nWork in this state is visible only to course teachers and domain\nadministrators.", + "Status for work that was published but is now deleted.\nWork in this state is visible only to course teachers and domain\nadministrators.\nWork in this state is deleted after some time." + ] + }, + "courseId": { + "description": "Identifier of the course.\n\nRead-only.", + "type": "string" + }, + "id": { + "description": "Classroom-assigned identifier of this course work, unique per course.\n\nRead-only.", + "type": "string" + }, + "dueTime": { + "description": "Optional time of day, in UTC, that submissions for this this course work\nare due.\nThis must be specified if `due_date` is specified.", + "$ref": "TimeOfDay" + }, + "title": { + "description": "Title of this course work.\nThe title must be a valid UTF-8 string containing between 1 and 3000\ncharacters.", + "type": "string" + }, "associatedWithDeveloper": { - "type": "boolean", - "description": "Whether this course work item is associated with the Developer Console\nproject making the request.\n\nSee google.classroom.Work.CreateCourseWork for more\ndetails.\n\nRead-only." + "description": "Whether this course work item is associated with the Developer Console\nproject making the request.\n\nSee google.classroom.Work.CreateCourseWork for more\ndetails.\n\nRead-only.", + "type": "boolean" }, "materials": { "description": "Additional materials.\n\nCourseWork must have no more than 20 material items.", @@ -2312,8 +2118,8 @@ "type": "string" }, "alternateLink": { - "description": "Absolute link to this course work in the Classroom web UI.\nThis is only populated if `state` is `PUBLISHED`.\n\nRead-only.", - "type": "string" + "type": "string", + "description": "Absolute link to this course work in the Classroom web UI.\nThis is only populated if `state` is `PUBLISHED`.\n\nRead-only." }, "maxPoints": { "format": "double", @@ -2357,61 +2163,12 @@ "format": "google-datetime", "description": "Timestamp when this course work was created.\n\nRead-only.", "type": "string" - }, - "dueDate": { - "description": "Optional date, in UTC, that submissions for this this course work are due.\nThis must be specified if `due_time` is specified.", - "$ref": "Date" - }, - "submissionModificationMode": { - "enum": [ - "SUBMISSION_MODIFICATION_MODE_UNSPECIFIED", - "MODIFIABLE_UNTIL_TURNED_IN", - "MODIFIABLE" - ], - "description": "Setting to determine when students are allowed to modify submissions.\nIf unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.", - "type": "string", - "enumDescriptions": [ - "No modification mode specified. This is never returned.", - "Submisisons can be modified before being turned in.", - "Submisisons can be modified at any time." - ] - }, - "state": { - "enumDescriptions": [ - "No state specified. This is never returned.", - "Status for work that has been published.\nThis is the default state.", - "Status for work that is not yet published.\nWork in this state is visible only to course teachers and domain\nadministrators.", - "Status for work that was published but is now deleted.\nWork in this state is visible only to course teachers and domain\nadministrators.\nWork in this state is deleted after some time." - ], - "enum": [ - "COURSE_WORK_STATE_UNSPECIFIED", - "PUBLISHED", - "DRAFT", - "DELETED" - ], - "description": "Status of this course work.\nIf unspecified, the default state is `DRAFT`.", - "type": "string" - }, - "courseId": { - "description": "Identifier of the course.\n\nRead-only.", - "type": "string" - }, - "id": { - "description": "Classroom-assigned identifier of this course work, unique per course.\n\nRead-only.", - "type": "string" - }, - "dueTime": { - "$ref": "TimeOfDay", - "description": "Optional time of day, in UTC, that submissions for this this course work\nare due.\nThis must be specified if `due_date` is specified." - }, - "title": { - "description": "Title of this course work.\nThe title must be a valid UTF-8 string containing between 1 and 3000\ncharacters.", - "type": "string" } - } + }, + "id": "CourseWork", + "description": "Course work created by a teacher for students of the course." }, "Guardian": { - "description": "Association between a student and a guardian of that student. The guardian\nmay receive information about the student's course work.", "type": "object", "properties": { "studentId": { @@ -2419,62 +2176,28 @@ "type": "string" }, "invitedEmailAddress": { - "description": "The email address to which the initial guardian invitation was sent.\nThis field is only visible to domain administrators.", - "type": "string" + "type": "string", + "description": "The email address to which the initial guardian invitation was sent.\nThis field is only visible to domain administrators." }, "guardianId": { "description": "Identifier for the guardian.", "type": "string" }, "guardianProfile": { - "description": "User profile for the guardian.", - "$ref": "UserProfile" + "$ref": "UserProfile", + "description": "User profile for the guardian." } }, - "id": "Guardian" - }, - "UserProfile": { - "description": "Global information for a user.", - "type": "object", - "properties": { - "id": { - "description": "Identifier of the user.\n\nRead-only.", - "type": "string" - }, - "verifiedTeacher": { - "description": "Represents whether a G Suite for Education user's domain administrator has\nexplicitly verified them as being a teacher. If the user is not a member of\na G Suite for Education domain, than this field will always be false.\n\nRead-only", - "type": "boolean" - }, - "emailAddress": { - "type": "string", - "description": "Email address of the user.\n\nRead-only." - }, - "permissions": { - "description": "Global permissions of the user.\n\nRead-only.", - "items": { - "$ref": "GlobalPermission" - }, - "type": "array" - }, - "photoUrl": { - "description": "URL of user's profile photo.\n\nRead-only.", - "type": "string" - }, - "name": { - "description": "Name of the user.\n\nRead-only.", - "$ref": "Name" - } - }, - "id": "UserProfile" + "id": "Guardian", + "description": "Association between a student and a guardian of that student. The guardian\nmay receive information about the student's course work." }, "ListStudentsResponse": { - "id": "ListStudentsResponse", "description": "Response when listing students.", "type": "object", "properties": { "nextPageToken": { - "type": "string", - "description": "Token identifying the next page of results to return. If empty, no further\nresults are available." + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" }, "students": { "description": "Students who match the list request.", @@ -2483,15 +2206,52 @@ }, "type": "array" } - } + }, + "id": "ListStudentsResponse" }, - "Student": { - "description": "Student in a course.", + "UserProfile": { + "description": "Global information for a user.", "type": "object", "properties": { + "emailAddress": { + "description": "Email address of the user.\n\nRead-only.", + "type": "string" + }, + "photoUrl": { + "description": "URL of user's profile photo.\n\nRead-only.", + "type": "string" + }, + "permissions": { + "items": { + "$ref": "GlobalPermission" + }, + "type": "array", + "description": "Global permissions of the user.\n\nRead-only." + }, + "name": { + "$ref": "Name", + "description": "Name of the user.\n\nRead-only." + }, + "id": { + "description": "Identifier of the user.\n\nRead-only.", + "type": "string" + }, + "verifiedTeacher": { + "description": "Represents whether a G Suite for Education user's domain administrator has\nexplicitly verified them as being a teacher. If the user is not a member of\na G Suite for Education domain, than this field will always be false.\n\nRead-only", + "type": "boolean" + } + }, + "id": "UserProfile" + }, + "Student": { + "properties": { + "courseId": { + "type": "string", + "description": "Identifier of the course.\n\nRead-only." + }, "studentWorkFolder": { - "description": "Information about a Drive Folder for this student's work in this course.\nOnly visible to the student and domain administrators.\n\nRead-only.", - "$ref": "DriveFolder" + "$ref": "DriveFolder", + "description": "Information about a Drive Folder for this student's work in this course.\nOnly visible to the student and domain administrators.\n\nRead-only." }, "profile": { "$ref": "UserProfile", @@ -2500,57 +2260,50 @@ "userId": { "description": "Identifier of the user.\n\nWhen specified as a parameter of a request, this identifier can be one of\nthe following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", "type": "string" - }, - "courseId": { - "description": "Identifier of the course.\n\nRead-only.", - "type": "string" } }, - "id": "Student" + "id": "Student", + "description": "Student in a course.", + "type": "object" }, "Invitation": { + "type": "object", "properties": { + "id": { + "description": "Identifier assigned by Classroom.\n\nRead-only.", + "type": "string" + }, "role": { - "enum": [ - "COURSE_ROLE_UNSPECIFIED", - "STUDENT", - "TEACHER", - "OWNER" - ], - "description": "Role to invite the user to have.\nMust not be `COURSE_ROLE_UNSPECIFIED`.", "type": "string", "enumDescriptions": [ "No course role.", "Student in the course.", "Teacher of the course.", "Owner of the course." - ] + ], + "enum": [ + "COURSE_ROLE_UNSPECIFIED", + "STUDENT", + "TEACHER", + "OWNER" + ], + "description": "Role to invite the user to have.\nMust not be `COURSE_ROLE_UNSPECIFIED`." }, "userId": { - "type": "string", - "description": "Identifier of the invited user.\n\nWhen specified as a parameter of a request, this identifier can be set to\none of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user" + "description": "Identifier of the invited user.\n\nWhen specified as a parameter of a request, this identifier can be set to\none of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string" }, "courseId": { "description": "Identifier of the course to invite the user to.", "type": "string" - }, - "id": { - "description": "Identifier assigned by Classroom.\n\nRead-only.", - "type": "string" } }, "id": "Invitation", - "description": "An invitation to join a course.", - "type": "object" + "description": "An invitation to join a course." }, "DriveFolder": { - "description": "Representation of a Google Drive folder.", "type": "object", "properties": { - "title": { - "description": "Title of the Drive folder.\n\nRead-only.", - "type": "string" - }, "alternateLink": { "description": "URL that can be used to access the Drive folder.\n\nRead-only.", "type": "string" @@ -2558,35 +2311,40 @@ "id": { "description": "Drive API resource ID.", "type": "string" + }, + "title": { + "description": "Title of the Drive folder.\n\nRead-only.", + "type": "string" } }, - "id": "DriveFolder" + "id": "DriveFolder", + "description": "Representation of a Google Drive folder." }, "SubmissionHistory": { "description": "The history of the submission. This currently includes state and grade\nhistories.", "type": "object", "properties": { - "gradeHistory": { - "description": "The grade history information of the submission, if present.", - "$ref": "GradeHistory" - }, "stateHistory": { - "description": "The state history information of the submission, if present.", - "$ref": "StateHistory" + "$ref": "StateHistory", + "description": "The state history information of the submission, if present." + }, + "gradeHistory": { + "$ref": "GradeHistory", + "description": "The grade history information of the submission, if present." } }, "id": "SubmissionHistory" }, "ShortAnswerSubmission": { - "id": "ShortAnswerSubmission", - "description": "Student work for a short answer question.", "type": "object", "properties": { "answer": { "description": "Student response to a short-answer question.", "type": "string" } - } + }, + "id": "ShortAnswerSubmission", + "description": "Student work for a short answer question." }, "TurnInStudentSubmissionRequest": { "description": "Request to turn in a student submission.", @@ -2603,21 +2361,24 @@ "type": "string" }, "studentSubmissions": { - "description": "Student work that matches the request.", "items": { "$ref": "StudentSubmission" }, - "type": "array" + "type": "array", + "description": "Student work that matches the request." } }, "id": "ListStudentSubmissionsResponse" }, "StudentSubmission": { + "id": "StudentSubmission", + "description": "Student submission for course work.\n\nStudentSubmission items are generated when a CourseWork item is created.\n\nStudentSubmissions that have never been accessed (i.e. with `state` = NEW)\nmay not have a creation time or update time.", + "type": "object", "properties": { "creationTime": { - "type": "string", "format": "google-datetime", - "description": "Creation time of this submission.\nThis may be unset if the student has not accessed this item.\n\nRead-only." + "description": "Creation time of this submission.\nThis may be unset if the student has not accessed this item.\n\nRead-only.", + "type": "string" }, "state": { "enumDescriptions": [ @@ -2656,24 +2417,24 @@ "type": "string" }, "submissionHistory": { - "description": "The history of the submission (includes state and grade histories).\n\nRead-only.", "items": { "$ref": "SubmissionHistory" }, - "type": "array" + "type": "array", + "description": "The history of the submission (includes state and grade histories).\n\nRead-only." }, "assignedGrade": { - "type": "number", "format": "double", - "description": "Optional grade. If unset, no grade was set.\nThis must be a non-negative integer value.\n\nThis may be modified only by course teachers." + "description": "Optional grade. If unset, no grade was set.\nThis value must be non-negative. Decimal (i.e. non-integer) values are\nallowed, but will be rounded to two decimal places.\n\nThis may be modified only by course teachers.", + "type": "number" }, "multipleChoiceSubmission": { - "description": "Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION.", - "$ref": "MultipleChoiceSubmission" + "$ref": "MultipleChoiceSubmission", + "description": "Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION." }, "assignmentSubmission": { - "description": "Submission content when course_work_type is ASSIGNMENT .", - "$ref": "AssignmentSubmission" + "$ref": "AssignmentSubmission", + "description": "Submission content when course_work_type is ASSIGNMENT ." }, "shortAnswerSubmission": { "$ref": "ShortAnswerSubmission", @@ -2692,22 +2453,16 @@ "description": "Absolute link to the submission in the Classroom web UI.\n\nRead-only.", "type": "string" }, - "draftGrade": { - "format": "double", - "description": "Optional pending grade. If unset, no grade was set.\nThis must be a non-negative integer value.\n\nThis is only visible to and modifiable by course teachers.", - "type": "number" - }, "late": { "description": "Whether this submission is late.\n\nRead-only.", "type": "boolean" }, + "draftGrade": { + "format": "double", + "description": "Optional pending grade. If unset, no grade was set.\nThis value must be non-negative. Decimal (i.e. non-integer) values are\nallowed, but will be rounded to two decimal places.\n\nThis is only visible to and modifiable by course teachers.", + "type": "number" + }, "courseWorkType": { - "enumDescriptions": [ - "No work type specified. This is never returned.", - "An assignment.", - "A short answer question.", - "A multiple-choice question." - ], "enum": [ "COURSE_WORK_TYPE_UNSPECIFIED", "ASSIGNMENT", @@ -2715,12 +2470,15 @@ "MULTIPLE_CHOICE_QUESTION" ], "description": "Type of course work this submission is for.\n\nRead-only.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "No work type specified. This is never returned.", + "An assignment.", + "A short answer question.", + "A multiple-choice question." + ] } - }, - "id": "StudentSubmission", - "description": "Student submission for course work.\n\nStudentSubmission items are generated when a CourseWork item is created.\n\nStudentSubmissions that have never been accessed (i.e. with `state` = NEW)\nmay not have a creation time or update time.", - "type": "object" + } }, "ModifyAttachmentsRequest": { "description": "Request to modify the attachments of a student submission.", @@ -2737,7 +2495,6 @@ "id": "ModifyAttachmentsRequest" }, "ListCourseWorkResponse": { - "description": "Response when listing course work.", "type": "object", "properties": { "nextPageToken": { @@ -2752,12 +2509,21 @@ "type": "array" } }, - "id": "ListCourseWorkResponse" + "id": "ListCourseWorkResponse", + "description": "Response when listing course work." }, "YouTubeVideo": { "description": "YouTube video item.", "type": "object", "properties": { + "alternateLink": { + "description": "URL that can be used to view the YouTube video.\n\nRead-only.", + "type": "string" + }, + "thumbnailUrl": { + "description": "URL of a thumbnail image of the YouTube video.\n\nRead-only.", + "type": "string" + }, "id": { "description": "YouTube API resource ID.", "type": "string" @@ -2765,35 +2531,265 @@ "title": { "description": "Title of the YouTube video.\n\nRead-only.", "type": "string" - }, - "alternateLink": { - "type": "string", - "description": "URL that can be used to view the YouTube video.\n\nRead-only." - }, - "thumbnailUrl": { - "description": "URL of a thumbnail image of the YouTube video.\n\nRead-only.", - "type": "string" } }, "id": "YouTubeVideo" }, "ListInvitationsResponse": { - "description": "Response when listing invitations.", "type": "object", "properties": { - "nextPageToken": { - "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", - "type": "string" - }, "invitations": { "description": "Invitations that match the list request.", "items": { "$ref": "Invitation" }, "type": "array" + }, + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" } }, - "id": "ListInvitationsResponse" + "id": "ListInvitationsResponse", + "description": "Response when listing invitations." + }, + "Attachment": { + "type": "object", + "properties": { + "youTubeVideo": { + "$ref": "YouTubeVideo", + "description": "Youtube video attachment." + }, + "driveFile": { + "description": "Google Drive file attachment.", + "$ref": "DriveFile" + }, + "form": { + "description": "Google Forms attachment.", + "$ref": "Form" + }, + "link": { + "description": "Link attachment.", + "$ref": "Link" + } + }, + "id": "Attachment", + "description": "Attachment added to student assignment work.\n\nWhen creating attachments, setting the `form` field is not supported." + }, + "GuardianInvitation": { + "description": "An invitation to become the guardian of a specified user, sent to a specified\nemail address.", + "type": "object", + "properties": { + "creationTime": { + "type": "string", + "format": "google-datetime", + "description": "The time that this invitation was created.\n\nRead-only." + }, + "invitationId": { + "type": "string", + "description": "Unique identifier for this invitation.\n\nRead-only." + }, + "state": { + "enumDescriptions": [ + "Should never be returned.", + "The invitation is active and awaiting a response.", + "The invitation is no longer active. It may have been accepted, declined,\nwithdrawn or it may have expired." + ], + "enum": [ + "GUARDIAN_INVITATION_STATE_UNSPECIFIED", + "PENDING", + "COMPLETE" + ], + "description": "The state that this invitation is in.", + "type": "string" + }, + "studentId": { + "type": "string", + "description": "ID of the student (in standard format)" + }, + "invitedEmailAddress": { + "description": "Email address that the invitation was sent to.\nThis field is only visible to domain administrators.", + "type": "string" + } + }, + "id": "GuardianInvitation" + }, + "StateHistory": { + "description": "The history of each state this submission has been in.", + "type": "object", + "properties": { + "state": { + "enumDescriptions": [ + "No state specified. This should never be returned.", + "The Submission has been created.", + "The student has turned in an assigned document, which may or may not be\na template.", + "The teacher has returned the assigned document to the student.", + "The student turned in the assigned document, and then chose to\n\"unsubmit\" the assignment, giving the student control again as the\nowner.", + "The student edited their submission after turning it in. Currently,\nonly used by Questions, when the student edits their answer." + ], + "enum": [ + "STATE_UNSPECIFIED", + "CREATED", + "TURNED_IN", + "RETURNED", + "RECLAIMED_BY_STUDENT", + "STUDENT_EDITED_AFTER_TURN_IN" + ], + "description": "The workflow pipeline stage.", + "type": "string" + }, + "stateTimestamp": { + "format": "google-datetime", + "description": "When the submission entered this state.", + "type": "string" + }, + "actorUserId": { + "description": "The teacher or student who made the change", + "type": "string" + } + }, + "id": "StateHistory" + }, + "CourseMaterialSet": { + "description": "A set of materials that appears on the \"About\" page of the course.\nThese materials might include a syllabus, schedule, or other background\ninformation relating to the course as a whole.", + "type": "object", + "properties": { + "materials": { + "description": "Materials attached to this set.", + "items": { + "$ref": "CourseMaterial" + }, + "type": "array" + }, + "title": { + "description": "Title for this set.", + "type": "string" + } + }, + "id": "CourseMaterialSet" + }, + "TimeOfDay": { + "id": "TimeOfDay", + "description": "Represents a time of day. The date and time zone are either not significant\nor are specified elsewhere. An API may choose to allow leap seconds. Related\ntypes are google.type.Date and `google.protobuf.Timestamp`.", + "type": "object", + "properties": { + "minutes": { + "format": "int32", + "description": "Minutes of hour of day. Must be from 0 to 59.", + "type": "integer" + }, + "hours": { + "format": "int32", + "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose\nto allow the value \"24:00:00\" for scenarios like business closing time.", + "type": "integer" + }, + "nanos": { + "type": "integer", + "format": "int32", + "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999." + }, + "seconds": { + "format": "int32", + "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may\nallow the value 60 if it allows leap-seconds.", + "type": "integer" + } + } + }, + "ListCoursesResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available." + }, + "courses": { + "items": { + "$ref": "Course" + }, + "type": "array", + "description": "Courses that match the list request." + } + }, + "id": "ListCoursesResponse", + "description": "Response when listing courses." + }, + "Form": { + "description": "Google Forms item.", + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the Form.\n\nRead-only." + }, + "thumbnailUrl": { + "description": "URL of a thumbnail image of the Form.\n\nRead-only.", + "type": "string" + }, + "responseUrl": { + "description": "URL of the form responses document.\nOnly set if respsonses have been recorded and only when the\nrequesting user is an editor of the form.\n\nRead-only.", + "type": "string" + }, + "formUrl": { + "type": "string", + "description": "URL of the form." + } + }, + "id": "Form" + }, + "ListTeachersResponse": { + "description": "Response when listing teachers.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + }, + "teachers": { + "description": "Teachers who match the list request.", + "items": { + "$ref": "Teacher" + }, + "type": "array" + } + }, + "id": "ListTeachersResponse" + }, + "Link": { + "description": "URL item.", + "type": "object", + "properties": { + "url": { + "description": "URL to link to.\nThis must be a valid UTF-8 string containing between 1 and 2024 characters.", + "type": "string" + }, + "title": { + "description": "Title of the target of the URL.\n\nRead-only.", + "type": "string" + }, + "thumbnailUrl": { + "type": "string", + "description": "URL of a thumbnail image of the target URL.\n\nRead-only." + } + }, + "id": "Link" + }, + "ListGuardiansResponse": { + "properties": { + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + }, + "guardians": { + "description": "Guardians on this page of results that met the criteria specified in\nthe request.", + "items": { + "$ref": "Guardian" + }, + "type": "array" + } + }, + "id": "ListGuardiansResponse", + "description": "Response when listing guardians.", + "type": "object" } }, "protocol": "rest", @@ -2806,21 +2802,30 @@ "auth": { "oauth2": { "scopes": { + "https://www.googleapis.com/auth/classroom.courses.readonly": { + "description": "View your Google Classroom classes" + }, + "https://www.googleapis.com/auth/classroom.profile.photos": { + "description": "View the profile photos of people in your classes" + }, + "https://www.googleapis.com/auth/classroom.rosters.readonly": { + "description": "View your Google Classroom class rosters" + }, "https://www.googleapis.com/auth/classroom.guardianlinks.students": { "description": "View and manage guardians for students in your Google Classroom classes" }, "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly": { "description": "View your course work and grades in Google Classroom" }, + "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly": { + "description": "View your Google Classroom guardians" + }, "https://www.googleapis.com/auth/classroom.coursework.students": { "description": "Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer" }, "https://www.googleapis.com/auth/classroom.coursework.students.readonly": { "description": "View course work and grades for students in the Google Classroom classes you teach or administer" }, - "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly": { - "description": "View your Google Classroom guardians" - }, "https://www.googleapis.com/auth/classroom.coursework.me.readonly": { "description": "View your course work and grades in Google Classroom" }, @@ -2841,21 +2846,16 @@ }, "https://www.googleapis.com/auth/classroom.courses": { "description": "Manage your Google Classroom classes" - }, - "https://www.googleapis.com/auth/classroom.courses.readonly": { - "description": "View your Google Classroom classes" - }, - "https://www.googleapis.com/auth/classroom.rosters.readonly": { - "description": "View your Google Classroom class rosters" - }, - "https://www.googleapis.com/auth/classroom.profile.photos": { - "description": "View the profile photos of people in your classes" } } } }, - "servicePath": "", - "description": "Manages classes, rosters, and invitations in Google Classroom.", "kind": "discovery#restDescription", - "rootUrl": "https://classroom.googleapis.com/" + "description": "Manages classes, rosters, and invitations in Google Classroom.", + "servicePath": "", + "rootUrl": "https://classroom.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "classroom", + "batchPath": "batch" } diff --git a/vendor/google.golang.org/api/classroom/v1/classroom-gen.go b/vendor/google.golang.org/api/classroom/v1/classroom-gen.go index dbc815588..0d12012c8 100644 --- a/vendor/google.golang.org/api/classroom/v1/classroom-gen.go +++ b/vendor/google.golang.org/api/classroom/v1/classroom-gen.go @@ -485,9 +485,10 @@ type Course struct { // * the email address of the user // * the string literal "me", indicating the requesting user // - // This must be set in a create request. Specifying this field in a - // course - // update mask results in an `INVALID_ARGUMENT` error. + // This must be set in a create request. Admins can also specify this + // field + // in a patch course request to + // transfer ownership. In other contexts, it is read-only. OwnerId string `json:"ownerId,omitempty"` // Room: Optional room location. @@ -2095,7 +2096,9 @@ type StudentSubmission struct { AlternateLink string `json:"alternateLink,omitempty"` // AssignedGrade: Optional grade. If unset, no grade was set. - // This must be a non-negative integer value. + // This value must be non-negative. Decimal (i.e. non-integer) values + // are + // allowed, but will be rounded to two decimal places. // // This may be modified only by course teachers. AssignedGrade float64 `json:"assignedGrade,omitempty"` @@ -2147,7 +2150,9 @@ type StudentSubmission struct { CreationTime string `json:"creationTime,omitempty"` // DraftGrade: Optional pending grade. If unset, no grade was set. - // This must be a non-negative integer value. + // This value must be non-negative. Decimal (i.e. non-integer) values + // are + // allowed, but will be rounded to two decimal places. // // This is only visible to and modifiable by course teachers. DraftGrade float64 `json:"draftGrade,omitempty"` @@ -2923,7 +2928,9 @@ type CoursesListCall struct { // List: Returns a list of courses that the requesting user is permitted // to view, -// restricted to those that match the request. +// restricted to those that match the request. Returned courses are +// ordered by +// creation time, with the most recently created coming first. // // This method returns the following error codes: // @@ -3091,7 +3098,7 @@ func (c *CoursesListCall) Do(opts ...googleapi.CallOption) (*ListCoursesResponse } return ret, nil // { - // "description": "Returns a list of courses that the requesting user is permitted to view,\nrestricted to those that match the request.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` for access errors.\n* `INVALID_ARGUMENT` if the query argument is malformed.\n* `NOT_FOUND` if any users specified in the query arguments do not exist.", + // "description": "Returns a list of courses that the requesting user is permitted to view,\nrestricted to those that match the request. Returned courses are ordered by\ncreation time, with the most recently created coming first.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` for access errors.\n* `INVALID_ARGUMENT` if the query argument is malformed.\n* `NOT_FOUND` if any users specified in the query arguments do not exist.", // "flatPath": "v1/courses", // "httpMethod": "GET", // "id": "classroom.courses.list", @@ -3209,6 +3216,13 @@ func (r *CoursesService) Patch(id string, course *Course) *CoursesPatchCall { // * `description` // * `room` // * `courseState` +// * `ownerId` +// +// Note: patches to ownerId are treated as being effective immediately, +// but in +// practice it may take some time for the ownership transfer of all +// affected +// resources to complete. // // When set in a query parameter, this field should be specified // as @@ -3320,7 +3334,7 @@ func (c *CoursesPatchCall) Do(opts ...googleapi.CallOption) (*Course, error) { // "type": "string" // }, // "updateMask": { - // "description": "Mask that identifies which fields on the course to update.\nThis field is required to do an update. The update will fail if invalid\nfields are specified. The following fields are valid:\n\n* `name`\n* `section`\n* `descriptionHeading`\n* `description`\n* `room`\n* `courseState`\n\nWhen set in a query parameter, this field should be specified as\n\n`updateMask=\u003cfield1\u003e,\u003cfield2\u003e,...`", + // "description": "Mask that identifies which fields on the course to update.\nThis field is required to do an update. The update will fail if invalid\nfields are specified. The following fields are valid:\n\n* `name`\n* `section`\n* `descriptionHeading`\n* `description`\n* `room`\n* `courseState`\n* `ownerId`\n\nNote: patches to ownerId are treated as being effective immediately, but in\npractice it may take some time for the ownership transfer of all affected\nresources to complete.\n\nWhen set in a query parameter, this field should be specified as\n\n`updateMask=\u003cfield1\u003e,\u003cfield2\u003e,...`", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -5291,7 +5305,7 @@ func (c *CoursesCourseWorkStudentSubmissionsListCall) Do(opts ...googleapi.CallO // "type": "string" // }, // "courseWorkId": { - // "description": "Identifer of the student work to request.\nThis may be set to the string literal `\"-\"` to request student work for\nall course work in the specified course.", + // "description": "Identifier of the student work to request.\nThis may be set to the string literal `\"-\"` to request student work for\nall course work in the specified course.", // "location": "path", // "required": true, // "type": "string" diff --git a/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-api.json b/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-api.json index 542e63ae4..16f22bc75 100644 --- a/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-api.json +++ b/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-api.json @@ -167,9 +167,233 @@ ] } } + }, + "services": { + "resources": { + "skus": { + "methods": { + "list": { + "id": "cloudbilling.services.skus.list", + "response": { + "$ref": "ListSkusResponse" + }, + "parameterOrder": [ + "parent" + ], + "description": "Lists all publicly available SKUs for a given cloud service.", + "flatPath": "v1/services/{servicesId}/skus", + "httpMethod": "GET", + "parameters": { + "parent": { + "description": "The name of the service.\nExample: \"services/DA34-426B-A397\"", + "required": true, + "pattern": "^services/[^/]+$", + "location": "path", + "type": "string" + }, + "currencyCode": { + "description": "The ISO 4217 currency code for the pricing info in the response proto.\nWill use the conversion rate as of start_time.\nOptional. If not specified USD will be used.", + "location": "query", + "type": "string" + }, + "endTime": { + "description": "Optional exclusive end time of the time range for which the pricing\nversions will be returned. Timestamps in the future are not allowed.\nMaximum allowable time range is 1 month (31 days). Time range as a whole\nis optional. If not specified, the latest pricing will be returned (up to\n12 hours old at most).", + "location": "query", + "type": "string", + "format": "google-datetime" + }, + "pageSize": { + "description": "Requested page size. Defaults to 5000.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "startTime": { + "description": "Optional inclusive start time of the time range for which the pricing\nversions will be returned. Timestamps in the future are not allowed.\nMaximum allowable time range is 1 month (31 days). Time range as a whole\nis optional. If not specified, the latest pricing will be returned (up to\n12 hours old at most).", + "location": "query", + "type": "string", + "format": "google-datetime" + }, + "pageToken": { + "description": "A token identifying a page of results to return. This should be a\n`next_page_token` value returned from a previous `ListSkus`\ncall. If unspecified, the first page of results is returned.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/skus" + } + } + } + }, + "methods": { + "list": { + "id": "cloudbilling.services.list", + "response": { + "$ref": "ListServicesResponse" + }, + "parameterOrder": [], + "description": "Lists all public cloud services.", + "flatPath": "v1/services", + "httpMethod": "GET", + "parameters": { + "pageSize": { + "description": "Requested page size. Defaults to 5000.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "pageToken": { + "description": "A token identifying a page of results to return. This should be a\n`next_page_token` value returned from a previous `ListServices`\ncall. If unspecified, the first page of results is returned.", + "location": "query", + "type": "string" + } + }, + "path": "v1/services" + } + } } }, "schemas": { + "PricingExpression": { + "description": "Expresses a mathematical pricing formula. For Example:-\n\n`usage_unit: GBy`\n`tiered_rates:`\n `[start_usage_amount: 20, unit_price: $10]`\n `[start_usage_amount: 100, unit_price: $5]`\n\nThe above expresses a pricing formula where the first 20GB is free, the\nnext 80GB is priced at $10 per GB followed by $5 per GB for additional\nusage.", + "type": "object", + "properties": { + "displayQuantity": { + "description": "The recommended quantity of units for displaying pricing info. When\ndisplaying pricing info it is recommended to display:\n(unit_price * display_quantity) per display_quantity usage_unit.\nThis field does not affect the pricing formula and is for display purposes\nonly.\nExample: If the unit_price is \"0.0001 USD\", the usage_unit is \"GB\" and\nthe display_quantity is \"1000\" then the recommended way of displaying the\npricing info is \"0.10 USD per 1000 GB\"", + "type": "number", + "format": "double" + }, + "baseUnitDescription": { + "description": "The base unit in human readable form.\nExample: \"byte\".", + "type": "string" + }, + "baseUnitConversionFactor": { + "description": "Conversion factor for converting from price per usage_unit to price per\nbase_unit, and start_usage_amount to start_usage_amount in base_unit.\nunit_price / base_unit_conversion_factor = price per base_unit.\nstart_usage_amount * base_unit_conversion_factor = start_usage_amount in\nbase_unit.", + "type": "number", + "format": "double" + }, + "usageUnit": { + "description": "The short hand for unit of usage this pricing is specified in.\nExample: usage_unit of \"GiBy\" means that usage is specified in \"Gibi Byte\".", + "type": "string" + }, + "baseUnit": { + "description": "The base unit for the SKU which is the unit used in usage exports.\nExample: \"By\"", + "type": "string" + }, + "usageUnitDescription": { + "description": "The unit of usage in human readable form.\nExample: \"gibi byte\".", + "type": "string" + }, + "tieredRates": { + "description": "The list of tiered rates for this pricing. The total cost is computed by\napplying each of the tiered rates on usage. This repeated list is sorted\nby ascending order of start_usage_amount.", + "type": "array", + "items": { + "$ref": "TierRate" + } + } + }, + "id": "PricingExpression" + }, + "Sku": { + "description": "Encapsulates a single SKU in Google Cloud Platform", + "type": "object", + "properties": { + "description": { + "description": "A human readable description of the SKU, has a maximum length of 256\ncharacters.", + "type": "string" + }, + "serviceRegions": { + "description": "List of service regions this SKU is offered at.\nExample: \"asia-east1\"\nService regions can be found at https://cloud.google.com/about/locations/", + "type": "array", + "items": { + "type": "string" + } + }, + "serviceProviderName": { + "description": "Identifies the service provider.\nThis is 'Google' for first party services in Google Cloud Platform.", + "type": "string" + }, + "pricingInfo": { + "description": "A timeline of pricing info for this SKU in chronological order.", + "type": "array", + "items": { + "$ref": "PricingInfo" + } + }, + "skuId": { + "description": "The identifier for the SKU.\nExample: \"AA95-CD31-42FE\"", + "type": "string" + }, + "name": { + "description": "The resource name for the SKU.\nExample: \"services/DA34-426B-A397/skus/AA95-CD31-42FE\"", + "type": "string" + }, + "category": { + "description": "The category hierarchy of this SKU, purely for organizational purpose.", + "$ref": "Category" + } + }, + "id": "Sku" + }, + "Money": { + "description": "Represents an amount of money with its currency type.", + "type": "object", + "properties": { + "currencyCode": { + "description": "The 3-letter currency code defined in ISO 4217.", + "type": "string" + }, + "units": { + "description": "The whole units of the amount.\nFor example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", + "type": "string", + "format": "int64" + }, + "nanos": { + "description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", + "type": "integer", + "format": "int32" + } + }, + "id": "Money" + }, + "AggregationInfo": { + "description": "Represents the aggregation level and interval for pricing of a single SKU.", + "type": "object", + "properties": { + "aggregationInterval": { + "enum": [ + "AGGREGATION_INTERVAL_UNSPECIFIED", + "DAILY", + "MONTHLY" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "aggregationLevel": { + "enum": [ + "AGGREGATION_LEVEL_UNSPECIFIED", + "ACCOUNT", + "PROJECT" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "aggregationCount": { + "description": "The number of intervals to aggregate over.\nExample: If aggregation_level is \"DAILY\" and aggregation_count is 14,\naggregation will be over 14 days.", + "type": "integer", + "format": "int32" + } + }, + "id": "AggregationInfo" + }, "ProjectBillingInfo": { "description": "Encapsulation of billing information for a Cloud Console project. A project\nhas at most one associated billing account at a time (but a billing account\ncan be assigned to multiple projects).", "type": "object", @@ -193,6 +417,106 @@ }, "id": "ProjectBillingInfo" }, + "ListBillingAccountsResponse": { + "description": "Response message for `ListBillingAccounts`.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results. To retrieve the next page,\ncall `ListBillingAccounts` again with the `page_token` field set to this\nvalue. This field is empty if there are no more results to retrieve.", + "type": "string" + }, + "billingAccounts": { + "description": "A list of billing accounts.", + "type": "array", + "items": { + "$ref": "BillingAccount" + } + } + }, + "id": "ListBillingAccountsResponse" + }, + "ListSkusResponse": { + "description": "Response message for `ListSkus`.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results. To retrieve the next page,\ncall `ListSkus` again with the `page_token` field set to this\nvalue. This field is empty if there are no more results to retrieve.", + "type": "string" + }, + "skus": { + "description": "The list of public SKUs of the given service.", + "type": "array", + "items": { + "$ref": "Sku" + } + } + }, + "id": "ListSkusResponse" + }, + "Service": { + "description": "Encapsulates a single service in Google Cloud Platform.", + "type": "object", + "properties": { + "displayName": { + "description": "A human readable display name for this service.", + "type": "string" + }, + "serviceId": { + "description": "The identifier for the service.\nExample: \"DA34-426B-A397\"", + "type": "string" + }, + "name": { + "description": "The resource name for the service.\nExample: \"services/DA34-426B-A397\"", + "type": "string" + } + }, + "id": "Service" + }, + "TierRate": { + "description": "The price rate indicating starting usage and its corresponding price.", + "type": "object", + "properties": { + "unitPrice": { + "description": "The price per unit of usage.\nExample: unit_price of amount $10 indicates that each unit will cost $10.", + "$ref": "Money" + }, + "startUsageAmount": { + "description": "Usage is priced at this rate only after this amount.\nExample: start_usage_amount of 10 indicates that the usage will be priced\nat the unit_price after the first 10 usage_units.", + "type": "number", + "format": "double" + } + }, + "id": "TierRate" + }, + "PricingInfo": { + "description": "Represents the pricing information for a SKU at a single point of time.", + "type": "object", + "properties": { + "effectiveTime": { + "description": "The timestamp from which this pricing was effective.", + "type": "string", + "format": "google-datetime" + }, + "aggregationInfo": { + "description": "Aggregation Info. This can be left unspecified if the pricing expression\ndoesn't require aggregation.", + "$ref": "AggregationInfo" + }, + "currencyConversionRate": { + "description": "Conversion rate for currency conversion, from USD to the currency specified\nin the request. If the currency is not specified this defaults to 1.0.\nExample: USD * currency_conversion_rate = JPY", + "type": "number", + "format": "double" + }, + "pricingExpression": { + "description": "Expresses the pricing formula. See `PricingExpression` for an example.", + "$ref": "PricingExpression" + }, + "summary": { + "description": "An optional human readable summary of the pricing information, has a\nmaximum length of 256 characters.", + "type": "string" + } + }, + "id": "PricingInfo" + }, "ListProjectBillingInfoResponse": { "description": "Request message for `ListProjectBillingInfoResponse`.", "type": "object", @@ -211,23 +535,23 @@ }, "id": "ListProjectBillingInfoResponse" }, - "ListBillingAccountsResponse": { - "description": "Response message for `ListBillingAccounts`.", + "ListServicesResponse": { + "description": "Response message for `ListServices`.", "type": "object", "properties": { "nextPageToken": { - "description": "A token to retrieve the next page of results. To retrieve the next page,\ncall `ListBillingAccounts` again with the `page_token` field set to this\nvalue. This field is empty if there are no more results to retrieve.", + "description": "A token to retrieve the next page of results. To retrieve the next page,\ncall `ListServices` again with the `page_token` field set to this\nvalue. This field is empty if there are no more results to retrieve.", "type": "string" }, - "billingAccounts": { - "description": "A list of billing accounts.", + "services": { + "description": "A list of services.", "type": "array", "items": { - "$ref": "BillingAccount" + "$ref": "Service" } } }, - "id": "ListBillingAccountsResponse" + "id": "ListServicesResponse" }, "BillingAccount": { "description": "A billing account in [Google Cloud\nConsole](https://console.cloud.google.com/). You can assign a billing account\nto one or more projects.", @@ -247,9 +571,32 @@ } }, "id": "BillingAccount" + }, + "Category": { + "description": "Represents the category hierarchy of a SKU.", + "type": "object", + "properties": { + "resourceFamily": { + "description": "The type of product the SKU refers to.\nExample: \"Compute\", \"Storage\", \"Network\", \"ApplicationServices\" etc.", + "type": "string" + }, + "usageType": { + "description": "Represents how the SKU is consumed.\nExample: \"OnDemand\", \"Preemptible\", \"Commit1Mo\", \"Commit1Yr\" etc.", + "type": "string" + }, + "resourceGroup": { + "description": "A group classification for related SKUs.\nExample: \"RAM\", \"GPU\", \"Prediction\", \"Ops\", \"GoogleEgress\" etc.", + "type": "string" + }, + "serviceDisplayName": { + "description": "The display name of the service this SKU belongs to.", + "type": "string" + } + }, + "id": "Category" } }, - "revision": "20170711", + "revision": "20170813", "basePath": "", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", 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 24ad441f2..df9433e54 100644 --- a/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-gen.go +++ b/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-gen.go @@ -51,17 +51,18 @@ const ( CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) -func New(client *http.Client) (*Service, error) { +func New(client *http.Client) (*APIService, error) { if client == nil { return nil, errors.New("client is nil") } - s := &Service{client: client, BasePath: basePath} + s := &APIService{client: client, BasePath: basePath} s.BillingAccounts = NewBillingAccountsService(s) s.Projects = NewProjectsService(s) + s.Services = NewServicesService(s) return s, nil } -type Service struct { +type APIService struct { client *http.Client BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment @@ -69,43 +70,111 @@ type Service struct { BillingAccounts *BillingAccountsService Projects *ProjectsService + + Services *ServicesService } -func (s *Service) userAgent() string { +func (s *APIService) userAgent() string { if s.UserAgent == "" { return googleapi.UserAgent } return googleapi.UserAgent + " " + s.UserAgent } -func NewBillingAccountsService(s *Service) *BillingAccountsService { +func NewBillingAccountsService(s *APIService) *BillingAccountsService { rs := &BillingAccountsService{s: s} rs.Projects = NewBillingAccountsProjectsService(s) return rs } type BillingAccountsService struct { - s *Service + s *APIService Projects *BillingAccountsProjectsService } -func NewBillingAccountsProjectsService(s *Service) *BillingAccountsProjectsService { +func NewBillingAccountsProjectsService(s *APIService) *BillingAccountsProjectsService { rs := &BillingAccountsProjectsService{s: s} return rs } type BillingAccountsProjectsService struct { - s *Service + s *APIService } -func NewProjectsService(s *Service) *ProjectsService { +func NewProjectsService(s *APIService) *ProjectsService { rs := &ProjectsService{s: s} return rs } type ProjectsService struct { - s *Service + s *APIService +} + +func NewServicesService(s *APIService) *ServicesService { + rs := &ServicesService{s: s} + rs.Skus = NewServicesSkusService(s) + return rs +} + +type ServicesService struct { + s *APIService + + Skus *ServicesSkusService +} + +func NewServicesSkusService(s *APIService) *ServicesSkusService { + rs := &ServicesSkusService{s: s} + return rs +} + +type ServicesSkusService struct { + s *APIService +} + +// AggregationInfo: Represents the aggregation level and interval for +// pricing of a single SKU. +type AggregationInfo struct { + // AggregationCount: The number of intervals to aggregate over. + // Example: If aggregation_level is "DAILY" and aggregation_count is + // 14, + // aggregation will be over 14 days. + AggregationCount int64 `json:"aggregationCount,omitempty"` + + // Possible values: + // "AGGREGATION_INTERVAL_UNSPECIFIED" + // "DAILY" + // "MONTHLY" + AggregationInterval string `json:"aggregationInterval,omitempty"` + + // Possible values: + // "AGGREGATION_LEVEL_UNSPECIFIED" + // "ACCOUNT" + // "PROJECT" + AggregationLevel string `json:"aggregationLevel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationCount") 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. "AggregationCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AggregationInfo) MarshalJSON() ([]byte, error) { + type noMethod AggregationInfo + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BillingAccount: A billing account in [Google @@ -163,6 +232,48 @@ func (s *BillingAccount) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Category: Represents the category hierarchy of a SKU. +type Category struct { + // ResourceFamily: The type of product the SKU refers to. + // Example: "Compute", "Storage", "Network", "ApplicationServices" etc. + ResourceFamily string `json:"resourceFamily,omitempty"` + + // ResourceGroup: A group classification for related SKUs. + // Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc. + ResourceGroup string `json:"resourceGroup,omitempty"` + + // ServiceDisplayName: The display name of the service this SKU belongs + // to. + ServiceDisplayName string `json:"serviceDisplayName,omitempty"` + + // UsageType: Represents how the SKU is consumed. + // Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc. + UsageType string `json:"usageType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ResourceFamily") 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. "ResourceFamily") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Category) MarshalJSON() ([]byte, error) { + type noMethod Category + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListBillingAccountsResponse: Response message for // `ListBillingAccounts`. type ListBillingAccountsResponse struct { @@ -246,6 +357,295 @@ func (s *ListProjectBillingInfoResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListServicesResponse: Response message for `ListServices`. +type ListServicesResponse struct { + // NextPageToken: A token to retrieve the next page of results. To + // retrieve the next page, + // call `ListServices` again with the `page_token` field set to + // this + // value. This field is empty if there are no more results to retrieve. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Services: A list of services. + Services []*Service `json:"services,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 *ListServicesResponse) MarshalJSON() ([]byte, error) { + type noMethod ListServicesResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListSkusResponse: Response message for `ListSkus`. +type ListSkusResponse struct { + // NextPageToken: A token to retrieve the next page of results. To + // retrieve the next page, + // call `ListSkus` again with the `page_token` field set to this + // value. This field is empty if there are no more results to retrieve. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Skus: The list of public SKUs of the given service. + Skus []*Sku `json:"skus,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 *ListSkusResponse) MarshalJSON() ([]byte, error) { + type noMethod ListSkusResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Money: Represents an amount of money with its currency type. +type Money struct { + // CurrencyCode: The 3-letter currency code defined in ISO 4217. + CurrencyCode string `json:"currencyCode,omitempty"` + + // Nanos: Number of nano (10^-9) units of the amount. + // The value must be between -999,999,999 and +999,999,999 inclusive. + // If `units` is positive, `nanos` must be positive or zero. + // If `units` is zero, `nanos` can be positive, zero, or negative. + // If `units` is negative, `nanos` must be negative or zero. + // For example $-1.75 is represented as `units`=-1 and + // `nanos`=-750,000,000. + Nanos int64 `json:"nanos,omitempty"` + + // Units: The whole units of the amount. + // For example if `currencyCode` is "USD", then 1 unit is one US + // dollar. + Units int64 `json:"units,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "CurrencyCode") 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. "CurrencyCode") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Money) MarshalJSON() ([]byte, error) { + type noMethod Money + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PricingExpression: Expresses a mathematical pricing formula. For +// Example:- +// +// `usage_unit: GBy` +// `tiered_rates:` +// `[start_usage_amount: 20, unit_price: $10]` +// `[start_usage_amount: 100, unit_price: $5]` +// +// The above expresses a pricing formula where the first 20GB is free, +// the +// next 80GB is priced at $10 per GB followed by $5 per GB for +// additional +// usage. +type PricingExpression struct { + // BaseUnit: The base unit for the SKU which is the unit used in usage + // exports. + // Example: "By" + BaseUnit string `json:"baseUnit,omitempty"` + + // BaseUnitConversionFactor: Conversion factor for converting from price + // per usage_unit to price per + // base_unit, and start_usage_amount to start_usage_amount in + // base_unit. + // unit_price / base_unit_conversion_factor = price per + // base_unit. + // start_usage_amount * base_unit_conversion_factor = start_usage_amount + // in + // base_unit. + BaseUnitConversionFactor float64 `json:"baseUnitConversionFactor,omitempty"` + + // BaseUnitDescription: The base unit in human readable form. + // Example: "byte". + BaseUnitDescription string `json:"baseUnitDescription,omitempty"` + + // DisplayQuantity: The recommended quantity of units for displaying + // pricing info. When + // displaying pricing info it is recommended to display: + // (unit_price * display_quantity) per display_quantity usage_unit. + // This field does not affect the pricing formula and is for display + // purposes + // only. + // Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" + // and + // the display_quantity is "1000" then the recommended way of displaying + // the + // pricing info is "0.10 USD per 1000 GB" + DisplayQuantity float64 `json:"displayQuantity,omitempty"` + + // TieredRates: The list of tiered rates for this pricing. The total + // cost is computed by + // applying each of the tiered rates on usage. This repeated list is + // sorted + // by ascending order of start_usage_amount. + TieredRates []*TierRate `json:"tieredRates,omitempty"` + + // UsageUnit: The short hand for unit of usage this pricing is specified + // in. + // Example: usage_unit of "GiBy" means that usage is specified in "Gibi + // Byte". + UsageUnit string `json:"usageUnit,omitempty"` + + // UsageUnitDescription: The unit of usage in human readable + // form. + // Example: "gibi byte". + UsageUnitDescription string `json:"usageUnitDescription,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BaseUnit") 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. "BaseUnit") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PricingExpression) MarshalJSON() ([]byte, error) { + type noMethod PricingExpression + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *PricingExpression) UnmarshalJSON(data []byte) error { + type noMethod PricingExpression + var s1 struct { + BaseUnitConversionFactor gensupport.JSONFloat64 `json:"baseUnitConversionFactor"` + DisplayQuantity gensupport.JSONFloat64 `json:"displayQuantity"` + *noMethod + } + s1.noMethod = (*noMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.BaseUnitConversionFactor = float64(s1.BaseUnitConversionFactor) + s.DisplayQuantity = float64(s1.DisplayQuantity) + return nil +} + +// PricingInfo: Represents the pricing information for a SKU at a single +// point of time. +type PricingInfo struct { + // AggregationInfo: Aggregation Info. This can be left unspecified if + // the pricing expression + // doesn't require aggregation. + AggregationInfo *AggregationInfo `json:"aggregationInfo,omitempty"` + + // CurrencyConversionRate: Conversion rate for currency conversion, from + // USD to the currency specified + // in the request. If the currency is not specified this defaults to + // 1.0. + // Example: USD * currency_conversion_rate = JPY + CurrencyConversionRate float64 `json:"currencyConversionRate,omitempty"` + + // EffectiveTime: The timestamp from which this pricing was effective. + EffectiveTime string `json:"effectiveTime,omitempty"` + + // PricingExpression: Expresses the pricing formula. See + // `PricingExpression` for an example. + PricingExpression *PricingExpression `json:"pricingExpression,omitempty"` + + // Summary: An optional human readable summary of the pricing + // information, has a + // maximum length of 256 characters. + Summary string `json:"summary,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationInfo") 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. "AggregationInfo") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PricingInfo) MarshalJSON() ([]byte, error) { + type noMethod PricingInfo + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *PricingInfo) UnmarshalJSON(data []byte) error { + type noMethod PricingInfo + var s1 struct { + CurrencyConversionRate gensupport.JSONFloat64 `json:"currencyConversionRate"` + *noMethod + } + s1.noMethod = (*noMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.CurrencyConversionRate = float64(s1.CurrencyConversionRate) + return nil +} + // ProjectBillingInfo: Encapsulation of billing information for a Cloud // Console project. A project // has at most one associated billing account at a time (but a billing @@ -311,10 +711,156 @@ func (s *ProjectBillingInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Service: Encapsulates a single service in Google Cloud Platform. +type Service struct { + // DisplayName: A human readable display name for this service. + DisplayName string `json:"displayName,omitempty"` + + // Name: The resource name for the service. + // Example: "services/DA34-426B-A397" + Name string `json:"name,omitempty"` + + // ServiceId: The identifier for the service. + // Example: "DA34-426B-A397" + ServiceId string `json:"serviceId,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 *Service) MarshalJSON() ([]byte, error) { + type noMethod Service + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Sku: Encapsulates a single SKU in Google Cloud Platform +type Sku struct { + // Category: The category hierarchy of this SKU, purely for + // organizational purpose. + Category *Category `json:"category,omitempty"` + + // Description: A human readable description of the SKU, has a maximum + // length of 256 + // characters. + Description string `json:"description,omitempty"` + + // Name: The resource name for the SKU. + // Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE" + Name string `json:"name,omitempty"` + + // PricingInfo: A timeline of pricing info for this SKU in chronological + // order. + PricingInfo []*PricingInfo `json:"pricingInfo,omitempty"` + + // ServiceProviderName: Identifies the service provider. + // This is 'Google' for first party services in Google Cloud Platform. + ServiceProviderName string `json:"serviceProviderName,omitempty"` + + // ServiceRegions: List of service regions this SKU is offered + // at. + // Example: "asia-east1" + // Service regions can be found at + // https://cloud.google.com/about/locations/ + ServiceRegions []string `json:"serviceRegions,omitempty"` + + // SkuId: The identifier for the SKU. + // Example: "AA95-CD31-42FE" + SkuId string `json:"skuId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Category") 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. "Category") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Sku) MarshalJSON() ([]byte, error) { + type noMethod Sku + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TierRate: The price rate indicating starting usage and its +// corresponding price. +type TierRate struct { + // StartUsageAmount: Usage is priced at this rate only after this + // amount. + // Example: start_usage_amount of 10 indicates that the usage will be + // priced + // at the unit_price after the first 10 usage_units. + StartUsageAmount float64 `json:"startUsageAmount,omitempty"` + + // UnitPrice: The price per unit of usage. + // Example: unit_price of amount $10 indicates that each unit will cost + // $10. + UnitPrice *Money `json:"unitPrice,omitempty"` + + // ForceSendFields is a list of field names (e.g. "StartUsageAmount") 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. "StartUsageAmount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TierRate) MarshalJSON() ([]byte, error) { + type noMethod TierRate + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *TierRate) UnmarshalJSON(data []byte) error { + type noMethod TierRate + var s1 struct { + StartUsageAmount gensupport.JSONFloat64 `json:"startUsageAmount"` + *noMethod + } + s1.noMethod = (*noMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.StartUsageAmount = float64(s1.StartUsageAmount) + return nil +} + // method id "cloudbilling.billingAccounts.get": type BillingAccountsGetCall struct { - s *Service + s *APIService name string urlParams_ gensupport.URLParams ifNoneMatch_ string @@ -457,7 +1003,7 @@ func (c *BillingAccountsGetCall) Do(opts ...googleapi.CallOption) (*BillingAccou // method id "cloudbilling.billingAccounts.list": type BillingAccountsListCall struct { - s *Service + s *APIService urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -635,7 +1181,7 @@ func (c *BillingAccountsListCall) Pages(ctx context.Context, f func(*ListBilling // method id "cloudbilling.billingAccounts.projects.list": type BillingAccountsProjectsListCall struct { - s *Service + s *APIService name string urlParams_ gensupport.URLParams ifNoneMatch_ string @@ -829,7 +1375,7 @@ func (c *BillingAccountsProjectsListCall) Pages(ctx context.Context, f func(*Lis // method id "cloudbilling.projects.getBillingInfo": type ProjectsGetBillingInfoCall struct { - s *Service + s *APIService name string urlParams_ gensupport.URLParams ifNoneMatch_ string @@ -974,7 +1520,7 @@ func (c *ProjectsGetBillingInfoCall) Do(opts ...googleapi.CallOption) (*ProjectB // method id "cloudbilling.projects.updateBillingInfo": type ProjectsUpdateBillingInfoCall struct { - s *Service + s *APIService name string projectbillinginfo *ProjectBillingInfo urlParams_ gensupport.URLParams @@ -1160,3 +1706,413 @@ func (c *ProjectsUpdateBillingInfoCall) Do(opts ...googleapi.CallOption) (*Proje // } } + +// method id "cloudbilling.services.list": + +type ServicesListCall struct { + s *APIService + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all public cloud services. +func (r *ServicesService) List() *ServicesListCall { + c := &ServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Defaults to 5000. +func (c *ServicesListCall) PageSize(pageSize int64) *ServicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results to return. This should be +// a +// `next_page_token` value returned from a previous `ListServices` +// call. If unspecified, the first page of results is returned. +func (c *ServicesListCall) PageToken(pageToken string) *ServicesListCall { + 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 *ServicesListCall) Fields(s ...googleapi.Field) *ServicesListCall { + 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 *ServicesListCall) IfNoneMatch(entityTag string) *ServicesListCall { + 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 *ServicesListCall) Context(ctx context.Context) *ServicesListCall { + 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 *ServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ServicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbilling.services.list" call. +// Exactly one of *ListServicesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListServicesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, 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 := &ListServicesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all public cloud services.", + // "flatPath": "v1/services", + // "httpMethod": "GET", + // "id": "cloudbilling.services.list", + // "parameterOrder": [], + // "parameters": { + // "pageSize": { + // "description": "Requested page size. Defaults to 5000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results to return. This should be a\n`next_page_token` value returned from a previous `ListServices`\ncall. If unspecified, the first page of results is returned.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/services", + // "response": { + // "$ref": "ListServicesResponse" + // } + // } + +} + +// 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 *ServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) 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 "cloudbilling.services.skus.list": + +type ServicesSkusListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all publicly available SKUs for a given cloud service. +func (r *ServicesSkusService) List(parent string) *ServicesSkusListCall { + c := &ServicesSkusListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// CurrencyCode sets the optional parameter "currencyCode": The ISO 4217 +// currency code for the pricing info in the response proto. +// Will use the conversion rate as of start_time. +// If not specified USD will be used. +func (c *ServicesSkusListCall) CurrencyCode(currencyCode string) *ServicesSkusListCall { + c.urlParams_.Set("currencyCode", currencyCode) + return c +} + +// EndTime sets the optional parameter "endTime": Optional exclusive end +// time of the time range for which the pricing +// versions will be returned. Timestamps in the future are not +// allowed. +// Maximum allowable time range is 1 month (31 days). Time range as a +// whole +// is optional. If not specified, the latest pricing will be returned +// (up to +// 12 hours old at most). +func (c *ServicesSkusListCall) EndTime(endTime string) *ServicesSkusListCall { + c.urlParams_.Set("endTime", endTime) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Defaults to 5000. +func (c *ServicesSkusListCall) PageSize(pageSize int64) *ServicesSkusListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results to return. This should be +// a +// `next_page_token` value returned from a previous `ListSkus` +// call. If unspecified, the first page of results is returned. +func (c *ServicesSkusListCall) PageToken(pageToken string) *ServicesSkusListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// StartTime sets the optional parameter "startTime": Optional inclusive +// start time of the time range for which the pricing +// versions will be returned. Timestamps in the future are not +// allowed. +// Maximum allowable time range is 1 month (31 days). Time range as a +// whole +// is optional. If not specified, the latest pricing will be returned +// (up to +// 12 hours old at most). +func (c *ServicesSkusListCall) StartTime(startTime string) *ServicesSkusListCall { + c.urlParams_.Set("startTime", startTime) + 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 *ServicesSkusListCall) Fields(s ...googleapi.Field) *ServicesSkusListCall { + 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 *ServicesSkusListCall) IfNoneMatch(entityTag string) *ServicesSkusListCall { + 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 *ServicesSkusListCall) Context(ctx context.Context) *ServicesSkusListCall { + 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 *ServicesSkusListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ServicesSkusListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/skus") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbilling.services.skus.list" call. +// Exactly one of *ListSkusResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListSkusResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ServicesSkusListCall) Do(opts ...googleapi.CallOption) (*ListSkusResponse, 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 := &ListSkusResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all publicly available SKUs for a given cloud service.", + // "flatPath": "v1/services/{servicesId}/skus", + // "httpMethod": "GET", + // "id": "cloudbilling.services.skus.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "currencyCode": { + // "description": "The ISO 4217 currency code for the pricing info in the response proto.\nWill use the conversion rate as of start_time.\nOptional. If not specified USD will be used.", + // "location": "query", + // "type": "string" + // }, + // "endTime": { + // "description": "Optional exclusive end time of the time range for which the pricing\nversions will be returned. Timestamps in the future are not allowed.\nMaximum allowable time range is 1 month (31 days). Time range as a whole\nis optional. If not specified, the latest pricing will be returned (up to\n12 hours old at most).", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Defaults to 5000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results to return. This should be a\n`next_page_token` value returned from a previous `ListSkus`\ncall. If unspecified, the first page of results is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "The name of the service.\nExample: \"services/DA34-426B-A397\"", + // "location": "path", + // "pattern": "^services/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "startTime": { + // "description": "Optional inclusive start time of the time range for which the pricing\nversions will be returned. Timestamps in the future are not allowed.\nMaximum allowable time range is 1 month (31 days). Time range as a whole\nis optional. If not specified, the latest pricing will be returned (up to\n12 hours old at most).", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/skus", + // "response": { + // "$ref": "ListSkusResponse" + // } + // } + +} + +// 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 *ServicesSkusListCall) Pages(ctx context.Context, f func(*ListSkusResponse) 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/cloudbuild/v1/cloudbuild-api.json b/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-api.json index a28ac9b68..d6375803f 100644 --- a/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-api.json +++ b/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-api.json @@ -16,306 +16,9 @@ "title": "Google Cloud Container Builder API", "ownerName": "Google", "resources": { - "projects": { - "resources": { - "builds": { - "methods": { - "list": { - "httpMethod": "GET", - "response": { - "$ref": "ListBuildsResponse" - }, - "parameterOrder": [ - "projectId" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "Token to provide to skip to a particular spot in the list.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Number of results to return in the list." - }, - "projectId": { - "description": "ID of the project.", - "type": "string", - "required": true, - "location": "path" - }, - "filter": { - "type": "string", - "location": "query", - "description": "The raw filter text to constrain the results." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/builds", - "path": "v1/projects/{projectId}/builds", - "id": "cloudbuild.projects.builds.list", - "description": "Lists previously requested builds.\n\nPreviously requested builds may still be in-progress, or may have finished\nsuccessfully or unsuccessfully." - }, - "get": { - "path": "v1/projects/{projectId}/builds/{id}", - "id": "cloudbuild.projects.builds.get", - "description": "Returns information about a previously requested build.\n\nThe Build that is returned includes its status (e.g., success or failure,\nor in-progress), and timing information.", - "httpMethod": "GET", - "parameterOrder": [ - "projectId", - "id" - ], - "response": { - "$ref": "Build" - }, - "parameters": { - "projectId": { - "location": "path", - "description": "ID of the project.", - "type": "string", - "required": true - }, - "id": { - "location": "path", - "description": "ID of the build.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/builds/{id}" - }, - "create": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "ID of the project.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/builds", - "id": "cloudbuild.projects.builds.create", - "path": "v1/projects/{projectId}/builds", - "request": { - "$ref": "Build" - }, - "description": "Starts a build with the specified configuration.\n\nThe long-running Operation returned by this method will include the ID of\nthe build, which can be passed to GetBuild to determine its status (e.g.,\nsuccess or failure)." - }, - "cancel": { - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "id" - ], - "response": { - "$ref": "Build" - }, - "parameters": { - "projectId": { - "location": "path", - "description": "ID of the project.", - "type": "string", - "required": true - }, - "id": { - "location": "path", - "description": "ID of the build.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/builds/{id}:cancel", - "path": "v1/projects/{projectId}/builds/{id}:cancel", - "id": "cloudbuild.projects.builds.cancel", - "description": "Cancels a requested build in progress.", - "request": { - "$ref": "CancelBuildRequest" - } - } - } - }, - "triggers": { - "methods": { - "patch": { - "response": { - "$ref": "BuildTrigger" - }, - "parameterOrder": [ - "projectId", - "triggerId" - ], - "httpMethod": "PATCH", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "triggerId": { - "location": "path", - "description": "ID of the BuildTrigger to update.", - "type": "string", - "required": true - }, - "projectId": { - "description": "ID of the project that owns the trigger.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", - "id": "cloudbuild.projects.triggers.patch", - "path": "v1/projects/{projectId}/triggers/{triggerId}", - "request": { - "$ref": "BuildTrigger" - }, - "description": "Updates an BuildTrigger by its project ID and trigger ID.\n\nThis API is experimental." - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "ListBuildTriggersResponse" - }, - "parameters": { - "projectId": { - "description": "ID of the project for which to list BuildTriggers.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/triggers", - "path": "v1/projects/{projectId}/triggers", - "id": "cloudbuild.projects.triggers.list", - "description": "Lists existing BuildTrigger.\n\nThis API is experimental." - }, - "get": { - "description": "Gets information about a BuildTrigger.\n\nThis API is experimental.", - "response": { - "$ref": "BuildTrigger" - }, - "parameterOrder": [ - "projectId", - "triggerId" - ], - "httpMethod": "GET", - "parameters": { - "triggerId": { - "type": "string", - "required": true, - "location": "path", - "description": "ID of the BuildTrigger to get." - }, - "projectId": { - "location": "path", - "description": "ID of the project that owns the trigger.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", - "id": "cloudbuild.projects.triggers.get", - "path": "v1/projects/{projectId}/triggers/{triggerId}" - }, - "create": { - "flatPath": "v1/projects/{projectId}/triggers", - "id": "cloudbuild.projects.triggers.create", - "path": "v1/projects/{projectId}/triggers", - "request": { - "$ref": "BuildTrigger" - }, - "description": "Creates a new BuildTrigger.\n\nThis API is experimental.", - "response": { - "$ref": "BuildTrigger" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "type": "string", - "required": true, - "location": "path", - "description": "ID of the project for which to configure automatic builds." - } - } - }, - "delete": { - "description": "Deletes an BuildTrigger by its project ID and trigger ID.\n\nThis API is experimental.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "projectId", - "triggerId" - ], - "httpMethod": "DELETE", - "parameters": { - "projectId": { - "description": "ID of the project that owns the trigger.", - "type": "string", - "required": true, - "location": "path" - }, - "triggerId": { - "type": "string", - "required": true, - "location": "path", - "description": "ID of the BuildTrigger to delete." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", - "id": "cloudbuild.projects.triggers.delete", - "path": "v1/projects/{projectId}/triggers/{triggerId}" - } - } - } - } - }, "operations": { "methods": { "cancel": { - "path": "v1/{+name}:cancel", - "id": "cloudbuild.operations.cancel", - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", - "request": { - "$ref": "CancelOperationRequest" - }, "httpMethod": "POST", "parameterOrder": [ "name" @@ -325,17 +28,23 @@ }, "parameters": { "name": { + "pattern": "^operations/.+$", "location": "path", "description": "The name of the operation resource to be cancelled.", "type": "string", - "required": true, - "pattern": "^operations/.+$" + "required": true } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1/operations/{operationsId}:cancel" + "flatPath": "v1/operations/{operationsId}:cancel", + "path": "v1/{+name}:cancel", + "id": "cloudbuild.operations.cancel", + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + "request": { + "$ref": "CancelOperationRequest" + } }, "get": { "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", @@ -367,104 +76,341 @@ "response": { "$ref": "ListOperationsResponse" }, - "httpMethod": "GET", "parameterOrder": [ "name" ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], + "httpMethod": "GET", "parameters": { - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" - }, "pageToken": { "location": "query", "description": "The standard list page token.", "type": "string" }, "name": { + "description": "The name of the operation's parent resource.", "type": "string", "required": true, "pattern": "^operations$", - "location": "path", - "description": "The name of the operation's parent resource." + "location": "path" }, "pageSize": { - "location": "query", "format": "int32", "description": "The standard list page size.", - "type": "integer" + "type": "integer", + "location": "query" + }, + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1/operations", "id": "cloudbuild.operations.list", "path": "v1/{+name}" } } + }, + "projects": { + "resources": { + "builds": { + "methods": { + "create": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "ID of the project.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/builds", + "id": "cloudbuild.projects.builds.create", + "path": "v1/projects/{projectId}/builds", + "request": { + "$ref": "Build" + }, + "description": "Starts a build with the specified configuration.\n\nThe long-running Operation returned by this method will include the ID of\nthe build, which can be passed to GetBuild to determine its status (e.g.,\nsuccess or failure)." + }, + "cancel": { + "description": "Cancels a requested build in progress.", + "request": { + "$ref": "CancelBuildRequest" + }, + "response": { + "$ref": "Build" + }, + "parameterOrder": [ + "projectId", + "id" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "description": "ID of the project.", + "type": "string", + "required": true, + "location": "path" + }, + "id": { + "location": "path", + "description": "ID of the build.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/builds/{id}:cancel", + "id": "cloudbuild.projects.builds.cancel", + "path": "v1/projects/{projectId}/builds/{id}:cancel" + }, + "list": { + "response": { + "$ref": "ListBuildsResponse" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "filter": { + "description": "The raw filter text to constrain the results.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "Token to provide to skip to a particular spot in the list.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Number of results to return in the list.", + "type": "integer" + }, + "projectId": { + "description": "ID of the project.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/builds", + "id": "cloudbuild.projects.builds.list", + "path": "v1/projects/{projectId}/builds", + "description": "Lists previously requested builds.\n\nPreviously requested builds may still be in-progress, or may have finished\nsuccessfully or unsuccessfully." + }, + "get": { + "path": "v1/projects/{projectId}/builds/{id}", + "id": "cloudbuild.projects.builds.get", + "description": "Returns information about a previously requested build.\n\nThe Build that is returned includes its status (e.g., success or failure,\nor in-progress), and timing information.", + "httpMethod": "GET", + "response": { + "$ref": "Build" + }, + "parameterOrder": [ + "projectId", + "id" + ], + "parameters": { + "id": { + "location": "path", + "description": "ID of the build.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "ID of the project.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/builds/{id}" + } + } + }, + "triggers": { + "methods": { + "delete": { + "description": "Deletes an BuildTrigger by its project ID and trigger ID.\n\nThis API is experimental.", + "httpMethod": "DELETE", + "parameterOrder": [ + "projectId", + "triggerId" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "triggerId": { + "description": "ID of the BuildTrigger to delete.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "location": "path", + "description": "ID of the project that owns the trigger.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", + "path": "v1/projects/{projectId}/triggers/{triggerId}", + "id": "cloudbuild.projects.triggers.delete" + }, + "patch": { + "response": { + "$ref": "BuildTrigger" + }, + "parameterOrder": [ + "projectId", + "triggerId" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "triggerId": { + "description": "ID of the BuildTrigger to update.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "description": "ID of the project that owns the trigger.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", + "id": "cloudbuild.projects.triggers.patch", + "path": "v1/projects/{projectId}/triggers/{triggerId}", + "request": { + "$ref": "BuildTrigger" + }, + "description": "Updates an BuildTrigger by its project ID and trigger ID.\n\nThis API is experimental." + }, + "list": { + "id": "cloudbuild.projects.triggers.list", + "path": "v1/projects/{projectId}/triggers", + "description": "Lists existing BuildTrigger.\n\nThis API is experimental.", + "response": { + "$ref": "ListBuildTriggersResponse" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "ID of the project for which to list BuildTriggers.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/triggers" + }, + "get": { + "description": "Gets information about a BuildTrigger.\n\nThis API is experimental.", + "httpMethod": "GET", + "response": { + "$ref": "BuildTrigger" + }, + "parameterOrder": [ + "projectId", + "triggerId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "triggerId": { + "description": "ID of the BuildTrigger to get.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "description": "ID of the project that owns the trigger.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", + "path": "v1/projects/{projectId}/triggers/{triggerId}", + "id": "cloudbuild.projects.triggers.get" + }, + "create": { + "path": "v1/projects/{projectId}/triggers", + "id": "cloudbuild.projects.triggers.create", + "description": "Creates a new BuildTrigger.\n\nThis API is experimental.", + "request": { + "$ref": "BuildTrigger" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "BuildTrigger" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "ID of the project for which to configure automatic builds.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/triggers" + } + } + } + } } }, "parameters": { - "fields": { - "type": "string", - "location": "query", - "description": "Selector specifying which fields to include in a partial response." - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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", - "description": "Data format for response.", - "default": "json" - }, - "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.", - "type": "string", - "location": "query" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, "quotaUser": { - "location": "query", "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.", - "type": "string" + "type": "string", + "location": "query" }, "pp": { "location": "query", @@ -473,9 +419,9 @@ "type": "boolean" }, "oauth_token": { - "type": "string", "location": "query", - "description": "OAuth 2.0 token for the current user." + "description": "OAuth 2.0 token for the current user.", + "type": "string" }, "bearer_token": { "location": "query", @@ -483,34 +429,308 @@ "type": "string" }, "upload_protocol": { + "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", "location": "query" }, - "prettyPrint": { - "default": "true", - "type": "boolean", + "fields": { "location": "query", - "description": "Returns response with indentations and line breaks." + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "alt": { + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "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.", + "type": "string", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" } }, "version": "v1", "baseUrl": "https://cloudbuild.googleapis.com/", "kind": "discovery#restDescription", - "description": "Builds container images in the cloud.", "servicePath": "", + "description": "Builds container images in the cloud.", "basePath": "", - "revision": "20170803", + "revision": "20170912", "documentationLink": "https://cloud.google.com/container-builder/docs/", "id": "cloudbuild:v1", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { - "CancelBuildRequest": { + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "type": "object", + "properties": {}, + "id": "Empty" + }, + "BuildTrigger": { + "properties": { + "createTime": { + "format": "google-datetime", + "description": "Time when the trigger was created.\n\n@OutputOnly", + "type": "string" + }, + "disabled": { + "description": "If true, the trigger will never result in a build.", + "type": "boolean" + }, + "filename": { + "description": "Path, from the source root, to a file whose contents is used for the\ntemplate.", + "type": "string" + }, + "triggerTemplate": { + "description": "Template describing the types of source changes to trigger a build.\n\nBranch and tag names in trigger templates are interpreted as regular\nexpressions. Any branch or tag change that matches that regular expression\nwill trigger a build.", + "$ref": "RepoSource" + }, + "id": { + "description": "Unique identifier of the trigger.\n\n@OutputOnly", + "type": "string" + }, + "build": { + "$ref": "Build", + "description": "Contents of the build template." + }, + "substitutions": { + "additionalProperties": { + "type": "string" + }, + "description": "Substitutions data for Build resource.", + "type": "object" + }, + "description": { + "description": "Human-readable description of this trigger.", + "type": "string" + } + }, + "id": "BuildTrigger", + "description": "Configuration for an automated build in response to source repository\nchanges.", + "type": "object" + }, + "Build": { + "properties": { + "options": { + "$ref": "BuildOptions", + "description": "Special options for this build." + }, + "source": { + "description": "Describes where to find the source files to build.", + "$ref": "Source" + }, + "statusDetail": { + "description": "Customer-readable message about the current status.\n@OutputOnly", + "type": "string" + }, + "status": { + "enum": [ + "STATUS_UNKNOWN", + "QUEUED", + "WORKING", + "SUCCESS", + "FAILURE", + "INTERNAL_ERROR", + "TIMEOUT", + "CANCELLED" + ], + "description": "Status of the build.\n@OutputOnly", + "type": "string", + "enumDescriptions": [ + "Status of the build is unknown.", + "Build is queued; work has not yet begun.", + "Build is being executed.", + "Build finished successfully.", + "Build failed to complete successfully.", + "Build failed due to an internal cause.", + "Build took longer than was allowed.", + "Build was canceled by a user." + ] + }, + "timeout": { + "format": "google-duration", + "description": "Amount of time that this build should be allowed to run, to second\ngranularity. If this amount of time elapses, work on the build will cease\nand the build status will be TIMEOUT.\n\nDefault time is ten minutes.", + "type": "string" + }, + "secrets": { + "description": "Secrets to decrypt using Cloud KMS.", + "items": { + "$ref": "Secret" + }, + "type": "array" + }, + "logsBucket": { + "description": "Google Cloud Storage bucket where logs should be written (see\n[Bucket Name\nRequirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).\nLogs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.", + "type": "string" + }, + "results": { + "description": "Results of the build.\n@OutputOnly", + "$ref": "Results" + }, + "steps": { + "description": "Describes the operations to be performed on the workspace.", + "items": { + "$ref": "BuildStep" + }, + "type": "array" + }, + "buildTriggerId": { + "description": "The ID of the BuildTrigger that triggered this build, if it was\ntriggered automatically.\n@OutputOnly", + "type": "string" + }, + "id": { + "description": "Unique identifier of the build.\n@OutputOnly", + "type": "string" + }, + "tags": { + "description": "Tags for annotation of a Build. These are not docker tags.", + "items": { + "type": "string" + }, + "type": "array" + }, + "substitutions": { + "additionalProperties": { + "type": "string" + }, + "description": "Substitutions data for Build resource.", + "type": "object" + }, + "startTime": { + "format": "google-datetime", + "description": "Time at which execution of the build was started.\n@OutputOnly", + "type": "string" + }, + "sourceProvenance": { + "$ref": "SourceProvenance", + "description": "A permanent fixed identifier for source.\n@OutputOnly" + }, + "createTime": { + "format": "google-datetime", + "description": "Time at which the request to create the build was received.\n@OutputOnly", + "type": "string" + }, + "images": { + "description": "A list of images to be pushed upon the successful completion of all build\nsteps.\n\nThe images will be pushed using the builder service account's credentials.\n\nThe digests of the pushed images will be stored in the Build resource's\nresults field.\n\nIf any of the images fail to be pushed, the build is marked FAILURE.", + "items": { + "type": "string" + }, + "type": "array" + }, + "projectId": { + "description": "ID of the project.\n@OutputOnly.", + "type": "string" + }, + "logUrl": { + "description": "URL to logs for this build in Google Cloud Logging.\n@OutputOnly", + "type": "string" + }, + "finishTime": { + "format": "google-datetime", + "description": "Time at which execution of the build was finished.\n\nThe difference between finish_time and start_time is the duration of the\nbuild's execution.\n@OutputOnly", + "type": "string" + } + }, + "id": "Build", + "description": "A build resource in the Container Builder API.\n\nAt a high level, a Build describes where to find source code, how to build\nit (for example, the builder image to run on the source), and what tag to\napply to the built image when it is pushed to Google Container Registry.\n\nFields can include the following variables which will be expanded when the\nbuild is created:\n\n- $PROJECT_ID: the project ID of the build.\n- $BUILD_ID: the autogenerated ID of the build.\n- $REPO_NAME: the source repository name specified by RepoSource.\n- $BRANCH_NAME: the branch name specified by RepoSource.\n- $TAG_NAME: the tag name specified by RepoSource.\n- $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or\n resolved from the specified branch or tag.", + "type": "object" + }, + "CancelBuildRequest": { "properties": {}, "id": "CancelBuildRequest", - "description": "Request to cancel an ongoing build." + "description": "Request to cancel an ongoing build.", + "type": "object" + }, + "ListBuildsResponse": { + "properties": { + "nextPageToken": { + "description": "Token to receive the next page of results.", + "type": "string" + }, + "builds": { + "description": "Builds will be sorted by create_time, descending.", + "items": { + "$ref": "Build" + }, + "type": "array" + } + }, + "id": "ListBuildsResponse", + "description": "Response including listed builds.", + "type": "object" }, "Volume": { "description": "Volume describes a Docker container volume which is mounted into build steps\nin order to persist files across build step execution.", @@ -527,28 +747,7 @@ }, "id": "Volume" }, - "ListBuildsResponse": { - "description": "Response including listed builds.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Token to receive the next page of results.", - "type": "string" - }, - "builds": { - "description": "Builds will be sorted by create_time, descending.", - "items": { - "$ref": "Build" - }, - "type": "array" - } - }, - "id": "ListBuildsResponse" - }, "ListOperationsResponse": { - "id": "ListOperationsResponse", - "description": "The response message for Operations.ListOperations.", - "type": "object", "properties": { "nextPageToken": { "description": "The standard List next-page token.", @@ -561,26 +760,27 @@ }, "type": "array" } - } + }, + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations.", + "type": "object" }, "Source": { - "description": "Source describes the location of the source in a supported storage\nservice.", - "type": "object", "properties": { "storageSource": { "$ref": "StorageSource", - "description": "If provided, get the source from this location in in Google Cloud\nStorage." + "description": "If provided, get the source from this location in Google Cloud Storage." }, "repoSource": { "description": "If provided, get source from this location in a Cloud Repo.", "$ref": "RepoSource" } }, - "id": "Source" + "id": "Source", + "description": "Source describes the location of the source in a supported storage\nservice.", + "type": "object" }, "BuildOptions": { - "description": "Optional arguments to enable specific features of builds.", - "type": "object", "properties": { "substitutionOption": { "enum": [ @@ -609,11 +809,11 @@ "sourceProvenanceHash": { "description": "Requested hash for SourceProvenance.", "items": { - "type": "string", "enum": [ "NONE", "SHA256" - ] + ], + "type": "string" }, "type": "array", "enumDescriptions": [ @@ -622,24 +822,26 @@ ] } }, - "id": "BuildOptions" + "id": "BuildOptions", + "description": "Optional arguments to enable specific features of builds.", + "type": "object" }, "StorageSource": { "description": "StorageSource describes the location of the source in an archive file in\nGoogle Cloud Storage.", "type": "object", "properties": { + "bucket": { + "description": "Google Cloud Storage bucket containing source (see\n[Bucket Name\nRequirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", + "type": "string" + }, "object": { - "type": "string", - "description": "Google Cloud Storage object containing source.\n\nThis object must be a gzipped archive file (.tar.gz) containing source to\nbuild." + "description": "Google Cloud Storage object containing source.\n\nThis object must be a gzipped archive file (.tar.gz) containing source to\nbuild.", + "type": "string" }, "generation": { "format": "int64", "description": "Google Cloud Storage generation for the object. If the generation is\nomitted, the latest generation will be used.", "type": "string" - }, - "bucket": { - "description": "Google Cloud Storage bucket containing source (see\n[Bucket Name\nRequirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", - "type": "string" } }, "id": "StorageSource" @@ -654,11 +856,11 @@ "type": "array" }, "buildStepImages": { + "description": "List of build step digests, in order corresponding to build step indices.", "items": { "type": "string" }, - "type": "array", - "description": "List of build step digests, in order corresponding to build step indices." + "type": "array" } }, "id": "Results", @@ -666,18 +868,25 @@ "type": "object" }, "BuildOperationMetadata": { - "id": "BuildOperationMetadata", - "description": "Metadata for build operations.", - "type": "object", "properties": { "build": { "$ref": "Build", "description": "The build that the operation is tracking." } - } + }, + "id": "BuildOperationMetadata", + "description": "Metadata for build operations.", + "type": "object" }, "SourceProvenance": { "properties": { + "fileHashes": { + "additionalProperties": { + "$ref": "FileHashes" + }, + "description": "Hash(es) of the build source, which can be used to verify that the original\nsource integrity was maintained in the build. Note that FileHashes will\nonly be populated if BuildOptions has requested a SourceProvenanceHash.\n\nThe keys to this map are file paths used as build source and the values\ncontain the hash values for those files.\n\nIf the build source came in a single package such as a gzipped tarfile\n(.tar.gz), the FileHash will be for the single path to that file.\n@OutputOnly", + "type": "object" + }, "resolvedRepoSource": { "$ref": "RepoSource", "description": "A copy of the build's source.repo_source, if exists, with any\nrevisions resolved." @@ -685,13 +894,6 @@ "resolvedStorageSource": { "description": "A copy of the build's source.storage_source, if exists, with any\ngenerations resolved.", "$ref": "StorageSource" - }, - "fileHashes": { - "additionalProperties": { - "$ref": "FileHashes" - }, - "description": "Hash(es) of the build source, which can be used to verify that the original\nsource integrity was maintained in the build. Note that FileHashes will\nonly be populated if BuildOptions has requested a SourceProvenanceHash.\n\nThe keys to this map are file paths used as build source and the values\ncontain the hash values for those files.\n\nIf the build source came in a single package such as a gzipped tarfile\n(.tar.gz), the FileHash will be for the single path to that file.\n@OutputOnly", - "type": "object" } }, "id": "SourceProvenance", @@ -699,29 +901,21 @@ "type": "object" }, "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", "type": "object", "properties": {}, - "id": "CancelOperationRequest", - "description": "The request message for Operations.CancelOperation." - }, - "ListBuildTriggersResponse": { - "description": "Response containing existing BuildTriggers.", - "type": "object", - "properties": { - "triggers": { - "items": { - "$ref": "BuildTrigger" - }, - "type": "array", - "description": "BuildTriggers for the project, sorted by create_time descending." - } - }, - "id": "ListBuildTriggersResponse" + "id": "CancelOperationRequest" }, "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", "properties": { + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object" + }, "name": { "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", "type": "string" @@ -739,23 +933,29 @@ "type": "object" }, "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", "type": "boolean" - }, - "response": { - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } } }, - "id": "Operation" + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object" + }, + "ListBuildTriggersResponse": { + "description": "Response containing existing BuildTriggers.", + "type": "object", + "properties": { + "triggers": { + "description": "BuildTriggers for the project, sorted by create_time descending.", + "items": { + "$ref": "BuildTrigger" + }, + "type": "array" + } + }, + "id": "ListBuildTriggersResponse" }, "BuiltImage": { - "description": "BuiltImage describes an image built by the pipeline.", - "type": "object", "properties": { "name": { "description": "Name used to push the container image to Google Container Registry, as\npresented to `docker push`.", @@ -766,69 +966,11 @@ "type": "string" } }, - "id": "BuiltImage" - }, - "BuildStep": { - "description": "BuildStep describes a step to perform in the build pipeline.", - "type": "object", - "properties": { - "entrypoint": { - "description": "Optional entrypoint to be used instead of the build step image's default\nIf unset, the image's default will be used.", - "type": "string" - }, - "secretEnv": { - "description": "A list of environment variables which are encrypted using a Cloud KMS\ncrypto key. These values must be specified in the build's secrets.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string", - "description": "Optional unique identifier for this build step, used in wait_for to\nreference this build step as a dependency." - }, - "volumes": { - "items": { - "$ref": "Volume" - }, - "type": "array", - "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." - }, - "dir": { - "description": "Working directory (relative to project source root) to use when running\nthis operation's container.", - "type": "string" - }, - "waitFor": { - "items": { - "type": "string" - }, - "type": "array", - "description": "The ID(s) of the step(s) that this build step depends on.\nThis build step will not start until all the build steps in wait_for\nhave completed successfully. If wait_for is empty, this build step will\nstart when all previous build steps in the Build.Steps list have completed\nsuccessfully." - }, - "env": { - "items": { - "type": "string" - }, - "type": "array", - "description": "A list of environment variable definitions to be used when running a step.\n\nThe elements are of the form \"KEY=VALUE\" for the environment variable \"KEY\"\nbeing given the value \"VALUE\"." - }, - "args": { - "description": "A list of arguments that will be presented to the step when it is started.\n\nIf the image used to run the step's container has an entrypoint, these args\nwill be used as arguments to that entrypoint. If the image does not define\nan entrypoint, the first element in args will be used as the entrypoint,\nand the remainder will be used as arguments.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "The name of the container image that will run this particular build step.\n\nIf the image is already 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" - } - }, - "id": "BuildStep" + "id": "BuiltImage", + "description": "BuiltImage describes an image built by the pipeline.", + "type": "object" }, "Hash": { - "description": "Container message for hash values.", - "type": "object", "properties": { "type": { "enum": [ @@ -848,7 +990,9 @@ "type": "string" } }, - "id": "Hash" + "id": "Hash", + "description": "Container message for hash values.", + "type": "object" }, "RepoSource": { "description": "RepoSource describes the location of the source in a Google Cloud Source\nRepository.", @@ -859,12 +1003,12 @@ "type": "string" }, "tagName": { - "type": "string", - "description": "Name of the tag to build." + "description": "Name of the tag to build.", + "type": "string" }, "branchName": { - "type": "string", - "description": "Name of the branch to build." + "description": "Name of the branch to build.", + "type": "string" }, "repoName": { "description": "Name of the repo. If omitted, the name \"default\" is assumed.", @@ -877,9 +1021,65 @@ }, "id": "RepoSource" }, - "FileHashes": { - "description": "Container message for hashes of byte content of files, used in\nSourceProvenance messages to verify integrity of source input to the build.", + "BuildStep": { + "description": "BuildStep describes a step to perform in the build pipeline.", "type": "object", + "properties": { + "entrypoint": { + "description": "Optional entrypoint to be used instead of the build step image's default\nIf unset, the image's default will be used.", + "type": "string" + }, + "id": { + "description": "Optional unique identifier for this build step, used in wait_for to\nreference this build step as a dependency.", + "type": "string" + }, + "secretEnv": { + "description": "A list of environment variables which are encrypted using a Cloud KMS\ncrypto key. These values must be specified in the build's secrets.", + "items": { + "type": "string" + }, + "type": "array" + }, + "volumes": { + "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" + }, + "type": "array" + }, + "dir": { + "description": "Working directory (relative to project source root) to use when running\nthis operation's container.", + "type": "string" + }, + "env": { + "description": "A list of environment variable definitions to be used when running a step.\n\nThe elements are of the form \"KEY=VALUE\" for the environment variable \"KEY\"\nbeing given the value \"VALUE\".", + "items": { + "type": "string" + }, + "type": "array" + }, + "waitFor": { + "description": "The ID(s) of the step(s) that this build step depends on.\nThis build step will not start until all the build steps in wait_for\nhave completed successfully. If wait_for is empty, this build step will\nstart when all previous build steps in the Build.Steps list have completed\nsuccessfully.", + "items": { + "type": "string" + }, + "type": "array" + }, + "args": { + "description": "A list of arguments that will be presented to the step when it is started.\n\nIf the image used to run the step's container has an entrypoint, these args\nwill be used as arguments to that entrypoint. If the image does not define\nan entrypoint, the first element in args will be used as the entrypoint,\nand the remainder will be used as arguments.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "The name of the container image that will run this particular build step.\n\nIf the image is already 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" + } + }, + "id": "BuildStep" + }, + "FileHashes": { "properties": { "fileHash": { "description": "Collection of file hashes.", @@ -889,11 +1089,11 @@ "type": "array" } }, - "id": "FileHashes" + "id": "FileHashes", + "description": "Container message for hashes of byte content of files, used in\nSourceProvenance messages to verify integrity of source input to the build.", + "type": "object" }, "Secret": { - "description": "Secret pairs a set of secret environment variables containing encrypted\nvalues with the Cloud KMS key to use to decrypt the value.", - "type": "object", "properties": { "secretEnv": { "additionalProperties": { @@ -908,214 +1108,14 @@ "type": "string" } }, - "id": "Secret" - }, - "Status": { - "type": "object", - "properties": { - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - } - }, - "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons." - }, - "Empty": { - "id": "Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {} - }, - "BuildTrigger": { - "description": "Configuration for an automated build in response to source repository\nchanges.", - "type": "object", - "properties": { - "substitutions": { - "description": "Substitutions data for Build resource.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "description": { - "description": "Human-readable description of this trigger.", - "type": "string" - }, - "createTime": { - "type": "string", - "format": "google-datetime", - "description": "Time when the trigger was created.\n\n@OutputOnly" - }, - "disabled": { - "description": "If true, the trigger will never result in a build.", - "type": "boolean" - }, - "triggerTemplate": { - "description": "Template describing the types of source changes to trigger a build.\n\nBranch and tag names in trigger templates are interpreted as regular\nexpressions. Any branch or tag change that matches that regular expression\nwill trigger a build.", - "$ref": "RepoSource" - }, - "filename": { - "description": "Path, from the source root, to a file whose contents is used for the\ntemplate.", - "type": "string" - }, - "id": { - "description": "Unique identifier of the trigger.\n\n@OutputOnly", - "type": "string" - }, - "build": { - "description": "Contents of the build template.", - "$ref": "Build" - } - }, - "id": "BuildTrigger" - }, - "Build": { - "id": "Build", - "description": "A build resource in the Container Builder API.\n\nAt a high level, a Build describes where to find source code, how to build\nit (for example, the builder image to run on the source), and what tag to\napply to the built image when it is pushed to Google Container Registry.\n\nFields can include the following variables which will be expanded when the\nbuild is created:\n\n- $PROJECT_ID: the project ID of the build.\n- $BUILD_ID: the autogenerated ID of the build.\n- $REPO_NAME: the source repository name specified by RepoSource.\n- $BRANCH_NAME: the branch name specified by RepoSource.\n- $TAG_NAME: the tag name specified by RepoSource.\n- $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or\n resolved from the specified branch or tag.", - "type": "object", - "properties": { - "results": { - "$ref": "Results", - "description": "Results of the build.\n@OutputOnly" - }, - "logsBucket": { - "description": "Google Cloud Storage bucket where logs should be written (see\n[Bucket Name\nRequirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).\nLogs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.", - "type": "string" - }, - "steps": { - "description": "Describes the operations to be performed on the workspace.", - "items": { - "$ref": "BuildStep" - }, - "type": "array" - }, - "buildTriggerId": { - "description": "The ID of the BuildTrigger that triggered this build, if it was\ntriggered automatically.\n@OutputOnly", - "type": "string" - }, - "id": { - "description": "Unique identifier of the build.\n@OutputOnly", - "type": "string" - }, - "tags": { - "description": "Tags for annotation of a Build. These are not docker tags.", - "items": { - "type": "string" - }, - "type": "array" - }, - "substitutions": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Substitutions data for Build resource." - }, - "startTime": { - "format": "google-datetime", - "description": "Time at which execution of the build was started.\n@OutputOnly", - "type": "string" - }, - "sourceProvenance": { - "$ref": "SourceProvenance", - "description": "A permanent fixed identifier for source.\n@OutputOnly" - }, - "createTime": { - "type": "string", - "format": "google-datetime", - "description": "Time at which the request to create the build was received.\n@OutputOnly" - }, - "images": { - "description": "A list of images to be pushed upon the successful completion of all build\nsteps.\n\nThe images will be pushed using the builder service account's credentials.\n\nThe digests of the pushed images will be stored in the Build resource's\nresults field.\n\nIf any of the images fail to be pushed, the build is marked FAILURE.", - "items": { - "type": "string" - }, - "type": "array" - }, - "projectId": { - "type": "string", - "description": "ID of the project.\n@OutputOnly." - }, - "finishTime": { - "format": "google-datetime", - "description": "Time at which execution of the build was finished.\n\nThe difference between finish_time and start_time is the duration of the\nbuild's execution.\n@OutputOnly", - "type": "string" - }, - "logUrl": { - "description": "URL to logs for this build in Google Cloud Logging.\n@OutputOnly", - "type": "string" - }, - "source": { - "description": "Describes where to find the source files to build.", - "$ref": "Source" - }, - "options": { - "description": "Special options for this build.", - "$ref": "BuildOptions" - }, - "statusDetail": { - "type": "string", - "description": "Customer-readable message about the current status.\n@OutputOnly" - }, - "status": { - "description": "Status of the build.\n@OutputOnly", - "type": "string", - "enumDescriptions": [ - "Status of the build is unknown.", - "Build is queued; work has not yet begun.", - "Build is being executed.", - "Build finished successfully.", - "Build failed to complete successfully.", - "Build failed due to an internal cause.", - "Build took longer than was allowed.", - "Build was canceled by a user." - ], - "enum": [ - "STATUS_UNKNOWN", - "QUEUED", - "WORKING", - "SUCCESS", - "FAILURE", - "INTERNAL_ERROR", - "TIMEOUT", - "CANCELLED" - ] - }, - "timeout": { - "format": "google-duration", - "description": "Amount of time that this build should be allowed to run, to second\ngranularity. If this amount of time elapses, work on the build will cease\nand the build status will be TIMEOUT.\n\nDefault time is ten minutes.", - "type": "string" - }, - "secrets": { - "description": "Secrets to decrypt using Cloud KMS.", - "items": { - "$ref": "Secret" - }, - "type": "array" - } - } + "id": "Secret", + "description": "Secret pairs a set of secret environment variables containing encrypted\nvalues with the Cloud KMS key to use to decrypt the value.", + "type": "object" } }, "protocol": "rest", "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" } } 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 3a44616da..ee237d00f 100644 --- a/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-gen.go +++ b/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-gen.go @@ -792,8 +792,8 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { type Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` @@ -990,9 +990,8 @@ type Source struct { // Repo. RepoSource *RepoSource `json:"repoSource,omitempty"` - // StorageSource: If provided, get the source from this location in in - // Google Cloud - // Storage. + // StorageSource: If provided, get the source from this location in + // Google Cloud Storage. StorageSource *StorageSource `json:"storageSource,omitempty"` // ForceSendFields is a list of field names (e.g. "RepoSource") to diff --git a/vendor/google.golang.org/api/clouddebugger/v2/clouddebugger-api.json b/vendor/google.golang.org/api/clouddebugger/v2/clouddebugger-api.json index ab9cc8279..5946b57a7 100644 --- a/vendor/google.golang.org/api/clouddebugger/v2/clouddebugger-api.json +++ b/vendor/google.golang.org/api/clouddebugger/v2/clouddebugger-api.json @@ -1,16 +1,709 @@ { + "resources": { + "debugger": { + "resources": { + "debuggees": { + "methods": { + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListDebuggeesResponse" + }, + "parameterOrder": [], + "parameters": { + "includeInactive": { + "description": "When set to `true`, the result includes all debuggees. Otherwise, the\nresult includes only debuggees that are active.", + "type": "boolean", + "location": "query" + }, + "project": { + "location": "query", + "description": "Project number of a Google Cloud project whose debuggees to list.", + "type": "string" + }, + "clientVersion": { + "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "flatPath": "v2/debugger/debuggees", + "path": "v2/debugger/debuggees", + "id": "clouddebugger.debugger.debuggees.list", + "description": "Lists all the debuggees that the user has access to." + } + }, + "resources": { + "breakpoints": { + "methods": { + "delete": { + "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", + "id": "clouddebugger.debugger.debuggees.breakpoints.delete", + "description": "Deletes the breakpoint from the debuggee.", + "httpMethod": "DELETE", + "parameterOrder": [ + "debuggeeId", + "breakpointId" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "breakpointId": { + "description": "ID of the breakpoint to delete.", + "type": "string", + "required": true, + "location": "path" + }, + "debuggeeId": { + "description": "ID of the debuggee whose breakpoint to delete.", + "type": "string", + "required": true, + "location": "path" + }, + "clientVersion": { + "location": "query", + "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}" + }, + "set": { + "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/set", + "id": "clouddebugger.debugger.debuggees.breakpoints.set", + "description": "Sets the breakpoint to the debuggee.", + "request": { + "$ref": "Breakpoint" + }, + "httpMethod": "POST", + "parameterOrder": [ + "debuggeeId" + ], + "response": { + "$ref": "SetBreakpointResponse" + }, + "parameters": { + "clientVersion": { + "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", + "type": "string", + "location": "query" + }, + "debuggeeId": { + "description": "ID of the debuggee where the breakpoint is to be set.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/set" + }, + "list": { + "description": "Lists all breakpoints for the debuggee.", + "response": { + "$ref": "ListBreakpointsResponse" + }, + "parameterOrder": [ + "debuggeeId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "parameters": { + "stripResults": { + "location": "query", + "description": "This field is deprecated. The following fields are always stripped out of\nthe result: `stack_frames`, `evaluated_expressions` and `variable_table`.", + "type": "boolean" + }, + "debuggeeId": { + "description": "ID of the debuggee whose breakpoints to list.", + "type": "string", + "required": true, + "location": "path" + }, + "waitToken": { + "description": "A wait token that, if specified, blocks the call until the breakpoints\nlist has changed, or a server selected timeout has expired. The value\nshould be set from the last response. The error code\n`google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which\nshould be called again with the same `wait_token`.", + "type": "string", + "location": "query" + }, + "clientVersion": { + "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", + "type": "string", + "location": "query" + }, + "action.value": { + "location": "query", + "enum": [ + "CAPTURE", + "LOG" + ], + "description": "Only breakpoints with the specified action will pass the filter.", + "type": "string" + }, + "includeInactive": { + "location": "query", + "description": "When set to `true`, the response includes active and inactive\nbreakpoints. Otherwise, it includes only active breakpoints.", + "type": "boolean" + }, + "includeAllUsers": { + "location": "query", + "description": "When set to `true`, the response includes the list of breakpoints set by\nany user. Otherwise, it includes only breakpoints set by the caller.", + "type": "boolean" + } + }, + "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints", + "id": "clouddebugger.debugger.debuggees.breakpoints.list", + "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints" + }, + "get": { + "id": "clouddebugger.debugger.debuggees.breakpoints.get", + "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", + "description": "Gets breakpoint information.", + "response": { + "$ref": "GetBreakpointResponse" + }, + "parameterOrder": [ + "debuggeeId", + "breakpointId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "parameters": { + "clientVersion": { + "location": "query", + "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", + "type": "string" + }, + "breakpointId": { + "description": "ID of the breakpoint to get.", + "type": "string", + "required": true, + "location": "path" + }, + "debuggeeId": { + "location": "path", + "description": "ID of the debuggee whose breakpoint to get.", + "type": "string", + "required": true + } + }, + "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}" + } + } + } + } + } + } + }, + "controller": { + "resources": { + "debuggees": { + "methods": { + "register": { + "response": { + "$ref": "RegisterDebuggeeResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "parameters": {}, + "flatPath": "v2/controller/debuggees/register", + "id": "clouddebugger.controller.debuggees.register", + "path": "v2/controller/debuggees/register", + "request": { + "$ref": "RegisterDebuggeeRequest" + }, + "description": "Registers the debuggee with the controller service.\n\nAll agents attached to the same application must call this method with\nexactly the same request content to get back the same stable `debuggee_id`.\nAgents should call this method again whenever `google.rpc.Code.NOT_FOUND`\nis returned from any controller method.\n\nThis protocol allows the controller service to disable debuggees, recover\nfrom data loss, or change the `debuggee_id` format. Agents must handle\n`debuggee_id` value changing upon re-registration." + } + }, + "resources": { + "breakpoints": { + "methods": { + "list": { + "description": "Returns the list of all active breakpoints for the debuggee.\n\nThe breakpoint specification (`location`, `condition`, and `expressions`\nfields) is semantically immutable, although the field values may\nchange. For example, an agent may update the location line number\nto reflect the actual line where the breakpoint was set, but this\ndoesn't change the breakpoint semantics.\n\nThis means that an agent does not need to check if a breakpoint has changed\nwhen it encounters the same breakpoint on a successive call.\nMoreover, an agent should remember the breakpoints that are completed\nuntil the controller removes them from the active list to avoid\nsetting those breakpoints again.", + "response": { + "$ref": "ListActiveBreakpointsResponse" + }, + "parameterOrder": [ + "debuggeeId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "parameters": { + "successOnTimeout": { + "description": "If set to `true` (recommended), returns `google.rpc.Code.OK` status and\nsets the `wait_expired` response field to `true` when the server-selected\ntimeout has expired.\n\nIf set to `false` (deprecated), returns `google.rpc.Code.ABORTED` status\nwhen the server-selected timeout has expired.", + "type": "boolean", + "location": "query" + }, + "debuggeeId": { + "description": "Identifies the debuggee.", + "type": "string", + "required": true, + "location": "path" + }, + "waitToken": { + "description": "A token that, if specified, blocks the method call until the list\nof active breakpoints has changed, or a server-selected timeout has\nexpired. The value should be set from the `next_wait_token` field in\nthe last response. The initial value should be set to `\"init\"`.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v2/controller/debuggees/{debuggeeId}/breakpoints", + "id": "clouddebugger.controller.debuggees.breakpoints.list", + "path": "v2/controller/debuggees/{debuggeeId}/breakpoints" + }, + "update": { + "response": { + "$ref": "UpdateActiveBreakpointResponse" + }, + "parameterOrder": [ + "debuggeeId", + "id" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "parameters": { + "id": { + "location": "path", + "description": "Breakpoint identifier, unique in the scope of the debuggee.", + "type": "string", + "required": true + }, + "debuggeeId": { + "location": "path", + "description": "Identifies the debuggee being debugged.", + "type": "string", + "required": true + } + }, + "flatPath": "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}", + "id": "clouddebugger.controller.debuggees.breakpoints.update", + "path": "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}", + "request": { + "$ref": "UpdateActiveBreakpointRequest" + }, + "description": "Updates the breakpoint state or mutable fields.\nThe entire Breakpoint message must be sent back to the controller service.\n\nUpdates to active breakpoint fields are only allowed if the new value\ndoes not change the breakpoint specification. Updates to the `location`,\n`condition` and `expressions` fields should not alter the breakpoint\nsemantics. These may only make changes such as canonicalizing a value\nor snapping the location to the correct line of code." + } + } + } + } + } + } + } + }, + "parameters": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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", + "description": "Data format for response.", + "default": "json" + }, + "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.", + "type": "string", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + } + }, "version": "v2", "baseUrl": "https://clouddebugger.googleapis.com/", "servicePath": "", "description": "Examines the call stack and variables of a running application without stopping or slowing it down.\n", "kind": "discovery#restDescription", "basePath": "", - "revision": "20170710", - "documentationLink": "http://cloud.google.com/debugger", "id": "clouddebugger:v2", + "revision": "20170817", + "documentationLink": "http://cloud.google.com/debugger", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "CloudWorkspaceSourceContext": { + "description": "A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot.", + "type": "object", + "properties": { + "snapshotId": { + "description": "The ID of the snapshot.\nAn empty snapshot_id refers to the most recent snapshot.", + "type": "string" + }, + "workspaceId": { + "description": "The ID of the workspace.", + "$ref": "CloudWorkspaceId" + } + }, + "id": "CloudWorkspaceSourceContext" + }, + "GerritSourceContext": { + "properties": { + "revisionId": { + "description": "A revision (commit) ID.", + "type": "string" + }, + "hostUri": { + "description": "The URI of a running Gerrit instance.", + "type": "string" + }, + "aliasName": { + "description": "The name of an alias (branch, tag, etc.).", + "type": "string" + }, + "aliasContext": { + "description": "An alias, which may be a branch or tag.", + "$ref": "AliasContext" + }, + "gerritProject": { + "description": "The full project name within the host. Projects may be nested, so\n\"project/subproject\" is a valid project name.\nThe \"repo name\" is hostURI/project.", + "type": "string" + } + }, + "id": "GerritSourceContext", + "description": "A SourceContext referring to a Gerrit project.", + "type": "object" + }, + "UpdateActiveBreakpointResponse": { + "properties": {}, + "id": "UpdateActiveBreakpointResponse", + "description": "Response for updating an active breakpoint.\nThe message is defined to allow future extensions.", + "type": "object" + }, + "CloudWorkspaceId": { + "description": "A CloudWorkspaceId is a unique identifier for a cloud workspace.\nA cloud workspace is a place associated with a repo where modified files\ncan be stored before they are committed.", + "type": "object", + "properties": { + "repoId": { + "description": "The ID of the repo containing the workspace.", + "$ref": "RepoId" + }, + "name": { + "description": "The unique name of the workspace within the repo. This is the name\nchosen by the client in the Source API's CreateWorkspace method.", + "type": "string" + } + }, + "id": "CloudWorkspaceId" + }, + "ListBreakpointsResponse": { + "properties": { + "breakpoints": { + "description": "List of breakpoints matching the request.\nThe fields `id` and `location` are guaranteed to be set on each breakpoint.\nThe fields: `stack_frames`, `evaluated_expressions` and `variable_table`\nare cleared on each breakpoint regardless of its status.", + "items": { + "$ref": "Breakpoint" + }, + "type": "array" + }, + "nextWaitToken": { + "description": "A wait token that can be used in the next call to `list` (REST) or\n`ListBreakpoints` (RPC) to block until the list of breakpoints has changes.", + "type": "string" + } + }, + "id": "ListBreakpointsResponse", + "description": "Response for listing breakpoints.", + "type": "object" + }, + "Breakpoint": { + "description": "Represents the breakpoint specification, status and results.", + "type": "object", + "properties": { + "id": { + "description": "Breakpoint identifier, unique in the scope of the debuggee.", + "type": "string" + }, + "location": { + "description": "Breakpoint source location.", + "$ref": "SourceLocation" + }, + "finalTime": { + "format": "google-datetime", + "description": "Time this breakpoint was finalized as seen by the server in seconds\nresolution.", + "type": "string" + }, + "variableTable": { + "description": "The `variable_table` exists to aid with computation, memory and network\ntraffic optimization. It enables storing a variable once and reference\nit from multiple variables, including variables stored in the\n`variable_table` itself.\nFor example, the same `this` object, which may appear at many levels of\nthe stack, can have all of its data stored once in this table. The\nstack frame variables then would hold only a reference to it.\n\nThe variable `var_table_index` field is an index into this repeated field.\nThe stored objects are nameless and get their name from the referencing\nvariable. The effective variable is a merge of the referencing variable\nand the referenced variable.", + "items": { + "$ref": "Variable" + }, + "type": "array" + }, + "createTime": { + "format": "google-datetime", + "description": "Time this breakpoint was created by the server in seconds resolution.", + "type": "string" + }, + "logMessageFormat": { + "description": "Only relevant when action is `LOG`. Defines the message to log when\nthe breakpoint hits. The message may include parameter placeholders `$0`,\n`$1`, etc. These placeholders are replaced with the evaluated value\nof the appropriate expression. Expressions not referenced in\n`log_message_format` are not logged.\n\nExample: `Message received, id = $0, count = $1` with\n`expressions` = `[ message.id, message.count ]`.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "A set of custom breakpoint properties, populated by the agent, to be\ndisplayed to the user.", + "type": "object" + }, + "expressions": { + "description": "List of read-only expressions to evaluate at the breakpoint location.\nThe expressions are composed using expressions in the programming language\nat the source location. If the breakpoint action is `LOG`, the evaluated\nexpressions are included in log statements.", + "items": { + "type": "string" + }, + "type": "array" + }, + "evaluatedExpressions": { + "description": "Values of evaluated expressions at breakpoint time.\nThe evaluated expressions appear in exactly the same order they\nare listed in the `expressions` field.\nThe `name` field holds the original expression text, the `value` or\n`members` field holds the result of the evaluated expression.\nIf the expression cannot be evaluated, the `status` inside the `Variable`\nwill indicate an error and contain the error text.", + "items": { + "$ref": "Variable" + }, + "type": "array" + }, + "isFinalState": { + "description": "When true, indicates that this is a final result and the\nbreakpoint state will not change from here on.", + "type": "boolean" + }, + "stackFrames": { + "description": "The stack at breakpoint time.", + "items": { + "$ref": "StackFrame" + }, + "type": "array" + }, + "condition": { + "description": "Condition that triggers the breakpoint.\nThe condition is a compound boolean expression composed using expressions\nin a programming language at the source location.", + "type": "string" + }, + "status": { + "$ref": "StatusMessage", + "description": "Breakpoint status.\n\nThe status includes an error flag and a human readable message.\nThis field is usually unset. The message can be either\ninformational or an error message. Regardless, clients should always\ndisplay the text message back to the user.\n\nError status indicates complete failure of the breakpoint.\n\nExample (non-final state): `Still loading symbols...`\n\nExamples (final state):\n\n* `Invalid line number` referring to location\n* `Field f not found in class C` referring to condition" + }, + "userEmail": { + "description": "E-mail address of the user that created this breakpoint", + "type": "string" + }, + "action": { + "enum": [ + "CAPTURE", + "LOG" + ], + "description": "Action that the agent should perform when the code at the\nbreakpoint location is hit.", + "type": "string", + "enumDescriptions": [ + "Capture stack frame and variables and update the breakpoint.\nThe data is only captured once. After that the breakpoint is set\nin a final state.", + "Log each breakpoint hit. The breakpoint remains active until\ndeleted or expired." + ] + }, + "logLevel": { + "enum": [ + "INFO", + "WARNING", + "ERROR" + ], + "description": "Indicates the severity of the log. Only relevant when action is `LOG`.", + "type": "string", + "enumDescriptions": [ + "Information log message.", + "Warning log message.", + "Error log message." + ] + } + }, + "id": "Breakpoint" + }, + "SetBreakpointResponse": { + "properties": { + "breakpoint": { + "description": "Breakpoint resource.\nThe field `id` is guaranteed to be set (in addition to the echoed fileds).", + "$ref": "Breakpoint" + } + }, + "id": "SetBreakpointResponse", + "description": "Response for setting a breakpoint.", + "type": "object" + }, + "UpdateActiveBreakpointRequest": { + "properties": { + "breakpoint": { + "$ref": "Breakpoint", + "description": "Updated breakpoint information.\nThe field `id` must be set.\nThe agent must echo all Breakpoint specification fields in the update." + } + }, + "id": "UpdateActiveBreakpointRequest", + "description": "Request to update an active breakpoint.", + "type": "object" + }, + "SourceContext": { + "description": "A SourceContext is a reference to a tree of files. A SourceContext together\nwith a path point to a unique revision of a single file or directory.", + "type": "object", + "properties": { + "gerrit": { + "$ref": "GerritSourceContext", + "description": "A SourceContext referring to a Gerrit project." + }, + "cloudWorkspace": { + "$ref": "CloudWorkspaceSourceContext", + "description": "A SourceContext referring to a snapshot in a cloud workspace." + }, + "cloudRepo": { + "$ref": "CloudRepoSourceContext", + "description": "A SourceContext referring to a revision in a cloud repo." + }, + "git": { + "description": "A SourceContext referring to any third party Git repo (e.g. GitHub).", + "$ref": "GitSourceContext" + } + }, + "id": "SourceContext" + }, + "CloudRepoSourceContext": { + "description": "A CloudRepoSourceContext denotes a particular revision in a cloud\nrepo (a repo hosted by the Google Cloud Platform).", + "type": "object", + "properties": { + "revisionId": { + "description": "A revision ID.", + "type": "string" + }, + "aliasName": { + "description": "The name of an alias (branch, tag, etc.).", + "type": "string" + }, + "repoId": { + "$ref": "RepoId", + "description": "The ID of the repo." + }, + "aliasContext": { + "description": "An alias, which may be a branch or tag.", + "$ref": "AliasContext" + } + }, + "id": "CloudRepoSourceContext" + }, + "RegisterDebuggeeRequest": { + "properties": { + "debuggee": { + "$ref": "Debuggee", + "description": "Debuggee information to register.\nThe fields `project`, `uniquifier`, `description` and `agent_version`\nof the debuggee must be set." + } + }, + "id": "RegisterDebuggeeRequest", + "description": "Request to register a debuggee.", + "type": "object" + }, + "RegisterDebuggeeResponse": { + "description": "Response for registering a debuggee.", + "type": "object", + "properties": { + "debuggee": { + "$ref": "Debuggee", + "description": "Debuggee resource.\nThe field `id` is guranteed to be set (in addition to the echoed fields).\nIf the field `is_disabled` is set to `true`, the agent should disable\nitself by removing all breakpoints and detaching from the application.\nIt should however continue to poll `RegisterDebuggee` until reenabled." + } + }, + "id": "RegisterDebuggeeResponse" + }, + "GetBreakpointResponse": { + "description": "Response for getting breakpoint information.", + "type": "object", + "properties": { + "breakpoint": { + "description": "Complete breakpoint state.\nThe fields `id` and `location` are guaranteed to be set.", + "$ref": "Breakpoint" + } + }, + "id": "GetBreakpointResponse" + }, "StatusMessage": { "description": "Represents a contextual status message.\nThe message can indicate an error or informational status, and refer to\nspecific parts of the containing object.\nFor example, the `Breakpoint.status` field can indicate an error referring\nto the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`.", "type": "object", @@ -49,11 +742,10 @@ "id": "StatusMessage" }, "GitSourceContext": { - "type": "object", "properties": { "revisionId": { - "type": "string", - "description": "Git commit hash.\nrequired." + "description": "Git commit hash.\nrequired.", + "type": "string" }, "url": { "description": "Git repository URL.", @@ -61,12 +753,20 @@ } }, "id": "GitSourceContext", - "description": "A GitSourceContext denotes a particular revision in a third party Git\nrepository (e.g. GitHub)." + "description": "A GitSourceContext denotes a particular revision in a third party Git\nrepository (e.g. GitHub).", + "type": "object" }, "Variable": { - "description": "Represents a variable or an argument possibly of a compound object type.\nNote how the following variables are represented:\n\n1) A simple variable:\n\n int x = 5\n\n { name: \"x\", value: \"5\", type: \"int\" } // Captured variable\n\n2) A compound object:\n\n struct T {\n int m1;\n int m2;\n };\n T x = { 3, 7 };\n\n { // Captured variable\n name: \"x\",\n type: \"T\",\n members { name: \"m1\", value: \"3\", type: \"int\" },\n members { name: \"m2\", value: \"7\", type: \"int\" }\n }\n\n3) A pointer where the pointee was captured:\n\n T x = { 3, 7 };\n T* p = &x;\n\n { // Captured variable\n name: \"p\",\n type: \"T*\",\n value: \"0x00500500\",\n members { name: \"m1\", value: \"3\", type: \"int\" },\n members { name: \"m2\", value: \"7\", type: \"int\" }\n }\n\n4) A pointer where the pointee was not captured:\n\n T* p = new T;\n\n { // Captured variable\n name: \"p\",\n type: \"T*\",\n value: \"0x00400400\"\n status { is_error: true, description { format: \"unavailable\" } }\n }\n\nThe status should describe the reason for the missing value,\nsuch as `\u003coptimized out\u003e`, `\u003cinaccessible\u003e`, `\u003cpointers limit reached\u003e`.\n\nNote that a null pointer should not have members.\n\n5) An unnamed value:\n\n int* p = new int(7);\n\n { // Captured variable\n name: \"p\",\n value: \"0x00500500\",\n type: \"int*\",\n members { value: \"7\", type: \"int\" } }\n\n6) An unnamed pointer where the pointee was not captured:\n\n int* p = new int(7);\n int** pp = &p;\n\n { // Captured variable\n name: \"pp\",\n value: \"0x00500500\",\n type: \"int**\",\n members {\n value: \"0x00400400\",\n type: \"int*\"\n status {\n is_error: true,\n description: { format: \"unavailable\" } }\n }\n }\n }\n\nTo optimize computation, memory and network traffic, variables that\nrepeat in the output multiple times can be stored once in a shared\nvariable table and be referenced using the `var_table_index` field. The\nvariables stored in the shared table are nameless and are essentially\na partition of the complete variable. To reconstruct the complete\nvariable, merge the referencing variable with the referenced variable.\n\nWhen using the shared variable table, the following variables:\n\n T x = { 3, 7 };\n T* p = &x;\n T& r = x;\n\n { name: \"x\", var_table_index: 3, type: \"T\" } // Captured variables\n { name: \"p\", value \"0x00500500\", type=\"T*\", var_table_index: 3 }\n { name: \"r\", type=\"T&\", var_table_index: 3 }\n\n { // Shared variable table entry #3:\n members { name: \"m1\", value: \"3\", type: \"int\" },\n members { name: \"m2\", value: \"7\", type: \"int\" }\n }\n\nNote that the pointer address is stored with the referencing variable\nand not with the referenced variable. This allows the referenced variable\nto be shared between pointers and references.\n\nThe type field is optional. The debugger agent may or may not support it.", - "type": "object", "properties": { + "value": { + "description": "Simple value of the variable.", + "type": "string" + }, + "varTableIndex": { + "format": "int32", + "description": "Reference to a variable in the shared variable table. More than\none variable can reference the same variable in the table. The\n`var_table_index` field is an index into `variable_table` in Breakpoint.", + "type": "integer" + }, "members": { "description": "Members contained or pointed to by the variable.", "items": { @@ -75,8 +775,8 @@ "type": "array" }, "status": { - "$ref": "StatusMessage", - "description": "Status associated with the variable. This field will usually stay\nunset. A status of a single variable only applies to that variable or\nexpression. The rest of breakpoint data still remains valid. Variables\nmight be reported in error state even when breakpoint is not in final\nstate.\n\nThe message may refer to variable name with `refers_to` set to\n`VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`.\nIn either case variable value and members will be unset.\n\nExample of error message applied to name: `Invalid expression syntax`.\n\nExample of information message applied to value: `Not captured`.\n\nExamples of error message applied to value:\n\n* `Malformed string`,\n* `Field f not found in class C`\n* `Null pointer dereference`" + "description": "Status associated with the variable. This field will usually stay\nunset. A status of a single variable only applies to that variable or\nexpression. The rest of breakpoint data still remains valid. Variables\nmight be reported in error state even when breakpoint is not in final\nstate.\n\nThe message may refer to variable name with `refers_to` set to\n`VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`.\nIn either case variable value and members will be unset.\n\nExample of error message applied to name: `Invalid expression syntax`.\n\nExample of information message applied to value: `Not captured`.\n\nExamples of error message applied to value:\n\n* `Malformed string`,\n* `Field f not found in class C`\n* `Null pointer dereference`", + "$ref": "StatusMessage" }, "name": { "description": "Name of the variable, if any.", @@ -85,22 +785,23 @@ "type": { "description": "Variable type (e.g. `MyClass`). If the variable is split with\n`var_table_index`, `type` goes next to `value`. The interpretation of\na type is agent specific. It is recommended to include the dynamic type\nrather than a static type of an object.", "type": "string" - }, - "varTableIndex": { - "format": "int32", - "description": "Reference to a variable in the shared variable table. More than\none variable can reference the same variable in the table. The\n`var_table_index` field is an index into `variable_table` in Breakpoint.", - "type": "integer" - }, - "value": { - "description": "Simple value of the variable.", - "type": "string" } }, - "id": "Variable" + "id": "Variable", + "description": "Represents a variable or an argument possibly of a compound object type.\nNote how the following variables are represented:\n\n1) A simple variable:\n\n int x = 5\n\n { name: \"x\", value: \"5\", type: \"int\" } // Captured variable\n\n2) A compound object:\n\n struct T {\n int m1;\n int m2;\n };\n T x = { 3, 7 };\n\n { // Captured variable\n name: \"x\",\n type: \"T\",\n members { name: \"m1\", value: \"3\", type: \"int\" },\n members { name: \"m2\", value: \"7\", type: \"int\" }\n }\n\n3) A pointer where the pointee was captured:\n\n T x = { 3, 7 };\n T* p = &x;\n\n { // Captured variable\n name: \"p\",\n type: \"T*\",\n value: \"0x00500500\",\n members { name: \"m1\", value: \"3\", type: \"int\" },\n members { name: \"m2\", value: \"7\", type: \"int\" }\n }\n\n4) A pointer where the pointee was not captured:\n\n T* p = new T;\n\n { // Captured variable\n name: \"p\",\n type: \"T*\",\n value: \"0x00400400\"\n status { is_error: true, description { format: \"unavailable\" } }\n }\n\nThe status should describe the reason for the missing value,\nsuch as `\u003coptimized out\u003e`, `\u003cinaccessible\u003e`, `\u003cpointers limit reached\u003e`.\n\nNote that a null pointer should not have members.\n\n5) An unnamed value:\n\n int* p = new int(7);\n\n { // Captured variable\n name: \"p\",\n value: \"0x00500500\",\n type: \"int*\",\n members { value: \"7\", type: \"int\" } }\n\n6) An unnamed pointer where the pointee was not captured:\n\n int* p = new int(7);\n int** pp = &p;\n\n { // Captured variable\n name: \"pp\",\n value: \"0x00500500\",\n type: \"int**\",\n members {\n value: \"0x00400400\",\n type: \"int*\"\n status {\n is_error: true,\n description: { format: \"unavailable\" } }\n }\n }\n }\n\nTo optimize computation, memory and network traffic, variables that\nrepeat in the output multiple times can be stored once in a shared\nvariable table and be referenced using the `var_table_index` field. The\nvariables stored in the shared table are nameless and are essentially\na partition of the complete variable. To reconstruct the complete\nvariable, merge the referencing variable with the referenced variable.\n\nWhen using the shared variable table, the following variables:\n\n T x = { 3, 7 };\n T* p = &x;\n T& r = x;\n\n { name: \"x\", var_table_index: 3, type: \"T\" } // Captured variables\n { name: \"p\", value \"0x00500500\", type=\"T*\", var_table_index: 3 }\n { name: \"r\", type=\"T&\", var_table_index: 3 }\n\n { // Shared variable table entry #3:\n members { name: \"m1\", value: \"3\", type: \"int\" },\n members { name: \"m2\", value: \"7\", type: \"int\" }\n }\n\nNote that the pointer address is stored with the referencing variable\nand not with the referenced variable. This allows the referenced variable\nto be shared between pointers and references.\n\nThe type field is optional. The debugger agent may or may not support it.", + "type": "object" }, "StackFrame": { + "description": "Represents a stack frame context.", "type": "object", "properties": { + "arguments": { + "description": "Set of arguments passed to this function.\nNote that this might not be populated for all stack frames.", + "items": { + "$ref": "Variable" + }, + "type": "array" + }, "locals": { "description": "Set of local variables at the stack frame location.\nNote that this might not be populated for all stack frames.", "items": { @@ -115,36 +816,26 @@ "function": { "description": "Demangled function name at the call site.", "type": "string" - }, - "arguments": { - "description": "Set of arguments passed to this function.\nNote that this might not be populated for all stack frames.", - "items": { - "$ref": "Variable" - }, - "type": "array" } }, - "id": "StackFrame", - "description": "Represents a stack frame context." + "id": "StackFrame" }, "RepoId": { "description": "A unique identifier for a cloud repo.", "type": "object", "properties": { - "uid": { - "description": "A server-assigned, globally unique identifier.", - "type": "string" - }, "projectRepoId": { "$ref": "ProjectRepoId", "description": "A combination of a project ID and a repo name." + }, + "uid": { + "description": "A server-assigned, globally unique identifier.", + "type": "string" } }, "id": "RepoId" }, "FormatMessage": { - "description": "Represents a message with parameters.", - "type": "object", "properties": { "parameters": { "description": "Optional parameters to be embedded into the message.", @@ -158,45 +849,43 @@ "type": "string" } }, - "id": "FormatMessage" + "id": "FormatMessage", + "description": "Represents a message with parameters.", + "type": "object" }, "ExtendedSourceContext": { - "description": "An ExtendedSourceContext is a SourceContext combined with additional\ndetails describing the context.", - "type": "object", "properties": { "context": { - "description": "Any source context.", - "$ref": "SourceContext" + "$ref": "SourceContext", + "description": "Any source context." }, "labels": { - "description": "Labels with user defined metadata.", - "type": "object", "additionalProperties": { "type": "string" - } - } - }, - "id": "ExtendedSourceContext" - }, - "ListDebuggeesResponse": { - "description": "Response for listing debuggees.", - "type": "object", - "properties": { - "debuggees": { - "description": "List of debuggees accessible to the calling user.\nNote that the `description` field is the only human readable field\nthat should be displayed to the user.\nThe fields `debuggee.id` and `description` fields are guaranteed to be\nset on each debuggee.", - "items": { - "$ref": "Debuggee" }, - "type": "array" + "description": "Labels with user defined metadata.", + "type": "object" } }, - "id": "ListDebuggeesResponse" + "id": "ExtendedSourceContext", + "description": "An ExtendedSourceContext is a SourceContext combined with additional\ndetails describing the context.", + "type": "object" }, "AliasContext": { "description": "An alias to a repo revision.", "type": "object", "properties": { + "name": { + "description": "The alias name.", + "type": "string" + }, "kind": { + "enum": [ + "ANY", + "FIXED", + "MOVABLE", + "OTHER" + ], "description": "The alias kind.", "type": "string", "enumDescriptions": [ @@ -204,21 +893,25 @@ "Git tag", "Git branch", "OTHER is used to specify non-standard aliases, those not of the kinds\nabove. For example, if a Git repo has a ref named \"refs/foo/bar\", it\nis considered to be of kind OTHER." - ], - "enum": [ - "ANY", - "FIXED", - "MOVABLE", - "OTHER" ] - }, - "name": { - "description": "The alias name.", - "type": "string" } }, "id": "AliasContext" }, + "ListDebuggeesResponse": { + "description": "Response for listing debuggees.", + "type": "object", + "properties": { + "debuggees": { + "description": "List of debuggees accessible to the calling user.\nThe fields `debuggee.id` and `description` are guaranteed to be set.\nThe `description` field is a human readable field provided by agents and\ncan be displayed to users.", + "items": { + "$ref": "Debuggee" + }, + "type": "array" + } + }, + "id": "ListDebuggeesResponse" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "type": "object", @@ -242,11 +935,9 @@ "id": "SourceLocation" }, "Debuggee": { - "description": "Represents the application to debug. The application may include one or more\nreplicated processes executing the same code. Each of these processes is\nattached with a debugger agent, carrying out the debugging commands.\nThe agents attached to the same debuggee are identified by using exactly the\nsame field values when registering.", - "type": "object", "properties": { "project": { - "description": "Project the debuggee is associated with.\nUse the project number when registering a Google Cloud Platform project.", + "description": "Project the debuggee is associated with.\nUse project number or id when registering a Google Cloud Platform project.", "type": "string" }, "isDisabled": { @@ -254,7 +945,7 @@ "type": "boolean" }, "agentVersion": { - "description": "Version ID of the agent release. The version ID is structured as\nfollowing: `domain/type/vmajor.minor` (for example\n`google.com/gcp-java/v1.1`).", + "description": "Version ID of the agent.\nSchema: `domain/language-platform/vmajor.minor` (for example\n`google.com/java-gcp/v1.1`).", "type": "string" }, "id": { @@ -262,7 +953,7 @@ "type": "string" }, "uniquifier": { - "description": "Debuggee uniquifier within the project.\nAny string that identifies the application within the project can be used.\nIncluding environment and version or build IDs is recommended.", + "description": "Uniquifier to further distiguish the application.\nIt is possible that different applications might have identical values in\nthe debuggee message, thus, incorrectly identified as a single application\nby the Controller service. This field adds salt to further distiguish the\napplication. Agents should consider seeding this field with value that\nidentifies the code, binary, configuration and environment.", "type": "string" }, "description": { @@ -270,14 +961,14 @@ "type": "string" }, "sourceContexts": { - "description": "References to the locations and revisions of the source code used in the\ndeployed application.\n\nNOTE: This field is deprecated. Consumers should use\n`ext_source_contexts` if it is not empty. Debug agents should populate\nboth this field and `ext_source_contexts`.", + "description": "References to the locations and revisions of the source code used in the\ndeployed application.", "items": { "$ref": "SourceContext" }, "type": "array" }, "extSourceContexts": { - "description": "References to the locations and revisions of the source code used in the\ndeployed application.\n\nContexts describing a remote repo related to the source code\nhave a `category` label of `remote_repo`. Source snapshot source\ncontexts have a `category` of `snapshot`.", + "description": "References to the locations and revisions of the source code used in the\ndeployed application.\n\nNOTE: this field is experimental and can be ignored.", "items": { "$ref": "ExtendedSourceContext" }, @@ -295,33 +986,35 @@ "description": "Human readable message to be displayed to the user about this debuggee.\nAbsence of this field indicates no status. The message can be either\ninformational or an error status." }, "isInactive": { - "description": "If set to `true`, indicates that the debuggee is considered as inactive by\nthe Controller service.", + "description": "If set to `true`, indicates that Controller service does not detect any\nactivity from the debuggee agents and the application is possibly stopped.", "type": "boolean" } }, - "id": "Debuggee" + "id": "Debuggee", + "description": "Represents the debugged application. The application may include one or more\nreplicated processes executing the same code. Each of these processes is\nattached with a debugger agent, carrying out the debugging commands.\nAgents attached to the same debuggee identify themselves as such by using\nexactly the same Debuggee message value when registering.", + "type": "object" }, "ListActiveBreakpointsResponse": { - "description": "Response for listing active breakpoints.", - "type": "object", "properties": { - "waitExpired": { - "description": "The `wait_expired` field is set to true by the server when the\nrequest times out and the field `success_on_timeout` is set to true.", - "type": "boolean" - }, - "nextWaitToken": { - "type": "string", - "description": "A wait token that can be used in the next method call to block until\nthe list of breakpoints changes." - }, "breakpoints": { "description": "List of all active breakpoints.\nThe fields `id` and `location` are guaranteed to be set on each breakpoint.", "items": { "$ref": "Breakpoint" }, "type": "array" + }, + "waitExpired": { + "description": "If set to `true`, indicates that there is no change to the\nlist of active breakpoints and the server-selected timeout has expired.\nThe `breakpoints` field would be empty and should be ignored.", + "type": "boolean" + }, + "nextWaitToken": { + "description": "A token that can be used in the next method call to block until\nthe list of breakpoints changes.", + "type": "string" } }, - "id": "ListActiveBreakpointsResponse" + "id": "ListActiveBreakpointsResponse", + "description": "Response for listing active breakpoints.", + "type": "object" }, "ProjectRepoId": { "description": "Selects a repo using a Google Cloud Platform project ID\n(e.g. winged-cargo-31) and a repo name within that project.", @@ -337,310 +1030,22 @@ } }, "id": "ProjectRepoId" - }, - "CloudWorkspaceSourceContext": { - "description": "A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot.", - "type": "object", - "properties": { - "workspaceId": { - "$ref": "CloudWorkspaceId", - "description": "The ID of the workspace." - }, - "snapshotId": { - "description": "The ID of the snapshot.\nAn empty snapshot_id refers to the most recent snapshot.", - "type": "string" - } - }, - "id": "CloudWorkspaceSourceContext" - }, - "GerritSourceContext": { - "description": "A SourceContext referring to a Gerrit project.", - "type": "object", - "properties": { - "revisionId": { - "description": "A revision (commit) ID.", - "type": "string" - }, - "hostUri": { - "description": "The URI of a running Gerrit instance.", - "type": "string" - }, - "aliasName": { - "description": "The name of an alias (branch, tag, etc.).", - "type": "string" - }, - "aliasContext": { - "$ref": "AliasContext", - "description": "An alias, which may be a branch or tag." - }, - "gerritProject": { - "type": "string", - "description": "The full project name within the host. Projects may be nested, so\n\"project/subproject\" is a valid project name.\nThe \"repo name\" is hostURI/project." - } - }, - "id": "GerritSourceContext" - }, - "UpdateActiveBreakpointResponse": { - "type": "object", - "properties": {}, - "id": "UpdateActiveBreakpointResponse", - "description": "Response for updating an active breakpoint.\nThe message is defined to allow future extensions." - }, - "CloudWorkspaceId": { - "description": "A CloudWorkspaceId is a unique identifier for a cloud workspace.\nA cloud workspace is a place associated with a repo where modified files\ncan be stored before they are committed.", - "type": "object", - "properties": { - "repoId": { - "description": "The ID of the repo containing the workspace.", - "$ref": "RepoId" - }, - "name": { - "description": "The unique name of the workspace within the repo. This is the name\nchosen by the client in the Source API's CreateWorkspace method.", - "type": "string" - } - }, - "id": "CloudWorkspaceId" - }, - "ListBreakpointsResponse": { - "description": "Response for listing breakpoints.", - "type": "object", - "properties": { - "nextWaitToken": { - "type": "string", - "description": "A wait token that can be used in the next call to `list` (REST) or\n`ListBreakpoints` (RPC) to block until the list of breakpoints has changes." - }, - "breakpoints": { - "items": { - "$ref": "Breakpoint" - }, - "type": "array", - "description": "List of breakpoints matching the request.\nThe fields `id` and `location` are guaranteed to be set on each breakpoint.\nThe fields: `stack_frames`, `evaluated_expressions` and `variable_table`\nare cleared on each breakpoint regardless of its status." - } - }, - "id": "ListBreakpointsResponse" - }, - "Breakpoint": { - "description": "Represents the breakpoint specification, status and results.", - "type": "object", - "properties": { - "location": { - "$ref": "SourceLocation", - "description": "Breakpoint source location." - }, - "finalTime": { - "format": "google-datetime", - "description": "Time this breakpoint was finalized as seen by the server in seconds\nresolution.", - "type": "string" - }, - "variableTable": { - "description": "The `variable_table` exists to aid with computation, memory and network\ntraffic optimization. It enables storing a variable once and reference\nit from multiple variables, including variables stored in the\n`variable_table` itself.\nFor example, the same `this` object, which may appear at many levels of\nthe stack, can have all of its data stored once in this table. The\nstack frame variables then would hold only a reference to it.\n\nThe variable `var_table_index` field is an index into this repeated field.\nThe stored objects are nameless and get their name from the referencing\nvariable. The effective variable is a merge of the referencing variable\nand the referenced variable.", - "items": { - "$ref": "Variable" - }, - "type": "array" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "A set of custom breakpoint properties, populated by the agent, to be\ndisplayed to the user." - }, - "logMessageFormat": { - "description": "Only relevant when action is `LOG`. Defines the message to log when\nthe breakpoint hits. The message may include parameter placeholders `$0`,\n`$1`, etc. These placeholders are replaced with the evaluated value\nof the appropriate expression. Expressions not referenced in\n`log_message_format` are not logged.\n\nExample: `Message received, id = $0, count = $1` with\n`expressions` = `[ message.id, message.count ]`.", - "type": "string" - }, - "createTime": { - "format": "google-datetime", - "description": "Time this breakpoint was created by the server in seconds resolution.", - "type": "string" - }, - "expressions": { - "description": "List of read-only expressions to evaluate at the breakpoint location.\nThe expressions are composed using expressions in the programming language\nat the source location. If the breakpoint action is `LOG`, the evaluated\nexpressions are included in log statements.", - "items": { - "type": "string" - }, - "type": "array" - }, - "evaluatedExpressions": { - "description": "Values of evaluated expressions at breakpoint time.\nThe evaluated expressions appear in exactly the same order they\nare listed in the `expressions` field.\nThe `name` field holds the original expression text, the `value` or\n`members` field holds the result of the evaluated expression.\nIf the expression cannot be evaluated, the `status` inside the `Variable`\nwill indicate an error and contain the error text.", - "items": { - "$ref": "Variable" - }, - "type": "array" - }, - "isFinalState": { - "type": "boolean", - "description": "When true, indicates that this is a final result and the\nbreakpoint state will not change from here on." - }, - "stackFrames": { - "description": "The stack at breakpoint time.", - "items": { - "$ref": "StackFrame" - }, - "type": "array" - }, - "condition": { - "description": "Condition that triggers the breakpoint.\nThe condition is a compound boolean expression composed using expressions\nin a programming language at the source location.", - "type": "string" - }, - "status": { - "$ref": "StatusMessage", - "description": "Breakpoint status.\n\nThe status includes an error flag and a human readable message.\nThis field is usually unset. The message can be either\ninformational or an error message. Regardless, clients should always\ndisplay the text message back to the user.\n\nError status indicates complete failure of the breakpoint.\n\nExample (non-final state): `Still loading symbols...`\n\nExamples (final state):\n\n* `Invalid line number` referring to location\n* `Field f not found in class C` referring to condition" - }, - "userEmail": { - "type": "string", - "description": "E-mail address of the user that created this breakpoint" - }, - "action": { - "type": "string", - "enumDescriptions": [ - "Capture stack frame and variables and update the breakpoint.\nThe data is only captured once. After that the breakpoint is set\nin a final state.", - "Log each breakpoint hit. The breakpoint remains active until\ndeleted or expired." - ], - "enum": [ - "CAPTURE", - "LOG" - ], - "description": "Action that the agent should perform when the code at the\nbreakpoint location is hit." - }, - "logLevel": { - "enumDescriptions": [ - "Information log message.", - "Warning log message.", - "Error log message." - ], - "enum": [ - "INFO", - "WARNING", - "ERROR" - ], - "description": "Indicates the severity of the log. Only relevant when action is `LOG`.", - "type": "string" - }, - "id": { - "description": "Breakpoint identifier, unique in the scope of the debuggee.", - "type": "string" - } - }, - "id": "Breakpoint" - }, - "SetBreakpointResponse": { - "description": "Response for setting a breakpoint.", - "type": "object", - "properties": { - "breakpoint": { - "description": "Breakpoint resource.\nThe field `id` is guaranteed to be set (in addition to the echoed fileds).", - "$ref": "Breakpoint" - } - }, - "id": "SetBreakpointResponse" - }, - "UpdateActiveBreakpointRequest": { - "description": "Request to update an active breakpoint.", - "type": "object", - "properties": { - "breakpoint": { - "$ref": "Breakpoint", - "description": "Updated breakpoint information.\nThe field `id` must be set." - } - }, - "id": "UpdateActiveBreakpointRequest" - }, - "SourceContext": { - "description": "A SourceContext is a reference to a tree of files. A SourceContext together\nwith a path point to a unique revision of a single file or directory.", - "type": "object", - "properties": { - "cloudWorkspace": { - "$ref": "CloudWorkspaceSourceContext", - "description": "A SourceContext referring to a snapshot in a cloud workspace." - }, - "cloudRepo": { - "$ref": "CloudRepoSourceContext", - "description": "A SourceContext referring to a revision in a cloud repo." - }, - "git": { - "$ref": "GitSourceContext", - "description": "A SourceContext referring to any third party Git repo (e.g. GitHub)." - }, - "gerrit": { - "$ref": "GerritSourceContext", - "description": "A SourceContext referring to a Gerrit project." - } - }, - "id": "SourceContext" - }, - "CloudRepoSourceContext": { - "description": "A CloudRepoSourceContext denotes a particular revision in a cloud\nrepo (a repo hosted by the Google Cloud Platform).", - "type": "object", - "properties": { - "revisionId": { - "type": "string", - "description": "A revision ID." - }, - "aliasName": { - "description": "The name of an alias (branch, tag, etc.).", - "type": "string" - }, - "repoId": { - "$ref": "RepoId", - "description": "The ID of the repo." - }, - "aliasContext": { - "description": "An alias, which may be a branch or tag.", - "$ref": "AliasContext" - } - }, - "id": "CloudRepoSourceContext" - }, - "RegisterDebuggeeRequest": { - "description": "Request to register a debuggee.", - "type": "object", - "properties": { - "debuggee": { - "$ref": "Debuggee", - "description": "Debuggee information to register.\nThe fields `project`, `uniquifier`, `description` and `agent_version`\nof the debuggee must be set." - } - }, - "id": "RegisterDebuggeeRequest" - }, - "RegisterDebuggeeResponse": { - "description": "Response for registering a debuggee.", - "type": "object", - "properties": { - "debuggee": { - "$ref": "Debuggee", - "description": "Debuggee resource.\nThe field `id` is guranteed to be set (in addition to the echoed fields)." - } - }, - "id": "RegisterDebuggeeResponse" - }, - "GetBreakpointResponse": { - "description": "Response for getting breakpoint information.", - "type": "object", - "properties": { - "breakpoint": { - "description": "Complete breakpoint state.\nThe fields `id` and `location` are guaranteed to be set.", - "$ref": "Breakpoint" - } - }, - "id": "GetBreakpointResponse" } }, "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, "protocol": "rest", "canonicalName": "Cloud Debugger", "auth": { "oauth2": { "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, "https://www.googleapis.com/auth/cloud_debugger": { "description": "Manage cloud debugger" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" } } } @@ -650,410 +1055,5 @@ "name": "clouddebugger", "batchPath": "batch", "title": "Stackdriver Debugger API", - "ownerName": "Google", - "resources": { - "debugger": { - "resources": { - "debuggees": { - "methods": { - "list": { - "description": "Lists all the debuggees that the user can set breakpoints to.", - "response": { - "$ref": "ListDebuggeesResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "parameters": { - "clientVersion": { - "description": "The client version making the call.\nFollowing: `domain/type/version` (e.g., `google.com/intellij/v1`).", - "type": "string", - "location": "query" - }, - "includeInactive": { - "location": "query", - "description": "When set to `true`, the result includes all debuggees. Otherwise, the\nresult includes only debuggees that are active.", - "type": "boolean" - }, - "project": { - "location": "query", - "description": "Project number of a Google Cloud project whose debuggees to list.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ], - "flatPath": "v2/debugger/debuggees", - "id": "clouddebugger.debugger.debuggees.list", - "path": "v2/debugger/debuggees" - } - }, - "resources": { - "breakpoints": { - "methods": { - "delete": { - "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", - "id": "clouddebugger.debugger.debuggees.breakpoints.delete", - "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", - "description": "Deletes the breakpoint from the debuggee.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "debuggeeId", - "breakpointId" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ], - "parameters": { - "clientVersion": { - "location": "query", - "description": "The client version making the call.\nFollowing: `domain/type/version` (e.g., `google.com/intellij/v1`).", - "type": "string" - }, - "breakpointId": { - "description": "ID of the breakpoint to delete.", - "type": "string", - "required": true, - "location": "path" - }, - "debuggeeId": { - "location": "path", - "description": "ID of the debuggee whose breakpoint to delete.", - "type": "string", - "required": true - } - } - }, - "set": { - "parameters": { - "clientVersion": { - "type": "string", - "location": "query", - "description": "The client version making the call.\nFollowing: `domain/type/version` (e.g., `google.com/intellij/v1`)." - }, - "debuggeeId": { - "location": "path", - "description": "ID of the debuggee where the breakpoint is to be set.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ], - "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/set", - "id": "clouddebugger.debugger.debuggees.breakpoints.set", - "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/set", - "description": "Sets the breakpoint to the debuggee.", - "request": { - "$ref": "Breakpoint" - }, - "response": { - "$ref": "SetBreakpointResponse" - }, - "parameterOrder": [ - "debuggeeId" - ], - "httpMethod": "POST" - }, - "list": { - "description": "Lists all breakpoints for the debuggee.", - "parameterOrder": [ - "debuggeeId" - ], - "response": { - "$ref": "ListBreakpointsResponse" - }, - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ], - "parameters": { - "waitToken": { - "location": "query", - "description": "A wait token that, if specified, blocks the call until the breakpoints\nlist has changed, or a server selected timeout has expired. The value\nshould be set from the last response. The error code\n`google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which\nshould be called again with the same `wait_token`.", - "type": "string" - }, - "clientVersion": { - "description": "The client version making the call.\nFollowing: `domain/type/version` (e.g., `google.com/intellij/v1`).", - "type": "string", - "location": "query" - }, - "action.value": { - "enum": [ - "CAPTURE", - "LOG" - ], - "description": "Only breakpoints with the specified action will pass the filter.", - "type": "string", - "location": "query" - }, - "includeAllUsers": { - "description": "When set to `true`, the response includes the list of breakpoints set by\nany user. Otherwise, it includes only breakpoints set by the caller.", - "type": "boolean", - "location": "query" - }, - "includeInactive": { - "location": "query", - "description": "When set to `true`, the response includes active and inactive\nbreakpoints. Otherwise, it includes only active breakpoints.", - "type": "boolean" - }, - "stripResults": { - "location": "query", - "description": "This field is deprecated. The following fields are always stripped out of\nthe result: `stack_frames`, `evaluated_expressions` and `variable_table`.", - "type": "boolean" - }, - "debuggeeId": { - "description": "ID of the debuggee whose breakpoints to list.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints", - "id": "clouddebugger.debugger.debuggees.breakpoints.list", - "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints" - }, - "get": { - "parameters": { - "clientVersion": { - "location": "query", - "description": "The client version making the call.\nFollowing: `domain/type/version` (e.g., `google.com/intellij/v1`).", - "type": "string" - }, - "breakpointId": { - "description": "ID of the breakpoint to get.", - "type": "string", - "required": true, - "location": "path" - }, - "debuggeeId": { - "location": "path", - "description": "ID of the debuggee whose breakpoint to get.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ], - "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", - "id": "clouddebugger.debugger.debuggees.breakpoints.get", - "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", - "description": "Gets breakpoint information.", - "parameterOrder": [ - "debuggeeId", - "breakpointId" - ], - "response": { - "$ref": "GetBreakpointResponse" - }, - "httpMethod": "GET" - } - } - } - } - } - } - }, - "controller": { - "resources": { - "debuggees": { - "resources": { - "breakpoints": { - "methods": { - "list": { - "description": "Returns the list of all active breakpoints for the debuggee.\n\nThe breakpoint specification (`location`, `condition`, and `expressions`\nfields) is semantically immutable, although the field values may\nchange. For example, an agent may update the location line number\nto reflect the actual line where the breakpoint was set, but this\ndoesn't change the breakpoint semantics.\n\nThis means that an agent does not need to check if a breakpoint has changed\nwhen it encounters the same breakpoint on a successive call.\nMoreover, an agent should remember the breakpoints that are completed\nuntil the controller removes them from the active list to avoid\nsetting those breakpoints again.", - "response": { - "$ref": "ListActiveBreakpointsResponse" - }, - "parameterOrder": [ - "debuggeeId" - ], - "httpMethod": "GET", - "parameters": { - "successOnTimeout": { - "description": "If set to `true`, returns `google.rpc.Code.OK` status and sets the\n`wait_expired` response field to `true` when the server-selected timeout\nhas expired (recommended).\n\nIf set to `false`, returns `google.rpc.Code.ABORTED` status when the\nserver-selected timeout has expired (deprecated).", - "type": "boolean", - "location": "query" - }, - "debuggeeId": { - "location": "path", - "description": "Identifies the debuggee.", - "type": "string", - "required": true - }, - "waitToken": { - "description": "A wait token that, if specified, blocks the method call until the list\nof active breakpoints has changed, or a server selected timeout has\nexpired. The value should be set from the last returned response.", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ], - "flatPath": "v2/controller/debuggees/{debuggeeId}/breakpoints", - "id": "clouddebugger.controller.debuggees.breakpoints.list", - "path": "v2/controller/debuggees/{debuggeeId}/breakpoints" - }, - "update": { - "flatPath": "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}", - "path": "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}", - "id": "clouddebugger.controller.debuggees.breakpoints.update", - "description": "Updates the breakpoint state or mutable fields.\nThe entire Breakpoint message must be sent back to the controller\nservice.\n\nUpdates to active breakpoint fields are only allowed if the new value\ndoes not change the breakpoint specification. Updates to the `location`,\n`condition` and `expressions` fields should not alter the breakpoint\nsemantics. These may only make changes such as canonicalizing a value\nor snapping the location to the correct line of code.", - "request": { - "$ref": "UpdateActiveBreakpointRequest" - }, - "httpMethod": "PUT", - "parameterOrder": [ - "debuggeeId", - "id" - ], - "response": { - "$ref": "UpdateActiveBreakpointResponse" - }, - "parameters": { - "debuggeeId": { - "location": "path", - "description": "Identifies the debuggee being debugged.", - "type": "string", - "required": true - }, - "id": { - "type": "string", - "required": true, - "location": "path", - "description": "Breakpoint identifier, unique in the scope of the debuggee." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ] - } - } - } - }, - "methods": { - "register": { - "path": "v2/controller/debuggees/register", - "id": "clouddebugger.controller.debuggees.register", - "request": { - "$ref": "RegisterDebuggeeRequest" - }, - "description": "Registers the debuggee with the controller service.\n\nAll agents attached to the same application should call this method with\nthe same request content to get back the same stable `debuggee_id`. Agents\nshould call this method again whenever `google.rpc.Code.NOT_FOUND` is\nreturned from any controller method.\n\nThis allows the controller service to disable the agent or recover from any\ndata loss. If the debuggee is disabled by the server, the response will\nhave `is_disabled` set to `true`.", - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "RegisterDebuggeeResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ], - "parameters": {}, - "flatPath": "v2/controller/debuggees/register" - } - } - } - } - } - }, - "parameters": { - "alt": { - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "key": { - "location": "query", - "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.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "fields": { - "type": "string", - "location": "query", - "description": "Selector specifying which fields to include in a partial response." - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - } - } + "ownerName": "Google" } diff --git a/vendor/google.golang.org/api/clouddebugger/v2/clouddebugger-gen.go b/vendor/google.golang.org/api/clouddebugger/v2/clouddebugger-gen.go index a107742f5..91399fd95 100644 --- a/vendor/google.golang.org/api/clouddebugger/v2/clouddebugger-gen.go +++ b/vendor/google.golang.org/api/clouddebugger/v2/clouddebugger-gen.go @@ -458,21 +458,20 @@ func (s *CloudWorkspaceSourceContext) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Debuggee: Represents the application to debug. The application may +// Debuggee: Represents the debugged application. The application may // include one or more // replicated processes executing the same code. Each of these processes // is // attached with a debugger agent, carrying out the debugging // commands. -// The agents attached to the same debuggee are identified by using -// exactly the -// same field values when registering. +// Agents attached to the same debuggee identify themselves as such by +// using +// exactly the same Debuggee message value when registering. type Debuggee struct { - // AgentVersion: Version ID of the agent release. The version ID is - // structured as - // following: `domain/type/vmajor.minor` (for + // AgentVersion: Version ID of the agent. + // Schema: `domain/language-platform/vmajor.minor` (for // example - // `google.com/gcp-java/v1.1`). + // `google.com/java-gcp/v1.1`). AgentVersion string `json:"agentVersion,omitempty"` // Description: Human readable description of the debuggee. @@ -485,10 +484,7 @@ type Debuggee struct { // source code used in the // deployed application. // - // Contexts describing a remote repo related to the source code - // have a `category` label of `remote_repo`. Source snapshot - // source - // contexts have a `category` of `snapshot`. + // NOTE: this field is experimental and can be ignored. ExtSourceContexts []*ExtendedSourceContext `json:"extSourceContexts,omitempty"` // Id: Unique identifier for the debuggee generated by the controller @@ -500,9 +496,10 @@ type Debuggee struct { // detach from the debuggee. IsDisabled bool `json:"isDisabled,omitempty"` - // IsInactive: If set to `true`, indicates that the debuggee is - // considered as inactive by - // the Controller service. + // IsInactive: If set to `true`, indicates that Controller service does + // not detect any + // activity from the debuggee agents and the application is possibly + // stopped. IsInactive bool `json:"isInactive,omitempty"` // Labels: A set of custom debuggee properties, populated by the agent, @@ -511,19 +508,13 @@ type Debuggee struct { Labels map[string]string `json:"labels,omitempty"` // Project: Project the debuggee is associated with. - // Use the project number when registering a Google Cloud Platform + // Use project number or id when registering a Google Cloud Platform // project. Project string `json:"project,omitempty"` // SourceContexts: References to the locations and revisions of the // source code used in the // deployed application. - // - // NOTE: This field is deprecated. Consumers should - // use - // `ext_source_contexts` if it is not empty. Debug agents should - // populate - // both this field and `ext_source_contexts`. SourceContexts []*SourceContext `json:"sourceContexts,omitempty"` // Status: Human readable message to be displayed to the user about this @@ -533,10 +524,16 @@ type Debuggee struct { // informational or an error status. Status *StatusMessage `json:"status,omitempty"` - // Uniquifier: Debuggee uniquifier within the project. - // Any string that identifies the application within the project can be - // used. - // Including environment and version or build IDs is recommended. + // Uniquifier: Uniquifier to further distiguish the application. + // It is possible that different applications might have identical + // values in + // the debuggee message, thus, incorrectly identified as a single + // application + // by the Controller service. This field adds salt to further distiguish + // the + // application. Agents should consider seeding this field with value + // that + // identifies the code, binary, configuration and environment. Uniquifier string `json:"uniquifier,omitempty"` // ForceSendFields is a list of field names (e.g. "AgentVersion") to @@ -772,14 +769,16 @@ type ListActiveBreakpointsResponse struct { // breakpoint. Breakpoints []*Breakpoint `json:"breakpoints,omitempty"` - // NextWaitToken: A wait token that can be used in the next method call - // to block until + // NextWaitToken: A token that can be used in the next method call to + // block until // the list of breakpoints changes. NextWaitToken string `json:"nextWaitToken,omitempty"` - // WaitExpired: The `wait_expired` field is set to true by the server - // when the - // request times out and the field `success_on_timeout` is set to true. + // WaitExpired: If set to `true`, indicates that there is no change to + // the + // list of active breakpoints and the server-selected timeout has + // expired. + // The `breakpoints` field would be empty and should be ignored. WaitExpired bool `json:"waitExpired,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -855,12 +854,11 @@ func (s *ListBreakpointsResponse) MarshalJSON() ([]byte, error) { // ListDebuggeesResponse: Response for listing debuggees. type ListDebuggeesResponse struct { // Debuggees: List of debuggees accessible to the calling user. - // Note that the `description` field is the only human readable - // field - // that should be displayed to the user. - // The fields `debuggee.id` and `description` fields are guaranteed to - // be - // set on each debuggee. + // The fields `debuggee.id` and `description` are guaranteed to be + // set. + // The `description` field is a human readable field provided by agents + // and + // can be displayed to users. Debuggees []*Debuggee `json:"debuggees,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -959,6 +957,12 @@ type RegisterDebuggeeResponse struct { // Debuggee: Debuggee resource. // The field `id` is guranteed to be set (in addition to the echoed // fields). + // If the field `is_disabled` is set to `true`, the agent should + // disable + // itself by removing all breakpoints and detaching from the + // application. + // It should however continue to poll `RegisterDebuggee` until + // reenabled. Debuggee *Debuggee `json:"debuggee,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1226,6 +1230,8 @@ func (s *StatusMessage) MarshalJSON() ([]byte, error) { type UpdateActiveBreakpointRequest struct { // Breakpoint: Updated breakpoint information. // The field `id` must be set. + // The agent must echo all Breakpoint specification fields in the + // update. Breakpoint *Breakpoint `json:"breakpoint,omitempty"` // ForceSendFields is a list of field names (e.g. "Breakpoint") to @@ -1473,19 +1479,19 @@ type ControllerDebuggeesRegisterCall struct { // Register: Registers the debuggee with the controller service. // -// All agents attached to the same application should call this method +// All agents attached to the same application must call this method // with -// the same request content to get back the same stable `debuggee_id`. -// Agents -// should call this method again whenever `google.rpc.Code.NOT_FOUND` -// is -// returned from any controller method. +// exactly the same request content to get back the same stable +// `debuggee_id`. +// Agents should call this method again whenever +// `google.rpc.Code.NOT_FOUND` +// is returned from any controller method. // -// This allows the controller service to disable the agent or recover -// from any -// data loss. If the debuggee is disabled by the server, the response -// will -// have `is_disabled` set to `true`. +// This protocol allows the controller service to disable debuggees, +// recover +// from data loss, or change the `debuggee_id` format. Agents must +// handle +// `debuggee_id` value changing upon re-registration. func (r *ControllerDebuggeesService) Register(registerdebuggeerequest *RegisterDebuggeeRequest) *ControllerDebuggeesRegisterCall { c := &ControllerDebuggeesRegisterCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.registerdebuggeerequest = registerdebuggeerequest @@ -1575,7 +1581,7 @@ func (c *ControllerDebuggeesRegisterCall) Do(opts ...googleapi.CallOption) (*Reg } return ret, nil // { - // "description": "Registers the debuggee with the controller service.\n\nAll agents attached to the same application should call this method with\nthe same request content to get back the same stable `debuggee_id`. Agents\nshould call this method again whenever `google.rpc.Code.NOT_FOUND` is\nreturned from any controller method.\n\nThis allows the controller service to disable the agent or recover from any\ndata loss. If the debuggee is disabled by the server, the response will\nhave `is_disabled` set to `true`.", + // "description": "Registers the debuggee with the controller service.\n\nAll agents attached to the same application must call this method with\nexactly the same request content to get back the same stable `debuggee_id`.\nAgents should call this method again whenever `google.rpc.Code.NOT_FOUND`\nis returned from any controller method.\n\nThis protocol allows the controller service to disable debuggees, recover\nfrom data loss, or change the `debuggee_id` format. Agents must handle\n`debuggee_id` value changing upon re-registration.", // "flatPath": "v2/controller/debuggees/register", // "httpMethod": "POST", // "id": "clouddebugger.controller.debuggees.register", @@ -1635,25 +1641,27 @@ func (r *ControllerDebuggeesBreakpointsService) List(debuggeeId string) *Control } // SuccessOnTimeout sets the optional parameter "successOnTimeout": If -// set to `true`, returns `google.rpc.Code.OK` status and sets -// the -// `wait_expired` response field to `true` when the server-selected -// timeout -// has expired (recommended). +// set to `true` (recommended), returns `google.rpc.Code.OK` status +// and +// sets the `wait_expired` response field to `true` when the +// server-selected +// timeout has expired. // -// If set to `false`, returns `google.rpc.Code.ABORTED` status when -// the -// server-selected timeout has expired (deprecated). +// If set to `false` (deprecated), returns `google.rpc.Code.ABORTED` +// status +// when the server-selected timeout has expired. func (c *ControllerDebuggeesBreakpointsListCall) SuccessOnTimeout(successOnTimeout bool) *ControllerDebuggeesBreakpointsListCall { c.urlParams_.Set("successOnTimeout", fmt.Sprint(successOnTimeout)) return c } -// WaitToken sets the optional parameter "waitToken": A wait token that, -// if specified, blocks the method call until the list -// of active breakpoints has changed, or a server selected timeout +// WaitToken sets the optional parameter "waitToken": A token that, if +// specified, blocks the method call until the list +// of active breakpoints has changed, or a server-selected timeout // has -// expired. The value should be set from the last returned response. +// expired. The value should be set from the `next_wait_token` field +// in +// the last response. The initial value should be set to "init". func (c *ControllerDebuggeesBreakpointsListCall) WaitToken(waitToken string) *ControllerDebuggeesBreakpointsListCall { c.urlParams_.Set("waitToken", waitToken) return c @@ -1768,12 +1776,12 @@ func (c *ControllerDebuggeesBreakpointsListCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "successOnTimeout": { - // "description": "If set to `true`, returns `google.rpc.Code.OK` status and sets the\n`wait_expired` response field to `true` when the server-selected timeout\nhas expired (recommended).\n\nIf set to `false`, returns `google.rpc.Code.ABORTED` status when the\nserver-selected timeout has expired (deprecated).", + // "description": "If set to `true` (recommended), returns `google.rpc.Code.OK` status and\nsets the `wait_expired` response field to `true` when the server-selected\ntimeout has expired.\n\nIf set to `false` (deprecated), returns `google.rpc.Code.ABORTED` status\nwhen the server-selected timeout has expired.", // "location": "query", // "type": "boolean" // }, // "waitToken": { - // "description": "A wait token that, if specified, blocks the method call until the list\nof active breakpoints has changed, or a server selected timeout has\nexpired. The value should be set from the last returned response.", + // "description": "A token that, if specified, blocks the method call until the list\nof active breakpoints has changed, or a server-selected timeout has\nexpired. The value should be set from the `next_wait_token` field in\nthe last response. The initial value should be set to `\"init\"`.", // "location": "query", // "type": "string" // } @@ -1803,8 +1811,7 @@ type ControllerDebuggeesBreakpointsUpdateCall struct { } // Update: Updates the breakpoint state or mutable fields. -// The entire Breakpoint message must be sent back to the -// controller +// The entire Breakpoint message must be sent back to the controller // service. // // Updates to active breakpoint fields are only allowed if the new @@ -1911,7 +1918,7 @@ func (c *ControllerDebuggeesBreakpointsUpdateCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Updates the breakpoint state or mutable fields.\nThe entire Breakpoint message must be sent back to the controller\nservice.\n\nUpdates to active breakpoint fields are only allowed if the new value\ndoes not change the breakpoint specification. Updates to the `location`,\n`condition` and `expressions` fields should not alter the breakpoint\nsemantics. These may only make changes such as canonicalizing a value\nor snapping the location to the correct line of code.", + // "description": "Updates the breakpoint state or mutable fields.\nThe entire Breakpoint message must be sent back to the controller service.\n\nUpdates to active breakpoint fields are only allowed if the new value\ndoes not change the breakpoint specification. Updates to the `location`,\n`condition` and `expressions` fields should not alter the breakpoint\nsemantics. These may only make changes such as canonicalizing a value\nor snapping the location to the correct line of code.", // "flatPath": "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}", // "httpMethod": "PUT", // "id": "clouddebugger.controller.debuggees.breakpoints.update", @@ -1958,7 +1965,7 @@ type DebuggerDebuggeesListCall struct { header_ http.Header } -// List: Lists all the debuggees that the user can set breakpoints to. +// List: Lists all the debuggees that the user has access to. func (r *DebuggerDebuggeesService) List() *DebuggerDebuggeesListCall { c := &DebuggerDebuggeesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -1966,7 +1973,7 @@ func (r *DebuggerDebuggeesService) List() *DebuggerDebuggeesListCall { // ClientVersion sets the optional parameter "clientVersion": The client // version making the call. -// Following: `domain/type/version` (e.g., `google.com/intellij/v1`). +// Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). func (c *DebuggerDebuggeesListCall) ClientVersion(clientVersion string) *DebuggerDebuggeesListCall { c.urlParams_.Set("clientVersion", clientVersion) return c @@ -2079,14 +2086,14 @@ func (c *DebuggerDebuggeesListCall) Do(opts ...googleapi.CallOption) (*ListDebug } return ret, nil // { - // "description": "Lists all the debuggees that the user can set breakpoints to.", + // "description": "Lists all the debuggees that the user has access to.", // "flatPath": "v2/debugger/debuggees", // "httpMethod": "GET", // "id": "clouddebugger.debugger.debuggees.list", // "parameterOrder": [], // "parameters": { // "clientVersion": { - // "description": "The client version making the call.\nFollowing: `domain/type/version` (e.g., `google.com/intellij/v1`).", + // "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", // "location": "query", // "type": "string" // }, @@ -2134,7 +2141,7 @@ func (r *DebuggerDebuggeesBreakpointsService) Delete(debuggeeId string, breakpoi // ClientVersion sets the optional parameter "clientVersion": The client // version making the call. -// Following: `domain/type/version` (e.g., `google.com/intellij/v1`). +// Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). func (c *DebuggerDebuggeesBreakpointsDeleteCall) ClientVersion(clientVersion string) *DebuggerDebuggeesBreakpointsDeleteCall { c.urlParams_.Set("clientVersion", clientVersion) return c @@ -2238,7 +2245,7 @@ func (c *DebuggerDebuggeesBreakpointsDeleteCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "clientVersion": { - // "description": "The client version making the call.\nFollowing: `domain/type/version` (e.g., `google.com/intellij/v1`).", + // "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", // "location": "query", // "type": "string" // }, @@ -2283,7 +2290,7 @@ func (r *DebuggerDebuggeesBreakpointsService) Get(debuggeeId string, breakpointI // ClientVersion sets the optional parameter "clientVersion": The client // version making the call. -// Following: `domain/type/version` (e.g., `google.com/intellij/v1`). +// Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). func (c *DebuggerDebuggeesBreakpointsGetCall) ClientVersion(clientVersion string) *DebuggerDebuggeesBreakpointsGetCall { c.urlParams_.Set("clientVersion", clientVersion) return c @@ -2400,7 +2407,7 @@ func (c *DebuggerDebuggeesBreakpointsGetCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "clientVersion": { - // "description": "The client version making the call.\nFollowing: `domain/type/version` (e.g., `google.com/intellij/v1`).", + // "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", // "location": "query", // "type": "string" // }, @@ -2454,7 +2461,7 @@ func (c *DebuggerDebuggeesBreakpointsListCall) ActionValue(actionValue string) * // ClientVersion sets the optional parameter "clientVersion": The client // version making the call. -// Following: `domain/type/version` (e.g., `google.com/intellij/v1`). +// Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). func (c *DebuggerDebuggeesBreakpointsListCall) ClientVersion(clientVersion string) *DebuggerDebuggeesBreakpointsListCall { c.urlParams_.Set("clientVersion", clientVersion) return c @@ -2612,7 +2619,7 @@ func (c *DebuggerDebuggeesBreakpointsListCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "clientVersion": { - // "description": "The client version making the call.\nFollowing: `domain/type/version` (e.g., `google.com/intellij/v1`).", + // "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", // "location": "query", // "type": "string" // }, @@ -2676,7 +2683,7 @@ func (r *DebuggerDebuggeesBreakpointsService) Set(debuggeeId string, breakpoint // ClientVersion sets the optional parameter "clientVersion": The client // version making the call. -// Following: `domain/type/version` (e.g., `google.com/intellij/v1`). +// Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). func (c *DebuggerDebuggeesBreakpointsSetCall) ClientVersion(clientVersion string) *DebuggerDebuggeesBreakpointsSetCall { c.urlParams_.Set("clientVersion", clientVersion) return c @@ -2777,7 +2784,7 @@ func (c *DebuggerDebuggeesBreakpointsSetCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "clientVersion": { - // "description": "The client version making the call.\nFollowing: `domain/type/version` (e.g., `google.com/intellij/v1`).", + // "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", // "location": "query", // "type": "string" // }, diff --git a/vendor/google.golang.org/api/clouderrorreporting/v1beta1/clouderrorreporting-api.json b/vendor/google.golang.org/api/clouderrorreporting/v1beta1/clouderrorreporting-api.json index 86378dfdc..0bdc005fc 100644 --- a/vendor/google.golang.org/api/clouderrorreporting/v1beta1/clouderrorreporting-api.json +++ b/vendor/google.golang.org/api/clouderrorreporting/v1beta1/clouderrorreporting-api.json @@ -1,22 +1,551 @@ { + "ownerDomain": "google.com", + "name": "clouderrorreporting", + "batchPath": "batch", + "title": "Stackdriver Error Reporting API", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "events": { + "methods": { + "list": { + "description": "Lists the specified events.", + "httpMethod": "GET", + "response": { + "$ref": "ListEventsResponse" + }, + "parameterOrder": [ + "projectName" + ], + "parameters": { + "groupId": { + "description": "[Required] The group for which events shall be returned.", + "type": "string", + "location": "query" + }, + "serviceFilter.service": { + "description": "[Optional] The exact value to match against\n[`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).", + "type": "string", + "location": "query" + }, + "pageToken": { + "description": "[Optional] A `next_page_token` provided by a previous response.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "[Optional] The maximum number of results to return per response.", + "type": "integer", + "location": "query" + }, + "serviceFilter.version": { + "location": "query", + "description": "[Optional] The exact value to match against\n[`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).", + "type": "string" + }, + "serviceFilter.resourceType": { + "description": "[Optional] The exact value to match against\n[`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).", + "type": "string", + "location": "query" + }, + "timeRange.period": { + "enum": [ + "PERIOD_UNSPECIFIED", + "PERIOD_1_HOUR", + "PERIOD_6_HOURS", + "PERIOD_1_DAY", + "PERIOD_1_WEEK", + "PERIOD_30_DAYS" + ], + "description": "Restricts the query to the specified time range.", + "type": "string", + "location": "query" + }, + "projectName": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas `projects/` plus the\n[Google Cloud Platform project\nID](https://support.google.com/cloud/answer/6158840).\nExample: `projects/my-project-123`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/events", + "path": "v1beta1/{+projectName}/events", + "id": "clouderrorreporting.projects.events.list" + }, + "report": { + "httpMethod": "POST", + "parameterOrder": [ + "projectName" + ], + "response": { + "$ref": "ReportErrorEventResponse" + }, + "parameters": { + "projectName": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas `projects/` plus the\n[Google Cloud Platform project ID](https://support.google.com/cloud/answer/6158840).\nExample: `projects/my-project-123`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/events:report", + "path": "v1beta1/{+projectName}/events:report", + "id": "clouderrorreporting.projects.events.report", + "description": "Report an individual error event.\n\nThis endpoint accepts \u003cstrong\u003eeither\u003c/strong\u003e an OAuth token,\n\u003cstrong\u003eor\u003c/strong\u003e an\n\u003ca href=\"https://support.google.com/cloud/answer/6158862\"\u003eAPI key\u003c/a\u003e\nfor authentication. To use an API key, append it to the URL as the value of\na `key` parameter. For example:\n\u003cpre\u003ePOST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456\u003c/pre\u003e", + "request": { + "$ref": "ReportedErrorEvent" + } + } + } + }, + "groupStats": { + "methods": { + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListGroupStatsResponse" + }, + "parameterOrder": [ + "projectName" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "timedCountDuration": { + "format": "google-duration", + "description": "[Optional] The preferred duration for a single returned `TimedCount`.\nIf not set, no timed counts are returned.", + "type": "string", + "location": "query" + }, + "pageToken": { + "description": "[Optional] A `next_page_token` provided by a previous response. To view\nadditional results, pass this token along with the identical query\nparameters as the first request.", + "type": "string", + "location": "query" + }, + "timeRange.period": { + "enum": [ + "PERIOD_UNSPECIFIED", + "PERIOD_1_HOUR", + "PERIOD_6_HOURS", + "PERIOD_1_DAY", + "PERIOD_1_WEEK", + "PERIOD_30_DAYS" + ], + "description": "Restricts the query to the specified time range.", + "type": "string", + "location": "query" + }, + "alignment": { + "location": "query", + "enum": [ + "ERROR_COUNT_ALIGNMENT_UNSPECIFIED", + "ALIGNMENT_EQUAL_ROUNDED", + "ALIGNMENT_EQUAL_AT_END" + ], + "description": "[Optional] The alignment of the timed counts to be returned.\nDefault is `ALIGNMENT_EQUAL_AT_END`.", + "type": "string" + }, + "groupId": { + "description": "[Optional] List all \u003ccode\u003eErrorGroupStats\u003c/code\u003e with these IDs.", + "type": "string", + "repeated": true, + "location": "query" + }, + "serviceFilter.service": { + "location": "query", + "description": "[Optional] The exact value to match against\n[`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "[Optional] The maximum number of results to return per response.\nDefault is 20.", + "type": "integer" + }, + "serviceFilter.version": { + "description": "[Optional] The exact value to match against\n[`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).", + "type": "string", + "location": "query" + }, + "order": { + "location": "query", + "enum": [ + "GROUP_ORDER_UNSPECIFIED", + "COUNT_DESC", + "LAST_SEEN_DESC", + "CREATED_DESC", + "AFFECTED_USERS_DESC" + ], + "description": "[Optional] The sort order in which the results are returned.\nDefault is `COUNT_DESC`.", + "type": "string" + }, + "alignmentTime": { + "format": "google-datetime", + "description": "[Optional] Time where the timed counts shall be aligned if rounded\nalignment is chosen. Default is 00:00 UTC.", + "type": "string", + "location": "query" + }, + "serviceFilter.resourceType": { + "location": "query", + "description": "[Optional] The exact value to match against\n[`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).", + "type": "string" + }, + "projectName": { + "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas \u003ccode\u003eprojects/\u003c/code\u003e plus the\n\u003ca href=\"https://support.google.com/cloud/answer/6158840\"\u003eGoogle Cloud\nPlatform project ID\u003c/a\u003e.\n\nExample: \u003ccode\u003eprojects/my-project-123\u003c/code\u003e.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/groupStats", + "path": "v1beta1/{+projectName}/groupStats", + "id": "clouderrorreporting.projects.groupStats.list", + "description": "Lists the specified groups." + } + } + }, + "groups": { + "methods": { + "update": { + "description": "Replace the data for the specified group.\nFails if the group does not exist.", + "request": { + "$ref": "ErrorGroup" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ErrorGroup" + }, + "parameters": { + "name": { + "pattern": "^projects/[^/]+/groups/[^/]+$", + "location": "path", + "description": "The group resource name.\nExample: \u003ccode\u003eprojects/my-project-123/groups/my-groupid\u003c/code\u003e", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/groups/{groupsId}", + "path": "v1beta1/{+name}", + "id": "clouderrorreporting.projects.groups.update" + }, + "get": { + "response": { + "$ref": "ErrorGroup" + }, + "parameterOrder": [ + "groupName" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "groupName": { + "pattern": "^projects/[^/]+/groups/[^/]+$", + "location": "path", + "description": "[Required] The group resource name. Written as\n\u003ccode\u003eprojects/\u003cvar\u003eprojectID\u003c/var\u003e/groups/\u003cvar\u003egroup_name\u003c/var\u003e\u003c/code\u003e.\nCall\n\u003ca href=\"/error-reporting/reference/rest/v1beta1/projects.groupStats/list\"\u003e\n\u003ccode\u003egroupStats.list\u003c/code\u003e\u003c/a\u003e to return a list of groups belonging to\nthis project.\n\nExample: \u003ccode\u003eprojects/my-project-123/groups/my-group\u003c/code\u003e", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta1/projects/{projectsId}/groups/{groupsId}", + "id": "clouderrorreporting.projects.groups.get", + "path": "v1beta1/{+groupName}", + "description": "Get the specified group." + } + } + } + }, + "methods": { + "deleteEvents": { + "response": { + "$ref": "DeleteEventsResponse" + }, + "parameterOrder": [ + "projectName" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectName": { + "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas `projects/` plus the\n[Google Cloud Platform project\nID](https://support.google.com/cloud/answer/6158840).\nExample: `projects/my-project-123`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/events", + "id": "clouderrorreporting.projects.deleteEvents", + "path": "v1beta1/{+projectName}/events", + "description": "Deletes all error events of a given project." + } + } + } + }, + "parameters": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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", + "description": "Data format for response.", + "default": "json" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "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.", + "type": "string", + "location": "query" + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + } + }, + "version": "v1beta1", + "baseUrl": "https://clouderrorreporting.googleapis.com/", "servicePath": "", - "kind": "discovery#restDescription", "description": "Groups and counts similar errors from cloud services and applications, reports new errors, and provides access to error groups and their associated errors.\n", + "kind": "discovery#restDescription", "basePath": "", - "revision": "20170728", "documentationLink": "https://cloud.google.com/error-reporting/", + "revision": "20170825", "id": "clouderrorreporting:v1beta1", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "ErrorEvent": { + "description": "An error event which is returned by the Error Reporting system.", + "type": "object", + "properties": { + "context": { + "description": "Data about the context in which the error occurred.", + "$ref": "ErrorContext" + }, + "message": { + "description": "The stack trace that was reported or logged by the service.", + "type": "string" + }, + "serviceContext": { + "$ref": "ServiceContext", + "description": "The `ServiceContext` for which this error was reported." + }, + "eventTime": { + "format": "google-datetime", + "description": "Time when the event occurred as provided in the error report.\nIf the report did not contain a timestamp, the time the error was received\nby the Error Reporting system is used.", + "type": "string" + } + }, + "id": "ErrorEvent" + }, + "ReportedErrorEvent": { + "description": "An error event which is reported to the Error Reporting system.", + "type": "object", + "properties": { + "context": { + "description": "[Optional] A description of the context in which the error occurred.", + "$ref": "ErrorContext" + }, + "message": { + "description": "[Required] The error message.\nIf no `context.reportLocation` is provided, the message must contain a\nheader (typically consisting of the exception type name and an error\nmessage) and an exception stack trace in one of the supported programming\nlanguages and formats.\nSupported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go.\nSupported stack trace formats are:\n\n* **Java**: Must be the return value of [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29).\n* **Python**: Must be the return value of [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc).\n* **JavaScript**: Must be the value of [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API)\nas returned by V8.\n* **Ruby**: Must contain frames returned by [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace).\n* **C#**: Must be the return value of [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx).\n* **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)`\nand contain the result of [`(string)$exception`](http://php.net/manual/en/exception.tostring.php).\n* **Go**: Must be the return value of [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack).", + "type": "string" + }, + "serviceContext": { + "description": "[Required] The service context in which this error has occurred.", + "$ref": "ServiceContext" + }, + "eventTime": { + "format": "google-datetime", + "description": "[Optional] Time when the event occurred.\nIf not provided, the time when the event was received by the\nError Reporting system will be used.", + "type": "string" + } + }, + "id": "ReportedErrorEvent" + }, + "ErrorContext": { + "properties": { + "sourceReferences": { + "description": "Source code that was used to build the executable which has\ncaused the given error message.", + "items": { + "$ref": "SourceReference" + }, + "type": "array" + }, + "reportLocation": { + "$ref": "SourceLocation", + "description": "The location in the source code where the decision was made to\nreport the error, usually the place where it was logged.\nFor a logged exception this would be the source line where the\nexception is logged, usually close to the place where it was\ncaught." + }, + "httpRequest": { + "description": "The HTTP request which was processed when the error was\ntriggered.", + "$ref": "HttpRequestContext" + }, + "user": { + "description": "The user who caused or was affected by the crash.\nThis can be a user ID, an email address, or an arbitrary token that\nuniquely identifies the user.\nWhen sending an error report, leave this field empty if the user was not\nlogged in. In this case the\nError Reporting system will use other data, such as remote IP address, to\ndistinguish affected users. See `affected_users_count` in\n`ErrorGroupStats`.", + "type": "string" + } + }, + "id": "ErrorContext", + "description": "A description of the context in which an error occurred.\nThis data should be provided by the application when reporting an error,\nunless the\nerror report has been generated automatically from Google App Engine logs.", + "type": "object" + }, + "TrackingIssue": { + "properties": { + "url": { + "description": "A URL pointing to a related entry in an issue tracking system.\nExample: https://github.com/user/project/issues/4", + "type": "string" + } + }, + "id": "TrackingIssue", + "description": "Information related to tracking the progress on resolving the error.", + "type": "object" + }, + "ErrorGroupStats": { + "description": "Data extracted for a specific group based on certain filter criteria,\nsuch as a given time period and/or service filter.", + "type": "object", + "properties": { + "group": { + "$ref": "ErrorGroup", + "description": "Group data that is independent of the filter criteria." + }, + "firstSeenTime": { + "format": "google-datetime", + "description": "Approximate first occurrence that was ever seen for this group\nand which matches the given filter criteria, ignoring the\ntime_range that was specified in the request.", + "type": "string" + }, + "count": { + "format": "int64", + "description": "Approximate total number of events in the given group that match\nthe filter criteria.", + "type": "string" + }, + "affectedUsersCount": { + "format": "int64", + "description": "Approximate number of affected users in the given group that\nmatch the filter criteria.\nUsers are distinguished by data in the `ErrorContext` of the\nindividual error events, such as their login name or their remote\nIP address in case of HTTP requests.\nThe number of affected users can be zero even if the number of\nerrors is non-zero if no data was provided from which the\naffected user could be deduced.\nUsers are counted based on data in the request\ncontext that was provided in the error report. If more users are\nimplicitly affected, such as due to a crash of the whole service,\nthis is not reflected here.", + "type": "string" + }, + "lastSeenTime": { + "format": "google-datetime", + "description": "Approximate last occurrence that was ever seen for this group and\nwhich matches the given filter criteria, ignoring the time_range\nthat was specified in the request.", + "type": "string" + }, + "numAffectedServices": { + "format": "int32", + "description": "The total number of services with a non-zero error count for the given\nfilter criteria.", + "type": "integer" + }, + "affectedServices": { + "description": "Service contexts with a non-zero error count for the given filter\ncriteria. This list can be truncated if multiple services are affected.\nRefer to `num_affected_services` for the total count.", + "items": { + "$ref": "ServiceContext" + }, + "type": "array" + }, + "representative": { + "$ref": "ErrorEvent", + "description": "An arbitrary event that is chosen as representative for the whole group.\nThe representative event is intended to be used as a quick preview for\nthe whole group. Events in the group are usually sufficiently similar\nto each other such that showing an arbitrary representative provides\ninsight into the characteristics of the group as a whole." + }, + "timedCounts": { + "description": "Approximate number of occurrences over time.\nTimed counts returned by ListGroups are guaranteed to be:\n\n- Inside the requested time interval\n- Non-overlapping, and\n- Ordered by ascending time.", + "items": { + "$ref": "TimedCount" + }, + "type": "array" + } + }, + "id": "ErrorGroupStats" + }, "ListEventsResponse": { "description": "Contains a set of requested error events.", "type": "object", "properties": { - "nextPageToken": { - "description": "If non-empty, more results are available.\nPass this token, along with the same query parameters as the first\nrequest, to view the next page of results.", - "type": "string" - }, "timeRangeBegin": { "format": "google-datetime", "description": "The timestamp specifies the start time to which the request was restricted.", @@ -28,13 +557,15 @@ "$ref": "ErrorEvent" }, "type": "array" + }, + "nextPageToken": { + "description": "If non-empty, more results are available.\nPass this token, along with the same query parameters as the first\nrequest, to view the next page of results.", + "type": "string" } }, "id": "ListEventsResponse" }, "TimedCount": { - "description": "The number of errors in a given time period.\nAll numbers are approximate since the error events are sampled\nbefore counting them.", - "type": "object", "properties": { "endTime": { "format": "google-datetime", @@ -52,7 +583,9 @@ "type": "string" } }, - "id": "TimedCount" + "id": "TimedCount", + "description": "The number of errors in a given time period.\nAll numbers are approximate since the error events are sampled\nbefore counting them.", + "type": "object" }, "ErrorGroup": { "description": "Description of a group of similar error events.", @@ -77,8 +610,6 @@ "id": "ErrorGroup" }, "SourceLocation": { - "description": "Indicates a location in the source code of the service for which errors are\nreported. `functionName` must be provided by the application when reporting\nan error, unless the error report contains a `message` with a supported\nexception stack trace. All fields are optional for the later case.", - "type": "object", "properties": { "functionName": { "description": "Human-readable name of a function or method.\nThe value can include optional context like the class or package name.\nFor example, `my.package.MyClass.method` in case of Java.", @@ -94,7 +625,9 @@ "type": "integer" } }, - "id": "SourceLocation" + "id": "SourceLocation", + "description": "Indicates a location in the source code of the service for which errors are\nreported. `functionName` must be provided by the application when reporting\nan error, unless the error report contains a `message` with a supported\nexception stack trace. All fields are optional for the later case.", + "type": "object" }, "ServiceContext": { "properties": { @@ -154,6 +687,8 @@ "id": "HttpRequestContext" }, "ListGroupStatsResponse": { + "description": "Contains a set of requested error group stats.", + "type": "object", "properties": { "nextPageToken": { "description": "If non-empty, more results are available.\nPass this token, along with the same query parameters as the first\nrequest, to view the next page of results.", @@ -172,17 +707,11 @@ "type": "array" } }, - "id": "ListGroupStatsResponse", - "description": "Contains a set of requested error group stats.", - "type": "object" - }, - "DeleteEventsResponse": { - "description": "Response message for deleting error events.", - "type": "object", - "properties": {}, - "id": "DeleteEventsResponse" + "id": "ListGroupStatsResponse" }, "SourceReference": { + "description": "A reference to a particular snapshot of the source tree used to build and\ndeploy an application.", + "type": "object", "properties": { "revisionId": { "description": "The canonical and persistent identifier of the deployed revision.\nExample (git): \"0035781c50ec7aa23385dc841529ce8a4b70db1b\"", @@ -193,155 +722,20 @@ "type": "string" } }, - "id": "SourceReference", - "description": "A reference to a particular snapshot of the source tree used to build and\ndeploy an application.", - "type": "object" + "id": "SourceReference" }, - "ErrorEvent": { - "description": "An error event which is returned by the Error Reporting system.", - "type": "object", - "properties": { - "serviceContext": { - "description": "The `ServiceContext` for which this error was reported.", - "$ref": "ServiceContext" - }, - "eventTime": { - "format": "google-datetime", - "description": "Time when the event occurred as provided in the error report.\nIf the report did not contain a timestamp, the time the error was received\nby the Error Reporting system is used.", - "type": "string" - }, - "context": { - "$ref": "ErrorContext", - "description": "Data about the context in which the error occurred." - }, - "message": { - "description": "The stack trace that was reported or logged by the service.", - "type": "string" - } - }, - "id": "ErrorEvent" - }, - "ReportedErrorEvent": { - "properties": { - "serviceContext": { - "description": "[Required] The service context in which this error has occurred.", - "$ref": "ServiceContext" - }, - "eventTime": { - "format": "google-datetime", - "description": "[Optional] Time when the event occurred.\nIf not provided, the time when the event was received by the\nError Reporting system will be used.", - "type": "string" - }, - "context": { - "$ref": "ErrorContext", - "description": "[Optional] A description of the context in which the error occurred." - }, - "message": { - "description": "[Required] The error message.\nIf no `context.reportLocation` is provided, the message must contain a\nheader (typically consisting of the exception type name and an error\nmessage) and an exception stack trace in one of the supported programming\nlanguages and formats.\nSupported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go.\nSupported stack trace formats are:\n\n* **Java**: Must be the return value of [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29).\n* **Python**: Must be the return value of [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc).\n* **JavaScript**: Must be the value of [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API)\nas returned by V8.\n* **Ruby**: Must contain frames returned by [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace).\n* **C#**: Must be the return value of [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx).\n* **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)`\nand contain the result of [`(string)$exception`](http://php.net/manual/en/exception.tostring.php).\n* **Go**: Must be the return value of [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack).", - "type": "string" - } - }, - "id": "ReportedErrorEvent", - "description": "An error event which is reported to the Error Reporting system.", - "type": "object" - }, - "ErrorContext": { - "description": "A description of the context in which an error occurred.\nThis data should be provided by the application when reporting an error,\nunless the\nerror report has been generated automatically from Google App Engine logs.", - "type": "object", - "properties": { - "user": { - "description": "The user who caused or was affected by the crash.\nThis can be a user ID, an email address, or an arbitrary token that\nuniquely identifies the user.\nWhen sending an error report, leave this field empty if the user was not\nlogged in. In this case the\nError Reporting system will use other data, such as remote IP address, to\ndistinguish affected users. See `affected_users_count` in\n`ErrorGroupStats`.", - "type": "string" - }, - "sourceReferences": { - "description": "Source code that was used to build the executable which has\ncaused the given error message.", - "items": { - "$ref": "SourceReference" - }, - "type": "array" - }, - "reportLocation": { - "$ref": "SourceLocation", - "description": "The location in the source code where the decision was made to\nreport the error, usually the place where it was logged.\nFor a logged exception this would be the source line where the\nexception is logged, usually close to the place where it was\ncaught." - }, - "httpRequest": { - "$ref": "HttpRequestContext", - "description": "The HTTP request which was processed when the error was\ntriggered." - } - }, - "id": "ErrorContext" - }, - "TrackingIssue": { - "description": "Information related to tracking the progress on resolving the error.", - "type": "object", - "properties": { - "url": { - "description": "A URL pointing to a related entry in an issue tracking system.\nExample: https://github.com/user/project/issues/4", - "type": "string" - } - }, - "id": "TrackingIssue" - }, - "ErrorGroupStats": { - "properties": { - "group": { - "description": "Group data that is independent of the filter criteria.", - "$ref": "ErrorGroup" - }, - "firstSeenTime": { - "format": "google-datetime", - "description": "Approximate first occurrence that was ever seen for this group\nand which matches the given filter criteria, ignoring the\ntime_range that was specified in the request.", - "type": "string" - }, - "count": { - "format": "int64", - "description": "Approximate total number of events in the given group that match\nthe filter criteria.", - "type": "string" - }, - "lastSeenTime": { - "format": "google-datetime", - "description": "Approximate last occurrence that was ever seen for this group and\nwhich matches the given filter criteria, ignoring the time_range\nthat was specified in the request.", - "type": "string" - }, - "affectedUsersCount": { - "format": "int64", - "description": "Approximate number of affected users in the given group that\nmatch the filter criteria.\nUsers are distinguished by data in the `ErrorContext` of the\nindividual error events, such as their login name or their remote\nIP address in case of HTTP requests.\nThe number of affected users can be zero even if the number of\nerrors is non-zero if no data was provided from which the\naffected user could be deduced.\nUsers are counted based on data in the request\ncontext that was provided in the error report. If more users are\nimplicitly affected, such as due to a crash of the whole service,\nthis is not reflected here.", - "type": "string" - }, - "affectedServices": { - "description": "Service contexts with a non-zero error count for the given filter\ncriteria. This list can be truncated if multiple services are affected.\nRefer to `num_affected_services` for the total count.", - "items": { - "$ref": "ServiceContext" - }, - "type": "array" - }, - "numAffectedServices": { - "format": "int32", - "description": "The total number of services with a non-zero error count for the given\nfilter criteria.", - "type": "integer" - }, - "representative": { - "$ref": "ErrorEvent", - "description": "An arbitrary event that is chosen as representative for the whole group.\nThe representative event is intended to be used as a quick preview for\nthe whole group. Events in the group are usually sufficiently similar\nto each other such that showing an arbitrary representative provides\ninsight into the characteristics of the group as a whole." - }, - "timedCounts": { - "description": "Approximate number of occurrences over time.\nTimed counts returned by ListGroups are guaranteed to be:\n\n- Inside the requested time interval\n- Non-overlapping, and\n- Ordered by ascending time.", - "items": { - "$ref": "TimedCount" - }, - "type": "array" - } - }, - "id": "ErrorGroupStats", - "description": "Data extracted for a specific group based on certain filter criteria,\nsuch as a given time period and/or service filter.", + "DeleteEventsResponse": { + "properties": {}, + "id": "DeleteEventsResponse", + "description": "Response message for deleting error events.", "type": "object" } }, + "protocol": "rest", "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "protocol": "rest", "canonicalName": "Clouderrorreporting", "auth": { "oauth2": { @@ -352,399 +746,5 @@ } } }, - "rootUrl": "https://clouderrorreporting.googleapis.com/", - "ownerDomain": "google.com", - "name": "clouderrorreporting", - "batchPath": "batch", - "title": "Stackdriver Error Reporting API", - "ownerName": "Google", - "resources": { - "projects": { - "resources": { - "groupStats": { - "methods": { - "list": { - "response": { - "$ref": "ListGroupStatsResponse" - }, - "parameterOrder": [ - "projectName" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "alignment": { - "enum": [ - "ERROR_COUNT_ALIGNMENT_UNSPECIFIED", - "ALIGNMENT_EQUAL_ROUNDED", - "ALIGNMENT_EQUAL_AT_END" - ], - "description": "[Optional] The alignment of the timed counts to be returned.\nDefault is `ALIGNMENT_EQUAL_AT_END`.", - "type": "string", - "location": "query" - }, - "groupId": { - "description": "[Optional] List all \u003ccode\u003eErrorGroupStats\u003c/code\u003e with these IDs.", - "type": "string", - "repeated": true, - "location": "query" - }, - "serviceFilter.service": { - "description": "[Optional] The exact value to match against\n[`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "[Optional] The maximum number of results to return per response.\nDefault is 20.", - "type": "integer", - "location": "query" - }, - "serviceFilter.version": { - "location": "query", - "description": "[Optional] The exact value to match against\n[`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).", - "type": "string" - }, - "order": { - "enum": [ - "GROUP_ORDER_UNSPECIFIED", - "COUNT_DESC", - "LAST_SEEN_DESC", - "CREATED_DESC", - "AFFECTED_USERS_DESC" - ], - "description": "[Optional] The sort order in which the results are returned.\nDefault is `COUNT_DESC`.", - "type": "string", - "location": "query" - }, - "alignmentTime": { - "format": "google-datetime", - "description": "[Optional] Time where the timed counts shall be aligned if rounded\nalignment is chosen. Default is 00:00 UTC.", - "type": "string", - "location": "query" - }, - "serviceFilter.resourceType": { - "location": "query", - "description": "[Optional] The exact value to match against\n[`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).", - "type": "string" - }, - "projectName": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas \u003ccode\u003eprojects/\u003c/code\u003e plus the\n\u003ca href=\"https://support.google.com/cloud/answer/6158840\"\u003eGoogle Cloud\nPlatform project ID\u003c/a\u003e.\n\nExample: \u003ccode\u003eprojects/my-project-123\u003c/code\u003e.", - "type": "string", - "required": true - }, - "timedCountDuration": { - "location": "query", - "format": "google-duration", - "description": "[Optional] The preferred duration for a single returned `TimedCount`.\nIf not set, no timed counts are returned.", - "type": "string" - }, - "pageToken": { - "location": "query", - "description": "[Optional] A `next_page_token` provided by a previous response. To view\nadditional results, pass this token along with the identical query\nparameters as the first request.", - "type": "string" - }, - "timeRange.period": { - "location": "query", - "enum": [ - "PERIOD_UNSPECIFIED", - "PERIOD_1_HOUR", - "PERIOD_6_HOURS", - "PERIOD_1_DAY", - "PERIOD_1_WEEK", - "PERIOD_30_DAYS" - ], - "description": "Restricts the query to the specified time range.", - "type": "string" - } - }, - "flatPath": "v1beta1/projects/{projectsId}/groupStats", - "id": "clouderrorreporting.projects.groupStats.list", - "path": "v1beta1/{+projectName}/groupStats", - "description": "Lists the specified groups." - } - } - }, - "groups": { - "methods": { - "get": { - "httpMethod": "GET", - "response": { - "$ref": "ErrorGroup" - }, - "parameterOrder": [ - "groupName" - ], - "parameters": { - "groupName": { - "pattern": "^projects/[^/]+/groups/[^/]+$", - "location": "path", - "description": "[Required] The group resource name. Written as\n\u003ccode\u003eprojects/\u003cvar\u003eprojectID\u003c/var\u003e/groups/\u003cvar\u003egroup_name\u003c/var\u003e\u003c/code\u003e.\nCall\n\u003ca href=\"/error-reporting/reference/rest/v1beta1/projects.groupStats/list\"\u003e\n\u003ccode\u003egroupStats.list\u003c/code\u003e\u003c/a\u003e to return a list of groups belonging to\nthis project.\n\nExample: \u003ccode\u003eprojects/my-project-123/groups/my-group\u003c/code\u003e", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/groups/{groupsId}", - "path": "v1beta1/{+groupName}", - "id": "clouderrorreporting.projects.groups.get", - "description": "Get the specified group." - }, - "update": { - "response": { - "$ref": "ErrorGroup" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PUT", - "parameters": { - "name": { - "description": "The group resource name.\nExample: \u003ccode\u003eprojects/my-project-123/groups/my-groupid\u003c/code\u003e", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/groups/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/groups/{groupsId}", - "id": "clouderrorreporting.projects.groups.update", - "path": "v1beta1/{+name}", - "description": "Replace the data for the specified group.\nFails if the group does not exist.", - "request": { - "$ref": "ErrorGroup" - } - } - } - }, - "events": { - "methods": { - "report": { - "path": "v1beta1/{+projectName}/events:report", - "id": "clouderrorreporting.projects.events.report", - "description": "Report an individual error event.\n\nThis endpoint accepts \u003cstrong\u003eeither\u003c/strong\u003e an OAuth token,\n\u003cstrong\u003eor\u003c/strong\u003e an\n\u003ca href=\"https://support.google.com/cloud/answer/6158862\"\u003eAPI key\u003c/a\u003e\nfor authentication. To use an API key, append it to the URL as the value of\na `key` parameter. For example:\n\u003cpre\u003ePOST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456\u003c/pre\u003e", - "request": { - "$ref": "ReportedErrorEvent" - }, - "httpMethod": "POST", - "parameterOrder": [ - "projectName" - ], - "response": { - "$ref": "ReportErrorEventResponse" - }, - "parameters": { - "projectName": { - "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas `projects/` plus the\n[Google Cloud Platform project ID](https://support.google.com/cloud/answer/6158840).\nExample: `projects/my-project-123`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/events:report" - }, - "list": { - "description": "Lists the specified events.", - "response": { - "$ref": "ListEventsResponse" - }, - "parameterOrder": [ - "projectName" - ], - "httpMethod": "GET", - "parameters": { - "serviceFilter.version": { - "location": "query", - "description": "[Optional] The exact value to match against\n[`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).", - "type": "string" - }, - "serviceFilter.resourceType": { - "description": "[Optional] The exact value to match against\n[`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).", - "type": "string", - "location": "query" - }, - "timeRange.period": { - "enum": [ - "PERIOD_UNSPECIFIED", - "PERIOD_1_HOUR", - "PERIOD_6_HOURS", - "PERIOD_1_DAY", - "PERIOD_1_WEEK", - "PERIOD_30_DAYS" - ], - "description": "Restricts the query to the specified time range.", - "type": "string", - "location": "query" - }, - "projectName": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas `projects/` plus the\n[Google Cloud Platform project\nID](https://support.google.com/cloud/answer/6158840).\nExample: `projects/my-project-123`.", - "type": "string", - "required": true - }, - "groupId": { - "location": "query", - "description": "[Required] The group for which events shall be returned.", - "type": "string" - }, - "serviceFilter.service": { - "description": "[Optional] The exact value to match against\n[`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).", - "type": "string", - "location": "query" - }, - "pageToken": { - "location": "query", - "description": "[Optional] A `next_page_token` provided by a previous response.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "[Optional] The maximum number of results to return per response.", - "type": "integer", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/events", - "id": "clouderrorreporting.projects.events.list", - "path": "v1beta1/{+projectName}/events" - } - } - } - }, - "methods": { - "deleteEvents": { - "description": "Deletes all error events of a given project.", - "httpMethod": "DELETE", - "response": { - "$ref": "DeleteEventsResponse" - }, - "parameterOrder": [ - "projectName" - ], - "parameters": { - "projectName": { - "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas `projects/` plus the\n[Google Cloud Platform project\nID](https://support.google.com/cloud/answer/6158840).\nExample: `projects/my-project-123`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/events", - "path": "v1beta1/{+projectName}/events", - "id": "clouderrorreporting.projects.deleteEvents" - } - } - } - }, - "parameters": { - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "alt": { - "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", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "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.", - "type": "string", - "location": "query" - }, - "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.", - "type": "string", - "location": "query" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - } - }, - "version": "v1beta1", - "baseUrl": "https://clouderrorreporting.googleapis.com/" + "rootUrl": "https://clouderrorreporting.googleapis.com/" } 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 e83dd165d..1023fd752 100644 --- a/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-api.json +++ b/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-api.json @@ -1,22 +1,92 @@ { + "rootUrl": "https://cloudfunctions.googleapis.com/", + "ownerDomain": "google.com", + "name": "cloudfunctions", + "batchPath": "batch", + "fullyEncodeReservedExpansion": true, "title": "Google Cloud Functions API", "ownerName": "Google", "resources": { + "operations": { + "methods": { + "get": { + "path": "v1/{+name}", + "id": "cloudfunctions.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "httpMethod": "GET", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^operations/[^/]+$", + "location": "path", + "description": "The name of the operation resource." + } + }, + "flatPath": "v1/operations/{operationsId}" + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ListOperationsResponse" + }, + "parameters": { + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "name": { + "location": "query", + "description": "The name of the operation's parent resource.", + "type": "string" + }, + "pageSize": { + "type": "integer", + "location": "query", + "format": "int32", + "description": "The standard list page size." + }, + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/operations", + "path": "v1/operations", + "id": "cloudfunctions.operations.list" + } + } + }, "projects": { "resources": { "locations": { "methods": { "list": { + "path": "v1/{+name}/locations", + "id": "cloudfunctions.projects.locations.list", "description": "Lists information about the supported locations for this service.", "httpMethod": "GET", - "parameterOrder": [ - "name" - ], "response": { "$ref": "ListLocationsResponse" }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "parameterOrder": [ + "name" ], "parameters": { "pageToken": { @@ -25,100 +95,51 @@ "type": "string" }, "name": { - "pattern": "^projects/[^/]+$", - "location": "path", "description": "The resource that owns the locations collection, if applicable.", "type": "string", - "required": true + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" }, "pageSize": { + "location": "query", "format": "int32", "description": "The standard list page size.", - "type": "integer", - "location": "query" + "type": "integer" }, "filter": { + "location": "query", "description": "The standard list filter.", - "type": "string", - "location": "query" + "type": "string" } }, - "flatPath": "v1/projects/{projectsId}/locations", - "path": "v1/{+name}/locations", - "id": "cloudfunctions.projects.locations.list" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations" } } } } - }, - "operations": { - "methods": { - "get": { - "parameters": { - "name": { - "pattern": "^operations/[^/]+$", - "location": "path", - "description": "The name of the operation resource.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/operations/{operationsId}", - "id": "cloudfunctions.operations.get", - "path": "v1/{+name}", - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET" - }, - "list": { - "path": "v1/operations", - "id": "cloudfunctions.operations.list", - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", - "httpMethod": "GET", - "parameterOrder": [], - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "name": { - "location": "query", - "description": "The name of the operation's parent resource.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "The standard list page size.", - "type": "integer", - "location": "query" - }, - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1/operations" - } - } } }, "parameters": { + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, "upload_protocol": { "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", @@ -130,16 +151,16 @@ "type": "boolean", "location": "query" }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, "fields": { "location": "query", "description": "Selector specifying which fields to include in a partial response.", "type": "string" }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, "$.xgafv": { "enumDescriptions": [ "v1 error format", @@ -159,12 +180,6 @@ "type": "string" }, "alt": { - "type": "string", - "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", "description": "Data format for response.", "default": "json", @@ -172,6 +187,12 @@ "json", "media", "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" ] }, "access_token": { @@ -180,93 +201,42 @@ "location": "query" }, "key": { + "location": "query", "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.", - "type": "string", - "location": "query" + "type": "string" }, "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.", "type": "string", "location": "query" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" } }, "version": "v1", "baseUrl": "https://cloudfunctions.googleapis.com/", - "kind": "discovery#restDescription", - "description": "API for managing lightweight user-provided functions executed in response to events.", "servicePath": "", + "description": "API for managing lightweight user-provided functions executed in response to events.", + "kind": "discovery#restDescription", "basePath": "", - "id": "cloudfunctions:v1", "documentationLink": "https://cloud.google.com/functions", - "revision": "20170729", + "revision": "20170912", + "id": "cloudfunctions:v1", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { - "OperationMetadataV1Beta2": { - "description": "Metadata describing an Operation", - "type": "object", - "properties": { - "target": { - "description": "Target of the operation - for example\nprojects/project-1/locations/region-1/functions/function-1", - "type": "string" - }, - "request": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The original request that started the operation.", - "type": "object" - }, - "type": { - "enumDescriptions": [ - "Unknown operation type.", - "Triggered by CreateFunction call", - "Triggered by UpdateFunction call", - "Triggered by DeleteFunction call." - ], - "enum": [ - "OPERATION_UNSPECIFIED", - "CREATE_FUNCTION", - "UPDATE_FUNCTION", - "DELETE_FUNCTION" - ], - "description": "Type of operation.", - "type": "string" - } - }, - "id": "OperationMetadataV1Beta2" - }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client." }, "details": { "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." }, "type": "object" }, @@ -281,42 +251,42 @@ "id": "Status" }, "ListLocationsResponse": { - "id": "ListLocationsResponse", "description": "The response message for Locations.ListLocations.", "type": "object", "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, "locations": { "description": "A list of locations that matches the specified filter in the request.", "items": { "$ref": "Location" }, "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" } - } + }, + "id": "ListLocationsResponse" }, "Location": { "description": "A resource that represents Google Cloud Platform location.", "type": "object", "properties": { "name": { - "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", - "type": "string" + "type": "string", + "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`" }, "locationId": { - "description": "The canonical id for this location. For example: `\"us-east1\"`.", - "type": "string" + "type": "string", + "description": "The canonical id for this location. For example: `\"us-east1\"`." }, "metadata": { - "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", - "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - } + }, + "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", + "type": "object" }, "labels": { "additionalProperties": { @@ -328,45 +298,7 @@ }, "id": "Location" }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", - "properties": { - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" - }, - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "type": "object" - }, - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "response": { - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - } - }, - "id": "Operation" - }, "ListOperationsResponse": { - "id": "ListOperationsResponse", - "description": "The response message for Operations.ListOperations.", - "type": "object", "properties": { "nextPageToken": { "description": "The standard List next-page token.", @@ -379,14 +311,87 @@ }, "type": "array" } - } + }, + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations.", + "type": "object" + }, + "Operation": { + "type": "object", + "properties": { + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object" + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" + } + }, + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call." + }, + "OperationMetadataV1Beta2": { + "description": "Metadata describing an Operation", + "type": "object", + "properties": { + "type": { + "enum": [ + "OPERATION_UNSPECIFIED", + "CREATE_FUNCTION", + "UPDATE_FUNCTION", + "DELETE_FUNCTION" + ], + "description": "Type of operation.", + "type": "string", + "enumDescriptions": [ + "Unknown operation type.", + "Triggered by CreateFunction call", + "Triggered by UpdateFunction call", + "Triggered by DeleteFunction call." + ] + }, + "target": { + "type": "string", + "description": "Target of the operation - for example\nprojects/project-1/locations/region-1/functions/function-1" + }, + "request": { + "description": "The original request that started the operation.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + }, + "id": "OperationMetadataV1Beta2" } }, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, "canonicalName": "Cloud Functions", "auth": { "oauth2": { @@ -396,9 +401,5 @@ } } } - }, - "rootUrl": "https://cloudfunctions.googleapis.com/", - "ownerDomain": "google.com", - "name": "cloudfunctions", - "batchPath": "batch" + } } 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 4b09b013a..cdabb50bd 100644 --- a/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-gen.go +++ b/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-gen.go @@ -232,8 +232,8 @@ func (s *Location) MarshalJSON() ([]byte, error) { type Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` diff --git a/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-api.json b/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-api.json index 6e2655d5f..12a11ce58 100644 --- a/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-api.json +++ b/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-api.json @@ -1,42 +1,403 @@ { - "id": "cloudfunctions:v1beta2", - "documentationLink": "https://cloud.google.com/functions", - "revision": "20170729", - "discoveryVersion": "v1", - "version_module": "True", - "schemas": { - "EventTrigger": { - "description": "Describes EventTrigger, used to request events be sent from another\nservice.", - "type": "object", - "properties": { - "eventType": { - "description": "`event_type` names contain the service that is sending an event and the\nkind of event that was fired. Must be of the form\n`providers/*/eventTypes/*` e.g. Directly handle a Message published to\nGoogle Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`\n\n Handle an object changing in Google Cloud Storage\n `providers/cloud.storage/eventTypes/object.change`\n\n Handle a write to the Firebase Realtime Database\n `providers/firebase.database/eventTypes/data.write`", - "type": "string" + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "list": { + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ListLocationsResponse" + }, + "httpMethod": "GET", + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + }, + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectsId}/locations", + "id": "cloudfunctions.projects.locations.list", + "path": "v1beta2/{+name}/locations", + "description": "Lists information about the supported locations for this service." + } + }, + "resources": { + "functions": { + "methods": { + "delete": { + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + "id": "cloudfunctions.projects.locations.functions.delete", + "path": "v1beta2/{+name}", + "description": "Deletes a function with the given name from the specified project. If the\ngiven function is used by some trigger, the trigger will be updated to\nremove this function.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "location": "path", + "description": "The name of the function which should be deleted." + } + } + }, + "list": { + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions", + "id": "cloudfunctions.projects.locations.functions.list", + "path": "v1beta2/{+location}/functions", + "description": "Returns a list of functions that belong to the requested project.", + "response": { + "$ref": "ListFunctionsResponse" + }, + "parameterOrder": [ + "location" + ], + "httpMethod": "GET", + "parameters": { + "location": { + "location": "path", + "description": "The project and location from which the function should be listed,\nspecified in the format `projects/*/locations/*`\nIf you want to list functions in all locations, use \"-\" in place of a\nlocation.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$" + }, + "pageToken": { + "description": "The value returned by the last\n`ListFunctionsResponse`; indicates that\nthis is a continuation of a prior `ListFunctions` call, and that the\nsystem should return the next page of data.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Maximum number of functions to return per call.", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions", + "id": "cloudfunctions.projects.locations.functions.create", + "path": "v1beta2/{+location}/functions", + "description": "Creates a new function. If a function with the given name already exists in\nthe specified project, the long running operation will return\n`ALREADY_EXISTS` error.", + "request": { + "$ref": "CloudFunction" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "location" + ], + "httpMethod": "POST", + "parameters": { + "location": { + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path", + "description": "The project and location in which the function should be created, specified\nin the format `projects/*/locations/*`", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "call": { + "description": "Invokes synchronously deployed function. To be used for testing, very\nlimited traffic allowed.", + "request": { + "$ref": "CallFunctionRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "CallFunctionResponse" + }, + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "location": "path", + "description": "The name of the function to be called." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:call", + "path": "v1beta2/{+name}:call", + "id": "cloudfunctions.projects.locations.functions.call" + }, + "get": { + "response": { + "$ref": "CloudFunction" + }, + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the function which details should be obtained.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + "id": "cloudfunctions.projects.locations.functions.get", + "path": "v1beta2/{+name}", + "description": "Returns a function with the given name from the requested project." + }, + "update": { + "httpMethod": "PUT", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "name": { + "description": "The name of the function to be updated.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + "path": "v1beta2/{+name}", + "id": "cloudfunctions.projects.locations.functions.update", + "description": "Updates existing function.", + "request": { + "$ref": "CloudFunction" + } + } + } + } + } + } + } + }, + "operations": { + "methods": { + "get": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "type": "string", + "required": true, + "pattern": "^operations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta2/operations/{operationsId}", + "id": "cloudfunctions.operations.get", + "path": "v1beta2/{+name}", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET" }, - "resource": { - "description": "Which instance of the source's service should send events. E.g. for Pub/Sub\nthis would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud\nStorage this would be a bucket at `projects/*/buckets/*`. For any source\nthat only supports one instance per-project, this should be the name of the\nproject (`projects/*`)", - "type": "string" + "list": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, + "pageToken": { + "type": "string", + "location": "query", + "description": "The standard list page token." + }, + "name": { + "description": "The name of the operation's parent resource.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + } + }, + "flatPath": "v1beta2/operations", + "id": "cloudfunctions.operations.list", + "path": "v1beta2/operations", + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET" } - }, - "id": "EventTrigger" + } + } + }, + "parameters": { + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" }, - "HTTPSTrigger": { - "type": "object", - "properties": { - "url": { - "description": "Output only. The deployed url for the function.", - "type": "string" - } - }, - "id": "HTTPSTrigger", - "description": "Describes HTTPSTrigger, could be used to connect web hooks to function." + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, + "access_token": { + "type": "string", + "location": "query", + "description": "OAuth access token." + }, + "key": { + "location": "query", + "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.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "type": "string", + "location": "query", + "description": "OAuth 2.0 token for the current user." + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "type": "string", + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + } + }, + "version": "v1beta2", + "baseUrl": "https://cloudfunctions.googleapis.com/", + "kind": "discovery#restDescription", + "description": "API for managing lightweight user-provided functions executed in response to events.", + "servicePath": "", + "basePath": "", + "revision": "20170912", + "documentationLink": "https://cloud.google.com/functions", + "id": "cloudfunctions:v1beta2", + "discoveryVersion": "v1", + "version_module": true, + "schemas": { "Operation": { "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", "type": "boolean" }, "response": { @@ -48,17 +409,17 @@ "type": "object" }, "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" + "type": "string", + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`." }, "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." }, "metadata": { "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." }, "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", "type": "object" @@ -70,8 +431,19 @@ "description": "Metadata describing an Operation", "type": "object", "properties": { + "target": { + "description": "Target of the operation - for example\nprojects/project-1/locations/region-1/functions/function-1", + "type": "string" + }, + "request": { + "description": "The original request that started the operation.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, "type": { - "description": "Type of operation.", "type": "string", "enumDescriptions": [ "Unknown operation type.", @@ -84,49 +456,38 @@ "CREATE_FUNCTION", "UPDATE_FUNCTION", "DELETE_FUNCTION" - ] - }, - "target": { - "description": "Target of the operation - for example\nprojects/project-1/locations/region-1/functions/function-1", - "type": "string" - }, - "request": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The original request that started the operation.", - "type": "object" + ], + "description": "Type of operation." } }, "id": "OperationMetadataV1Beta2" }, "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { - "details": { - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array", - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." - }, "code": { + "type": "integer", "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" + "description": "The status code, which should be an enum value of google.rpc.Code." }, "message": { "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" } }, - "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons." + "id": "Status" }, "CallFunctionRequest": { "description": "Request for the `CallFunction` method.", @@ -140,11 +501,9 @@ "id": "CallFunctionRequest" }, "SourceRepository": { + "description": "Describes the location of the function source in a remote repository.", + "type": "object", "properties": { - "tag": { - "description": "The name of the tag that captures the state of the repository from\nwhich the function should be fetched.", - "type": "string" - }, "branch": { "description": "The name of the branch from which the function should be fetched.", "type": "string" @@ -154,8 +513,8 @@ "type": "string" }, "sourcePath": { - "description": "The path within the repository where the function is defined. The path\nshould point to the directory where Cloud Functions files are located. Use\n\"/\" if the function is defined directly in the root directory of a\nrepository.", - "type": "string" + "type": "string", + "description": "The path within the repository where the function is defined. The path\nshould point to the directory where Cloud Functions files are located. Use\n\"/\" if the function is defined directly in the root directory of a\nrepository." }, "revision": { "description": "The id of the revision that captures the state of the repository from\nwhich the function should be fetched.", @@ -164,16 +523,34 @@ "repositoryUrl": { "description": "URL to the hosted repository where the function is defined. Only paths in\nhttps://source.developers.google.com domain are supported. The path should\ncontain the name of the repository.", "type": "string" + }, + "tag": { + "description": "The name of the tag that captures the state of the repository from\nwhich the function should be fetched.", + "type": "string" } }, - "id": "SourceRepository", - "description": "Describes the location of the function source in a remote repository.", - "type": "object" + "id": "SourceRepository" }, "CloudFunction": { "description": "Describes a Cloud Function that contains user computation executed in\nresponse to an event. It encapsulate function and triggers configurations.", "type": "object", "properties": { + "name": { + "description": "A user-defined name of the function. Function names must be unique\nglobally and match pattern `projects/*/locations/*/functions/*`", + "type": "string" + }, + "serviceAccount": { + "description": "Output only. The service account of the function.", + "type": "string" + }, + "sourceArchiveUrl": { + "type": "string", + "description": "The Google Cloud Storage URL, starting with gs://, pointing to the zip\narchive which contains the function." + }, + "sourceRepository": { + "$ref": "SourceRepository", + "description": "The hosted repository where the function is defined." + }, "entryPoint": { "description": "The name of the function (as defined in source code) that will be\nexecuted. Defaults to the resource name suffix, if not specified. For\nbackward compatibility, if function with given name is not found, then the\nsystem will try to use function named \"function\".\nFor Node.js this is name of a function exported by the module specified\nin `source_location`.", "type": "string" @@ -195,13 +572,12 @@ "$ref": "HTTPSTrigger", "description": "An HTTPS endpoint type of source that can be triggered via URL." }, - "eventTrigger": { - "description": "A source that fires events in response to a condition in another service.", - "$ref": "EventTrigger" + "timeout": { + "format": "google-duration", + "description": "The function execution timeout. Execution is considered failed and\ncan be terminated if the function is not completed at the end of the\ntimeout period. Defaults to 60 seconds.", + "type": "string" }, "status": { - "description": "Output only. Status of the function deployment.", - "type": "string", "enumDescriptions": [ "Status not specified.", "Successfully deployed.", @@ -215,33 +591,18 @@ "FAILED", "DEPLOYING", "DELETING" - ] + ], + "description": "Output only. Status of the function deployment.", + "type": "string" }, - "timeout": { - "type": "string", - "format": "google-duration", - "description": "The function execution timeout. Execution is considered failed and\ncan be terminated if the function is not completed at the end of the\ntimeout period. Defaults to 60 seconds." + "eventTrigger": { + "description": "A source that fires events in response to a condition in another service.", + "$ref": "EventTrigger" }, "availableMemoryMb": { + "type": "integer", "format": "int32", - "description": "The amount of memory in MB available for a function.\nDefaults to 256MB.", - "type": "integer" - }, - "name": { - "description": "A user-defined name of the function. Function names must be unique\nglobally and match pattern `projects/*/locations/*/functions/*`", - "type": "string" - }, - "serviceAccount": { - "description": "Output only. The service account of the function.", - "type": "string" - }, - "sourceArchiveUrl": { - "description": "The Google Cloud Storage URL, starting with gs://, pointing to the zip\narchive which contains the function.", - "type": "string" - }, - "sourceRepository": { - "$ref": "SourceRepository", - "description": "The hosted repository where the function is defined." + "description": "The amount of memory in MB available for a function.\nDefaults to 256MB." } }, "id": "CloudFunction" @@ -250,12 +611,20 @@ "description": "A resource that represents Google Cloud Platform location.", "type": "object", "properties": { + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", + "type": "object" + }, "labels": { + "type": "object", "additionalProperties": { "type": "string" }, - "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", - "type": "object" + "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}" }, "name": { "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", @@ -264,21 +633,17 @@ "locationId": { "description": "The canonical id for this location. For example: `\"us-east1\"`.", "type": "string" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", - "type": "object" } }, "id": "Location" }, + "Retry": { + "id": "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.", + "type": "object", + "properties": {} + }, "ListOperationsResponse": { - "id": "ListOperationsResponse", - "description": "The response message for Operations.ListOperations.", "type": "object", "properties": { "nextPageToken": { @@ -292,10 +657,11 @@ }, "type": "array" } - } + }, + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations." }, "ListFunctionsResponse": { - "id": "ListFunctionsResponse", "description": "Response for the `ListFunctions` method.", "type": "object", "properties": { @@ -310,9 +676,11 @@ }, "type": "array" } - } + }, + "id": "ListFunctionsResponse" }, "CallFunctionResponse": { + "id": "CallFunctionResponse", "description": "Response of `CallFunction` method.", "type": "object", "properties": { @@ -321,17 +689,17 @@ "type": "string" }, "result": { - "description": "Result populated for successful execution of synchronous function. Will\nnot be populated if function does not return a result through context.", - "type": "string" + "type": "string", + "description": "Result populated for successful execution of synchronous function. Will\nnot be populated if function does not return a result through context." }, "executionId": { "description": "Execution id of function invocation.", "type": "string" } - }, - "id": "CallFunctionResponse" + } }, "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", "type": "object", "properties": { "locations": { @@ -346,15 +714,55 @@ "type": "string" } }, - "id": "ListLocationsResponse", - "description": "The response message for Locations.ListLocations." + "id": "ListLocationsResponse" + }, + "EventTrigger": { + "description": "Describes EventTrigger, used to request events be sent from another\nservice.", + "type": "object", + "properties": { + "resource": { + "type": "string", + "description": "Which instance of the source's service should send events. E.g. for Pub/Sub\nthis would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud\nStorage this would be a bucket at `projects/*/buckets/*`. For any source\nthat only supports one instance per-project, this should be the name of the\nproject (`projects/*`)" + }, + "failurePolicy": { + "$ref": "FailurePolicy", + "description": "Specifies policy for failed executions." + }, + "eventType": { + "description": "`event_type` names contain the service that is sending an event and the\nkind of event that was fired. Must be of the form\n`providers/*/eventTypes/*` e.g. Directly handle a Message published to\nGoogle Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`\n\n Handle an object changing in Google Cloud Storage\n `providers/cloud.storage/eventTypes/object.change`\n\n Handle a write to the Firebase Realtime Database\n `providers/firebase.database/eventTypes/data.write`", + "type": "string" + } + }, + "id": "EventTrigger" + }, + "HTTPSTrigger": { + "description": "Describes HTTPSTrigger, could be used to connect web hooks to function.", + "type": "object", + "properties": { + "url": { + "description": "Output only. The deployed url for the function.", + "type": "string" + } + }, + "id": "HTTPSTrigger" + }, + "FailurePolicy": { + "description": "Describes the policy in case of function's execution failure.\nIf empty, then defaults to ignoring failures (i.e. not retrying them).", + "type": "object", + "properties": { + "retry": { + "description": "If specified, then the function will be retried in case of a failure.", + "$ref": "Retry" + } + }, + "id": "FailurePolicy" } }, - "protocol": "rest", "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, + "protocol": "rest", "canonicalName": "Cloud Functions", "auth": { "oauth2": { @@ -369,393 +777,7 @@ "ownerDomain": "google.com", "name": "cloudfunctions", "batchPath": "batch", + "fullyEncodeReservedExpansion": true, "title": "Google Cloud Functions API", - "ownerName": "Google", - "resources": { - "operations": { - "methods": { - "get": { - "id": "cloudfunctions.operations.get", - "path": "v1beta2/{+name}", - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The name of the operation resource.", - "type": "string", - "required": true, - "pattern": "^operations/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/operations/{operationsId}" - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [], - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "name": { - "location": "query", - "description": "The name of the operation's parent resource.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - }, - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" - } - }, - "flatPath": "v1beta2/operations", - "path": "v1beta2/operations", - "id": "cloudfunctions.operations.list", - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id." - } - } - }, - "projects": { - "resources": { - "locations": { - "methods": { - "list": { - "description": "Lists information about the supported locations for this service.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListLocationsResponse" - }, - "parameters": { - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "name": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "The resource that owns the locations collection, if applicable." - }, - "pageSize": { - "format": "int32", - "description": "The standard list page size.", - "type": "integer", - "location": "query" - }, - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectsId}/locations", - "path": "v1beta2/{+name}/locations", - "id": "cloudfunctions.projects.locations.list" - } - }, - "resources": { - "functions": { - "methods": { - "list": { - "response": { - "$ref": "ListFunctionsResponse" - }, - "parameterOrder": [ - "location" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "location": { - "location": "path", - "description": "The project and location from which the function should be listed,\nspecified in the format `projects/*/locations/*`\nIf you want to list functions in all locations, use \"-\" in place of a\nlocation.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$" - }, - "pageToken": { - "location": "query", - "description": "The value returned by the last\n`ListFunctionsResponse`; indicates that\nthis is a continuation of a prior `ListFunctions` call, and that the\nsystem should return the next page of data.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum number of functions to return per call.", - "type": "integer" - } - }, - "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions", - "id": "cloudfunctions.projects.locations.functions.list", - "path": "v1beta2/{+location}/functions", - "description": "Returns a list of functions that belong to the requested project." - }, - "create": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "location" - ], - "httpMethod": "POST", - "parameters": { - "location": { - "description": "The project and location in which the function should be created, specified\nin the format `projects/*/locations/*`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions", - "id": "cloudfunctions.projects.locations.functions.create", - "path": "v1beta2/{+location}/functions", - "description": "Creates a new function. If a function with the given name already exists in\nthe specified project, the long running operation will return\n`ALREADY_EXISTS` error.", - "request": { - "$ref": "CloudFunction" - } - }, - "call": { - "request": { - "$ref": "CallFunctionRequest" - }, - "description": "Invokes synchronously deployed function. To be used for testing, very\nlimited traffic allowed.", - "response": { - "$ref": "CallFunctionResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "The name of the function to be called.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$" - } - }, - "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:call", - "id": "cloudfunctions.projects.locations.functions.call", - "path": "v1beta2/{+name}:call" - }, - "get": { - "path": "v1beta2/{+name}", - "id": "cloudfunctions.projects.locations.functions.get", - "description": "Returns a function with the given name from the requested project.", - "httpMethod": "GET", - "response": { - "$ref": "CloudFunction" - }, - "parameterOrder": [ - "name" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The name of the function which details should be obtained.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}" - }, - "update": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", - "location": "path", - "description": "The name of the function to be updated." - } - }, - "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", - "id": "cloudfunctions.projects.locations.functions.update", - "path": "v1beta2/{+name}", - "request": { - "$ref": "CloudFunction" - }, - "description": "Updates existing function.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PUT" - }, - "delete": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "The name of the function which should be deleted.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$" - } - }, - "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", - "id": "cloudfunctions.projects.locations.functions.delete", - "path": "v1beta2/{+name}", - "description": "Deletes a function with the given name from the specified project. If the\ngiven function is used by some trigger, the trigger will be updated to\nremove this function." - } - } - } - } - } - } - } - }, - "parameters": { - "access_token": { - "location": "query", - "description": "OAuth access token.", - "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.", - "type": "string", - "location": "query" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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", - "description": "Data format for response.", - "default": "json" - } - }, - "version": "v1beta2", - "baseUrl": "https://cloudfunctions.googleapis.com/", - "servicePath": "", - "kind": "discovery#restDescription", - "description": "API for managing lightweight user-provided functions executed in response to events.", - "basePath": "" + "ownerName": "Google" } diff --git a/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-gen.go b/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-gen.go index f578887c7..406bc505a 100644 --- a/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-gen.go +++ b/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-gen.go @@ -339,6 +339,9 @@ type EventTrigger struct { // `providers/firebase.database/eventTypes/data.write` EventType string `json:"eventType,omitempty"` + // FailurePolicy: Specifies policy for failed executions. + FailurePolicy *FailurePolicy `json:"failurePolicy,omitempty"` + // Resource: Which instance of the source's service should send events. // E.g. for Pub/Sub // this would be a Pub/Sub topic at `projects/*/topics/*`. For Google @@ -373,6 +376,38 @@ func (s *EventTrigger) MarshalJSON() ([]byte, error) { 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 +// them). +type FailurePolicy struct { + // Retry: If specified, then the function will be retried in case of a + // failure. + Retry *Retry `json:"retry,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Retry") 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. "Retry") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FailurePolicy) MarshalJSON() ([]byte, error) { + type noMethod FailurePolicy + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HTTPSTrigger: Describes HTTPSTrigger, could be used to connect web // hooks to function. type HTTPSTrigger struct { @@ -566,8 +601,8 @@ func (s *Location) MarshalJSON() ([]byte, error) { type Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` @@ -677,6 +712,16 @@ func (s *OperationMetadataV1Beta2) MarshalJSON() ([]byte, error) { 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. +// A failed execution will be retried up to 7 days with an exponential +// backoff +// (capped at 10 seconds). +// Retried execution is charged as any other execution. +type Retry struct { +} + // SourceRepository: Describes the location of the function source in a // remote repository. type SourceRepository struct { 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 2ef074320..4c5ffec16 100644 --- a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json +++ b/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json @@ -1,4 +1,6 @@ { + "ownerDomain": "google.com", + "name": "cloudkms", "batchPath": "batch", "title": "Google Cloud Key Management Service (KMS) API", "ownerName": "Google", @@ -8,258 +10,187 @@ "locations": { "resources": { "keyRings": { - "resources": { - "cryptoKeys": { - "resources": { - "cryptoKeyVersions": { - "methods": { - "list": { - "response": { - "$ref": "ListCryptoKeyVersionsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "Optional pagination token, returned earlier via\nListCryptoKeyVersionsResponse.next_page_token.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Optional limit on the number of CryptoKeyVersions to\ninclude in the response. Further CryptoKeyVersions can\nsubsequently be obtained by including the\nListCryptoKeyVersionsResponse.next_page_token in a subsequent request.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer", - "location": "query" - }, - "parent": { - "description": "Required. The resource name of the CryptoKey to list, in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list", - "path": "v1/{+parent}/cryptoKeyVersions", - "description": "Lists CryptoKeyVersions." - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "CryptoKeyVersion" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "description": "Required. The name of the CryptoKey associated with\nthe CryptoKeyVersions.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions", - "path": "v1/{+parent}/cryptoKeyVersions", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create", - "request": { - "$ref": "CryptoKeyVersion" - }, - "description": "Create a new CryptoKeyVersion in a CryptoKey.\n\nThe server will assign the next sequential id. If unset,\nstate will be set to\nENABLED." - }, - "destroy": { - "response": { - "$ref": "CryptoKeyVersion" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "description": "The resource name of the CryptoKeyVersion to destroy.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}:destroy", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy", - "path": "v1/{+name}:destroy", - "description": "Schedule a CryptoKeyVersion for destruction.\n\nUpon calling this method, CryptoKeyVersion.state will be set to\nDESTROY_SCHEDULED\nand destroy_time will be set to a time 24\nhours in the future, at which point the state\nwill be changed to\nDESTROYED, and the key\nmaterial will be irrevocably destroyed.\n\nBefore the destroy_time is reached,\nRestoreCryptoKeyVersion may be called to reverse the process.", - "request": { - "$ref": "DestroyCryptoKeyVersionRequest" - } - }, - "restore": { - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore", - "path": "v1/{+name}:restore", - "description": "Restore a CryptoKeyVersion in the\nDESTROY_SCHEDULED,\nstate.\n\nUpon restoration of the CryptoKeyVersion, state\nwill be set to DISABLED,\nand destroy_time will be cleared.", - "request": { - "$ref": "RestoreCryptoKeyVersionRequest" - }, - "response": { - "$ref": "CryptoKeyVersion" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "description": "The resource name of the CryptoKeyVersion to restore.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}:restore" - }, - "get": { - "response": { - "$ref": "CryptoKeyVersion" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", - "location": "path", - "description": "The name of the CryptoKeyVersion to get.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get", - "path": "v1/{+name}", - "description": "Returns metadata for a given CryptoKeyVersion." - }, - "patch": { - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch", - "path": "v1/{+name}", - "description": "Update a CryptoKeyVersion's metadata.\n\nstate may be changed between\nENABLED and\nDISABLED using this\nmethod. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to\nmove between other states.", - "request": { - "$ref": "CryptoKeyVersion" - }, - "response": { - "$ref": "CryptoKeyVersion" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PATCH", - "parameters": { - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Required list of fields to be updated in this request.", - "type": "string" - }, - "name": { - "description": "Output only. The resource name for this CryptoKeyVersion in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}" - } - } + "methods": { + "list": { + "response": { + "$ref": "ListKeyRingsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "Optional pagination token, returned earlier via\nListKeyRingsResponse.next_page_token.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional limit on the number of KeyRings to include in the\nresponse. Further KeyRings can subsequently be obtained by\nincluding the ListKeyRingsResponse.next_page_token in a subsequent\nrequest. If unspecified, the server will pick an appropriate default.", + "type": "integer" + }, + "parent": { + "description": "Required. The resource name of the location associated with the\nKeyRings, in the format `projects/*/locations/*`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings", + "id": "cloudkms.projects.locations.keyRings.list", + "path": "v1/{+parent}/keyRings", + "description": "Lists KeyRings." + }, + "setIamPolicy": { + "path": "v1/{+resource}:setIamPolicy", + "id": "cloudkms.projects.locations.keyRings.setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:setIamPolicy" + }, + "create": { + "id": "cloudkms.projects.locations.keyRings.create", + "path": "v1/{+parent}/keyRings", + "description": "Create a new KeyRing in a given Project and Location.", + "request": { + "$ref": "KeyRing" + }, + "response": { + "$ref": "KeyRing" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "parent": { + "description": "Required. The resource name of the location associated with the\nKeyRings, in the format `projects/*/locations/*`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + }, + "keyRingId": { + "description": "Required. It must be unique within a location and match the regular\nexpression `[a-zA-Z0-9_-]{1,63}`", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings" + }, + "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.", + "httpMethod": "GET", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "id": "cloudkms.projects.locations.keyRings.getIamPolicy" + }, + "get": { + "description": "Returns metadata for a given KeyRing.", + "response": { + "$ref": "KeyRing" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the KeyRing to get.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}", + "id": "cloudkms.projects.locations.keyRings.get", + "path": "v1/{+name}" + }, + "testIamPermissions": { + "path": "v1/{+resource}:testIamPermissions", + "id": "cloudkms.projects.locations.keyRings.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.", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "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.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:testIamPermissions" + } + }, + "resources": { + "cryptoKeys": { "methods": { - "patch": { - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.patch", - "path": "v1/{+name}", - "description": "Update a CryptoKey.", - "request": { - "$ref": "CryptoKey" - }, - "response": { - "$ref": "CryptoKey" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PATCH", - "parameters": { - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Required list of fields to be updated in this request.", - "type": "string" - }, - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path", - "description": "Output only. The resource name for this CryptoKey in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}" - }, - "get": { - "response": { - "$ref": "CryptoKey" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The name of the CryptoKey to get.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.get", - "path": "v1/{+name}", - "description": "Returns metadata for a given CryptoKey, as well as its\nprimary CryptoKeyVersion." - }, "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.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, "httpMethod": "POST", "parameterOrder": [ "resource" @@ -281,25 +212,24 @@ ], "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:testIamPermissions", "path": "v1/{+resource}:testIamPermissions", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.testIamPermissions" + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.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.", + "request": { + "$ref": "TestIamPermissionsRequest" + } }, "decrypt": { - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.decrypt", - "path": "v1/{+name}:decrypt", + "description": "Decrypts data that was protected by Encrypt.", "request": { "$ref": "DecryptRequest" }, - "description": "Decrypts data that was protected by Encrypt.", - "response": { - "$ref": "DecryptResponse" - }, + "httpMethod": "POST", "parameterOrder": [ "name" ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], + "response": { + "$ref": "DecryptResponse" + }, "parameters": { "name": { "description": "Required. The resource name of the CryptoKey to use for decryption.\nThe server will choose the appropriate version.", @@ -309,35 +239,36 @@ "location": "path" } }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:decrypt" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:decrypt", + "path": "v1/{+name}:decrypt", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.decrypt" }, "list": { - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys", - "path": "v1/{+parent}/cryptoKeys", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.list", - "description": "Lists CryptoKeys.", "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], "response": { "$ref": "ListCryptoKeysResponse" }, + "parameterOrder": [ + "parent" + ], "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "parent": { - "location": "path", "description": "Required. The resource name of the KeyRing to list, in the format\n`projects/*/locations/*/keyRings/*`.", "type": "string", "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$" + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", + "location": "path" }, "pageToken": { - "location": "query", "description": "Optional pagination token, returned earlier via\nListCryptoKeysResponse.next_page_token.", - "type": "string" + "type": "string", + "location": "query" }, "pageSize": { "location": "query", @@ -345,7 +276,11 @@ "description": "Optional limit on the number of CryptoKeys to include in the\nresponse. Further CryptoKeys can subsequently be obtained by\nincluding the ListCryptoKeysResponse.next_page_token in a subsequent\nrequest. If unspecified, the server will pick an appropriate default.", "type": "integer" } - } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys", + "path": "v1/{+parent}/cryptoKeys", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.list", + "description": "Lists CryptoKeys." }, "encrypt": { "response": { @@ -355,40 +290,34 @@ "name" ], "httpMethod": "POST", - "parameters": { - "name": { - "description": "Required. The resource name of the CryptoKey or CryptoKeyVersion\nto use for encryption.\n\nIf a CryptoKey is specified, the server will use its\nprimary version.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/.+$", - "location": "path" - } - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/.+$", + "location": "path", + "description": "Required. The resource name of the CryptoKey or CryptoKeyVersion\nto use for encryption.\n\nIf a CryptoKey is specified, the server will use its\nprimary version.", + "type": "string", + "required": true + } + }, "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:encrypt", "id": "cloudkms.projects.locations.keyRings.cryptoKeys.encrypt", "path": "v1/{+name}:encrypt", - "description": "Encrypts data, so that it can only be recovered by a call to Decrypt.", "request": { "$ref": "EncryptRequest" - } + }, + "description": "Encrypts data, so that it can only be recovered by a call to Decrypt." }, "setIamPolicy": { - "path": "v1/{+resource}:setIamPolicy", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy", - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], "response": { "$ref": "Policy" }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", "parameters": { "resource": { "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", @@ -401,15 +330,21 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:setIamPolicy" + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:setIamPolicy", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "SetIamPolicyRequest" + } }, "create": { "id": "cloudkms.projects.locations.keyRings.cryptoKeys.create", "path": "v1/{+parent}/cryptoKeys", - "description": "Create a new CryptoKey within a KeyRing.\n\nCryptoKey.purpose is required.", "request": { "$ref": "CryptoKey" }, + "description": "Create a new CryptoKey within a KeyRing.\n\nCryptoKey.purpose is required.", "response": { "$ref": "CryptoKey" }, @@ -417,26 +352,30 @@ "parent" ], "httpMethod": "POST", - "parameters": { - "cryptoKeyId": { - "description": "Required. It must be unique within a KeyRing and match the regular\nexpression `[a-zA-Z0-9_-]{1,63}`", - "type": "string", - "location": "query" - }, - "parent": { - "description": "Required. The name of the KeyRing associated with the\nCryptoKeys.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - "location": "path" - } - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], + "parameters": { + "parent": { + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", + "location": "path", + "description": "Required. The name of the KeyRing associated with the\nCryptoKeys.", + "type": "string", + "required": true + }, + "cryptoKeyId": { + "location": "query", + "description": "Required. It must be unique within a KeyRing and match the regular\nexpression `[a-zA-Z0-9_-]{1,63}`", + "type": "string" + } + }, "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys" }, "updatePrimaryVersion": { + "request": { + "$ref": "UpdateCryptoKeyPrimaryVersionRequest" + }, + "description": "Update the version of a CryptoKey that will be used in Encrypt", "response": { "$ref": "CryptoKey" }, @@ -449,34 +388,56 @@ ], "parameters": { "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path", "description": "The resource name of the CryptoKey to update.", "type": "string", - "required": true + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", + "location": "path" } }, "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:updatePrimaryVersion", "id": "cloudkms.projects.locations.keyRings.cryptoKeys.updatePrimaryVersion", - "path": "v1/{+name}:updatePrimaryVersion", - "request": { - "$ref": "UpdateCryptoKeyPrimaryVersionRequest" - }, - "description": "Update the version of a CryptoKey that will be used in Encrypt" + "path": "v1/{+name}:updatePrimaryVersion" }, "getIamPolicy": { - "httpMethod": "GET", - "parameterOrder": [ - "resource" - ], "response": { "$ref": "Policy" }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:getIamPolicy", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy", + "path": "v1/{+resource}: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." + }, + "get": { + "description": "Returns metadata for a given CryptoKey, as well as its\nprimary CryptoKeyVersion.", + "httpMethod": "GET", + "response": { + "$ref": "CryptoKey" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", "location": "path", - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "description": "The name of the CryptoKey to get.", "type": "string", "required": true } @@ -484,228 +445,268 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:getIamPolicy", - "path": "v1/{+resource}:getIamPolicy", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.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}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}", + "path": "v1/{+name}", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.get" + }, + "patch": { + "path": "v1/{+name}", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.patch", + "request": { + "$ref": "CryptoKey" + }, + "description": "Update a CryptoKey.", + "httpMethod": "PATCH", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "CryptoKey" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", + "location": "path", + "description": "Output only. The resource name for this CryptoKey in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", + "type": "string", + "required": true + }, + "updateMask": { + "format": "google-fieldmask", + "description": "Required list of fields to be updated in this request.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}" + } + }, + "resources": { + "cryptoKeyVersions": { + "methods": { + "list": { + "response": { + "$ref": "ListCryptoKeyVersionsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "parent": { + "description": "Required. The resource name of the CryptoKey to list, in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "Optional pagination token, returned earlier via\nListCryptoKeyVersionsResponse.next_page_token.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional limit on the number of CryptoKeyVersions to\ninclude in the response. Further CryptoKeyVersions can\nsubsequently be obtained by including the\nListCryptoKeyVersionsResponse.next_page_token in a subsequent request.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list", + "path": "v1/{+parent}/cryptoKeyVersions", + "description": "Lists CryptoKeyVersions." + }, + "destroy": { + "response": { + "$ref": "CryptoKeyVersion" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", + "location": "path", + "description": "The resource name of the CryptoKeyVersion to destroy.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}:destroy", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy", + "path": "v1/{+name}:destroy", + "description": "Schedule a CryptoKeyVersion for destruction.\n\nUpon calling this method, CryptoKeyVersion.state will be set to\nDESTROY_SCHEDULED\nand destroy_time will be set to a time 24\nhours in the future, at which point the state\nwill be changed to\nDESTROYED, and the key\nmaterial will be irrevocably destroyed.\n\nBefore the destroy_time is reached,\nRestoreCryptoKeyVersion may be called to reverse the process.", + "request": { + "$ref": "DestroyCryptoKeyVersionRequest" + } + }, + "create": { + "path": "v1/{+parent}/cryptoKeyVersions", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create", + "description": "Create a new CryptoKeyVersion in a CryptoKey.\n\nThe server will assign the next sequential id. If unset,\nstate will be set to\nENABLED.", + "request": { + "$ref": "CryptoKeyVersion" + }, + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "CryptoKeyVersion" + }, + "parameters": { + "parent": { + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", + "location": "path", + "description": "Required. The name of the CryptoKey associated with\nthe CryptoKeyVersions.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions" + }, + "restore": { + "description": "Restore a CryptoKeyVersion in the\nDESTROY_SCHEDULED,\nstate.\n\nUpon restoration of the CryptoKeyVersion, state\nwill be set to DISABLED,\nand destroy_time will be cleared.", + "request": { + "$ref": "RestoreCryptoKeyVersionRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "CryptoKeyVersion" + }, + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", + "location": "path", + "description": "The resource name of the CryptoKeyVersion to restore.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}:restore", + "path": "v1/{+name}:restore", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore" + }, + "patch": { + "request": { + "$ref": "CryptoKeyVersion" + }, + "description": "Update a CryptoKeyVersion's metadata.\n\nstate may be changed between\nENABLED and\nDISABLED using this\nmethod. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to\nmove between other states.", + "httpMethod": "PATCH", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "CryptoKeyVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Required list of fields to be updated in this request.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name for this CryptoKeyVersion in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}", + "path": "v1/{+name}", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch" + }, + "get": { + "description": "Returns metadata for a given CryptoKeyVersion.", + "response": { + "$ref": "CryptoKeyVersion" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", + "location": "path", + "description": "The name of the CryptoKeyVersion to get.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get", + "path": "v1/{+name}" + } + } } } } - }, - "methods": { - "list": { - "path": "v1/{+parent}/keyRings", - "id": "cloudkms.projects.locations.keyRings.list", - "description": "Lists KeyRings.", - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "ListKeyRingsResponse" - }, - "parameters": { - "pageSize": { - "format": "int32", - "description": "Optional limit on the number of KeyRings to include in the\nresponse. Further KeyRings can subsequently be obtained by\nincluding the ListKeyRingsResponse.next_page_token in a subsequent\nrequest. If unspecified, the server will pick an appropriate default.", - "type": "integer", - "location": "query" - }, - "parent": { - "location": "path", - "description": "Required. The resource name of the location associated with the\nKeyRings, in the format `projects/*/locations/*`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$" - }, - "pageToken": { - "location": "query", - "description": "Optional pagination token, returned earlier via\nListKeyRingsResponse.next_page_token.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings" - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "KeyRing" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path", - "description": "Required. The resource name of the location associated with the\nKeyRings, in the format `projects/*/locations/*`.", - "type": "string", - "required": true - }, - "keyRingId": { - "description": "Required. It must be unique within a location and match the regular\nexpression `[a-zA-Z0-9_-]{1,63}`", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings", - "path": "v1/{+parent}/keyRings", - "id": "cloudkms.projects.locations.keyRings.create", - "request": { - "$ref": "KeyRing" - }, - "description": "Create a new KeyRing in a given Project and Location." - }, - "setIamPolicy": { - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:setIamPolicy", - "id": "cloudkms.projects.locations.keyRings.setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - } - }, - "getIamPolicy": { - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:getIamPolicy", - "id": "cloudkms.projects.locations.keyRings.getIamPolicy", - "path": "v1/{+resource}: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." - }, - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "KeyRing" - }, - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - "location": "path", - "description": "The name of the KeyRing to get.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}", - "path": "v1/{+name}", - "id": "cloudkms.projects.locations.keyRings.get", - "description": "Returns metadata for a given KeyRing." - }, - "testIamPermissions": { - "id": "cloudkms.projects.locations.keyRings.testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "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.", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "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.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:testIamPermissions" - } } } }, "methods": { "get": { - "id": "cloudkms.projects.locations.get", - "path": "v1/{+name}", - "description": "Get information about a location.", + "httpMethod": "GET", "response": { "$ref": "Location" }, "parameterOrder": [ "name" ], - "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "name": { + "pattern": "^projects/[^/]+/locations/[^/]+$", "location": "path", "description": "Resource name for the location.", "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$" + "required": true } }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}" + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "path": "v1/{+name}", + "id": "cloudkms.projects.locations.get", + "description": "Get information about a location." }, "list": { - "description": "Lists information about the supported locations for this service.", + "httpMethod": "GET", "response": { "$ref": "ListLocationsResponse" }, "parameterOrder": [ "name" ], - "httpMethod": "GET", "parameters": { "pageToken": { "location": "query", @@ -713,17 +714,17 @@ "type": "string" }, "name": { - "pattern": "^projects/[^/]+$", - "location": "path", "description": "The resource that owns the locations collection, if applicable.", "type": "string", - "required": true + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" }, "pageSize": { + "location": "query", "format": "int32", "description": "The standard list page size.", - "type": "integer", - "location": "query" + "type": "integer" }, "filter": { "description": "The standard list filter.", @@ -735,8 +736,9 @@ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1/projects/{projectsId}/locations", + "path": "v1/{+name}/locations", "id": "cloudkms.projects.locations.list", - "path": "v1/{+name}/locations" + "description": "Lists information about the supported locations for this service." } } } @@ -756,20 +758,15 @@ "location": "query" }, "fields": { + "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" + "type": "string" }, "uploadType": { "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", "location": "query" }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, "$.xgafv": { "enumDescriptions": [ "v1 error format", @@ -783,6 +780,11 @@ "description": "V1 error format.", "type": "string" }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, "alt": { "enum": [ "json", @@ -799,20 +801,20 @@ "description": "Data format for response.", "default": "json" }, - "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.", - "type": "string", - "location": "query" - }, "access_token": { "location": "query", "description": "OAuth access token.", "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.", + "type": "string", + "location": "query" + }, "quotaUser": { - "location": "query", "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.", - "type": "string" + "type": "string", + "location": "query" }, "pp": { "location": "query", @@ -820,237 +822,77 @@ "default": "true", "type": "boolean" }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, "bearer_token": { "location": "query", "description": "OAuth bearer token.", "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" } }, "version": "v1", "baseUrl": "https://cloudkms.googleapis.com/", + "kind": "discovery#restDescription", "servicePath": "", "description": "Manages encryption for your cloud services the same way you do on-premises. You can generate, use, rotate, and destroy AES256 encryption keys.", - "kind": "discovery#restDescription", "basePath": "", "id": "cloudkms:v1", "documentationLink": "https://cloud.google.com/kms/", - "revision": "20170725", + "revision": "20170904", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { - "SetIamPolicyRequest": { - "properties": { - "updateMask": { - "format": "google-fieldmask", - "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.", - "type": "string" - }, - "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." - } - }, - "id": "SetIamPolicyRequest", - "description": "Request message for `SetIamPolicy` method.", - "type": "object" - }, - "DecryptRequest": { - "description": "Request message for KeyManagementService.Decrypt.", + "CryptoKey": { + "description": "A CryptoKey represents a logical key that can be used for cryptographic\noperations.\n\nA CryptoKey is made up of one or more versions, which\nrepresent the actual key material used in cryptographic operations.", "type": "object", "properties": { - "additionalAuthenticatedData": { - "format": "byte", - "description": "Optional data that must match the data originally supplied in\nEncryptRequest.additional_authenticated_data.", - "type": "string" + "purpose": { + "enum": [ + "CRYPTO_KEY_PURPOSE_UNSPECIFIED", + "ENCRYPT_DECRYPT" + ], + "description": "The immutable purpose of this CryptoKey. Currently, the only acceptable\npurpose is ENCRYPT_DECRYPT.", + "type": "string", + "enumDescriptions": [ + "Not specified.", + "CryptoKeys with this purpose may be used with\nEncrypt and\nDecrypt." + ] }, - "ciphertext": { - "format": "byte", - "description": "Required. The encrypted data originally returned in\nEncryptResponse.ciphertext.", + "nextRotationTime": { + "format": "google-datetime", + "description": "At next_rotation_time, the Key Management Service will automatically:\n\n1. Create a new version of this CryptoKey.\n2. Mark the new version as primary.\n\nKey rotations performed manually via\nCreateCryptoKeyVersion and\nUpdateCryptoKeyPrimaryVersion\ndo not affect next_rotation_time.", "type": "string" - } - }, - "id": "DecryptRequest" - }, - "Location": { - "properties": { - "locationId": { - "description": "The canonical id for this location. For example: `\"us-east1\"`.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", - "type": "object" }, "labels": { "additionalProperties": { "type": "string" }, - "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", + "description": "Labels with user defined metadata.", "type": "object" }, + "createTime": { + "format": "google-datetime", + "description": "Output only. The time at which this CryptoKey was created.", + "type": "string" + }, + "rotationPeriod": { + "format": "google-duration", + "description": "next_rotation_time will be advanced by this period when the service\nautomatically rotates a key. Must be at least one day.\n\nIf rotation_period is set, next_rotation_time must also be set.", + "type": "string" + }, + "primary": { + "description": "Output only. A copy of the \"primary\" CryptoKeyVersion that will be used\nby Encrypt when this CryptoKey is given\nin EncryptRequest.name.\n\nThe CryptoKey's primary version can be updated via\nUpdateCryptoKeyPrimaryVersion.", + "$ref": "CryptoKeyVersion" + }, "name": { - "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", + "description": "Output only. The resource name for this CryptoKey in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", "type": "string" } }, - "id": "Location", - "description": "A resource that represents Google Cloud Platform location.", - "type": "object" - }, - "ListCryptoKeysResponse": { - "description": "Response message for KeyManagementService.ListCryptoKeys.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "A token to retrieve next page of results. Pass this value in\nListCryptoKeysRequest.page_token to retrieve the next page of results.", - "type": "string" - }, - "totalSize": { - "format": "int32", - "description": "The total number of CryptoKeys that matched the query.", - "type": "integer" - }, - "cryptoKeys": { - "description": "The list of CryptoKeys.", - "items": { - "$ref": "CryptoKey" - }, - "type": "array" - } - }, - "id": "ListCryptoKeysResponse" - }, - "Condition": { - "description": "A condition to be met.", - "type": "object", - "properties": { - "iam": { - "enumDescriptions": [ - "Default non-attribute.", - "Either principal or (if present) authority selector.", - "The principal (even if an authority selector is present), which\nmust only be used for attribution, not authorization.", - "An approver (distinct from the requester) that has authorized this\nrequest.\nWhen used with IN, the condition indicates that one of the approvers\nassociated with the request matches the specified principal, or is a\nmember of the specified group. Approvers can only grant additional\naccess, and are thus only used in a strictly positive context\n(e.g. ALLOW/IN or DENY/NOT_IN).", - "What types of justifications have been supplied with this request.\nString values should match enum names from tech.iam.JustificationType,\ne.g. \"MANUAL_STRING\". It is not permitted to grant access based on\nthe *absence* of a justification, so justification conditions can only\nbe used in a \"positive\" context (e.g., ALLOW/IN or DENY/NOT_IN).\n\nMultiple justifications, e.g., a Buganizer ID and a manually-entered\nreason, are normal and supported." - ], - "enum": [ - "NO_ATTR", - "AUTHORITY", - "ATTRIBUTION", - "APPROVER", - "JUSTIFICATION_TYPE" - ], - "description": "Trusted attributes supplied by the IAM system.", - "type": "string" - }, - "values": { - "description": "The objects of the condition. This is mutually exclusive with 'value'.", - "items": { - "type": "string" - }, - "type": "array" - }, - "op": { - "enumDescriptions": [ - "Default no-op.", - "DEPRECATED. Use IN instead.", - "DEPRECATED. Use NOT_IN instead.", - "The condition is true if the subject (or any element of it if it is\na set) matches any of the supplied values.", - "The condition is true if the subject (or every element of it if it is\na set) matches none of the supplied values.", - "Subject is discharged" - ], - "enum": [ - "NO_OP", - "EQUALS", - "NOT_EQUALS", - "IN", - "NOT_IN", - "DISCHARGED" - ], - "description": "An operator to apply the subject with.", - "type": "string" - }, - "svc": { - "description": "Trusted attributes discharged by the service.", - "type": "string" - }, - "sys": { - "enum": [ - "NO_ATTR", - "REGION", - "SERVICE", - "NAME", - "IP" - ], - "description": "Trusted attributes supplied by any service that owns resources and uses\nthe IAM system for access control.", - "type": "string", - "enumDescriptions": [ - "Default non-attribute type", - "Region of the resource", - "Service name", - "Resource name", - "IP address of the caller" - ] - }, - "value": { - "description": "DEPRECATED. Use 'values' instead.", - "type": "string" - } - }, - "id": "Condition" - }, - "CounterOptions": { - "properties": { - "field": { - "description": "The field value to attribute.", - "type": "string" - }, - "metric": { - "description": "The metric to update.", - "type": "string" - } - }, - "id": "CounterOptions", - "description": "Options for counters", - "type": "object" - }, - "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": { - "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" - ], - "description": "The log type that this config enables.", - "type": "string", - "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" - ] - } - }, - "id": "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.", - "type": "object" + "id": "CryptoKey" }, "DecryptResponse": { "description": "Response message for KeyManagementService.Decrypt.", @@ -1065,8 +907,6 @@ "id": "DecryptResponse" }, "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "type": "object", "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).", @@ -1076,18 +916,20 @@ "type": "array" } }, - "id": "TestIamPermissionsRequest" + "id": "TestIamPermissionsRequest", + "description": "Request message for `TestIamPermissions` method.", + "type": "object" }, "EncryptResponse": { "properties": { + "name": { + "description": "The resource name of the CryptoKeyVersion used in encryption.", + "type": "string" + }, "ciphertext": { "format": "byte", "description": "The encrypted data.", "type": "string" - }, - "name": { - "description": "The resource name of the CryptoKeyVersion used in encryption.", - "type": "string" } }, "id": "EncryptResponse", @@ -1098,36 +940,18 @@ "description": "A KeyRing is a toplevel logical grouping of CryptoKeys.", "type": "object", "properties": { + "name": { + "description": "Output only. The resource name for the KeyRing in the format\n`projects/*/locations/*/keyRings/*`.", + "type": "string" + }, "createTime": { "format": "google-datetime", "description": "Output only. The time at which this KeyRing was created.", "type": "string" - }, - "name": { - "description": "Output only. The resource name for the KeyRing in the format\n`projects/*/locations/*/keyRings/*`.", - "type": "string" } }, "id": "KeyRing" }, - "ListLocationsResponse": { - "description": "The response message for Locations.ListLocations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "locations": { - "description": "A list of locations that matches the specified filter in the request.", - "items": { - "$ref": "Location" - }, - "type": "array" - } - }, - "id": "ListLocationsResponse" - }, "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", "type": "object", @@ -1135,12 +959,10 @@ "iamOwned": { "type": "boolean" }, - "rules": { - "description": "If more than one rule is specified, the rules are applied in the following\nmanner:\n- All matching LOG rules are always applied.\n- If any DENY/DENY_WITH_LOG rule matches, permission is denied.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is\n granted.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if no rule applies, permission is denied.", - "items": { - "$ref": "Rule" - }, - "type": "array" + "etag": { + "format": "byte", + "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.", + "type": "string" }, "version": { "format": "int32", @@ -1160,15 +982,28 @@ "$ref": "Binding" }, "type": "array" - }, - "etag": { - "format": "byte", - "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.", - "type": "string" } }, "id": "Policy" }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + } + }, + "id": "ListLocationsResponse" + }, "RestoreCryptoKeyVersionRequest": { "properties": {}, "id": "RestoreCryptoKeyVersionRequest", @@ -1176,15 +1011,15 @@ "type": "object" }, "UpdateCryptoKeyPrimaryVersionRequest": { + "description": "Request message for KeyManagementService.UpdateCryptoKeyPrimaryVersion.", + "type": "object", "properties": { "cryptoKeyVersionId": { "description": "The id of the child CryptoKeyVersion to use as primary.", "type": "string" } }, - "id": "UpdateCryptoKeyPrimaryVersionRequest", - "description": "Request message for KeyManagementService.UpdateCryptoKeyPrimaryVersion.", - "type": "object" + "id": "UpdateCryptoKeyPrimaryVersionRequest" }, "ListKeyRingsResponse": { "description": "Response message for KeyManagementService.ListKeyRings.", @@ -1209,22 +1044,10 @@ }, "id": "ListKeyRingsResponse" }, - "DataAccessOptions": { - "description": "Write a Data Access (Gin) log", - "type": "object", - "properties": {}, - "id": "DataAccessOptions" - }, "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\nAuditConfig 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.", "type": "object", "properties": { - "exemptedMembers": { - "items": { - "type": "string" - }, - "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" @@ -1235,14 +1058,42 @@ "$ref": "AuditLogConfig" }, "type": "array" + }, + "exemptedMembers": { + "items": { + "type": "string" + }, + "type": "array" } }, "id": "AuditConfig" }, "CryptoKeyVersion": { - "description": "A CryptoKeyVersion represents an individual cryptographic key, and the\nassociated key material.\n\nIt can be used for cryptographic operations either directly, or via its\nparent CryptoKey, in which case the server will choose the appropriate\nversion for the operation.", + "description": "A CryptoKeyVersion represents an individual cryptographic key, and the\nassociated key material.\n\nIt can be used for cryptographic operations either directly, or via its\nparent CryptoKey, in which case the server will choose the appropriate\nversion for the operation.\n\nFor security reasons, the raw cryptographic key material represented by a\nCryptoKeyVersion can never be viewed or exported. It can only be used to\nencrypt or decrypt data when an authorized user or application invokes Cloud\nKMS.", "type": "object", "properties": { + "state": { + "enumDescriptions": [ + "Not specified.", + "This version may be used in Encrypt and\nDecrypt requests.", + "This version may not be used, but the key material is still available,\nand the version can be placed back into the ENABLED state.", + "This version is destroyed, and the key material is no longer stored.\nA version may not leave this state once entered.", + "This version is scheduled for destruction, and will be destroyed soon.\nCall\nRestoreCryptoKeyVersion\nto put it back into the DISABLED state." + ], + "enum": [ + "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED", + "ENABLED", + "DISABLED", + "DESTROYED", + "DESTROY_SCHEDULED" + ], + "description": "The current state of the CryptoKeyVersion.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name for this CryptoKeyVersion in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.", + "type": "string" + }, "destroyEventTime": { "format": "google-datetime", "description": "Output only. The time this CryptoKeyVersion's key material was\ndestroyed. Only present if state is\nDESTROYED.", @@ -1257,60 +1108,48 @@ "format": "google-datetime", "description": "Output only. The time at which this CryptoKeyVersion was created.", "type": "string" - }, - "state": { - "description": "The current state of the CryptoKeyVersion.", - "type": "string", - "enumDescriptions": [ - "Not specified.", - "This version may be used in Encrypt and\nDecrypt requests.", - "This version may not be used, but the key material is still available,\nand the version can be placed back into the ENABLED state.", - "This version is destroyed, and the key material is no longer stored.\nA version may not leave this state once entered.", - "This version is scheduled for destruction, and will be destroyed soon.\nCall\nRestoreCryptoKeyVersion\nto put it back into the DISABLED state." - ], - "enum": [ - "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED", - "ENABLED", - "DISABLED", - "DESTROYED", - "DESTROY_SCHEDULED" - ] - }, - "name": { - "description": "Output only. The resource name for this CryptoKeyVersion in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.", - "type": "string" } }, "id": "CryptoKeyVersion" }, - "CloudAuditOptions": { - "description": "Write a Cloud Audit log", + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", "type": "object", "properties": { - "logName": { - "enumDescriptions": [ - "Default. Should not be used.", - "Corresponds to \"cloudaudit.googleapis.com/activity\"", - "Corresponds to \"cloudaudit.googleapis.com/data_access\"" - ], - "enum": [ - "UNSPECIFIED_LOG_NAME", - "ADMIN_ACTIVITY", - "DATA_ACCESS" - ], - "description": "The log_name to populate in the Cloud Audit Record.", + "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.", + "$ref": "Policy" + }, + "updateMask": { + "format": "google-fieldmask", + "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.", "type": "string" } }, - "id": "CloudAuditOptions" + "id": "SetIamPolicyRequest" + }, + "DecryptRequest": { + "properties": { + "additionalAuthenticatedData": { + "format": "byte", + "description": "Optional data that must match the data originally supplied in\nEncryptRequest.additional_authenticated_data.", + "type": "string" + }, + "ciphertext": { + "format": "byte", + "description": "Required. The encrypted data originally returned in\nEncryptResponse.ciphertext.", + "type": "string" + } + }, + "id": "DecryptRequest", + "description": "Request message for KeyManagementService.Decrypt.", + "type": "object" }, "Binding": { - "description": "Associates `members` with a `role`.", - "type": "object", "properties": { "condition": { - "$ref": "Expr", - "description": "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.\nThis field is GOOGLE_INTERNAL." + "description": "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.\nThis field is GOOGLE_INTERNAL.", + "$ref": "Expr" }, "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` or `joe@example.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", @@ -1324,7 +1163,9 @@ "type": "string" } }, - "id": "Binding" + "id": "Binding", + "description": "Associates `members` with a `role`.", + "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\"", @@ -1353,15 +1194,15 @@ "description": "Request message for KeyManagementService.Encrypt.", "type": "object", "properties": { - "additionalAuthenticatedData": { - "format": "byte", - "description": "Optional data that, if specified, must also be provided during decryption\nthrough DecryptRequest.additional_authenticated_data. Must be no\nlarger than 64KiB.", - "type": "string" - }, "plaintext": { "format": "byte", "description": "Required. The data to encrypt. Must be no larger than 64KiB.", "type": "string" + }, + "additionalAuthenticatedData": { + "format": "byte", + "description": "Optional data that, if specified, must also be provided during decryption\nthrough DecryptRequest.additional_authenticated_data. Must be no\nlarger than 64KiB.", + "type": "string" } }, "id": "EncryptRequest" @@ -1370,6 +1211,13 @@ "description": "Response message for KeyManagementService.ListCryptoKeyVersions.", "type": "object", "properties": { + "cryptoKeyVersions": { + "description": "The list of CryptoKeyVersions.", + "items": { + "$ref": "CryptoKeyVersion" + }, + "type": "array" + }, "nextPageToken": { "description": "A token to retrieve next page of results. Pass this value in\nListCryptoKeyVersionsRequest.page_token to retrieve the next page of\nresults.", "type": "string" @@ -1378,16 +1226,62 @@ "format": "int32", "description": "The total number of CryptoKeyVersions that matched the\nquery.", "type": "integer" + } + }, + "id": "ListCryptoKeyVersionsResponse" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "type": "object", + "properties": { + "name": { + "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" }, - "cryptoKeyVersions": { - "description": "The list of CryptoKeyVersions.", + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", + "type": "object" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + } + }, + "id": "Location" + }, + "ListCryptoKeysResponse": { + "description": "Response message for KeyManagementService.ListCryptoKeys.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve next page of results. Pass this value in\nListCryptoKeysRequest.page_token to retrieve the next page of results.", + "type": "string" + }, + "totalSize": { + "format": "int32", + "description": "The total number of CryptoKeys that matched the query.", + "type": "integer" + }, + "cryptoKeys": { + "description": "The list of CryptoKeys.", "items": { - "$ref": "CryptoKeyVersion" + "$ref": "CryptoKey" }, "type": "array" } }, - "id": "ListCryptoKeyVersionsResponse" + "id": "ListCryptoKeysResponse" }, "TestIamPermissionsResponse": { "properties": { @@ -1409,139 +1303,42 @@ "description": "Request message for KeyManagementService.DestroyCryptoKeyVersion.", "type": "object" }, - "Rule": { - "description": "A rule to be applied in a Policy.", + "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.", "type": "object", "properties": { - "description": { - "description": "Human-readable description of the rule.", - "type": "string" - }, - "conditions": { - "description": "Additional restrictions that must be met", - "items": { - "$ref": "Condition" - }, - "type": "array" - }, - "logConfig": { - "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries\nthat match the LOG action.", - "items": { - "$ref": "LogConfig" - }, - "type": "array" - }, - "in": { - "description": "If one or more 'in' clauses are specified, the rule matches if\nthe PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.", + "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" }, - "permissions": { - "description": "A permission is a string of form '\u003cservice\u003e.\u003cresource type\u003e.\u003cverb\u003e'\n(e.g., 'storage.buckets.list'). A value of '*' matches all permissions,\nand a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "action": { - "description": "Required", + "logType": { + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "description": "The log type that this config enables.", "type": "string", "enumDescriptions": [ - "Default no action.", - "Matching 'Entries' grant access.", - "Matching 'Entries' grant access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' deny access.", - "Matching 'Entries' deny access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' tell IAM.Check callers to generate logs." - ], - "enum": [ - "NO_ACTION", - "ALLOW", - "ALLOW_WITH_LOG", - "DENY", - "DENY_WITH_LOG", - "LOG" + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" ] - }, - "notIn": { - "description": "If one or more 'not_in' clauses are specified, the rule matches\nif the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.\nThe format for in and not_in entries is the same as for members in a\nBinding (see google/iam/v1/policy.proto).", - "items": { - "type": "string" - }, - "type": "array" } }, - "id": "Rule" - }, - "CryptoKey": { - "description": "A CryptoKey represents a logical key that can be used for cryptographic\noperations.\n\nA CryptoKey is made up of one or more versions, which\nrepresent the actual key material used in cryptographic operations.", - "type": "object", - "properties": { - "createTime": { - "format": "google-datetime", - "description": "Output only. The time at which this CryptoKey was created.", - "type": "string" - }, - "rotationPeriod": { - "format": "google-duration", - "description": "next_rotation_time will be advanced by this period when the service\nautomatically rotates a key. Must be at least one day.\n\nIf rotation_period is set, next_rotation_time must also be set.", - "type": "string" - }, - "primary": { - "$ref": "CryptoKeyVersion", - "description": "Output only. A copy of the \"primary\" CryptoKeyVersion that will be used\nby Encrypt when this CryptoKey is given\nin EncryptRequest.name.\n\nThe CryptoKey's primary version can be updated via\nUpdateCryptoKeyPrimaryVersion." - }, - "name": { - "description": "Output only. The resource name for this CryptoKey in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", - "type": "string" - }, - "purpose": { - "enum": [ - "CRYPTO_KEY_PURPOSE_UNSPECIFIED", - "ENCRYPT_DECRYPT" - ], - "description": "The immutable purpose of this CryptoKey. Currently, the only acceptable\npurpose is ENCRYPT_DECRYPT.", - "type": "string", - "enumDescriptions": [ - "Not specified.", - "CryptoKeys with this purpose may be used with\nEncrypt and\nDecrypt." - ] - }, - "nextRotationTime": { - "format": "google-datetime", - "description": "At next_rotation_time, the Key Management Service will automatically:\n\n1. Create a new version of this CryptoKey.\n2. Mark the new version as primary.\n\nKey rotations performed manually via\nCreateCryptoKeyVersion and\nUpdateCryptoKeyPrimaryVersion\ndo not affect next_rotation_time.", - "type": "string" - } - }, - "id": "CryptoKey" - }, - "LogConfig": { - "description": "Specifies what kind of log the caller must write\nIncrement a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only,\nand end in \"_count\". Field names should not contain an initial slash.\nThe actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are\ntheir respective values.\n\nAt present the only supported field names are\n - \"iam_principal\", corresponding to IAMContext.principal;\n - \"\" (empty string), resulting in one aggretated counter with no field.\n\nExamples:\n counter { metric: \"/debug_access_count\" field: \"iam_principal\" }\n ==\u003e increment counter /iam/policy/backend_debug_access_count\n {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support:\n* multiple field names (though this may be supported in the future)\n* decrementing the counter\n* incrementing it by anything other than 1", - "type": "object", - "properties": { - "counter": { - "description": "Counter options.", - "$ref": "CounterOptions" - }, - "dataAccess": { - "$ref": "DataAccessOptions", - "description": "Data access options." - }, - "cloudAudit": { - "description": "Cloud audit options.", - "$ref": "CloudAuditOptions" - } - }, - "id": "LogConfig" + "id": "AuditLogConfig" } }, + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "protocol": "rest", "canonicalName": "Cloud KMS", "auth": { "oauth2": { @@ -1552,7 +1349,5 @@ } } }, - "rootUrl": "https://cloudkms.googleapis.com/", - "ownerDomain": "google.com", - "name": "cloudkms" + "rootUrl": "https://cloudkms.googleapis.com/" } 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 f51770cde..38cf58f72 100644 --- a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-gen.go +++ b/vendor/google.golang.org/api/cloudkms/v1/cloudkms-gen.go @@ -364,169 +364,6 @@ func (s *Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// CloudAuditOptions: Write a Cloud Audit log -type CloudAuditOptions struct { - // LogName: The log_name to populate in the Cloud Audit Record. - // - // Possible values: - // "UNSPECIFIED_LOG_NAME" - Default. Should not be used. - // "ADMIN_ACTIVITY" - Corresponds to - // "cloudaudit.googleapis.com/activity" - // "DATA_ACCESS" - Corresponds to - // "cloudaudit.googleapis.com/data_access" - LogName string `json:"logName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LogName") 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. "LogName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CloudAuditOptions) MarshalJSON() ([]byte, error) { - type noMethod CloudAuditOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Condition: A condition to be met. -type Condition struct { - // Iam: Trusted attributes supplied by the IAM system. - // - // Possible values: - // "NO_ATTR" - Default non-attribute. - // "AUTHORITY" - Either principal or (if present) authority selector. - // "ATTRIBUTION" - The principal (even if an authority selector is - // present), which - // must only be used for attribution, not authorization. - // "APPROVER" - An approver (distinct from the requester) that has - // authorized this - // request. - // When used with IN, the condition indicates that one of the - // approvers - // associated with the request matches the specified principal, or is - // a - // member of the specified group. Approvers can only grant - // additional - // access, and are thus only used in a strictly positive context - // (e.g. ALLOW/IN or DENY/NOT_IN). - // "JUSTIFICATION_TYPE" - What types of justifications have been - // supplied with this request. - // String values should match enum names from - // tech.iam.JustificationType, - // e.g. "MANUAL_STRING". It is not permitted to grant access based - // on - // the *absence* of a justification, so justification conditions can - // only - // be used in a "positive" context (e.g., ALLOW/IN or - // DENY/NOT_IN). - // - // Multiple justifications, e.g., a Buganizer ID and a - // manually-entered - // reason, are normal and supported. - Iam string `json:"iam,omitempty"` - - // Op: An operator to apply the subject with. - // - // Possible values: - // "NO_OP" - Default no-op. - // "EQUALS" - DEPRECATED. Use IN instead. - // "NOT_EQUALS" - DEPRECATED. Use NOT_IN instead. - // "IN" - The condition is true if the subject (or any element of it - // if it is - // a set) matches any of the supplied values. - // "NOT_IN" - The condition is true if the subject (or every element - // of it if it is - // a set) matches none of the supplied values. - // "DISCHARGED" - Subject is discharged - Op string `json:"op,omitempty"` - - // Svc: Trusted attributes discharged by the service. - Svc string `json:"svc,omitempty"` - - // Sys: Trusted attributes supplied by any service that owns resources - // and uses - // the IAM system for access control. - // - // Possible values: - // "NO_ATTR" - Default non-attribute type - // "REGION" - Region of the resource - // "SERVICE" - Service name - // "NAME" - Resource name - // "IP" - IP address of the caller - Sys string `json:"sys,omitempty"` - - // Value: DEPRECATED. Use 'values' instead. - Value string `json:"value,omitempty"` - - // Values: The objects of the condition. This is mutually exclusive with - // 'value'. - Values []string `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Iam") 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. "Iam") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field 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) -} - -// CounterOptions: Options for counters -type CounterOptions struct { - // Field: The field value to attribute. - Field string `json:"field,omitempty"` - - // Metric: The metric to update. - Metric string `json:"metric,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CounterOptions) MarshalJSON() ([]byte, error) { - type noMethod CounterOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // CryptoKey: A CryptoKey represents a logical key that can be used for // cryptographic // operations. @@ -538,6 +375,9 @@ type CryptoKey struct { // created. CreateTime string `json:"createTime,omitempty"` + // Labels: Labels with user defined metadata. + Labels map[string]string `json:"labels,omitempty"` + // Name: Output only. The resource name for this CryptoKey in the // format // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. @@ -620,6 +460,14 @@ func (s *CryptoKey) MarshalJSON() ([]byte, error) { // parent CryptoKey, in which case the server will choose the // appropriate // version for the operation. +// +// For security reasons, the raw cryptographic key material represented +// by a +// CryptoKeyVersion can never be viewed or exported. It can only be used +// to +// encrypt or decrypt data when an authorized user or application +// invokes Cloud +// KMS. type CryptoKeyVersion struct { // CreateTime: Output only. The time at which this CryptoKeyVersion was // created. @@ -689,10 +537,6 @@ func (s *CryptoKeyVersion) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DataAccessOptions: Write a Data Access (Gin) log -type DataAccessOptions struct { -} - // DecryptRequest: Request message for KeyManagementService.Decrypt. type DecryptRequest struct { // AdditionalAuthenticatedData: Optional data that must match the data @@ -1146,69 +990,6 @@ func (s *Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LogConfig: Specifies what kind of log the caller must write -// Increment a streamz counter with the specified metric and field -// names. -// -// Metric 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. -// -// Field names correspond to IAM request parameters and field values -// are -// their respective values. -// -// 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) -// * decrementing the counter -// * incrementing it by anything other than 1 -type LogConfig struct { - // CloudAudit: Cloud audit options. - CloudAudit *CloudAuditOptions `json:"cloudAudit,omitempty"` - - // Counter: Counter options. - Counter *CounterOptions `json:"counter,omitempty"` - - // DataAccess: Data access options. - DataAccess *DataAccessOptions `json:"dataAccess,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CloudAudit") 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. "CloudAudit") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LogConfig) MarshalJSON() ([]byte, error) { - type noMethod LogConfig - raw := noMethod(*s) - 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. @@ -1276,20 +1057,6 @@ type Policy struct { IamOwned bool `json:"iamOwned,omitempty"` - // Rules: If more than one rule is specified, the rules are applied in - // the following - // manner: - // - All matching LOG rules are always applied. - // - If any DENY/DENY_WITH_LOG rule matches, permission is denied. - // Logging will be applied if one or more matching rule requires - // logging. - // - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is - // granted. - // Logging will be applied if one or more matching rule requires - // logging. - // - Otherwise, if no rule applies, permission is denied. - Rules []*Rule `json:"rules,omitempty"` - // Version: Version of the `Policy`. The default version is 0. Version int64 `json:"version,omitempty"` @@ -1325,77 +1092,6 @@ func (s *Policy) MarshalJSON() ([]byte, error) { type RestoreCryptoKeyVersionRequest struct { } -// Rule: A rule to be applied in a Policy. -type Rule struct { - // Action: Required - // - // Possible values: - // "NO_ACTION" - Default no action. - // "ALLOW" - Matching 'Entries' grant access. - // "ALLOW_WITH_LOG" - Matching 'Entries' grant access and the caller - // promises to log - // the request per the returned log_configs. - // "DENY" - Matching 'Entries' deny access. - // "DENY_WITH_LOG" - Matching 'Entries' deny access and the caller - // promises to log - // the request per the returned log_configs. - // "LOG" - Matching 'Entries' tell IAM.Check callers to generate logs. - Action string `json:"action,omitempty"` - - // Conditions: Additional restrictions that must be met - Conditions []*Condition `json:"conditions,omitempty"` - - // Description: Human-readable description of the rule. - Description string `json:"description,omitempty"` - - // In: If one or more 'in' clauses are specified, the rule matches - // if - // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. - In []string `json:"in,omitempty"` - - // LogConfig: The config returned to callers of tech.iam.IAM.CheckPolicy - // for any entries - // that match the LOG action. - LogConfig []*LogConfig `json:"logConfig,omitempty"` - - // NotIn: If one or more 'not_in' clauses are specified, the rule - // matches - // if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. - // The format for in and not_in entries is the same as for members in - // a - // Binding (see google/iam/v1/policy.proto). - NotIn []string `json:"notIn,omitempty"` - - // Permissions: A permission is a string of form '..' - // (e.g., 'storage.buckets.list'). A value of '*' matches all - // permissions, - // and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Rule) MarshalJSON() ([]byte, error) { - type noMethod Rule - 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 diff --git a/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json b/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json index 891023345..16d7b4fb8 100644 --- a/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json +++ b/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json @@ -21,7 +21,7 @@ "basePath": "/cloudmonitoring/v2beta2/projects/", "rootUrl": "https://www.googleapis.com/", "servicePath": "cloudmonitoring/v2beta2/projects/", - "batchPath": "batch", + "batchPath": "batch/cloudmonitoring/v2beta2", "parameters": { "alt": { "type": "string", 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 5a80b2b37..9064be1fc 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json +++ b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json @@ -1,184 +1,1167 @@ { + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://cloudresourcemanager.googleapis.com/", + "ownerDomain": "google.com", + "name": "cloudresourcemanager", + "batchPath": "batch", + "fullyEncodeReservedExpansion": true, + "title": "Google Cloud Resource Manager API", + "ownerName": "Google", + "resources": { + "folders": { + "methods": { + "listAvailableOrgPolicyConstraints": { + "description": "Lists `Constraints` that could be applied on the specified resource.", + "request": { + "$ref": "ListAvailableOrgPolicyConstraintsRequest" + }, + "response": { + "$ref": "ListAvailableOrgPolicyConstraintsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^folders/[^/]+$", + "location": "path", + "description": "Name of the resource to list `Constraints` for.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/folders/{foldersId}:listAvailableOrgPolicyConstraints", + "id": "cloudresourcemanager.folders.listAvailableOrgPolicyConstraints", + "path": "v1/{+resource}:listAvailableOrgPolicyConstraints" + }, + "listOrgPolicies": { + "request": { + "$ref": "ListOrgPoliciesRequest" + }, + "description": "Lists all the `Policies` set for a particular resource.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "ListOrgPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "location": "path", + "description": "Name of the resource to list Policies for.", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$" + } + }, + "flatPath": "v1/folders/{foldersId}:listOrgPolicies", + "path": "v1/{+resource}:listOrgPolicies", + "id": "cloudresourcemanager.folders.listOrgPolicies" + }, + "getOrgPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "OrgPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "description": "Name of the resource the `Policy` is set on.", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/folders/{foldersId}:getOrgPolicy", + "path": "v1/{+resource}:getOrgPolicy", + "id": "cloudresourcemanager.folders.getOrgPolicy", + "request": { + "$ref": "GetOrgPolicyRequest" + }, + "description": "Gets a `Policy` on a resource.\n\nIf no `Policy` is set on the resource, a `Policy` is returned with default\nvalues including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The\n`etag` value can be used with `SetOrgPolicy()` to create or update a\n`Policy` during read-modify-write." + }, + "getEffectiveOrgPolicy": { + "response": { + "$ref": "OrgPolicy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "location": "path", + "description": "The name of the resource to start computing the effective `Policy`.", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/folders/{foldersId}:getEffectiveOrgPolicy", + "id": "cloudresourcemanager.folders.getEffectiveOrgPolicy", + "path": "v1/{+resource}:getEffectiveOrgPolicy", + "description": "Gets the effective `Policy` on a resource. This is the result of merging\n`Policies` in the resource hierarchy. The returned `Policy` will not have\nan `etag`set because it is a computed `Policy` across multiple resources.", + "request": { + "$ref": "GetEffectiveOrgPolicyRequest" + } + }, + "clearOrgPolicy": { + "flatPath": "v1/folders/{foldersId}:clearOrgPolicy", + "path": "v1/{+resource}:clearOrgPolicy", + "id": "cloudresourcemanager.folders.clearOrgPolicy", + "request": { + "$ref": "ClearOrgPolicyRequest" + }, + "description": "Clears a `Policy` from a resource.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "description": "Name of the resource for the `Policy` to clear.", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path" + } + } + }, + "setOrgPolicy": { + "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for\nthat `Constraint` on the resource if one does not exist.\n\nNot supplying an `etag` on the request `Policy` results in an unconditional\nwrite of the `Policy`.", + "request": { + "$ref": "SetOrgPolicyRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "OrgPolicy" + }, + "parameters": { + "resource": { + "description": "Resource name of the resource to attach the `Policy`.", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/folders/{foldersId}:setOrgPolicy", + "path": "v1/{+resource}:setOrgPolicy", + "id": "cloudresourcemanager.folders.setOrgPolicy" + } + } + }, + "projects": { + "methods": { + "undelete": { + "parameters": { + "projectId": { + "location": "path", + "description": "The project ID (for example, `foo-bar-123`).\n\nRequired.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}:undelete", + "id": "cloudresourcemanager.projects.undelete", + "path": "v1/projects/{projectId}:undelete", + "description": "Restores the Project identified by the specified\n`project_id` (for example, `my-project-123`).\nYou can only use this method for a Project that has a lifecycle state of\nDELETE_REQUESTED.\nAfter deletion starts, the Project cannot be restored.\n\nThe caller must have modify permissions for this Project.", + "request": { + "$ref": "UndeleteProjectRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST" + }, + "getEffectiveOrgPolicy": { + "description": "Gets the effective `Policy` on a resource. This is the result of merging\n`Policies` in the resource hierarchy. The returned `Policy` will not have\nan `etag`set because it is a computed `Policy` across multiple resources.", + "request": { + "$ref": "GetEffectiveOrgPolicyRequest" + }, + "response": { + "$ref": "OrgPolicy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "location": "path", + "description": "The name of the resource to start computing the effective `Policy`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}:getEffectiveOrgPolicy", + "id": "cloudresourcemanager.projects.getEffectiveOrgPolicy", + "path": "v1/{+resource}:getEffectiveOrgPolicy" + }, + "update": { + "response": { + "$ref": "Project" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The project ID (for example, `my-project-123`).\n\nRequired.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectId}", + "id": "cloudresourcemanager.projects.update", + "path": "v1/projects/{projectId}", + "request": { + "$ref": "Project" + }, + "description": "Updates the attributes of the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have modify permissions for this Project." + }, + "list": { + "response": { + "$ref": "ListProjectsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "filter": { + "location": "query", + "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n+ `name`\n+ `id`\n+ \u003ccode\u003elabels.\u003cem\u003ekey\u003c/em\u003e\u003c/code\u003e where *key* is the name of a label\n\nSome examples of using labels as filters:\n\n|Filter|Description|\n|------|-----------|\n|name:how*|The project's name starts with \"how\".|\n|name:Howl|The project's name is `Howl` or `howl`.|\n|name:HOWL|Equivalent to above.|\n|NAME:howl|Equivalent to above.|\n|labels.color:*|The project has the label `color`.|\n|labels.color:red|The project's label `color` has the value `red`.|\n|labels.color:red labels.size:big|The project's label `color` has the value `red` and its label `size` has the value `big`.\n\nIf you specify a filter that has both `parent.type` and `parent.id`, then\nthe `resourcemanager.projects.list` permission is checked on the parent.\nIf the user has this permission, all projects under the parent will be\nreturned after remaining filters have been applied. If the user lacks this\npermission, then all projects for which the user has the\n`resourcemanager.projects.get` permission will be returned after remaining\nfilters have been applied. If no filter is specified, the call will return\nprojects for which the user has `resourcemanager.projects.get` permissions.\n\nOptional.", + "type": "string" + }, + "pageToken": { + "description": "A pagination token returned from a previous call to ListProjects\nthat indicates from where listing should continue.\n\nOptional.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The maximum number of Projects to return in the response.\nThe server can return fewer Projects than requested.\nIf unspecified, server picks an appropriate default.\n\nOptional.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects", + "id": "cloudresourcemanager.projects.list", + "path": "v1/projects", + "description": "Lists Projects that are visible to the user and satisfy the\nspecified filter. This method returns Projects in an unspecified order.\nNew Projects do not necessarily appear at the end of the list." + }, + "setOrgPolicy": { + "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for\nthat `Constraint` on the resource if one does not exist.\n\nNot supplying an `etag` on the request `Policy` results in an unconditional\nwrite of the `Policy`.", + "request": { + "$ref": "SetOrgPolicyRequest" + }, + "response": { + "$ref": "OrgPolicy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "description": "Resource name of the resource to attach the `Policy`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}:setOrgPolicy", + "id": "cloudresourcemanager.projects.setOrgPolicy", + "path": "v1/{+resource}:setOrgPolicy" + }, + "create": { + "flatPath": "v1/projects", + "path": "v1/projects", + "id": "cloudresourcemanager.projects.create", + "request": { + "$ref": "Project" + }, + "description": "Request that a new Project be created. The result is an Operation which\ncan be used to track the creation process. It is automatically deleted\nafter a few hours, so there is no need to call DeleteOperation.\n\nOur SLO permits Project creation to take up to 30 seconds at the 90th\npercentile. As of 2016-08-29, we are observing 6 seconds 50th percentile\nlatency. 95th percentile latency is around 11 seconds. We recommend\npolling at the 5th second with an exponential backoff.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.create` on the specified parent for the new\nproject.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {} + }, + "listOrgPolicies": { + "response": { + "$ref": "ListOrgPoliciesResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "description": "Name of the resource to list Policies for.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}:listOrgPolicies", + "id": "cloudresourcemanager.projects.listOrgPolicies", + "path": "v1/{+resource}:listOrgPolicies", + "request": { + "$ref": "ListOrgPoliciesRequest" + }, + "description": "Lists all the `Policies` set for a particular resource." + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "Project" + }, + "parameterOrder": [ + "projectId" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectId}", + "path": "v1/projects/{projectId}", + "id": "cloudresourcemanager.projects.get", + "description": "Retrieves the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project." + }, + "getAncestry": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "GetAncestryResponse" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectId}:getAncestry", + "path": "v1/projects/{projectId}:getAncestry", + "id": "cloudresourcemanager.projects.getAncestry", + "description": "Gets a list of ancestors in the resource hierarchy for the Project\nidentified by the specified `project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", + "request": { + "$ref": "GetAncestryRequest" + } + }, + "testIamPermissions": { + "id": "cloudresourcemanager.projects.testIamPermissions", + "path": "v1/projects/{resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that a caller has on the specified Project.\n\nThere are no permissions required for making this API call.", + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "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.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/projects/{resource}:testIamPermissions" + }, + "delete": { + "description": "Marks the Project identified by the specified\n`project_id` (for example, `my-project-123`) for deletion.\nThis method will only affect the Project if the following criteria are met:\n\n+ The Project does not have a billing account associated with it.\n+ The Project has a lifecycle state of\nACTIVE.\n\nThis method changes the Project's lifecycle state from\nACTIVE\nto DELETE_REQUESTED.\nThe deletion starts at an unspecified time,\nat which point the Project is no longer accessible.\n\nUntil the deletion completes, you can check the lifecycle state\nchecked by retrieving the Project with GetProject,\nand the Project remains visible to ListProjects.\nHowever, you cannot update the project.\n\nAfter the deletion completes, the Project is not retrievable by\nthe GetProject and\nListProjects methods.\n\nThe caller must have modify permissions for this Project.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "DELETE", + "parameters": { + "projectId": { + "description": "The Project ID (for example, `foo-bar-123`).\n\nRequired.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}", + "id": "cloudresourcemanager.projects.delete", + "path": "v1/projects/{projectId}" + }, + "clearOrgPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Name of the resource for the `Policy` to clear.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}:clearOrgPolicy", + "path": "v1/{+resource}:clearOrgPolicy", + "id": "cloudresourcemanager.projects.clearOrgPolicy", + "request": { + "$ref": "ClearOrgPolicyRequest" + }, + "description": "Clears a `Policy` from a resource." + }, + "setIamPolicy": { + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the IAM access control policy for the specified Project. Replaces\nany existing policy.\n\nThe following constraints apply when using `setIamPolicy()`:\n\n+ Project does not support `allUsers` and `allAuthenticatedUsers` as\n`members` in a `Binding` of a `Policy`.\n\n+ The owner role can be granted only to `user` and `serviceAccount`.\n\n+ Service accounts can be made owners of a project directly\nwithout any restrictions. However, to be added as an owner, a user must be\ninvited via Cloud Platform console and must accept the invitation.\n\n+ A user cannot be granted the owner role using `setIamPolicy()`. The user\nmust be granted the owner role using the Cloud Platform Console and must\nexplicitly accept the invitation.\n\n+ Invitations to grant the owner role cannot be sent using\n`setIamPolicy()`;\nthey must be sent only using the Cloud Platform Console.\n\n+ Membership changes that leave the project without any owners that have\naccepted the Terms of Service (ToS) will be rejected.\n\n+ If the project is not part of an organization, there must be at least\none owner who has accepted the Terms of Service (ToS) agreement in the\npolicy. Calling `setIamPolicy()` to remove the last ToS-accepted owner\nfrom the policy will fail. This restriction also applies to legacy\nprojects that no longer have owners who have accepted the ToS. Edits to\nIAM policies will be rejected until the lack of a ToS-accepting owner is\nrectified.\n\n+ Calling this method requires enabling the App Engine Admin API.\n\nNote: Removing service accounts from policies or changing their roles\ncan render services completely inoperable. It is important to understand\nhow the service account is being used before removing or updating its\nroles.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.setIamPolicy` on the project", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "type": "string", + "required": true, + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field." + } + }, + "flatPath": "v1/projects/{resource}:setIamPolicy", + "id": "cloudresourcemanager.projects.setIamPolicy", + "path": "v1/projects/{resource}:setIamPolicy" + }, + "listAvailableOrgPolicyConstraints": { + "response": { + "$ref": "ListAvailableOrgPolicyConstraintsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Name of the resource to list `Constraints` for.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}:listAvailableOrgPolicyConstraints", + "id": "cloudresourcemanager.projects.listAvailableOrgPolicyConstraints", + "path": "v1/{+resource}:listAvailableOrgPolicyConstraints", + "description": "Lists `Constraints` that could be applied on the specified resource.", + "request": { + "$ref": "ListAvailableOrgPolicyConstraintsRequest" + } + }, + "getIamPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "type": "string", + "required": true, + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field." + } + }, + "flatPath": "v1/projects/{resource}:getIamPolicy", + "path": "v1/projects/{resource}:getIamPolicy", + "id": "cloudresourcemanager.projects.getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "description": "Returns the IAM access control policy for the specified Project.\nPermission is denied if the policy or the resource does not exist.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.getIamPolicy` on the project" + }, + "getOrgPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "OrgPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "description": "Name of the resource the `Policy` is set on.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}:getOrgPolicy", + "path": "v1/{+resource}:getOrgPolicy", + "id": "cloudresourcemanager.projects.getOrgPolicy", + "request": { + "$ref": "GetOrgPolicyRequest" + }, + "description": "Gets a `Policy` on a resource.\n\nIf no `Policy` is set on the resource, a `Policy` is returned with default\nvalues including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The\n`etag` value can be used with `SetOrgPolicy()` to create or update a\n`Policy` during read-modify-write." + } + } + }, + "organizations": { + "methods": { + "setOrgPolicy": { + "response": { + "$ref": "OrgPolicy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "location": "path", + "description": "Resource name of the resource to attach the `Policy`.", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+$" + } + }, + "flatPath": "v1/organizations/{organizationsId}:setOrgPolicy", + "id": "cloudresourcemanager.organizations.setOrgPolicy", + "path": "v1/{+resource}:setOrgPolicy", + "request": { + "$ref": "SetOrgPolicyRequest" + }, + "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for\nthat `Constraint` on the resource if one does not exist.\n\nNot supplying an `etag` on the request `Policy` results in an unconditional\nwrite of the `Policy`." + }, + "setIamPolicy": { + "description": "Sets the access control policy on an Organization resource. Replaces any\nexisting policy. The `resource` field should be the organization's resource\nname, e.g. \"organizations/123\".\n\nAuthorization requires the Google IAM permission\n`resourcemanager.organizations.setIamPolicy` on the specified organization", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/organizations/{organizationsId}:setIamPolicy", + "id": "cloudresourcemanager.organizations.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy" + }, + "listOrgPolicies": { + "id": "cloudresourcemanager.organizations.listOrgPolicies", + "path": "v1/{+resource}:listOrgPolicies", + "request": { + "$ref": "ListOrgPoliciesRequest" + }, + "description": "Lists all the `Policies` set for a particular resource.", + "response": { + "$ref": "ListOrgPoliciesResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "description": "Name of the resource to list Policies for.", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/organizations/{organizationsId}:listOrgPolicies" + }, + "listAvailableOrgPolicyConstraints": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "ListAvailableOrgPolicyConstraintsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "Name of the resource to list `Constraints` for.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/organizations/{organizationsId}:listAvailableOrgPolicyConstraints", + "path": "v1/{+resource}:listAvailableOrgPolicyConstraints", + "id": "cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints", + "request": { + "$ref": "ListAvailableOrgPolicyConstraintsRequest" + }, + "description": "Lists `Constraints` that could be applied on the specified resource." + }, + "getIamPolicy": { + "request": { + "$ref": "GetIamPolicyRequest" + }, + "description": "Gets the access control policy for an Organization resource. May be empty\nif no such policy or resource exists. The `resource` field should be the\norganization's resource name, e.g. \"organizations/123\".\n\nAuthorization requires the Google IAM permission\n`resourcemanager.organizations.getIamPolicy` on the specified organization", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/organizations/{organizationsId}:getIamPolicy", + "id": "cloudresourcemanager.organizations.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy" + }, + "getOrgPolicy": { + "response": { + "$ref": "OrgPolicy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "Name of the resource the `Policy` is set on.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/organizations/{organizationsId}:getOrgPolicy", + "id": "cloudresourcemanager.organizations.getOrgPolicy", + "path": "v1/{+resource}:getOrgPolicy", + "request": { + "$ref": "GetOrgPolicyRequest" + }, + "description": "Gets a `Policy` on a resource.\n\nIf no `Policy` is set on the resource, a `Policy` is returned with default\nvalues including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The\n`etag` value can be used with `SetOrgPolicy()` to create or update a\n`Policy` during read-modify-write." + }, + "search": { + "description": "Searches Organization resources that are visible to the user and satisfy\nthe specified filter. This method returns Organizations in an unspecified\norder. New Organizations do not necessarily appear at the end of the\nresults.\n\nSearch will only return organizations on which the user has the permission\n`resourcemanager.organizations.get`", + "request": { + "$ref": "SearchOrganizationsRequest" + }, + "response": { + "$ref": "SearchOrganizationsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/organizations:search", + "id": "cloudresourcemanager.organizations.search", + "path": "v1/organizations:search" + }, + "getEffectiveOrgPolicy": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "The name of the resource to start computing the effective `Policy`." + } + }, + "flatPath": "v1/organizations/{organizationsId}:getEffectiveOrgPolicy", + "id": "cloudresourcemanager.organizations.getEffectiveOrgPolicy", + "path": "v1/{+resource}:getEffectiveOrgPolicy", + "request": { + "$ref": "GetEffectiveOrgPolicyRequest" + }, + "description": "Gets the effective `Policy` on a resource. This is the result of merging\n`Policies` in the resource hierarchy. The returned `Policy` will not have\nan `etag`set because it is a computed `Policy` across multiple resources.", + "response": { + "$ref": "OrgPolicy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST" + }, + "get": { + "flatPath": "v1/organizations/{organizationsId}", + "path": "v1/{+name}", + "id": "cloudresourcemanager.organizations.get", + "description": "Fetches an Organization resource identified by the specified resource name.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Organization" + }, + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\"." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "testIamPermissions": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "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.", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/organizations/{organizationsId}:testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "id": "cloudresourcemanager.organizations.testIamPermissions", + "description": "Returns permissions that a caller has on the specified Organization.\nThe `resource` field should be the organization's resource name,\ne.g. \"organizations/123\".\n\nThere are no permissions required for making this API call.", + "request": { + "$ref": "TestIamPermissionsRequest" + } + }, + "clearOrgPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "Name of the resource for the `Policy` to clear.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/organizations/{organizationsId}:clearOrgPolicy", + "path": "v1/{+resource}:clearOrgPolicy", + "id": "cloudresourcemanager.organizations.clearOrgPolicy", + "request": { + "$ref": "ClearOrgPolicyRequest" + }, + "description": "Clears a `Policy` from a resource." + } + } + }, + "operations": { + "methods": { + "get": { + "parameters": { + "name": { + "description": "The name of the operation resource.", + "type": "string", + "required": true, + "pattern": "^operations/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/operations/{operationsId}", + "path": "v1/{+name}", + "id": "cloudresourcemanager.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + } + } + } + }, + "liens": { + "methods": { + "list": { + "path": "v1/liens", + "id": "cloudresourcemanager.liens.list", + "description": "List all Liens applied to the `parent` resource.\n\nCallers of this method will require permission on the `parent` resource.\nFor example, a Lien with a `parent` of `projects/1234` requires permission\n`resourcemanager.projects.get`.", + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ListLiensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "The `next_page_token` value returned from a previous List request, if any.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The maximum number of items to return. This is a suggestion for the server.", + "type": "integer" + }, + "parent": { + "description": "The name of the resource to list all attached Liens.\nFor example, `projects/1234`.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1/liens" + }, + "create": { + "path": "v1/liens", + "id": "cloudresourcemanager.liens.create", + "request": { + "$ref": "Lien" + }, + "description": "Create a Lien which applies to the resource denoted by the `parent` field.\n\nCallers of this method will require permission on the `parent` resource.\nFor example, applying to `projects/1234` requires permission\n`resourcemanager.projects.updateLiens`.\n\nNOTE: Some resources may limit the number of Liens which may be applied.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Lien" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": {}, + "flatPath": "v1/liens" + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "name": { + "pattern": "^liens/.+$", + "location": "path", + "description": "The name/identifier of the Lien to delete.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/liens/{liensId}", + "path": "v1/{+name}", + "id": "cloudresourcemanager.liens.delete", + "description": "Delete a Lien by `name`.\n\nCallers of this method will require permission on the `parent` resource.\nFor example, a Lien with a `parent` of `projects/1234` requires permission\n`resourcemanager.projects.updateLiens`." + } + } + } + }, + "parameters": { + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, + "access_token": { + "type": "string", + "location": "query", + "description": "OAuth access token." + }, + "key": { + "location": "query", + "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.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + } + }, + "version": "v1", + "baseUrl": "https://cloudresourcemanager.googleapis.com/", + "kind": "discovery#restDescription", + "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", + "servicePath": "", + "basePath": "", + "id": "cloudresourcemanager:v1", + "documentationLink": "https://cloud.google.com/resource-manager", + "revision": "20170911", "discoveryVersion": "v1", "schemas": { - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "Organization": { - "description": "The root node in the resource hierarchy to which a particular entity's\n(e.g., company) resources belong.", - "type": "object", - "properties": { - "displayName": { - "description": "A friendly string to be used to refer to the Organization in the UI.\nAssigned by the server, set to the primary domain of the G Suite\ncustomer that owns the organization.\n@OutputOnly", - "type": "string" - }, - "creationTime": { - "format": "google-datetime", - "description": "Timestamp when the Organization was created. Assigned by the server.\n@OutputOnly", - "type": "string" - }, - "lifecycleState": { - "enumDescriptions": [ - "Unspecified state. This is only useful for distinguishing unset values.", - "The normal and active state.", - "The organization has been marked for deletion by the user." - ], - "enum": [ - "LIFECYCLE_STATE_UNSPECIFIED", - "ACTIVE", - "DELETE_REQUESTED" - ], - "description": "The organization's current lifecycle state. Assigned by the server.\n@OutputOnly", - "type": "string" - }, - "owner": { - "$ref": "OrganizationOwner", - "description": "The owner of this Organization. The owner should be specified on\ncreation. Once set, it cannot be changed.\nThis field is required." - }, - "name": { - "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\".", - "type": "string" - } - }, - "id": "Organization" - }, - "ListAvailableOrgPolicyConstraintsResponse": { - "description": "The response returned from the ListAvailableOrgPolicyConstraints method.\nReturns all `Constraints` that could be set at this level of the hierarchy\n(contrast with the response from `ListPolicies`, which returns all policies\nwhich are set).", - "type": "object", - "properties": { - "constraints": { - "description": "The collection of constraints that are settable on the request resource.", - "items": { - "$ref": "Constraint" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Page token used to retrieve the next page. This is currently not used.", - "type": "string" - } - }, - "id": "ListAvailableOrgPolicyConstraintsResponse" - }, - "ListPolicy": { - "description": "Used in `policy_type` to specify how `list_policy` behaves at this\nresource.\n\nA `ListPolicy` can define specific values that are allowed or denied by\nsetting either the `allowed_values` or `denied_values` fields. It can also\nbe used to allow or deny all values, by setting the `all_values` field. If\n`all_values` is `ALL_VALUES_UNSPECIFIED`, exactly one of `allowed_values`\nor `denied_values` must be set (attempting to set both or neither will\nresult in a failed request). If `all_values` is set to either `ALLOW` or\n`DENY`, `allowed_values` and `denied_values` must be unset.", - "type": "object", - "properties": { - "allowedValues": { - "description": "List of values allowed at this resource. Can only be set if no values\nare set for `denied_values` and `all_values` is set to\n`ALL_VALUES_UNSPECIFIED`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "inheritFromParent": { - "description": "Determines the inheritance behavior for this `Policy`.\n\nBy default, a `ListPolicy` set at a resource supercedes any `Policy` set\nanywhere up the resource hierarchy. However, if `inherit_from_parent` is\nset to `true`, then the values from the effective `Policy` of the parent\nresource are inherited, meaning the values set in this `Policy` are\nadded to the values inherited up the hierarchy.\n\nSetting `Policy` hierarchies that inherit both allowed values and denied\nvalues isn't recommended in most circumstances to keep the configuration\nsimple and understandable. However, it is possible to set a `Policy` with\n`allowed_values` set that inherits a `Policy` with `denied_values` set.\nIn this case, the values that are allowed must be in `allowed_values` and\nnot present in `denied_values`.\n\nFor example, suppose you have a `Constraint`\n`constraints/serviceuser.services`, which has a `constraint_type` of\n`list_constraint`, and with `constraint_default` set to `ALLOW`.\nSuppose that at the Organization level, a `Policy` is applied that\nrestricts the allowed API activations to {`E1`, `E2`}. Then, if a\n`Policy` is applied to a project below the Organization that has\n`inherit_from_parent` set to `false` and field all_values set to DENY,\nthen an attempt to activate any API will be denied.\n\nThe following examples demonstrate different possible layerings:\n\nExample 1 (no inherited values):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: “E1” allowed_values:”E2”}\n ``projects/bar`` has `inherit_from_parent` `false` and values:\n {allowed_values: \"E3\" allowed_values: \"E4\"}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe accepted values at `projects/bar` are `E3`, and `E4`.\n\nExample 2 (inherited values):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: “E1” allowed_values:”E2”}\n `projects/bar` has a `Policy` with values:\n {value: “E3” value: ”E4” inherit_from_parent: true}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.\n\nExample 3 (inheriting both allowed and denied values):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"E1\" allowed_values: \"E2\"}\n `projects/bar` has a `Policy` with:\n {denied_values: \"E1\"}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe value accepted at `projects/bar` is `E2`.\n\nExample 4 (RestoreDefault):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: “E1” allowed_values:”E2”}\n `projects/bar` has a `Policy` with values:\n {RestoreDefault: {}}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe accepted values at `projects/bar` are either all or none depending on\nthe value of `constraint_default` (if `ALLOW`, all; if\n`DENY`, none).\n\nExample 5 (no policy inherits parent policy):\n `organizations/foo` has no `Policy` set.\n `projects/bar` has no `Policy` set.\nThe accepted values at both levels are either all or none depending on\nthe value of `constraint_default` (if `ALLOW`, all; if\n`DENY`, none).\n\nExample 6 (ListConstraint allowing all):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: “E1” allowed_values: ”E2”}\n `projects/bar` has a `Policy` with:\n {all: ALLOW}\nThe accepted values at `organizations/foo` are `E1`, E2`.\nAny value is accepted at `projects/bar`.\n\nExample 7 (ListConstraint allowing none):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: “E1” allowed_values: ”E2”}\n `projects/bar` has a `Policy` with:\n {all: DENY}\nThe accepted values at `organizations/foo` are `E1`, E2`.\nNo value is accepted at `projects/bar`.", - "type": "boolean" - }, - "suggestedValue": { - "description": "Optional. The Google Cloud Console will try to default to a configuration\nthat matches the value specified in this `Policy`. If `suggested_value`\nis not set, it will inherit the value specified higher in the hierarchy,\nunless `inherit_from_parent` is `false`.", - "type": "string" - }, - "deniedValues": { - "description": "List of values denied at this resource. Can only be set if no values are\nset for `allowed_values` and `all_values` is set to\n`ALL_VALUES_UNSPECIFIED`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allValues": { - "description": "The policy all_values state.", - "type": "string", - "enumDescriptions": [ - "Indicates that either allowed_values or denied_values must be set.", - "A policy with this set allows all values.", - "A policy with this set denies all values." - ], - "enum": [ - "ALL_VALUES_UNSPECIFIED", - "ALLOW", - "DENY" - ] - } - }, - "id": "ListPolicy" - }, - "GetAncestryResponse": { - "description": "Response from the GetAncestry method.", - "type": "object", - "properties": { - "ancestor": { - "description": "Ancestors are ordered from bottom to top of the resource hierarchy. The\nfirst ancestor is the project itself, followed by the project's parent,\netc.", - "items": { - "$ref": "Ancestor" - }, - "type": "array" - } - }, - "id": "GetAncestryResponse" - }, - "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.", - "type": "object", - "properties": { - "logType": { - "description": "The log type that this config enables.", - "type": "string", - "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" - ], - "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" - ] - }, - "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" - } - }, - "id": "AuditLogConfig" - }, - "SearchOrganizationsRequest": { - "description": "The request sent to the `SearchOrganizations` method.", - "type": "object", - "properties": { - "pageSize": { - "format": "int32", - "description": "The maximum number of Organizations to return in the response.\nThis field is optional.", - "type": "integer" - }, - "filter": { - "description": "An optional query string used to filter the Organizations to return in\nthe response. Filter rules are case-insensitive.\n\n\nOrganizations may be filtered by `owner.directoryCustomerId` or by\n`domain`, where the domain is a Google for Work domain, for example:\n\n|Filter|Description|\n|------|-----------|\n|owner.directorycustomerid:123456789|Organizations with\n`owner.directory_customer_id` equal to `123456789`.|\n|domain:google.com|Organizations corresponding to the domain `google.com`.|\n\nThis field is optional.", - "type": "string" - }, - "pageToken": { - "description": "A pagination token returned from a previous call to `SearchOrganizations`\nthat indicates from where listing should continue.\nThis field is optional.", - "type": "string" - } - }, - "id": "SearchOrganizationsRequest" - }, "GetAncestryRequest": { - "description": "The request sent to the\nGetAncestry\nmethod.", "type": "object", "properties": {}, - "id": "GetAncestryRequest" + "id": "GetAncestryRequest", + "description": "The request sent to the\nGetAncestry\nmethod." }, "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "type": "object", "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).", @@ -188,54 +1171,9 @@ "type": "array" } }, - "id": "TestIamPermissionsRequest" - }, - "ListAvailableOrgPolicyConstraintsRequest": { - "description": "The request sent to the [ListAvailableOrgPolicyConstraints]\ngoogle.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method.", - "type": "object", - "properties": { - "pageToken": { - "description": "Page token used to retrieve the next page. This is currently unsupported\nand will be ignored. The server may at any point start using this field.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Size of the pages to be returned. This is currently unsupported and will\nbe ignored. The server may at any point start using this field to limit\npage size.", - "type": "integer" - } - }, - "id": "ListAvailableOrgPolicyConstraintsRequest" - }, - "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "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": { - "format": "byte", - "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.", - "type": "string" - }, - "version": { - "format": "int32", - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer" - } - }, - "id": "Policy" + "id": "TestIamPermissionsRequest", + "description": "Request message for `TestIamPermissions` method.", + "type": "object" }, "FolderOperation": { "description": "Metadata describing a long running folder operation", @@ -256,8 +1194,8 @@ ] }, "sourceParent": { - "description": "The resource name of the folder's parent.\nOnly applicable when the operation_type is MOVE.", - "type": "string" + "type": "string", + "description": "The resource name of the folder's parent.\nOnly applicable when the operation_type is MOVE." }, "displayName": { "description": "The display name of the folder.", @@ -270,6 +1208,53 @@ }, "id": "FolderOperation" }, + "Policy": { + "id": "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", + "properties": { + "etag": { + "format": "byte", + "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.", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" + }, + "auditConfigs": { + "items": { + "$ref": "AuditConfig" + }, + "type": "array", + "description": "Specifies cloud audit logging configuration for this policy." + }, + "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" + } + } + }, + "ListAvailableOrgPolicyConstraintsRequest": { + "properties": { + "pageToken": { + "description": "Page token used to retrieve the next page. This is currently unsupported\nand will be ignored. The server may at any point start using this field.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Size of the pages to be returned. This is currently unsupported and will\nbe ignored. The server may at any point start using this field to limit\npage size.", + "type": "integer" + } + }, + "id": "ListAvailableOrgPolicyConstraintsRequest", + "description": "The request sent to the [ListAvailableOrgPolicyConstraints]\ngoogle.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method.", + "type": "object" + }, "ResourceId": { "description": "A container to reference an id for any resource type. A `resource` in Google\nCloud Platform is a generic term for something you (a developer) may want to\ninteract with through one of our API's. Some examples are an App Engine app,\na Compute Engine instance, a Cloud SQL database, and so on.", "type": "object", @@ -286,7 +1271,6 @@ "id": "ResourceId" }, "GetEffectiveOrgPolicyRequest": { - "description": "The request sent to the GetEffectiveOrgPolicy method.", "type": "object", "properties": { "constraint": { @@ -294,7 +1278,8 @@ "type": "string" } }, - "id": "GetEffectiveOrgPolicyRequest" + "id": "GetEffectiveOrgPolicyRequest", + "description": "The request sent to the GetEffectiveOrgPolicy method." }, "ListOrgPoliciesRequest": { "description": "The request sent to the ListOrgPolicies method.", @@ -313,9 +1298,14 @@ "id": "ListOrgPoliciesRequest" }, "Operation": { + "id": "Operation", "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" + }, "error": { "$ref": "Status", "description": "The error result of the operation in case of failure or cancellation." @@ -329,7 +1319,7 @@ "type": "object" }, "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", "type": "boolean" }, "response": { @@ -339,13 +1329,8 @@ }, "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" } - }, - "id": "Operation" + } }, "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\nAuditConfig 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.", @@ -365,70 +1350,6 @@ }, "id": "AuditConfig" }, - "Constraint": { - "description": "A `Constraint` describes a way in which a resource's configuration can be\nrestricted. For example, it controls which cloud services can be activated\nacross an organization, or whether a Compute Engine instance can have\nserial port connections established. `Constraints` can be configured by the\norganization's policy adminstrator to fit the needs of the organzation by\nsetting Policies for `Constraints` at different locations in the\norganization's resource hierarchy. Policies are inherited down the resource\nhierarchy from higher levels, but can also be overridden. For details about\nthe inheritance rules please read about\nPolicies.\n\n`Constraints` have a default behavior determined by the `constraint_default`\nfield, which is the enforcement behavior that is used in the absence of a\n`Policy` being defined or inherited for the resource in question.", - "type": "object", - "properties": { - "constraintDefault": { - "enumDescriptions": [ - "This is only used for distinguishing unset values and should never be\nused.", - "Indicate that all values are allowed for list constraints.\nIndicate that enforcement is off for boolean constraints.", - "Indicate that all values are denied for list constraints.\nIndicate that enforcement is on for boolean constraints." - ], - "enum": [ - "CONSTRAINT_DEFAULT_UNSPECIFIED", - "ALLOW", - "DENY" - ], - "description": "The evaluation behavior of this constraint in the absense of 'Policy'.", - "type": "string" - }, - "name": { - "description": "Immutable value, required to globally be unique. For example,\n`constraints/serviceuser.services`", - "type": "string" - }, - "listConstraint": { - "$ref": "ListConstraint", - "description": "Defines this constraint as being a ListConstraint." - }, - "version": { - "format": "int32", - "description": "Version of the `Constraint`. Default version is 0;", - "type": "integer" - }, - "displayName": { - "description": "The human readable name.\n\nMutable.", - "type": "string" - }, - "description": { - "description": "Detailed description of what this `Constraint` controls as well as how and\nwhere it is enforced.\n\nMutable.", - "type": "string" - }, - "booleanConstraint": { - "$ref": "BooleanConstraint", - "description": "Defines this constraint as being a BooleanConstraint." - } - }, - "id": "Constraint" - }, - "ListLiensResponse": { - "description": "The response message for Liens.ListLiens.", - "type": "object", - "properties": { - "liens": { - "description": "A list of Liens.", - "items": { - "$ref": "Lien" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Token to retrieve the next page of results, or empty if there are no more\nresults in the list.", - "type": "string" - } - }, - "id": "ListLiensResponse" - }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", @@ -456,16 +1377,80 @@ }, "id": "Status" }, + "ListLiensResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more\nresults in the list.", + "type": "string" + }, + "liens": { + "description": "A list of Liens.", + "items": { + "$ref": "Lien" + }, + "type": "array" + } + }, + "id": "ListLiensResponse", + "description": "The response message for Liens.ListLiens." + }, + "Constraint": { + "id": "Constraint", + "description": "A `Constraint` describes a way in which a resource's configuration can be\nrestricted. For example, it controls which cloud services can be activated\nacross an organization, or whether a Compute Engine instance can have\nserial port connections established. `Constraints` can be configured by the\norganization's policy adminstrator to fit the needs of the organzation by\nsetting Policies for `Constraints` at different locations in the\norganization's resource hierarchy. Policies are inherited down the resource\nhierarchy from higher levels, but can also be overridden. For details about\nthe inheritance rules please read about\nPolicies.\n\n`Constraints` have a default behavior determined by the `constraint_default`\nfield, which is the enforcement behavior that is used in the absence of a\n`Policy` being defined or inherited for the resource in question.", + "type": "object", + "properties": { + "description": { + "description": "Detailed description of what this `Constraint` controls as well as how and\nwhere it is enforced.\n\nMutable.", + "type": "string" + }, + "displayName": { + "description": "The human readable name.\n\nMutable.", + "type": "string" + }, + "booleanConstraint": { + "description": "Defines this constraint as being a BooleanConstraint.", + "$ref": "BooleanConstraint" + }, + "constraintDefault": { + "type": "string", + "enumDescriptions": [ + "This is only used for distinguishing unset values and should never be\nused.", + "Indicate that all values are allowed for list constraints.\nIndicate that enforcement is off for boolean constraints.", + "Indicate that all values are denied for list constraints.\nIndicate that enforcement is on for boolean constraints." + ], + "enum": [ + "CONSTRAINT_DEFAULT_UNSPECIFIED", + "ALLOW", + "DENY" + ], + "description": "The evaluation behavior of this constraint in the absense of 'Policy'." + }, + "name": { + "description": "Immutable value, required to globally be unique. For example,\n`constraints/serviceuser.services`", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the `Constraint`. Default version is 0;", + "type": "integer" + }, + "listConstraint": { + "$ref": "ListConstraint", + "description": "Defines this constraint as being a ListConstraint." + } + } + }, "Binding": { "description": "Associates `members` with a `role`.", "type": "object", "properties": { "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` or `joe@example.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" + "type": "array", + "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` or `joe@example.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" }, "role": { "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", @@ -514,9 +1499,12 @@ "id": "ClearOrgPolicyRequest" }, "ProjectCreationStatus": { - "description": "A status object which is used as the `metadata` field for the Operation\nreturned by CreateProject. It provides insight for when significant phases of\nProject creation have completed.", "type": "object", "properties": { + "ready": { + "description": "True if the project creation process is complete.", + "type": "boolean" + }, "gettable": { "description": "True if the project can be retrieved using GetProject. No other operations\non the project are guaranteed to work until the project creation is\ncomplete.", "type": "boolean" @@ -525,13 +1513,10 @@ "format": "google-datetime", "description": "Creation time of the project creation workflow.", "type": "string" - }, - "ready": { - "description": "True if the project creation process is complete.", - "type": "boolean" } }, - "id": "ProjectCreationStatus" + "id": "ProjectCreationStatus", + "description": "A status object which is used as the `metadata` field for the Operation\nreturned by CreateProject. It provides insight for when significant phases of\nProject creation have completed." }, "BooleanConstraint": { "description": "A `Constraint` that is either enforced or not.\n\nFor example a constraint `constraints/compute.disableSerialPortAccess`.\nIf it is enforced on a VM instance, serial port connections will not be\nopened to that instance.", @@ -539,12 +1524,6 @@ "properties": {}, "id": "BooleanConstraint" }, - "GetIamPolicyRequest": { - "description": "Request message for `GetIamPolicy` method.", - "type": "object", - "properties": {}, - "id": "GetIamPolicyRequest" - }, "TestIamPermissionsResponse": { "description": "Response message for `TestIamPermissions` method.", "type": "object", @@ -559,13 +1538,19 @@ }, "id": "TestIamPermissionsResponse" }, + "GetIamPolicyRequest": { + "description": "Request message for `GetIamPolicy` method.", + "type": "object", + "properties": {}, + "id": "GetIamPolicyRequest" + }, "OrganizationOwner": { "description": "The entity that owns an Organization. The lifetime of the Organization and\nall of its descendants are bound to the `OrganizationOwner`. If the\n`OrganizationOwner` is deleted, the Organization and all its descendants will\nbe deleted.", "type": "object", "properties": { "directoryCustomerId": { - "description": "The Google for Work customer id used in the Directory API.", - "type": "string" + "type": "string", + "description": "The Google for Work customer id used in the Directory API." } }, "id": "OrganizationOwner" @@ -592,11 +1577,21 @@ "description": "A Project is a high-level Google Cloud Platform entity. It is a\ncontainer for ACLs, APIs, App Engine Apps, VMs, and other\nGoogle Cloud Platform resources.", "type": "object", "properties": { + "name": { + "description": "The user-assigned display name of the Project.\nIt must be 4 to 30 characters.\nAllowed characters are: lowercase and uppercase letters, numbers,\nhyphen, single-quote, double-quote, space, and exclamation point.\n\nExample: \u003ccode\u003eMy Project\u003c/code\u003e\nRead-write.", + "type": "string" + }, "projectId": { "description": "The unique, user-assigned ID of the Project.\nIt must be 6 to 30 lowercase letters, digits, or hyphens.\nIt must start with a letter.\nTrailing hyphens are prohibited.\n\nExample: \u003ccode\u003etokyo-rain-123\u003c/code\u003e\nRead-only after creation.", "type": "string" }, "lifecycleState": { + "enum": [ + "LIFECYCLE_STATE_UNSPECIFIED", + "ACTIVE", + "DELETE_REQUESTED", + "DELETE_IN_PROGRESS" + ], "description": "The Project lifecycle state.\n\nRead-only.", "type": "string", "enumDescriptions": [ @@ -604,12 +1599,6 @@ "The normal and active state.", "The project has been marked for deletion by the user\n(by invoking\nDeleteProject)\nor by the system (Google Cloud Platform).\nThis can generally be reversed by invoking UndeleteProject.", "This lifecycle state is no longer used and not returned by the API." - ], - "enum": [ - "LIFECYCLE_STATE_UNSPECIFIED", - "ACTIVE", - "DELETE_REQUESTED", - "DELETE_IN_PROGRESS" ] }, "projectNumber": { @@ -618,24 +1607,20 @@ "type": "string" }, "parent": { - "description": "An optional reference to a parent Resource.\n\nThe only supported parent type is \"organization\". Once set, the parent\ncannot be modified. The `parent` can be set on creation or using the\n`UpdateProject` method; the end user must have the\n`resourcemanager.projects.create` permission on the parent.\n\nRead-write.", - "$ref": "ResourceId" + "$ref": "ResourceId", + "description": "An optional reference to a parent Resource.\n\nThe only supported parent type is \"organization\". Once set, the parent\ncannot be modified. The `parent` can be set on creation or using the\n`UpdateProject` method; the end user must have the\n`resourcemanager.projects.create` permission on the parent.\n\nRead-write." }, "labels": { + "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", "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\\])?)?.\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" + } }, "createTime": { + "type": "string", "format": "google-datetime", - "description": "Creation time.\n\nRead-only.", - "type": "string" - }, - "name": { - "description": "The user-assigned display name of the Project.\nIt must be 4 to 30 characters.\nAllowed characters are: lowercase and uppercase letters, numbers,\nhyphen, single-quote, double-quote, space, and exclamation point.\n\nExample: \u003ccode\u003eMy Project\u003c/code\u003e\nRead-write.", - "type": "string" + "description": "Creation time.\n\nRead-only." } }, "id": "Project" @@ -645,11 +1630,11 @@ "type": "object", "properties": { "policies": { - "description": "The `Policies` that are set on the resource. It will be empty if no\n`Policies` are set.", "items": { "$ref": "OrgPolicy" }, - "type": "array" + "type": "array", + "description": "The `Policies` that are set on the resource. It will be empty if no\n`Policies` are set." }, "nextPageToken": { "description": "Page token used to retrieve the next page. This is currently not used, but\nthe server may at any point start supplying a valid token.", @@ -659,22 +1644,22 @@ "id": "ListOrgPoliciesResponse" }, "SearchOrganizationsResponse": { - "description": "The response returned from the `SearchOrganizations` method.", - "type": "object", "properties": { - "nextPageToken": { - "description": "A pagination token to be used to retrieve the next page of results. If the\nresult is too large to fit within the page size specified in the request,\nthis field will be set with a token that can be used to fetch the next page\nof results. If this field is empty, it indicates that this response\ncontains the last page of results.", - "type": "string" - }, "organizations": { "description": "The list of Organizations that matched the search query, possibly\npaginated.", "items": { "$ref": "Organization" }, "type": "array" + }, + "nextPageToken": { + "description": "A pagination token to be used to retrieve the next page of results. If the\nresult is too large to fit within the page size specified in the request,\nthis field will be set with a token that can be used to fetch the next page\nof results. If this field is empty, it indicates that this response\ncontains the last page of results.", + "type": "string" } }, - "id": "SearchOrganizationsResponse" + "id": "SearchOrganizationsResponse", + "description": "The response returned from the `SearchOrganizations` method.", + "type": "object" }, "FolderOperationError": { "description": "A classification of the Folder Operation error.", @@ -711,6 +1696,17 @@ }, "id": "FolderOperationError" }, + "BooleanPolicy": { + "type": "object", + "properties": { + "enforced": { + "description": "If `true`, then the `Policy` is enforced. If `false`, then any\nconfiguration is acceptable.\n\nSuppose you have a `Constraint` `constraints/compute.disableSerialPortAccess`\nwith `constraint_default` set to `ALLOW`. A `Policy` for that\n`Constraint` exhibits the following behavior:\n - If the `Policy` at this resource has enforced set to `false`, serial\n port connection attempts will be allowed.\n - If the `Policy` at this resource has enforced set to `true`, serial\n port connection attempts will be refused.\n - If the `Policy` at this resource is `RestoreDefault`, serial port\n connection attempts will be allowed.\n - If no `Policy` is set at this resource or anywhere higher in the\n resource hierarchy, serial port connection attempts will be allowed.\n - If no `Policy` is set at this resource, but one exists higher in the\n resource hierarchy, the behavior is as if the`Policy` were set at\n this resource.\n\nThe following examples demonstrate the different possible layerings:\n\nExample 1 (nearest `Constraint` wins):\n `organizations/foo` has a `Policy` with:\n {enforced: false}\n `projects/bar` has no `Policy` set.\nThe constraint at `projects/bar` and `organizations/foo` will not be\nenforced.\n\nExample 2 (enforcement gets replaced):\n `organizations/foo` has a `Policy` with:\n {enforced: false}\n `projects/bar` has a `Policy` with:\n {enforced: true}\nThe constraint at `organizations/foo` is not enforced.\nThe constraint at `projects/bar` is enforced.\n\nExample 3 (RestoreDefault):\n `organizations/foo` has a `Policy` with:\n {enforced: true}\n `projects/bar` has a `Policy` with:\n {RestoreDefault: {}}\nThe constraint at `organizations/foo` is enforced.\nThe constraint at `projects/bar` is not enforced, because\n`constraint_default` for the `Constraint` is `ALLOW`.", + "type": "boolean" + } + }, + "id": "BooleanPolicy", + "description": "Used in `policy_type` to specify how `boolean_policy` will behave at this\nresource." + }, "OrgPolicy": { "description": "Defines a Cloud Organization `Policy` which is used to specify `Constraints`\nfor configurations of Cloud Platform resources.", "type": "object", @@ -729,8 +1725,8 @@ "type": "string" }, "booleanPolicy": { - "$ref": "BooleanPolicy", - "description": "For boolean `Constraints`, whether to enforce the `Constraint` or not." + "description": "For boolean `Constraints`, whether to enforce the `Constraint` or not.", + "$ref": "BooleanPolicy" }, "updateTime": { "format": "google-datetime", @@ -743,26 +1739,13 @@ "type": "integer" }, "restoreDefault": { - "description": "Restores the default behavior of the constraint; independent of\n`Constraint` type.", - "$ref": "RestoreDefault" + "$ref": "RestoreDefault", + "description": "Restores the default behavior of the constraint; independent of\n`Constraint` type." } }, "id": "OrgPolicy" }, - "BooleanPolicy": { - "description": "Used in `policy_type` to specify how `boolean_policy` will behave at this\nresource.", - "type": "object", - "properties": { - "enforced": { - "description": "If `true`, then the `Policy` is enforced. If `false`, then any\nconfiguration is acceptable.\n\nSuppose you have a `Constraint` `constraints/compute.disableSerialPortAccess`\nwith `constraint_default` set to `ALLOW`. A `Policy` for that\n`Constraint` exhibits the following behavior:\n - If the `Policy` at this resource has enforced set to `false`, serial\n port connection attempts will be allowed.\n - If the `Policy` at this resource has enforced set to `true`, serial\n port connection attempts will be refused.\n - If the `Policy` at this resource is `RestoreDefault`, serial port\n connection attempts will be allowed.\n - If no `Policy` is set at this resource or anywhere higher in the\n resource hierarchy, serial port connection attempts will be allowed.\n - If no `Policy` is set at this resource, but one exists higher in the\n resource hierarchy, the behavior is as if the`Policy` were set at\n this resource.\n\nThe following examples demonstrate the different possible layerings:\n\nExample 1 (nearest `Constraint` wins):\n `organizations/foo` has a `Policy` with:\n {enforced: false}\n `projects/bar` has no `Policy` set.\nThe constraint at `projects/bar` and `organizations/foo` will not be\nenforced.\n\nExample 2 (enforcement gets replaced):\n `organizations/foo` has a `Policy` with:\n {enforced: false}\n `projects/bar` has a `Policy` with:\n {enforced: true}\nThe constraint at `organizations/foo` is not enforced.\nThe constraint at `projects/bar` is enforced.\n\nExample 3 (RestoreDefault):\n `organizations/foo` has a `Policy` with:\n {enforced: true}\n `projects/bar` has a `Policy` with:\n {RestoreDefault: {}}\nThe constraint at `organizations/foo` is enforced.\nThe constraint at `projects/bar` is not enforced, because\n`constraint_default` for the `Constraint` is `ALLOW`.", - "type": "boolean" - } - }, - "id": "BooleanPolicy" - }, "Lien": { - "description": "A Lien represents an encumbrance on the actions that can be performed on a\nresource.", - "type": "object", "properties": { "parent": { "description": "A reference to the resource this Lien is attached to. The server will\nvalidate the parent against those for which Liens are supported.\n\nExample: `projects/1234`", @@ -773,6 +1756,10 @@ "description": "The creation time of this Lien.", "type": "string" }, + "origin": { + "description": "A stable, user-visible/meaningful string identifying the origin of the\nLien, intended to be inspected programmatically. Maximum length of 200\ncharacters.\n\nExample: 'compute.googleapis.com'", + "type": "string" + }, "name": { "description": "A system-generated unique identifier for this Lien.\n\nExample: `liens/1234abcd`", "type": "string" @@ -781,10 +1768,6 @@ "description": "Concise user-visible strings indicating why an action cannot be performed\non a resource. Maximum lenth of 200 characters.\n\nExample: 'Holds production API key'", "type": "string" }, - "origin": { - "description": "A stable, user-visible/meaningful string identifying the origin of the\nLien, intended to be inspected programmatically. Maximum length of 200\ncharacters.\n\nExample: 'compute.googleapis.com'", - "type": "string" - }, "restrictions": { "description": "The types of operations which should be blocked as a result of this Lien.\nEach value should correspond to an IAM permission. The server will\nvalidate the permissions against those for which Liens are supported.\n\nAn empty list is meaningless and will be rejected.\n\nExample: ['resourcemanager.projects.delete']", "items": { @@ -793,7 +1776,9 @@ "type": "array" } }, - "id": "Lien" + "id": "Lien", + "description": "A Lien represents an encumbrance on the actions that can be performed on a\nresource.", + "type": "object" }, "Ancestor": { "description": "Identifying information for a single ancestor of a project.", @@ -829,20 +1814,189 @@ "id": "SetOrgPolicyRequest" }, "SetIamPolicyRequest": { + "id": "SetIamPolicyRequest", "description": "Request message for `SetIamPolicy` method.", "type": "object", "properties": { - "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.", - "$ref": "Policy" - }, "updateMask": { "format": "google-fieldmask", "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.", "type": "string" + }, + "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." + } + } + }, + "Empty": { + "properties": {}, + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object" + }, + "Organization": { + "description": "The root node in the resource hierarchy to which a particular entity's\n(e.g., company) resources belong.", + "type": "object", + "properties": { + "creationTime": { + "type": "string", + "format": "google-datetime", + "description": "Timestamp when the Organization was created. Assigned by the server.\n@OutputOnly" + }, + "lifecycleState": { + "enumDescriptions": [ + "Unspecified state. This is only useful for distinguishing unset values.", + "The normal and active state.", + "The organization has been marked for deletion by the user." + ], + "enum": [ + "LIFECYCLE_STATE_UNSPECIFIED", + "ACTIVE", + "DELETE_REQUESTED" + ], + "description": "The organization's current lifecycle state. Assigned by the server.\n@OutputOnly", + "type": "string" + }, + "owner": { + "$ref": "OrganizationOwner", + "description": "The owner of this Organization. The owner should be specified on\ncreation. Once set, it cannot be changed.\nThis field is required." + }, + "name": { + "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\".", + "type": "string" + }, + "displayName": { + "description": "A friendly string to be used to refer to the Organization in the UI.\nAssigned by the server, set to the primary domain of the G Suite\ncustomer that owns the organization.\n@OutputOnly", + "type": "string" } }, - "id": "SetIamPolicyRequest" + "id": "Organization" + }, + "ListAvailableOrgPolicyConstraintsResponse": { + "description": "The response returned from the ListAvailableOrgPolicyConstraints method.\nReturns all `Constraints` that could be set at this level of the hierarchy\n(contrast with the response from `ListPolicies`, which returns all policies\nwhich are set).", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Page token used to retrieve the next page. This is currently not used.", + "type": "string" + }, + "constraints": { + "description": "The collection of constraints that are settable on the request resource.", + "items": { + "$ref": "Constraint" + }, + "type": "array" + } + }, + "id": "ListAvailableOrgPolicyConstraintsResponse" + }, + "ListPolicy": { + "description": "Used in `policy_type` to specify how `list_policy` behaves at this\nresource.\n\nA `ListPolicy` can define specific values that are allowed or denied by\nsetting either the `allowed_values` or `denied_values` fields. It can also\nbe used to allow or deny all values, by setting the `all_values` field. If\n`all_values` is `ALL_VALUES_UNSPECIFIED`, exactly one of `allowed_values`\nor `denied_values` must be set (attempting to set both or neither will\nresult in a failed request). If `all_values` is set to either `ALLOW` or\n`DENY`, `allowed_values` and `denied_values` must be unset.", + "type": "object", + "properties": { + "allowedValues": { + "description": "List of values allowed at this resource. Can only be set if no values\nare set for `denied_values` and `all_values` is set to\n`ALL_VALUES_UNSPECIFIED`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "inheritFromParent": { + "type": "boolean", + "description": "Determines the inheritance behavior for this `Policy`.\n\nBy default, a `ListPolicy` set at a resource supercedes any `Policy` set\nanywhere up the resource hierarchy. However, if `inherit_from_parent` is\nset to `true`, then the values from the effective `Policy` of the parent\nresource are inherited, meaning the values set in this `Policy` are\nadded to the values inherited up the hierarchy.\n\nSetting `Policy` hierarchies that inherit both allowed values and denied\nvalues isn't recommended in most circumstances to keep the configuration\nsimple and understandable. However, it is possible to set a `Policy` with\n`allowed_values` set that inherits a `Policy` with `denied_values` set.\nIn this case, the values that are allowed must be in `allowed_values` and\nnot present in `denied_values`.\n\nFor example, suppose you have a `Constraint`\n`constraints/serviceuser.services`, which has a `constraint_type` of\n`list_constraint`, and with `constraint_default` set to `ALLOW`.\nSuppose that at the Organization level, a `Policy` is applied that\nrestricts the allowed API activations to {`E1`, `E2`}. Then, if a\n`Policy` is applied to a project below the Organization that has\n`inherit_from_parent` set to `false` and field all_values set to DENY,\nthen an attempt to activate any API will be denied.\n\nThe following examples demonstrate different possible layerings:\n\nExample 1 (no inherited values):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: “E1” allowed_values:”E2”}\n ``projects/bar`` has `inherit_from_parent` `false` and values:\n {allowed_values: \"E3\" allowed_values: \"E4\"}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe accepted values at `projects/bar` are `E3`, and `E4`.\n\nExample 2 (inherited values):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: “E1” allowed_values:”E2”}\n `projects/bar` has a `Policy` with values:\n {value: “E3” value: ”E4” inherit_from_parent: true}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.\n\nExample 3 (inheriting both allowed and denied values):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"E1\" allowed_values: \"E2\"}\n `projects/bar` has a `Policy` with:\n {denied_values: \"E1\"}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe value accepted at `projects/bar` is `E2`.\n\nExample 4 (RestoreDefault):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: “E1” allowed_values:”E2”}\n `projects/bar` has a `Policy` with values:\n {RestoreDefault: {}}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe accepted values at `projects/bar` are either all or none depending on\nthe value of `constraint_default` (if `ALLOW`, all; if\n`DENY`, none).\n\nExample 5 (no policy inherits parent policy):\n `organizations/foo` has no `Policy` set.\n `projects/bar` has no `Policy` set.\nThe accepted values at both levels are either all or none depending on\nthe value of `constraint_default` (if `ALLOW`, all; if\n`DENY`, none).\n\nExample 6 (ListConstraint allowing all):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: “E1” allowed_values: ”E2”}\n `projects/bar` has a `Policy` with:\n {all: ALLOW}\nThe accepted values at `organizations/foo` are `E1`, E2`.\nAny value is accepted at `projects/bar`.\n\nExample 7 (ListConstraint allowing none):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: “E1” allowed_values: ”E2”}\n `projects/bar` has a `Policy` with:\n {all: DENY}\nThe accepted values at `organizations/foo` are `E1`, E2`.\nNo value is accepted at `projects/bar`." + }, + "suggestedValue": { + "type": "string", + "description": "Optional. The Google Cloud Console will try to default to a configuration\nthat matches the value specified in this `Policy`. If `suggested_value`\nis not set, it will inherit the value specified higher in the hierarchy,\nunless `inherit_from_parent` is `false`." + }, + "deniedValues": { + "description": "List of values denied at this resource. Can only be set if no values are\nset for `allowed_values` and `all_values` is set to\n`ALL_VALUES_UNSPECIFIED`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "allValues": { + "enum": [ + "ALL_VALUES_UNSPECIFIED", + "ALLOW", + "DENY" + ], + "description": "The policy all_values state.", + "type": "string", + "enumDescriptions": [ + "Indicates that either allowed_values or denied_values must be set.", + "A policy with this set allows all values.", + "A policy with this set denies all values." + ] + } + }, + "id": "ListPolicy" + }, + "GetAncestryResponse": { + "type": "object", + "properties": { + "ancestor": { + "description": "Ancestors are ordered from bottom to top of the resource hierarchy. The\nfirst ancestor is the project itself, followed by the project's parent,\netc.", + "items": { + "$ref": "Ancestor" + }, + "type": "array" + } + }, + "id": "GetAncestryResponse", + "description": "Response from the GetAncestry method." + }, + "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.", + "type": "object", + "properties": { + "logType": { + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "description": "The log type that this config enables.", + "type": "string" + }, + "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" + } + }, + "id": "AuditLogConfig" + }, + "SearchOrganizationsRequest": { + "properties": { + "pageSize": { + "format": "int32", + "description": "The maximum number of Organizations to return in the response.\nThis field is optional.", + "type": "integer" + }, + "filter": { + "description": "An optional query string used to filter the Organizations to return in\nthe response. Filter rules are case-insensitive.\n\n\nOrganizations may be filtered by `owner.directoryCustomerId` or by\n`domain`, where the domain is a Google for Work domain, for example:\n\n|Filter|Description|\n|------|-----------|\n|owner.directorycustomerid:123456789|Organizations with\n`owner.directory_customer_id` equal to `123456789`.|\n|domain:google.com|Organizations corresponding to the domain `google.com`.|\n\nThis field is optional.", + "type": "string" + }, + "pageToken": { + "description": "A pagination token returned from a previous call to `SearchOrganizations`\nthat indicates from where listing should continue.\nThis field is optional.", + "type": "string" + } + }, + "id": "SearchOrganizationsRequest", + "description": "The request sent to the `SearchOrganizations` method.", + "type": "object" } }, "icons": { @@ -850,1159 +2004,5 @@ "x32": "http://www.google.com/images/icons/product/search-32.gif" }, "protocol": "rest", - "canonicalName": "Cloud Resource Manager", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "rootUrl": "https://cloudresourcemanager.googleapis.com/", - "ownerDomain": "google.com", - "name": "cloudresourcemanager", - "batchPath": "batch", - "fullyEncodeReservedExpansion": true, - "title": "Google Cloud Resource Manager API", - "ownerName": "Google", - "resources": { - "organizations": { - "methods": { - "getOrgPolicy": { - "request": { - "$ref": "GetOrgPolicyRequest" - }, - "description": "Gets a `Policy` on a resource.\n\nIf no `Policy` is set on the resource, a `Policy` is returned with default\nvalues including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The\n`etag` value can be used with `SetOrgPolicy()` to create or update a\n`Policy` during read-modify-write.", - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "OrgPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "location": "path", - "description": "Name of the resource the `Policy` is set on.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$" - } - }, - "flatPath": "v1/organizations/{organizationsId}:getOrgPolicy", - "path": "v1/{+resource}:getOrgPolicy", - "id": "cloudresourcemanager.organizations.getOrgPolicy" - }, - "search": { - "description": "Searches Organization resources that are visible to the user and satisfy\nthe specified filter. This method returns Organizations in an unspecified\norder. New Organizations do not necessarily appear at the end of the\nresults.\n\nSearch will only return organizations on which the user has the permission\n`resourcemanager.organizations.get`", - "request": { - "$ref": "SearchOrganizationsRequest" - }, - "response": { - "$ref": "SearchOrganizationsResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/organizations:search", - "id": "cloudresourcemanager.organizations.search", - "path": "v1/organizations:search" - }, - "get": { - "description": "Fetches an Organization resource identified by the specified resource name.", - "response": { - "$ref": "Organization" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "name": { - "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/organizations/{organizationsId}", - "id": "cloudresourcemanager.organizations.get", - "path": "v1/{+name}" - }, - "getEffectiveOrgPolicy": { - "request": { - "$ref": "GetEffectiveOrgPolicyRequest" - }, - "description": "Gets the effective `Policy` on a resource. This is the result of merging\n`Policies` in the resource hierarchy. The returned `Policy` will not have\nan `etag`set because it is a computed `Policy` across multiple resources.", - "response": { - "$ref": "OrgPolicy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "description": "The name of the resource to start computing the effective `Policy`.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/organizations/{organizationsId}:getEffectiveOrgPolicy", - "id": "cloudresourcemanager.organizations.getEffectiveOrgPolicy", - "path": "v1/{+resource}:getEffectiveOrgPolicy" - }, - "testIamPermissions": { - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$" - } - }, - "flatPath": "v1/organizations/{organizationsId}:testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "id": "cloudresourcemanager.organizations.testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "description": "Returns permissions that a caller has on the specified Organization.\nThe `resource` field should be the organization's resource name,\ne.g. \"organizations/123\".\n\nThere are no permissions required for making this API call." - }, - "clearOrgPolicy": { - "description": "Clears a `Policy` from a resource.", - "request": { - "$ref": "ClearOrgPolicyRequest" - }, - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "Name of the resource for the `Policy` to clear.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/organizations/{organizationsId}:clearOrgPolicy", - "id": "cloudresourcemanager.organizations.clearOrgPolicy", - "path": "v1/{+resource}:clearOrgPolicy" - }, - "setOrgPolicy": { - "response": { - "$ref": "OrgPolicy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "Resource name of the resource to attach the `Policy`.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/organizations/{organizationsId}:setOrgPolicy", - "id": "cloudresourcemanager.organizations.setOrgPolicy", - "path": "v1/{+resource}:setOrgPolicy", - "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for\nthat `Constraint` on the resource if one does not exist.\n\nNot supplying an `etag` on the request `Policy` results in an unconditional\nwrite of the `Policy`.", - "request": { - "$ref": "SetOrgPolicyRequest" - } - }, - "setIamPolicy": { - "description": "Sets the access control policy on an Organization resource. Replaces any\nexisting policy. The `resource` field should be the organization's resource\nname, e.g. \"organizations/123\".\n\nAuthorization requires the Google IAM permission\n`resourcemanager.organizations.setIamPolicy` on the specified organization", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/organizations/{organizationsId}:setIamPolicy", - "id": "cloudresourcemanager.organizations.setIamPolicy", - "path": "v1/{+resource}:setIamPolicy" - }, - "listAvailableOrgPolicyConstraints": { - "flatPath": "v1/organizations/{organizationsId}:listAvailableOrgPolicyConstraints", - "id": "cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints", - "path": "v1/{+resource}:listAvailableOrgPolicyConstraints", - "description": "Lists `Constraints` that could be applied on the specified resource.", - "request": { - "$ref": "ListAvailableOrgPolicyConstraintsRequest" - }, - "response": { - "$ref": "ListAvailableOrgPolicyConstraintsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "location": "path", - "description": "Name of the resource to list `Constraints` for.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "listOrgPolicies": { - "request": { - "$ref": "ListOrgPoliciesRequest" - }, - "description": "Lists all the `Policies` set for a particular resource.", - "response": { - "$ref": "ListOrgPoliciesResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "location": "path", - "description": "Name of the resource to list Policies for.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$" - } - }, - "flatPath": "v1/organizations/{organizationsId}:listOrgPolicies", - "id": "cloudresourcemanager.organizations.listOrgPolicies", - "path": "v1/{+resource}:listOrgPolicies" - }, - "getIamPolicy": { - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$" - } - }, - "flatPath": "v1/organizations/{organizationsId}:getIamPolicy", - "path": "v1/{+resource}:getIamPolicy", - "id": "cloudresourcemanager.organizations.getIamPolicy", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "description": "Gets the access control policy for an Organization resource. May be empty\nif no such policy or resource exists. The `resource` field should be the\norganization's resource name, e.g. \"organizations/123\".\n\nAuthorization requires the Google IAM permission\n`resourcemanager.organizations.getIamPolicy` on the specified organization" - } - } - }, - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "name": { - "location": "path", - "description": "The name of the operation resource.", - "type": "string", - "required": true, - "pattern": "^operations/.+$" - } - }, - "flatPath": "v1/operations/{operationsId}", - "path": "v1/{+name}", - "id": "cloudresourcemanager.operations.get" - } - } - }, - "liens": { - "methods": { - "list": { - "flatPath": "v1/liens", - "path": "v1/liens", - "id": "cloudresourcemanager.liens.list", - "description": "List all Liens applied to the `parent` resource.\n\nCallers of this method will require permission on the `parent` resource.\nFor example, a Lien with a `parent` of `projects/1234` requires permission\n`resourcemanager.projects.get`.", - "httpMethod": "GET", - "response": { - "$ref": "ListLiensResponse" - }, - "parameterOrder": [], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "The `next_page_token` value returned from a previous List request, if any.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "The maximum number of items to return. This is a suggestion for the server.", - "type": "integer", - "location": "query" - }, - "parent": { - "description": "The name of the resource to list all attached Liens.\nFor example, `projects/1234`.", - "type": "string", - "location": "query" - } - } - }, - "create": { - "response": { - "$ref": "Lien" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/liens", - "id": "cloudresourcemanager.liens.create", - "path": "v1/liens", - "description": "Create a Lien which applies to the resource denoted by the `parent` field.\n\nCallers of this method will require permission on the `parent` resource.\nFor example, applying to `projects/1234` requires permission\n`resourcemanager.projects.updateLiens`.\n\nNOTE: Some resources may limit the number of Liens which may be applied.", - "request": { - "$ref": "Lien" - } - }, - "delete": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "parameters": { - "name": { - "location": "path", - "description": "The name/identifier of the Lien to delete.", - "type": "string", - "required": true, - "pattern": "^liens/.+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/liens/{liensId}", - "id": "cloudresourcemanager.liens.delete", - "path": "v1/{+name}", - "description": "Delete a Lien by `name`.\n\nCallers of this method will require permission on the `parent` resource.\nFor example, a Lien with a `parent` of `projects/1234` requires permission\n`resourcemanager.projects.updateLiens`." - } - } - }, - "folders": { - "methods": { - "listAvailableOrgPolicyConstraints": { - "response": { - "$ref": "ListAvailableOrgPolicyConstraintsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "description": "Name of the resource to list `Constraints` for.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/folders/{foldersId}:listAvailableOrgPolicyConstraints", - "id": "cloudresourcemanager.folders.listAvailableOrgPolicyConstraints", - "path": "v1/{+resource}:listAvailableOrgPolicyConstraints", - "request": { - "$ref": "ListAvailableOrgPolicyConstraintsRequest" - }, - "description": "Lists `Constraints` that could be applied on the specified resource." - }, - "listOrgPolicies": { - "flatPath": "v1/folders/{foldersId}:listOrgPolicies", - "path": "v1/{+resource}:listOrgPolicies", - "id": "cloudresourcemanager.folders.listOrgPolicies", - "description": "Lists all the `Policies` set for a particular resource.", - "request": { - "$ref": "ListOrgPoliciesRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "ListOrgPoliciesResponse" - }, - "parameters": { - "resource": { - "location": "path", - "description": "Name of the resource to list Policies for.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "getOrgPolicy": { - "response": { - "$ref": "OrgPolicy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "location": "path", - "description": "Name of the resource the `Policy` is set on.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/folders/{foldersId}:getOrgPolicy", - "id": "cloudresourcemanager.folders.getOrgPolicy", - "path": "v1/{+resource}:getOrgPolicy", - "description": "Gets a `Policy` on a resource.\n\nIf no `Policy` is set on the resource, a `Policy` is returned with default\nvalues including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The\n`etag` value can be used with `SetOrgPolicy()` to create or update a\n`Policy` during read-modify-write.", - "request": { - "$ref": "GetOrgPolicyRequest" - } - }, - "getEffectiveOrgPolicy": { - "description": "Gets the effective `Policy` on a resource. This is the result of merging\n`Policies` in the resource hierarchy. The returned `Policy` will not have\nan `etag`set because it is a computed `Policy` across multiple resources.", - "request": { - "$ref": "GetEffectiveOrgPolicyRequest" - }, - "response": { - "$ref": "OrgPolicy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "location": "path", - "description": "The name of the resource to start computing the effective `Policy`.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/folders/{foldersId}:getEffectiveOrgPolicy", - "id": "cloudresourcemanager.folders.getEffectiveOrgPolicy", - "path": "v1/{+resource}:getEffectiveOrgPolicy" - }, - "clearOrgPolicy": { - "flatPath": "v1/folders/{foldersId}:clearOrgPolicy", - "id": "cloudresourcemanager.folders.clearOrgPolicy", - "path": "v1/{+resource}:clearOrgPolicy", - "description": "Clears a `Policy` from a resource.", - "request": { - "$ref": "ClearOrgPolicyRequest" - }, - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "location": "path", - "description": "Name of the resource for the `Policy` to clear.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setOrgPolicy": { - "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for\nthat `Constraint` on the resource if one does not exist.\n\nNot supplying an `etag` on the request `Policy` results in an unconditional\nwrite of the `Policy`.", - "request": { - "$ref": "SetOrgPolicyRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "OrgPolicy" - }, - "parameters": { - "resource": { - "location": "path", - "description": "Resource name of the resource to attach the `Policy`.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/folders/{foldersId}:setOrgPolicy", - "path": "v1/{+resource}:setOrgPolicy", - "id": "cloudresourcemanager.folders.setOrgPolicy" - } - } - }, - "projects": { - "methods": { - "testIamPermissions": { - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "description": "Returns permissions that a caller has on the specified Project.\n\nThere are no permissions required for making this API call.", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "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.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{resource}:testIamPermissions", - "id": "cloudresourcemanager.projects.testIamPermissions", - "path": "v1/projects/{resource}:testIamPermissions" - }, - "delete": { - "flatPath": "v1/projects/{projectId}", - "id": "cloudresourcemanager.projects.delete", - "path": "v1/projects/{projectId}", - "description": "Marks the Project identified by the specified\n`project_id` (for example, `my-project-123`) for deletion.\nThis method will only affect the Project if the following criteria are met:\n\n+ The Project does not have a billing account associated with it.\n+ The Project has a lifecycle state of\nACTIVE.\n\nThis method changes the Project's lifecycle state from\nACTIVE\nto DELETE_REQUESTED.\nThe deletion starts at an unspecified time,\nat which point the Project is no longer accessible.\n\nUntil the deletion completes, you can check the lifecycle state\nchecked by retrieving the Project with GetProject,\nand the Project remains visible to ListProjects.\nHowever, you cannot update the project.\n\nAfter the deletion completes, the Project is not retrievable by\nthe GetProject and\nListProjects methods.\n\nThe caller must have modify permissions for this Project.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "DELETE", - "parameters": { - "projectId": { - "location": "path", - "description": "The Project ID (for example, `foo-bar-123`).\n\nRequired.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "clearOrgPolicy": { - "request": { - "$ref": "ClearOrgPolicyRequest" - }, - "description": "Clears a `Policy` from a resource.", - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "resource": { - "description": "Name of the resource for the `Policy` to clear.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}:clearOrgPolicy", - "path": "v1/{+resource}:clearOrgPolicy", - "id": "cloudresourcemanager.projects.clearOrgPolicy" - }, - "setIamPolicy": { - "description": "Sets the IAM access control policy for the specified Project. Replaces\nany existing policy.\n\nThe following constraints apply when using `setIamPolicy()`:\n\n+ Project does not support `allUsers` and `allAuthenticatedUsers` as\n`members` in a `Binding` of a `Policy`.\n\n+ The owner role can be granted only to `user` and `serviceAccount`.\n\n+ Service accounts can be made owners of a project directly\nwithout any restrictions. However, to be added as an owner, a user must be\ninvited via Cloud Platform console and must accept the invitation.\n\n+ A user cannot be granted the owner role using `setIamPolicy()`. The user\nmust be granted the owner role using the Cloud Platform Console and must\nexplicitly accept the invitation.\n\n+ Invitations to grant the owner role cannot be sent using\n`setIamPolicy()`;\nthey must be sent only using the Cloud Platform Console.\n\n+ Membership changes that leave the project without any owners that have\naccepted the Terms of Service (ToS) will be rejected.\n\n+ If the project is not part of an organization, there must be at least\none owner who has accepted the Terms of Service (ToS) agreement in the\npolicy. Calling `setIamPolicy()` to remove the last ToS-accepted owner\nfrom the policy will fail. This restriction also applies to legacy\nprojects that no longer have owners who have accepted the ToS. Edits to\nIAM policies will be rejected until the lack of a ToS-accepting owner is\nrectified.\n\n+ Calling this method requires enabling the App Engine Admin API.\n\nNote: Removing service accounts from policies or changing their roles\ncan render services completely inoperable. It is important to understand\nhow the service account is being used before removing or updating its\nroles.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.setIamPolicy` on the project", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{resource}:setIamPolicy", - "id": "cloudresourcemanager.projects.setIamPolicy", - "path": "v1/projects/{resource}:setIamPolicy" - }, - "listAvailableOrgPolicyConstraints": { - "flatPath": "v1/projects/{projectsId}:listAvailableOrgPolicyConstraints", - "id": "cloudresourcemanager.projects.listAvailableOrgPolicyConstraints", - "path": "v1/{+resource}:listAvailableOrgPolicyConstraints", - "description": "Lists `Constraints` that could be applied on the specified resource.", - "request": { - "$ref": "ListAvailableOrgPolicyConstraintsRequest" - }, - "response": { - "$ref": "ListAvailableOrgPolicyConstraintsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "location": "path", - "description": "Name of the resource to list `Constraints` for.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "getIamPolicy": { - "flatPath": "v1/projects/{resource}:getIamPolicy", - "id": "cloudresourcemanager.projects.getIamPolicy", - "path": "v1/projects/{resource}:getIamPolicy", - "description": "Returns the IAM access control policy for the specified Project.\nPermission is denied if the policy or the resource does not exist.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.getIamPolicy` on the project", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "getOrgPolicy": { - "description": "Gets a `Policy` on a resource.\n\nIf no `Policy` is set on the resource, a `Policy` is returned with default\nvalues including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The\n`etag` value can be used with `SetOrgPolicy()` to create or update a\n`Policy` during read-modify-write.", - "request": { - "$ref": "GetOrgPolicyRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "OrgPolicy" - }, - "parameters": { - "resource": { - "location": "path", - "description": "Name of the resource the `Policy` is set on.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}:getOrgPolicy", - "path": "v1/{+resource}:getOrgPolicy", - "id": "cloudresourcemanager.projects.getOrgPolicy" - }, - "getEffectiveOrgPolicy": { - "description": "Gets the effective `Policy` on a resource. This is the result of merging\n`Policies` in the resource hierarchy. The returned `Policy` will not have\nan `etag`set because it is a computed `Policy` across multiple resources.", - "request": { - "$ref": "GetEffectiveOrgPolicyRequest" - }, - "response": { - "$ref": "OrgPolicy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "location": "path", - "description": "The name of the resource to start computing the effective `Policy`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}:getEffectiveOrgPolicy", - "id": "cloudresourcemanager.projects.getEffectiveOrgPolicy", - "path": "v1/{+resource}:getEffectiveOrgPolicy" - }, - "undelete": { - "description": "Restores the Project identified by the specified\n`project_id` (for example, `my-project-123`).\nYou can only use this method for a Project that has a lifecycle state of\nDELETE_REQUESTED.\nAfter deletion starts, the Project cannot be restored.\n\nThe caller must have modify permissions for this Project.", - "request": { - "$ref": "UndeleteProjectRequest" - }, - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "The project ID (for example, `foo-bar-123`).\n\nRequired.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}:undelete", - "id": "cloudresourcemanager.projects.undelete", - "path": "v1/projects/{projectId}:undelete" - }, - "update": { - "flatPath": "v1/projects/{projectId}", - "id": "cloudresourcemanager.projects.update", - "path": "v1/projects/{projectId}", - "description": "Updates the attributes of the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have modify permissions for this Project.", - "request": { - "$ref": "Project" - }, - "response": { - "$ref": "Project" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "PUT", - "parameters": { - "projectId": { - "location": "path", - "description": "The project ID (for example, `my-project-123`).\n\nRequired.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists Projects that are visible to the user and satisfy the\nspecified filter. This method returns Projects in an unspecified order.\nNew Projects do not necessarily appear at the end of the list.", - "httpMethod": "GET", - "parameterOrder": [], - "response": { - "$ref": "ListProjectsResponse" - }, - "parameters": { - "filter": { - "location": "query", - "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n+ `name`\n+ `id`\n+ \u003ccode\u003elabels.\u003cem\u003ekey\u003c/em\u003e\u003c/code\u003e where *key* is the name of a label\n\nSome examples of using labels as filters:\n\n|Filter|Description|\n|------|-----------|\n|name:how*|The project's name starts with \"how\".|\n|name:Howl|The project's name is `Howl` or `howl`.|\n|name:HOWL|Equivalent to above.|\n|NAME:howl|Equivalent to above.|\n|labels.color:*|The project has the label `color`.|\n|labels.color:red|The project's label `color` has the value `red`.|\n|labels.color:red labels.size:big|The project's label `color` has the value `red` and its label `size` has the value `big`.\n\nIf you specify a filter that has both `parent.type` and `parent.id`, then\nthe `resourcemanager.projects.list` permission is checked on the parent.\nIf the user has this permission, all projects under the parent will be\nreturned after remaining filters have been applied. If the user lacks this\npermission, then all projects for which the user has the\n`resourcemanager.projects.get` permission will be returned after remaining\nfilters have been applied. If no filter is specified, the call will return\nprojects for which the user has `resourcemanager.projects.get` permissions.\n\nOptional.", - "type": "string" - }, - "pageToken": { - "description": "A pagination token returned from a previous call to ListProjects\nthat indicates from where listing should continue.\n\nOptional.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The maximum number of Projects to return in the response.\nThe server can return fewer Projects than requested.\nIf unspecified, server picks an appropriate default.\n\nOptional.", - "type": "integer" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects", - "path": "v1/projects", - "id": "cloudresourcemanager.projects.list" - }, - "setOrgPolicy": { - "response": { - "$ref": "OrgPolicy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "resource": { - "location": "path", - "description": "Resource name of the resource to attach the `Policy`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}:setOrgPolicy", - "id": "cloudresourcemanager.projects.setOrgPolicy", - "path": "v1/{+resource}:setOrgPolicy", - "request": { - "$ref": "SetOrgPolicyRequest" - }, - "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for\nthat `Constraint` on the resource if one does not exist.\n\nNot supplying an `etag` on the request `Policy` results in an unconditional\nwrite of the `Policy`." - }, - "create": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {}, - "flatPath": "v1/projects", - "id": "cloudresourcemanager.projects.create", - "path": "v1/projects", - "request": { - "$ref": "Project" - }, - "description": "Request that a new Project be created. The result is an Operation which\ncan be used to track the creation process. It is automatically deleted\nafter a few hours, so there is no need to call DeleteOperation.\n\nOur SLO permits Project creation to take up to 30 seconds at the 90th\npercentile. As of 2016-08-29, we are observing 6 seconds 50th percentile\nlatency. 95th percentile latency is around 11 seconds. We recommend\npolling at the 5th second with an exponential backoff.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.create` on the specified parent for the new\nproject." - }, - "listOrgPolicies": { - "flatPath": "v1/projects/{projectsId}:listOrgPolicies", - "id": "cloudresourcemanager.projects.listOrgPolicies", - "path": "v1/{+resource}:listOrgPolicies", - "description": "Lists all the `Policies` set for a particular resource.", - "request": { - "$ref": "ListOrgPoliciesRequest" - }, - "response": { - "$ref": "ListOrgPoliciesResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "Name of the resource to list Policies for.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "get": { - "description": "Retrieves the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", - "httpMethod": "GET", - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "Project" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}", - "path": "v1/projects/{projectId}", - "id": "cloudresourcemanager.projects.get" - }, - "getAncestry": { - "flatPath": "v1/projects/{projectId}:getAncestry", - "id": "cloudresourcemanager.projects.getAncestry", - "path": "v1/projects/{projectId}:getAncestry", - "request": { - "$ref": "GetAncestryRequest" - }, - "description": "Gets a list of ancestors in the resource hierarchy for the Project\nidentified by the specified `project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", - "response": { - "$ref": "GetAncestryResponse" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "projectId": { - "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", - "type": "string", - "required": true, - "location": "path" - } - } - } - } - } - }, - "parameters": { - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ] - }, - "alt": { - "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", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string" - }, - "key": { - "location": "query", - "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.", - "type": "string" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - } - }, - "version": "v1", - "baseUrl": "https://cloudresourcemanager.googleapis.com/", - "kind": "discovery#restDescription", - "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", - "servicePath": "", - "basePath": "", - "id": "cloudresourcemanager:v1", - "revision": "20170802", - "documentationLink": "https://cloud.google.com/resource-manager" + "canonicalName": "Cloud Resource Manager" } 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 1652bc202..9ba4854c7 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go +++ b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go @@ -1377,8 +1377,8 @@ func (s *ListProjectsResponse) MarshalJSON() ([]byte, error) { type Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json b/vendor/google.golang.org/api/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json index 4f886529a..9e1621b7d 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json +++ b/vendor/google.golang.org/api/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json @@ -1,450 +1,4 @@ { - "basePath": "", - "id": "cloudresourcemanager:v1beta1", - "revision": "20170731", - "documentationLink": "https://cloud.google.com/resource-manager", - "discoveryVersion": "v1", - "schemas": { - "Ancestor": { - "description": "Identifying information for a single ancestor of a project.", - "type": "object", - "properties": { - "resourceId": { - "$ref": "ResourceId", - "description": "Resource id of the ancestor." - } - }, - "id": "Ancestor" - }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "properties": { - "updateMask": { - "format": "google-fieldmask", - "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.", - "type": "string" - }, - "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.", - "$ref": "Policy" - } - }, - "id": "SetIamPolicyRequest" - }, - "ListOrganizationsResponse": { - "description": "The response returned from the `ListOrganizations` method.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "A pagination token to be used to retrieve the next page of results. If the\nresult is too large to fit within the page size specified in the request,\nthis field will be set with a token that can be used to fetch the next page\nof results. If this field is empty, it indicates that this response\ncontains the last page of results.", - "type": "string" - }, - "organizations": { - "description": "The list of Organizations that matched the list query, possibly paginated.", - "items": { - "$ref": "Organization" - }, - "type": "array" - } - }, - "id": "ListOrganizationsResponse" - }, - "Binding": { - "description": "Associates `members` with a `role`.", - "type": "object", - "properties": { - "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` or `joe@example.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`.\nRequired", - "type": "string" - } - }, - "id": "Binding" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "Organization": { - "description": "The root node in the resource hierarchy to which a particular entity's\n(e.g., company) resources belong.", - "type": "object", - "properties": { - "lifecycleState": { - "description": "The organization's current lifecycle state. Assigned by the server.\n@OutputOnly", - "type": "string", - "enumDescriptions": [ - "Unspecified state. This is only useful for distinguishing unset values.", - "The normal and active state.", - "The organization has been marked for deletion by the user." - ], - "enum": [ - "LIFECYCLE_STATE_UNSPECIFIED", - "ACTIVE", - "DELETE_REQUESTED" - ] - }, - "displayName": { - "description": "A friendly string to be used to refer to the Organization in the UI.\nAssigned by the server, set to the primary domain of the G Suite\ncustomer that owns the organization.\n@OutputOnly", - "type": "string" - }, - "creationTime": { - "format": "google-datetime", - "description": "Timestamp when the Organization was created. Assigned by the server.\n@OutputOnly", - "type": "string" - }, - "owner": { - "description": "The owner of this Organization. The owner should be specified on\ncreation. Once set, it cannot be changed.\nThis field is required.", - "$ref": "OrganizationOwner" - }, - "name": { - "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\".", - "type": "string" - }, - "organizationId": { - "description": "An immutable id for the Organization that is assigned on creation. This\nshould be omitted when creating a new Organization.\nThis field is read-only.\nThis field is deprecated and will be removed in v1. Use name instead.", - "type": "string" - } - }, - "id": "Organization" - }, - "UndeleteProjectRequest": { - "description": "The request sent to the UndeleteProject\nmethod.", - "type": "object", - "properties": {}, - "id": "UndeleteProjectRequest" - }, - "ProjectCreationStatus": { - "description": "A status object which is used as the `metadata` field for the Operation\nreturned by CreateProject. It provides insight for when significant phases of\nProject creation have completed.", - "type": "object", - "properties": { - "gettable": { - "description": "True if the project can be retrieved using GetProject. No other operations\non the project are guaranteed to work until the project creation is\ncomplete.", - "type": "boolean" - }, - "createTime": { - "format": "google-datetime", - "description": "Creation time of the project creation workflow.", - "type": "string" - }, - "ready": { - "description": "True if the project creation process is complete.", - "type": "boolean" - } - }, - "id": "ProjectCreationStatus" - }, - "TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "TestIamPermissionsResponse" - }, - "GetIamPolicyRequest": { - "description": "Request message for `GetIamPolicy` method.", - "type": "object", - "properties": {}, - "id": "GetIamPolicyRequest" - }, - "OrganizationOwner": { - "description": "The entity that owns an Organization. The lifetime of the Organization and\nall of its descendants are bound to the `OrganizationOwner`. If the\n`OrganizationOwner` is deleted, the Organization and all its descendants will\nbe deleted.", - "type": "object", - "properties": { - "directoryCustomerId": { - "description": "The Google for Work customer id used in the Directory API.", - "type": "string" - } - }, - "id": "OrganizationOwner" - }, - "GetAncestryResponse": { - "description": "Response from the GetAncestry method.", - "type": "object", - "properties": { - "ancestor": { - "description": "Ancestors are ordered from bottom to top of the resource hierarchy. The\nfirst ancestor is the project itself, followed by the project's parent,\netc.", - "items": { - "$ref": "Ancestor" - }, - "type": "array" - } - }, - "id": "GetAncestryResponse" - }, - "ListProjectsResponse": { - "description": "A page of the response received from the\nListProjects\nmethod.\n\nA paginated response where more pages are available has\n`next_page_token` set. This token can be used in a subsequent request to\nretrieve the next request page.", - "type": "object", - "properties": { - "projects": { - "description": "The list of Projects that matched the list filter. This list can\nbe paginated.", - "items": { - "$ref": "Project" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Pagination token.\n\nIf the result set is too large to fit in a single response, this token\nis returned. It encodes the position of the current result cursor.\nFeeding this value into a new list request with the `page_token` parameter\ngives the next page of the results.\n\nWhen `next_page_token` is not filled in, there is no next page and\nthe list returned is the last page in the result set.\n\nPagination tokens have a limited lifetime.", - "type": "string" - } - }, - "id": "ListProjectsResponse" - }, - "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.", - "type": "object", - "properties": { - "logType": { - "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" - ], - "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" - ], - "description": "The log type that this config enables.", - "type": "string" - }, - "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" - } - }, - "id": "AuditLogConfig" - }, - "GetAncestryRequest": { - "description": "The request sent to the\nGetAncestry\nmethod.", - "type": "object", - "properties": {}, - "id": "GetAncestryRequest" - }, - "Project": { - "description": "A Project is a high-level Google Cloud Platform entity. It is a\ncontainer for ACLs, APIs, App Engine Apps, VMs, and other\nGoogle Cloud Platform resources.", - "type": "object", - "properties": { - "projectNumber": { - "format": "int64", - "description": "The number uniquely identifying the project.\n\nExample: \u003ccode\u003e415104041262\u003c/code\u003e\nRead-only.", - "type": "string" - }, - "parent": { - "description": "An optional reference to a parent Resource.\n\nThe only supported parent type is \"organization\". Once set, the parent\ncannot be modified. The `parent` can be set on creation or using the\n`UpdateProject` method; the end user must have the\n`resourcemanager.projects.create` permission on the parent.\n\nRead-write.", - "$ref": "ResourceId" - }, - "labels": { - "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\\])?)?.\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" - }, - "createTime": { - "format": "google-datetime", - "description": "Creation time.\n\nRead-only.", - "type": "string" - }, - "name": { - "description": "The user-assigned display name of the Project.\nIt must be 4 to 30 characters.\nAllowed characters are: lowercase and uppercase letters, numbers,\nhyphen, single-quote, double-quote, space, and exclamation point.\n\nExample: \u003ccode\u003eMy Project\u003c/code\u003e\nRead-write.", - "type": "string" - }, - "projectId": { - "description": "The unique, user-assigned ID of the Project.\nIt must be 6 to 30 lowercase letters, digits, or hyphens.\nIt must start with a letter.\nTrailing hyphens are prohibited.\n\nExample: \u003ccode\u003etokyo-rain-123\u003c/code\u003e\nRead-only after creation.", - "type": "string" - }, - "lifecycleState": { - "description": "The Project lifecycle state.\n\nRead-only.", - "type": "string", - "enumDescriptions": [ - "Unspecified state. This is only used/useful for distinguishing\nunset values.", - "The normal and active state.", - "The project has been marked for deletion by the user\n(by invoking DeleteProject)\nor by the system (Google Cloud Platform).\nThis can generally be reversed by invoking UndeleteProject.", - "This lifecycle state is no longer used and is not returned by the API." - ], - "enum": [ - "LIFECYCLE_STATE_UNSPECIFIED", - "ACTIVE", - "DELETE_REQUESTED", - "DELETE_IN_PROGRESS" - ] - } - }, - "id": "Project" - }, - "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "type": "object", - "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" - } - }, - "id": "TestIamPermissionsRequest" - }, - "FolderOperationError": { - "description": "A classification of the Folder Operation error.", - "type": "object", - "properties": { - "errorMessageId": { - "enumDescriptions": [ - "The error type was unrecognized or unspecified.", - "The attempted action would violate the max folder depth constraint.", - "The attempted action would violate the max child folders constraint.", - "The attempted action would violate the locally-unique folder\ndisplay_name constraint.", - "The resource being moved has been deleted.", - "The resource a folder was being added to has been deleted.", - "The attempted action would introduce cycle in resource path.", - "The attempted action would move a folder that is already being moved.", - "The folder the caller is trying to delete contains active resources.", - "The attempted action would violate the max deleted folder depth\nconstraint." - ], - "enum": [ - "ERROR_TYPE_UNSPECIFIED", - "ACTIVE_FOLDER_HEIGHT_VIOLATION", - "MAX_CHILD_FOLDERS_VIOLATION", - "FOLDER_NAME_UNIQUENESS_VIOLATION", - "RESOURCE_DELETED_VIOLATION", - "PARENT_DELETED_VIOLATION", - "CYCLE_INTRODUCED_VIOLATION", - "FOLDER_BEING_MOVED_VIOLATION", - "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION", - "DELETED_FOLDER_HEIGHT_VIOLATION" - ], - "description": "The type of operation error experienced.", - "type": "string" - } - }, - "id": "FolderOperationError" - }, - "FolderOperation": { - "description": "Metadata describing a long running folder operation", - "type": "object", - "properties": { - "sourceParent": { - "description": "The resource name of the folder's parent.\nOnly applicable when the operation_type is MOVE.", - "type": "string" - }, - "displayName": { - "description": "The display name of the folder.", - "type": "string" - }, - "destinationParent": { - "description": "The resource name of the folder or organization we are either creating\nthe folder under or moving the folder to.", - "type": "string" - }, - "operationType": { - "enumDescriptions": [ - "Operation type not specified.", - "A create folder operation.", - "A move folder operation." - ], - "enum": [ - "OPERATION_TYPE_UNSPECIFIED", - "CREATE", - "MOVE" - ], - "description": "The type of this operation.", - "type": "string" - } - }, - "id": "FolderOperation" - }, - "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "etag": { - "format": "byte", - "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.", - "type": "string" - }, - "version": { - "format": "int32", - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer" - }, - "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" - } - }, - "id": "Policy" - }, - "ResourceId": { - "description": "A container to reference an id for any resource type. A `resource` in Google\nCloud Platform is a generic term for something you (a developer) may want to\ninteract with through one of our API's. Some examples are an App Engine app,\na Compute Engine instance, a Cloud SQL database, and so on.", - "type": "object", - "properties": { - "type": { - "description": "Required field representing the resource type this id is for.\nAt present, the valid types are \"project\" and \"organization\".", - "type": "string" - }, - "id": { - "description": "Required field for the type-specific id. This should correspond to the id\nused in the type-specific API's.", - "type": "string" - } - }, - "id": "ResourceId" - }, - "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\nAuditConfig 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.", - "type": "object", - "properties": { - "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" - }, - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.\nNext ID: 4", - "items": { - "$ref": "AuditLogConfig" - }, - "type": "array" - } - }, - "id": "AuditConfig" - } - }, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "protocol": "rest", "canonicalName": "Cloud Resource Manager", "auth": { "oauth2": { @@ -466,337 +20,16 @@ "title": "Google Cloud Resource Manager API", "ownerName": "Google", "resources": { - "organizations": { - "methods": { - "testIamPermissions": { - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "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.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1beta1/organizations/{organizationsId}:testIamPermissions", - "path": "v1beta1/{+resource}:testIamPermissions", - "id": "cloudresourcemanager.organizations.testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "description": "Returns permissions that a caller has on the specified Organization.\nThe `resource` field should be the organization's resource name,\ne.g. \"organizations/123\"." - }, - "list": { - "flatPath": "v1beta1/organizations", - "id": "cloudresourcemanager.organizations.list", - "path": "v1beta1/organizations", - "description": "Lists Organization resources that are visible to the user and satisfy\nthe specified filter. This method returns Organizations in an unspecified\norder. New Organizations do not necessarily appear at the end of the list.", - "response": { - "$ref": "ListOrganizationsResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "The maximum number of Organizations to return in the response.\nThis field is optional.", - "type": "integer" - }, - "filter": { - "description": "An optional query string used to filter the Organizations to return in\nthe response. Filter rules are case-insensitive.\n\n\nOrganizations may be filtered by `owner.directoryCustomerId` or by\n`domain`, where the domain is a Google for Work domain, for example:\n\n|Filter|Description|\n|------|-----------|\n|owner.directorycustomerid:123456789|Organizations with `owner.directory_customer_id` equal to `123456789`.|\n|domain:google.com|Organizations corresponding to the domain `google.com`.|\n\nThis field is optional.", - "type": "string", - "location": "query" - }, - "pageToken": { - "location": "query", - "description": "A pagination token returned from a previous call to `ListOrganizations`\nthat indicates from where listing should continue.\nThis field is optional.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "setIamPolicy": { - "flatPath": "v1beta1/organizations/{organizationsId}:setIamPolicy", - "path": "v1beta1/{+resource}:setIamPolicy", - "id": "cloudresourcemanager.organizations.setIamPolicy", - "description": "Sets the access control policy on an Organization resource. Replaces any\nexisting policy. The `resource` field should be the organization's resource\nname, e.g. \"organizations/123\".", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "getIamPolicy": { - "request": { - "$ref": "GetIamPolicyRequest" - }, - "description": "Gets the access control policy for an Organization resource. May be empty\nif no such policy or resource exists. The `resource` field should be the\norganization's resource name, e.g. \"organizations/123\".", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1beta1/organizations/{organizationsId}:getIamPolicy", - "id": "cloudresourcemanager.organizations.getIamPolicy", - "path": "v1beta1/{+resource}:getIamPolicy" - }, - "get": { - "flatPath": "v1beta1/organizations/{organizationsId}", - "id": "cloudresourcemanager.organizations.get", - "path": "v1beta1/{+name}", - "description": "Fetches an Organization resource identified by the specified resource name.", - "response": { - "$ref": "Organization" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "organizationId": { - "description": "The id of the Organization resource to fetch.\nThis field is deprecated and will be removed in v1. Use name instead.", - "type": "string", - "location": "query" - }, - "name": { - "location": "path", - "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "update": { - "flatPath": "v1beta1/organizations/{organizationsId}", - "id": "cloudresourcemanager.organizations.update", - "path": "v1beta1/{+name}", - "request": { - "$ref": "Organization" - }, - "description": "Updates an Organization resource identified by the specified resource name.", - "response": { - "$ref": "Organization" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PUT", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\".", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$" - } - } - } - } - }, "projects": { "methods": { - "getIamPolicy": { - "request": { - "$ref": "GetIamPolicyRequest" - }, - "description": "Returns the IAM access control policy for the specified Project.\nPermission is denied if the policy or the resource does not exist.", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta1/projects/{resource}:getIamPolicy", - "id": "cloudresourcemanager.projects.getIamPolicy", - "path": "v1beta1/projects/{resource}:getIamPolicy" - }, - "get": { - "description": "Retrieves the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", - "httpMethod": "GET", - "response": { - "$ref": "Project" - }, - "parameterOrder": [ - "projectId" - ], - "parameters": { - "projectId": { - "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta1/projects/{projectId}", - "path": "v1beta1/projects/{projectId}", - "id": "cloudresourcemanager.projects.get" - }, - "undelete": { - "description": "Restores the Project identified by the specified\n`project_id` (for example, `my-project-123`).\nYou can only use this method for a Project that has a lifecycle state of\nDELETE_REQUESTED.\nAfter deletion starts, the Project cannot be restored.\n\nThe caller must have modify permissions for this Project.", - "request": { - "$ref": "UndeleteProjectRequest" - }, - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "location": "path", - "description": "The project ID (for example, `foo-bar-123`).\n\nRequired.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectId}:undelete", - "id": "cloudresourcemanager.projects.undelete", - "path": "v1beta1/projects/{projectId}:undelete" - }, - "update": { - "description": "Updates the attributes of the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have modify permissions for this Project.", - "request": { - "$ref": "Project" - }, - "response": { - "$ref": "Project" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "PUT", - "parameters": { - "projectId": { - "description": "The project ID (for example, `my-project-123`).\n\nRequired.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectId}", - "id": "cloudresourcemanager.projects.update", - "path": "v1beta1/projects/{projectId}" - }, - "getAncestry": { - "httpMethod": "POST", - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "GetAncestryResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "projectId": { - "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta1/projects/{projectId}:getAncestry", - "path": "v1beta1/projects/{projectId}:getAncestry", - "id": "cloudresourcemanager.projects.getAncestry", - "request": { - "$ref": "GetAncestryRequest" - }, - "description": "Gets a list of ancestors in the resource hierarchy for the Project\nidentified by the specified `project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project." - }, "testIamPermissions": { - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "description": "Returns permissions that a caller has on the specified Project.", - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], "response": { "$ref": "TestIamPermissionsResponse" }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" @@ -810,8 +43,12 @@ } }, "flatPath": "v1beta1/projects/{resource}:testIamPermissions", + "id": "cloudresourcemanager.projects.testIamPermissions", "path": "v1beta1/projects/{resource}:testIamPermissions", - "id": "cloudresourcemanager.projects.testIamPermissions" + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that a caller has on the specified Project." }, "delete": { "description": "Marks the Project identified by the specified\n`project_id` (for example, `my-project-123`) for deletion.\nThis method will only affect the Project if the following criteria are met:\n\n+ The Project does not have a billing account associated with it.\n+ The Project has a lifecycle state of\nACTIVE.\n\nThis method changes the Project's lifecycle state from\nACTIVE\nto DELETE_REQUESTED.\nThe deletion starts at an unspecified time, at which point the project is\nno longer accessible.\n\nUntil the deletion completes, you can check the lifecycle state\nchecked by retrieving the Project with GetProject,\nand the Project remains visible to ListProjects.\nHowever, you cannot update the project.\n\nAfter the deletion completes, the Project is not retrievable by\nthe GetProject and\nListProjects methods.\n\nThe caller must have modify permissions for this Project.", @@ -827,10 +64,10 @@ ], "parameters": { "projectId": { + "location": "path", "description": "The Project ID (for example, `foo-bar-123`).\n\nRequired.", "type": "string", - "required": true, - "location": "path" + "required": true } }, "flatPath": "v1beta1/projects/{projectId}", @@ -838,16 +75,22 @@ "id": "cloudresourcemanager.projects.delete" }, "list": { - "flatPath": "v1beta1/projects", - "id": "cloudresourcemanager.projects.list", - "path": "v1beta1/projects", "description": "Lists Projects that are visible to the user and satisfy the\nspecified filter. This method returns Projects in an unspecified order.\nNew Projects do not necessarily appear at the end of the list.", + "parameterOrder": [], + "httpMethod": "GET", "response": { "$ref": "ListProjectsResponse" }, - "parameterOrder": [], - "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "parameters": { + "pageToken": { + "description": "A pagination token returned from a previous call to ListProjects\nthat indicates from where listing should continue.\n\nOptional.", + "type": "string", + "location": "query" + }, "pageSize": { "format": "int32", "description": "The maximum number of Projects to return in the response.\nThe server can return fewer Projects than requested.\nIf unspecified, server picks an appropriate default.\n\nOptional.", @@ -855,34 +98,25 @@ "location": "query" }, "filter": { - "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n+ `name`\n+ `id`\n+ \u003ccode\u003elabels.\u003cem\u003ekey\u003c/em\u003e\u003c/code\u003e where *key* is the name of a label\n\nSome examples of using labels as filters:\n\n|Filter|Description|\n|------|-----------|\n|name:how*|The project's name starts with \"how\".|\n|name:Howl|The project's name is `Howl` or `howl`.|\n|name:HOWL|Equivalent to above.|\n|NAME:howl|Equivalent to above.|\n|labels.color:*|The project has the label `color`.|\n|labels.color:red|The project's label `color` has the value `red`.|\n|labels.color:red labels.size:big|The project's label `color` has the value `red` and its label `size` has the value `big`.\n\nIf you specify a filter that has both `parent.type` and `parent.id`, then\nthe `resourcemanager.projects.list` permission is checked on the parent.\nIf the user has this permission, all projects under the parent will be\nreturned after remaining filters have been applied. If the user lacks this\npermission, then all projects for which the user has the\n`resourcemanager.projects.get` permission will be returned after remaining\nfilters have been applied. If no filter is specified, the call will return\nprojects for which the user has `resourcemanager.projects.get` permissions.\n\nOptional.", "type": "string", - "location": "query" - }, - "pageToken": { - "description": "A pagination token returned from a previous call to ListProjects\nthat indicates from where listing should continue.\n\nOptional.", - "type": "string", - "location": "query" + "location": "query", + "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n+ `name`\n+ `id`\n+ \u003ccode\u003elabels.\u003cem\u003ekey\u003c/em\u003e\u003c/code\u003e where *key* is the name of a label\n\nSome examples of using labels as filters:\n\n|Filter|Description|\n|------|-----------|\n|name:how*|The project's name starts with \"how\".|\n|name:Howl|The project's name is `Howl` or `howl`.|\n|name:HOWL|Equivalent to above.|\n|NAME:howl|Equivalent to above.|\n|labels.color:*|The project has the label `color`.|\n|labels.color:red|The project's label `color` has the value `red`.|\n|labels.color:red labels.size:big|The project's label `color` has the value `red` and its label `size` has the value `big`.\n\nIf you specify a filter that has both `parent.type` and `parent.id`, then\nthe `resourcemanager.projects.list` permission is checked on the parent.\nIf the user has this permission, all projects under the parent will be\nreturned after remaining filters have been applied. If the user lacks this\npermission, then all projects for which the user has the\n`resourcemanager.projects.get` permission will be returned after remaining\nfilters have been applied. If no filter is specified, the call will return\nprojects for which the user has `resourcemanager.projects.get` permissions.\n\nOptional." } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] + "flatPath": "v1beta1/projects", + "id": "cloudresourcemanager.projects.list", + "path": "v1beta1/projects" }, "create": { + "description": "Creates a Project resource.\n\nInitially, the Project resource is owned by its creator exclusively.\nThe creator can later grant permission to others to read or update the\nProject.\n\nSeveral APIs are activated automatically for the Project, including\nGoogle Cloud Storage.", "request": { "$ref": "Project" }, - "description": "Creates a Project resource.\n\nInitially, the Project resource is owned by its creator exclusively.\nThe creator can later grant permission to others to read or update the\nProject.\n\nSeveral APIs are activated automatically for the Project, including\nGoogle Cloud Storage.", - "httpMethod": "POST", - "parameterOrder": [], "response": { "$ref": "Project" }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], + "parameterOrder": [], + "httpMethod": "POST", "parameters": { "useLegacyStack": { "location": "query", @@ -890,9 +124,12 @@ "type": "boolean" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1beta1/projects", - "path": "v1beta1/projects", - "id": "cloudresourcemanager.projects.create" + "id": "cloudresourcemanager.projects.create", + "path": "v1beta1/projects" }, "setIamPolicy": { "response": { @@ -902,46 +139,347 @@ "resource" ], "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "resource": { - "location": "path", "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{resource}:setIamPolicy", + "id": "cloudresourcemanager.projects.setIamPolicy", + "path": "v1beta1/projects/{resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the IAM access control policy for the specified Project. Replaces\nany existing policy.\n\nThe following constraints apply when using `setIamPolicy()`:\n\n+ Project does not support `allUsers` and `allAuthenticatedUsers` as\n`members` in a `Binding` of a `Policy`.\n\n+ The owner role can be granted only to `user` and `serviceAccount`.\n\n+ Service accounts can be made owners of a project directly\nwithout any restrictions. However, to be added as an owner, a user must be\ninvited via Cloud Platform console and must accept the invitation.\n\n+ A user cannot be granted the owner role using `setIamPolicy()`. The user\nmust be granted the owner role using the Cloud Platform Console and must\nexplicitly accept the invitation.\n\n+ Invitations to grant the owner role cannot be sent using\n`setIamPolicy()`; they must be sent only using the Cloud Platform Console.\n\n+ Membership changes that leave the project without any owners that have\naccepted the Terms of Service (ToS) will be rejected.\n\n+ If the project is not part of an organization, there must be at least\none owner who has accepted the Terms of Service (ToS) agreement in the\npolicy. Calling `setIamPolicy()` to remove the last ToS-accepted owner\nfrom the policy will fail. This restriction also applies to legacy\nprojects that no longer have owners who have accepted the ToS. Edits to\nIAM policies will be rejected until the lack of a ToS-accepting owner is\nrectified.\n\n+ Calling this method requires enabling the App Engine Admin API.\n\nNote: Removing service accounts from policies or changing their roles\ncan render services completely inoperable. It is important to understand\nhow the service account is being used before removing or updating its\nroles." + }, + "getIamPolicy": { + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta1/projects/{resource}:getIamPolicy", + "id": "cloudresourcemanager.projects.getIamPolicy", + "path": "v1beta1/projects/{resource}:getIamPolicy", + "description": "Returns the IAM access control policy for the specified Project.\nPermission is denied if the policy or the resource does not exist.", + "request": { + "$ref": "GetIamPolicyRequest" + } + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "Project" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", + "type": "string", "required": true } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta1/projects/{projectId}", + "path": "v1beta1/projects/{projectId}", + "id": "cloudresourcemanager.projects.get", + "description": "Retrieves the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project." + }, + "undelete": { + "id": "cloudresourcemanager.projects.undelete", + "path": "v1beta1/projects/{projectId}:undelete", + "description": "Restores the Project identified by the specified\n`project_id` (for example, `my-project-123`).\nYou can only use this method for a Project that has a lifecycle state of\nDELETE_REQUESTED.\nAfter deletion starts, the Project cannot be restored.\n\nThe caller must have modify permissions for this Project.", + "request": { + "$ref": "UndeleteProjectRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "description": "The project ID (for example, `foo-bar-123`).\n\nRequired.", + "type": "string", + "required": true, + "location": "path" + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1beta1/projects/{resource}:setIamPolicy", - "id": "cloudresourcemanager.projects.setIamPolicy", - "path": "v1beta1/projects/{resource}:setIamPolicy", - "description": "Sets the IAM access control policy for the specified Project. Replaces\nany existing policy.\n\nThe following constraints apply when using `setIamPolicy()`:\n\n+ Project does not support `allUsers` and `allAuthenticatedUsers` as\n`members` in a `Binding` of a `Policy`.\n\n+ The owner role can be granted only to `user` and `serviceAccount`.\n\n+ Service accounts can be made owners of a project directly\nwithout any restrictions. However, to be added as an owner, a user must be\ninvited via Cloud Platform console and must accept the invitation.\n\n+ A user cannot be granted the owner role using `setIamPolicy()`. The user\nmust be granted the owner role using the Cloud Platform Console and must\nexplicitly accept the invitation.\n\n+ Invitations to grant the owner role cannot be sent using\n`setIamPolicy()`; they must be sent only using the Cloud Platform Console.\n\n+ Membership changes that leave the project without any owners that have\naccepted the Terms of Service (ToS) will be rejected.\n\n+ If the project is not part of an organization, there must be at least\none owner who has accepted the Terms of Service (ToS) agreement in the\npolicy. Calling `setIamPolicy()` to remove the last ToS-accepted owner\nfrom the policy will fail. This restriction also applies to legacy\nprojects that no longer have owners who have accepted the ToS. Edits to\nIAM policies will be rejected until the lack of a ToS-accepting owner is\nrectified.\n\n+ Calling this method requires enabling the App Engine Admin API.\n\nNote: Removing service accounts from policies or changing their roles\ncan render services completely inoperable. It is important to understand\nhow the service account is being used before removing or updating its\nroles.", + "flatPath": "v1beta1/projects/{projectId}:undelete" + }, + "update": { + "path": "v1beta1/projects/{projectId}", + "id": "cloudresourcemanager.projects.update", + "request": { + "$ref": "Project" + }, + "description": "Updates the attributes of the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have modify permissions for this Project.", + "httpMethod": "PUT", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "Project" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The project ID (for example, `my-project-123`).\n\nRequired.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta1/projects/{projectId}" + }, + "getAncestry": { + "request": { + "$ref": "GetAncestryRequest" + }, + "description": "Gets a list of ancestors in the resource hierarchy for the Project\nidentified by the specified `project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", + "response": { + "$ref": "GetAncestryResponse" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "projectId": { + "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectId}:getAncestry", + "id": "cloudresourcemanager.projects.getAncestry", + "path": "v1beta1/projects/{projectId}:getAncestry" + } + } + }, + "organizations": { + "methods": { + "list": { + "description": "Lists Organization resources that are visible to the user and satisfy\nthe specified filter. This method returns Organizations in an unspecified\norder. New Organizations do not necessarily appear at the end of the list.", + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ListOrganizationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "pageToken": { + "type": "string", + "location": "query", + "description": "A pagination token returned from a previous call to `ListOrganizations`\nthat indicates from where listing should continue.\nThis field is optional." + }, + "pageSize": { + "format": "int32", + "description": "The maximum number of Organizations to return in the response.\nThis field is optional.", + "type": "integer", + "location": "query" + }, + "filter": { + "location": "query", + "description": "An optional query string used to filter the Organizations to return in\nthe response. Filter rules are case-insensitive.\n\n\nOrganizations may be filtered by `owner.directoryCustomerId` or by\n`domain`, where the domain is a Google for Work domain, for example:\n\n|Filter|Description|\n|------|-----------|\n|owner.directorycustomerid:123456789|Organizations with `owner.directory_customer_id` equal to `123456789`.|\n|domain:google.com|Organizations corresponding to the domain `google.com`.|\n\nThis field is optional.", + "type": "string" + } + }, + "flatPath": "v1beta1/organizations", + "path": "v1beta1/organizations", + "id": "cloudresourcemanager.organizations.list" + }, + "setIamPolicy": { "request": { "$ref": "SetIamPolicyRequest" - } + }, + "description": "Sets the access control policy on an Organization resource. Replaces any\nexisting policy. The `resource` field should be the organization's resource\nname, e.g. \"organizations/123\".", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+$" + } + }, + "flatPath": "v1beta1/organizations/{organizationsId}:setIamPolicy", + "id": "cloudresourcemanager.organizations.setIamPolicy", + "path": "v1beta1/{+resource}:setIamPolicy" + }, + "getIamPolicy": { + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field." + } + }, + "flatPath": "v1beta1/organizations/{organizationsId}:getIamPolicy", + "id": "cloudresourcemanager.organizations.getIamPolicy", + "path": "v1beta1/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "description": "Gets the access control policy for an Organization resource. May be empty\nif no such policy or resource exists. The `resource` field should be the\norganization's resource name, e.g. \"organizations/123\"." + }, + "get": { + "response": { + "$ref": "Organization" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".", + "type": "string", + "required": true + }, + "organizationId": { + "location": "query", + "description": "The id of the Organization resource to fetch.\nThis field is deprecated and will be removed in v1. Use name instead.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta1/organizations/{organizationsId}", + "id": "cloudresourcemanager.organizations.get", + "path": "v1beta1/{+name}", + "description": "Fetches an Organization resource identified by the specified resource name." + }, + "update": { + "httpMethod": "PUT", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Organization" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\"." + } + }, + "flatPath": "v1beta1/organizations/{organizationsId}", + "path": "v1beta1/{+name}", + "id": "cloudresourcemanager.organizations.update", + "request": { + "$ref": "Organization" + }, + "description": "Updates an Organization resource identified by the specified resource name." + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified Organization.\nThe `resource` field should be the organization's resource name,\ne.g. \"organizations/123\".", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "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.", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta1/organizations/{organizationsId}:testIamPermissions", + "path": "v1beta1/{+resource}:testIamPermissions", + "id": "cloudresourcemanager.organizations.testIamPermissions" } } } }, "parameters": { - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, "$.xgafv": { - "description": "V1 error format.", "type": "string", "enumDescriptions": [ "v1 error format", @@ -951,7 +489,13 @@ "enum": [ "1", "2" - ] + ], + "description": "V1 error format." + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" }, "alt": { "description": "Data format for response.", @@ -975,46 +519,502 @@ "location": "query" }, "key": { - "location": "query", "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.", - "type": "string" - }, - "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.", "type": "string", "location": "query" }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, "pp": { "description": "Pretty-print response.", "default": "true", "type": "boolean", "location": "query" }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, "bearer_token": { "description": "OAuth bearer token.", "type": "string", "location": "query" }, - "upload_protocol": { + "oauth_token": { "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "description": "OAuth 2.0 token for the current user.", "type": "string" }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, "prettyPrint": { "description": "Returns response with indentations and line breaks.", "default": "true", "type": "boolean", "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" } }, "version": "v1beta1", "baseUrl": "https://cloudresourcemanager.googleapis.com/", - "servicePath": "", + "kind": "discovery#restDescription", "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", - "kind": "discovery#restDescription" + "servicePath": "", + "basePath": "", + "revision": "20170911", + "documentationLink": "https://cloud.google.com/resource-manager", + "id": "cloudresourcemanager:v1beta1", + "discoveryVersion": "v1", + "schemas": { + "ListOrganizationsResponse": { + "description": "The response returned from the `ListOrganizations` method.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A pagination token to be used to retrieve the next page of results. If the\nresult is too large to fit within the page size specified in the request,\nthis field will be set with a token that can be used to fetch the next page\nof results. If this field is empty, it indicates that this response\ncontains the last page of results.", + "type": "string" + }, + "organizations": { + "description": "The list of Organizations that matched the list query, possibly paginated.", + "items": { + "$ref": "Organization" + }, + "type": "array" + } + }, + "id": "ListOrganizationsResponse" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "type": "object", + "properties": { + "updateMask": { + "format": "google-fieldmask", + "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.", + "type": "string" + }, + "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." + } + }, + "id": "SetIamPolicyRequest" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "type": "object", + "properties": { + "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` or `joe@example.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`.\nRequired", + "type": "string" + } + }, + "id": "Binding" + }, + "Empty": { + "type": "object", + "properties": {}, + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`." + }, + "Organization": { + "description": "The root node in the resource hierarchy to which a particular entity's\n(e.g., company) resources belong.", + "type": "object", + "properties": { + "creationTime": { + "format": "google-datetime", + "description": "Timestamp when the Organization was created. Assigned by the server.\n@OutputOnly", + "type": "string" + }, + "owner": { + "description": "The owner of this Organization. The owner should be specified on\ncreation. Once set, it cannot be changed.\nThis field is required.", + "$ref": "OrganizationOwner" + }, + "name": { + "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\".", + "type": "string" + }, + "organizationId": { + "description": "An immutable id for the Organization that is assigned on creation. This\nshould be omitted when creating a new Organization.\nThis field is read-only.\nThis field is deprecated and will be removed in v1. Use name instead.", + "type": "string" + }, + "lifecycleState": { + "enumDescriptions": [ + "Unspecified state. This is only useful for distinguishing unset values.", + "The normal and active state.", + "The organization has been marked for deletion by the user." + ], + "enum": [ + "LIFECYCLE_STATE_UNSPECIFIED", + "ACTIVE", + "DELETE_REQUESTED" + ], + "description": "The organization's current lifecycle state. Assigned by the server.\n@OutputOnly", + "type": "string" + }, + "displayName": { + "description": "A friendly string to be used to refer to the Organization in the UI.\nAssigned by the server, set to the primary domain of the G Suite\ncustomer that owns the organization.\n@OutputOnly", + "type": "string" + } + }, + "id": "Organization" + }, + "UndeleteProjectRequest": { + "type": "object", + "properties": {}, + "id": "UndeleteProjectRequest", + "description": "The request sent to the UndeleteProject\nmethod." + }, + "ProjectCreationStatus": { + "description": "A status object which is used as the `metadata` field for the Operation\nreturned by CreateProject. It provides insight for when significant phases of\nProject creation have completed.", + "type": "object", + "properties": { + "ready": { + "description": "True if the project creation process is complete.", + "type": "boolean" + }, + "gettable": { + "description": "True if the project can be retrieved using GetProject. No other operations\non the project are guaranteed to work until the project creation is\ncomplete.", + "type": "boolean" + }, + "createTime": { + "format": "google-datetime", + "description": "Creation time of the project creation workflow.", + "type": "string" + } + }, + "id": "ProjectCreationStatus" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "items": { + "type": "string" + }, + "type": "array", + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed." + } + }, + "id": "TestIamPermissionsResponse" + }, + "GetIamPolicyRequest": { + "properties": {}, + "id": "GetIamPolicyRequest", + "description": "Request message for `GetIamPolicy` method.", + "type": "object" + }, + "OrganizationOwner": { + "type": "object", + "properties": { + "directoryCustomerId": { + "description": "The Google for Work customer id used in the Directory API.", + "type": "string" + } + }, + "id": "OrganizationOwner", + "description": "The entity that owns an Organization. The lifetime of the Organization and\nall of its descendants are bound to the `OrganizationOwner`. If the\n`OrganizationOwner` is deleted, the Organization and all its descendants will\nbe deleted." + }, + "GetAncestryResponse": { + "type": "object", + "properties": { + "ancestor": { + "description": "Ancestors are ordered from bottom to top of the resource hierarchy. The\nfirst ancestor is the project itself, followed by the project's parent,\netc.", + "items": { + "$ref": "Ancestor" + }, + "type": "array" + } + }, + "id": "GetAncestryResponse", + "description": "Response from the GetAncestry method." + }, + "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.", + "type": "object", + "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": { + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "description": "The log type that this config enables.", + "type": "string" + } + }, + "id": "AuditLogConfig" + }, + "ListProjectsResponse": { + "description": "A page of the response received from the\nListProjects\nmethod.\n\nA paginated response where more pages are available has\n`next_page_token` set. This token can be used in a subsequent request to\nretrieve the next request page.", + "type": "object", + "properties": { + "projects": { + "description": "The list of Projects that matched the list filter. This list can\nbe paginated.", + "items": { + "$ref": "Project" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Pagination token.\n\nIf the result set is too large to fit in a single response, this token\nis returned. It encodes the position of the current result cursor.\nFeeding this value into a new list request with the `page_token` parameter\ngives the next page of the results.\n\nWhen `next_page_token` is not filled in, there is no next page and\nthe list returned is the last page in the result set.\n\nPagination tokens have a limited lifetime.", + "type": "string" + } + }, + "id": "ListProjectsResponse" + }, + "GetAncestryRequest": { + "properties": {}, + "id": "GetAncestryRequest", + "description": "The request sent to the\nGetAncestry\nmethod.", + "type": "object" + }, + "Project": { + "properties": { + "lifecycleState": { + "description": "The Project lifecycle state.\n\nRead-only.", + "type": "string", + "enumDescriptions": [ + "Unspecified state. This is only used/useful for distinguishing\nunset values.", + "The normal and active state.", + "The project has been marked for deletion by the user\n(by invoking DeleteProject)\nor by the system (Google Cloud Platform).\nThis can generally be reversed by invoking UndeleteProject.", + "This lifecycle state is no longer used and is not returned by the API." + ], + "enum": [ + "LIFECYCLE_STATE_UNSPECIFIED", + "ACTIVE", + "DELETE_REQUESTED", + "DELETE_IN_PROGRESS" + ] + }, + "projectNumber": { + "format": "int64", + "description": "The number uniquely identifying the project.\n\nExample: \u003ccode\u003e415104041262\u003c/code\u003e\nRead-only.", + "type": "string" + }, + "parent": { + "$ref": "ResourceId", + "description": "An optional reference to a parent Resource.\n\nThe only supported parent type is \"organization\". Once set, the parent\ncannot be modified. The `parent` can be set on creation or using the\n`UpdateProject` method; the end user must have the\n`resourcemanager.projects.create` permission on the parent.\n\nRead-write." + }, + "createTime": { + "format": "google-datetime", + "description": "Creation time.\n\nRead-only.", + "type": "string" + }, + "labels": { + "type": "object", + "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\\])?)?.\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." + }, + "name": { + "description": "The user-assigned display name of the Project.\nIt must be 4 to 30 characters.\nAllowed characters are: lowercase and uppercase letters, numbers,\nhyphen, single-quote, double-quote, space, and exclamation point.\n\nExample: \u003ccode\u003eMy Project\u003c/code\u003e\nRead-write.", + "type": "string" + }, + "projectId": { + "description": "The unique, user-assigned ID of the Project.\nIt must be 6 to 30 lowercase letters, digits, or hyphens.\nIt must start with a letter.\nTrailing hyphens are prohibited.\n\nExample: \u003ccode\u003etokyo-rain-123\u003c/code\u003e\nRead-only after creation.", + "type": "string" + } + }, + "id": "Project", + "description": "A Project is a high-level Google Cloud Platform entity. It is a\ncontainer for ACLs, APIs, App Engine Apps, VMs, and other\nGoogle Cloud Platform resources.", + "type": "object" + }, + "TestIamPermissionsRequest": { + "type": "object", + "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" + } + }, + "id": "TestIamPermissionsRequest", + "description": "Request message for `TestIamPermissions` method." + }, + "FolderOperation": { + "description": "Metadata describing a long running folder operation", + "type": "object", + "properties": { + "operationType": { + "enumDescriptions": [ + "Operation type not specified.", + "A create folder operation.", + "A move folder operation." + ], + "enum": [ + "OPERATION_TYPE_UNSPECIFIED", + "CREATE", + "MOVE" + ], + "description": "The type of this operation.", + "type": "string" + }, + "sourceParent": { + "description": "The resource name of the folder's parent.\nOnly applicable when the operation_type is MOVE.", + "type": "string" + }, + "displayName": { + "description": "The display name of the folder.", + "type": "string" + }, + "destinationParent": { + "description": "The resource name of the folder or organization we are either creating\nthe folder under or moving the folder to.", + "type": "string" + } + }, + "id": "FolderOperation" + }, + "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", + "properties": { + "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": { + "format": "byte", + "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.", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" + }, + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + } + }, + "id": "Policy" + }, + "FolderOperationError": { + "description": "A classification of the Folder Operation error.", + "type": "object", + "properties": { + "errorMessageId": { + "description": "The type of operation error experienced.", + "type": "string", + "enumDescriptions": [ + "The error type was unrecognized or unspecified.", + "The attempted action would violate the max folder depth constraint.", + "The attempted action would violate the max child folders constraint.", + "The attempted action would violate the locally-unique folder\ndisplay_name constraint.", + "The resource being moved has been deleted.", + "The resource a folder was being added to has been deleted.", + "The attempted action would introduce cycle in resource path.", + "The attempted action would move a folder that is already being moved.", + "The folder the caller is trying to delete contains active resources.", + "The attempted action would violate the max deleted folder depth\nconstraint." + ], + "enum": [ + "ERROR_TYPE_UNSPECIFIED", + "ACTIVE_FOLDER_HEIGHT_VIOLATION", + "MAX_CHILD_FOLDERS_VIOLATION", + "FOLDER_NAME_UNIQUENESS_VIOLATION", + "RESOURCE_DELETED_VIOLATION", + "PARENT_DELETED_VIOLATION", + "CYCLE_INTRODUCED_VIOLATION", + "FOLDER_BEING_MOVED_VIOLATION", + "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION", + "DELETED_FOLDER_HEIGHT_VIOLATION" + ] + } + }, + "id": "FolderOperationError" + }, + "ResourceId": { + "description": "A container to reference an id for any resource type. A `resource` in Google\nCloud Platform is a generic term for something you (a developer) may want to\ninteract with through one of our API's. Some examples are an App Engine app,\na Compute Engine instance, a Cloud SQL database, and so on.", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Required field representing the resource type this id is for.\nAt present, the valid types are \"project\", \"folder\", and \"organization\"." + }, + "id": { + "type": "string", + "description": "Required field for the type-specific id. This should correspond to the id\nused in the type-specific API's." + } + }, + "id": "ResourceId" + }, + "AuditConfig": { + "id": "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\nAuditConfig 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.", + "type": "object", + "properties": { + "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" + }, + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.\nNext ID: 4", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + } + } + }, + "Ancestor": { + "description": "Identifying information for a single ancestor of a project.", + "type": "object", + "properties": { + "resourceId": { + "$ref": "ResourceId", + "description": "Resource id of the ancestor." + } + }, + "id": "Ancestor" + } + }, + "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + } } diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go b/vendor/google.golang.org/api/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go index 1c1e3f94b..591ab8e2c 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go +++ b/vendor/google.golang.org/api/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go @@ -997,7 +997,8 @@ type ResourceId struct { // Type: Required field representing the resource type this id is // for. - // At present, the valid types are "project" and "organization". + // At present, the valid types are "project", "folder", and + // "organization". Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Id") to 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 d6fef738d..cef6141b1 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json +++ b/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json @@ -1,420 +1,268 @@ { - "batchPath": "batch", - "fullyEncodeReservedExpansion": true, - "title": "Google Cloud Resource Manager API", - "ownerName": "Google", - "resources": { - "folders": { - "methods": { - "getIamPolicy": { - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v2beta1/folders/{foldersId}:getIamPolicy", - "id": "cloudresourcemanager.folders.getIamPolicy", - "path": "v2beta1/{+resource}:getIamPolicy", - "description": "Gets the access control policy for a Folder. The returned policy may be\nempty if no such policy or resource exists. The `resource` field should\nbe the Folder's resource name, e.g. \"folders/1234\".\nThe caller must have `resourcemanager.folders.getIamPolicy` permission\non the identified folder.", - "request": { - "$ref": "GetIamPolicyRequest" - } - }, - "search": { - "response": { - "$ref": "SearchFoldersResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v2beta1/folders:search", - "id": "cloudresourcemanager.folders.search", - "path": "v2beta1/folders:search", - "description": "Search for folders that match specific filter criteria.\nSearch provides an eventually consistent view of the folders a user has\naccess to which meet the specified filter criteria.\n\nThis will only return folders on which the caller has the\npermission `resourcemanager.folders.get`.", - "request": { - "$ref": "SearchFoldersRequest" - } - }, - "patch": { - "request": { - "$ref": "Folder" - }, - "description": "Updates a Folder, changing its display_name.\nChanges to the folder display_name will be rejected if they violate either\nthe display_name formatting rules or naming constraints described in\nthe [CreateFolder] documentation.\n+ The Folder's display name must start and end with a letter or digit,\nmay contain letters, digits, spaces, hyphens and underscores and can be\nno longer than 30 characters. This is captured by the regular expression:\n[\\p{L}\\p{N}]({\\p{L}\\p{N}_- ]{0,28}[\\p{L}\\p{N}])?.\nThe caller must have `resourcemanager.folders.update` permission on the\nidentified folder.\n\nIf the update fails due to the unique name constraint then a\nPreconditionFailure explaining this violation will be returned\nin the Status.details field.", - "response": { - "$ref": "Folder" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PATCH", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Fields to be updated.\nOnly the `display_name` can be updated.", - "type": "string" - }, - "name": { - "description": "Output only. The resource name of the Folder.\nIts format is `folders/{folder_id}`, for example: \"folders/1234\".", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$", - "location": "path" - } - }, - "flatPath": "v2beta1/folders/{foldersId}", - "id": "cloudresourcemanager.folders.patch", - "path": "v2beta1/{+name}" - }, - "get": { - "httpMethod": "GET", - "response": { - "$ref": "Folder" - }, - "parameterOrder": [ - "name" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "name": { - "description": "The resource name of the Folder to retrieve.\nMust be of the form `folders/{folder_id}`.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$", - "location": "path" - } - }, - "flatPath": "v2beta1/folders/{foldersId}", - "path": "v2beta1/{+name}", - "id": "cloudresourcemanager.folders.get", - "description": "Retrieves a Folder identified by the supplied resource name.\nValid Folder resource names have the format `folders/{folder_id}`\n(for example, `folders/1234`).\nThe caller must have `resourcemanager.folders.get` permission on the\nidentified folder." - }, - "undelete": { - "description": "Cancels the deletion request for a Folder. This method may only be\ncalled on a Folder in the [DELETE_REQUESTED] state.\nIn order to succeed, the Folder's parent must be in the [ACTIVE] state.\nIn addition, reintroducing the folder into the tree must not violate\nfolder naming, height and fanout constraints described in the\n[CreateFolder] documentation.\nThe caller must have `resourcemanager.folders.undelete` permission on the\nidentified folder.", - "request": { - "$ref": "UndeleteFolderRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Folder" - }, - "parameters": { - "name": { - "location": "path", - "description": "The resource name of the Folder to undelete.\nMust be of the form `folders/{folder_id}`.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta1/folders/{foldersId}:undelete", - "path": "v2beta1/{+name}:undelete", - "id": "cloudresourcemanager.folders.undelete" - }, - "move": { - "description": "Moves a Folder under a new resource parent.\nReturns an Operation which can be used to track the progress of the\nfolder move workflow.\nUpon success the Operation.response field will be populated with the\nmoved Folder.\nUpon failure, a FolderOperationError categorizing the failure cause will\nbe returned - if the failure occurs synchronously then the\nFolderOperationError will be returned via the Status.details field\nand if it occurs asynchronously then the FolderOperation will be returned\nvia the the Operation.error field.\nIn addition, the Operation.metadata field will be populated with a\nFolderOperation message as an aid to stateless clients.\nFolder moves will be rejected if they violate either the naming, height\nor fanout constraints described in the [CreateFolder] documentation.\nThe caller must have `resourcemanager.folders.move` permission on the\nfolder's current and proposed new parent.", - "request": { - "$ref": "MoveFolderRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "description": "The resource name of the Folder to move.\nMust be of the form folders/{folder_id}", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta1/folders/{foldersId}:move", - "id": "cloudresourcemanager.folders.move", - "path": "v2beta1/{+name}:move" - }, - "testIamPermissions": { - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "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.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta1/folders/{foldersId}:testIamPermissions", - "id": "cloudresourcemanager.folders.testIamPermissions", - "path": "v2beta1/{+resource}:testIamPermissions", - "description": "Returns permissions that a caller has on the specified Folder.\nThe `resource` field should be the Folder's resource name,\ne.g. \"folders/1234\".\n\nThere are no permissions required for making this API call.", - "request": { - "$ref": "TestIamPermissionsRequest" - } - }, - "delete": { - "flatPath": "v2beta1/folders/{foldersId}", - "path": "v2beta1/{+name}", - "id": "cloudresourcemanager.folders.delete", - "description": "Requests deletion of a Folder. The Folder is moved into the\n[DELETE_REQUESTED] state immediately, and is deleted approximately 30 days\nlater. This method may only be called on an empty Folder in the [ACTIVE]\nstate, where a Folder is empty if it doesn't contain any Folders or\nProjects in the [ACTIVE] state.\nThe caller must have `resourcemanager.folders.delete` permission on the\nidentified folder.", - "httpMethod": "DELETE", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Folder" - }, - "parameters": { - "name": { - "location": "path", - "description": "the resource name of the Folder to be deleted.\nMust be of the form `folders/{folder_id}`.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "parameterOrder": [], - "response": { - "$ref": "ListFoldersResponse" - }, - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "showDeleted": { - "location": "query", - "description": "Controls whether Folders in the [DELETE_REQUESTED} state should\nbe returned.", - "type": "boolean" - }, - "pageToken": { - "location": "query", - "description": "A pagination token returned from a previous call to `ListFolders`\nthat indicates where this listing should continue from.\nThis field is optional.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "The maximum number of Folders to return in the response.\nThis field is optional.", - "type": "integer", - "location": "query" - }, - "parent": { - "description": "The resource name of the Organization or Folder whose Folders are\nbeing listed.\nMust be of the form `folders/{folder_id}` or `organizations/{org_id}`.\nAccess to this method is controlled by checking the\n`resourcemanager.folders.list` permission on the `parent`.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v2beta1/folders", - "id": "cloudresourcemanager.folders.list", - "path": "v2beta1/folders", - "description": "Lists the Folders that are direct descendants of supplied parent resource.\nList provides a strongly consistent view of the Folders underneath\nthe specified parent resource.\nList returns Folders sorted based upon the (ascending) lexical ordering\nof their display_name.\nThe caller must have `resourcemanager.folders.list` permission on the\nidentified parent." - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "location": "query", - "description": "The resource name of the new Folder's parent.\nMust be of the form `folders/{folder_id}` or `organizations/{org_id}`.", - "type": "string" - } - }, - "flatPath": "v2beta1/folders", - "path": "v2beta1/folders", - "id": "cloudresourcemanager.folders.create", - "request": { - "$ref": "Folder" - }, - "description": "Creates a Folder in the resource hierarchy.\nReturns an Operation which can be used to track the progress of the\nfolder creation workflow.\nUpon success the Operation.response field will be populated with the\ncreated Folder.\n\nIn order to succeed, the addition of this new Folder must not violate\nthe Folder naming, height or fanout constraints.\n+ The Folder's display_name must be distinct from all other Folder's that\nshare its parent.\n+ The addition of the Folder must not cause the active Folder hierarchy\nto exceed a height of 4. Note, the full active + deleted Folder hierarchy\nis allowed to reach a height of 8; this provides additional headroom when\nmoving folders that contain deleted folders.\n+ The addition of the Folder must not cause the total number of Folders\nunder its parent to exceed 100.\n\nIf the operation fails due to a folder constraint violation,\na PreconditionFailure explaining the violation will be returned.\nIf the failure occurs synchronously then the PreconditionFailure\nwill be returned via the Status.details field and if it occurs\nasynchronously then the PreconditionFailure will be returned\nvia the the Operation.error field.\n\nThe caller must have `resourcemanager.folders.create` permission on the\nidentified parent." - }, - "setIamPolicy": { - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta1/folders/{foldersId}:setIamPolicy", - "path": "v2beta1/{+resource}:setIamPolicy", - "id": "cloudresourcemanager.folders.setIamPolicy", - "description": "Sets the access control policy on a Folder, replacing any existing policy.\nThe `resource` field should be the Folder's resource name, e.g.\n\"folders/1234\".\nThe caller must have `resourcemanager.folders.setIamPolicy` permission\non the identified folder.", - "request": { - "$ref": "SetIamPolicyRequest" - } - } - } - } - }, - "parameters": { - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ] - }, - "alt": { - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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" - }, - "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.", - "type": "string", - "location": "query" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "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.", - "type": "string", - "location": "query" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - } - }, - "version": "v2beta1", - "baseUrl": "https://cloudresourcemanager.googleapis.com/", - "kind": "discovery#restDescription", - "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", - "servicePath": "", - "basePath": "", - "revision": "20170802", + "revision": "20170911", "documentationLink": "https://cloud.google.com/resource-manager", "id": "cloudresourcemanager:v2beta1", "discoveryVersion": "v1", "schemas": { + "Operation": { + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" + }, + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any." + } + }, + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object" + }, + "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\nAuditConfig 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.", + "type": "object", + "properties": { + "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" + }, + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.\nNext ID: 4", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + } + }, + "id": "AuditConfig" + }, + "ListFoldersResponse": { + "description": "The ListFolders response message.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A pagination token returned from a previous call to `ListFolders`\nthat indicates from where listing should continue.\nThis field is optional.", + "type": "string" + }, + "folders": { + "description": "A possibly paginated list of Folders that are direct descendants of\nthe specified parent resource.", + "items": { + "$ref": "Folder" + }, + "type": "array" + } + }, + "id": "ListFoldersResponse" + }, + "MoveFolderRequest": { + "description": "The MoveFolder request message.", + "type": "object", + "properties": { + "destinationParent": { + "description": "The resource name of the Folder or Organization to reparent\nthe folder under.\nMust be of the form `folders/{folder_id}` or `organizations/{org_id}`.", + "type": "string" + } + }, + "id": "MoveFolderRequest" + }, + "SetIamPolicyRequest": { + "type": "object", + "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": { + "type": "string", + "format": "google-fieldmask", + "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." + } + }, + "id": "SetIamPolicyRequest", + "description": "Request message for `SetIamPolicy` method." + }, + "SearchFoldersResponse": { + "description": "The response message for searching folders.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A pagination token returned from a previous call to `SearchFolders`\nthat indicates from where searching should continue.\nThis field is optional.", + "type": "string" + }, + "folders": { + "description": "A possibly paginated folder search results.\nthe specified parent resource.", + "items": { + "$ref": "Folder" + }, + "type": "array" + } + }, + "id": "SearchFoldersResponse" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "type": "object", + "properties": { + "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` or `joe@example.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`.\nRequired", + "type": "string" + } + }, + "id": "Binding" + }, + "SearchFoldersRequest": { + "id": "SearchFoldersRequest", + "description": "The request message for searching folders.", + "type": "object", + "properties": { + "pageSize": { + "format": "int32", + "description": "The maximum number of folders to return in the response.\nThis field is optional.", + "type": "integer" + }, + "query": { + "description": "Search criteria used to select the Folders to return.\nIf no search criteria is specified then all accessible folders will be\nreturned.\n\nQuery expressions can be used to restrict results based upon displayName,\nlifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nSome example queries are:\n|Query|Description|\n|------|-----------|\n|displayName=Test*|Folders whose display name starts with \"Test\".|\n|lifecycleState=ACTIVE|Folders whose lifecycleState is ACTIVE.|\n|parent=folders/123|Folders whose parent is \"folders/123\".|\n|parent=folders/123 AND lifecycleState=ACTIVE|Active folders whose\nparent is \"folders/123\".|", + "type": "string" + }, + "pageToken": { + "description": "A pagination token returned from a previous call to `SearchFolders`\nthat indicates from where search should continue.\nThis field is optional.", + "type": "string" + } + } + }, + "Folder": { + "id": "Folder", + "description": "A Folder in an Organization's resource hierarchy, used to\norganize that Organization's resources.", + "type": "object", + "properties": { + "createTime": { + "format": "google-datetime", + "description": "Output only. Timestamp when the Folder was created. Assigned by the server.", + "type": "string" + }, + "lifecycleState": { + "type": "string", + "enumDescriptions": [ + "Unspecified state.", + "The normal and active state.", + "The folder has been marked for deletion by the user." + ], + "enum": [ + "LIFECYCLE_STATE_UNSPECIFIED", + "ACTIVE", + "DELETE_REQUESTED" + ], + "description": "Output only. The lifecycle state of the folder.\nUpdates to the lifecycle_state must be performed via\n[DeleteFolder] and [UndeleteFolder]." + }, + "name": { + "description": "Output only. The resource name of the Folder.\nIts format is `folders/{folder_id}`, for example: \"folders/1234\".", + "type": "string" + }, + "displayName": { + "description": "The folder’s display name.\nA folder’s display name must be unique amongst its siblings, e.g.\nno two folders with the same parent can share the same display name.\nThe display name must start and end with a letter or digit, may contain\nletters, digits, spaces, hyphens and underscores and can be no longer\nthan 30 characters. This is captured by the regular expression:\n[\\p{L}\\p{N}]({\\p{L}\\p{N}_- ]{0,28}[\\p{L}\\p{N}])?.", + "type": "string" + }, + "parent": { + "description": "The Folder’s parent's resource name.\nUpdates to the folder's parent must be performed via [MoveFolders].", + "type": "string" + } + } + }, + "ProjectCreationStatus": { + "description": "A status object which is used as the `metadata` field for the Operation\nreturned by CreateProject. It provides insight for when significant phases of\nProject creation have completed.", + "type": "object", + "properties": { + "ready": { + "description": "True if the project creation process is complete.", + "type": "boolean" + }, + "gettable": { + "type": "boolean", + "description": "True if the project can be retrieved using GetProject. No other operations\non the project are guaranteed to work until the project creation is\ncomplete." + }, + "createTime": { + "type": "string", + "format": "google-datetime", + "description": "Creation time of the project creation workflow." + } + }, + "id": "ProjectCreationStatus" + }, + "GetIamPolicyRequest": { + "description": "Request message for `GetIamPolicy` method.", + "type": "object", + "properties": {}, + "id": "GetIamPolicyRequest" + }, + "TestIamPermissionsResponse": { + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestIamPermissionsResponse", + "description": "Response message for `TestIamPermissions` method.", + "type": "object" + }, "UndeleteFolderRequest": { "description": "The UndeleteFolder request message.", "type": "object", @@ -425,7 +273,20 @@ "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.", "type": "object", "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": { + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], "description": "The log type that this config enables.", "type": "string", "enumDescriptions": [ @@ -433,20 +294,7 @@ "Admin reads. Example: CloudIAM getIamPolicy", "Data writes. Example: CloudSQL Users create", "Data reads. Example: CloudSQL Users list" - ], - "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" ] - }, - "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" } }, "id": "AuditLogConfig" @@ -465,11 +313,43 @@ }, "id": "TestIamPermissionsRequest" }, + "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", + "properties": { + "etag": { + "format": "byte", + "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.", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" + }, + "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" + } + }, + "id": "Policy" + }, "FolderOperation": { "description": "Metadata describing a long running folder operation", "type": "object", "properties": { "operationType": { + "type": "string", "enumDescriptions": [ "Operation type not specified.", "A create folder operation.", @@ -480,16 +360,15 @@ "CREATE", "MOVE" ], - "description": "The type of this operation.", - "type": "string" + "description": "The type of this operation." }, "sourceParent": { "description": "The resource name of the folder's parent.\nOnly applicable when the operation_type is MOVE.", "type": "string" }, "displayName": { - "description": "The display name of the folder.", - "type": "string" + "type": "string", + "description": "The display name of the folder." }, "destinationParent": { "description": "The resource name of the folder or organization we are either creating\nthe folder under or moving the folder to.", @@ -532,303 +411,13 @@ } }, "id": "FolderOperationError" - }, - "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "etag": { - "format": "byte", - "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.", - "type": "string" - }, - "version": { - "format": "int32", - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer" - }, - "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" - } - }, - "id": "Policy" - }, - "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\nAuditConfig 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.", - "type": "object", - "properties": { - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.\nNext ID: 4", - "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" - } - }, - "id": "AuditConfig" - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", - "properties": { - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "type": "object" - } - }, - "id": "Operation" - }, - "ListFoldersResponse": { - "description": "The ListFolders response message.", - "type": "object", - "properties": { - "folders": { - "description": "A possibly paginated list of Folders that are direct descendants of\nthe specified parent resource.", - "items": { - "$ref": "Folder" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A pagination token returned from a previous call to `ListFolders`\nthat indicates from where listing should continue.\nThis field is optional.", - "type": "string" - } - }, - "id": "ListFoldersResponse" - }, - "MoveFolderRequest": { - "description": "The MoveFolder request message.", - "type": "object", - "properties": { - "destinationParent": { - "description": "The resource name of the Folder or Organization to reparent\nthe folder under.\nMust be of the form `folders/{folder_id}` or `organizations/{org_id}`.", - "type": "string" - } - }, - "id": "MoveFolderRequest" - }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "properties": { - "updateMask": { - "format": "google-fieldmask", - "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.", - "type": "string" - }, - "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." - } - }, - "id": "SetIamPolicyRequest" - }, - "SearchFoldersResponse": { - "description": "The response message for searching folders.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "A pagination token returned from a previous call to `SearchFolders`\nthat indicates from where searching should continue.\nThis field is optional.", - "type": "string" - }, - "folders": { - "description": "A possibly paginated folder search results.\nthe specified parent resource.", - "items": { - "$ref": "Folder" - }, - "type": "array" - } - }, - "id": "SearchFoldersResponse" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - } - }, - "id": "Status" - }, - "Binding": { - "description": "Associates `members` with a `role`.", - "type": "object", - "properties": { - "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` or `joe@example.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`.\nRequired", - "type": "string" - } - }, - "id": "Binding" - }, - "SearchFoldersRequest": { - "description": "The request message for searching folders.", - "type": "object", - "properties": { - "pageToken": { - "description": "A pagination token returned from a previous call to `SearchFolders`\nthat indicates from where search should continue.\nThis field is optional.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "The maximum number of folders to return in the response.\nThis field is optional.", - "type": "integer" - }, - "query": { - "description": "Search criteria used to select the Folders to return.\nIf no search criteria is specified then all accessible folders will be\nreturned.\n\nQuery expressions can be used to restrict results based upon displayName,\nlifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nSome example queries are:\n|Query|Description|\n|------|-----------|\n|displayName=Test*|Folders whose display name starts with \"Test\".|\n|lifecycleState=ACTIVE|Folders whose lifecycleState is ACTIVE.|\n|parent=folders/123|Folders whose parent is \"folders/123\".|\n|parent=folders/123 AND lifecycleState=ACTIVE|Active folders whose\nparent is \"folders/123\".|", - "type": "string" - } - }, - "id": "SearchFoldersRequest" - }, - "ProjectCreationStatus": { - "description": "A status object which is used as the `metadata` field for the Operation\nreturned by CreateProject. It provides insight for when significant phases of\nProject creation have completed.", - "type": "object", - "properties": { - "ready": { - "description": "True if the project creation process is complete.", - "type": "boolean" - }, - "gettable": { - "description": "True if the project can be retrieved using GetProject. No other operations\non the project are guaranteed to work until the project creation is\ncomplete.", - "type": "boolean" - }, - "createTime": { - "format": "google-datetime", - "description": "Creation time of the project creation workflow.", - "type": "string" - } - }, - "id": "ProjectCreationStatus" - }, - "Folder": { - "description": "A Folder in an Organization's resource hierarchy, used to\norganize that Organization's resources.", - "type": "object", - "properties": { - "displayName": { - "description": "The folder’s display name.\nA folder’s display name must be unique amongst its siblings, e.g.\nno two folders with the same parent can share the same display name.\nThe display name must start and end with a letter or digit, may contain\nletters, digits, spaces, hyphens and underscores and can be no longer\nthan 30 characters. This is captured by the regular expression:\n[\\p{L}\\p{N}]({\\p{L}\\p{N}_- ]{0,28}[\\p{L}\\p{N}])?.", - "type": "string" - }, - "parent": { - "description": "The Folder’s parent's resource name.\nUpdates to the folder's parent must be performed via [MoveFolders].", - "type": "string" - }, - "createTime": { - "format": "google-datetime", - "description": "Output only. Timestamp when the Folder was created. Assigned by the server.", - "type": "string" - }, - "lifecycleState": { - "description": "Output only. The lifecycle state of the folder.\nUpdates to the lifecycle_state must be performed via\n[DeleteFolder] and [UndeleteFolder].", - "type": "string", - "enumDescriptions": [ - "Unspecified state.", - "The normal and active state.", - "The folder has been marked for deletion by the user." - ], - "enum": [ - "LIFECYCLE_STATE_UNSPECIFIED", - "ACTIVE", - "DELETE_REQUESTED" - ] - }, - "name": { - "description": "Output only. The resource name of the Folder.\nIts format is `folders/{folder_id}`, for example: \"folders/1234\".", - "type": "string" - } - }, - "id": "Folder" - }, - "TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "TestIamPermissionsResponse" - }, - "GetIamPolicyRequest": { - "description": "Request message for `GetIamPolicy` method.", - "type": "object", - "properties": {}, - "id": "GetIamPolicyRequest" } }, + "protocol": "rest", "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "protocol": "rest", "canonicalName": "Cloud Resource Manager", "auth": { "oauth2": { @@ -844,5 +433,416 @@ }, "rootUrl": "https://cloudresourcemanager.googleapis.com/", "ownerDomain": "google.com", - "name": "cloudresourcemanager" + "name": "cloudresourcemanager", + "batchPath": "batch", + "fullyEncodeReservedExpansion": true, + "title": "Google Cloud Resource Manager API", + "ownerName": "Google", + "resources": { + "folders": { + "methods": { + "create": { + "path": "v2beta1/folders", + "id": "cloudresourcemanager.folders.create", + "request": { + "$ref": "Folder" + }, + "description": "Creates a Folder in the resource hierarchy.\nReturns an Operation which can be used to track the progress of the\nfolder creation workflow.\nUpon success the Operation.response field will be populated with the\ncreated Folder.\n\nIn order to succeed, the addition of this new Folder must not violate\nthe Folder naming, height or fanout constraints.\n+ The Folder's display_name must be distinct from all other Folder's that\nshare its parent.\n+ The addition of the Folder must not cause the active Folder hierarchy\nto exceed a height of 4. Note, the full active + deleted Folder hierarchy\nis allowed to reach a height of 8; this provides additional headroom when\nmoving folders that contain deleted folders.\n+ The addition of the Folder must not cause the total number of Folders\nunder its parent to exceed 100.\n\nIf the operation fails due to a folder constraint violation,\na PreconditionFailure explaining the violation will be returned.\nIf the failure occurs synchronously then the PreconditionFailure\nwill be returned via the Status.details field and if it occurs\nasynchronously then the PreconditionFailure will be returned\nvia the the Operation.error field.\n\nThe caller must have `resourcemanager.folders.create` permission on the\nidentified parent.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "parent": { + "location": "query", + "description": "The resource name of the new Folder's parent.\nMust be of the form `folders/{folder_id}` or `organizations/{org_id}`.", + "type": "string" + } + }, + "flatPath": "v2beta1/folders" + }, + "setIamPolicy": { + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the access control policy on a Folder, replacing any existing policy.\nThe `resource` field should be the Folder's resource name, e.g.\n\"folders/1234\".\nThe caller must have `resourcemanager.folders.setIamPolicy` permission\non the identified folder.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "pattern": "^folders/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/folders/{foldersId}:setIamPolicy", + "id": "cloudresourcemanager.folders.setIamPolicy", + "path": "v2beta1/{+resource}:setIamPolicy" + }, + "getIamPolicy": { + "description": "Gets the access control policy for a Folder. The returned policy may be\nempty if no such policy or resource exists. The `resource` field should\nbe the Folder's resource name, e.g. \"folders/1234\".\nThe caller must have `resourcemanager.folders.getIamPolicy` permission\non the identified folder.", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v2beta1/folders/{foldersId}:getIamPolicy", + "id": "cloudresourcemanager.folders.getIamPolicy", + "path": "v2beta1/{+resource}:getIamPolicy" + }, + "search": { + "id": "cloudresourcemanager.folders.search", + "path": "v2beta1/folders:search", + "request": { + "$ref": "SearchFoldersRequest" + }, + "description": "Search for folders that match specific filter criteria.\nSearch provides an eventually consistent view of the folders a user has\naccess to which meet the specified filter criteria.\n\nThis will only return folders on which the caller has the\npermission `resourcemanager.folders.get`.", + "response": { + "$ref": "SearchFoldersResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": {}, + "flatPath": "v2beta1/folders:search" + }, + "patch": { + "request": { + "$ref": "Folder" + }, + "description": "Updates a Folder, changing its display_name.\nChanges to the folder display_name will be rejected if they violate either\nthe display_name formatting rules or naming constraints described in\nthe [CreateFolder] documentation.\n+ The Folder's display name must start and end with a letter or digit,\nmay contain letters, digits, spaces, hyphens and underscores and can be\nno longer than 30 characters. This is captured by the regular expression:\n[\\p{L}\\p{N}]({\\p{L}\\p{N}_- ]{0,28}[\\p{L}\\p{N}])?.\nThe caller must have `resourcemanager.folders.update` permission on the\nidentified folder.\n\nIf the update fails due to the unique name constraint then a\nPreconditionFailure explaining this violation will be returned\nin the Status.details field.", + "response": { + "$ref": "Folder" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Fields to be updated.\nOnly the `display_name` can be updated.", + "type": "string" + }, + "name": { + "location": "path", + "description": "Output only. The resource name of the Folder.\nIts format is `folders/{folder_id}`, for example: \"folders/1234\".", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$" + } + }, + "flatPath": "v2beta1/folders/{foldersId}", + "id": "cloudresourcemanager.folders.patch", + "path": "v2beta1/{+name}" + }, + "get": { + "path": "v2beta1/{+name}", + "id": "cloudresourcemanager.folders.get", + "description": "Retrieves a Folder identified by the supplied resource name.\nValid Folder resource names have the format `folders/{folder_id}`\n(for example, `folders/1234`).\nThe caller must have `resourcemanager.folders.get` permission on the\nidentified folder.", + "httpMethod": "GET", + "response": { + "$ref": "Folder" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "name": { + "pattern": "^folders/[^/]+$", + "location": "path", + "description": "The resource name of the Folder to retrieve.\nMust be of the form `folders/{folder_id}`.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/folders/{foldersId}" + }, + "undelete": { + "description": "Cancels the deletion request for a Folder. This method may only be\ncalled on a Folder in the [DELETE_REQUESTED] state.\nIn order to succeed, the Folder's parent must be in the [ACTIVE] state.\nIn addition, reintroducing the folder into the tree must not violate\nfolder naming, height and fanout constraints described in the\n[CreateFolder] documentation.\nThe caller must have `resourcemanager.folders.undelete` permission on the\nidentified folder.", + "request": { + "$ref": "UndeleteFolderRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Folder" + }, + "parameters": { + "name": { + "description": "The resource name of the Folder to undelete.\nMust be of the form `folders/{folder_id}`.", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta1/folders/{foldersId}:undelete", + "path": "v2beta1/{+name}:undelete", + "id": "cloudresourcemanager.folders.undelete" + }, + "move": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The resource name of the Folder to move.\nMust be of the form folders/{folder_id}", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2beta1/folders/{foldersId}:move", + "path": "v2beta1/{+name}:move", + "id": "cloudresourcemanager.folders.move", + "request": { + "$ref": "MoveFolderRequest" + }, + "description": "Moves a Folder under a new resource parent.\nReturns an Operation which can be used to track the progress of the\nfolder move workflow.\nUpon success the Operation.response field will be populated with the\nmoved Folder.\nUpon failure, a FolderOperationError categorizing the failure cause will\nbe returned - if the failure occurs synchronously then the\nFolderOperationError will be returned via the Status.details field\nand if it occurs asynchronously then the FolderOperation will be returned\nvia the the Operation.error field.\nIn addition, the Operation.metadata field will be populated with a\nFolderOperation message as an aid to stateless clients.\nFolder moves will be rejected if they violate either the naming, height\nor fanout constraints described in the [CreateFolder] documentation.\nThe caller must have `resourcemanager.folders.move` permission on the\nfolder's current and proposed new parent." + }, + "testIamPermissions": { + "flatPath": "v2beta1/folders/{foldersId}:testIamPermissions", + "id": "cloudresourcemanager.folders.testIamPermissions", + "path": "v2beta1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that a caller has on the specified Folder.\nThe `resource` field should be the Folder's resource name,\ne.g. \"folders/1234\".\n\nThere are no permissions required for making this API call.", + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "pattern": "^folders/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + } + }, + "delete": { + "id": "cloudresourcemanager.folders.delete", + "path": "v2beta1/{+name}", + "description": "Requests deletion of a Folder. The Folder is moved into the\n[DELETE_REQUESTED] state immediately, and is deleted approximately 30 days\nlater. This method may only be called on an empty Folder in the [ACTIVE]\nstate, where a Folder is empty if it doesn't contain any Folders or\nProjects in the [ACTIVE] state.\nThe caller must have `resourcemanager.folders.delete` permission on the\nidentified folder.", + "response": { + "$ref": "Folder" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "parameters": { + "name": { + "description": "the resource name of the Folder to be deleted.\nMust be of the form `folders/{folder_id}`.", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta1/folders/{foldersId}" + }, + "list": { + "description": "Lists the Folders that are direct descendants of supplied parent resource.\nList provides a strongly consistent view of the Folders underneath\nthe specified parent resource.\nList returns Folders sorted based upon the (ascending) lexical ordering\nof their display_name.\nThe caller must have `resourcemanager.folders.list` permission on the\nidentified parent.", + "response": { + "$ref": "ListFoldersResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "parent": { + "description": "The resource name of the Organization or Folder whose Folders are\nbeing listed.\nMust be of the form `folders/{folder_id}` or `organizations/{org_id}`.\nAccess to this method is controlled by checking the\n`resourcemanager.folders.list` permission on the `parent`.", + "type": "string", + "location": "query" + }, + "showDeleted": { + "location": "query", + "description": "Controls whether Folders in the [DELETE_REQUESTED} state should\nbe returned.", + "type": "boolean" + }, + "pageToken": { + "location": "query", + "description": "A pagination token returned from a previous call to `ListFolders`\nthat indicates where this listing should continue from.\nThis field is optional.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The maximum number of Folders to return in the response.\nThis field is optional.", + "type": "integer" + } + }, + "flatPath": "v2beta1/folders", + "id": "cloudresourcemanager.folders.list", + "path": "v2beta1/folders" + } + } + } + }, + "parameters": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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", + "description": "Data format for response.", + "default": "json" + }, + "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.", + "type": "string", + "location": "query" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + } + }, + "version": "v2beta1", + "baseUrl": "https://cloudresourcemanager.googleapis.com/", + "servicePath": "", + "kind": "discovery#restDescription", + "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", + "basePath": "" } 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 914868672..9d3c0e168 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go +++ b/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go @@ -559,8 +559,8 @@ func (s *MoveFolderRequest) MarshalJSON() ([]byte, error) { type Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` diff --git a/vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-api.json b/vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-api.json new file mode 100644 index 000000000..ebb616452 --- /dev/null +++ b/vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-api.json @@ -0,0 +1,1492 @@ +{ + "canonicalName": "Cloud Tasks", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://cloudtasks.googleapis.com/", + "ownerDomain": "google.com", + "name": "cloudtasks", + "batchPath": "batch", + "fullyEncodeReservedExpansion": true, + "title": "Cloud Tasks API", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "locations": { + "resources": { + "queues": { + "methods": { + "list": { + "id": "cloudtasks.projects.locations.queues.list", + "path": "v2beta2/{+parent}/queues", + "description": "Lists queues.\n\nQueues are returned in lexicographical order.", + "response": { + "$ref": "ListQueuesResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "pageSize": { + "format": "int32", + "description": "Requested page size.\n\nThe maximum page size is 9800. If unspecified, the page size will\nbe the maximum. Fewer queues than requested might be returned,\neven if more queues exist; use\nListQueuesResponse.next_page_token to determine if more\nqueues exist.", + "type": "integer", + "location": "query" + }, + "parent": { + "description": "Required.\n\nThe location name.\nFor example: `projects/PROJECT_ID/locations/LOCATION_ID`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + }, + "filter": { + "description": "`filter` can be used to specify a subset of queues. Any Queue\nfield can be used as a filter and several operators as supported.\nFor example: `\u003c=, \u003c, \u003e=, \u003e, !=, =, :`. The filter syntax is the same as\ndescribed in\n[Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters).\n\nSample filter \"app_engine_queue_config: *\".\n\nNote that using filters might cause fewer queues than the\nrequested_page size to be returned.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "format": "byte", + "description": "A token identifying the page of results to return.\n\nTo request the first page results, page_token must be empty. To\nrequest the next page of results, page_token must be the value of\nListQueuesResponse.next_page_token returned from the previous\ncall to CloudTasks.ListQueues method. It is an error to\nswitch the value of ListQueuesRequest.filter while iterating\nthrough pages.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues" + }, + "create": { + "request": { + "$ref": "Queue" + }, + "description": "Creates a queue.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy).", + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "Queue" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "parent": { + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path", + "description": "Required.\n\nThe location name in which the queue will be created.\nFor example: `projects/PROJECT_ID/locations/LOCATION_ID`\n\nThe list of allowed locations can be obtained by calling Cloud\nTasks' implementation of\ngoogle.cloud.location.Locations.ListLocations.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues", + "path": "v2beta2/{+parent}/queues", + "id": "cloudtasks.projects.locations.queues.create" + }, + "setIamPolicy": { + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the access control policy for a Queue. Replaces any existing\npolicy.\n\nAuthorization requires the following [Google IAM](/iam) permission on the\nspecified resource parent:\n\n* `cloudtasks.queues.setIamPolicy`", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$" + } + }, + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:setIamPolicy", + "id": "cloudtasks.projects.locations.queues.setIamPolicy", + "path": "v2beta2/{+resource}:setIamPolicy" + }, + "resume": { + "id": "cloudtasks.projects.locations.queues.resume", + "path": "v2beta2/{+name}:resume", + "request": { + "$ref": "ResumeQueueRequest" + }, + "description": "Resume a queue.\n\nThis method resumes a queue after it has been\nQueue.QueueState.PAUSED or Queue.QueueState.DISABLED. The state of\na queue is stored in Queue.queue_state; after calling this method it\nwill be set to Queue.QueueState.RUNNING.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy).\n\nWARNING: Resuming many high-QPS queues at the same time can\nlead to target overloading. If you are resuming high-QPS\nqueues, follow the 500/50/5 pattern described in\n[Managing Cloud Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf).", + "response": { + "$ref": "Queue" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:resume" + }, + "getIamPolicy": { + "description": "Gets the access control policy for a Queue.\nReturns an empty policy if the resource exists and does not have a policy\nset.\n\nAuthorization requires the following [Google IAM](/iam) permission on the\nspecified resource parent:\n\n* `cloudtasks.queues.getIamPolicy`", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:getIamPolicy", + "path": "v2beta2/{+resource}:getIamPolicy", + "id": "cloudtasks.projects.locations.queues.getIamPolicy" + }, + "patch": { + "request": { + "$ref": "Queue" + }, + "description": "Updates a queue.\n\nThis method creates the queue if it does not exist and updates\nthe queue if it does exist.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy).", + "httpMethod": "PATCH", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Queue" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "description": "A mask used to specify which fields of the queue are being updated.\n\nIf empty, then all fields will be updated.", + "type": "string", + "location": "query" + }, + "name": { + "location": "path", + "description": "The queue name.\n\nThe queue name must have the following format:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`\n\n* `PROJECT_ID` can contain uppercase and lowercase letters,\n numbers, hyphens, colons, and periods; that is, it must match\n the regular expression: `[a-zA-Z\\\\d-:\\\\.]+`.\n* `QUEUE_ID` can contain uppercase and lowercase letters,\n numbers, and hyphens; that is, it must match the regular\n expression: `[a-zA-Z\\\\d-]+`. The maximum length is 100\n characters.\n\nCaller-specified and required in CreateQueueRequest, after which\nit becomes output only.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$" + } + }, + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}", + "path": "v2beta2/{+name}", + "id": "cloudtasks.projects.locations.queues.patch" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Queue" + }, + "parameters": { + "name": { + "description": "Required.\n\nThe resource name of the queue. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}", + "path": "v2beta2/{+name}", + "id": "cloudtasks.projects.locations.queues.get", + "description": "Gets a queue." + }, + "purge": { + "response": { + "$ref": "Queue" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$" + } + }, + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:purge", + "id": "cloudtasks.projects.locations.queues.purge", + "path": "v2beta2/{+name}:purge", + "request": { + "$ref": "PurgeQueueRequest" + }, + "description": "Purges a queue by deleting all of its tasks.\n\nAll tasks created before this method is called are permanently deleted.\n\nPurge operations can take up to one minute to take effect. Tasks\nmight be dispatched before the purge takes effect. A purge is irreversible." + }, + "testIamPermissions": { + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that a caller has on a Queue.\nIf the resource does not exist, this will return an empty set of\npermissions, not a google.rpc.Code.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.", + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "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.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:testIamPermissions", + "id": "cloudtasks.projects.locations.queues.testIamPermissions", + "path": "v2beta2/{+resource}:testIamPermissions" + }, + "pause": { + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:pause", + "path": "v2beta2/{+name}:pause", + "id": "cloudtasks.projects.locations.queues.pause", + "request": { + "$ref": "PauseQueueRequest" + }, + "description": "Pauses the queue.\n\nIf a queue is paused then the system will stop executing the\ntasks in the queue until it is resumed via\nCloudTasks.ResumeQueue. Tasks can still be added when the\nqueue is paused. The state of the queue is stored in\nQueue.queue_state; if paused it will be set to\nQueue.QueueState.PAUSED.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy).", + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Queue" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "location": "path", + "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`", + "type": "string", + "required": true + } + } + }, + "delete": { + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}", + "id": "cloudtasks.projects.locations.queues.delete", + "path": "v2beta2/{+name}", + "description": "Deletes a queue.\n\nThis command will delete the queue even if it has tasks in it.\n\nNote: If you delete a queue, a queue with the same name can't be created\nfor 7 days.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy)." + } + }, + "resources": { + "tasks": { + "methods": { + "pull": { + "id": "cloudtasks.projects.locations.queues.tasks.pull", + "path": "v2beta2/{+name}/tasks:pull", + "description": "Pulls tasks from a pull queue and acquires a lease on them for a\nspecified PullTasksRequest.lease_duration.\n\nThis method is invoked by the lease holder to obtain the\nlease. The lease holder must acknowledge the task via\nCloudTasks.AcknowledgeTask after they have performed the work\nassociated with the task.\n\nThe payload is intended to store data that the lease holder needs\nto perform the work associated with the task. To return the\npayloads in the PullTasksResponse, set\nPullTasksRequest.response_view to Task.View.FULL.", + "request": { + "$ref": "PullTasksRequest" + }, + "response": { + "$ref": "PullTasksResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks:pull" + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", + "location": "path", + "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}", + "id": "cloudtasks.projects.locations.queues.tasks.delete", + "path": "v2beta2/{+name}", + "description": "Deletes a task.\n\nA task can be deleted if it is scheduled or dispatched. A task\ncannot be deleted if it has completed successfully or permanently\nfailed." + }, + "list": { + "response": { + "$ref": "ListTasksResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "format": "byte", + "description": "A token identifying the page of results to return.\n\nTo request the first page results, page_token must be empty. To\nrequest the next page of results, page_token must be the value of\nListTasksResponse.next_page_token returned from the previous\ncall to CloudTasks.ListTasks method.\n\nThe page token is valid for only 2 hours.", + "type": "string", + "location": "query" + }, + "orderBy": { + "description": "\nSort order used for the query. The fields supported for sorting\nare Task.schedule_time and PullTaskTarget.tag. All results will be\nreturned in ascending order. The default ordering is by\nTask.schedule_time.", + "type": "string", + "location": "query" + }, + "responseView": { + "location": "query", + "enum": [ + "VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Requested page size. Fewer tasks than requested might be returned.\n\nThe maximum page size is 1000. If unspecified, the page size will\nbe the maximum. Fewer tasks than requested might be returned,\neven if more tasks exist; use\nListTasksResponse.next_page_token to determine if more tasks\nexist.", + "type": "integer", + "location": "query" + }, + "parent": { + "location": "path", + "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks", + "id": "cloudtasks.projects.locations.queues.tasks.list", + "path": "v2beta2/{+parent}/tasks", + "description": "Lists the tasks in a queue.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default due to performance\nconsiderations; ListTasksRequest.response_view controls the\nsubset of information which is returned." + }, + "create": { + "response": { + "$ref": "Task" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "parent": { + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "location": "path", + "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`\n\nThe queue must already exist.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks", + "id": "cloudtasks.projects.locations.queues.tasks.create", + "path": "v2beta2/{+parent}/tasks", + "description": "Creates a task and adds it to a queue.\n\nTo add multiple tasks at the same time, use\n[HTTP batching](/storage/docs/json_api/v1/how-tos/batch)\nor the batching documentation for your client library, for example\nhttps://developers.google.com/api-client-library/python/guide/batch.\n\nTasks cannot be updated after creation; there is no UpdateTask command.", + "request": { + "$ref": "CreateTaskRequest" + } + }, + "cancelLease": { + "description": "Cancel a pull task's lease.\n\nThe lease holder can use this method to cancel a task's lease\nby setting Task.schedule_time to now. This will make the task\navailable to be leased to the next caller of CloudTasks.PullTasks.", + "request": { + "$ref": "CancelLeaseRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Task" + }, + "parameters": { + "name": { + "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:cancelLease", + "path": "v2beta2/{+name}:cancelLease", + "id": "cloudtasks.projects.locations.queues.tasks.cancelLease" + }, + "run": { + "description": "Forces a task to run now.\n\nThis command is meant to be used for manual debugging. For\nexample, CloudTasks.RunTask can be used to retry a failed\ntask after a fix has been made or to manually force a task to be\ndispatched now.\n\nWhen this method is called, Cloud Tasks will dispatch the task to its\ntarget, even if the queue is Queue.QueueState.PAUSED.\n\nThe dispatched task is returned. That is, the task that is returned\ncontains the Task.task_status after the task is dispatched but\nbefore the task is received by its target.\n\nIf Cloud Tasks receives a successful response from the task's\nhandler, then the task will be deleted; otherwise the task's\nTask.schedule_time will be reset to the time that\nCloudTasks.RunTask was called plus the retry delay specified\nin the queue and task's RetryConfig.\n\nCloudTasks.RunTask returns google.rpc.Code.NOT_FOUND when\nit is called on a task that has already succeeded or permanently\nfailed. google.rpc.Code.FAILED_PRECONDITION is returned when\nCloudTasks.RunTask is called on task that is dispatched or\nalready running.", + "request": { + "$ref": "RunTaskRequest" + }, + "response": { + "$ref": "Task" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", + "location": "path", + "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:run", + "id": "cloudtasks.projects.locations.queues.tasks.run", + "path": "v2beta2/{+name}:run" + }, + "acknowledge": { + "description": "Acknowledges a pull task.\n\nThe lease holder, that is, the entity that received this task in\na PullTasksResponse, must call this method to indicate that\nthe work associated with the task has finished.\n\nThe lease holder must acknowledge a task within the\nPullTasksRequest.lease_duration or the lease will expire and\nthe task will become ready to be returned in a different\nPullTasksResponse. After the task is acknowledged, it will\nnot be returned by a later CloudTasks.PullTasks,\nCloudTasks.GetTask, or CloudTasks.ListTasks.", + "request": { + "$ref": "AcknowledgeTaskRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "location": "path", + "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:acknowledge", + "id": "cloudtasks.projects.locations.queues.tasks.acknowledge", + "path": "v2beta2/{+name}:acknowledge" + }, + "renewLease": { + "response": { + "$ref": "Task" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", + "location": "path", + "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:renewLease", + "id": "cloudtasks.projects.locations.queues.tasks.renewLease", + "path": "v2beta2/{+name}:renewLease", + "request": { + "$ref": "RenewLeaseRequest" + }, + "description": "Renew the current lease of a pull task.\n\nThe lease holder can use this method to extend the lease by a new\nduration, starting from now. The new task lease will be\nreturned in Task.schedule_time." + }, + "get": { + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}", + "id": "cloudtasks.projects.locations.queues.tasks.get", + "path": "v2beta2/{+name}", + "description": "Gets a task.", + "response": { + "$ref": "Task" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "responseView": { + "location": "query", + "enum": [ + "VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", + "type": "string" + }, + "name": { + "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + }, + "parameters": { + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "type": "string", + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "key": { + "location": "query", + "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.", + "type": "string" + } + }, + "version": "v2beta2", + "baseUrl": "https://cloudtasks.googleapis.com/", + "kind": "discovery#restDescription", + "description": "Cloud Tasks enables developers to manage the execution of large numbers of distributed requests. Cloud Tasks is in Alpha.", + "servicePath": "", + "basePath": "", + "id": "cloudtasks:v2beta2", + "documentationLink": "https://cloud.google.com/cloud-tasks/", + "revision": "20170904", + "discoveryVersion": "v1", + "version_module": true, + "schemas": { + "AcknowledgeTaskRequest": { + "description": "Request message for acknowledging a task using\nCloudTasks.AcknowledgeTask.", + "type": "object", + "properties": { + "scheduleTime": { + "format": "google-datetime", + "description": "Required.\n\nThe task's current schedule time, available in the Task.schedule_time\nreturned in PullTasksResponse.tasks or\nCloudTasks.RenewLease. This restriction is to check that\nthe caller is acknowledging the correct task.", + "type": "string" + } + }, + "id": "AcknowledgeTaskRequest" + }, + "ListQueuesResponse": { + "description": "Response message for CloudTasks.ListQueues.", + "type": "object", + "properties": { + "queues": { + "description": "The list of queues.", + "items": { + "$ref": "Queue" + }, + "type": "array" + }, + "nextPageToken": { + "format": "byte", + "description": "A token to retrieve next page of results.\n\nTo return the next page of results, call\nCloudTasks.ListQueues with this value as the\nListQueuesRequest.page_token.\n\nIf the next_page_token is empty, there are no more results.\n\nThe page token is valid for only 2 hours.", + "type": "string" + } + }, + "id": "ListQueuesResponse" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "type": "object", + "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" + } + }, + "id": "TestIamPermissionsRequest" + }, + "Policy": { + "properties": { + "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": { + "format": "byte", + "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.", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" + } + }, + "id": "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object" + }, + "AppEngineTaskTarget": { + "properties": { + "httpMethod": { + "enumDescriptions": [ + "HTTP method unspecified", + "HTTP Post", + "HTTP Get", + "HTTP Head", + "HTTP Put", + "HTTP Delete" + ], + "enum": [ + "HTTP_METHOD_UNSPECIFIED", + "POST", + "GET", + "HEAD", + "PUT", + "DELETE" + ], + "description": "The HTTP method to use for the request. The default is POST.\n\nThe app's request handler for the task's target URL must be able to handle\nHTTP requests with this http_method, otherwise the task attempt will fail\nwith error code 405 \"Method Not Allowed\" because \"the method specified in\nthe Request-Line is not allowed for the resource identified by the\nRequest-URI\". See\n[Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)\nand the documentation for the request handlers in the language your app is\nwritten in e.g.\n[python RequestHandler](/appengine/docs/python/tools/webapp/requesthandlerclass).", + "type": "string" + }, + "payload": { + "format": "byte", + "description": "Payload.\n\nThe payload will be sent as the HTTP message body. A message\nbody, and thus a payload, is allowed only if the HTTP method is\nPOST or PUT. It is an error to set a data payload on a task with\nan incompatible HttpMethod.", + "type": "string" + }, + "relativeUrl": { + "description": "The relative URL.\n\nThe relative URL must begin with \"/\" and must be a valid HTTP relative URL.\nIt can contain a path, query string arguments, and `#` fragments.\nIf the relative URL is empty, then the root path \"/\" will be used.\nNo spaces are allowed, and the maximum length allowed is 2083 characters.", + "type": "string" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "description": "HTTP request headers.\n\nThis map contains the header field names and values.\nHeaders can be set when the\n[task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).\nRepeated headers are not supported but a header value can contain commas.\n\nCloud Tasks sets some headers to default values:\n\n* `User-Agent`: By default, this header is\n `\"AppEngine-Google; (+http://code.google.com/appengine)\"`.\n This header can be modified, but Cloud Tasks will append\n `\"AppEngine-Google; (+http://code.google.com/appengine)\"` to the\n modified `User-Agent`.\n\nIf the task has an AppEngineTaskTarget.payload, Cloud Tasks sets the\nfollowing headers:\n\n* `Content-Type`: By default, the `Content-Type` header is set to\n `\"application/octet-stream\"`. The default can be overridden by explictly\n setting `Content-Type` to a particular media type when the\n [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).\n For example, `Content-Type` can be set to `\"application/json\"`.\n* `Content-Length`: This is computed by Cloud Tasks. This value is\n output only. It cannot be changed.\n\nThe headers below cannot be set or overridden:\n\n* `Host`\n* `X-Google-*`\n* `X-AppEngine-*`\n\nIn addition, some App Engine headers, which contain\ntask-specific information, are also be sent to the task handler; see\n[request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).", + "type": "object" + }, + "appEngineRouting": { + "$ref": "AppEngineRouting", + "description": "Task-level setting for App Engine routing.\n\nIf set, AppEngineQueueConfig.app_engine_routing_override is used for\nall tasks in the queue, no matter what the setting is for the\ntask-level app_engine_routing." + } + }, + "id": "AppEngineTaskTarget", + "description": "App Engine task target.\n\nAn App Engine task is a task that has AppEngineTaskTarget set.\n\nThis proto can only be used for tasks in a queue which has\nQueue.app_engine_queue_config set.\n\nUsing this type of task target requires\n[`appengine.applications.get`](/appengine/docs/admin-api/access-control)\nGoogle IAM permission for the project\nand the following scope:\n\n`https://www.googleapis.com/auth/cloud-platform`\n\nThe task will be delivered to the URL specified by the\nAppEngineQueueConfig and AppEngineTaskTarget in the App Engine app\nwhich belongs to the same project as the queue. For more information, see\n[How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed)\nand how routing is affected by\n[dispatch files](/appengine/docs/python/config/dispatchref).\n\nThe AppEngineRouting used to construct the URL can be set at\nthe queue-level or task-level:\n\n* If set, AppEngineQueueConfig.app_engine_routing_override is used for\n all tasks in the queue, no matter what the setting is for the\n task-level app_engine_routing.\n\n\nThe `url` that the task will be sent to is:\n\n* `url =` AppEngineRouting.host `+` AppEngineTaskTarget.relative_url\n\nThe task will be sent to a task handler by an HTTP\nrequest using the specified AppEngineTaskTarget.http_method (for example\nPOST, HTTP GET, etc). The task attempt has succeeded if the task handler\nreturns an HTTP response code in the range [200 - 299]. Error 503 is\nconsidered an App Engine system error instead of an application error.\nRequests returning error 503 will be retried regardless of retry\nconfiguration and not counted against retry counts.\nAny other response code or a failure to receive a response before the\ndeadline is a failed attempt.", + "type": "object" + }, + "CancelLeaseRequest": { + "description": "Request message for canceling a lease using\nCloudTasks.CancelLease.", + "type": "object", + "properties": { + "scheduleTime": { + "format": "google-datetime", + "description": "Required.\n\nThe task's current schedule time, available in the Task.schedule_time\nreturned in PullTasksResponse.tasks or\nCloudTasks.RenewLease. This restriction is to check that\nthe caller is canceling the correct task.", + "type": "string" + }, + "responseView": { + "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", + "type": "string", + "enumDescriptions": [ + "Unspecified. Defaults to BASIC.", + "The basic view omits fields which can be large or can contain\nsensitive data.\n\nThis view does not include the payload.", + "All information is returned.\n\nPayloads might be desirable to return only when needed, because\nthey can be large and because of the sensitivity of the data\nthat you choose to store in it.\n\nAuthorization for Task.View.FULL requires\n`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)\npermission on the Queue.name resource." + ], + "enum": [ + "VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ] + } + }, + "id": "CancelLeaseRequest" + }, + "AttemptStatus": { + "description": "The status of a task attempt.", + "type": "object", + "properties": { + "responseStatus": { + "description": "Output only.\n\nThe response from the target for this attempt.\n\nIf the task has not been attempted or the task is currently running\nthen the response status is google.rpc.Code.UNKNOWN.", + "$ref": "Status" + }, + "responseTime": { + "format": "google-datetime", + "description": "Output only.\n\nThe time that this attempt response was received.\n\n`response_time` will be truncated to the nearest microsecond.", + "type": "string" + }, + "scheduleTime": { + "format": "google-datetime", + "description": "Output only.\n\nThe time that this attempt was scheduled.\n\n`schedule_time` will be truncated to the nearest microsecond.", + "type": "string" + }, + "dispatchTime": { + "format": "google-datetime", + "description": "Output only.\n\nThe time that this attempt was dispatched.\n\n`dispatch_time` will be truncated to the nearest microsecond.", + "type": "string" + } + }, + "id": "AttemptStatus" + }, + "PurgeQueueRequest": { + "description": "Request message for CloudTasks.PurgeQueue.", + "type": "object", + "properties": {}, + "id": "PurgeQueueRequest" + }, + "PauseQueueRequest": { + "properties": {}, + "id": "PauseQueueRequest", + "description": "Request message for CloudTasks.PauseQueue.", + "type": "object" + }, + "RunTaskRequest": { + "description": "Request message for forcing a task to run now using\nCloudTasks.RunTask.", + "type": "object", + "properties": { + "responseView": { + "enum": [ + "VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", + "type": "string", + "enumDescriptions": [ + "Unspecified. Defaults to BASIC.", + "The basic view omits fields which can be large or can contain\nsensitive data.\n\nThis view does not include the payload.", + "All information is returned.\n\nPayloads might be desirable to return only when needed, because\nthey can be large and because of the sensitivity of the data\nthat you choose to store in it.\n\nAuthorization for Task.View.FULL requires\n`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)\npermission on the Queue.name resource." + ] + } + }, + "id": "RunTaskRequest" + }, + "PullTasksResponse": { + "properties": { + "tasks": { + "description": "The leased tasks.", + "items": { + "$ref": "Task" + }, + "type": "array" + } + }, + "id": "PullTasksResponse", + "description": "Response message for pulling tasks using CloudTasks.PullTasks.", + "type": "object" + }, + "Task": { + "description": "A unit of scheduled work.", + "type": "object", + "properties": { + "appEngineHttpRequest": { + "description": "App Engine HTTP request that is sent to the task's target. Can be set\nonly if Queue.app_engine_http_target is set.\n\nAn App Engine task is a task that has AppEngineHttpRequest set.", + "$ref": "AppEngineHttpRequest" + }, + "pullTaskTarget": { + "$ref": "PullTaskTarget", + "description": "\nPull task target. Can be set only if Queue.pull_queue_config is set." + }, + "view": { + "enumDescriptions": [ + "Unspecified. Defaults to BASIC.", + "The basic view omits fields which can be large or can contain\nsensitive data.\n\nThis view does not include the payload.", + "All information is returned.\n\nPayloads might be desirable to return only when needed, because\nthey can be large and because of the sensitivity of the data\nthat you choose to store in it.\n\nAuthorization for Task.View.FULL requires\n`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)\npermission on the Queue.name resource." + ], + "enum": [ + "VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "description": "Output only.\n\nThe view specifies which subset of the Task has been\nreturned.", + "type": "string" + }, + "scheduleTime": { + "format": "google-datetime", + "description": "The time when the task is scheduled to be attempted.\n\nFor pull queues, this is the time when the task is available to\nbe leased; if a task is currently leased, this is the time when\nthe current lease expires, that is, the time that the task was\nleased plus the PullTasksRequest.lease_duration.\n\nFor App Engine queues, this is when the task will be attempted or retried.\n\n`schedule_time` will be truncated to the nearest microsecond.", + "type": "string" + }, + "pullMessage": { + "$ref": "PullMessage", + "description": "Pull message contains data that should be used by the caller of\nCloudTasks.PullTasks to process the task. Can be set only if\nQueue.pull_target is set.\n\nA pull task is a task that has PullMessage set." + }, + "createTime": { + "format": "google-datetime", + "description": "Output only.\n\nThe time that the task was created.\n\n`create_time` will be truncated to the nearest second.", + "type": "string" + }, + "name": { + "description": "The task name.\n\nThe task name must have the following format:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`\n\n* `PROJECT_ID` can contain uppercase and lowercase letters,\n numbers, hyphens, colons, and periods; that is, it must match\n the regular expression: `[a-zA-Z\\\\d-:\\\\.]+`.\n* `QUEUE_ID` can contain uppercase and lowercase letters,\n numbers, and hyphens; that is, it must match the regular\n expression: `[a-zA-Z\\\\d-]+`. The maximum length is 100\n characters.\n* `TASK_ID` contain uppercase and lowercase letters, numbers,\n underscores, and hyphens; that is, it must match the regular\n expression: `[a-zA-Z\\\\d_-]+`. The maximum length is 500\n characters.\n\nOptionally caller-specified in CreateTaskRequest.", + "type": "string" + }, + "appEngineTaskTarget": { + "$ref": "AppEngineTaskTarget", + "description": "\nApp Engine task target. Can be set only if\nQueue.app_engine_queue_config is set." + }, + "taskStatus": { + "description": "Output only.\n\nTask status.", + "$ref": "TaskStatus" + } + }, + "id": "Task" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + } + }, + "id": "Status" + }, + "PullMessage": { + "description": "The pull message contains data that can be used by the caller of\nCloudTasks.PullTasks to process the task.\n\nThis proto can only be used for tasks in a queue which has\nQueue.pull_target set.", + "type": "object", + "properties": { + "payload": { + "format": "byte", + "description": "A data payload consumed by the task worker to execute the task.", + "type": "string" + }, + "tag": { + "format": "byte", + "description": "A meta-data tag for this task.\n\nThis value is used by CloudTasks.PullTasks calls when\nPullTasksRequest.filter is `tag=\u003ctag\u003e`.\n\nThe tag must be less than 500 bytes.", + "type": "string" + } + }, + "id": "PullMessage" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "type": "object", + "properties": { + "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` or `joe@example.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`.\nRequired", + "type": "string" + } + }, + "id": "Binding" + }, + "RenewLeaseRequest": { + "description": "Request message for renewing a lease using CloudTasks.RenewLease.", + "type": "object", + "properties": { + "scheduleTime": { + "format": "google-datetime", + "description": "Required.\n\nThe task's current schedule time, available in the Task.schedule_time\nreturned in PullTasksResponse.tasks or\nCloudTasks.RenewLease. This restriction is to check that\nthe caller is renewing the correct task.", + "type": "string" + }, + "newLeaseDuration": { + "format": "google-duration", + "description": "Required.\n\nThe desired new lease duration, starting from now.\n\n\nThe maximum lease duration is 1 week.\n`new_lease_duration` will be truncated to the nearest second.", + "type": "string" + }, + "responseView": { + "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", + "type": "string", + "enumDescriptions": [ + "Unspecified. Defaults to BASIC.", + "The basic view omits fields which can be large or can contain\nsensitive data.\n\nThis view does not include the payload.", + "All information is returned.\n\nPayloads might be desirable to return only when needed, because\nthey can be large and because of the sensitivity of the data\nthat you choose to store in it.\n\nAuthorization for Task.View.FULL requires\n`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)\npermission on the Queue.name resource." + ], + "enum": [ + "VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ] + } + }, + "id": "RenewLeaseRequest" + }, + "TaskStatus": { + "properties": { + "firstAttemptStatus": { + "$ref": "AttemptStatus", + "description": "Output only.\n\nThe status of the task's first attempt.\n\nOnly AttemptStatus.dispatch_time will be set.\nThe other AttemptStatus information is not retained by Cloud Tasks.\n\nThis field is not calculated for\n[pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget)." + }, + "attemptResponseCount": { + "format": "int64", + "description": "Output only.\n\nThe number of attempts which have received a response.\n\nThis field is not calculated for\n[pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).", + "type": "string" + }, + "lastAttemptStatus": { + "description": "Output only.\n\nThe status of the task's last attempt.\n\nThis field is not calculated for\n[pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).", + "$ref": "AttemptStatus" + }, + "attemptDispatchCount": { + "format": "int64", + "description": "Output only.\n\nThe number of attempts dispatched. This count includes tasks which have\nbeen dispatched but haven't received a response.", + "type": "string" + } + }, + "id": "TaskStatus", + "description": "Status of the task.", + "type": "object" + }, + "AppEngineHttpRequest": { + "description": "App Engine HTTP request.\n\nThe message defines the HTTP request that is sent to an App Engine app when\nthe task is dispatched.\n\nThis proto can only be used for tasks in a queue which has\nQueue.app_engine_http_target set.\n\nUsing this type of target requires\n[`appengine.applications.get`](/appengine/docs/admin-api/access-control)\nGoogle IAM permission for the project\nand the following scope:\n\n`https://www.googleapis.com/auth/cloud-platform`\n\nThe task will be delivered to the App Engine app which belongs to the same\nproject as the queue. For more information, see\n[How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed)\nand how routing is affected by\n[dispatch files](/appengine/docs/python/config/dispatchref).\n\nThe AppEngineRouting used to construct the URL that the task is\ndelivered to can be set at the queue-level or task-level:\n\n* If set, AppEngineHttpTarget.app_engine_routing_override is used for\n all tasks in the queue, no matter what the setting is for the\n task-level app_engine_routing.\n\n\nThe `url` that the task will be sent to is:\n\n* `url =` AppEngineRouting.host `+` AppEngineHttpRequest.relative_url\n\nThe task will be sent to a task handler by an HTTP\nrequest using the specified AppEngineHttpRequest.http_method (for example\nPOST, HTTP GET, etc). The task attempt has succeeded if the task handler\nreturns an HTTP response code in the range [200 - 299]. Error 503 is\nconsidered an App Engine system error instead of an application error.\nRequests returning error 503 will be retried regardless of retry\nconfiguration and not counted against retry counts.\nAny other response code or a failure to receive a response before the\ndeadline is a failed attempt.", + "type": "object", + "properties": { + "httpMethod": { + "enumDescriptions": [ + "HTTP method unspecified", + "HTTP Post", + "HTTP Get", + "HTTP Head", + "HTTP Put", + "HTTP Delete" + ], + "enum": [ + "HTTP_METHOD_UNSPECIFIED", + "POST", + "GET", + "HEAD", + "PUT", + "DELETE" + ], + "description": "The HTTP method to use for the request. The default is POST.\n\nThe app's request handler for the task's target URL must be able to handle\nHTTP requests with this http_method, otherwise the task attempt will fail\nwith error code 405 \"Method Not Allowed\" because \"the method specified in\nthe Request-Line is not allowed for the resource identified by the\nRequest-URI\". See\n[Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)\nand the documentation for the request handlers in the language your app is\nwritten in e.g.\n[python RequestHandler](/appengine/docs/python/tools/webapp/requesthandlerclass).", + "type": "string" + }, + "payload": { + "format": "byte", + "description": "Payload.\n\nThe payload will be sent as the HTTP message body. A message\nbody, and thus a payload, is allowed only if the HTTP method is\nPOST or PUT. It is an error to set a data payload on a task with\nan incompatible HttpMethod.", + "type": "string" + }, + "relativeUrl": { + "description": "The relative URL.\n\nThe relative URL must begin with \"/\" and must be a valid HTTP relative URL.\nIt can contain a path, query string arguments, and `#` fragments.\nIf the relative URL is empty, then the root path \"/\" will be used.\nNo spaces are allowed, and the maximum length allowed is 2083 characters.", + "type": "string" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "description": "HTTP request headers.\n\nThis map contains the header field names and values.\nHeaders can be set when the\n[task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).\nRepeated headers are not supported but a header value can contain commas.\n\nCloud Tasks sets some headers to default values:\n\n* `User-Agent`: By default, this header is\n `\"AppEngine-Google; (+http://code.google.com/appengine)\"`.\n This header can be modified, but Cloud Tasks will append\n `\"AppEngine-Google; (+http://code.google.com/appengine)\"` to the\n modified `User-Agent`.\n\nIf the task has an AppEngineHttpRequest.payload, Cloud Tasks sets the\nfollowing headers:\n\n* `Content-Type`: By default, the `Content-Type` header is set to\n `\"application/octet-stream\"`. The default can be overridden by explictly\n setting `Content-Type` to a particular media type when the\n [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).\n For example, `Content-Type` can be set to `\"application/json\"`.\n* `Content-Length`: This is computed by Cloud Tasks. This value is\n output only. It cannot be changed.\n\nThe headers below cannot be set or overridden:\n\n* `Host`\n* `X-Google-*`\n* `X-AppEngine-*`\n\nIn addition, some App Engine headers, which contain\ntask-specific information, are also be sent to the task handler; see\n[request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).", + "type": "object" + }, + "appEngineRouting": { + "$ref": "AppEngineRouting", + "description": "Task-level setting for App Engine routing.\n\nIf set, AppEngineHttpTarget.app_engine_routing_override is used for\nall tasks in the queue, no matter what the setting is for the\ntask-level app_engine_routing." + } + }, + "id": "AppEngineHttpRequest" + }, + "PullTaskTarget": { + "properties": { + "payload": { + "format": "byte", + "description": "A data payload consumed by the task worker to execute the task.", + "type": "string" + }, + "tag": { + "format": "byte", + "description": "A meta-data tag for this task.\n\nThis value is used by CloudTasks.PullTasks calls when\nPullTasksRequest.filter is `tag=\u003ctag\u003e`.\n\nThe tag must be less than 500 bytes.", + "type": "string" + } + }, + "id": "PullTaskTarget", + "description": "Pull task target.\n\nA pull task is a task that has PullTaskTarget set.\n\nThis proto can only be used for tasks in a queue which has\nQueue.pull_queue_config set.", + "type": "object" + }, + "AppEngineQueueConfig": { + "description": "App Engine queue config.\n\nAn App Engine queue is a queue that has AppEngineQueueConfig set.\n\nThe task will be delivered to the App Engine application URL\nspecified by its AppEngineQueueConfig and AppEngineTaskTarget.\nThe documentation for AppEngineTaskTarget explains how the\ntask's host URL is constructed.\n\nUsing this type of queue configuration requires\n[`appengine.applications.get`](/appengine/docs/admin-api/access-control)\nGoogle IAM permission for the project\nand the following scope:\n\n`https://www.googleapis.com/auth/cloud-platform`", + "type": "object", + "properties": { + "appEngineRoutingOverride": { + "description": "Overrides for the\ntask-level app_engine_routing.\n\nIf set, AppEngineQueueConfig.app_engine_routing_override is used for\nall tasks in the queue, no matter what the setting is for the\ntask-level app_engine_routing.", + "$ref": "AppEngineRouting" + } + }, + "id": "AppEngineQueueConfig" + }, + "GetIamPolicyRequest": { + "description": "Request message for `GetIamPolicy` method.", + "type": "object", + "properties": {}, + "id": "GetIamPolicyRequest" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestIamPermissionsResponse" + }, + "RetryConfig": { + "description": "Retry config.\n\nThese settings determine retry behavior.\n\nIf a task does not complete successfully, meaning that an\nacknowledgement is not received from the handler before the\n[deadline](/appengine/docs/python/taskqueue/push/#the_task_deadline),\nthen it will be retried with exponential backoff according to the\nsettings in RetryConfig.", + "type": "object", + "properties": { + "taskAgeLimit": { + "format": "google-duration", + "description": "If positive, task_age_limit specifies the time limit for retrying a failed\ntask, measured from when the task was first run. If specified with\nRetryConfig.max_attempts, the task will be retried until both\nlimits are reached.\n\nIf zero, then the task age is unlimited. This field is zero by default.\n\n`task_age_limit` will be truncated to the nearest second.", + "type": "string" + }, + "unlimitedAttempts": { + "description": "If true, then the number of attempts is unlimited.", + "type": "boolean" + }, + "minBackoff": { + "format": "google-duration", + "description": "The minimum amount of time to wait before retrying a task after\nit fails.\n\n* For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget),\n this field is 0.1 seconds by default.\n* For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this\n field is output only and always 0.\n\n`min_backoff` will be truncated to the nearest second.", + "type": "string" + }, + "maxBackoff": { + "format": "google-duration", + "description": "The maximum amount of time to wait before retrying a task after\nit fails. The default is 1 hour.\n\n* For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget),\n this field is 1 hour by default.\n* For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this field\n is output only and always 0.\n\n`max_backoff` will be truncated to the nearest second.", + "type": "string" + }, + "maxDoublings": { + "format": "int32", + "description": "The maximum number of times that the interval between failed task\nretries will be doubled before the increase becomes constant. The\nconstant is: 2**(max_doublings - 1) *\nRetryConfig.min_backoff.\n\n* For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget),\n this field is 16 by default.\n* For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this field\n is output only and always 0.", + "type": "integer" + }, + "maxAttempts": { + "format": "int32", + "description": "The maximum number of attempts for a task.\n\nCloud Tasks will attempt the task `max_attempts` times (that\nis, if the first attempt fails, then there will be\n`max_attempts - 1` retries). Must be \u003e 0.", + "type": "integer" + } + }, + "id": "RetryConfig" + }, + "PullTarget": { + "description": "Pull target.", + "type": "object", + "properties": {}, + "id": "PullTarget" + }, + "ThrottleConfig": { + "description": "Throttle config.\n\nThese settings determine the throttling behavior.", + "type": "object", + "properties": { + "maxOutstandingTasks": { + "format": "int32", + "description": "The maximum number of outstanding tasks that Cloud Tasks allows\nto be dispatched for this queue. After this threshold has been\nreached, Cloud Tasks stops dispatching tasks until the number of\noutstanding requests decreases.\n\nThe maximum allowed value is 5,000.\n\n* For App Engine queues, this field is 10 by default.\n* For pull queues, this field is output only and always -1, which\n indicates no limit.\n\nThis field has the same meaning as\n[max_concurrent_requests in queue.yaml](/appengine/docs/standard/python/config/queueref#max_concurrent_requests).", + "type": "integer" + }, + "maxTasksDispatchedPerSecond": { + "format": "double", + "description": "The maximum rate at which tasks are dispatched from this\nqueue.\n\nThe maximum allowed value is 500.\n\n* For App Engine queues, this field is 1 by default.\n* For pull queues, this field is output only and always 10,000.\n\nThis field has the same meaning as\n[rate in queue.yaml](/appengine/docs/standard/python/config/queueref#rate).", + "type": "number" + }, + "maxBurstSize": { + "format": "double", + "description": "Output only.\n\nThe max burst size limits how fast the queue is processed when\nmany tasks are in the queue and the rate is high. This field\nallows the queue to have a high rate so processing starts shortly\nafter a task is enqueued, but still limits resource usage when\nmany tasks are enqueued in a short period of time.\n\n* For App Engine queues, if\n ThrottleConfig.max_tasks_dispatched_per_second is 1, this\n field is 10; otherwise this field is\n ThrottleConfig.max_tasks_dispatched_per_second / 5.\n* For pull queues, this field is output only and always 10,000.\n\nNote: For App Engine queues that were created through\n`queue.yaml/xml`, `max_burst_size` might not have the same\nsettings as specified above; CloudTasks.UpdateQueue can be\nused to set `max_burst_size` only to the values specified above.\n\nThis field has the same meaning as\n[bucket_size in queue.yaml](/appengine/docs/standard/python/config/queueref#bucket_size).", + "type": "number" + } + }, + "id": "ThrottleConfig" + }, + "ResumeQueueRequest": { + "description": "Request message for CloudTasks.ResumeQueue.", + "type": "object", + "properties": {}, + "id": "ResumeQueueRequest" + }, + "CreateTaskRequest": { + "description": "Request message for CloudTasks.CreateTask.", + "type": "object", + "properties": { + "responseView": { + "enumDescriptions": [ + "Unspecified. Defaults to BASIC.", + "The basic view omits fields which can be large or can contain\nsensitive data.\n\nThis view does not include the payload.", + "All information is returned.\n\nPayloads might be desirable to return only when needed, because\nthey can be large and because of the sensitivity of the data\nthat you choose to store in it.\n\nAuthorization for Task.View.FULL requires\n`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)\npermission on the Queue.name resource." + ], + "enum": [ + "VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", + "type": "string" + }, + "task": { + "description": "Required.\n\nThe task to add.\n\nTask names have the following format:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.\nThe user can optionally specify a name for the task in\nTask.name. If a name is not specified then the system will\ngenerate a random unique task id, which will be returned in the\nresponse's Task.name.\n\nExplicitly specifying a Task.name enables task\nde-duplication. If a task's name is identical to the name of an\nexisting task or a task that was deleted or completed within the\nlast ~10 days then the call to CloudTasks.CreateTask will\nfail with google.rpc.Code.ALREADY_EXISTS. Because there is an\nextra lookup cost to identify duplicate task names, these\nCloudTasks.CreateTask calls have significantly increased\nlatency. Using hashed strings for the task id or for the prefix\nof the task id is recommended. Choosing task ids that are\nsequential or have sequential prefixes, for example using a\ntimestamp, causes an increase in latency and error rates in all\ntask commands. The infrastructure relies on an approximately\nuniform distribution of task ids to store and serve tasks\nefficiently.\n\nIf Task.schedule_time is not set or is in the past then Cloud\nTasks will set it to the current time.", + "$ref": "Task" + } + }, + "id": "CreateTaskRequest" + }, + "ListTasksResponse": { + "properties": { + "nextPageToken": { + "format": "byte", + "description": "A token to retrieve next page of results.\n\nTo return the next page of results, call\nCloudTasks.ListTasks with this value as the\nListTasksRequest.page_token.\n\nIf the next_page_token is empty, there are no more results.", + "type": "string" + }, + "tasks": { + "description": "The list of tasks.", + "items": { + "$ref": "Task" + }, + "type": "array" + } + }, + "id": "ListTasksResponse", + "description": "Response message for listing tasks using CloudTasks.ListTasks.", + "type": "object" + }, + "PullQueueConfig": { + "description": "Pull queue config.\n\nA pull queue is a queue that has PullQueueConfig set.", + "type": "object", + "properties": {}, + "id": "PullQueueConfig" + }, + "Queue": { + "description": "A queue is a container of related tasks. Queues are configured to manage\nhow those tasks are dispatched. Configurable properties include rate limits,\nretry options, target types, and others.", + "type": "object", + "properties": { + "queueState": { + "enumDescriptions": [ + "Unspecified state.", + "The queue is running. Tasks can be dispatched.", + "Tasks are paused by the user. If the queue is paused then Cloud\nTasks will stop delivering tasks from it, but more tasks can\nstill be added to it by the user. When a pull queue is paused,\nall CloudTasks.PullTasks calls will return a\n`FAILED_PRECONDITION` error.", + "Disabled indicates that queue has been removed from queue.yaml.\n\nWhen you remove a queue from\n[queue.yaml](/appengine/docs/python/config/queueref),\nit is marked as `DISABLED`. You cannot directly disable a queue.\n\nWhen a queue is disabled, tasks can still be added to a queue\nbut the tasks are not dispatched and CloudTasks.PullTasks calls\nreturn a `FAILED_PRECONDITION` error.\n\nTo permanently delete this queue and all of its tasks, call\nCloudTasks.DeleteQueue." + ], + "enum": [ + "QUEUE_STATE_UNSPECIFIED", + "RUNNING", + "PAUSED", + "DISABLED" + ], + "description": "Output only.\n\nThe state of the queue.\n\n`queue_state` can only be changed by called\nCloudTasks.PauseQueue, CloudTasks.ResumeQueue, or uploading\n[queue.yaml](/appengine/docs/python/config/queueref).\nCloudTasks.UpdateQueue cannot be used to change `queue_state`.", + "type": "string" + }, + "retryConfig": { + "description": "Settings that determine the retry behavior.\n\n* For tasks created using Cloud Tasks: the queue-level retry settings\n apply to all tasks in the queue that were created using Cloud Tasks.\n Retry settings cannot be set on individual tasks.\n* For tasks created using the App Engine SDK: the queue-level retry\n settings apply to all tasks in the queue which do not have retry settings\n explicitly set on the task and were created by the App Engine SDK. See\n [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).", + "$ref": "RetryConfig" + }, + "name": { + "description": "The queue name.\n\nThe queue name must have the following format:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`\n\n* `PROJECT_ID` can contain uppercase and lowercase letters,\n numbers, hyphens, colons, and periods; that is, it must match\n the regular expression: `[a-zA-Z\\\\d-:\\\\.]+`.\n* `QUEUE_ID` can contain uppercase and lowercase letters,\n numbers, and hyphens; that is, it must match the regular\n expression: `[a-zA-Z\\\\d-]+`. The maximum length is 100\n characters.\n\nCaller-specified and required in CreateQueueRequest, after which\nit becomes output only.", + "type": "string" + }, + "throttleConfig": { + "$ref": "ThrottleConfig", + "description": "Config for throttling task dispatches." + }, + "appEngineQueueConfig": { + "$ref": "AppEngineQueueConfig", + "description": "\nApp Engine queue config." + }, + "pullTarget": { + "description": "Pull target.\n\nA pull queue is a queue that has a PullTarget.", + "$ref": "PullTarget" + }, + "pullQueueConfig": { + "$ref": "PullQueueConfig", + "description": "\nPull queue config." + }, + "appEngineHttpTarget": { + "$ref": "AppEngineHttpTarget", + "description": "App Engine HTTP target.\n\nAn App Engine queue is a queue that has an AppEngineHttpTarget." + }, + "purgeTime": { + "format": "google-datetime", + "description": "Output only.\n\nThe last time this queue was purged. All tasks that were\ncreated before this time were purged.\n\nA queue can be purged using CloudTasks.PurgeQueue, the\n[App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).\n\nPurge time will be truncated to the nearest microsecond. Purge\ntime will be zero if the queue has never been purged.", + "type": "string" + } + }, + "id": "Queue" + }, + "PullTasksRequest": { + "description": "Request message for pulling tasks using CloudTasks.PullTasks.", + "type": "object", + "properties": { + "filter": { + "description": "`filter` can be used to specify a subset of tasks to lease.\n\nWhen `filter` is set to `tag=\u003cmy-tag\u003e` then the\nPullTasksResponse will contain only tasks whose\nPullTaskTarget.tag is equal to `\u003cmy-tag\u003e`. `\u003cmy-tag\u003e` can be\na bytes encoded as a string and must be less than 500 bytes.\nIf `\u003cmy-tag\u003e` includes whitespace or special characters (characters which\naren't letters, numbers, or underscores), then it must be double-quoted.\nDouble quotes and backslashes in quoted strings must be escaped by\npreceding it with a backslash (`\\`).\n\nWhen `filter` is set to `tag=oldest_tag()`, only tasks which have the same\ntag as the task with the oldest schedule_time will be returned.\n\nGrammar Syntax:\n\n* `filter = \"tag=\" comparable`\n\n* `comparable = tag | function`\n\n* `tag = string | bytes`\n\n* `function = \"oldest_tag()\"`\n\n\n\nThe `oldest_tag()` function returns tasks which have the same tag as the\noldest task (ordered by schedule time).", + "type": "string" + }, + "leaseDuration": { + "format": "google-duration", + "description": "The duration of the lease.\n\nEach task returned in the PullTasksResponse will have its\nTask.schedule_time set to the current time plus the\n`lease_duration`. A task that has been returned in a\nPullTasksResponse is leased -- that task will not be\nreturned in a different PullTasksResponse before the\nTask.schedule_time.\n\nAfter the lease holder has successfully finished the work\nassociated with the task, the lease holder must call\nCloudTasks.AcknowledgeTask. If the task is not acknowledged\nvia CloudTasks.AcknowledgeTask before the\nTask.schedule_time then it will be returned in a later\nPullTasksResponse so that another lease holder can process\nit.\n\nThe maximum lease duration is 1 week.\n`lease_duration` will be truncated to the nearest second.", + "type": "string" + }, + "maxTasks": { + "format": "int32", + "description": "The maximum number of tasks to lease. The maximum that can be\nrequested is 1000.", + "type": "integer" + }, + "responseView": { + "enumDescriptions": [ + "Unspecified. Defaults to BASIC.", + "The basic view omits fields which can be large or can contain\nsensitive data.\n\nThis view does not include the payload.", + "All information is returned.\n\nPayloads might be desirable to return only when needed, because\nthey can be large and because of the sensitivity of the data\nthat you choose to store in it.\n\nAuthorization for Task.View.FULL requires\n`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)\npermission on the Queue.name resource." + ], + "enum": [ + "VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", + "type": "string" + } + }, + "id": "PullTasksRequest" + }, + "SetIamPolicyRequest": { + "properties": { + "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.", + "$ref": "Policy" + } + }, + "id": "SetIamPolicyRequest", + "description": "Request message for `SetIamPolicy` method.", + "type": "object" + }, + "AppEngineRouting": { + "description": "App Engine Routing.\n\nFor more information about services, versions, and instances see\n[An Overview of App Engine](/appengine/docs/python/an-overview-of-app-engine),\n[Microservices Architecture on Google App Engine](/appengine/docs/python/microservices-on-app-engine),\n[App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed),\nand [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed).", + "type": "object", + "properties": { + "service": { + "description": "App service.\n\nBy default, the task is sent to the service which is the default\nservice when the task is attempted (\"default\").\n\nFor some queues or tasks which were created using the App Engine Task Queue\nAPI, AppEngineRouting.host is not parsable into\nAppEngineRouting.service, AppEngineRouting.version, and\nAppEngineRouting.instance. For example, some tasks which were created\nusing the App Engine SDK use a custom domain name; custom domains are not\nparsed by Cloud Tasks. If AppEngineRouting.host is not parsable, then\nAppEngineRouting.service, AppEngineRouting.version, and\nAppEngineRouting.instance are the empty string.", + "type": "string" + }, + "instance": { + "description": "App instance.\n\nBy default, the task is sent to an instance which is available when\nthe task is attempted.\n\nRequests can only be sent to a specific instance if\n[manual scaling is used in App Engine Standard](/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).\nApp Engine Flex does not support instances. For more information, see\n[App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed)\nand [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed).", + "type": "string" + }, + "version": { + "description": "App version.\n\nBy default, the task is sent to the version which is the default\nversion when the task is attempted (\"default\").\n\nFor some queues or tasks which were created using the App Engine Task Queue\nAPI, AppEngineRouting.host is not parsable into\nAppEngineRouting.service, AppEngineRouting.version, and\nAppEngineRouting.instance. For example, some tasks which were created\nusing the App Engine SDK use a custom domain name; custom domains are not\nparsed by Cloud Tasks. If AppEngineRouting.host is not parsable, then\nAppEngineRouting.service, AppEngineRouting.version, and\nAppEngineRouting.instance are the empty string.", + "type": "string" + }, + "host": { + "description": "Output only.\n\nThe host that the task is sent to. For more information, see\n[How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed).\n\nThe host is constructed as:\n\n\n* `host = [application_domain_name]`\u003c/br\u003e\n `| [service] + '.' + [application_domain_name]`\u003c/br\u003e\n `| [version] + '.' + [application_domain_name]`\u003c/br\u003e\n `| [version_dot_service]+ '.' + [application_domain_name]`\u003c/br\u003e\n `| [instance] + '.' + [application_domain_name]`\u003c/br\u003e\n `| [instance_dot_service] + '.' + [application_domain_name]`\u003c/br\u003e\n `| [instance_dot_version] + '.' + [application_domain_name]`\u003c/br\u003e\n `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`\n\n* `application_domain_name` = The domain name of the app, for\n example \u003capp-id\u003e.appspot.com, which is associated with the\n queue's project ID. Some tasks which were created using the App Engine\n SDK use a custom domain name.\n\n* `service =` AppEngineRouting.service\n\n* `version =` AppEngineRouting.version\n\n* `version_dot_service =`\n AppEngineRouting.version `+ '.' +` AppEngineRouting.service\n\n* `instance =` AppEngineRouting.instance\n\n* `instance_dot_service =`\n AppEngineRouting.instance `+ '.' +` AppEngineRouting.service\n\n* `instance_dot_version =`\n AppEngineRouting.instance `+ '.' +` AppEngineRouting.version\n\n* `instance_dot_version_dot_service =`\n AppEngineRouting.instance `+ '.' +`\n AppEngineRouting.version `+ '.' +` AppEngineRouting.service\n\nIf AppEngineRouting.service is empty, then the task will be sent\nto the service which is the default service when the task is attempted.\n\nIf AppEngineRouting.version is empty, then the task will be sent\nto the version which is the default version when the task is attempted.\n\nIf AppEngineRouting.instance is empty, then the task will be sent\nto an instance which is available when the task is attempted.\n\nWhen AppEngineRouting.service is \"default\",\nAppEngineRouting.version is \"default\", and\nAppEngineRouting.instance is empty, AppEngineRouting.host is\nshortened to just the `application_domain_name`.\n\nIf AppEngineRouting.service, AppEngineRouting.version, or\nAppEngineRouting.instance is invalid, then the task will be sent\nto the default version of the default service when the task is attempted.", + "type": "string" + } + }, + "id": "AppEngineRouting" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "AppEngineHttpTarget": { + "properties": { + "appEngineRoutingOverride": { + "description": "Overrides for the\ntask-level app_engine_routing.\n\nIf set, AppEngineHttpTarget.app_engine_routing_override is used for\nall tasks in the queue, no matter what the setting is for the\ntask-level app_engine_routing.", + "$ref": "AppEngineRouting" + } + }, + "id": "AppEngineHttpTarget", + "description": "App Engine HTTP target.\n\nThe task will be delivered to the App Engine application hostname\nspecified by its AppEngineHttpTarget and AppEngineHttpRequest.\nThe documentation for AppEngineHttpRequest explains how the\ntask's host URL is constructed.\n\nUsing this type of queue configuration requires\n[`appengine.applications.get`](/appengine/docs/admin-api/access-control)\nGoogle IAM permission for the project\nand the following scope:\n\n`https://www.googleapis.com/auth/cloud-platform`", + "type": "object" + } + }, + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "protocol": "rest" +} diff --git a/vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-gen.go b/vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-gen.go new file mode 100644 index 000000000..8bbe0e822 --- /dev/null +++ b/vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-gen.go @@ -0,0 +1,5623 @@ +// Package cloudtasks provides access to the Cloud Tasks API. +// +// See https://cloud.google.com/cloud-tasks/ +// +// Usage example: +// +// import "google.golang.org/api/cloudtasks/v2beta2" +// ... +// cloudtasksService, err := cloudtasks.New(oauthHttpClient) +package cloudtasks // import "google.golang.org/api/cloudtasks/v2beta2" + +import ( + "bytes" + "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" +) + +// 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 = "cloudtasks:v2beta2" +const apiName = "cloudtasks" +const apiVersion = "v2beta2" +const basePath = "https://cloudtasks.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" +) + +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Queues = NewProjectsLocationsQueuesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Queues *ProjectsLocationsQueuesService +} + +func NewProjectsLocationsQueuesService(s *Service) *ProjectsLocationsQueuesService { + rs := &ProjectsLocationsQueuesService{s: s} + rs.Tasks = NewProjectsLocationsQueuesTasksService(s) + return rs +} + +type ProjectsLocationsQueuesService struct { + s *Service + + Tasks *ProjectsLocationsQueuesTasksService +} + +func NewProjectsLocationsQueuesTasksService(s *Service) *ProjectsLocationsQueuesTasksService { + rs := &ProjectsLocationsQueuesTasksService{s: s} + return rs +} + +type ProjectsLocationsQueuesTasksService struct { + s *Service +} + +// AcknowledgeTaskRequest: Request message for acknowledging a task +// using +// CloudTasks.AcknowledgeTask. +type AcknowledgeTaskRequest struct { + // ScheduleTime: Required. + // + // The task's current schedule time, available in the + // Task.schedule_time + // returned in PullTasksResponse.tasks or + // CloudTasks.RenewLease. This restriction is to check that + // the caller is acknowledging the correct task. + ScheduleTime string `json:"scheduleTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ScheduleTime") 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. "ScheduleTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AcknowledgeTaskRequest) MarshalJSON() ([]byte, error) { + type noMethod AcknowledgeTaskRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AppEngineHttpRequest: App Engine HTTP request. +// +// The message defines the HTTP request that is sent to an App Engine +// app when +// the task is dispatched. +// +// This proto can only be used for tasks in a queue which +// has +// Queue.app_engine_http_target set. +// +// Using this type of target +// requires +// [`appengine.applications.get`](/appengine/docs/admin-api/acce +// ss-control) +// Google IAM permission for the project +// and the following +// scope: +// +// `https://www.googleapis.com/auth/cloud-platform` +// +// The task will be delivered to the App Engine app which belongs to the +// same +// project as the queue. For more information, see +// [How Requests are +// Routed](/appengine/docs/standard/python/how-requests-are-routed) +// and how routing is affected by +// [dispatch files](/appengine/docs/python/config/dispatchref). +// +// The AppEngineRouting used to construct the URL that the task +// is +// delivered to can be set at the queue-level or task-level: +// +// * If set, AppEngineHttpTarget.app_engine_routing_override is used +// for +// all tasks in the queue, no matter what the setting is for the +// task-level app_engine_routing. +// +// +// The `url` that the task will be sent to is: +// +// * `url =` AppEngineRouting.host `+` +// AppEngineHttpRequest.relative_url +// +// The task will be sent to a task handler by an HTTP +// request using the specified AppEngineHttpRequest.http_method (for +// example +// POST, HTTP GET, etc). The task attempt has succeeded if the task +// handler +// returns an HTTP response code in the range [200 - 299]. Error 503 +// is +// considered an App Engine system error instead of an application +// error. +// Requests returning error 503 will be retried regardless of +// retry +// configuration and not counted against retry counts. +// Any other response code or a failure to receive a response before +// the +// deadline is a failed attempt. +type AppEngineHttpRequest struct { + // AppEngineRouting: Task-level setting for App Engine routing. + // + // If set, AppEngineHttpTarget.app_engine_routing_override is used + // for + // all tasks in the queue, no matter what the setting is for + // the + // task-level app_engine_routing. + AppEngineRouting *AppEngineRouting `json:"appEngineRouting,omitempty"` + + // Headers: HTTP request headers. + // + // This map contains the header field names and values. + // Headers can be set when the + // [task is + // created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask). + // Repeated headers are not supported but a header value can contain + // commas. + // + // Cloud Tasks sets some headers to default values: + // + // * `User-Agent`: By default, this header is + // "AppEngine-Google; (+http://code.google.com/appengine)". + // This header can be modified, but Cloud Tasks will append + // "AppEngine-Google; (+http://code.google.com/appengine)" to the + // modified `User-Agent`. + // + // If the task has an AppEngineHttpRequest.payload, Cloud Tasks sets + // the + // following headers: + // + // * `Content-Type`: By default, the `Content-Type` header is set to + // "application/octet-stream". The default can be overridden by + // explictly + // setting `Content-Type` to a particular media type when the + // [task is + // created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask). + // For example, `Content-Type` can be set to "application/json". + // * `Content-Length`: This is computed by Cloud Tasks. This value is + // output only. It cannot be changed. + // + // The headers below cannot be set or overridden: + // + // * `Host` + // * `X-Google-*` + // * `X-AppEngine-*` + // + // In addition, some App Engine headers, which contain + // task-specific information, are also be sent to the task handler; + // see + // [request + // headers](/appengine/docs/python/taskqueue/push/creating-handlers#readi + // ng_request_headers). + Headers map[string]string `json:"headers,omitempty"` + + // HttpMethod: The HTTP method to use for the request. The default is + // POST. + // + // The app's request handler for the task's target URL must be able to + // handle + // HTTP requests with this http_method, otherwise the task attempt will + // fail + // with error code 405 "Method Not Allowed" because "the method + // specified in + // the Request-Line is not allowed for the resource identified by + // the + // Request-URI". See + // [Writing a push task request + // handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing + // _a_push_task_request_handler) + // and the documentation for the request handlers in the language your + // app is + // written in e.g. + // [python + // RequestHandler](/appengine/docs/python/tools/webapp/requesthandlerclas + // s). + // + // Possible values: + // "HTTP_METHOD_UNSPECIFIED" - HTTP method unspecified + // "POST" - HTTP Post + // "GET" - HTTP Get + // "HEAD" - HTTP Head + // "PUT" - HTTP Put + // "DELETE" - HTTP Delete + HttpMethod string `json:"httpMethod,omitempty"` + + // Payload: Payload. + // + // The payload will be sent as the HTTP message body. A message + // body, and thus a payload, is allowed only if the HTTP method is + // POST or PUT. It is an error to set a data payload on a task with + // an incompatible HttpMethod. + Payload string `json:"payload,omitempty"` + + // RelativeUrl: The relative URL. + // + // The relative URL must begin with "/" and must be a valid HTTP + // relative URL. + // It can contain a path, query string arguments, and `#` fragments. + // If the relative URL is empty, then the root path "/" will be used. + // No spaces are allowed, and the maximum length allowed is 2083 + // characters. + RelativeUrl string `json:"relativeUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AppEngineRouting") 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. "AppEngineRouting") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AppEngineHttpRequest) MarshalJSON() ([]byte, error) { + type noMethod AppEngineHttpRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AppEngineHttpTarget: App Engine HTTP target. +// +// The task will be delivered to the App Engine application +// hostname +// specified by its AppEngineHttpTarget and AppEngineHttpRequest. +// The documentation for AppEngineHttpRequest explains how the +// task's host URL is constructed. +// +// Using this type of queue configuration +// requires +// [`appengine.applications.get`](/appengine/docs/admin-api/acce +// ss-control) +// Google IAM permission for the project +// and the following +// scope: +// +// `https://www.googleapis.com/auth/cloud-platform` +type AppEngineHttpTarget struct { + // AppEngineRoutingOverride: Overrides for the + // task-level app_engine_routing. + // + // If set, AppEngineHttpTarget.app_engine_routing_override is used + // for + // all tasks in the queue, no matter what the setting is for + // the + // task-level app_engine_routing. + AppEngineRoutingOverride *AppEngineRouting `json:"appEngineRoutingOverride,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AppEngineRoutingOverride") 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. "AppEngineRoutingOverride") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AppEngineHttpTarget) MarshalJSON() ([]byte, error) { + type noMethod AppEngineHttpTarget + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AppEngineQueueConfig: App Engine queue config. +// +// An App Engine queue is a queue that has AppEngineQueueConfig +// set. +// +// The task will be delivered to the App Engine application +// URL +// specified by its AppEngineQueueConfig and AppEngineTaskTarget. +// The documentation for AppEngineTaskTarget explains how the +// task's host URL is constructed. +// +// Using this type of queue configuration +// requires +// [`appengine.applications.get`](/appengine/docs/admin-api/acce +// ss-control) +// Google IAM permission for the project +// and the following +// scope: +// +// `https://www.googleapis.com/auth/cloud-platform` +type AppEngineQueueConfig struct { + // AppEngineRoutingOverride: Overrides for the + // task-level app_engine_routing. + // + // If set, AppEngineQueueConfig.app_engine_routing_override is used + // for + // all tasks in the queue, no matter what the setting is for + // the + // task-level app_engine_routing. + AppEngineRoutingOverride *AppEngineRouting `json:"appEngineRoutingOverride,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AppEngineRoutingOverride") 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. "AppEngineRoutingOverride") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AppEngineQueueConfig) MarshalJSON() ([]byte, error) { + type noMethod AppEngineQueueConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AppEngineRouting: App Engine Routing. +// +// For more information about services, versions, and instances see +// [An Overview of App +// Engine](/appengine/docs/python/an-overview-of-app-engine), +// [Microservi +// ces Architecture on Google App +// Engine](/appengine/docs/python/microservices-on-app-engine), +// [App Engine Standard request +// routing](/appengine/docs/standard/python/how-requests-are-routed), +// and +// [App Engine Flex request +// routing](/appengine/docs/flexible/python/how-requests-are-routed). +type AppEngineRouting struct { + // Host: Output only. + // + // The host that the task is sent to. For more information, see + // [How Requests are + // Routed](/appengine/docs/standard/python/how-requests-are-routed). + // + // The + // host is constructed as: + // + // + // * `host = [application_domain_name]`
+ // `| [service] + '.' + [application_domain_name]`
+ // `| [version] + '.' + [application_domain_name]`
+ // `| [version_dot_service]+ '.' + [application_domain_name]`
+ // `| [instance] + '.' + [application_domain_name]`
+ // `| [instance_dot_service] + '.' + [application_domain_name]`
+ // `| [instance_dot_version] + '.' + [application_domain_name]`
+ // `| [instance_dot_version_dot_service] + '.' + + // [application_domain_name]` + // + // * `application_domain_name` = The domain name of the app, for + // example .appspot.com, which is associated with the + // queue's project ID. Some tasks which were created using the App + // Engine + // SDK use a custom domain name. + // + // * `service =` AppEngineRouting.service + // + // * `version =` AppEngineRouting.version + // + // * `version_dot_service =` + // AppEngineRouting.version `+ '.' +` AppEngineRouting.service + // + // * `instance =` AppEngineRouting.instance + // + // * `instance_dot_service =` + // AppEngineRouting.instance `+ '.' +` AppEngineRouting.service + // + // * `instance_dot_version =` + // AppEngineRouting.instance `+ '.' +` AppEngineRouting.version + // + // * `instance_dot_version_dot_service =` + // AppEngineRouting.instance `+ '.' +` + // AppEngineRouting.version `+ '.' +` AppEngineRouting.service + // + // If AppEngineRouting.service is empty, then the task will be sent + // to the service which is the default service when the task is + // attempted. + // + // If AppEngineRouting.version is empty, then the task will be sent + // to the version which is the default version when the task is + // attempted. + // + // If AppEngineRouting.instance is empty, then the task will be sent + // to an instance which is available when the task is attempted. + // + // When AppEngineRouting.service is "default", + // AppEngineRouting.version is "default", and + // AppEngineRouting.instance is empty, AppEngineRouting.host + // is + // shortened to just the `application_domain_name`. + // + // If AppEngineRouting.service, AppEngineRouting.version, + // or + // AppEngineRouting.instance is invalid, then the task will be sent + // to the default version of the default service when the task is + // attempted. + Host string `json:"host,omitempty"` + + // Instance: App instance. + // + // By default, the task is sent to an instance which is available + // when + // the task is attempted. + // + // Requests can only be sent to a specific instance if + // [manual scaling is used in App Engine + // Standard](/appengine/docs/python/an-overview-of-app-engine?hl=en_US#sc + // aling_types_and_instance_classes). + // App Engine Flex does not support instances. For more information, + // see + // [App Engine Standard request + // routing](/appengine/docs/standard/python/how-requests-are-routed) + // and [App Engine Flex request + // routing](/appengine/docs/flexible/python/how-requests-are-routed). + Instance string `json:"instance,omitempty"` + + // Service: App service. + // + // By default, the task is sent to the service which is the + // default + // service when the task is attempted ("default"). + // + // For some queues or tasks which were created using the App Engine Task + // Queue + // API, AppEngineRouting.host is not parsable + // into + // AppEngineRouting.service, AppEngineRouting.version, + // and + // AppEngineRouting.instance. For example, some tasks which were + // created + // using the App Engine SDK use a custom domain name; custom domains are + // not + // parsed by Cloud Tasks. If AppEngineRouting.host is not parsable, + // then + // AppEngineRouting.service, AppEngineRouting.version, + // and + // AppEngineRouting.instance are the empty string. + Service string `json:"service,omitempty"` + + // Version: App version. + // + // By default, the task is sent to the version which is the + // default + // version when the task is attempted ("default"). + // + // For some queues or tasks which were created using the App Engine Task + // Queue + // API, AppEngineRouting.host is not parsable + // into + // AppEngineRouting.service, AppEngineRouting.version, + // and + // AppEngineRouting.instance. For example, some tasks which were + // created + // using the App Engine SDK use a custom domain name; custom domains are + // not + // parsed by Cloud Tasks. If AppEngineRouting.host is not parsable, + // then + // AppEngineRouting.service, AppEngineRouting.version, + // and + // AppEngineRouting.instance are the empty string. + Version string `json:"version,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, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Host") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AppEngineRouting) MarshalJSON() ([]byte, error) { + type noMethod AppEngineRouting + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AppEngineTaskTarget: App Engine task target. +// +// An App Engine task is a task that has AppEngineTaskTarget set. +// +// This proto can only be used for tasks in a queue which +// has +// Queue.app_engine_queue_config set. +// +// Using this type of task target +// requires +// [`appengine.applications.get`](/appengine/docs/admin-api/acce +// ss-control) +// Google IAM permission for the project +// and the following +// scope: +// +// `https://www.googleapis.com/auth/cloud-platform` +// +// The task will be delivered to the URL specified by +// the +// AppEngineQueueConfig and AppEngineTaskTarget in the App Engine +// app +// which belongs to the same project as the queue. For more information, +// see +// [How Requests are +// Routed](/appengine/docs/standard/python/how-requests-are-routed) +// and how routing is affected by +// [dispatch files](/appengine/docs/python/config/dispatchref). +// +// The AppEngineRouting used to construct the URL can be set at +// the queue-level or task-level: +// +// * If set, AppEngineQueueConfig.app_engine_routing_override is used +// for +// all tasks in the queue, no matter what the setting is for the +// task-level app_engine_routing. +// +// +// The `url` that the task will be sent to is: +// +// * `url =` AppEngineRouting.host `+` +// AppEngineTaskTarget.relative_url +// +// The task will be sent to a task handler by an HTTP +// request using the specified AppEngineTaskTarget.http_method (for +// example +// POST, HTTP GET, etc). The task attempt has succeeded if the task +// handler +// returns an HTTP response code in the range [200 - 299]. Error 503 +// is +// considered an App Engine system error instead of an application +// error. +// Requests returning error 503 will be retried regardless of +// retry +// configuration and not counted against retry counts. +// Any other response code or a failure to receive a response before +// the +// deadline is a failed attempt. +type AppEngineTaskTarget struct { + // AppEngineRouting: Task-level setting for App Engine routing. + // + // If set, AppEngineQueueConfig.app_engine_routing_override is used + // for + // all tasks in the queue, no matter what the setting is for + // the + // task-level app_engine_routing. + AppEngineRouting *AppEngineRouting `json:"appEngineRouting,omitempty"` + + // Headers: HTTP request headers. + // + // This map contains the header field names and values. + // Headers can be set when the + // [task is + // created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask). + // Repeated headers are not supported but a header value can contain + // commas. + // + // Cloud Tasks sets some headers to default values: + // + // * `User-Agent`: By default, this header is + // "AppEngine-Google; (+http://code.google.com/appengine)". + // This header can be modified, but Cloud Tasks will append + // "AppEngine-Google; (+http://code.google.com/appengine)" to the + // modified `User-Agent`. + // + // If the task has an AppEngineTaskTarget.payload, Cloud Tasks sets + // the + // following headers: + // + // * `Content-Type`: By default, the `Content-Type` header is set to + // "application/octet-stream". The default can be overridden by + // explictly + // setting `Content-Type` to a particular media type when the + // [task is + // created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask). + // For example, `Content-Type` can be set to "application/json". + // * `Content-Length`: This is computed by Cloud Tasks. This value is + // output only. It cannot be changed. + // + // The headers below cannot be set or overridden: + // + // * `Host` + // * `X-Google-*` + // * `X-AppEngine-*` + // + // In addition, some App Engine headers, which contain + // task-specific information, are also be sent to the task handler; + // see + // [request + // headers](/appengine/docs/python/taskqueue/push/creating-handlers#readi + // ng_request_headers). + Headers map[string]string `json:"headers,omitempty"` + + // HttpMethod: The HTTP method to use for the request. The default is + // POST. + // + // The app's request handler for the task's target URL must be able to + // handle + // HTTP requests with this http_method, otherwise the task attempt will + // fail + // with error code 405 "Method Not Allowed" because "the method + // specified in + // the Request-Line is not allowed for the resource identified by + // the + // Request-URI". See + // [Writing a push task request + // handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing + // _a_push_task_request_handler) + // and the documentation for the request handlers in the language your + // app is + // written in e.g. + // [python + // RequestHandler](/appengine/docs/python/tools/webapp/requesthandlerclas + // s). + // + // Possible values: + // "HTTP_METHOD_UNSPECIFIED" - HTTP method unspecified + // "POST" - HTTP Post + // "GET" - HTTP Get + // "HEAD" - HTTP Head + // "PUT" - HTTP Put + // "DELETE" - HTTP Delete + HttpMethod string `json:"httpMethod,omitempty"` + + // Payload: Payload. + // + // The payload will be sent as the HTTP message body. A message + // body, and thus a payload, is allowed only if the HTTP method is + // POST or PUT. It is an error to set a data payload on a task with + // an incompatible HttpMethod. + Payload string `json:"payload,omitempty"` + + // RelativeUrl: The relative URL. + // + // The relative URL must begin with "/" and must be a valid HTTP + // relative URL. + // It can contain a path, query string arguments, and `#` fragments. + // If the relative URL is empty, then the root path "/" will be used. + // No spaces are allowed, and the maximum length allowed is 2083 + // characters. + RelativeUrl string `json:"relativeUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AppEngineRouting") 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. "AppEngineRouting") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AppEngineTaskTarget) MarshalJSON() ([]byte, error) { + type noMethod AppEngineTaskTarget + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AttemptStatus: The status of a task attempt. +type AttemptStatus struct { + // DispatchTime: Output only. + // + // The time that this attempt was dispatched. + // + // `dispatch_time` will be truncated to the nearest microsecond. + DispatchTime string `json:"dispatchTime,omitempty"` + + // ResponseStatus: Output only. + // + // The response from the target for this attempt. + // + // If the task has not been attempted or the task is currently + // running + // then the response status is google.rpc.Code.UNKNOWN. + ResponseStatus *Status `json:"responseStatus,omitempty"` + + // ResponseTime: Output only. + // + // The time that this attempt response was received. + // + // `response_time` will be truncated to the nearest microsecond. + ResponseTime string `json:"responseTime,omitempty"` + + // ScheduleTime: Output only. + // + // The time that this attempt was scheduled. + // + // `schedule_time` will be truncated to the nearest microsecond. + ScheduleTime string `json:"scheduleTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DispatchTime") 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. "DispatchTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AttemptStatus) MarshalJSON() ([]byte, error) { + type noMethod AttemptStatus + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Binding: Associates `members` with a `role`. +type Binding struct { + // 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` or `joe@example.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`. + // Required + Role string `json:"role,omitempty"` + + // 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 *Binding) MarshalJSON() ([]byte, error) { + type noMethod Binding + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CancelLeaseRequest: Request message for canceling a lease +// using +// CloudTasks.CancelLease. +type CancelLeaseRequest struct { + // ResponseView: The response_view specifies which subset of the Task + // will be + // returned. + // + // By default response_view is Task.View.BASIC; not all + // information is retrieved by default because some data, such + // as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that + // it + // contains. + // + // Authorization for Task.View.FULL requires + // `cloudtasks.tasks.fullView` + // [Google IAM](/iam/) permission on the + // Task.name resource. + // + // Possible values: + // "VIEW_UNSPECIFIED" - Unspecified. Defaults to BASIC. + // "BASIC" - The basic view omits fields which can be large or can + // contain + // sensitive data. + // + // This view does not include the payload. + // "FULL" - All information is returned. + // + // Payloads might be desirable to return only when needed, because + // they can be large and because of the sensitivity of the data + // that you choose to store in it. + // + // Authorization for Task.View.FULL requires + // `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) + // permission on the Queue.name resource. + ResponseView string `json:"responseView,omitempty"` + + // ScheduleTime: Required. + // + // The task's current schedule time, available in the + // Task.schedule_time + // returned in PullTasksResponse.tasks or + // CloudTasks.RenewLease. This restriction is to check that + // the caller is canceling the correct task. + ScheduleTime string `json:"scheduleTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ResponseView") 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. "ResponseView") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CancelLeaseRequest) MarshalJSON() ([]byte, error) { + type noMethod CancelLeaseRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CreateTaskRequest: Request message for CloudTasks.CreateTask. +type CreateTaskRequest struct { + // ResponseView: The response_view specifies which subset of the Task + // will be + // returned. + // + // By default response_view is Task.View.BASIC; not all + // information is retrieved by default because some data, such + // as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that + // it + // contains. + // + // Authorization for Task.View.FULL requires + // `cloudtasks.tasks.fullView` + // [Google IAM](/iam/) permission on the + // Task.name resource. + // + // Possible values: + // "VIEW_UNSPECIFIED" - Unspecified. Defaults to BASIC. + // "BASIC" - The basic view omits fields which can be large or can + // contain + // sensitive data. + // + // This view does not include the payload. + // "FULL" - All information is returned. + // + // Payloads might be desirable to return only when needed, because + // they can be large and because of the sensitivity of the data + // that you choose to store in it. + // + // Authorization for Task.View.FULL requires + // `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) + // permission on the Queue.name resource. + ResponseView string `json:"responseView,omitempty"` + + // Task: Required. + // + // The task to add. + // + // Task names have the following + // format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tas + // ks/TASK_ID`. + // The user can optionally specify a name for the task in + // Task.name. If a name is not specified then the system will + // generate a random unique task id, which will be returned in + // the + // response's Task.name. + // + // Explicitly specifying a Task.name enables task + // de-duplication. If a task's name is identical to the name of + // an + // existing task or a task that was deleted or completed within the + // last ~10 days then the call to CloudTasks.CreateTask will + // fail with google.rpc.Code.ALREADY_EXISTS. Because there is an + // extra lookup cost to identify duplicate task names, + // these + // CloudTasks.CreateTask calls have significantly increased + // latency. Using hashed strings for the task id or for the prefix + // of the task id is recommended. Choosing task ids that are + // sequential or have sequential prefixes, for example using + // a + // timestamp, causes an increase in latency and error rates in all + // task commands. The infrastructure relies on an approximately + // uniform distribution of task ids to store and serve + // tasks + // efficiently. + // + // If Task.schedule_time is not set or is in the past then Cloud + // Tasks will set it to the current time. + Task *Task `json:"task,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ResponseView") 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. "ResponseView") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateTaskRequest) MarshalJSON() ([]byte, error) { + type noMethod CreateTaskRequest + 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:"-"` +} + +// GetIamPolicyRequest: Request message for `GetIamPolicy` method. +type GetIamPolicyRequest struct { +} + +// ListQueuesResponse: Response message for CloudTasks.ListQueues. +type ListQueuesResponse struct { + // NextPageToken: A token to retrieve next page of results. + // + // To return the next page of results, call + // CloudTasks.ListQueues with this value as + // the + // ListQueuesRequest.page_token. + // + // If the next_page_token is empty, there are no more results. + // + // The page token is valid for only 2 hours. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Queues: The list of queues. + Queues []*Queue `json:"queues,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 *ListQueuesResponse) MarshalJSON() ([]byte, error) { + type noMethod ListQueuesResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListTasksResponse: Response message for listing tasks using +// CloudTasks.ListTasks. +type ListTasksResponse struct { + // NextPageToken: A token to retrieve next page of results. + // + // To return the next page of results, call + // CloudTasks.ListTasks with this value as + // the + // ListTasksRequest.page_token. + // + // If the next_page_token is empty, there are no more results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Tasks: The list of tasks. + Tasks []*Task `json:"tasks,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 *ListTasksResponse) MarshalJSON() ([]byte, error) { + type noMethod ListTasksResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PauseQueueRequest: Request message for CloudTasks.PauseQueue. +type PauseQueueRequest struct { +} + +// 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. +// +// **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"] +// } +// ] +// } +// +// For a description of IAM and its features, see the +// [IAM developer's guide](https://cloud.google.com/iam). +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: Version of the `Policy`. The default version is 0. + 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) +} + +// PullMessage: The pull message contains data that can be used by the +// caller of +// CloudTasks.PullTasks to process the task. +// +// This proto can only be used for tasks in a queue which +// has +// Queue.pull_target set. +type PullMessage struct { + // Payload: A data payload consumed by the task worker to execute the + // task. + Payload string `json:"payload,omitempty"` + + // Tag: A meta-data tag for this task. + // + // This value is used by CloudTasks.PullTasks calls + // when + // PullTasksRequest.filter is `tag=`. + // + // The tag must be less than 500 bytes. + Tag string `json:"tag,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Payload") 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. "Payload") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PullMessage) MarshalJSON() ([]byte, error) { + type noMethod PullMessage + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PullQueueConfig: Pull queue config. +// +// A pull queue is a queue that has PullQueueConfig set. +type PullQueueConfig struct { +} + +// PullTarget: Pull target. +type PullTarget struct { +} + +// PullTaskTarget: Pull task target. +// +// A pull task is a task that has PullTaskTarget set. +// +// This proto can only be used for tasks in a queue which +// has +// Queue.pull_queue_config set. +type PullTaskTarget struct { + // Payload: A data payload consumed by the task worker to execute the + // task. + Payload string `json:"payload,omitempty"` + + // Tag: A meta-data tag for this task. + // + // This value is used by CloudTasks.PullTasks calls + // when + // PullTasksRequest.filter is `tag=`. + // + // The tag must be less than 500 bytes. + Tag string `json:"tag,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Payload") 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. "Payload") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PullTaskTarget) MarshalJSON() ([]byte, error) { + type noMethod PullTaskTarget + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PullTasksRequest: Request message for pulling tasks using +// CloudTasks.PullTasks. +type PullTasksRequest struct { + // Filter: `filter` can be used to specify a subset of tasks to + // lease. + // + // When `filter` is set to `tag=` then the + // PullTasksResponse will contain only tasks whose + // PullTaskTarget.tag is equal to ``. `` can be + // a bytes encoded as a string and must be less than 500 bytes. + // If `` includes whitespace or special characters (characters + // which + // aren't letters, numbers, or underscores), then it must be + // double-quoted. + // Double quotes and backslashes in quoted strings must be escaped + // by + // preceding it with a backslash (`\`). + // + // When `filter` is set to `tag=oldest_tag()`, only tasks which have the + // same + // tag as the task with the oldest schedule_time will be + // returned. + // + // Grammar Syntax: + // + // * `filter = "tag=" comparable` + // + // * `comparable = tag | function` + // + // * `tag = string | bytes` + // + // * `function = "oldest_tag()" + // + // + // + // The `oldest_tag()` function returns tasks which have the same tag as + // the + // oldest task (ordered by schedule time). + Filter string `json:"filter,omitempty"` + + // LeaseDuration: The duration of the lease. + // + // Each task returned in the PullTasksResponse will have + // its + // Task.schedule_time set to the current time plus the + // `lease_duration`. A task that has been returned in + // a + // PullTasksResponse is leased -- that task will not be + // returned in a different PullTasksResponse before + // the + // Task.schedule_time. + // + // After the lease holder has successfully finished the work + // associated with the task, the lease holder must + // call + // CloudTasks.AcknowledgeTask. If the task is not acknowledged + // via CloudTasks.AcknowledgeTask before the + // Task.schedule_time then it will be returned in a + // later + // PullTasksResponse so that another lease holder can process + // it. + // + // The maximum lease duration is 1 week. + // `lease_duration` will be truncated to the nearest second. + LeaseDuration string `json:"leaseDuration,omitempty"` + + // MaxTasks: The maximum number of tasks to lease. The maximum that can + // be + // requested is 1000. + MaxTasks int64 `json:"maxTasks,omitempty"` + + // ResponseView: The response_view specifies which subset of the Task + // will be + // returned. + // + // By default response_view is Task.View.BASIC; not all + // information is retrieved by default because some data, such + // as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that + // it + // contains. + // + // Authorization for Task.View.FULL requires + // `cloudtasks.tasks.fullView` + // [Google IAM](/iam/) permission on the + // Task.name resource. + // + // Possible values: + // "VIEW_UNSPECIFIED" - Unspecified. Defaults to BASIC. + // "BASIC" - The basic view omits fields which can be large or can + // contain + // sensitive data. + // + // This view does not include the payload. + // "FULL" - All information is returned. + // + // Payloads might be desirable to return only when needed, because + // they can be large and because of the sensitivity of the data + // that you choose to store in it. + // + // Authorization for Task.View.FULL requires + // `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) + // permission on the Queue.name resource. + ResponseView string `json:"responseView,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Filter") 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. "Filter") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PullTasksRequest) MarshalJSON() ([]byte, error) { + type noMethod PullTasksRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PullTasksResponse: Response message for pulling tasks using +// CloudTasks.PullTasks. +type PullTasksResponse struct { + // Tasks: The leased tasks. + Tasks []*Task `json:"tasks,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Tasks") 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. "Tasks") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PullTasksResponse) MarshalJSON() ([]byte, error) { + type noMethod PullTasksResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PurgeQueueRequest: Request message for CloudTasks.PurgeQueue. +type PurgeQueueRequest struct { +} + +// Queue: A queue is a container of related tasks. Queues are configured +// to manage +// how those tasks are dispatched. Configurable properties include rate +// limits, +// retry options, target types, and others. +type Queue struct { + // AppEngineHttpTarget: App Engine HTTP target. + // + // An App Engine queue is a queue that has an AppEngineHttpTarget. + AppEngineHttpTarget *AppEngineHttpTarget `json:"appEngineHttpTarget,omitempty"` + + // AppEngineQueueConfig: + // App Engine queue config. + AppEngineQueueConfig *AppEngineQueueConfig `json:"appEngineQueueConfig,omitempty"` + + // Name: The queue name. + // + // The queue name must have the following + // format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + // + // * + // `PROJECT_ID` can contain uppercase and lowercase letters, + // numbers, hyphens, colons, and periods; that is, it must match + // the regular expression: `[a-zA-Z\\d-:\\.]+`. + // * `QUEUE_ID` can contain uppercase and lowercase letters, + // numbers, and hyphens; that is, it must match the regular + // expression: `[a-zA-Z\\d-]+`. The maximum length is 100 + // characters. + // + // Caller-specified and required in CreateQueueRequest, after which + // it becomes output only. + Name string `json:"name,omitempty"` + + // PullQueueConfig: + // Pull queue config. + PullQueueConfig *PullQueueConfig `json:"pullQueueConfig,omitempty"` + + // PullTarget: Pull target. + // + // A pull queue is a queue that has a PullTarget. + PullTarget *PullTarget `json:"pullTarget,omitempty"` + + // PurgeTime: Output only. + // + // The last time this queue was purged. All tasks that were + // created before this time were purged. + // + // A queue can be purged using CloudTasks.PurgeQueue, the + // [App Engine Task Queue SDK, or the Cloud + // Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks + // -and-queues#purging_all_tasks_from_a_queue). + // + // Purge time will be truncated to the nearest microsecond. Purge + // time will be zero if the queue has never been purged. + PurgeTime string `json:"purgeTime,omitempty"` + + // QueueState: Output only. + // + // The state of the queue. + // + // `queue_state` can only be changed by called + // CloudTasks.PauseQueue, CloudTasks.ResumeQueue, or + // uploading + // [queue.yaml](/appengine/docs/python/config/queueref). + // CloudT + // asks.UpdateQueue cannot be used to change `queue_state`. + // + // Possible values: + // "QUEUE_STATE_UNSPECIFIED" - Unspecified state. + // "RUNNING" - The queue is running. Tasks can be dispatched. + // "PAUSED" - Tasks are paused by the user. If the queue is paused + // then Cloud + // Tasks will stop delivering tasks from it, but more tasks can + // still be added to it by the user. When a pull queue is paused, + // all CloudTasks.PullTasks calls will return a + // `FAILED_PRECONDITION` error. + // "DISABLED" - Disabled indicates that queue has been removed from + // queue.yaml. + // + // When you remove a queue + // from + // [queue.yaml](/appengine/docs/python/config/queueref), + // it is marked as `DISABLED`. You cannot directly disable a + // queue. + // + // When a queue is disabled, tasks can still be added to a queue + // but the tasks are not dispatched and CloudTasks.PullTasks + // calls + // return a `FAILED_PRECONDITION` error. + // + // To permanently delete this queue and all of its tasks, + // call + // CloudTasks.DeleteQueue. + QueueState string `json:"queueState,omitempty"` + + // RetryConfig: Settings that determine the retry behavior. + // + // * For tasks created using Cloud Tasks: the queue-level retry + // settings + // apply to all tasks in the queue that were created using Cloud + // Tasks. + // Retry settings cannot be set on individual tasks. + // * For tasks created using the App Engine SDK: the queue-level retry + // settings apply to all tasks in the queue which do not have retry + // settings + // explicitly set on the task and were created by the App Engine SDK. + // See + // [App Engine + // documentation](/appengine/docs/standard/python/taskqueue/push/retrying + // -tasks). + RetryConfig *RetryConfig `json:"retryConfig,omitempty"` + + // ThrottleConfig: Config for throttling task dispatches. + ThrottleConfig *ThrottleConfig `json:"throttleConfig,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AppEngineHttpTarget") + // 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. "AppEngineHttpTarget") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Queue) MarshalJSON() ([]byte, error) { + type noMethod Queue + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RenewLeaseRequest: Request message for renewing a lease using +// CloudTasks.RenewLease. +type RenewLeaseRequest struct { + // NewLeaseDuration: Required. + // + // The desired new lease duration, starting from now. + // + // + // The maximum lease duration is 1 week. + // `new_lease_duration` will be truncated to the nearest second. + NewLeaseDuration string `json:"newLeaseDuration,omitempty"` + + // ResponseView: The response_view specifies which subset of the Task + // will be + // returned. + // + // By default response_view is Task.View.BASIC; not all + // information is retrieved by default because some data, such + // as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that + // it + // contains. + // + // Authorization for Task.View.FULL requires + // `cloudtasks.tasks.fullView` + // [Google IAM](/iam/) permission on the + // Task.name resource. + // + // Possible values: + // "VIEW_UNSPECIFIED" - Unspecified. Defaults to BASIC. + // "BASIC" - The basic view omits fields which can be large or can + // contain + // sensitive data. + // + // This view does not include the payload. + // "FULL" - All information is returned. + // + // Payloads might be desirable to return only when needed, because + // they can be large and because of the sensitivity of the data + // that you choose to store in it. + // + // Authorization for Task.View.FULL requires + // `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) + // permission on the Queue.name resource. + ResponseView string `json:"responseView,omitempty"` + + // ScheduleTime: Required. + // + // The task's current schedule time, available in the + // Task.schedule_time + // returned in PullTasksResponse.tasks or + // CloudTasks.RenewLease. This restriction is to check that + // the caller is renewing the correct task. + ScheduleTime string `json:"scheduleTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NewLeaseDuration") 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. "NewLeaseDuration") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RenewLeaseRequest) MarshalJSON() ([]byte, error) { + type noMethod RenewLeaseRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResumeQueueRequest: Request message for CloudTasks.ResumeQueue. +type ResumeQueueRequest struct { +} + +// RetryConfig: Retry config. +// +// These settings determine retry behavior. +// +// If a task does not complete successfully, meaning that +// an +// acknowledgement is not received from the handler before +// the +// [deadline](/appengine/docs/python/taskqueue/push/#the_task_deadlin +// e), +// then it will be retried with exponential backoff according to +// the +// settings in RetryConfig. +type RetryConfig struct { + // MaxAttempts: The maximum number of attempts for a task. + // + // Cloud Tasks will attempt the task `max_attempts` times (that + // is, if the first attempt fails, then there will be + // `max_attempts - 1` retries). Must be > 0. + MaxAttempts int64 `json:"maxAttempts,omitempty"` + + // MaxBackoff: The maximum amount of time to wait before retrying a task + // after + // it fails. The default is 1 hour. + // + // * For [App Engine + // queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget), + // this field is 1 hour by default. + // * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this + // field + // is output only and always 0. + // + // `max_backoff` will be truncated to the nearest second. + MaxBackoff string `json:"maxBackoff,omitempty"` + + // MaxDoublings: The maximum number of times that the interval between + // failed task + // retries will be doubled before the increase becomes constant. + // The + // constant is: 2**(max_doublings - 1) * + // RetryConfig.min_backoff. + // + // * For [App Engine + // queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget), + // this field is 16 by default. + // * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this + // field + // is output only and always 0. + MaxDoublings int64 `json:"maxDoublings,omitempty"` + + // MinBackoff: The minimum amount of time to wait before retrying a task + // after + // it fails. + // + // * For [App Engine + // queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget), + // this field is 0.1 seconds by default. + // * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this + // field is output only and always 0. + // + // `min_backoff` will be truncated to the nearest second. + MinBackoff string `json:"minBackoff,omitempty"` + + // TaskAgeLimit: If positive, task_age_limit specifies the time limit + // for retrying a failed + // task, measured from when the task was first run. If specified + // with + // RetryConfig.max_attempts, the task will be retried until both + // limits are reached. + // + // If zero, then the task age is unlimited. This field is zero by + // default. + // + // `task_age_limit` will be truncated to the nearest second. + TaskAgeLimit string `json:"taskAgeLimit,omitempty"` + + // UnlimitedAttempts: If true, then the number of attempts is unlimited. + UnlimitedAttempts bool `json:"unlimitedAttempts,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxAttempts") 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. "MaxAttempts") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RetryConfig) MarshalJSON() ([]byte, error) { + type noMethod RetryConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RunTaskRequest: Request message for forcing a task to run now +// using +// CloudTasks.RunTask. +type RunTaskRequest struct { + // ResponseView: The response_view specifies which subset of the Task + // will be + // returned. + // + // By default response_view is Task.View.BASIC; not all + // information is retrieved by default because some data, such + // as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that + // it + // contains. + // + // Authorization for Task.View.FULL requires + // `cloudtasks.tasks.fullView` + // [Google IAM](/iam/) permission on the + // Task.name resource. + // + // Possible values: + // "VIEW_UNSPECIFIED" - Unspecified. Defaults to BASIC. + // "BASIC" - The basic view omits fields which can be large or can + // contain + // sensitive data. + // + // This view does not include the payload. + // "FULL" - All information is returned. + // + // Payloads might be desirable to return only when needed, because + // they can be large and because of the sensitivity of the data + // that you choose to store in it. + // + // Authorization for Task.View.FULL requires + // `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) + // permission on the Queue.name resource. + ResponseView string `json:"responseView,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ResponseView") 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. "ResponseView") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RunTaskRequest) MarshalJSON() ([]byte, error) { + type noMethod RunTaskRequest + 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) +} + +// 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 needs +// +// # Overview +// +// The `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 mapping +// +// The `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 uses +// +// The 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) +} + +// Task: A unit of scheduled work. +type Task struct { + // AppEngineHttpRequest: App Engine HTTP request that is sent to the + // task's target. Can be set + // only if Queue.app_engine_http_target is set. + // + // An App Engine task is a task that has AppEngineHttpRequest set. + AppEngineHttpRequest *AppEngineHttpRequest `json:"appEngineHttpRequest,omitempty"` + + // AppEngineTaskTarget: + // App Engine task target. Can be set only + // if + // Queue.app_engine_queue_config is set. + AppEngineTaskTarget *AppEngineTaskTarget `json:"appEngineTaskTarget,omitempty"` + + // CreateTime: Output only. + // + // The time that the task was created. + // + // `create_time` will be truncated to the nearest second. + CreateTime string `json:"createTime,omitempty"` + + // Name: The task name. + // + // The task name must have the following + // format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tas + // ks/TASK_ID` + // + // * `PROJECT_ID` can contain uppercase and lowercase letters, + // numbers, hyphens, colons, and periods; that is, it must match + // the regular expression: `[a-zA-Z\\d-:\\.]+`. + // * `QUEUE_ID` can contain uppercase and lowercase letters, + // numbers, and hyphens; that is, it must match the regular + // expression: `[a-zA-Z\\d-]+`. The maximum length is 100 + // characters. + // * `TASK_ID` contain uppercase and lowercase letters, numbers, + // underscores, and hyphens; that is, it must match the regular + // expression: `[a-zA-Z\\d_-]+`. The maximum length is 500 + // characters. + // + // Optionally caller-specified in CreateTaskRequest. + Name string `json:"name,omitempty"` + + // PullMessage: Pull message contains data that should be used by the + // caller of + // CloudTasks.PullTasks to process the task. Can be set only + // if + // Queue.pull_target is set. + // + // A pull task is a task that has PullMessage set. + PullMessage *PullMessage `json:"pullMessage,omitempty"` + + // PullTaskTarget: + // Pull task target. Can be set only if Queue.pull_queue_config is set. + PullTaskTarget *PullTaskTarget `json:"pullTaskTarget,omitempty"` + + // ScheduleTime: The time when the task is scheduled to be + // attempted. + // + // For pull queues, this is the time when the task is available to + // be leased; if a task is currently leased, this is the time when + // the current lease expires, that is, the time that the task was + // leased plus the PullTasksRequest.lease_duration. + // + // For App Engine queues, this is when the task will be attempted or + // retried. + // + // `schedule_time` will be truncated to the nearest microsecond. + ScheduleTime string `json:"scheduleTime,omitempty"` + + // TaskStatus: Output only. + // + // Task status. + TaskStatus *TaskStatus `json:"taskStatus,omitempty"` + + // View: Output only. + // + // The view specifies which subset of the Task has been + // returned. + // + // Possible values: + // "VIEW_UNSPECIFIED" - Unspecified. Defaults to BASIC. + // "BASIC" - The basic view omits fields which can be large or can + // contain + // sensitive data. + // + // This view does not include the payload. + // "FULL" - All information is returned. + // + // Payloads might be desirable to return only when needed, because + // they can be large and because of the sensitivity of the data + // that you choose to store in it. + // + // Authorization for Task.View.FULL requires + // `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) + // permission on the Queue.name resource. + View string `json:"view,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AppEngineHttpRequest") 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. "AppEngineHttpRequest") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Task) MarshalJSON() ([]byte, error) { + type noMethod Task + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TaskStatus: Status of the task. +type TaskStatus struct { + // AttemptDispatchCount: Output only. + // + // The number of attempts dispatched. This count includes tasks which + // have + // been dispatched but haven't received a response. + AttemptDispatchCount int64 `json:"attemptDispatchCount,omitempty,string"` + + // AttemptResponseCount: Output only. + // + // The number of attempts which have received a response. + // + // This field is not calculated for + // [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget). + AttemptResponseCount int64 `json:"attemptResponseCount,omitempty,string"` + + // FirstAttemptStatus: Output only. + // + // The status of the task's first attempt. + // + // Only AttemptStatus.dispatch_time will be set. + // The other AttemptStatus information is not retained by Cloud + // Tasks. + // + // This field is not calculated for + // [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget). + FirstAttemptStatus *AttemptStatus `json:"firstAttemptStatus,omitempty"` + + // LastAttemptStatus: Output only. + // + // The status of the task's last attempt. + // + // This field is not calculated for + // [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget). + LastAttemptStatus *AttemptStatus `json:"lastAttemptStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AttemptDispatchCount") 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. "AttemptDispatchCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TaskStatus) MarshalJSON() ([]byte, error) { + type noMethod TaskStatus + 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) +} + +// ThrottleConfig: Throttle config. +// +// These settings determine the throttling behavior. +type ThrottleConfig struct { + // MaxBurstSize: Output only. + // + // The max burst size limits how fast the queue is processed when + // many tasks are in the queue and the rate is high. This field + // allows the queue to have a high rate so processing starts + // shortly + // after a task is enqueued, but still limits resource usage when + // many tasks are enqueued in a short period of time. + // + // * For App Engine queues, if + // ThrottleConfig.max_tasks_dispatched_per_second is 1, this + // field is 10; otherwise this field is + // ThrottleConfig.max_tasks_dispatched_per_second / 5. + // * For pull queues, this field is output only and always + // 10,000. + // + // Note: For App Engine queues that were created + // through + // `queue.yaml/xml`, `max_burst_size` might not have the same + // settings as specified above; CloudTasks.UpdateQueue can be + // used to set `max_burst_size` only to the values specified + // above. + // + // This field has the same meaning as + // [bucket_size in + // queue.yaml](/appengine/docs/standard/python/config/queueref#bucket_siz + // e). + MaxBurstSize float64 `json:"maxBurstSize,omitempty"` + + // MaxOutstandingTasks: The maximum number of outstanding tasks that + // Cloud Tasks allows + // to be dispatched for this queue. After this threshold has + // been + // reached, Cloud Tasks stops dispatching tasks until the number + // of + // outstanding requests decreases. + // + // The maximum allowed value is 5,000. + // + // * For App Engine queues, this field is 10 by default. + // * For pull queues, this field is output only and always -1, which + // indicates no limit. + // + // This field has the same meaning as + // [max_concurrent_requests in + // queue.yaml](/appengine/docs/standard/python/config/queueref#max_concur + // rent_requests). + MaxOutstandingTasks int64 `json:"maxOutstandingTasks,omitempty"` + + // MaxTasksDispatchedPerSecond: The maximum rate at which tasks are + // dispatched from this + // queue. + // + // The maximum allowed value is 500. + // + // * For App Engine queues, this field is 1 by default. + // * For pull queues, this field is output only and always 10,000. + // + // This field has the same meaning as + // [rate in + // queue.yaml](/appengine/docs/standard/python/config/queueref#rate). + MaxTasksDispatchedPerSecond float64 `json:"maxTasksDispatchedPerSecond,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxBurstSize") 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. "MaxBurstSize") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ThrottleConfig) MarshalJSON() ([]byte, error) { + type noMethod ThrottleConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *ThrottleConfig) UnmarshalJSON(data []byte) error { + type noMethod ThrottleConfig + var s1 struct { + MaxBurstSize gensupport.JSONFloat64 `json:"maxBurstSize"` + MaxTasksDispatchedPerSecond gensupport.JSONFloat64 `json:"maxTasksDispatchedPerSecond"` + *noMethod + } + s1.noMethod = (*noMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MaxBurstSize = float64(s1.MaxBurstSize) + s.MaxTasksDispatchedPerSecond = float64(s1.MaxTasksDispatchedPerSecond) + return nil +} + +// method id "cloudtasks.projects.locations.queues.create": + +type ProjectsLocationsQueuesCreateCall struct { + s *Service + parent string + queue *Queue + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a queue. +// +// WARNING: This method is only available to whitelisted +// users. Using this method carries some risk. Read +// [Overview of Queue Management and +// queue.yaml](/cloud-tasks/docs/queue-yaml) +// carefully and then sign up for +// [whitelist access to this method](https://goo.gl/Fe5mUy). +func (r *ProjectsLocationsQueuesService) Create(parent string, queue *Queue) *ProjectsLocationsQueuesCreateCall { + c := &ProjectsLocationsQueuesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.queue = queue + 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 *ProjectsLocationsQueuesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesCreateCall { + 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 *ProjectsLocationsQueuesCreateCall) Context(ctx context.Context) *ProjectsLocationsQueuesCreateCall { + 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 *ProjectsLocationsQueuesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesCreateCall) 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.queue) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/queues") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.create" call. +// Exactly one of *Queue or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Queue.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsQueuesCreateCall) Do(opts ...googleapi.CallOption) (*Queue, 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 := &Queue{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a queue.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy).", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues", + // "httpMethod": "POST", + // "id": "cloudtasks.projects.locations.queues.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required.\n\nThe location name in which the queue will be created.\nFor example: `projects/PROJECT_ID/locations/LOCATION_ID`\n\nThe list of allowed locations can be obtained by calling Cloud\nTasks' implementation of\ngoogle.cloud.location.Locations.ListLocations.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+parent}/queues", + // "request": { + // "$ref": "Queue" + // }, + // "response": { + // "$ref": "Queue" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.delete": + +type ProjectsLocationsQueuesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a queue. +// +// This command will delete the queue even if it has tasks in it. +// +// Note: If you delete a queue, a queue with the same name can't be +// created +// for 7 days. +// +// WARNING: This method is only available to whitelisted +// users. Using this method carries some risk. Read +// [Overview of Queue Management and +// queue.yaml](/cloud-tasks/docs/queue-yaml) +// carefully and then sign up for +// [whitelist access to this method](https://goo.gl/Fe5mUy). +func (r *ProjectsLocationsQueuesService) Delete(name string) *ProjectsLocationsQueuesDeleteCall { + c := &ProjectsLocationsQueuesDeleteCall{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 *ProjectsLocationsQueuesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesDeleteCall { + 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 *ProjectsLocationsQueuesDeleteCall) Context(ctx context.Context) *ProjectsLocationsQueuesDeleteCall { + 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 *ProjectsLocationsQueuesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.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 *ProjectsLocationsQueuesDeleteCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a queue.\n\nThis command will delete the queue even if it has tasks in it.\n\nNote: If you delete a queue, a queue with the same name can't be created\nfor 7 days.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy).", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}", + // "httpMethod": "DELETE", + // "id": "cloudtasks.projects.locations.queues.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.get": + +type ProjectsLocationsQueuesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a queue. +func (r *ProjectsLocationsQueuesService) Get(name string) *ProjectsLocationsQueuesGetCall { + c := &ProjectsLocationsQueuesGetCall{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 *ProjectsLocationsQueuesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesGetCall { + 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 *ProjectsLocationsQueuesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsQueuesGetCall { + 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 *ProjectsLocationsQueuesGetCall) Context(ctx context.Context) *ProjectsLocationsQueuesGetCall { + 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 *ProjectsLocationsQueuesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.get" call. +// Exactly one of *Queue or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Queue.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsQueuesGetCall) Do(opts ...googleapi.CallOption) (*Queue, 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 := &Queue{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a queue.", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}", + // "httpMethod": "GET", + // "id": "cloudtasks.projects.locations.queues.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required.\n\nThe resource name of the queue. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+name}", + // "response": { + // "$ref": "Queue" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.getIamPolicy": + +type ProjectsLocationsQueuesGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a Queue. +// Returns an empty policy if the resource exists and does not have a +// policy +// set. +// +// Authorization requires the following [Google IAM](/iam) permission on +// the +// specified resource parent: +// +// * `cloudtasks.queues.getIamPolicy` +func (r *ProjectsLocationsQueuesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsQueuesGetIamPolicyCall { + c := &ProjectsLocationsQueuesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.getiampolicyrequest = getiampolicyrequest + 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 *ProjectsLocationsQueuesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesGetIamPolicyCall { + 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 *ProjectsLocationsQueuesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsQueuesGetIamPolicyCall { + 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 *ProjectsLocationsQueuesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesGetIamPolicyCall) 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.getiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + 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 "cloudtasks.projects.locations.queues.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 *ProjectsLocationsQueuesGetIamPolicyCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a Queue.\nReturns an empty policy if the resource exists and does not have a policy\nset.\n\nAuthorization requires the following [Google IAM](/iam) permission on the\nspecified resource parent:\n\n* `cloudtasks.queues.getIamPolicy`", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:getIamPolicy", + // "httpMethod": "POST", + // "id": "cloudtasks.projects.locations.queues.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/[^/]+/queues/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+resource}:getIamPolicy", + // "request": { + // "$ref": "GetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.list": + +type ProjectsLocationsQueuesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists queues. +// +// Queues are returned in lexicographical order. +func (r *ProjectsLocationsQueuesService) List(parent string) *ProjectsLocationsQueuesListCall { + c := &ProjectsLocationsQueuesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": `filter` can be used to +// specify a subset of queues. Any Queue +// field can be used as a filter and several operators as supported. +// For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same +// as +// described in +// [Stackdriver's Advanced Logs +// Filters](/logging/docs/view/advanced_filters). +// +// Sample filter "app_engine_queue_config: *". +// +// Note that using filters might cause fewer queues than +// the +// requested_page size to be returned. +func (c *ProjectsLocationsQueuesListCall) Filter(filter string) *ProjectsLocationsQueuesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page +// size. +// +// The maximum page size is 9800. If unspecified, the page size will +// be the maximum. Fewer queues than requested might be returned, +// even if more queues exist; use +// ListQueuesResponse.next_page_token to determine if more +// queues exist. +func (c *ProjectsLocationsQueuesListCall) PageSize(pageSize int64) *ProjectsLocationsQueuesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying the page of results to return. +// +// To request the first page results, page_token must be empty. +// To +// request the next page of results, page_token must be the value +// of +// ListQueuesResponse.next_page_token returned from the previous +// call to CloudTasks.ListQueues method. It is an error to +// switch the value of ListQueuesRequest.filter while iterating +// through pages. +func (c *ProjectsLocationsQueuesListCall) PageToken(pageToken string) *ProjectsLocationsQueuesListCall { + 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 *ProjectsLocationsQueuesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesListCall { + 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 *ProjectsLocationsQueuesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsQueuesListCall { + 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 *ProjectsLocationsQueuesListCall) Context(ctx context.Context) *ProjectsLocationsQueuesListCall { + 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 *ProjectsLocationsQueuesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/queues") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.list" call. +// Exactly one of *ListQueuesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListQueuesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsQueuesListCall) Do(opts ...googleapi.CallOption) (*ListQueuesResponse, 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 := &ListQueuesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists queues.\n\nQueues are returned in lexicographical order.", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues", + // "httpMethod": "GET", + // "id": "cloudtasks.projects.locations.queues.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "`filter` can be used to specify a subset of queues. Any Queue\nfield can be used as a filter and several operators as supported.\nFor example: `\u003c=, \u003c, \u003e=, \u003e, !=, =, :`. The filter syntax is the same as\ndescribed in\n[Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters).\n\nSample filter \"app_engine_queue_config: *\".\n\nNote that using filters might cause fewer queues than the\nrequested_page size to be returned.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size.\n\nThe maximum page size is 9800. If unspecified, the page size will\nbe the maximum. Fewer queues than requested might be returned,\neven if more queues exist; use\nListQueuesResponse.next_page_token to determine if more\nqueues exist.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying the page of results to return.\n\nTo request the first page results, page_token must be empty. To\nrequest the next page of results, page_token must be the value of\nListQueuesResponse.next_page_token returned from the previous\ncall to CloudTasks.ListQueues method. It is an error to\nswitch the value of ListQueuesRequest.filter while iterating\nthrough pages.", + // "format": "byte", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required.\n\nThe location name.\nFor example: `projects/PROJECT_ID/locations/LOCATION_ID`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+parent}/queues", + // "response": { + // "$ref": "ListQueuesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsQueuesListCall) Pages(ctx context.Context, f func(*ListQueuesResponse) 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 "cloudtasks.projects.locations.queues.patch": + +type ProjectsLocationsQueuesPatchCall struct { + s *Service + name string + queue *Queue + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a queue. +// +// This method creates the queue if it does not exist and updates +// the queue if it does exist. +// +// WARNING: This method is only available to whitelisted +// users. Using this method carries some risk. Read +// [Overview of Queue Management and +// queue.yaml](/cloud-tasks/docs/queue-yaml) +// carefully and then sign up for +// [whitelist access to this method](https://goo.gl/Fe5mUy). +func (r *ProjectsLocationsQueuesService) Patch(name string, queue *Queue) *ProjectsLocationsQueuesPatchCall { + c := &ProjectsLocationsQueuesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.queue = queue + return c +} + +// UpdateMask sets the optional parameter "updateMask": A mask used to +// specify which fields of the queue are being updated. +// +// If empty, then all fields will be updated. +func (c *ProjectsLocationsQueuesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsQueuesPatchCall { + 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 *ProjectsLocationsQueuesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesPatchCall { + 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 *ProjectsLocationsQueuesPatchCall) Context(ctx context.Context) *ProjectsLocationsQueuesPatchCall { + 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 *ProjectsLocationsQueuesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesPatchCall) 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.queue) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.patch" call. +// Exactly one of *Queue or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Queue.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsQueuesPatchCall) Do(opts ...googleapi.CallOption) (*Queue, 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 := &Queue{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a queue.\n\nThis method creates the queue if it does not exist and updates\nthe queue if it does exist.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy).", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}", + // "httpMethod": "PATCH", + // "id": "cloudtasks.projects.locations.queues.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The queue name.\n\nThe queue name must have the following format:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`\n\n* `PROJECT_ID` can contain uppercase and lowercase letters,\n numbers, hyphens, colons, and periods; that is, it must match\n the regular expression: `[a-zA-Z\\\\d-:\\\\.]+`.\n* `QUEUE_ID` can contain uppercase and lowercase letters,\n numbers, and hyphens; that is, it must match the regular\n expression: `[a-zA-Z\\\\d-]+`. The maximum length is 100\n characters.\n\nCaller-specified and required in CreateQueueRequest, after which\nit becomes output only.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "A mask used to specify which fields of the queue are being updated.\n\nIf empty, then all fields will be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2beta2/{+name}", + // "request": { + // "$ref": "Queue" + // }, + // "response": { + // "$ref": "Queue" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.pause": + +type ProjectsLocationsQueuesPauseCall struct { + s *Service + name string + pausequeuerequest *PauseQueueRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Pause: Pauses the queue. +// +// If a queue is paused then the system will stop executing the +// tasks in the queue until it is resumed via +// CloudTasks.ResumeQueue. Tasks can still be added when the +// queue is paused. The state of the queue is stored +// in +// Queue.queue_state; if paused it will be set +// to +// Queue.QueueState.PAUSED. +// +// WARNING: This method is only available to whitelisted +// users. Using this method carries some risk. Read +// [Overview of Queue Management and +// queue.yaml](/cloud-tasks/docs/queue-yaml) +// carefully and then sign up for +// [whitelist access to this method](https://goo.gl/Fe5mUy). +func (r *ProjectsLocationsQueuesService) Pause(name string, pausequeuerequest *PauseQueueRequest) *ProjectsLocationsQueuesPauseCall { + c := &ProjectsLocationsQueuesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.pausequeuerequest = pausequeuerequest + 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 *ProjectsLocationsQueuesPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesPauseCall { + 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 *ProjectsLocationsQueuesPauseCall) Context(ctx context.Context) *ProjectsLocationsQueuesPauseCall { + 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 *ProjectsLocationsQueuesPauseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesPauseCall) 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.pausequeuerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}:pause") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.pause" call. +// Exactly one of *Queue or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Queue.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsQueuesPauseCall) Do(opts ...googleapi.CallOption) (*Queue, 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 := &Queue{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Pauses the queue.\n\nIf a queue is paused then the system will stop executing the\ntasks in the queue until it is resumed via\nCloudTasks.ResumeQueue. Tasks can still be added when the\nqueue is paused. The state of the queue is stored in\nQueue.queue_state; if paused it will be set to\nQueue.QueueState.PAUSED.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy).", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:pause", + // "httpMethod": "POST", + // "id": "cloudtasks.projects.locations.queues.pause", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+name}:pause", + // "request": { + // "$ref": "PauseQueueRequest" + // }, + // "response": { + // "$ref": "Queue" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.purge": + +type ProjectsLocationsQueuesPurgeCall struct { + s *Service + name string + purgequeuerequest *PurgeQueueRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Purge: Purges a queue by deleting all of its tasks. +// +// All tasks created before this method is called are permanently +// deleted. +// +// Purge operations can take up to one minute to take effect. +// Tasks +// might be dispatched before the purge takes effect. A purge is +// irreversible. +func (r *ProjectsLocationsQueuesService) Purge(name string, purgequeuerequest *PurgeQueueRequest) *ProjectsLocationsQueuesPurgeCall { + c := &ProjectsLocationsQueuesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.purgequeuerequest = purgequeuerequest + 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 *ProjectsLocationsQueuesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesPurgeCall { + 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 *ProjectsLocationsQueuesPurgeCall) Context(ctx context.Context) *ProjectsLocationsQueuesPurgeCall { + 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 *ProjectsLocationsQueuesPurgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesPurgeCall) 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.purgequeuerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}:purge") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.purge" call. +// Exactly one of *Queue or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Queue.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsQueuesPurgeCall) Do(opts ...googleapi.CallOption) (*Queue, 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 := &Queue{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Purges a queue by deleting all of its tasks.\n\nAll tasks created before this method is called are permanently deleted.\n\nPurge operations can take up to one minute to take effect. Tasks\nmight be dispatched before the purge takes effect. A purge is irreversible.", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:purge", + // "httpMethod": "POST", + // "id": "cloudtasks.projects.locations.queues.purge", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+name}:purge", + // "request": { + // "$ref": "PurgeQueueRequest" + // }, + // "response": { + // "$ref": "Queue" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.resume": + +type ProjectsLocationsQueuesResumeCall struct { + s *Service + name string + resumequeuerequest *ResumeQueueRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Resume: Resume a queue. +// +// This method resumes a queue after it has been +// Queue.QueueState.PAUSED or Queue.QueueState.DISABLED. The state of +// a queue is stored in Queue.queue_state; after calling this method +// it +// will be set to Queue.QueueState.RUNNING. +// +// WARNING: This method is only available to whitelisted +// users. Using this method carries some risk. Read +// [Overview of Queue Management and +// queue.yaml](/cloud-tasks/docs/queue-yaml) +// carefully and then sign up for +// [whitelist access to this method](https://goo.gl/Fe5mUy). +// +// WARNING: Resuming many high-QPS queues at the same time can +// lead to target overloading. If you are resuming high-QPS +// queues, follow the 500/50/5 pattern described in +// [Managing Cloud Tasks Scaling +// Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05 +// .pdf). +func (r *ProjectsLocationsQueuesService) Resume(name string, resumequeuerequest *ResumeQueueRequest) *ProjectsLocationsQueuesResumeCall { + c := &ProjectsLocationsQueuesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.resumequeuerequest = resumequeuerequest + 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 *ProjectsLocationsQueuesResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesResumeCall { + 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 *ProjectsLocationsQueuesResumeCall) Context(ctx context.Context) *ProjectsLocationsQueuesResumeCall { + 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 *ProjectsLocationsQueuesResumeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesResumeCall) 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.resumequeuerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}:resume") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.resume" call. +// Exactly one of *Queue or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Queue.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsQueuesResumeCall) Do(opts ...googleapi.CallOption) (*Queue, 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 := &Queue{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Resume a queue.\n\nThis method resumes a queue after it has been\nQueue.QueueState.PAUSED or Queue.QueueState.DISABLED. The state of\na queue is stored in Queue.queue_state; after calling this method it\nwill be set to Queue.QueueState.RUNNING.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy).\n\nWARNING: Resuming many high-QPS queues at the same time can\nlead to target overloading. If you are resuming high-QPS\nqueues, follow the 500/50/5 pattern described in\n[Managing Cloud Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf).", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:resume", + // "httpMethod": "POST", + // "id": "cloudtasks.projects.locations.queues.resume", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+name}:resume", + // "request": { + // "$ref": "ResumeQueueRequest" + // }, + // "response": { + // "$ref": "Queue" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.setIamPolicy": + +type ProjectsLocationsQueuesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy for a Queue. Replaces +// any existing +// policy. +// +// Authorization requires the following [Google IAM](/iam) permission on +// the +// specified resource parent: +// +// * `cloudtasks.queues.setIamPolicy` +func (r *ProjectsLocationsQueuesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsQueuesSetIamPolicyCall { + c := &ProjectsLocationsQueuesSetIamPolicyCall{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 *ProjectsLocationsQueuesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesSetIamPolicyCall { + 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 *ProjectsLocationsQueuesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsQueuesSetIamPolicyCall { + 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 *ProjectsLocationsQueuesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesSetIamPolicyCall) 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) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + 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 "cloudtasks.projects.locations.queues.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 *ProjectsLocationsQueuesSetIamPolicyCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy for a Queue. Replaces any existing\npolicy.\n\nAuthorization requires the following [Google IAM](/iam) permission on the\nspecified resource parent:\n\n* `cloudtasks.queues.setIamPolicy`", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "cloudtasks.projects.locations.queues.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/[^/]+/queues/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.testIamPermissions": + +type ProjectsLocationsQueuesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on a +// Queue. +// If the resource does not exist, this will return an empty set +// of +// permissions, not a google.rpc.Code.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 *ProjectsLocationsQueuesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsQueuesTestIamPermissionsCall { + c := &ProjectsLocationsQueuesTestIamPermissionsCall{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 *ProjectsLocationsQueuesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTestIamPermissionsCall { + 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 *ProjectsLocationsQueuesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsQueuesTestIamPermissionsCall { + 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 *ProjectsLocationsQueuesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesTestIamPermissionsCall) 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) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + 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 "cloudtasks.projects.locations.queues.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 *ProjectsLocationsQueuesTestIamPermissionsCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on a Queue.\nIf the resource does not exist, this will return an empty set of\npermissions, not a google.rpc.Code.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": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "cloudtasks.projects.locations.queues.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/[^/]+/queues/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.tasks.acknowledge": + +type ProjectsLocationsQueuesTasksAcknowledgeCall struct { + s *Service + name string + acknowledgetaskrequest *AcknowledgeTaskRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Acknowledge: Acknowledges a pull task. +// +// The lease holder, that is, the entity that received this task in +// a PullTasksResponse, must call this method to indicate that +// the work associated with the task has finished. +// +// The lease holder must acknowledge a task within +// the +// PullTasksRequest.lease_duration or the lease will expire and +// the task will become ready to be returned in a +// different +// PullTasksResponse. After the task is acknowledged, it will +// not be returned by a later CloudTasks.PullTasks, +// CloudTasks.GetTask, or CloudTasks.ListTasks. +func (r *ProjectsLocationsQueuesTasksService) Acknowledge(name string, acknowledgetaskrequest *AcknowledgeTaskRequest) *ProjectsLocationsQueuesTasksAcknowledgeCall { + c := &ProjectsLocationsQueuesTasksAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.acknowledgetaskrequest = acknowledgetaskrequest + 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 *ProjectsLocationsQueuesTasksAcknowledgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTasksAcknowledgeCall { + 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 *ProjectsLocationsQueuesTasksAcknowledgeCall) Context(ctx context.Context) *ProjectsLocationsQueuesTasksAcknowledgeCall { + 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 *ProjectsLocationsQueuesTasksAcknowledgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesTasksAcknowledgeCall) 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.acknowledgetaskrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}:acknowledge") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.tasks.acknowledge" 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 *ProjectsLocationsQueuesTasksAcknowledgeCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Acknowledges a pull task.\n\nThe lease holder, that is, the entity that received this task in\na PullTasksResponse, must call this method to indicate that\nthe work associated with the task has finished.\n\nThe lease holder must acknowledge a task within the\nPullTasksRequest.lease_duration or the lease will expire and\nthe task will become ready to be returned in a different\nPullTasksResponse. After the task is acknowledged, it will\nnot be returned by a later CloudTasks.PullTasks,\nCloudTasks.GetTask, or CloudTasks.ListTasks.", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:acknowledge", + // "httpMethod": "POST", + // "id": "cloudtasks.projects.locations.queues.tasks.acknowledge", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+name}:acknowledge", + // "request": { + // "$ref": "AcknowledgeTaskRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.tasks.cancelLease": + +type ProjectsLocationsQueuesTasksCancelLeaseCall struct { + s *Service + name string + cancelleaserequest *CancelLeaseRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CancelLease: Cancel a pull task's lease. +// +// The lease holder can use this method to cancel a task's lease +// by setting Task.schedule_time to now. This will make the +// task +// available to be leased to the next caller of CloudTasks.PullTasks. +func (r *ProjectsLocationsQueuesTasksService) CancelLease(name string, cancelleaserequest *CancelLeaseRequest) *ProjectsLocationsQueuesTasksCancelLeaseCall { + c := &ProjectsLocationsQueuesTasksCancelLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.cancelleaserequest = cancelleaserequest + 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 *ProjectsLocationsQueuesTasksCancelLeaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTasksCancelLeaseCall { + 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 *ProjectsLocationsQueuesTasksCancelLeaseCall) Context(ctx context.Context) *ProjectsLocationsQueuesTasksCancelLeaseCall { + 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 *ProjectsLocationsQueuesTasksCancelLeaseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesTasksCancelLeaseCall) 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.cancelleaserequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}:cancelLease") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.tasks.cancelLease" call. +// Exactly one of *Task or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Task.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsQueuesTasksCancelLeaseCall) Do(opts ...googleapi.CallOption) (*Task, 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 := &Task{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Cancel a pull task's lease.\n\nThe lease holder can use this method to cancel a task's lease\nby setting Task.schedule_time to now. This will make the task\navailable to be leased to the next caller of CloudTasks.PullTasks.", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:cancelLease", + // "httpMethod": "POST", + // "id": "cloudtasks.projects.locations.queues.tasks.cancelLease", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+name}:cancelLease", + // "request": { + // "$ref": "CancelLeaseRequest" + // }, + // "response": { + // "$ref": "Task" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.tasks.create": + +type ProjectsLocationsQueuesTasksCreateCall struct { + s *Service + parent string + createtaskrequest *CreateTaskRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a task and adds it to a queue. +// +// To add multiple tasks at the same time, use +// [HTTP batching](/storage/docs/json_api/v1/how-tos/batch) +// or the batching documentation for your client library, for +// example +// https://developers.google.com/api-client-library/python/guide/ +// batch. +// +// Tasks cannot be updated after creation; there is no UpdateTask +// command. +func (r *ProjectsLocationsQueuesTasksService) Create(parent string, createtaskrequest *CreateTaskRequest) *ProjectsLocationsQueuesTasksCreateCall { + c := &ProjectsLocationsQueuesTasksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.createtaskrequest = createtaskrequest + 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 *ProjectsLocationsQueuesTasksCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTasksCreateCall { + 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 *ProjectsLocationsQueuesTasksCreateCall) Context(ctx context.Context) *ProjectsLocationsQueuesTasksCreateCall { + 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 *ProjectsLocationsQueuesTasksCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesTasksCreateCall) 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.createtaskrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/tasks") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.tasks.create" call. +// Exactly one of *Task or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Task.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsQueuesTasksCreateCall) Do(opts ...googleapi.CallOption) (*Task, 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 := &Task{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a task and adds it to a queue.\n\nTo add multiple tasks at the same time, use\n[HTTP batching](/storage/docs/json_api/v1/how-tos/batch)\nor the batching documentation for your client library, for example\nhttps://developers.google.com/api-client-library/python/guide/batch.\n\nTasks cannot be updated after creation; there is no UpdateTask command.", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks", + // "httpMethod": "POST", + // "id": "cloudtasks.projects.locations.queues.tasks.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`\n\nThe queue must already exist.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+parent}/tasks", + // "request": { + // "$ref": "CreateTaskRequest" + // }, + // "response": { + // "$ref": "Task" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.tasks.delete": + +type ProjectsLocationsQueuesTasksDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a task. +// +// A task can be deleted if it is scheduled or dispatched. A task +// cannot be deleted if it has completed successfully or +// permanently +// failed. +func (r *ProjectsLocationsQueuesTasksService) Delete(name string) *ProjectsLocationsQueuesTasksDeleteCall { + c := &ProjectsLocationsQueuesTasksDeleteCall{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 *ProjectsLocationsQueuesTasksDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTasksDeleteCall { + 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 *ProjectsLocationsQueuesTasksDeleteCall) Context(ctx context.Context) *ProjectsLocationsQueuesTasksDeleteCall { + 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 *ProjectsLocationsQueuesTasksDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesTasksDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.tasks.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 *ProjectsLocationsQueuesTasksDeleteCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a task.\n\nA task can be deleted if it is scheduled or dispatched. A task\ncannot be deleted if it has completed successfully or permanently\nfailed.", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}", + // "httpMethod": "DELETE", + // "id": "cloudtasks.projects.locations.queues.tasks.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.tasks.get": + +type ProjectsLocationsQueuesTasksGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a task. +func (r *ProjectsLocationsQueuesTasksService) Get(name string) *ProjectsLocationsQueuesTasksGetCall { + c := &ProjectsLocationsQueuesTasksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ResponseView sets the optional parameter "responseView": The +// response_view specifies which subset of the Task will +// be +// returned. +// +// By default response_view is Task.View.BASIC; not all +// information is retrieved by default because some data, such +// as +// payloads, might be desirable to return only when needed because +// of its large size or because of the sensitivity of data that +// it +// contains. +// +// Authorization for Task.View.FULL requires +// `cloudtasks.tasks.fullView` +// [Google IAM](/iam/) permission on the +// Task.name resource. +// +// Possible values: +// "VIEW_UNSPECIFIED" +// "BASIC" +// "FULL" +func (c *ProjectsLocationsQueuesTasksGetCall) ResponseView(responseView string) *ProjectsLocationsQueuesTasksGetCall { + c.urlParams_.Set("responseView", responseView) + 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 *ProjectsLocationsQueuesTasksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTasksGetCall { + 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 *ProjectsLocationsQueuesTasksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsQueuesTasksGetCall { + 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 *ProjectsLocationsQueuesTasksGetCall) Context(ctx context.Context) *ProjectsLocationsQueuesTasksGetCall { + 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 *ProjectsLocationsQueuesTasksGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesTasksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.tasks.get" call. +// Exactly one of *Task or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Task.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsQueuesTasksGetCall) Do(opts ...googleapi.CallOption) (*Task, 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 := &Task{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a task.", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}", + // "httpMethod": "GET", + // "id": "cloudtasks.projects.locations.queues.tasks.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "responseView": { + // "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", + // "enum": [ + // "VIEW_UNSPECIFIED", + // "BASIC", + // "FULL" + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2beta2/{+name}", + // "response": { + // "$ref": "Task" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.tasks.list": + +type ProjectsLocationsQueuesTasksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the tasks in a queue. +// +// By default response_view is Task.View.BASIC; not all +// information is retrieved by default due to +// performance +// considerations; ListTasksRequest.response_view controls the +// subset of information which is returned. +func (r *ProjectsLocationsQueuesTasksService) List(parent string) *ProjectsLocationsQueuesTasksListCall { + c := &ProjectsLocationsQueuesTasksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort order used for +// the query. The fields supported for sorting +// are Task.schedule_time and PullTaskTarget.tag. All results will +// be +// returned in ascending order. The default ordering is +// by +// Task.schedule_time. +func (c *ProjectsLocationsQueuesTasksListCall) OrderBy(orderBy string) *ProjectsLocationsQueuesTasksListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Fewer tasks than requested might be returned. +// +// The maximum page size is 1000. If unspecified, the page size will +// be the maximum. Fewer tasks than requested might be returned, +// even if more tasks exist; use +// ListTasksResponse.next_page_token to determine if more tasks +// exist. +func (c *ProjectsLocationsQueuesTasksListCall) PageSize(pageSize int64) *ProjectsLocationsQueuesTasksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying the page of results to return. +// +// To request the first page results, page_token must be empty. +// To +// request the next page of results, page_token must be the value +// of +// ListTasksResponse.next_page_token returned from the previous +// call to CloudTasks.ListTasks method. +// +// The page token is valid for only 2 hours. +func (c *ProjectsLocationsQueuesTasksListCall) PageToken(pageToken string) *ProjectsLocationsQueuesTasksListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ResponseView sets the optional parameter "responseView": The +// response_view specifies which subset of the Task will +// be +// returned. +// +// By default response_view is Task.View.BASIC; not all +// information is retrieved by default because some data, such +// as +// payloads, might be desirable to return only when needed because +// of its large size or because of the sensitivity of data that +// it +// contains. +// +// Authorization for Task.View.FULL requires +// `cloudtasks.tasks.fullView` +// [Google IAM](/iam/) permission on the +// Task.name resource. +// +// Possible values: +// "VIEW_UNSPECIFIED" +// "BASIC" +// "FULL" +func (c *ProjectsLocationsQueuesTasksListCall) ResponseView(responseView string) *ProjectsLocationsQueuesTasksListCall { + c.urlParams_.Set("responseView", responseView) + 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 *ProjectsLocationsQueuesTasksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTasksListCall { + 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 *ProjectsLocationsQueuesTasksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsQueuesTasksListCall { + 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 *ProjectsLocationsQueuesTasksListCall) Context(ctx context.Context) *ProjectsLocationsQueuesTasksListCall { + 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 *ProjectsLocationsQueuesTasksListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesTasksListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/tasks") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.tasks.list" call. +// Exactly one of *ListTasksResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListTasksResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsQueuesTasksListCall) Do(opts ...googleapi.CallOption) (*ListTasksResponse, 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 := &ListTasksResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the tasks in a queue.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default due to performance\nconsiderations; ListTasksRequest.response_view controls the\nsubset of information which is returned.", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks", + // "httpMethod": "GET", + // "id": "cloudtasks.projects.locations.queues.tasks.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "orderBy": { + // "description": "\nSort order used for the query. The fields supported for sorting\nare Task.schedule_time and PullTaskTarget.tag. All results will be\nreturned in ascending order. The default ordering is by\nTask.schedule_time.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Fewer tasks than requested might be returned.\n\nThe maximum page size is 1000. If unspecified, the page size will\nbe the maximum. Fewer tasks than requested might be returned,\neven if more tasks exist; use\nListTasksResponse.next_page_token to determine if more tasks\nexist.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying the page of results to return.\n\nTo request the first page results, page_token must be empty. To\nrequest the next page of results, page_token must be the value of\nListTasksResponse.next_page_token returned from the previous\ncall to CloudTasks.ListTasks method.\n\nThe page token is valid for only 2 hours.", + // "format": "byte", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "responseView": { + // "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", + // "enum": [ + // "VIEW_UNSPECIFIED", + // "BASIC", + // "FULL" + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2beta2/{+parent}/tasks", + // "response": { + // "$ref": "ListTasksResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsQueuesTasksListCall) Pages(ctx context.Context, f func(*ListTasksResponse) 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 "cloudtasks.projects.locations.queues.tasks.pull": + +type ProjectsLocationsQueuesTasksPullCall struct { + s *Service + name string + pulltasksrequest *PullTasksRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Pull: Pulls tasks from a pull queue and acquires a lease on them for +// a +// specified PullTasksRequest.lease_duration. +// +// This method is invoked by the lease holder to obtain the +// lease. The lease holder must acknowledge the task +// via +// CloudTasks.AcknowledgeTask after they have performed the +// work +// associated with the task. +// +// The payload is intended to store data that the lease holder needs +// to perform the work associated with the task. To return the +// payloads in the PullTasksResponse, set +// PullTasksRequest.response_view to Task.View.FULL. +func (r *ProjectsLocationsQueuesTasksService) Pull(name string, pulltasksrequest *PullTasksRequest) *ProjectsLocationsQueuesTasksPullCall { + c := &ProjectsLocationsQueuesTasksPullCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.pulltasksrequest = pulltasksrequest + 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 *ProjectsLocationsQueuesTasksPullCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTasksPullCall { + 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 *ProjectsLocationsQueuesTasksPullCall) Context(ctx context.Context) *ProjectsLocationsQueuesTasksPullCall { + 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 *ProjectsLocationsQueuesTasksPullCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesTasksPullCall) 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.pulltasksrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}/tasks:pull") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.tasks.pull" call. +// Exactly one of *PullTasksResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *PullTasksResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsQueuesTasksPullCall) Do(opts ...googleapi.CallOption) (*PullTasksResponse, 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 := &PullTasksResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Pulls tasks from a pull queue and acquires a lease on them for a\nspecified PullTasksRequest.lease_duration.\n\nThis method is invoked by the lease holder to obtain the\nlease. The lease holder must acknowledge the task via\nCloudTasks.AcknowledgeTask after they have performed the work\nassociated with the task.\n\nThe payload is intended to store data that the lease holder needs\nto perform the work associated with the task. To return the\npayloads in the PullTasksResponse, set\nPullTasksRequest.response_view to Task.View.FULL.", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks:pull", + // "httpMethod": "POST", + // "id": "cloudtasks.projects.locations.queues.tasks.pull", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+name}/tasks:pull", + // "request": { + // "$ref": "PullTasksRequest" + // }, + // "response": { + // "$ref": "PullTasksResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.tasks.renewLease": + +type ProjectsLocationsQueuesTasksRenewLeaseCall struct { + s *Service + name string + renewleaserequest *RenewLeaseRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RenewLease: Renew the current lease of a pull task. +// +// The lease holder can use this method to extend the lease by a +// new +// duration, starting from now. The new task lease will be +// returned in Task.schedule_time. +func (r *ProjectsLocationsQueuesTasksService) RenewLease(name string, renewleaserequest *RenewLeaseRequest) *ProjectsLocationsQueuesTasksRenewLeaseCall { + c := &ProjectsLocationsQueuesTasksRenewLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.renewleaserequest = renewleaserequest + 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 *ProjectsLocationsQueuesTasksRenewLeaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTasksRenewLeaseCall { + 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 *ProjectsLocationsQueuesTasksRenewLeaseCall) Context(ctx context.Context) *ProjectsLocationsQueuesTasksRenewLeaseCall { + 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 *ProjectsLocationsQueuesTasksRenewLeaseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesTasksRenewLeaseCall) 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.renewleaserequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}:renewLease") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.tasks.renewLease" call. +// Exactly one of *Task or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Task.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsQueuesTasksRenewLeaseCall) Do(opts ...googleapi.CallOption) (*Task, 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 := &Task{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Renew the current lease of a pull task.\n\nThe lease holder can use this method to extend the lease by a new\nduration, starting from now. The new task lease will be\nreturned in Task.schedule_time.", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:renewLease", + // "httpMethod": "POST", + // "id": "cloudtasks.projects.locations.queues.tasks.renewLease", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+name}:renewLease", + // "request": { + // "$ref": "RenewLeaseRequest" + // }, + // "response": { + // "$ref": "Task" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudtasks.projects.locations.queues.tasks.run": + +type ProjectsLocationsQueuesTasksRunCall struct { + s *Service + name string + runtaskrequest *RunTaskRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Run: Forces a task to run now. +// +// This command is meant to be used for manual debugging. For +// example, CloudTasks.RunTask can be used to retry a failed +// task after a fix has been made or to manually force a task to +// be +// dispatched now. +// +// When this method is called, Cloud Tasks will dispatch the task to +// its +// target, even if the queue is Queue.QueueState.PAUSED. +// +// The dispatched task is returned. That is, the task that is +// returned +// contains the Task.task_status after the task is dispatched but +// before the task is received by its target. +// +// If Cloud Tasks receives a successful response from the +// task's +// handler, then the task will be deleted; otherwise the +// task's +// Task.schedule_time will be reset to the time that +// CloudTasks.RunTask was called plus the retry delay specified +// in the queue and task's RetryConfig. +// +// CloudTasks.RunTask returns google.rpc.Code.NOT_FOUND when +// it is called on a task that has already succeeded or +// permanently +// failed. google.rpc.Code.FAILED_PRECONDITION is returned +// when +// CloudTasks.RunTask is called on task that is dispatched or +// already running. +func (r *ProjectsLocationsQueuesTasksService) Run(name string, runtaskrequest *RunTaskRequest) *ProjectsLocationsQueuesTasksRunCall { + c := &ProjectsLocationsQueuesTasksRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.runtaskrequest = runtaskrequest + 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 *ProjectsLocationsQueuesTasksRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTasksRunCall { + 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 *ProjectsLocationsQueuesTasksRunCall) Context(ctx context.Context) *ProjectsLocationsQueuesTasksRunCall { + 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 *ProjectsLocationsQueuesTasksRunCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesTasksRunCall) 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.runtaskrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}:run") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.tasks.run" call. +// Exactly one of *Task or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Task.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsQueuesTasksRunCall) Do(opts ...googleapi.CallOption) (*Task, 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 := &Task{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Forces a task to run now.\n\nThis command is meant to be used for manual debugging. For\nexample, CloudTasks.RunTask can be used to retry a failed\ntask after a fix has been made or to manually force a task to be\ndispatched now.\n\nWhen this method is called, Cloud Tasks will dispatch the task to its\ntarget, even if the queue is Queue.QueueState.PAUSED.\n\nThe dispatched task is returned. That is, the task that is returned\ncontains the Task.task_status after the task is dispatched but\nbefore the task is received by its target.\n\nIf Cloud Tasks receives a successful response from the task's\nhandler, then the task will be deleted; otherwise the task's\nTask.schedule_time will be reset to the time that\nCloudTasks.RunTask was called plus the retry delay specified\nin the queue and task's RetryConfig.\n\nCloudTasks.RunTask returns google.rpc.Code.NOT_FOUND when\nit is called on a task that has already succeeded or permanently\nfailed. google.rpc.Code.FAILED_PRECONDITION is returned when\nCloudTasks.RunTask is called on task that is dispatched or\nalready running.", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:run", + // "httpMethod": "POST", + // "id": "cloudtasks.projects.locations.queues.tasks.run", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+name}:run", + // "request": { + // "$ref": "RunTaskRequest" + // }, + // "response": { + // "$ref": "Task" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/vendor/google.golang.org/api/cloudtrace/v1/cloudtrace-api.json b/vendor/google.golang.org/api/cloudtrace/v1/cloudtrace-api.json index 5b508cc06..1bce4e846 100644 --- a/vendor/google.golang.org/api/cloudtrace/v1/cloudtrace-api.json +++ b/vendor/google.golang.org/api/cloudtrace/v1/cloudtrace-api.json @@ -1,22 +1,4 @@ { - "canonicalName": "Cloud Trace", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/trace.readonly": { - "description": "Read Trace data for a project or application" - }, - "https://www.googleapis.com/auth/trace.append": { - "description": "Write Trace data for a project or application" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "rootUrl": "https://cloudtrace.googleapis.com/", - "ownerDomain": "google.com", "name": "cloudtrace", "batchPath": "batch", "title": "Stackdriver Trace API", @@ -25,40 +7,38 @@ "projects": { "methods": { "patchTraces": { - "response": { - "$ref": "Empty" + "path": "v1/projects/{projectId}/traces", + "id": "cloudtrace.projects.patchTraces", + "request": { + "$ref": "Traces" }, + "description": "Sends new traces to Stackdriver Trace or updates existing traces. If the ID\nof a trace that you send matches that of an existing trace, any fields\nin the existing trace and its spans are overwritten by the provided values,\nand any new fields provided are merged with the existing trace data. If the\nID does not match, a new trace is created.", + "httpMethod": "PATCH", "parameterOrder": [ "projectId" ], - "httpMethod": "PATCH", + "response": { + "$ref": "Empty" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/trace.append" ], "parameters": { "projectId": { - "location": "path", "description": "ID of the Cloud project where the trace data is stored.", "type": "string", - "required": true + "required": true, + "location": "path" } }, - "flatPath": "v1/projects/{projectId}/traces", - "id": "cloudtrace.projects.patchTraces", - "path": "v1/projects/{projectId}/traces", - "request": { - "$ref": "Traces" - }, - "description": "Sends new traces to Stackdriver Trace or updates existing traces. If the ID\nof a trace that you send matches that of an existing trace, any fields\nin the existing trace and its spans are overwritten by the provided values,\nand any new fields provided are merged with the existing trace data. If the\nID does not match, a new trace is created." + "flatPath": "v1/projects/{projectId}/traces" } }, "resources": { "traces": { "methods": { "get": { - "description": "Gets a single trace by its ID.", - "httpMethod": "GET", "response": { "$ref": "Trace" }, @@ -66,27 +46,29 @@ "projectId", "traceId" ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/trace.readonly" - ], + "httpMethod": "GET", "parameters": { + "projectId": { + "location": "path", + "description": "ID of the Cloud project where the trace data is stored.", + "type": "string", + "required": true + }, "traceId": { "location": "path", "description": "ID of the trace to return.", "type": "string", "required": true - }, - "projectId": { - "description": "ID of the Cloud project where the trace data is stored.", - "type": "string", - "required": true, - "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/trace.readonly" + ], "flatPath": "v1/projects/{projectId}/traces/{traceId}", + "id": "cloudtrace.projects.traces.get", "path": "v1/projects/{projectId}/traces/{traceId}", - "id": "cloudtrace.projects.traces.get" + "description": "Gets a single trace by its ID." }, "list": { "response": { @@ -96,6 +78,10 @@ "projectId" ], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/trace.readonly" + ], "parameters": { "orderBy": { "location": "query", @@ -103,26 +89,20 @@ "type": "string" }, "projectId": { + "location": "path", "description": "ID of the Cloud project where the trace data is stored.", "type": "string", - "required": true, - "location": "path" + "required": true }, "filter": { + "location": "query", "description": "An optional filter against labels for the request.\n\nBy default, searches use prefix matching. To specify exact match, prepend\na plus symbol (`+`) to the search term.\nMultiple terms are ANDed. Syntax:\n\n* `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root\n span starts with `NAME_PREFIX`.\n* `+root:NAME` or `+NAME`: Return traces where any root span's name is\n exactly `NAME`.\n* `span:NAME_PREFIX`: Return traces where any span starts with\n `NAME_PREFIX`.\n* `+span:NAME`: Return traces where any span's name is exactly\n `NAME`.\n* `latency:DURATION`: Return traces whose overall latency is\n greater or equal to than `DURATION`. Accepted units are nanoseconds\n (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For\n example, `latency:24ms` returns traces whose overall latency\n is greater than or equal to 24 milliseconds.\n* `label:LABEL_KEY`: Return all traces containing the specified\n label key (exact match, case-sensitive) regardless of the key:value\n pair's value (including empty values).\n* `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified\n label key (exact match, case-sensitive) whose value starts with\n `VALUE_PREFIX`. Both a key and a value must be specified.\n* `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair\n exactly matching the specified text. Both a key and a value must be\n specified.\n* `method:VALUE`: Equivalent to `/http/method:VALUE`.\n* `url:VALUE`: Equivalent to `/http/url:VALUE`.", - "type": "string", - "location": "query" + "type": "string" }, "endTime": { - "format": "google-datetime", - "description": "End of the time interval (inclusive) during which the trace data was\ncollected from the application.", - "type": "string", - "location": "query" - }, - "startTime": { "location": "query", "format": "google-datetime", - "description": "Start of the time interval (inclusive) during which the trace data was\ncollected from the application.", + "description": "End of the time interval (inclusive) during which the trace data was\ncollected from the application.", "type": "string" }, "pageToken": { @@ -130,11 +110,17 @@ "description": "Token identifying the page of results to return. If provided, use the\nvalue of the `next_page_token` field from a previous request. Optional.", "type": "string" }, - "pageSize": { + "startTime": { "location": "query", + "format": "google-datetime", + "description": "Start of the time interval (inclusive) during which the trace data was\ncollected from the application.", + "type": "string" + }, + "pageSize": { "format": "int32", "description": "Maximum number of traces to return. If not specified or \u003c= 0, the\nimplementation selects a reasonable value. The implementation may\nreturn fewer traces than the requested page size. Optional.", - "type": "integer" + "type": "integer", + "location": "query" }, "view": { "location": "query", @@ -148,10 +134,6 @@ "type": "string" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/trace.readonly" - ], "flatPath": "v1/projects/{projectId}/traces", "id": "cloudtrace.projects.traces.list", "path": "v1/projects/{projectId}/traces", @@ -163,6 +145,48 @@ } }, "parameters": { + "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.", + "type": "string", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, "uploadType": { "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", @@ -174,9 +198,9 @@ "location": "query" }, "callback": { + "location": "query", "description": "JSONP", - "type": "string", - "location": "query" + "type": "string" }, "$.xgafv": { "enumDescriptions": [ @@ -192,6 +216,8 @@ "type": "string" }, "alt": { + "description": "Data format for response.", + "default": "json", "enum": [ "json", "media", @@ -203,50 +229,6 @@ "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], - "location": "query", - "description": "Data format for response.", - "default": "json" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "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.", - "type": "string", - "location": "query" - }, - "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.", - "type": "string", - "location": "query" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", "location": "query" } }, @@ -256,34 +238,17 @@ "description": "Send and retrieve trace data from Stackdriver Trace. Data is generated and available by default for all App Engine applications. Data from other applications can be written to Stackdriver Trace for display, reporting, and analysis.\n", "kind": "discovery#restDescription", "basePath": "", - "documentationLink": "https://cloud.google.com/trace", - "revision": "20170802", "id": "cloudtrace:v1", + "revision": "20170905", + "documentationLink": "https://cloud.google.com/trace", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { - "Traces": { - "description": "List of new or updated traces.", - "type": "object", - "properties": { - "traces": { - "description": "List of traces.", - "items": { - "$ref": "Trace" - }, - "type": "array" - } - }, - "id": "Traces" - }, "TraceSpan": { + "id": "TraceSpan", "description": "A span represents a single timed event within a trace. Spans can be nested\nand form a trace tree. Often, a trace contains a root span that describes the\nend-to-end latency of an operation and, optionally, one or more subspans for\nits suboperations. Spans do not need to be contiguous. There may be gaps\nbetween spans in a trace.", "type": "object", "properties": { - "name": { - "description": "Name of the span. Must be less than 128 bytes. The span name is sanitized\nand displayed in the Stackdriver Trace tool in the\n{% dynamic print site_values.console_name %}.\nThe name may be a method name or some other per-call site name.\nFor the same executable and the same call point, a best practice is\nto use a consistent name, which makes it easier to correlate\ncross-trace spans.", - "type": "string" - }, "spanId": { "format": "uint64", "description": "Identifier for the span. Must be a 64-bit integer other than 0 and\nunique within a trace.", @@ -305,6 +270,8 @@ "type": "string" }, "kind": { + "description": "Distinguishes between spans generated in a particular context. For example,\ntwo spans with the same name may be distinguished using `RPC_CLIENT`\nand `RPC_SERVER` to identify queueing latency associated with the span.", + "type": "string", "enumDescriptions": [ "Unspecified.", "Indicates that the span covers server-side handling of an RPC or other\nremote network request.", @@ -314,19 +281,20 @@ "SPAN_KIND_UNSPECIFIED", "RPC_SERVER", "RPC_CLIENT" - ], - "description": "Distinguishes between spans generated in a particular context. For example,\ntwo spans with the same name may be distinguished using `RPC_CLIENT`\nand `RPC_SERVER` to identify queueing latency associated with the span.", - "type": "string" + ] }, "labels": { + "description": "Collection of labels associated with the span. Label keys must be less than\n128 bytes. Label values must be less than 16 kilobytes (10MB for\n`/stacktrace` values).\n\nSome predefined label keys exist, or you may create your own. When creating\nyour own, we recommend the following formats:\n\n* `/category/product/key` for agents of well-known products (e.g.\n `/db/mongodb/read_size`).\n* `short_host/path/key` for domain-specific keys (e.g.\n `foo.com/myproduct/bar`)\n\nPredefined labels include:\n\n* `/agent`\n* `/component`\n* `/error/message`\n* `/error/name`\n* `/http/client_city`\n* `/http/client_country`\n* `/http/client_protocol`\n* `/http/client_region`\n* `/http/host`\n* `/http/method`\n* `/http/redirected_url`\n* `/http/request/size`\n* `/http/response/size`\n* `/http/status_code`\n* `/http/url`\n* `/http/user_agent`\n* `/pid`\n* `/stacktrace`\n* `/tid`", + "type": "object", "additionalProperties": { "type": "string" - }, - "description": "Collection of labels associated with the span. Label keys must be less than\n128 bytes. Label values must be less than 16 kilobytes (10MB for\n`/stacktrace` values).\n\nSome predefined label keys exist, or you may create your own. When creating\nyour own, we recommend the following formats:\n\n* `/category/product/key` for agents of well-known products (e.g.\n `/db/mongodb/read_size`).\n* `short_host/path/key` for domain-specific keys (e.g.\n `foo.com/myproduct/bar`)\n\nPredefined labels include:\n\n* `/agent`\n* `/component`\n* `/error/message`\n* `/error/name`\n* `/http/client_city`\n* `/http/client_country`\n* `/http/client_protocol`\n* `/http/client_region`\n* `/http/host`\n* `/http/method`\n* `/http/redirected_url`\n* `/http/request/size`\n* `/http/response/size`\n* `/http/status_code`\n* `/http/url`\n* `/http/user_agent`\n* `/pid`\n* `/stacktrace`\n* `/tid`", - "type": "object" + } + }, + "name": { + "description": "Name of the span. Must be less than 128 bytes. The span name is sanitized\nand displayed in the Stackdriver Trace tool in the\n{% dynamic print site_values.console_name %}.\nThe name may be a method name or some other per-call site name.\nFor the same executable and the same call point, a best practice is\nto use a consistent name, which makes it easier to correlate\ncross-trace spans.", + "type": "string" } - }, - "id": "TraceSpan" + } }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", @@ -353,6 +321,7 @@ "id": "ListTracesResponse" }, "Trace": { + "id": "Trace", "description": "A trace describes how long it takes for an application to perform an\noperation. It consists of a set of spans, each of which represent a single\ntimed event within the operation.", "type": "object", "properties": { @@ -371,13 +340,44 @@ "description": "Globally unique identifier for the trace. This identifier is a 128-bit\nnumeric value formatted as a 32-byte hex string.", "type": "string" } - }, - "id": "Trace" + } + }, + "Traces": { + "id": "Traces", + "description": "List of new or updated traces.", + "type": "object", + "properties": { + "traces": { + "description": "List of traces.", + "items": { + "$ref": "Trace" + }, + "type": "array" + } + } } }, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "protocol": "rest" + "protocol": "rest", + "canonicalName": "Cloud Trace", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/trace.append": { + "description": "Write Trace data for a project or application" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/trace.readonly": { + "description": "Read Trace data for a project or application" + } + } + } + }, + "rootUrl": "https://cloudtrace.googleapis.com/", + "ownerDomain": "google.com" } diff --git a/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-api.json b/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-api.json index 3ff65e854..839cd69c2 100644 --- a/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-api.json +++ b/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-api.json @@ -1,305 +1,42 @@ { - "rootUrl": "https://cloudtrace.googleapis.com/", - "ownerDomain": "google.com", - "name": "cloudtrace", - "batchPath": "batch", - "title": "Stackdriver Trace API", - "ownerName": "Google", - "resources": { - "projects": { - "resources": { - "traces": { - "methods": { - "listSpans": { - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "ListSpansResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/trace.readonly" - ], - "parameters": { - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the\npreceding call to this method. `page_token` must be the value of\n`next_page_token` from the previous response. The values of other method\nparameters should be identical to those in the previous call.", - "type": "string", - "location": "query" - }, - "parent": { - "location": "path", - "description": "Required: The resource name of the trace containing the spans to list.\nThe format is `projects/PROJECT_ID/traces/TRACE_ID`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/traces/[^/]+$" - } - }, - "flatPath": "v2/projects/{projectsId}/traces/{tracesId}:listSpans", - "path": "v2/{+parent}:listSpans", - "id": "cloudtrace.projects.traces.listSpans", - "description": "Returns a list of spans within a trace." - }, - "list": { - "flatPath": "v2/projects/{projectsId}/traces", - "id": "cloudtrace.projects.traces.list", - "path": "v2/{+parent}/traces", - "description": "Returns of a list of traces that match the specified filter conditions.", - "response": { - "$ref": "ListTracesResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "parameters": { - "filter": { - "location": "query", - "description": "Opional. Return only traces that match this\n[trace filter](/trace/docs/trace-filters). Example:\n\n \"label:/http/url root:/_ah/background my_label:17\"", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Optional. Do not return traces whose start time is later than this time.", - "type": "string", - "location": "query" - }, - "pageToken": { - "location": "query", - "description": "Optional. If present, then retrieve the next batch of results from the\npreceding call to this method. `page_token` must be the value of\n`next_page_token` from the previous response. The values of other method\nparameters should be identical to those in the previous call.", - "type": "string" - }, - "startTime": { - "location": "query", - "format": "google-datetime", - "description": "Optional. Do not return traces whose end time is earlier than this time.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional. The maximum number of results to return from this request.\nNon-positive values are ignored. The presence of `next_page_token` in the\nresponse indicates that more results might be available, even if fewer than\nthe maximum number of results is returned by this request.", - "type": "integer" - }, - "parent": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "Required. The project where the trace data is stored. The format\nis `projects/PROJECT_ID`.", - "type": "string", - "required": true - }, - "orderBy": { - "description": "Optional. A single field used to sort the returned traces.\nOnly the following field names can be used:\n\n* `trace_id`: the trace's ID field\n* `name`: the root span's resource name\n* `duration`: the difference between the root span's start time and end time\n* `start`: the start time of the root span\n\nSorting is in ascending order unless `desc` is appended to the sort field name.\nExample: `\"name desc\"`).", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/trace.readonly" - ] - }, - "batchWrite": { - "flatPath": "v2/projects/{projectsId}/traces:batchWrite", - "id": "cloudtrace.projects.traces.batchWrite", - "path": "v2/{+name}/traces:batchWrite", - "request": { - "$ref": "BatchWriteSpansRequest" - }, - "description": "Sends new spans to Stackdriver Trace or updates existing traces. If the\nname of a trace that you send matches that of an existing trace, new spans\nare added to the existing trace. Attempt to update existing spans results\nundefined behavior. If the name does not match, a new trace is created\nwith given set of spans.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/trace.append" - ], - "parameters": { - "name": { - "location": "path", - "description": "Required. Name of the project where the spans belong. The format is\n`projects/PROJECT_ID`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - } - } - } - }, - "resources": { - "spans": { - "methods": { - "create": { - "flatPath": "v2/projects/{projectsId}/traces/{tracesId}/spans/{spansId}", - "id": "cloudtrace.projects.traces.spans.create", - "path": "v2/{+name}", - "request": { - "$ref": "Span" - }, - "description": "Creates a new Span.", - "response": { - "$ref": "Span" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PUT", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/trace.append" - ], - "parameters": { - "name": { - "location": "path", - "description": "The resource name of the span in the following format:\n\n projects/[PROJECT_ID]traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project.\n[SPAN_ID] is a unique identifier for a span within a trace,\nassigned when the span is created.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/traces/[^/]+/spans/[^/]+$" - } - } - } - } - } - } - } - } - } - }, - "parameters": { - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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", - "description": "Data format for response.", - "default": "json" - }, - "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.", - "type": "string", - "location": "query" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - } - }, - "version": "v2", - "baseUrl": "https://cloudtrace.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Send and retrieve trace data from Stackdriver Trace. Data is generated and available by default for all App Engine applications. Data from other applications can be written to Stackdriver Trace for display, reporting, and analysis.\n", - "servicePath": "", "basePath": "", - "revision": "20170802", + "revision": "20170905", "documentationLink": "https://cloud.google.com/trace", "id": "cloudtrace:v2", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { "TruncatableString": { - "description": "Represents a string that might be shortened to a specified length.", - "type": "object", "properties": { - "value": { - "description": "The shortened string. For example, if the original string was 500\nbytes long and the limit of the string was 128 bytes, then this\nvalue contains the first 128 bytes of the 500-byte string. Note that\ntruncation always happens on the character boundary, to ensure that\ntruncated string is still valid UTF8. In case of multi-byte characters,\nsize of truncated string can be less than truncation limit.", - "type": "string" - }, "truncatedByteCount": { "format": "int32", "description": "The number of bytes removed from the original string. If this\nvalue is 0, then the string was not shortened.", "type": "integer" + }, + "value": { + "description": "The shortened string. For example, if the original string was 500\nbytes long and the limit of the string was 128 bytes, then this\nvalue contains the first 128 bytes of the 500-byte string. Note that\ntruncation always happens on the character boundary, to ensure that\ntruncated string is still valid UTF8. In case of multi-byte characters,\nsize of truncated string can be less than truncation limit.", + "type": "string" } }, - "id": "TruncatableString" + "id": "TruncatableString", + "description": "Represents a string that might be shortened to a specified length.", + "type": "object" }, "StackTrace": { - "description": "A call stack appearing in a trace.", - "type": "object", "properties": { + "stackFrames": { + "$ref": "StackFrames", + "description": "Stack frames in this stack trace. A maximum of 128 frames are allowed." + }, "stackTraceHashId": { "format": "uint64", "description": "The hash ID is used to conserve network bandwidth for duplicate\nstack traces within a single trace.\n\nOften multiple spans will have identical stack traces.\nThe first occurrence of a stack trace should contain both the\n`stackFrame` content and a value in `stackTraceHashId`.\n\nSubsequent spans within the same request can refer\nto that stack trace by only setting `stackTraceHashId`.", "type": "string" - }, - "stackFrames": { - "description": "Stack frames in this stack trace. A maximum of 128 frames are allowed.", - "$ref": "StackFrames" } }, - "id": "StackTrace" + "id": "StackTrace", + "description": "A call stack appearing in a trace.", + "type": "object" }, "TimeEvent": { "description": "A time-stamped annotation or network event in the Span.", @@ -311,8 +48,8 @@ "type": "string" }, "networkEvent": { - "$ref": "NetworkEvent", - "description": "An event describing an RPC message sent/received on the network." + "description": "An event describing an RPC message sent/received on the network.", + "$ref": "NetworkEvent" }, "annotation": { "description": "One or more key:value pairs.", @@ -322,8 +59,6 @@ "id": "TimeEvent" }, "ListSpansResponse": { - "description": "The response message for the `ListSpans` method.", - "type": "object", "properties": { "nextPageToken": { "description": "If defined, indicates that there might be more spans that match the\nrequest. Pass this as the value of `pageToken` in a subsequent request to\nretrieve additional spans.", @@ -337,15 +72,22 @@ "type": "array" } }, - "id": "ListSpansResponse" + "id": "ListSpansResponse", + "description": "The response message for the `ListSpans` method.", + "type": "object" }, "NetworkEvent": { "description": "An event describing an RPC message sent or received on the network.", "type": "object", "properties": { - "messageSize": { + "messageId": { "format": "uint64", - "description": "The number of bytes sent or received.", + "description": "An identifier for the message, which must be unique in this span.", + "type": "string" + }, + "compressedMessageSize": { + "format": "uint64", + "description": "The number of compressed bytes sent or received.", "type": "string" }, "time": { @@ -353,32 +95,47 @@ "description": "For sent messages, this is the time at which the first bit was sent.\nFor received messages, this is the time at which the last bit was\nreceived.", "type": "string" }, + "uncompressedMessageSize": { + "format": "uint64", + "description": "The number of uncompressed bytes sent or received.", + "type": "string" + }, "type": { - "enumDescriptions": [ - "Unknown event type.", - "Indicates a sent RPC message.", - "Indicates a received RPC message." - ], "enum": [ "TYPE_UNSPECIFIED", "SENT", "RECV" ], "description": "Type of NetworkEvent. Indicates whether the RPC message was sent or\nreceived.", - "type": "string" - }, - "messageId": { - "format": "uint64", - "description": "An identifier for the message, which must be unique in this span.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Unknown event type.", + "Indicates a sent RPC message.", + "Indicates a received RPC message." + ] } }, "id": "NetworkEvent" }, "StackFrame": { - "description": "Represents a single stack frame in a stack trace.", - "type": "object", "properties": { + "columnNumber": { + "format": "int64", + "description": "The column number where the function call appears, if available.\nThis is important in JavaScript because of its anonymous functions.", + "type": "string" + }, + "fileName": { + "$ref": "TruncatableString", + "description": "The name of the source file where the function call appears (up to 256\nbytes)." + }, + "sourceVersion": { + "$ref": "TruncatableString", + "description": "The version of the deployed source code (up to 128 bytes)." + }, + "originalFunctionName": { + "description": "An un-mangled function name, if `function_name` is\n[mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can\nbe fully-qualified (up to 1024 bytes).", + "$ref": "TruncatableString" + }, "functionName": { "description": "The fully-qualified name that uniquely identifies the function or\nmethod that is active in this frame (up to 1024 bytes).", "$ref": "TruncatableString" @@ -389,36 +146,33 @@ "type": "string" }, "loadModule": { - "description": "The binary module from where the code was loaded.", - "$ref": "Module" - }, - "columnNumber": { - "format": "int64", - "description": "The column number where the function call appears, if available.\nThis is important in JavaScript because of its anonymous functions.", - "type": "string" - }, - "fileName": { - "description": "The name of the source file where the function call appears (up to 256\nbytes).", - "$ref": "TruncatableString" - }, - "sourceVersion": { - "$ref": "TruncatableString", - "description": "The version of the deployed source code (up to 128 bytes)." - }, - "originalFunctionName": { - "description": "An un-mangled function name, if `function_name` is\n[mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can\nbe fully-qualified (up to 1024 bytes).", - "$ref": "TruncatableString" + "$ref": "Module", + "description": "The binary module from where the code was loaded." } }, - "id": "StackFrame" + "id": "StackFrame", + "description": "Represents a single stack frame in a stack trace.", + "type": "object" }, "Link": { - "description": "A pointer from the current span to another span in the same trace or in a\ndifferent trace. For example, this can be used in batching operations,\nwhere a single batch handler processes multiple requests from different\ntraces or when the handler receives a request from a different project.", - "type": "object", "properties": { + "type": { + "enum": [ + "TYPE_UNSPECIFIED", + "CHILD_LINKED_SPAN", + "PARENT_LINKED_SPAN" + ], + "description": "The relationship of the current span relative to the linked span.", + "type": "string", + "enumDescriptions": [ + "The relationship of the two spans is unknown.", + "The linked span is a child of the current span.", + "The linked span is a parent of the current span." + ] + }, "attributes": { - "description": "A set of attributes on the link. There is a limit of 32 attributes per\nlink.", - "$ref": "Attributes" + "$ref": "Attributes", + "description": "A set of attributes on the link. There is a limit of 32 attributes per\nlink." }, "traceId": { "description": "`TRACE_ID` identifies a trace within a project.", @@ -427,23 +181,11 @@ "spanId": { "description": "`SPAN_ID` identifies a span within a trace.", "type": "string" - }, - "type": { - "enumDescriptions": [ - "The relationship of the two spans is unknown.", - "The linked span is a child of the current span.", - "The linked span is a parent of the current span." - ], - "enum": [ - "TYPE_UNSPECIFIED", - "CHILD_LINKED_SPAN", - "PARENT_LINKED_SPAN" - ], - "description": "The relationship of the current span relative to the linked span.", - "type": "string" } }, - "id": "Link" + "id": "Link", + "description": "A pointer from the current span to another span in the same trace or in a\ndifferent trace. For example, this can be used in batching operations,\nwhere a single batch handler processes multiple requests from different\ntraces or when the handler receives a request from a different project.", + "type": "object" }, "Annotation": { "properties": { @@ -452,8 +194,8 @@ "description": "A user-supplied message describing the event. The maximum length for\nthe description is 256 bytes." }, "attributes": { - "description": "A set of attributes on the annotation. There is a limit of 4 attributes\nper Annotation.", - "$ref": "Attributes" + "$ref": "Attributes", + "description": "A set of attributes on the annotation. There is a limit of 4 attributes\nper Annotation." } }, "id": "Annotation", @@ -461,8 +203,6 @@ "type": "object" }, "StackFrames": { - "description": "A collection of stack frames, which can be truncated.", - "type": "object", "properties": { "droppedFramesCount": { "format": "int32", @@ -477,21 +217,30 @@ "type": "array" } }, - "id": "StackFrames" + "id": "StackFrames", + "description": "A collection of stack frames, which can be truncated.", + "type": "object" }, "Trace": { - "description": "A trace describes how long it takes for an application to perform some\noperations. It consists of a set of spans, each representing\nan operation and including time information and operation details.", - "type": "object", "properties": { "name": { "description": "The resource name of the trace in the following format:\n\n projects/[PROJECT_ID]/traces/TRACE_ID is a unique identifier for a trace within a project.\nThe ID is assigned when the trace is created.", "type": "string" } }, - "id": "Trace" + "id": "Trace", + "description": "A trace describes how long it takes for an application to perform some\noperations. It consists of a set of spans, each representing\nan operation and including time information and operation details.", + "type": "object" }, "TimeEvents": { + "description": "A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation\non the span, consisting of either user-supplied key:value pairs, or\ndetails of an RPC message sent/received on the network.", + "type": "object", "properties": { + "droppedNetworkEventsCount": { + "format": "int32", + "description": "The number of dropped network events in all the included time events.\nIf the value is 0, then no network events were dropped.", + "type": "integer" + }, "droppedAnnotationsCount": { "format": "int32", "description": "The number of dropped annotations in all the included time events.\nIf the value is 0, then no annotations were dropped.", @@ -503,36 +252,31 @@ "$ref": "TimeEvent" }, "type": "array" - }, - "droppedNetworkEventsCount": { - "format": "int32", - "description": "The number of dropped network events in all the included time events.\nIf the value is 0, then no network events were dropped.", - "type": "integer" } }, - "id": "TimeEvents", - "description": "A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation\non the span, consisting of either user-supplied key:value pairs, or\ndetails of an RPC message sent/received on the network.", - "type": "object" + "id": "TimeEvents" }, "Module": { - "properties": { - "buildId": { - "$ref": "TruncatableString", - "description": "A unique identifier for the module, usually a hash of its\ncontents (up to 128 bytes)." - }, - "module": { - "$ref": "TruncatableString", - "description": "For example: main binary, kernel modules, and dynamic libraries\nsuch as libc.so, sharedlib.so (up to 256 bytes)." - } - }, - "id": "Module", "description": "Binary module.", - "type": "object" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { + "module": { + "description": "For example: main binary, kernel modules, and dynamic libraries\nsuch as libc.so, sharedlib.so (up to 256 bytes).", + "$ref": "TruncatableString" + }, + "buildId": { + "description": "A unique identifier for the module, usually a hash of its\ncontents (up to 128 bytes).", + "$ref": "TruncatableString" + } + }, + "id": "Module" + }, + "Status": { + "properties": { + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, "details": { "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { @@ -548,13 +292,11 @@ "format": "int32", "description": "The status code, which should be an enum value of google.rpc.Code.", "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" } }, - "id": "Status" + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object" }, "BatchWriteSpansRequest": { "description": "The request message for the `BatchWriteSpans` method.", @@ -570,44 +312,14 @@ }, "id": "BatchWriteSpansRequest" }, - "ListTracesResponse": { - "description": "The response message for the `ListTraces` method.", + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "type": "object", - "properties": { - "nextPageToken": { - "description": "If there might be more results than those appearing in this response, then\n`next_page_token` is included. To get the next set of results, call this\nmethod again using the value of `next_page_token` as `page_token`.", - "type": "string" - }, - "traces": { - "description": "List of trace records returned.", - "items": { - "$ref": "Trace" - }, - "type": "array" - } - }, - "id": "ListTracesResponse" + "properties": {}, + "id": "Empty" }, "Span": { - "description": "A span represents a single operation within a trace. Spans can be\nnested to form a trace tree. Often, a trace contains a root span\nthat describes the end-to-end latency, and one or more subspans for\nits sub-operations. A trace can also contain multiple root spans,\nor none at all. Spans do not need to be contiguous—there may be\ngaps or overlaps between spans in a trace.", - "type": "object", "properties": { - "sameProcessAsParentSpan": { - "description": "A highly recommended but not required flag that identifies when a trace\ncrosses a process boundary. True when the parent_span belongs to the\nsame process as the current span.", - "type": "boolean" - }, - "status": { - "description": "An optional final status for this span.", - "$ref": "Status" - }, - "name": { - "description": "The resource name of the span in the following format:\n\n projects/[PROJECT_ID]traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project.\n[SPAN_ID] is a unique identifier for a span within a trace,\nassigned when the span is created.", - "type": "string" - }, - "stackTrace": { - "$ref": "StackTrace", - "description": "Stack trace captured at the start of the span." - }, "parentSpanId": { "description": "The [SPAN_ID] of this span's parent span. If this is a root span,\nthen this field must be empty.", "type": "string" @@ -627,16 +339,16 @@ "description": "A description of the span's operation (up to 128 bytes).\nStackdriver Trace displays the description in the\n{% dynamic print site_values.console_name %}.\nFor example, the display name can be a qualified method name or a file name\nand a line number where the operation is called. A best practice is to use\nthe same display name within an application and at the same call point.\nThis makes it easier to correlate spans in different traces." }, "timeEvents": { - "$ref": "TimeEvents", - "description": "The included time events. There can be up to 32 annotations and 128 network\nevents per span." + "description": "The included time events. There can be up to 32 annotations and 128 network\nevents per span.", + "$ref": "TimeEvents" }, "links": { "description": "A maximum of 128 links are allowed per Span.", "$ref": "Links" }, "attributes": { - "$ref": "Attributes", - "description": "A set of attributes on the span. There is a limit of 32 attributes per\nspan." + "description": "A set of attributes on the span. There is a limit of 32 attributes per\nspan.", + "$ref": "Attributes" }, "spanId": { "description": "The [SPAN_ID] portion of the span's resource name.", @@ -646,19 +358,47 @@ "format": "uint32", "description": "An optional number of child spans that were generated while this span\nwas active. If set, allows implementation to detect missing child spans.", "type": "integer" + }, + "sameProcessAsParentSpan": { + "description": "A highly recommended but not required flag that identifies when a trace\ncrosses a process boundary. True when the parent_span belongs to the\nsame process as the current span.", + "type": "boolean" + }, + "status": { + "description": "An optional final status for this span.", + "$ref": "Status" + }, + "name": { + "description": "The resource name of the span in the following format:\n\n projects/[PROJECT_ID]traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project.\n[SPAN_ID] is a unique identifier for a span within a trace,\nassigned when the span is created.", + "type": "string" + }, + "stackTrace": { + "description": "Stack trace captured at the start of the span.", + "$ref": "StackTrace" } }, - "id": "Span" + "id": "Span", + "description": "A span represents a single operation within a trace. Spans can be\nnested to form a trace tree. Often, a trace contains a root span\nthat describes the end-to-end latency, and one or more subspans for\nits sub-operations. A trace can also contain multiple root spans,\nor none at all. Spans do not need to be contiguous—there may be\ngaps or overlaps between spans in a trace.", + "type": "object" }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "ListTracesResponse": { + "description": "The response message for the `ListTraces` method.", "type": "object", - "properties": {}, - "id": "Empty" + "properties": { + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then\n`next_page_token` is included. To get the next set of results, call this\nmethod again using the value of `next_page_token` as `page_token`.", + "type": "string" + }, + "traces": { + "description": "List of trace records returned.", + "items": { + "$ref": "Trace" + }, + "type": "array" + } + }, + "id": "ListTracesResponse" }, "AttributeValue": { - "description": "The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.", - "type": "object", "properties": { "intValue": { "format": "int64", @@ -674,51 +414,53 @@ "$ref": "TruncatableString" } }, - "id": "AttributeValue" + "id": "AttributeValue", + "description": "The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.", + "type": "object" }, "Attributes": { "description": "A set of attributes, each in the format `[KEY]:[VALUE]`.", "type": "object", "properties": { - "droppedAttributesCount": { - "format": "int32", - "description": "The number of attributes that were discarded. Attributes can be discarded\nbecause their keys are too long or because there are too many attributes.\nIf this value is 0 then all attributes are valid.", - "type": "integer" - }, "attributeMap": { "additionalProperties": { "$ref": "AttributeValue" }, "description": "The set of attributes. Each attribute's key can be up to 128 bytes\nlong. The value can be a string up to 256 bytes, an integer, or the\nBoolean values `true` and `false`. For example:\n\n \"/instance_id\": \"my-instance\"\n \"/http/user_agent\": \"\"\n \"/http/request_bytes\": 300\n \"abc.com/myattribute\": true", "type": "object" + }, + "droppedAttributesCount": { + "format": "int32", + "description": "The number of attributes that were discarded. Attributes can be discarded\nbecause their keys are too long or because there are too many attributes.\nIf this value is 0 then all attributes are valid.", + "type": "integer" } }, "id": "Attributes" }, "Links": { - "description": "A collection of links, which are references from this span to a span\nin the same or different trace.", - "type": "object", "properties": { + "droppedLinksCount": { + "format": "int32", + "description": "The number of dropped links after the maximum size was enforced. If\nthis value is 0, then no links were dropped.", + "type": "integer" + }, "link": { "description": "A collection of links.", "items": { "$ref": "Link" }, "type": "array" - }, - "droppedLinksCount": { - "format": "int32", - "description": "The number of dropped links after the maximum size was enforced. If\nthis value is 0, then no links were dropped.", - "type": "integer" } }, - "id": "Links" + "id": "Links", + "description": "A collection of links, which are references from this span to a span\nin the same or different trace.", + "type": "object" } }, "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, "canonicalName": "Cloud Trace", "auth": { @@ -735,5 +477,268 @@ } } } - } + }, + "rootUrl": "https://cloudtrace.googleapis.com/", + "ownerDomain": "google.com", + "name": "cloudtrace", + "batchPath": "batch", + "title": "Stackdriver Trace API", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "traces": { + "methods": { + "list": { + "description": "Returns of a list of traces that match the specified filter conditions.", + "response": { + "$ref": "ListTracesResponse" + }, + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/trace.readonly" + ], + "parameters": { + "parent": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The project where the trace data is stored. The format\nis `projects/PROJECT_ID`.", + "type": "string", + "required": true + }, + "orderBy": { + "location": "query", + "description": "Optional. A single field used to sort the returned traces.\nOnly the following field names can be used:\n\n* `trace_id`: the trace's ID field\n* `name`: the root span's resource name\n* `duration`: the difference between the root span's start time and end time\n* `start`: the start time of the root span\n\nSorting is in ascending order unless `desc` is appended to the sort field name.\nExample: `\"name desc\"`).", + "type": "string" + }, + "filter": { + "location": "query", + "description": "Opional. Return only traces that match this\n[trace filter](/trace/docs/trace-filters). Example:\n\n \"label:/http/url root:/_ah/background my_label:17\"", + "type": "string" + }, + "endTime": { + "location": "query", + "format": "google-datetime", + "description": "Optional. Do not return traces whose start time is later than this time.", + "type": "string" + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the\npreceding call to this method. `page_token` must be the value of\n`next_page_token` from the previous response. The values of other method\nparameters should be identical to those in the previous call.", + "type": "string", + "location": "query" + }, + "startTime": { + "format": "google-datetime", + "description": "Optional. Do not return traces whose end time is earlier than this time.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional. The maximum number of results to return from this request.\nNon-positive values are ignored. The presence of `next_page_token` in the\nresponse indicates that more results might be available, even if fewer than\nthe maximum number of results is returned by this request.", + "type": "integer" + } + }, + "flatPath": "v2/projects/{projectsId}/traces", + "id": "cloudtrace.projects.traces.list", + "path": "v2/{+parent}/traces" + }, + "batchWrite": { + "path": "v2/{+name}/traces:batchWrite", + "id": "cloudtrace.projects.traces.batchWrite", + "description": "Sends new spans to Stackdriver Trace or updates existing traces. If the\nname of a trace that you send matches that of an existing trace, new spans\nare added to the existing trace. Attempt to update existing spans results\nundefined behavior. If the name does not match, a new trace is created\nwith given set of spans.", + "request": { + "$ref": "BatchWriteSpansRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "name": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. Name of the project where the spans belong. The format is\n`projects/PROJECT_ID`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/trace.append" + ], + "flatPath": "v2/projects/{projectsId}/traces:batchWrite" + }, + "listSpans": { + "response": { + "$ref": "ListSpansResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the\npreceding call to this method. `page_token` must be the value of\n`next_page_token` from the previous response. The values of other method\nparameters should be identical to those in the previous call.", + "type": "string" + }, + "parent": { + "pattern": "^projects/[^/]+/traces/[^/]+$", + "location": "path", + "description": "Required: The resource name of the trace containing the spans to list.\nThe format is `projects/PROJECT_ID/traces/TRACE_ID`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/trace.readonly" + ], + "flatPath": "v2/projects/{projectsId}/traces/{tracesId}:listSpans", + "id": "cloudtrace.projects.traces.listSpans", + "path": "v2/{+parent}:listSpans", + "description": "Returns a list of spans within a trace." + } + }, + "resources": { + "spans": { + "methods": { + "create": { + "response": { + "$ref": "Span" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/trace.append" + ], + "parameters": { + "name": { + "description": "The resource name of the span in the following format:\n\n projects/[PROJECT_ID]traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project.\n[SPAN_ID] is a unique identifier for a span within a trace,\nassigned when the span is created.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/traces/[^/]+/spans/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2/projects/{projectsId}/traces/{tracesId}/spans/{spansId}", + "id": "cloudtrace.projects.traces.spans.create", + "path": "v2/{+name}", + "request": { + "$ref": "Span" + }, + "description": "Creates a new Span." + } + } + } + } + } + } + } + }, + "parameters": { + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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" + }, + "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.", + "type": "string", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + } + }, + "version": "v2", + "baseUrl": "https://cloudtrace.googleapis.com/", + "description": "Send and retrieve trace data from Stackdriver Trace. Data is generated and available by default for all App Engine applications. Data from other applications can be written to Stackdriver Trace for display, reporting, and analysis.\n", + "kind": "discovery#restDescription", + "servicePath": "" } diff --git a/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-gen.go b/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-gen.go index b49d89d0c..c939e713f 100644 --- a/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-gen.go +++ b/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-gen.go @@ -481,13 +481,14 @@ func (s *Module) MarshalJSON() ([]byte, error) { // NetworkEvent: An event describing an RPC message sent or received on // the network. type NetworkEvent struct { + // CompressedMessageSize: The number of compressed bytes sent or + // received. + CompressedMessageSize uint64 `json:"compressedMessageSize,omitempty,string"` + // MessageId: An identifier for the message, which must be unique in // this span. MessageId uint64 `json:"messageId,omitempty,string"` - // MessageSize: The number of bytes sent or received. - MessageSize uint64 `json:"messageSize,omitempty,string"` - // Time: For sent messages, this is the time at which the first bit was // sent. // For received messages, this is the time at which the last bit @@ -505,20 +506,26 @@ type NetworkEvent struct { // "RECV" - Indicates a received RPC message. Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "MessageId") 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. + // UncompressedMessageSize: The number of uncompressed bytes sent or + // received. + UncompressedMessageSize uint64 `json:"uncompressedMessageSize,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. + // "CompressedMessageSize") 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. "MessageId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "CompressedMessageSize") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json b/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json index 00938eb6b..44a4aa0be 100644 --- a/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json +++ b/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/2ZSRpzMc2ShKN_p23rokDFE50Rk\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/uFTt97abW_FhxmBGi55KrscaFiw\"", "discoveryVersion": "v1", "id": "compute:alpha", "name": "compute", "version": "alpha", - "revision": "20170721", + "revision": "20170816", "title": "Compute Engine API", "description": "Creates and runs virtual machines on Google Cloud Platform.", "ownerDomain": "google.com", @@ -182,6 +182,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -213,6 +282,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -513,6 +651,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -544,6 +751,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -959,6 +1235,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -990,6 +1335,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -1158,6 +1572,22 @@ "description": "The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.", "format": "int32" }, + "mode": { + "type": "string", + "description": "Defines operating mode for this policy.", + "enum": [ + "OFF", + "ON", + "ONLY_DOWN", + "ONLY_UP" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ] + }, "queueBasedScaling": { "$ref": "AutoscalingPolicyQueueBasedScaling", "description": "Configuration parameters of autoscaling based on queuing system." @@ -1419,6 +1849,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -1465,11 +1964,6 @@ "type": "boolean", "description": "If true, enable Cloud CDN for this BackendService.\n\nWhen the load balancing scheme is INTERNAL, this field is not used." }, - "failoverRatio": { - "type": "number", - "description": "The value of the field must be in [0, 1]. If set, 'backends[].failover' must be set. They together define the fallback behavior of the primary backend: if the ratio of the healthy VMs in the primary backend is at or below this number, traffic arriving at the load-balanced IP will be directed to the failover backend.\n\nIn case where 'failoverRatio' is not set or all the VMs in the backup backend are unhealthy, the traffic will be directed back to the primary backend in the \"force\" mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy.\n\nThis field is only used with l4 load balancing.", - "format": "float" - }, "fingerprint": { "type": "string", "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService.", @@ -1477,7 +1971,7 @@ }, "healthChecks": { "type": "array", - "description": "The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for GCE backend services. A health check must not be specified for GAE app backend and Cloud Function backend.\n\nFor internal load balancing, a URL to a HealthCheck resource must be specified instead.", + "description": "The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for Compute Engine backend services. A health check must not be specified for App Engine backend and Cloud Function backend.\n\nFor internal load balancing, a URL to a HealthCheck resource must be specified instead.", "items": { "type": "string" } @@ -1497,6 +1991,7 @@ }, "loadBalancingScheme": { "type": "string", + "description": "Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. Possible values are INTERNAL and EXTERNAL.", "enum": [ "EXTERNAL", "INTERNAL", @@ -1608,6 +2103,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -1699,6 +2263,84 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, + "BackendServiceReference": { + "id": "BackendServiceReference", + "type": "object", + "properties": { + "backendService": { + "type": "string" } } }, @@ -1967,6 +2609,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -1998,6 +2709,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -2447,6 +3227,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -2478,6 +3327,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -2574,6 +3492,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -2605,6 +3592,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -3009,6 +4065,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -3214,6 +4339,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -3245,6 +4439,84 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, + "ForwardingRuleReference": { + "id": "ForwardingRuleReference", + "type": "object", + "properties": { + "forwardingRule": { + "type": "string" } } }, @@ -3634,6 +4906,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -3678,6 +5019,40 @@ } } }, + "HealthStatusForNetworkEndpoint": { + "id": "HealthStatusForNetworkEndpoint", + "type": "object", + "properties": { + "backendService": { + "$ref": "BackendServiceReference", + "description": "URL of the backend service associated with the health state of the network endpoint." + }, + "forwardingRule": { + "$ref": "ForwardingRuleReference", + "description": "URL of the forwarding rule associated with the health state of the network endpoint." + }, + "healthCheck": { + "$ref": "HealthCheckReference", + "description": "URL of the health check associated with the health state of the network endpoint." + }, + "healthState": { + "type": "string", + "description": "Health state of the network endpoint determined based on the health checks configured.", + "enum": [ + "DRAINING", + "HEALTHY", + "UNHEALTHY", + "UNKNOWN" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ] + } + } + }, "Host": { "id": "Host", "type": "object", @@ -3787,6 +5162,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -3818,6 +5262,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -3932,6 +5445,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -3963,6 +5545,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -4225,6 +5876,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -4323,6 +6043,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -4528,6 +6317,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -4625,7 +6483,7 @@ }, "networkInterfaces": { "type": "array", - "description": "An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one interface is supported per instance.", + "description": "An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance.", "items": { "$ref": "NetworkInterface" } @@ -4715,6 +6573,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -4817,6 +6744,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -4848,6 +6844,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -4959,7 +7024,7 @@ }, "serviceAccount": { "type": "string", - "description": "Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used." + "description": "[Output Only] 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." }, "statefulPolicy": { "$ref": "InstanceGroupManagerStatefulPolicy", @@ -5162,6 +7227,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -5212,6 +7346,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -5448,6 +7651,75 @@ "nextPageToken": { "type": "string", "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." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -5655,6 +7927,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -5817,6 +8158,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -5848,6 +8258,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -6025,6 +8504,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -6244,6 +8792,13 @@ "type": "boolean", "description": "Administrative status of the interconnect. When this is set to ?true?, the Interconnect is functional and may carry traffic (assuming there are functional InterconnectAttachments and other requirements are satisfied). When set to ?false?, no packets will be carried over this Interconnect and no BGP routes will be exchanged over it. By default, it is set to ?true?." }, + "circuitInfos": { + "type": "array", + "description": "[Output Only] List of CircuitInfo objects, that describe the individual circuits in this LAG.", + "items": { + "$ref": "InterconnectCircuitInfo" + } + }, "connectionAuthorization": { "type": "string", "description": "[Output Only] URL to retrieve the Letter Of Authority and Customer Facility Assignment (LOA-CFA) documentation relating to this Interconnect. This documentation authorizes the facility provider to connect to the specified crossconnect ports." @@ -6462,6 +9017,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -6493,6 +9117,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -6590,6 +9283,25 @@ } } }, + "InterconnectCircuitInfo": { + "id": "InterconnectCircuitInfo", + "type": "object", + "description": "Describes a single physical circuit between the Customer and Google. CircuitInfo objects are created by Google, so all fields are output only. Next id: 4", + "properties": { + "customerDemarcId": { + "type": "string", + "description": "Customer-side demarc ID for this circuit. This will only be set if it was provided by the Customer to Google during circuit turn-up." + }, + "googleCircuitId": { + "type": "string", + "description": "Google-assigned unique ID for this circuit. Assigned at circuit turn-up." + }, + "googleDemarcId": { + "type": "string", + "description": "Google-side demarc ID for this circuit. Assigned at circuit turn-up and provided by Google to the customer in the LOA." + } + } + }, "InterconnectList": { "id": "InterconnectList", "type": "object", @@ -6618,6 +9330,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -6731,6 +9512,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -6756,6 +9606,10 @@ "" ] }, + "region": { + "type": "string", + "description": "URL for the region of this location." + }, "regionKey": { "type": "string", "description": "Scope key for the region of this location." @@ -6873,6 +9727,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -6931,6 +9854,87 @@ } } }, + "LicenseCode": { + "id": "LicenseCode", + "type": "object", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "[Output Only] Description of this License Code." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#licenseCode for licenses.", + "default": "compute#licenseCode" + }, + "licenseAlias": { + "type": "array", + "description": "[Output Only] URL and description aliases of Licenses with the same License Code.", + "items": { + "$ref": "LicenseCodeLicenseAlias" + } + }, + "name": { + "type": "string", + "description": "[Output Only] Name of the resource. The name is 1-20 characters long and must be a valid 64 bit integer.", + "pattern": "[0-9]{0,20}?", + "annotations": { + "required": [ + "compute.licenses.insert" + ] + } + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + }, + "state": { + "type": "string", + "description": "[Output Only] Current state of this License Code.", + "enum": [ + "DISABLED", + "ENABLED", + "RESTRICTED", + "STATE_UNSPECIFIED", + "TERMINATED" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ] + }, + "transferable": { + "type": "boolean", + "description": "[Output Only] If true, the license will remain attached when creating images or snapshots from disks. Otherwise, the license is not transferred." + } + } + }, + "LicenseCodeLicenseAlias": { + "id": "LicenseCodeLicenseAlias", + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "[Output Only] Description of this License Code." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] URL of license corresponding to this License Code." + } + } + }, "LicenseResourceRequirements": { "id": "LicenseResourceRequirements", "type": "object", @@ -6969,6 +9973,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -6984,6 +10057,10 @@ "counter": { "$ref": "LogConfigCounterOptions", "description": "Counter options." + }, + "dataAccess": { + "$ref": "LogConfigDataAccessOptions", + "description": "Data access options." } } }, @@ -7015,7 +10092,7 @@ "LogConfigCounterOptions": { "id": "LogConfigCounterOptions", "type": "object", - "description": "Options for counters", + "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", "properties": { "field": { "type": "string", @@ -7027,6 +10104,25 @@ } } }, + "LogConfigDataAccessOptions": { + "id": "LogConfigDataAccessOptions", + "type": "object", + "description": "Write a Data Access (Gin) log", + "properties": { + "logMode": { + "type": "string", + "description": "Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.", + "enum": [ + "LOG_FAIL_CLOSED", + "LOG_MODE_UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "" + ] + } + } + }, "MachineType": { "id": "MachineType", "type": "object", @@ -7121,6 +10217,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -7152,6 +10317,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -7377,36 +10611,6 @@ "$ref": "ManagedInstanceOverrideDiskOverride" } }, - "metadata": { - "type": "array", - "description": "Metadata overrides defined for this instance.", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.", - "pattern": "[a-zA-Z0-9-_]{1,128}", - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - } - }, - "value": { - "type": "string", - "description": "Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).", - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - } - } - } - } - }, "origin": { "type": "string", "description": "[Output Only] Indicates where does the override come from.", @@ -7619,6 +10823,549 @@ } } }, + "NetworkEndpoint": { + "id": "NetworkEndpoint", + "type": "object", + "description": "The network endpoint.", + "properties": { + "instance": { + "type": "string", + "description": "The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP and GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.\n\nThe name must be 1-63 characters long, and comply with RFC1035." + }, + "ipAddress": { + "type": "string", + "description": "Optional IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to will be used." + }, + "port": { + "type": "integer", + "description": "Optional port number of network endpoint. If not specified and the NetworkEndpointGroup.network_endpoint_type is GCE_IP_PORT, the defaultPort for the network endpoint group will be used.", + "format": "int32" + } + } + }, + "NetworkEndpointGroup": { + "id": "NetworkEndpointGroup", + "type": "object", + "description": "Represents a collection of network endpoints.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "An optional description of this resource. Provide this property when you create the resource." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint group.", + "default": "compute#networkEndpointGroup" + }, + "loadBalancer": { + "$ref": "NetworkEndpointGroupLbNetworkEndpointGroup", + "description": "This field is only valid when the network endpoint group type is LOAD_BALANCING." + }, + "name": { + "type": "string", + "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." + }, + "networkEndpointType": { + "type": "string", + "description": "Type of network endpoints in this network endpoint group. Only supported values for LOAD_BALANCING are GCE_VM_IP or GCE_VM_IP_PORT.", + "enum": [ + "GCE_VM_IP_PORT" + ], + "enumDescriptions": [ + "" + ] + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + }, + "size": { + "type": "integer", + "description": "[Output only] Number of network endpoints in the network endpoint group.", + "format": "int32" + }, + "type": { + "type": "string", + "description": "Specify the type of this network endpoint group. Only LOAD_BALANCING is valid for now.", + "enum": [ + "LOAD_BALANCING" + ], + "enumDescriptions": [ + "" + ] + } + } + }, + "NetworkEndpointGroupAggregatedList": { + "id": "NetworkEndpointGroupAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "object", + "description": "A list of NetworkEndpointGroupsScopedList resources.", + "additionalProperties": { + "$ref": "NetworkEndpointGroupsScopedList", + "description": "The name of the scope that contains this set of network endpoint groups." + } + }, + "kind": { + "type": "string", + "description": "[Output Only] The resource type, which is always compute#networkEndpointGroupAggregatedList for aggregated lists of network endpoint groups.", + "default": "compute#networkEndpointGroupAggregatedList" + }, + "nextPageToken": { + "type": "string", + "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." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, + "NetworkEndpointGroupLbNetworkEndpointGroup": { + "id": "NetworkEndpointGroupLbNetworkEndpointGroup", + "type": "object", + "description": "Load balancing specific fields for network endpoint group of type LOAD_BALANCING.", + "properties": { + "defaultPort": { + "type": "integer", + "description": "The default port used if the port number is not specified in the network endpoint. If the network endpoint type is GCE_VM_IP, this field must not be specified.", + "format": "int32" + }, + "network": { + "type": "string", + "description": "The URL of the network to which all network endpoints in the NEG belong. Uses \"default\" project network if unspecified." + }, + "subnetwork": { + "type": "string", + "description": "Optional URL of the subnetwork to which all network endpoints in the NEG belong." + }, + "zone": { + "type": "string", + "description": "[Output Only] The URL of the zone where the network endpoint group is located." + } + } + }, + "NetworkEndpointGroupList": { + "id": "NetworkEndpointGroupList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "array", + "description": "A list of NetworkEndpointGroup resources.", + "items": { + "$ref": "NetworkEndpointGroup" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] The resource type, which is always compute#networkEndpointGroupList for network endpoint group lists.", + "default": "compute#networkEndpointGroupList" + }, + "nextPageToken": { + "type": "string", + "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." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, + "NetworkEndpointGroupsAttachEndpointsRequest": { + "id": "NetworkEndpointGroupsAttachEndpointsRequest", + "type": "object", + "properties": { + "networkEndpoints": { + "type": "array", + "description": "The list of network endpoints to be attached.", + "items": { + "$ref": "NetworkEndpoint" + } + } + } + }, + "NetworkEndpointGroupsDetachEndpointsRequest": { + "id": "NetworkEndpointGroupsDetachEndpointsRequest", + "type": "object", + "properties": { + "networkEndpoints": { + "type": "array", + "description": "The list of network endpoints to be detached.", + "items": { + "$ref": "NetworkEndpoint" + } + } + } + }, + "NetworkEndpointGroupsListEndpointsRequest": { + "id": "NetworkEndpointGroupsListEndpointsRequest", + "type": "object", + "properties": { + "healthStatus": { + "type": "string", + "description": "Optional query parameter for showing the health status of each network endpoint. Valid options are SKIP or SHOW. If you don't specifiy this parameter, the health status of network endpoints will not be provided.", + "enum": [ + "SHOW", + "SKIP" + ], + "enumDescriptions": [ + "", + "" + ] + } + } + }, + "NetworkEndpointGroupsListNetworkEndpoints": { + "id": "NetworkEndpointGroupsListNetworkEndpoints", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "array", + "description": "A list of NetworkEndpointWithHealthStatus resources.", + "items": { + "$ref": "NetworkEndpointWithHealthStatus" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] The resource type, which is always compute#networkEndpointGroupsListNetworkEndpoints for the list of network endpoints in the specified network endpoint group.", + "default": "compute#networkEndpointGroupsListNetworkEndpoints" + }, + "nextPageToken": { + "type": "string", + "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." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, + "NetworkEndpointGroupsScopedList": { + "id": "NetworkEndpointGroupsScopedList", + "type": "object", + "properties": { + "networkEndpointGroups": { + "type": "array", + "description": "[Output Only] The list of network endpoint groups that are contained in this scope.", + "items": { + "$ref": "NetworkEndpointGroup" + } + }, + "warning": { + "type": "object", + "description": "[Output Only] An informational warning that replaces the list of network endpoint groups when the list is empty.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, + "NetworkEndpointWithHealthStatus": { + "id": "NetworkEndpointWithHealthStatus", + "type": "object", + "properties": { + "healths": { + "type": "array", + "description": "[Output only] The health status of network endpoint;", + "items": { + "$ref": "HealthStatusForNetworkEndpoint" + } + }, + "networkEndpoint": { + "$ref": "NetworkEndpoint", + "description": "[Output only] The network endpoint;" + } + } + }, "NetworkInterface": { "id": "NetworkInterface", "type": "object", @@ -7694,6 +11441,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -8012,6 +11828,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -8043,6 +11928,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -8333,7 +12287,7 @@ }, "resources": { "type": "array", - "description": "Serive resources (a.k.a service projects) attached to this project as their shared VPC host.", + "description": "Service resources (a.k.a service projects) attached to this project as their shared VPC host.", "items": { "$ref": "XpnResourceId" } @@ -8390,6 +12344,7 @@ "INSTANCE_GROUPS", "INSTANCE_GROUP_MANAGERS", "INSTANCE_TEMPLATES", + "INTERCONNECTS", "IN_USE_ADDRESSES", "LOCAL_SSD_TOTAL_GB", "NETWORKS", @@ -8461,6 +12416,7 @@ "", "", "", + "", "" ] }, @@ -8586,6 +12542,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -8616,6 +12641,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -8658,6 +12752,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -8703,6 +12866,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -8806,6 +13038,75 @@ "nextPageToken": { "type": "string", "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." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -8906,6 +13207,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -8978,6 +13348,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -9240,6 +13679,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -9294,6 +13802,13 @@ ] } }, + "nats": { + "type": "array", + "description": "List of Nat services created in this router. The maximum number of Nat services within a Router is 3 for Alpha.", + "items": { + "$ref": "RouterNat" + } + }, "network": { "type": "string", "description": "URI of the network to which this router belongs.", @@ -9357,6 +13872,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -9519,6 +14103,169 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, + "RouterNat": { + "id": "RouterNat", + "type": "object", + "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.", + "properties": { + "autoAllocatedNatIps": { + "type": "array", + "description": "[Output Only] List of IPs allocated automatically by GCP for this Nat service. They will be raw IP strings like \"179.12.26.133\". They are ephemeral IPs allocated from the IP blocks managed by the NAT manager. This list can grow and shrink based on the number of VMs configured to use NAT.", + "items": { + "type": "string" + } + }, + "name": { + "type": "string", + "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])?" + }, + "natIpAllocateOption": { + "type": "string", + "description": "Specify the NatIpAllocateOption. If it is AUTO_ONLY, then nat_ip should be empty.", + "enum": [ + "AUTO_ONLY", + "MANUAL_ONLY" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "natIps": { + "type": "array", + "description": "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" + } + }, + "sourceSubnetworkIpRangesToNat": { + "type": "string", + "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": [ + "", + "", + "" + ] + }, + "subnetworks": { + "type": "array", + "description": "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" + } + } + } + }, + "RouterNatSubnetworkToNat": { + "id": "RouterNatSubnetworkToNat", + "type": "object", + "description": "Defines the IP ranges that want to use NAT for a subnetwork.", + "properties": { + "name": { + "type": "string", + "description": "URL for the subnetwork resource to use NAT." + }, + "secondaryIpRangeNames": { + "type": "array", + "description": "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" + } + }, + "sourceIpRangesToNats": { + "type": "array", + "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": { + "type": "string", + "enum": [ + "ALL_IP_RANGES", + "LIST_OF_SECONDARY_IP_RANGES", + "PRIMARY_IP_RANGE" + ], + "enumDescriptions": [ + "", + "", + "" + ] + } } } }, @@ -9546,6 +14293,12 @@ "$ref": "RouterStatusBgpPeerStatus" } }, + "natStatus": { + "type": "array", + "items": { + "$ref": "RouterStatusNatStatus" + } + }, "network": { "type": "string", "description": "URI of the network to which this router belongs." @@ -9612,6 +14365,48 @@ } } }, + "RouterStatusNatStatus": { + "id": "RouterStatusNatStatus", + "type": "object", + "description": "Status of a NAT contained in this router.", + "properties": { + "autoAllocatedNatIps": { + "type": "array", + "description": "List of IPs auto-allocated for NAT. Example: [\"1.1.1.1\", \"129.2.16.89\"]", + "items": { + "type": "string" + } + }, + "minExtraNatIpsNeeded": { + "type": "integer", + "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" + }, + "name": { + "type": "string", + "description": "Unique name of this NAT." + }, + "numVmEndpointsWithNatMappings": { + "type": "integer", + "description": "Number of VM endpoints (i.e., Nics) that can use NAT.", + "format": "int32" + }, + "userAllocatedNatIpResources": { + "type": "array", + "description": "List of fully qualified URLs of reserved IP address resources.", + "items": { + "type": "string" + } + }, + "userAllocatedNatIps": { + "type": "array", + "description": "List of IPs user-allocated for NAT. They will be raw IP strings like \"179.12.26.133\".", + "items": { + "type": "string" + } + } + } + }, "RouterStatusResponse": { "id": "RouterStatusResponse", "type": "object", @@ -9869,6 +14664,75 @@ "nextPageToken": { "type": "string", "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." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -9942,7 +14806,7 @@ }, "kind": { "type": "string", - "description": "[Output only] Type of the resource. Always compute#rulefor security policies", + "description": "[Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules", "default": "compute#securityPolicyRule" }, "match": { @@ -9965,6 +14829,10 @@ "type": "object", "description": "Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified.", "properties": { + "config": { + "$ref": "SecurityPolicyRuleMatcherConfig", + "description": "The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified." + }, "srcIpRanges": { "type": "array", "description": "CIDR IP address range. Only IPv4 is supported.", @@ -9978,6 +14846,31 @@ "items": { "type": "string" } + }, + "versionedExpr": { + "type": "string", + "description": "Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.", + "enum": [ + "SRC_IPS_V1", + "VERSIONED_EXPR_UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "" + ] + } + } + }, + "SecurityPolicyRuleMatcherConfig": { + "id": "SecurityPolicyRuleMatcherConfig", + "type": "object", + "properties": { + "srcIpRanges": { + "type": "array", + "description": "CIDR IP address range. Only IPv4 is supported.", + "items": { + "type": "string" + } } } }, @@ -10190,6 +15083,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -10263,6 +15225,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -10364,6 +15395,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -10395,6 +15495,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -10634,6 +15803,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -10761,6 +15999,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -10844,6 +16151,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -10875,6 +16251,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -11067,6 +16512,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -11115,6 +16629,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -11391,6 +16974,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -11500,6 +17152,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -11613,6 +17334,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -11644,6 +17434,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -11888,6 +17747,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -12146,6 +18074,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -12177,6 +18174,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -12289,6 +18355,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -12403,6 +18538,75 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for this resource." + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } } } }, @@ -13192,8 +19396,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -13465,7 +19668,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", "location": "path" } }, @@ -13602,8 +19805,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "setIamPolicy": { @@ -13623,7 +19825,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", "location": "path" } }, @@ -13659,7 +19861,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -14085,8 +20287,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "setSecurityPolicy": { @@ -14146,7 +20347,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -14228,7 +20429,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -15121,8 +21322,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -15142,7 +21342,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -15488,8 +21688,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "setLabels": { @@ -15846,7 +22045,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -16062,8 +22261,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "setLabels": { @@ -16160,7 +22358,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -16542,8 +22740,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -16563,7 +22760,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -17342,8 +23539,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -17363,7 +23559,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -17620,8 +23816,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -17641,7 +23836,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -17766,7 +23961,7 @@ }, "requestId": { "type": "string", - "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 then 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.", + "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" } }, @@ -17870,7 +24065,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", "location": "path" } }, @@ -17994,7 +24189,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", "location": "path" } }, @@ -18066,7 +24261,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -18663,8 +24858,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "recreateInstances": { @@ -19067,7 +25261,7 @@ }, "requestId": { "type": "string", - "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "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" }, "zone": { @@ -19753,7 +25947,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -21670,6 +27864,50 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "setIamPolicy": { + "id": "compute.interconnectAttachments.setIamPolicy", + "path": "{project}/regions/{region}/interconnectAttachments/{resource}/setIamPolicy", + "httpMethod": "POST", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "resource" + ], + "request": { + "$ref": "Policy" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "testIamPermissions": { "id": "compute.interconnectAttachments.testIamPermissions", "path": "{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions", @@ -21819,7 +28057,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -21915,6 +28153,40 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getIamPolicy": { + "id": "compute.interconnects.getIamPolicy", + "path": "{project}/global/interconnects/{resource}/getIamPolicy", + "httpMethod": "GET", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "insert": { "id": "compute.interconnects.insert", "path": "{project}/global/interconnects", @@ -22035,8 +28307,43 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" + ] + }, + "setIamPolicy": { + "id": "compute.interconnects.setIamPolicy", + "path": "{project}/global/interconnects/{resource}/setIamPolicy", + "httpMethod": "POST", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "request": { + "$ref": "Policy" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -22056,7 +28363,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -22078,6 +28385,44 @@ } } }, + "licenseCodes": { + "methods": { + "get": { + "id": "compute.licenseCodes.get", + "path": "{project}/global/licenseCodes/{licenseCode}", + "httpMethod": "GET", + "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code.", + "parameters": { + "licenseCode": { + "type": "string", + "description": "Number corresponding to the License code resource to return.", + "required": true, + "pattern": "[0-9]{0,61}?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "licenseCode" + ], + "response": { + "$ref": "LicenseCode" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "licenses": { "methods": { "delete": { @@ -22099,6 +28444,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -22164,7 +28514,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", "location": "path" } }, @@ -22283,7 +28633,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", "location": "path" } }, @@ -22319,7 +28669,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -22493,6 +28843,444 @@ } } }, + "networkEndpointGroups": { + "methods": { + "aggregatedList": { + "id": "compute.networkEndpointGroups.aggregatedList", + "path": "{project}/aggregated/networkEndpointGroups", + "httpMethod": "GET", + "description": "Retrieves the list of network endpoint groups and sorts them by zone.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "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)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "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" + }, + "pageToken": { + "type": "string", + "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" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "NetworkEndpointGroupAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "attachNetworkEndpoints": { + "id": "compute.networkEndpointGroups.attachNetworkEndpoints", + "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", + "httpMethod": "POST", + "description": "Attach a list of network endpoints to the specified network endpoint group.", + "parameters": { + "networkEndpointGroup": { + "type": "string", + "description": "The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.", + "required": true, + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "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" + }, + "zone": { + "type": "string", + "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "networkEndpointGroup" + ], + "request": { + "$ref": "NetworkEndpointGroupsAttachEndpointsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "delete": { + "id": "compute.networkEndpointGroups.delete", + "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", + "httpMethod": "DELETE", + "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.", + "parameters": { + "networkEndpointGroup": { + "type": "string", + "description": "The name of the network endpoint group to delete. It should comply with RFC1035.", + "required": true, + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "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" + }, + "zone": { + "type": "string", + "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "networkEndpointGroup" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "detachNetworkEndpoints": { + "id": "compute.networkEndpointGroups.detachNetworkEndpoints", + "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", + "httpMethod": "POST", + "description": "Detach a list of network endpoints from the specified network endpoint group.", + "parameters": { + "networkEndpointGroup": { + "type": "string", + "description": "The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035.", + "required": true, + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "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" + }, + "zone": { + "type": "string", + "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "networkEndpointGroup" + ], + "request": { + "$ref": "NetworkEndpointGroupsDetachEndpointsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.networkEndpointGroups.get", + "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", + "httpMethod": "GET", + "description": "Returns the specified network endpoint group. Get a list of available network endpoint groups by making a list() request.", + "parameters": { + "networkEndpointGroup": { + "type": "string", + "description": "The name of the network endpoint group. It should comply with RFC1035.", + "required": true, + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "networkEndpointGroup" + ], + "response": { + "$ref": "NetworkEndpointGroup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.networkEndpointGroups.insert", + "path": "{project}/zones/{zone}/networkEndpointGroups", + "httpMethod": "POST", + "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "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" + }, + "zone": { + "type": "string", + "description": "The name of the zone where you want to create the network endpoint group. It should comply with RFC1035.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "request": { + "$ref": "NetworkEndpointGroup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.networkEndpointGroups.list", + "path": "{project}/zones/{zone}/networkEndpointGroups", + "httpMethod": "GET", + "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "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)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "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" + }, + "pageToken": { + "type": "string", + "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" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "response": { + "$ref": "NetworkEndpointGroupList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "listNetworkEndpoints": { + "id": "compute.networkEndpointGroups.listNetworkEndpoints", + "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", + "httpMethod": "POST", + "description": "List the network endpoints in the specified network endpoint group.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "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)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "networkEndpointGroup": { + "type": "string", + "description": "The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035.", + "required": true, + "location": "path" + }, + "orderBy": { + "type": "string", + "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" + }, + "pageToken": { + "type": "string", + "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" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "networkEndpointGroup" + ], + "request": { + "$ref": "NetworkEndpointGroupsListEndpointsRequest" + }, + "response": { + "$ref": "NetworkEndpointGroupsListNetworkEndpoints" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "testIamPermissions": { + "id": "compute.networkEndpointGroups.testIamPermissions", + "path": "{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions", + "httpMethod": "POST", + "description": "Returns permissions that a caller has on the specified resource.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "resource" + ], + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "networks": { "methods": { "addPeering": { @@ -22812,8 +29600,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "removePeering": { @@ -22912,7 +29699,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -23590,7 +30377,7 @@ }, "requestId": { "type": "string", - "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 then 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).", + "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" } }, @@ -23606,8 +30393,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -23683,7 +30469,7 @@ }, "requestId": { "type": "string", - "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 then 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.", + "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" } }, @@ -23982,8 +30768,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -24587,7 +31372,7 @@ }, "requestId": { "type": "string", - "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 then 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.", + "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" }, "sourceImage": { @@ -25339,8 +32124,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "recreateInstances": { @@ -26531,8 +33315,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "preview": { @@ -26849,7 +33632,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -26926,7 +33709,7 @@ }, "securityPolicy": { "type": "string", - "description": "Name of the security policy to update.", + "description": "Name of the security policy to get.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -27065,8 +33848,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -27086,7 +33868,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -27199,7 +33981,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", "location": "path" } }, @@ -27282,7 +34064,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", "location": "path" } }, @@ -27354,7 +34136,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -27549,7 +34331,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -27945,8 +34727,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "setIamPolicy": { @@ -28303,7 +35084,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -28494,6 +35275,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetHttpsProxy": { "type": "string", "description": "Name of the TargetHttpsProxy resource to set the QUIC override policy for. The name should conform to RFC1035.", @@ -28615,7 +35401,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -29797,7 +36583,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -30074,7 +36860,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -30615,8 +37401,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -30636,7 +37421,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, diff --git a/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go b/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go index caf361ead..dca4c6f22 100644 --- a/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go +++ b/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go @@ -97,8 +97,10 @@ func New(client *http.Client) (*Service, error) { s.InterconnectAttachments = NewInterconnectAttachmentsService(s) s.InterconnectLocations = NewInterconnectLocationsService(s) s.Interconnects = NewInterconnectsService(s) + s.LicenseCodes = NewLicenseCodesService(s) s.Licenses = NewLicensesService(s) s.MachineTypes = NewMachineTypesService(s) + s.NetworkEndpointGroups = NewNetworkEndpointGroupsService(s) s.Networks = NewNetworksService(s) s.Projects = NewProjectsService(s) s.RegionAutoscalers = NewRegionAutoscalersService(s) @@ -187,10 +189,14 @@ type Service struct { Interconnects *InterconnectsService + LicenseCodes *LicenseCodesService + Licenses *LicensesService MachineTypes *MachineTypesService + NetworkEndpointGroups *NetworkEndpointGroupsService + Networks *NetworksService Projects *ProjectsService @@ -489,6 +495,15 @@ type InterconnectsService struct { s *Service } +func NewLicenseCodesService(s *Service) *LicenseCodesService { + rs := &LicenseCodesService{s: s} + return rs +} + +type LicenseCodesService struct { + s *Service +} + func NewLicensesService(s *Service) *LicensesService { rs := &LicensesService{s: s} return rs @@ -507,6 +522,15 @@ type MachineTypesService struct { s *Service } +func NewNetworkEndpointGroupsService(s *Service) *NetworkEndpointGroupsService { + rs := &NetworkEndpointGroupsService{s: s} + return rs +} + +type NetworkEndpointGroupsService struct { + s *Service +} + func NewNetworksService(s *Service) *NetworksService { rs := &NetworksService{s: s} return rs @@ -883,6 +907,9 @@ type AcceleratorTypeAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *AcceleratorTypeAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -910,6 +937,102 @@ func (s *AcceleratorTypeAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AcceleratorTypeAggregatedListWarning: [Output Only] Informational +// warning message. +type AcceleratorTypeAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*AcceleratorTypeAggregatedListWarningData `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 *AcceleratorTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod AcceleratorTypeAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type AcceleratorTypeAggregatedListWarningData 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 *AcceleratorTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod AcceleratorTypeAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AcceleratorTypeList: Contains a list of accelerator types. type AcceleratorTypeList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -934,6 +1057,9 @@ type AcceleratorTypeList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *AcceleratorTypeListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -961,6 +1087,102 @@ func (s *AcceleratorTypeList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AcceleratorTypeListWarning: [Output Only] Informational warning +// message. +type AcceleratorTypeListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*AcceleratorTypeListWarningData `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 *AcceleratorTypeListWarning) MarshalJSON() ([]byte, error) { + type noMethod AcceleratorTypeListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type AcceleratorTypeListWarningData 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 *AcceleratorTypeListWarningData) MarshalJSON() ([]byte, error) { + type noMethod AcceleratorTypeListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type AcceleratorTypesScopedList struct { // AcceleratorTypes: [Output Only] List of accelerator types contained // in this scope. @@ -1329,6 +1551,9 @@ type AddressAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *AddressAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -1356,6 +1581,102 @@ func (s *AddressAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AddressAggregatedListWarning: [Output Only] Informational warning +// message. +type AddressAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*AddressAggregatedListWarningData `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 *AddressAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod AddressAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type AddressAggregatedListWarningData 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 *AddressAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod AddressAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AddressList: Contains a list of addresses. type AddressList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -1380,6 +1701,9 @@ type AddressList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *AddressListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -1407,6 +1731,101 @@ func (s *AddressList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AddressListWarning: [Output Only] Informational warning message. +type AddressListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*AddressListWarningData `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 *AddressListWarning) MarshalJSON() ([]byte, error) { + type noMethod AddressListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type AddressListWarningData 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 *AddressListWarningData) MarshalJSON() ([]byte, error) { + type noMethod AddressListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type AddressesScopedList struct { // Addresses: [Output Only] List of addresses contained in this scope. Addresses []*Address `json:"addresses,omitempty"` @@ -2075,6 +2494,9 @@ type AutoscalerAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *AutoscalerAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -2102,6 +2524,102 @@ func (s *AutoscalerAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AutoscalerAggregatedListWarning: [Output Only] Informational warning +// message. +type AutoscalerAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*AutoscalerAggregatedListWarningData `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 *AutoscalerAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod AutoscalerAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type AutoscalerAggregatedListWarningData 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 *AutoscalerAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod AutoscalerAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AutoscalerList: Contains a list of Autoscaler resources. type AutoscalerList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -2126,6 +2644,9 @@ type AutoscalerList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *AutoscalerListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -2153,6 +2674,101 @@ func (s *AutoscalerList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AutoscalerListWarning: [Output Only] Informational warning message. +type AutoscalerListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*AutoscalerListWarningData `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 *AutoscalerListWarning) MarshalJSON() ([]byte, error) { + type noMethod AutoscalerListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type AutoscalerListWarningData 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 *AutoscalerListWarningData) MarshalJSON() ([]byte, error) { + type noMethod AutoscalerListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type AutoscalerStatusDetails struct { // Message: The status message. Message string `json:"message,omitempty"` @@ -2368,6 +2984,15 @@ type AutoscalingPolicy struct { // instances allowed. MinNumReplicas int64 `json:"minNumReplicas,omitempty"` + // Mode: Defines operating mode for this policy. + // + // Possible values: + // "OFF" + // "ON" + // "ONLY_DOWN" + // "ONLY_UP" + Mode string `json:"mode,omitempty"` + // QueueBasedScaling: Configuration parameters of autoscaling based on // queuing system. QueueBasedScaling *AutoscalingPolicyQueueBasedScaling `json:"queueBasedScaling,omitempty"` @@ -2979,6 +3604,9 @@ type BackendBucketList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *BackendBucketListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -3006,6 +3634,102 @@ func (s *BackendBucketList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BackendBucketListWarning: [Output Only] Informational warning +// message. +type BackendBucketListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*BackendBucketListWarningData `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 *BackendBucketListWarning) MarshalJSON() ([]byte, error) { + type noMethod BackendBucketListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type BackendBucketListWarningData 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 *BackendBucketListWarningData) MarshalJSON() ([]byte, error) { + type noMethod BackendBucketListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BackendService: A BackendService resource. This resource defines a // group of backend virtual machines and their serving capacity. type BackendService struct { @@ -3042,21 +3766,6 @@ type BackendService struct { // When the load balancing scheme is INTERNAL, this field is not used. EnableCDN bool `json:"enableCDN,omitempty"` - // FailoverRatio: The value of the field must be in [0, 1]. If set, - // 'backends[].failover' must be set. They together define the fallback - // behavior of the primary backend: if the ratio of the healthy VMs in - // the primary backend is at or below this number, traffic arriving at - // the load-balanced IP will be directed to the failover backend. - // - // In case where 'failoverRatio' is not set or all the VMs in the backup - // backend are unhealthy, the traffic will be directed back to the - // primary backend in the "force" mode, where traffic will be spread to - // the healthy VMs with the best effort, or to all VMs when no VM is - // healthy. - // - // This field is only used with l4 load balancing. - FailoverRatio float64 `json:"failoverRatio,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents // stored in this object. This field is used in optimistic locking. This // field will be ignored when inserting a BackendService. An up-to-date @@ -3066,8 +3775,9 @@ type BackendService struct { // HealthChecks: The list of URLs to the HttpHealthCheck or // HttpsHealthCheck resource for health checking this BackendService. // Currently at most one health check can be specified, and a health - // check is required for GCE backend services. A health check must not - // be specified for GAE app backend and Cloud Function backend. + // check is required for Compute Engine backend services. A health check + // must not be specified for App Engine backend and Cloud Function + // backend. // // For internal load balancing, a URL to a HealthCheck resource must be // specified instead. @@ -3083,6 +3793,11 @@ type BackendService struct { // for backend services. Kind string `json:"kind,omitempty"` + // LoadBalancingScheme: Indicates whether the backend service will be + // used with internal or external load balancing. A backend service + // created for one type of load balancing cannot be used with the other. + // Possible values are INTERNAL and EXTERNAL. + // // Possible values: // "EXTERNAL" // "INTERNAL" @@ -3193,20 +3908,6 @@ func (s *BackendService) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *BackendService) UnmarshalJSON(data []byte) error { - type noMethod BackendService - var s1 struct { - FailoverRatio gensupport.JSONFloat64 `json:"failoverRatio"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FailoverRatio = float64(s1.FailoverRatio) - return nil -} - // BackendServiceAggregatedList: Contains a list of // BackendServicesScopedList. type BackendServiceAggregatedList struct { @@ -3231,6 +3932,9 @@ type BackendServiceAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *BackendServiceAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -3258,6 +3962,102 @@ func (s *BackendServiceAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BackendServiceAggregatedListWarning: [Output Only] Informational +// warning message. +type BackendServiceAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*BackendServiceAggregatedListWarningData `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 *BackendServiceAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod BackendServiceAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type BackendServiceAggregatedListWarningData 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 *BackendServiceAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod BackendServiceAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BackendServiceCdnPolicy: Message containing Cloud CDN configuration // for a backend service. type BackendServiceCdnPolicy struct { @@ -3395,6 +4195,9 @@ type BackendServiceList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *BackendServiceListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -3422,6 +4225,129 @@ func (s *BackendServiceList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BackendServiceListWarning: [Output Only] Informational warning +// message. +type BackendServiceListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*BackendServiceListWarningData `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 *BackendServiceListWarning) MarshalJSON() ([]byte, error) { + type noMethod BackendServiceListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type BackendServiceListWarningData 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 *BackendServiceListWarningData) MarshalJSON() ([]byte, error) { + type noMethod BackendServiceListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type BackendServiceReference struct { + BackendService string `json:"backendService,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackendService") 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. "BackendService") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BackendServiceReference) MarshalJSON() ([]byte, error) { + type noMethod BackendServiceReference + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type BackendServicesScopedList struct { // BackendServices: List of BackendServices contained in this scope. BackendServices []*BackendService `json:"backendServices,omitempty"` @@ -3828,6 +4754,9 @@ type CommitmentAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *CommitmentAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -3855,6 +4784,102 @@ func (s *CommitmentAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CommitmentAggregatedListWarning: [Output Only] Informational warning +// message. +type CommitmentAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*CommitmentAggregatedListWarningData `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 *CommitmentAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod CommitmentAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type CommitmentAggregatedListWarningData 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 *CommitmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod CommitmentAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CommitmentList: Contains a list of Commitment resources. type CommitmentList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -3879,6 +4904,9 @@ type CommitmentList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *CommitmentListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -3906,6 +4934,101 @@ func (s *CommitmentList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CommitmentListWarning: [Output Only] Informational warning message. +type CommitmentListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*CommitmentListWarningData `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 *CommitmentListWarning) MarshalJSON() ([]byte, error) { + type noMethod CommitmentListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type CommitmentListWarningData 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 *CommitmentListWarningData) MarshalJSON() ([]byte, error) { + type noMethod CommitmentListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type CommitmentsScopedList struct { // Commitments: [Output Only] List of commitments contained in this // scope. @@ -4528,6 +5651,9 @@ type DiskAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *DiskAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -4555,6 +5681,102 @@ func (s *DiskAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DiskAggregatedListWarning: [Output Only] Informational warning +// message. +type DiskAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*DiskAggregatedListWarningData `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 *DiskAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod DiskAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type DiskAggregatedListWarningData 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 *DiskAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod DiskAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DiskList: A list of Disk resources. type DiskList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -4579,6 +5801,9 @@ type DiskList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *DiskListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -4606,6 +5831,101 @@ func (s *DiskList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DiskListWarning: [Output Only] Informational warning message. +type DiskListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*DiskListWarningData `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 *DiskListWarning) MarshalJSON() ([]byte, error) { + type noMethod DiskListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type DiskListWarningData 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 *DiskListWarningData) MarshalJSON() ([]byte, error) { + type noMethod DiskListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type DiskMoveRequest struct { // DestinationZone: The URL of the destination zone to move the disk. // This can be a full or partial URL. For example, the following are all @@ -4738,6 +6058,9 @@ type DiskTypeAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *DiskTypeAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -4765,6 +6088,102 @@ func (s *DiskTypeAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DiskTypeAggregatedListWarning: [Output Only] Informational warning +// message. +type DiskTypeAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*DiskTypeAggregatedListWarningData `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 *DiskTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod DiskTypeAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type DiskTypeAggregatedListWarningData 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 *DiskTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod DiskTypeAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DiskTypeList: Contains a list of disk types. type DiskTypeList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -4789,6 +6208,9 @@ type DiskTypeList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *DiskTypeListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -4816,6 +6238,101 @@ func (s *DiskTypeList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DiskTypeListWarning: [Output Only] Informational warning message. +type DiskTypeListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*DiskTypeListWarningData `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 *DiskTypeListWarning) MarshalJSON() ([]byte, error) { + type noMethod DiskTypeListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type DiskTypeListWarningData 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 *DiskTypeListWarningData) MarshalJSON() ([]byte, error) { + type noMethod DiskTypeListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type DiskTypesScopedList struct { // DiskTypes: [Output Only] List of disk types contained in this scope. DiskTypes []*DiskType `json:"diskTypes,omitempty"` @@ -5465,6 +6982,9 @@ type FirewallList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *FirewallListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -5492,6 +7012,101 @@ func (s *FirewallList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// FirewallListWarning: [Output Only] Informational warning message. +type FirewallListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*FirewallListWarningData `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 *FirewallListWarning) MarshalJSON() ([]byte, error) { + type noMethod FirewallListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type FirewallListWarningData 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 *FirewallListWarningData) MarshalJSON() ([]byte, error) { + type noMethod FirewallListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // FixedOrPercent: Encapsulates numeric value that can be either // absolute or relative. type FixedOrPercent struct { @@ -5791,6 +7406,9 @@ type ForwardingRuleAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *ForwardingRuleAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -5818,6 +7436,102 @@ func (s *ForwardingRuleAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ForwardingRuleAggregatedListWarning: [Output Only] Informational +// warning message. +type ForwardingRuleAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*ForwardingRuleAggregatedListWarningData `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 *ForwardingRuleAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod ForwardingRuleAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ForwardingRuleAggregatedListWarningData 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 *ForwardingRuleAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod ForwardingRuleAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ForwardingRuleList: Contains a list of ForwardingRule resources. type ForwardingRuleList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -5841,6 +7555,9 @@ type ForwardingRuleList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *ForwardingRuleListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -5868,6 +7585,129 @@ func (s *ForwardingRuleList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ForwardingRuleListWarning: [Output Only] Informational warning +// message. +type ForwardingRuleListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*ForwardingRuleListWarningData `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 *ForwardingRuleListWarning) MarshalJSON() ([]byte, error) { + type noMethod ForwardingRuleListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ForwardingRuleListWarningData 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 *ForwardingRuleListWarningData) MarshalJSON() ([]byte, error) { + type noMethod ForwardingRuleListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ForwardingRuleReference struct { + ForwardingRule string `json:"forwardingRule,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ForwardingRule") 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. "ForwardingRule") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ForwardingRuleReference) MarshalJSON() ([]byte, error) { + type noMethod ForwardingRuleReference + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ForwardingRulesScopedList struct { // ForwardingRules: List of forwarding rules contained in this scope. ForwardingRules []*ForwardingRule `json:"forwardingRules,omitempty"` @@ -6411,6 +8251,9 @@ type HealthCheckList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *HealthCheckListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -6438,6 +8281,101 @@ func (s *HealthCheckList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HealthCheckListWarning: [Output Only] Informational warning message. +type HealthCheckListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*HealthCheckListWarningData `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 *HealthCheckListWarning) MarshalJSON() ([]byte, error) { + type noMethod HealthCheckListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type HealthCheckListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // 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 *HealthCheckListWarningData) MarshalJSON() ([]byte, error) { + type noMethod HealthCheckListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HealthCheckReference: A full or valid partial URL to a health check. // For example, the following are valid URLs: // - @@ -6510,6 +8448,53 @@ func (s *HealthStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type HealthStatusForNetworkEndpoint struct { + // BackendService: URL of the backend service associated with the health + // state of the network endpoint. + BackendService *BackendServiceReference `json:"backendService,omitempty"` + + // ForwardingRule: URL of the forwarding rule associated with the health + // state of the network endpoint. + ForwardingRule *ForwardingRuleReference `json:"forwardingRule,omitempty"` + + // HealthCheck: URL of the health check associated with the health state + // of the network endpoint. + HealthCheck *HealthCheckReference `json:"healthCheck,omitempty"` + + // HealthState: Health state of the network endpoint determined based on + // the health checks configured. + // + // Possible values: + // "DRAINING" + // "HEALTHY" + // "UNHEALTHY" + // "UNKNOWN" + HealthState string `json:"healthState,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackendService") 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. "BackendService") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *HealthStatusForNetworkEndpoint) MarshalJSON() ([]byte, error) { + type noMethod HealthStatusForNetworkEndpoint + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type Host struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -6637,6 +8622,9 @@ type HostAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *HostAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -6664,6 +8652,102 @@ func (s *HostAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HostAggregatedListWarning: [Output Only] Informational warning +// message. +type HostAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*HostAggregatedListWarningData `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 *HostAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod HostAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type HostAggregatedListWarningData 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 *HostAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod HostAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HostList: Contains a list of hosts. type HostList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -6688,6 +8772,9 @@ type HostList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *HostListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -6715,6 +8802,101 @@ func (s *HostList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HostListWarning: [Output Only] Informational warning message. +type HostListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*HostListWarningData `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 *HostListWarning) MarshalJSON() ([]byte, error) { + type noMethod HostListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type HostListWarningData 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 *HostListWarningData) MarshalJSON() ([]byte, error) { + type noMethod HostListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HostRule: UrlMaps A host-matching rule for a URL. If matched, will // use the named PathMatcher to select the BackendService. type HostRule struct { @@ -6852,6 +9034,9 @@ type HostTypeAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *HostTypeAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -6879,6 +9064,102 @@ func (s *HostTypeAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HostTypeAggregatedListWarning: [Output Only] Informational warning +// message. +type HostTypeAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*HostTypeAggregatedListWarningData `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 *HostTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod HostTypeAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type HostTypeAggregatedListWarningData 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 *HostTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod HostTypeAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HostTypeList: Contains a list of host types. type HostTypeList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -6903,6 +9184,9 @@ type HostTypeList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *HostTypeListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -6930,6 +9214,101 @@ func (s *HostTypeList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HostTypeListWarning: [Output Only] Informational warning message. +type HostTypeListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*HostTypeListWarningData `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 *HostTypeListWarning) MarshalJSON() ([]byte, error) { + type noMethod HostTypeListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type HostTypeListWarningData 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 *HostTypeListWarningData) MarshalJSON() ([]byte, error) { + type noMethod HostTypeListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type HostTypesScopedList struct { // HostTypes: [Output Only] List of host types contained in this scope. HostTypes []*HostType `json:"hostTypes,omitempty"` @@ -7298,6 +9677,9 @@ type HttpHealthCheckList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *HttpHealthCheckListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -7325,6 +9707,102 @@ func (s *HttpHealthCheckList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HttpHealthCheckListWarning: [Output Only] Informational warning +// message. +type HttpHealthCheckListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*HttpHealthCheckListWarningData `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 *HttpHealthCheckListWarning) MarshalJSON() ([]byte, error) { + type noMethod HttpHealthCheckListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type HttpHealthCheckListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // 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 *HttpHealthCheckListWarningData) MarshalJSON() ([]byte, error) { + type noMethod HttpHealthCheckListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HttpsHealthCheck: An HttpsHealthCheck resource. This resource defines // a template for how individual instances should be checked for health, // via HTTPS. @@ -7438,6 +9916,9 @@ type HttpsHealthCheckList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *HttpsHealthCheckListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -7465,6 +9946,102 @@ func (s *HttpsHealthCheckList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HttpsHealthCheckListWarning: [Output Only] Informational warning +// message. +type HttpsHealthCheckListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*HttpsHealthCheckListWarningData `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 *HttpsHealthCheckListWarning) MarshalJSON() ([]byte, error) { + type noMethod HttpsHealthCheckListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type HttpsHealthCheckListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // 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 *HttpsHealthCheckListWarningData) MarshalJSON() ([]byte, error) { + type noMethod HttpsHealthCheckListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Image: An Image resource. type Image struct { // ArchiveSizeBytes: Size of the image tar.gz archive stored in Google @@ -7717,6 +10294,9 @@ type ImageList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *ImageListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -7744,6 +10324,101 @@ func (s *ImageList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImageListWarning: [Output Only] Informational warning message. +type ImageListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*ImageListWarningData `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 *ImageListWarning) MarshalJSON() ([]byte, error) { + type noMethod ImageListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ImageListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // 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 *ImageListWarningData) MarshalJSON() ([]byte, error) { + type noMethod ImageListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Instance: An Instance resource. type Instance struct { // CanIpForward: Allows this instance to send and receive packets with @@ -7870,10 +10545,10 @@ type Instance struct { // be a dash. Name string `json:"name,omitempty"` - // NetworkInterfaces: An array of configurations for this interface. - // This specifies how this interface is configured to interact with - // other network services, such as connecting to the internet. Only one - // interface is supported per instance. + // NetworkInterfaces: An array of network configurations for this + // instance. These specify how interfaces are configured to interact + // with other network services, such as connecting to the internet. + // Multiple interfaces are supported per instance. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` // Scheduling: Sets the scheduling options for this instance. @@ -7975,6 +10650,9 @@ type InstanceAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *InstanceAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -8002,6 +10680,102 @@ func (s *InstanceAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceAggregatedListWarning: [Output Only] Informational warning +// message. +type InstanceAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*InstanceAggregatedListWarningData `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 *InstanceAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod InstanceAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // 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 *InstanceAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod InstanceAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceGroup struct { // CreationTimestamp: [Output Only] The creation timestamp for this // instance group in RFC3339 text format. @@ -8115,6 +10889,9 @@ type InstanceGroupAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *InstanceGroupAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -8142,6 +10919,102 @@ func (s *InstanceGroupAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceGroupAggregatedListWarning: [Output Only] Informational +// warning message. +type InstanceGroupAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*InstanceGroupAggregatedListWarningData `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 *InstanceGroupAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod InstanceGroupAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceGroupAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // 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 *InstanceGroupAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod InstanceGroupAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InstanceGroupList: A list of InstanceGroup resources. type InstanceGroupList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -8166,6 +11039,9 @@ type InstanceGroupList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *InstanceGroupListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -8193,6 +11069,102 @@ func (s *InstanceGroupList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceGroupListWarning: [Output Only] Informational warning +// message. +type InstanceGroupListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*InstanceGroupListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupListWarning) MarshalJSON() ([]byte, error) { + type noMethod InstanceGroupListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceGroupListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupListWarningData) MarshalJSON() ([]byte, error) { + type noMethod InstanceGroupListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InstanceGroupManager: An Instance Group Manager resource. type InstanceGroupManager struct { Activities *InstanceGroupManagerActivities `json:"activities,omitempty"` @@ -8274,11 +11246,11 @@ type InstanceGroupManager struct { // server defines this URL. SelfLink string `json:"selfLink,omitempty"` - // ServiceAccount: Service account will be used as credentials for all - // operations performed by managed instance group on instances. The - // service accounts needs all permissions required to create and delete - // instances. When not specified, the service account - // {projectNumber}@cloudservices.gserviceaccount.com will be used. + // ServiceAccount: [Output Only] 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. ServiceAccount string `json:"serviceAccount,omitempty"` // StatefulPolicy: Stateful configuration for this Instanced Group @@ -8503,6 +11475,9 @@ type InstanceGroupManagerAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *InstanceGroupManagerAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -8530,6 +11505,102 @@ func (s *InstanceGroupManagerAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceGroupManagerAggregatedListWarning: [Output Only] +// Informational warning message. +type InstanceGroupManagerAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*InstanceGroupManagerAggregatedListWarningData `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 *InstanceGroupManagerAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod InstanceGroupManagerAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceGroupManagerAggregatedListWarningData 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 *InstanceGroupManagerAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod InstanceGroupManagerAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceGroupManagerAutoHealingPolicy struct { // HealthCheck: The URL for the health check that signals autohealing. HealthCheck string `json:"healthCheck,omitempty"` @@ -8599,6 +11670,9 @@ type InstanceGroupManagerList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *InstanceGroupManagerListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -8626,6 +11700,102 @@ func (s *InstanceGroupManagerList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceGroupManagerListWarning: [Output Only] Informational warning +// message. +type InstanceGroupManagerListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*InstanceGroupManagerListWarningData `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 *InstanceGroupManagerListWarning) MarshalJSON() ([]byte, error) { + type noMethod InstanceGroupManagerListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceGroupManagerListWarningData 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 *InstanceGroupManagerListWarningData) MarshalJSON() ([]byte, error) { + type noMethod InstanceGroupManagerListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceGroupManagerPendingActionsSummary struct { // Creating: [Output Only] The number of instances in the managed // instance group that are pending to be created. @@ -9019,6 +12189,9 @@ type InstanceGroupManagersListPerInstanceConfigsResp struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *InstanceGroupManagersListPerInstanceConfigsRespWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -9046,6 +12219,102 @@ func (s *InstanceGroupManagersListPerInstanceConfigsResp) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceGroupManagersListPerInstanceConfigsRespWarning: [Output Only] +// Informational warning message. +type InstanceGroupManagersListPerInstanceConfigsRespWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*InstanceGroupManagersListPerInstanceConfigsRespWarningData `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 *InstanceGroupManagersListPerInstanceConfigsRespWarning) MarshalJSON() ([]byte, error) { + type noMethod InstanceGroupManagersListPerInstanceConfigsRespWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceGroupManagersListPerInstanceConfigsRespWarningData 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 *InstanceGroupManagersListPerInstanceConfigsRespWarningData) MarshalJSON() ([]byte, error) { + type noMethod InstanceGroupManagersListPerInstanceConfigsRespWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceGroupManagersRecreateInstancesRequest struct { // Instances: The URLs of one or more instances to recreate. This can be // a full URL or a partial URL, such as @@ -9438,6 +12707,9 @@ type InstanceGroupsListInstances struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *InstanceGroupsListInstancesWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -9465,6 +12737,102 @@ func (s *InstanceGroupsListInstances) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceGroupsListInstancesWarning: [Output Only] Informational +// warning message. +type InstanceGroupsListInstancesWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*InstanceGroupsListInstancesWarningData `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 *InstanceGroupsListInstancesWarning) MarshalJSON() ([]byte, error) { + type noMethod InstanceGroupsListInstancesWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceGroupsListInstancesWarningData 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 *InstanceGroupsListInstancesWarningData) MarshalJSON() ([]byte, error) { + type noMethod InstanceGroupsListInstancesWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceGroupsListInstancesRequest struct { // InstanceState: A filter for the state of the instances in the // instance group. Valid options are ALL or RUNNING. If you do not @@ -9715,6 +13083,9 @@ type InstanceList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *InstanceListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -9742,6 +13113,101 @@ func (s *InstanceList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceListWarning: [Output Only] Informational warning message. +type InstanceListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*InstanceListWarningData `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 *InstanceListWarning) MarshalJSON() ([]byte, error) { + type noMethod InstanceListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceListWarningData 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 *InstanceListWarningData) MarshalJSON() ([]byte, error) { + type noMethod InstanceListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InstanceListReferrers: Contains a list of instance referrers. type InstanceListReferrers struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -9766,6 +13232,9 @@ type InstanceListReferrers struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *InstanceListReferrersWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -9793,6 +13262,102 @@ func (s *InstanceListReferrers) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceListReferrersWarning: [Output Only] Informational warning +// message. +type InstanceListReferrersWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*InstanceListReferrersWarningData `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 *InstanceListReferrersWarning) MarshalJSON() ([]byte, error) { + type noMethod InstanceListReferrersWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceListReferrersWarningData 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 *InstanceListReferrersWarningData) MarshalJSON() ([]byte, error) { + type noMethod InstanceListReferrersWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceMoveRequest struct { // DestinationZone: The URL of the destination zone to move the // instance. This can be a full or partial URL. For example, the @@ -10044,6 +13609,9 @@ type InstanceTemplateList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *InstanceTemplateListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -10071,6 +13639,102 @@ func (s *InstanceTemplateList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceTemplateListWarning: [Output Only] Informational warning +// message. +type InstanceTemplateListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*InstanceTemplateListWarningData `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 *InstanceTemplateListWarning) MarshalJSON() ([]byte, error) { + type noMethod InstanceTemplateListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceTemplateListWarningData 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 *InstanceTemplateListWarningData) MarshalJSON() ([]byte, error) { + type noMethod InstanceTemplateListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceWithNamedPorts struct { // Instance: [Output Only] The URL of the instance. Instance string `json:"instance,omitempty"` @@ -10445,6 +14109,10 @@ type Interconnect struct { // over it. By default, it is set to ?true?. AdminEnabled bool `json:"adminEnabled,omitempty"` + // CircuitInfos: [Output Only] List of CircuitInfo objects, that + // describe the individual circuits in this LAG. + CircuitInfos []*InterconnectCircuitInfo `json:"circuitInfos,omitempty"` + // ConnectionAuthorization: [Output Only] URL to retrieve the Letter Of // Authority and Customer Facility Assignment (LOA-CFA) documentation // relating to this Interconnect. This documentation authorizes the @@ -10694,6 +14362,9 @@ type InterconnectAttachmentAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *InterconnectAttachmentAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -10721,6 +14392,102 @@ func (s *InterconnectAttachmentAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InterconnectAttachmentAggregatedListWarning: [Output Only] +// Informational warning message. +type InterconnectAttachmentAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*InterconnectAttachmentAggregatedListWarningData `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 *InterconnectAttachmentAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod InterconnectAttachmentAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InterconnectAttachmentAggregatedListWarningData 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 *InterconnectAttachmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod InterconnectAttachmentAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InterconnectAttachmentList: Response to the list request, and // contains a list of interconnect attachments. type InterconnectAttachmentList struct { @@ -10747,6 +14514,9 @@ type InterconnectAttachmentList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *InterconnectAttachmentListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -10774,6 +14544,102 @@ func (s *InterconnectAttachmentList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InterconnectAttachmentListWarning: [Output Only] Informational +// warning message. +type InterconnectAttachmentListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*InterconnectAttachmentListWarningData `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 *InterconnectAttachmentListWarning) MarshalJSON() ([]byte, error) { + type noMethod InterconnectAttachmentListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InterconnectAttachmentListWarningData 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 *InterconnectAttachmentListWarningData) MarshalJSON() ([]byte, error) { + type noMethod InterconnectAttachmentListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InterconnectAttachmentPrivateInfo: Private information for an // interconnect attachment when this belongs to an interconnect of type // IT_PRIVATE. @@ -10936,6 +14802,47 @@ func (s *InterconnectAttachmentsScopedListWarningData) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InterconnectCircuitInfo: Describes a single physical circuit between +// the Customer and Google. CircuitInfo objects are created by Google, +// so all fields are output only. Next id: 4 +type InterconnectCircuitInfo struct { + // CustomerDemarcId: Customer-side demarc ID for this circuit. This will + // only be set if it was provided by the Customer to Google during + // circuit turn-up. + CustomerDemarcId string `json:"customerDemarcId,omitempty"` + + // GoogleCircuitId: Google-assigned unique ID for this circuit. Assigned + // at circuit turn-up. + GoogleCircuitId string `json:"googleCircuitId,omitempty"` + + // GoogleDemarcId: Google-side demarc ID for this circuit. Assigned at + // circuit turn-up and provided by Google to the customer in the LOA. + GoogleDemarcId string `json:"googleDemarcId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomerDemarcId") 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. "CustomerDemarcId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectCircuitInfo) MarshalJSON() ([]byte, error) { + type noMethod InterconnectCircuitInfo + 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 { @@ -10961,6 +14868,9 @@ type InterconnectList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *InterconnectListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -10988,6 +14898,101 @@ func (s *InterconnectList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InterconnectListWarning: [Output Only] Informational warning message. +type InterconnectListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*InterconnectListWarningData `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 *InterconnectListWarning) MarshalJSON() ([]byte, error) { + type noMethod InterconnectListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InterconnectListWarningData 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 *InterconnectListWarningData) MarshalJSON() ([]byte, error) { + type noMethod InterconnectListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InterconnectLocation: Protocol definitions for Mixer API to support // InterconnectLocation. type InterconnectLocation struct { @@ -11106,6 +15111,9 @@ type InterconnectLocationList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *InterconnectLocationListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -11133,6 +15141,102 @@ func (s *InterconnectLocationList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InterconnectLocationListWarning: [Output Only] Informational warning +// message. +type InterconnectLocationListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*InterconnectLocationListWarningData `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 *InterconnectLocationListWarning) MarshalJSON() ([]byte, error) { + type noMethod InterconnectLocationListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InterconnectLocationListWarningData 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 *InterconnectLocationListWarningData) MarshalJSON() ([]byte, error) { + type noMethod InterconnectLocationListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InterconnectLocationRegionInfo: Information about any potential // InterconnectAttachments between an Interconnect at a specific // InterconnectLocation, and a specific Cloud Region. @@ -11148,6 +15252,9 @@ type InterconnectLocationRegionInfo struct { // "LP_LOCAL_REGION" LocationPresence string `json:"locationPresence,omitempty"` + // Region: URL for the region of this location. + Region string `json:"region,omitempty"` + // RegionKey: Scope key for the region of this location. RegionKey string `json:"regionKey,omitempty"` @@ -11289,6 +15396,9 @@ type IpOwnerList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *IpOwnerListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -11316,6 +15426,101 @@ func (s *IpOwnerList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// IpOwnerListWarning: [Output Only] Informational warning message. +type IpOwnerListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*IpOwnerListWarningData `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 *IpOwnerListWarning) MarshalJSON() ([]byte, error) { + type noMethod IpOwnerListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type IpOwnerListWarningData 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 *IpOwnerListWarningData) MarshalJSON() ([]byte, error) { + type noMethod IpOwnerListWarningData + 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 @@ -11383,6 +15588,107 @@ func (s *License) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type LicenseCode struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: [Output Only] Description of this License Code. + Description string `json:"description,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of resource. Always compute#licenseCode for + // licenses. + Kind string `json:"kind,omitempty"` + + // LicenseAlias: [Output Only] URL and description aliases of Licenses + // with the same License Code. + LicenseAlias []*LicenseCodeLicenseAlias `json:"licenseAlias,omitempty"` + + // Name: [Output Only] Name of the resource. The name is 1-20 characters + // long and must be a valid 64 bit integer. + Name string `json:"name,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // State: [Output Only] Current state of this License Code. + // + // Possible values: + // "DISABLED" + // "ENABLED" + // "RESTRICTED" + // "STATE_UNSPECIFIED" + // "TERMINATED" + State string `json:"state,omitempty"` + + // Transferable: [Output Only] If true, the license will remain attached + // when creating images or snapshots from disks. Otherwise, the license + // is not transferred. + Transferable bool `json:"transferable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LicenseCode) MarshalJSON() ([]byte, error) { + type noMethod LicenseCode + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type LicenseCodeLicenseAlias struct { + // Description: [Output Only] Description of this License Code. + Description string `json:"description,omitempty"` + + // SelfLink: [Output Only] URL of license corresponding to this License + // Code. + SelfLink string `json:"selfLink,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 *LicenseCodeLicenseAlias) MarshalJSON() ([]byte, error) { + type noMethod LicenseCodeLicenseAlias + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type LicenseResourceRequirements struct { // MinGuestCpuCount: Minimum number of guest cpus required to use the // Instance. Enforced at Instance creation and Instance start. @@ -11435,6 +15741,9 @@ type LicensesListResponse struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *LicensesListResponseWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -11462,6 +15771,102 @@ func (s *LicensesListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LicensesListResponseWarning: [Output Only] Informational warning +// message. +type LicensesListResponseWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*LicensesListResponseWarningData `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 *LicensesListResponseWarning) MarshalJSON() ([]byte, error) { + type noMethod LicensesListResponseWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type LicensesListResponseWarningData 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 *LicensesListResponseWarningData) MarshalJSON() ([]byte, error) { + type noMethod LicensesListResponseWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LogConfig: Specifies what kind of log the caller must write type LogConfig struct { // CloudAudit: Cloud audit options. @@ -11470,6 +15875,9 @@ type LogConfig struct { // Counter: Counter options. Counter *LogConfigCounterOptions `json:"counter,omitempty"` + // DataAccess: Data access options. + DataAccess *LogConfigDataAccessOptions `json:"dataAccess,omitempty"` + // ForceSendFields is a list of field names (e.g. "CloudAudit") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -11532,7 +15940,29 @@ func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LogConfigCounterOptions: Options for counters +// LogConfigCounterOptions: Increment a streamz counter with the +// specified metric and field names. +// +// Metric 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. +// +// Field names correspond to IAM request parameters and field values are +// their respective values. +// +// 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) * decrementing the counter * +// incrementing it by anything other than 1 type LogConfigCounterOptions struct { // Field: The field value to attribute. Field string `json:"field,omitempty"` @@ -11563,6 +15993,40 @@ func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LogConfigDataAccessOptions: Write a Data Access (Gin) log +type LogConfigDataAccessOptions struct { + // LogMode: Whether Gin logging should happen in a fail-closed manner at + // the caller. This is relevant only in the LocalIAM implementation, for + // now. + // + // Possible values: + // "LOG_FAIL_CLOSED" + // "LOG_MODE_UNSPECIFIED" + LogMode string `json:"logMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LogMode") 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. "LogMode") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) { + type noMethod LogConfigDataAccessOptions + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MachineType: A Machine Type resource. type MachineType struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -11667,6 +16131,9 @@ type MachineTypeAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *MachineTypeAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -11694,6 +16161,102 @@ func (s *MachineTypeAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MachineTypeAggregatedListWarning: [Output Only] Informational warning +// message. +type MachineTypeAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*MachineTypeAggregatedListWarningData `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 *MachineTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod MachineTypeAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type MachineTypeAggregatedListWarningData 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 *MachineTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod MachineTypeAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MachineTypeList: Contains a list of machine types. type MachineTypeList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -11718,6 +16281,9 @@ type MachineTypeList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *MachineTypeListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -11745,6 +16311,101 @@ func (s *MachineTypeList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MachineTypeListWarning: [Output Only] Informational warning message. +type MachineTypeListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*MachineTypeListWarningData `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 *MachineTypeListWarning) MarshalJSON() ([]byte, error) { + type noMethod MachineTypeListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type MachineTypeListWarningData 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 *MachineTypeListWarningData) MarshalJSON() ([]byte, error) { + type noMethod MachineTypeListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type MachineTypesScopedList struct { // MachineTypes: [Output Only] List of machine types contained in this // scope. @@ -12079,9 +16740,6 @@ type ManagedInstanceOverride struct { // Disks: Disk overrides defined for this instance Disks []*ManagedInstanceOverrideDiskOverride `json:"disks,omitempty"` - // Metadata: Metadata overrides defined for this instance. - Metadata []*ManagedInstanceOverrideMetadata `json:"metadata,omitempty"` - // Origin: [Output Only] Indicates where does the override come from. // // Possible values: @@ -12112,43 +16770,6 @@ func (s *ManagedInstanceOverride) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ManagedInstanceOverrideMetadata struct { - // Key: Key for the metadata entry. Keys must conform to the following - // regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is - // reflected as part of a URL in the metadata server. Additionally, to - // avoid ambiguity, keys must not conflict with any other metadata keys - // for the project. - Key string `json:"key,omitempty"` - - // Value: Value for the metadata entry. These are free-form strings, and - // only have meaning as interpreted by the image running in the - // instance. The only restriction placed on values is that their size - // must be less than or equal to 262144 bytes (256 KiB). - 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 *ManagedInstanceOverrideMetadata) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstanceOverrideMetadata - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - type ManagedInstanceOverrideDiskOverride struct { // DeviceName: The name of the device on the VM DeviceName string `json:"deviceName,omitempty"` @@ -12436,6 +17057,872 @@ func (s *Network) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NetworkEndpoint: The network endpoint. +type NetworkEndpoint struct { + // Instance: The name for a specific VM instance that the IP address + // belongs to. This is required for network endpoints of type GCE_VM_IP + // and GCE_VM_IP_PORT. The instance must be in the same zone of network + // endpoint group. + // + // The name must be 1-63 characters long, and comply with RFC1035. + Instance string `json:"instance,omitempty"` + + // IpAddress: Optional IPv4 address of network endpoint. The IP address + // must belong to a VM in GCE (either the primary IP or as part of an + // aliased IP range). If the IP address is not specified, then the + // primary IP address for the VM instance in the network that the + // network endpoint group belongs to will be used. + IpAddress string `json:"ipAddress,omitempty"` + + // Port: Optional port number of network endpoint. If not specified and + // the NetworkEndpointGroup.network_endpoint_type is GCE_IP_PORT, the + // defaultPort for the network endpoint group will be used. + Port int64 `json:"port,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Instance") 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. "Instance") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpoint) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpoint + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroup: Represents a collection of network endpoints. +type NetworkEndpointGroup struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always + // compute#networkEndpointGroup for network endpoint group. + Kind string `json:"kind,omitempty"` + + // LoadBalancer: This field is only valid when the network endpoint + // group type is LOAD_BALANCING. + LoadBalancer *NetworkEndpointGroupLbNetworkEndpointGroup `json:"loadBalancer,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // NetworkEndpointType: Type of network endpoints in this network + // endpoint group. Only supported values for LOAD_BALANCING are + // GCE_VM_IP or GCE_VM_IP_PORT. + // + // Possible values: + // "GCE_VM_IP_PORT" + NetworkEndpointType string `json:"networkEndpointType,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Size: [Output only] Number of network endpoints in the network + // endpoint group. + Size int64 `json:"size,omitempty"` + + // Type: Specify the type of this network endpoint group. Only + // LOAD_BALANCING is valid for now. + // + // Possible values: + // "LOAD_BALANCING" + 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. "CreationTimestamp") + // 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. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroup) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroup + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of NetworkEndpointGroupsScopedList resources. + Items map[string]NetworkEndpointGroupsScopedList `json:"items,omitempty"` + + // Kind: [Output Only] The resource type, which is always + // compute#networkEndpointGroupAggregatedList for aggregated lists of + // network endpoint groups. + 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 *NetworkEndpointGroupAggregatedListWarning `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 *NetworkEndpointGroupAggregatedList) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupAggregatedList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroupAggregatedListWarning: [Output Only] +// Informational warning message. +type NetworkEndpointGroupAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*NetworkEndpointGroupAggregatedListWarningData `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 *NetworkEndpointGroupAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupAggregatedListWarningData 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 *NetworkEndpointGroupAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroupLbNetworkEndpointGroup: Load balancing specific +// fields for network endpoint group of type LOAD_BALANCING. +type NetworkEndpointGroupLbNetworkEndpointGroup struct { + // DefaultPort: The default port used if the port number is not + // specified in the network endpoint. If the network endpoint type is + // GCE_VM_IP, this field must not be specified. + 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. + Network string `json:"network,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"` + + // ForceSendFields is a list of field names (e.g. "DefaultPort") 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. "DefaultPort") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupLbNetworkEndpointGroup) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupLbNetworkEndpointGroup + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of NetworkEndpointGroup resources. + Items []*NetworkEndpointGroup `json:"items,omitempty"` + + // Kind: [Output Only] The resource type, which is always + // compute#networkEndpointGroupList for network endpoint group lists. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *NetworkEndpointGroupListWarning `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 *NetworkEndpointGroupList) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroupListWarning: [Output Only] Informational warning +// message. +type NetworkEndpointGroupListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*NetworkEndpointGroupListWarningData `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 *NetworkEndpointGroupListWarning) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupListWarningData 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 *NetworkEndpointGroupListWarningData) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsAttachEndpointsRequest struct { + // NetworkEndpoints: The list of network endpoints to be attached. + NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") 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. "NetworkEndpoints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupsAttachEndpointsRequest) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupsAttachEndpointsRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsDetachEndpointsRequest struct { + // NetworkEndpoints: The list of network endpoints to be detached. + NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") 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. "NetworkEndpoints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupsDetachEndpointsRequest) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupsDetachEndpointsRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsListEndpointsRequest struct { + // HealthStatus: Optional query parameter for showing the health status + // of each network endpoint. Valid options are SKIP or SHOW. If you + // don't specifiy this parameter, the health status of network endpoints + // will not be provided. + // + // Possible values: + // "SHOW" + // "SKIP" + HealthStatus string `json:"healthStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HealthStatus") 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. "HealthStatus") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupsListEndpointsRequest) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupsListEndpointsRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsListNetworkEndpoints struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of NetworkEndpointWithHealthStatus resources. + Items []*NetworkEndpointWithHealthStatus `json:"items,omitempty"` + + // Kind: [Output Only] The resource type, which is always + // compute#networkEndpointGroupsListNetworkEndpoints for the list of + // network endpoints in the specified network endpoint group. + 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"` + + // Warning: [Output Only] Informational warning message. + Warning *NetworkEndpointGroupsListNetworkEndpointsWarning `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 *NetworkEndpointGroupsListNetworkEndpoints) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupsListNetworkEndpoints + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroupsListNetworkEndpointsWarning: [Output Only] +// Informational warning message. +type NetworkEndpointGroupsListNetworkEndpointsWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*NetworkEndpointGroupsListNetworkEndpointsWarningData `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 *NetworkEndpointGroupsListNetworkEndpointsWarning) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupsListNetworkEndpointsWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsListNetworkEndpointsWarningData 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 *NetworkEndpointGroupsListNetworkEndpointsWarningData) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupsListNetworkEndpointsWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsScopedList struct { + // NetworkEndpointGroups: [Output Only] The list of network endpoint + // groups that are contained in this scope. + NetworkEndpointGroups []*NetworkEndpointGroup `json:"networkEndpointGroups,omitempty"` + + // Warning: [Output Only] An informational warning that replaces the + // list of network endpoint groups when the list is empty. + Warning *NetworkEndpointGroupsScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "NetworkEndpointGroups") 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. "NetworkEndpointGroups") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupsScopedList) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupsScopedList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroupsScopedListWarning: [Output Only] An +// informational warning that replaces the list of network endpoint +// groups when the list is empty. +type NetworkEndpointGroupsScopedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*NetworkEndpointGroupsScopedListWarningData `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 *NetworkEndpointGroupsScopedListWarning) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupsScopedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsScopedListWarningData 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 *NetworkEndpointGroupsScopedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointGroupsScopedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointWithHealthStatus struct { + // Healths: [Output only] The health status of network endpoint; + Healths []*HealthStatusForNetworkEndpoint `json:"healths,omitempty"` + + // NetworkEndpoint: [Output only] The network endpoint; + NetworkEndpoint *NetworkEndpoint `json:"networkEndpoint,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Healths") 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. "Healths") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointWithHealthStatus) MarshalJSON() ([]byte, error) { + type noMethod NetworkEndpointWithHealthStatus + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NetworkInterface: A network interface resource attached to an // instance. type NetworkInterface struct { @@ -12546,6 +18033,9 @@ type NetworkList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *NetworkListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -12573,6 +18063,101 @@ func (s *NetworkList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NetworkListWarning: [Output Only] Informational warning message. +type NetworkListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*NetworkListWarningData `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 *NetworkListWarning) MarshalJSON() ([]byte, error) { + type noMethod NetworkListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkListWarningData 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 *NetworkListWarningData) MarshalJSON() ([]byte, error) { + type noMethod NetworkListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NetworkPeering: A network peering attached to a network resource. The // message includes the peering name, peer network, peering state, and a // flag indicating whether Google Compute Engine should automatically @@ -13049,6 +18634,9 @@ type OperationAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *OperationAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -13076,6 +18664,102 @@ func (s *OperationAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OperationAggregatedListWarning: [Output Only] Informational warning +// message. +type OperationAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*OperationAggregatedListWarningData `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 *OperationAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod OperationAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type OperationAggregatedListWarningData 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 *OperationAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod OperationAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OperationList: Contains a list of Operation resources. type OperationList struct { // Id: [Output Only] The unique identifier for the resource. This @@ -13100,6 +18784,9 @@ type OperationList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *OperationListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -13127,6 +18814,101 @@ func (s *OperationList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OperationListWarning: [Output Only] Informational warning message. +type OperationListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*OperationListWarningData `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 *OperationListWarning) MarshalJSON() ([]byte, error) { + type noMethod OperationListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type OperationListWarningData 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 *OperationListWarningData) MarshalJSON() ([]byte, error) { + type noMethod OperationListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type OperationsScopedList struct { // Operations: [Output Only] List of operations contained in this scope. Operations []*Operation `json:"operations,omitempty"` @@ -13606,8 +19388,8 @@ type ProjectsGetXpnResources struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // Resources: Serive resources (a.k.a service projects) attached to this - // project as their shared VPC host. + // Resources: Service resources (a.k.a service projects) attached to + // this project as their shared VPC host. Resources []*XpnResourceId `json:"resources,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -13717,6 +19499,7 @@ type Quota struct { // "INSTANCE_GROUPS" // "INSTANCE_GROUP_MANAGERS" // "INSTANCE_TEMPLATES" + // "INTERCONNECTS" // "IN_USE_ADDRESSES" // "LOCAL_SSD_TOTAL_GB" // "NETWORKS" @@ -13920,6 +19703,9 @@ type RegionAutoscalerList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *RegionAutoscalerListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -13947,6 +19733,102 @@ func (s *RegionAutoscalerList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RegionAutoscalerListWarning: [Output Only] Informational warning +// message. +type RegionAutoscalerListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*RegionAutoscalerListWarningData `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 *RegionAutoscalerListWarning) MarshalJSON() ([]byte, error) { + type noMethod RegionAutoscalerListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RegionAutoscalerListWarningData 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 *RegionAutoscalerListWarningData) MarshalJSON() ([]byte, error) { + type noMethod RegionAutoscalerListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type RegionDiskTypeList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. @@ -13970,6 +19852,9 @@ type RegionDiskTypeList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *RegionDiskTypeListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -13997,6 +19882,102 @@ func (s *RegionDiskTypeList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RegionDiskTypeListWarning: [Output Only] Informational warning +// message. +type RegionDiskTypeListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*RegionDiskTypeListWarningData `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 *RegionDiskTypeListWarning) MarshalJSON() ([]byte, error) { + type noMethod RegionDiskTypeListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RegionDiskTypeListWarningData 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 *RegionDiskTypeListWarningData) MarshalJSON() ([]byte, error) { + type noMethod RegionDiskTypeListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type RegionDisksResizeRequest struct { // SizeGb: The new size of the regional persistent disk, which is // specified in GB. @@ -14048,6 +20029,9 @@ type RegionInstanceGroupList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *RegionInstanceGroupListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -14075,6 +20059,102 @@ func (s *RegionInstanceGroupList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RegionInstanceGroupListWarning: [Output Only] Informational warning +// message. +type RegionInstanceGroupListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*RegionInstanceGroupListWarningData `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 *RegionInstanceGroupListWarning) MarshalJSON() ([]byte, error) { + type noMethod RegionInstanceGroupListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RegionInstanceGroupListWarningData 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 *RegionInstanceGroupListWarningData) MarshalJSON() ([]byte, error) { + type noMethod RegionInstanceGroupListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RegionInstanceGroupManagerDeleteInstanceConfigReq: // RegionInstanceGroupManagers.deletePerInstanceConfigs type RegionInstanceGroupManagerDeleteInstanceConfigReq struct { @@ -14131,6 +20211,9 @@ type RegionInstanceGroupManagerList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *RegionInstanceGroupManagerListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -14158,6 +20241,102 @@ func (s *RegionInstanceGroupManagerList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RegionInstanceGroupManagerListWarning: [Output Only] Informational +// warning message. +type RegionInstanceGroupManagerListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*RegionInstanceGroupManagerListWarningData `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 *RegionInstanceGroupManagerListWarning) MarshalJSON() ([]byte, error) { + type noMethod RegionInstanceGroupManagerListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RegionInstanceGroupManagerListWarningData 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 *RegionInstanceGroupManagerListWarningData) MarshalJSON() ([]byte, error) { + type noMethod RegionInstanceGroupManagerListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RegionInstanceGroupManagerUpdateInstanceConfigReq: // RegionInstanceGroupManagers.updatePerInstanceConfigs type RegionInstanceGroupManagerUpdateInstanceConfigReq struct { @@ -14309,6 +20488,9 @@ type RegionInstanceGroupManagersListInstanceConfigsResp struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *RegionInstanceGroupManagersListInstanceConfigsRespWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -14336,6 +20518,102 @@ func (s *RegionInstanceGroupManagersListInstanceConfigsResp) MarshalJSON() ([]by return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RegionInstanceGroupManagersListInstanceConfigsRespWarning: [Output +// Only] Informational warning message. +type RegionInstanceGroupManagersListInstanceConfigsRespWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*RegionInstanceGroupManagersListInstanceConfigsRespWarningData `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 *RegionInstanceGroupManagersListInstanceConfigsRespWarning) MarshalJSON() ([]byte, error) { + type noMethod RegionInstanceGroupManagersListInstanceConfigsRespWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RegionInstanceGroupManagersListInstanceConfigsRespWarningData 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 *RegionInstanceGroupManagersListInstanceConfigsRespWarningData) MarshalJSON() ([]byte, error) { + type noMethod RegionInstanceGroupManagersListInstanceConfigsRespWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type RegionInstanceGroupManagersListInstancesResponse struct { // ManagedInstances: List of managed instances. ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"` @@ -14517,6 +20795,9 @@ type RegionInstanceGroupsListInstances struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *RegionInstanceGroupsListInstancesWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -14544,6 +20825,102 @@ func (s *RegionInstanceGroupsListInstances) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RegionInstanceGroupsListInstancesWarning: [Output Only] Informational +// warning message. +type RegionInstanceGroupsListInstancesWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*RegionInstanceGroupsListInstancesWarningData `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 *RegionInstanceGroupsListInstancesWarning) MarshalJSON() ([]byte, error) { + type noMethod RegionInstanceGroupsListInstancesWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RegionInstanceGroupsListInstancesWarningData 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 *RegionInstanceGroupsListInstancesWarningData) MarshalJSON() ([]byte, error) { + type noMethod RegionInstanceGroupsListInstancesWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type RegionInstanceGroupsListInstancesRequest struct { // InstanceState: Instances in which state should be returned. Valid // options are: 'ALL', 'RUNNING'. By default, it lists all instances. @@ -14641,6 +21018,9 @@ type RegionList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *RegionListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -14668,6 +21048,101 @@ func (s *RegionList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RegionListWarning: [Output Only] Informational warning message. +type RegionListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*RegionListWarningData `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 *RegionListWarning) MarshalJSON() ([]byte, error) { + type noMethod RegionListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RegionListWarningData 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 *RegionListWarningData) MarshalJSON() ([]byte, error) { + type noMethod RegionListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type RegionSetLabelsRequest struct { // LabelFingerprint: The fingerprint of the previous set of labels for // this resource, used to detect conflicts. The fingerprint is initially @@ -15018,6 +21493,9 @@ type RouteList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *RouteListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -15045,6 +21523,101 @@ func (s *RouteList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RouteListWarning: [Output Only] Informational warning message. +type RouteListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*RouteListWarningData `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 *RouteListWarning) MarshalJSON() ([]byte, error) { + type noMethod RouteListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RouteListWarningData 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 *RouteListWarningData) MarshalJSON() ([]byte, error) { + type noMethod RouteListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Router: Router resource. type Router struct { // Bgp: BGP information specific to this router. @@ -15085,6 +21658,10 @@ type Router struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` + // Nats: List of Nat services created in this router. The maximum number + // of Nat services within a Router is 3 for Alpha. + Nats []*RouterNat `json:"nats,omitempty"` + // Network: URI of the network to which this router belongs. Network string `json:"network,omitempty"` @@ -15177,6 +21754,9 @@ type RouterAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *RouterAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -15204,6 +21784,102 @@ func (s *RouterAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RouterAggregatedListWarning: [Output Only] Informational warning +// message. +type RouterAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*RouterAggregatedListWarningData `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 *RouterAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod RouterAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RouterAggregatedListWarningData 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 *RouterAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod RouterAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type RouterBgp struct { // AdvertiseMode: User-specified flag to indicate which mode to use for // advertisement. @@ -15406,6 +22082,9 @@ type RouterList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *RouterListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -15433,6 +22112,220 @@ func (s *RouterList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RouterListWarning: [Output Only] Informational warning message. +type RouterListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*RouterListWarningData `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 *RouterListWarning) MarshalJSON() ([]byte, error) { + type noMethod RouterListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RouterListWarningData 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 *RouterListWarningData) MarshalJSON() ([]byte, error) { + type noMethod RouterListWarningData + raw := noMethod(*s) + 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 { + // AutoAllocatedNatIps: [Output Only] List of IPs allocated + // automatically by GCP for this Nat service. They will be raw IP + // strings like "179.12.26.133". They are ephemeral IPs allocated from + // the IP blocks managed by the NAT manager. This list can grow and + // shrink based on the number of VMs configured to use NAT. + AutoAllocatedNatIps []string `json:"autoAllocatedNatIps,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: 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: 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"` + + // 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 *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: 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"` + + // SourceIpRangesToNats: 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" + SourceIpRangesToNats []string `json:"sourceIpRangesToNats,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"` @@ -15442,6 +22335,8 @@ 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"` @@ -15529,6 +22424,57 @@ 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: 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: List of fully qualified URLs of reserved + // IP address resources. + UserAllocatedNatIpResources []string `json:"userAllocatedNatIpResources,omitempty"` + + // UserAllocatedNatIps: 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"` @@ -15904,6 +22850,9 @@ type SecurityPoliciesList struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *SecurityPoliciesListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -15931,6 +22880,102 @@ func (s *SecurityPoliciesList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SecurityPoliciesListWarning: [Output Only] Informational warning +// message. +type SecurityPoliciesListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*SecurityPoliciesListWarningData `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 *SecurityPoliciesListWarning) MarshalJSON() ([]byte, error) { + type noMethod SecurityPoliciesListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPoliciesListWarningData 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 *SecurityPoliciesListWarningData) MarshalJSON() ([]byte, error) { + type noMethod SecurityPoliciesListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SecurityPolicy: A security policy is comprised of one or more rules. // It can also be associated with one or more 'targets'. type SecurityPolicy struct { @@ -16047,8 +23092,8 @@ type SecurityPolicyRule struct { // property when you create the resource. Description string `json:"description,omitempty"` - // Kind: [Output only] Type of the resource. Always compute#rulefor - // security policies + // Kind: [Output only] Type of the resource. Always + // compute#securityPolicyRule for security policy rules Kind string `json:"kind,omitempty"` // Match: A match condition that incoming traffic is evaluated against. @@ -16089,12 +23134,54 @@ func (s *SecurityPolicyRule) MarshalJSON() ([]byte, error) { // SecurityPolicyRuleMatcher: Represents a match condition that incoming // traffic is evaluated against. Exactly one field must be specified. type SecurityPolicyRuleMatcher struct { + // Config: The configuration options available when specifying + // versioned_expr. This field must be specified if versioned_expr is + // specified and cannot be specified if versioned_expr is not specified. + Config *SecurityPolicyRuleMatcherConfig `json:"config,omitempty"` + // SrcIpRanges: CIDR IP address range. Only IPv4 is supported. SrcIpRanges []string `json:"srcIpRanges,omitempty"` // SrcRegionCodes: Match by country or region code. SrcRegionCodes []string `json:"srcRegionCodes,omitempty"` + // VersionedExpr: Preconfigured versioned expression. If this field is + // specified, config must also be specified. Available preconfigured + // expressions along with their requirements are: SRC_IPS_V1 - must + // specify the corresponding src_ip_range field in config. + // + // Possible values: + // "SRC_IPS_V1" + // "VERSIONED_EXPR_UNSPECIFIED" + VersionedExpr string `json:"versionedExpr,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Config") 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. "Config") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyRuleMatcher) MarshalJSON() ([]byte, error) { + type noMethod SecurityPolicyRuleMatcher + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPolicyRuleMatcherConfig struct { + // SrcIpRanges: CIDR IP address range. Only IPv4 is supported. + SrcIpRanges []string `json:"srcIpRanges,omitempty"` + // ForceSendFields is a list of field names (e.g. "SrcIpRanges") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -16112,8 +23199,8 @@ type SecurityPolicyRuleMatcher struct { NullFields []string `json:"-"` } -func (s *SecurityPolicyRuleMatcher) MarshalJSON() ([]byte, error) { - type noMethod SecurityPolicyRuleMatcher +func (s *SecurityPolicyRuleMatcherConfig) MarshalJSON() ([]byte, error) { + type noMethod SecurityPolicyRuleMatcherConfig raw := noMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -16405,6 +23492,9 @@ type SnapshotList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *SnapshotListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -16432,6 +23522,101 @@ func (s *SnapshotList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SnapshotListWarning: [Output Only] Informational warning message. +type SnapshotListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*SnapshotListWarningData `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 *SnapshotListWarning) MarshalJSON() ([]byte, error) { + type noMethod SnapshotListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SnapshotListWarningData 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 *SnapshotListWarningData) MarshalJSON() ([]byte, error) { + type noMethod SnapshotListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SslCertificate: An SslCertificate resource. This resource provides a // mechanism to upload an SSL key and certificate to the load balancer // to serve secure connections from the user. @@ -16523,6 +23708,9 @@ type SslCertificateList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *SslCertificateListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -16550,6 +23738,102 @@ func (s *SslCertificateList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SslCertificateListWarning: [Output Only] Informational warning +// message. +type SslCertificateListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*SslCertificateListWarningData `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 *SslCertificateListWarning) MarshalJSON() ([]byte, error) { + type noMethod SslCertificateListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SslCertificateListWarningData 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 *SslCertificateListWarningData) MarshalJSON() ([]byte, error) { + type noMethod SslCertificateListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Subnetwork: A Subnetwork resource. type Subnetwork struct { // AllowSubnetCidrRoutesOverlap: Whether this subnetwork can conflict @@ -16690,6 +23974,9 @@ type SubnetworkAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *SubnetworkAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -16717,6 +24004,102 @@ func (s *SubnetworkAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SubnetworkAggregatedListWarning: [Output Only] Informational warning +// message. +type SubnetworkAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*SubnetworkAggregatedListWarningData `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 *SubnetworkAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod SubnetworkAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SubnetworkAggregatedListWarningData 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 *SubnetworkAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod SubnetworkAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SubnetworkList: Contains a list of Subnetwork resources. type SubnetworkList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -16741,6 +24124,9 @@ type SubnetworkList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *SubnetworkListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -16768,6 +24154,101 @@ func (s *SubnetworkList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SubnetworkListWarning: [Output Only] Informational warning message. +type SubnetworkListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*SubnetworkListWarningData `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 *SubnetworkListWarning) MarshalJSON() ([]byte, error) { + type noMethod SubnetworkListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SubnetworkListWarningData 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 *SubnetworkListWarningData) MarshalJSON() ([]byte, error) { + type noMethod SubnetworkListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SubnetworkSecondaryRange: Represents a secondary IP range of a // subnetwork. type SubnetworkSecondaryRange struct { @@ -17171,6 +24652,9 @@ type TargetHttpProxyList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *TargetHttpProxyListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -17198,6 +24682,102 @@ func (s *TargetHttpProxyList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TargetHttpProxyListWarning: [Output Only] Informational warning +// message. +type TargetHttpProxyListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*TargetHttpProxyListWarningData `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 *TargetHttpProxyListWarning) MarshalJSON() ([]byte, error) { + type noMethod TargetHttpProxyListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetHttpProxyListWarningData 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 *TargetHttpProxyListWarningData) MarshalJSON() ([]byte, error) { + type noMethod TargetHttpProxyListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TargetHttpsProxiesSetQuicOverrideRequest struct { // QuicOverride: QUIC policy for the TargetHttpsProxy resource. // @@ -17376,6 +24956,9 @@ type TargetHttpsProxyList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *TargetHttpsProxyListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -17403,6 +24986,102 @@ func (s *TargetHttpsProxyList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TargetHttpsProxyListWarning: [Output Only] Informational warning +// message. +type TargetHttpsProxyListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*TargetHttpsProxyListWarningData `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 *TargetHttpsProxyListWarning) MarshalJSON() ([]byte, error) { + type noMethod TargetHttpsProxyListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetHttpsProxyListWarningData 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 *TargetHttpsProxyListWarningData) MarshalJSON() ([]byte, error) { + type noMethod TargetHttpsProxyListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TargetInstance: A TargetInstance resource. This resource defines an // endpoint instance that terminates traffic of certain protocols. type TargetInstance struct { @@ -17505,6 +25184,9 @@ type TargetInstanceAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *TargetInstanceAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -17532,6 +25214,102 @@ func (s *TargetInstanceAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TargetInstanceAggregatedListWarning: [Output Only] Informational +// warning message. +type TargetInstanceAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*TargetInstanceAggregatedListWarningData `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 *TargetInstanceAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod TargetInstanceAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetInstanceAggregatedListWarningData 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 *TargetInstanceAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod TargetInstanceAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TargetInstanceList: Contains a list of TargetInstance resources. type TargetInstanceList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -17555,6 +25333,9 @@ type TargetInstanceList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *TargetInstanceListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -17582,6 +25363,102 @@ func (s *TargetInstanceList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TargetInstanceListWarning: [Output Only] Informational warning +// message. +type TargetInstanceListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*TargetInstanceListWarningData `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 *TargetInstanceListWarning) MarshalJSON() ([]byte, error) { + type noMethod TargetInstanceListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetInstanceListWarningData 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 *TargetInstanceListWarningData) MarshalJSON() ([]byte, error) { + type noMethod TargetInstanceListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TargetInstancesScopedList struct { // TargetInstances: List of target instances contained in this scope. TargetInstances []*TargetInstance `json:"targetInstances,omitempty"` @@ -17877,6 +25754,9 @@ type TargetPoolAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *TargetPoolAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -17904,6 +25784,102 @@ func (s *TargetPoolAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TargetPoolAggregatedListWarning: [Output Only] Informational warning +// message. +type TargetPoolAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*TargetPoolAggregatedListWarningData `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 *TargetPoolAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod TargetPoolAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetPoolAggregatedListWarningData 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 *TargetPoolAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod TargetPoolAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TargetPoolInstanceHealth struct { HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` @@ -17963,6 +25939,9 @@ type TargetPoolList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *TargetPoolListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -17990,6 +25969,101 @@ func (s *TargetPoolList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TargetPoolListWarning: [Output Only] Informational warning message. +type TargetPoolListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*TargetPoolListWarningData `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 *TargetPoolListWarning) MarshalJSON() ([]byte, error) { + type noMethod TargetPoolListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetPoolListWarningData 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 *TargetPoolListWarningData) MarshalJSON() ([]byte, error) { + type noMethod TargetPoolListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TargetPoolsAddHealthCheckRequest struct { // HealthChecks: The HttpHealthCheck to add to the target pool. HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` @@ -18455,6 +26529,9 @@ type TargetSslProxyList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *TargetSslProxyListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -18482,6 +26559,102 @@ func (s *TargetSslProxyList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TargetSslProxyListWarning: [Output Only] Informational warning +// message. +type TargetSslProxyListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*TargetSslProxyListWarningData `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 *TargetSslProxyListWarning) MarshalJSON() ([]byte, error) { + type noMethod TargetSslProxyListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetSslProxyListWarningData 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 *TargetSslProxyListWarningData) MarshalJSON() ([]byte, error) { + type noMethod TargetSslProxyListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TargetTcpProxiesSetBackendServiceRequest struct { // Service: The URL of the new BackendService resource for the // targetTcpProxy. @@ -18636,6 +26809,9 @@ type TargetTcpProxyList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *TargetTcpProxyListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -18663,6 +26839,102 @@ func (s *TargetTcpProxyList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TargetTcpProxyListWarning: [Output Only] Informational warning +// message. +type TargetTcpProxyListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*TargetTcpProxyListWarningData `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 *TargetTcpProxyListWarning) MarshalJSON() ([]byte, error) { + type noMethod TargetTcpProxyListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetTcpProxyListWarningData 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 *TargetTcpProxyListWarningData) MarshalJSON() ([]byte, error) { + type noMethod TargetTcpProxyListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TargetVpnGateway: Represents a Target VPN gateway resource. type TargetVpnGateway struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -18771,6 +27043,9 @@ type TargetVpnGatewayAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *TargetVpnGatewayAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -18798,6 +27073,102 @@ func (s *TargetVpnGatewayAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TargetVpnGatewayAggregatedListWarning: [Output Only] Informational +// warning message. +type TargetVpnGatewayAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*TargetVpnGatewayAggregatedListWarningData `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 *TargetVpnGatewayAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod TargetVpnGatewayAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetVpnGatewayAggregatedListWarningData 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 *TargetVpnGatewayAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod TargetVpnGatewayAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TargetVpnGatewayList: Contains a list of TargetVpnGateway resources. type TargetVpnGatewayList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -18822,6 +27193,9 @@ type TargetVpnGatewayList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *TargetVpnGatewayListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -18849,6 +27223,102 @@ func (s *TargetVpnGatewayList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TargetVpnGatewayListWarning: [Output Only] Informational warning +// message. +type TargetVpnGatewayListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*TargetVpnGatewayListWarningData `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 *TargetVpnGatewayListWarning) MarshalJSON() ([]byte, error) { + type noMethod TargetVpnGatewayListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetVpnGatewayListWarningData 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 *TargetVpnGatewayListWarningData) MarshalJSON() ([]byte, error) { + type noMethod TargetVpnGatewayListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TargetVpnGatewaysScopedList struct { // TargetVpnGateways: [Output Only] List of target vpn gateways // contained in this scope. @@ -19215,6 +27685,9 @@ type UrlMapList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *UrlMapListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -19242,6 +27715,101 @@ func (s *UrlMapList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UrlMapListWarning: [Output Only] Informational warning message. +type UrlMapListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*UrlMapListWarningData `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 *UrlMapListWarning) MarshalJSON() ([]byte, error) { + type noMethod UrlMapListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type UrlMapListWarningData 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 *UrlMapListWarningData) MarshalJSON() ([]byte, error) { + type noMethod UrlMapListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type UrlMapReference struct { UrlMap string `json:"urlMap,omitempty"` @@ -19599,6 +28167,9 @@ type VpnTunnelAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *VpnTunnelAggregatedListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -19626,6 +28197,102 @@ func (s *VpnTunnelAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VpnTunnelAggregatedListWarning: [Output Only] Informational warning +// message. +type VpnTunnelAggregatedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*VpnTunnelAggregatedListWarningData `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 *VpnTunnelAggregatedListWarning) MarshalJSON() ([]byte, error) { + type noMethod VpnTunnelAggregatedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnTunnelAggregatedListWarningData 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 *VpnTunnelAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod VpnTunnelAggregatedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // VpnTunnelList: Contains a list of VpnTunnel resources. type VpnTunnelList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -19650,6 +28317,9 @@ type VpnTunnelList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *VpnTunnelListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -19677,6 +28347,101 @@ func (s *VpnTunnelList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VpnTunnelListWarning: [Output Only] Informational warning message. +type VpnTunnelListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*VpnTunnelListWarningData `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 *VpnTunnelListWarning) MarshalJSON() ([]byte, error) { + type noMethod VpnTunnelListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnTunnelListWarningData 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 *VpnTunnelListWarningData) MarshalJSON() ([]byte, error) { + type noMethod VpnTunnelListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type VpnTunnelsScopedList struct { // VpnTunnels: List of vpn tunnels contained in this scope. VpnTunnels []*VpnTunnel `json:"vpnTunnels,omitempty"` @@ -19827,6 +28592,9 @@ type XpnHostList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *XpnHostListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -19854,6 +28622,101 @@ func (s *XpnHostList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// XpnHostListWarning: [Output Only] Informational warning message. +type XpnHostListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*XpnHostListWarningData `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 *XpnHostListWarning) MarshalJSON() ([]byte, error) { + type noMethod XpnHostListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type XpnHostListWarningData 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 *XpnHostListWarningData) MarshalJSON() ([]byte, error) { + type noMethod XpnHostListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // XpnResourceId: Service resource (a.k.a service project) ID. type XpnResourceId struct { // Id: The ID of the service resource. In the case of projects, this @@ -19985,6 +28848,9 @@ type ZoneList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *ZoneListWarning `json:"warning,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -20012,6 +28878,101 @@ func (s *ZoneList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ZoneListWarning: [Output Only] Informational warning message. +type ZoneListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*ZoneListWarningData `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 *ZoneListWarning) MarshalJSON() ([]byte, error) { + type noMethod ZoneListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ZoneListWarningData 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 *ZoneListWarningData) MarshalJSON() ([]byte, error) { + type noMethod ZoneListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ZoneSetLabelsRequest struct { // LabelFingerprint: The fingerprint of the previous set of labels for // this resource, used to detect conflicts. The fingerprint is initially @@ -23287,8 +32248,7 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -24420,7 +33380,7 @@ func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -25016,8 +33976,7 @@ func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -25150,7 +34109,7 @@ func (c *BackendBucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -25297,7 +34256,7 @@ func (c *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -27127,8 +36086,7 @@ func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -27431,7 +36389,7 @@ func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -27753,7 +36711,7 @@ func (c *ClientSslPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -31424,8 +40382,7 @@ func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -31558,7 +40515,7 @@ func (c *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -32954,8 +41911,7 @@ func (c *ForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -34486,7 +43442,7 @@ func (c *GlobalAddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -35402,8 +44358,7 @@ func (c *GlobalForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Oper // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -35855,7 +44810,7 @@ func (c *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallO // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -37533,8 +46488,7 @@ func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -37667,7 +46621,7 @@ func (c *HealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (* // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -40929,8 +49883,7 @@ func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -41063,7 +50016,7 @@ func (c *HttpHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -42146,8 +51099,7 @@ func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -42280,7 +51232,7 @@ func (c *HttpsHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOptio // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -42664,11 +51616,14 @@ func (r *ImagesService) Deprecate(project string, image string, deprecationstatu // request if it has already been completed. // // For example, consider a situation where you make an initial request -// and then 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 +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second // request. This prevents clients from accidentally creating duplicate // commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). func (c *ImagesDeprecateCall) RequestId(requestId string) *ImagesDeprecateCall { c.urlParams_.Set("requestId", requestId) return c @@ -42784,7 +51739,7 @@ func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "type": "string" // }, // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then 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.", + // "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" // } @@ -43243,7 +52198,7 @@ func (c *ImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, erro // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -43822,7 +52777,7 @@ func (c *ImagesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, erro // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -44116,7 +53071,7 @@ func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPe // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -46522,8 +55477,7 @@ func (c *InstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Oper // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -48016,8 +56970,20 @@ func (r *InstanceGroupManagersService) UpdatePerInstanceConfigs(project string, return c } -// RequestId sets the optional parameter "requestId": begin_interface: -// MixerMutationRequestBuilder Request ID to support idempotency. +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) RequestId(requestId string) *InstanceGroupManagersUpdatePerInstanceConfigsCall { c.urlParams_.Set("requestId", requestId) return c @@ -48134,7 +57100,7 @@ func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...googleapi // "type": "string" // }, // "requestId": { - // "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + // "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" // }, @@ -51009,7 +59975,7 @@ func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -58233,6 +67199,164 @@ func (c *InterconnectAttachmentsListCall) Pages(ctx context.Context, f func(*Int } } +// method id "compute.interconnectAttachments.setIamPolicy": + +type InterconnectAttachmentsSetIamPolicyCall struct { + s *Service + project string + region string + resource string + policy *Policy + 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 *InterconnectAttachmentsService) SetIamPolicy(project string, region string, resource string, policy *Policy) *InterconnectAttachmentsSetIamPolicyCall { + c := &InterconnectAttachmentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.policy = policy + 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 *InterconnectAttachmentsSetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsSetIamPolicyCall { + 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 *InterconnectAttachmentsSetIamPolicyCall) Context(ctx context.Context) *InterconnectAttachmentsSetIamPolicyCall { + 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 *InterconnectAttachmentsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectAttachmentsSetIamPolicyCall) 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.policy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments/{resource}/setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnectAttachments.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 *InterconnectAttachmentsSetIamPolicyCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "httpMethod": "POST", + // "id": "compute.interconnectAttachments.setIamPolicy", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/interconnectAttachments/{resource}/setIamPolicy", + // "request": { + // "$ref": "Policy" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.interconnectAttachments.testIamPermissions": type InterconnectAttachmentsTestIamPermissionsCall struct { @@ -58924,7 +68048,7 @@ func (c *InterconnectLocationsTestIamPermissionsCall) Do(opts ...googleapi.CallO // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -59257,6 +68381,158 @@ func (c *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, } +// method id "compute.interconnects.getIamPolicy": + +type InterconnectsGetIamPolicyCall struct { + s *Service + project string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. +func (r *InterconnectsService) GetIamPolicy(project string, resource string) *InterconnectsGetIamPolicyCall { + c := &InterconnectsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + 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 *InterconnectsGetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectsGetIamPolicyCall { + 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 *InterconnectsGetIamPolicyCall) IfNoneMatch(entityTag string) *InterconnectsGetIamPolicyCall { + 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 *InterconnectsGetIamPolicyCall) Context(ctx context.Context) *InterconnectsGetIamPolicyCall { + 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 *InterconnectsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{resource}/getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnects.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 *InterconnectsGetIamPolicyCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "httpMethod": "GET", + // "id": "compute.interconnects.getIamPolicy", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name of the resource for this request.", + // "location": "path", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/interconnects/{resource}/getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "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 { @@ -59835,8 +69111,154 @@ func (c *InterconnectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, e // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.interconnects.setIamPolicy": + +type InterconnectsSetIamPolicyCall struct { + s *Service + project string + resource string + policy *Policy + 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 *InterconnectsService) SetIamPolicy(project string, resource string, policy *Policy) *InterconnectsSetIamPolicyCall { + c := &InterconnectsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.policy = policy + 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 *InterconnectsSetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectsSetIamPolicyCall { + 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 *InterconnectsSetIamPolicyCall) Context(ctx context.Context) *InterconnectsSetIamPolicyCall { + 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 *InterconnectsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectsSetIamPolicyCall) 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.policy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{resource}/setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnects.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 *InterconnectsSetIamPolicyCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "httpMethod": "POST", + // "id": "compute.interconnects.setIamPolicy", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name of the resource for this request.", + // "location": "path", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/interconnects/{resource}/setIamPolicy", + // "request": { + // "$ref": "Policy" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" // ] // } @@ -59969,7 +69391,7 @@ func (c *InterconnectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) ( // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -59990,6 +69412,158 @@ func (c *InterconnectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) ( } +// method id "compute.licenseCodes.get": + +type LicenseCodesGetCall struct { + s *Service + project string + licenseCode string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Return a specified license code. License codes are mirrored +// across all projects that have permissions to read the License Code. +func (r *LicenseCodesService) Get(project string, licenseCode string) *LicenseCodesGetCall { + c := &LicenseCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.licenseCode = licenseCode + 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 *LicenseCodesGetCall) Fields(s ...googleapi.Field) *LicenseCodesGetCall { + 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 *LicenseCodesGetCall) IfNoneMatch(entityTag string) *LicenseCodesGetCall { + 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 *LicenseCodesGetCall) Context(ctx context.Context) *LicenseCodesGetCall { + 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 *LicenseCodesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LicenseCodesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenseCodes/{licenseCode}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "licenseCode": c.licenseCode, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.licenseCodes.get" call. +// Exactly one of *LicenseCode or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *LicenseCode.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *LicenseCodesGetCall) Do(opts ...googleapi.CallOption) (*LicenseCode, 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 := &LicenseCode{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code.", + // "httpMethod": "GET", + // "id": "compute.licenseCodes.get", + // "parameterOrder": [ + // "project", + // "licenseCode" + // ], + // "parameters": { + // "licenseCode": { + // "description": "Number corresponding to the License code resource to return.", + // "location": "path", + // "pattern": "[0-9]{0,61}?", + // "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/licenseCodes/{licenseCode}", + // "response": { + // "$ref": "LicenseCode" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.licenses.delete": type LicensesDeleteCall struct { @@ -60009,6 +69583,25 @@ func (r *LicensesService) Delete(project string, license string) *LicensesDelete return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *LicensesDeleteCall) RequestId(requestId string) *LicensesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -60112,6 +69705,11 @@ func (c *LicensesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/licenses/{license}", @@ -60412,7 +70010,7 @@ func (c *LicensesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -60975,7 +70573,7 @@ func (c *LicensesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -61122,7 +70720,7 @@ func (c *LicensesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Test // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -61823,6 +71421,1813 @@ func (c *MachineTypesListCall) Pages(ctx context.Context, f func(*MachineTypeLis } } +// method id "compute.networkEndpointGroups.aggregatedList": + +type NetworkEndpointGroupsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves the list of network endpoint groups and +// sorts them by zone. +func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEndpointGroupsAggregatedListCall { + c := &NetworkEndpointGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Sets a filter +// {expression} for filtering listed resources. Your {expression} must +// be in the format: field_name comparison_string literal_string. +// +// The field_name is the name of the field you want to compare. Only +// atomic field types are supported (string, number, boolean). The +// comparison_string must be either eq (equals) or ne (not equals). The +// literal_string is the string value to filter to. The literal value +// must be valid for the type of field you are filtering by (string, +// number, boolean). For string fields, the literal value is interpreted +// as a regular expression using RE2 syntax. The literal value must +// match the entire field. +// +// For example, to filter for instances that do not have a name of +// example-instance, you would use name ne example-instance. +// +// You can filter on nested fields. For example, you could filter on +// instances that have set the scheduling.automaticRestart field to +// true. Use filtering on nested fields to take advantage of labels to +// organize and search for results based on label values. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart eq +// true) (zone eq us-central1-f). Multiple expressions are treated as +// AND expressions, meaning that resources must match all expressions to +// pass the filters. +func (c *NetworkEndpointGroupsAggregatedListCall) Filter(filter string) *NetworkEndpointGroupsAggregatedListCall { + 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 *NetworkEndpointGroupsAggregatedListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsAggregatedListCall { + 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 *NetworkEndpointGroupsAggregatedListCall) OrderBy(orderBy string) *NetworkEndpointGroupsAggregatedListCall { + 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 *NetworkEndpointGroupsAggregatedListCall) PageToken(pageToken string) *NetworkEndpointGroupsAggregatedListCall { + 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 *NetworkEndpointGroupsAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAggregatedListCall { + 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 *NetworkEndpointGroupsAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsAggregatedListCall { + 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 *NetworkEndpointGroupsAggregatedListCall) Context(ctx context.Context) *NetworkEndpointGroupsAggregatedListCall { + 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 *NetworkEndpointGroupsAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/networkEndpointGroups") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.aggregatedList" call. +// Exactly one of *NetworkEndpointGroupAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *NetworkEndpointGroupAggregatedList.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupAggregatedList, 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 := &NetworkEndpointGroupAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of network endpoint groups and sorts them by zone.", + // "httpMethod": "GET", + // "id": "compute.networkEndpointGroups.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + // "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" + // } + // }, + // "path": "{project}/aggregated/networkEndpointGroups", + // "response": { + // "$ref": "NetworkEndpointGroupAggregatedList" + // }, + // "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 *NetworkEndpointGroupsAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupAggregatedList) 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.networkEndpointGroups.attachNetworkEndpoints": + +type NetworkEndpointGroupsAttachNetworkEndpointsCall struct { + s *Service + project string + zone string + networkEndpointGroup string + networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AttachNetworkEndpoints: Attach a list of network endpoints to the +// specified network endpoint group. +func (r *NetworkEndpointGroupsService) AttachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + c := &NetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + c.networkendpointgroupsattachendpointsrequest = networkendpointgroupsattachendpointsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) 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.networkendpointgroupsattachendpointsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.attachNetworkEndpoints" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Attach a list of network endpoints to the specified network endpoint group.", + // "httpMethod": "POST", + // "id": "compute.networkEndpointGroups.attachNetworkEndpoints", + // "parameterOrder": [ + // "project", + // "zone", + // "networkEndpointGroup" + // ], + // "parameters": { + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, + // "zone": { + // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", + // "request": { + // "$ref": "NetworkEndpointGroupsAttachEndpointsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEndpointGroups.delete": + +type NetworkEndpointGroupsDeleteCall struct { + s *Service + project string + zone string + networkEndpointGroup string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified network endpoint group. The network +// endpoints in the NEG and the VM instances they belong to are not +// terminated when the NEG is deleted. Note that the NEG cannot be +// deleted if there are backend services referencing it. +func (r *NetworkEndpointGroupsService) Delete(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsDeleteCall { + c := &NetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NetworkEndpointGroupsDeleteCall) RequestId(requestId string) *NetworkEndpointGroupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDeleteCall { + 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 *NetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *NetworkEndpointGroupsDeleteCall { + 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 *NetworkEndpointGroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.", + // "httpMethod": "DELETE", + // "id": "compute.networkEndpointGroups.delete", + // "parameterOrder": [ + // "project", + // "zone", + // "networkEndpointGroup" + // ], + // "parameters": { + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group to delete. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, + // "zone": { + // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEndpointGroups.detachNetworkEndpoints": + +type NetworkEndpointGroupsDetachNetworkEndpointsCall struct { + s *Service + project string + zone string + networkEndpointGroup string + networkendpointgroupsdetachendpointsrequest *NetworkEndpointGroupsDetachEndpointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DetachNetworkEndpoints: Detach a list of network endpoints from the +// specified network endpoint group. +func (r *NetworkEndpointGroupsService) DetachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsdetachendpointsrequest *NetworkEndpointGroupsDetachEndpointsRequest) *NetworkEndpointGroupsDetachNetworkEndpointsCall { + c := &NetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + c.networkendpointgroupsdetachendpointsrequest = networkendpointgroupsdetachendpointsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsDetachNetworkEndpointsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDetachNetworkEndpointsCall { + 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 *NetworkEndpointGroupsDetachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsDetachNetworkEndpointsCall { + 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 *NetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) 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.networkendpointgroupsdetachendpointsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.detachNetworkEndpoints" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Detach a list of network endpoints from the specified network endpoint group.", + // "httpMethod": "POST", + // "id": "compute.networkEndpointGroups.detachNetworkEndpoints", + // "parameterOrder": [ + // "project", + // "zone", + // "networkEndpointGroup" + // ], + // "parameters": { + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, + // "zone": { + // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", + // "request": { + // "$ref": "NetworkEndpointGroupsDetachEndpointsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEndpointGroups.get": + +type NetworkEndpointGroupsGetCall struct { + s *Service + project string + zone string + networkEndpointGroup string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified network endpoint group. Get a list of +// available network endpoint groups by making a list() request. +func (r *NetworkEndpointGroupsService) Get(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsGetCall { + c := &NetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + 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 *NetworkEndpointGroupsGetCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsGetCall { + 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 *NetworkEndpointGroupsGetCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsGetCall { + 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 *NetworkEndpointGroupsGetCall) Context(ctx context.Context) *NetworkEndpointGroupsGetCall { + 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 *NetworkEndpointGroupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.get" call. +// Exactly one of *NetworkEndpointGroup or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *NetworkEndpointGroup.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroup, 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 := &NetworkEndpointGroup{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified network endpoint group. Get a list of available network endpoint groups by making a list() request.", + // "httpMethod": "GET", + // "id": "compute.networkEndpointGroups.get", + // "parameterOrder": [ + // "project", + // "zone", + // "networkEndpointGroup" + // ], + // "parameters": { + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", + // "response": { + // "$ref": "NetworkEndpointGroup" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.networkEndpointGroups.insert": + +type NetworkEndpointGroupsInsertCall struct { + s *Service + project string + zone string + networkendpointgroup *NetworkEndpointGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a network endpoint group in the specified project +// using the parameters that are included in the request. +func (r *NetworkEndpointGroupsService) Insert(project string, zone string, networkendpointgroup *NetworkEndpointGroup) *NetworkEndpointGroupsInsertCall { + c := &NetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkendpointgroup = networkendpointgroup + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NetworkEndpointGroupsInsertCall) RequestId(requestId string) *NetworkEndpointGroupsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsInsertCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsInsertCall { + 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 *NetworkEndpointGroupsInsertCall) Context(ctx context.Context) *NetworkEndpointGroupsInsertCall { + 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 *NetworkEndpointGroupsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsInsertCall) 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.networkendpointgroup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request.", + // "httpMethod": "POST", + // "id": "compute.networkEndpointGroups.insert", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, + // "zone": { + // "description": "The name of the zone where you want to create the network endpoint group. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/networkEndpointGroups", + // "request": { + // "$ref": "NetworkEndpointGroup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEndpointGroups.list": + +type NetworkEndpointGroupsListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of network endpoint groups that are located +// in the specified project and zone. +func (r *NetworkEndpointGroupsService) List(project string, zone string) *NetworkEndpointGroupsListCall { + c := &NetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": Sets a filter +// {expression} for filtering listed resources. Your {expression} must +// be in the format: field_name comparison_string literal_string. +// +// The field_name is the name of the field you want to compare. Only +// atomic field types are supported (string, number, boolean). The +// comparison_string must be either eq (equals) or ne (not equals). The +// literal_string is the string value to filter to. The literal value +// must be valid for the type of field you are filtering by (string, +// number, boolean). For string fields, the literal value is interpreted +// as a regular expression using RE2 syntax. The literal value must +// match the entire field. +// +// For example, to filter for instances that do not have a name of +// example-instance, you would use name ne example-instance. +// +// You can filter on nested fields. For example, you could filter on +// instances that have set the scheduling.automaticRestart field to +// true. Use filtering on nested fields to take advantage of labels to +// organize and search for results based on label values. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart eq +// true) (zone eq us-central1-f). Multiple expressions are treated as +// AND expressions, meaning that resources must match all expressions to +// pass the filters. +func (c *NetworkEndpointGroupsListCall) Filter(filter string) *NetworkEndpointGroupsListCall { + 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 *NetworkEndpointGroupsListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsListCall { + 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 *NetworkEndpointGroupsListCall) OrderBy(orderBy string) *NetworkEndpointGroupsListCall { + 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 *NetworkEndpointGroupsListCall) PageToken(pageToken string) *NetworkEndpointGroupsListCall { + 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 *NetworkEndpointGroupsListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsListCall { + 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 *NetworkEndpointGroupsListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsListCall { + 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 *NetworkEndpointGroupsListCall) Context(ctx context.Context) *NetworkEndpointGroupsListCall { + 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 *NetworkEndpointGroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.list" call. +// Exactly one of *NetworkEndpointGroupList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *NetworkEndpointGroupList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupList, 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 := &NetworkEndpointGroupList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone.", + // "httpMethod": "GET", + // "id": "compute.networkEndpointGroups.list", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "filter": { + // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + // "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" + // }, + // "zone": { + // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/networkEndpointGroups", + // "response": { + // "$ref": "NetworkEndpointGroupList" + // }, + // "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 *NetworkEndpointGroupsListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupList) 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.networkEndpointGroups.listNetworkEndpoints": + +type NetworkEndpointGroupsListNetworkEndpointsCall struct { + s *Service + project string + zone string + networkEndpointGroup string + networkendpointgroupslistendpointsrequest *NetworkEndpointGroupsListEndpointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ListNetworkEndpoints: List the network endpoints in the specified +// network endpoint group. +func (r *NetworkEndpointGroupsService) ListNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupslistendpointsrequest *NetworkEndpointGroupsListEndpointsRequest) *NetworkEndpointGroupsListNetworkEndpointsCall { + c := &NetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + c.networkendpointgroupslistendpointsrequest = networkendpointgroupslistendpointsrequest + return c +} + +// Filter sets the optional parameter "filter": Sets a filter +// {expression} for filtering listed resources. Your {expression} must +// be in the format: field_name comparison_string literal_string. +// +// The field_name is the name of the field you want to compare. Only +// atomic field types are supported (string, number, boolean). The +// comparison_string must be either eq (equals) or ne (not equals). The +// literal_string is the string value to filter to. The literal value +// must be valid for the type of field you are filtering by (string, +// number, boolean). For string fields, the literal value is interpreted +// as a regular expression using RE2 syntax. The literal value must +// match the entire field. +// +// For example, to filter for instances that do not have a name of +// example-instance, you would use name ne example-instance. +// +// You can filter on nested fields. For example, you could filter on +// instances that have set the scheduling.automaticRestart field to +// true. Use filtering on nested fields to take advantage of labels to +// organize and search for results based on label values. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart eq +// true) (zone eq us-central1-f). Multiple expressions are treated as +// AND expressions, meaning that resources must match all expressions to +// pass the filters. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Filter(filter string) *NetworkEndpointGroupsListNetworkEndpointsCall { + 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 *NetworkEndpointGroupsListNetworkEndpointsCall) MaxResults(maxResults int64) *NetworkEndpointGroupsListNetworkEndpointsCall { + 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 *NetworkEndpointGroupsListNetworkEndpointsCall) OrderBy(orderBy string) *NetworkEndpointGroupsListNetworkEndpointsCall { + 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 *NetworkEndpointGroupsListNetworkEndpointsCall) PageToken(pageToken string) *NetworkEndpointGroupsListNetworkEndpointsCall { + 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 *NetworkEndpointGroupsListNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsListNetworkEndpointsCall { + 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 *NetworkEndpointGroupsListNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsListNetworkEndpointsCall { + 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 *NetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) 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.networkendpointgroupslistendpointsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.listNetworkEndpoints" call. +// Exactly one of *NetworkEndpointGroupsListNetworkEndpoints or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *NetworkEndpointGroupsListNetworkEndpoints.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupsListNetworkEndpoints, 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 := &NetworkEndpointGroupsListNetworkEndpoints{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List the network endpoints in the specified network endpoint group.", + // "httpMethod": "POST", + // "id": "compute.networkEndpointGroups.listNetworkEndpoints", + // "parameterOrder": [ + // "project", + // "zone", + // "networkEndpointGroup" + // ], + // "parameters": { + // "filter": { + // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + // "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" + // }, + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "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" + // }, + // "zone": { + // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", + // "request": { + // "$ref": "NetworkEndpointGroupsListEndpointsRequest" + // }, + // "response": { + // "$ref": "NetworkEndpointGroupsListNetworkEndpoints" + // }, + // "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 *NetworkEndpointGroupsListNetworkEndpointsCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupsListNetworkEndpoints) 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.networkEndpointGroups.testIamPermissions": + +type NetworkEndpointGroupsTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +func (r *NetworkEndpointGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkEndpointGroupsTestIamPermissionsCall { + c := &NetworkEndpointGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsTestIamPermissionsCall { + 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 *NetworkEndpointGroupsTestIamPermissionsCall) Context(ctx context.Context) *NetworkEndpointGroupsTestIamPermissionsCall { + 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 *NetworkEndpointGroupsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsTestIamPermissionsCall) 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.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "httpMethod": "POST", + // "id": "compute.networkEndpointGroups.testIamPermissions", + // "parameterOrder": [ + // "project", + // "zone", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-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}/networkEndpointGroups/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.networks.addPeering": type NetworksAddPeeringCall struct { @@ -63210,8 +74615,7 @@ func (c *NetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -63675,7 +75079,7 @@ func (c *NetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Test // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -66610,9 +78014,9 @@ func (c *RegionAutoscalersPatchCall) Autoscaler(autoscaler string) *RegionAutosc // request if it has already been completed. // // For example, consider a situation where you make an initial request -// and then 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 +// 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. // @@ -66739,7 +78143,7 @@ func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // "type": "string" // }, // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then 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).", + // "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" // } @@ -66753,8 +78157,7 @@ func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -66954,11 +78357,14 @@ func (c *RegionAutoscalersUpdateCall) Autoscaler(autoscaler string) *RegionAutos // request if it has already been completed. // // For example, consider a situation where you make an initial request -// and then 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 +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second // request. This prevents clients from accidentally creating duplicate // commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). func (c *RegionAutoscalersUpdateCall) RequestId(requestId string) *RegionAutoscalersUpdateCall { c.urlParams_.Set("requestId", requestId) return c @@ -67080,7 +78486,7 @@ func (c *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operati // "type": "string" // }, // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then 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.", + // "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" // } @@ -68208,8 +79614,7 @@ func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Oper // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -70545,11 +81950,14 @@ func (r *RegionDisksService) Insert(project string, region string, disk *Disk) * // request if it has already been completed. // // For example, consider a situation where you make an initial request -// and then 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 +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second // request. This prevents clients from accidentally creating duplicate // commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). func (c *RegionDisksInsertCall) RequestId(requestId string) *RegionDisksInsertCall { c.urlParams_.Set("requestId", requestId) return c @@ -70672,7 +82080,7 @@ func (c *RegionDisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er // "type": "string" // }, // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then 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.", + // "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" // }, @@ -73606,8 +85014,7 @@ func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -78382,8 +89789,7 @@ func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -79745,7 +91151,7 @@ func (c *RoutesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPe // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -80058,7 +91464,7 @@ func (c *SecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPol // "type": "string" // }, // "securityPolicy": { - // "description": "Name of the security policy to update.", + // "description": "Name of the security policy to get.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -80655,8 +92061,7 @@ func (c *SecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -80789,7 +92194,7 @@ func (c *SecurityPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -81264,7 +92669,7 @@ func (c *SnapshotsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -81662,7 +93067,7 @@ func (c *SnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -81956,7 +93361,7 @@ func (c *SnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -82828,7 +94233,7 @@ func (c *SslCertificatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -84392,8 +95797,7 @@ func (c *SubnetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -85925,7 +97329,7 @@ func (c *TargetHttpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -86691,6 +98095,25 @@ func (r *TargetHttpsProxiesService) SetQuicOverride(project string, targetHttpsP return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetHttpsProxiesSetQuicOverrideCall) RequestId(requestId string) *TargetHttpsProxiesSetQuicOverrideCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -86793,6 +98216,11 @@ func (c *TargetHttpsProxiesSetQuicOverrideCall) Do(opts ...googleapi.CallOption) // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetHttpsProxy": { // "description": "Name of the TargetHttpsProxy resource to set the QUIC override policy for. The name should conform to RFC1035.", // "location": "path", @@ -87282,7 +98710,7 @@ func (c *TargetHttpsProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOpti // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -92113,7 +103541,7 @@ func (c *TargetSslProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -93325,7 +104753,7 @@ func (c *TargetTcpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -95590,8 +107018,7 @@ func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -95724,7 +107151,7 @@ func (c *UrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestP // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } 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 626b31832..969d806bd 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 @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/gfBEnRRtVgnVgbcTDcEDV6LmQ_A\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/8hLk7L_JQ1G44uTMorpu3AkR7MY\"", "discoveryVersion": "v1", "id": "compute:beta", "name": "compute", "version": "beta", - "revision": "20170721", + "revision": "20170816", "title": "Compute Engine API", "description": "Creates and runs virtual machines on Google Cloud Platform.", "ownerDomain": "google.com", @@ -1347,7 +1347,7 @@ }, "healthChecks": { "type": "array", - "description": "The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for GCE backend services. A health check must not be specified for GAE app backend and Cloud Function backend.\n\nFor internal load balancing, a URL to a HealthCheck resource must be specified instead.", + "description": "The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for Compute Engine backend services. A health check must not be specified for App Engine backend and Cloud Function backend.\n\nFor internal load balancing, a URL to a HealthCheck resource must be specified instead.", "items": { "type": "string" } @@ -1367,6 +1367,7 @@ }, "loadBalancingScheme": { "type": "string", + "description": "Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. Possible values are INTERNAL and EXTERNAL.", "enum": [ "EXTERNAL", "INTERNAL", @@ -1414,6 +1415,10 @@ "type": "string", "description": "[Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services." }, + "securityPolicy": { + "type": "string", + "description": "[Output Only] The resource URL for the security policy associated with this backend service." + }, "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for the resource." @@ -3881,7 +3886,7 @@ }, "networkInterfaces": { "type": "array", - "description": "An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one interface is supported per instance.", + "description": "An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance.", "items": { "$ref": "NetworkInterface" } @@ -4208,7 +4213,7 @@ }, "serviceAccount": { "type": "string", - "description": "Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used." + "description": "[Output Only] 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." }, "targetPools": { "type": "array", @@ -5263,6 +5268,625 @@ } } }, + "Interconnect": { + "id": "Interconnect", + "type": "object", + "description": "Protocol definitions for Mixer API to support Interconnect. Next available tag: 23", + "properties": { + "adminEnabled": { + "type": "boolean", + "description": "Administrative status of the interconnect. When this is set to ?true?, the Interconnect is functional and may carry traffic (assuming there are functional InterconnectAttachments and other requirements are satisfied). When set to ?false?, no packets will be carried over this Interconnect and no BGP routes will be exchanged over it. By default, it is set to ?true?." + }, + "circuitInfos": { + "type": "array", + "description": "[Output Only] List of CircuitInfo objects, that describe the individual circuits in this LAG.", + "items": { + "$ref": "InterconnectCircuitInfo" + } + }, + "connectionAuthorization": { + "type": "string", + "description": "[Output Only] URL to retrieve the Letter Of Authority and Customer Facility Assignment (LOA-CFA) documentation relating to this Interconnect. This documentation authorizes the facility provider to connect to the specified crossconnect ports." + }, + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "customerName": { + "type": "string", + "description": "Customer name, to put in the Letter of Authorization as the party authorized to request a crossconnect." + }, + "description": { + "type": "string", + "description": "An optional description of this resource. Provide this property when you create the resource." + }, + "expectedOutages": { + "type": "array", + "description": "[Output Only] List of outages expected for this Interconnect.", + "items": { + "$ref": "InterconnectOutageNotification" + } + }, + "googleIpAddress": { + "type": "string", + "description": "[Output Only] IP address configured on the Google side of the Interconnect link. This can be used only for ping tests." + }, + "googleReferenceId": { + "type": "string", + "description": "[Output Only] Google reference ID; to be used when raising support tickets with Google or otherwise to debug backend connectivity issues." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "interconnectAttachments": { + "type": "array", + "description": "[Output Only] A list of the URLs of all InterconnectAttachments configured to use this Interconnect.", + "items": { + "type": "string" + } + }, + "interconnectType": { + "type": "string", + "enum": [ + "IT_PRIVATE" + ], + "enumDescriptions": [ + "" + ] + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#interconnect for interconnects.", + "default": "compute#interconnect" + }, + "linkType": { + "type": "string", + "enum": [ + "LINK_TYPE_ETHERNET_10G_LR" + ], + "enumDescriptions": [ + "" + ] + }, + "location": { + "type": "string", + "description": "URL of the InterconnectLocation object that represents where this connection is to be provisioned." + }, + "name": { + "type": "string", + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.interconnects.insert" + ] + } + }, + "nocContactEmail": { + "type": "string", + "description": "Email address to contact the customer NOC for operations and maintenance notifications regarding this Interconnect. If specified, this will be used for notifications in addition to all other forms described, such as Stackdriver logs alerting and Cloud Notifications." + }, + "operationalStatus": { + "type": "string", + "description": "[Output Only] The current status of whether or not this Interconnect is functional.", + "enum": [ + "OS_ACTIVE", + "OS_UNPROVISIONED" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "peerIpAddress": { + "type": "string", + "description": "[Output Only] IP address configured on the customer side of the Interconnect link. The customer should configure this IP address during turnup when prompted by Google NOC. This can be used only for ping tests." + }, + "provisionedLinkCount": { + "type": "integer", + "description": "[Output Only] Number of links actually provisioned in this interconnect.", + "format": "int32" + }, + "requestedLinkCount": { + "type": "integer", + "description": "Target number of physical links in the link bundle, as requested by the customer.", + "format": "int32" + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + } + } + }, + "InterconnectAttachment": { + "id": "InterconnectAttachment", + "type": "object", + "description": "Protocol definitions for Mixer API to support InterconnectAttachment. Next available tag: 14", + "properties": { + "cloudRouterIpAddress": { + "type": "string", + "description": "[Output Only] IPv4 address + prefix length to be configured on Cloud Router Interface for this interconnect attachment." + }, + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "customerRouterIpAddress": { + "type": "string", + "description": "[Output Only] IPv4 address + prefix length to be configured on the customer router subinterface for this interconnect attachment." + }, + "description": { + "type": "string", + "description": "An optional description of this resource. Provide this property when you create the resource." + }, + "googleReferenceId": { + "type": "string", + "description": "[Output Only] Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "interconnect": { + "type": "string", + "description": "URL of the underlying Interconnect object that this attachment's traffic will traverse through." + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#interconnectAttachment for interconnect attachments.", + "default": "compute#interconnectAttachment" + }, + "name": { + "type": "string", + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "operationalStatus": { + "type": "string", + "description": "[Output Only] The current status of whether or not this interconnect attachment is functional.", + "enum": [ + "OS_ACTIVE", + "OS_UNPROVISIONED" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "privateInterconnectInfo": { + "$ref": "InterconnectAttachmentPrivateInfo", + "description": "[Output Only] Information specific to a Private InterconnectAttachment. Only populated if the interconnect that this is attached is of type IT_PRIVATE." + }, + "region": { + "type": "string", + "description": "[Output Only] URL of the region where the regional interconnect attachment resides." + }, + "router": { + "type": "string", + "description": "URL of the cloud router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network & region within which the Cloud Router is configured." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + } + } + }, + "InterconnectAttachmentAggregatedList": { + "id": "InterconnectAttachmentAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "object", + "description": "A list of InterconnectAttachmentsScopedList resources.", + "additionalProperties": { + "$ref": "InterconnectAttachmentsScopedList", + "description": "Name of the scope containing this set of interconnect attachments." + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#interconnectAttachmentAggregatedList for aggregated lists of interconnect attachments.", + "default": "compute#interconnectAttachmentAggregatedList" + }, + "nextPageToken": { + "type": "string", + "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." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "InterconnectAttachmentList": { + "id": "InterconnectAttachmentList", + "type": "object", + "description": "Response to the list request, and contains a list of interconnect attachments.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "array", + "description": "A list of InterconnectAttachment resources.", + "items": { + "$ref": "InterconnectAttachment" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#interconnectAttachmentList for lists of interconnect attachments.", + "default": "compute#interconnectAttachmentList" + }, + "nextPageToken": { + "type": "string", + "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." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "InterconnectAttachmentPrivateInfo": { + "id": "InterconnectAttachmentPrivateInfo", + "type": "object", + "description": "Private information for an interconnect attachment when this belongs to an interconnect of type IT_PRIVATE.", + "properties": { + "tag8021q": { + "type": "integer", + "description": "[Output Only] 802.1q encapsulation tag to be used for traffic between Google and the customer, going to and from this network and region.", + "format": "uint32" + } + } + }, + "InterconnectAttachmentsScopedList": { + "id": "InterconnectAttachmentsScopedList", + "type": "object", + "properties": { + "interconnectAttachments": { + "type": "array", + "description": "List of interconnect attachments contained in this scope.", + "items": { + "$ref": "InterconnectAttachment" + } + }, + "warning": { + "type": "object", + "description": "Informational warning which replaces the list of addresses when the list is empty.", + "properties": { + "code": { + "type": "string", + "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", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "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", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "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)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, + "InterconnectCircuitInfo": { + "id": "InterconnectCircuitInfo", + "type": "object", + "description": "Describes a single physical circuit between the Customer and Google. CircuitInfo objects are created by Google, so all fields are output only. Next id: 4", + "properties": { + "customerDemarcId": { + "type": "string", + "description": "Customer-side demarc ID for this circuit. This will only be set if it was provided by the Customer to Google during circuit turn-up." + }, + "googleCircuitId": { + "type": "string", + "description": "Google-assigned unique ID for this circuit. Assigned at circuit turn-up." + }, + "googleDemarcId": { + "type": "string", + "description": "Google-side demarc ID for this circuit. Assigned at circuit turn-up and provided by Google to the customer in the LOA." + } + } + }, + "InterconnectList": { + "id": "InterconnectList", + "type": "object", + "description": "Response to the list request, and contains a list of interconnects.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "array", + "description": "A list of Interconnect resources.", + "items": { + "$ref": "Interconnect" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#interconnectList for lists of interconnects.", + "default": "compute#interconnectList" + }, + "nextPageToken": { + "type": "string", + "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." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "InterconnectLocation": { + "id": "InterconnectLocation", + "type": "object", + "description": "Protocol definitions for Mixer API to support InterconnectLocation.", + "properties": { + "address": { + "type": "string", + "description": "[Output Only] The postal address of the Point of Presence, each line in the address is separated by a newline character." + }, + "availabilityZone": { + "type": "string", + "description": "Availability zone for this location. Within a city, maintenance will not be simultaneously scheduled in more than one availability zone. Example: \"zone1\" or \"zone2\"." + }, + "city": { + "type": "string", + "description": "City designator used by the Interconnect UI to locate this InterconnectLocation within the Continent. For example: \"Chicago, IL\", \"Amsterdam, Netherlands\"." + }, + "continent": { + "type": "string", + "description": "Continent for this location. Used by the location picker in the Interconnect UI.", + "enum": [ + "C_AFRICA", + "C_ASIA_PAC", + "C_EUROPE", + "C_NORTH_AMERICA", + "C_SOUTH_AMERICA" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ] + }, + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "[Output Only] An optional description of the resource." + }, + "facilityProvider": { + "type": "string", + "description": "[Output Only] The name of the provider for this facility (e.g., EQUINIX)." + }, + "facilityProviderFacilityId": { + "type": "string", + "description": "[Output Only] A provider-assigned Identifier for this facility (e.g., Ashburn-DC1)." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#interconnectLocation for interconnect locations.", + "default": "compute#interconnectLocation" + }, + "name": { + "type": "string", + "description": "[Output Only] Name of the resource." + }, + "peeringdbFacilityId": { + "type": "string", + "description": "[Output Only] The peeringdb identifier for this facility (corresponding with a netfac type in peeringdb)." + }, + "regionInfos": { + "type": "array", + "description": "[Output Only] A list of InterconnectLocation.RegionInfo objects, that describe parameters pertaining to the relation between this InterconnectLocation and various Google Cloud regions.", + "items": { + "$ref": "InterconnectLocationRegionInfo" + } + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + } + } + }, + "InterconnectLocationList": { + "id": "InterconnectLocationList", + "type": "object", + "description": "Response to the list request, and contains a list of interconnect locations.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "array", + "description": "A list of InterconnectLocation resources.", + "items": { + "$ref": "InterconnectLocation" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#interconnectLocationList for lists of interconnect locations.", + "default": "compute#interconnectLocationList" + }, + "nextPageToken": { + "type": "string", + "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." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "InterconnectLocationRegionInfo": { + "id": "InterconnectLocationRegionInfo", + "type": "object", + "description": "Information about any potential InterconnectAttachments between an Interconnect at a specific InterconnectLocation, and a specific Cloud Region.", + "properties": { + "expectedRttMs": { + "type": "string", + "description": "Expected round-trip time in milliseconds, from this InterconnectLocation to a VM in this region.", + "format": "int64" + }, + "locationPresence": { + "type": "string", + "description": "Identifies the network presence of this location.", + "enum": [ + "LP_GLOBAL", + "LP_LOCAL_REGION" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "region": { + "type": "string", + "description": "URL for the region of this location." + }, + "regionKey": { + "type": "string", + "description": "Scope key for the region of this location." + } + } + }, + "InterconnectOutageNotification": { + "id": "InterconnectOutageNotification", + "type": "object", + "description": "Description of a planned outage on this Interconnect. Next id: 9", + "properties": { + "affectedCircuits": { + "type": "array", + "description": "Iff issue_type is IT_PARTIAL_OUTAGE, a list of the Google-side circuit IDs that will be affected.", + "items": { + "type": "string" + } + }, + "description": { + "type": "string", + "description": "Short user-visible description of the purpose of the outage." + }, + "endTime": { + "type": "string", + "format": "int64" + }, + "issueType": { + "type": "string", + "enum": [ + "IT_OUTAGE", + "IT_PARTIAL_OUTAGE" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "name": { + "type": "string", + "description": "Unique identifier for this outage notification." + }, + "source": { + "type": "string", + "enum": [ + "NSRC_GOOGLE" + ], + "enumDescriptions": [ + "" + ] + }, + "startTime": { + "type": "string", + "description": "Scheduled start and end times for the outage (milliseconds since Unix epoch).", + "format": "int64" + }, + "state": { + "type": "string", + "enum": [ + "NS_ACTIVE", + "NS_CANCELED" + ], + "enumDescriptions": [ + "", + "" + ] + } + } + }, "License": { "id": "License", "type": "object", @@ -5305,6 +5929,10 @@ "counter": { "$ref": "LogConfigCounterOptions", "description": "Counter options." + }, + "dataAccess": { + "$ref": "LogConfigDataAccessOptions", + "description": "Data access options." } } }, @@ -5336,7 +5964,7 @@ "LogConfigCounterOptions": { "id": "LogConfigCounterOptions", "type": "object", - "description": "Options for counters", + "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", "properties": { "field": { "type": "string", @@ -5348,6 +5976,25 @@ } } }, + "LogConfigDataAccessOptions": { + "id": "LogConfigDataAccessOptions", + "type": "object", + "description": "Write a Data Access (Gin) log", + "properties": { + "logMode": { + "type": "string", + "description": "Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.", + "enum": [ + "LOG_FAIL_CLOSED", + "LOG_MODE_UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "" + ] + } + } + }, "MachineType": { "id": "MachineType", "type": "object", @@ -5795,6 +6442,10 @@ "$ref": "NetworkPeering" } }, + "routingConfig": { + "$ref": "NetworkRoutingConfig", + "description": "The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce." + }, "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for the resource." @@ -5916,6 +6567,25 @@ } } }, + "NetworkRoutingConfig": { + "id": "NetworkRoutingConfig", + "type": "object", + "description": "A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide.", + "properties": { + "routingMode": { + "type": "string", + "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" + ], + "enumDescriptions": [ + "", + "" + ] + } + } + }, "NetworksAddPeeringRequest": { "id": "NetworksAddPeeringRequest", "type": "object", @@ -6485,7 +7155,7 @@ }, "resources": { "type": "array", - "description": "Serive resources (a.k.a service projects) attached to this project as their shared VPC host.", + "description": "Service resources (a.k.a service projects) attached to this project as their shared VPC host.", "items": { "$ref": "XpnResourceId" } @@ -6531,10 +7201,12 @@ "INSTANCE_GROUPS", "INSTANCE_GROUP_MANAGERS", "INSTANCE_TEMPLATES", + "INTERCONNECTS", "IN_USE_ADDRESSES", "LOCAL_SSD_TOTAL_GB", "NETWORKS", "NVIDIA_K80_GPUS", + "NVIDIA_P100_GPUS", "PREEMPTIBLE_CPUS", "PREEMPTIBLE_LOCAL_SSD_GB", "REGIONAL_AUTOSCALERS", @@ -6553,6 +7225,7 @@ "TARGET_INSTANCES", "TARGET_POOLS", "TARGET_SSL_PROXIES", + "TARGET_TCP_PROXIES", "TARGET_VPN_GATEWAYS", "URL_MAPS", "VPN_TUNNELS" @@ -6597,6 +7270,9 @@ "", "", "", + "", + "", + "", "" ] }, @@ -7399,6 +8075,10 @@ "type": "string", "description": "IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface." }, + "linkedInterconnectAttachment": { + "type": "string", + "description": "URI of the linked interconnect attachment. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment." + }, "linkedVpnTunnel": { "type": "string", "description": "URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment." @@ -7765,6 +8445,134 @@ } } }, + "SecurityPoliciesList": { + "id": "SecurityPoliciesList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "array", + "description": "A list of SecurityPolicy resources.", + "items": { + "$ref": "SecurityPolicy" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#securityPoliciesList for listsof securityPolicies", + "default": "compute#securityPoliciesList" + }, + "nextPageToken": { + "type": "string", + "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." + } + } + }, + "SecurityPolicy": { + "id": "SecurityPolicy", + "type": "object", + "description": "A security policy is comprised of one or more rules. It can also be associated with one or more 'targets'.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "An optional description of this resource. Provide this property when you create the resource." + }, + "fingerprint": { + "type": "string", + "description": "Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make get() request to the security policy.", + "format": "byte" + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "[Output only] Type of the resource. Always compute#securityPolicyfor security policies", + "default": "compute#securityPolicy" + }, + "name": { + "type": "string", + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "rules": { + "type": "array", + "description": "List of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match \"*\"). If no rules are provided when creating a security policy, a default rule with action \"allow\" will be added.", + "items": { + "$ref": "SecurityPolicyRule" + } + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + } + } + }, + "SecurityPolicyReference": { + "id": "SecurityPolicyReference", + "type": "object", + "properties": { + "securityPolicy": { + "type": "string" + } + } + }, + "SecurityPolicyRule": { + "id": "SecurityPolicyRule", + "type": "object", + "description": "Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).", + "properties": { + "action": { + "type": "string", + "description": "The Action to preform when the client connection triggers the rule. Can currently be either \"allow\" or \"deny()\" where valid values for status are 403, 404, and 502." + }, + "description": { + "type": "string", + "description": "An optional description of this resource. Provide this property when you create the resource." + }, + "kind": { + "type": "string", + "description": "[Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules", + "default": "compute#securityPolicyRule" + }, + "match": { + "$ref": "SecurityPolicyRuleMatcher", + "description": "A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding ?action? is enforced." + }, + "preview": { + "type": "boolean", + "description": "If set to true, the specified action is not enforced." + }, + "priority": { + "type": "integer", + "description": "An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated in the increasing order of priority.", + "format": "int32" + } + } + }, + "SecurityPolicyRuleMatcher": { + "id": "SecurityPolicyRuleMatcher", + "type": "object", + "description": "Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified.", + "properties": { + "srcIpRanges": { + "type": "array", + "description": "CIDR IP address range. Only IPv4 is supported.", + "items": { + "type": "string" + } + } + } + }, "SerialPortOutput": { "id": "SerialPortOutput", "type": "object", @@ -10889,8 +11697,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -11181,8 +11988,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "update": { @@ -11507,8 +12313,47 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" + ] + }, + "setSecurityPolicy": { + "id": "compute.backendServices.setSecurityPolicy", + "path": "{project}/global/backendServices/{backendService}/setSecurityPolicy", + "httpMethod": "POST", + "description": "Sets the security policy for the specified backend service.", + "parameters": { + "backendService": { + "type": "string", + "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.", + "required": true, + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "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" + } + }, + "parameterOrder": [ + "project", + "backendService" + ], + "request": { + "$ref": "SecurityPolicyReference" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -11528,7 +12373,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -12376,8 +13221,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -12397,7 +13241,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -13051,7 +13895,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -13323,7 +14167,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -13705,8 +14549,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -13726,7 +14569,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -13983,8 +14826,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -14004,7 +14846,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -14261,8 +15103,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -14282,7 +15123,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -14407,7 +15248,7 @@ }, "requestId": { "type": "string", - "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 then 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.", + "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" } }, @@ -14637,7 +15478,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -15087,8 +15928,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "recreateInstances": { @@ -16130,7 +16970,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -17416,6 +18256,613 @@ } } }, + "interconnectAttachments": { + "methods": { + "aggregatedList": { + "id": "compute.interconnectAttachments.aggregatedList", + "path": "{project}/aggregated/interconnectAttachments", + "httpMethod": "GET", + "description": "Retrieves an aggregated list of interconnect attachments.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "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)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "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" + }, + "pageToken": { + "type": "string", + "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" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "InterconnectAttachmentAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "id": "compute.interconnectAttachments.delete", + "path": "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", + "httpMethod": "DELETE", + "description": "Deletes the specified interconnect attachment.", + "parameters": { + "interconnectAttachment": { + "type": "string", + "description": "Name of the interconnect attachment to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "requestId": { + "type": "string", + "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" + } + }, + "parameterOrder": [ + "project", + "region", + "interconnectAttachment" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.interconnectAttachments.get", + "path": "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", + "httpMethod": "GET", + "description": "Returns the specified interconnect attachment.", + "parameters": { + "interconnectAttachment": { + "type": "string", + "description": "Name of the interconnect attachment to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "interconnectAttachment" + ], + "response": { + "$ref": "InterconnectAttachment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.interconnectAttachments.insert", + "path": "{project}/regions/{region}/interconnectAttachments", + "httpMethod": "POST", + "description": "Creates an InterconnectAttachment in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "requestId": { + "type": "string", + "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" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "request": { + "$ref": "InterconnectAttachment" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.interconnectAttachments.list", + "path": "{project}/regions/{region}/interconnectAttachments", + "httpMethod": "GET", + "description": "Retrieves the list of interconnect attachments contained within the specified region.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "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)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "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" + }, + "pageToken": { + "type": "string", + "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" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "response": { + "$ref": "InterconnectAttachmentList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "testIamPermissions": { + "id": "compute.interconnectAttachments.testIamPermissions", + "path": "{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions", + "httpMethod": "POST", + "description": "Returns permissions that a caller has on the specified resource.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "resource" + ], + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "interconnectLocations": { + "methods": { + "get": { + "id": "compute.interconnectLocations.get", + "path": "{project}/global/interconnectLocations/{interconnectLocation}", + "httpMethod": "GET", + "description": "Returns the details for the specified interconnect location. Get a list of available interconnect locations by making a list() request.", + "parameters": { + "interconnectLocation": { + "type": "string", + "description": "Name of the interconnect location to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "interconnectLocation" + ], + "response": { + "$ref": "InterconnectLocation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "id": "compute.interconnectLocations.list", + "path": "{project}/global/interconnectLocations", + "httpMethod": "GET", + "description": "Retrieves the list of interconnect locations available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "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)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "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" + }, + "pageToken": { + "type": "string", + "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" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "InterconnectLocationList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "interconnects": { + "methods": { + "delete": { + "id": "compute.interconnects.delete", + "path": "{project}/global/interconnects/{interconnect}", + "httpMethod": "DELETE", + "description": "Deletes the specified interconnect.", + "parameters": { + "interconnect": { + "type": "string", + "description": "Name of the interconnect to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "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" + } + }, + "parameterOrder": [ + "project", + "interconnect" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.interconnects.get", + "path": "{project}/global/interconnects/{interconnect}", + "httpMethod": "GET", + "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request.", + "parameters": { + "interconnect": { + "type": "string", + "description": "Name of the interconnect to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "interconnect" + ], + "response": { + "$ref": "Interconnect" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.interconnects.insert", + "path": "{project}/global/interconnects", + "httpMethod": "POST", + "description": "Creates a Interconnect in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "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" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "Interconnect" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.interconnects.list", + "path": "{project}/global/interconnects", + "httpMethod": "GET", + "description": "Retrieves the list of interconnect available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "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)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "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" + }, + "pageToken": { + "type": "string", + "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" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "InterconnectList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "id": "compute.interconnects.patch", + "path": "{project}/global/interconnects/{interconnect}", + "httpMethod": "PATCH", + "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "parameters": { + "interconnect": { + "type": "string", + "description": "Name of the interconnect to update.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "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" + } + }, + "parameterOrder": [ + "project", + "interconnect" + ], + "request": { + "$ref": "Interconnect" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "id": "compute.interconnects.testIamPermissions", + "path": "{project}/global/interconnects/{resource}/testIamPermissions", + "httpMethod": "POST", + "description": "Returns permissions that a caller has on the specified resource.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "licenses": { "methods": { "get": { @@ -17803,6 +19250,47 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "patch": { + "id": "compute.networks.patch", + "path": "{project}/global/networks/{network}", + "httpMethod": "PATCH", + "description": "Patches the specified network with the data included in the request.", + "parameters": { + "network": { + "type": "string", + "description": "Name of the network to update.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "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" + } + }, + "parameterOrder": [ + "project", + "network" + ], + "request": { + "$ref": "Network" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "removePeering": { "id": "compute.networks.removePeering", "path": "{project}/global/networks/{network}/removePeering", @@ -17899,7 +19387,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -18544,7 +20032,7 @@ }, "requestId": { "type": "string", - "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 then 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).", + "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" } }, @@ -18560,8 +20048,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -18637,7 +20124,7 @@ }, "requestId": { "type": "string", - "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 then 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.", + "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" } }, @@ -18936,8 +20423,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -19608,8 +21094,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "recreateInstances": { @@ -20758,8 +22243,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "preview": { @@ -21076,7 +22560,243 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "securityPolicies": { + "methods": { + "delete": { + "id": "compute.securityPolicies.delete", + "path": "{project}/global/securityPolicies/{securityPolicy}", + "httpMethod": "DELETE", + "description": "Deletes the specified policy.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "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" + }, + "securityPolicy": { + "type": "string", + "description": "Name of the security policy to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "securityPolicy" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.securityPolicies.get", + "path": "{project}/global/securityPolicies/{securityPolicy}", + "httpMethod": "GET", + "description": "List all of the ordered rules present in a single specified policy.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "securityPolicy": { + "type": "string", + "description": "Name of the security policy to get.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "securityPolicy" + ], + "response": { + "$ref": "SecurityPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.securityPolicies.insert", + "path": "{project}/global/securityPolicies", + "httpMethod": "POST", + "description": "Creates a new policy in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "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" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "SecurityPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.securityPolicies.list", + "path": "{project}/global/securityPolicies", + "httpMethod": "GET", + "description": "List all the policies that have been configured for the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "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)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "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" + }, + "pageToken": { + "type": "string", + "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" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "SecurityPoliciesList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "id": "compute.securityPolicies.patch", + "path": "{project}/global/securityPolicies/{securityPolicy}", + "httpMethod": "PATCH", + "description": "Patches the specified policy with the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "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" + }, + "securityPolicy": { + "type": "string", + "description": "Name of the security policy to update.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "securityPolicy" + ], + "request": { + "$ref": "SecurityPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "id": "compute.securityPolicies.testIamPermissions", + "path": "{project}/global/securityPolicies/{resource}/testIamPermissions", + "httpMethod": "POST", + "description": "Returns permissions that a caller has on the specified resource.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "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])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -21274,7 +22994,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -21469,7 +23189,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -22173,7 +23893,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -22450,7 +24170,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -23632,7 +25352,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, @@ -24413,8 +26133,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -24434,7 +26153,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, 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 162dc243c..4a6bf34c4 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 @@ -91,6 +91,9 @@ func New(client *http.Client) (*Service, error) { s.InstanceGroups = NewInstanceGroupsService(s) s.InstanceTemplates = NewInstanceTemplatesService(s) s.Instances = NewInstancesService(s) + s.InterconnectAttachments = NewInterconnectAttachmentsService(s) + s.InterconnectLocations = NewInterconnectLocationsService(s) + s.Interconnects = NewInterconnectsService(s) s.Licenses = NewLicensesService(s) s.MachineTypes = NewMachineTypesService(s) s.Networks = NewNetworksService(s) @@ -104,6 +107,7 @@ func New(client *http.Client) (*Service, error) { s.Regions = NewRegionsService(s) s.Routers = NewRoutersService(s) s.Routes = NewRoutesService(s) + s.SecurityPolicies = NewSecurityPoliciesService(s) s.Snapshots = NewSnapshotsService(s) s.SslCertificates = NewSslCertificatesService(s) s.Subnetworks = NewSubnetworksService(s) @@ -166,6 +170,12 @@ type Service struct { Instances *InstancesService + InterconnectAttachments *InterconnectAttachmentsService + + InterconnectLocations *InterconnectLocationsService + + Interconnects *InterconnectsService + Licenses *LicensesService MachineTypes *MachineTypesService @@ -192,6 +202,8 @@ type Service struct { Routes *RoutesService + SecurityPolicies *SecurityPoliciesService + Snapshots *SnapshotsService SslCertificates *SslCertificatesService @@ -408,6 +420,33 @@ type InstancesService struct { s *Service } +func NewInterconnectAttachmentsService(s *Service) *InterconnectAttachmentsService { + rs := &InterconnectAttachmentsService{s: s} + return rs +} + +type InterconnectAttachmentsService struct { + s *Service +} + +func NewInterconnectLocationsService(s *Service) *InterconnectLocationsService { + rs := &InterconnectLocationsService{s: s} + return rs +} + +type InterconnectLocationsService struct { + s *Service +} + +func NewInterconnectsService(s *Service) *InterconnectsService { + rs := &InterconnectsService{s: s} + return rs +} + +type InterconnectsService struct { + s *Service +} + func NewLicensesService(s *Service) *LicensesService { rs := &LicensesService{s: s} return rs @@ -525,6 +564,15 @@ type RoutesService struct { s *Service } +func NewSecurityPoliciesService(s *Service) *SecurityPoliciesService { + rs := &SecurityPoliciesService{s: s} + return rs +} + +type SecurityPoliciesService struct { + s *Service +} + func NewSnapshotsService(s *Service) *SnapshotsService { rs := &SnapshotsService{s: s} return rs @@ -2736,8 +2784,9 @@ type BackendService struct { // HealthChecks: The list of URLs to the HttpHealthCheck or // HttpsHealthCheck resource for health checking this BackendService. // Currently at most one health check can be specified, and a health - // check is required for GCE backend services. A health check must not - // be specified for GAE app backend and Cloud Function backend. + // check is required for Compute Engine backend services. A health check + // must not be specified for App Engine backend and Cloud Function + // backend. // // For internal load balancing, a URL to a HealthCheck resource must be // specified instead. @@ -2753,6 +2802,11 @@ type BackendService struct { // for backend services. Kind string `json:"kind,omitempty"` + // LoadBalancingScheme: Indicates whether the backend service will be + // used with internal or external load balancing. A backend service + // created for one type of load balancing cannot be used with the other. + // Possible values are INTERNAL and EXTERNAL. + // // Possible values: // "EXTERNAL" // "INTERNAL" @@ -2803,6 +2857,10 @@ type BackendService struct { // services. Region string `json:"region,omitempty"` + // SecurityPolicy: [Output Only] The resource URL for the security + // policy associated with this backend service. + SecurityPolicy string `json:"securityPolicy,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -6624,10 +6682,10 @@ type Instance struct { // be a dash. Name string `json:"name,omitempty"` - // NetworkInterfaces: An array of configurations for this interface. - // This specifies how this interface is configured to interact with - // other network services, such as connecting to the internet. Only one - // interface is supported per instance. + // NetworkInterfaces: An array of network configurations for this + // instance. These specify how interfaces are configured to interact + // with other network services, such as connecting to the internet. + // Multiple interfaces are supported per instance. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` // Scheduling: Sets the scheduling options for this instance. @@ -7022,11 +7080,11 @@ type InstanceGroupManager struct { // server defines this URL. SelfLink string `json:"selfLink,omitempty"` - // ServiceAccount: Service account will be used as credentials for all - // operations performed by managed instance group on instances. The - // service accounts needs all permissions required to create and delete - // instances. When not specified, the service account - // {projectNumber}@cloudservices.gserviceaccount.com will be used. + // ServiceAccount: [Output Only] 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. ServiceAccount string `json:"serviceAccount,omitempty"` // TargetPools: The URLs for all TargetPool resources to which instances @@ -8882,6 +8940,852 @@ func (s *InstancesStartWithEncryptionKeyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Interconnect: Protocol definitions for Mixer API to support +// Interconnect. Next available tag: 23 +type Interconnect struct { + // AdminEnabled: Administrative status of the interconnect. When this is + // set to ?true?, the Interconnect is functional and may carry traffic + // (assuming there are functional InterconnectAttachments and other + // requirements are satisfied). When set to ?false?, no packets will be + // carried over this Interconnect and no BGP routes will be exchanged + // over it. By default, it is set to ?true?. + AdminEnabled bool `json:"adminEnabled,omitempty"` + + // CircuitInfos: [Output Only] List of CircuitInfo objects, that + // describe the individual circuits in this LAG. + CircuitInfos []*InterconnectCircuitInfo `json:"circuitInfos,omitempty"` + + // ConnectionAuthorization: [Output Only] URL to retrieve the Letter Of + // Authority and Customer Facility Assignment (LOA-CFA) documentation + // relating to this Interconnect. This documentation authorizes the + // facility provider to connect to the specified crossconnect ports. + ConnectionAuthorization string `json:"connectionAuthorization,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // CustomerName: Customer name, to put in the Letter of Authorization as + // the party authorized to request a crossconnect. + CustomerName string `json:"customerName,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // ExpectedOutages: [Output Only] List of outages expected for this + // Interconnect. + ExpectedOutages []*InterconnectOutageNotification `json:"expectedOutages,omitempty"` + + // GoogleIpAddress: [Output Only] IP address configured on the Google + // side of the Interconnect link. This can be used only for ping tests. + GoogleIpAddress string `json:"googleIpAddress,omitempty"` + + // GoogleReferenceId: [Output Only] Google reference ID; to be used when + // raising support tickets with Google or otherwise to debug backend + // connectivity issues. + GoogleReferenceId string `json:"googleReferenceId,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // InterconnectAttachments: [Output Only] A list of the URLs of all + // InterconnectAttachments configured to use this Interconnect. + InterconnectAttachments []string `json:"interconnectAttachments,omitempty"` + + // Possible values: + // "IT_PRIVATE" + InterconnectType string `json:"interconnectType,omitempty"` + + // Kind: [Output Only] Type of the resource. Always compute#interconnect + // for interconnects. + Kind string `json:"kind,omitempty"` + + // Possible values: + // "LINK_TYPE_ETHERNET_10G_LR" + LinkType string `json:"linkType,omitempty"` + + // Location: URL of the InterconnectLocation object that represents + // where this connection is to be provisioned. + Location string `json:"location,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // NocContactEmail: Email address to contact the customer NOC for + // operations and maintenance notifications regarding this Interconnect. + // If specified, this will be used for notifications in addition to all + // other forms described, such as Stackdriver logs alerting and Cloud + // Notifications. + NocContactEmail string `json:"nocContactEmail,omitempty"` + + // OperationalStatus: [Output Only] The current status of whether or not + // this Interconnect is functional. + // + // Possible values: + // "OS_ACTIVE" + // "OS_UNPROVISIONED" + OperationalStatus string `json:"operationalStatus,omitempty"` + + // PeerIpAddress: [Output Only] IP address configured on the customer + // side of the Interconnect link. The customer should configure this IP + // address during turnup when prompted by Google NOC. This can be used + // only for ping tests. + PeerIpAddress string `json:"peerIpAddress,omitempty"` + + // ProvisionedLinkCount: [Output Only] Number of links actually + // provisioned in this interconnect. + ProvisionedLinkCount int64 `json:"provisionedLinkCount,omitempty"` + + // RequestedLinkCount: Target number of physical links in the link + // bundle, as requested by the customer. + RequestedLinkCount int64 `json:"requestedLinkCount,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AdminEnabled") 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. "AdminEnabled") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Interconnect) MarshalJSON() ([]byte, error) { + type noMethod Interconnect + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectAttachment: Protocol definitions for Mixer API to support +// InterconnectAttachment. Next available tag: 14 +type InterconnectAttachment struct { + // CloudRouterIpAddress: [Output Only] IPv4 address + prefix length to + // be configured on Cloud Router Interface for this interconnect + // attachment. + CloudRouterIpAddress string `json:"cloudRouterIpAddress,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // CustomerRouterIpAddress: [Output Only] IPv4 address + prefix length + // to be configured on the customer router subinterface for this + // interconnect attachment. + CustomerRouterIpAddress string `json:"customerRouterIpAddress,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // GoogleReferenceId: [Output Only] Google reference ID, to be used when + // raising support tickets with Google or otherwise to debug backend + // connectivity issues. + GoogleReferenceId string `json:"googleReferenceId,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Interconnect: URL of the underlying Interconnect object that this + // attachment's traffic will traverse through. + Interconnect string `json:"interconnect,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#interconnectAttachment for interconnect attachments. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // OperationalStatus: [Output Only] The current status of whether or not + // this interconnect attachment is functional. + // + // Possible values: + // "OS_ACTIVE" + // "OS_UNPROVISIONED" + OperationalStatus string `json:"operationalStatus,omitempty"` + + // PrivateInterconnectInfo: [Output Only] Information specific to a + // Private InterconnectAttachment. Only populated if the interconnect + // that this is attached is of type IT_PRIVATE. + PrivateInterconnectInfo *InterconnectAttachmentPrivateInfo `json:"privateInterconnectInfo,omitempty"` + + // Region: [Output Only] URL of the region where the regional + // interconnect attachment resides. + Region string `json:"region,omitempty"` + + // Router: URL of the cloud router to be used for dynamic routing. This + // router must be in the same region as this InterconnectAttachment. The + // InterconnectAttachment will automatically connect the Interconnect to + // the network & region within which the Cloud Router is configured. + Router string `json:"router,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "CloudRouterIpAddress") 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. "CloudRouterIpAddress") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectAttachment) MarshalJSON() ([]byte, error) { + type noMethod InterconnectAttachment + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InterconnectAttachmentAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of InterconnectAttachmentsScopedList resources. + Items map[string]InterconnectAttachmentsScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#interconnectAttachmentAggregatedList for aggregated lists of + // interconnect attachments. + 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"` + + // 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 *InterconnectAttachmentAggregatedList) MarshalJSON() ([]byte, error) { + type noMethod InterconnectAttachmentAggregatedList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectAttachmentList: Response to the list request, and +// contains a list of interconnect attachments. +type InterconnectAttachmentList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of InterconnectAttachment resources. + Items []*InterconnectAttachment `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#interconnectAttachmentList for lists of interconnect + // attachments. + 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"` + + // 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 *InterconnectAttachmentList) MarshalJSON() ([]byte, error) { + type noMethod InterconnectAttachmentList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectAttachmentPrivateInfo: Private information for an +// interconnect attachment when this belongs to an interconnect of type +// IT_PRIVATE. +type InterconnectAttachmentPrivateInfo struct { + // Tag8021q: [Output Only] 802.1q encapsulation tag to be used for + // traffic between Google and the customer, going to and from this + // network and region. + Tag8021q int64 `json:"tag8021q,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Tag8021q") 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. "Tag8021q") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectAttachmentPrivateInfo) MarshalJSON() ([]byte, error) { + type noMethod InterconnectAttachmentPrivateInfo + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InterconnectAttachmentsScopedList struct { + // InterconnectAttachments: List of interconnect attachments contained + // in this scope. + InterconnectAttachments []*InterconnectAttachment `json:"interconnectAttachments,omitempty"` + + // Warning: Informational warning which replaces the list of addresses + // when the list is empty. + Warning *InterconnectAttachmentsScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "InterconnectAttachments") 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. "InterconnectAttachments") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectAttachmentsScopedList) MarshalJSON() ([]byte, error) { + type noMethod InterconnectAttachmentsScopedList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectAttachmentsScopedListWarning: Informational warning which +// replaces the list of addresses when the list is empty. +type InterconnectAttachmentsScopedListWarning 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" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "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" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "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 []*InterconnectAttachmentsScopedListWarningData `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 *InterconnectAttachmentsScopedListWarning) MarshalJSON() ([]byte, error) { + type noMethod InterconnectAttachmentsScopedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InterconnectAttachmentsScopedListWarningData 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 *InterconnectAttachmentsScopedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod InterconnectAttachmentsScopedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectCircuitInfo: Describes a single physical circuit between +// the Customer and Google. CircuitInfo objects are created by Google, +// so all fields are output only. Next id: 4 +type InterconnectCircuitInfo struct { + // CustomerDemarcId: Customer-side demarc ID for this circuit. This will + // only be set if it was provided by the Customer to Google during + // circuit turn-up. + CustomerDemarcId string `json:"customerDemarcId,omitempty"` + + // GoogleCircuitId: Google-assigned unique ID for this circuit. Assigned + // at circuit turn-up. + GoogleCircuitId string `json:"googleCircuitId,omitempty"` + + // GoogleDemarcId: Google-side demarc ID for this circuit. Assigned at + // circuit turn-up and provided by Google to the customer in the LOA. + GoogleDemarcId string `json:"googleDemarcId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomerDemarcId") 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. "CustomerDemarcId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectCircuitInfo) MarshalJSON() ([]byte, error) { + type noMethod InterconnectCircuitInfo + 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 { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of Interconnect resources. + Items []*Interconnect `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always compute#interconnectList + // for lists of interconnects. + 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"` + + // 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 *InterconnectList) MarshalJSON() ([]byte, error) { + type noMethod InterconnectList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectLocation: Protocol definitions for Mixer API to support +// InterconnectLocation. +type InterconnectLocation struct { + // Address: [Output Only] The postal address of the Point of Presence, + // each line in the address is separated by a newline character. + Address string `json:"address,omitempty"` + + // AvailabilityZone: Availability zone for this location. Within a city, + // maintenance will not be simultaneously scheduled in more than one + // availability zone. Example: "zone1" or "zone2". + AvailabilityZone string `json:"availabilityZone,omitempty"` + + // City: City designator used by the Interconnect UI to locate this + // InterconnectLocation within the Continent. For example: "Chicago, + // IL", "Amsterdam, Netherlands". + City string `json:"city,omitempty"` + + // Continent: Continent for this location. Used by the location picker + // in the Interconnect UI. + // + // Possible values: + // "C_AFRICA" + // "C_ASIA_PAC" + // "C_EUROPE" + // "C_NORTH_AMERICA" + // "C_SOUTH_AMERICA" + Continent string `json:"continent,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: [Output Only] An optional description of the resource. + Description string `json:"description,omitempty"` + + // FacilityProvider: [Output Only] The name of the provider for this + // facility (e.g., EQUINIX). + FacilityProvider string `json:"facilityProvider,omitempty"` + + // FacilityProviderFacilityId: [Output Only] A provider-assigned + // Identifier for this facility (e.g., Ashburn-DC1). + FacilityProviderFacilityId string `json:"facilityProviderFacilityId,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always + // compute#interconnectLocation for interconnect locations. + Kind string `json:"kind,omitempty"` + + // Name: [Output Only] Name of the resource. + Name string `json:"name,omitempty"` + + // PeeringdbFacilityId: [Output Only] The peeringdb identifier for this + // facility (corresponding with a netfac type in peeringdb). + PeeringdbFacilityId string `json:"peeringdbFacilityId,omitempty"` + + // RegionInfos: [Output Only] A list of InterconnectLocation.RegionInfo + // objects, that describe parameters pertaining to the relation between + // this InterconnectLocation and various Google Cloud regions. + RegionInfos []*InterconnectLocationRegionInfo `json:"regionInfos,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Address") 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. "Address") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectLocation) MarshalJSON() ([]byte, error) { + type noMethod InterconnectLocation + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectLocationList: Response to the list request, and contains +// a list of interconnect locations. +type InterconnectLocationList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of InterconnectLocation resources. + Items []*InterconnectLocation `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#interconnectLocationList for lists of interconnect locations. + 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"` + + // 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 *InterconnectLocationList) MarshalJSON() ([]byte, error) { + type noMethod InterconnectLocationList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectLocationRegionInfo: Information about any potential +// InterconnectAttachments between an Interconnect at a specific +// InterconnectLocation, and a specific Cloud Region. +type InterconnectLocationRegionInfo struct { + // ExpectedRttMs: Expected round-trip time in milliseconds, from this + // InterconnectLocation to a VM in this region. + ExpectedRttMs int64 `json:"expectedRttMs,omitempty,string"` + + // LocationPresence: Identifies the network presence of this location. + // + // Possible values: + // "LP_GLOBAL" + // "LP_LOCAL_REGION" + LocationPresence string `json:"locationPresence,omitempty"` + + // Region: URL for the region of this location. + Region string `json:"region,omitempty"` + + // RegionKey: Scope key for the region of this location. + RegionKey string `json:"regionKey,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExpectedRttMs") 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. "ExpectedRttMs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectLocationRegionInfo) MarshalJSON() ([]byte, error) { + type noMethod InterconnectLocationRegionInfo + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectOutageNotification: Description of a planned outage on +// this Interconnect. Next id: 9 +type InterconnectOutageNotification struct { + // AffectedCircuits: Iff issue_type is IT_PARTIAL_OUTAGE, a list of the + // Google-side circuit IDs that will be affected. + AffectedCircuits []string `json:"affectedCircuits,omitempty"` + + // Description: Short user-visible description of the purpose of the + // outage. + Description string `json:"description,omitempty"` + + EndTime int64 `json:"endTime,omitempty,string"` + + // Possible values: + // "IT_OUTAGE" + // "IT_PARTIAL_OUTAGE" + IssueType string `json:"issueType,omitempty"` + + // Name: Unique identifier for this outage notification. + Name string `json:"name,omitempty"` + + // Possible values: + // "NSRC_GOOGLE" + Source string `json:"source,omitempty"` + + // StartTime: Scheduled start and end times for the outage (milliseconds + // since Unix epoch). + StartTime int64 `json:"startTime,omitempty,string"` + + // Possible values: + // "NS_ACTIVE" + // "NS_CANCELED" + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AffectedCircuits") 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. "AffectedCircuits") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectOutageNotification) MarshalJSON() ([]byte, error) { + type noMethod InterconnectOutageNotification + 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 @@ -8934,6 +9838,9 @@ type LogConfig struct { // Counter: Counter options. Counter *LogConfigCounterOptions `json:"counter,omitempty"` + // DataAccess: Data access options. + DataAccess *LogConfigDataAccessOptions `json:"dataAccess,omitempty"` + // ForceSendFields is a list of field names (e.g. "CloudAudit") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -8996,7 +9903,29 @@ func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LogConfigCounterOptions: Options for counters +// LogConfigCounterOptions: Increment a streamz counter with the +// specified metric and field names. +// +// Metric 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. +// +// Field names correspond to IAM request parameters and field values are +// their respective values. +// +// 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) * decrementing the counter * +// incrementing it by anything other than 1 type LogConfigCounterOptions struct { // Field: The field value to attribute. Field string `json:"field,omitempty"` @@ -9027,6 +9956,40 @@ func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LogConfigDataAccessOptions: Write a Data Access (Gin) log +type LogConfigDataAccessOptions struct { + // LogMode: Whether Gin logging should happen in a fail-closed manner at + // the caller. This is relevant only in the LocalIAM implementation, for + // now. + // + // Possible values: + // "LOG_FAIL_CLOSED" + // "LOG_MODE_UNSPECIFIED" + LogMode string `json:"logMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LogMode") 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. "LogMode") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) { + type noMethod LogConfigDataAccessOptions + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MachineType: A Machine Type resource. type MachineType struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -9712,6 +10675,11 @@ type Network struct { // Peerings: [Output Only] List of network peerings for the resource. Peerings []*NetworkPeering `json:"peerings,omitempty"` + // RoutingConfig: The network-level routing configuration for this + // network. Used by Cloud Router to determine what type of network-wide + // routing behavior to enforce. + RoutingConfig *NetworkRoutingConfig `json:"routingConfig,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -9939,6 +10907,45 @@ func (s *NetworkPeering) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NetworkRoutingConfig: A routing configuration attached to a network +// resource. The message includes the list of routers associated with +// the network, and a flag indicating the type of routing behavior to +// enforce network-wide. +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 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" + // "REGIONAL" + RoutingMode string `json:"routingMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RoutingMode") 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. "RoutingMode") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkRoutingConfig) MarshalJSON() ([]byte, error) { + type noMethod NetworkRoutingConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type NetworksAddPeeringRequest struct { // AutoCreateRoutes: Whether Google Compute Engine manages the routes // automatically. @@ -10841,8 +11848,8 @@ type ProjectsGetXpnResources struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // Resources: Serive resources (a.k.a service projects) attached to this - // project as their shared VPC host. + // Resources: Service resources (a.k.a service projects) attached to + // this project as their shared VPC host. Resources []*XpnResourceId `json:"resources,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -10924,10 +11931,12 @@ type Quota struct { // "INSTANCE_GROUPS" // "INSTANCE_GROUP_MANAGERS" // "INSTANCE_TEMPLATES" + // "INTERCONNECTS" // "IN_USE_ADDRESSES" // "LOCAL_SSD_TOTAL_GB" // "NETWORKS" // "NVIDIA_K80_GPUS" + // "NVIDIA_P100_GPUS" // "PREEMPTIBLE_CPUS" // "PREEMPTIBLE_LOCAL_SSD_GB" // "REGIONAL_AUTOSCALERS" @@ -10946,6 +11955,7 @@ type Quota struct { // "TARGET_INSTANCES" // "TARGET_POOLS" // "TARGET_SSL_PROXIES" + // "TARGET_TCP_PROXIES" // "TARGET_VPN_GATEWAYS" // "URL_MAPS" // "VPN_TUNNELS" @@ -12235,6 +13245,12 @@ type RouterInterface struct { // interface. IpRange string `json:"ipRange,omitempty"` + // LinkedInterconnectAttachment: URI of the linked interconnect + // attachment. It must be in the same region as the router. Each + // interface can have at most one linked resource and it could either be + // a VPN Tunnel or an interconnect attachment. + LinkedInterconnectAttachment string `json:"linkedInterconnectAttachment,omitempty"` + // LinkedVpnTunnel: URI of the linked VPN tunnel. It must be in the same // region as the router. Each interface can have at most one linked // resource and it could either be a VPN Tunnel or an interconnect @@ -12770,6 +13786,237 @@ func (s *Scheduling) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SecurityPoliciesList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of SecurityPolicy resources. + Items []*SecurityPolicy `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#securityPoliciesList for listsof securityPolicies + 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"` + + // 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 *SecurityPoliciesList) MarshalJSON() ([]byte, error) { + type noMethod SecurityPoliciesList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecurityPolicy: A security policy is comprised of one or more rules. +// It can also be associated with one or more 'targets'. +type SecurityPolicy struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Fingerprint: Specifies a fingerprint for this resource, which is + // essentially a hash of the metadata's contents and used for optimistic + // locking. The fingerprint is initially generated by Compute Engine and + // changes after every request to modify or update metadata. You must + // always provide an up-to-date fingerprint hash in order to update or + // change metadata. + // + // To see the latest fingerprint, make get() request to the security + // policy. + Fingerprint string `json:"fingerprint,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output only] Type of the resource. Always + // compute#securityPolicyfor security policies + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Rules: List of rules that belong to this policy. There must always be + // a default rule (rule with priority 2147483647 and match "*"). If no + // rules are provided when creating a security policy, a default rule + // with action "allow" will be added. + Rules []*SecurityPolicyRule `json:"rules,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicy) MarshalJSON() ([]byte, error) { + type noMethod SecurityPolicy + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPolicyReference struct { + SecurityPolicy string `json:"securityPolicy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SecurityPolicy") 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. "SecurityPolicy") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyReference) MarshalJSON() ([]byte, error) { + type noMethod SecurityPolicyReference + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecurityPolicyRule: Represents a rule that describes one or more +// match conditions along with the action to be taken when traffic +// matches this condition (allow or deny). +type SecurityPolicyRule struct { + // Action: The Action to preform when the client connection triggers the + // rule. Can currently be either "allow" or "deny()" where valid values + // for status are 403, 404, and 502. + Action string `json:"action,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Kind: [Output only] Type of the resource. Always + // compute#securityPolicyRule for security policy rules + Kind string `json:"kind,omitempty"` + + // Match: A match condition that incoming traffic is evaluated against. + // If it evaluates to true, the corresponding ?action? is enforced. + Match *SecurityPolicyRuleMatcher `json:"match,omitempty"` + + // Preview: If set to true, the specified action is not enforced. + Preview bool `json:"preview,omitempty"` + + // Priority: An integer indicating the priority of a rule in the list. + // The priority must be a positive value between 0 and 2147483647. Rules + // are evaluated in the increasing order of priority. + Priority int64 `json:"priority,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyRule) MarshalJSON() ([]byte, error) { + type noMethod SecurityPolicyRule + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecurityPolicyRuleMatcher: Represents a match condition that incoming +// traffic is evaluated against. Exactly one field must be specified. +type SecurityPolicyRuleMatcher struct { + // SrcIpRanges: CIDR IP address range. Only IPv4 is supported. + SrcIpRanges []string `json:"srcIpRanges,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SrcIpRanges") 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. "SrcIpRanges") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyRuleMatcher) MarshalJSON() ([]byte, error) { + type noMethod SecurityPolicyRuleMatcher + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SerialPortOutput: An instance's serial console output. type SerialPortOutput struct { // Contents: [Output Only] The contents of the console output. @@ -19802,8 +21049,7 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -21042,8 +22288,7 @@ func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -22520,8 +23765,177 @@ func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.backendServices.setSecurityPolicy": + +type BackendServicesSetSecurityPolicyCall struct { + s *Service + project string + backendService string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetSecurityPolicy: Sets the security policy for the specified backend +// service. +func (r *BackendServicesService) SetSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetSecurityPolicyCall { + c := &BackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.backendService = backendService + c.securitypolicyreference = securitypolicyreference + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *BackendServicesSetSecurityPolicyCall) RequestId(requestId string) *BackendServicesSetSecurityPolicyCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetSecurityPolicyCall { + 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 *BackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *BackendServicesSetSecurityPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BackendServicesSetSecurityPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BackendServicesSetSecurityPolicyCall) 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.securitypolicyreference) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/setSecurityPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "backendService": c.backendService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.backendServices.setSecurityPolicy" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the security policy for the specified backend service.", + // "httpMethod": "POST", + // "id": "compute.backendServices.setSecurityPolicy", + // "parameterOrder": [ + // "project", + // "backendService" + // ], + // "parameters": { + // "backendService": { + // "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // } + // }, + // "path": "{project}/global/backendServices/{backendService}/setSecurityPolicy", + // "request": { + // "$ref": "SecurityPolicyReference" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" // ] // } @@ -22654,7 +24068,7 @@ func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -26178,8 +27592,7 @@ func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -26312,7 +27725,7 @@ func (c *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -29055,7 +30468,7 @@ func (c *GlobalAddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -30250,7 +31663,7 @@ func (c *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallO // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -31928,8 +33341,7 @@ func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -32062,7 +33474,7 @@ func (c *HealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (* // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -33149,8 +34561,7 @@ func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -33283,7 +34694,7 @@ func (c *HttpHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -34366,8 +35777,7 @@ func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -34500,7 +35910,7 @@ func (c *HttpsHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOptio // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -34884,11 +36294,14 @@ func (r *ImagesService) Deprecate(project string, image string, deprecationstatu // request if it has already been completed. // // For example, consider a situation where you make an initial request -// and then 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 +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second // request. This prevents clients from accidentally creating duplicate // commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). func (c *ImagesDeprecateCall) RequestId(requestId string) *ImagesDeprecateCall { c.urlParams_.Set("requestId", requestId) return c @@ -35004,7 +36417,7 @@ func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "type": "string" // }, // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then 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.", + // "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" // } @@ -36037,7 +37450,7 @@ func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPe // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -37870,8 +39283,7 @@ func (c *InstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Oper // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -42187,7 +43599,7 @@ func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -46967,6 +48379,2634 @@ func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } +// method id "compute.interconnectAttachments.aggregatedList": + +type InterconnectAttachmentsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of interconnect +// attachments. +func (r *InterconnectAttachmentsService) AggregatedList(project string) *InterconnectAttachmentsAggregatedListCall { + c := &InterconnectAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Sets a filter +// {expression} for filtering listed resources. Your {expression} must +// be in the format: field_name comparison_string literal_string. +// +// The field_name is the name of the field you want to compare. Only +// atomic field types are supported (string, number, boolean). The +// comparison_string must be either eq (equals) or ne (not equals). The +// literal_string is the string value to filter to. The literal value +// must be valid for the type of field you are filtering by (string, +// number, boolean). For string fields, the literal value is interpreted +// as a regular expression using RE2 syntax. The literal value must +// match the entire field. +// +// For example, to filter for instances that do not have a name of +// example-instance, you would use name ne example-instance. +// +// You can filter on nested fields. For example, you could filter on +// instances that have set the scheduling.automaticRestart field to +// true. Use filtering on nested fields to take advantage of labels to +// organize and search for results based on label values. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart eq +// true) (zone eq us-central1-f). Multiple expressions are treated as +// AND expressions, meaning that resources must match all expressions to +// pass the filters. +func (c *InterconnectAttachmentsAggregatedListCall) Filter(filter string) *InterconnectAttachmentsAggregatedListCall { + 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 *InterconnectAttachmentsAggregatedListCall) MaxResults(maxResults int64) *InterconnectAttachmentsAggregatedListCall { + 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 *InterconnectAttachmentsAggregatedListCall) OrderBy(orderBy string) *InterconnectAttachmentsAggregatedListCall { + 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 *InterconnectAttachmentsAggregatedListCall) PageToken(pageToken string) *InterconnectAttachmentsAggregatedListCall { + 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 *InterconnectAttachmentsAggregatedListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsAggregatedListCall { + 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 *InterconnectAttachmentsAggregatedListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsAggregatedListCall { + 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 *InterconnectAttachmentsAggregatedListCall) Context(ctx context.Context) *InterconnectAttachmentsAggregatedListCall { + 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 *InterconnectAttachmentsAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/interconnectAttachments") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnectAttachments.aggregatedList" call. +// Exactly one of *InterconnectAttachmentAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *InterconnectAttachmentAggregatedList.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *InterconnectAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentAggregatedList, 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 := &InterconnectAttachmentAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an aggregated list of interconnect attachments.", + // "httpMethod": "GET", + // "id": "compute.interconnectAttachments.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + // "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" + // } + // }, + // "path": "{project}/aggregated/interconnectAttachments", + // "response": { + // "$ref": "InterconnectAttachmentAggregatedList" + // }, + // "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 *InterconnectAttachmentsAggregatedListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentAggregatedList) 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.interconnectAttachments.delete": + +type InterconnectAttachmentsDeleteCall struct { + s *Service + project string + region string + interconnectAttachment string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified interconnect attachment. +func (r *InterconnectAttachmentsService) Delete(project string, region string, interconnectAttachment string) *InterconnectAttachmentsDeleteCall { + c := &InterconnectAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.interconnectAttachment = interconnectAttachment + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InterconnectAttachmentsDeleteCall) RequestId(requestId string) *InterconnectAttachmentsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InterconnectAttachmentsDeleteCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsDeleteCall { + 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 *InterconnectAttachmentsDeleteCall) Context(ctx context.Context) *InterconnectAttachmentsDeleteCall { + 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 *InterconnectAttachmentsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "interconnectAttachment": c.interconnectAttachment, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnectAttachments.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InterconnectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified interconnect attachment.", + // "httpMethod": "DELETE", + // "id": "compute.interconnectAttachments.delete", + // "parameterOrder": [ + // "project", + // "region", + // "interconnectAttachment" + // ], + // "parameters": { + // "interconnectAttachment": { + // "description": "Name of the interconnect attachment to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // } + // }, + // "path": "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.interconnectAttachments.get": + +type InterconnectAttachmentsGetCall struct { + s *Service + project string + region string + interconnectAttachment string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified interconnect attachment. +func (r *InterconnectAttachmentsService) Get(project string, region string, interconnectAttachment string) *InterconnectAttachmentsGetCall { + c := &InterconnectAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.interconnectAttachment = interconnectAttachment + 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 *InterconnectAttachmentsGetCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsGetCall { + 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 *InterconnectAttachmentsGetCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsGetCall { + 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 *InterconnectAttachmentsGetCall) Context(ctx context.Context) *InterconnectAttachmentsGetCall { + 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 *InterconnectAttachmentsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "interconnectAttachment": c.interconnectAttachment, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnectAttachments.get" call. +// Exactly one of *InterconnectAttachment or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InterconnectAttachment.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InterconnectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachment, 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 := &InterconnectAttachment{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified interconnect attachment.", + // "httpMethod": "GET", + // "id": "compute.interconnectAttachments.get", + // "parameterOrder": [ + // "project", + // "region", + // "interconnectAttachment" + // ], + // "parameters": { + // "interconnectAttachment": { + // "description": "Name of the interconnect attachment to return.", + // "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" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", + // "response": { + // "$ref": "InterconnectAttachment" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.interconnectAttachments.insert": + +type InterconnectAttachmentsInsertCall struct { + s *Service + project string + region string + interconnectattachment *InterconnectAttachment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates an InterconnectAttachment in the specified project +// using the data included in the request. +func (r *InterconnectAttachmentsService) Insert(project string, region string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsInsertCall { + c := &InterconnectAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.interconnectattachment = interconnectattachment + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InterconnectAttachmentsInsertCall) RequestId(requestId string) *InterconnectAttachmentsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InterconnectAttachmentsInsertCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsInsertCall { + 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 *InterconnectAttachmentsInsertCall) Context(ctx context.Context) *InterconnectAttachmentsInsertCall { + 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 *InterconnectAttachmentsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectAttachmentsInsertCall) 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.interconnectattachment) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnectAttachments.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InterconnectAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an InterconnectAttachment in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.interconnectAttachments.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // } + // }, + // "path": "{project}/regions/{region}/interconnectAttachments", + // "request": { + // "$ref": "InterconnectAttachment" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.interconnectAttachments.list": + +type InterconnectAttachmentsListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of interconnect attachments contained within +// the specified region. +func (r *InterconnectAttachmentsService) List(project string, region string) *InterconnectAttachmentsListCall { + c := &InterconnectAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": Sets a filter +// {expression} for filtering listed resources. Your {expression} must +// be in the format: field_name comparison_string literal_string. +// +// The field_name is the name of the field you want to compare. Only +// atomic field types are supported (string, number, boolean). The +// comparison_string must be either eq (equals) or ne (not equals). The +// literal_string is the string value to filter to. The literal value +// must be valid for the type of field you are filtering by (string, +// number, boolean). For string fields, the literal value is interpreted +// as a regular expression using RE2 syntax. The literal value must +// match the entire field. +// +// For example, to filter for instances that do not have a name of +// example-instance, you would use name ne example-instance. +// +// You can filter on nested fields. For example, you could filter on +// instances that have set the scheduling.automaticRestart field to +// true. Use filtering on nested fields to take advantage of labels to +// organize and search for results based on label values. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart eq +// true) (zone eq us-central1-f). Multiple expressions are treated as +// AND expressions, meaning that resources must match all expressions to +// pass the filters. +func (c *InterconnectAttachmentsListCall) Filter(filter string) *InterconnectAttachmentsListCall { + 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 *InterconnectAttachmentsListCall) MaxResults(maxResults int64) *InterconnectAttachmentsListCall { + 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 *InterconnectAttachmentsListCall) OrderBy(orderBy string) *InterconnectAttachmentsListCall { + 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 *InterconnectAttachmentsListCall) PageToken(pageToken string) *InterconnectAttachmentsListCall { + 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 *InterconnectAttachmentsListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsListCall { + 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 *InterconnectAttachmentsListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsListCall { + 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 *InterconnectAttachmentsListCall) Context(ctx context.Context) *InterconnectAttachmentsListCall { + 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 *InterconnectAttachmentsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectAttachmentsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnectAttachments.list" call. +// Exactly one of *InterconnectAttachmentList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *InterconnectAttachmentList.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InterconnectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentList, 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 := &InterconnectAttachmentList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of interconnect attachments contained within the specified region.", + // "httpMethod": "GET", + // "id": "compute.interconnectAttachments.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + // "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" + // } + // }, + // "path": "{project}/regions/{region}/interconnectAttachments", + // "response": { + // "$ref": "InterconnectAttachmentList" + // }, + // "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 *InterconnectAttachmentsListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentList) 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.interconnectAttachments.testIamPermissions": + +type InterconnectAttachmentsTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +func (r *InterconnectAttachmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectAttachmentsTestIamPermissionsCall { + c := &InterconnectAttachmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InterconnectAttachmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsTestIamPermissionsCall { + 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 *InterconnectAttachmentsTestIamPermissionsCall) Context(ctx context.Context) *InterconnectAttachmentsTestIamPermissionsCall { + 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 *InterconnectAttachmentsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectAttachmentsTestIamPermissionsCall) 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.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnectAttachments.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InterconnectAttachmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "httpMethod": "POST", + // "id": "compute.interconnectAttachments.testIamPermissions", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.interconnectLocations.get": + +type InterconnectLocationsGetCall struct { + s *Service + project string + interconnectLocation string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the details for the specified interconnect location. Get +// a list of available interconnect locations by making a list() +// request. +func (r *InterconnectLocationsService) Get(project string, interconnectLocation string) *InterconnectLocationsGetCall { + c := &InterconnectLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.interconnectLocation = interconnectLocation + 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 *InterconnectLocationsGetCall) Fields(s ...googleapi.Field) *InterconnectLocationsGetCall { + 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 *InterconnectLocationsGetCall) IfNoneMatch(entityTag string) *InterconnectLocationsGetCall { + 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 *InterconnectLocationsGetCall) Context(ctx context.Context) *InterconnectLocationsGetCall { + 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 *InterconnectLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnectLocations/{interconnectLocation}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "interconnectLocation": c.interconnectLocation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnectLocations.get" call. +// Exactly one of *InterconnectLocation or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InterconnectLocation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InterconnectLocationsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectLocation, 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 := &InterconnectLocation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the details for the specified interconnect location. Get a list of available interconnect locations by making a list() request.", + // "httpMethod": "GET", + // "id": "compute.interconnectLocations.get", + // "parameterOrder": [ + // "project", + // "interconnectLocation" + // ], + // "parameters": { + // "interconnectLocation": { + // "description": "Name of the interconnect location to return.", + // "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/interconnectLocations/{interconnectLocation}", + // "response": { + // "$ref": "InterconnectLocation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.interconnectLocations.list": + +type InterconnectLocationsListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of interconnect locations available to the +// specified project. +func (r *InterconnectLocationsService) List(project string) *InterconnectLocationsListCall { + c := &InterconnectLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Sets a filter +// {expression} for filtering listed resources. Your {expression} must +// be in the format: field_name comparison_string literal_string. +// +// The field_name is the name of the field you want to compare. Only +// atomic field types are supported (string, number, boolean). The +// comparison_string must be either eq (equals) or ne (not equals). The +// literal_string is the string value to filter to. The literal value +// must be valid for the type of field you are filtering by (string, +// number, boolean). For string fields, the literal value is interpreted +// as a regular expression using RE2 syntax. The literal value must +// match the entire field. +// +// For example, to filter for instances that do not have a name of +// example-instance, you would use name ne example-instance. +// +// You can filter on nested fields. For example, you could filter on +// instances that have set the scheduling.automaticRestart field to +// true. Use filtering on nested fields to take advantage of labels to +// organize and search for results based on label values. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart eq +// true) (zone eq us-central1-f). Multiple expressions are treated as +// AND expressions, meaning that resources must match all expressions to +// pass the filters. +func (c *InterconnectLocationsListCall) Filter(filter string) *InterconnectLocationsListCall { + 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 *InterconnectLocationsListCall) MaxResults(maxResults int64) *InterconnectLocationsListCall { + 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 *InterconnectLocationsListCall) OrderBy(orderBy string) *InterconnectLocationsListCall { + 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 *InterconnectLocationsListCall) PageToken(pageToken string) *InterconnectLocationsListCall { + 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 *InterconnectLocationsListCall) Fields(s ...googleapi.Field) *InterconnectLocationsListCall { + 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 *InterconnectLocationsListCall) IfNoneMatch(entityTag string) *InterconnectLocationsListCall { + 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 *InterconnectLocationsListCall) Context(ctx context.Context) *InterconnectLocationsListCall { + 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 *InterconnectLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnectLocations") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnectLocations.list" call. +// Exactly one of *InterconnectLocationList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *InterconnectLocationList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InterconnectLocationsListCall) Do(opts ...googleapi.CallOption) (*InterconnectLocationList, 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 := &InterconnectLocationList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of interconnect locations available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.interconnectLocations.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + // "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" + // } + // }, + // "path": "{project}/global/interconnectLocations", + // "response": { + // "$ref": "InterconnectLocationList" + // }, + // "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 *InterconnectLocationsListCall) Pages(ctx context.Context, f func(*InterconnectLocationList) 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.interconnects.delete": + +type InterconnectsDeleteCall struct { + s *Service + project string + interconnect string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified interconnect. +func (r *InterconnectsService) Delete(project string, interconnect string) *InterconnectsDeleteCall { + c := &InterconnectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.interconnect = interconnect + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InterconnectsDeleteCall) RequestId(requestId string) *InterconnectsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InterconnectsDeleteCall) Fields(s ...googleapi.Field) *InterconnectsDeleteCall { + 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 *InterconnectsDeleteCall) Context(ctx context.Context) *InterconnectsDeleteCall { + 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 *InterconnectsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{interconnect}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + 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.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InterconnectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified interconnect.", + // "httpMethod": "DELETE", + // "id": "compute.interconnects.delete", + // "parameterOrder": [ + // "project", + // "interconnect" + // ], + // "parameters": { + // "interconnect": { + // "description": "Name of the interconnect to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // } + // }, + // "path": "{project}/global/interconnects/{interconnect}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.interconnects.get": + +type InterconnectsGetCall struct { + s *Service + project string + interconnect string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified interconnect. Get a list of available +// interconnects by making a list() request. +func (r *InterconnectsService) Get(project string, interconnect string) *InterconnectsGetCall { + c := &InterconnectsGetCall{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 *InterconnectsGetCall) Fields(s ...googleapi.Field) *InterconnectsGetCall { + 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 *InterconnectsGetCall) IfNoneMatch(entityTag string) *InterconnectsGetCall { + 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 *InterconnectsGetCall) Context(ctx context.Context) *InterconnectsGetCall { + 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 *InterconnectsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{interconnect}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + 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.get" call. +// Exactly one of *Interconnect or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Interconnect.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, 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 := &Interconnect{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request.", + // "httpMethod": "GET", + // "id": "compute.interconnects.get", + // "parameterOrder": [ + // "project", + // "interconnect" + // ], + // "parameters": { + // "interconnect": { + // "description": "Name of the interconnect to return.", + // "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}", + // "response": { + // "$ref": "Interconnect" + // }, + // "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 { + s *Service + project string + interconnect *Interconnect + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a Interconnect in the specified project using the +// data included in the request. +func (r *InterconnectsService) Insert(project string, interconnect *Interconnect) *InterconnectsInsertCall { + c := &InterconnectsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.interconnect = interconnect + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InterconnectsInsertCall) RequestId(requestId string) *InterconnectsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InterconnectsInsertCall) Fields(s ...googleapi.Field) *InterconnectsInsertCall { + 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 *InterconnectsInsertCall) Context(ctx context.Context) *InterconnectsInsertCall { + 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 *InterconnectsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectsInsertCall) 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.interconnect) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnects.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InterconnectsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Interconnect in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.interconnects.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // } + // }, + // "path": "{project}/global/interconnects", + // "request": { + // "$ref": "Interconnect" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.interconnects.list": + +type InterconnectsListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of interconnect available to the specified +// project. +func (r *InterconnectsService) List(project string) *InterconnectsListCall { + c := &InterconnectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Sets a filter +// {expression} for filtering listed resources. Your {expression} must +// be in the format: field_name comparison_string literal_string. +// +// The field_name is the name of the field you want to compare. Only +// atomic field types are supported (string, number, boolean). The +// comparison_string must be either eq (equals) or ne (not equals). The +// literal_string is the string value to filter to. The literal value +// must be valid for the type of field you are filtering by (string, +// number, boolean). For string fields, the literal value is interpreted +// as a regular expression using RE2 syntax. The literal value must +// match the entire field. +// +// For example, to filter for instances that do not have a name of +// example-instance, you would use name ne example-instance. +// +// You can filter on nested fields. For example, you could filter on +// instances that have set the scheduling.automaticRestart field to +// true. Use filtering on nested fields to take advantage of labels to +// organize and search for results based on label values. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart eq +// true) (zone eq us-central1-f). Multiple expressions are treated as +// AND expressions, meaning that resources must match all expressions to +// pass the filters. +func (c *InterconnectsListCall) Filter(filter string) *InterconnectsListCall { + 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 *InterconnectsListCall) MaxResults(maxResults int64) *InterconnectsListCall { + 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 *InterconnectsListCall) OrderBy(orderBy string) *InterconnectsListCall { + 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 *InterconnectsListCall) PageToken(pageToken string) *InterconnectsListCall { + 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 *InterconnectsListCall) Fields(s ...googleapi.Field) *InterconnectsListCall { + 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 *InterconnectsListCall) IfNoneMatch(entityTag string) *InterconnectsListCall { + 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 *InterconnectsListCall) Context(ctx context.Context) *InterconnectsListCall { + 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 *InterconnectsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnects.list" call. +// Exactly one of *InterconnectList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InterconnectList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InterconnectsListCall) Do(opts ...googleapi.CallOption) (*InterconnectList, 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 := &InterconnectList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of interconnect available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.interconnects.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + // "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" + // } + // }, + // "path": "{project}/global/interconnects", + // "response": { + // "$ref": "InterconnectList" + // }, + // "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 *InterconnectsListCall) Pages(ctx context.Context, f func(*InterconnectList) 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.interconnects.patch": + +type InterconnectsPatchCall struct { + s *Service + project string + interconnect string + interconnect2 *Interconnect + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified interconnect with the data included in +// the request. This method supports PATCH semantics and uses the JSON +// merge patch format and processing rules. +func (r *InterconnectsService) Patch(project string, interconnect string, interconnect2 *Interconnect) *InterconnectsPatchCall { + c := &InterconnectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.interconnect = interconnect + c.interconnect2 = interconnect2 + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InterconnectsPatchCall) RequestId(requestId string) *InterconnectsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InterconnectsPatchCall) Fields(s ...googleapi.Field) *InterconnectsPatchCall { + 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 *InterconnectsPatchCall) Context(ctx context.Context) *InterconnectsPatchCall { + 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 *InterconnectsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectsPatchCall) 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.interconnect2) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{interconnect}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + 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.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InterconnectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "httpMethod": "PATCH", + // "id": "compute.interconnects.patch", + // "parameterOrder": [ + // "project", + // "interconnect" + // ], + // "parameters": { + // "interconnect": { + // "description": "Name of the interconnect to update.", + // "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" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // } + // }, + // "path": "{project}/global/interconnects/{interconnect}", + // "request": { + // "$ref": "Interconnect" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.interconnects.testIamPermissions": + +type InterconnectsTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +func (r *InterconnectsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectsTestIamPermissionsCall { + c := &InterconnectsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InterconnectsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InterconnectsTestIamPermissionsCall { + 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 *InterconnectsTestIamPermissionsCall) Context(ctx context.Context) *InterconnectsTestIamPermissionsCall { + 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 *InterconnectsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectsTestIamPermissionsCall) 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.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnects.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InterconnectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "httpMethod": "POST", + // "id": "compute.interconnects.testIamPermissions", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name of the resource for this request.", + // "location": "path", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/interconnects/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.licenses.get": type LicensesGetCall struct { @@ -48697,6 +52737,177 @@ func (c *NetworksListCall) Pages(ctx context.Context, f func(*NetworkList) error } } +// method id "compute.networks.patch": + +type NetworksPatchCall struct { + s *Service + project string + network string + network2 *Network + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified network with the data included in the +// request. +func (r *NetworksService) Patch(project string, network string, network2 *Network) *NetworksPatchCall { + c := &NetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.network = network + c.network2 = network2 + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NetworksPatchCall) RequestId(requestId string) *NetworksPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworksPatchCall) Fields(s ...googleapi.Field) *NetworksPatchCall { + 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 *NetworksPatchCall) Context(ctx context.Context) *NetworksPatchCall { + 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 *NetworksPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworksPatchCall) 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.network2) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "network": c.network, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networks.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Patches the specified network with the data included in the request.", + // "httpMethod": "PATCH", + // "id": "compute.networks.patch", + // "parameterOrder": [ + // "project", + // "network" + // ], + // "parameters": { + // "network": { + // "description": "Name of the network to update.", + // "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" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // } + // }, + // "path": "{project}/global/networks/{network}", + // "request": { + // "$ref": "Network" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.networks.removePeering": type NetworksRemovePeeringCall struct { @@ -49155,7 +53366,7 @@ func (c *NetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Test // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -51929,9 +56140,9 @@ func (c *RegionAutoscalersPatchCall) Autoscaler(autoscaler string) *RegionAutosc // request if it has already been completed. // // For example, consider a situation where you make an initial request -// and then 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 +// 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. // @@ -52058,7 +56269,7 @@ func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // "type": "string" // }, // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then 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).", + // "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" // } @@ -52072,8 +56283,7 @@ func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -52273,11 +56483,14 @@ func (c *RegionAutoscalersUpdateCall) Autoscaler(autoscaler string) *RegionAutos // request if it has already been completed. // // For example, consider a situation where you make an initial request -// and then 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 +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second // request. This prevents clients from accidentally creating duplicate // commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). func (c *RegionAutoscalersUpdateCall) RequestId(requestId string) *RegionAutoscalersUpdateCall { c.urlParams_.Set("requestId", requestId) return c @@ -52399,7 +56612,7 @@ func (c *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operati // "type": "string" // }, // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then 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.", + // "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" // } @@ -53527,8 +57740,7 @@ func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Oper // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -56278,8 +60490,7 @@ func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -60896,8 +65107,7 @@ func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -62259,7 +66469,7 @@ func (c *RoutesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPe // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -62280,6 +66490,1049 @@ func (c *RoutesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPe } +// method id "compute.securityPolicies.delete": + +type SecurityPoliciesDeleteCall struct { + s *Service + project string + securityPolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified policy. +func (r *SecurityPoliciesService) Delete(project string, securityPolicy string) *SecurityPoliciesDeleteCall { + c := &SecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.securityPolicy = securityPolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *SecurityPoliciesDeleteCall) RequestId(requestId string) *SecurityPoliciesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *SecurityPoliciesDeleteCall { + 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 *SecurityPoliciesDeleteCall) Context(ctx context.Context) *SecurityPoliciesDeleteCall { + 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 *SecurityPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{securityPolicy}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "securityPolicy": c.securityPolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.securityPolicies.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified policy.", + // "httpMethod": "DELETE", + // "id": "compute.securityPolicies.delete", + // "parameterOrder": [ + // "project", + // "securityPolicy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, + // "securityPolicy": { + // "description": "Name of the security policy to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/securityPolicies/{securityPolicy}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.securityPolicies.get": + +type SecurityPoliciesGetCall struct { + s *Service + project string + securityPolicy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: List all of the ordered rules present in a single specified +// policy. +func (r *SecurityPoliciesService) Get(project string, securityPolicy string) *SecurityPoliciesGetCall { + c := &SecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.securityPolicy = securityPolicy + 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 *SecurityPoliciesGetCall) Fields(s ...googleapi.Field) *SecurityPoliciesGetCall { + 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 *SecurityPoliciesGetCall) IfNoneMatch(entityTag string) *SecurityPoliciesGetCall { + 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 *SecurityPoliciesGetCall) Context(ctx context.Context) *SecurityPoliciesGetCall { + 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 *SecurityPoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{securityPolicy}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "securityPolicy": c.securityPolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.securityPolicies.get" call. +// Exactly one of *SecurityPolicy or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *SecurityPolicy.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *SecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPolicy, 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 := &SecurityPolicy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List all of the ordered rules present in a single specified policy.", + // "httpMethod": "GET", + // "id": "compute.securityPolicies.get", + // "parameterOrder": [ + // "project", + // "securityPolicy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "securityPolicy": { + // "description": "Name of the security policy to get.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/securityPolicies/{securityPolicy}", + // "response": { + // "$ref": "SecurityPolicy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.securityPolicies.insert": + +type SecurityPoliciesInsertCall struct { + s *Service + project string + securitypolicy *SecurityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a new policy in the specified project using the data +// included in the request. +func (r *SecurityPoliciesService) Insert(project string, securitypolicy *SecurityPolicy) *SecurityPoliciesInsertCall { + c := &SecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.securitypolicy = securitypolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *SecurityPoliciesInsertCall) RequestId(requestId string) *SecurityPoliciesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SecurityPoliciesInsertCall) Fields(s ...googleapi.Field) *SecurityPoliciesInsertCall { + 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 *SecurityPoliciesInsertCall) Context(ctx context.Context) *SecurityPoliciesInsertCall { + 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 *SecurityPoliciesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SecurityPoliciesInsertCall) 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.securitypolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.securityPolicies.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SecurityPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new policy in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.securityPolicies.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // } + // }, + // "path": "{project}/global/securityPolicies", + // "request": { + // "$ref": "SecurityPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.securityPolicies.list": + +type SecurityPoliciesListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List all the policies that have been configured for the +// specified project. +func (r *SecurityPoliciesService) List(project string) *SecurityPoliciesListCall { + c := &SecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Sets a filter +// {expression} for filtering listed resources. Your {expression} must +// be in the format: field_name comparison_string literal_string. +// +// The field_name is the name of the field you want to compare. Only +// atomic field types are supported (string, number, boolean). The +// comparison_string must be either eq (equals) or ne (not equals). The +// literal_string is the string value to filter to. The literal value +// must be valid for the type of field you are filtering by (string, +// number, boolean). For string fields, the literal value is interpreted +// as a regular expression using RE2 syntax. The literal value must +// match the entire field. +// +// For example, to filter for instances that do not have a name of +// example-instance, you would use name ne example-instance. +// +// You can filter on nested fields. For example, you could filter on +// instances that have set the scheduling.automaticRestart field to +// true. Use filtering on nested fields to take advantage of labels to +// organize and search for results based on label values. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart eq +// true) (zone eq us-central1-f). Multiple expressions are treated as +// AND expressions, meaning that resources must match all expressions to +// pass the filters. +func (c *SecurityPoliciesListCall) Filter(filter string) *SecurityPoliciesListCall { + 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 *SecurityPoliciesListCall) MaxResults(maxResults int64) *SecurityPoliciesListCall { + 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 *SecurityPoliciesListCall) OrderBy(orderBy string) *SecurityPoliciesListCall { + 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 *SecurityPoliciesListCall) PageToken(pageToken string) *SecurityPoliciesListCall { + 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 *SecurityPoliciesListCall) Fields(s ...googleapi.Field) *SecurityPoliciesListCall { + 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 *SecurityPoliciesListCall) IfNoneMatch(entityTag string) *SecurityPoliciesListCall { + 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 *SecurityPoliciesListCall) Context(ctx context.Context) *SecurityPoliciesListCall { + 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 *SecurityPoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.securityPolicies.list" call. +// Exactly one of *SecurityPoliciesList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *SecurityPoliciesList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *SecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*SecurityPoliciesList, 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 := &SecurityPoliciesList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List all the policies that have been configured for the specified project.", + // "httpMethod": "GET", + // "id": "compute.securityPolicies.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + // "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" + // } + // }, + // "path": "{project}/global/securityPolicies", + // "response": { + // "$ref": "SecurityPoliciesList" + // }, + // "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 *SecurityPoliciesListCall) Pages(ctx context.Context, f func(*SecurityPoliciesList) 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.securityPolicies.patch": + +type SecurityPoliciesPatchCall struct { + s *Service + project string + securityPolicy string + securitypolicy *SecurityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified policy with the data included in the +// request. +func (r *SecurityPoliciesService) Patch(project string, securityPolicy string, securitypolicy *SecurityPolicy) *SecurityPoliciesPatchCall { + c := &SecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.securityPolicy = securityPolicy + c.securitypolicy = securitypolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *SecurityPoliciesPatchCall) RequestId(requestId string) *SecurityPoliciesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *SecurityPoliciesPatchCall { + 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 *SecurityPoliciesPatchCall) Context(ctx context.Context) *SecurityPoliciesPatchCall { + 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 *SecurityPoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SecurityPoliciesPatchCall) 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.securitypolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{securityPolicy}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "securityPolicy": c.securityPolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.securityPolicies.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Patches the specified policy with the data included in the request.", + // "httpMethod": "PATCH", + // "id": "compute.securityPolicies.patch", + // "parameterOrder": [ + // "project", + // "securityPolicy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, + // "securityPolicy": { + // "description": "Name of the security policy to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/securityPolicies/{securityPolicy}", + // "request": { + // "$ref": "SecurityPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.securityPolicies.testIamPermissions": + +type SecurityPoliciesTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +func (r *SecurityPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SecurityPoliciesTestIamPermissionsCall { + c := &SecurityPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SecurityPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *SecurityPoliciesTestIamPermissionsCall { + 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 *SecurityPoliciesTestIamPermissionsCall) Context(ctx context.Context) *SecurityPoliciesTestIamPermissionsCall { + 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 *SecurityPoliciesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SecurityPoliciesTestIamPermissionsCall) 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.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.securityPolicies.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *SecurityPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "httpMethod": "POST", + // "id": "compute.securityPolicies.testIamPermissions", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name of the resource for this request.", + // "location": "path", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/securityPolicies/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.snapshots.delete": type SnapshotsDeleteCall struct { @@ -63127,7 +68380,7 @@ func (c *SnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -63999,7 +69252,7 @@ func (c *SslCertificatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -66910,7 +72163,7 @@ func (c *TargetHttpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -68122,7 +73375,7 @@ func (c *TargetHttpsProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOpti // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -72953,7 +78206,7 @@ func (c *TargetSslProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -76282,8 +81535,7 @@ func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -76416,7 +81668,7 @@ func (c *UrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestP // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } 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 9b169bb56..a6b658b3b 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-api.json +++ b/vendor/google.golang.org/api/compute/v1/compute-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/dXJ6H81YhcA1IB55do9QrvoIsEc\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/NmnDcMrRPBfXrpllirstA-3cT3k\"", "discoveryVersion": "v1", "id": "compute:v1", "name": "compute", "version": "v1", - "revision": "20170721", + "revision": "20170816", "title": "Compute Engine API", "description": "Creates and runs virtual machines on Google Cloud Platform.", "ownerDomain": "google.com", @@ -1216,7 +1216,7 @@ }, "healthChecks": { "type": "array", - "description": "The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for GCE backend services. A health check must not be specified for GAE app backend and Cloud Function backend.\n\nFor internal load balancing, a URL to a HealthCheck resource must be specified instead.", + "description": "The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for Compute Engine backend services. A health check must not be specified for App Engine backend and Cloud Function backend.\n\nFor internal load balancing, a URL to a HealthCheck resource must be specified instead.", "items": { "type": "string" } @@ -1236,6 +1236,7 @@ }, "loadBalancingScheme": { "type": "string", + "description": "Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. Possible values are INTERNAL and EXTERNAL.", "enum": [ "EXTERNAL", "INTERNAL", @@ -2387,10 +2388,49 @@ "type": "string", "description": "[Output Only] Creation timestamp in RFC3339 text format." }, + "denied": { + "type": "array", + "description": "The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.", + "items": { + "type": "object", + "properties": { + "IPProtocol": { + "type": "string", + "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number." + }, + "ports": { + "type": "array", + "description": "An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", + "items": { + "type": "string" + } + } + } + } + }, "description": { "type": "string", "description": "An optional description of this resource. Provide this property when you create the resource." }, + "destinationRanges": { + "type": "array", + "description": "If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.", + "items": { + "type": "string" + } + }, + "direction": { + "type": "string", + "description": "Direction of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.", + "enum": [ + "EGRESS", + "INGRESS" + ], + "enumDescriptions": [ + "", + "" + ] + }, "id": { "type": "string", "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", @@ -2416,6 +2456,11 @@ "type": "string", "description": "URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:\nglobal/networks/default\nIf you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n- projects/myproject/global/networks/my-network \n- global/networks/default" }, + "priority": { + "type": "integer", + "description": "Priority for this rule. This is an integer between 0 and 65535, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority.", + "format": "int32" + }, "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for the resource." @@ -3485,7 +3530,7 @@ }, "networkInterfaces": { "type": "array", - "description": "An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one interface is supported per instance.", + "description": "An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance.", "items": { "$ref": "NetworkInterface" } @@ -5772,7 +5817,7 @@ }, "resources": { "type": "array", - "description": "Serive resources (a.k.a service projects) attached to this project as their shared VPC host.", + "description": "Service resources (a.k.a service projects) attached to this project as their shared VPC host.", "items": { "$ref": "XpnResourceId" } @@ -5822,6 +5867,7 @@ "LOCAL_SSD_TOTAL_GB", "NETWORKS", "NVIDIA_K80_GPUS", + "NVIDIA_P100_GPUS", "PREEMPTIBLE_CPUS", "PREEMPTIBLE_LOCAL_SSD_GB", "REGIONAL_AUTOSCALERS", @@ -5840,6 +5886,7 @@ "TARGET_INSTANCES", "TARGET_POOLS", "TARGET_SSL_PROXIES", + "TARGET_TCP_PROXIES", "TARGET_VPN_GATEWAYS", "URL_MAPS", "VPN_TUNNELS" @@ -5884,6 +5931,8 @@ "", "", "", + "", + "", "" ] }, @@ -9459,6 +9508,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -9535,6 +9589,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -9682,6 +9741,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "Name of the zone for this request.", @@ -9758,6 +9822,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "Name of the zone for this request.", @@ -9857,6 +9926,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "Name of the zone for this request.", @@ -9877,8 +9951,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "update": { @@ -9900,6 +9973,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "Name of the zone for this request.", @@ -9946,6 +10024,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -10006,6 +10089,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -10090,6 +10178,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -10104,8 +10197,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "update": { @@ -10127,6 +10219,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -10216,6 +10313,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -10312,6 +10414,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -10396,6 +10503,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -10410,8 +10522,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "update": { @@ -10433,6 +10544,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -10679,6 +10795,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -10722,6 +10843,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -10798,6 +10924,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "sourceImage": { "type": "string", "description": "Optional. Source image to restore onto a disk.", @@ -10903,6 +11034,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -10940,6 +11076,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "resource": { "type": "string", "description": "Name of the resource for this request.", @@ -10994,6 +11135,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -11054,6 +11200,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -11123,11 +11274,11 @@ "id": "compute.firewalls.patch", "path": "{project}/global/firewalls/{firewall}", "httpMethod": "PATCH", - "description": "Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags. This method supports patch semantics.", + "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "parameters": { "firewall": { "type": "string", - "description": "Name of the firewall rule to update.", + "description": "Name of the firewall rule to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -11138,6 +11289,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -11174,6 +11330,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -11270,6 +11431,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -11346,6 +11512,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -11446,6 +11617,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -11487,6 +11663,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -11547,6 +11728,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -11635,6 +11821,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -11695,6 +11886,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -11779,6 +11975,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -11985,6 +12186,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -12045,6 +12251,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -12129,6 +12340,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -12143,8 +12359,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "update": { @@ -12166,6 +12381,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -12206,6 +12426,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -12266,6 +12491,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -12350,6 +12580,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -12364,8 +12599,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "update": { @@ -12387,6 +12621,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -12427,6 +12666,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -12487,6 +12731,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -12571,6 +12820,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -12585,8 +12839,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "update": { @@ -12608,6 +12861,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -12648,6 +12906,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -12681,6 +12944,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -12783,6 +13051,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -12910,6 +13183,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone where the managed instance group is located.", @@ -13001,6 +13279,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone where the managed instance group is located.", @@ -13040,6 +13323,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone where the managed instance group is located.", @@ -13116,6 +13404,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone where you want to create the managed instance group.", @@ -13272,6 +13565,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone where the managed instance group is located.", @@ -13314,6 +13612,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "size": { "type": "integer", "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.", @@ -13361,6 +13664,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone where the managed instance group is located.", @@ -13403,6 +13711,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone where the managed instance group is located.", @@ -13449,6 +13762,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone where the instance group is located.", @@ -13540,6 +13858,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone where the instance group is located.", @@ -13613,6 +13936,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone where you want to create the instance group.", @@ -13776,6 +14104,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone where the instance group is located.", @@ -13818,6 +14151,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone where the instance group is located.", @@ -13864,6 +14202,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -13924,6 +14267,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -14019,6 +14367,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14113,6 +14466,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14157,6 +14515,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14210,6 +14573,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14259,6 +14627,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14393,6 +14766,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14493,6 +14871,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14547,6 +14930,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14590,6 +14978,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14634,6 +15027,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14678,6 +15076,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14722,6 +15125,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14766,6 +15174,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14810,6 +15223,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14854,6 +15272,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14898,6 +15321,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14939,6 +15367,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -14983,6 +15416,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -15217,6 +15655,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -15253,6 +15696,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -15313,6 +15761,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -15397,6 +15850,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -15433,6 +15891,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -15463,6 +15926,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -15488,6 +15956,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -15516,6 +15989,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -15541,6 +16019,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -15711,6 +16194,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -15739,6 +16227,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -15767,6 +16260,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -15795,6 +16293,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -15844,6 +16347,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -15920,6 +16428,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -16019,6 +16532,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -16033,8 +16551,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "update": { @@ -16062,6 +16579,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -16109,6 +16631,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -16229,6 +16756,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -16329,6 +16861,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -16344,8 +16881,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "update": { @@ -16374,6 +16910,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -16506,6 +17047,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -16608,6 +17154,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -16650,6 +17201,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -16689,6 +17245,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -16765,6 +17326,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -16921,6 +17487,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -16964,6 +17535,11 @@ "required": true, "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "size": { "type": "integer", "description": "Number of instances that should exist in this instance group manager.", @@ -17011,6 +17587,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -17053,6 +17634,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -17261,6 +17847,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -17580,6 +18171,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "router": { "type": "string", "description": "Name of the Router resource to delete.", @@ -17704,6 +18300,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -17798,6 +18399,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "router": { "type": "string", "description": "Name of the Router resource to patch.", @@ -17819,8 +18425,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "preview": { @@ -17888,6 +18493,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "router": { "type": "string", "description": "Name of the Router resource to update.", @@ -17929,6 +18539,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "route": { "type": "string", "description": "Name of the Route resource to delete.", @@ -17995,6 +18610,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -18077,6 +18697,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "snapshot": { "type": "string", "description": "Name of the Snapshot resource to delete.", @@ -18233,6 +18858,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "sslCertificate": { "type": "string", "description": "Name of the SslCertificate resource to delete.", @@ -18299,6 +18929,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -18437,6 +19072,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "subnetwork": { "type": "string", "description": "Name of the Subnetwork resource to delete.", @@ -18478,6 +19118,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "subnetwork": { "type": "string", "description": "Name of the Subnetwork resource to update.", @@ -18563,6 +19208,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -18657,6 +19307,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "subnetwork": { "type": "string", "description": "Name of the Subnetwork resource.", @@ -18698,6 +19353,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetHttpProxy": { "type": "string", "description": "Name of the TargetHttpProxy resource to delete.", @@ -18764,6 +19424,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -18842,6 +19507,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetHttpProxy": { "type": "string", "description": "Name of the TargetHttpProxy to set a URL map for.", @@ -18882,6 +19552,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetHttpsProxy": { "type": "string", "description": "Name of the TargetHttpsProxy resource to delete.", @@ -18948,6 +19623,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -19026,6 +19706,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetHttpsProxy": { "type": "string", "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", @@ -19062,6 +19747,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetHttpsProxy": { "type": "string", "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.", @@ -19151,6 +19841,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetInstance": { "type": "string", "description": "Name of the TargetInstance resource to delete.", @@ -19234,6 +19929,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "zone": { "type": "string", "description": "Name of the zone scoping this request.", @@ -19338,6 +20038,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetPool": { "type": "string", "description": "Name of the target pool to add a health check to.", @@ -19382,6 +20087,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetPool": { "type": "string", "description": "Name of the TargetPool resource to add instances to.", @@ -19475,6 +20185,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetPool": { "type": "string", "description": "Name of the TargetPool resource to delete.", @@ -19602,6 +20317,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -19696,6 +20416,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetPool": { "type": "string", "description": "Name of the target pool to remove health checks from.", @@ -19740,6 +20465,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetPool": { "type": "string", "description": "Name of the TargetPool resource to remove instances from.", @@ -19790,6 +20520,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetPool": { "type": "string", "description": "Name of the TargetPool resource to set a backup pool for.", @@ -19831,6 +20566,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetSslProxy": { "type": "string", "description": "Name of the TargetSslProxy resource to delete.", @@ -19897,6 +20637,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -19975,6 +20720,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetSslProxy": { "type": "string", "description": "Name of the TargetSslProxy resource whose BackendService resource is to be set.", @@ -20011,6 +20761,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetSslProxy": { "type": "string", "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.", @@ -20047,6 +20802,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetSslProxy": { "type": "string", "description": "Name of the TargetSslProxy resource whose SslCertificate resource is to be set.", @@ -20087,6 +20847,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetTcpProxy": { "type": "string", "description": "Name of the TargetTcpProxy resource to delete.", @@ -20153,6 +20918,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -20231,6 +21001,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetTcpProxy": { "type": "string", "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.", @@ -20267,6 +21042,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetTcpProxy": { "type": "string", "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", @@ -20363,6 +21143,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "targetVpnGateway": { "type": "string", "description": "Name of the target VPN gateway to delete.", @@ -20445,6 +21230,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -20536,6 +21326,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "urlMap": { "type": "string", "description": "Name of the UrlMap resource to delete.", @@ -20602,6 +21397,11 @@ "required": true, "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])?))", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ @@ -20631,6 +21431,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "urlMap": { "type": "string", "description": "Name of the UrlMap scoping this request.", @@ -20716,6 +21521,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "urlMap": { "type": "string", "description": "Name of the UrlMap resource to patch.", @@ -20736,8 +21546,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "update": { @@ -20753,6 +21562,11 @@ "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])?))", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "urlMap": { "type": "string", "description": "Name of the UrlMap resource to update.", @@ -20885,6 +21699,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "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" + }, "vpnTunnel": { "type": "string", "description": "Name of the VpnTunnel resource to delete.", @@ -20967,6 +21786,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "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" } }, "parameterOrder": [ 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 6068408aa..4f4705163 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-gen.go +++ b/vendor/google.golang.org/api/compute/v1/compute-gen.go @@ -2500,8 +2500,9 @@ type BackendService struct { // HealthChecks: The list of URLs to the HttpHealthCheck or // HttpsHealthCheck resource for health checking this BackendService. // Currently at most one health check can be specified, and a health - // check is required for GCE backend services. A health check must not - // be specified for GAE app backend and Cloud Function backend. + // check is required for Compute Engine backend services. A health check + // must not be specified for App Engine backend and Cloud Function + // backend. // // For internal load balancing, a URL to a HealthCheck resource must be // specified instead. @@ -2517,6 +2518,11 @@ type BackendService struct { // for backend services. Kind string `json:"kind,omitempty"` + // LoadBalancingScheme: Indicates whether the backend service will be + // used with internal or external load balancing. A backend service + // created for one type of load balancing cannot be used with the other. + // Possible values are INTERNAL and EXTERNAL. + // // Possible values: // "EXTERNAL" // "INTERNAL" @@ -4332,10 +4338,31 @@ type Firewall struct { // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` + // Denied: The list of DENY rules specified by this firewall. Each rule + // specifies a protocol and port-range tuple that describes a permitted + // connection. + Denied []*FirewallDenied `json:"denied,omitempty"` + // Description: An optional description of this resource. Provide this // property when you create the resource. Description string `json:"description,omitempty"` + // DestinationRanges: If destination ranges are specified, the firewall + // will apply only to traffic that has destination IP address in these + // ranges. These ranges must be expressed in CIDR format. Only IPv4 is + // supported. + DestinationRanges []string `json:"destinationRanges,omitempty"` + + // Direction: Direction of traffic to which this firewall applies; + // default is INGRESS. Note: For INGRESS traffic, it is NOT supported to + // specify destinationRanges; For EGRESS traffic, it is NOT supported to + // specify sourceRanges OR sourceTags. + // + // Possible values: + // "EGRESS" + // "INGRESS" + Direction string `json:"direction,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` @@ -4366,6 +4393,14 @@ type Firewall struct { // - global/networks/default Network string `json:"network,omitempty"` + // Priority: Priority for this rule. This is an integer between 0 and + // 65535, both inclusive. When not specified, the value assumed is 1000. + // Relative priorities determine precedence of conflicting rules. Lower + // value of priority implies higher precedence (eg, a rule with priority + // 0 has higher precedence than a rule with priority 1). DENY rules take + // precedence over ALLOW rules having equal priority. + Priority int64 `json:"priority,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -4464,6 +4499,44 @@ func (s *FirewallAllowed) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type FirewallDenied struct { + // IPProtocol: The IP protocol to which this rule applies. The protocol + // type is required when creating a firewall rule. This value can either + // be one of the following well known protocol strings (tcp, udp, icmp, + // esp, ah, ipip, sctp), or the IP protocol number. + IPProtocol string `json:"IPProtocol,omitempty"` + + // Ports: An optional list of ports to which this rule applies. This + // field is only applicable for UDP or TCP protocol. Each entry must be + // either an integer or a range. If not specified, this rule applies to + // connections through any port. + // + // Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. + Ports []string `json:"ports,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IPProtocol") 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. "IPProtocol") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FirewallDenied) MarshalJSON() ([]byte, error) { + type noMethod FirewallDenied + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // FirewallList: Contains a list of firewalls. type FirewallList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -5994,10 +6067,10 @@ type Instance struct { // be a dash. Name string `json:"name,omitempty"` - // NetworkInterfaces: An array of configurations for this interface. - // This specifies how this interface is configured to interact with - // other network services, such as connecting to the internet. Only one - // interface is supported per instance. + // NetworkInterfaces: An array of network configurations for this + // instance. These specify how interfaces are configured to interact + // with other network services, such as connecting to the internet. + // Multiple interfaces are supported per instance. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` // Scheduling: Sets the scheduling options for this instance. @@ -9628,8 +9701,8 @@ type ProjectsGetXpnResources struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // Resources: Serive resources (a.k.a service projects) attached to this - // project as their shared VPC host. + // Resources: Service resources (a.k.a service projects) attached to + // this project as their shared VPC host. Resources []*XpnResourceId `json:"resources,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -9715,6 +9788,7 @@ type Quota struct { // "LOCAL_SSD_TOTAL_GB" // "NETWORKS" // "NVIDIA_K80_GPUS" + // "NVIDIA_P100_GPUS" // "PREEMPTIBLE_CPUS" // "PREEMPTIBLE_LOCAL_SSD_GB" // "REGIONAL_AUTOSCALERS" @@ -9733,6 +9807,7 @@ type Quota struct { // "TARGET_INSTANCES" // "TARGET_POOLS" // "TARGET_SSL_PROXIES" + // "TARGET_TCP_PROXIES" // "TARGET_VPN_GATEWAYS" // "URL_MAPS" // "VPN_TUNNELS" @@ -16023,6 +16098,25 @@ func (r *AddressesService) Delete(project string, region string, address string) return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *AddressesDeleteCall) RequestId(requestId string) *AddressesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -16135,6 +16229,11 @@ func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/addresses/{address}", @@ -16335,6 +16434,25 @@ func (r *AddressesService) Insert(project string, region string, address *Addres return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *AddressesInsertCall) RequestId(requestId string) *AddressesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -16443,6 +16561,11 @@ func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/addresses", @@ -16996,6 +17119,25 @@ func (r *AutoscalersService) Delete(project string, zone string, autoscaler stri return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *AutoscalersDeleteCall) RequestId(requestId string) *AutoscalersDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -17102,6 +17244,11 @@ func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "Name of the zone for this request.", // "location": "path", @@ -17307,6 +17454,25 @@ func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Aut return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *AutoscalersInsertCall) RequestId(requestId string) *AutoscalersInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -17409,6 +17575,11 @@ func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "Name of the zone for this request.", // "location": "path", @@ -17725,6 +17896,25 @@ func (c *AutoscalersPatchCall) Autoscaler(autoscaler string) *AutoscalersPatchCa return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *AutoscalersPatchCall) RequestId(requestId string) *AutoscalersPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -17833,6 +18023,11 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "Name of the zone for this request.", // "location": "path", @@ -17850,8 +18045,7 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -17886,6 +18080,25 @@ func (c *AutoscalersUpdateCall) Autoscaler(autoscaler string) *AutoscalersUpdate return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *AutoscalersUpdateCall) RequestId(requestId string) *AutoscalersUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -17994,6 +18207,11 @@ func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "Name of the zone for this request.", // "location": "path", @@ -18036,6 +18254,25 @@ func (r *BackendBucketsService) Delete(project string, backendBucket string) *Ba return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *BackendBucketsDeleteCall) RequestId(requestId string) *BackendBucketsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -18139,6 +18376,11 @@ func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/backendBuckets/{backendBucket}", @@ -18325,6 +18567,25 @@ func (r *BackendBucketsService) Insert(project string, backendbucket *BackendBuc return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *BackendBucketsInsertCall) RequestId(requestId string) *BackendBucketsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -18424,6 +18685,11 @@ func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/backendBuckets", @@ -18716,6 +18982,25 @@ func (r *BackendBucketsService) Patch(project string, backendBucket string, back return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *BackendBucketsPatchCall) RequestId(requestId string) *BackendBucketsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -18824,6 +19109,11 @@ func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/backendBuckets/{backendBucket}", @@ -18835,8 +19125,7 @@ func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -18864,6 +19153,25 @@ func (r *BackendBucketsService) Update(project string, backendBucket string, bac return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *BackendBucketsUpdateCall) RequestId(requestId string) *BackendBucketsUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -18972,6 +19280,11 @@ func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/backendBuckets/{backendBucket}", @@ -19261,6 +19574,25 @@ func (r *BackendServicesService) Delete(project string, backendService string) * return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *BackendServicesDeleteCall) RequestId(requestId string) *BackendServicesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -19364,6 +19696,11 @@ func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/backendServices/{backendService}", @@ -19702,6 +20039,25 @@ func (r *BackendServicesService) Insert(project string, backendservice *BackendS return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *BackendServicesInsertCall) RequestId(requestId string) *BackendServicesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -19801,6 +20157,11 @@ func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/backendServices", @@ -20098,6 +20459,25 @@ func (r *BackendServicesService) Patch(project string, backendService string, ba return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *BackendServicesPatchCall) RequestId(requestId string) *BackendServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -20206,6 +20586,11 @@ func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/backendServices/{backendService}", @@ -20217,8 +20602,7 @@ func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -20249,6 +20633,25 @@ func (r *BackendServicesService) Update(project string, backendService string, b return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *BackendServicesUpdateCall) RequestId(requestId string) *BackendServicesUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -20357,6 +20760,11 @@ func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/backendServices/{backendService}", @@ -21336,6 +21744,25 @@ func (c *DisksCreateSnapshotCall) GuestFlush(guestFlush bool) *DisksCreateSnapsh return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *DisksCreateSnapshotCall) RequestId(requestId string) *DisksCreateSnapshotCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -21451,6 +21878,11 @@ func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -21499,6 +21931,25 @@ func (r *DisksService) Delete(project string, zone string, disk string) *DisksDe return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *DisksDeleteCall) RequestId(requestId string) *DisksDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -21604,6 +22055,11 @@ func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -21814,6 +22270,25 @@ func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksIns return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *DisksInsertCall) RequestId(requestId string) *DisksInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // SourceImage sets the optional parameter "sourceImage": Source image // to restore onto a disk. func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall { @@ -21923,6 +22398,11 @@ func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "sourceImage": { // "description": "Optional. Source image to restore onto a disk.", // "location": "query", @@ -22238,6 +22718,25 @@ func (r *DisksService) Resize(project string, zone string, disk string, disksres return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *DisksResizeCall) RequestId(requestId string) *DisksResizeCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -22349,6 +22848,11 @@ func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -22396,6 +22900,25 @@ func (r *DisksService) SetLabels(project string, zone string, resource string, z return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *DisksSetLabelsCall) RequestId(requestId string) *DisksSetLabelsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -22500,6 +23023,11 @@ func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "resource": { // "description": "Name of the resource for this request.", // "location": "path", @@ -22550,6 +23078,25 @@ func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDel return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *FirewallsDeleteCall) RequestId(requestId string) *FirewallsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -22653,6 +23200,11 @@ func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/firewalls/{firewall}", @@ -22840,6 +23392,25 @@ func (r *FirewallsService) Insert(project string, firewall *Firewall) *Firewalls return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *FirewallsInsertCall) RequestId(requestId string) *FirewallsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -22939,6 +23510,11 @@ func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/firewalls", @@ -23222,9 +23798,8 @@ type FirewallsPatchCall struct { } // Patch: Updates the specified firewall rule with the data included in -// the request. Using PUT method, can only update following fields of -// firewall rule: allowed, description, sourceRanges, sourceTags, -// targetTags. This method supports patch semantics. +// the request. This method supports PATCH semantics and uses the JSON +// merge patch format and processing rules. // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/patch func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall { c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -23234,6 +23809,25 @@ func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Fir return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *FirewallsPatchCall) RequestId(requestId string) *FirewallsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -23321,7 +23915,7 @@ func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags. This method supports patch semantics.", + // "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", // "httpMethod": "PATCH", // "id": "compute.firewalls.patch", // "parameterOrder": [ @@ -23330,7 +23924,7 @@ func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error // ], // "parameters": { // "firewall": { - // "description": "Name of the firewall rule to update.", + // "description": "Name of the firewall rule to patch.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -23342,6 +23936,11 @@ func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/firewalls/{firewall}", @@ -23384,6 +23983,25 @@ func (r *FirewallsService) Update(project string, firewall string, firewall2 *Fi return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *FirewallsUpdateCall) RequestId(requestId string) *FirewallsUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -23492,6 +24110,11 @@ func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/firewalls/{firewall}", @@ -23783,6 +24406,25 @@ func (r *ForwardingRulesService) Delete(project string, region string, forwardin return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ForwardingRulesDeleteCall) RequestId(requestId string) *ForwardingRulesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -23895,6 +24537,11 @@ func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", @@ -24095,6 +24742,25 @@ func (r *ForwardingRulesService) Insert(project string, region string, forwardin return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ForwardingRulesInsertCall) RequestId(requestId string) *ForwardingRulesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -24203,6 +24869,11 @@ func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/forwardingRules", @@ -24509,6 +25180,25 @@ func (r *ForwardingRulesService) SetTarget(project string, region string, forwar return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ForwardingRulesSetTargetCall) RequestId(requestId string) *ForwardingRulesSetTargetCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -24626,6 +25316,11 @@ func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operat // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", @@ -24663,6 +25358,25 @@ func (r *GlobalAddressesService) Delete(project string, address string) *GlobalA return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *GlobalAddressesDeleteCall) RequestId(requestId string) *GlobalAddressesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -24766,6 +25480,11 @@ func (c *GlobalAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/addresses/{address}", @@ -24954,6 +25673,25 @@ func (r *GlobalAddressesService) Insert(project string, address *Address) *Globa return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *GlobalAddressesInsertCall) RequestId(requestId string) *GlobalAddressesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -25053,6 +25791,11 @@ func (c *GlobalAddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/addresses", @@ -25342,6 +26085,25 @@ func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule str return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *GlobalForwardingRulesDeleteCall) RequestId(requestId string) *GlobalForwardingRulesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -25445,6 +26207,11 @@ func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/forwardingRules/{forwardingRule}", @@ -25633,6 +26400,25 @@ func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *Fo return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *GlobalForwardingRulesInsertCall) RequestId(requestId string) *GlobalForwardingRulesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -25732,6 +26518,11 @@ func (c *GlobalForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Ope // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/forwardingRules", @@ -26025,6 +26816,25 @@ func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *GlobalForwardingRulesSetTargetCall) RequestId(requestId string) *GlobalForwardingRulesSetTargetCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -26133,6 +26943,11 @@ func (c *GlobalForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (* // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/forwardingRules/{forwardingRule}/setTarget", @@ -26936,6 +27751,25 @@ func (r *HealthChecksService) Delete(project string, healthCheck string) *Health return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *HealthChecksDeleteCall) RequestId(requestId string) *HealthChecksDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -27039,6 +27873,11 @@ func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, e // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/healthChecks/{healthCheck}", @@ -27225,6 +28064,25 @@ func (r *HealthChecksService) Insert(project string, healthcheck *HealthCheck) * return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *HealthChecksInsertCall) RequestId(requestId string) *HealthChecksInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -27324,6 +28182,11 @@ func (c *HealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, e // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/healthChecks", @@ -27616,6 +28479,25 @@ func (r *HealthChecksService) Patch(project string, healthCheck string, healthch return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *HealthChecksPatchCall) RequestId(requestId string) *HealthChecksPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -27724,6 +28606,11 @@ func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/healthChecks/{healthCheck}", @@ -27735,8 +28622,7 @@ func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -27764,6 +28650,25 @@ func (r *HealthChecksService) Update(project string, healthCheck string, healthc return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *HealthChecksUpdateCall) RequestId(requestId string) *HealthChecksUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -27872,6 +28777,11 @@ func (c *HealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, e // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/healthChecks/{healthCheck}", @@ -27909,6 +28819,25 @@ func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *HttpHealthChecksDeleteCall) RequestId(requestId string) *HttpHealthChecksDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -28012,6 +28941,11 @@ func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", @@ -28200,6 +29134,25 @@ func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHe return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *HttpHealthChecksInsertCall) RequestId(requestId string) *HttpHealthChecksInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -28299,6 +29252,11 @@ func (c *HttpHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operatio // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/httpHealthChecks", @@ -28593,6 +29551,25 @@ func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *HttpHealthChecksPatchCall) RequestId(requestId string) *HttpHealthChecksPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -28701,6 +29678,11 @@ func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", @@ -28712,8 +29694,7 @@ func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -28742,6 +29723,25 @@ func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *HttpHealthChecksUpdateCall) RequestId(requestId string) *HttpHealthChecksUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -28850,6 +29850,11 @@ func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operatio // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", @@ -28886,6 +29891,25 @@ func (r *HttpsHealthChecksService) Delete(project string, httpsHealthCheck strin return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *HttpsHealthChecksDeleteCall) RequestId(requestId string) *HttpsHealthChecksDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -28989,6 +30013,11 @@ func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", @@ -29175,6 +30204,25 @@ func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *Http return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *HttpsHealthChecksInsertCall) RequestId(requestId string) *HttpsHealthChecksInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -29274,6 +30322,11 @@ func (c *HttpsHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operati // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/httpsHealthChecks", @@ -29566,6 +30619,25 @@ func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *HttpsHealthChecksPatchCall) RequestId(requestId string) *HttpsHealthChecksPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -29674,6 +30746,11 @@ func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", @@ -29685,8 +30762,7 @@ func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -29714,6 +30790,25 @@ func (r *HttpsHealthChecksService) Update(project string, httpsHealthCheck strin return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *HttpsHealthChecksUpdateCall) RequestId(requestId string) *HttpsHealthChecksUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -29822,6 +30917,11 @@ func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operati // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", @@ -29859,6 +30959,25 @@ func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ImagesDeleteCall) RequestId(requestId string) *ImagesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -29962,6 +31081,11 @@ func (c *ImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/images/{image}", @@ -30001,6 +31125,25 @@ func (r *ImagesService) Deprecate(project string, image string, deprecationstatu return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ImagesDeprecateCall) RequestId(requestId string) *ImagesDeprecateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -30109,6 +31252,11 @@ func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/images/{image}/deprecate", @@ -30459,6 +31607,25 @@ func (c *ImagesInsertCall) ForceCreate(forceCreate bool) *ImagesInsertCall { return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ImagesInsertCall) RequestId(requestId string) *ImagesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -30563,6 +31730,11 @@ func (c *ImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/images", @@ -31027,6 +32199,25 @@ func (r *InstanceGroupManagersService) AbandonInstances(project string, zone str return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *InstanceGroupManagersAbandonInstancesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -31137,6 +32328,11 @@ func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOpt // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone where the managed instance group is located.", // "location": "path", @@ -31436,6 +32632,25 @@ func (r *InstanceGroupManagersService) Delete(project string, zone string, insta return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersDeleteCall) RequestId(requestId string) *InstanceGroupManagersDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -31541,6 +32756,11 @@ func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Ope // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone where the managed instance group is located.", // "location": "path", @@ -31598,6 +32818,25 @@ func (r *InstanceGroupManagersService) DeleteInstances(project string, zone stri return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *InstanceGroupManagersDeleteInstancesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -31708,6 +32947,11 @@ func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOpti // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone where the managed instance group is located.", // "location": "path", @@ -31922,6 +33166,25 @@ func (r *InstanceGroupManagersService) Insert(project string, zone string, insta return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersInsertCall) RequestId(requestId string) *InstanceGroupManagersInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -32024,6 +33287,11 @@ func (c *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Ope // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone where you want to create the managed instance group.", // "location": "path", @@ -32541,6 +33809,25 @@ func (r *InstanceGroupManagersService) RecreateInstances(project string, zone st return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *InstanceGroupManagersRecreateInstancesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -32651,6 +33938,11 @@ func (c *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOp // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone where the managed instance group is located.", // "location": "path", @@ -32705,6 +33997,25 @@ func (r *InstanceGroupManagersService) Resize(project string, zone string, insta return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersResizeCall) RequestId(requestId string) *InstanceGroupManagersResizeCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -32811,6 +34122,11 @@ func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Ope // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "size": { // "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.", // "format": "int32", @@ -32862,6 +34178,25 @@ func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *InstanceGroupManagersSetInstanceTemplateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -32972,6 +34307,11 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.Call // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone where the managed instance group is located.", // "location": "path", @@ -33023,6 +34363,25 @@ func (r *InstanceGroupManagersService) SetTargetPools(project string, zone strin return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *InstanceGroupManagersSetTargetPoolsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -33133,6 +34492,11 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOptio // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone where the managed instance group is located.", // "location": "path", @@ -33180,6 +34544,25 @@ func (r *InstanceGroupsService) AddInstances(project string, zone string, instan return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupsAddInstancesCall) RequestId(requestId string) *InstanceGroupsAddInstancesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -33290,6 +34673,11 @@ func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Oper // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone where the instance group is located.", // "location": "path", @@ -33588,6 +34976,25 @@ func (r *InstanceGroupsService) Delete(project string, zone string, instanceGrou return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupsDeleteCall) RequestId(requestId string) *InstanceGroupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -33693,6 +35100,11 @@ func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone where the instance group is located.", // "location": "path", @@ -33895,6 +35307,25 @@ func (r *InstanceGroupsService) Insert(project string, zone string, instancegrou return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupsInsertCall) RequestId(requestId string) *InstanceGroupsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -33997,6 +35428,11 @@ func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone where you want to create the instance group.", // "location": "path", @@ -34576,6 +36012,25 @@ func (r *InstanceGroupsService) RemoveInstances(project string, zone string, ins return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupsRemoveInstancesCall) RequestId(requestId string) *InstanceGroupsRemoveInstancesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -34686,6 +36141,11 @@ func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*O // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone where the instance group is located.", // "location": "path", @@ -34731,6 +36191,25 @@ func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, insta return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupsSetNamedPortsCall) RequestId(requestId string) *InstanceGroupsSetNamedPortsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -34841,6 +36320,11 @@ func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Ope // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone where the instance group is located.", // "location": "path", @@ -34887,6 +36371,25 @@ func (r *InstanceTemplatesService) Delete(project string, instanceTemplate strin return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceTemplatesDeleteCall) RequestId(requestId string) *InstanceTemplatesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -34990,6 +36493,11 @@ func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/instanceTemplates/{instanceTemplate}", @@ -35181,6 +36689,25 @@ func (r *InstanceTemplatesService) Insert(project string, instancetemplate *Inst return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceTemplatesInsertCall) RequestId(requestId string) *InstanceTemplatesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -35280,6 +36807,11 @@ func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operati // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/instanceTemplates", @@ -35576,6 +37108,25 @@ func (r *InstancesService) AddAccessConfig(project string, zone string, instance return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesAddAccessConfigCall) RequestId(requestId string) *InstancesAddAccessConfigCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -35694,6 +37245,11 @@ func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operat // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -35996,6 +37552,25 @@ func (r *InstancesService) AttachDisk(project string, zone string, instance stri return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesAttachDiskCall) RequestId(requestId string) *InstancesAttachDiskCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -36107,6 +37682,11 @@ func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -36153,6 +37733,25 @@ func (r *InstancesService) Delete(project string, zone string, instance string) return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesDeleteCall) RequestId(requestId string) *InstancesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -36259,6 +37858,11 @@ func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -36304,6 +37908,25 @@ func (r *InstancesService) DeleteAccessConfig(project string, zone string, insta return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesDeleteAccessConfigCall) RequestId(requestId string) *InstancesDeleteAccessConfigCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -36424,6 +38047,11 @@ func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -36467,6 +38095,25 @@ func (r *InstancesService) DetachDisk(project string, zone string, instance stri return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesDetachDiskCall) RequestId(requestId string) *InstancesDetachDiskCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -36580,6 +38227,11 @@ func (c *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -36984,6 +38636,25 @@ func (r *InstancesService) Insert(project string, zone string, instance *Instanc return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesInsertCall) RequestId(requestId string) *InstancesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -37086,6 +38757,11 @@ func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -37396,6 +39072,25 @@ func (r *InstancesService) Reset(project string, zone string, instance string) * return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesResetCall) RequestId(requestId string) *InstancesResetCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -37502,6 +39197,11 @@ func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -37547,6 +39247,25 @@ func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instan return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesSetDiskAutoDeleteCall) RequestId(requestId string) *InstancesSetDiskAutoDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -37668,6 +39387,11 @@ func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Oper // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -37712,6 +39436,25 @@ func (r *InstancesService) SetLabels(project string, zone string, instance strin return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesSetLabelsCall) RequestId(requestId string) *InstancesSetLabelsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -37823,6 +39566,11 @@ func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -37870,6 +39618,25 @@ func (r *InstancesService) SetMachineResources(project string, zone string, inst return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesSetMachineResourcesCall) RequestId(requestId string) *InstancesSetMachineResourcesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -37981,6 +39748,11 @@ func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Op // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -38028,6 +39800,25 @@ func (r *InstancesService) SetMachineType(project string, zone string, instance return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesSetMachineTypeCall) RequestId(requestId string) *InstancesSetMachineTypeCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -38139,6 +39930,11 @@ func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operati // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -38187,6 +39983,25 @@ func (r *InstancesService) SetMetadata(project string, zone string, instance str return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesSetMetadataCall) RequestId(requestId string) *InstancesSetMetadataCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -38298,6 +40113,11 @@ func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -38345,6 +40165,25 @@ func (r *InstancesService) SetScheduling(project string, zone string, instance s return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesSetSchedulingCall) RequestId(requestId string) *InstancesSetSchedulingCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -38456,6 +40295,11 @@ func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operatio // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -38504,6 +40348,25 @@ func (r *InstancesService) SetServiceAccount(project string, zone string, instan return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesSetServiceAccountCall) RequestId(requestId string) *InstancesSetServiceAccountCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -38615,6 +40478,11 @@ func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Oper // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -38663,6 +40531,25 @@ func (r *InstancesService) SetTags(project string, zone string, instance string, return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesSetTagsCall) RequestId(requestId string) *InstancesSetTagsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -38774,6 +40661,11 @@ func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, err // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -38821,6 +40713,25 @@ func (r *InstancesService) Start(project string, zone string, instance string) * return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesStartCall) RequestId(requestId string) *InstancesStartCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -38927,6 +40838,11 @@ func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -38972,6 +40888,25 @@ func (r *InstancesService) StartWithEncryptionKey(project string, zone string, i return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesStartWithEncryptionKeyCall) RequestId(requestId string) *InstancesStartWithEncryptionKeyCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -39083,6 +41018,11 @@ func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) ( // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -39134,6 +41074,25 @@ func (r *InstancesService) Stop(project string, zone string, instance string) *I return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesStopCall) RequestId(requestId string) *InstancesStopCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -39240,6 +41199,11 @@ func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -40113,6 +42077,25 @@ func (r *NetworksService) AddPeering(project string, network string, networksadd return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NetworksAddPeeringCall) RequestId(requestId string) *NetworksAddPeeringCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -40221,6 +42204,11 @@ func (c *NetworksAddPeeringCall) Do(opts ...googleapi.CallOption) (*Operation, e // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/networks/{network}/addPeering", @@ -40258,6 +42246,25 @@ func (r *NetworksService) Delete(project string, network string) *NetworksDelete return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NetworksDeleteCall) RequestId(requestId string) *NetworksDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -40361,6 +42368,11 @@ func (c *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/networks/{network}", @@ -40549,6 +42561,25 @@ func (r *NetworksService) Insert(project string, network *Network) *NetworksInse return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NetworksInsertCall) RequestId(requestId string) *NetworksInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -40648,6 +42679,11 @@ func (c *NetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/networks", @@ -40939,6 +42975,25 @@ func (r *NetworksService) RemovePeering(project string, network string, networks return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NetworksRemovePeeringCall) RequestId(requestId string) *NetworksRemovePeeringCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -41047,6 +43102,11 @@ func (c *NetworksRemovePeeringCall) Do(opts ...googleapi.CallOption) (*Operation // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/networks/{network}/removePeering", @@ -41084,6 +43144,25 @@ func (r *NetworksService) SwitchToCustomMode(project string, network string) *Ne return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NetworksSwitchToCustomModeCall) RequestId(requestId string) *NetworksSwitchToCustomModeCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -41187,6 +43266,11 @@ func (c *NetworksSwitchToCustomModeCall) Do(opts ...googleapi.CallOption) (*Oper // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/networks/{network}/switchToCustomMode", @@ -41218,6 +43302,25 @@ func (r *ProjectsService) DisableXpnHost(project string) *ProjectsDisableXpnHost return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsDisableXpnHostCall) RequestId(requestId string) *ProjectsDisableXpnHostCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -41312,6 +43415,11 @@ func (c *ProjectsDisableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operatio // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/disableXpnHost", @@ -41346,6 +43454,25 @@ func (r *ProjectsService) DisableXpnResource(project string, projectsdisablexpnr return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsDisableXpnResourceCall) RequestId(requestId string) *ProjectsDisableXpnResourceCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -41445,6 +43572,11 @@ func (c *ProjectsDisableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Oper // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/disableXpnResource", @@ -41479,6 +43611,25 @@ func (r *ProjectsService) EnableXpnHost(project string) *ProjectsEnableXpnHostCa return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsEnableXpnHostCall) RequestId(requestId string) *ProjectsEnableXpnHostCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -41573,6 +43724,11 @@ func (c *ProjectsEnableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/enableXpnHost", @@ -41608,6 +43764,25 @@ func (r *ProjectsService) EnableXpnResource(project string, projectsenablexpnres return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsEnableXpnResourceCall) RequestId(requestId string) *ProjectsEnableXpnResourceCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -41707,6 +43882,11 @@ func (c *ProjectsEnableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Opera // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/enableXpnResource", @@ -42428,6 +44608,25 @@ func (r *ProjectsService) MoveDisk(project string, diskmoverequest *DiskMoveRequ return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsMoveDiskCall) RequestId(requestId string) *ProjectsMoveDiskCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -42527,6 +44726,11 @@ func (c *ProjectsMoveDiskCall) Do(opts ...googleapi.CallOption) (*Operation, err // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/moveDisk", @@ -42564,6 +44768,25 @@ func (r *ProjectsService) MoveInstance(project string, instancemoverequest *Inst return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsMoveInstanceCall) RequestId(requestId string) *ProjectsMoveInstanceCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -42663,6 +44886,11 @@ func (c *ProjectsMoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/moveInstance", @@ -42701,6 +44929,25 @@ func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Me return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsSetCommonInstanceMetadataCall) RequestId(requestId string) *ProjectsSetCommonInstanceMetadataCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -42800,6 +45047,11 @@ func (c *ProjectsSetCommonInstanceMetadataCall) Do(opts ...googleapi.CallOption) // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/setCommonInstanceMetadata", @@ -42840,6 +45092,25 @@ func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocati return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsSetUsageExportBucketCall) RequestId(requestId string) *ProjectsSetUsageExportBucketCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -42939,6 +45210,11 @@ func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Op // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/setUsageExportBucket", @@ -42980,6 +45256,25 @@ func (r *RegionAutoscalersService) Delete(project string, region string, autosca return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionAutoscalersDeleteCall) RequestId(requestId string) *RegionAutoscalersDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -43092,6 +45387,11 @@ func (c *RegionAutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/autoscalers/{autoscaler}", @@ -43290,6 +45590,25 @@ func (r *RegionAutoscalersService) Insert(project string, region string, autosca return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionAutoscalersInsertCall) RequestId(requestId string) *RegionAutoscalersInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -43398,6 +45717,11 @@ func (c *RegionAutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operati // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/autoscalers", @@ -43708,6 +46032,25 @@ func (c *RegionAutoscalersPatchCall) Autoscaler(autoscaler string) *RegionAutosc return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionAutoscalersPatchCall) RequestId(requestId string) *RegionAutoscalersPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -43822,6 +46165,11 @@ func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/autoscalers", @@ -43833,8 +46181,7 @@ func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -43869,6 +46216,25 @@ func (c *RegionAutoscalersUpdateCall) Autoscaler(autoscaler string) *RegionAutos return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionAutoscalersUpdateCall) RequestId(requestId string) *RegionAutoscalersUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -43983,6 +46349,11 @@ func (c *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operati // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/autoscalers", @@ -44021,6 +46392,25 @@ func (r *RegionBackendServicesService) Delete(project string, region string, bac return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionBackendServicesDeleteCall) RequestId(requestId string) *RegionBackendServicesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -44133,6 +46523,11 @@ func (c *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/backendServices/{backendService}", @@ -44492,6 +46887,25 @@ func (r *RegionBackendServicesService) Insert(project string, region string, bac return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionBackendServicesInsertCall) RequestId(requestId string) *RegionBackendServicesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -44600,6 +47014,11 @@ func (c *RegionBackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Ope // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/backendServices", @@ -44908,6 +47327,25 @@ func (r *RegionBackendServicesService) Patch(project string, region string, back return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionBackendServicesPatchCall) RequestId(requestId string) *RegionBackendServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -45025,6 +47463,11 @@ func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Oper // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/backendServices/{backendService}", @@ -45036,8 +47479,7 @@ func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Oper // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -45069,6 +47511,25 @@ func (r *RegionBackendServicesService) Update(project string, region string, bac return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBackendServicesUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -45186,6 +47647,11 @@ func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Ope // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/backendServices/{backendService}", @@ -45639,6 +48105,25 @@ func (r *RegionCommitmentsService) Insert(project string, region string, commitm return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionCommitmentsInsertCall) RequestId(requestId string) *RegionCommitmentsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -45747,6 +48232,11 @@ func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operati // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/commitments", @@ -46066,6 +48556,25 @@ func (r *RegionInstanceGroupManagersService) AbandonInstances(project string, re return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersAbandonInstancesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -46181,6 +48690,11 @@ func (c *RegionInstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.C // "location": "path", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", @@ -46220,6 +48734,25 @@ func (r *RegionInstanceGroupManagersService) Delete(project string, region strin return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceGroupManagersDeleteCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -46330,6 +48863,11 @@ func (c *RegionInstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) // "location": "path", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", @@ -46382,6 +48920,25 @@ func (r *RegionInstanceGroupManagersService) DeleteInstances(project string, reg return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteInstancesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -46497,6 +49054,11 @@ func (c *RegionInstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.Ca // "location": "path", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", @@ -46704,6 +49266,25 @@ func (r *RegionInstanceGroupManagersService) Insert(project string, region strin return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceGroupManagersInsertCall) RequestId(requestId string) *RegionInstanceGroupManagersInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -46811,6 +49392,11 @@ func (c *RegionInstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) // "location": "path", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/instanceGroupManagers", @@ -47321,6 +49907,25 @@ func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, r return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersRecreateInstancesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -47436,6 +50041,11 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi. // "location": "path", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", @@ -47486,6 +50096,25 @@ func (r *RegionInstanceGroupManagersService) Resize(project string, region strin return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceGroupManagersResizeCall) RequestId(requestId string) *RegionInstanceGroupManagersResizeCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -47598,6 +50227,11 @@ func (c *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "size": { // "description": "Number of instances that should exist in this instance group manager.", // "format": "int32", @@ -47644,6 +50278,25 @@ func (r *RegionInstanceGroupManagersService) SetInstanceTemplate(project string, return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *RegionInstanceGroupManagersSetInstanceTemplateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -47759,6 +50412,11 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleap // "location": "path", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", @@ -47801,6 +50459,25 @@ func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, regi return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *RegionInstanceGroupManagersSetTargetPoolsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -47916,6 +50593,11 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.Cal // "location": "path", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", @@ -48650,6 +51332,25 @@ func (r *RegionInstanceGroupsService) SetNamedPorts(project string, region strin return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceGroupsSetNamedPortsCall) RequestId(requestId string) *RegionInstanceGroupsSetNamedPortsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -48765,6 +51466,11 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) // "location": "path", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts", @@ -50007,6 +52713,25 @@ func (r *RoutersService) Delete(project string, region string, router string) *R return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RoutersDeleteCall) RequestId(requestId string) *RoutersDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -50113,6 +52838,11 @@ func (c *RoutersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "router": { // "description": "Name of the Router resource to delete.", // "location": "path", @@ -50481,6 +53211,25 @@ func (r *RoutersService) Insert(project string, region string, router *Router) * return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RoutersInsertCall) RequestId(requestId string) *RoutersInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -50589,6 +53338,11 @@ func (c *RoutersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/routers", @@ -50894,6 +53648,25 @@ func (r *RoutersService) Patch(project string, region string, router string, rou return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RoutersPatchCall) RequestId(requestId string) *RoutersPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -51005,6 +53778,11 @@ func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "router": { // "description": "Name of the Router resource to patch.", // "location": "path", @@ -51022,8 +53800,7 @@ func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -51213,6 +53990,25 @@ func (r *RoutersService) Update(project string, region string, router string, ro return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RoutersUpdateCall) RequestId(requestId string) *RoutersUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -51324,6 +54120,11 @@ func (c *RoutersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "router": { // "description": "Name of the Router resource to update.", // "location": "path", @@ -51367,6 +54168,25 @@ func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall { return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RoutesDeleteCall) RequestId(requestId string) *RoutesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -51464,6 +54284,11 @@ func (c *RoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "route": { // "description": "Name of the Route resource to delete.", // "location": "path", @@ -51658,6 +54483,25 @@ func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall { return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RoutesInsertCall) RequestId(requestId string) *RoutesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -51757,6 +54601,11 @@ func (c *RoutesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/routes", @@ -52053,6 +54902,25 @@ func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDel return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *SnapshotsDeleteCall) RequestId(requestId string) *SnapshotsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -52150,6 +55018,11 @@ func (c *SnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "snapshot": { // "description": "Name of the Snapshot resource to delete.", // "location": "path", @@ -52742,6 +55615,25 @@ func (r *SslCertificatesService) Delete(project string, sslCertificate string) * return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *SslCertificatesDeleteCall) RequestId(requestId string) *SslCertificatesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -52839,6 +55731,11 @@ func (c *SslCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "sslCertificate": { // "description": "Name of the SslCertificate resource to delete.", // "location": "path", @@ -53031,6 +55928,25 @@ func (r *SslCertificatesService) Insert(project string, sslcertificate *SslCerti return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *SslCertificatesInsertCall) RequestId(requestId string) *SslCertificatesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -53130,6 +56046,11 @@ func (c *SslCertificatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/sslCertificates", @@ -53671,6 +56592,25 @@ func (r *SubnetworksService) Delete(project string, region string, subnetwork st return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *SubnetworksDeleteCall) RequestId(requestId string) *SubnetworksDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -53777,6 +56717,11 @@ func (c *SubnetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "subnetwork": { // "description": "Name of the Subnetwork resource to delete.", // "location": "path", @@ -53821,6 +56766,25 @@ func (r *SubnetworksService) ExpandIpCidrRange(project string, region string, su return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *SubnetworksExpandIpCidrRangeCall) RequestId(requestId string) *SubnetworksExpandIpCidrRangeCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -53932,6 +56896,11 @@ func (c *SubnetworksExpandIpCidrRangeCall) Do(opts ...googleapi.CallOption) (*Op // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "subnetwork": { // "description": "Name of the Subnetwork resource to update.", // "location": "path", @@ -54140,6 +57109,25 @@ func (r *SubnetworksService) Insert(project string, region string, subnetwork *S return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *SubnetworksInsertCall) RequestId(requestId string) *SubnetworksInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -54248,6 +57236,11 @@ func (c *SubnetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/subnetworks", @@ -54553,6 +57546,25 @@ func (r *SubnetworksService) SetPrivateIpGoogleAccess(project string, region str return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *SubnetworksSetPrivateIpGoogleAccessCall) RequestId(requestId string) *SubnetworksSetPrivateIpGoogleAccessCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -54664,6 +57676,11 @@ func (c *SubnetworksSetPrivateIpGoogleAccessCall) Do(opts ...googleapi.CallOptio // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "subnetwork": { // "description": "Name of the Subnetwork resource.", // "location": "path", @@ -54707,6 +57724,25 @@ func (r *TargetHttpProxiesService) Delete(project string, targetHttpProxy string return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetHttpProxiesDeleteCall) RequestId(requestId string) *TargetHttpProxiesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -54804,6 +57840,11 @@ func (c *TargetHttpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetHttpProxy": { // "description": "Name of the TargetHttpProxy resource to delete.", // "location": "path", @@ -54998,6 +58039,25 @@ func (r *TargetHttpProxiesService) Insert(project string, targethttpproxy *Targe return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetHttpProxiesInsertCall) RequestId(requestId string) *TargetHttpProxiesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -55097,6 +58157,11 @@ func (c *TargetHttpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operati // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/targetHttpProxies", @@ -55389,6 +58454,25 @@ func (r *TargetHttpProxiesService) SetUrlMap(project string, targetHttpProxy str return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetHttpProxiesSetUrlMapCall) RequestId(requestId string) *TargetHttpProxiesSetUrlMapCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -55491,6 +58575,11 @@ func (c *TargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Oper // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetHttpProxy": { // "description": "Name of the TargetHttpProxy to set a URL map for.", // "location": "path", @@ -55533,6 +58622,25 @@ func (r *TargetHttpsProxiesService) Delete(project string, targetHttpsProxy stri return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetHttpsProxiesDeleteCall) RequestId(requestId string) *TargetHttpsProxiesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -55630,6 +58738,11 @@ func (c *TargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operat // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetHttpsProxy": { // "description": "Name of the TargetHttpsProxy resource to delete.", // "location": "path", @@ -55822,6 +58935,25 @@ func (r *TargetHttpsProxiesService) Insert(project string, targethttpsproxy *Tar return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetHttpsProxiesInsertCall) RequestId(requestId string) *TargetHttpsProxiesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -55921,6 +59053,11 @@ func (c *TargetHttpsProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operat // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/targetHttpsProxies", @@ -56211,6 +59348,25 @@ func (r *TargetHttpsProxiesService) SetSslCertificates(project string, targetHtt return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetHttpsProxiesSetSslCertificatesCall) RequestId(requestId string) *TargetHttpsProxiesSetSslCertificatesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -56313,6 +59469,11 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOpti // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetHttpsProxy": { // "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", // "location": "path", @@ -56357,6 +59518,25 @@ func (r *TargetHttpsProxiesService) SetUrlMap(project string, targetHttpsProxy s return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetHttpsProxiesSetUrlMapCall) RequestId(requestId string) *TargetHttpsProxiesSetUrlMapCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -56459,6 +59639,11 @@ func (c *TargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Ope // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetHttpsProxy": { // "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.", // "location": "path", @@ -56756,6 +59941,25 @@ func (r *TargetInstancesService) Delete(project string, zone string, targetInsta return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetInstancesDeleteCall) RequestId(requestId string) *TargetInstancesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -56855,6 +60059,11 @@ func (c *TargetInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetInstance": { // "description": "Name of the TargetInstance resource to delete.", // "location": "path", @@ -57069,6 +60278,25 @@ func (r *TargetInstancesService) Insert(project string, zone string, targetinsta return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetInstancesInsertCall) RequestId(requestId string) *TargetInstancesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -57171,6 +60399,11 @@ func (c *TargetInstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "zone": { // "description": "Name of the zone scoping this request.", // "location": "path", @@ -57482,6 +60715,25 @@ func (r *TargetPoolsService) AddHealthCheck(project string, region string, targe return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetPoolsAddHealthCheckCall) RequestId(requestId string) *TargetPoolsAddHealthCheckCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -57593,6 +60845,11 @@ func (c *TargetPoolsAddHealthCheckCall) Do(opts ...googleapi.CallOption) (*Opera // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetPool": { // "description": "Name of the target pool to add a health check to.", // "location": "path", @@ -57640,6 +60897,25 @@ func (r *TargetPoolsService) AddInstance(project string, region string, targetPo return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetPoolsAddInstanceCall) RequestId(requestId string) *TargetPoolsAddInstanceCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -57751,6 +61027,11 @@ func (c *TargetPoolsAddInstanceCall) Do(opts ...googleapi.CallOption) (*Operatio // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetPool": { // "description": "Name of the TargetPool resource to add instances to.", // "location": "path", @@ -58048,6 +61329,25 @@ func (r *TargetPoolsService) Delete(project string, region string, targetPool st return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetPoolsDeleteCall) RequestId(requestId string) *TargetPoolsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -58154,6 +61454,11 @@ func (c *TargetPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetPool": { // "description": "Name of the TargetPool resource to delete.", // "location": "path", @@ -58521,6 +61826,25 @@ func (r *TargetPoolsService) Insert(project string, region string, targetpool *T return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetPoolsInsertCall) RequestId(requestId string) *TargetPoolsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -58629,6 +61953,11 @@ func (c *TargetPoolsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/targetPools", @@ -58934,6 +62263,25 @@ func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, ta return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetPoolsRemoveHealthCheckCall) RequestId(requestId string) *TargetPoolsRemoveHealthCheckCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -59045,6 +62393,11 @@ func (c *TargetPoolsRemoveHealthCheckCall) Do(opts ...googleapi.CallOption) (*Op // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetPool": { // "description": "Name of the target pool to remove health checks from.", // "location": "path", @@ -59092,6 +62445,25 @@ func (r *TargetPoolsService) RemoveInstance(project string, region string, targe return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetPoolsRemoveInstanceCall) RequestId(requestId string) *TargetPoolsRemoveInstanceCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -59203,6 +62575,11 @@ func (c *TargetPoolsRemoveInstanceCall) Do(opts ...googleapi.CallOption) (*Opera // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetPool": { // "description": "Name of the TargetPool resource to remove instances from.", // "location": "path", @@ -59257,6 +62634,25 @@ func (c *TargetPoolsSetBackupCall) FailoverRatio(failoverRatio float64) *TargetP return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetPoolsSetBackupCall) RequestId(requestId string) *TargetPoolsSetBackupCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -59374,6 +62770,11 @@ func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetPool": { // "description": "Name of the TargetPool resource to set a backup pool for.", // "location": "path", @@ -59416,6 +62817,25 @@ func (r *TargetSslProxiesService) Delete(project string, targetSslProxy string) return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetSslProxiesDeleteCall) RequestId(requestId string) *TargetSslProxiesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -59513,6 +62933,11 @@ func (c *TargetSslProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetSslProxy": { // "description": "Name of the TargetSslProxy resource to delete.", // "location": "path", @@ -59705,6 +63130,25 @@ func (r *TargetSslProxiesService) Insert(project string, targetsslproxy *TargetS return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetSslProxiesInsertCall) RequestId(requestId string) *TargetSslProxiesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -59804,6 +63248,11 @@ func (c *TargetSslProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/targetSslProxies", @@ -60094,6 +63543,25 @@ func (r *TargetSslProxiesService) SetBackendService(project string, targetSslPro return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetSslProxiesSetBackendServiceCall) RequestId(requestId string) *TargetSslProxiesSetBackendServiceCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -60196,6 +63664,11 @@ func (c *TargetSslProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetSslProxy": { // "description": "Name of the TargetSslProxy resource whose BackendService resource is to be set.", // "location": "path", @@ -60240,6 +63713,25 @@ func (r *TargetSslProxiesService) SetProxyHeader(project string, targetSslProxy return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetSslProxiesSetProxyHeaderCall) RequestId(requestId string) *TargetSslProxiesSetProxyHeaderCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -60342,6 +63834,11 @@ func (c *TargetSslProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (* // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetSslProxy": { // "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.", // "location": "path", @@ -60386,6 +63883,25 @@ func (r *TargetSslProxiesService) SetSslCertificates(project string, targetSslPr return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetSslProxiesSetSslCertificatesCall) RequestId(requestId string) *TargetSslProxiesSetSslCertificatesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -60488,6 +64004,11 @@ func (c *TargetSslProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetSslProxy": { // "description": "Name of the TargetSslProxy resource whose SslCertificate resource is to be set.", // "location": "path", @@ -60530,6 +64051,25 @@ func (r *TargetTcpProxiesService) Delete(project string, targetTcpProxy string) return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetTcpProxiesDeleteCall) RequestId(requestId string) *TargetTcpProxiesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -60627,6 +64167,11 @@ func (c *TargetTcpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetTcpProxy": { // "description": "Name of the TargetTcpProxy resource to delete.", // "location": "path", @@ -60819,6 +64364,25 @@ func (r *TargetTcpProxiesService) Insert(project string, targettcpproxy *TargetT return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetTcpProxiesInsertCall) RequestId(requestId string) *TargetTcpProxiesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -60918,6 +64482,11 @@ func (c *TargetTcpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/targetTcpProxies", @@ -61208,6 +64777,25 @@ func (r *TargetTcpProxiesService) SetBackendService(project string, targetTcpPro return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetTcpProxiesSetBackendServiceCall) RequestId(requestId string) *TargetTcpProxiesSetBackendServiceCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -61310,6 +64898,11 @@ func (c *TargetTcpProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetTcpProxy": { // "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.", // "location": "path", @@ -61354,6 +64947,25 @@ func (r *TargetTcpProxiesService) SetProxyHeader(project string, targetTcpProxy return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetTcpProxiesSetProxyHeaderCall) RequestId(requestId string) *TargetTcpProxiesSetProxyHeaderCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -61456,6 +65068,11 @@ func (c *TargetTcpProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (* // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetTcpProxy": { // "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", // "location": "path", @@ -61751,6 +65368,25 @@ func (r *TargetVpnGatewaysService) Delete(project string, region string, targetV return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetVpnGatewaysDeleteCall) RequestId(requestId string) *TargetVpnGatewaysDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -61857,6 +65493,11 @@ func (c *TargetVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "targetVpnGateway": { // "description": "Name of the target VPN gateway to delete.", // "location": "path", @@ -62062,6 +65703,25 @@ func (r *TargetVpnGatewaysService) Insert(project string, region string, targetv return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *TargetVpnGatewaysInsertCall) RequestId(requestId string) *TargetVpnGatewaysInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -62170,6 +65830,11 @@ func (c *TargetVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operati // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/targetVpnGateways", @@ -62470,6 +66135,25 @@ func (r *UrlMapsService) Delete(project string, urlMap string) *UrlMapsDeleteCal return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *UrlMapsDeleteCall) RequestId(requestId string) *UrlMapsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -62567,6 +66251,11 @@ func (c *UrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "urlMap": { // "description": "Name of the UrlMap resource to delete.", // "location": "path", @@ -62761,6 +66450,25 @@ func (r *UrlMapsService) Insert(project string, urlmap *UrlMap) *UrlMapsInsertCa return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *UrlMapsInsertCall) RequestId(requestId string) *UrlMapsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -62860,6 +66568,11 @@ func (c *UrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/global/urlMaps", @@ -62899,6 +66612,25 @@ func (r *UrlMapsService) InvalidateCache(project string, urlMap string, cacheinv return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *UrlMapsInvalidateCacheCall) RequestId(requestId string) *UrlMapsInvalidateCacheCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -63001,6 +66733,11 @@ func (c *UrlMapsInvalidateCacheCall) Do(opts ...googleapi.CallOption) (*Operatio // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "urlMap": { // "description": "Name of the UrlMap scoping this request.", // "location": "path", @@ -63301,6 +67038,25 @@ func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *U return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *UrlMapsPatchCall) RequestId(requestId string) *UrlMapsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -63403,6 +67159,11 @@ func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "urlMap": { // "description": "Name of the UrlMap resource to patch.", // "location": "path", @@ -63420,8 +67181,7 @@ func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -63450,6 +67210,25 @@ func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) * return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *UrlMapsUpdateCall) RequestId(requestId string) *UrlMapsUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -63552,6 +67331,11 @@ func (c *UrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "urlMap": { // "description": "Name of the UrlMap resource to update.", // "location": "path", @@ -63996,6 +67780,25 @@ func (r *VpnTunnelsService) Delete(project string, region string, vpnTunnel stri return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *VpnTunnelsDeleteCall) RequestId(requestId string) *VpnTunnelsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -64102,6 +67905,11 @@ func (c *VpnTunnelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, err // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" + // }, // "vpnTunnel": { // "description": "Name of the VpnTunnel resource to delete.", // "location": "path", @@ -64307,6 +68115,25 @@ func (r *VpnTunnelsService) Insert(project string, region string, vpntunnel *Vpn return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *VpnTunnelsInsertCall) RequestId(requestId string) *VpnTunnelsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -64415,6 +68242,11 @@ func (c *VpnTunnelsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, err // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\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" // } // }, // "path": "{project}/regions/{region}/vpnTunnels", 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 e9151bb69..ae56e52c0 100644 --- a/vendor/google.golang.org/api/container/v1/container-api.json +++ b/vendor/google.golang.org/api/container/v1/container-api.json @@ -1,1312 +1,320 @@ { - "basePath": "", - "ownerDomain": "google.com", - "name": "container", - "batchPath": "batch", - "revision": "20170720", - "documentationLink": "https://cloud.google.com/container-engine/", - "id": "container:v1", - "title": "Google Container Engine API", - "ownerName": "Google", - "discoveryVersion": "v1", - "resources": { - "projects": { - "resources": { - "zones": { - "methods": { - "getServerconfig": { - "flatPath": "v1/projects/{projectId}/zones/{zone}/serverconfig", - "path": "v1/projects/{projectId}/zones/{zone}/serverconfig", - "id": "container.projects.zones.getServerconfig", - "description": "Returns configuration info about the Container Engine service.", - "httpMethod": "GET", - "parameterOrder": [ - "projectId", - "zone" - ], - "response": { - "$ref": "ServerConfig" - }, - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "clusters": { - "methods": { - "locations": { - "request": { - "$ref": "SetLocationsRequest" - }, - "description": "Sets the locations of a specific cluster.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations", - "id": "container.projects.zones.clusters.locations" - }, - "update": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "PUT", - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "id": "container.projects.zones.clusters.update", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "description": "Updates the settings of a specific cluster.", - "request": { - "$ref": "UpdateClusterRequest" - } - }, - "monitoring": { - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", - "id": "container.projects.zones.clusters.monitoring", - "description": "Sets the monitoring service of a specific cluster.", - "request": { - "$ref": "SetMonitoringServiceRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "master": { - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", - "id": "container.projects.zones.clusters.master", - "description": "Updates the master of a specific cluster.", - "request": { - "$ref": "UpdateMasterRequest" - } - }, - "setMasterAuth": { - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", - "id": "container.projects.zones.clusters.setMasterAuth", - "request": { - "$ref": "SetMasterAuthRequest" - }, - "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password of a specific cluster.\nThis can be either via password generation or explicitly set the password.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true - } - } - }, - "logging": { - "request": { - "$ref": "SetLoggingServiceRequest" - }, - "description": "Sets the logging service of a specific cluster.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging", - "id": "container.projects.zones.clusters.logging", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging" - }, - "list": { - "response": { - "$ref": "ListClustersResponse" - }, - "parameterOrder": [ - "projectId", - "zone" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", - "id": "container.projects.zones.clusters.list", - "path": "v1/projects/{projectId}/zones/{zone}/clusters", - "description": "Lists all clusters owned by a project in either the specified zone or all\nzones." - }, - "create": { - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", - "path": "v1/projects/{projectId}/zones/{zone}/clusters", - "id": "container.projects.zones.clusters.create", - "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", - "request": { - "$ref": "CreateClusterRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "resourceLabels": { - "description": "Sets labels on a cluster.", - "request": { - "$ref": "SetLabelsRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "description": "The name of the cluster.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", - "id": "container.projects.zones.clusters.resourceLabels" - }, - "completeIpRotation": { - "request": { - "$ref": "CompleteIPRotationRequest" - }, - "description": "Completes master IP rotation.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "description": "The name of the cluster.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", - "id": "container.projects.zones.clusters.completeIpRotation", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation" - }, - "get": { - "description": "Gets the details of a specific cluster.", - "response": { - "$ref": "Cluster" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to retrieve.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "id": "container.projects.zones.clusters.get", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}" - }, - "legacyAbac": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "description": "The name of the cluster to update.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", - "id": "container.projects.zones.clusters.legacyAbac", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", - "description": "Enables or disables the ABAC authorization mechanism on a cluster.", - "request": { - "$ref": "SetLegacyAbacRequest" - } - }, - "setNetworkPolicy": { - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", - "id": "container.projects.zones.clusters.setNetworkPolicy", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", - "request": { - "$ref": "SetNetworkPolicyRequest" - }, - "description": "Enables/Disables Network Policy for a cluster.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster.", - "type": "string", - "required": true - } - } - }, - "startIpRotation": { - "request": { - "$ref": "StartIPRotationRequest" - }, - "description": "Start master IP rotation.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", - "id": "container.projects.zones.clusters.startIpRotation", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation" - }, - "addons": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", - "id": "container.projects.zones.clusters.addons", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", - "description": "Sets the addons of a specific cluster.", - "request": { - "$ref": "SetAddonsConfigRequest" - } - }, - "delete": { - "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to delete.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "id": "container.projects.zones.clusters.delete", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}" - } - }, - "resources": { - "nodePools": { - "methods": { - "list": { - "description": "Lists the node pools for a cluster.", - "httpMethod": "GET", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "ListNodePoolsResponse" - }, - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "id": "container.projects.zones.clusters.nodePools.list" - }, - "rollback": { - "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", - "request": { - "$ref": "RollbackNodePoolUpgradeRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "description": "The name of the cluster to rollback.", - "type": "string", - "required": true, - "location": "path" - }, - "nodePoolId": { - "description": "The name of the node pool to rollback.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", - "id": "container.projects.zones.clusters.nodePools.rollback" - }, - "create": { - "description": "Creates a node pool for a cluster.", - "request": { - "$ref": "CreateNodePoolRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "id": "container.projects.zones.clusters.nodePools.create", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools" - }, - "autoscaling": { - "request": { - "$ref": "SetNodePoolAutoscalingRequest" - }, - "description": "Sets the autoscaling settings of a specific node pool.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "nodePoolId": { - "description": "The name of the node pool to upgrade.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", - "id": "container.projects.zones.clusters.nodePools.autoscaling", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling" - }, - "get": { - "response": { - "$ref": "NodePool" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "description": "The name of the cluster.", - "type": "string", - "required": true, - "location": "path" - }, - "nodePoolId": { - "location": "path", - "description": "The name of the node pool.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "id": "container.projects.zones.clusters.nodePools.get", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "description": "Retrieves the node pool requested." - }, - "update": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true - }, - "nodePoolId": { - "location": "path", - "description": "The name of the node pool to upgrade.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", - "id": "container.projects.zones.clusters.nodePools.update", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", - "request": { - "$ref": "UpdateNodePoolRequest" - }, - "description": "Updates the version and/or image type of a specific node pool." - }, - "delete": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "nodePoolId": { - "description": "The name of the node pool to delete.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "id": "container.projects.zones.clusters.nodePools.delete", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "description": "Deletes a node pool from a cluster." - }, - "setManagement": { - "description": "Sets the NodeManagement options for a node pool.", - "request": { - "$ref": "SetNodePoolManagementRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "description": "The name of the cluster to update.", - "type": "string", - "required": true, - "location": "path" - }, - "nodePoolId": { - "description": "The name of the node pool to update.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", - "id": "container.projects.zones.clusters.nodePools.setManagement", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement" - }, - "setSize": { - "request": { - "$ref": "SetNodePoolSizeRequest" - }, - "description": "Sets the size of a specific node pool.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "nodePoolId": { - "location": "path", - "description": "The name of the node pool to update.", - "type": "string", - "required": true - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to update.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", - "id": "container.projects.zones.clusters.nodePools.setSize" - } - } - } - } - }, - "operations": { - "methods": { - "cancel": { - "description": "Cancels the specified operation.", - "request": { - "$ref": "CancelOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "projectId", - "zone", - "operationId" - ], - "httpMethod": "POST", - "parameters": { - "operationId": { - "description": "The server-assigned `name` of the operation.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", - "id": "container.projects.zones.operations.cancel", - "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel" - }, - "get": { - "description": "Gets the specified operation.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "operationId" - ], - "httpMethod": "GET", - "parameters": { - "operationId": { - "location": "path", - "description": "The server-assigned `name` of the operation.", - "type": "string", - "required": true - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}", - "id": "container.projects.zones.operations.get", - "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}" - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "projectId", - "zone" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for, or `-` for all zones.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/operations", - "path": "v1/projects/{projectId}/zones/{zone}/operations", - "id": "container.projects.zones.operations.list", - "description": "Lists all operations in a project in a specific zone or all zones." - } - } - } - } - } - } - } - }, - "parameters": { - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "alt": { - "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", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "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.", - "type": "string", - "location": "query" - }, - "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.", - "type": "string", - "location": "query" - } - }, "schemas": { + "CompleteIPRotationRequest": { + "description": "CompleteIPRotationRequest moves the cluster master back into single-IP mode.", + "type": "object", + "properties": {}, + "id": "CompleteIPRotationRequest" + }, + "StartIPRotationRequest": { + "description": "StartIPRotationRequest creates a new IP for the cluster and then performs\na node upgrade on each node pool to point to the new IP.", + "type": "object", + "properties": {}, + "id": "StartIPRotationRequest" + }, + "UpdateNodePoolRequest": { + "description": "UpdateNodePoolRequests update a node pool's image and/or version.", + "type": "object", + "properties": { + "imageType": { + "description": "The desired image type for the node pool.", + "type": "string" + }, + "nodeVersion": { + "description": "The Kubernetes version to change the nodes to (typically an\nupgrade). Use `-` to upgrade to the latest version supported by\nthe server.", + "type": "string" + } + }, + "id": "UpdateNodePoolRequest" + }, + "AcceleratorConfig": { + "description": "AcceleratorConfig represents a Hardware Accelerator request.", + "type": "object", + "properties": { + "acceleratorType": { + "description": "The accelerator type resource name. List of supported accelerators\n[here](/compute/docs/gpus/#Introduction)", + "type": "string" + }, + "acceleratorCount": { + "format": "int64", + "description": "The number of the accelerator cards exposed to an instance.", + "type": "string" + } + }, + "id": "AcceleratorConfig" + }, + "LegacyAbac": { + "description": "Configuration for the legacy Attribute Based Access Control authorization\nmode.", + "type": "object", + "properties": { + "enabled": { + "description": "Whether the ABAC authorizer is enabled for this cluster. When enabled,\nidentities in the system, including service accounts, nodes, and\ncontrollers, will have statically granted permissions beyond those\nprovided by the RBAC configuration or IAM.", + "type": "boolean" + } + }, + "id": "LegacyAbac" + }, + "SetAddonsConfigRequest": { + "description": "SetAddonsConfigRequest sets the addons associated with the cluster.", + "type": "object", + "properties": { + "addonsConfig": { + "description": "The desired configurations for the various addons available to run in the\ncluster.", + "$ref": "AddonsConfig" + } + }, + "id": "SetAddonsConfigRequest" + }, + "SetLabelsRequest": { + "description": "SetLabelsRequest sets the Google Cloud Platform labels on a Google Container\nEngine cluster, which will in turn set them for Google Compute Engine\nresources used by that cluster", + "type": "object", + "properties": { + "labelFingerprint": { + "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by\nContainer Engine and changes after every request to modify or update\nlabels. You must always provide an up-to-date fingerprint hash when\nupdating or changing labels. Make a \u003ccode\u003eget()\u003c/code\u003e request to the\nresource to get the latest fingerprint.", + "type": "string" + }, + "resourceLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The labels to set for that cluster.", + "type": "object" + } + }, + "id": "SetLabelsRequest" + }, + "NodePool": { + "description": "NodePool contains the name and configuration for a cluster's node pool.\nNode pools are a set of nodes (i.e. VM's), with a common configuration and\nspecification, under the control of the cluster master. They may have a set\nof Kubernetes labels applied to them, which may be used to reference them\nduring pod scheduling. They may also be resized up or down, to accommodate\nthe workload.", + "type": "object", + "properties": { + "status": { + "enumDescriptions": [ + "Not set.", + "The PROVISIONING state indicates the node pool is being created.", + "The RUNNING state indicates the node pool has been created\nand is fully usable.", + "The RUNNING_WITH_ERROR state indicates the node pool has been created\nand is partially usable. Some error state has occurred and some\nfunctionality may be impaired. Customer may need to reissue a request\nor trigger a new update.", + "The RECONCILING state indicates that some work is actively being done on\nthe node pool, such as upgrading node software. Details can\nbe found in the `statusMessage` field.", + "The STOPPING state indicates the node pool is being deleted.", + "The ERROR state indicates the node pool may be unusable. Details\ncan be found in the `statusMessage` field." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "PROVISIONING", + "RUNNING", + "RUNNING_WITH_ERROR", + "RECONCILING", + "STOPPING", + "ERROR" + ], + "description": "[Output only] The status of the nodes in this pool instance.", + "type": "string" + }, + "config": { + "$ref": "NodeConfig", + "description": "The node configuration of the pool." + }, + "statusMessage": { + "description": "[Output only] Additional information about the current status of this\nnode pool instance, if available.", + "type": "string" + }, + "name": { + "description": "The name of the node pool.", + "type": "string" + }, + "autoscaling": { + "$ref": "NodePoolAutoscaling", + "description": "Autoscaler configuration for this NodePool. Autoscaler is enabled\nonly if a valid configuration is present." + }, + "management": { + "$ref": "NodeManagement", + "description": "NodeManagement configuration for this NodePool." + }, + "initialNodeCount": { + "format": "int32", + "description": "The initial node count for the pool. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.", + "type": "integer" + }, + "selfLink": { + "description": "[Output only] Server-defined URL for the resource.", + "type": "string" + }, + "instanceGroupUrls": { + "description": "[Output only] The resource URLs of [instance\ngroups](/compute/docs/instance-groups/) associated with this\nnode pool.", + "items": { + "type": "string" + }, + "type": "array" + }, + "version": { + "description": "[Output only] The version of the Kubernetes of this node.", + "type": "string" + } + }, + "id": "NodePool" + }, + "NodeManagement": { + "description": "NodeManagement defines the set of node management services turned on for the\nnode pool.", + "type": "object", + "properties": { + "autoRepair": { + "description": "A flag that specifies whether the node auto-repair is enabled for the node\npool. If enabled, the nodes in this node pool will be monitored and, if\nthey fail health checks too many times, an automatic repair action will be\ntriggered.", + "type": "boolean" + }, + "autoUpgrade": { + "description": "A flag that specifies whether node auto-upgrade is enabled for the node\npool. If enabled, node auto-upgrade helps keep the nodes in your node pool\nup to date with the latest release version of Kubernetes.", + "type": "boolean" + }, + "upgradeOptions": { + "$ref": "AutoUpgradeOptions", + "description": "Specifies the Auto Upgrade knobs for the node pool." + } + }, + "id": "NodeManagement" + }, + "CancelOperationRequest": { + "description": "CancelOperationRequest cancels a single operation.", + "type": "object", + "properties": {}, + "id": "CancelOperationRequest" + }, + "KubernetesDashboard": { + "description": "Configuration for the Kubernetes Dashboard.", + "type": "object", + "properties": { + "disabled": { + "description": "Whether the Kubernetes Dashboard is enabled for this cluster.", + "type": "boolean" + } + }, + "id": "KubernetesDashboard" + }, + "SetLegacyAbacRequest": { + "description": "SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for\na cluster.", + "type": "object", + "properties": { + "enabled": { + "description": "Whether ABAC authorization will be enabled in the cluster.", + "type": "boolean" + } + }, + "id": "SetLegacyAbacRequest" + }, + "Operation": { + "description": "This operation resource represents operations that may have happened or are\nhappening on the cluster. All fields are output only.", + "type": "object", + "properties": { + "detail": { + "description": "Detailed operation progress, if available.", + "type": "string" + }, + "targetLink": { + "description": "Server-defined URL for the target of the operation.", + "type": "string" + }, + "endTime": { + "description": "[Output only] The time the operation completed, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" + }, + "operationType": { + "enumDescriptions": [ + "Not set.", + "Cluster create.", + "Cluster delete.", + "A master upgrade.", + "A node upgrade.", + "Cluster repair.", + "Cluster update.", + "Node pool create.", + "Node pool delete.", + "Set node pool management.", + "Automatic node pool repair.", + "Automatic node upgrade.", + "Set labels.", + "Set/generate master auth materials", + "Set node pool size.", + "Updates network policy for a cluster." + ], + "enum": [ + "TYPE_UNSPECIFIED", + "CREATE_CLUSTER", + "DELETE_CLUSTER", + "UPGRADE_MASTER", + "UPGRADE_NODES", + "REPAIR_CLUSTER", + "UPDATE_CLUSTER", + "CREATE_NODE_POOL", + "DELETE_NODE_POOL", + "SET_NODE_POOL_MANAGEMENT", + "AUTO_REPAIR_NODES", + "AUTO_UPGRADE_NODES", + "SET_LABELS", + "SET_MASTER_AUTH", + "SET_NODE_POOL_SIZE", + "SET_NETWORK_POLICY" + ], + "description": "The operation type.", + "type": "string" + }, + "startTime": { + "description": "[Output only] The time the operation started, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation\nis taking place.", + "type": "string" + }, + "status": { + "enumDescriptions": [ + "Not set.", + "The operation has been created.", + "The operation is currently running.", + "The operation is done, either cancelled or completed.", + "The operation is aborting." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "PENDING", + "RUNNING", + "DONE", + "ABORTING" + ], + "description": "The current status of the operation.", + "type": "string" + }, + "name": { + "description": "The server-assigned ID for the operation.", + "type": "string" + }, + "statusMessage": { + "description": "If an error has occurred, a textual description of the error.", + "type": "string" + }, + "selfLink": { + "description": "Server-defined URL for the resource.", + "type": "string" + } + }, + "id": "Operation" + }, + "AddonsConfig": { + "description": "Configuration for the addons that can be automatically spun up in the\ncluster, enabling additional functionality.", + "type": "object", + "properties": { + "horizontalPodAutoscaling": { + "description": "Configuration for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods.", + "$ref": "HorizontalPodAutoscaling" + }, + "httpLoadBalancing": { + "description": "Configuration for the HTTP (L7) load balancing controller addon, which\nmakes it easy to set up HTTP load balancers for services in a cluster.", + "$ref": "HttpLoadBalancing" + }, + "kubernetesDashboard": { + "description": "Configuration for the Kubernetes Dashboard.", + "$ref": "KubernetesDashboard" + } + }, + "id": "AddonsConfig" + }, "SetLocationsRequest": { "description": "SetLocationsRequest sets the locations of the cluster.", "type": "object", @@ -1388,107 +396,6 @@ "description": "A Google Container Engine cluster.", "type": "object", "properties": { - "description": { - "description": "An optional description of this cluster.", - "type": "string" - }, - "currentNodeCount": { - "format": "int32", - "description": "[Output only] The number of nodes currently in the cluster.", - "type": "integer" - }, - "monitoringService": { - "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* `monitoring.googleapis.com` - the Google Cloud Monitoring service.\n* `none` - no metrics will be exported from the cluster.\n* if left as an empty string, `monitoring.googleapis.com` will be used.", - "type": "string" - }, - "network": { - "description": "The name of the Google Compute Engine\n[network](/compute/docs/networks-and-firewalls#networks) to which the\ncluster is connected. If left unspecified, the `default` network\nwill be used.", - "type": "string" - }, - "labelFingerprint": { - "description": "The fingerprint of the set of labels for this cluster.", - "type": "string" - }, - "zone": { - "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string" - }, - "loggingService": { - "description": "The logging service the cluster should use to write logs.\nCurrently available options:\n\n* `logging.googleapis.com` - the Google Cloud Logging service.\n* `none` - no logs will be exported from the cluster.\n* if left as an empty string,`logging.googleapis.com` will be used.", - "type": "string" - }, - "nodeIpv4CidrSize": { - "format": "int32", - "description": "[Output only] The size of the address space on each node for hosting\ncontainers. This is provisioned from within the `container_ipv4_cidr`\nrange.", - "type": "integer" - }, - "expireTime": { - "description": "[Output only] The time the cluster will be automatically\ndeleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "type": "string" - }, - "masterAuthorizedNetworksConfig": { - "$ref": "MasterAuthorizedNetworksConfig", - "description": "Master authorized networks is a Beta feature.\nThe configuration options for master authorized networks feature." - }, - "statusMessage": { - "description": "[Output only] Additional information about the current status of this\ncluster, if available.", - "type": "string" - }, - "masterAuth": { - "$ref": "MasterAuth", - "description": "The authentication information for accessing the master endpoint." - }, - "currentMasterVersion": { - "description": "[Output only] The current software version of the master endpoint.", - "type": "string" - }, - "nodeConfig": { - "$ref": "NodeConfig", - "description": "Parameters used in creating the cluster's nodes.\nSee `nodeConfig` for the description of its properties.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"initial_node_count\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.\nFor responses, this field will be populated with the node configuration of\nthe first node pool.\n\nIf unspecified, the defaults are used." - }, - "addonsConfig": { - "description": "Configurations for the various addons available to run in the cluster.", - "$ref": "AddonsConfig" - }, - "status": { - "enumDescriptions": [ - "Not set.", - "The PROVISIONING state indicates the cluster is being created.", - "The RUNNING state indicates the cluster has been created and is fully\nusable.", - "The RECONCILING state indicates that some work is actively being done on\nthe cluster, such as upgrading the master or node software. Details can\nbe found in the `statusMessage` field.", - "The STOPPING state indicates the cluster is being deleted.", - "The ERROR state indicates the cluster may be unusable. Details\ncan be found in the `statusMessage` field." - ], - "enum": [ - "STATUS_UNSPECIFIED", - "PROVISIONING", - "RUNNING", - "RECONCILING", - "STOPPING", - "ERROR" - ], - "description": "[Output only] The current status of this cluster.", - "type": "string" - }, - "subnetwork": { - "description": "The name of the Google Compute Engine\n[subnetwork](/compute/docs/subnetworks) to which the\ncluster is connected.", - "type": "string" - }, - "currentNodeVersion": { - "description": "[Output only] The current version of the node software components.\nIf they are currently at multiple versions because they're in the process\nof being upgraded, this reflects the minimum version of all nodes.", - "type": "string" - }, - "resourceLabels": { - "description": "The resource labels for the cluster to use to annotate any related\nGoogle Compute Engine resources.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "name": { - "description": "The name of this cluster. The name must be unique within this project\nand zone, and can be up to 40 characters with the following restrictions:\n\n* Lowercase letters, numbers, and hyphens only.\n* Must start with a letter.\n* Must end with a number or a letter.", - "type": "string" - }, "initialClusterVersion": { "description": "The initial Kubernetes version for this cluster. Valid versions are those\nfound in validMasterVersions returned by getServerConfig. The version can\nbe upgraded over time; such upgrades are reflected in\ncurrentMasterVersion and currentNodeVersion.", "type": "string" @@ -1543,32 +450,122 @@ }, "type": "array" }, + "networkPolicy": { + "description": "Configuration options for the NetworkPolicy feature.", + "$ref": "NetworkPolicy" + }, "servicesIpv4Cidr": { "description": "[Output only] The IP address range of the Kubernetes services in\nthis cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `1.2.3.4/29`). Service addresses are\ntypically put in the last `/16` from the container CIDR.", "type": "string" }, - "networkPolicy": { - "$ref": "NetworkPolicy", - "description": "Configuration options for the NetworkPolicy feature." - }, "enableKubernetesAlpha": { "description": "Kubernetes alpha features are enabled on this cluster. This includes alpha\nAPI groups (e.g. v1alpha1) and features that may not be production ready in\nthe kubernetes version of the master and nodes.\nThe cluster has no SLA for uptime and master/node upgrades are disabled.\nAlpha enabled clusters are automatically deleted thirty days after\ncreation.", "type": "boolean" + }, + "description": { + "description": "An optional description of this cluster.", + "type": "string" + }, + "currentNodeCount": { + "format": "int32", + "description": "[Output only] The number of nodes currently in the cluster.", + "type": "integer" + }, + "monitoringService": { + "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* `monitoring.googleapis.com` - the Google Cloud Monitoring service.\n* `none` - no metrics will be exported from the cluster.\n* if left as an empty string, `monitoring.googleapis.com` will be used.", + "type": "string" + }, + "network": { + "description": "The name of the Google Compute Engine\n[network](/compute/docs/networks-and-firewalls#networks) to which the\ncluster is connected. If left unspecified, the `default` network\nwill be used.", + "type": "string" + }, + "labelFingerprint": { + "description": "The fingerprint of the set of labels for this cluster.", + "type": "string" + }, + "zone": { + "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string" + }, + "expireTime": { + "description": "[Output only] The time the cluster will be automatically\ndeleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" + }, + "nodeIpv4CidrSize": { + "format": "int32", + "description": "[Output only] The size of the address space on each node for hosting\ncontainers. This is provisioned from within the `container_ipv4_cidr`\nrange.", + "type": "integer" + }, + "loggingService": { + "description": "The logging service the cluster should use to write logs.\nCurrently available options:\n\n* `logging.googleapis.com` - the Google Cloud Logging service.\n* `none` - no logs will be exported from the cluster.\n* if left as an empty string,`logging.googleapis.com` will be used.", + "type": "string" + }, + "masterAuthorizedNetworksConfig": { + "$ref": "MasterAuthorizedNetworksConfig", + "description": "Master authorized networks is a Beta feature.\nThe configuration options for master authorized networks feature." + }, + "statusMessage": { + "description": "[Output only] Additional information about the current status of this\ncluster, if available.", + "type": "string" + }, + "masterAuth": { + "description": "The authentication information for accessing the master endpoint.", + "$ref": "MasterAuth" + }, + "currentMasterVersion": { + "description": "[Output only] The current software version of the master endpoint.", + "type": "string" + }, + "nodeConfig": { + "description": "Parameters used in creating the cluster's nodes.\nSee `nodeConfig` for the description of its properties.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"initial_node_count\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.\nFor responses, this field will be populated with the node configuration of\nthe first node pool.\n\nIf unspecified, the defaults are used.", + "$ref": "NodeConfig" + }, + "addonsConfig": { + "$ref": "AddonsConfig", + "description": "Configurations for the various addons available to run in the cluster." + }, + "status": { + "enumDescriptions": [ + "Not set.", + "The PROVISIONING state indicates the cluster is being created.", + "The RUNNING state indicates the cluster has been created and is fully\nusable.", + "The RECONCILING state indicates that some work is actively being done on\nthe cluster, such as upgrading the master or node software. Details can\nbe found in the `statusMessage` field.", + "The STOPPING state indicates the cluster is being deleted.", + "The ERROR state indicates the cluster may be unusable. Details\ncan be found in the `statusMessage` field." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "PROVISIONING", + "RUNNING", + "RECONCILING", + "STOPPING", + "ERROR" + ], + "description": "[Output only] The current status of this cluster.", + "type": "string" + }, + "subnetwork": { + "description": "The name of the Google Compute Engine\n[subnetwork](/compute/docs/subnetworks) to which the\ncluster is connected.", + "type": "string" + }, + "currentNodeVersion": { + "description": "[Output only] The current version of the node software components.\nIf they are currently at multiple versions because they're in the process\nof being upgraded, this reflects the minimum version of all nodes.", + "type": "string" + }, + "resourceLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The resource labels for the cluster to use to annotate any related\nGoogle Compute Engine resources.", + "type": "object" + }, + "name": { + "description": "The name of this cluster. The name must be unique within this project\nand zone, and can be up to 40 characters with the following restrictions:\n\n* Lowercase letters, numbers, and hyphens only.\n* Must start with a letter.\n* Must end with a number or a letter.", + "type": "string" } }, "id": "Cluster" }, - "CreateNodePoolRequest": { - "description": "CreateNodePoolRequest creates a node pool for a cluster.", - "type": "object", - "properties": { - "nodePool": { - "description": "The node pool to create.", - "$ref": "NodePool" - } - }, - "id": "CreateNodePoolRequest" - }, "ListOperationsResponse": { "description": "ListOperationsResponse is the result of ListOperationsRequest.", "type": "object", @@ -1590,6 +587,17 @@ }, "id": "ListOperationsResponse" }, + "CreateNodePoolRequest": { + "description": "CreateNodePoolRequest creates a node pool for a cluster.", + "type": "object", + "properties": { + "nodePool": { + "description": "The node pool to create.", + "$ref": "NodePool" + } + }, + "id": "CreateNodePoolRequest" + }, "SetMonitoringServiceRequest": { "description": "SetMonitoringServiceRequest sets the monitoring service of a cluster.", "type": "object", @@ -1652,41 +660,25 @@ }, "id": "ServerConfig" }, - "MasterAuth": { - "description": "The authentication information for accessing the master endpoint.\nAuthentication can be done using HTTP basic auth or using client\ncertificates.", - "type": "object", - "properties": { - "clientKey": { - "description": "[Output only] Base64-encoded private key used by clients to authenticate\nto the cluster endpoint.", - "type": "string" - }, - "clusterCaCertificate": { - "description": "[Output only] Base64-encoded public certificate that is the root of\ntrust for the cluster.", - "type": "string" - }, - "clientCertificate": { - "description": "[Output only] Base64-encoded public certificate used by clients to\nauthenticate to the cluster endpoint.", - "type": "string" - }, - "username": { - "description": "The username to use for HTTP basic authentication to the master endpoint.\nFor clusters v1.6.0 and later, you can disable basic authentication by\nproviding an empty username.", - "type": "string" - }, - "password": { - "description": "The password to use for HTTP basic authentication to the master endpoint.\nBecause the master endpoint is open to the Internet, you should create a\nstrong password. If a password is provided for cluster creation, username\nmust be non-empty.", - "type": "string" - }, - "clientCertificateConfig": { - "description": "Configuration for client certificate authentication on the cluster. If no\nconfiguration is specified, a client certificate is issued.", - "$ref": "ClientCertificateConfig" - } - }, - "id": "MasterAuth" - }, "NodeConfig": { "description": "Parameters that describe the nodes in a cluster.", "type": "object", "properties": { + "serviceAccount": { + "description": "The Google Cloud Platform Service Account to be used by the node VMs. If\nno Service Account is specified, the \"default\" service account is used.", + "type": "string" + }, + "accelerators": { + "description": "A list of hardware accelerators to be attached to each node.\nSee https://cloud.google.com/compute/docs/gpus for more information about\nsupport for GPUs.", + "items": { + "$ref": "AcceleratorConfig" + }, + "type": "array" + }, + "machineType": { + "description": "The name of a Google Compute Engine [machine\ntype](/compute/docs/machine-types) (e.g.\n`n1-standard-1`).\n\nIf unspecified, the default machine type is\n`n1-standard-1`.", + "type": "string" + }, "imageType": { "description": "The image type to use for this node. Note that for a given image type,\nthe latest version of it will be used.", "type": "string" @@ -1703,11 +695,11 @@ "type": "boolean" }, "labels": { - "description": "The map of Kubernetes labels (key/value pairs) to be applied to each node.\nThese will added in addition to any default label(s) that\nKubernetes may apply to the node.\nIn case of conflict in label keys, the applied set may differ depending on\nthe Kubernetes version -- it's best to assume the behavior is undefined\nand conflicts should be avoided.\nFor more information, including usage and the valid values, see:\nhttp://kubernetes.io/v1.1/docs/user-guide/labels.html", - "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "The map of Kubernetes labels (key/value pairs) to be applied to each node.\nThese will added in addition to any default label(s) that\nKubernetes may apply to the node.\nIn case of conflict in label keys, the applied set may differ depending on\nthe Kubernetes version -- it's best to assume the behavior is undefined\nand conflicts should be avoided.\nFor more information, including usage and the valid values, see:\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/", + "type": "object" }, "localSsdCount": { "format": "int32", @@ -1715,11 +707,11 @@ "type": "integer" }, "metadata": { - "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 four reserved keys:\n\"instance-template\", \"kube-env\", \"startup-script\", and \"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", "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 four reserved keys:\n\"instance-template\", \"kube-env\", \"startup-script\", and \"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" }, "diskSizeGb": { "format": "int32", @@ -1732,25 +724,41 @@ "type": "string" }, "type": "array" - }, - "serviceAccount": { - "description": "The Google Cloud Platform Service Account to be used by the node VMs. If\nno Service Account is specified, the \"default\" service account is used.", - "type": "string" - }, - "accelerators": { - "description": "A list of hardware accelerators to be attached to each node.\nSee https://cloud.google.com/compute/docs/gpus for more information about\nsupport for GPUs.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "machineType": { - "description": "The name of a Google Compute Engine [machine\ntype](/compute/docs/machine-types) (e.g.\n`n1-standard-1`).\n\nIf unspecified, the default machine type is\n`n1-standard-1`.", - "type": "string" } }, "id": "NodeConfig" }, + "MasterAuth": { + "description": "The authentication information for accessing the master endpoint.\nAuthentication can be done using HTTP basic auth or using client\ncertificates.", + "type": "object", + "properties": { + "password": { + "description": "The password to use for HTTP basic authentication to the master endpoint.\nBecause the master endpoint is open to the Internet, you should create a\nstrong password. If a password is provided for cluster creation, username\nmust be non-empty.", + "type": "string" + }, + "clientCertificateConfig": { + "description": "Configuration for client certificate authentication on the cluster. If no\nconfiguration is specified, a client certificate is issued.", + "$ref": "ClientCertificateConfig" + }, + "clientKey": { + "description": "[Output only] Base64-encoded private key used by clients to authenticate\nto the cluster endpoint.", + "type": "string" + }, + "clusterCaCertificate": { + "description": "[Output only] Base64-encoded public certificate that is the root of\ntrust for the cluster.", + "type": "string" + }, + "clientCertificate": { + "description": "[Output only] Base64-encoded public certificate used by clients to\nauthenticate to the cluster endpoint.", + "type": "string" + }, + "username": { + "description": "The username to use for HTTP basic authentication to the master endpoint.\nFor clusters v1.6.0 and later, you can disable basic authentication by\nproviding an empty username.", + "type": "string" + } + }, + "id": "MasterAuth" + }, "AutoUpgradeOptions": { "description": "AutoUpgradeOptions defines the set of options for the user to control how\nthe Auto Upgrades will proceed.", "type": "object", @@ -1798,53 +806,6 @@ }, "id": "HttpLoadBalancing" }, - "SetNetworkPolicyRequest": { - "description": "SetNetworkPolicyRequest enables/disables network policy for a cluster.", - "type": "object", - "properties": { - "networkPolicy": { - "description": "Configuration options for the NetworkPolicy feature.", - "$ref": "NetworkPolicy" - } - }, - "id": "SetNetworkPolicyRequest" - }, - "SetMasterAuthRequest": { - "description": "SetMasterAuthRequest updates the admin password of a cluster.", - "type": "object", - "properties": { - "update": { - "$ref": "MasterAuth", - "description": "A description of the update." - }, - "action": { - "description": "The exact form of action to be taken on the master auth", - "type": "string", - "enumDescriptions": [ - "Operation is unknown and will error out", - "Set the password to a user generated value.", - "Generate a new password and set it to that." - ], - "enum": [ - "UNKNOWN", - "SET_PASSWORD", - "GENERATE_PASSWORD" - ] - } - }, - "id": "SetMasterAuthRequest" - }, - "ClientCertificateConfig": { - "description": "Configuration for client certificates on the cluster.", - "type": "object", - "properties": { - "issueClientCertificate": { - "description": "Issue a client certificate.", - "type": "boolean" - } - }, - "id": "ClientCertificateConfig" - }, "NodePoolAutoscaling": { "description": "NodePoolAutoscaling contains information required by cluster autoscaler to\nadjust the size of the node pool to the current cluster usage.", "type": "object", @@ -1866,32 +827,99 @@ }, "id": "NodePoolAutoscaling" }, + "ClientCertificateConfig": { + "description": "Configuration for client certificates on the cluster.", + "type": "object", + "properties": { + "issueClientCertificate": { + "description": "Issue a client certificate.", + "type": "boolean" + } + }, + "id": "ClientCertificateConfig" + }, + "SetMasterAuthRequest": { + "description": "SetMasterAuthRequest updates the admin password of a cluster.", + "type": "object", + "properties": { + "update": { + "$ref": "MasterAuth", + "description": "A description of the update." + }, + "action": { + "enumDescriptions": [ + "Operation is unknown and will error out", + "Set the password to a user generated value.", + "Generate a new password and set it to that." + ], + "enum": [ + "UNKNOWN", + "SET_PASSWORD", + "GENERATE_PASSWORD" + ], + "description": "The exact form of action to be taken on the master auth", + "type": "string" + } + }, + "id": "SetMasterAuthRequest" + }, + "SetNetworkPolicyRequest": { + "description": "SetNetworkPolicyRequest enables/disables network policy for a cluster.", + "type": "object", + "properties": { + "networkPolicy": { + "$ref": "NetworkPolicy", + "description": "Configuration options for the NetworkPolicy feature." + } + }, + "id": "SetNetworkPolicyRequest" + }, "IPAllocationPolicy": { "description": "Configuration for controlling how IPs are allocated in the cluster.", "type": "object", "properties": { - "servicesIpv4Cidr": { - "description": "The IP address range of the services IPs in this cluster. If blank, a range\nwill be automatically chosen with the default size.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nSet to blank to have a range will be chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range be chosen with a specific\nnetmask.\n\nSet to a [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", + "servicesSecondaryRangeName": { + "description": "The name of the secondary range to be used as for the services\nCIDR block. The secondary range will be used for service\nClusterIPs. This must be an existing secondary range associated\nwith the cluster subnetwork.\n\nThis field is only applicable with use_ip_aliases is true and\ncreate_subnetwork is false.", "type": "string" }, + "useIpAliases": { + "description": "Whether alias IPs will be used for pod IPs in the cluster.", + "type": "boolean" + }, "createSubnetwork": { "description": "Whether a new subnetwork will be created automatically for the cluster.\n\nThis field is only applicable when `use_ip_aliases` is true.", "type": "boolean" }, - "useIpAliases": { - "description": "Whether alias IPs will be used for pod IPs in the cluster.", - "type": "boolean" + "servicesIpv4CidrBlock": { + "description": "The IP address range of the services IPs in this cluster. If blank, a range\nwill be automatically chosen with the default size.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", + "type": "string" }, "subnetworkName": { "description": "A custom subnetwork name to be used if `create_subnetwork` is true. If\nthis field is empty, then an automatic name will be chosen for the new\nsubnetwork.", "type": "string" }, "clusterIpv4Cidr": { - "description": "The IP address range for the cluster pod IPs. If this field is set, then\n`cluster.cluster_ipv4_cidr` must be left blank.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nSet to blank to have a range will be chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range be chosen with a specific\nnetmask.\n\nSet to a [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", + "description": "This field is deprecated, use cluster_ipv4_cidr_block.", "type": "string" }, "nodeIpv4Cidr": { - "description": "The IP address range of the instance IPs in this cluster.\n\nThis is applicable only if `create_subnetwork` is true.\n\nSet to blank to have a range will be chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range be chosen with a specific\nnetmask.\n\nSet to a [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", + "description": "This field is deprecated, use node_ipv4_cidr_block.", + "type": "string" + }, + "clusterIpv4CidrBlock": { + "description": "The IP address range for the cluster pod IPs. If this field is set, then\n`cluster.cluster_ipv4_cidr` must be left blank.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", + "type": "string" + }, + "clusterSecondaryRangeName": { + "description": "The name of the secondary range to be used for the cluster CIDR\nblock. The secondary range will be used for pod IP\naddresses. This must be an existing secondary range associated\nwith the cluster subnetwork.\n\nThis field is only applicable with use_ip_aliases is true and\ncreate_subnetwork is false.", + "type": "string" + }, + "nodeIpv4CidrBlock": { + "description": "The IP address range of the instance IPs in this cluster.\n\nThis is applicable only if `create_subnetwork` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", + "type": "string" + }, + "servicesIpv4Cidr": { + "description": "This field is deprecated, use services_ipv4_cidr_block.", "type": "string" } }, @@ -1901,14 +929,6 @@ "description": "ClusterUpdate describes an update to the cluster. Exactly one update can\nbe applied to a cluster with each request, so at most one field can be\nprovided.", "type": "object", "properties": { - "desiredNodePoolId": { - "description": "The node pool to be upgraded. This field is mandatory if\n\"desired_node_version\", \"desired_image_family\" or\n\"desired_node_pool_autoscaling\" is specified and there is more than one\nnode pool on the cluster.", - "type": "string" - }, - "desiredNodeVersion": { - "description": "The Kubernetes version to change the nodes to (typically an\nupgrade). Use `-` to upgrade to the latest version supported by\nthe server.", - "type": "string" - }, "desiredMasterVersion": { "description": "The Kubernetes version to change the master to. The only valid value is the\nlatest supported version. Use \"-\" to have the server automatically select\nthe latest version.", "type": "string" @@ -1937,8 +957,16 @@ "type": "string" }, "desiredAddonsConfig": { - "description": "Configurations for the various addons available to run in the cluster.", - "$ref": "AddonsConfig" + "$ref": "AddonsConfig", + "description": "Configurations for the various addons available to run in the cluster." + }, + "desiredNodePoolId": { + "description": "The node pool to be upgraded. This field is mandatory if\n\"desired_node_version\", \"desired_image_family\" or\n\"desired_node_pool_autoscaling\" is specified and there is more than one\nnode pool on the cluster.", + "type": "string" + }, + "desiredNodeVersion": { + "description": "The Kubernetes version to change the nodes to (typically an\nupgrade). Use `-` to upgrade to the latest version supported by\nthe server.", + "type": "string" } }, "id": "ClusterUpdate" @@ -2016,8 +1044,8 @@ "type": "object", "properties": { "cluster": { - "description": "A [cluster\nresource](/container-engine/reference/rest/v1/projects.zones.clusters)", - "$ref": "Cluster" + "$ref": "Cluster", + "description": "A [cluster\nresource](/container-engine/reference/rest/v1/projects.zones.clusters)" } }, "id": "CreateClusterRequest" @@ -2035,322 +1063,16 @@ } }, "id": "ListNodePoolsResponse" - }, - "CompleteIPRotationRequest": { - "description": "CompleteIPRotationRequest moves the cluster master back into single-IP mode.", - "type": "object", - "properties": {}, - "id": "CompleteIPRotationRequest" - }, - "StartIPRotationRequest": { - "description": "StartIPRotationRequest creates a new IP for the cluster and then performs\na node upgrade on each node pool to point to the new IP.", - "type": "object", - "properties": {}, - "id": "StartIPRotationRequest" - }, - "UpdateNodePoolRequest": { - "description": "UpdateNodePoolRequests update a node pool's image and/or version.", - "type": "object", - "properties": { - "imageType": { - "description": "The desired image type for the node pool.", - "type": "string" - }, - "nodeVersion": { - "description": "The Kubernetes version to change the nodes to (typically an\nupgrade). Use `-` to upgrade to the latest version supported by\nthe server.", - "type": "string" - } - }, - "id": "UpdateNodePoolRequest" - }, - "AcceleratorConfig": { - "description": "AcceleratorConfig represents a Hardware Accelerator request.", - "type": "object", - "properties": { - "acceleratorType": { - "description": "The accelerator type resource name. List of supported accelerators\n[here](/compute/docs/gpus/#Introduction)", - "type": "string" - }, - "acceleratorCount": { - "format": "int64", - "description": "The number of the accelerator cards exposed to an instance.", - "type": "string" - } - }, - "id": "AcceleratorConfig" - }, - "LegacyAbac": { - "description": "Configuration for the legacy Attribute Based Access Control authorization\nmode.", - "type": "object", - "properties": { - "enabled": { - "description": "Whether the ABAC authorizer is enabled for this cluster. When enabled,\nidentities in the system, including service accounts, nodes, and\ncontrollers, will have statically granted permissions beyond those\nprovided by the RBAC configuration or IAM.", - "type": "boolean" - } - }, - "id": "LegacyAbac" - }, - "SetAddonsConfigRequest": { - "description": "SetAddonsConfigRequest sets the addons associated with the cluster.", - "type": "object", - "properties": { - "addonsConfig": { - "$ref": "AddonsConfig", - "description": "The desired configurations for the various addons available to run in the\ncluster." - } - }, - "id": "SetAddonsConfigRequest" - }, - "SetLabelsRequest": { - "description": "SetLabelsRequest sets the Google Cloud Platform labels on a Google Container\nEngine cluster, which will in turn set them for Google Compute Engine\nresources used by that cluster", - "type": "object", - "properties": { - "resourceLabels": { - "description": "The labels to set for that cluster.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "labelFingerprint": { - "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by\nContainer Engine and changes after every request to modify or update\nlabels. You must always provide an up-to-date fingerprint hash when\nupdating or changing labels. Make a \u003ccode\u003eget()\u003c/code\u003e request to the\nresource to get the latest fingerprint.", - "type": "string" - } - }, - "id": "SetLabelsRequest" - }, - "NodePool": { - "description": "NodePool contains the name and configuration for a cluster's node pool.\nNode pools are a set of nodes (i.e. VM's), with a common configuration and\nspecification, under the control of the cluster master. They may have a set\nof Kubernetes labels applied to them, which may be used to reference them\nduring pod scheduling. They may also be resized up or down, to accommodate\nthe workload.", - "type": "object", - "properties": { - "status": { - "enumDescriptions": [ - "Not set.", - "The PROVISIONING state indicates the node pool is being created.", - "The RUNNING state indicates the node pool has been created\nand is fully usable.", - "The RUNNING_WITH_ERROR state indicates the node pool has been created\nand is partially usable. Some error state has occurred and some\nfunctionality may be impaired. Customer may need to reissue a request\nor trigger a new update.", - "The RECONCILING state indicates that some work is actively being done on\nthe node pool, such as upgrading node software. Details can\nbe found in the `statusMessage` field.", - "The STOPPING state indicates the node pool is being deleted.", - "The ERROR state indicates the node pool may be unusable. Details\ncan be found in the `statusMessage` field." - ], - "enum": [ - "STATUS_UNSPECIFIED", - "PROVISIONING", - "RUNNING", - "RUNNING_WITH_ERROR", - "RECONCILING", - "STOPPING", - "ERROR" - ], - "description": "[Output only] The status of the nodes in this pool instance.", - "type": "string" - }, - "config": { - "$ref": "NodeConfig", - "description": "The node configuration of the pool." - }, - "statusMessage": { - "description": "[Output only] Additional information about the current status of this\nnode pool instance, if available.", - "type": "string" - }, - "name": { - "description": "The name of the node pool.", - "type": "string" - }, - "autoscaling": { - "description": "Autoscaler configuration for this NodePool. Autoscaler is enabled\nonly if a valid configuration is present.", - "$ref": "NodePoolAutoscaling" - }, - "management": { - "description": "NodeManagement configuration for this NodePool.", - "$ref": "NodeManagement" - }, - "initialNodeCount": { - "format": "int32", - "description": "The initial node count for the pool. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.", - "type": "integer" - }, - "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", - "type": "string" - }, - "instanceGroupUrls": { - "description": "[Output only] The resource URLs of [instance\ngroups](/compute/docs/instance-groups/) associated with this\nnode pool.", - "items": { - "type": "string" - }, - "type": "array" - }, - "version": { - "description": "[Output only] The version of the Kubernetes of this node.", - "type": "string" - } - }, - "id": "NodePool" - }, - "NodeManagement": { - "description": "NodeManagement defines the set of node management services turned on for the\nnode pool.", - "type": "object", - "properties": { - "autoRepair": { - "description": "A flag that specifies whether the node auto-repair is enabled for the node\npool. If enabled, the nodes in this node pool will be monitored and, if\nthey fail health checks too many times, an automatic repair action will be\ntriggered.", - "type": "boolean" - }, - "autoUpgrade": { - "description": "A flag that specifies whether node auto-upgrade is enabled for the node\npool. If enabled, node auto-upgrade helps keep the nodes in your node pool\nup to date with the latest release version of Kubernetes.", - "type": "boolean" - }, - "upgradeOptions": { - "description": "Specifies the Auto Upgrade knobs for the node pool.", - "$ref": "AutoUpgradeOptions" - } - }, - "id": "NodeManagement" - }, - "CancelOperationRequest": { - "description": "CancelOperationRequest cancels a single operation.", - "type": "object", - "properties": {}, - "id": "CancelOperationRequest" - }, - "SetLegacyAbacRequest": { - "description": "SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for\na cluster.", - "type": "object", - "properties": { - "enabled": { - "description": "Whether ABAC authorization will be enabled in the cluster.", - "type": "boolean" - } - }, - "id": "SetLegacyAbacRequest" - }, - "KubernetesDashboard": { - "description": "Configuration for the Kubernetes Dashboard.", - "type": "object", - "properties": { - "disabled": { - "description": "Whether the Kubernetes Dashboard is enabled for this cluster.", - "type": "boolean" - } - }, - "id": "KubernetesDashboard" - }, - "Operation": { - "description": "This operation resource represents operations that may have happened or are\nhappening on the cluster. All fields are output only.", - "type": "object", - "properties": { - "selfLink": { - "description": "Server-defined URL for the resource.", - "type": "string" - }, - "detail": { - "description": "Detailed operation progress, if available.", - "type": "string" - }, - "targetLink": { - "description": "Server-defined URL for the target of the operation.", - "type": "string" - }, - "operationType": { - "description": "The operation type.", - "type": "string", - "enumDescriptions": [ - "Not set.", - "Cluster create.", - "Cluster delete.", - "A master upgrade.", - "A node upgrade.", - "Cluster repair.", - "Cluster update.", - "Node pool create.", - "Node pool delete.", - "Set node pool management.", - "Automatic node pool repair.", - "Automatic node upgrade.", - "Set labels.", - "Set/generate master auth materials", - "Set node pool size.", - "Updates network policy for a cluster." - ], - "enum": [ - "TYPE_UNSPECIFIED", - "CREATE_CLUSTER", - "DELETE_CLUSTER", - "UPGRADE_MASTER", - "UPGRADE_NODES", - "REPAIR_CLUSTER", - "UPDATE_CLUSTER", - "CREATE_NODE_POOL", - "DELETE_NODE_POOL", - "SET_NODE_POOL_MANAGEMENT", - "AUTO_REPAIR_NODES", - "AUTO_UPGRADE_NODES", - "SET_LABELS", - "SET_MASTER_AUTH", - "SET_NODE_POOL_SIZE", - "SET_NETWORK_POLICY" - ] - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation\nis taking place.", - "type": "string" - }, - "status": { - "enumDescriptions": [ - "Not set.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed.", - "The operation is aborting." - ], - "enum": [ - "STATUS_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE", - "ABORTING" - ], - "description": "The current status of the operation.", - "type": "string" - }, - "name": { - "description": "The server-assigned ID for the operation.", - "type": "string" - }, - "statusMessage": { - "description": "If an error has occurred, a textual description of the error.", - "type": "string" - } - }, - "id": "Operation" - }, - "AddonsConfig": { - "description": "Configuration for the addons that can be automatically spun up in the\ncluster, enabling additional functionality.", - "type": "object", - "properties": { - "kubernetesDashboard": { - "description": "Configuration for the Kubernetes Dashboard.", - "$ref": "KubernetesDashboard" - }, - "horizontalPodAutoscaling": { - "$ref": "HorizontalPodAutoscaling", - "description": "Configuration for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods." - }, - "httpLoadBalancing": { - "$ref": "HttpLoadBalancing", - "description": "Configuration for the HTTP (L7) load balancing controller addon, which\nmakes it easy to set up HTTP load balancers for services in a cluster." - } - }, - "id": "AddonsConfig" } }, - "protocol": "rest", "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, + "protocol": "rest", "version": "v1", "baseUrl": "https://container.googleapis.com/", + "canonicalName": "Container", "auth": { "oauth2": { "scopes": { @@ -2360,8 +1082,1315 @@ } } }, - "servicePath": "", - "description": "The Google Container Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.", "kind": "discovery#restDescription", - "rootUrl": "https://container.googleapis.com/" + "description": "The Google Container Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.", + "servicePath": "", + "rootUrl": "https://container.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "container", + "batchPath": "batch", + "id": "container:v1", + "documentationLink": "https://cloud.google.com/container-engine/", + "revision": "20170825", + "title": "Google Container Engine API", + "ownerName": "Google", + "discoveryVersion": "v1", + "resources": { + "projects": { + "resources": { + "zones": { + "methods": { + "getServerconfig": { + "description": "Returns configuration info about the Container Engine service.", + "response": { + "$ref": "ServerConfig" + }, + "parameterOrder": [ + "projectId", + "zone" + ], + "httpMethod": "GET", + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/serverconfig", + "id": "container.projects.zones.getServerconfig", + "path": "v1/projects/{projectId}/zones/{zone}/serverconfig" + } + }, + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the specified operation.", + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "zone", + "operationId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "operationId": { + "location": "path", + "description": "The server-assigned `name` of the operation.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}", + "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}", + "id": "container.projects.zones.operations.get" + }, + "list": { + "description": "Lists all operations in a project in a specific zone or all zones.", + "httpMethod": "GET", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "projectId", + "zone" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for, or `-` for all zones.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/operations", + "path": "v1/projects/{projectId}/zones/{zone}/operations", + "id": "container.projects.zones.operations.list" + }, + "cancel": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", + "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", + "id": "container.projects.zones.operations.cancel", + "description": "Cancels the specified operation.", + "request": { + "$ref": "CancelOperationRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "operationId" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "operationId": { + "location": "path", + "description": "The server-assigned `name` of the operation.", + "type": "string", + "required": true + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "clusters": { + "methods": { + "logging": { + "description": "Sets the logging service of a specific cluster.", + "request": { + "$ref": "SetLoggingServiceRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to upgrade.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging", + "id": "container.projects.zones.clusters.logging", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging" + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "zone" + ], + "response": { + "$ref": "ListClustersResponse" + }, + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", + "path": "v1/projects/{projectId}/zones/{zone}/clusters", + "id": "container.projects.zones.clusters.list", + "description": "Lists all clusters owned by a project in either the specified zone or all\nzones." + }, + "create": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", + "id": "container.projects.zones.clusters.create", + "path": "v1/projects/{projectId}/zones/{zone}/clusters", + "request": { + "$ref": "CreateClusterRequest" + }, + "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true, + "location": "path" + } + } + }, + "resourceLabels": { + "request": { + "$ref": "SetLabelsRequest" + }, + "description": "Sets labels on a cluster.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "description": "The name of the cluster.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", + "id": "container.projects.zones.clusters.resourceLabels", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels" + }, + "completeIpRotation": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", + "id": "container.projects.zones.clusters.completeIpRotation", + "description": "Completes master IP rotation.", + "request": { + "$ref": "CompleteIPRotationRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setNetworkPolicy": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", + "id": "container.projects.zones.clusters.setNetworkPolicy", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", + "request": { + "$ref": "SetNetworkPolicyRequest" + }, + "description": "Enables/Disables Network Policy for a cluster.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "description": "The name of the cluster.", + "type": "string", + "required": true, + "location": "path" + } + } + }, + "legacyAbac": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to update.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", + "id": "container.projects.zones.clusters.legacyAbac", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", + "request": { + "$ref": "SetLegacyAbacRequest" + }, + "description": "Enables or disables the ABAC authorization mechanism on a cluster." + }, + "get": { + "description": "Gets the details of a specific cluster.", + "response": { + "$ref": "Cluster" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to retrieve.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "id": "container.projects.zones.clusters.get", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}" + }, + "startIpRotation": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "type": "string", + "required": true + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "description": "The name of the cluster.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", + "id": "container.projects.zones.clusters.startIpRotation", + "request": { + "$ref": "StartIPRotationRequest" + }, + "description": "Start master IP rotation." + }, + "addons": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", + "id": "container.projects.zones.clusters.addons", + "request": { + "$ref": "SetAddonsConfigRequest" + }, + "description": "Sets the addons of a specific cluster.", + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "description": "The name of the cluster to upgrade.", + "type": "string", + "required": true, + "location": "path" + } + } + }, + "delete": { + "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", + "httpMethod": "DELETE", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "description": "The name of the cluster to delete.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "id": "container.projects.zones.clusters.delete" + }, + "locations": { + "request": { + "$ref": "SetLocationsRequest" + }, + "description": "Sets the locations of a specific cluster.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "description": "The name of the cluster to upgrade.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations", + "id": "container.projects.zones.clusters.locations", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations" + }, + "update": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "id": "container.projects.zones.clusters.update", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "request": { + "$ref": "UpdateClusterRequest" + }, + "description": "Updates the settings of a specific cluster.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to upgrade.", + "type": "string", + "required": true + } + } + }, + "monitoring": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to upgrade.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", + "id": "container.projects.zones.clusters.monitoring", + "description": "Sets the monitoring service of a specific cluster.", + "request": { + "$ref": "SetMonitoringServiceRequest" + } + }, + "master": { + "description": "Updates the master of a specific cluster.", + "request": { + "$ref": "UpdateMasterRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to upgrade.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", + "id": "container.projects.zones.clusters.master", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master" + }, + "setMasterAuth": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to upgrade.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", + "id": "container.projects.zones.clusters.setMasterAuth", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", + "request": { + "$ref": "SetMasterAuthRequest" + }, + "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password of a specific cluster.\nThis can be either via password generation or explicitly set the password." + } + }, + "resources": { + "nodePools": { + "methods": { + "get": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "id": "container.projects.zones.clusters.nodePools.get", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "description": "Retrieves the node pool requested.", + "response": { + "$ref": "NodePool" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "httpMethod": "GET", + "parameters": { + "nodePoolId": { + "description": "The name of the node pool.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "update": { + "description": "Updates the version and/or image type of a specific node pool.", + "request": { + "$ref": "UpdateNodePoolRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "httpMethod": "POST", + "parameters": { + "nodePoolId": { + "description": "The name of the node pool to upgrade.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to upgrade.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", + "id": "container.projects.zones.clusters.nodePools.update", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update" + }, + "delete": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "nodePoolId": { + "description": "The name of the node pool to delete.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "id": "container.projects.zones.clusters.nodePools.delete", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "description": "Deletes a node pool from a cluster." + }, + "setManagement": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "httpMethod": "POST", + "parameters": { + "nodePoolId": { + "description": "The name of the node pool to update.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "description": "The name of the cluster to update.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", + "id": "container.projects.zones.clusters.nodePools.setManagement", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", + "description": "Sets the NodeManagement options for a node pool.", + "request": { + "$ref": "SetNodePoolManagementRequest" + } + }, + "setSize": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "httpMethod": "POST", + "parameters": { + "nodePoolId": { + "description": "The name of the node pool to update.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "description": "The name of the cluster to update.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", + "id": "container.projects.zones.clusters.nodePools.setSize", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", + "description": "Sets the size of a specific node pool.", + "request": { + "$ref": "SetNodePoolSizeRequest" + } + }, + "list": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "id": "container.projects.zones.clusters.nodePools.list", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "description": "Lists the node pools for a cluster.", + "response": { + "$ref": "ListNodePoolsResponse" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "description": "The name of the cluster.", + "type": "string", + "required": true, + "location": "path" + } + } + }, + "rollback": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", + "id": "container.projects.zones.clusters.nodePools.rollback", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", + "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + "request": { + "$ref": "RollbackNodePoolUpgradeRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "description": "The name of the cluster to rollback.", + "type": "string", + "required": true, + "location": "path" + }, + "nodePoolId": { + "location": "path", + "description": "The name of the node pool to rollback.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "description": "The name of the cluster.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "id": "container.projects.zones.clusters.nodePools.create", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "description": "Creates a node pool for a cluster.", + "request": { + "$ref": "CreateNodePoolRequest" + } + }, + "autoscaling": { + "description": "Sets the autoscaling settings of a specific node pool.", + "request": { + "$ref": "SetNodePoolAutoscalingRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "httpMethod": "POST", + "parameters": { + "nodePoolId": { + "description": "The name of the node pool to upgrade.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "description": "The name of the cluster to upgrade.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", + "id": "container.projects.zones.clusters.nodePools.autoscaling", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling" + } + } + } + } + } + } + } + } + } + }, + "parameters": { + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "key": { + "location": "query", + "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.", + "type": "string" + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + } + } } 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 775081989..e3dcaed24 100644 --- a/vendor/google.golang.org/api/container/v1/container-gen.go +++ b/vendor/google.golang.org/api/container/v1/container-gen.go @@ -850,28 +850,43 @@ func (s *HttpLoadBalancing) MarshalJSON() ([]byte, error) { // IPAllocationPolicy: Configuration for controlling how IPs are // allocated in the cluster. type IPAllocationPolicy struct { - // ClusterIpv4Cidr: The IP address range for the cluster pod IPs. If - // this field is set, then + // ClusterIpv4Cidr: This field is deprecated, use + // cluster_ipv4_cidr_block. + ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` + + // ClusterIpv4CidrBlock: The IP address range for the cluster pod IPs. + // If this field is set, then // `cluster.cluster_ipv4_cidr` must be left blank. // // This field is only applicable when `use_ip_aliases` is true. // - // Set to blank to have a range will be chosen with the default - // size. + // Set to blank to have a range chosen with the default size. // - // Set to /netmask (e.g. `/14`) to have a range be chosen with a + // Set to /netmask (e.g. `/14`) to have a range chosen with a // specific // netmask. // - // Set to a + // Set to + // a // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // no - // tation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks + // + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks // (e.g. // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific // range // to use. - ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` + ClusterIpv4CidrBlock string `json:"clusterIpv4CidrBlock,omitempty"` + + // ClusterSecondaryRangeName: The name of the secondary range to be used + // for the cluster CIDR + // block. The secondary range will be used for pod IP + // addresses. This must be an existing secondary range associated + // with the cluster subnetwork. + // + // This field is only applicable with use_ip_aliases is true + // and + // create_subnetwork is false. + ClusterSecondaryRangeName string `json:"clusterSecondaryRangeName,omitempty"` // CreateSubnetwork: Whether a new subnetwork will be created // automatically for the cluster. @@ -879,50 +894,68 @@ type IPAllocationPolicy struct { // This field is only applicable when `use_ip_aliases` is true. CreateSubnetwork bool `json:"createSubnetwork,omitempty"` - // NodeIpv4Cidr: The IP address range of the instance IPs in this + // NodeIpv4Cidr: This field is deprecated, use node_ipv4_cidr_block. + NodeIpv4Cidr string `json:"nodeIpv4Cidr,omitempty"` + + // NodeIpv4CidrBlock: The IP address range of the instance IPs in this // cluster. // // This is applicable only if `create_subnetwork` is true. // - // Set to blank to have a range will be chosen with the default - // size. + // Set to blank to have a range chosen with the default size. // - // Set to /netmask (e.g. `/14`) to have a range be chosen with a + // Set to /netmask (e.g. `/14`) to have a range chosen with a // specific // netmask. // - // Set to a + // Set to + // a // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // no - // tation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks + // + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks // (e.g. // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific // range // to use. - NodeIpv4Cidr string `json:"nodeIpv4Cidr,omitempty"` + NodeIpv4CidrBlock string `json:"nodeIpv4CidrBlock,omitempty"` - // ServicesIpv4Cidr: The IP address range of the services IPs in this - // cluster. If blank, a range + // ServicesIpv4Cidr: This field is deprecated, use + // services_ipv4_cidr_block. + ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` + + // ServicesIpv4CidrBlock: The IP address range of the services IPs in + // this cluster. If blank, a range // will be automatically chosen with the default size. // // This field is only applicable when `use_ip_aliases` is true. // - // Set to blank to have a range will be chosen with the default - // size. + // Set to blank to have a range chosen with the default size. // - // Set to /netmask (e.g. `/14`) to have a range be chosen with a + // Set to /netmask (e.g. `/14`) to have a range chosen with a // specific // netmask. // - // Set to a + // Set to + // a // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // no - // tation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks + // + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks // (e.g. // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific // range // to use. - ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` + ServicesIpv4CidrBlock string `json:"servicesIpv4CidrBlock,omitempty"` + + // ServicesSecondaryRangeName: The name of the secondary range to be + // used as for the services + // CIDR block. The secondary range will be used for service + // ClusterIPs. This must be an existing secondary range associated + // with the cluster subnetwork. + // + // This field is only applicable with use_ip_aliases is true + // and + // create_subnetwork is false. + ServicesSecondaryRangeName string `json:"servicesSecondaryRangeName,omitempty"` // SubnetworkName: A custom subnetwork name to be used if // `create_subnetwork` is true. If @@ -1313,7 +1346,8 @@ type NodeConfig struct { // and conflicts should be avoided. // For more information, including usage and the valid values, // see: - // http://kubernetes.io/v1.1/docs/user-guide/labels.html + // https://kubernetes.io/docs/concepts/overview/working-with-objects + // /labels/ Labels map[string]string `json:"labels,omitempty"` // LocalSsdCount: The number of local SSD disks to be attached to the @@ -1627,6 +1661,11 @@ type Operation struct { // Detail: Detailed operation progress, if available. Detail string `json:"detail,omitempty"` + // EndTime: [Output only] The time the operation completed, + // in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + EndTime string `json:"endTime,omitempty"` + // Name: The server-assigned ID for the operation. Name string `json:"name,omitempty"` @@ -1654,6 +1693,11 @@ type Operation struct { // SelfLink: Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` + // StartTime: [Output only] The time the operation started, + // in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + StartTime string `json:"startTime,omitempty"` + // Status: The current status of the operation. // // Possible values: diff --git a/vendor/google.golang.org/api/container/v1alpha1/container-api.json b/vendor/google.golang.org/api/container/v1alpha1/container-api.json new file mode 100644 index 000000000..84a18c2d6 --- /dev/null +++ b/vendor/google.golang.org/api/container/v1alpha1/container-api.json @@ -0,0 +1,7 @@ +{ + "error": { + "code": 404, + "message": "Discovery document not found for API service: container.googleapis.com format: rest version: v1alpha1", + "status": "NOT_FOUND" + } +} diff --git a/vendor/google.golang.org/api/container/v1alpha1/container-gen.go b/vendor/google.golang.org/api/container/v1alpha1/container-gen.go new file mode 100644 index 000000000..029b65ba5 --- /dev/null +++ b/vendor/google.golang.org/api/container/v1alpha1/container-gen.go @@ -0,0 +1,65 @@ +// Package container provides access to the . +// +// Usage example: +// +// import "google.golang.org/api/container/v1alpha1" +// ... +// containerService, err := container.New(oauthHttpClient) +package container // import "google.golang.org/api/container/v1alpha1" + +import ( + "bytes" + "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" +) + +// 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 = "" +const apiName = "" +const apiVersion = "" +const basePath = "https://www.googleapis.com/discovery/v1/apis" + +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} diff --git a/vendor/google.golang.org/api/container/v1beta1/container-api.json b/vendor/google.golang.org/api/container/v1beta1/container-api.json new file mode 100644 index 000000000..2e121ceda --- /dev/null +++ b/vendor/google.golang.org/api/container/v1beta1/container-api.json @@ -0,0 +1,2892 @@ +{ + "batchPath": "batch", + "title": "Google Container Engine API", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "zones": { + "methods": { + "getServerconfig": { + "description": "Returns configuration info about the Container Engine service.", + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "zone" + ], + "response": { + "$ref": "ServerConfig" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "name": { + "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/serverconfig", + "path": "v1beta1/projects/{projectId}/zones/{zone}/serverconfig", + "id": "container.projects.zones.getServerconfig" + } + }, + "resources": { + "clusters": { + "methods": { + "completeIpRotation": { + "description": "Completes master IP rotation.", + "request": { + "$ref": "CompleteIPRotationRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", + "id": "container.projects.zones.clusters.completeIpRotation", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Cluster" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name (project, location, cluster) of the cluster to retrieve.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "location": "query" + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "description": "The name of the cluster to retrieve.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "id": "container.projects.zones.clusters.get", + "description": "Gets the details of a specific cluster." + }, + "legacyAbac": { + "description": "Enables or disables the ABAC authorization mechanism on a cluster.", + "request": { + "$ref": "SetLegacyAbacRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "description": "The name of the cluster to update.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", + "id": "container.projects.zones.clusters.legacyAbac" + }, + "setNetworkPolicy": { + "description": "Enables/Disables Network Policy for a cluster.", + "request": { + "$ref": "SetNetworkPolicyRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", + "id": "container.projects.zones.clusters.setNetworkPolicy" + }, + "update": { + "httpMethod": "PUT", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "description": "The name of the cluster to upgrade.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "id": "container.projects.zones.clusters.update", + "request": { + "$ref": "UpdateClusterRequest" + }, + "description": "Updates the settings of a specific cluster." + }, + "startIpRotation": { + "description": "Start master IP rotation.", + "request": { + "$ref": "StartIPRotationRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", + "id": "container.projects.zones.clusters.startIpRotation" + }, + "setMasterAuth": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "clusterId": { + "description": "The name of the cluster to upgrade.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", + "id": "container.projects.zones.clusters.setMasterAuth", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", + "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password of a specific cluster.\nThis can be either via password generation or explicitly set.\nModify basic_auth.csv and reset the K8S API server.", + "request": { + "$ref": "SetMasterAuthRequest" + } + }, + "delete": { + "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "description": "The name of the cluster to delete.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "name": { + "description": "The name (project, location, cluster) of the cluster to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "id": "container.projects.zones.clusters.delete", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}" + }, + "list": { + "description": "Lists all clusters owned by a project in either the specified zone or all\nzones.", + "response": { + "$ref": "ListClustersResponse" + }, + "parameterOrder": [ + "projectId", + "zone" + ], + "httpMethod": "GET", + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field is deprecated, use parent instead.", + "type": "string", + "required": true, + "location": "path" + }, + "parent": { + "location": "query", + "description": "The parent (project and location) where the clusters will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters", + "id": "container.projects.zones.clusters.list", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters" + }, + "create": { + "request": { + "$ref": "CreateClusterRequest" + }, + "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters", + "id": "container.projects.zones.clusters.create", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters" + }, + "resourceLabels": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", + "id": "container.projects.zones.clusters.resourceLabels", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", + "description": "Sets labels on a cluster.", + "request": { + "$ref": "SetLabelsRequest" + } + } + }, + "resources": { + "nodePools": { + "methods": { + "setManagement": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to update.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "nodePoolId": { + "description": "The name of the node pool to update.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", + "id": "container.projects.zones.clusters.nodePools.setManagement", + "description": "Sets the NodeManagement options for a node pool.", + "request": { + "$ref": "SetNodePoolManagementRequest" + } + }, + "delete": { + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "id": "container.projects.zones.clusters.nodePools.delete", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "description": "Deletes a node pool from a cluster.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "nodePoolId": { + "description": "The name of the node pool to delete.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "name": { + "description": "The name (project, location, cluster, node pool id) of the node pool to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + "type": "string", + "location": "query" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + } + } + }, + "list": { + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "id": "container.projects.zones.clusters.nodePools.list", + "description": "Lists the node pools for a cluster.", + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "ListNodePoolsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use parent instead.", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", + "type": "string", + "required": true + }, + "parent": { + "description": "The parent (project, location, cluster id) where the node pools will be listed.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "location": "query" + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster.\nThis field is deprecated, use parent instead.", + "type": "string", + "required": true + } + } + }, + "rollback": { + "request": { + "$ref": "RollbackNodePoolUpgradeRequest" + }, + "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "nodePoolId": { + "description": "The name of the node pool to rollback.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to rollback.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", + "id": "container.projects.zones.clusters.nodePools.rollback", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback" + }, + "create": { + "description": "Creates a node pool for a cluster.", + "request": { + "$ref": "CreateNodePoolRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use parent instead.", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", + "type": "string", + "required": true + }, + "clusterId": { + "description": "The name of the cluster.\nThis field is deprecated, use parent instead.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "id": "container.projects.zones.clusters.nodePools.create" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "response": { + "$ref": "NodePool" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "nodePoolId": { + "location": "path", + "description": "The name of the node pool.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "name": { + "description": "The name (project, location, cluster, node pool id) of the node pool to get.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + "type": "string", + "location": "query" + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "id": "container.projects.zones.clusters.nodePools.get", + "description": "Retrieves the node pool requested." + } + } + } + } + }, + "operations": { + "methods": { + "get": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "operationId" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "location": "query", + "description": "The name (project, location, operation id) of the operation to get.\nSpecified in the format 'projects/*/locations/*/operations/*'.", + "type": "string" + }, + "operationId": { + "description": "The server-assigned `name` of the operation.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}", + "id": "container.projects.zones.operations.get", + "path": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}", + "description": "Gets the specified operation." + }, + "list": { + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "projectId", + "zone" + ], + "httpMethod": "GET", + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for, or `-` for all zones.\nThis field is deprecated, use parent instead.", + "type": "string", + "required": true + }, + "parent": { + "description": "The parent (project and location) where the operations will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations", + "id": "container.projects.zones.operations.list", + "path": "v1beta1/projects/{projectId}/zones/{zone}/operations", + "description": "Lists all operations in a project in a specific zone or all zones." + }, + "cancel": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "projectId", + "zone", + "operationId" + ], + "httpMethod": "POST", + "parameters": { + "operationId": { + "location": "path", + "description": "The server-assigned `name` of the operation.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", + "id": "container.projects.zones.operations.cancel", + "path": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", + "description": "Cancels the specified operation.", + "request": { + "$ref": "CancelOperationRequest" + } + } + } + } + } + }, + "locations": { + "methods": { + "getServerConfig": { + "httpMethod": "GET", + "response": { + "$ref": "ServerConfig" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string", + "location": "query" + }, + "zone": { + "location": "query", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "name": { + "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverConfig", + "path": "v1beta1/{+name}/serverConfig", + "id": "container.projects.locations.getServerConfig", + "description": "Returns configuration info about the Container Engine service." + } + }, + "resources": { + "clusters": { + "methods": { + "get": { + "description": "Gets the details of a specific cluster.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Cluster" + }, + "parameters": { + "name": { + "description": "The name (project, location, cluster) of the cluster to retrieve.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "location": "path" + }, + "projectId": { + "location": "query", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string" + }, + "zone": { + "location": "query", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "clusterId": { + "location": "query", + "description": "The name of the cluster to retrieve.\nThis field is deprecated, use name instead.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "path": "v1beta1/{+name}", + "id": "container.projects.locations.clusters.get" + }, + "setNetworkPolicy": { + "description": "Enables/Disables Network Policy for a cluster.", + "request": { + "$ref": "SetNetworkPolicyRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "description": "The name (project, location, cluster id) of the cluster to set networking policy.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setNetworkPolicy", + "id": "container.projects.locations.clusters.setNetworkPolicy", + "path": "v1beta1/{+name}:setNetworkPolicy" + }, + "update": { + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "id": "container.projects.locations.clusters.update", + "path": "v1beta1/{+name}", + "description": "Updates the settings of a specific cluster.", + "request": { + "$ref": "UpdateClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "parameters": { + "name": { + "description": "The name (project, location, cluster) of the cluster to update.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "startIpRotation": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "name": { + "location": "path", + "description": "The name (project, location, cluster id) of the cluster to start IP rotation.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:startIpRotation", + "path": "v1beta1/{+name}:startIpRotation", + "id": "container.projects.locations.clusters.startIpRotation", + "description": "Start master IP rotation.", + "request": { + "$ref": "StartIPRotationRequest" + } + }, + "setMasterAuth": { + "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password of a specific cluster.\nThis can be either via password generation or explicitly set.\nModify basic_auth.csv and reset the K8S API server.", + "request": { + "$ref": "SetMasterAuthRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "location": "path", + "description": "The name (project, location, cluster) of the cluster to set auth.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMasterAuth", + "id": "container.projects.locations.clusters.setMasterAuth", + "path": "v1beta1/{+name}:setMasterAuth" + }, + "delete": { + "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "query", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "location": "query" + }, + "clusterId": { + "location": "query", + "description": "The name of the cluster to delete.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "name": { + "description": "The name (project, location, cluster) of the cluster to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "id": "container.projects.locations.clusters.delete", + "path": "v1beta1/{+name}" + }, + "list": { + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", + "id": "container.projects.locations.clusters.list", + "path": "v1beta1/{+parent}/clusters", + "description": "Lists all clusters owned by a project in either the specified zone or all\nzones.", + "response": { + "$ref": "ListClustersResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "query", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", + "type": "string" + }, + "zone": { + "location": "query", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field is deprecated, use parent instead.", + "type": "string" + }, + "parent": { + "description": "The parent (project and location) where the clusters will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + } + } + }, + "setLegacyAbac": { + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLegacyAbac", + "path": "v1beta1/{+name}:setLegacyAbac", + "id": "container.projects.locations.clusters.setLegacyAbac", + "request": { + "$ref": "SetLegacyAbacRequest" + }, + "description": "Enables or disables the ABAC authorization mechanism on a cluster.", + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name (project, location, cluster id) of the cluster to set legacy abac.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "location": "path" + } + } + }, + "setResourceLabels": { + "description": "Sets labels on a cluster.", + "request": { + "$ref": "SetLabelsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "name": { + "location": "path", + "description": "The name (project, location, cluster id) of the cluster to set labels.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setResourceLabels", + "path": "v1beta1/{+name}:setResourceLabels", + "id": "container.projects.locations.clusters.setResourceLabels" + }, + "create": { + "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + "request": { + "$ref": "CreateClusterRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "parent": { + "location": "path", + "description": "The parent (project and location) where the cluster will be created.\nSpecified in the format 'projects/*/locations/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", + "path": "v1beta1/{+parent}/clusters", + "id": "container.projects.locations.clusters.create" + }, + "completeIpRotation": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name (project, location, cluster id) of the cluster to complete IP rotation.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:completeIpRotation", + "path": "v1beta1/{+name}:completeIpRotation", + "id": "container.projects.locations.clusters.completeIpRotation", + "request": { + "$ref": "CompleteIPRotationRequest" + }, + "description": "Completes master IP rotation." + } + }, + "resources": { + "nodePools": { + "methods": { + "delete": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "nodePoolId": { + "description": "The name of the node pool to delete.\nThis field is deprecated, use name instead.", + "type": "string", + "location": "query" + }, + "name": { + "location": "path", + "description": "The name (project, location, cluster, node pool id) of the node pool to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string", + "location": "query" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "location": "query" + }, + "clusterId": { + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", + "id": "container.projects.locations.clusters.nodePools.delete", + "path": "v1beta1/{+name}", + "description": "Deletes a node pool from a cluster." + }, + "setManagement": { + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setManagement", + "id": "container.projects.locations.clusters.nodePools.setManagement", + "path": "v1beta1/{+name}:setManagement", + "description": "Sets the NodeManagement options for a node pool.", + "request": { + "$ref": "SetNodePoolManagementRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "location": "path", + "description": "The name (project, location, cluster, node pool id) of the node pool to set\nmanagement properties. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "response": { + "$ref": "ListNodePoolsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use parent instead.", + "type": "string", + "location": "query" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", + "type": "string", + "location": "query" + }, + "clusterId": { + "location": "query", + "description": "The name of the cluster.\nThis field is deprecated, use parent instead.", + "type": "string" + }, + "parent": { + "description": "The parent (project, location, cluster id) where the node pools will be listed.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools", + "id": "container.projects.locations.clusters.nodePools.list", + "path": "v1beta1/{+parent}/nodePools", + "description": "Lists the node pools for a cluster." + }, + "rollback": { + "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + "request": { + "$ref": "RollbackNodePoolUpgradeRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "description": "The name (project, location, cluster, node pool id) of the node poll to\nrollback upgrade.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:rollback", + "id": "container.projects.locations.clusters.nodePools.rollback", + "path": "v1beta1/{+name}:rollback" + }, + "create": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "parent": { + "location": "path", + "description": "The parent (project, location, cluster id) where the node pool will be created.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools", + "id": "container.projects.locations.clusters.nodePools.create", + "path": "v1beta1/{+parent}/nodePools", + "description": "Creates a node pool for a cluster.", + "request": { + "$ref": "CreateNodePoolRequest" + } + }, + "get": { + "description": "Retrieves the node pool requested.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "NodePool" + }, + "parameters": { + "nodePoolId": { + "description": "The name of the node pool.\nThis field is deprecated, use name instead.", + "type": "string", + "location": "query" + }, + "name": { + "location": "path", + "description": "The name (project, location, cluster, node pool id) of the node pool to get.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string", + "location": "query" + }, + "zone": { + "location": "query", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "clusterId": { + "location": "query", + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", + "path": "v1beta1/{+name}", + "id": "container.projects.locations.clusters.nodePools.get" + } + } + } + } + }, + "operations": { + "methods": { + "get": { + "description": "Gets the specified operation.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "name": { + "description": "The name (project, location, operation id) of the operation to get.\nSpecified in the format 'projects/*/locations/*/operations/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "location": "path" + }, + "operationId": { + "location": "query", + "description": "The server-assigned `name` of the operation.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "projectId": { + "location": "query", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string" + }, + "zone": { + "location": "query", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "path": "v1beta1/{+name}", + "id": "container.projects.locations.operations.get" + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "query", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for, or `-` for all zones.\nThis field is deprecated, use parent instead.", + "type": "string", + "location": "query" + }, + "parent": { + "location": "path", + "description": "The parent (project and location) where the operations will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", + "path": "v1beta1/{+parent}/operations", + "id": "container.projects.locations.operations.list", + "description": "Lists all operations in a project in a specific zone or all zones." + }, + "cancel": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "location": "path", + "description": "The name (project, location, operation id) of the operation to cancel.\nSpecified in the format 'projects/*/locations/*/operations/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "id": "container.projects.locations.operations.cancel", + "path": "v1beta1/{+name}:cancel", + "description": "Cancels the specified operation.", + "request": { + "$ref": "CancelOperationRequest" + } + } + } + } + } + } + } + } + }, + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "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.", + "type": "string", + "location": "query" + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + } + }, + "version": "v1beta1", + "baseUrl": "https://container.googleapis.com/", + "servicePath": "", + "description": "The Google Container Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.", + "kind": "discovery#restDescription", + "basePath": "", + "documentationLink": "https://cloud.google.com/container-engine/", + "revision": "20170825", + "id": "container:v1beta1", + "discoveryVersion": "v1", + "version_module": true, + "schemas": { + "ListClustersResponse": { + "description": "ListClustersResponse is the result of ListClustersRequest.", + "type": "object", + "properties": { + "missingZones": { + "description": "If any zones are listed here, the list of clusters returned\nmay be missing those zones.", + "items": { + "type": "string" + }, + "type": "array" + }, + "clusters": { + "description": "A list of clusters in the project in the specified zone, or\nacross all ones.", + "items": { + "$ref": "Cluster" + }, + "type": "array" + } + }, + "id": "ListClustersResponse" + }, + "HttpLoadBalancing": { + "description": "Configuration options for the HTTP (L7) load balancing controller addon,\nwhich makes it easy to set up HTTP load balancers for services in a cluster.", + "type": "object", + "properties": { + "disabled": { + "description": "Whether the HTTP Load Balancing controller is enabled in the cluster.\nWhen enabled, it runs a small pod in the cluster that manages the load\nbalancers.", + "type": "boolean" + } + }, + "id": "HttpLoadBalancing" + }, + "SetMasterAuthRequest": { + "description": "SetMasterAuthRequest updates the admin password of a cluster.", + "type": "object", + "properties": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string" + }, + "clusterId": { + "description": "The name of the cluster to upgrade.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "update": { + "description": "A description of the update.", + "$ref": "MasterAuth" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "name": { + "description": "The name (project, location, cluster) of the cluster to set auth.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string" + }, + "action": { + "description": "The exact form of action to be taken on the master auth", + "type": "string", + "enumDescriptions": [ + "Operation is unknown and will error out", + "Set the password to a user generated value.", + "Generate a new password and set it to that." + ], + "enum": [ + "UNKNOWN", + "SET_PASSWORD", + "GENERATE_PASSWORD" + ] + } + }, + "id": "SetMasterAuthRequest" + }, + "NodePoolAutoscaling": { + "description": "NodePoolAutoscaling contains information required by cluster autoscaler to\nadjust the size of the node pool to the current cluster usage.", + "type": "object", + "properties": { + "enabled": { + "description": "Is autoscaling enabled for this node pool.", + "type": "boolean" + }, + "maxNodeCount": { + "format": "int32", + "description": "Maximum number of nodes in the NodePool. Must be \u003e= min_node_count. There\nhas to enough quota to scale up the cluster.", + "type": "integer" + }, + "minNodeCount": { + "format": "int32", + "description": "Minimum number of nodes in the NodePool. Must be \u003e= 1 and \u003c=\nmax_node_count.", + "type": "integer" + } + }, + "id": "NodePoolAutoscaling" + }, + "ClientCertificateConfig": { + "description": "Configuration for client certificates on the cluster.", + "type": "object", + "properties": { + "issueClientCertificate": { + "description": "Issue a client certificate.", + "type": "boolean" + } + }, + "id": "ClientCertificateConfig" + }, + "SetNetworkPolicyRequest": { + "description": "SetNetworkPolicyRequest enables/disables network policy for a cluster.", + "type": "object", + "properties": { + "networkPolicy": { + "description": "Configuration options for the NetworkPolicy feature.", + "$ref": "NetworkPolicy" + }, + "name": { + "description": "The name (project, location, cluster id) of the cluster to set networking policy.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "clusterId": { + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "type": "string" + } + }, + "id": "SetNetworkPolicyRequest" + }, + "ClusterUpdate": { + "description": "ClusterUpdate describes an update to the cluster. Exactly one update can\nbe applied to a cluster with each request, so at most one field can be\nprovided.", + "type": "object", + "properties": { + "desiredNodePoolAutoscaling": { + "$ref": "NodePoolAutoscaling", + "description": "Autoscaler configuration for the node pool specified in\ndesired_node_pool_id. If there is only one pool in the\ncluster and desired_node_pool_id is not provided then\nthe change applies to that single node pool." + }, + "desiredLocations": { + "description": "The desired list of Google Compute Engine\n[locations](/compute/docs/zones#available) in which the cluster's nodes\nshould be located. Changing the locations a cluster is in will result\nin nodes being either created or removed from the cluster, depending on\nwhether locations are being added or removed.\n\nThis list must always include the cluster's primary zone.", + "items": { + "type": "string" + }, + "type": "array" + }, + "desiredMonitoringService": { + "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* \"monitoring.googleapis.com\" - the Google Cloud Monitoring service\n* \"none\" - no metrics will be exported from the cluster", + "type": "string" + }, + "desiredImageType": { + "description": "The desired image type for the node pool.\nNOTE: Set the \"desired_node_pool\" field as well.", + "type": "string" + }, + "desiredAddonsConfig": { + "$ref": "AddonsConfig", + "description": "Configurations for the various addons available to run in the cluster." + }, + "desiredNodePoolId": { + "description": "The node pool to be upgraded. This field is mandatory if\n\"desired_node_version\", \"desired_image_family\" or\n\"desired_node_pool_autoscaling\" is specified and there is more than one\nnode pool on the cluster.", + "type": "string" + }, + "desiredNodeVersion": { + "description": "The Kubernetes version to change the nodes to (typically an\nupgrade). Use `-` to upgrade to the latest version supported by\nthe server.", + "type": "string" + }, + "desiredMasterVersion": { + "description": "The Kubernetes version to change the master to. The only valid value is the\nlatest supported version. Use \"-\" to have the server automatically select\nthe latest version.", + "type": "string" + }, + "desiredMasterAuthorizedNetworksConfig": { + "description": "The desired configuration options for master authorized networks feature.", + "$ref": "MasterAuthorizedNetworksConfig" + } + }, + "id": "ClusterUpdate" + }, + "IPAllocationPolicy": { + "description": "Configuration for controlling how IPs are allocated in the cluster.", + "type": "object", + "properties": { + "clusterIpv4CidrBlock": { + "description": "The IP address range for the cluster pod IPs. If this field is set, then\n`cluster.cluster_ipv4_cidr` must be left blank.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", + "type": "string" + }, + "clusterSecondaryRangeName": { + "description": "The name of the secondary range to be used for the cluster CIDR\nblock. The secondary range will be used for pod IP\naddresses. This must be an existing secondary range associated\nwith the cluster subnetwork.\n\nThis field is only applicable with use_ip_aliases and\ncreate_subnetwork is false.", + "type": "string" + }, + "nodeIpv4CidrBlock": { + "description": "The IP address range of the instance IPs in this cluster.\n\nThis is applicable only if `create_subnetwork` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", + "type": "string" + }, + "servicesIpv4Cidr": { + "description": "This field is deprecated, use services_ipv4_cidr_block.", + "type": "string" + }, + "servicesSecondaryRangeName": { + "description": "The name of the secondary range to be used as for the services\nCIDR block. The secondary range will be used for service\nClusterIPs. This must be an existing secondary range associated\nwith the cluster subnetwork.\n\nThis field is only applicable with use_ip_aliases and\ncreate_subnetwork is false.", + "type": "string" + }, + "useIpAliases": { + "description": "Whether alias IPs will be used for pod IPs in the cluster.", + "type": "boolean" + }, + "createSubnetwork": { + "description": "Whether a new subnetwork will be created automatically for the cluster.\n\nThis field is only applicable when `use_ip_aliases` is true.", + "type": "boolean" + }, + "subnetworkName": { + "description": "A custom subnetwork name to be used if `create_subnetwork` is true. If\nthis field is empty, then an automatic name will be chosen for the new\nsubnetwork.", + "type": "string" + }, + "servicesIpv4CidrBlock": { + "description": "The IP address range of the services IPs in this cluster. If blank, a range\nwill be automatically chosen with the default size.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", + "type": "string" + }, + "clusterIpv4Cidr": { + "description": "This field is deprecated, use cluster_ipv4_cidr_block.", + "type": "string" + }, + "nodeIpv4Cidr": { + "description": "This field is deprecated, use node_ipv4_cidr_block.", + "type": "string" + } + }, + "id": "IPAllocationPolicy" + }, + "HorizontalPodAutoscaling": { + "description": "Configuration options for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods.", + "type": "object", + "properties": { + "disabled": { + "description": "Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.\nWhen enabled, it ensures that a Heapster pod is running in the cluster,\nwhich is also used by the Cloud Monitoring service.", + "type": "boolean" + } + }, + "id": "HorizontalPodAutoscaling" + }, + "MasterAuthorizedNetworksConfig": { + "description": "Configuration options for the master authorized networks feature. Enabled\nmaster authorized networks will disallow all external traffic to access\nKubernetes master through HTTPS except traffic from the given CIDR blocks,\nGoogle Compute Engine Public IPs and Google Prod IPs.", + "type": "object", + "properties": { + "enabled": { + "description": "Whether or not master authorized networks is enabled.", + "type": "boolean" + }, + "cidrBlocks": { + "description": "cidr_blocks define up to 10 external networks that could access\nKubernetes master through HTTPS.", + "items": { + "$ref": "CidrBlock" + }, + "type": "array" + } + }, + "id": "MasterAuthorizedNetworksConfig" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "SetNodePoolManagementRequest": { + "description": "SetNodePoolManagementRequest sets the node management properties of a node\npool.", + "type": "object", + "properties": { + "name": { + "description": "The name (project, location, cluster, node pool id) of the node pool to set\nmanagement properties. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", + "type": "string" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string" + }, + "management": { + "description": "NodeManagement configuration for the node pool.", + "$ref": "NodeManagement" + }, + "clusterId": { + "description": "The name of the cluster to update.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "nodePoolId": { + "description": "The name of the node pool to update.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + } + }, + "id": "SetNodePoolManagementRequest" + }, + "CreateClusterRequest": { + "description": "CreateClusterRequest creates a cluster.", + "type": "object", + "properties": { + "cluster": { + "$ref": "Cluster", + "description": "A [cluster\nresource](/container-engine/reference/rest/v1beta1/projects.zones.clusters)" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", + "type": "string" + }, + "parent": { + "description": "The parent (project and location) where the cluster will be created.\nSpecified in the format 'projects/*/locations/*'.", + "type": "string" + } + }, + "id": "CreateClusterRequest" + }, + "ListNodePoolsResponse": { + "description": "ListNodePoolsResponse is the result of ListNodePoolsRequest.", + "type": "object", + "properties": { + "nodePools": { + "description": "A list of node pools for a cluster.", + "items": { + "$ref": "NodePool" + }, + "type": "array" + } + }, + "id": "ListNodePoolsResponse" + }, + "CompleteIPRotationRequest": { + "description": "CompleteIPRotationRequest moves the cluster master back into single-IP mode.", + "type": "object", + "properties": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "clusterId": { + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "name": { + "description": "The name (project, location, cluster id) of the cluster to complete IP rotation.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string" + } + }, + "id": "CompleteIPRotationRequest" + }, + "StartIPRotationRequest": { + "description": "StartIPRotationRequest creates a new IP for the cluster and then performs\na node upgrade on each node pool to point to the new IP.", + "type": "object", + "properties": { + "name": { + "description": "The name (project, location, cluster id) of the cluster to start IP rotation.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "clusterId": { + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "type": "string" + } + }, + "id": "StartIPRotationRequest" + }, + "AcceleratorConfig": { + "description": "AcceleratorConfig represents a Hardware Accelerator request.", + "type": "object", + "properties": { + "acceleratorType": { + "description": "The accelerator type resource name. List of supported accelerators\n[here](/compute/docs/gpus/#Introduction)", + "type": "string" + }, + "acceleratorCount": { + "format": "int64", + "description": "The number of the accelerator cards exposed to an instance.", + "type": "string" + } + }, + "id": "AcceleratorConfig" + }, + "SetLabelsRequest": { + "description": "SetLabelsRequest sets the Google Cloud Platform labels on a Google Container\nEngine cluster, which will in turn set them for Google Compute Engine\nresources used by that cluster", + "type": "object", + "properties": { + "labelFingerprint": { + "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by\nContainer Engine and changes after every request to modify or update\nlabels. You must always provide an up-to-date fingerprint hash when\nupdating or changing labels. Make a \u003ccode\u003eget()\u003c/code\u003e request to the\nresource to get the latest fingerprint.", + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "name": { + "description": "The name (project, location, cluster id) of the cluster to set labels.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string" + }, + "resourceLabels": { + "description": "The labels to set for that cluster.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string" + }, + "clusterId": { + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "type": "string" + } + }, + "id": "SetLabelsRequest" + }, + "NodePool": { + "description": "NodePool contains the name and configuration for a cluster's node pool.\nNode pools are a set of nodes (i.e. VM's), with a common configuration and\nspecification, under the control of the cluster master. They may have a set\nof Kubernetes labels applied to them, which may be used to reference them\nduring pod scheduling. They may also be resized up or down, to accommodate\nthe workload.", + "type": "object", + "properties": { + "status": { + "description": "[Output only] The status of the nodes in this pool instance.", + "type": "string", + "enumDescriptions": [ + "Not set.", + "The PROVISIONING state indicates the node pool is being created.", + "The RUNNING state indicates the node pool has been created\nand is fully usable.", + "The RUNNING_WITH_ERROR state indicates the node pool has been created\nand is partially usable. Some error state has occurred and some\nfunctionality may be impaired. Customer may need to reissue a request\nor trigger a new update.", + "The RECONCILING state indicates that some work is actively being done on\nthe node pool, such as upgrading node software. Details can\nbe found in the `statusMessage` field.", + "The STOPPING state indicates the node pool is being deleted.", + "The ERROR state indicates the node pool may be unusable. Details\ncan be found in the `statusMessage` field." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "PROVISIONING", + "RUNNING", + "RUNNING_WITH_ERROR", + "RECONCILING", + "STOPPING", + "ERROR" + ] + }, + "config": { + "description": "The node configuration of the pool.", + "$ref": "NodeConfig" + }, + "statusMessage": { + "description": "[Output only] Additional information about the current status of this\nnode pool instance, if available.", + "type": "string" + }, + "name": { + "description": "The name of the node pool.", + "type": "string" + }, + "autoscaling": { + "description": "Autoscaler configuration for this NodePool. Autoscaler is enabled\nonly if a valid configuration is present.", + "$ref": "NodePoolAutoscaling" + }, + "management": { + "description": "NodeManagement configuration for this NodePool.", + "$ref": "NodeManagement" + }, + "initialNodeCount": { + "format": "int32", + "description": "The initial node count for the pool. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.", + "type": "integer" + }, + "selfLink": { + "description": "[Output only] Server-defined URL for the resource.", + "type": "string" + }, + "instanceGroupUrls": { + "description": "[Output only] The resource URLs of [instance\ngroups](/compute/docs/instance-groups/) associated with this\nnode pool.", + "items": { + "type": "string" + }, + "type": "array" + }, + "version": { + "description": "[Output only] The version of the Kubernetes of this node.", + "type": "string" + } + }, + "id": "NodePool" + }, + "NodeManagement": { + "description": "NodeManagement defines the set of node management services turned on for the\nnode pool.", + "type": "object", + "properties": { + "autoRepair": { + "description": "Whether the nodes will be automatically repaired.", + "type": "boolean" + }, + "autoUpgrade": { + "description": "Whether the nodes will be automatically upgraded.", + "type": "boolean" + }, + "upgradeOptions": { + "$ref": "AutoUpgradeOptions", + "description": "Specifies the Auto Upgrade knobs for the node pool." + } + }, + "id": "NodeManagement" + }, + "CancelOperationRequest": { + "description": "CancelOperationRequest cancels a single operation.", + "type": "object", + "properties": { + "operationId": { + "description": "The server-assigned `name` of the operation.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "name": { + "description": "The name (project, location, operation id) of the operation to cancel.\nSpecified in the format 'projects/*/locations/*/operations/*'.", + "type": "string" + } + }, + "id": "CancelOperationRequest" + }, + "SetLegacyAbacRequest": { + "description": "SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for\na cluster.", + "type": "object", + "properties": { + "name": { + "description": "The name (project, location, cluster id) of the cluster to set legacy abac.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string" + }, + "enabled": { + "description": "Whether ABAC authorization will be enabled in the cluster.", + "type": "boolean" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "clusterId": { + "description": "The name of the cluster to update.\nThis field is deprecated, use name instead.", + "type": "string" + } + }, + "id": "SetLegacyAbacRequest" + }, + "KubernetesDashboard": { + "description": "Configuration for the Kubernetes Dashboard.", + "type": "object", + "properties": { + "disabled": { + "description": "Whether the Kubernetes Dashboard is enabled for this cluster.", + "type": "boolean" + } + }, + "id": "KubernetesDashboard" + }, + "Operation": { + "description": "This operation resource represents operations that may have happened or are\nhappening on the cluster. All fields are output only.", + "type": "object", + "properties": { + "endTime": { + "description": "[Output only] The time the operation completed, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" + }, + "location": { + "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/regions-zones/regions-zones#available) or\n[region](/compute/docs/regions-zones/regions-zones#available) in which\nthe cluster resides.", + "type": "string" + }, + "targetLink": { + "description": "Server-defined URL for the target of the operation.", + "type": "string" + }, + "detail": { + "description": "Detailed operation progress, if available.", + "type": "string" + }, + "operationType": { + "enumDescriptions": [ + "Not set.", + "Cluster create.", + "Cluster delete.", + "A master upgrade.", + "A node upgrade.", + "Cluster repair.", + "Cluster update.", + "Node pool create.", + "Node pool delete.", + "Set node pool management.", + "Automatic node pool repair.", + "Automatic node upgrade.", + "Set labels.", + "Set/generate master auth materials", + "Set node pool size.", + "Updates network policy for a cluster.", + "Set the maintenance policy." + ], + "enum": [ + "TYPE_UNSPECIFIED", + "CREATE_CLUSTER", + "DELETE_CLUSTER", + "UPGRADE_MASTER", + "UPGRADE_NODES", + "REPAIR_CLUSTER", + "UPDATE_CLUSTER", + "CREATE_NODE_POOL", + "DELETE_NODE_POOL", + "SET_NODE_POOL_MANAGEMENT", + "AUTO_REPAIR_NODES", + "AUTO_UPGRADE_NODES", + "SET_LABELS", + "SET_MASTER_AUTH", + "SET_NODE_POOL_SIZE", + "SET_NETWORK_POLICY", + "SET_MAINTENANCE_POLICY" + ], + "description": "The operation type.", + "type": "string" + }, + "startTime": { + "description": "[Output only] The time the operation started, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation\nis taking place.\nThis field is deprecated, use location instead.", + "type": "string" + }, + "status": { + "description": "The current status of the operation.", + "type": "string", + "enumDescriptions": [ + "Not set.", + "The operation has been created.", + "The operation is currently running.", + "The operation is done, either cancelled or completed.", + "The operation is aborting." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "PENDING", + "RUNNING", + "DONE", + "ABORTING" + ] + }, + "statusMessage": { + "description": "If an error has occurred, a textual description of the error.", + "type": "string" + }, + "name": { + "description": "The server-assigned ID for the operation.", + "type": "string" + }, + "selfLink": { + "description": "Server-defined URL for the resource.", + "type": "string" + } + }, + "id": "Operation" + }, + "AddonsConfig": { + "description": "Configuration for the addons that can be automatically spun up in the\ncluster, enabling additional functionality.", + "type": "object", + "properties": { + "kubernetesDashboard": { + "$ref": "KubernetesDashboard", + "description": "Configuration for the Kubernetes Dashboard." + }, + "horizontalPodAutoscaling": { + "description": "Configuration for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods.", + "$ref": "HorizontalPodAutoscaling" + }, + "httpLoadBalancing": { + "$ref": "HttpLoadBalancing", + "description": "Configuration for the HTTP (L7) load balancing controller addon, which\nmakes it easy to set up HTTP load balancers for services in a cluster." + } + }, + "id": "AddonsConfig" + }, + "RollbackNodePoolUpgradeRequest": { + "description": "RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed\nNodePool upgrade. This will be an no-op if the last upgrade successfully\ncompleted.", + "type": "object", + "properties": { + "nodePoolId": { + "description": "The name of the node pool to rollback.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "name": { + "description": "The name (project, location, cluster, node pool id) of the node poll to\nrollback upgrade.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + "type": "string" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "clusterId": { + "description": "The name of the cluster to rollback.\nThis field is deprecated, use name instead.", + "type": "string" + } + }, + "id": "RollbackNodePoolUpgradeRequest" + }, + "UpdateClusterRequest": { + "description": "UpdateClusterRequest updates the settings of a cluster.", + "type": "object", + "properties": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "clusterId": { + "description": "The name of the cluster to upgrade.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "update": { + "$ref": "ClusterUpdate", + "description": "A description of the update." + }, + "name": { + "description": "The name (project, location, cluster) of the cluster to update.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string" + } + }, + "id": "UpdateClusterRequest" + }, + "NetworkPolicy": { + "description": "Configuration options for the NetworkPolicy feature.\nhttps://kubernetes.io/docs/concepts/services-networking/networkpolicies/", + "type": "object", + "properties": { + "enabled": { + "description": "Whether network policy is enabled on the cluster.", + "type": "boolean" + }, + "provider": { + "description": "The selected network policy provider.", + "type": "string", + "enumDescriptions": [ + "Not set", + "Tigera (Calico Felix)." + ], + "enum": [ + "PROVIDER_UNSPECIFIED", + "CALICO" + ] + } + }, + "id": "NetworkPolicy" + }, + "Cluster": { + "description": "A Google Container Engine cluster.", + "type": "object", + "properties": { + "initialClusterVersion": { + "description": "The initial Kubernetes version for this cluster. Valid versions are those\nfound in validMasterVersions returned by getServerConfig. The version can\nbe upgraded over time; such upgrades are reflected in\ncurrentMasterVersion and currentNodeVersion.", + "type": "string" + }, + "ipAllocationPolicy": { + "$ref": "IPAllocationPolicy", + "description": "Configuration for cluster IP allocation." + }, + "location": { + "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/regions-zones/regions-zones#available) or\n[region](/compute/docs/regions-zones/regions-zones#available) in which\nthe cluster resides.", + "type": "string" + }, + "endpoint": { + "description": "[Output only] The IP address of this cluster's master endpoint.\nThe endpoint can be accessed from the internet at\n`https://username:password@endpoint/`.\n\nSee the `masterAuth` property of this resource for username and\npassword information.", + "type": "string" + }, + "createTime": { + "description": "[Output only] The time the cluster was created, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" + }, + "clusterIpv4Cidr": { + "description": "The IP address range of the container pods in this cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`). Leave blank to have\none automatically chosen or specify a `/14` block in `10.0.0.0/8`.", + "type": "string" + }, + "initialNodeCount": { + "format": "int32", + "description": "The number of nodes to create in this cluster. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"node_config\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.", + "type": "integer" + }, + "nodePools": { + "description": "The node pools associated with this cluster.\nThis field should not be set if \"node_config\" or \"initial_node_count\" are\nspecified.", + "items": { + "$ref": "NodePool" + }, + "type": "array" + }, + "locations": { + "description": "The list of Google Compute Engine\n[locations](/compute/docs/zones#available) in which the cluster's nodes\nshould be located.", + "items": { + "type": "string" + }, + "type": "array" + }, + "selfLink": { + "description": "[Output only] Server-defined URL for the resource.", + "type": "string" + }, + "instanceGroupUrls": { + "description": "[Output only] The resource URLs of [instance\ngroups](/compute/docs/instance-groups/) associated with this\ncluster.", + "items": { + "type": "string" + }, + "type": "array" + }, + "servicesIpv4Cidr": { + "description": "[Output only] The IP address range of the Kubernetes services in\nthis cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `1.2.3.4/29`). Service addresses are\ntypically put in the last `/16` from the container CIDR.", + "type": "string" + }, + "networkPolicy": { + "description": "Configuration options for the NetworkPolicy feature.", + "$ref": "NetworkPolicy" + }, + "enableKubernetesAlpha": { + "description": "Kubernetes alpha features are enabled on this cluster. This includes alpha\nAPI groups (e.g. v1beta1) and features that may not be production ready in\nthe kubernetes version of the master and nodes.\nThe cluster has no SLA for uptime and master/node upgrades are disabled.\nAlpha enabled clusters are automatically deleted thirty days after\ncreation.", + "type": "boolean" + }, + "description": { + "description": "An optional description of this cluster.", + "type": "string" + }, + "currentNodeCount": { + "format": "int32", + "description": "[Output only] The number of nodes currently in the cluster.", + "type": "integer" + }, + "monitoringService": { + "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* `monitoring.googleapis.com` - the Google Cloud Monitoring service.\n* `none` - no metrics will be exported from the cluster.\n* if left as an empty string, `monitoring.googleapis.com` will be used.", + "type": "string" + }, + "network": { + "description": "The name of the Google Compute Engine\n[network](/compute/docs/networks-and-firewalls#networks) to which the\ncluster is connected. If left unspecified, the `default` network\nwill be used.", + "type": "string" + }, + "zone": { + "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use location instead.", + "type": "string" + }, + "expireTime": { + "description": "[Output only] The time the cluster will be automatically\ndeleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" + }, + "nodeIpv4CidrSize": { + "format": "int32", + "description": "[Output only] The size of the address space on each node for hosting\ncontainers. This is provisioned from within the `container_ipv4_cidr`\nrange.", + "type": "integer" + }, + "loggingService": { + "description": "The logging service the cluster should use to write logs.\nCurrently available options:\n\n* `logging.googleapis.com` - the Google Cloud Logging service.\n* `none` - no logs will be exported from the cluster.\n* if left as an empty string,`logging.googleapis.com` will be used.", + "type": "string" + }, + "masterAuthorizedNetworksConfig": { + "description": "The configuration options for master authorized networks feature.", + "$ref": "MasterAuthorizedNetworksConfig" + }, + "statusMessage": { + "description": "[Output only] Additional information about the current status of this\ncluster, if available.", + "type": "string" + }, + "masterAuth": { + "description": "The authentication information for accessing the master endpoint.", + "$ref": "MasterAuth" + }, + "currentMasterVersion": { + "description": "[Output only] The current software version of the master endpoint.", + "type": "string" + }, + "nodeConfig": { + "description": "Parameters used in creating the cluster's nodes.\nSee `nodeConfig` for the description of its properties.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"initial_node_count\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.\nFor responses, this field will be populated with the node configuration of\nthe first node pool.\n\nIf unspecified, the defaults are used.", + "$ref": "NodeConfig" + }, + "addonsConfig": { + "$ref": "AddonsConfig", + "description": "Configurations for the various addons available to run in the cluster." + }, + "status": { + "description": "[Output only] The current status of this cluster.", + "type": "string", + "enumDescriptions": [ + "Not set.", + "The PROVISIONING state indicates the cluster is being created.", + "The RUNNING state indicates the cluster has been created and is fully\nusable.", + "The RECONCILING state indicates that some work is actively being done on\nthe cluster, such as upgrading the master or node software. Details can\nbe found in the `statusMessage` field.", + "The STOPPING state indicates the cluster is being deleted.", + "The ERROR state indicates the cluster may be unusable. Details\ncan be found in the `statusMessage` field." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "PROVISIONING", + "RUNNING", + "RECONCILING", + "STOPPING", + "ERROR" + ] + }, + "subnetwork": { + "description": "The name of the Google Compute Engine\n[subnetwork](/compute/docs/subnetworks) to which the\ncluster is connected.", + "type": "string" + }, + "currentNodeVersion": { + "description": "[Output only] The current version of the node software components.\nIf they are currently at multiple versions because they're in the process\nof being upgraded, this reflects the minimum version of all nodes.", + "type": "string" + }, + "name": { + "description": "The name of this cluster. The name must be unique within this project\nand zone, and can be up to 40 characters with the following restrictions:\n\n* Lowercase letters, numbers, and hyphens only.\n* Must start with a letter.\n* Must end with a number or a letter.", + "type": "string" + } + }, + "id": "Cluster" + }, + "CreateNodePoolRequest": { + "description": "CreateNodePoolRequest creates a node pool for a cluster.", + "type": "object", + "properties": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use parent instead.", + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", + "type": "string" + }, + "parent": { + "description": "The parent (project, location, cluster id) where the node pool will be created.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + "type": "string" + }, + "nodePool": { + "$ref": "NodePool", + "description": "The node pool to create." + }, + "clusterId": { + "description": "The name of the cluster.\nThis field is deprecated, use parent instead.", + "type": "string" + } + }, + "id": "CreateNodePoolRequest" + }, + "ListOperationsResponse": { + "description": "ListOperationsResponse is the result of ListOperationsRequest.", + "type": "object", + "properties": { + "operations": { + "description": "A list of operations in the project in the specified zone.", + "items": { + "$ref": "Operation" + }, + "type": "array" + }, + "missingZones": { + "description": "If any zones are listed here, the list of operations returned\nmay be missing the operations from those zones.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "ListOperationsResponse" + }, + "CidrBlock": { + "description": "CidrBlock contains an optional name and one CIDR block.", + "type": "object", + "properties": { + "cidrBlock": { + "description": "cidr_block must be specified in CIDR notation.", + "type": "string" + }, + "displayName": { + "description": "display_name is an optional field for users to identify CIDR blocks.", + "type": "string" + } + }, + "id": "CidrBlock" + }, + "ServerConfig": { + "description": "Container Engine service configuration.", + "type": "object", + "properties": { + "validMasterVersions": { + "description": "List of valid master versions.", + "items": { + "type": "string" + }, + "type": "array" + }, + "defaultImageType": { + "description": "Default image type.", + "type": "string" + }, + "defaultClusterVersion": { + "description": "Version of Kubernetes the service deploys by default.", + "type": "string" + }, + "validImageTypes": { + "description": "List of valid image types.", + "items": { + "type": "string" + }, + "type": "array" + }, + "validNodeVersions": { + "description": "List of valid node upgrade target versions.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "ServerConfig" + }, + "MasterAuth": { + "description": "The authentication information for accessing the master endpoint.\nAuthentication can be done using HTTP basic auth or using client\ncertificates.", + "type": "object", + "properties": { + "clusterCaCertificate": { + "description": "[Output only] Base64-encoded public certificate that is the root of\ntrust for the cluster.", + "type": "string" + }, + "clientCertificate": { + "description": "[Output only] Base64-encoded public certificate used by clients to\nauthenticate to the cluster endpoint.", + "type": "string" + }, + "username": { + "description": "The username to use for HTTP basic authentication to the master endpoint.\nFor clusters v1.6.0 and later, you can disable basic authentication by\nproviding an empty username.", + "type": "string" + }, + "password": { + "description": "The password to use for HTTP basic authentication to the master endpoint.\nBecause the master endpoint is open to the Internet, you should create a\nstrong password. If a password is provided for cluster creation, username\nmust be non-empty.", + "type": "string" + }, + "clientCertificateConfig": { + "$ref": "ClientCertificateConfig", + "description": "Configuration for client certificate authentication on the cluster. If no\nconfiguration is specified, a client certificate is issued." + }, + "clientKey": { + "description": "[Output only] Base64-encoded private key used by clients to authenticate\nto the cluster endpoint.", + "type": "string" + } + }, + "id": "MasterAuth" + }, + "NodeConfig": { + "description": "Parameters that describe the nodes in a cluster.", + "type": "object", + "properties": { + "labels": { + "description": "The map of Kubernetes labels (key/value pairs) to be applied to each node.\nThese will added in addition to any default label(s) that\nKubernetes may apply to the node.\nIn case of conflict in label keys, the applied set may differ depending on\nthe Kubernetes version -- it's best to assume the behavior is undefined\nand conflicts should be avoided.\nFor more information, including usage and the valid values, see:\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "localSsdCount": { + "format": "int32", + "description": "The number of local SSD disks to be attached to the node.\n\nThe limit for this value is dependant upon the maximum number of\ndisks available on a machine per zone. See:\nhttps://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits\nfor more information.", + "type": "integer" + }, + "metadata": { + "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 four reserved keys:\n\"instance-template\", \"kube-env\", \"startup-script\", and \"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", + "additionalProperties": { + "type": "string" + } + }, + "diskSizeGb": { + "format": "int32", + "description": "Size of the disk attached to each node, specified in GB.\nThe smallest allowed disk size is 10GB.\n\nIf unspecified, the default disk size is 100GB.", + "type": "integer" + }, + "tags": { + "description": "The list of instance tags applied to all nodes. Tags are used to identify\nvalid sources or targets for network firewalls and are specified by\nthe client during cluster or node pool creation. Each tag within the list\nmust comply with RFC1035.", + "items": { + "type": "string" + }, + "type": "array" + }, + "serviceAccount": { + "description": "The Google Cloud Platform Service Account to be used by the node VMs. If\nno Service Account is specified, the \"default\" service account is used.", + "type": "string" + }, + "accelerators": { + "description": "A list of hardware accelerators to be attached to each node.\nSee https://cloud.google.com/compute/docs/gpus for more information about\nsupport for GPUs.", + "items": { + "$ref": "AcceleratorConfig" + }, + "type": "array" + }, + "machineType": { + "description": "The name of a Google Compute Engine [machine\ntype](/compute/docs/machine-types) (e.g.\n`n1-standard-1`).\n\nIf unspecified, the default machine type is\n`n1-standard-1`.", + "type": "string" + }, + "imageType": { + "description": "The image type to use for this node. Note that for a given image type,\nthe latest version of it will be used.", + "type": "string" + }, + "oauthScopes": { + "description": "The set of Google API scopes to be made available on all of the\nnode VMs under the \"default\" service account.\n\nThe following scopes are recommended, but not required, and by default are\nnot included:\n\n* `https://www.googleapis.com/auth/compute` is required for mounting\npersistent storage on your nodes.\n* `https://www.googleapis.com/auth/devstorage.read_only` is required for\ncommunicating with **gcr.io**\n(the [Google Container Registry](/container-registry/)).\n\nIf unspecified, no scopes are added, unless Cloud Logging or Cloud\nMonitoring are enabled, in which case their required scopes will be added.", + "items": { + "type": "string" + }, + "type": "array" + }, + "preemptible": { + "description": "Whether the nodes are created as preemptible VM instances. See:\nhttps://cloud.google.com/compute/docs/instances/preemptible for more\ninforamtion about preemptible VM instances.", + "type": "boolean" + } + }, + "id": "NodeConfig" + }, + "AutoUpgradeOptions": { + "description": "AutoUpgradeOptions defines the set of options for the user to control how\nthe Auto Upgrades will proceed.", + "type": "object", + "properties": { + "description": { + "description": "[Output only] This field is set when upgrades are about to commence\nwith the description of the upgrade.", + "type": "string" + }, + "autoUpgradeStartTime": { + "description": "[Output only] This field is set when upgrades are about to commence\nwith the approximate start time for the upgrades, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" + } + }, + "id": "AutoUpgradeOptions" + } + }, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "protocol": "rest", + "canonicalName": "Container", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://container.googleapis.com/", + "ownerDomain": "google.com", + "name": "container" +} diff --git a/vendor/google.golang.org/api/container/v1beta1/container-gen.go b/vendor/google.golang.org/api/container/v1beta1/container-gen.go new file mode 100644 index 000000000..9896ade0c --- /dev/null +++ b/vendor/google.golang.org/api/container/v1beta1/container-gen.go @@ -0,0 +1,9066 @@ +// Package container provides access to the Google Container Engine API. +// +// See https://cloud.google.com/container-engine/ +// +// Usage example: +// +// import "google.golang.org/api/container/v1beta1" +// ... +// containerService, err := container.New(oauthHttpClient) +package container // import "google.golang.org/api/container/v1beta1" + +import ( + "bytes" + "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" +) + +// 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 = "container:v1beta1" +const apiName = "container" +const apiVersion = "v1beta1" +const basePath = "https://container.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" +) + +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + rs.Zones = NewProjectsZonesService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService + + Zones *ProjectsZonesService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Clusters = NewProjectsLocationsClustersService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Clusters *ProjectsLocationsClustersService + + Operations *ProjectsLocationsOperationsService +} + +func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService { + rs := &ProjectsLocationsClustersService{s: s} + rs.NodePools = NewProjectsLocationsClustersNodePoolsService(s) + return rs +} + +type ProjectsLocationsClustersService struct { + s *Service + + NodePools *ProjectsLocationsClustersNodePoolsService +} + +func NewProjectsLocationsClustersNodePoolsService(s *Service) *ProjectsLocationsClustersNodePoolsService { + rs := &ProjectsLocationsClustersNodePoolsService{s: s} + return rs +} + +type ProjectsLocationsClustersNodePoolsService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsZonesService(s *Service) *ProjectsZonesService { + rs := &ProjectsZonesService{s: s} + rs.Clusters = NewProjectsZonesClustersService(s) + rs.Operations = NewProjectsZonesOperationsService(s) + return rs +} + +type ProjectsZonesService struct { + s *Service + + Clusters *ProjectsZonesClustersService + + Operations *ProjectsZonesOperationsService +} + +func NewProjectsZonesClustersService(s *Service) *ProjectsZonesClustersService { + rs := &ProjectsZonesClustersService{s: s} + rs.NodePools = NewProjectsZonesClustersNodePoolsService(s) + return rs +} + +type ProjectsZonesClustersService struct { + s *Service + + NodePools *ProjectsZonesClustersNodePoolsService +} + +func NewProjectsZonesClustersNodePoolsService(s *Service) *ProjectsZonesClustersNodePoolsService { + rs := &ProjectsZonesClustersNodePoolsService{s: s} + return rs +} + +type ProjectsZonesClustersNodePoolsService struct { + s *Service +} + +func NewProjectsZonesOperationsService(s *Service) *ProjectsZonesOperationsService { + rs := &ProjectsZonesOperationsService{s: s} + return rs +} + +type ProjectsZonesOperationsService struct { + s *Service +} + +// AcceleratorConfig: AcceleratorConfig represents a Hardware +// Accelerator request. +type AcceleratorConfig struct { + // AcceleratorCount: The number of the accelerator cards exposed to an + // instance. + AcceleratorCount int64 `json:"acceleratorCount,omitempty,string"` + + // AcceleratorType: The accelerator type resource name. List of + // supported accelerators + // [here](/compute/docs/gpus/#Introduction) + AcceleratorType string `json:"acceleratorType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AcceleratorCount") 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. "AcceleratorCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { + type noMethod AcceleratorConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AddonsConfig: Configuration for the addons that can be automatically +// spun up in the +// cluster, enabling additional functionality. +type AddonsConfig struct { + // HorizontalPodAutoscaling: Configuration for the horizontal pod + // autoscaling feature, which + // increases or decreases the number of replica pods a replication + // controller + // has based on the resource usage of the existing pods. + HorizontalPodAutoscaling *HorizontalPodAutoscaling `json:"horizontalPodAutoscaling,omitempty"` + + // HttpLoadBalancing: Configuration for the HTTP (L7) load balancing + // controller addon, which + // makes it easy to set up HTTP load balancers for services in a + // cluster. + HttpLoadBalancing *HttpLoadBalancing `json:"httpLoadBalancing,omitempty"` + + // KubernetesDashboard: Configuration for the Kubernetes Dashboard. + KubernetesDashboard *KubernetesDashboard `json:"kubernetesDashboard,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "HorizontalPodAutoscaling") 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. "HorizontalPodAutoscaling") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AddonsConfig) MarshalJSON() ([]byte, error) { + type noMethod AddonsConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AutoUpgradeOptions: AutoUpgradeOptions defines the set of options for +// the user to control how +// the Auto Upgrades will proceed. +type AutoUpgradeOptions struct { + // AutoUpgradeStartTime: [Output only] This field is set when upgrades + // are about to commence + // with the approximate start time for the upgrades, + // in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + AutoUpgradeStartTime string `json:"autoUpgradeStartTime,omitempty"` + + // Description: [Output only] This field is set when upgrades are about + // to commence + // with the description of the upgrade. + Description string `json:"description,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AutoUpgradeStartTime") 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. "AutoUpgradeStartTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AutoUpgradeOptions) MarshalJSON() ([]byte, error) { + type noMethod AutoUpgradeOptions + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: CancelOperationRequest cancels a single +// operation. +type CancelOperationRequest struct { + // Name: The name (project, location, operation id) of the operation to + // cancel. + // Specified in the format 'projects/*/locations/*/operations/*'. + Name string `json:"name,omitempty"` + + // OperationId: The server-assigned `name` of the operation. + // This field is deprecated, use name instead. + OperationId string `json:"operationId,omitempty"` + + // ProjectId: The Google Developers Console [project ID or + // project + // number](https://support.google.com/cloud/answer/6158840). + // This + // field is deprecated, use name instead. + ProjectId string `json:"projectId,omitempty"` + + // Zone: The name of the Google Compute + // Engine + // [zone](/compute/docs/zones#available) in which the operation + // resides. + // This field is deprecated, use name instead. + Zone string `json:"zone,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 *CancelOperationRequest) MarshalJSON() ([]byte, error) { + type noMethod CancelOperationRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CidrBlock: CidrBlock contains an optional name and one CIDR block. +type CidrBlock struct { + // CidrBlock: cidr_block must be specified in CIDR notation. + CidrBlock string `json:"cidrBlock,omitempty"` + + // DisplayName: display_name is an optional field for users to identify + // CIDR blocks. + DisplayName string `json:"displayName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CidrBlock") 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. "CidrBlock") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CidrBlock) MarshalJSON() ([]byte, error) { + type noMethod CidrBlock + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ClientCertificateConfig: Configuration for client certificates on the +// cluster. +type ClientCertificateConfig struct { + // IssueClientCertificate: Issue a client certificate. + IssueClientCertificate bool `json:"issueClientCertificate,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "IssueClientCertificate") 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. "IssueClientCertificate") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ClientCertificateConfig) MarshalJSON() ([]byte, error) { + type noMethod ClientCertificateConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Cluster: A Google Container Engine cluster. +type Cluster struct { + // AddonsConfig: Configurations for the various addons available to run + // in the cluster. + AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"` + + // ClusterIpv4Cidr: The IP address range of the container pods in this + // cluster, + // in + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // + // notation (e.g. `10.96.0.0/14`). Leave blank to have + // one automatically chosen or specify a `/14` block in `10.0.0.0/8`. + ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` + + // CreateTime: [Output only] The time the cluster was created, + // in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + CreateTime string `json:"createTime,omitempty"` + + // CurrentMasterVersion: [Output only] The current software version of + // the master endpoint. + CurrentMasterVersion string `json:"currentMasterVersion,omitempty"` + + // CurrentNodeCount: [Output only] The number of nodes currently in the + // cluster. + CurrentNodeCount int64 `json:"currentNodeCount,omitempty"` + + // CurrentNodeVersion: [Output only] The current version of the node + // software components. + // If they are currently at multiple versions because they're in the + // process + // of being upgraded, this reflects the minimum version of all nodes. + CurrentNodeVersion string `json:"currentNodeVersion,omitempty"` + + // Description: An optional description of this cluster. + Description string `json:"description,omitempty"` + + // EnableKubernetesAlpha: Kubernetes alpha features are enabled on this + // cluster. This includes alpha + // API groups (e.g. v1beta1) and features that may not be production + // ready in + // the kubernetes version of the master and nodes. + // The cluster has no SLA for uptime and master/node upgrades are + // disabled. + // Alpha enabled clusters are automatically deleted thirty days + // after + // creation. + EnableKubernetesAlpha bool `json:"enableKubernetesAlpha,omitempty"` + + // Endpoint: [Output only] The IP address of this cluster's master + // endpoint. + // The endpoint can be accessed from the internet + // at + // `https://username:password@endpoint/`. + // + // See the `masterAuth` property of this resource for username + // and + // password information. + Endpoint string `json:"endpoint,omitempty"` + + // ExpireTime: [Output only] The time the cluster will be + // automatically + // deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text + // format. + ExpireTime string `json:"expireTime,omitempty"` + + // InitialClusterVersion: The initial Kubernetes version for this + // cluster. Valid versions are those + // found in validMasterVersions returned by getServerConfig. The + // version can + // be upgraded over time; such upgrades are reflected + // in + // currentMasterVersion and currentNodeVersion. + InitialClusterVersion string `json:"initialClusterVersion,omitempty"` + + // InitialNodeCount: The number of nodes to create in this cluster. You + // must ensure that your + // Compute Engine resource + // quota + // is sufficient for this number of instances. You must also have + // available + // firewall and routes quota. + // For requests, this field should only be used in lieu of a + // "node_pool" object, since this configuration (along with + // the + // "node_config") will be used to create a "NodePool" object with + // an + // auto-generated name. Do not use this and a node_pool at the same + // time. + InitialNodeCount int64 `json:"initialNodeCount,omitempty"` + + // InstanceGroupUrls: [Output only] The resource URLs of + // [instance + // groups](/compute/docs/instance-groups/) associated with this + // cluster. + InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` + + // IpAllocationPolicy: Configuration for cluster IP allocation. + IpAllocationPolicy *IPAllocationPolicy `json:"ipAllocationPolicy,omitempty"` + + // Location: [Output only] The name of the Google Compute + // Engine + // [zone](/compute/docs/regions-zones/regions-zones#available) + // or + // [region](/compute/docs/regions-zones/regions-zones#available) in + // which + // the cluster resides. + Location string `json:"location,omitempty"` + + // Locations: The list of Google Compute + // Engine + // [locations](/compute/docs/zones#available) in which the cluster's + // nodes + // should be located. + Locations []string `json:"locations,omitempty"` + + // LoggingService: The logging service the cluster should use to write + // logs. + // Currently available options: + // + // * `logging.googleapis.com` - the Google Cloud Logging service. + // * `none` - no logs will be exported from the cluster. + // * if left as an empty string,`logging.googleapis.com` will be used. + LoggingService string `json:"loggingService,omitempty"` + + // MasterAuth: The authentication information for accessing the master + // endpoint. + MasterAuth *MasterAuth `json:"masterAuth,omitempty"` + + // MasterAuthorizedNetworksConfig: The configuration options for master + // authorized networks feature. + MasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"masterAuthorizedNetworksConfig,omitempty"` + + // MonitoringService: The monitoring service the cluster should use to + // write metrics. + // Currently available options: + // + // * `monitoring.googleapis.com` - the Google Cloud Monitoring + // service. + // * `none` - no metrics will be exported from the cluster. + // * if left as an empty string, `monitoring.googleapis.com` will be + // used. + MonitoringService string `json:"monitoringService,omitempty"` + + // Name: The name of this cluster. The name must be unique within this + // project + // and zone, and can be up to 40 characters with the following + // restrictions: + // + // * Lowercase letters, numbers, and hyphens only. + // * Must start with a letter. + // * Must end with a number or a letter. + Name string `json:"name,omitempty"` + + // Network: The name of the Google Compute + // Engine + // [network](/compute/docs/networks-and-firewalls#networks) to which + // the + // cluster is connected. If left unspecified, the `default` network + // will be used. + Network string `json:"network,omitempty"` + + // NetworkPolicy: Configuration options for the NetworkPolicy feature. + NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"` + + // NodeConfig: Parameters used in creating the cluster's nodes. + // See `nodeConfig` for the description of its properties. + // For requests, this field should only be used in lieu of a + // "node_pool" object, since this configuration (along with + // the + // "initial_node_count") will be used to create a "NodePool" object with + // an + // auto-generated name. Do not use this and a node_pool at the same + // time. + // For responses, this field will be populated with the node + // configuration of + // the first node pool. + // + // If unspecified, the defaults are used. + NodeConfig *NodeConfig `json:"nodeConfig,omitempty"` + + // NodeIpv4CidrSize: [Output only] The size of the address space on each + // node for hosting + // containers. This is provisioned from within the + // `container_ipv4_cidr` + // range. + NodeIpv4CidrSize int64 `json:"nodeIpv4CidrSize,omitempty"` + + // NodePools: The node pools associated with this cluster. + // This field should not be set if "node_config" or "initial_node_count" + // are + // specified. + NodePools []*NodePool `json:"nodePools,omitempty"` + + // SelfLink: [Output only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServicesIpv4Cidr: [Output only] The IP address range of the + // Kubernetes services in + // this cluster, + // in + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // + // notation (e.g. `1.2.3.4/29`). Service addresses are + // typically put in the last `/16` from the container CIDR. + ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` + + // Status: [Output only] The current status of this cluster. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Not set. + // "PROVISIONING" - The PROVISIONING state indicates the cluster is + // being created. + // "RUNNING" - The RUNNING state indicates the cluster has been + // created and is fully + // usable. + // "RECONCILING" - The RECONCILING state indicates that some work is + // actively being done on + // the cluster, such as upgrading the master or node software. Details + // can + // be found in the `statusMessage` field. + // "STOPPING" - The STOPPING state indicates the cluster is being + // deleted. + // "ERROR" - The ERROR state indicates the cluster may be unusable. + // Details + // can be found in the `statusMessage` field. + Status string `json:"status,omitempty"` + + // StatusMessage: [Output only] Additional information about the current + // status of this + // cluster, if available. + StatusMessage string `json:"statusMessage,omitempty"` + + // Subnetwork: The name of the Google Compute + // Engine + // [subnetwork](/compute/docs/subnetworks) to which the + // cluster is connected. + Subnetwork string `json:"subnetwork,omitempty"` + + // Zone: [Output only] The name of the Google Compute + // Engine + // [zone](/compute/docs/zones#available) in which the + // cluster + // resides. + // This field is deprecated, use location instead. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AddonsConfig") 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. "AddonsConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Cluster) MarshalJSON() ([]byte, error) { + type noMethod Cluster + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ClusterUpdate: ClusterUpdate describes an update to the cluster. +// Exactly one update can +// be applied to a cluster with each request, so at most one field can +// be +// provided. +type ClusterUpdate struct { + // DesiredAddonsConfig: Configurations for the various addons available + // to run in the cluster. + DesiredAddonsConfig *AddonsConfig `json:"desiredAddonsConfig,omitempty"` + + // DesiredImageType: The desired image type for the node pool. + // NOTE: Set the "desired_node_pool" field as well. + DesiredImageType string `json:"desiredImageType,omitempty"` + + // DesiredLocations: The desired list of Google Compute + // Engine + // [locations](/compute/docs/zones#available) in which the cluster's + // nodes + // should be located. Changing the locations a cluster is in will + // result + // in nodes being either created or removed from the cluster, depending + // on + // whether locations are being added or removed. + // + // This list must always include the cluster's primary zone. + DesiredLocations []string `json:"desiredLocations,omitempty"` + + // DesiredMasterAuthorizedNetworksConfig: The desired configuration + // options for master authorized networks feature. + DesiredMasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"desiredMasterAuthorizedNetworksConfig,omitempty"` + + // DesiredMasterVersion: The Kubernetes version to change the master to. + // The only valid value is the + // latest supported version. Use "-" to have the server automatically + // select + // the latest version. + DesiredMasterVersion string `json:"desiredMasterVersion,omitempty"` + + // DesiredMonitoringService: The monitoring service the cluster should + // use to write metrics. + // Currently available options: + // + // * "monitoring.googleapis.com" - the Google Cloud Monitoring service + // * "none" - no metrics will be exported from the cluster + DesiredMonitoringService string `json:"desiredMonitoringService,omitempty"` + + // DesiredNodePoolAutoscaling: Autoscaler configuration for the node + // pool specified in + // desired_node_pool_id. If there is only one pool in the + // cluster and desired_node_pool_id is not provided then + // the change applies to that single node pool. + DesiredNodePoolAutoscaling *NodePoolAutoscaling `json:"desiredNodePoolAutoscaling,omitempty"` + + // DesiredNodePoolId: The node pool to be upgraded. This field is + // mandatory if + // "desired_node_version", "desired_image_family" + // or + // "desired_node_pool_autoscaling" is specified and there is more than + // one + // node pool on the cluster. + DesiredNodePoolId string `json:"desiredNodePoolId,omitempty"` + + // DesiredNodeVersion: The Kubernetes version to change the nodes to + // (typically an + // upgrade). Use `-` to upgrade to the latest version supported by + // the server. + DesiredNodeVersion string `json:"desiredNodeVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DesiredAddonsConfig") + // 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. "DesiredAddonsConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ClusterUpdate) MarshalJSON() ([]byte, error) { + type noMethod ClusterUpdate + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CompleteIPRotationRequest: CompleteIPRotationRequest moves the +// cluster master back into single-IP mode. +type CompleteIPRotationRequest struct { + // ClusterId: The name of the cluster. + // This field is deprecated, use name instead. + ClusterId string `json:"clusterId,omitempty"` + + // Name: The name (project, location, cluster id) of the cluster to + // complete IP rotation. + // Specified in the format 'projects/*/locations/*/clusters/*'. + Name string `json:"name,omitempty"` + + // ProjectId: The Google Developers Console [project ID or + // project + // number](https://developers.google.com/console/help/new/#projec + // tnumber). + // This field is deprecated, use name instead. + ProjectId string `json:"projectId,omitempty"` + + // Zone: The name of the Google Compute + // Engine + // [zone](/compute/docs/zones#available) in which the + // cluster + // resides. + // This field is deprecated, use name instead. + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterId") 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. "ClusterId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CompleteIPRotationRequest) MarshalJSON() ([]byte, error) { + type noMethod CompleteIPRotationRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CreateClusterRequest: CreateClusterRequest creates a cluster. +type CreateClusterRequest struct { + // Cluster: A + // [cluster + // resource](/container-engine/reference/rest/v1beta1/projects.z + // ones.clusters) + Cluster *Cluster `json:"cluster,omitempty"` + + // Parent: The parent (project and location) where the cluster will be + // created. + // Specified in the format 'projects/*/locations/*'. + Parent string `json:"parent,omitempty"` + + // ProjectId: The Google Developers Console [project ID or + // project + // number](https://support.google.com/cloud/answer/6158840). + // This + // field is deprecated, use parent instead. + ProjectId string `json:"projectId,omitempty"` + + // Zone: The name of the Google Compute + // Engine + // [zone](/compute/docs/zones#available) in which the + // cluster + // resides. + // This field is deprecated, use parent instead. + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cluster") 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. "Cluster") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateClusterRequest) MarshalJSON() ([]byte, error) { + type noMethod CreateClusterRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CreateNodePoolRequest: CreateNodePoolRequest creates a node pool for +// a cluster. +type CreateNodePoolRequest struct { + // ClusterId: The name of the cluster. + // This field is deprecated, use parent instead. + ClusterId string `json:"clusterId,omitempty"` + + // NodePool: The node pool to create. + NodePool *NodePool `json:"nodePool,omitempty"` + + // Parent: The parent (project, location, cluster id) where the node + // pool will be created. + // Specified in the format + // 'projects/*/locations/*/clusters/*/nodePools/*'. + Parent string `json:"parent,omitempty"` + + // ProjectId: The Google Developers Console [project ID or + // project + // number](https://developers.google.com/console/help/new/#projec + // tnumber). + // This field is deprecated, use parent instead. + ProjectId string `json:"projectId,omitempty"` + + // Zone: The name of the Google Compute + // Engine + // [zone](/compute/docs/zones#available) in which the + // cluster + // resides. + // This field is deprecated, use parent instead. + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterId") 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. "ClusterId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateNodePoolRequest) MarshalJSON() ([]byte, error) { + type noMethod CreateNodePoolRequest + 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:"-"` +} + +// HorizontalPodAutoscaling: Configuration options for the horizontal +// pod autoscaling feature, which +// increases or decreases the number of replica pods a replication +// controller +// has based on the resource usage of the existing pods. +type HorizontalPodAutoscaling struct { + // Disabled: Whether the Horizontal Pod Autoscaling feature is enabled + // in the cluster. + // When enabled, it ensures that a Heapster pod is running in the + // cluster, + // which is also used by the Cloud Monitoring service. + Disabled bool `json:"disabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Disabled") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Disabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HorizontalPodAutoscaling) MarshalJSON() ([]byte, error) { + type noMethod HorizontalPodAutoscaling + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpLoadBalancing: Configuration options for the HTTP (L7) load +// balancing controller addon, +// which makes it easy to set up HTTP load balancers for services in a +// cluster. +type HttpLoadBalancing struct { + // Disabled: Whether the HTTP Load Balancing controller is enabled in + // the cluster. + // When enabled, it runs a small pod in the cluster that manages the + // load + // balancers. + Disabled bool `json:"disabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Disabled") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Disabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpLoadBalancing) MarshalJSON() ([]byte, error) { + type noMethod HttpLoadBalancing + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// IPAllocationPolicy: Configuration for controlling how IPs are +// allocated in the cluster. +type IPAllocationPolicy struct { + // ClusterIpv4Cidr: This field is deprecated, use + // cluster_ipv4_cidr_block. + ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` + + // ClusterIpv4CidrBlock: The IP address range for the cluster pod IPs. + // If this field is set, then + // `cluster.cluster_ipv4_cidr` must be left blank. + // + // This field is only applicable when `use_ip_aliases` is true. + // + // Set to blank to have a range chosen with the default size. + // + // Set to /netmask (e.g. `/14`) to have a range chosen with a + // specific + // netmask. + // + // Set to + // a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks + // (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific + // range + // to use. + ClusterIpv4CidrBlock string `json:"clusterIpv4CidrBlock,omitempty"` + + // ClusterSecondaryRangeName: The name of the secondary range to be used + // for the cluster CIDR + // block. The secondary range will be used for pod IP + // addresses. This must be an existing secondary range associated + // with the cluster subnetwork. + // + // This field is only applicable with use_ip_aliases + // and + // create_subnetwork is false. + ClusterSecondaryRangeName string `json:"clusterSecondaryRangeName,omitempty"` + + // CreateSubnetwork: Whether a new subnetwork will be created + // automatically for the cluster. + // + // This field is only applicable when `use_ip_aliases` is true. + CreateSubnetwork bool `json:"createSubnetwork,omitempty"` + + // NodeIpv4Cidr: This field is deprecated, use node_ipv4_cidr_block. + NodeIpv4Cidr string `json:"nodeIpv4Cidr,omitempty"` + + // NodeIpv4CidrBlock: The IP address range of the instance IPs in this + // cluster. + // + // This is applicable only if `create_subnetwork` is true. + // + // Set to blank to have a range chosen with the default size. + // + // Set to /netmask (e.g. `/14`) to have a range chosen with a + // specific + // netmask. + // + // Set to + // a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks + // (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific + // range + // to use. + NodeIpv4CidrBlock string `json:"nodeIpv4CidrBlock,omitempty"` + + // ServicesIpv4Cidr: This field is deprecated, use + // services_ipv4_cidr_block. + ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` + + // ServicesIpv4CidrBlock: The IP address range of the services IPs in + // this cluster. If blank, a range + // will be automatically chosen with the default size. + // + // This field is only applicable when `use_ip_aliases` is true. + // + // Set to blank to have a range chosen with the default size. + // + // Set to /netmask (e.g. `/14`) to have a range chosen with a + // specific + // netmask. + // + // Set to + // a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks + // (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific + // range + // to use. + ServicesIpv4CidrBlock string `json:"servicesIpv4CidrBlock,omitempty"` + + // ServicesSecondaryRangeName: The name of the secondary range to be + // used as for the services + // CIDR block. The secondary range will be used for service + // ClusterIPs. This must be an existing secondary range associated + // with the cluster subnetwork. + // + // This field is only applicable with use_ip_aliases + // and + // create_subnetwork is false. + ServicesSecondaryRangeName string `json:"servicesSecondaryRangeName,omitempty"` + + // SubnetworkName: A custom subnetwork name to be used if + // `create_subnetwork` is true. If + // this field is empty, then an automatic name will be chosen for the + // new + // subnetwork. + SubnetworkName string `json:"subnetworkName,omitempty"` + + // UseIpAliases: Whether alias IPs will be used for pod IPs in the + // cluster. + UseIpAliases bool `json:"useIpAliases,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterIpv4Cidr") 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. "ClusterIpv4Cidr") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *IPAllocationPolicy) MarshalJSON() ([]byte, error) { + type noMethod IPAllocationPolicy + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// KubernetesDashboard: Configuration for the Kubernetes Dashboard. +type KubernetesDashboard struct { + // Disabled: Whether the Kubernetes Dashboard is enabled for this + // cluster. + Disabled bool `json:"disabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Disabled") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Disabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *KubernetesDashboard) MarshalJSON() ([]byte, error) { + type noMethod KubernetesDashboard + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListClustersResponse: ListClustersResponse is the result of +// ListClustersRequest. +type ListClustersResponse struct { + // Clusters: A list of clusters in the project in the specified zone, + // or + // across all ones. + Clusters []*Cluster `json:"clusters,omitempty"` + + // MissingZones: If any zones are listed here, the list of clusters + // returned + // may be missing those zones. + MissingZones []string `json:"missingZones,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Clusters") 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. "Clusters") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListClustersResponse) MarshalJSON() ([]byte, error) { + type noMethod ListClustersResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListNodePoolsResponse: ListNodePoolsResponse is the result of +// ListNodePoolsRequest. +type ListNodePoolsResponse struct { + // NodePools: A list of node pools for a cluster. + NodePools []*NodePool `json:"nodePools,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NodePools") 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. "NodePools") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListNodePoolsResponse) MarshalJSON() ([]byte, error) { + type noMethod ListNodePoolsResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: ListOperationsResponse is the result of +// ListOperationsRequest. +type ListOperationsResponse struct { + // MissingZones: If any zones are listed here, the list of operations + // returned + // may be missing the operations from those zones. + MissingZones []string `json:"missingZones,omitempty"` + + // Operations: A list of operations in the project in the specified + // zone. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "MissingZones") 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. "MissingZones") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type noMethod ListOperationsResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MasterAuth: The authentication information for accessing the master +// endpoint. +// Authentication can be done using HTTP basic auth or using +// client +// certificates. +type MasterAuth struct { + // ClientCertificate: [Output only] Base64-encoded public certificate + // used by clients to + // authenticate to the cluster endpoint. + ClientCertificate string `json:"clientCertificate,omitempty"` + + // ClientCertificateConfig: Configuration for client certificate + // authentication on the cluster. If no + // configuration is specified, a client certificate is issued. + ClientCertificateConfig *ClientCertificateConfig `json:"clientCertificateConfig,omitempty"` + + // ClientKey: [Output only] Base64-encoded private key used by clients + // to authenticate + // to the cluster endpoint. + ClientKey string `json:"clientKey,omitempty"` + + // ClusterCaCertificate: [Output only] Base64-encoded public certificate + // that is the root of + // trust for the cluster. + ClusterCaCertificate string `json:"clusterCaCertificate,omitempty"` + + // Password: The password to use for HTTP basic authentication to the + // master endpoint. + // Because the master endpoint is open to the Internet, you should + // create a + // strong password. If a password is provided for cluster creation, + // username + // must be non-empty. + Password string `json:"password,omitempty"` + + // Username: The username to use for HTTP basic authentication to the + // master endpoint. + // For clusters v1.6.0 and later, you can disable basic authentication + // by + // providing an empty username. + Username string `json:"username,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClientCertificate") + // 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. "ClientCertificate") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *MasterAuth) MarshalJSON() ([]byte, error) { + type noMethod MasterAuth + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MasterAuthorizedNetworksConfig: Configuration options for the master +// authorized networks feature. Enabled +// master authorized networks will disallow all external traffic to +// access +// Kubernetes master through HTTPS except traffic from the given CIDR +// blocks, +// Google Compute Engine Public IPs and Google Prod IPs. +type MasterAuthorizedNetworksConfig struct { + // CidrBlocks: cidr_blocks define up to 10 external networks that could + // access + // Kubernetes master through HTTPS. + CidrBlocks []*CidrBlock `json:"cidrBlocks,omitempty"` + + // Enabled: Whether or not master authorized networks is enabled. + Enabled bool `json:"enabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CidrBlocks") 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. "CidrBlocks") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MasterAuthorizedNetworksConfig) MarshalJSON() ([]byte, error) { + type noMethod MasterAuthorizedNetworksConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkPolicy: Configuration options for the NetworkPolicy +// feature. +// https://kubernetes.io/docs/concepts/services-networking/netwo +// rkpolicies/ +type NetworkPolicy struct { + // Enabled: Whether network policy is enabled on the cluster. + Enabled bool `json:"enabled,omitempty"` + + // Provider: The selected network policy provider. + // + // Possible values: + // "PROVIDER_UNSPECIFIED" - Not set + // "CALICO" - Tigera (Calico Felix). + Provider string `json:"provider,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") 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. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkPolicy) MarshalJSON() ([]byte, error) { + type noMethod NetworkPolicy + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NodeConfig: Parameters that describe the nodes in a cluster. +type NodeConfig struct { + // Accelerators: A list of hardware accelerators to be attached to each + // node. + // See https://cloud.google.com/compute/docs/gpus for more information + // about + // support for GPUs. + Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` + + // DiskSizeGb: Size of the disk attached to each node, specified in + // GB. + // The smallest allowed disk size is 10GB. + // + // If unspecified, the default disk size is 100GB. + DiskSizeGb int64 `json:"diskSizeGb,omitempty"` + + // ImageType: The image type to use for this node. Note that for a given + // image type, + // the latest version of it will be used. + ImageType string `json:"imageType,omitempty"` + + // Labels: The map of Kubernetes labels (key/value pairs) to be applied + // to each node. + // These will added in addition to any default label(s) that + // Kubernetes may apply to the node. + // In case of conflict in label keys, the applied set may differ + // depending on + // the Kubernetes version -- it's best to assume the behavior is + // undefined + // and conflicts should be avoided. + // For more information, including usage and the valid values, + // see: + // https://kubernetes.io/docs/concepts/overview/working-with-objects + // /labels/ + Labels map[string]string `json:"labels,omitempty"` + + // LocalSsdCount: The number of local SSD disks to be attached to the + // node. + // + // The limit for this value is dependant upon the maximum number + // of + // disks available on a machine per zone. + // See: + // https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_l + // imits + // for more information. + LocalSsdCount int64 `json:"localSsdCount,omitempty"` + + // MachineType: The name of a Google Compute Engine + // [machine + // type](/compute/docs/machine-types) (e.g. + // `n1-standard-1`). + // + // If unspecified, the default machine type is + // `n1-standard-1`. + MachineType string `json:"machineType,omitempty"` + + // Metadata: The metadata key/value pairs assigned to instances in the + // cluster. + // + // Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 + // bytes + // in length. These are reflected as part of a URL in the metadata + // server. + // Additionally, to avoid ambiguity, keys must not conflict with any + // other + // metadata keys for the project or be one of the four reserved + // keys: + // "instance-template", "kube-env", "startup-script", and + // "user-data" + // + // Values are free-form strings, and only have meaning as interpreted + // by + // the image running in the instance. The only restriction placed on + // them is + // that each value's size must be less than or equal to 32 KB. + // + // The total size of all keys and values must be less than 512 KB. + Metadata map[string]string `json:"metadata,omitempty"` + + // OauthScopes: The set of Google API scopes to be made available on all + // of the + // node VMs under the "default" service account. + // + // The following scopes are recommended, but not required, and by + // default are + // not included: + // + // * `https://www.googleapis.com/auth/compute` is required for + // mounting + // persistent storage on your nodes. + // * `https://www.googleapis.com/auth/devstorage.read_only` is required + // for + // communicating with **gcr.io** + // (the [Google Container Registry](/container-registry/)). + // + // If unspecified, no scopes are added, unless Cloud Logging or + // Cloud + // Monitoring are enabled, in which case their required scopes will be + // added. + OauthScopes []string `json:"oauthScopes,omitempty"` + + // Preemptible: Whether the nodes are created as preemptible VM + // instances. + // See: + // https://cloud.google.com/compute/docs/instances/preemptible for + // more + // inforamtion about preemptible VM instances. + Preemptible bool `json:"preemptible,omitempty"` + + // ServiceAccount: The Google Cloud Platform Service Account to be used + // by the node VMs. If + // no Service Account is specified, the "default" service account is + // used. + ServiceAccount string `json:"serviceAccount,omitempty"` + + // Tags: The list of instance tags applied to all nodes. Tags are used + // to identify + // valid sources or targets for network firewalls and are specified + // by + // the client during cluster or node pool creation. Each tag within the + // list + // must comply with RFC1035. + Tags []string `json:"tags,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Accelerators") 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. "Accelerators") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodeConfig) MarshalJSON() ([]byte, error) { + type noMethod NodeConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NodeManagement: NodeManagement defines the set of node management +// services turned on for the +// node pool. +type NodeManagement struct { + // AutoRepair: Whether the nodes will be automatically repaired. + AutoRepair bool `json:"autoRepair,omitempty"` + + // AutoUpgrade: Whether the nodes will be automatically upgraded. + AutoUpgrade bool `json:"autoUpgrade,omitempty"` + + // UpgradeOptions: Specifies the Auto Upgrade knobs for the node pool. + UpgradeOptions *AutoUpgradeOptions `json:"upgradeOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AutoRepair") 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. "AutoRepair") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodeManagement) MarshalJSON() ([]byte, error) { + type noMethod NodeManagement + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NodePool: NodePool contains the name and configuration for a +// cluster's node pool. +// Node pools are a set of nodes (i.e. VM's), with a common +// configuration and +// specification, under the control of the cluster master. They may have +// a set +// of Kubernetes labels applied to them, which may be used to reference +// them +// during pod scheduling. They may also be resized up or down, to +// accommodate +// the workload. +type NodePool struct { + // Autoscaling: Autoscaler configuration for this NodePool. Autoscaler + // is enabled + // only if a valid configuration is present. + Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"` + + // Config: The node configuration of the pool. + Config *NodeConfig `json:"config,omitempty"` + + // InitialNodeCount: The initial node count for the pool. You must + // ensure that your + // Compute Engine resource + // quota + // is sufficient for this number of instances. You must also have + // available + // firewall and routes quota. + InitialNodeCount int64 `json:"initialNodeCount,omitempty"` + + // InstanceGroupUrls: [Output only] The resource URLs of + // [instance + // groups](/compute/docs/instance-groups/) associated with this + // node pool. + InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` + + // Management: NodeManagement configuration for this NodePool. + Management *NodeManagement `json:"management,omitempty"` + + // Name: The name of the node pool. + Name string `json:"name,omitempty"` + + // SelfLink: [Output only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Status: [Output only] The status of the nodes in this pool instance. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Not set. + // "PROVISIONING" - The PROVISIONING state indicates the node pool is + // being created. + // "RUNNING" - The RUNNING state indicates the node pool has been + // created + // and is fully usable. + // "RUNNING_WITH_ERROR" - The RUNNING_WITH_ERROR state indicates the + // node pool has been created + // and is partially usable. Some error state has occurred and + // some + // functionality may be impaired. Customer may need to reissue a + // request + // or trigger a new update. + // "RECONCILING" - The RECONCILING state indicates that some work is + // actively being done on + // the node pool, such as upgrading node software. Details can + // be found in the `statusMessage` field. + // "STOPPING" - The STOPPING state indicates the node pool is being + // deleted. + // "ERROR" - The ERROR state indicates the node pool may be unusable. + // Details + // can be found in the `statusMessage` field. + Status string `json:"status,omitempty"` + + // StatusMessage: [Output only] Additional information about the current + // status of this + // node pool instance, if available. + StatusMessage string `json:"statusMessage,omitempty"` + + // Version: [Output only] The version of the Kubernetes of this node. + Version string `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. "Autoscaling") 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. "Autoscaling") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodePool) MarshalJSON() ([]byte, error) { + type noMethod NodePool + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NodePoolAutoscaling: NodePoolAutoscaling contains information +// required by cluster autoscaler to +// adjust the size of the node pool to the current cluster usage. +type NodePoolAutoscaling struct { + // Enabled: Is autoscaling enabled for this node pool. + Enabled bool `json:"enabled,omitempty"` + + // MaxNodeCount: Maximum number of nodes in the NodePool. Must be >= + // min_node_count. There + // has to enough quota to scale up the cluster. + MaxNodeCount int64 `json:"maxNodeCount,omitempty"` + + // MinNodeCount: Minimum number of nodes in the NodePool. Must be >= 1 + // and <= + // max_node_count. + MinNodeCount int64 `json:"minNodeCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") 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. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodePoolAutoscaling) MarshalJSON() ([]byte, error) { + type noMethod NodePoolAutoscaling + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This operation resource represents operations that may +// have happened or are +// happening on the cluster. All fields are output only. +type Operation struct { + // Detail: Detailed operation progress, if available. + Detail string `json:"detail,omitempty"` + + // EndTime: [Output only] The time the operation completed, + // in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + EndTime string `json:"endTime,omitempty"` + + // Location: [Output only] The name of the Google Compute + // Engine + // [zone](/compute/docs/regions-zones/regions-zones#available) + // or + // [region](/compute/docs/regions-zones/regions-zones#available) in + // which + // the cluster resides. + Location string `json:"location,omitempty"` + + // Name: The server-assigned ID for the operation. + Name string `json:"name,omitempty"` + + // OperationType: The operation type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Not set. + // "CREATE_CLUSTER" - Cluster create. + // "DELETE_CLUSTER" - Cluster delete. + // "UPGRADE_MASTER" - A master upgrade. + // "UPGRADE_NODES" - A node upgrade. + // "REPAIR_CLUSTER" - Cluster repair. + // "UPDATE_CLUSTER" - Cluster update. + // "CREATE_NODE_POOL" - Node pool create. + // "DELETE_NODE_POOL" - Node pool delete. + // "SET_NODE_POOL_MANAGEMENT" - Set node pool management. + // "AUTO_REPAIR_NODES" - Automatic node pool repair. + // "AUTO_UPGRADE_NODES" - Automatic node upgrade. + // "SET_LABELS" - Set labels. + // "SET_MASTER_AUTH" - Set/generate master auth materials + // "SET_NODE_POOL_SIZE" - Set node pool size. + // "SET_NETWORK_POLICY" - Updates network policy for a cluster. + // "SET_MAINTENANCE_POLICY" - Set the maintenance policy. + OperationType string `json:"operationType,omitempty"` + + // SelfLink: Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // StartTime: [Output only] The time the operation started, + // in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + StartTime string `json:"startTime,omitempty"` + + // Status: The current status of the operation. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Not set. + // "PENDING" - The operation has been created. + // "RUNNING" - The operation is currently running. + // "DONE" - The operation is done, either cancelled or completed. + // "ABORTING" - The operation is aborting. + Status string `json:"status,omitempty"` + + // StatusMessage: If an error has occurred, a textual description of the + // error. + StatusMessage string `json:"statusMessage,omitempty"` + + // TargetLink: Server-defined URL for the target of the operation. + TargetLink string `json:"targetLink,omitempty"` + + // Zone: The name of the Google Compute + // Engine + // [zone](/compute/docs/zones#available) in which the operation + // is taking place. + // This field is deprecated, use location instead. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Detail") 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. "Detail") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type noMethod Operation + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RollbackNodePoolUpgradeRequest: RollbackNodePoolUpgradeRequest +// rollbacks the previously Aborted or Failed +// NodePool upgrade. This will be an no-op if the last upgrade +// successfully +// completed. +type RollbackNodePoolUpgradeRequest struct { + // ClusterId: The name of the cluster to rollback. + // This field is deprecated, use name instead. + ClusterId string `json:"clusterId,omitempty"` + + // Name: The name (project, location, cluster, node pool id) of the node + // poll to + // rollback upgrade. + // Specified in the format + // 'projects/*/locations/*/clusters/*/nodePools/*'. + Name string `json:"name,omitempty"` + + // NodePoolId: The name of the node pool to rollback. + // This field is deprecated, use name instead. + NodePoolId string `json:"nodePoolId,omitempty"` + + // ProjectId: The Google Developers Console [project ID or + // project + // number](https://support.google.com/cloud/answer/6158840). + // This + // field is deprecated, use name instead. + ProjectId string `json:"projectId,omitempty"` + + // Zone: The name of the Google Compute + // Engine + // [zone](/compute/docs/zones#available) in which the + // cluster + // resides. + // This field is deprecated, use name instead. + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterId") 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. "ClusterId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RollbackNodePoolUpgradeRequest) MarshalJSON() ([]byte, error) { + type noMethod RollbackNodePoolUpgradeRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServerConfig: Container Engine service configuration. +type ServerConfig struct { + // DefaultClusterVersion: Version of Kubernetes the service deploys by + // default. + DefaultClusterVersion string `json:"defaultClusterVersion,omitempty"` + + // DefaultImageType: Default image type. + DefaultImageType string `json:"defaultImageType,omitempty"` + + // ValidImageTypes: List of valid image types. + ValidImageTypes []string `json:"validImageTypes,omitempty"` + + // ValidMasterVersions: List of valid master versions. + ValidMasterVersions []string `json:"validMasterVersions,omitempty"` + + // ValidNodeVersions: List of valid node upgrade target versions. + ValidNodeVersions []string `json:"validNodeVersions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "DefaultClusterVersion") 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. "DefaultClusterVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ServerConfig) MarshalJSON() ([]byte, error) { + type noMethod ServerConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetLabelsRequest: SetLabelsRequest sets the Google Cloud Platform +// labels on a Google Container +// Engine cluster, which will in turn set them for Google Compute +// Engine +// resources used by that cluster +type SetLabelsRequest struct { + // ClusterId: The name of the cluster. + // This field is deprecated, use name instead. + ClusterId string `json:"clusterId,omitempty"` + + // LabelFingerprint: The fingerprint of the previous set of labels for + // this resource, + // used to detect conflicts. The fingerprint is initially generated + // by + // Container Engine and changes after every request to modify or + // update + // labels. You must always provide an up-to-date fingerprint hash + // when + // updating or changing labels. Make a get() request to + // the + // resource to get the latest fingerprint. + LabelFingerprint string `json:"labelFingerprint,omitempty"` + + // Name: The name (project, location, cluster id) of the cluster to set + // labels. + // Specified in the format 'projects/*/locations/*/clusters/*'. + Name string `json:"name,omitempty"` + + // ProjectId: The Google Developers Console [project ID or + // project + // number](https://developers.google.com/console/help/new/#projec + // tnumber). + // This field is deprecated, use name instead. + ProjectId string `json:"projectId,omitempty"` + + // ResourceLabels: The labels to set for that cluster. + ResourceLabels map[string]string `json:"resourceLabels,omitempty"` + + // Zone: The name of the Google Compute + // Engine + // [zone](/compute/docs/zones#available) in which the + // cluster + // resides. + // This field is deprecated, use name instead. + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterId") 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. "ClusterId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetLabelsRequest) MarshalJSON() ([]byte, error) { + type noMethod SetLabelsRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetLegacyAbacRequest: SetLegacyAbacRequest enables or disables the +// ABAC authorization mechanism for +// a cluster. +type SetLegacyAbacRequest struct { + // ClusterId: The name of the cluster to update. + // This field is deprecated, use name instead. + ClusterId string `json:"clusterId,omitempty"` + + // Enabled: Whether ABAC authorization will be enabled in the cluster. + Enabled bool `json:"enabled,omitempty"` + + // Name: The name (project, location, cluster id) of the cluster to set + // legacy abac. + // Specified in the format 'projects/*/locations/*/clusters/*'. + Name string `json:"name,omitempty"` + + // ProjectId: The Google Developers Console [project ID or + // project + // number](https://support.google.com/cloud/answer/6158840). + // This + // field is deprecated, use name instead. + ProjectId string `json:"projectId,omitempty"` + + // Zone: The name of the Google Compute + // Engine + // [zone](/compute/docs/zones#available) in which the + // cluster + // resides. + // This field is deprecated, use name instead. + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterId") 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. "ClusterId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetLegacyAbacRequest) MarshalJSON() ([]byte, error) { + type noMethod SetLegacyAbacRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetMasterAuthRequest: SetMasterAuthRequest updates the admin password +// of a cluster. +type SetMasterAuthRequest struct { + // Action: The exact form of action to be taken on the master auth + // + // Possible values: + // "UNKNOWN" - Operation is unknown and will error out + // "SET_PASSWORD" - Set the password to a user generated value. + // "GENERATE_PASSWORD" - Generate a new password and set it to that. + Action string `json:"action,omitempty"` + + // ClusterId: The name of the cluster to upgrade. + // This field is deprecated, use name instead. + ClusterId string `json:"clusterId,omitempty"` + + // Name: The name (project, location, cluster) of the cluster to set + // auth. + // Specified in the format 'projects/*/locations/*/clusters/*'. + Name string `json:"name,omitempty"` + + // ProjectId: The Google Developers Console [project ID or + // project + // number](https://support.google.com/cloud/answer/6158840). + // This + // field is deprecated, use name instead. + ProjectId string `json:"projectId,omitempty"` + + // Update: A description of the update. + Update *MasterAuth `json:"update,omitempty"` + + // Zone: The name of the Google Compute + // Engine + // [zone](/compute/docs/zones#available) in which the + // cluster + // resides. + // This field is deprecated, use name instead. + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetMasterAuthRequest) MarshalJSON() ([]byte, error) { + type noMethod SetMasterAuthRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetNetworkPolicyRequest: SetNetworkPolicyRequest enables/disables +// network policy for a cluster. +type SetNetworkPolicyRequest struct { + // ClusterId: The name of the cluster. + // This field is deprecated, use name instead. + ClusterId string `json:"clusterId,omitempty"` + + // Name: The name (project, location, cluster id) of the cluster to set + // networking policy. + // Specified in the format 'projects/*/locations/*/clusters/*'. + Name string `json:"name,omitempty"` + + // NetworkPolicy: Configuration options for the NetworkPolicy feature. + NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"` + + // ProjectId: The Google Developers Console [project ID or + // project + // number](https://developers.google.com/console/help/new/#projec + // tnumber). + // This field is deprecated, use name instead. + ProjectId string `json:"projectId,omitempty"` + + // Zone: The name of the Google Compute + // Engine + // [zone](/compute/docs/zones#available) in which the + // cluster + // resides. + // This field is deprecated, use name instead. + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterId") 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. "ClusterId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetNetworkPolicyRequest) MarshalJSON() ([]byte, error) { + type noMethod SetNetworkPolicyRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetNodePoolManagementRequest: SetNodePoolManagementRequest sets the +// node management properties of a node +// pool. +type SetNodePoolManagementRequest struct { + // ClusterId: The name of the cluster to update. + // This field is deprecated, use name instead. + ClusterId string `json:"clusterId,omitempty"` + + // Management: NodeManagement configuration for the node pool. + Management *NodeManagement `json:"management,omitempty"` + + // Name: The name (project, location, cluster, node pool id) of the node + // pool to set + // management properties. Specified in the + // format + // 'projects/*/locations/*/clusters/*/nodePools/*'. + Name string `json:"name,omitempty"` + + // NodePoolId: The name of the node pool to update. + // This field is deprecated, use name instead. + NodePoolId string `json:"nodePoolId,omitempty"` + + // ProjectId: The Google Developers Console [project ID or + // project + // number](https://support.google.com/cloud/answer/6158840). + // This + // field is deprecated, use name instead. + ProjectId string `json:"projectId,omitempty"` + + // Zone: The name of the Google Compute + // Engine + // [zone](/compute/docs/zones#available) in which the + // cluster + // resides. + // This field is deprecated, use name instead. + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterId") 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. "ClusterId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetNodePoolManagementRequest) MarshalJSON() ([]byte, error) { + type noMethod SetNodePoolManagementRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StartIPRotationRequest: StartIPRotationRequest creates a new IP for +// the cluster and then performs +// a node upgrade on each node pool to point to the new IP. +type StartIPRotationRequest struct { + // ClusterId: The name of the cluster. + // This field is deprecated, use name instead. + ClusterId string `json:"clusterId,omitempty"` + + // Name: The name (project, location, cluster id) of the cluster to + // start IP rotation. + // Specified in the format 'projects/*/locations/*/clusters/*'. + Name string `json:"name,omitempty"` + + // ProjectId: The Google Developers Console [project ID or + // project + // number](https://developers.google.com/console/help/new/#projec + // tnumber). + // This field is deprecated, use name instead. + ProjectId string `json:"projectId,omitempty"` + + // Zone: The name of the Google Compute + // Engine + // [zone](/compute/docs/zones#available) in which the + // cluster + // resides. + // This field is deprecated, use name instead. + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterId") 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. "ClusterId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *StartIPRotationRequest) MarshalJSON() ([]byte, error) { + type noMethod StartIPRotationRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UpdateClusterRequest: UpdateClusterRequest updates the settings of a +// cluster. +type UpdateClusterRequest struct { + // ClusterId: The name of the cluster to upgrade. + // This field is deprecated, use name instead. + ClusterId string `json:"clusterId,omitempty"` + + // Name: The name (project, location, cluster) of the cluster to + // update. + // Specified in the format 'projects/*/locations/*/clusters/*'. + Name string `json:"name,omitempty"` + + // ProjectId: The Google Developers Console [project ID or + // project + // number](https://support.google.com/cloud/answer/6158840). + // This + // field is deprecated, use name instead. + ProjectId string `json:"projectId,omitempty"` + + // Update: A description of the update. + Update *ClusterUpdate `json:"update,omitempty"` + + // Zone: The name of the Google Compute + // Engine + // [zone](/compute/docs/zones#available) in which the + // cluster + // resides. + // This field is deprecated, use name instead. + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterId") 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. "ClusterId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UpdateClusterRequest) MarshalJSON() ([]byte, error) { + type noMethod UpdateClusterRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "container.projects.locations.getServerConfig": + +type ProjectsLocationsGetServerConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetServerConfig: Returns configuration info about the Container +// Engine service. +func (r *ProjectsLocationsService) GetServerConfig(name string) *ProjectsLocationsGetServerConfigCall { + c := &ProjectsLocationsGetServerConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ProjectId sets the optional parameter "projectId": The Google +// Developers Console [project ID or +// project +// number](https://support.google.com/cloud/answer/6158840). +// This +// field is deprecated, use name instead. +func (c *ProjectsLocationsGetServerConfigCall) ProjectId(projectId string) *ProjectsLocationsGetServerConfigCall { + c.urlParams_.Set("projectId", projectId) + return c +} + +// Zone sets the optional parameter "zone": The name of the Google +// Compute Engine [zone](/compute/docs/zones#available) +// to return operations for. +// This field is deprecated, use name instead. +func (c *ProjectsLocationsGetServerConfigCall) Zone(zone string) *ProjectsLocationsGetServerConfigCall { + c.urlParams_.Set("zone", zone) + 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 *ProjectsLocationsGetServerConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetServerConfigCall { + 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 *ProjectsLocationsGetServerConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetServerConfigCall { + 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 *ProjectsLocationsGetServerConfigCall) Context(ctx context.Context) *ProjectsLocationsGetServerConfigCall { + 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 *ProjectsLocationsGetServerConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetServerConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/serverConfig") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.getServerConfig" call. +// Exactly one of *ServerConfig or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ServerConfig.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGetServerConfigCall) Do(opts ...googleapi.CallOption) (*ServerConfig, 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 := &ServerConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns configuration info about the Container Engine service.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverConfig", + // "httpMethod": "GET", + // "id": "container.projects.locations.getServerConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for.\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}/serverConfig", + // "response": { + // "$ref": "ServerConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.completeIpRotation": + +type ProjectsLocationsClustersCompleteIpRotationCall struct { + s *Service + name string + completeiprotationrequest *CompleteIPRotationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CompleteIpRotation: Completes master IP rotation. +func (r *ProjectsLocationsClustersService) CompleteIpRotation(name string, completeiprotationrequest *CompleteIPRotationRequest) *ProjectsLocationsClustersCompleteIpRotationCall { + c := &ProjectsLocationsClustersCompleteIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.completeiprotationrequest = completeiprotationrequest + 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 *ProjectsLocationsClustersCompleteIpRotationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCompleteIpRotationCall { + 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 *ProjectsLocationsClustersCompleteIpRotationCall) Context(ctx context.Context) *ProjectsLocationsClustersCompleteIpRotationCall { + 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 *ProjectsLocationsClustersCompleteIpRotationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersCompleteIpRotationCall) 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.completeiprotationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:completeIpRotation") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.completeIpRotation" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersCompleteIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Completes master IP rotation.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:completeIpRotation", + // "httpMethod": "POST", + // "id": "container.projects.locations.clusters.completeIpRotation", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name (project, location, cluster id) of the cluster to complete IP rotation.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:completeIpRotation", + // "request": { + // "$ref": "CompleteIPRotationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.create": + +type ProjectsLocationsClustersCreateCall struct { + s *Service + parent string + createclusterrequest *CreateClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a cluster, consisting of the specified number and +// type of Google +// Compute Engine instances. +// +// By default, the cluster is created in the project's +// [default +// network](/compute/docs/networks-and-firewalls#networks). +// +// One firewall is added for the cluster. After cluster creation, +// the cluster creates routes for each node to allow the containers +// on that node to communicate with all other instances in +// the +// cluster. +// +// Finally, an entry is added to the project's global metadata +// indicating +// which CIDR range is being used by the cluster. +func (r *ProjectsLocationsClustersService) Create(parent string, createclusterrequest *CreateClusterRequest) *ProjectsLocationsClustersCreateCall { + c := &ProjectsLocationsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.createclusterrequest = createclusterrequest + 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 *ProjectsLocationsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCreateCall { + 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 *ProjectsLocationsClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersCreateCall { + 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 *ProjectsLocationsClustersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersCreateCall) 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.createclusterrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/clusters") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", + // "httpMethod": "POST", + // "id": "container.projects.locations.clusters.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The parent (project and location) where the cluster will be created.\nSpecified in the format 'projects/*/locations/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/clusters", + // "request": { + // "$ref": "CreateClusterRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.delete": + +type ProjectsLocationsClustersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the cluster, including the Kubernetes endpoint and +// all worker +// nodes. +// +// Firewalls and routes that were configured during cluster creation +// are also deleted. +// +// Other Google Compute Engine resources that might be in use by the +// cluster +// (e.g. load balancer resources) will not be deleted if they weren't +// present +// at the initial create time. +func (r *ProjectsLocationsClustersService) Delete(name string) *ProjectsLocationsClustersDeleteCall { + c := &ProjectsLocationsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ClusterId sets the optional parameter "clusterId": The name of the +// cluster to delete. +// This field is deprecated, use name instead. +func (c *ProjectsLocationsClustersDeleteCall) ClusterId(clusterId string) *ProjectsLocationsClustersDeleteCall { + c.urlParams_.Set("clusterId", clusterId) + return c +} + +// ProjectId sets the optional parameter "projectId": The Google +// Developers Console [project ID or +// project +// number](https://support.google.com/cloud/answer/6158840). +// This +// field is deprecated, use name instead. +func (c *ProjectsLocationsClustersDeleteCall) ProjectId(projectId string) *ProjectsLocationsClustersDeleteCall { + c.urlParams_.Set("projectId", projectId) + return c +} + +// Zone sets the optional parameter "zone": The name of the Google +// Compute Engine +// [zone](/compute/docs/zones#available) in which the +// cluster +// resides. +// This field is deprecated, use name instead. +func (c *ProjectsLocationsClustersDeleteCall) Zone(zone string) *ProjectsLocationsClustersDeleteCall { + c.urlParams_.Set("zone", zone) + 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 *ProjectsLocationsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersDeleteCall { + 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 *ProjectsLocationsClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersDeleteCall { + 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 *ProjectsLocationsClustersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + // "httpMethod": "DELETE", + // "id": "container.projects.locations.clusters.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster to delete.\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name (project, location, cluster) of the cluster to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.get": + +type ProjectsLocationsClustersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a specific cluster. +func (r *ProjectsLocationsClustersService) Get(name string) *ProjectsLocationsClustersGetCall { + c := &ProjectsLocationsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ClusterId sets the optional parameter "clusterId": The name of the +// cluster to retrieve. +// This field is deprecated, use name instead. +func (c *ProjectsLocationsClustersGetCall) ClusterId(clusterId string) *ProjectsLocationsClustersGetCall { + c.urlParams_.Set("clusterId", clusterId) + return c +} + +// ProjectId sets the optional parameter "projectId": The Google +// Developers Console [project ID or +// project +// number](https://support.google.com/cloud/answer/6158840). +// This +// field is deprecated, use name instead. +func (c *ProjectsLocationsClustersGetCall) ProjectId(projectId string) *ProjectsLocationsClustersGetCall { + c.urlParams_.Set("projectId", projectId) + return c +} + +// Zone sets the optional parameter "zone": The name of the Google +// Compute Engine +// [zone](/compute/docs/zones#available) in which the +// cluster +// resides. +// This field is deprecated, use name instead. +func (c *ProjectsLocationsClustersGetCall) Zone(zone string) *ProjectsLocationsClustersGetCall { + c.urlParams_.Set("zone", zone) + 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 *ProjectsLocationsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) Context(ctx context.Context) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.get" call. +// Exactly one of *Cluster or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Cluster.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, 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 := &Cluster{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the details of a specific cluster.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + // "httpMethod": "GET", + // "id": "container.projects.locations.clusters.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster to retrieve.\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name (project, location, cluster) of the cluster to retrieve.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Cluster" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.list": + +type ProjectsLocationsClustersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all clusters owned by a project in either the specified +// zone or all +// zones. +func (r *ProjectsLocationsClustersService) List(parent string) *ProjectsLocationsClustersListCall { + c := &ProjectsLocationsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// ProjectId sets the optional parameter "projectId": The Google +// Developers Console [project ID or +// project +// number](https://support.google.com/cloud/answer/6158840). +// This +// field is deprecated, use parent instead. +func (c *ProjectsLocationsClustersListCall) ProjectId(projectId string) *ProjectsLocationsClustersListCall { + c.urlParams_.Set("projectId", projectId) + return c +} + +// Zone sets the optional parameter "zone": The name of the Google +// Compute Engine +// [zone](/compute/docs/zones#available) in which the cluster +// resides, or "-" for all zones. +// This field is deprecated, use parent instead. +func (c *ProjectsLocationsClustersListCall) Zone(zone string) *ProjectsLocationsClustersListCall { + c.urlParams_.Set("zone", zone) + 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 *ProjectsLocationsClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) Context(ctx context.Context) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/clusters") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.list" call. +// Exactly one of *ListClustersResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListClustersResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, 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 := &ListClustersResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all clusters owned by a project in either the specified zone or all\nzones.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", + // "httpMethod": "GET", + // "id": "container.projects.locations.clusters.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The parent (project and location) where the clusters will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field is deprecated, use parent instead.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/clusters", + // "response": { + // "$ref": "ListClustersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.setLegacyAbac": + +type ProjectsLocationsClustersSetLegacyAbacCall struct { + s *Service + name string + setlegacyabacrequest *SetLegacyAbacRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetLegacyAbac: Enables or disables the ABAC authorization mechanism +// on a cluster. +func (r *ProjectsLocationsClustersService) SetLegacyAbac(name string, setlegacyabacrequest *SetLegacyAbacRequest) *ProjectsLocationsClustersSetLegacyAbacCall { + c := &ProjectsLocationsClustersSetLegacyAbacCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.setlegacyabacrequest = setlegacyabacrequest + 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 *ProjectsLocationsClustersSetLegacyAbacCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLegacyAbacCall { + 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 *ProjectsLocationsClustersSetLegacyAbacCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLegacyAbacCall { + 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 *ProjectsLocationsClustersSetLegacyAbacCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersSetLegacyAbacCall) 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.setlegacyabacrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLegacyAbac") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.setLegacyAbac" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersSetLegacyAbacCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Enables or disables the ABAC authorization mechanism on a cluster.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLegacyAbac", + // "httpMethod": "POST", + // "id": "container.projects.locations.clusters.setLegacyAbac", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name (project, location, cluster id) of the cluster to set legacy abac.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:setLegacyAbac", + // "request": { + // "$ref": "SetLegacyAbacRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.setMasterAuth": + +type ProjectsLocationsClustersSetMasterAuthCall struct { + s *Service + name string + setmasterauthrequest *SetMasterAuthRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetMasterAuth: Used to set master auth materials. Currently supports +// :- +// Changing the admin password of a specific cluster. +// This can be either via password generation or explicitly set. +// Modify basic_auth.csv and reset the K8S API server. +func (r *ProjectsLocationsClustersService) SetMasterAuth(name string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsLocationsClustersSetMasterAuthCall { + c := &ProjectsLocationsClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.setmasterauthrequest = setmasterauthrequest + 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 *ProjectsLocationsClustersSetMasterAuthCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMasterAuthCall { + 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 *ProjectsLocationsClustersSetMasterAuthCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMasterAuthCall { + 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 *ProjectsLocationsClustersSetMasterAuthCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersSetMasterAuthCall) 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.setmasterauthrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMasterAuth") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.setMasterAuth" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password of a specific cluster.\nThis can be either via password generation or explicitly set.\nModify basic_auth.csv and reset the K8S API server.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMasterAuth", + // "httpMethod": "POST", + // "id": "container.projects.locations.clusters.setMasterAuth", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name (project, location, cluster) of the cluster to set auth.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:setMasterAuth", + // "request": { + // "$ref": "SetMasterAuthRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.setNetworkPolicy": + +type ProjectsLocationsClustersSetNetworkPolicyCall struct { + s *Service + name string + setnetworkpolicyrequest *SetNetworkPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetNetworkPolicy: Enables/Disables Network Policy for a cluster. +func (r *ProjectsLocationsClustersService) SetNetworkPolicy(name string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsLocationsClustersSetNetworkPolicyCall { + c := &ProjectsLocationsClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.setnetworkpolicyrequest = setnetworkpolicyrequest + 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 *ProjectsLocationsClustersSetNetworkPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetNetworkPolicyCall { + 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 *ProjectsLocationsClustersSetNetworkPolicyCall) Context(ctx context.Context) *ProjectsLocationsClustersSetNetworkPolicyCall { + 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 *ProjectsLocationsClustersSetNetworkPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersSetNetworkPolicyCall) 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.setnetworkpolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setNetworkPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.setNetworkPolicy" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Enables/Disables Network Policy for a cluster.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setNetworkPolicy", + // "httpMethod": "POST", + // "id": "container.projects.locations.clusters.setNetworkPolicy", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name (project, location, cluster id) of the cluster to set networking policy.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:setNetworkPolicy", + // "request": { + // "$ref": "SetNetworkPolicyRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.setResourceLabels": + +type ProjectsLocationsClustersSetResourceLabelsCall struct { + s *Service + name string + setlabelsrequest *SetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetResourceLabels: Sets labels on a cluster. +func (r *ProjectsLocationsClustersService) SetResourceLabels(name string, setlabelsrequest *SetLabelsRequest) *ProjectsLocationsClustersSetResourceLabelsCall { + c := &ProjectsLocationsClustersSetResourceLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.setlabelsrequest = setlabelsrequest + 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 *ProjectsLocationsClustersSetResourceLabelsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetResourceLabelsCall { + 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 *ProjectsLocationsClustersSetResourceLabelsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetResourceLabelsCall { + 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 *ProjectsLocationsClustersSetResourceLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersSetResourceLabelsCall) 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.setlabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setResourceLabels") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.setResourceLabels" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersSetResourceLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets labels on a cluster.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setResourceLabels", + // "httpMethod": "POST", + // "id": "container.projects.locations.clusters.setResourceLabels", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name (project, location, cluster id) of the cluster to set labels.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:setResourceLabels", + // "request": { + // "$ref": "SetLabelsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.startIpRotation": + +type ProjectsLocationsClustersStartIpRotationCall struct { + s *Service + name string + startiprotationrequest *StartIPRotationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StartIpRotation: Start master IP rotation. +func (r *ProjectsLocationsClustersService) StartIpRotation(name string, startiprotationrequest *StartIPRotationRequest) *ProjectsLocationsClustersStartIpRotationCall { + c := &ProjectsLocationsClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.startiprotationrequest = startiprotationrequest + 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 *ProjectsLocationsClustersStartIpRotationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersStartIpRotationCall { + 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 *ProjectsLocationsClustersStartIpRotationCall) Context(ctx context.Context) *ProjectsLocationsClustersStartIpRotationCall { + 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 *ProjectsLocationsClustersStartIpRotationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersStartIpRotationCall) 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.startiprotationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:startIpRotation") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.startIpRotation" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersStartIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Start master IP rotation.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:startIpRotation", + // "httpMethod": "POST", + // "id": "container.projects.locations.clusters.startIpRotation", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name (project, location, cluster id) of the cluster to start IP rotation.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:startIpRotation", + // "request": { + // "$ref": "StartIPRotationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.update": + +type ProjectsLocationsClustersUpdateCall struct { + s *Service + name string + updateclusterrequest *UpdateClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates the settings of a specific cluster. +func (r *ProjectsLocationsClustersService) Update(name string, updateclusterrequest *UpdateClusterRequest) *ProjectsLocationsClustersUpdateCall { + c := &ProjectsLocationsClustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.updateclusterrequest = updateclusterrequest + 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 *ProjectsLocationsClustersUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUpdateCall { + 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 *ProjectsLocationsClustersUpdateCall) Context(ctx context.Context) *ProjectsLocationsClustersUpdateCall { + 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 *ProjectsLocationsClustersUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUpdateCall) 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.updateclusterrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PUT", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.update" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the settings of a specific cluster.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + // "httpMethod": "PUT", + // "id": "container.projects.locations.clusters.update", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name (project, location, cluster) of the cluster to update.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "UpdateClusterRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.nodePools.create": + +type ProjectsLocationsClustersNodePoolsCreateCall struct { + s *Service + parent string + createnodepoolrequest *CreateNodePoolRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a node pool for a cluster. +func (r *ProjectsLocationsClustersNodePoolsService) Create(parent string, createnodepoolrequest *CreateNodePoolRequest) *ProjectsLocationsClustersNodePoolsCreateCall { + c := &ProjectsLocationsClustersNodePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.createnodepoolrequest = createnodepoolrequest + 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 *ProjectsLocationsClustersNodePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsCreateCall { + 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 *ProjectsLocationsClustersNodePoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsCreateCall { + 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 *ProjectsLocationsClustersNodePoolsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersNodePoolsCreateCall) 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.createnodepoolrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/nodePools") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.nodePools.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersNodePoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a node pool for a cluster.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools", + // "httpMethod": "POST", + // "id": "container.projects.locations.clusters.nodePools.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The parent (project, location, cluster id) where the node pool will be created.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/nodePools", + // "request": { + // "$ref": "CreateNodePoolRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.nodePools.delete": + +type ProjectsLocationsClustersNodePoolsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a node pool from a cluster. +func (r *ProjectsLocationsClustersNodePoolsService) Delete(name string) *ProjectsLocationsClustersNodePoolsDeleteCall { + c := &ProjectsLocationsClustersNodePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ClusterId sets the optional parameter "clusterId": The name of the +// cluster. +// This field is deprecated, use name instead. +func (c *ProjectsLocationsClustersNodePoolsDeleteCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsDeleteCall { + c.urlParams_.Set("clusterId", clusterId) + return c +} + +// NodePoolId sets the optional parameter "nodePoolId": The name of the +// node pool to delete. +// This field is deprecated, use name instead. +func (c *ProjectsLocationsClustersNodePoolsDeleteCall) NodePoolId(nodePoolId string) *ProjectsLocationsClustersNodePoolsDeleteCall { + c.urlParams_.Set("nodePoolId", nodePoolId) + return c +} + +// ProjectId sets the optional parameter "projectId": The Google +// Developers Console [project ID or +// project +// number](https://developers.google.com/console/help/new/#projec +// tnumber). +// This field is deprecated, use name instead. +func (c *ProjectsLocationsClustersNodePoolsDeleteCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsDeleteCall { + c.urlParams_.Set("projectId", projectId) + return c +} + +// Zone sets the optional parameter "zone": The name of the Google +// Compute Engine +// [zone](/compute/docs/zones#available) in which the +// cluster +// resides. +// This field is deprecated, use name instead. +func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsDeleteCall { + c.urlParams_.Set("zone", zone) + 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 *ProjectsLocationsClustersNodePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsDeleteCall { + 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 *ProjectsLocationsClustersNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsDeleteCall { + 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 *ProjectsLocationsClustersNodePoolsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.nodePools.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a node pool from a cluster.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", + // "httpMethod": "DELETE", + // "id": "container.projects.locations.clusters.nodePools.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name (project, location, cluster, node pool id) of the node pool to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "nodePoolId": { + // "description": "The name of the node pool to delete.\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.nodePools.get": + +type ProjectsLocationsClustersNodePoolsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves the node pool requested. +func (r *ProjectsLocationsClustersNodePoolsService) Get(name string) *ProjectsLocationsClustersNodePoolsGetCall { + c := &ProjectsLocationsClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ClusterId sets the optional parameter "clusterId": The name of the +// cluster. +// This field is deprecated, use name instead. +func (c *ProjectsLocationsClustersNodePoolsGetCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsGetCall { + c.urlParams_.Set("clusterId", clusterId) + return c +} + +// NodePoolId sets the optional parameter "nodePoolId": The name of the +// node pool. +// This field is deprecated, use name instead. +func (c *ProjectsLocationsClustersNodePoolsGetCall) NodePoolId(nodePoolId string) *ProjectsLocationsClustersNodePoolsGetCall { + c.urlParams_.Set("nodePoolId", nodePoolId) + return c +} + +// ProjectId sets the optional parameter "projectId": The Google +// Developers Console [project ID or +// project +// number](https://developers.google.com/console/help/new/#projec +// tnumber). +// This field is deprecated, use name instead. +func (c *ProjectsLocationsClustersNodePoolsGetCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsGetCall { + c.urlParams_.Set("projectId", projectId) + return c +} + +// Zone sets the optional parameter "zone": The name of the Google +// Compute Engine +// [zone](/compute/docs/zones#available) in which the +// cluster +// resides. +// This field is deprecated, use name instead. +func (c *ProjectsLocationsClustersNodePoolsGetCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsGetCall { + c.urlParams_.Set("zone", zone) + 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 *ProjectsLocationsClustersNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsGetCall { + 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 *ProjectsLocationsClustersNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersNodePoolsGetCall { + 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 *ProjectsLocationsClustersNodePoolsGetCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsGetCall { + 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 *ProjectsLocationsClustersNodePoolsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.nodePools.get" call. +// Exactly one of *NodePool or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *NodePool.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) (*NodePool, 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 := &NodePool{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the node pool requested.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", + // "httpMethod": "GET", + // "id": "container.projects.locations.clusters.nodePools.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name (project, location, cluster, node pool id) of the node pool to get.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "nodePoolId": { + // "description": "The name of the node pool.\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "NodePool" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.nodePools.list": + +type ProjectsLocationsClustersNodePoolsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the node pools for a cluster. +func (r *ProjectsLocationsClustersNodePoolsService) List(parent string) *ProjectsLocationsClustersNodePoolsListCall { + c := &ProjectsLocationsClustersNodePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// ClusterId sets the optional parameter "clusterId": The name of the +// cluster. +// This field is deprecated, use parent instead. +func (c *ProjectsLocationsClustersNodePoolsListCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsListCall { + c.urlParams_.Set("clusterId", clusterId) + return c +} + +// ProjectId sets the optional parameter "projectId": The Google +// Developers Console [project ID or +// project +// number](https://developers.google.com/console/help/new/#projec +// tnumber). +// This field is deprecated, use parent instead. +func (c *ProjectsLocationsClustersNodePoolsListCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsListCall { + c.urlParams_.Set("projectId", projectId) + return c +} + +// Zone sets the optional parameter "zone": The name of the Google +// Compute Engine +// [zone](/compute/docs/zones#available) in which the +// cluster +// resides. +// This field is deprecated, use parent instead. +func (c *ProjectsLocationsClustersNodePoolsListCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsListCall { + c.urlParams_.Set("zone", zone) + 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 *ProjectsLocationsClustersNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsListCall { + 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 *ProjectsLocationsClustersNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersNodePoolsListCall { + 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 *ProjectsLocationsClustersNodePoolsListCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsListCall { + 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 *ProjectsLocationsClustersNodePoolsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/nodePools") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.nodePools.list" call. +// Exactly one of *ListNodePoolsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListNodePoolsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersNodePoolsListCall) Do(opts ...googleapi.CallOption) (*ListNodePoolsResponse, 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 := &ListNodePoolsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the node pools for a cluster.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools", + // "httpMethod": "GET", + // "id": "container.projects.locations.clusters.nodePools.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster.\nThis field is deprecated, use parent instead.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "The parent (project, location, cluster id) where the node pools will be listed.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use parent instead.", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/nodePools", + // "response": { + // "$ref": "ListNodePoolsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.nodePools.rollback": + +type ProjectsLocationsClustersNodePoolsRollbackCall struct { + s *Service + name string + rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Rollback: Roll back the previously Aborted or Failed NodePool +// upgrade. +// This will be an no-op if the last upgrade successfully completed. +func (r *ProjectsLocationsClustersNodePoolsService) Rollback(name string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsLocationsClustersNodePoolsRollbackCall { + c := &ProjectsLocationsClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rollbacknodepoolupgraderequest = rollbacknodepoolupgraderequest + 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 *ProjectsLocationsClustersNodePoolsRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsRollbackCall { + 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 *ProjectsLocationsClustersNodePoolsRollbackCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsRollbackCall { + 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 *ProjectsLocationsClustersNodePoolsRollbackCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersNodePoolsRollbackCall) 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.rollbacknodepoolupgraderequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rollback") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.nodePools.rollback" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:rollback", + // "httpMethod": "POST", + // "id": "container.projects.locations.clusters.nodePools.rollback", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name (project, location, cluster, node pool id) of the node poll to\nrollback upgrade.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:rollback", + // "request": { + // "$ref": "RollbackNodePoolUpgradeRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.clusters.nodePools.setManagement": + +type ProjectsLocationsClustersNodePoolsSetManagementCall struct { + s *Service + name string + setnodepoolmanagementrequest *SetNodePoolManagementRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetManagement: Sets the NodeManagement options for a node pool. +func (r *ProjectsLocationsClustersNodePoolsService) SetManagement(name string, setnodepoolmanagementrequest *SetNodePoolManagementRequest) *ProjectsLocationsClustersNodePoolsSetManagementCall { + c := &ProjectsLocationsClustersNodePoolsSetManagementCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.setnodepoolmanagementrequest = setnodepoolmanagementrequest + 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 *ProjectsLocationsClustersNodePoolsSetManagementCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetManagementCall { + 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 *ProjectsLocationsClustersNodePoolsSetManagementCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetManagementCall { + 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 *ProjectsLocationsClustersNodePoolsSetManagementCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) 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.setnodepoolmanagementrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setManagement") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.nodePools.setManagement" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the NodeManagement options for a node pool.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setManagement", + // "httpMethod": "POST", + // "id": "container.projects.locations.clusters.nodePools.setManagement", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name (project, location, cluster, node pool id) of the node pool to set\nmanagement properties. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:setManagement", + // "request": { + // "$ref": "SetNodePoolManagementRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Cancels the specified operation. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + 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 *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + 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 *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + 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 *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) 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.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.operations.cancel" 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 *ProjectsLocationsOperationsCancelCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Cancels the specified operation.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "container.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name (project, location, operation id) of the operation to cancel.\nSpecified in the format 'projects/*/locations/*/operations/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the specified operation. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// OperationId sets the optional parameter "operationId": The +// server-assigned `name` of the operation. +// This field is deprecated, use name instead. +func (c *ProjectsLocationsOperationsGetCall) OperationId(operationId string) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("operationId", operationId) + return c +} + +// ProjectId sets the optional parameter "projectId": The Google +// Developers Console [project ID or +// project +// number](https://support.google.com/cloud/answer/6158840). +// This +// field is deprecated, use name instead. +func (c *ProjectsLocationsOperationsGetCall) ProjectId(projectId string) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("projectId", projectId) + return c +} + +// Zone sets the optional parameter "zone": The name of the Google +// Compute Engine +// [zone](/compute/docs/zones#available) in which the +// cluster +// resides. +// This field is deprecated, use name instead. +func (c *ProjectsLocationsOperationsGetCall) Zone(zone string) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("zone", zone) + 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 *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the specified operation.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "container.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name (project, location, operation id) of the operation to get.\nSpecified in the format 'projects/*/locations/*/operations/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "operationId": { + // "description": "The server-assigned `name` of the operation.\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all operations in a project in a specific zone or all +// zones. +func (r *ProjectsLocationsOperationsService) List(parent string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// ProjectId sets the optional parameter "projectId": The Google +// Developers Console [project ID or +// project +// number](https://support.google.com/cloud/answer/6158840). +// This +// field is deprecated, use parent instead. +func (c *ProjectsLocationsOperationsListCall) ProjectId(projectId string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("projectId", projectId) + return c +} + +// Zone sets the optional parameter "zone": The name of the Google +// Compute Engine [zone](/compute/docs/zones#available) +// to return operations for, or `-` for all zones. +// This field is deprecated, use parent instead. +func (c *ProjectsLocationsOperationsListCall) Zone(zone string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("zone", zone) + 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 *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/operations") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, 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 := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all operations in a project in a specific zone or all zones.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "container.projects.locations.operations.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The parent (project and location) where the operations will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for, or `-` for all zones.\nThis field is deprecated, use parent instead.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.getServerconfig": + +type ProjectsZonesGetServerconfigCall struct { + s *Service + projectId string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetServerconfig: Returns configuration info about the Container +// Engine service. +func (r *ProjectsZonesService) GetServerconfig(projectId string, zone string) *ProjectsZonesGetServerconfigCall { + c := &ProjectsZonesGetServerconfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + return c +} + +// Name sets the optional parameter "name": The name (project and +// location) of the server config to get +// Specified in the format 'projects/*/locations/*'. +func (c *ProjectsZonesGetServerconfigCall) Name(name string) *ProjectsZonesGetServerconfigCall { + c.urlParams_.Set("name", name) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsZonesGetServerconfigCall) Fields(s ...googleapi.Field) *ProjectsZonesGetServerconfigCall { + 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 *ProjectsZonesGetServerconfigCall) IfNoneMatch(entityTag string) *ProjectsZonesGetServerconfigCall { + 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 *ProjectsZonesGetServerconfigCall) Context(ctx context.Context) *ProjectsZonesGetServerconfigCall { + 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 *ProjectsZonesGetServerconfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/serverconfig") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.getServerconfig" call. +// Exactly one of *ServerConfig or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ServerConfig.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesGetServerconfigCall) Do(opts ...googleapi.CallOption) (*ServerConfig, 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 := &ServerConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns configuration info about the Container Engine service.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/serverconfig", + // "httpMethod": "GET", + // "id": "container.projects.zones.getServerconfig", + // "parameterOrder": [ + // "projectId", + // "zone" + // ], + // "parameters": { + // "name": { + // "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", + // "location": "query", + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/serverconfig", + // "response": { + // "$ref": "ServerConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.completeIpRotation": + +type ProjectsZonesClustersCompleteIpRotationCall struct { + s *Service + projectId string + zone string + clusterId string + completeiprotationrequest *CompleteIPRotationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CompleteIpRotation: Completes master IP rotation. +func (r *ProjectsZonesClustersService) CompleteIpRotation(projectId string, zone string, clusterId string, completeiprotationrequest *CompleteIPRotationRequest) *ProjectsZonesClustersCompleteIpRotationCall { + c := &ProjectsZonesClustersCompleteIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.clusterId = clusterId + c.completeiprotationrequest = completeiprotationrequest + 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 *ProjectsZonesClustersCompleteIpRotationCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCompleteIpRotationCall { + 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 *ProjectsZonesClustersCompleteIpRotationCall) Context(ctx context.Context) *ProjectsZonesClustersCompleteIpRotationCall { + 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 *ProjectsZonesClustersCompleteIpRotationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersCompleteIpRotationCall) 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.completeiprotationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.completeIpRotation" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesClustersCompleteIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Completes master IP rotation.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", + // "httpMethod": "POST", + // "id": "container.projects.zones.clusters.completeIpRotation", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", + // "request": { + // "$ref": "CompleteIPRotationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.create": + +type ProjectsZonesClustersCreateCall struct { + s *Service + projectId string + zone string + createclusterrequest *CreateClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a cluster, consisting of the specified number and +// type of Google +// Compute Engine instances. +// +// By default, the cluster is created in the project's +// [default +// network](/compute/docs/networks-and-firewalls#networks). +// +// One firewall is added for the cluster. After cluster creation, +// the cluster creates routes for each node to allow the containers +// on that node to communicate with all other instances in +// the +// cluster. +// +// Finally, an entry is added to the project's global metadata +// indicating +// which CIDR range is being used by the cluster. +func (r *ProjectsZonesClustersService) Create(projectId string, zone string, createclusterrequest *CreateClusterRequest) *ProjectsZonesClustersCreateCall { + c := &ProjectsZonesClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.createclusterrequest = createclusterrequest + 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 *ProjectsZonesClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCreateCall { + 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 *ProjectsZonesClustersCreateCall) Context(ctx context.Context) *ProjectsZonesClustersCreateCall { + 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 *ProjectsZonesClustersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersCreateCall) 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.createclusterrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters", + // "httpMethod": "POST", + // "id": "container.projects.zones.clusters.create", + // "parameterOrder": [ + // "projectId", + // "zone" + // ], + // "parameters": { + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters", + // "request": { + // "$ref": "CreateClusterRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.delete": + +type ProjectsZonesClustersDeleteCall struct { + s *Service + projectId string + zone string + clusterId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the cluster, including the Kubernetes endpoint and +// all worker +// nodes. +// +// Firewalls and routes that were configured during cluster creation +// are also deleted. +// +// Other Google Compute Engine resources that might be in use by the +// cluster +// (e.g. load balancer resources) will not be deleted if they weren't +// present +// at the initial create time. +func (r *ProjectsZonesClustersService) Delete(projectId string, zone string, clusterId string) *ProjectsZonesClustersDeleteCall { + c := &ProjectsZonesClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.clusterId = clusterId + return c +} + +// Name sets the optional parameter "name": The name (project, location, +// cluster) of the cluster to delete. +// Specified in the format 'projects/*/locations/*/clusters/*'. +func (c *ProjectsZonesClustersDeleteCall) Name(name string) *ProjectsZonesClustersDeleteCall { + c.urlParams_.Set("name", name) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsZonesClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersDeleteCall { + 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 *ProjectsZonesClustersDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersDeleteCall { + 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 *ProjectsZonesClustersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + // "httpMethod": "DELETE", + // "id": "container.projects.zones.clusters.delete", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster to delete.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "name": { + // "description": "The name (project, location, cluster) of the cluster to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + // "location": "query", + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.get": + +type ProjectsZonesClustersGetCall struct { + s *Service + projectId string + zone string + clusterId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a specific cluster. +func (r *ProjectsZonesClustersService) Get(projectId string, zone string, clusterId string) *ProjectsZonesClustersGetCall { + c := &ProjectsZonesClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.clusterId = clusterId + return c +} + +// Name sets the optional parameter "name": The name (project, location, +// cluster) of the cluster to retrieve. +// Specified in the format 'projects/*/locations/*/clusters/*'. +func (c *ProjectsZonesClustersGetCall) Name(name string) *ProjectsZonesClustersGetCall { + c.urlParams_.Set("name", name) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsZonesClustersGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersGetCall { + 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 *ProjectsZonesClustersGetCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersGetCall { + 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 *ProjectsZonesClustersGetCall) Context(ctx context.Context) *ProjectsZonesClustersGetCall { + 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 *ProjectsZonesClustersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.get" call. +// Exactly one of *Cluster or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Cluster.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsZonesClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, 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 := &Cluster{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the details of a specific cluster.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + // "httpMethod": "GET", + // "id": "container.projects.zones.clusters.get", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster to retrieve.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "name": { + // "description": "The name (project, location, cluster) of the cluster to retrieve.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + // "location": "query", + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + // "response": { + // "$ref": "Cluster" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.legacyAbac": + +type ProjectsZonesClustersLegacyAbacCall struct { + s *Service + projectId string + zone string + clusterId string + setlegacyabacrequest *SetLegacyAbacRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// LegacyAbac: Enables or disables the ABAC authorization mechanism on a +// cluster. +func (r *ProjectsZonesClustersService) LegacyAbac(projectId string, zone string, clusterId string, setlegacyabacrequest *SetLegacyAbacRequest) *ProjectsZonesClustersLegacyAbacCall { + c := &ProjectsZonesClustersLegacyAbacCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.clusterId = clusterId + c.setlegacyabacrequest = setlegacyabacrequest + 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 *ProjectsZonesClustersLegacyAbacCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLegacyAbacCall { + 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 *ProjectsZonesClustersLegacyAbacCall) Context(ctx context.Context) *ProjectsZonesClustersLegacyAbacCall { + 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 *ProjectsZonesClustersLegacyAbacCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersLegacyAbacCall) 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.setlegacyabacrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.legacyAbac" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesClustersLegacyAbacCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Enables or disables the ABAC authorization mechanism on a cluster.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", + // "httpMethod": "POST", + // "id": "container.projects.zones.clusters.legacyAbac", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster to update.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", + // "request": { + // "$ref": "SetLegacyAbacRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.list": + +type ProjectsZonesClustersListCall struct { + s *Service + projectId string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all clusters owned by a project in either the specified +// zone or all +// zones. +func (r *ProjectsZonesClustersService) List(projectId string, zone string) *ProjectsZonesClustersListCall { + c := &ProjectsZonesClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + return c +} + +// Parent sets the optional parameter "parent": The parent (project and +// location) where the clusters will be listed. +// Specified in the format 'projects/*/locations/*'. +// Location "-" matches all zones and all regions. +func (c *ProjectsZonesClustersListCall) Parent(parent string) *ProjectsZonesClustersListCall { + c.urlParams_.Set("parent", parent) + 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 *ProjectsZonesClustersListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersListCall { + 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 *ProjectsZonesClustersListCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersListCall { + 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 *ProjectsZonesClustersListCall) Context(ctx context.Context) *ProjectsZonesClustersListCall { + 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 *ProjectsZonesClustersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.list" call. +// Exactly one of *ListClustersResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListClustersResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsZonesClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, 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 := &ListClustersResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all clusters owned by a project in either the specified zone or all\nzones.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters", + // "httpMethod": "GET", + // "id": "container.projects.zones.clusters.list", + // "parameterOrder": [ + // "projectId", + // "zone" + // ], + // "parameters": { + // "parent": { + // "description": "The parent (project and location) where the clusters will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", + // "location": "query", + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field is deprecated, use parent instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters", + // "response": { + // "$ref": "ListClustersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.resourceLabels": + +type ProjectsZonesClustersResourceLabelsCall struct { + s *Service + projectId string + zone string + clusterId string + setlabelsrequest *SetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ResourceLabels: Sets labels on a cluster. +func (r *ProjectsZonesClustersService) ResourceLabels(projectId string, zone string, clusterId string, setlabelsrequest *SetLabelsRequest) *ProjectsZonesClustersResourceLabelsCall { + c := &ProjectsZonesClustersResourceLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.clusterId = clusterId + c.setlabelsrequest = setlabelsrequest + 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 *ProjectsZonesClustersResourceLabelsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersResourceLabelsCall { + 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 *ProjectsZonesClustersResourceLabelsCall) Context(ctx context.Context) *ProjectsZonesClustersResourceLabelsCall { + 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 *ProjectsZonesClustersResourceLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersResourceLabelsCall) 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.setlabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.resourceLabels" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesClustersResourceLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets labels on a cluster.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", + // "httpMethod": "POST", + // "id": "container.projects.zones.clusters.resourceLabels", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", + // "request": { + // "$ref": "SetLabelsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.setMasterAuth": + +type ProjectsZonesClustersSetMasterAuthCall struct { + s *Service + projectId string + zone string + clusterId string + setmasterauthrequest *SetMasterAuthRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetMasterAuth: Used to set master auth materials. Currently supports +// :- +// Changing the admin password of a specific cluster. +// This can be either via password generation or explicitly set. +// Modify basic_auth.csv and reset the K8S API server. +func (r *ProjectsZonesClustersService) SetMasterAuth(projectId string, zone string, clusterId string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsZonesClustersSetMasterAuthCall { + c := &ProjectsZonesClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.clusterId = clusterId + c.setmasterauthrequest = setmasterauthrequest + 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 *ProjectsZonesClustersSetMasterAuthCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetMasterAuthCall { + 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 *ProjectsZonesClustersSetMasterAuthCall) Context(ctx context.Context) *ProjectsZonesClustersSetMasterAuthCall { + 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 *ProjectsZonesClustersSetMasterAuthCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersSetMasterAuthCall) 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.setmasterauthrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.setMasterAuth" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password of a specific cluster.\nThis can be either via password generation or explicitly set.\nModify basic_auth.csv and reset the K8S API server.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", + // "httpMethod": "POST", + // "id": "container.projects.zones.clusters.setMasterAuth", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster to upgrade.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", + // "request": { + // "$ref": "SetMasterAuthRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.setNetworkPolicy": + +type ProjectsZonesClustersSetNetworkPolicyCall struct { + s *Service + projectId string + zone string + clusterId string + setnetworkpolicyrequest *SetNetworkPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetNetworkPolicy: Enables/Disables Network Policy for a cluster. +func (r *ProjectsZonesClustersService) SetNetworkPolicy(projectId string, zone string, clusterId string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsZonesClustersSetNetworkPolicyCall { + c := &ProjectsZonesClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.clusterId = clusterId + c.setnetworkpolicyrequest = setnetworkpolicyrequest + 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 *ProjectsZonesClustersSetNetworkPolicyCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetNetworkPolicyCall { + 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 *ProjectsZonesClustersSetNetworkPolicyCall) Context(ctx context.Context) *ProjectsZonesClustersSetNetworkPolicyCall { + 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 *ProjectsZonesClustersSetNetworkPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersSetNetworkPolicyCall) 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.setnetworkpolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.setNetworkPolicy" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Enables/Disables Network Policy for a cluster.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", + // "httpMethod": "POST", + // "id": "container.projects.zones.clusters.setNetworkPolicy", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", + // "request": { + // "$ref": "SetNetworkPolicyRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.startIpRotation": + +type ProjectsZonesClustersStartIpRotationCall struct { + s *Service + projectId string + zone string + clusterId string + startiprotationrequest *StartIPRotationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StartIpRotation: Start master IP rotation. +func (r *ProjectsZonesClustersService) StartIpRotation(projectId string, zone string, clusterId string, startiprotationrequest *StartIPRotationRequest) *ProjectsZonesClustersStartIpRotationCall { + c := &ProjectsZonesClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.clusterId = clusterId + c.startiprotationrequest = startiprotationrequest + 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 *ProjectsZonesClustersStartIpRotationCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersStartIpRotationCall { + 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 *ProjectsZonesClustersStartIpRotationCall) Context(ctx context.Context) *ProjectsZonesClustersStartIpRotationCall { + 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 *ProjectsZonesClustersStartIpRotationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersStartIpRotationCall) 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.startiprotationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.startIpRotation" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesClustersStartIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Start master IP rotation.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", + // "httpMethod": "POST", + // "id": "container.projects.zones.clusters.startIpRotation", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", + // "request": { + // "$ref": "StartIPRotationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.update": + +type ProjectsZonesClustersUpdateCall struct { + s *Service + projectId string + zone string + clusterId string + updateclusterrequest *UpdateClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates the settings of a specific cluster. +func (r *ProjectsZonesClustersService) Update(projectId string, zone string, clusterId string, updateclusterrequest *UpdateClusterRequest) *ProjectsZonesClustersUpdateCall { + c := &ProjectsZonesClustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.clusterId = clusterId + c.updateclusterrequest = updateclusterrequest + 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 *ProjectsZonesClustersUpdateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersUpdateCall { + 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 *ProjectsZonesClustersUpdateCall) Context(ctx context.Context) *ProjectsZonesClustersUpdateCall { + 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 *ProjectsZonesClustersUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersUpdateCall) 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.updateclusterrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PUT", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.update" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the settings of a specific cluster.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + // "httpMethod": "PUT", + // "id": "container.projects.zones.clusters.update", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster to upgrade.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + // "request": { + // "$ref": "UpdateClusterRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.nodePools.create": + +type ProjectsZonesClustersNodePoolsCreateCall struct { + s *Service + projectId string + zone string + clusterId string + createnodepoolrequest *CreateNodePoolRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a node pool for a cluster. +func (r *ProjectsZonesClustersNodePoolsService) Create(projectId string, zone string, clusterId string, createnodepoolrequest *CreateNodePoolRequest) *ProjectsZonesClustersNodePoolsCreateCall { + c := &ProjectsZonesClustersNodePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.clusterId = clusterId + c.createnodepoolrequest = createnodepoolrequest + 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 *ProjectsZonesClustersNodePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsCreateCall { + 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 *ProjectsZonesClustersNodePoolsCreateCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsCreateCall { + 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 *ProjectsZonesClustersNodePoolsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersNodePoolsCreateCall) 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.createnodepoolrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.nodePools.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesClustersNodePoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a node pool for a cluster.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + // "httpMethod": "POST", + // "id": "container.projects.zones.clusters.nodePools.create", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster.\nThis field is deprecated, use parent instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use parent instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + // "request": { + // "$ref": "CreateNodePoolRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.nodePools.delete": + +type ProjectsZonesClustersNodePoolsDeleteCall struct { + s *Service + projectId string + zone string + clusterId string + nodePoolId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a node pool from a cluster. +func (r *ProjectsZonesClustersNodePoolsService) Delete(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsDeleteCall { + c := &ProjectsZonesClustersNodePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.clusterId = clusterId + c.nodePoolId = nodePoolId + return c +} + +// Name sets the optional parameter "name": The name (project, location, +// cluster, node pool id) of the node pool to delete. +// Specified in the format +// 'projects/*/locations/*/clusters/*/nodePools/*'. +func (c *ProjectsZonesClustersNodePoolsDeleteCall) Name(name string) *ProjectsZonesClustersNodePoolsDeleteCall { + c.urlParams_.Set("name", name) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsZonesClustersNodePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsDeleteCall { + 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 *ProjectsZonesClustersNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsDeleteCall { + 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 *ProjectsZonesClustersNodePoolsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + "nodePoolId": c.nodePoolId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.nodePools.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesClustersNodePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a node pool from a cluster.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + // "httpMethod": "DELETE", + // "id": "container.projects.zones.clusters.nodePools.delete", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId", + // "nodePoolId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "name": { + // "description": "The name (project, location, cluster, node pool id) of the node pool to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + // "location": "query", + // "type": "string" + // }, + // "nodePoolId": { + // "description": "The name of the node pool to delete.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.nodePools.get": + +type ProjectsZonesClustersNodePoolsGetCall struct { + s *Service + projectId string + zone string + clusterId string + nodePoolId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves the node pool requested. +func (r *ProjectsZonesClustersNodePoolsService) Get(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsGetCall { + c := &ProjectsZonesClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.clusterId = clusterId + c.nodePoolId = nodePoolId + return c +} + +// Name sets the optional parameter "name": The name (project, location, +// cluster, node pool id) of the node pool to get. +// Specified in the format +// 'projects/*/locations/*/clusters/*/nodePools/*'. +func (c *ProjectsZonesClustersNodePoolsGetCall) Name(name string) *ProjectsZonesClustersNodePoolsGetCall { + c.urlParams_.Set("name", name) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsZonesClustersNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsGetCall { + 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 *ProjectsZonesClustersNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsGetCall { + 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 *ProjectsZonesClustersNodePoolsGetCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsGetCall { + 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 *ProjectsZonesClustersNodePoolsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + "nodePoolId": c.nodePoolId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.nodePools.get" call. +// Exactly one of *NodePool or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *NodePool.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) (*NodePool, 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 := &NodePool{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the node pool requested.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + // "httpMethod": "GET", + // "id": "container.projects.zones.clusters.nodePools.get", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId", + // "nodePoolId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "name": { + // "description": "The name (project, location, cluster, node pool id) of the node pool to get.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + // "location": "query", + // "type": "string" + // }, + // "nodePoolId": { + // "description": "The name of the node pool.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + // "response": { + // "$ref": "NodePool" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.nodePools.list": + +type ProjectsZonesClustersNodePoolsListCall struct { + s *Service + projectId string + zone string + clusterId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the node pools for a cluster. +func (r *ProjectsZonesClustersNodePoolsService) List(projectId string, zone string, clusterId string) *ProjectsZonesClustersNodePoolsListCall { + c := &ProjectsZonesClustersNodePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.clusterId = clusterId + return c +} + +// Parent sets the optional parameter "parent": The parent (project, +// location, cluster id) where the node pools will be listed. +// Specified in the format 'projects/*/locations/*/clusters/*'. +func (c *ProjectsZonesClustersNodePoolsListCall) Parent(parent string) *ProjectsZonesClustersNodePoolsListCall { + c.urlParams_.Set("parent", parent) + 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 *ProjectsZonesClustersNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsListCall { + 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 *ProjectsZonesClustersNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsListCall { + 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 *ProjectsZonesClustersNodePoolsListCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsListCall { + 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 *ProjectsZonesClustersNodePoolsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.nodePools.list" call. +// Exactly one of *ListNodePoolsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListNodePoolsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsZonesClustersNodePoolsListCall) Do(opts ...googleapi.CallOption) (*ListNodePoolsResponse, 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 := &ListNodePoolsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the node pools for a cluster.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + // "httpMethod": "GET", + // "id": "container.projects.zones.clusters.nodePools.list", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster.\nThis field is deprecated, use parent instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "parent": { + // "description": "The parent (project, location, cluster id) where the node pools will be listed.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + // "location": "query", + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use parent instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + // "response": { + // "$ref": "ListNodePoolsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.nodePools.rollback": + +type ProjectsZonesClustersNodePoolsRollbackCall struct { + s *Service + projectId string + zone string + clusterId string + nodePoolId string + rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Rollback: Roll back the previously Aborted or Failed NodePool +// upgrade. +// This will be an no-op if the last upgrade successfully completed. +func (r *ProjectsZonesClustersNodePoolsService) Rollback(projectId string, zone string, clusterId string, nodePoolId string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsZonesClustersNodePoolsRollbackCall { + c := &ProjectsZonesClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.clusterId = clusterId + c.nodePoolId = nodePoolId + c.rollbacknodepoolupgraderequest = rollbacknodepoolupgraderequest + 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 *ProjectsZonesClustersNodePoolsRollbackCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsRollbackCall { + 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 *ProjectsZonesClustersNodePoolsRollbackCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsRollbackCall { + 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 *ProjectsZonesClustersNodePoolsRollbackCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersNodePoolsRollbackCall) 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.rollbacknodepoolupgraderequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + "nodePoolId": c.nodePoolId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.nodePools.rollback" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", + // "httpMethod": "POST", + // "id": "container.projects.zones.clusters.nodePools.rollback", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId", + // "nodePoolId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster to rollback.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "nodePoolId": { + // "description": "The name of the node pool to rollback.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", + // "request": { + // "$ref": "RollbackNodePoolUpgradeRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.nodePools.setManagement": + +type ProjectsZonesClustersNodePoolsSetManagementCall struct { + s *Service + projectId string + zone string + clusterId string + nodePoolId string + setnodepoolmanagementrequest *SetNodePoolManagementRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetManagement: Sets the NodeManagement options for a node pool. +func (r *ProjectsZonesClustersNodePoolsService) SetManagement(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolmanagementrequest *SetNodePoolManagementRequest) *ProjectsZonesClustersNodePoolsSetManagementCall { + c := &ProjectsZonesClustersNodePoolsSetManagementCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.clusterId = clusterId + c.nodePoolId = nodePoolId + c.setnodepoolmanagementrequest = setnodepoolmanagementrequest + 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 *ProjectsZonesClustersNodePoolsSetManagementCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsSetManagementCall { + 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 *ProjectsZonesClustersNodePoolsSetManagementCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsSetManagementCall { + 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 *ProjectsZonesClustersNodePoolsSetManagementCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesClustersNodePoolsSetManagementCall) 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.setnodepoolmanagementrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + "nodePoolId": c.nodePoolId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.clusters.nodePools.setManagement" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the NodeManagement options for a node pool.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", + // "httpMethod": "POST", + // "id": "container.projects.zones.clusters.nodePools.setManagement", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId", + // "nodePoolId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster to update.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "nodePoolId": { + // "description": "The name of the node pool to update.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", + // "request": { + // "$ref": "SetNodePoolManagementRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.operations.cancel": + +type ProjectsZonesOperationsCancelCall struct { + s *Service + projectId string + zone string + operationId string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Cancels the specified operation. +func (r *ProjectsZonesOperationsService) Cancel(projectId string, zone string, operationId string, canceloperationrequest *CancelOperationRequest) *ProjectsZonesOperationsCancelCall { + c := &ProjectsZonesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.operationId = operationId + c.canceloperationrequest = canceloperationrequest + 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 *ProjectsZonesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsCancelCall { + 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 *ProjectsZonesOperationsCancelCall) Context(ctx context.Context) *ProjectsZonesOperationsCancelCall { + 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 *ProjectsZonesOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesOperationsCancelCall) 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.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "operationId": c.operationId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.operations.cancel" 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 *ProjectsZonesOperationsCancelCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Cancels the specified operation.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", + // "httpMethod": "POST", + // "id": "container.projects.zones.operations.cancel", + // "parameterOrder": [ + // "projectId", + // "zone", + // "operationId" + // ], + // "parameters": { + // "operationId": { + // "description": "The server-assigned `name` of the operation.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.operations.get": + +type ProjectsZonesOperationsGetCall struct { + s *Service + projectId string + zone string + operationId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the specified operation. +func (r *ProjectsZonesOperationsService) Get(projectId string, zone string, operationId string) *ProjectsZonesOperationsGetCall { + c := &ProjectsZonesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + c.operationId = operationId + return c +} + +// Name sets the optional parameter "name": The name (project, location, +// operation id) of the operation to get. +// Specified in the format 'projects/*/locations/*/operations/*'. +func (c *ProjectsZonesOperationsGetCall) Name(name string) *ProjectsZonesOperationsGetCall { + c.urlParams_.Set("name", name) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsZonesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsGetCall { + 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 *ProjectsZonesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsZonesOperationsGetCall { + 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 *ProjectsZonesOperationsGetCall) Context(ctx context.Context) *ProjectsZonesOperationsGetCall { + 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 *ProjectsZonesOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "operationId": c.operationId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsZonesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the specified operation.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}", + // "httpMethod": "GET", + // "id": "container.projects.zones.operations.get", + // "parameterOrder": [ + // "projectId", + // "zone", + // "operationId" + // ], + // "parameters": { + // "name": { + // "description": "The name (project, location, operation id) of the operation to get.\nSpecified in the format 'projects/*/locations/*/operations/*'.", + // "location": "query", + // "type": "string" + // }, + // "operationId": { + // "description": "The server-assigned `name` of the operation.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.operations.list": + +type ProjectsZonesOperationsListCall struct { + s *Service + projectId string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all operations in a project in a specific zone or all +// zones. +func (r *ProjectsZonesOperationsService) List(projectId string, zone string) *ProjectsZonesOperationsListCall { + c := &ProjectsZonesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.zone = zone + return c +} + +// Parent sets the optional parameter "parent": The parent (project and +// location) where the operations will be listed. +// Specified in the format 'projects/*/locations/*'. +// Location "-" matches all zones and all regions. +func (c *ProjectsZonesOperationsListCall) Parent(parent string) *ProjectsZonesOperationsListCall { + c.urlParams_.Set("parent", parent) + 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 *ProjectsZonesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsListCall { + 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 *ProjectsZonesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsZonesOperationsListCall { + 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 *ProjectsZonesOperationsListCall) Context(ctx context.Context) *ProjectsZonesOperationsListCall { + 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 *ProjectsZonesOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.zones.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsZonesOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, 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 := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all operations in a project in a specific zone or all zones.", + // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations", + // "httpMethod": "GET", + // "id": "container.projects.zones.operations.list", + // "parameterOrder": [ + // "projectId", + // "zone" + // ], + // "parameters": { + // "parent": { + // "description": "The parent (project and location) where the operations will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", + // "location": "query", + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for, or `-` for all zones.\nThis field is deprecated, use parent instead.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}/zones/{zone}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/vendor/google.golang.org/api/content/v2/content-api.json b/vendor/google.golang.org/api/content/v2/content-api.json index af7c73490..95681bf2e 100644 --- a/vendor/google.golang.org/api/content/v2/content-api.json +++ b/vendor/google.golang.org/api/content/v2/content-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/Jt8A6kt1GnP24vdp0UtThptYtC0\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/7DxE-WvhKyxBCPMjpNGA9QTXnO8\"", "discoveryVersion": "v1", "id": "content:v2", "name": "content", "canonicalName": "Shopping Content", "version": "v2", - "revision": "20170803", + "revision": "20170905", "title": "Content API for Shopping", "description": "Manages product items, inventory, and Merchant Center accounts for Google Shopping.", "ownerDomain": "google.com", @@ -444,6 +444,10 @@ "description": "An entry ID, unique within the batch request.", "format": "uint32" }, + "force": { + "type": "boolean", + "description": "Whether the account should be deleted if the account has offers. Only applicable if the method is delete." + }, "merchantId": { "type": "string", "description": "The ID of the managing account.", @@ -3875,6 +3879,10 @@ "$ref": "DeliveryTime", "description": "Time spent in various aspects from order to the delivery of the product. Required." }, + "minimumOrderValue": { + "$ref": "Price", + "description": "Minimum order value for this service. If set, indicates that customers will have to spend at least this amount. All prices within a service must have the same currency." + }, "name": { "type": "string", "description": "Free-form name of the service. Must be unique within target account. Required." @@ -4425,7 +4433,7 @@ }, "overwrite": { "type": "boolean", - "description": "Flag to remove any existing claim on the requested website by another account and replace it with a claim from this account.", + "description": "Only available to selected merchants. When set to True, this flag removes any existing claim on the requested website by another account and replaces it with a claim from this account.", "location": "query" } }, @@ -4480,6 +4488,12 @@ "description": "Flag to run the request in dry-run mode.", "location": "query" }, + "force": { + "type": "boolean", + "description": "Flag to delete sub-accounts with products. The default value of false will become active on September 28, 2017.", + "default": "true", + "location": "query" + }, "merchantId": { "type": "string", "description": "The ID of the managing account.", diff --git a/vendor/google.golang.org/api/content/v2/content-gen.go b/vendor/google.golang.org/api/content/v2/content-gen.go index f96f40cec..70db2ba4a 100644 --- a/vendor/google.golang.org/api/content/v2/content-gen.go +++ b/vendor/google.golang.org/api/content/v2/content-gen.go @@ -741,6 +741,10 @@ type AccountsCustomBatchRequestEntry struct { // BatchId: An entry ID, unique within the batch request. BatchId int64 `json:"batchId,omitempty"` + // Force: Whether the account should be deleted if the account has + // offers. Only applicable if the method is delete. + Force bool `json:"force,omitempty"` + // MerchantId: The ID of the managing account. MerchantId uint64 `json:"merchantId,omitempty,string"` @@ -6023,6 +6027,11 @@ type Service struct { // delivery of the product. Required. DeliveryTime *DeliveryTime `json:"deliveryTime,omitempty"` + // MinimumOrderValue: Minimum order value for this service. If set, + // indicates that customers will have to spend at least this amount. All + // prices within a service must have the same currency. + MinimumOrderValue *Price `json:"minimumOrderValue,omitempty"` + // Name: Free-form name of the service. Must be unique within target // account. Required. Name string `json:"name,omitempty"` @@ -6815,9 +6824,10 @@ func (r *AccountsService) Claimwebsite(merchantId uint64, accountId uint64) *Acc return c } -// Overwrite sets the optional parameter "overwrite": Flag to remove any -// existing claim on the requested website by another account and -// replace it with a claim from this account. +// Overwrite sets the optional parameter "overwrite": Only available to +// selected merchants. When set to True, this flag removes any existing +// claim on the requested website by another account and replaces it +// with a claim from this account. func (c *AccountsClaimwebsiteCall) Overwrite(overwrite bool) *AccountsClaimwebsiteCall { c.urlParams_.Set("overwrite", fmt.Sprint(overwrite)) return c @@ -6928,7 +6938,7 @@ func (c *AccountsClaimwebsiteCall) Do(opts ...googleapi.CallOption) (*AccountsCl // "type": "string" // }, // "overwrite": { - // "description": "Flag to remove any existing claim on the requested website by another account and replace it with a claim from this account.", + // "description": "Only available to selected merchants. When set to True, this flag removes any existing claim on the requested website by another account and replaces it with a claim from this account.", // "location": "query", // "type": "boolean" // } @@ -7103,6 +7113,14 @@ func (c *AccountsDeleteCall) DryRun(dryRun bool) *AccountsDeleteCall { return c } +// Force sets the optional parameter "force": Flag to delete +// sub-accounts with products. The default value of false will become +// active on September 28, 2017. +func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall { + 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. @@ -7180,6 +7198,12 @@ func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error { // "location": "query", // "type": "boolean" // }, + // "force": { + // "default": "true", + // "description": "Flag to delete sub-accounts with products. The default value of false will become active on September 28, 2017.", + // "location": "query", + // "type": "boolean" + // }, // "merchantId": { // "description": "The ID of the managing account.", // "format": "uint64", diff --git a/vendor/google.golang.org/api/content/v2sandbox/content-api.json b/vendor/google.golang.org/api/content/v2sandbox/content-api.json index 7e6432bc6..3ae56087d 100644 --- a/vendor/google.golang.org/api/content/v2sandbox/content-api.json +++ b/vendor/google.golang.org/api/content/v2sandbox/content-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/QLI1M7q1prH-C-6ZsfL_vaGQmBM\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/R4bc8bYIPV7Xpbth35g-aCtObI0\"", "discoveryVersion": "v1", "id": "content:v2sandbox", "name": "content", "canonicalName": "Shopping Content", "version": "v2sandbox", - "revision": "20170803", + "revision": "20170905", "title": "Content API for Shopping", "description": "Manages product items, inventory, and Merchant Center accounts for Google Shopping.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/customsearch/v1/customsearch-api.json b/vendor/google.golang.org/api/customsearch/v1/customsearch-api.json index f0740936a..ba2e94c0d 100644 --- a/vendor/google.golang.org/api/customsearch/v1/customsearch-api.json +++ b/vendor/google.golang.org/api/customsearch/v1/customsearch-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/mEVn7ZP7sXAW_2rxSFljK04NT4w\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/vjsLOntBAplI6gHuETouIyrKBJI\"", "discoveryVersion": "v1", "id": "customsearch:v1", "name": "customsearch", "version": "v1", - "revision": "20170530", + "revision": "20170615", "title": "CustomSearch API", "description": "Searches over a website or collection of websites", "ownerDomain": "google.com", 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 c85827380..334ec988f 100644 --- a/vendor/google.golang.org/api/dataflow/v1b3/dataflow-api.json +++ b/vendor/google.golang.org/api/dataflow/v1b3/dataflow-api.json @@ -1,4 +1,9 @@ { + "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, "version": "v1b3", "baseUrl": "https://dataflow.googleapis.com/", "auth": { @@ -20,16 +25,16 @@ } }, "kind": "discovery#restDescription", - "description": "Manages Google Cloud Dataflow projects on Google Cloud Platform.", "servicePath": "", + "description": "Manages Google Cloud Dataflow projects on Google Cloud Platform.", "rootUrl": "https://dataflow.googleapis.com/", "basePath": "", "ownerDomain": "google.com", "name": "dataflow", "batchPath": "batch", - "id": "dataflow:v1b3", + "revision": "20170831", "documentationLink": "https://cloud.google.com/dataflow", - "revision": "20170724", + "id": "dataflow:v1b3", "title": "Google Dataflow API", "ownerName": "Google", "discoveryVersion": "v1", @@ -37,20 +42,19 @@ "projects": { "methods": { "workerMessages": { - "response": { - "$ref": "SendWorkerMessagesResponse" + "flatPath": "v1b3/projects/{projectId}/WorkerMessages", + "path": "v1b3/projects/{projectId}/WorkerMessages", + "id": "dataflow.projects.workerMessages", + "request": { + "$ref": "SendWorkerMessagesRequest" }, + "description": "Send a worker_message to the service.", + "httpMethod": "POST", "parameterOrder": [ "projectId" ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "location": "path", - "description": "The project to send the WorkerMessages to.", - "type": "string", - "required": true - } + "response": { + "$ref": "SendWorkerMessagesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -58,12 +62,13 @@ "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email" ], - "flatPath": "v1b3/projects/{projectId}/WorkerMessages", - "id": "dataflow.projects.workerMessages", - "path": "v1b3/projects/{projectId}/WorkerMessages", - "description": "Send a worker_message to the service.", - "request": { - "$ref": "SendWorkerMessagesRequest" + "parameters": { + "projectId": { + "location": "path", + "description": "The project to send the WorkerMessages to.", + "type": "string", + "required": true + } } } }, @@ -71,21 +76,18 @@ "locations": { "methods": { "workerMessages": { - "flatPath": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages", - "id": "dataflow.projects.locations.workerMessages", - "path": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages", "request": { "$ref": "SendWorkerMessagesRequest" }, "description": "Send a worker_message to the service.", - "response": { - "$ref": "SendWorkerMessagesResponse" - }, + "httpMethod": "POST", "parameterOrder": [ "projectId", "location" ], - "httpMethod": "POST", + "response": { + "$ref": "SendWorkerMessagesResponse" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", @@ -94,65 +96,27 @@ ], "parameters": { "projectId": { - "type": "string", - "required": true, - "location": "path", - "description": "The project to send the WorkerMessages to." - }, - "location": { - "description": "The location which contains the job", + "description": "The project to send the WorkerMessages to.", "type": "string", "required": true, "location": "path" + }, + "location": { + "type": "string", + "required": true, + "location": "path", + "description": "The location which contains the job" } - } + }, + "flatPath": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages", + "path": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages", + "id": "dataflow.projects.locations.workerMessages" } }, "resources": { "templates": { "methods": { - "create": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "location": { - "description": "The location to which to direct the request.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "Required. The ID of the Cloud Platform project that the job belongs to.", - "type": "string", - "required": true - } - }, - "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates", - "id": "dataflow.projects.locations.templates.create", - "path": "v1b3/projects/{projectId}/locations/{location}/templates", - "request": { - "$ref": "CreateJobFromTemplateRequest" - }, - "description": "Creates a Cloud Dataflow job from a template.", - "response": { - "$ref": "Job" - }, - "parameterOrder": [ - "projectId", - "location" - ], - "httpMethod": "POST" - }, "launch": { - "description": "Launch a template.", - "request": { - "$ref": "LaunchTemplateParameters" - }, "httpMethod": "POST", "parameterOrder": [ "projectId", @@ -162,12 +126,6 @@ "$ref": "LaunchTemplateResponse" }, "parameters": { - "location": { - "description": "The location to which to direct the request.", - "type": "string", - "required": true, - "location": "path" - }, "validateOnly": { "location": "query", "description": "If true, the request is validated but not actually executed.\nDefaults to false.", @@ -180,9 +138,15 @@ "required": true }, "gcsPath": { + "location": "query", "description": "Required. A Cloud Storage path to the template from which to create\nthe job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.", + "type": "string" + }, + "location": { + "description": "The location to which to direct the request.", "type": "string", - "location": "query" + "required": true, + "location": "path" } }, "scopes": [ @@ -193,32 +157,29 @@ ], "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:launch", "path": "v1b3/projects/{projectId}/locations/{location}/templates:launch", - "id": "dataflow.projects.locations.templates.launch" + "id": "dataflow.projects.locations.templates.launch", + "description": "Launch a template.", + "request": { + "$ref": "LaunchTemplateParameters" + } }, "get": { - "id": "dataflow.projects.locations.templates.get", - "path": "v1b3/projects/{projectId}/locations/{location}/templates:get", "description": "Get the template associated with a template.", - "response": { - "$ref": "GetTemplateResponse" - }, + "httpMethod": "GET", "parameterOrder": [ "projectId", "location" ], - "httpMethod": "GET", + "response": { + "$ref": "GetTemplateResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], "parameters": { - "gcsPath": { - "location": "query", - "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be a valid Cloud Storage URL, beginning with `gs://`.", - "type": "string" - }, - "location": { - "location": "path", - "description": "The location to which to direct the request.", - "type": "string", - "required": true - }, "view": { "location": "query", "enum": [ @@ -232,6 +193,48 @@ "description": "Required. The ID of the Cloud Platform project that the job belongs to.", "type": "string", "required": true + }, + "gcsPath": { + "location": "query", + "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be a valid Cloud Storage URL, beginning with `gs://`.", + "type": "string" + }, + "location": { + "location": "path", + "description": "The location to which to direct the request.", + "type": "string", + "required": true + } + }, + "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:get", + "path": "v1b3/projects/{projectId}/locations/{location}/templates:get", + "id": "dataflow.projects.locations.templates.get" + }, + "create": { + "description": "Creates a Cloud Dataflow job from a template.", + "request": { + "$ref": "CreateJobFromTemplateRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "location" + ], + "response": { + "$ref": "Job" + }, + "parameters": { + "projectId": { + "description": "Required. The ID of the Cloud Platform project that the job belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "location": { + "type": "string", + "required": true, + "location": "path", + "description": "The location to which to direct the request." } }, "scopes": [ @@ -240,72 +243,29 @@ "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email" ], - "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:get" + "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates", + "path": "v1b3/projects/{projectId}/locations/{location}/templates", + "id": "dataflow.projects.locations.templates.create" } } }, "jobs": { "methods": { - "update": { - "response": { - "$ref": "Job" - }, - "parameterOrder": [ - "projectId", - "location", - "jobId" - ], - "httpMethod": "PUT", - "parameters": { - "jobId": { - "description": "The job ID.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "The ID of the Cloud Platform project that the job belongs to.", - "type": "string", - "required": true - }, - "location": { - "location": "path", - "description": "The location that contains this job.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", - "id": "dataflow.projects.locations.jobs.update", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", - "description": "Updates the state of an existing Cloud Dataflow job.", - "request": { - "$ref": "Job" - } - }, "create": { - "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", - "id": "dataflow.projects.locations.jobs.create", "path": "v1b3/projects/{projectId}/locations/{location}/jobs", + "id": "dataflow.projects.locations.jobs.create", "request": { "$ref": "Job" }, "description": "Creates a Cloud Dataflow job.", - "response": { - "$ref": "Job" - }, + "httpMethod": "POST", "parameterOrder": [ "projectId", "location" ], - "httpMethod": "POST", + "response": { + "$ref": "Job" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", @@ -314,6 +274,7 @@ ], "parameters": { "view": { + "location": "query", "enum": [ "JOB_VIEW_UNKNOWN", "JOB_VIEW_SUMMARY", @@ -321,8 +282,7 @@ "JOB_VIEW_DESCRIPTION" ], "description": "The level of information requested in response.", - "type": "string", - "location": "query" + "type": "string" }, "projectId": { "description": "The ID of the Cloud Platform project that the job belongs to.", @@ -331,19 +291,21 @@ "location": "path" }, "location": { + "description": "The location that contains this job.", "type": "string", "required": true, - "location": "path", - "description": "The location that contains this job." + "location": "path" }, "replaceJobId": { + "location": "query", "description": "Deprecated. This field is now in the Job message.", - "type": "string", - "location": "query" + "type": "string" } - } + }, + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs" }, "getMetrics": { + "description": "Request the job status.", "httpMethod": "GET", "parameterOrder": [ "projectId", @@ -353,12 +315,6 @@ "response": { "$ref": "JobMetrics" }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], "parameters": { "jobId": { "description": "The job to get messages for.", @@ -379,20 +335,24 @@ "required": true }, "startTime": { - "format": "google-datetime", - "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job.", "type": "string", - "location": "query" + "location": "query", + "format": "google-datetime", + "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job." } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics", "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics", - "id": "dataflow.projects.locations.jobs.getMetrics", - "description": "Request the job status." + "id": "dataflow.projects.locations.jobs.getMetrics" }, "list": { "description": "List the jobs of a project in a given region.", - "httpMethod": "GET", "response": { "$ref": "ListJobsResponse" }, @@ -400,6 +360,7 @@ "projectId", "location" ], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", @@ -407,6 +368,12 @@ "https://www.googleapis.com/auth/userinfo.email" ], "parameters": { + "projectId": { + "location": "path", + "description": "The project which owns the jobs.", + "type": "string", + "required": true + }, "filter": { "location": "query", "enum": [ @@ -419,15 +386,15 @@ "type": "string" }, "location": { + "location": "path", "description": "The location that contains this job.", "type": "string", - "required": true, - "location": "path" + "required": true }, "pageToken": { - "location": "query", "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.", - "type": "string" + "type": "string", + "location": "query" }, "pageSize": { "location": "query", @@ -436,28 +403,25 @@ "type": "integer" }, "view": { - "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", - "type": "string", "location": "query", "enum": [ "JOB_VIEW_UNKNOWN", "JOB_VIEW_SUMMARY", "JOB_VIEW_ALL", "JOB_VIEW_DESCRIPTION" - ] - }, - "projectId": { - "description": "The project which owns the jobs.", - "type": "string", - "required": true, - "location": "path" + ], + "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", + "type": "string" } }, "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs", - "id": "dataflow.projects.locations.jobs.list" + "id": "dataflow.projects.locations.jobs.list", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs" }, "get": { + "id": "dataflow.projects.locations.jobs.get", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", + "description": "Gets the state of the specified Cloud Dataflow job.", "response": { "$ref": "Job" }, @@ -467,14 +431,15 @@ "jobId" ], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], "parameters": { - "location": { - "location": "path", - "description": "The location that contains this job.", - "type": "string", - "required": true - }, "view": { + "type": "string", "location": "query", "enum": [ "JOB_VIEW_UNKNOWN", @@ -482,57 +447,105 @@ "JOB_VIEW_ALL", "JOB_VIEW_DESCRIPTION" ], - "description": "The level of information requested in response.", - "type": "string" + "description": "The level of information requested in response." }, "jobId": { - "location": "path", "description": "The job ID.", "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "location": "path", + "description": "The ID of the Cloud Platform project that the job belongs to.", + "type": "string", "required": true }, - "projectId": { + "location": { + "description": "The location that contains this job.", "type": "string", "required": true, - "location": "path", - "description": "The ID of the Cloud Platform project that the job belongs to." + "location": "path" } }, + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}" + }, + "update": { + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "location", + "jobId" + ], + "httpMethod": "PUT", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email" ], + "parameters": { + "jobId": { + "type": "string", + "required": true, + "location": "path", + "description": "The job ID." + }, + "projectId": { + "location": "path", + "description": "The ID of the Cloud Platform project that the job belongs to.", + "type": "string", + "required": true + }, + "location": { + "description": "The location that contains this job.", + "type": "string", + "required": true, + "location": "path" + } + }, "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", - "id": "dataflow.projects.locations.jobs.get", + "id": "dataflow.projects.locations.jobs.update", "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", - "description": "Gets the state of the specified Cloud Dataflow job." + "request": { + "$ref": "Job" + }, + "description": "Updates the state of an existing Cloud Dataflow job." } }, "resources": { "workItems": { "methods": { "reportStatus": { - "description": "Reports the status of dataflow WorkItems leased by a worker.", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus", + "id": "dataflow.projects.locations.jobs.workItems.reportStatus", "request": { "$ref": "ReportWorkItemStatusRequest" }, - "response": { - "$ref": "ReportWorkItemStatusResponse" - }, + "description": "Reports the status of dataflow WorkItems leased by a worker.", + "httpMethod": "POST", "parameterOrder": [ "projectId", "location", "jobId" ], - "httpMethod": "POST", + "response": { + "$ref": "ReportWorkItemStatusResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], "parameters": { "jobId": { - "description": "The job which the WorkItem is part of.", "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "The job which the WorkItem is part of." }, "projectId": { "location": "path", @@ -547,15 +560,7 @@ "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus", - "id": "dataflow.projects.locations.jobs.workItems.reportStatus", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus" + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus" }, "lease": { "response": { @@ -568,23 +573,23 @@ ], "httpMethod": "POST", "parameters": { - "location": { - "location": "path", - "description": "The location which contains the WorkItem's job.", - "type": "string", - "required": true - }, "jobId": { - "location": "path", "description": "Identifies the workflow job this worker belongs to.", "type": "string", - "required": true + "required": true, + "location": "path" }, "projectId": { + "description": "Identifies the project this worker belongs to.", "type": "string", "required": true, - "location": "path", - "description": "Identifies the project this worker belongs to." + "location": "path" + }, + "location": { + "description": "The location which contains the WorkItem's job.", + "type": "string", + "required": true, + "location": "path" } }, "scopes": [ @@ -606,39 +611,12 @@ "debug": { "methods": { "sendCapture": { - "parameters": { - "location": { - "description": "The location which contains the job specified by job_id.", - "type": "string", - "required": true, - "location": "path" - }, - "jobId": { - "location": "path", - "description": "The job id.", - "type": "string", - "required": true - }, - "projectId": { - "location": "path", - "description": "The project id.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture", "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture", "id": "dataflow.projects.locations.jobs.debug.sendCapture", - "description": "Send encoded debug capture data for component.", "request": { "$ref": "SendDebugCaptureRequest" }, + "description": "Send encoded debug capture data for component.", "httpMethod": "POST", "parameterOrder": [ "projectId", @@ -647,25 +625,14 @@ ], "response": { "$ref": "SendDebugCaptureResponse" - } - }, - "getConfig": { - "response": { - "$ref": "GetDebugConfigResponse" }, - "parameterOrder": [ - "projectId", - "location", - "jobId" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" ], - "httpMethod": "POST", "parameters": { - "location": { - "type": "string", - "required": true, - "location": "path", - "description": "The location which contains the job specified by job_id." - }, "jobId": { "description": "The job id.", "type": "string", @@ -673,39 +640,29 @@ "location": "path" }, "projectId": { + "location": "path", "description": "The project id.", "type": "string", - "required": true, - "location": "path" + "required": true + }, + "location": { + "location": "path", + "description": "The location which contains the job specified by job_id.", + "type": "string", + "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig", - "id": "dataflow.projects.locations.jobs.debug.getConfig", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig", - "description": "Get encoded debug configuration for component. Not cacheable.", - "request": { - "$ref": "GetDebugConfigRequest" - } - } - } - }, - "messages": { - "methods": { - "list": { - "httpMethod": "GET", + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture" + }, + "getConfig": { + "httpMethod": "POST", "parameterOrder": [ "projectId", "location", "jobId" ], "response": { - "$ref": "ListJobMessagesResponse" + "$ref": "GetDebugConfigResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -714,18 +671,66 @@ "https://www.googleapis.com/auth/userinfo.email" ], "parameters": { + "jobId": { + "location": "path", + "description": "The job id.", + "type": "string", + "required": true + }, + "projectId": { + "description": "The project id.", + "type": "string", + "required": true, + "location": "path" + }, + "location": { + "description": "The location which contains the job specified by job_id.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig", + "id": "dataflow.projects.locations.jobs.debug.getConfig", + "request": { + "$ref": "GetDebugConfigRequest" + }, + "description": "Get encoded debug configuration for component. Not cacheable." + } + } + }, + "messages": { + "methods": { + "list": { + "response": { + "$ref": "ListJobMessagesResponse" + }, + "parameterOrder": [ + "projectId", + "location", + "jobId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "jobId": { + "location": "path", + "description": "The job to get messages about.", + "type": "string", + "required": true + }, "projectId": { "location": "path", "description": "A project id.", "type": "string", "required": true }, - "jobId": { - "description": "The job to get messages about.", - "type": "string", - "required": true, - "location": "path" - }, "endTime": { "location": "query", "format": "google-datetime", @@ -738,16 +743,16 @@ "type": "string", "required": true }, + "pageToken": { + "location": "query", + "description": "If supplied, this should be the value of next_page_token returned\nby an earlier call. This will cause the next page of results to\nbe returned.", + "type": "string" + }, "startTime": { + "location": "query", "format": "google-datetime", "description": "If specified, return only messages with timestamps \u003e= start_time.\nThe default is the job creation time (i.e. beginning of messages).", - "type": "string", - "location": "query" - }, - "pageToken": { - "description": "If supplied, this should be the value of next_page_token returned\nby an earlier call. This will cause the next page of results to\nbe returned.", - "type": "string", - "location": "query" + "type": "string" }, "pageSize": { "format": "int32", @@ -756,6 +761,7 @@ "location": "query" }, "minimumImportance": { + "description": "Filter to only get messages with importance \u003e= level", "type": "string", "location": "query", "enum": [ @@ -765,13 +771,12 @@ "JOB_MESSAGE_BASIC", "JOB_MESSAGE_WARNING", "JOB_MESSAGE_ERROR" - ], - "description": "Filter to only get messages with importance \u003e= level" + ] } }, "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages", "id": "dataflow.projects.locations.jobs.messages.list", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages", "description": "Request the job status." } } @@ -782,102 +787,27 @@ }, "templates": { "methods": { - "get": { - "description": "Get the template associated with a template.", + "launch": { + "id": "dataflow.projects.templates.launch", + "path": "v1b3/projects/{projectId}/templates:launch", + "description": "Launch a template.", + "request": { + "$ref": "LaunchTemplateParameters" + }, "response": { - "$ref": "GetTemplateResponse" + "$ref": "LaunchTemplateResponse" }, "parameterOrder": [ "projectId" ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], + "httpMethod": "POST", "parameters": { - "location": { - "description": "The location to which to direct the request.", - "type": "string", - "location": "query" - }, - "view": { - "location": "query", - "enum": [ - "METADATA_ONLY" - ], - "description": "The view to retrieve. Defaults to METADATA_ONLY.", - "type": "string" - }, "projectId": { "location": "path", "description": "Required. The ID of the Cloud Platform project that the job belongs to.", "type": "string", "required": true }, - "gcsPath": { - "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be a valid Cloud Storage URL, beginning with `gs://`.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1b3/projects/{projectId}/templates:get", - "id": "dataflow.projects.templates.get", - "path": "v1b3/projects/{projectId}/templates:get" - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "projectId": { - "description": "Required. The ID of the Cloud Platform project that the job belongs to.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1b3/projects/{projectId}/templates", - "path": "v1b3/projects/{projectId}/templates", - "id": "dataflow.projects.templates.create", - "request": { - "$ref": "CreateJobFromTemplateRequest" - }, - "description": "Creates a Cloud Dataflow job from a template." - }, - "launch": { - "httpMethod": "POST", - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "LaunchTemplateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "projectId": { - "description": "Required. The ID of the Cloud Platform project that the job belongs to.", - "type": "string", - "required": true, - "location": "path" - }, "gcsPath": { "location": "query", "description": "Required. A Cloud Storage path to the template from which to create\nthe job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.", @@ -894,20 +824,347 @@ "type": "boolean" } }, - "flatPath": "v1b3/projects/{projectId}/templates:launch", - "path": "v1b3/projects/{projectId}/templates:launch", - "id": "dataflow.projects.templates.launch", - "request": { - "$ref": "LaunchTemplateParameters" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/templates:launch" + }, + "get": { + "flatPath": "v1b3/projects/{projectId}/templates:get", + "id": "dataflow.projects.templates.get", + "path": "v1b3/projects/{projectId}/templates:get", + "description": "Get the template associated with a template.", + "response": { + "$ref": "GetTemplateResponse" }, - "description": "Launch a template." + "parameterOrder": [ + "projectId" + ], + "httpMethod": "GET", + "parameters": { + "location": { + "description": "The location to which to direct the request.", + "type": "string", + "location": "query" + }, + "view": { + "location": "query", + "enum": [ + "METADATA_ONLY" + ], + "description": "The view to retrieve. Defaults to METADATA_ONLY.", + "type": "string" + }, + "projectId": { + "description": "Required. The ID of the Cloud Platform project that the job belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "gcsPath": { + "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be a valid Cloud Storage URL, beginning with `gs://`.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ] + }, + "create": { + "request": { + "$ref": "CreateJobFromTemplateRequest" + }, + "description": "Creates a Cloud Dataflow job from a template.", + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "projectId": { + "description": "Required. The ID of the Cloud Platform project that the job belongs to.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1b3/projects/{projectId}/templates", + "id": "dataflow.projects.templates.create", + "path": "v1b3/projects/{projectId}/templates" } } }, "jobs": { "methods": { + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "ListJobsResponse" + }, + "parameters": { + "filter": { + "location": "query", + "enum": [ + "UNKNOWN", + "ALL", + "TERMINATED", + "ACTIVE" + ], + "description": "The kind of filter to use.", + "type": "string" + }, + "location": { + "description": "The location that contains this job.", + "type": "string", + "location": "query" + }, + "pageToken": { + "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.", + "type": "integer" + }, + "view": { + "type": "string", + "location": "query", + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ], + "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`." + }, + "projectId": { + "location": "path", + "description": "The project which owns the jobs.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/jobs", + "path": "v1b3/projects/{projectId}/jobs", + "id": "dataflow.projects.jobs.list", + "description": "List the jobs of a project in a given region." + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "replaceJobId": { + "location": "query", + "description": "Deprecated. This field is now in the Job message.", + "type": "string" + }, + "view": { + "type": "string", + "location": "query", + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ], + "description": "The level of information requested in response." + }, + "projectId": { + "location": "path", + "description": "The ID of the Cloud Platform project that the job belongs to.", + "type": "string", + "required": true + }, + "location": { + "location": "query", + "description": "The location that contains this job.", + "type": "string" + } + }, + "flatPath": "v1b3/projects/{projectId}/jobs", + "path": "v1b3/projects/{projectId}/jobs", + "id": "dataflow.projects.jobs.create", + "request": { + "$ref": "Job" + }, + "description": "Creates a Cloud Dataflow job." + }, + "getMetrics": { + "description": "Request the job status.", + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "jobId" + ], + "response": { + "$ref": "JobMetrics" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "startTime": { + "location": "query", + "format": "google-datetime", + "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job.", + "type": "string" + }, + "jobId": { + "location": "path", + "description": "The job to get messages for.", + "type": "string", + "required": true + }, + "projectId": { + "description": "A project id.", + "type": "string", + "required": true, + "location": "path" + }, + "location": { + "location": "query", + "description": "The location which contains the job specified by job_id.", + "type": "string" + } + }, + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/metrics", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/metrics", + "id": "dataflow.projects.jobs.getMetrics" + }, + "get": { + "parameters": { + "location": { + "type": "string", + "location": "query", + "description": "The location that contains this job." + }, + "view": { + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ], + "description": "The level of information requested in response.", + "type": "string", + "location": "query" + }, + "jobId": { + "location": "path", + "description": "The job ID.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "The ID of the Cloud Platform project that the job belongs to.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", + "path": "v1b3/projects/{projectId}/jobs/{jobId}", + "id": "dataflow.projects.jobs.get", + "description": "Gets the state of the specified Cloud Dataflow job.", + "httpMethod": "GET", + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "jobId" + ] + }, + "update": { + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "jobId" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "jobId": { + "description": "The job ID.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "description": "The ID of the Cloud Platform project that the job belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "location": { + "location": "query", + "description": "The location that contains this job.", + "type": "string" + } + }, + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", + "id": "dataflow.projects.jobs.update", + "path": "v1b3/projects/{projectId}/jobs/{jobId}", + "request": { + "$ref": "Job" + }, + "description": "Updates the state of an existing Cloud Dataflow job." + }, "aggregated": { - "description": "List the jobs of a project across all regions.", "response": { "$ref": "ListJobsResponse" }, @@ -915,7 +1172,24 @@ "projectId" ], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], "parameters": { + "view": { + "location": "query", + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ], + "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", + "type": "string" + }, "projectId": { "location": "path", "description": "The project which owns the jobs.", @@ -939,311 +1213,35 @@ "type": "string" }, "pageToken": { + "location": "query", "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.", - "type": "string", - "location": "query" + "type": "string" }, "pageSize": { "format": "int32", "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.", "type": "integer", "location": "query" - }, - "view": { - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL", - "JOB_VIEW_DESCRIPTION" - ], - "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", - "type": "string", - "location": "query" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], "flatPath": "v1b3/projects/{projectId}/jobs:aggregated", "id": "dataflow.projects.jobs.aggregated", - "path": "v1b3/projects/{projectId}/jobs:aggregated" - }, - "list": { - "description": "List the jobs of a project in a given region.", - "response": { - "$ref": "ListJobsResponse" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "GET", - "parameters": { - "filter": { - "type": "string", - "location": "query", - "enum": [ - "UNKNOWN", - "ALL", - "TERMINATED", - "ACTIVE" - ], - "description": "The kind of filter to use." - }, - "location": { - "type": "string", - "location": "query", - "description": "The location that contains this job." - }, - "pageToken": { - "type": "string", - "location": "query", - "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list." - }, - "pageSize": { - "format": "int32", - "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.", - "type": "integer", - "location": "query" - }, - "view": { - "location": "query", - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL", - "JOB_VIEW_DESCRIPTION" - ], - "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", - "type": "string" - }, - "projectId": { - "location": "path", - "description": "The project which owns the jobs.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "flatPath": "v1b3/projects/{projectId}/jobs", - "id": "dataflow.projects.jobs.list", - "path": "v1b3/projects/{projectId}/jobs" - }, - "create": { - "id": "dataflow.projects.jobs.create", - "path": "v1b3/projects/{projectId}/jobs", - "request": { - "$ref": "Job" - }, - "description": "Creates a Cloud Dataflow job.", - "response": { - "$ref": "Job" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "location": { - "description": "The location that contains this job.", - "type": "string", - "location": "query" - }, - "replaceJobId": { - "location": "query", - "description": "Deprecated. This field is now in the Job message.", - "type": "string" - }, - "view": { - "location": "query", - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL", - "JOB_VIEW_DESCRIPTION" - ], - "description": "The level of information requested in response.", - "type": "string" - }, - "projectId": { - "location": "path", - "description": "The ID of the Cloud Platform project that the job belongs to.", - "type": "string", - "required": true - } - }, - "flatPath": "v1b3/projects/{projectId}/jobs" - }, - "getMetrics": { - "httpMethod": "GET", - "parameterOrder": [ - "projectId", - "jobId" - ], - "response": { - "$ref": "JobMetrics" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "location": { - "location": "query", - "description": "The location which contains the job specified by job_id.", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job.", - "type": "string", - "location": "query" - }, - "jobId": { - "location": "path", - "description": "The job to get messages for.", - "type": "string", - "required": true - }, - "projectId": { - "location": "path", - "description": "A project id.", - "type": "string", - "required": true - } - }, - "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/metrics", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/metrics", - "id": "dataflow.projects.jobs.getMetrics", - "description": "Request the job status." - }, - "get": { - "description": "Gets the state of the specified Cloud Dataflow job.", - "httpMethod": "GET", - "parameterOrder": [ - "projectId", - "jobId" - ], - "response": { - "$ref": "Job" - }, - "parameters": { - "view": { - "location": "query", - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL", - "JOB_VIEW_DESCRIPTION" - ], - "description": "The level of information requested in response.", - "type": "string" - }, - "jobId": { - "location": "path", - "description": "The job ID.", - "type": "string", - "required": true - }, - "projectId": { - "location": "path", - "description": "The ID of the Cloud Platform project that the job belongs to.", - "type": "string", - "required": true - }, - "location": { - "location": "query", - "description": "The location that contains this job.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", - "path": "v1b3/projects/{projectId}/jobs/{jobId}", - "id": "dataflow.projects.jobs.get" - }, - "update": { - "request": { - "$ref": "Job" - }, - "description": "Updates the state of an existing Cloud Dataflow job.", - "httpMethod": "PUT", - "parameterOrder": [ - "projectId", - "jobId" - ], - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "location": { - "description": "The location that contains this job.", - "type": "string", - "location": "query" - }, - "jobId": { - "location": "path", - "description": "The job ID.", - "type": "string", - "required": true - }, - "projectId": { - "location": "path", - "description": "The ID of the Cloud Platform project that the job belongs to.", - "type": "string", - "required": true - } - }, - "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", - "path": "v1b3/projects/{projectId}/jobs/{jobId}", - "id": "dataflow.projects.jobs.update" + "path": "v1b3/projects/{projectId}/jobs:aggregated", + "description": "List the jobs of a project across all regions." } }, "resources": { "workItems": { "methods": { "lease": { - "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", - "id": "dataflow.projects.jobs.workItems.lease", - "description": "Leases a dataflow WorkItem to run.", - "request": { - "$ref": "LeaseWorkItemRequest" + "response": { + "$ref": "LeaseWorkItemResponse" }, - "httpMethod": "POST", "parameterOrder": [ "projectId", "jobId" ], - "response": { - "$ref": "LeaseWorkItemResponse" - }, + "httpMethod": "POST", "parameters": { "jobId": { "location": "path", @@ -1263,9 +1261,39 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email" - ] + ], + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", + "id": "dataflow.projects.jobs.workItems.lease", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", + "description": "Leases a dataflow WorkItem to run.", + "request": { + "$ref": "LeaseWorkItemRequest" + } }, "reportStatus": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "jobId": { + "location": "path", + "description": "The job which the WorkItem is part of.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "The project which owns the WorkItem's job.", + "type": "string", + "required": true + } + }, + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", + "id": "dataflow.projects.jobs.workItems.reportStatus", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", "request": { "$ref": "ReportWorkItemStatusRequest" }, @@ -1277,80 +1305,20 @@ "projectId", "jobId" ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "jobId": { - "description": "The job which the WorkItem is part of.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "The project which owns the WorkItem's job.", - "type": "string", - "required": true - } - }, - "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", - "id": "dataflow.projects.jobs.workItems.reportStatus", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus" + "httpMethod": "POST" } } }, "debug": { "methods": { "sendCapture": { - "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture", - "id": "dataflow.projects.jobs.debug.sendCapture", "description": "Send encoded debug capture data for component.", "request": { "$ref": "SendDebugCaptureRequest" }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "jobId" - ], "response": { "$ref": "SendDebugCaptureResponse" }, - "parameters": { - "jobId": { - "location": "path", - "description": "The job id.", - "type": "string", - "required": true - }, - "projectId": { - "location": "path", - "description": "The project id.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture" - }, - "getConfig": { - "description": "Get encoded debug configuration for component. Not cacheable.", - "request": { - "$ref": "GetDebugConfigRequest" - }, - "response": { - "$ref": "GetDebugConfigResponse" - }, "parameterOrder": [ "projectId", "jobId" @@ -1358,16 +1326,16 @@ "httpMethod": "POST", "parameters": { "jobId": { + "location": "path", "description": "The job id.", "type": "string", - "required": true, - "location": "path" + "required": true }, "projectId": { + "location": "path", "description": "The project id.", "type": "string", - "required": true, - "location": "path" + "required": true } }, "scopes": [ @@ -1376,36 +1344,87 @@ "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email" ], + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture", + "id": "dataflow.projects.jobs.debug.sendCapture", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture" + }, + "getConfig": { + "request": { + "$ref": "GetDebugConfigRequest" + }, + "description": "Get encoded debug configuration for component. Not cacheable.", + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "jobId" + ], + "response": { + "$ref": "GetDebugConfigResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "jobId": { + "type": "string", + "required": true, + "location": "path", + "description": "The job id." + }, + "projectId": { + "location": "path", + "description": "The project id.", + "type": "string", + "required": true + } + }, "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig", - "id": "dataflow.projects.jobs.debug.getConfig", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig" + "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig", + "id": "dataflow.projects.jobs.debug.getConfig" } } }, "messages": { "methods": { "list": { + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/messages", + "id": "dataflow.projects.jobs.messages.list", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/messages", "description": "Request the job status.", - "httpMethod": "GET", + "response": { + "$ref": "ListJobMessagesResponse" + }, "parameterOrder": [ "projectId", "jobId" ], - "response": { - "$ref": "ListJobMessagesResponse" - }, + "httpMethod": "GET", "parameters": { - "startTime": { + "endTime": { "format": "google-datetime", - "description": "If specified, return only messages with timestamps \u003e= start_time.\nThe default is the job creation time (i.e. beginning of messages).", + "description": "Return only messages with timestamps \u003c end_time. The default is now\n(i.e. return up to the latest messages available).", "type": "string", "location": "query" }, + "location": { + "location": "query", + "description": "The location which contains the job specified by job_id.", + "type": "string" + }, "pageToken": { "location": "query", "description": "If supplied, this should be the value of next_page_token returned\nby an earlier call. This will cause the next page of results to\nbe returned.", "type": "string" }, + "startTime": { + "location": "query", + "format": "google-datetime", + "description": "If specified, return only messages with timestamps \u003e= start_time.\nThe default is the job creation time (i.e. beginning of messages).", + "type": "string" + }, "pageSize": { "location": "query", "format": "int32", @@ -1425,28 +1444,17 @@ "description": "Filter to only get messages with importance \u003e= level", "type": "string" }, + "jobId": { + "type": "string", + "required": true, + "location": "path", + "description": "The job to get messages about." + }, "projectId": { + "location": "path", "description": "A project id.", "type": "string", - "required": true, - "location": "path" - }, - "jobId": { - "description": "The job to get messages about.", - "type": "string", - "required": true, - "location": "path" - }, - "endTime": { - "format": "google-datetime", - "description": "Return only messages with timestamps \u003c end_time. The default is now\n(i.e. return up to the latest messages available).", - "type": "string", - "location": "query" - }, - "location": { - "location": "query", - "description": "The location which contains the job specified by job_id.", - "type": "string" + "required": true } }, "scopes": [ @@ -1454,10 +1462,7 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email" - ], - "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/messages", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/messages", - "id": "dataflow.projects.jobs.messages.list" + ] } } } @@ -1467,31 +1472,21 @@ } }, "parameters": { - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, "upload_protocol": { + "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" }, "prettyPrint": { - "default": "true", - "type": "boolean", "location": "query", - "description": "Returns response with indentations and line breaks." + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" }, "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", - "location": "query" + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." }, "fields": { "location": "query", @@ -1499,30 +1494,24 @@ "type": "string" }, "callback": { - "location": "query", "description": "JSONP", - "type": "string" + "type": "string", + "location": "query" }, "$.xgafv": { - "enum": [ - "1", - "2" - ], "description": "V1 error format.", "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" ], - "location": "query" + "location": "query", + "enum": [ + "1", + "2" + ] }, "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", @@ -1530,12 +1519,18 @@ ], "location": "query", "description": "Data format for response.", - "default": "json" + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" }, "access_token": { - "description": "OAuth access token.", "type": "string", - "location": "query" + "location": "query", + "description": "OAuth access token." }, "key": { "location": "query", @@ -1543,52 +1538,908 @@ "type": "string" }, "quotaUser": { + "location": "query", "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.", + "type": "string" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", "type": "string", "location": "query" }, - "pp": { - "default": "true", - "type": "boolean", + "bearer_token": { "location": "query", - "description": "Pretty-print response." + "description": "OAuth bearer token.", + "type": "string" } }, "schemas": { - "WorkerMessageCode": { - "description": "A message code is used to report status and error messages to the service.\nThe message codes are intended to be machine readable. The service will\ntake care of translating these into user understandable messages if\nnecessary.\n\nExample use cases:\n 1. Worker processes reporting successful startup.\n 2. Worker processes reporting specific errors (e.g. package staging\n failure).", + "ParallelInstruction": { + "description": "Describes a particular operation comprising a MapTask.", "type": "object", "properties": { - "parameters": { + "flatten": { + "$ref": "FlattenInstruction", + "description": "Additional information for Flatten instructions." + }, + "originalName": { + "description": "System-defined name for the operation in the original workflow graph.", + "type": "string" + }, + "systemName": { + "description": "System-defined name of this operation.\nUnique across the workflow.", + "type": "string" + }, + "write": { + "description": "Additional information for Write instructions.", + "$ref": "WriteInstruction" + }, + "partialGroupByKey": { + "$ref": "PartialGroupByKeyInstruction", + "description": "Additional information for PartialGroupByKey instructions." + }, + "outputs": { + "description": "Describes the outputs of the instruction.", + "items": { + "$ref": "InstructionOutput" + }, + "type": "array" + }, + "name": { + "description": "User-provided name of this operation.", + "type": "string" + }, + "parDo": { + "$ref": "ParDoInstruction", + "description": "Additional information for ParDo instructions." + }, + "read": { + "description": "Additional information for Read instructions.", + "$ref": "ReadInstruction" + } + }, + "id": "ParallelInstruction" + }, + "Package": { + "description": "The packages that must be installed in order for a worker to run the\nsteps of the Cloud Dataflow job that will be assigned to its worker\npool.\n\nThis is the mechanism by which the Cloud Dataflow SDK causes code to\nbe loaded onto the workers. For example, the Cloud Dataflow Java SDK\nmight use this to install jars containing the user's code and all of the\nvarious dependencies (libraries, data files, etc.) required in order\nfor that code to run.", + "type": "object", + "properties": { + "location": { + "description": "The resource to read the package from. The supported resource type is:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}\n bucket.storage.googleapis.com/", + "type": "string" + }, + "name": { + "description": "The name of the package.", + "type": "string" + } + }, + "id": "Package" + }, + "KeyRangeDataDiskAssignment": { + "id": "KeyRangeDataDiskAssignment", + "description": "Data disk assignment information for a specific key-range of a sharded\ncomputation.\nCurrently we only support UTF-8 character splits to simplify encoding into\nJSON.", + "type": "object", + "properties": { + "dataDisk": { + "description": "The name of the data disk where data for this range is stored.\nThis name is local to the Google Cloud Platform project and uniquely\nidentifies the disk within that project, for example\n\"myproject-1014-104817-4c2-harness-0-disk-1\".", + "type": "string" + }, + "start": { + "description": "The start (inclusive) of the key range.", + "type": "string" + }, + "end": { + "description": "The end (exclusive) of the key range.", + "type": "string" + } + } + }, + "ParDoInstruction": { + "description": "An instruction that does a ParDo operation.\nTakes one main input and zero or more side inputs, and produces\nzero or more outputs.\nRuns user code.", + "type": "object", + "properties": { + "userFn": { "additionalProperties": { "description": "Properties of the object.", "type": "any" }, - "description": "Parameters contains specific information about the code.\n\nThis is a struct to allow parameters of different types.\n\nExamples:\n 1. For a \"HARNESS_STARTED\" message parameters might provide the name\n of the worker and additional data like timing information.\n 2. For a \"GCS_DOWNLOAD_ERROR\" parameters might contain fields listing\n the GCS objects being downloaded and fields containing errors.\n\nIn general complex data structures should be avoided. If a worker\nneeds to send a specific and complicated data structure then please\nconsider defining a new proto and adding it to the data oneof in\nWorkerMessageResponse.\n\nConventions:\n Parameters should only be used for information that isn't typically passed\n as a label.\n hostname and other worker identifiers should almost always be passed\n as labels since they will be included on most messages.", + "description": "The user function to invoke.", "type": "object" }, - "code": { - "description": "The code is a string intended for consumption by a machine that identifies\nthe type of message being sent.\nExamples:\n 1. \"HARNESS_STARTED\" might be used to indicate the worker harness has\n started.\n 2. \"GCS_DOWNLOAD_ERROR\" might be used to indicate an error downloading\n a GCS file as part of the boot process of one of the worker containers.\n\nThis is a string and not an enum to make it easy to add new codes without\nwaiting for an API change.", + "input": { + "$ref": "InstructionInput", + "description": "The input." + }, + "numOutputs": { + "format": "int32", + "description": "The number of outputs.", + "type": "integer" + }, + "sideInputs": { + "description": "Zero or more side inputs.", + "items": { + "$ref": "SideInputInfo" + }, + "type": "array" + }, + "multiOutputInfos": { + "description": "Information about each of the outputs, if user_fn is a MultiDoFn.", + "items": { + "$ref": "MultiOutputInfo" + }, + "type": "array" + } + }, + "id": "ParDoInstruction" + }, + "WorkerShutdownNotice": { + "description": "Shutdown notification from workers. This is to be sent by the shutdown\nscript of the worker VM so that the backend knows that the VM is being\nshut down.", + "type": "object", + "properties": { + "reason": { + "description": "Optional reason to be attached for the shutdown notice.\nFor example: \"PREEMPTION\" would indicate the VM is being shut down because\nof preemption. Other possible reasons may be added in the future.", "type": "string" } }, - "id": "WorkerMessageCode" + "id": "WorkerShutdownNotice" + }, + "CounterStructuredName": { + "description": "Identifies a counter within a per-job namespace. Counters whose structured\nnames are the same get merged into a single value for the job.", + "type": "object", + "properties": { + "originNamespace": { + "description": "A string containing a more specific namespace of the counter's origin.", + "type": "string" + }, + "sideInput": { + "description": "ID of a side input being read from/written to. Side inputs are identified\nby a pair of (reader, input_index). The reader is usually equal to the\noriginal name, but it may be different, if a ParDo emits it's Iterator /\nMap side input object.", + "$ref": "SideInputId" + }, + "executionStepName": { + "type": "string", + "description": "Name of the stage. An execution step contains multiple component steps." + }, + "name": { + "description": "Counter name. Not necessarily globally-unique, but unique within the\ncontext of the other fields.\nRequired.", + "type": "string" + }, + "origin": { + "enum": [ + "SYSTEM", + "USER" + ], + "description": "One of the standard Origins defined above.", + "type": "string", + "enumDescriptions": [ + "Counter was created by the Dataflow system.", + "Counter was created by the user." + ] + }, + "componentStepName": { + "description": "Name of the optimized step being executed by the workers.", + "type": "string" + }, + "portion": { + "type": "string", + "enumDescriptions": [ + "Counter portion has not been set.", + "Counter reports a key.", + "Counter reports a value." + ], + "enum": [ + "ALL", + "KEY", + "VALUE" + ], + "description": "Portion of this counter, either key or value." + }, + "originalShuffleStepName": { + "description": "The GroupByKey step name from the original graph.", + "type": "string" + }, + "originalStepName": { + "description": "System generated name of the original step in the user's graph, before\noptimization.", + "type": "string" + }, + "workerId": { + "description": "ID of a particular worker.", + "type": "string" + } + }, + "id": "CounterStructuredName" + }, + "MetricUpdate": { + "type": "object", + "properties": { + "set": { + "description": "Worker-computed aggregate value for the \"Set\" aggregation kind. The only\npossible value type is a list of Values whose type can be Long, Double,\nor String, according to the metric's type. All Values in the list must\nbe of the same type.", + "type": "any" + }, + "internal": { + "description": "Worker-computed aggregate value for internal use by the Dataflow\nservice.", + "type": "any" + }, + "cumulative": { + "description": "True if this metric is reported as the total cumulative aggregate\nvalue accumulated since the worker started working on this WorkItem.\nBy default this is false, indicating that this metric is reported\nas a delta that is not associated with any WorkItem.", + "type": "boolean" + }, + "kind": { + "description": "Metric aggregation kind. The possible metric aggregation kinds are\n\"Sum\", \"Max\", \"Min\", \"Mean\", \"Set\", \"And\", \"Or\", and \"Distribution\".\nThe specified aggregation kind is case-insensitive.\n\nIf omitted, this is not an aggregated value but instead\na single metric sample value.", + "type": "string" + }, + "scalar": { + "type": "any", + "description": "Worker-computed aggregate value for aggregation kinds \"Sum\", \"Max\", \"Min\",\n\"And\", and \"Or\". The possible value types are Long, Double, and Boolean." + }, + "meanCount": { + "description": "Worker-computed aggregate value for the \"Mean\" aggregation kind.\nThis holds the count of the aggregated values and is used in combination\nwith mean_sum above to obtain the actual mean aggregate value.\nThe only possible value type is Long.", + "type": "any" + }, + "meanSum": { + "description": "Worker-computed aggregate value for the \"Mean\" aggregation kind.\nThis holds the sum of the aggregated values and is used in combination\nwith mean_count below to obtain the actual mean aggregate value.\nThe only possible value types are Long and Double.", + "type": "any" + }, + "updateTime": { + "format": "google-datetime", + "description": "Timestamp associated with the metric value. Optional when workers are\nreporting work progress; it will be filled in responses from the\nmetrics API.", + "type": "string" + }, + "name": { + "$ref": "MetricStructuredName", + "description": "Name of the metric." + }, + "distribution": { + "description": "A struct value describing properties of a distribution of numeric values.", + "type": "any" + } + }, + "id": "MetricUpdate", + "description": "Describes the state of a metric." + }, + "ApproximateProgress": { + "description": "Obsolete in favor of ApproximateReportedProgress and ApproximateSplitRequest.", + "type": "object", + "properties": { + "percentComplete": { + "format": "float", + "description": "Obsolete.", + "type": "number" + }, + "remainingTime": { + "format": "google-duration", + "description": "Obsolete.", + "type": "string" + }, + "position": { + "$ref": "Position", + "description": "Obsolete." + } + }, + "id": "ApproximateProgress" + }, + "WorkerMessageResponse": { + "description": "A worker_message response allows the server to pass information to the\nsender.", + "type": "object", + "properties": { + "workerShutdownNoticeResponse": { + "$ref": "WorkerShutdownNoticeResponse", + "description": "Service's response to shutdown notice (currently empty)." + }, + "workerMetricsResponse": { + "$ref": "ResourceUtilizationReportResponse", + "description": "Service's response to reporting worker metrics (currently empty)." + }, + "workerHealthReportResponse": { + "$ref": "WorkerHealthReportResponse", + "description": "The service's response to a worker's health report." + } + }, + "id": "WorkerMessageResponse" + }, + "TemplateMetadata": { + "description": "Metadata describing a template.", + "type": "object", + "properties": { + "parameters": { + "description": "The parameters for the template.", + "items": { + "$ref": "ParameterMetadata" + }, + "type": "array" + }, + "name": { + "description": "Required. The name of the template.", + "type": "string" + }, + "description": { + "description": "Optional. A description of the template.", + "type": "string" + } + }, + "id": "TemplateMetadata" + }, + "WorkerMessage": { + "description": "WorkerMessage provides information to the backend about a worker.", + "type": "object", + "properties": { + "time": { + "format": "google-datetime", + "description": "The timestamp of the worker_message.", + "type": "string" + }, + "workerShutdownNotice": { + "$ref": "WorkerShutdownNotice", + "description": "Shutdown notice by workers." + }, + "workerHealthReport": { + "description": "The health of a worker.", + "$ref": "WorkerHealthReport" + }, + "workerMessageCode": { + "$ref": "WorkerMessageCode", + "description": "A worker message code." + }, + "workerMetrics": { + "$ref": "ResourceUtilizationReport", + "description": "Resource metrics reported by workers." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels are used to group WorkerMessages.\nFor example, a worker_message about a particular container\nmight have the labels:\n{ \"JOB_ID\": \"2015-04-22\",\n \"WORKER_ID\": \"wordcount-vm-2015…\"\n \"CONTAINER_TYPE\": \"worker\",\n \"CONTAINER_ID\": \"ac1234def\"}\nLabel tags typically correspond to Label enum values. However, for ease\nof development other strings can be used as tags. LABEL_UNSPECIFIED should\nnot be used here.", + "type": "object" + } + }, + "id": "WorkerMessage" + }, + "WorkerShutdownNoticeResponse": { + "type": "object", + "properties": {}, + "id": "WorkerShutdownNoticeResponse", + "description": "Service-side response to WorkerMessage issuing shutdown notice." + }, + "JobMetrics": { + "id": "JobMetrics", + "description": "JobMetrics contains a collection of metrics descibing the detailed progress\nof a Dataflow job. Metrics correspond to user-defined and system-defined\nmetrics in the job.\n\nThis resource captures only the most recent values of each metric;\ntime-series data can be queried for them (under the same metric names)\nfrom Cloud Monitoring.", + "type": "object", + "properties": { + "metrics": { + "description": "All metrics for this job.", + "items": { + "$ref": "MetricUpdate" + }, + "type": "array" + }, + "metricTime": { + "format": "google-datetime", + "description": "Timestamp as of which metric values are current.", + "type": "string" + } + } + }, + "FloatingPointList": { + "id": "FloatingPointList", + "description": "A metric value representing a list of floating point numbers.", + "type": "object", + "properties": { + "elements": { + "items": { + "format": "double", + "type": "number" + }, + "type": "array", + "description": "Elements of the list." + } + } + }, + "CounterUpdate": { + "description": "An update to a Counter sent from a worker.", + "type": "object", + "properties": { + "floatingPointList": { + "description": "List of floating point numbers, for Set.", + "$ref": "FloatingPointList" + }, + "integer": { + "$ref": "SplitInt64", + "description": "Integer value for Sum, Max, Min." + }, + "integerList": { + "description": "List of integers, for Set.", + "$ref": "IntegerList" + }, + "structuredNameAndMetadata": { + "description": "Counter structured name and metadata.", + "$ref": "CounterStructuredNameAndMetadata" + }, + "floatingPoint": { + "format": "double", + "description": "Floating point value for Sum, Max, Min.", + "type": "number" + }, + "integerMean": { + "description": "Integer mean aggregation value for Mean.", + "$ref": "IntegerMean" + }, + "cumulative": { + "type": "boolean", + "description": "True if this counter is reported as the total cumulative aggregate\nvalue accumulated since the worker started working on this WorkItem.\nBy default this is false, indicating that this counter is reported\nas a delta." + }, + "internal": { + "description": "Value for internally-defined counters used by the Dataflow service.", + "type": "any" + }, + "floatingPointMean": { + "description": "Floating point mean aggregation value for Mean.", + "$ref": "FloatingPointMean" + }, + "boolean": { + "type": "boolean", + "description": "Boolean value for And, Or." + }, + "nameAndKind": { + "$ref": "NameAndKind", + "description": "Counter name and aggregation type." + }, + "distribution": { + "description": "Distribution data", + "$ref": "DistributionUpdate" + }, + "stringList": { + "$ref": "StringList", + "description": "List of strings, for Set." + }, + "shortId": { + "format": "int64", + "description": "The service-generated short identifier for this counter.\nThe short_id -\u003e (name, metadata) mapping is constant for the lifetime of\na job.", + "type": "string" + } + }, + "id": "CounterUpdate" + }, + "SourceMetadata": { + "description": "Metadata about a Source useful for automatically optimizing\nand tuning the pipeline, etc.", + "type": "object", + "properties": { + "estimatedSizeBytes": { + "format": "int64", + "description": "An estimate of the total size (in bytes) of the data that would be\nread from this source. This estimate is in terms of external storage\nsize, before any decompression or other processing done by the reader.", + "type": "string" + }, + "infinite": { + "description": "Specifies that the size of this source is known to be infinite\n(this is a streaming source).", + "type": "boolean" + }, + "producesSortedKeys": { + "description": "Whether this source is known to produce key/value pairs with\nthe (encoded) keys in lexicographically sorted order.", + "type": "boolean" + } + }, + "id": "SourceMetadata" + }, + "DistributionUpdate": { + "description": "A metric value representing a distribution.", + "type": "object", + "properties": { + "max": { + "$ref": "SplitInt64", + "description": "The maximum value present in the distribution." + }, + "logBuckets": { + "description": "(Optional) Logarithmic histogram of values.\nEach log may be in no more than one bucket. Order does not matter.", + "items": { + "$ref": "LogBucket" + }, + "type": "array" + }, + "count": { + "$ref": "SplitInt64", + "description": "The count of the number of elements present in the distribution." + }, + "min": { + "$ref": "SplitInt64", + "description": "The minimum value present in the distribution." + }, + "sumOfSquares": { + "format": "double", + "description": "Use a double since the sum of squares is likely to overflow int64.", + "type": "number" + }, + "sum": { + "$ref": "SplitInt64", + "description": "Use an int64 since we'd prefer the added precision. If overflow is a common\nproblem we can detect it and use an additional int64 or a double." + } + }, + "id": "DistributionUpdate" + }, + "WorkerHealthReportResponse": { + "description": "WorkerHealthReportResponse contains information returned to the worker\nin response to a health ping.", + "type": "object", + "properties": { + "reportInterval": { + "format": "google-duration", + "description": "A positive value indicates the worker should change its reporting interval\nto the specified value.\n\nThe default value of zero means no change in report rate is requested by\nthe server.", + "type": "string" + } + }, + "id": "WorkerHealthReportResponse" + }, + "SourceFork": { + "description": "DEPRECATED in favor of DynamicSourceSplit.", + "type": "object", + "properties": { + "residualSource": { + "$ref": "DerivedSource", + "description": "DEPRECATED" + }, + "primary": { + "$ref": "SourceSplitShard", + "description": "DEPRECATED" + }, + "primarySource": { + "description": "DEPRECATED", + "$ref": "DerivedSource" + }, + "residual": { + "$ref": "SourceSplitShard", + "description": "DEPRECATED" + } + }, + "id": "SourceFork" + }, + "WorkItemStatus": { + "properties": { + "counterUpdates": { + "description": "Worker output counters for this WorkItem.", + "items": { + "$ref": "CounterUpdate" + }, + "type": "array" + }, + "workItemId": { + "description": "Identifies the WorkItem.", + "type": "string" + }, + "errors": { + "description": "Specifies errors which occurred during processing. If errors are\nprovided, and completed = true, then the WorkItem is considered\nto have failed.", + "items": { + "$ref": "Status" + }, + "type": "array" + }, + "metricUpdates": { + "description": "DEPRECATED in favor of counter_updates.", + "items": { + "$ref": "MetricUpdate" + }, + "type": "array" + }, + "dynamicSourceSplit": { + "$ref": "DynamicSourceSplit", + "description": "See documentation of stop_position." + }, + "sourceOperationResponse": { + "description": "If the work item represented a SourceOperationRequest, and the work\nis completed, contains the result of the operation.", + "$ref": "SourceOperationResponse" + }, + "progress": { + "$ref": "ApproximateProgress", + "description": "DEPRECATED in favor of reported_progress." + }, + "requestedLeaseDuration": { + "format": "google-duration", + "description": "Amount of time the worker requests for its lease.", + "type": "string" + }, + "reportIndex": { + "type": "string", + "format": "int64", + "description": "The report index. When a WorkItem is leased, the lease will\ncontain an initial report index. When a WorkItem's status is\nreported to the system, the report should be sent with\nthat report index, and the response will contain the index the\nworker should use for the next report. Reports received with\nunexpected index values will be rejected by the service.\n\nIn order to preserve idempotency, the worker should not alter the\ncontents of a report, even if the worker must submit the same\nreport multiple times before getting back a response. The worker\nshould not submit a subsequent report until the response for the\nprevious report had been received from the service." + }, + "stopPosition": { + "$ref": "Position", + "description": "A worker may split an active map task in two parts, \"primary\" and\n\"residual\", continuing to process the primary part and returning the\nresidual part into the pool of available work.\nThis event is called a \"dynamic split\" and is critical to the dynamic\nwork rebalancing feature. The two obtained sub-tasks are called\n\"parts\" of the split.\nThe parts, if concatenated, must represent the same input as would\nbe read by the current task if the split did not happen.\nThe exact way in which the original task is decomposed into the two\nparts is specified either as a position demarcating them\n(stop_position), or explicitly as two DerivedSources, if this\ntask consumes a user-defined source type (dynamic_source_split).\n\nThe \"current\" task is adjusted as a result of the split: after a task\nwith range [A, B) sends a stop_position update at C, its range is\nconsidered to be [A, C), e.g.:\n* Progress should be interpreted relative to the new range, e.g.\n \"75% completed\" means \"75% of [A, C) completed\"\n* The worker should interpret proposed_stop_position relative to the\n new range, e.g. \"split at 68%\" should be interpreted as\n \"split at 68% of [A, C)\".\n* If the worker chooses to split again using stop_position, only\n stop_positions in [A, C) will be accepted.\n* Etc.\ndynamic_source_split has similar semantics: e.g., if a task with\nsource S splits using dynamic_source_split into {P, R}\n(where P and R must be together equivalent to S), then subsequent\nprogress and proposed_stop_position should be interpreted relative\nto P, and in a potential subsequent dynamic_source_split into {P', R'},\nP' and R' must be together equivalent to P, etc." + }, + "completed": { + "description": "True if the WorkItem was completed (successfully or unsuccessfully).", + "type": "boolean" + }, + "reportedProgress": { + "description": "The worker's progress through this WorkItem.", + "$ref": "ApproximateReportedProgress" + }, + "sourceFork": { + "$ref": "SourceFork", + "description": "DEPRECATED in favor of dynamic_source_split." + } + }, + "id": "WorkItemStatus", + "description": "Conveys a worker's progress through the work described by a WorkItem.", + "type": "object" + }, + "ComponentSource": { + "description": "Description of an interstitial value between transforms in an execution\nstage.", + "type": "object", + "properties": { + "originalTransformOrCollection": { + "type": "string", + "description": "User name for the original user transform or collection with which this\nsource is most closely associated." + }, + "name": { + "description": "Dataflow service generated name for this source.", + "type": "string" + }, + "userName": { + "description": "Human-readable name for this transform; may be user or system generated.", + "type": "string" + } + }, + "id": "ComponentSource" + }, + "WorkItemServiceState": { + "description": "The Dataflow service's idea of the current state of a WorkItem\nbeing processed by a worker.", + "type": "object", + "properties": { + "metricShortId": { + "description": "The short ids that workers should use in subsequent metric updates.\nWorkers should strive to use short ids whenever possible, but it is ok\nto request the short_id again if a worker lost track of it\n(e.g. if the worker is recovering from a crash).\nNOTE: it is possible that the response may have short ids for a subset\nof the metrics.", + "items": { + "$ref": "MetricShortId" + }, + "type": "array" + }, + "nextReportIndex": { + "format": "int64", + "description": "The index value to use for the next report sent by the worker.\nNote: If the report call fails for whatever reason, the worker should\nreuse this index for subsequent report attempts.", + "type": "string" + }, + "suggestedStopPoint": { + "description": "DEPRECATED in favor of split_request.", + "$ref": "ApproximateProgress" + }, + "splitRequest": { + "description": "The progress point in the WorkItem where the Dataflow service\nsuggests that the worker truncate the task.", + "$ref": "ApproximateSplitRequest" + }, + "suggestedStopPosition": { + "$ref": "Position", + "description": "Obsolete, always empty." + }, + "reportStatusInterval": { + "format": "google-duration", + "description": "New recommended reporting interval.", + "type": "string" + }, + "harnessData": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Other data returned by the service, specific to the particular\nworker harness." + }, + "leaseExpireTime": { + "format": "google-datetime", + "description": "Time at which the current lease will expire.", + "type": "string" + } + }, + "id": "WorkItemServiceState" + }, + "MetricStructuredName": { + "description": "Identifies a metric, by describing the source which generated the\nmetric.", + "type": "object", + "properties": { + "name": { + "description": "Worker-defined metric name.", + "type": "string" + }, + "origin": { + "type": "string", + "description": "Origin (namespace) of metric name. May be blank for user-define metrics;\nwill be \"dataflow\" for metrics defined by the Dataflow service or SDK." + }, + "context": { + "additionalProperties": { + "type": "string" + }, + "description": "Zero or more labeled fields which identify the part of the job this\nmetric is associated with, such as the name of a step or collection.\n\nFor example, built-in counters associated with steps will have\ncontext['step'] = \u003cstep-name\u003e. Counters associated with PCollections\nin the SDK will have context['pcollection'] = \u003cpcollection-name\u003e.", + "type": "object" + } + }, + "id": "MetricStructuredName" + }, + "SeqMapTaskOutputInfo": { + "description": "Information about an output of a SeqMapTask.", + "type": "object", + "properties": { + "sink": { + "$ref": "Sink", + "description": "The sink to write the output value to." + }, + "tag": { + "description": "The id of the TupleTag the user code will tag the output value by.", + "type": "string" + } + }, + "id": "SeqMapTaskOutputInfo" + }, + "JobExecutionStageInfo": { + "id": "JobExecutionStageInfo", + "description": "Contains information about how a particular\ngoogle.dataflow.v1beta3.Step will be executed.", + "type": "object", + "properties": { + "stepName": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The steps associated with the execution stage.\nNote that stages may have several steps, and that a given step\nmight be run by more than one stage." + } + } + }, + "KeyRangeLocation": { + "description": "Location information for a specific key-range of a sharded computation.\nCurrently we only support UTF-8 character splits to simplify encoding into\nJSON.", + "type": "object", + "properties": { + "dataDisk": { + "description": "The name of the data disk where data for this range is stored.\nThis name is local to the Google Cloud Platform project and uniquely\nidentifies the disk within that project, for example\n\"myproject-1014-104817-4c2-harness-0-disk-1\".", + "type": "string" + }, + "start": { + "description": "The start (inclusive) of the key range.", + "type": "string" + }, + "end": { + "type": "string", + "description": "The end (exclusive) of the key range." + }, + "deprecatedPersistentDirectory": { + "description": "DEPRECATED. The location of the persistent state for this range, as a\npersistent directory in the worker local filesystem.", + "type": "string" + }, + "deliveryEndpoint": { + "description": "The physical location of this range assignment to be used for\nstreaming computation cross-worker message delivery.", + "type": "string" + } + }, + "id": "KeyRangeLocation" + }, + "SourceGetMetadataRequest": { + "description": "A request to compute the SourceMetadata of a Source.", + "type": "object", + "properties": { + "source": { + "$ref": "Source", + "description": "Specification of the source whose metadata should be computed." + } + }, + "id": "SourceGetMetadataRequest" + }, + "NameAndKind": { + "description": "Basic metadata about a counter.", + "type": "object", + "properties": { + "kind": { + "description": "Counter aggregation kind.", + "type": "string", + "enumDescriptions": [ + "Counter aggregation kind was not set.", + "Aggregated value is the sum of all contributed values.", + "Aggregated value is the max of all contributed values.", + "Aggregated value is the min of all contributed values.", + "Aggregated value is the mean of all contributed values.", + "Aggregated value represents the logical 'or' of all contributed values.", + "Aggregated value represents the logical 'and' of all contributed values.", + "Aggregated value is a set of unique contributed values.", + "Aggregated value captures statistics about a distribution." + ], + "enum": [ + "INVALID", + "SUM", + "MAX", + "MIN", + "MEAN", + "OR", + "AND", + "SET", + "DISTRIBUTION" + ] + }, + "name": { + "description": "Name of the counter.", + "type": "string" + } + }, + "id": "NameAndKind" + }, + "SeqMapTask": { + "description": "Describes a particular function to invoke.", + "type": "object", + "properties": { + "name": { + "description": "The user-provided name of the SeqDo operation.", + "type": "string" + }, + "outputInfos": { + "description": "Information about each of the outputs.", + "items": { + "$ref": "SeqMapTaskOutputInfo" + }, + "type": "array" + }, + "inputs": { + "items": { + "$ref": "SideInputInfo" + }, + "type": "array", + "description": "Information about each of the inputs." + }, + "stageName": { + "description": "System-defined name of the stage containing the SeqDo operation.\nUnique across the workflow.", + "type": "string" + }, + "systemName": { + "description": "System-defined name of the SeqDo operation.\nUnique across the workflow.", + "type": "string" + }, + "userFn": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The user function to invoke.", + "type": "object" + } + }, + "id": "SeqMapTask" + }, + "WorkerMessageCode": { + "id": "WorkerMessageCode", + "description": "A message code is used to report status and error messages to the service.\nThe message codes are intended to be machine readable. The service will\ntake care of translating these into user understandable messages if\nnecessary.\n\nExample use cases:\n 1. Worker processes reporting successful startup.\n 2. Worker processes reporting specific errors (e.g. package staging\n failure).", + "type": "object", + "properties": { + "code": { + "description": "The code is a string intended for consumption by a machine that identifies\nthe type of message being sent.\nExamples:\n 1. \"HARNESS_STARTED\" might be used to indicate the worker harness has\n started.\n 2. \"GCS_DOWNLOAD_ERROR\" might be used to indicate an error downloading\n a GCS file as part of the boot process of one of the worker containers.\n\nThis is a string and not an enum to make it easy to add new codes without\nwaiting for an API change.", + "type": "string" + }, + "parameters": { + "description": "Parameters contains specific information about the code.\n\nThis is a struct to allow parameters of different types.\n\nExamples:\n 1. For a \"HARNESS_STARTED\" message parameters might provide the name\n of the worker and additional data like timing information.\n 2. For a \"GCS_DOWNLOAD_ERROR\" parameters might contain fields listing\n the GCS objects being downloaded and fields containing errors.\n\nIn general complex data structures should be avoided. If a worker\nneeds to send a specific and complicated data structure then please\nconsider defining a new proto and adding it to the data oneof in\nWorkerMessageResponse.\n\nConventions:\n Parameters should only be used for information that isn't typically passed\n as a label.\n hostname and other worker identifiers should almost always be passed\n as labels since they will be included on most messages.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + } + } + } }, "CustomSourceLocation": { - "id": "CustomSourceLocation", - "description": "Identifies the location of a custom souce.", "type": "object", "properties": { "stateful": { "description": "Whether this source is stateful.", "type": "boolean" } - } + }, + "id": "CustomSourceLocation", + "description": "Identifies the location of a custom souce." }, "MapTask": { "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.", "type": "object", "properties": { + "instructions": { + "description": "The instructions in the MapTask.", + "items": { + "$ref": "ParallelInstruction" + }, + "type": "array" + }, "stageName": { "description": "System-defined name of the stage containing this MapTask.\nUnique across the workflow.", "type": "string" @@ -1596,13 +2447,6 @@ "systemName": { "description": "System-defined name of this MapTask.\nUnique across the workflow.", "type": "string" - }, - "instructions": { - "items": { - "$ref": "ParallelInstruction" - }, - "type": "array", - "description": "The instructions in the MapTask." } }, "id": "MapTask" @@ -1611,14 +2455,14 @@ "description": "A representation of a floating point mean metric contribution.", "type": "object", "properties": { - "count": { - "$ref": "SplitInt64", - "description": "The number of values being aggregated." - }, "sum": { + "type": "number", "format": "double", - "description": "The sum of all values being aggregated.", - "type": "number" + "description": "The sum of all values being aggregated." + }, + "count": { + "description": "The number of values being aggregated.", + "$ref": "SplitInt64" } }, "id": "FloatingPointMean" @@ -1638,7 +2482,6 @@ "id": "ReportWorkItemStatusResponse" }, "InstructionOutput": { - "description": "An output of an instruction.", "type": "object", "properties": { "codec": { @@ -1658,8 +2501,8 @@ "type": "string" }, "systemName": { - "description": "System-defined name of this output.\nUnique across the workflow.", - "type": "string" + "type": "string", + "description": "System-defined name of this output.\nUnique across the workflow." }, "onlyCountKeyBytes": { "description": "For system-generated byte and mean byte metrics, certain instructions\nshould only report the key size.", @@ -1670,52 +2513,53 @@ "description": "For system-generated byte and mean byte metrics, certain instructions\nshould only report the value size." } }, - "id": "InstructionOutput" + "id": "InstructionOutput", + "description": "An output of an instruction." }, "CreateJobFromTemplateRequest": { - "description": "A request to create a Cloud Dataflow job from a template.", "type": "object", "properties": { + "parameters": { + "additionalProperties": { + "type": "string" + }, + "description": "The runtime parameters to pass to the job.", + "type": "object" + }, + "jobName": { + "description": "Required. The job name to use for the created job.", + "type": "string" + }, "gcsPath": { "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be a valid Cloud Storage URL, beginning with `gs://`.", "type": "string" }, "environment": { - "description": "The runtime environment for the job.", - "$ref": "RuntimeEnvironment" + "$ref": "RuntimeEnvironment", + "description": "The runtime environment for the job." }, "location": { "description": "The location to which to direct the request.", "type": "string" - }, - "parameters": { - "description": "The runtime parameters to pass to the job.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "jobName": { - "type": "string", - "description": "Required. The job name to use for the created job." } }, - "id": "CreateJobFromTemplateRequest" + "id": "CreateJobFromTemplateRequest", + "description": "A request to create a Cloud Dataflow job from a template." }, "IntegerMean": { - "id": "IntegerMean", - "description": "A representation of an integer mean metric contribution.", - "type": "object", "properties": { - "sum": { - "$ref": "SplitInt64", - "description": "The sum of all values being aggregated." - }, "count": { "description": "The number of values being aggregated.", "$ref": "SplitInt64" + }, + "sum": { + "$ref": "SplitInt64", + "description": "The sum of all values being aggregated." } - } + }, + "id": "IntegerMean", + "description": "A representation of an integer mean metric contribution.", + "type": "object" }, "ListJobsResponse": { "description": "Response to a request to list Cloud Dataflow jobs. This may be a partial\nresponse, depending on the page size in the ListJobsRequest.", @@ -1743,16 +2587,8 @@ "id": "ListJobsResponse" }, "ComputationTopology": { - "description": "All configuration data for a particular Computation.", "type": "object", "properties": { - "outputs": { - "description": "The outputs from the computation.", - "items": { - "$ref": "StreamLocation" - }, - "type": "array" - }, "stateFamilies": { "description": "The state family values.", "items": { @@ -1760,6 +2596,13 @@ }, "type": "array" }, + "outputs": { + "description": "The outputs from the computation.", + "items": { + "$ref": "StreamLocation" + }, + "type": "array" + }, "systemStageName": { "description": "The system stage name.", "type": "string" @@ -1769,11 +2612,11 @@ "type": "string" }, "inputs": { - "description": "The inputs to the computation.", "items": { "$ref": "StreamLocation" }, - "type": "array" + "type": "array", + "description": "The inputs to the computation." }, "keyRanges": { "description": "The key ranges processed by the computation.", @@ -1783,25 +2626,27 @@ "type": "array" } }, - "id": "ComputationTopology" + "id": "ComputationTopology", + "description": "All configuration data for a particular Computation." }, "RuntimeEnvironment": { - "id": "RuntimeEnvironment", - "description": "The environment values to set at runtime.", - "type": "object", "properties": { + "zone": { + "description": "The Compute Engine [availability\nzone](https://cloud.google.com/compute/docs/regions-zones/regions-zones)\nfor launching worker instances to run your pipeline.", + "type": "string" + }, "maxWorkers": { "format": "int32", "description": "The maximum number of Google Compute Engine instances to be made\navailable to your pipeline during execution, from 1 to 1000.", "type": "integer" }, "serviceAccountEmail": { - "description": "The email address of the service account to run the job as.", - "type": "string" + "type": "string", + "description": "The email address of the service account to run the job as." }, "tempLocation": { - "type": "string", - "description": "The Cloud Storage path to use for temporary files.\nMust be a valid Cloud Storage URL, beginning with `gs://`." + "description": "The Cloud Storage path to use for temporary files.\nMust be a valid Cloud Storage URL, beginning with `gs://`.", + "type": "string" }, "bypassTempDirValidation": { "description": "Whether to bypass the safety checks for the job's temporary directory.\nUse with caution.", @@ -1810,12 +2655,11 @@ "machineType": { "description": "The machine type to use for the job. Defaults to the value from the\ntemplate if not specified.", "type": "string" - }, - "zone": { - "type": "string", - "description": "The Compute Engine [availability\nzone](https://cloud.google.com/compute/docs/regions-zones/regions-zones)\nfor launching worker instances to run your pipeline." } - } + }, + "id": "RuntimeEnvironment", + "description": "The environment values to set at runtime.", + "type": "object" }, "MountedDataDisk": { "description": "Describes mounted data disk.", @@ -1829,129 +2673,35 @@ "id": "MountedDataDisk" }, "StreamingSideInputLocation": { - "description": "Identifies the location of a streaming side input.", - "type": "object", "properties": { - "tag": { - "description": "Identifies the particular side input within the streaming Dataflow job.", - "type": "string" - }, "stateFamily": { "description": "Identifies the state family where this side input is stored.", "type": "string" + }, + "tag": { + "description": "Identifies the particular side input within the streaming Dataflow job.", + "type": "string" } }, - "id": "StreamingSideInputLocation" + "id": "StreamingSideInputLocation", + "description": "Identifies the location of a streaming side input.", + "type": "object" }, "LaunchTemplateResponse": { + "description": "Response to the request to launch a template.", + "type": "object", "properties": { "job": { - "description": "The job that was launched, if the request was not a dry run and\nthe job was successfully launched.", - "$ref": "Job" + "$ref": "Job", + "description": "The job that was launched, if the request was not a dry run and\nthe job was successfully launched." } }, - "id": "LaunchTemplateResponse", - "description": "Response to the request to launch a template.", - "type": "object" + "id": "LaunchTemplateResponse" }, "Job": { "description": "Defines a job to be run by the Cloud Dataflow service.", "type": "object", "properties": { - "createTime": { - "format": "google-datetime", - "description": "The timestamp when the job was initially created. Immutable and set by the\nCloud Dataflow service.", - "type": "string" - }, - "environment": { - "$ref": "Environment", - "description": "The environment for the job." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "User-defined labels for this job.\n\nThe labels map can contain no more than 64 entries. Entries of the labels\nmap are UTF8 strings that comply with the following restrictions:\n\n* Keys must conform to regexp: \\p{Ll}\\p{Lo}{0,62}\n* Values must conform to regexp: [\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}\n* Both keys and values are additionally constrained to be \u003c= 128 bytes in\nsize.", - "type": "object" - }, - "stageStates": { - "description": "This field may be mutated by the Cloud Dataflow service;\ncallers cannot mutate it.", - "items": { - "$ref": "ExecutionStageState" - }, - "type": "array" - }, - "type": { - "enum": [ - "JOB_TYPE_UNKNOWN", - "JOB_TYPE_BATCH", - "JOB_TYPE_STREAMING" - ], - "description": "The type of Cloud Dataflow job.", - "type": "string", - "enumDescriptions": [ - "The type of the job is unspecified, or unknown.", - "A batch job with a well-defined end point: data is read, data is\nprocessed, data is written, and the job is done.", - "A continuously streaming job with no end: data is read,\nprocessed, and written continuously." - ] - }, - "projectId": { - "type": "string", - "description": "The ID of the Cloud Platform project that the job belongs to." - }, - "pipelineDescription": { - "$ref": "PipelineDescription", - "description": "Preliminary field: The format of this data may change at any time.\nA description of the user pipeline and stages through which it is executed.\nCreated by Cloud Dataflow service. Only retrieved with\nJOB_VIEW_DESCRIPTION or JOB_VIEW_ALL." - }, - "replaceJobId": { - "description": "If this job is an update of an existing job, this field is the job ID\nof the job it replaced.\n\nWhen sending a `CreateJobRequest`, you can update a job by specifying it\nhere. The job named here is stopped, and its intermediate state is\ntransferred to this job.", - "type": "string" - }, - "requestedState": { - "description": "The job's requested state.\n\n`UpdateJob` may be used to switch between the `JOB_STATE_STOPPED` and\n`JOB_STATE_RUNNING` states, by setting requested_state. `UpdateJob` may\nalso be used to directly set a job's requested state to\n`JOB_STATE_CANCELLED` or `JOB_STATE_DONE`, irrevocably terminating the\njob if it has not already reached a terminal state.", - "type": "string", - "enumDescriptions": [ - "The job's run state isn't specified.", - "`JOB_STATE_STOPPED` indicates that the job has not\nyet started to run.", - "`JOB_STATE_RUNNING` indicates that the job is currently running.", - "`JOB_STATE_DONE` indicates that the job has successfully completed.\nThis is a terminal job state. This state may be set by the Cloud Dataflow\nservice, as a transition from `JOB_STATE_RUNNING`. It may also be set via a\nCloud Dataflow `UpdateJob` call, if the job has not yet reached a terminal\nstate.", - "`JOB_STATE_FAILED` indicates that the job has failed. This is a\nterminal job state. This state may only be set by the Cloud Dataflow\nservice, and only as a transition from `JOB_STATE_RUNNING`.", - "`JOB_STATE_CANCELLED` indicates that the job has been explicitly\ncancelled. This is a terminal job state. This state may only be\nset via a Cloud Dataflow `UpdateJob` call, and only if the job has not\nyet reached another terminal state.", - "`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'." - ], - "enum": [ - "JOB_STATE_UNKNOWN", - "JOB_STATE_STOPPED", - "JOB_STATE_RUNNING", - "JOB_STATE_DONE", - "JOB_STATE_FAILED", - "JOB_STATE_CANCELLED", - "JOB_STATE_UPDATED", - "JOB_STATE_DRAINING", - "JOB_STATE_DRAINED", - "JOB_STATE_PENDING", - "JOB_STATE_CANCELLING" - ] - }, - "tempFiles": { - "description": "A set of files the system should be aware of that are used\nfor temporary storage. These temporary files will be\nremoved on job completion.\nNo duplicates are allowed.\nNo file patterns are supported.\n\nThe supported files are:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", - "items": { - "type": "string" - }, - "type": "array" - }, - "clientRequestId": { - "description": "The client's unique identifier of the job, re-used across retried attempts.\nIf this field is set, the service will ensure its uniqueness.\nThe request to create a job will fail if the service has knowledge of a\npreviously submitted job with the same client's ID and job name.\nThe caller may use this field to ensure idempotence of job\ncreation across retried attempts to create a job.\nBy default, the field is empty and, in that case, the service ignores it.", - "type": "string" - }, - "name": { - "description": "The user-specified Cloud Dataflow job name.\n\nOnly one Job with a given name may exist in a project at any\ngiven time. If a caller attempts to create a Job with the same\nname as an already-existing Job, the attempt returns the\nexisting Job.\n\nThe name must match the regular expression\n`[a-z]([-a-z0-9]{0,38}[a-z0-9])?`", - "type": "string" - }, "replacedByJobId": { "description": "If another job is an update of this job (and thus, this job is in\n`JOB_STATE_UPDATED`), this field contains the ID of that job.", "type": "string" @@ -2002,8 +2752,8 @@ "type": "string" }, "location": { - "type": "string", - "description": "The location that contains this job." + "description": "The location that contains this job.", + "type": "string" }, "currentStateTime": { "format": "google-datetime", @@ -2016,30 +2766,130 @@ }, "description": "The map of transform name prefixes of the job to be replaced to the\ncorresponding name prefixes of the new job.", "type": "object" + }, + "createTime": { + "format": "google-datetime", + "description": "The timestamp when the job was initially created. Immutable and set by the\nCloud Dataflow service.", + "type": "string" + }, + "environment": { + "description": "The environment for the job.", + "$ref": "Environment" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels for this job.\n\nThe labels map can contain no more than 64 entries. Entries of the labels\nmap are UTF8 strings that comply with the following restrictions:\n\n* Keys must conform to regexp: \\p{Ll}\\p{Lo}{0,62}\n* Values must conform to regexp: [\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}\n* Both keys and values are additionally constrained to be \u003c= 128 bytes in\nsize.", + "type": "object" + }, + "stageStates": { + "description": "This field may be mutated by the Cloud Dataflow service;\ncallers cannot mutate it.", + "items": { + "$ref": "ExecutionStageState" + }, + "type": "array" + }, + "type": { + "enumDescriptions": [ + "The type of the job is unspecified, or unknown.", + "A batch job with a well-defined end point: data is read, data is\nprocessed, data is written, and the job is done.", + "A continuously streaming job with no end: data is read,\nprocessed, and written continuously." + ], + "enum": [ + "JOB_TYPE_UNKNOWN", + "JOB_TYPE_BATCH", + "JOB_TYPE_STREAMING" + ], + "description": "The type of Cloud Dataflow job.", + "type": "string" + }, + "projectId": { + "description": "The ID of the Cloud Platform project that the job belongs to.", + "type": "string" + }, + "pipelineDescription": { + "$ref": "PipelineDescription", + "description": "Preliminary field: The format of this data may change at any time.\nA description of the user pipeline and stages through which it is executed.\nCreated by Cloud Dataflow service. Only retrieved with\nJOB_VIEW_DESCRIPTION or JOB_VIEW_ALL." + }, + "replaceJobId": { + "description": "If this job is an update of an existing job, this field is the job ID\nof the job it replaced.\n\nWhen sending a `CreateJobRequest`, you can update a job by specifying it\nhere. The job named here is stopped, and its intermediate state is\ntransferred to this job.", + "type": "string" + }, + "requestedState": { + "enum": [ + "JOB_STATE_UNKNOWN", + "JOB_STATE_STOPPED", + "JOB_STATE_RUNNING", + "JOB_STATE_DONE", + "JOB_STATE_FAILED", + "JOB_STATE_CANCELLED", + "JOB_STATE_UPDATED", + "JOB_STATE_DRAINING", + "JOB_STATE_DRAINED", + "JOB_STATE_PENDING", + "JOB_STATE_CANCELLING" + ], + "description": "The job's requested state.\n\n`UpdateJob` may be used to switch between the `JOB_STATE_STOPPED` and\n`JOB_STATE_RUNNING` states, by setting requested_state. `UpdateJob` may\nalso be used to directly set a job's requested state to\n`JOB_STATE_CANCELLED` or `JOB_STATE_DONE`, irrevocably terminating the\njob if it has not already reached a terminal state.", + "type": "string", + "enumDescriptions": [ + "The job's run state isn't specified.", + "`JOB_STATE_STOPPED` indicates that the job has not\nyet started to run.", + "`JOB_STATE_RUNNING` indicates that the job is currently running.", + "`JOB_STATE_DONE` indicates that the job has successfully completed.\nThis is a terminal job state. This state may be set by the Cloud Dataflow\nservice, as a transition from `JOB_STATE_RUNNING`. It may also be set via a\nCloud Dataflow `UpdateJob` call, if the job has not yet reached a terminal\nstate.", + "`JOB_STATE_FAILED` indicates that the job has failed. This is a\nterminal job state. This state may only be set by the Cloud Dataflow\nservice, and only as a transition from `JOB_STATE_RUNNING`.", + "`JOB_STATE_CANCELLED` indicates that the job has been explicitly\ncancelled. This is a terminal job state. This state may only be\nset via a Cloud Dataflow `UpdateJob` call, and only if the job has not\nyet reached another terminal state.", + "`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'." + ] + }, + "tempFiles": { + "description": "A set of files the system should be aware of that are used\nfor temporary storage. These temporary files will be\nremoved on job completion.\nNo duplicates are allowed.\nNo file patterns are supported.\n\nThe supported files are:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", + "items": { + "type": "string" + }, + "type": "array" + }, + "clientRequestId": { + "description": "The client's unique identifier of the job, re-used across retried attempts.\nIf this field is set, the service will ensure its uniqueness.\nThe request to create a job will fail if the service has knowledge of a\npreviously submitted job with the same client's ID and job name.\nThe caller may use this field to ensure idempotence of job\ncreation across retried attempts to create a job.\nBy default, the field is empty and, in that case, the service ignores it.", + "type": "string" + }, + "name": { + "description": "The user-specified Cloud Dataflow job name.\n\nOnly one Job with a given name may exist in a project at any\ngiven time. If a caller attempts to create a Job with the same\nname as an already-existing Job, the attempt returns the\nexisting Job.\n\nThe name must match the regular expression\n`[a-z]([-a-z0-9]{0,38}[a-z0-9])?`", + "type": "string" } }, "id": "Job" }, "DynamicSourceSplit": { + "id": "DynamicSourceSplit", "description": "When a task splits using WorkItemStatus.dynamic_source_split, this\nmessage describes the two parts of the split relative to the\ndescription of the current task's input.", "type": "object", "properties": { - "residual": { - "$ref": "DerivedSource", - "description": "Residual part (returned to the pool of work).\nSpecified relative to the previously-current source." - }, "primary": { "$ref": "DerivedSource", "description": "Primary part (continued to be processed by worker).\nSpecified relative to the previously-current source.\nBecomes current." + }, + "residual": { + "$ref": "DerivedSource", + "description": "Residual part (returned to the pool of work).\nSpecified relative to the previously-current source." } - }, - "id": "DynamicSourceSplit" + } }, "DerivedSource": { "description": "Specification of one of the bundles produced as a result of splitting\na Source (e.g. when executing a SourceSplitRequest, or when\nsplitting an active task using WorkItemStatus.dynamic_source_split),\nrelative to the source being split.", "type": "object", "properties": { "derivationMode": { + "enumDescriptions": [ + "The source derivation is unknown, or unspecified.", + "Produce a completely independent Source with no base.", + "Produce a Source based on the Source being split.", + "Produce a Source based on the base of the Source being split." + ], "enum": [ "SOURCE_DERIVATION_MODE_UNKNOWN", "SOURCE_DERIVATION_MODE_INDEPENDENT", @@ -2047,35 +2897,45 @@ "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" ], "description": "What source to base the produced source on (if any).", - "type": "string", - "enumDescriptions": [ - "The source derivation is unknown, or unspecified.", - "Produce a completely independent Source with no base.", - "Produce a Source based on the Source being split.", - "Produce a Source based on the base of the Source being split." - ] + "type": "string" }, "source": { - "$ref": "Source", - "description": "Specification of the source." + "description": "Specification of the source.", + "$ref": "Source" } }, "id": "DerivedSource" }, + "SideInputId": { + "id": "SideInputId", + "description": "Uniquely identifies a side input.", + "type": "object", + "properties": { + "inputIndex": { + "format": "int32", + "description": "The index of the side input, from the list of non_parallel_inputs.", + "type": "integer" + }, + "declaringStepName": { + "description": "The step that receives and usually consumes this side input.", + "type": "string" + } + } + }, "SourceOperationResponse": { + "description": "The result of a SourceOperationRequest, specified in\nReportWorkItemStatusRequest.source_operation when the work item\nis completed.", + "type": "object", "properties": { "getMetadata": { - "$ref": "SourceGetMetadataResponse", - "description": "A response to a request to get metadata about a source." + "description": "A response to a request to get metadata about a source.", + "$ref": "SourceGetMetadataResponse" }, "split": { "$ref": "SourceSplitResponse", "description": "A response to a request to split a source." } }, - "id": "SourceOperationResponse", - "description": "The result of a SourceOperationRequest, specified in\nReportWorkItemStatusRequest.source_operation when the work item\nis completed.", - "type": "object" + "id": "SourceOperationResponse" }, "SendDebugCaptureResponse": { "description": "Response to a send capture request.\nnothing", @@ -2084,7 +2944,6 @@ "id": "SendDebugCaptureResponse" }, "SideInputInfo": { - "id": "SideInputInfo", "description": "Information about a side input of a DoFn or an input of a SeqDoFn.", "type": "object", "properties": { @@ -2093,12 +2952,12 @@ "type": "string" }, "kind": { + "description": "How to interpret the source element(s) as a side input value.", + "type": "object", "additionalProperties": { "description": "Properties of the object.", "type": "any" - }, - "description": "How to interpret the source element(s) as a side input value.", - "type": "object" + } }, "sources": { "description": "The source(s) to read element(s) from to get the value of this side input.\nIf more than one source, then the elements are taken from the\nsources, in the specified order if order matters.\nAt least one source is required.", @@ -2107,22 +2966,23 @@ }, "type": "array" } - } + }, + "id": "SideInputInfo" }, - "CounterStructuredNameAndMetadata": { + "WriteInstruction": { + "description": "An instruction that writes records.\nTakes one input, produces no outputs.", + "type": "object", "properties": { - "metadata": { - "description": "Metadata associated with a counter", - "$ref": "CounterMetadata" + "input": { + "$ref": "InstructionInput", + "description": "The input." }, - "name": { - "$ref": "CounterStructuredName", - "description": "Structured name of the counter." + "sink": { + "$ref": "Sink", + "description": "The sink to write to." } }, - "id": "CounterStructuredNameAndMetadata", - "description": "A single message which encapsulates structured name and metadata for a given\ncounter.", - "type": "object" + "id": "WriteInstruction" }, "ConcatPosition": { "id": "ConcatPosition", @@ -2140,46 +3000,45 @@ } } }, - "WriteInstruction": { + "CounterStructuredNameAndMetadata": { + "description": "A single message which encapsulates structured name and metadata for a given\ncounter.", + "type": "object", "properties": { - "input": { - "$ref": "InstructionInput", - "description": "The input." + "name": { + "description": "Structured name of the counter.", + "$ref": "CounterStructuredName" }, - "sink": { - "description": "The sink to write to.", - "$ref": "Sink" + "metadata": { + "$ref": "CounterMetadata", + "description": "Metadata associated with a counter" } }, - "id": "WriteInstruction", - "description": "An instruction that writes records.\nTakes one input, produces no outputs.", - "type": "object" + "id": "CounterStructuredNameAndMetadata" }, "StreamingComputationRanges": { - "id": "StreamingComputationRanges", "description": "Describes full or partial data disk assignment information of the computation\nranges.", "type": "object", "properties": { - "rangeAssignments": { - "items": { - "$ref": "KeyRangeDataDiskAssignment" - }, - "type": "array", - "description": "Data disk assignments for ranges from this computation." - }, "computationId": { "description": "The ID of the computation.", "type": "string" + }, + "rangeAssignments": { + "description": "Data disk assignments for ranges from this computation.", + "items": { + "$ref": "KeyRangeDataDiskAssignment" + }, + "type": "array" } - } + }, + "id": "StreamingComputationRanges" }, "AutoscalingSettings": { + "id": "AutoscalingSettings", "description": "Settings for WorkerPool autoscaling.", "type": "object", "properties": { "algorithm": { - "description": "The algorithm to use for autoscaling.", - "type": "string", "enumDescriptions": [ "The algorithm is unknown, or unspecified.", "Disable autoscaling.", @@ -2189,25 +3048,28 @@ "AUTOSCALING_ALGORITHM_UNKNOWN", "AUTOSCALING_ALGORITHM_NONE", "AUTOSCALING_ALGORITHM_BASIC" - ] + ], + "description": "The algorithm to use for autoscaling.", + "type": "string" }, "maxNumWorkers": { - "type": "integer", "format": "int32", - "description": "The maximum number of workers to cap scaling at." + "description": "The maximum number of workers to cap scaling at.", + "type": "integer" } - }, - "id": "AutoscalingSettings" + } }, "ExecutionStageSummary": { + "id": "ExecutionStageSummary", + "description": "Description of the composing transforms, names/ids, and input/outputs of a\nstage of execution. Some composing transforms and sources may have been\ngenerated by the Dataflow service during execution planning.", "type": "object", "properties": { "componentSource": { + "description": "Collections produced and consumed by component transforms of this stage.", "items": { "$ref": "ComponentSource" }, - "type": "array", - "description": "Collections produced and consumed by component transforms of this stage." + "type": "array" }, "kind": { "enumDescriptions": [ @@ -2254,8 +3116,8 @@ "type": "array" }, "id": { - "description": "Dataflow service generated id for this stage.", - "type": "string" + "type": "string", + "description": "Dataflow service generated id for this stage." }, "componentTransform": { "description": "Transforms that comprise this execution stage.", @@ -2264,13 +3126,9 @@ }, "type": "array" } - }, - "id": "ExecutionStageSummary", - "description": "Description of the composing transforms, names/ids, and input/outputs of a\nstage of execution. Some composing transforms and sources may have been\ngenerated by the Dataflow service during execution planning." + } }, "SendWorkerMessagesRequest": { - "description": "A request for sending worker messages to the service.", - "type": "object", "properties": { "location": { "description": "The location which contains the job", @@ -2284,21 +3142,23 @@ "type": "array" } }, - "id": "SendWorkerMessagesRequest" + "id": "SendWorkerMessagesRequest", + "description": "A request for sending worker messages to the service.", + "type": "object" }, "LogBucket": { "description": "Bucket of values for Distribution's logarithmic histogram.", "type": "object", "properties": { - "log": { - "type": "integer", - "format": "int32", - "description": "floor(log2(value)); defined to be zero for nonpositive values.\n log(-1) = 0\n log(0) = 0\n log(1) = 0\n log(2) = 1\n log(3) = 1\n log(4) = 2\n log(5) = 2" - }, "count": { - "type": "string", "format": "int64", - "description": "Number of values in this bucket." + "description": "Number of values in this bucket.", + "type": "string" + }, + "log": { + "format": "int32", + "description": "floor(log2(value)); defined to be zero for nonpositive values.\n log(-1) = 0\n log(0) = 0\n log(1) = 0\n log(2) = 1\n log(3) = 1\n log(4) = 2\n log(5) = 2", + "type": "integer" } }, "id": "LogBucket" @@ -2307,13 +3167,7 @@ "description": "DEPRECATED in favor of DerivedSource.", "type": "object", "properties": { - "source": { - "$ref": "Source", - "description": "DEPRECATED" - }, "derivationMode": { - "description": "DEPRECATED", - "type": "string", "enumDescriptions": [ "The source derivation is unknown, or unspecified.", "Produce a completely independent Source with no base.", @@ -2325,20 +3179,19 @@ "SOURCE_DERIVATION_MODE_INDEPENDENT", "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT", "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" - ] + ], + "description": "DEPRECATED", + "type": "string" + }, + "source": { + "$ref": "Source", + "description": "DEPRECATED" } }, "id": "SourceSplitShard" }, "CPUTime": { - "description": "Modeled after information exposed by /proc/stat.", - "type": "object", "properties": { - "totalMs": { - "type": "string", - "format": "uint64", - "description": "Total active CPU time across all cores (ie., non-idle) in milliseconds\nsince start-up." - }, "rate": { "format": "double", "description": "Average CPU utilization rate (% non-idle cpu / second) since previous\nsample.", @@ -2348,39 +3201,29 @@ "format": "google-datetime", "description": "Timestamp of the measurement.", "type": "string" + }, + "totalMs": { + "format": "uint64", + "description": "Total active CPU time across all cores (ie., non-idle) in milliseconds\nsince start-up.", + "type": "string" } }, - "id": "CPUTime" + "id": "CPUTime", + "description": "Modeled after information exposed by /proc/stat.", + "type": "object" }, "Environment": { + "id": "Environment", + "description": "Describes the environment in which a Dataflow Job runs.", + "type": "object", "properties": { - "serviceAccountEmail": { - "description": "Identity to run virtual machines as. Defaults to the default account.", - "type": "string" - }, - "userAgent": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "A description of the process that generated the request.", - "type": "object" - }, - "sdkPipelineOptions": { - "description": "The Cloud Dataflow SDK pipeline options specified by the user. These\noptions are passed through the service and are used to recreate the\nSDK pipeline options on the worker in a language agnostic and platform\nindependent way.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - } - }, "clusterManagerApiService": { "description": "The type of cluster manager API to use. If unknown or\nunspecified, the service will attempt to choose a reasonable\ndefault. This should be in the form of the API service name,\ne.g. \"compute.googleapis.com\".", "type": "string" }, "tempStoragePrefix": { - "type": "string", - "description": "The prefix of the resources the system should use for temporary\nstorage. The system will append the suffix \"/temp-{JOBNAME} to\nthis resource prefix, where {JOBNAME} is the value of the\njob_name field. The resulting bucket and object prefix is used\nas the prefix of the resources used to store temporary data\nneeded during the job execution. NOTE: This will override the\nvalue in taskrunner_settings.\nThe supported resource type is:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}" + "description": "The prefix of the resources the system should use for temporary\nstorage. The system will append the suffix \"/temp-{JOBNAME} to\nthis resource prefix, where {JOBNAME} is the value of the\njob_name field. The resulting bucket and object prefix is used\nas the prefix of the resources used to store temporary data\nneeded during the job execution. NOTE: This will override the\nvalue in taskrunner_settings.\nThe supported resource type is:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", + "type": "string" }, "workerPools": { "description": "The worker pools. At least one \"harness\" worker pool must be\nspecified in order for the job to have workers.", @@ -2400,6 +3243,14 @@ }, "type": "array" }, + "internalExperiments": { + "description": "Experimental settings.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, "version": { "additionalProperties": { "description": "Properties of the object.", @@ -2408,25 +3259,33 @@ "description": "A structure describing which components and their versions of the service\nare required in order to run the job.", "type": "object" }, - "internalExperiments": { - "description": "Experimental settings.", - "type": "object", + "serviceAccountEmail": { + "description": "Identity to run virtual machines as. Defaults to the default account.", + "type": "string" + }, + "sdkPipelineOptions": { "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } + "description": "Properties of the object.", + "type": "any" + }, + "description": "The Cloud Dataflow SDK pipeline options specified by the user. These\noptions are passed through the service and are used to recreate the\nSDK pipeline options on the worker in a language agnostic and platform\nindependent way.", + "type": "object" + }, + "userAgent": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "A description of the process that generated the request.", + "type": "object" } - }, - "id": "Environment", - "description": "Describes the environment in which a Dataflow Job runs.", - "type": "object" + } }, "StreamingComputationTask": { "description": "A task which describes what action should be performed for the specified\nstreaming computation ranges.", "type": "object", "properties": { "taskType": { - "description": "A type of streaming computation task.", "type": "string", "enumDescriptions": [ "The streaming computation task is unknown, or unspecified.", @@ -2437,7 +3296,8 @@ "STREAMING_COMPUTATION_TASK_UNKNOWN", "STREAMING_COMPUTATION_TASK_STOP", "STREAMING_COMPUTATION_TASK_START" - ] + ], + "description": "A type of streaming computation task." }, "computationRanges": { "description": "Contains ranges of a streaming computation this task should apply to.", @@ -2457,14 +3317,8 @@ "id": "StreamingComputationTask" }, "SendDebugCaptureRequest": { - "id": "SendDebugCaptureRequest", - "description": "Request to send encoded debug information.", "type": "object", "properties": { - "data": { - "description": "The encoded debug information.", - "type": "string" - }, "componentId": { "description": "The internal component id for which debug information is sent.", "type": "string" @@ -2476,29 +3330,28 @@ "location": { "description": "The location which contains the job specified by job_id.", "type": "string" + }, + "data": { + "description": "The encoded debug information.", + "type": "string" } - } + }, + "id": "SendDebugCaptureRequest", + "description": "Request to send encoded debug information." }, "GetDebugConfigResponse": { + "id": "GetDebugConfigResponse", + "description": "Response to a get debug configuration request.", + "type": "object", "properties": { "config": { "description": "The encoded debug configuration for the requested component.", "type": "string" } - }, - "id": "GetDebugConfigResponse", - "description": "Response to a get debug configuration request.", - "type": "object" + } }, "ComponentTransform": { - "id": "ComponentTransform", - "description": "Description of a transform executed as part of an execution stage.", - "type": "object", "properties": { - "originalTransform": { - "description": "User name for the original user transform with which this transform is\nmost closely associated.", - "type": "string" - }, "name": { "description": "Dataflow service generated name for this source.", "type": "string" @@ -2506,17 +3359,22 @@ "userName": { "description": "Human-readable name for this transform; may be user or system generated.", "type": "string" + }, + "originalTransform": { + "description": "User name for the original user transform with which this transform is\nmost closely associated.", + "type": "string" } - } + }, + "id": "ComponentTransform", + "description": "Description of a transform executed as part of an execution stage.", + "type": "object" }, "StreamingSetupTask": { - "id": "StreamingSetupTask", - "description": "A task which initializes part of a streaming Dataflow job.", "type": "object", "properties": { "drain": { - "description": "The user has requested drain.", - "type": "boolean" + "type": "boolean", + "description": "The user has requested drain." }, "workerHarnessPort": { "format": "int32", @@ -2532,15 +3390,21 @@ "description": "The global topology of the streaming Dataflow job.", "$ref": "TopologyConfig" } - } + }, + "id": "StreamingSetupTask", + "description": "A task which initializes part of a streaming Dataflow job." }, "PubsubLocation": { "description": "Identifies a pubsub location to use for transferring data into or\nout of a streaming Dataflow job.", "type": "object", "properties": { + "withAttributes": { + "description": "If true, then the client has requested to get pubsub attributes.", + "type": "boolean" + }, "idLabel": { - "type": "string", - "description": "If set, contains a pubsub label from which to extract record ids.\nIf left empty, record deduplication will be strictly best effort." + "description": "If set, contains a pubsub label from which to extract record ids.\nIf left empty, record deduplication will be strictly best effort.", + "type": "string" }, "topic": { "description": "A pubsub topic, in the form of\n\"pubsub.googleapis.com/topics/\u003cproject-id\u003e/\u003ctopic-name\u003e\"", @@ -2561,35 +3425,20 @@ "trackingSubscription": { "description": "If set, specifies the pubsub subscription that will be used for tracking\ncustom time timestamps for watermark estimation.", "type": "string" - }, - "withAttributes": { - "description": "If true, then the client has requested to get pubsub attributes.", - "type": "boolean" } }, "id": "PubsubLocation" }, "WorkerHealthReport": { - "description": "WorkerHealthReport contains information about the health of a worker.\n\nThe VM should be identified by the labels attached to the WorkerMessage that\nthis health ping belongs to.", - "type": "object", "properties": { - "reportInterval": { - "format": "google-duration", - "description": "The interval at which the worker is sending health reports.\nThe default value of 0 should be interpreted as the field is not being\nexplicitly set by the worker.", - "type": "string" - }, - "vmIsHealthy": { - "description": "Whether the VM is healthy.", - "type": "boolean" - }, "pods": { "description": "The pods running on the worker. See:\nhttp://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#_v1_pod\n\nThis field is used by the worker to send the status of the indvidual\ncontainers running on each worker.", "items": { - "type": "object", "additionalProperties": { "description": "Properties of the object.", "type": "any" - } + }, + "type": "object" }, "type": "array" }, @@ -2597,23 +3446,26 @@ "format": "google-datetime", "description": "The time the VM was booted.", "type": "string" + }, + "reportInterval": { + "type": "string", + "format": "google-duration", + "description": "The interval at which the worker is sending health reports.\nThe default value of 0 should be interpreted as the field is not being\nexplicitly set by the worker." + }, + "vmIsHealthy": { + "description": "Whether the VM is healthy.", + "type": "boolean" } }, - "id": "WorkerHealthReport" + "id": "WorkerHealthReport", + "description": "WorkerHealthReport contains information about the health of a worker.\n\nThe VM should be identified by the labels attached to the WorkerMessage that\nthis health ping belongs to.", + "type": "object" }, "JobMessage": { "description": "A particular message pertaining to a Dataflow job.", "type": "object", "properties": { "messageImportance": { - "enum": [ - "JOB_MESSAGE_IMPORTANCE_UNKNOWN", - "JOB_MESSAGE_DEBUG", - "JOB_MESSAGE_DETAILED", - "JOB_MESSAGE_BASIC", - "JOB_MESSAGE_WARNING", - "JOB_MESSAGE_ERROR" - ], "description": "Importance level of the message.", "type": "string", "enumDescriptions": [ @@ -2623,6 +3475,14 @@ "The message is at the 'basic' level: useful for keeping\ntrack of the execution of a Dataflow pipeline. Typically,\nDataflow pipeline runners display log messages at this level by\ndefault, and these messages are displayed by default in the\nDataflow monitoring UI.", "The message is at the 'warning' level: indicating a condition\npertaining to a job which may require human intervention.\nTypically, Dataflow pipeline runners display log messages at this\nlevel by default, and these messages are displayed by default in\nthe Dataflow monitoring UI.", "The message is at the 'error' level: indicating a condition\npreventing a job from succeeding. Typically, Dataflow pipeline\nrunners display log messages at this level by default, and these\nmessages are displayed by default in the Dataflow monitoring UI." + ], + "enum": [ + "JOB_MESSAGE_IMPORTANCE_UNKNOWN", + "JOB_MESSAGE_DEBUG", + "JOB_MESSAGE_DETAILED", + "JOB_MESSAGE_BASIC", + "JOB_MESSAGE_WARNING", + "JOB_MESSAGE_ERROR" ] }, "messageText": { @@ -2654,8 +3514,8 @@ "type": "string" }, "isOptional": { - "description": "Optional. Whether the parameter is optional. Defaults to false.", - "type": "boolean" + "type": "boolean", + "description": "Optional. Whether the parameter is optional. Defaults to false." }, "name": { "description": "Required. The name of the parameter.", @@ -2672,6 +3532,7 @@ "id": "ParameterMetadata" }, "MultiOutputInfo": { + "id": "MultiOutputInfo", "description": "Information about an output of a multi-output DoFn.", "type": "object", "properties": { @@ -2679,8 +3540,7 @@ "description": "The id of the tag the user code will emit to this output by; this\nshould correspond to the tag of some SideInputInfo.", "type": "string" } - }, - "id": "MultiOutputInfo" + } }, "SourceSplitRequest": { "description": "Represents the operation to split a high-level Source specification\ninto bundles (parts for parallel processing).\n\nAt a high level, splitting of a source into bundles happens as follows:\nSourceSplitRequest is applied to the source. If it returns\nSOURCE_SPLIT_OUTCOME_USE_CURRENT, no further splitting happens and the source\nis used \"as is\". Otherwise, splitting is applied recursively to each\nproduced DerivedSource.\n\nAs an optimization, for any Source, if its does_not_need_splitting is\ntrue, the framework assumes that splitting this source would return\nSOURCE_SPLIT_OUTCOME_USE_CURRENT, and doesn't initiate a SourceSplitRequest.\nThis applies both to the initial source being split and to bundles\nproduced from it.", @@ -2691,13 +3551,14 @@ "description": "Hints for tuning the splitting process." }, "source": { - "$ref": "Source", - "description": "Specification of the source to be split." + "description": "Specification of the source to be split.", + "$ref": "Source" } }, "id": "SourceSplitRequest" }, "SourceGetMetadataResponse": { + "id": "SourceGetMetadataResponse", "description": "The result of a SourceGetMetadataOperation.", "type": "object", "properties": { @@ -2705,26 +3566,54 @@ "$ref": "SourceMetadata", "description": "The computed metadata." } - }, - "id": "SourceGetMetadataResponse" + } }, - "ShellTask": { - "description": "A task which consists of a shell command for the worker to execute.", + "AutoscalingEvent": { + "description": "A structured message reporting an autoscaling decision made by the Dataflow\nservice.", "type": "object", "properties": { - "exitCode": { - "format": "int32", - "description": "Exit code for the task.", - "type": "integer" - }, - "command": { + "eventType": { + "enum": [ + "TYPE_UNKNOWN", + "TARGET_NUM_WORKERS_CHANGED", + "CURRENT_NUM_WORKERS_CHANGED", + "ACTUATION_FAILURE", + "NO_CHANGE" + ], + "description": "The type of autoscaling event to report.", "type": "string", - "description": "The shell command to run." + "enumDescriptions": [ + "Default type for the enum. Value should never be returned.", + "The TARGET_NUM_WORKERS_CHANGED type should be used when the target\nworker pool size has changed at the start of an actuation. An event\nshould always be specified as TARGET_NUM_WORKERS_CHANGED if it reflects\na change in the target_num_workers.", + "The CURRENT_NUM_WORKERS_CHANGED type should be used when actual worker\npool size has been changed, but the target_num_workers has not changed.", + "The ACTUATION_FAILURE type should be used when we want to report\nan error to the user indicating why the current number of workers\nin the pool could not be changed.\nDisplayed in the current status and history widgets.", + "Used when we want to report to the user a reason why we are\nnot currently adjusting the number of workers.\nShould specify both target_num_workers, current_num_workers and a\ndecision_message." + ] + }, + "targetNumWorkers": { + "format": "int64", + "description": "The target number of workers the worker pool wants to resize to use.", + "type": "string" + }, + "currentNumWorkers": { + "format": "int64", + "description": "The current number of workers the job has.", + "type": "string" + }, + "time": { + "format": "google-datetime", + "description": "The time this event was emitted to indicate a new target or current\nnum_workers value.", + "type": "string" + }, + "description": { + "$ref": "StructuredMessage", + "description": "A message describing why the system decided to adjust the current\nnumber of workers, why it failed, or why the system decided to\nnot make any changes to the number of workers." } }, - "id": "ShellTask" + "id": "AutoscalingEvent" }, "MetricShortId": { + "description": "The metric short id is returned to the user alongside an offset into\nReportWorkItemStatusRequest", "type": "object", "properties": { "metricIndex": { @@ -2738,74 +3627,48 @@ "type": "string" } }, - "id": "MetricShortId", - "description": "The metric short id is returned to the user alongside an offset into\nReportWorkItemStatusRequest" + "id": "MetricShortId" }, - "AutoscalingEvent": { - "description": "A structured message reporting an autoscaling decision made by the Dataflow\nservice.", + "ShellTask": { "type": "object", "properties": { - "currentNumWorkers": { - "format": "int64", - "description": "The current number of workers the job has.", + "command": { + "description": "The shell command to run.", "type": "string" }, - "time": { - "format": "google-datetime", - "description": "The time this event was emitted to indicate a new target or current\nnum_workers value.", - "type": "string" - }, - "description": { - "description": "A message describing why the system decided to adjust the current\nnumber of workers, why it failed, or why the system decided to\nnot make any changes to the number of workers.", - "$ref": "StructuredMessage" - }, - "eventType": { - "description": "The type of autoscaling event to report.", - "type": "string", - "enumDescriptions": [ - "Default type for the enum. Value should never be returned.", - "The TARGET_NUM_WORKERS_CHANGED type should be used when the target\nworker pool size has changed at the start of an actuation. An event\nshould always be specified as TARGET_NUM_WORKERS_CHANGED if it reflects\na change in the target_num_workers.", - "The CURRENT_NUM_WORKERS_CHANGED type should be used when actual worker\npool size has been changed, but the target_num_workers has not changed.", - "The ACTUATION_FAILURE type should be used when we want to report\nan error to the user indicating why the current number of workers\nin the pool could not be changed.\nDisplayed in the current status and history widgets.", - "Used when we want to report to the user a reason why we are\nnot currently adjusting the number of workers.\nShould specify both target_num_workers, current_num_workers and a\ndecision_message." - ], - "enum": [ - "TYPE_UNKNOWN", - "TARGET_NUM_WORKERS_CHANGED", - "CURRENT_NUM_WORKERS_CHANGED", - "ACTUATION_FAILURE", - "NO_CHANGE" - ] - }, - "targetNumWorkers": { - "format": "int64", - "description": "The target number of workers the worker pool wants to resize to use.", - "type": "string" + "exitCode": { + "format": "int32", + "description": "Exit code for the task.", + "type": "integer" } }, - "id": "AutoscalingEvent" + "id": "ShellTask", + "description": "A task which consists of a shell command for the worker to execute." }, "TaskRunnerSettings": { + "id": "TaskRunnerSettings", + "description": "Taskrunner configuration settings.", + "type": "object", "properties": { "parallelWorkerSettings": { - "$ref": "WorkerSettings", - "description": "The settings to pass to the parallel worker harness." + "description": "The settings to pass to the parallel worker harness.", + "$ref": "WorkerSettings" }, "taskUser": { - "description": "The UNIX user ID on the worker VM to use for tasks launched by\ntaskrunner; e.g. \"root\".", - "type": "string" + "type": "string", + "description": "The UNIX user ID on the worker VM to use for tasks launched by\ntaskrunner; e.g. \"root\"." }, "vmId": { "description": "The ID string of the VM.", "type": "string" }, "alsologtostderr": { - "description": "Whether to also send taskrunner log info to stderr.", - "type": "boolean" + "type": "boolean", + "description": "Whether to also send taskrunner log info to stderr." }, "taskGroup": { - "type": "string", - "description": "The UNIX group ID on the worker VM to use for tasks launched by\ntaskrunner; e.g. \"wheel\"." + "description": "The UNIX group ID on the worker VM to use for tasks launched by\ntaskrunner; e.g. \"wheel\".", + "type": "string" }, "harnessCommand": { "description": "The command to launch the worker harness.", @@ -2823,8 +3686,8 @@ "type": "array" }, "dataflowApiVersion": { - "description": "The API version of endpoint, e.g. \"v1b3\"", - "type": "string" + "type": "string", + "description": "The API version of endpoint, e.g. \"v1b3\"" }, "logUploadLocation": { "description": "Indicates where to put logs. If this is not specified, the logs\nwill not be uploaded.\n\nThe supported resource type is:\n\nGoogle Cloud Storage:\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", @@ -2843,8 +3706,8 @@ "type": "string" }, "commandlinesFileName": { - "type": "string", - "description": "The file to store preprocessing commands in." + "description": "The file to store preprocessing commands in.", + "type": "string" }, "baseTaskDir": { "description": "The location on the worker for task-specific subdirectories.", @@ -2859,33 +3722,38 @@ "type": "string" }, "logToSerialconsole": { - "description": "Whether to send taskrunner log info to Google Compute Engine VM serial\nconsole.", - "type": "boolean" + "type": "boolean", + "description": "Whether to send taskrunner log info to Google Compute Engine VM serial\nconsole." }, "continueOnException": { "description": "Whether to continue taskrunner if an exception is hit.", "type": "boolean" } - }, - "id": "TaskRunnerSettings", - "description": "Taskrunner configuration settings.", - "type": "object" + } }, "Position": { + "id": "Position", + "description": "Position defines a position within a collection of data. The value\ncan be either the end position, a key (used with ordered\ncollections), a byte offset, or a record index.", + "type": "object", "properties": { - "shufflePosition": { - "description": "CloudPosition is a base64 encoded BatchShufflePosition (with FIXED\nsharding).", + "recordIndex": { + "format": "int64", + "description": "Position is a record index.", "type": "string" }, + "shufflePosition": { + "type": "string", + "description": "CloudPosition is a base64 encoded BatchShufflePosition (with FIXED\nsharding)." + }, + "concatPosition": { + "description": "CloudPosition is a concat position.", + "$ref": "ConcatPosition" + }, "byteOffset": { "type": "string", "format": "int64", "description": "Position is a byte offset." }, - "concatPosition": { - "$ref": "ConcatPosition", - "description": "CloudPosition is a concat position." - }, "end": { "description": "Position is past all other positions. Also useful for the end\nposition of an unbounded range.", "type": "boolean" @@ -2893,30 +3761,52 @@ "key": { "description": "Position is a string key, ordered lexicographically.", "type": "string" - }, - "recordIndex": { - "format": "int64", - "description": "Position is a record index.", - "type": "string" } - }, - "id": "Position", - "description": "Position defines a position within a collection of data. The value\ncan be either the end position, a key (used with ordered\ncollections), a byte offset, or a record index.", - "type": "object" + } + }, + "SplitInt64": { + "id": "SplitInt64", + "description": "A representation of an int64, n, that is immune to precision loss when\nencoded in JSON.", + "type": "object", + "properties": { + "lowBits": { + "format": "uint32", + "description": "The low order bits: n & 0xffffffff.", + "type": "integer" + }, + "highBits": { + "format": "int32", + "description": "The high order bits, including the sign: n \u003e\u003e 32.", + "type": "integer" + } + } }, "Source": { + "description": "A source that records can be read and decoded from.", + "type": "object", "properties": { + "baseSpecs": { + "description": "While splitting, sources may specify the produced bundles\nas differences against another source, in order to save backend-side\nmemory and allow bigger jobs. For details, see SourceSplitRequest.\nTo support this use case, the full set of parameters of the source\nis logically obtained by taking the latest explicitly specified value\nof each parameter in the order:\nbase_specs (later items win), spec (overrides anything in base_specs).", + "items": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, "doesNotNeedSplitting": { - "description": "Setting this value to true hints to the framework that the source\ndoesn't need splitting, and using SourceSplitRequest on it would\nyield SOURCE_SPLIT_OUTCOME_USE_CURRENT.\n\nE.g. a file splitter may set this to true when splitting a single file\ninto a set of byte ranges of appropriate size, and set this\nto false when splitting a filepattern into individual files.\nHowever, for efficiency, a file splitter may decide to produce\nfile subranges directly from the filepattern to avoid a splitting\nround-trip.\n\nSee SourceSplitRequest for an overview of the splitting process.\n\nThis field is meaningful only in the Source objects populated\nby the user (e.g. when filling in a DerivedSource).\nSource objects supplied by the framework to the user don't have\nthis field populated.", - "type": "boolean" + "type": "boolean", + "description": "Setting this value to true hints to the framework that the source\ndoesn't need splitting, and using SourceSplitRequest on it would\nyield SOURCE_SPLIT_OUTCOME_USE_CURRENT.\n\nE.g. a file splitter may set this to true when splitting a single file\ninto a set of byte ranges of appropriate size, and set this\nto false when splitting a filepattern into individual files.\nHowever, for efficiency, a file splitter may decide to produce\nfile subranges directly from the filepattern to avoid a splitting\nround-trip.\n\nSee SourceSplitRequest for an overview of the splitting process.\n\nThis field is meaningful only in the Source objects populated\nby the user (e.g. when filling in a DerivedSource).\nSource objects supplied by the framework to the user don't have\nthis field populated." }, "codec": { + "description": "The codec to use to decode data read from the source.", "type": "object", "additionalProperties": { "description": "Properties of the object.", "type": "any" - }, - "description": "The codec to use to decode data read from the source." + } }, "spec": { "additionalProperties": { @@ -2929,111 +3819,14 @@ "metadata": { "$ref": "SourceMetadata", "description": "Optionally, metadata for this source can be supplied right away,\navoiding a SourceGetMetadataOperation roundtrip\n(see SourceOperationRequest).\n\nThis field is meaningful only in the Source objects populated\nby the user (e.g. when filling in a DerivedSource).\nSource objects supplied by the framework to the user don't have\nthis field populated." - }, - "baseSpecs": { - "description": "While splitting, sources may specify the produced bundles\nas differences against another source, in order to save backend-side\nmemory and allow bigger jobs. For details, see SourceSplitRequest.\nTo support this use case, the full set of parameters of the source\nis logically obtained by taking the latest explicitly specified value\nof each parameter in the order:\nbase_specs (later items win), spec (overrides anything in base_specs).", - "items": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "type": "object" - }, - "type": "array" } }, - "id": "Source", - "description": "A source that records can be read and decoded from.", - "type": "object" - }, - "SplitInt64": { - "description": "A representation of an int64, n, that is immune to precision loss when\nencoded in JSON.", - "type": "object", - "properties": { - "highBits": { - "format": "int32", - "description": "The high order bits, including the sign: n \u003e\u003e 32.", - "type": "integer" - }, - "lowBits": { - "format": "uint32", - "description": "The low order bits: n & 0xffffffff.", - "type": "integer" - } - }, - "id": "SplitInt64" + "id": "Source" }, "WorkerPool": { "description": "Describes one particular pool of Cloud Dataflow workers to be\ninstantiated by the Cloud Dataflow service in order to perform the\ncomputations required by a job. Note that a workflow job may use\nmultiple pools, in order to match the various computational\nrequirements of the various stages of the job.", "type": "object", "properties": { - "subnetwork": { - "description": "Subnetwork to which VMs will be assigned, if desired. Expected to be of\nthe form \"regions/REGION/subnetworks/SUBNETWORK\".", - "type": "string" - }, - "ipConfiguration": { - "description": "Configuration for VM IPs.", - "type": "string", - "enumDescriptions": [ - "The configuration is unknown, or unspecified.", - "Workers should have public IP addresses.", - "Workers should have private IP addresses." - ], - "enum": [ - "WORKER_IP_UNSPECIFIED", - "WORKER_IP_PUBLIC", - "WORKER_IP_PRIVATE" - ] - }, - "taskrunnerSettings": { - "$ref": "TaskRunnerSettings", - "description": "Settings passed through to Google Compute Engine workers when\nusing the standard Dataflow task runner. Users should ignore\nthis field." - }, - "autoscalingSettings": { - "description": "Settings for autoscaling of this WorkerPool.", - "$ref": "AutoscalingSettings" - }, - "metadata": { - "description": "Metadata to set on the Google Compute Engine VMs.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "defaultPackageSet": { - "enum": [ - "DEFAULT_PACKAGE_SET_UNKNOWN", - "DEFAULT_PACKAGE_SET_NONE", - "DEFAULT_PACKAGE_SET_JAVA", - "DEFAULT_PACKAGE_SET_PYTHON" - ], - "description": "The default package set to install. This allows the service to\nselect a default set of packages which are useful to worker\nharnesses written in a particular language.", - "type": "string", - "enumDescriptions": [ - "The default set of packages to stage is unknown, or unspecified.", - "Indicates that no packages should be staged at the worker unless\nexplicitly specified by the job.", - "Stage packages typically useful to workers written in Java.", - "Stage pacakges typically useful to workers written in Python." - ] - }, - "network": { - "description": "Network to which VMs will be assigned. If empty or unspecified,\nthe service will use the network \"default\".", - "type": "string" - }, - "zone": { - "description": "Zone to run the worker pools in. If empty or unspecified, the service\nwill attempt to choose a reasonable default.", - "type": "string" - }, - "numWorkers": { - "format": "int32", - "description": "Number of Google Compute Engine workers in this pool needed to\nexecute the job. If zero or unspecified, the service will\nattempt to choose a reasonable default.", - "type": "integer" - }, - "numThreadsPerWorker": { - "format": "int32", - "description": "The number of threads per worker harness. If empty or unspecified, the\nservice will choose a number of threads (according to the number of cores\non the selected machine type for batch, or 1 by convention for streaming).", - "type": "integer" - }, "diskSourceImage": { "description": "Fully qualified source image for disks.", "type": "string" @@ -3046,6 +3839,8 @@ "type": "array" }, "teardownPolicy": { + "description": "Sets the policy for determining when to turndown worker pool.\nAllowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and\n`TEARDOWN_NEVER`.\n`TEARDOWN_ALWAYS` means workers are always torn down regardless of whether\nthe job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down\nif the job succeeds. `TEARDOWN_NEVER` means the workers are never torn\ndown.\n\nIf the workers are not torn down by the service, they will\ncontinue to run and use Google Compute Engine VM resources in the\nuser's project until they are explicitly terminated by the user.\nBecause of this, Google recommends using the `TEARDOWN_ALWAYS`\npolicy except for small, manually supervised test jobs.\n\nIf unknown or unspecified, the service will attempt to choose a reasonable\ndefault.", + "type": "string", "enumDescriptions": [ "The teardown policy isn't specified, or is unknown.", "Always teardown the resource.", @@ -3057,9 +3852,7 @@ "TEARDOWN_ALWAYS", "TEARDOWN_ON_SUCCESS", "TEARDOWN_NEVER" - ], - "description": "Sets the policy for determining when to turndown worker pool.\nAllowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and\n`TEARDOWN_NEVER`.\n`TEARDOWN_ALWAYS` means workers are always torn down regardless of whether\nthe job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down\nif the job succeeds. `TEARDOWN_NEVER` means the workers are never torn\ndown.\n\nIf the workers are not torn down by the service, they will\ncontinue to run and use Google Compute Engine VM resources in the\nuser's project until they are explicitly terminated by the user.\nBecause of this, Google recommends using the `TEARDOWN_ALWAYS`\npolicy except for small, manually supervised test jobs.\n\nIf unknown or unspecified, the service will attempt to choose a reasonable\ndefault.", - "type": "string" + ] }, "onHostMaintenance": { "description": "The action to take on host maintenance, as defined by the Google\nCompute Engine API.", @@ -3079,8 +3872,8 @@ "type": "integer" }, "workerHarnessContainerImage": { - "description": "Required. Docker container image that executes the Cloud Dataflow worker\nharness, residing in Google Container Registry.", - "type": "string" + "type": "string", + "description": "Required. Docker container image that executes the Cloud Dataflow worker\nharness, residing in Google Container Registry." }, "machineType": { "description": "Machine type (e.g. \"n1-standard-1\"). If empty or unspecified, the\nservice will attempt to choose a reasonable default.", @@ -3095,11 +3888,78 @@ "type": "string" }, "dataDisks": { - "description": "Data disks that are used by a VM in this workflow.", "items": { "$ref": "Disk" }, - "type": "array" + "type": "array", + "description": "Data disks that are used by a VM in this workflow." + }, + "subnetwork": { + "description": "Subnetwork to which VMs will be assigned, if desired. Expected to be of\nthe form \"regions/REGION/subnetworks/SUBNETWORK\".", + "type": "string" + }, + "ipConfiguration": { + "enumDescriptions": [ + "The configuration is unknown, or unspecified.", + "Workers should have public IP addresses.", + "Workers should have private IP addresses." + ], + "enum": [ + "WORKER_IP_UNSPECIFIED", + "WORKER_IP_PUBLIC", + "WORKER_IP_PRIVATE" + ], + "description": "Configuration for VM IPs.", + "type": "string" + }, + "autoscalingSettings": { + "$ref": "AutoscalingSettings", + "description": "Settings for autoscaling of this WorkerPool." + }, + "taskrunnerSettings": { + "description": "Settings passed through to Google Compute Engine workers when\nusing the standard Dataflow task runner. Users should ignore\nthis field.", + "$ref": "TaskRunnerSettings" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata to set on the Google Compute Engine VMs.", + "type": "object" + }, + "defaultPackageSet": { + "enumDescriptions": [ + "The default set of packages to stage is unknown, or unspecified.", + "Indicates that no packages should be staged at the worker unless\nexplicitly specified by the job.", + "Stage packages typically useful to workers written in Java.", + "Stage pacakges typically useful to workers written in Python." + ], + "enum": [ + "DEFAULT_PACKAGE_SET_UNKNOWN", + "DEFAULT_PACKAGE_SET_NONE", + "DEFAULT_PACKAGE_SET_JAVA", + "DEFAULT_PACKAGE_SET_PYTHON" + ], + "description": "The default package set to install. This allows the service to\nselect a default set of packages which are useful to worker\nharnesses written in a particular language.", + "type": "string" + }, + "network": { + "description": "Network to which VMs will be assigned. If empty or unspecified,\nthe service will use the network \"default\".", + "type": "string" + }, + "numThreadsPerWorker": { + "format": "int32", + "description": "The number of threads per worker harness. If empty or unspecified, the\nservice will choose a number of threads (according to the number of cores\non the selected machine type for batch, or 1 by convention for streaming).", + "type": "integer" + }, + "numWorkers": { + "format": "int32", + "description": "Number of Google Compute Engine workers in this pool needed to\nexecute the job. If zero or unspecified, the service will\nattempt to choose a reasonable default.", + "type": "integer" + }, + "zone": { + "description": "Zone to run the worker pools in. If empty or unspecified, the service\nwill attempt to choose a reasonable default.", + "type": "string" } }, "id": "WorkerPool" @@ -3108,13 +3968,13 @@ "description": "A work item that represents the different operations that can be\nperformed on a user-defined Source specification.", "type": "object", "properties": { + "split": { + "$ref": "SourceSplitRequest", + "description": "Information about a request to split a source." + }, "getMetadata": { "description": "Information about a request to get metadata about a source.", "$ref": "SourceGetMetadataRequest" - }, - "split": { - "description": "Information about a request to split a source.", - "$ref": "SourceSplitRequest" } }, "id": "SourceOperationRequest" @@ -3131,37 +3991,37 @@ "$ref": "SourceOperationRequest", "description": "Additional information for source operation WorkItems." }, - "streamingSetupTask": { - "description": "Additional information for StreamingSetupTask WorkItems.", - "$ref": "StreamingSetupTask" - }, "reportStatusInterval": { "format": "google-duration", "description": "Recommended reporting interval.", "type": "string" }, + "streamingSetupTask": { + "$ref": "StreamingSetupTask", + "description": "Additional information for StreamingSetupTask WorkItems." + }, + "streamingConfigTask": { + "description": "Additional information for StreamingConfigTask WorkItems.", + "$ref": "StreamingConfigTask" + }, "leaseExpireTime": { "format": "google-datetime", "description": "Time when the lease on this Work will expire.", "type": "string" }, - "streamingConfigTask": { - "$ref": "StreamingConfigTask", - "description": "Additional information for StreamingConfigTask WorkItems." - }, "initialReportIndex": { "format": "int64", "description": "The initial index to use when reporting the status of the WorkItem.", "type": "string" }, - "streamingComputationTask": { - "$ref": "StreamingComputationTask", - "description": "Additional information for StreamingComputationTask WorkItems." - }, "shellTask": { "$ref": "ShellTask", "description": "Additional information for ShellTask WorkItems." }, + "streamingComputationTask": { + "$ref": "StreamingComputationTask", + "description": "Additional information for StreamingComputationTask WorkItems." + }, "jobId": { "description": "Identifies the workflow job this WorkItem belongs to.", "type": "string" @@ -3176,19 +4036,19 @@ "type": "string" }, "mapTask": { - "description": "Additional information for MapTask WorkItems.", - "$ref": "MapTask" + "$ref": "MapTask", + "description": "Additional information for MapTask WorkItems." }, "seqMapTask": { - "description": "Additional information for SeqMapTask WorkItems.", - "$ref": "SeqMapTask" + "$ref": "SeqMapTask", + "description": "Additional information for SeqMapTask WorkItems." }, "packages": { - "description": "Any required packages that need to be fetched in order to execute\nthis WorkItem.", "items": { "$ref": "Package" }, - "type": "array" + "type": "array", + "description": "Any required packages that need to be fetched in order to execute\nthis WorkItem." } }, "id": "WorkItem" @@ -3197,6 +4057,10 @@ "description": "A rich message format, including a human readable string, a key for\nidentifying the message, and structured data associated with the message for\nprogrammatic consumption.", "type": "object", "properties": { + "messageKey": { + "description": "Idenfier for this message type. Used by external systems to\ninternationalize or personalize message.", + "type": "string" + }, "messageText": { "description": "Human-readable version of message.", "type": "string" @@ -3207,32 +4071,11 @@ "$ref": "Parameter" }, "type": "array" - }, - "messageKey": { - "description": "Idenfier for this message type. Used by external systems to\ninternationalize or personalize message.", - "type": "string" } }, "id": "StructuredMessage" }, - "ReportedParallelism": { - "type": "object", - "properties": { - "value": { - "format": "double", - "description": "Specifies the level of parallelism in case it is finite.", - "type": "number" - }, - "isInfinite": { - "description": "Specifies whether the parallelism is infinite. If true, \"value\" is\nignored.\nInfinite parallelism means the service will assume that the work item\ncan always be split into more non-empty work items by dynamic splitting.\nThis is a work-around for lack of support for infinity by the current\nJSON-based Java RPC stack.", - "type": "boolean" - } - }, - "id": "ReportedParallelism", - "description": "Represents the level of parallelism in a WorkItem's input,\nreported by the worker." - }, "ResourceUtilizationReport": { - "type": "object", "properties": { "cpuTime": { "description": "CPU utilization samples.", @@ -3243,18 +4086,35 @@ } }, "id": "ResourceUtilizationReport", - "description": "Worker metrics exported from workers. This contains resource utilization\nmetrics accumulated from a variety of sources. For more information, see\ngo/df-resource-signals." + "description": "Worker metrics exported from workers. This contains resource utilization\nmetrics accumulated from a variety of sources. For more information, see\ngo/df-resource-signals.", + "type": "object" + }, + "ReportedParallelism": { + "description": "Represents the level of parallelism in a WorkItem's input,\nreported by the worker.", + "type": "object", + "properties": { + "isInfinite": { + "description": "Specifies whether the parallelism is infinite. If true, \"value\" is\nignored.\nInfinite parallelism means the service will assume that the work item\ncan always be split into more non-empty work items by dynamic splitting.\nThis is a work-around for lack of support for infinity by the current\nJSON-based Java RPC stack.", + "type": "boolean" + }, + "value": { + "format": "double", + "description": "Specifies the level of parallelism in case it is finite.", + "type": "number" + } + }, + "id": "ReportedParallelism" }, "TopologyConfig": { "description": "Global topology of the streaming Dataflow job, including all\ncomputations and their sharded locations.", "type": "object", "properties": { "userStageToComputationNameMap": { - "description": "Maps user stage names to stable computation names.", "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "Maps user stage names to stable computation names." }, "computations": { "description": "The computations associated with a streaming Dataflow job.", @@ -3269,11 +4129,11 @@ "type": "integer" }, "dataDiskAssignments": { - "description": "The disks assigned to a streaming Dataflow job.", "items": { "$ref": "DataDiskAssignment" }, - "type": "array" + "type": "array", + "description": "The disks assigned to a streaming Dataflow job." }, "forwardingKeyBits": { "format": "int32", @@ -3301,32 +4161,20 @@ "id": "SourceSplitOptions" }, "ReadInstruction": { + "description": "An instruction that reads records.\nTakes no inputs, produces one output.", + "type": "object", "properties": { "source": { - "description": "The source to read from.", - "$ref": "Source" + "$ref": "Source", + "description": "The source to read from." } }, - "id": "ReadInstruction", - "description": "An instruction that reads records.\nTakes no inputs, produces one output.", - "type": "object" + "id": "ReadInstruction" }, "WorkerSettings": { "description": "Provides data to pass through to the worker harness.", "type": "object", "properties": { - "baseUrl": { - "description": "The base URL for accessing Google Cloud APIs.\n\nWhen workers access Google Cloud APIs, they logically do so via\nrelative URLs. If this field is specified, it supplies the base\nURL to use for resolving these relative URLs. The normative\nalgorithm used is defined by RFC 1808, \"Relative Uniform Resource\nLocators\".\n\nIf not specified, the default value is \"http://www.googleapis.com/\"", - "type": "string" - }, - "reportingEnabled": { - "description": "Whether to send work progress updates to the service.", - "type": "boolean" - }, - "servicePath": { - "description": "The Cloud Dataflow service path relative to the root URL, for example,\n\"dataflow/v1b3/projects\".", - "type": "string" - }, "shuffleServicePath": { "description": "The Shuffle service path relative to the root URL, for example,\n\"shuffle/v1beta1\".", "type": "string" @@ -3338,6 +4186,18 @@ "tempStoragePrefix": { "description": "The prefix of the resources the system should use for temporary\nstorage.\n\nThe supported resource type is:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", "type": "string" + }, + "reportingEnabled": { + "type": "boolean", + "description": "Whether to send work progress updates to the service." + }, + "baseUrl": { + "description": "The base URL for accessing Google Cloud APIs.\n\nWhen workers access Google Cloud APIs, they logically do so via\nrelative URLs. If this field is specified, it supplies the base\nURL to use for resolving these relative URLs. The normative\nalgorithm used is defined by RFC 1808, \"Relative Uniform Resource\nLocators\".\n\nIf not specified, the default value is \"http://www.googleapis.com/\"", + "type": "string" + }, + "servicePath": { + "description": "The Cloud Dataflow service path relative to the root URL, for example,\n\"dataflow/v1b3/projects\".", + "type": "string" } }, "id": "WorkerSettings" @@ -3361,66 +4221,73 @@ "id": "DataDiskAssignment" }, "StreamingStageLocation": { - "type": "object", "properties": { "streamId": { - "description": "Identifies the particular stream within the streaming Dataflow\njob.", - "type": "string" + "type": "string", + "description": "Identifies the particular stream within the streaming Dataflow\njob." } }, "id": "StreamingStageLocation", - "description": "Identifies the location of a streaming computation stage, for\nstage-to-stage communication." + "description": "Identifies the location of a streaming computation stage, for\nstage-to-stage communication.", + "type": "object" }, "ApproximateSplitRequest": { - "id": "ApproximateSplitRequest", "description": "A suggestion by the service to the worker to dynamically split the WorkItem.", "type": "object", "properties": { "position": { - "$ref": "Position", - "description": "A Position at which to split the work item." + "description": "A Position at which to split the work item.", + "$ref": "Position" }, "fractionConsumed": { "format": "double", "description": "A fraction at which to split the work item, from 0.0 (beginning of the\ninput) to 1.0 (end of the input).", "type": "number" } - } + }, + "id": "ApproximateSplitRequest" }, "Status": { - "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - }, "code": { "format": "int32", "description": "The status code, which should be an enum value of google.rpc.Code.", "type": "integer" }, "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client." + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" } - } + }, + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons." }, "ExecutionStageState": { "description": "A message describing the state of a particular execution stage.", "type": "object", "properties": { + "executionStageName": { + "description": "The name of the execution stage.", + "type": "string" + }, + "currentStateTime": { + "format": "google-datetime", + "description": "The time at which the stage transitioned to this state.", + "type": "string" + }, "executionStageState": { - "description": "Executions stage states allow the same set of values as JobState.", - "type": "string", "enumDescriptions": [ "The job's run state isn't specified.", "`JOB_STATE_STOPPED` indicates that the job has not\nyet started to run.", @@ -3446,26 +4313,24 @@ "JOB_STATE_DRAINED", "JOB_STATE_PENDING", "JOB_STATE_CANCELLING" - ] - }, - "executionStageName": { - "description": "The name of the execution stage.", - "type": "string" - }, - "currentStateTime": { - "format": "google-datetime", - "description": "The time at which the stage transitioned to this state.", + ], + "description": "Executions stage states allow the same set of values as JobState.", "type": "string" } }, "id": "ExecutionStageState" }, "StreamLocation": { + "description": "Describes a stream of data, either as input to be processed or as\noutput of a streaming Dataflow job.", "type": "object", "properties": { + "customSourceLocation": { + "description": "The stream is a custom source.", + "$ref": "CustomSourceLocation" + }, "sideInputLocation": { - "description": "The stream is a streaming side input.", - "$ref": "StreamingSideInputLocation" + "$ref": "StreamingSideInputLocation", + "description": "The stream is a streaming side input." }, "pubsubLocation": { "$ref": "PubsubLocation", @@ -3474,14 +4339,9 @@ "streamingStageLocation": { "$ref": "StreamingStageLocation", "description": "The stream is part of another computation within the current\nstreaming Dataflow job." - }, - "customSourceLocation": { - "$ref": "CustomSourceLocation", - "description": "The stream is a custom source." } }, - "id": "StreamLocation", - "description": "Describes a stream of data, either as input to be processed or as\noutput of a streaming Dataflow job." + "id": "StreamLocation" }, "SendWorkerMessagesResponse": { "description": "The response to the worker messages.", @@ -3497,24 +4357,40 @@ }, "id": "SendWorkerMessagesResponse" }, - "LeaseWorkItemResponse": { + "StreamingComputationConfig": { + "description": "Configuration information for a single streaming computation.", "type": "object", "properties": { - "workItems": { - "description": "A list of the leased WorkItems.", + "computationId": { + "description": "Unique identifier for this computation.", + "type": "string" + }, + "stageName": { + "description": "Stage name of this computation.", + "type": "string" + }, + "systemName": { + "description": "System defined name for this computation.", + "type": "string" + }, + "instructions": { + "description": "Instructions that comprise the computation.", "items": { - "$ref": "WorkItem" + "$ref": "ParallelInstruction" }, "type": "array" } }, - "id": "LeaseWorkItemResponse", - "description": "Response to a request to lease WorkItems." + "id": "StreamingComputationConfig" }, "TransformSummary": { "description": "Description of the type, names/ids, and input/outputs for a transform.", "type": "object", "properties": { + "id": { + "description": "SDK generated id of this transform instance.", + "type": "string" + }, "displayData": { "description": "Transform-specific display data.", "items": { @@ -3530,6 +4406,7 @@ "type": "array" }, "kind": { + "description": "Type of transform.", "type": "string", "enumDescriptions": [ "Unrecognized transform type.", @@ -3552,8 +4429,7 @@ "CONSTANT_KIND", "SINGLETON_KIND", "SHUFFLE_KIND" - ], - "description": "Type of transform." + ] }, "inputCollectionName": { "description": "User names for all collection inputs to this transform.", @@ -3565,39 +4441,45 @@ "name": { "description": "User provided name for this transform instance.", "type": "string" - }, - "id": { - "description": "SDK generated id of this transform instance.", - "type": "string" } }, "id": "TransformSummary" }, - "StreamingComputationConfig": { - "id": "StreamingComputationConfig", - "description": "Configuration information for a single streaming computation.", + "LeaseWorkItemResponse": { + "description": "Response to a request to lease WorkItems.", "type": "object", "properties": { - "stageName": { - "description": "Stage name of this computation.", - "type": "string" - }, - "systemName": { - "description": "System defined name for this computation.", - "type": "string" - }, - "instructions": { - "description": "Instructions that comprise the computation.", + "workItems": { + "description": "A list of the leased WorkItems.", "items": { - "$ref": "ParallelInstruction" + "$ref": "WorkItem" }, "type": "array" - }, - "computationId": { - "description": "Unique identifier for this computation.", - "type": "string" } - } + }, + "id": "LeaseWorkItemResponse" + }, + "LaunchTemplateParameters": { + "type": "object", + "properties": { + "parameters": { + "additionalProperties": { + "type": "string" + }, + "description": "The runtime parameters to pass to the job.", + "type": "object" + }, + "jobName": { + "description": "Required. The job name to use for the created job.", + "type": "string" + }, + "environment": { + "description": "The runtime environment for the job.", + "$ref": "RuntimeEnvironment" + } + }, + "id": "LaunchTemplateParameters", + "description": "Parameters to provide to the template being launched." }, "Sink": { "id": "Sink", @@ -3605,46 +4487,26 @@ "type": "object", "properties": { "codec": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, "description": "The codec to use to encode data written to the sink.", - "type": "object" - }, - "spec": { "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + } + }, + "spec": { "additionalProperties": { "description": "Properties of the object.", "type": "any" }, - "description": "The sink to write to, plus its parameters." + "description": "The sink to write to, plus its parameters.", + "type": "object" } } }, - "LaunchTemplateParameters": { - "properties": { - "jobName": { - "description": "Required. The job name to use for the created job.", - "type": "string" - }, - "environment": { - "$ref": "RuntimeEnvironment", - "description": "The runtime environment for the job." - }, - "parameters": { - "additionalProperties": { - "type": "string" - }, - "description": "The runtime parameters to pass to the job.", - "type": "object" - } - }, - "id": "LaunchTemplateParameters", - "description": "Parameters to provide to the template being launched.", - "type": "object" - }, "FlattenInstruction": { + "id": "FlattenInstruction", + "description": "An instruction that copies its inputs (zero or more) to its (single) output.", "type": "object", "properties": { "inputs": { @@ -3654,37 +4516,17 @@ }, "type": "array" } - }, - "id": "FlattenInstruction", - "description": "An instruction that copies its inputs (zero or more) to its (single) output." + } }, "PartialGroupByKeyInstruction": { + "id": "PartialGroupByKeyInstruction", "description": "An instruction that does a partial group-by-key.\nOne input and one output.", "type": "object", "properties": { - "originalCombineValuesInputStoreName": { - "description": "If this instruction includes a combining function this is the name of the\nintermediate store between the GBK and the CombineValues.", - "type": "string" - }, - "sideInputs": { - "description": "Zero or more side inputs.", - "items": { - "$ref": "SideInputInfo" - }, - "type": "array" - }, - "originalCombineValuesStepName": { - "description": "If this instruction includes a combining function, this is the name of the\nCombineValues instruction lifted into this instruction.", - "type": "string" - }, - "input": { - "$ref": "InstructionInput", - "description": "Describes the input to the partial group-by-key instruction." - }, "inputElementCodec": { "additionalProperties": { - "description": "Properties of the object.", - "type": "any" + "type": "any", + "description": "Properties of the object." }, "description": "The codec to use for interpreting an element in the input PTable.", "type": "object" @@ -3696,18 +4538,49 @@ }, "description": "The value combining function to invoke.", "type": "object" + }, + "originalCombineValuesInputStoreName": { + "description": "If this instruction includes a combining function this is the name of the\nintermediate store between the GBK and the CombineValues.", + "type": "string" + }, + "originalCombineValuesStepName": { + "description": "If this instruction includes a combining function, this is the name of the\nCombineValues instruction lifted into this instruction.", + "type": "string" + }, + "sideInputs": { + "description": "Zero or more side inputs.", + "items": { + "$ref": "SideInputInfo" + }, + "type": "array" + }, + "input": { + "$ref": "InstructionInput", + "description": "Describes the input to the partial group-by-key instruction." + } + } + }, + "InstructionInput": { + "description": "An input of an instruction, as a reference to an output of a\nproducer instruction.", + "type": "object", + "properties": { + "producerInstructionIndex": { + "format": "int32", + "description": "The index (origin zero) of the parallel instruction that produces\nthe output to be consumed by this input. This index is relative\nto the list of instructions in this input's instruction's\ncontaining MapTask.", + "type": "integer" + }, + "outputNum": { + "format": "int32", + "description": "The output index (origin zero) within the producer.", + "type": "integer" } }, - "id": "PartialGroupByKeyInstruction" + "id": "InstructionInput" }, "StageSource": { "description": "Description of an input or output of an execution stage.", "type": "object", "properties": { - "originalTransformOrCollection": { - "type": "string", - "description": "User name for the original user transform or collection with which this\nsource is most closely associated." - }, "sizeBytes": { "format": "int64", "description": "Size of the source, if measurable.", @@ -3720,27 +4593,14 @@ "userName": { "description": "Human-readable name for this source; may be user or system generated.", "type": "string" + }, + "originalTransformOrCollection": { + "type": "string", + "description": "User name for the original user transform or collection with which this\nsource is most closely associated." } }, "id": "StageSource" }, - "InstructionInput": { - "description": "An input of an instruction, as a reference to an output of a\nproducer instruction.", - "type": "object", - "properties": { - "producerInstructionIndex": { - "type": "integer", - "format": "int32", - "description": "The index (origin zero) of the parallel instruction that produces\nthe output to be consumed by this input. This index is relative\nto the list of instructions in this input's instruction's\ncontaining MapTask." - }, - "outputNum": { - "type": "integer", - "format": "int32", - "description": "The output index (origin zero) within the producer." - } - }, - "id": "InstructionInput" - }, "StringList": { "description": "A metric value representing a list of strings.", "type": "object", @@ -3759,13 +4619,21 @@ "description": "Data provided with a pipeline or transform to provide descriptive info.", "type": "object", "properties": { - "strValue": { - "description": "Contains value if the data is of string type.", + "timestampValue": { + "format": "google-datetime", + "description": "Contains value if the data is of timestamp type.", "type": "string" }, - "int64Value": { - "format": "int64", - "description": "Contains value if the data is of int64 type.", + "boolValue": { + "description": "Contains value if the data is of a boolean type.", + "type": "boolean" + }, + "javaClassValue": { + "description": "Contains value if the data is of java class type.", + "type": "string" + }, + "strValue": { + "description": "Contains value if the data is of string type.", "type": "string" }, "durationValue": { @@ -3773,6 +4641,11 @@ "description": "Contains value if the data is of duration type.", "type": "string" }, + "int64Value": { + "format": "int64", + "description": "Contains value if the data is of int64 type.", + "type": "string" + }, "namespace": { "description": "The namespace for the key. This is usually a class name or programming\nlanguage namespace (i.e. python module) which defines the display data.\nThis allows a dax monitoring system to specially handle the data\nand perform custom rendering.", "type": "string" @@ -3790,33 +4663,37 @@ "description": "A possible additional shorter value to display.\nFor example a java_class_name_value of com.mypackage.MyDoFn\nwill be stored with MyDoFn as the short_str_value and\ncom.mypackage.MyDoFn as the java_class_name value.\nshort_str_value can be displayed and java_class_name_value\nwill be displayed as a tooltip.", "type": "string" }, - "label": { - "description": "An optional label to display in a dax UI for the element.", - "type": "string" - }, "url": { "description": "An optional full URL.", "type": "string" }, - "timestampValue": { - "format": "google-datetime", - "description": "Contains value if the data is of timestamp type.", - "type": "string" - }, - "boolValue": { - "description": "Contains value if the data is of a boolean type.", - "type": "boolean" - }, - "javaClassValue": { - "description": "Contains value if the data is of java class type.", + "label": { + "description": "An optional label to display in a dax UI for the element.", "type": "string" } }, "id": "DisplayData" }, - "LeaseWorkItemRequest": { - "description": "Request to lease WorkItems.", + "GetDebugConfigRequest": { + "description": "Request to get updated debug configuration for component.", "type": "object", + "properties": { + "componentId": { + "description": "The internal component id for which debug configuration is\nrequested.", + "type": "string" + }, + "workerId": { + "description": "The worker id, i.e., VM hostname.", + "type": "string" + }, + "location": { + "description": "The location which contains the job specified by job_id.", + "type": "string" + } + }, + "id": "GetDebugConfigRequest" + }, + "LeaseWorkItemRequest": { "properties": { "requestedLeaseDuration": { "format": "google-duration", @@ -3824,9 +4701,9 @@ "type": "string" }, "currentWorkerTime": { - "type": "string", "format": "google-datetime", - "description": "The current timestamp at the worker." + "description": "The current timestamp at the worker.", + "type": "string" }, "workItemTypes": { "description": "Filter for WorkItem type.", @@ -3836,8 +4713,8 @@ "type": "array" }, "location": { - "description": "The location which contains the WorkItem's job.", - "type": "string" + "type": "string", + "description": "The location which contains the WorkItem's job." }, "workerCapabilities": { "description": "Worker capabilities. WorkItems might be limited to workers with specific\ncapabilities.", @@ -3851,34 +4728,17 @@ "type": "string" } }, - "id": "LeaseWorkItemRequest" - }, - "GetDebugConfigRequest": { - "description": "Request to get updated debug configuration for component.", - "type": "object", - "properties": { - "componentId": { - "description": "The internal component id for which debug configuration is\nrequested.", - "type": "string" - }, - "workerId": { - "type": "string", - "description": "The worker id, i.e., VM hostname." - }, - "location": { - "description": "The location which contains the job specified by job_id.", - "type": "string" - } - }, - "id": "GetDebugConfigRequest" + "id": "LeaseWorkItemRequest", + "description": "Request to lease WorkItems.", + "type": "object" }, "GetTemplateResponse": { "description": "The response to a GetTemplate request.", "type": "object", "properties": { "status": { - "description": "The status of the get template request. Any problems with the\nrequest will be indicated in the error_details.", - "$ref": "Status" + "$ref": "Status", + "description": "The status of the get template request. Any problems with the\nrequest will be indicated in the error_details." }, "metadata": { "$ref": "TemplateMetadata", @@ -3903,8 +4763,14 @@ "id": "Parameter" }, "ReportWorkItemStatusRequest": { - "type": "object", "properties": { + "workItemStatuses": { + "description": "The order is unimportant, except that the order of the\nWorkItemServiceState messages in the ReportWorkItemStatusResponse\ncorresponds to the order of WorkItemStatus messages here.", + "items": { + "$ref": "WorkItemStatus" + }, + "type": "array" + }, "currentWorkerTime": { "format": "google-datetime", "description": "The current timestamp at the worker.", @@ -3917,27 +4783,46 @@ "location": { "description": "The location which contains the WorkItem's job.", "type": "string" - }, - "workItemStatuses": { - "description": "The order is unimportant, except that the order of the\nWorkItemServiceState messages in the ReportWorkItemStatusResponse\ncorresponds to the order of WorkItemStatus messages here.", - "items": { - "$ref": "WorkItemStatus" - }, - "type": "array" } }, "id": "ReportWorkItemStatusRequest", - "description": "Request to report the status of WorkItems." + "description": "Request to report the status of WorkItems.", + "type": "object" }, - "PipelineDescription": { + "StreamingConfigTask": { "properties": { - "originalPipelineTransform": { - "description": "Description of each transform in the pipeline and collections between them.", + "streamingComputationConfigs": { + "description": "Set of computation configuration information.", "items": { - "$ref": "TransformSummary" + "$ref": "StreamingComputationConfig" }, "type": "array" }, + "windmillServiceEndpoint": { + "description": "If present, the worker must use this endpoint to communicate with Windmill\nService dispatchers, otherwise the worker must continue to use whatever\nendpoint it had been using.", + "type": "string" + }, + "userStepToStateFamilyNameMap": { + "description": "Map from user step names to state families.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "windmillServicePort": { + "format": "int64", + "description": "If present, the worker must use this port to communicate with Windmill\nService dispatchers. Only applicable when windmill_service_endpoint is\nspecified.", + "type": "string" + } + }, + "id": "StreamingConfigTask", + "description": "A task that carries configuration information for streaming computations.", + "type": "object" + }, + "PipelineDescription": { + "description": "A descriptive representation of submitted pipeline as well as the executed\nform. This data is provided by the Dataflow service for ease of visualizing\nthe pipeline and interpretting Dataflow provided metrics.", + "type": "object", + "properties": { "displayData": { "description": "Pipeline level display data.", "items": { @@ -3951,66 +4836,42 @@ "$ref": "ExecutionStageSummary" }, "type": "array" - } - }, - "id": "PipelineDescription", - "description": "A descriptive representation of submitted pipeline as well as the executed\nform. This data is provided by the Dataflow service for ease of visualizing\nthe pipeline and interpretting Dataflow provided metrics.", - "type": "object" - }, - "StreamingConfigTask": { - "description": "A task that carries configuration information for streaming computations.", - "type": "object", - "properties": { - "windmillServiceEndpoint": { - "description": "If present, the worker must use this endpoint to communicate with Windmill\nService dispatchers, otherwise the worker must continue to use whatever\nendpoint it had been using.", - "type": "string" }, - "userStepToStateFamilyNameMap": { - "additionalProperties": { - "type": "string" - }, - "description": "Map from user step names to state families.", - "type": "object" - }, - "windmillServicePort": { - "format": "int64", - "description": "If present, the worker must use this port to communicate with Windmill\nService dispatchers. Only applicable when windmill_service_endpoint is\nspecified.", - "type": "string" - }, - "streamingComputationConfigs": { - "description": "Set of computation configuration information.", + "originalPipelineTransform": { + "description": "Description of each transform in the pipeline and collections between them.", "items": { - "$ref": "StreamingComputationConfig" + "$ref": "TransformSummary" }, "type": "array" } }, - "id": "StreamingConfigTask" + "id": "PipelineDescription" }, "Step": { "description": "Defines a particular step within a Cloud Dataflow job.\n\nA job consists of multiple steps, each of which performs some\nspecific operation as part of the overall job. Data is typically\npassed from one step to another as part of the job.\n\nHere's an example of a sequence of steps which together implement a\nMap-Reduce job:\n\n * Read a collection of data from some source, parsing the\n collection's elements.\n\n * Validate the elements.\n\n * Apply a user-defined function to map each element to some value\n and extract an element-specific key value.\n\n * Group elements with the same key into a single element with\n that key, transforming a multiply-keyed collection into a\n uniquely-keyed collection.\n\n * Write the elements out to some data sink.\n\nNote that the Cloud Dataflow service may be used to run many different\ntypes of jobs, not just Map-Reduce.", "type": "object", "properties": { - "properties": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Named properties associated with the step. Each kind of\npredefined step has its own required set of properties.\nMust be provided on Create. Only retrieved with JOB_VIEW_ALL.", - "type": "object" - }, "name": { "description": "The name that identifies the step. This must be unique for each\nstep with respect to all other steps in the Cloud Dataflow job.", "type": "string" }, "kind": { - "type": "string", - "description": "The kind of step in the Cloud Dataflow job." + "description": "The kind of step in the Cloud Dataflow job.", + "type": "string" + }, + "properties": { + "description": "Named properties associated with the step. Each kind of\npredefined step has its own required set of properties.\nMust be provided on Create. Only retrieved with JOB_VIEW_ALL.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + } } }, "id": "Step" }, "JobExecutionInfo": { + "id": "JobExecutionInfo", "description": "Additional information about how a Cloud Dataflow job will be executed that\nisn't contained in the submitted job.", "type": "object", "properties": { @@ -4021,8 +4882,7 @@ "description": "A mapping from each stage to the information about that stage.", "type": "object" } - }, - "id": "JobExecutionInfo" + } }, "FailedLocation": { "description": "Indicates which location failed to respond to a request for data.", @@ -4056,6 +4916,8 @@ "id": "Disk" }, "ListJobMessagesResponse": { + "description": "Response to a request to list job messages.", + "type": "object", "properties": { "jobMessages": { "description": "Messages in ascending timestamp order.", @@ -4065,8 +4927,8 @@ "type": "array" }, "nextPageToken": { - "type": "string", - "description": "The token to obtain the next page of results if there are more." + "description": "The token to obtain the next page of results if there are more.", + "type": "string" }, "autoscalingEvents": { "description": "Autoscaling events in ascending timestamp order.", @@ -4076,9 +4938,7 @@ "type": "array" } }, - "id": "ListJobMessagesResponse", - "description": "Response to a request to list job messages.", - "type": "object" + "id": "ListJobMessagesResponse" }, "CounterMetadata": { "description": "CounterMetadata includes all static non-name non-value counter attributes.", @@ -4089,17 +4949,6 @@ "type": "string" }, "kind": { - "enumDescriptions": [ - "Counter aggregation kind was not set.", - "Aggregated value is the sum of all contributed values.", - "Aggregated value is the max of all contributed values.", - "Aggregated value is the min of all contributed values.", - "Aggregated value is the mean of all contributed values.", - "Aggregated value represents the logical 'or' of all contributed values.", - "Aggregated value represents the logical 'and' of all contributed values.", - "Aggregated value is a set of unique contributed values.", - "Aggregated value captures statistics about a distribution." - ], "enum": [ "INVALID", "SUM", @@ -4112,9 +4961,22 @@ "DISTRIBUTION" ], "description": "Counter aggregation kind.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Counter aggregation kind was not set.", + "Aggregated value is the sum of all contributed values.", + "Aggregated value is the max of all contributed values.", + "Aggregated value is the min of all contributed values.", + "Aggregated value is the mean of all contributed values.", + "Aggregated value represents the logical 'or' of all contributed values.", + "Aggregated value represents the logical 'and' of all contributed values.", + "Aggregated value is a set of unique contributed values.", + "Aggregated value captures statistics about a distribution." + ] }, "standardUnits": { + "description": "System defined Units, see above enum.", + "type": "string", "enumDescriptions": [ "Counter returns a value in bytes.", "Counter returns a value in bytes per second.", @@ -4134,9 +4996,7 @@ "TIMESTAMP_MSEC", "TIMESTAMP_USEC", "TIMESTAMP_NSEC" - ], - "description": "System defined Units, see above enum.", - "type": "string" + ] }, "otherUnits": { "description": "A string referring to the unit type.", @@ -4170,8 +5030,6 @@ } }, "StateFamilyConfig": { - "description": "State family configuration.", - "type": "object", "properties": { "isRead": { "description": "If true, this family corresponds to a read operation.", @@ -4182,38 +5040,36 @@ "type": "string" } }, - "id": "StateFamilyConfig" + "id": "StateFamilyConfig", + "description": "State family configuration.", + "type": "object" }, "IntegerList": { "description": "A metric value representing a list of integers.", "type": "object", "properties": { "elements": { - "description": "Elements of the list.", "items": { "$ref": "SplitInt64" }, - "type": "array" + "type": "array", + "description": "Elements of the list." } }, "id": "IntegerList" }, "ResourceUtilizationReportResponse": { - "properties": {}, - "id": "ResourceUtilizationReportResponse", "description": "Service-side response to WorkerMessage reporting resource utilization.", - "type": "object" + "type": "object", + "properties": {}, + "id": "ResourceUtilizationReportResponse" }, "SourceSplitResponse": { + "description": "The response to a SourceSplitRequest.", + "type": "object", "properties": { - "shards": { - "items": { - "$ref": "SourceSplitShard" - }, - "type": "array", - "description": "DEPRECATED in favor of bundles." - }, "outcome": { + "description": "Indicates whether splitting happened and produced a list of bundles.\nIf this is USE_CURRENT_SOURCE_AS_IS, the current source should\nbe processed \"as is\" without splitting. \"bundles\" is ignored in this case.\nIf this is SPLITTING_HAPPENED, then \"bundles\" contains a list of\nbundles into which the source was split.", "type": "string", "enumDescriptions": [ "The source split outcome is unknown, or unspecified.", @@ -4224,831 +5080,24 @@ "SOURCE_SPLIT_OUTCOME_UNKNOWN", "SOURCE_SPLIT_OUTCOME_USE_CURRENT", "SOURCE_SPLIT_OUTCOME_SPLITTING_HAPPENED" - ], - "description": "Indicates whether splitting happened and produced a list of bundles.\nIf this is USE_CURRENT_SOURCE_AS_IS, the current source should\nbe processed \"as is\" without splitting. \"bundles\" is ignored in this case.\nIf this is SPLITTING_HAPPENED, then \"bundles\" contains a list of\nbundles into which the source was split." + ] }, "bundles": { - "description": "If outcome is SPLITTING_HAPPENED, then this is a list of bundles\ninto which the source was split. Otherwise this field is ignored.\nThis list can be empty, which means the source represents an empty input.", "items": { "$ref": "DerivedSource" }, - "type": "array" - } - }, - "id": "SourceSplitResponse", - "description": "The response to a SourceSplitRequest.", - "type": "object" - }, - "ParallelInstruction": { - "properties": { - "partialGroupByKey": { - "$ref": "PartialGroupByKeyInstruction", - "description": "Additional information for PartialGroupByKey instructions." - }, - "outputs": { - "description": "Describes the outputs of the instruction.", - "items": { - "$ref": "InstructionOutput" - }, - "type": "array" - }, - "name": { - "description": "User-provided name of this operation.", - "type": "string" - }, - "read": { - "$ref": "ReadInstruction", - "description": "Additional information for Read instructions." - }, - "parDo": { - "description": "Additional information for ParDo instructions.", - "$ref": "ParDoInstruction" - }, - "flatten": { - "$ref": "FlattenInstruction", - "description": "Additional information for Flatten instructions." - }, - "originalName": { - "description": "System-defined name for the operation in the original workflow graph.", - "type": "string" - }, - "write": { - "$ref": "WriteInstruction", - "description": "Additional information for Write instructions." - }, - "systemName": { - "description": "System-defined name of this operation.\nUnique across the workflow.", - "type": "string" - } - }, - "id": "ParallelInstruction", - "description": "Describes a particular operation comprising a MapTask.", - "type": "object" - }, - "Package": { - "type": "object", - "properties": { - "location": { - "description": "The resource to read the package from. The supported resource type is:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}\n bucket.storage.googleapis.com/", - "type": "string" - }, - "name": { - "description": "The name of the package.", - "type": "string" - } - }, - "id": "Package", - "description": "The packages that must be installed in order for a worker to run the\nsteps of the Cloud Dataflow job that will be assigned to its worker\npool.\n\nThis is the mechanism by which the Cloud Dataflow SDK causes code to\nbe loaded onto the workers. For example, the Cloud Dataflow Java SDK\nmight use this to install jars containing the user's code and all of the\nvarious dependencies (libraries, data files, etc.) required in order\nfor that code to run." - }, - "KeyRangeDataDiskAssignment": { - "description": "Data disk assignment information for a specific key-range of a sharded\ncomputation.\nCurrently we only support UTF-8 character splits to simplify encoding into\nJSON.", - "type": "object", - "properties": { - "dataDisk": { - "description": "The name of the data disk where data for this range is stored.\nThis name is local to the Google Cloud Platform project and uniquely\nidentifies the disk within that project, for example\n\"myproject-1014-104817-4c2-harness-0-disk-1\".", - "type": "string" - }, - "start": { - "description": "The start (inclusive) of the key range.", - "type": "string" - }, - "end": { - "description": "The end (exclusive) of the key range.", - "type": "string" - } - }, - "id": "KeyRangeDataDiskAssignment" - }, - "ParDoInstruction": { - "type": "object", - "properties": { - "numOutputs": { - "format": "int32", - "description": "The number of outputs.", - "type": "integer" - }, - "sideInputs": { - "description": "Zero or more side inputs.", - "items": { - "$ref": "SideInputInfo" - }, - "type": "array" - }, - "multiOutputInfos": { - "description": "Information about each of the outputs, if user_fn is a MultiDoFn.", - "items": { - "$ref": "MultiOutputInfo" - }, - "type": "array" - }, - "userFn": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The user function to invoke." - }, - "input": { - "$ref": "InstructionInput", - "description": "The input." - } - }, - "id": "ParDoInstruction", - "description": "An instruction that does a ParDo operation.\nTakes one main input and zero or more side inputs, and produces\nzero or more outputs.\nRuns user code." - }, - "MetricUpdate": { - "properties": { - "distribution": { - "description": "A struct value describing properties of a distribution of numeric values.", - "type": "any" - }, - "set": { - "description": "Worker-computed aggregate value for the \"Set\" aggregation kind. The only\npossible value type is a list of Values whose type can be Long, Double,\nor String, according to the metric's type. All Values in the list must\nbe of the same type.", - "type": "any" - }, - "cumulative": { - "description": "True if this metric is reported as the total cumulative aggregate\nvalue accumulated since the worker started working on this WorkItem.\nBy default this is false, indicating that this metric is reported\nas a delta that is not associated with any WorkItem.", - "type": "boolean" - }, - "internal": { - "description": "Worker-computed aggregate value for internal use by the Dataflow\nservice.", - "type": "any" - }, - "kind": { - "description": "Metric aggregation kind. The possible metric aggregation kinds are\n\"Sum\", \"Max\", \"Min\", \"Mean\", \"Set\", \"And\", \"Or\", and \"Distribution\".\nThe specified aggregation kind is case-insensitive.\n\nIf omitted, this is not an aggregated value but instead\na single metric sample value.", - "type": "string" - }, - "scalar": { - "type": "any", - "description": "Worker-computed aggregate value for aggregation kinds \"Sum\", \"Max\", \"Min\",\n\"And\", and \"Or\". The possible value types are Long, Double, and Boolean." - }, - "meanCount": { - "description": "Worker-computed aggregate value for the \"Mean\" aggregation kind.\nThis holds the count of the aggregated values and is used in combination\nwith mean_sum above to obtain the actual mean aggregate value.\nThe only possible value type is Long.", - "type": "any" - }, - "meanSum": { - "description": "Worker-computed aggregate value for the \"Mean\" aggregation kind.\nThis holds the sum of the aggregated values and is used in combination\nwith mean_count below to obtain the actual mean aggregate value.\nThe only possible value types are Long and Double.", - "type": "any" - }, - "updateTime": { - "format": "google-datetime", - "description": "Timestamp associated with the metric value. Optional when workers are\nreporting work progress; it will be filled in responses from the\nmetrics API.", - "type": "string" - }, - "name": { - "$ref": "MetricStructuredName", - "description": "Name of the metric." - } - }, - "id": "MetricUpdate", - "description": "Describes the state of a metric.", - "type": "object" - }, - "CounterStructuredName": { - "description": "Identifies a counter within a per-job namespace. Counters whose structured\nnames are the same get merged into a single value for the job.", - "type": "object", - "properties": { - "componentStepName": { - "description": "Name of the optimized step being executed by the workers.", - "type": "string" - }, - "portion": { - "enum": [ - "ALL", - "KEY", - "VALUE" - ], - "description": "Portion of this counter, either key or value.", - "type": "string", - "enumDescriptions": [ - "Counter portion has not been set.", - "Counter reports a key.", - "Counter reports a value." - ] - }, - "originalStepName": { - "description": "System generated name of the original step in the user's graph, before\noptimization.", - "type": "string" - }, - "workerId": { - "description": "ID of a particular worker.", - "type": "string" - }, - "originNamespace": { - "description": "A string containing a more specific namespace of the counter's origin.", - "type": "string" - }, - "executionStepName": { - "description": "Name of the stage. An execution step contains multiple component steps.", - "type": "string" - }, - "name": { - "description": "Counter name. Not necessarily globally-unique, but unique within the\ncontext of the other fields.\nRequired.", - "type": "string" - }, - "origin": { - "enumDescriptions": [ - "Counter was created by the Dataflow system.", - "Counter was created by the user." - ], - "enum": [ - "SYSTEM", - "USER" - ], - "description": "One of the standard Origins defined above.", - "type": "string" - } - }, - "id": "CounterStructuredName" - }, - "ApproximateProgress": { - "description": "Obsolete in favor of ApproximateReportedProgress and ApproximateSplitRequest.", - "type": "object", - "properties": { - "remainingTime": { - "type": "string", - "format": "google-duration", - "description": "Obsolete." - }, - "position": { - "$ref": "Position", - "description": "Obsolete." - }, - "percentComplete": { - "format": "float", - "description": "Obsolete.", - "type": "number" - } - }, - "id": "ApproximateProgress" - }, - "WorkerMessageResponse": { - "description": "A worker_message response allows the server to pass information to the\nsender.", - "type": "object", - "properties": { - "workerHealthReportResponse": { - "$ref": "WorkerHealthReportResponse", - "description": "The service's response to a worker's health report." - }, - "workerMetricsResponse": { - "$ref": "ResourceUtilizationReportResponse", - "description": "Service's response to reporting worker metrics (currently empty)." - } - }, - "id": "WorkerMessageResponse" - }, - "TemplateMetadata": { - "properties": { - "parameters": { - "description": "The parameters for the template.", - "items": { - "$ref": "ParameterMetadata" - }, - "type": "array" - }, - "name": { - "description": "Required. The name of the template.", - "type": "string" - }, - "description": { - "description": "Optional. A description of the template.", - "type": "string" - } - }, - "id": "TemplateMetadata", - "description": "Metadata describing a template.", - "type": "object" - }, - "WorkerMessage": { - "description": "WorkerMessage provides information to the backend about a worker.", - "type": "object", - "properties": { - "workerMetrics": { - "$ref": "ResourceUtilizationReport", - "description": "Resource metrics reported by workers." - }, - "workerMessageCode": { - "$ref": "WorkerMessageCode", - "description": "A worker message code." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels are used to group WorkerMessages.\nFor example, a worker_message about a particular container\nmight have the labels:\n{ \"JOB_ID\": \"2015-04-22\",\n \"WORKER_ID\": \"wordcount-vm-2015…\"\n \"CONTAINER_TYPE\": \"worker\",\n \"CONTAINER_ID\": \"ac1234def\"}\nLabel tags typically correspond to Label enum values. However, for ease\nof development other strings can be used as tags. LABEL_UNSPECIFIED should\nnot be used here.", - "type": "object" - }, - "time": { - "format": "google-datetime", - "description": "The timestamp of the worker_message.", - "type": "string" - }, - "workerHealthReport": { - "$ref": "WorkerHealthReport", - "description": "The health of a worker." - } - }, - "id": "WorkerMessage" - }, - "JobMetrics": { - "description": "JobMetrics contains a collection of metrics descibing the detailed progress\nof a Dataflow job. Metrics correspond to user-defined and system-defined\nmetrics in the job.\n\nThis resource captures only the most recent values of each metric;\ntime-series data can be queried for them (under the same metric names)\nfrom Cloud Monitoring.", - "type": "object", - "properties": { - "metrics": { - "description": "All metrics for this job.", - "items": { - "$ref": "MetricUpdate" - }, - "type": "array" - }, - "metricTime": { - "format": "google-datetime", - "description": "Timestamp as of which metric values are current.", - "type": "string" - } - }, - "id": "JobMetrics" - }, - "FloatingPointList": { - "description": "A metric value representing a list of floating point numbers.", - "type": "object", - "properties": { - "elements": { - "description": "Elements of the list.", - "items": { - "type": "number", - "format": "double" - }, - "type": "array" - } - }, - "id": "FloatingPointList" - }, - "CounterUpdate": { - "id": "CounterUpdate", - "description": "An update to a Counter sent from a worker.", - "type": "object", - "properties": { - "floatingPointList": { - "$ref": "FloatingPointList", - "description": "List of floating point numbers, for Set." - }, - "integer": { - "$ref": "SplitInt64", - "description": "Integer value for Sum, Max, Min." - }, - "integerList": { - "$ref": "IntegerList", - "description": "List of integers, for Set." - }, - "structuredNameAndMetadata": { - "$ref": "CounterStructuredNameAndMetadata", - "description": "Counter structured name and metadata." - }, - "integerMean": { - "$ref": "IntegerMean", - "description": "Integer mean aggregation value for Mean." - }, - "floatingPoint": { - "format": "double", - "description": "Floating point value for Sum, Max, Min.", - "type": "number" - }, - "cumulative": { - "description": "True if this counter is reported as the total cumulative aggregate\nvalue accumulated since the worker started working on this WorkItem.\nBy default this is false, indicating that this counter is reported\nas a delta.", - "type": "boolean" - }, - "internal": { - "type": "any", - "description": "Value for internally-defined counters used by the Dataflow service." - }, - "floatingPointMean": { - "description": "Floating point mean aggregation value for Mean.", - "$ref": "FloatingPointMean" - }, - "boolean": { - "description": "Boolean value for And, Or.", - "type": "boolean" - }, - "nameAndKind": { - "description": "Counter name and aggregation type.", - "$ref": "NameAndKind" - }, - "distribution": { - "$ref": "DistributionUpdate", - "description": "Distribution data" - }, - "stringList": { - "$ref": "StringList", - "description": "List of strings, for Set." - }, - "shortId": { - "format": "int64", - "description": "The service-generated short identifier for this counter.\nThe short_id -\u003e (name, metadata) mapping is constant for the lifetime of\na job.", - "type": "string" - } - } - }, - "SourceMetadata": { - "description": "Metadata about a Source useful for automatically optimizing\nand tuning the pipeline, etc.", - "type": "object", - "properties": { - "estimatedSizeBytes": { - "format": "int64", - "description": "An estimate of the total size (in bytes) of the data that would be\nread from this source. This estimate is in terms of external storage\nsize, before any decompression or other processing done by the reader.", - "type": "string" - }, - "infinite": { - "description": "Specifies that the size of this source is known to be infinite\n(this is a streaming source).", - "type": "boolean" - }, - "producesSortedKeys": { - "type": "boolean", - "description": "Whether this source is known to produce key/value pairs with\nthe (encoded) keys in lexicographically sorted order." - } - }, - "id": "SourceMetadata" - }, - "DistributionUpdate": { - "description": "A metric value representing a distribution.", - "type": "object", - "properties": { - "max": { - "description": "The maximum value present in the distribution.", - "$ref": "SplitInt64" - }, - "logBuckets": { - "description": "(Optional) Logarithmic histogram of values.\nEach log may be in no more than one bucket. Order does not matter.", - "items": { - "$ref": "LogBucket" - }, - "type": "array" - }, - "count": { - "description": "The count of the number of elements present in the distribution.", - "$ref": "SplitInt64" - }, - "min": { - "$ref": "SplitInt64", - "description": "The minimum value present in the distribution." - }, - "sumOfSquares": { - "format": "double", - "description": "Use a double since the sum of squares is likely to overflow int64.", - "type": "number" - }, - "sum": { - "$ref": "SplitInt64", - "description": "Use an int64 since we'd prefer the added precision. If overflow is a common\nproblem we can detect it and use an additional int64 or a double." - } - }, - "id": "DistributionUpdate" - }, - "WorkerHealthReportResponse": { - "properties": { - "reportInterval": { - "format": "google-duration", - "description": "A positive value indicates the worker should change its reporting interval\nto the specified value.\n\nThe default value of zero means no change in report rate is requested by\nthe server.", - "type": "string" - } - }, - "id": "WorkerHealthReportResponse", - "description": "WorkerHealthReportResponse contains information returned to the worker\nin response to a health ping.", - "type": "object" - }, - "SourceFork": { - "description": "DEPRECATED in favor of DynamicSourceSplit.", - "type": "object", - "properties": { - "primary": { - "description": "DEPRECATED", - "$ref": "SourceSplitShard" - }, - "primarySource": { - "$ref": "DerivedSource", - "description": "DEPRECATED" - }, - "residual": { - "description": "DEPRECATED", - "$ref": "SourceSplitShard" - }, - "residualSource": { - "$ref": "DerivedSource", - "description": "DEPRECATED" - } - }, - "id": "SourceFork" - }, - "WorkItemStatus": { - "description": "Conveys a worker's progress through the work described by a WorkItem.", - "type": "object", - "properties": { - "counterUpdates": { - "description": "Worker output counters for this WorkItem.", - "items": { - "$ref": "CounterUpdate" - }, - "type": "array" - }, - "workItemId": { - "description": "Identifies the WorkItem.", - "type": "string" - }, - "errors": { - "description": "Specifies errors which occurred during processing. If errors are\nprovided, and completed = true, then the WorkItem is considered\nto have failed.", - "items": { - "$ref": "Status" - }, - "type": "array" - }, - "metricUpdates": { - "description": "DEPRECATED in favor of counter_updates.", - "items": { - "$ref": "MetricUpdate" - }, - "type": "array" - }, - "dynamicSourceSplit": { - "description": "See documentation of stop_position.", - "$ref": "DynamicSourceSplit" - }, - "sourceOperationResponse": { - "$ref": "SourceOperationResponse", - "description": "If the work item represented a SourceOperationRequest, and the work\nis completed, contains the result of the operation." - }, - "progress": { - "$ref": "ApproximateProgress", - "description": "DEPRECATED in favor of reported_progress." - }, - "requestedLeaseDuration": { - "format": "google-duration", - "description": "Amount of time the worker requests for its lease.", - "type": "string" - }, - "reportIndex": { - "format": "int64", - "description": "The report index. When a WorkItem is leased, the lease will\ncontain an initial report index. When a WorkItem's status is\nreported to the system, the report should be sent with\nthat report index, and the response will contain the index the\nworker should use for the next report. Reports received with\nunexpected index values will be rejected by the service.\n\nIn order to preserve idempotency, the worker should not alter the\ncontents of a report, even if the worker must submit the same\nreport multiple times before getting back a response. The worker\nshould not submit a subsequent report until the response for the\nprevious report had been received from the service.", - "type": "string" - }, - "stopPosition": { - "description": "A worker may split an active map task in two parts, \"primary\" and\n\"residual\", continuing to process the primary part and returning the\nresidual part into the pool of available work.\nThis event is called a \"dynamic split\" and is critical to the dynamic\nwork rebalancing feature. The two obtained sub-tasks are called\n\"parts\" of the split.\nThe parts, if concatenated, must represent the same input as would\nbe read by the current task if the split did not happen.\nThe exact way in which the original task is decomposed into the two\nparts is specified either as a position demarcating them\n(stop_position), or explicitly as two DerivedSources, if this\ntask consumes a user-defined source type (dynamic_source_split).\n\nThe \"current\" task is adjusted as a result of the split: after a task\nwith range [A, B) sends a stop_position update at C, its range is\nconsidered to be [A, C), e.g.:\n* Progress should be interpreted relative to the new range, e.g.\n \"75% completed\" means \"75% of [A, C) completed\"\n* The worker should interpret proposed_stop_position relative to the\n new range, e.g. \"split at 68%\" should be interpreted as\n \"split at 68% of [A, C)\".\n* If the worker chooses to split again using stop_position, only\n stop_positions in [A, C) will be accepted.\n* Etc.\ndynamic_source_split has similar semantics: e.g., if a task with\nsource S splits using dynamic_source_split into {P, R}\n(where P and R must be together equivalent to S), then subsequent\nprogress and proposed_stop_position should be interpreted relative\nto P, and in a potential subsequent dynamic_source_split into {P', R'},\nP' and R' must be together equivalent to P, etc.", - "$ref": "Position" - }, - "completed": { - "description": "True if the WorkItem was completed (successfully or unsuccessfully).", - "type": "boolean" - }, - "reportedProgress": { - "$ref": "ApproximateReportedProgress", - "description": "The worker's progress through this WorkItem." - }, - "sourceFork": { - "description": "DEPRECATED in favor of dynamic_source_split.", - "$ref": "SourceFork" - } - }, - "id": "WorkItemStatus" - }, - "ComponentSource": { - "properties": { - "userName": { - "description": "Human-readable name for this transform; may be user or system generated.", - "type": "string" - }, - "originalTransformOrCollection": { - "description": "User name for the original user transform or collection with which this\nsource is most closely associated.", - "type": "string" - }, - "name": { - "type": "string", - "description": "Dataflow service generated name for this source." - } - }, - "id": "ComponentSource", - "description": "Description of an interstitial value between transforms in an execution\nstage.", - "type": "object" - }, - "WorkItemServiceState": { - "description": "The Dataflow service's idea of the current state of a WorkItem\nbeing processed by a worker.", - "type": "object", - "properties": { - "suggestedStopPoint": { - "$ref": "ApproximateProgress", - "description": "DEPRECATED in favor of split_request." - }, - "splitRequest": { - "description": "The progress point in the WorkItem where the Dataflow service\nsuggests that the worker truncate the task.", - "$ref": "ApproximateSplitRequest" - }, - "suggestedStopPosition": { - "description": "Obsolete, always empty.", - "$ref": "Position" - }, - "reportStatusInterval": { - "format": "google-duration", - "description": "New recommended reporting interval.", - "type": "string" - }, - "harnessData": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Other data returned by the service, specific to the particular\nworker harness." - }, - "leaseExpireTime": { - "format": "google-datetime", - "description": "Time at which the current lease will expire.", - "type": "string" - }, - "metricShortId": { - "description": "The short ids that workers should use in subsequent metric updates.\nWorkers should strive to use short ids whenever possible, but it is ok\nto request the short_id again if a worker lost track of it\n(e.g. if the worker is recovering from a crash).\nNOTE: it is possible that the response may have short ids for a subset\nof the metrics.", - "items": { - "$ref": "MetricShortId" - }, - "type": "array" - }, - "nextReportIndex": { - "format": "int64", - "description": "The index value to use for the next report sent by the worker.\nNote: If the report call fails for whatever reason, the worker should\nreuse this index for subsequent report attempts.", - "type": "string" - } - }, - "id": "WorkItemServiceState" - }, - "MetricStructuredName": { - "description": "Identifies a metric, by describing the source which generated the\nmetric.", - "type": "object", - "properties": { - "name": { - "description": "Worker-defined metric name.", - "type": "string" - }, - "origin": { - "description": "Origin (namespace) of metric name. May be blank for user-define metrics;\nwill be \"dataflow\" for metrics defined by the Dataflow service or SDK.", - "type": "string" - }, - "context": { - "description": "Zero or more labeled fields which identify the part of the job this\nmetric is associated with, such as the name of a step or collection.\n\nFor example, built-in counters associated with steps will have\ncontext['step'] = \u003cstep-name\u003e. Counters associated with PCollections\nin the SDK will have context['pcollection'] = \u003cpcollection-name\u003e.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "id": "MetricStructuredName" - }, - "SeqMapTaskOutputInfo": { - "description": "Information about an output of a SeqMapTask.", - "type": "object", - "properties": { - "sink": { - "description": "The sink to write the output value to.", - "$ref": "Sink" - }, - "tag": { - "description": "The id of the TupleTag the user code will tag the output value by.", - "type": "string" - } - }, - "id": "SeqMapTaskOutputInfo" - }, - "JobExecutionStageInfo": { - "description": "Contains information about how a particular\ngoogle.dataflow.v1beta3.Step will be executed.", - "type": "object", - "properties": { - "stepName": { - "description": "The steps associated with the execution stage.\nNote that stages may have several steps, and that a given step\nmight be run by more than one stage.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "JobExecutionStageInfo" - }, - "KeyRangeLocation": { - "description": "Location information for a specific key-range of a sharded computation.\nCurrently we only support UTF-8 character splits to simplify encoding into\nJSON.", - "type": "object", - "properties": { - "dataDisk": { - "description": "The name of the data disk where data for this range is stored.\nThis name is local to the Google Cloud Platform project and uniquely\nidentifies the disk within that project, for example\n\"myproject-1014-104817-4c2-harness-0-disk-1\".", - "type": "string" - }, - "start": { - "description": "The start (inclusive) of the key range.", - "type": "string" - }, - "end": { - "description": "The end (exclusive) of the key range.", - "type": "string" - }, - "deprecatedPersistentDirectory": { - "description": "DEPRECATED. The location of the persistent state for this range, as a\npersistent directory in the worker local filesystem.", - "type": "string" - }, - "deliveryEndpoint": { - "description": "The physical location of this range assignment to be used for\nstreaming computation cross-worker message delivery.", - "type": "string" - } - }, - "id": "KeyRangeLocation" - }, - "SourceGetMetadataRequest": { - "description": "A request to compute the SourceMetadata of a Source.", - "type": "object", - "properties": { - "source": { - "description": "Specification of the source whose metadata should be computed.", - "$ref": "Source" - } - }, - "id": "SourceGetMetadataRequest" - }, - "SeqMapTask": { - "properties": { - "name": { - "description": "The user-provided name of the SeqDo operation.", - "type": "string" - }, - "outputInfos": { - "items": { - "$ref": "SeqMapTaskOutputInfo" - }, "type": "array", - "description": "Information about each of the outputs." + "description": "If outcome is SPLITTING_HAPPENED, then this is a list of bundles\ninto which the source was split. Otherwise this field is ignored.\nThis list can be empty, which means the source represents an empty input." }, - "inputs": { - "description": "Information about each of the inputs.", + "shards": { + "description": "DEPRECATED in favor of bundles.", "items": { - "$ref": "SideInputInfo" + "$ref": "SourceSplitShard" }, "type": "array" - }, - "systemName": { - "description": "System-defined name of the SeqDo operation.\nUnique across the workflow.", - "type": "string" - }, - "stageName": { - "description": "System-defined name of the stage containing the SeqDo operation.\nUnique across the workflow.", - "type": "string" - }, - "userFn": { - "description": "The user function to invoke.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - } } }, - "id": "SeqMapTask", - "description": "Describes a particular function to invoke.", - "type": "object" - }, - "NameAndKind": { - "description": "Basic metadata about a counter.", - "type": "object", - "properties": { - "name": { - "description": "Name of the counter.", - "type": "string" - }, - "kind": { - "enumDescriptions": [ - "Counter aggregation kind was not set.", - "Aggregated value is the sum of all contributed values.", - "Aggregated value is the max of all contributed values.", - "Aggregated value is the min of all contributed values.", - "Aggregated value is the mean of all contributed values.", - "Aggregated value represents the logical 'or' of all contributed values.", - "Aggregated value represents the logical 'and' of all contributed values.", - "Aggregated value is a set of unique contributed values.", - "Aggregated value captures statistics about a distribution." - ], - "enum": [ - "INVALID", - "SUM", - "MAX", - "MIN", - "MEAN", - "OR", - "AND", - "SET", - "DISTRIBUTION" - ], - "description": "Counter aggregation kind.", - "type": "string" - } - }, - "id": "NameAndKind" + "id": "SourceSplitResponse" } - }, - "protocol": "rest", - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" } } 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 5e1ef665e..a472f8344 100644 --- a/vendor/google.golang.org/api/dataflow/v1b3/dataflow-gen.go +++ b/vendor/google.golang.org/api/dataflow/v1b3/dataflow-gen.go @@ -837,6 +837,10 @@ type CounterStructuredName struct { // counter's origin. OriginNamespace string `json:"originNamespace,omitempty"` + // OriginalShuffleStepName: The GroupByKey step name from the original + // graph. + OriginalShuffleStepName string `json:"originalShuffleStepName,omitempty"` + // OriginalStepName: System generated name of the original step in the // user's graph, before // optimization. @@ -850,6 +854,15 @@ type CounterStructuredName struct { // "VALUE" - Counter reports a value. Portion string `json:"portion,omitempty"` + // SideInput: ID of a side input being read from/written to. Side inputs + // are identified + // by a pair of (reader, input_index). The reader is usually equal to + // the + // original name, but it may be different, if a ParDo emits it's + // Iterator / + // Map side input object. + SideInput *SideInputId `json:"sideInput,omitempty"` + // WorkerId: ID of a particular worker. WorkerId string `json:"workerId,omitempty"` @@ -4176,6 +4189,40 @@ func (s *ShellTask) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SideInputId: Uniquely identifies a side input. +type SideInputId struct { + // DeclaringStepName: The step that receives and usually consumes this + // side input. + DeclaringStepName string `json:"declaringStepName,omitempty"` + + // InputIndex: The index of the side input, from the list of + // non_parallel_inputs. + InputIndex int64 `json:"inputIndex,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeclaringStepName") + // 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. "DeclaringStepName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SideInputId) MarshalJSON() ([]byte, error) { + type noMethod SideInputId + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SideInputInfo: Information about a side input of a DoFn or an input // of a SeqDoFn. type SideInputInfo struct { @@ -6057,6 +6104,9 @@ type WorkerMessage struct { // WorkerMetrics: Resource metrics reported by workers. WorkerMetrics *ResourceUtilizationReport `json:"workerMetrics,omitempty"` + // WorkerShutdownNotice: Shutdown notice by workers. + WorkerShutdownNotice *WorkerShutdownNotice `json:"workerShutdownNotice,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, @@ -6177,6 +6227,10 @@ type WorkerMessageResponse struct { // (currently empty). WorkerMetricsResponse *ResourceUtilizationReportResponse `json:"workerMetricsResponse,omitempty"` + // WorkerShutdownNoticeResponse: Service's response to shutdown notice + // (currently empty). + WorkerShutdownNoticeResponse *WorkerShutdownNoticeResponse `json:"workerShutdownNoticeResponse,omitempty"` + // ForceSendFields is a list of field names (e.g. // "WorkerHealthReportResponse") to unconditionally include in API // requests. By default, fields with empty values are omitted from API @@ -6450,6 +6504,46 @@ func (s *WorkerSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// WorkerShutdownNotice: Shutdown notification from workers. This is to +// be sent by the shutdown +// script of the worker VM so that the backend knows that the VM is +// being +// shut down. +type WorkerShutdownNotice struct { + // Reason: Optional reason to be attached for the shutdown notice. + // For example: "PREEMPTION" would indicate the VM is being shut down + // because + // of preemption. Other possible reasons may be added in the future. + Reason string `json:"reason,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Reason") 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. "Reason") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkerShutdownNotice) MarshalJSON() ([]byte, error) { + type noMethod WorkerShutdownNotice + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkerShutdownNoticeResponse: Service-side response to WorkerMessage +// issuing shutdown notice. +type WorkerShutdownNoticeResponse struct { +} + // WriteInstruction: An instruction that writes records. // Takes one input, produces no outputs. type WriteInstruction struct { 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 5e69b6e63..2bd7cd790 100644 --- a/vendor/google.golang.org/api/dataproc/v1/dataproc-api.json +++ b/vendor/google.golang.org/api/dataproc/v1/dataproc-api.json @@ -1,9 +1,268 @@ { + "basePath": "", + "ownerDomain": "google.com", + "name": "dataproc", + "batchPath": "batch", + "revision": "20170822", + "documentationLink": "https://cloud.google.com/dataproc/", + "id": "dataproc:v1", + "title": "Google Cloud Dataproc API", + "ownerName": "Google", + "discoveryVersion": "v1", "resources": { "projects": { "resources": { "regions": { "resources": { + "clusters": { + "methods": { + "get": { + "description": "Gets the resource representation for a cluster in a project.", + "httpMethod": "GET", + "response": { + "$ref": "Cluster" + }, + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "parameters": { + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true + }, + "clusterName": { + "location": "path", + "description": "Required. The cluster name.", + "type": "string", + "required": true + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "id": "dataproc.projects.regions.clusters.get" + }, + "patch": { + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "id": "dataproc.projects.regions.clusters.patch", + "description": "Updates a cluster in a project.", + "request": { + "$ref": "Cluster" + }, + "httpMethod": "PATCH", + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to.", + "type": "string", + "required": true + }, + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Required. Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as config.worker_config.num_instances, and the PATCH request body would specify the new value, as follows:\n{\n \"config\":{\n \"workerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\nSimilarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be config.secondary_worker_config.num_instances, and the PATCH request body would be set as follows:\n{\n \"config\":{\n \"secondaryWorkerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\n\u003cstrong\u003eNote:\u003c/strong\u003e Currently, only the following fields can be updated:\u003ctable\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003eMask\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003e\u003cstrong\u003ePurpose\u003c/strong\u003e\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003e\u003cem\u003elabels\u003c/em\u003e\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003eUpdate labels\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003e\u003cem\u003econfig.worker_config.num_instances\u003c/em\u003e\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003eResize primary worker group\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003e\u003cem\u003econfig.secondary_worker_config.num_instances\u003c/em\u003e\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003eResize secondary worker group\u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/table\u003e", + "type": "string" + }, + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterName": { + "description": "Required. The cluster name.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "diagnose": { + "description": "Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation.", + "request": { + "$ref": "DiagnoseClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterName": { + "description": "Required. The cluster name.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose", + "id": "dataproc.projects.regions.clusters.diagnose", + "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose" + }, + "delete": { + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "id": "dataproc.projects.regions.clusters.delete", + "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "description": "Deletes a cluster in a project.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterName": { + "location": "path", + "description": "Required. The cluster name.", + "type": "string", + "required": true + } + } + }, + "list": { + "description": "Lists all regions/{region}/clusters in a project.", + "response": { + "$ref": "ListClustersResponse" + }, + "parameterOrder": [ + "projectId", + "region" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageSize": { + "format": "int32", + "description": "Optional. The standard List page size.", + "type": "integer", + "location": "query" + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "type": "string", + "required": true + }, + "filter": { + "location": "query", + "description": "Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *", + "type": "string" + }, + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true + }, + "pageToken": { + "location": "query", + "description": "Optional. The standard List page token.", + "type": "string" + } + }, + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters", + "id": "dataproc.projects.regions.clusters.list", + "path": "v1/projects/{projectId}/regions/{region}/clusters" + }, + "create": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "region" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters", + "id": "dataproc.projects.regions.clusters.create", + "path": "v1/projects/{projectId}/regions/{region}/clusters", + "request": { + "$ref": "Cluster" + }, + "description": "Creates a cluster in a project." + } + } + }, "operations": { "methods": { "cancel": { @@ -19,11 +278,11 @@ ], "parameters": { "name": { + "location": "path", "description": "The name of the operation resource to be cancelled.", "type": "string", "required": true, - "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", - "location": "path" + "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$" } }, "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:cancel", @@ -39,13 +298,10 @@ "response": { "$ref": "Empty" }, - "httpMethod": "DELETE", "parameterOrder": [ "name" ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], + "httpMethod": "DELETE", "parameters": { "name": { "location": "path", @@ -54,17 +310,19 @@ "required": true, "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$" } - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "httpMethod": "GET", "response": { "$ref": "Operation" }, "parameterOrder": [ "name" ], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], @@ -78,30 +336,19 @@ } }, "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}", + "id": "dataproc.projects.regions.operations.get", "path": "v1/{+name}", - "id": "dataproc.projects.regions.operations.get" + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." }, "list": { + "httpMethod": "GET", "response": { "$ref": "ListOperationsResponse" }, "parameterOrder": [ "name" ], - "httpMethod": "GET", "parameters": { - "pageToken": { - "location": "query", - "description": "The standard list page token.", - "type": "string" - }, - "name": { - "pattern": "^projects/[^/]+/regions/[^/]+/operations$", - "location": "path", - "description": "The name of the operation's parent resource.", - "type": "string", - "required": true - }, "pageSize": { "format": "int32", "description": "The standard list page size.", @@ -109,17 +356,29 @@ "location": "query" }, "filter": { + "location": "query", "description": "The standard list filter.", + "type": "string" + }, + "pageToken": { + "description": "The standard list page token.", "type": "string", "location": "query" + }, + "name": { + "location": "path", + "description": "The name of the operation's parent resource.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/operations$" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations", - "id": "dataproc.projects.regions.operations.list", "path": "v1/{+name}", + "id": "dataproc.projects.regions.operations.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." } } @@ -141,22 +400,22 @@ ], "parameters": { "jobId": { - "location": "path", "description": "Required. The job ID.", "type": "string", - "required": true + "required": true, + "location": "path" }, "projectId": { - "location": "path", "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", "type": "string", - "required": true + "required": true, + "location": "path" }, "updateMask": { + "location": "query", "format": "google-fieldmask", "description": "Required. Specifies the path, relative to \u003ccode\u003eJob\u003c/code\u003e, of the field to update. For example, to update the labels of a Job the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003elabels\u003c/code\u003e, and the PATCH request body would specify the new value. \u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003elabels\u003c/code\u003e is the only field that can be updated.", - "type": "string", - "location": "query" + "type": "string" }, "region": { "description": "Required. The Cloud Dataproc region in which to handle the request.", @@ -174,24 +433,25 @@ "description": "Updates a job in a project." }, "get": { + "description": "Gets the resource representation for a job in a project.", "httpMethod": "GET", + "response": { + "$ref": "Job" + }, "parameterOrder": [ "projectId", "region", "jobId" ], - "response": { - "$ref": "Job" - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", "type": "string", "required": true, - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request." + "location": "path" }, "jobId": { "description": "Required. The job ID.", @@ -208,14 +468,9 @@ }, "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "id": "dataproc.projects.regions.jobs.get", - "description": "Gets the resource representation for a job in a project." + "id": "dataproc.projects.regions.jobs.get" }, "submit": { - "description": "Submits a job to a cluster.", - "request": { - "$ref": "SubmitJobRequest" - }, "response": { "$ref": "Job" }, @@ -224,26 +479,30 @@ "region" ], "httpMethod": "POST", - "parameters": { - "region": { - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string", - "required": true, - "location": "path" - } - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], + "parameters": { + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string", + "required": true + } + }, "flatPath": "v1/projects/{projectId}/regions/{region}/jobs:submit", "id": "dataproc.projects.regions.jobs.submit", - "path": "v1/projects/{projectId}/regions/{region}/jobs:submit" + "path": "v1/projects/{projectId}/regions/{region}/jobs:submit", + "request": { + "$ref": "SubmitJobRequest" + }, + "description": "Submits a job to a cluster." }, "delete": { "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.", @@ -256,54 +515,52 @@ "response": { "$ref": "Empty" }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { - "jobId": { - "description": "Required. The job ID.", + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", "type": "string", "required": true, "location": "path" }, + "jobId": { + "location": "path", + "description": "Required. The job ID.", + "type": "string", + "required": true + }, "projectId": { "location": "path", "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", "type": "string", "required": true - }, - "region": { - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true, - "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", "id": "dataproc.projects.regions.jobs.delete" }, "list": { + "description": "Lists regions/{region}/jobs in a project.", + "parameterOrder": [ + "projectId", + "region" + ], + "response": { + "$ref": "ListJobsResponse" + }, + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { - "region": { - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterName": { - "location": "query", - "description": "Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.", - "type": "string" - }, "projectId": { + "location": "path", "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", "type": "string", - "required": true, - "location": "path" + "required": true }, "filter": { "description": "Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or INACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = *", @@ -311,64 +568,60 @@ "location": "query" }, "jobStateMatcher": { - "type": "string", "location": "query", "enum": [ "ALL", "ACTIVE", "NON_ACTIVE" ], - "description": "Optional. Specifies enumerated categories of jobs to list (default = match ALL jobs)." + "description": "Optional. Specifies enumerated categories of jobs to list (default = match ALL jobs).", + "type": "string" }, "pageToken": { + "location": "query", "description": "Optional. The page token, returned by a previous call, to request the next page of results.", - "type": "string", - "location": "query" + "type": "string" }, "pageSize": { "format": "int32", "description": "Optional. The number of results to return in each response.", "type": "integer", "location": "query" + }, + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true + }, + "clusterName": { + "location": "query", + "description": "Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.", + "type": "string" } }, "flatPath": "v1/projects/{projectId}/regions/{region}/jobs", - "path": "v1/projects/{projectId}/regions/{region}/jobs", "id": "dataproc.projects.regions.jobs.list", - "description": "Lists regions/{region}/jobs in a project.", - "httpMethod": "GET", - "response": { - "$ref": "ListJobsResponse" - }, - "parameterOrder": [ - "projectId", - "region" - ] + "path": "v1/projects/{projectId}/regions/{region}/jobs" }, "cancel": { - "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", - "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", - "id": "dataproc.projects.regions.jobs.cancel", - "description": "Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get.", "request": { "$ref": "CancelJobRequest" }, - "httpMethod": "POST", + "description": "Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get.", + "response": { + "$ref": "Job" + }, "parameterOrder": [ "projectId", "region", "jobId" ], - "response": { - "$ref": "Job" - }, + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { - "region": { - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true, - "location": "path" - }, "jobId": { "location": "path", "description": "Required. The job ID.", @@ -376,33 +629,8 @@ "required": true }, "projectId": { - "type": "string", - "required": true, "location": "path", - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "clusters": { - "methods": { - "create": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "region" - ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "location": "path", - "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", "type": "string", "required": true }, @@ -413,227 +641,9 @@ "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/regions/{region}/clusters", - "id": "dataproc.projects.regions.clusters.create", - "path": "v1/projects/{projectId}/regions/{region}/clusters", - "description": "Creates a cluster in a project.", - "request": { - "$ref": "Cluster" - } - }, - "patch": { - "httpMethod": "PATCH", - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to.", - "type": "string", - "required": true, - "location": "path" - }, - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Required. Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as config.worker_config.num_instances, and the PATCH request body would specify the new value, as follows:\n{\n \"config\":{\n \"workerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\nSimilarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be config.secondary_worker_config.num_instances, and the PATCH request body would be set as follows:\n{\n \"config\":{\n \"secondaryWorkerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\n\u003cstrong\u003eNote:\u003c/strong\u003e Currently, only the following fields can be updated:\u003ctable\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003eMask\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003e\u003cstrong\u003ePurpose\u003c/strong\u003e\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003e\u003cem\u003elabels\u003c/em\u003e\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003eUpdate labels\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003e\u003cem\u003econfig.worker_config.num_instances\u003c/em\u003e\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003eResize primary worker group\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003e\u003cem\u003econfig.secondary_worker_config.num_instances\u003c/em\u003e\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003eResize secondary worker group\u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/table\u003e", - "type": "string" - }, - "region": { - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true - }, - "clusterName": { - "location": "path", - "description": "Required. The cluster name.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "id": "dataproc.projects.regions.clusters.patch", - "description": "Updates a cluster in a project.", - "request": { - "$ref": "Cluster" - } - }, - "get": { - "httpMethod": "GET", - "response": { - "$ref": "Cluster" - }, - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "clusterName": { - "description": "Required. The cluster name.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", - "type": "string", - "required": true - }, - "region": { - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "id": "dataproc.projects.regions.clusters.get", - "description": "Gets the resource representation for a cluster in a project." - }, - "diagnose": { - "request": { - "$ref": "DiagnoseClusterRequest" - }, - "description": "Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "clusterName": { - "type": "string", - "required": true, - "location": "path", - "description": "Required. The cluster name." - }, - "projectId": { - "location": "path", - "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", - "type": "string", - "required": true - }, - "region": { - "type": "string", - "required": true, - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request." - } - }, - "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose", - "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose", - "id": "dataproc.projects.regions.clusters.diagnose" - }, - "delete": { - "id": "dataproc.projects.regions.clusters.delete", - "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "description": "Deletes a cluster in a project.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "region": { - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterName": { - "location": "path", - "description": "Required. The cluster name.", - "type": "string", - "required": true - }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}" - }, - "list": { - "response": { - "$ref": "ListClustersResponse" - }, - "parameterOrder": [ - "projectId", - "region" - ], - "httpMethod": "GET", - "parameters": { - "filter": { - "location": "query", - "description": "Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *", - "type": "string" - }, - "region": { - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true - }, - "pageToken": { - "location": "query", - "description": "Optional. The standard List page token.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional. The standard List page size.", - "type": "integer" - }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/regions/{region}/clusters", - "id": "dataproc.projects.regions.clusters.list", - "path": "v1/projects/{projectId}/regions/{region}/clusters", - "description": "Lists all regions/{region}/clusters in a project." + "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", + "id": "dataproc.projects.regions.jobs.cancel", + "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel" } } } @@ -643,15 +653,36 @@ } }, "parameters": { + "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.", + "type": "string", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, "oauth_token": { "description": "OAuth 2.0 token for the current user.", "type": "string", "location": "query" }, "bearer_token": { - "type": "string", "location": "query", - "description": "OAuth bearer token." + "description": "OAuth bearer token.", + "type": "string" }, "upload_protocol": { "location": "query", @@ -664,20 +695,20 @@ "default": "true", "type": "boolean" }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, "uploadType": { "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, "callback": { + "location": "query", "description": "JSONP", - "type": "string", - "location": "query" + "type": "string" }, "$.xgafv": { "enumDescriptions": [ @@ -693,6 +724,8 @@ "type": "string" }, "alt": { + "description": "Data format for response.", + "default": "json", "enum": [ "json", "media", @@ -704,397 +737,10 @@ "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], - "location": "query", - "description": "Data format for response.", - "default": "json" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "key": { - "location": "query", - "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.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" + "location": "query" } }, "schemas": { - "DiskConfig": { - "properties": { - "numLocalSsds": { - "format": "int32", - "description": "Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.", - "type": "integer" - }, - "bootDiskSizeGb": { - "format": "int32", - "description": "Optional. Size in GB of the boot disk (default is 500GB).", - "type": "integer" - } - }, - "id": "DiskConfig", - "description": "Specifies the config of disk options for a group of VM instances.", - "type": "object" - }, - "ClusterOperationMetadata": { - "type": "object", - "properties": { - "operationType": { - "type": "string", - "description": "Output-only. The operation type." - }, - "description": { - "description": "Output-only. Short description of operation.", - "type": "string" - }, - "warnings": { - "description": "Output-only. Errors encountered during operation execution.", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Output-only. Labels associated with the operation", - "type": "object" - }, - "status": { - "description": "Output-only. Current operation status.", - "$ref": "ClusterOperationStatus" - }, - "statusHistory": { - "description": "Output-only. The previous operation status.", - "items": { - "$ref": "ClusterOperationStatus" - }, - "type": "array" - }, - "clusterName": { - "description": "Output-only. Name of the cluster for the operation.", - "type": "string" - }, - "clusterUuid": { - "description": "Output-only. Cluster UUID for the operation.", - "type": "string" - } - }, - "id": "ClusterOperationMetadata", - "description": "Metadata describing the operation." - }, - "HiveJob": { - "properties": { - "jarFileUris": { - "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "scriptVariables": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=\"value\";).", - "type": "object" - }, - "properties": { - "description": "Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "continueOnFailure": { - "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", - "type": "boolean" - }, - "queryFileUri": { - "type": "string", - "description": "The HCFS URI of the script that contains Hive queries." - }, - "queryList": { - "description": "A list of queries.", - "$ref": "QueryList" - } - }, - "id": "HiveJob", - "description": "A Cloud Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN.", - "type": "object" - }, - "Empty": { - "type": "object", - "properties": {}, - "id": "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 {}." - }, - "DiagnoseClusterResults": { - "description": "The location of diagnostic output.", - "type": "object", - "properties": { - "outputUri": { - "description": "Output-only. The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics.", - "type": "string" - } - }, - "id": "DiagnoseClusterResults" - }, - "ClusterConfig": { - "description": "The cluster config.", - "type": "object", - "properties": { - "gceClusterConfig": { - "$ref": "GceClusterConfig", - "description": "Required. The shared Google Compute Engine config settings for all instances in a cluster." - }, - "softwareConfig": { - "description": "Optional. The config settings for software inside the cluster.", - "$ref": "SoftwareConfig" - }, - "masterConfig": { - "$ref": "InstanceGroupConfig", - "description": "Optional. The Google Compute Engine config settings for the master instance in a cluster." - }, - "secondaryWorkerConfig": { - "$ref": "InstanceGroupConfig", - "description": "Optional. The Google Compute Engine config settings for additional worker instances in a cluster." - }, - "initializationActions": { - "description": "Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):\nROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)\nif [[ \"${ROLE}\" == 'Master' ]]; then\n ... master specific actions ...\nelse\n ... worker specific actions ...\nfi\n", - "items": { - "$ref": "NodeInitializationAction" - }, - "type": "array" - }, - "configBucket": { - "description": "Optional. A Google 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" - }, - "workerConfig": { - "$ref": "InstanceGroupConfig", - "description": "Optional. The Google Compute Engine config settings for worker instances in a cluster." - } - }, - "id": "ClusterConfig" - }, - "PySparkJob": { - "type": "object", - "properties": { - "archiveUris": { - "description": "Optional. HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip.", - "items": { - "type": "string" - }, - "type": "array" - }, - "jarFileUris": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks." - }, - "loggingConfig": { - "description": "Optional. The runtime log config for job execution.", - "$ref": "LoggingConfig" - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", - "type": "object" - }, - "args": { - "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "items": { - "type": "string" - }, - "type": "array" - }, - "fileUris": { - "description": "Optional. HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks.", - "items": { - "type": "string" - }, - "type": "array" - }, - "pythonFileUris": { - "description": "Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.", - "items": { - "type": "string" - }, - "type": "array" - }, - "mainPythonFileUri": { - "description": "Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file.", - "type": "string" - } - }, - "id": "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." - }, - "GceClusterConfig": { - "description": "Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", - "type": "object", - "properties": { - "tags": { - "description": "The Google Compute Engine tags to add to all instances (see Tagging instances).", - "items": { - "type": "string" - }, - "type": "array" - }, - "serviceAccount": { - "description": "Optional. The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com", - "type": "string" - }, - "subnetworkUri": { - "description": "Optional. The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0\nprojects/[project_id]/regions/us-east1/sub0\nsub0", - "type": "string" - }, - "networkUri": { - "type": "string", - "description": "Optional. The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default\nprojects/[project_id]/regions/global/default\ndefault" - }, - "zoneUri": { - "description": "Optional. The zone where the Google Compute Engine cluster will be located. On a create request, it is required in the \"global\" region. If omitted in a non-global Cloud Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]\nprojects/[project_id]/zones/[zone]\nus-central1-f", - "type": "string" - }, - "metadata": { - "description": "The Google Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "internalIpOnly": { - "description": "Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.", - "type": "boolean" - }, - "serviceAccountScopes": { - "description": "Optional. The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included:\nhttps://www.googleapis.com/auth/cloud.useraccounts.readonly\nhttps://www.googleapis.com/auth/devstorage.read_write\nhttps://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided:\nhttps://www.googleapis.com/auth/bigquery\nhttps://www.googleapis.com/auth/bigtable.admin.table\nhttps://www.googleapis.com/auth/bigtable.data\nhttps://www.googleapis.com/auth/devstorage.full_control", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "GceClusterConfig" - }, - "AcceleratorConfig": { - "properties": { - "acceleratorCount": { - "format": "int32", - "description": "The number of the accelerator cards of this type exposed to this instance.", - "type": "integer" - }, - "acceleratorTypeUri": { - "description": "Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)Examples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80", - "type": "string" - } - }, - "id": "AcceleratorConfig", - "description": "Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine).", - "type": "object" - }, - "ClusterMetrics": { - "type": "object", - "properties": { - "hdfsMetrics": { - "additionalProperties": { - "type": "string", - "format": "int64" - }, - "description": "The HDFS metrics.", - "type": "object" - }, - "yarnMetrics": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "The YARN metrics.", - "type": "object" - } - }, - "id": "ClusterMetrics", - "description": "Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release." - }, - "LoggingConfig": { - "properties": { - "driverLogLevels": { - "additionalProperties": { - "enum": [ - "LEVEL_UNSPECIFIED", - "ALL", - "TRACE", - "DEBUG", - "INFO", - "WARN", - "ERROR", - "FATAL", - "OFF" - ], - "type": "string" - }, - "description": "The per-package log levels for the driver. This may include \"root\" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'", - "type": "object" - } - }, - "id": "LoggingConfig", - "description": "The runtime logging config of the job.", - "type": "object" - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a network API call.", - "type": "object", - "properties": { - "response": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse." - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", - "type": "string" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object" - }, - "done": { - "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", - "type": "boolean" - } - }, - "id": "Operation" - }, "JobReference": { "description": "Encapsulates the full scoping used to reference a job.", "type": "object", @@ -1115,8 +761,8 @@ "type": "object", "properties": { "job": { - "description": "Required. The job resource.", - "$ref": "Job" + "$ref": "Job", + "description": "Required. The job resource." } }, "id": "SubmitJobRequest" @@ -1125,75 +771,29 @@ "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.", "type": "object", "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - }, "code": { - "type": "integer", "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code." + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" }, "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" + }, + "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" } }, "id": "Status" }, - "InstanceGroupConfig": { - "description": "Optional. The config settings for Google Compute Engine resources in an instance group, such as a master or worker group.", - "type": "object", - "properties": { - "diskConfig": { - "$ref": "DiskConfig", - "description": "Optional. Disk option config settings." - }, - "managedGroupConfig": { - "$ref": "ManagedGroupConfig", - "description": "Output-only. The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups." - }, - "isPreemptible": { - "description": "Optional. Specifies that this instance group contains preemptible instances.", - "type": "boolean" - }, - "imageUri": { - "type": "string", - "description": "Output-only. The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version." - }, - "machineTypeUri": { - "description": "Optional. The Google Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nprojects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nn1-standard-2", - "type": "string" - }, - "instanceNames": { - "description": "Optional. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).", - "items": { - "type": "string" - }, - "type": "array" - }, - "accelerators": { - "description": "Optional. The Google Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "numInstances": { - "format": "int32", - "description": "Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.", - "type": "integer" - } - }, - "id": "InstanceGroupConfig" - }, "JobScheduling": { "description": "Job scheduling options.Beta Feature: These options are available for testing purposes only. They may be changed before final release.", "type": "object", @@ -1206,29 +806,59 @@ }, "id": "JobScheduling" }, - "NodeInitializationAction": { - "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion.", + "InstanceGroupConfig": { + "description": "Optional. The config settings for Google Compute Engine resources in an instance group, such as a master or worker group.", "type": "object", "properties": { - "executionTimeout": { - "format": "google-duration", - "description": "Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.", + "accelerators": { + "description": "Optional. The Google Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release.", + "items": { + "$ref": "AcceleratorConfig" + }, + "type": "array" + }, + "numInstances": { + "format": "int32", + "description": "Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.", + "type": "integer" + }, + "diskConfig": { + "$ref": "DiskConfig", + "description": "Optional. Disk option config settings." + }, + "machineTypeUri": { + "description": "Optional. The Google Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nprojects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nn1-standard-2", "type": "string" }, - "executableFile": { - "description": "Required. Google Cloud Storage URI of executable file.", + "imageUri": { + "description": "Output-only. The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version.", "type": "string" + }, + "isPreemptible": { + "description": "Optional. Specifies that this instance group contains preemptible instances.", + "type": "boolean" + }, + "managedGroupConfig": { + "$ref": "ManagedGroupConfig", + "description": "Output-only. The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups." + }, + "instanceNames": { + "description": "Optional. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).", + "items": { + "type": "string" + }, + "type": "array" } }, - "id": "NodeInitializationAction" + "id": "InstanceGroupConfig" }, "ListJobsResponse": { "description": "A list of jobs in a project.", "type": "object", "properties": { "nextPageToken": { - "type": "string", - "description": "Optional. 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\u003eListJobsRequest\u003c/code\u003e." + "description": "Optional. 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\u003eListJobsRequest\u003c/code\u003e.", + "type": "string" }, "jobs": { "description": "Output-only. Jobs list.", @@ -1240,6 +870,22 @@ }, "id": "ListJobsResponse" }, + "NodeInitializationAction": { + "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion.", + "type": "object", + "properties": { + "executableFile": { + "description": "Required. Google Cloud Storage URI of executable file.", + "type": "string" + }, + "executionTimeout": { + "format": "google-duration", + "description": "Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.", + "type": "string" + } + }, + "id": "NodeInitializationAction" + }, "CancelJobRequest": { "description": "A request to cancel a job.", "type": "object", @@ -1250,14 +896,6 @@ "description": "A Cloud Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries.", "type": "object", "properties": { - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "queryFileUri": { - "type": "string", - "description": "The HCFS URI of the script that contains SQL queries." - }, "scriptVariables": { "additionalProperties": { "type": "string" @@ -1277,11 +915,19 @@ "$ref": "LoggingConfig" }, "properties": { + "description": "Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.", + "type": "object", "additionalProperties": { "type": "string" - }, - "description": "Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.", - "type": "object" + } + }, + "queryList": { + "description": "A list of queries.", + "$ref": "QueryList" + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains SQL queries.", + "type": "string" } }, "id": "SparkSqlJob" @@ -1291,20 +937,20 @@ "type": "object", "properties": { "labels": { - "description": "Optional. The labels to associate with this cluster. 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 cluster.", - "type": "object", "additionalProperties": { "type": "string" - } - }, - "metrics": { - "$ref": "ClusterMetrics", - "description": "Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release." + }, + "description": "Optional. The labels to associate with this cluster. 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 cluster.", + "type": "object" }, "status": { "description": "Output-only. Cluster status.", "$ref": "ClusterStatus" }, + "metrics": { + "$ref": "ClusterMetrics", + "description": "Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release." + }, "statusHistory": { "description": "Output-only. The previous cluster status.", "items": { @@ -1316,14 +962,14 @@ "$ref": "ClusterConfig", "description": "Required. The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated." }, + "clusterName": { + "description": "Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.", + "type": "string" + }, "clusterUuid": { "description": "Output-only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.", "type": "string" }, - "clusterName": { - "type": "string", - "description": "Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused." - }, "projectId": { "description": "Required. The Google Cloud Platform project ID that the cluster belongs to.", "type": "string" @@ -1335,20 +981,38 @@ "description": "The response message for Operations.ListOperations.", "type": "object", "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, "operations": { "description": "A list of operations that matches the specified filter in the request.", "items": { "$ref": "Operation" }, "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" } }, "id": "ListOperationsResponse" }, + "SoftwareConfig": { + "description": "Specifies the selection and config of software inside the cluster.", + "type": "object", + "properties": { + "properties": { + "description": "Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, such as core:fs.defaultFS. The following are supported prefixes and their mappings:\ncapacity-scheduler: capacity-scheduler.xml\ncore: core-site.xml\ndistcp: distcp-default.xml\nhdfs: hdfs-site.xml\nhive: hive-site.xml\nmapred: mapred-site.xml\npig: pig.properties\nspark: spark-defaults.conf\nyarn: yarn-site.xmlFor more information, see Cluster properties.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "imageVersion": { + "description": "Optional. The version of software inside the cluster. It must match the regular expression [0-9]+\\.[0-9]+. If unspecified, it defaults to the latest version (see Cloud Dataproc Versioning).", + "type": "string" + } + }, + "id": "SoftwareConfig" + }, "JobPlacement": { "description": "Cloud Dataproc job config.", "type": "object", @@ -1364,67 +1028,49 @@ }, "id": "JobPlacement" }, - "SoftwareConfig": { - "id": "SoftwareConfig", - "description": "Specifies the selection and config of software inside the cluster.", + "PigJob": { + "description": "A Cloud Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN.", "type": "object", "properties": { - "imageVersion": { - "description": "Optional. The version of software inside the cluster. It must match the regular expression [0-9]+\\.[0-9]+. If unspecified, it defaults to the latest version (see Cloud Dataproc Versioning).", - "type": "string" + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "scriptVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).", + "type": "object" + }, + "loggingConfig": { + "description": "Optional. The runtime log config for job execution.", + "$ref": "LoggingConfig" }, "properties": { - "description": "Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, such as core:fs.defaultFS. The following are supported prefixes and their mappings:\ncapacity-scheduler: capacity-scheduler.xml\ncore: core-site.xml\ndistcp: distcp-default.xml\nhdfs: hdfs-site.xml\nhive: hive-site.xml\nmapred: mapred-site.xml\npig: pig.properties\nspark: spark-defaults.conf\nyarn: yarn-site.xml", + "description": "Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", "type": "object", "additionalProperties": { "type": "string" } - } - } - }, - "PigJob": { - "type": "object", - "properties": { + }, "continueOnFailure": { "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", "type": "boolean" }, + "queryList": { + "description": "A list of queries.", + "$ref": "QueryList" + }, "queryFileUri": { "description": "The HCFS URI of the script that contains the Pig queries.", "type": "string" - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "jarFileUris": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs." - }, - "scriptVariables": { - "description": "Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "loggingConfig": { - "$ref": "LoggingConfig", - "description": "Optional. The runtime log config for job execution." - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", - "type": "object" } }, - "id": "PigJob", - "description": "A Cloud Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN." + "id": "PigJob" }, "ClusterStatus": { "description": "The status of a cluster and its instances.", @@ -1477,6 +1123,8 @@ "id": "ClusterStatus" }, "ListClustersResponse": { + "description": "The list of all clusters in a project.", + "type": "object", "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 ListClustersRequest.", @@ -1490,16 +1138,26 @@ "type": "array" } }, - "id": "ListClustersResponse", - "description": "The list of all clusters in a project.", - "type": "object" + "id": "ListClustersResponse" }, "SparkJob": { + "description": "A Cloud Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN.", "type": "object", "properties": { + "mainClass": { + "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.", + "type": "string" + }, + "archiveUris": { + "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", + "items": { + "type": "string" + }, + "type": "array" + }, "mainJarFileUri": { - "type": "string", - "description": "The HCFS URI of the jar file that contains the main class." + "description": "The HCFS URI of the jar file that contains the main class.", + "type": "string" }, "jarFileUris": { "description": "Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.", @@ -1520,11 +1178,11 @@ "type": "object" }, "args": { + "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", "items": { "type": "string" }, - "type": "array", - "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission." + "type": "array" }, "fileUris": { "description": "Optional. HCFS URIs of files to be copied to the working directory of Spark drivers and distributed tasks. Useful for naively parallel tasks.", @@ -1532,37 +1190,21 @@ "type": "string" }, "type": "array" - }, - "mainClass": { - "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.", - "type": "string" - }, - "archiveUris": { - "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", - "items": { - "type": "string" - }, - "type": "array" } }, - "id": "SparkJob", - "description": "A Cloud Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN." + "id": "SparkJob" }, "Job": { "description": "A Cloud Dataproc job resource.", "type": "object", "properties": { - "scheduling": { - "description": "Optional. Job scheduling configuration.", - "$ref": "JobScheduling" - }, "pigJob": { "$ref": "PigJob", "description": "Job is a Pig job." }, "hiveJob": { - "$ref": "HiveJob", - "description": "Job is a Hive job." + "description": "Job is a Hive job.", + "$ref": "HiveJob" }, "labels": { "additionalProperties": { @@ -1575,10 +1217,6 @@ "description": "Output-only. A URI pointing to the location of the stdout of the job's driver program.", "type": "string" }, - "sparkJob": { - "$ref": "SparkJob", - "description": "Job is a Spark job." - }, "sparkSqlJob": { "$ref": "SparkSqlJob", "description": "Job is a SparkSql job." @@ -1590,6 +1228,10 @@ }, "type": "array" }, + "sparkJob": { + "description": "Job is a Spark job.", + "$ref": "SparkJob" + }, "yarnApplications": { "description": "Output-only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", "items": { @@ -1598,8 +1240,8 @@ "type": "array" }, "pysparkJob": { - "$ref": "PySparkJob", - "description": "Job is a Pyspark job." + "description": "Job is a Pyspark job.", + "$ref": "PySparkJob" }, "reference": { "$ref": "JobReference", @@ -1620,20 +1262,44 @@ "driverControlFilesUri": { "description": "Output-only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.", "type": "string" + }, + "scheduling": { + "$ref": "JobScheduling", + "description": "Optional. Job scheduling configuration." } }, "id": "Job" }, "JobStatus": { + "description": "Cloud Dataproc job status.", "type": "object", "properties": { + "substate": { + "description": "Output-only. Additional state information, which includes status reported by the agent.", + "type": "string", + "enumDescriptions": [ + "", + "The Job is submitted to the agent.Applies to RUNNING state.", + "The Job has been received and is awaiting execution (it may be waiting for a condition to be met). See the \"details\" field for the reason for the delay.Applies to RUNNING state.", + "The agent-reported status is out of date, which may be caused by a loss of communication between the agent and Cloud Dataproc. If the agent does not send a timely update, the job will fail.Applies to RUNNING state." + ], + "enum": [ + "UNSPECIFIED", + "SUBMITTED", + "QUEUED", + "STALE_STATUS" + ] + }, + "stateStartTime": { + "format": "google-datetime", + "description": "Output-only. The time when this state was entered.", + "type": "string" + }, "details": { "description": "Output-only. Optional job state details, such as an error description if the state is \u003ccode\u003eERROR\u003c/code\u003e.", "type": "string" }, "state": { - "description": "Output-only. A state message specifying the overall job state.", - "type": "string", "enumDescriptions": [ "The job state is unknown.", "The job is pending; it has been submitted, but is not yet running.", @@ -1657,44 +1323,24 @@ "DONE", "ERROR", "ATTEMPT_FAILURE" - ] - }, - "substate": { - "description": "Output-only. Additional state information, which includes status reported by the agent.", - "type": "string", - "enumDescriptions": [ - "", - "The Job is submitted to the agent.Applies to RUNNING state.", - "The Job has been received and is awaiting execution (it may be waiting for a condition to be met). See the \"details\" field for the reason for the delay.Applies to RUNNING state.", - "The agent-reported status is out of date, which may be caused by a loss of communication between the agent and Cloud Dataproc. If the agent does not send a timely update, the job will fail.Applies to RUNNING state." ], - "enum": [ - "UNSPECIFIED", - "SUBMITTED", - "QUEUED", - "STALE_STATUS" - ] - }, - "stateStartTime": { - "format": "google-datetime", - "description": "Output-only. The time when this state was entered.", + "description": "Output-only. A state message specifying the overall job state.", "type": "string" } }, - "id": "JobStatus", - "description": "Cloud Dataproc job status." + "id": "JobStatus" }, "ManagedGroupConfig": { "description": "Specifies the resources used to actively manage an instance group.", "type": "object", "properties": { - "instanceTemplateName": { - "description": "Output-only. The name of the Instance Template used for the Managed Instance Group.", - "type": "string" - }, "instanceGroupManagerName": { "description": "Output-only. The name of the Instance Group Manager for this group.", "type": "string" + }, + "instanceTemplateName": { + "description": "Output-only. The name of the Instance Template used for the Managed Instance Group.", + "type": "string" } }, "id": "ManagedGroupConfig" @@ -1703,16 +1349,13 @@ "description": "The status of the operation.", "type": "object", "properties": { - "stateStartTime": { - "format": "google-datetime", - "description": "Output-only. The time this state was entered.", - "type": "string" - }, "details": { "description": "Output-only.A message containing any operation metadata details.", "type": "string" }, "state": { + "description": "Output-only. A message containing the operation state.", + "type": "string", "enumDescriptions": [ "Unused.", "The operation has been created.", @@ -1724,32 +1367,84 @@ "PENDING", "RUNNING", "DONE" - ], - "description": "Output-only. A message containing the operation state.", - "type": "string" + ] }, "innerState": { "description": "Output-only. A message containing the detailed operation state.", "type": "string" + }, + "stateStartTime": { + "format": "google-datetime", + "description": "Output-only. The time this state was entered.", + "type": "string" } }, "id": "ClusterOperationStatus" }, - "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).", + "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.", "type": "object", "properties": { - "mainClass": { - "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.", + "trackingUrl": { + "description": "Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.", "type": "string" }, - "archiveUris": { - "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.", + "progress": { + "format": "float", + "description": "Required. The numerical progress of the application, from 1 to 100.", + "type": "number" + }, + "state": { + "enumDescriptions": [ + "Status is unspecified.", + "Status is NEW.", + "Status is NEW_SAVING.", + "Status is SUBMITTED.", + "Status is ACCEPTED.", + "Status is RUNNING.", + "Status is FINISHED.", + "Status is FAILED.", + "Status is KILLED." + ], + "enum": [ + "STATE_UNSPECIFIED", + "NEW", + "NEW_SAVING", + "SUBMITTED", + "ACCEPTED", + "RUNNING", + "FINISHED", + "FAILED", + "KILLED" + ], + "description": "Required. The application state.", + "type": "string" + }, + "name": { + "description": "Required. The application name.", + "type": "string" + } + }, + "id": "YarnApplication" + }, + "QueryList": { + "description": "A list of queries to run on a cluster.", + "type": "object", + "properties": { + "queries": { + "description": "Required. The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob:\n\"hiveJob\": {\n \"queryList\": {\n \"queries\": [\n \"query1\",\n \"query2\",\n \"query3;query4\",\n ]\n }\n}\n", "items": { "type": "string" }, "type": "array" - }, + } + }, + "id": "QueryList" + }, + "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).", + "type": "object", + "properties": { "mainJarFileUri": { "description": "The HCFS URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'", "type": "string" @@ -1785,75 +1480,390 @@ "type": "string" }, "type": "array" - } - }, - "id": "HadoopJob" - }, - "QueryList": { - "id": "QueryList", - "description": "A list of queries to run on a cluster.", - "type": "object", - "properties": { - "queries": { - "description": "Required. The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob:\n\"hiveJob\": {\n \"queryList\": {\n \"queries\": [\n \"query1\",\n \"query2\",\n \"query3;query4\",\n ]\n }\n}\n", + }, + "mainClass": { + "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.", + "type": "string" + }, + "archiveUris": { + "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.", "items": { "type": "string" }, "type": "array" } - } + }, + "id": "HadoopJob" }, - "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.", + "DiagnoseClusterRequest": { + "description": "A request to collect cluster diagnostic information.", + "type": "object", + "properties": {}, + "id": "DiagnoseClusterRequest" + }, + "DiskConfig": { + "description": "Specifies the config of disk options for a group of VM instances.", "type": "object", "properties": { - "progress": { - "format": "float", - "description": "Required. The numerical progress of the application, from 1 to 100.", - "type": "number" + "bootDiskSizeGb": { + "format": "int32", + "description": "Optional. Size in GB of the boot disk (default is 500GB).", + "type": "integer" }, - "state": { - "description": "Required. The application state.", - "type": "string", - "enumDescriptions": [ - "Status is unspecified.", - "Status is NEW.", - "Status is NEW_SAVING.", - "Status is SUBMITTED.", - "Status is ACCEPTED.", - "Status is RUNNING.", - "Status is FINISHED.", - "Status is FAILED.", - "Status is KILLED." - ], - "enum": [ - "STATE_UNSPECIFIED", - "NEW", - "NEW_SAVING", - "SUBMITTED", - "ACCEPTED", - "RUNNING", - "FINISHED", - "FAILED", - "KILLED" - ] - }, - "name": { - "description": "Required. The application name.", + "numLocalSsds": { + "format": "int32", + "description": "Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.", + "type": "integer" + } + }, + "id": "DiskConfig" + }, + "ClusterOperationMetadata": { + "description": "Metadata describing the operation.", + "type": "object", + "properties": { + "operationType": { + "description": "Output-only. The operation type.", "type": "string" }, - "trackingUrl": { - "description": "Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.", + "description": { + "description": "Output-only. Short description of operation.", + "type": "string" + }, + "warnings": { + "description": "Output-only. Errors encountered during operation execution.", + "items": { + "type": "string" + }, + "type": "array" + }, + "labels": { + "description": "Output-only. Labels associated with the operation", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "status": { + "description": "Output-only. Current operation status.", + "$ref": "ClusterOperationStatus" + }, + "statusHistory": { + "description": "Output-only. The previous operation status.", + "items": { + "$ref": "ClusterOperationStatus" + }, + "type": "array" + }, + "clusterName": { + "description": "Output-only. Name of the cluster for the operation.", + "type": "string" + }, + "clusterUuid": { + "description": "Output-only. Cluster UUID for the operation.", "type": "string" } }, - "id": "YarnApplication" + "id": "ClusterOperationMetadata" }, - "DiagnoseClusterRequest": { + "HiveJob": { + "description": "A Cloud Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN.", + "type": "object", + "properties": { + "continueOnFailure": { + "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", + "type": "boolean" + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains Hive queries.", + "type": "string" + }, + "queryList": { + "description": "A list of queries.", + "$ref": "QueryList" + }, + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "scriptVariables": { + "description": "Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=\"value\";).", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", + "type": "object" + } + }, + "id": "HiveJob" + }, + "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 {}.", + "type": "object", "properties": {}, - "id": "DiagnoseClusterRequest", - "description": "A request to collect cluster diagnostic information.", - "type": "object" + "id": "Empty" + }, + "DiagnoseClusterResults": { + "description": "The location of diagnostic output.", + "type": "object", + "properties": { + "outputUri": { + "description": "Output-only. The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics.", + "type": "string" + } + }, + "id": "DiagnoseClusterResults" + }, + "ClusterConfig": { + "description": "The cluster config.", + "type": "object", + "properties": { + "gceClusterConfig": { + "$ref": "GceClusterConfig", + "description": "Required. The shared Google Compute Engine config settings for all instances in a cluster." + }, + "softwareConfig": { + "$ref": "SoftwareConfig", + "description": "Optional. The config settings for software inside the cluster." + }, + "masterConfig": { + "$ref": "InstanceGroupConfig", + "description": "Optional. The Google Compute Engine config settings for the master instance in a cluster." + }, + "secondaryWorkerConfig": { + "description": "Optional. The Google Compute Engine config settings for additional worker instances in a cluster.", + "$ref": "InstanceGroupConfig" + }, + "initializationActions": { + "description": "Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):\nROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)\nif [[ \"${ROLE}\" == 'Master' ]]; then\n ... master specific actions ...\nelse\n ... worker specific actions ...\nfi\n", + "items": { + "$ref": "NodeInitializationAction" + }, + "type": "array" + }, + "configBucket": { + "description": "Optional. A Google 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" + }, + "workerConfig": { + "description": "Optional. The Google Compute Engine config settings for worker instances in a cluster.", + "$ref": "InstanceGroupConfig" + } + }, + "id": "ClusterConfig" + }, + "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.", + "type": "object", + "properties": { + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.", + "items": { + "type": "string" + }, + "type": "array" + }, + "loggingConfig": { + "description": "Optional. The runtime log config for job execution.", + "$ref": "LoggingConfig" + }, + "properties": { + "description": "Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "args": { + "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "items": { + "type": "string" + }, + "type": "array" + }, + "fileUris": { + "description": "Optional. HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pythonFileUris": { + "description": "Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mainPythonFileUri": { + "description": "Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file.", + "type": "string" + }, + "archiveUris": { + "description": "Optional. HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "PySparkJob" + }, + "GceClusterConfig": { + "description": "Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", + "type": "object", + "properties": { + "serviceAccount": { + "description": "Optional. The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com", + "type": "string" + }, + "subnetworkUri": { + "description": "Optional. The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0\nprojects/[project_id]/regions/us-east1/sub0\nsub0", + "type": "string" + }, + "networkUri": { + "description": "Optional. The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default\nprojects/[project_id]/regions/global/default\ndefault", + "type": "string" + }, + "zoneUri": { + "description": "Optional. The zone where the Google Compute Engine cluster will be located. On a create request, it is required in the \"global\" region. If omitted in a non-global Cloud Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]\nprojects/[project_id]/zones/[zone]\nus-central1-f", + "type": "string" + }, + "metadata": { + "description": "The Google Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "internalIpOnly": { + "description": "Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.", + "type": "boolean" + }, + "serviceAccountScopes": { + "description": "Optional. The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included:\nhttps://www.googleapis.com/auth/cloud.useraccounts.readonly\nhttps://www.googleapis.com/auth/devstorage.read_write\nhttps://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided:\nhttps://www.googleapis.com/auth/bigquery\nhttps://www.googleapis.com/auth/bigtable.admin.table\nhttps://www.googleapis.com/auth/bigtable.data\nhttps://www.googleapis.com/auth/devstorage.full_control", + "items": { + "type": "string" + }, + "type": "array" + }, + "tags": { + "description": "The Google Compute Engine tags to add to all instances (see Tagging instances).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "GceClusterConfig" + }, + "AcceleratorConfig": { + "description": "Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine).", + "type": "object", + "properties": { + "acceleratorCount": { + "format": "int32", + "description": "The number of the accelerator cards of this type exposed to this instance.", + "type": "integer" + }, + "acceleratorTypeUri": { + "description": "Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)Examples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80", + "type": "string" + } + }, + "id": "AcceleratorConfig" + }, + "ClusterMetrics": { + "description": "Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", + "type": "object", + "properties": { + "hdfsMetrics": { + "description": "The HDFS metrics.", + "type": "object", + "additionalProperties": { + "format": "int64", + "type": "string" + } + }, + "yarnMetrics": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "The YARN metrics.", + "type": "object" + } + }, + "id": "ClusterMetrics" + }, + "LoggingConfig": { + "description": "The runtime logging config of the job.", + "type": "object", + "properties": { + "driverLogLevels": { + "additionalProperties": { + "enum": [ + "LEVEL_UNSPECIFIED", + "ALL", + "TRACE", + "DEBUG", + "INFO", + "WARN", + "ERROR", + "FATAL", + "OFF" + ], + "type": "string" + }, + "description": "The per-package log levels for the driver. This may include \"root\" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'", + "type": "object" + } + }, + "id": "LoggingConfig" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object", + "properties": { + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "response": { + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + } + }, + "id": "Operation" } }, "protocol": "rest", @@ -1872,18 +1882,8 @@ } } }, - "description": "Manages Hadoop-based clusters and jobs on Google Cloud Platform.", - "servicePath": "", "kind": "discovery#restDescription", - "rootUrl": "https://dataproc.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "dataproc", - "batchPath": "batch", - "id": "dataproc:v1", - "documentationLink": "https://cloud.google.com/dataproc/", - "revision": "20170801", - "title": "Google Cloud Dataproc API", - "ownerName": "Google", - "discoveryVersion": "v1" + "servicePath": "", + "description": "Manages Hadoop-based clusters and jobs on Google Cloud Platform.", + "rootUrl": "https://dataproc.googleapis.com/" } 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 128a467b1..f700362c1 100644 --- a/vendor/google.golang.org/api/dataproc/v1/dataproc-gen.go +++ b/vendor/google.golang.org/api/dataproc/v1/dataproc-gen.go @@ -1623,7 +1623,7 @@ type SoftwareConfig struct { // mapred: mapred-site.xml // pig: pig.properties // spark: spark-defaults.conf - // yarn: yarn-site.xml + // yarn: yarn-site.xmlFor more information, see Cluster properties. Properties map[string]string `json:"properties,omitempty"` // ForceSendFields is a list of field names (e.g. "ImageVersion") to diff --git a/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-api.json b/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-api.json index ed0430f24..83add2539 100644 --- a/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-api.json +++ b/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-api.json @@ -1,15 +1,488 @@ { + "version_module": true, "resources": { "projects": { "resources": { "regions": { "resources": { - "jobs": { + "clusters": { + "methods": { + "patch": { + "request": { + "$ref": "Cluster" + }, + "description": "Updates a cluster in a project.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "description": "Required. Specifies the path, relative to \u003ccode\u003eCluster\u003c/code\u003e, of the field to update. For example, to change the number of workers in a cluster to 5, the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003econfig.worker_config.num_instances\u003c/code\u003e, and the PATCH request body would specify the new value, as follows:\n{\n \"config\":{\n \"workerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\nSimilarly, to change the number of preemptible workers in a cluster to 5, the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be \u003ccode\u003econfig.secondary_worker_config.num_instances\u003c/code\u003e, and the PATCH request body would be set as follows:\n{\n \"config\":{\n \"secondaryWorkerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\n\u003cstrong\u003eNote:\u003c/strong\u003e currently only some fields can be updated: |Mask|Purpose| |labels|Updates labels| |config.worker_config.num_instances|Resize primary worker group| |config.secondary_worker_config.num_instances|Resize secondary worker group|", + "type": "string", + "location": "query" + }, + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterName": { + "description": "Required. The cluster name.", + "type": "string", + "required": true, + "location": "path" + }, + "gracefulDecommissionTimeout": { + "format": "google-duration", + "description": "Optional. Timeout for graceful YARN decomissioning. Graceful decommissioning allows removing nodes from the cluster without interrupting jobs in progress. Timeout specifies how long to wait for jobs in progress to finish before forcefully removing nodes (and potentially interrupting jobs). Default timeout is 0 (for forceful decommission), and the maximum allowed timeout is 1 day.Only supported on Dataproc image versions 1.2 and higher.", + "type": "string", + "location": "query" + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "id": "dataproc.projects.regions.clusters.patch", + "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}" + }, + "get": { + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "id": "dataproc.projects.regions.clusters.get", + "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "description": "Gets the resource representation for a cluster in a project.", + "response": { + "$ref": "Cluster" + }, + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true + }, + "clusterName": { + "description": "Required. The cluster name.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "type": "string", + "required": true, + "location": "path" + } + } + }, + "diagnose": { + "request": { + "$ref": "DiagnoseClusterRequest" + }, + "description": "Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation.", + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true + }, + "clusterName": { + "location": "path", + "description": "Required. The cluster name.", + "type": "string", + "required": true + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose", + "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose", + "id": "dataproc.projects.regions.clusters.diagnose" + }, + "delete": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "clusterName": { + "description": "Required. The cluster name.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "region": { + "type": "string", + "required": true, + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request." + } + }, + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "id": "dataproc.projects.regions.clusters.delete", + "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "description": "Deletes a cluster in a project." + }, + "list": { + "path": "v1beta2/projects/{projectId}/regions/{region}/clusters", + "id": "dataproc.projects.regions.clusters.list", + "description": "Lists all regions/{region}/clusters in a project.", + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "region" + ], + "response": { + "$ref": "ListClustersResponse" + }, + "parameters": { + "filter": { + "type": "string", + "location": "query", + "description": "Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *" + }, + "region": { + "type": "string", + "required": true, + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request." + }, + "pageToken": { + "description": "Optional. The standard List page token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional. The standard List page size.", + "type": "integer" + }, + "projectId": { + "type": "string", + "required": true, + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters" + }, + "create": { + "request": { + "$ref": "Cluster" + }, + "description": "Creates a cluster in a project.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "region" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters", + "id": "dataproc.projects.regions.clusters.create", + "path": "v1beta2/projects/{projectId}/regions/{region}/clusters" + } + } + }, + "operations": { "methods": { "cancel": { - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", - "id": "dataproc.projects.regions.jobs.cancel", - "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", + "response": { + "$ref": "Empty" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", + "location": "path", + "description": "The name of the operation resource to be cancelled." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:cancel", + "id": "dataproc.projects.regions.operations.cancel", + "path": "v1beta2/{+name}:cancel", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED." + }, + "delete": { + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}", + "path": "v1beta2/{+name}", + "id": "dataproc.projects.regions.operations.delete", + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "name": { + "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", + "location": "path", + "description": "The name of the operation resource to be deleted.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}", + "path": "v1beta2/{+name}", + "id": "dataproc.projects.regions.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ListOperationsResponse" + }, + "parameters": { + "pageToken": { + "type": "string", + "location": "query", + "description": "The standard list page token." + }, + "name": { + "description": "The name of the operation's parent resource.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/operations$", + "location": "path" + }, + "pageSize": { + "format": "int32", + "description": "The standard list page size.", + "type": "integer", + "location": "query" + }, + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations", + "path": "v1beta2/{+name}", + "id": "dataproc.projects.regions.operations.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." + } + } + }, + "jobs": { + "methods": { + "delete": { + "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.", + "httpMethod": "DELETE", + "parameterOrder": [ + "projectId", + "region", + "jobId" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "region": { + "type": "string", + "required": true, + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request." + }, + "jobId": { + "type": "string", + "required": true, + "location": "path", + "description": "Required. The job ID." + }, + "projectId": { + "type": "string", + "required": true, + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to." + } + }, + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", + "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", + "id": "dataproc.projects.regions.jobs.delete" + }, + "list": { + "description": "Lists regions/{region}/jobs in a project.", + "response": { + "$ref": "ListJobsResponse" + }, + "parameterOrder": [ + "projectId", + "region" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "description": "Optional. The page token, returned by a previous call, to request the next page of results.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional. The number of results to return in each response.", + "type": "integer" + }, + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterName": { + "location": "query", + "description": "Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.", + "type": "string" + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "filter": { + "location": "query", + "description": "Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or INACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = *", + "type": "string" + }, + "jobStateMatcher": { + "location": "query", + "enum": [ + "ALL", + "ACTIVE", + "NON_ACTIVE" + ], + "description": "Optional. Specifies enumerated categories of jobs to list (default = match ALL jobs).", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs", + "id": "dataproc.projects.regions.jobs.list", + "path": "v1beta2/projects/{projectId}/regions/{region}/jobs" + }, + "cancel": { "request": { "$ref": "CancelJobRequest" }, @@ -27,17 +500,51 @@ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { - "jobId": { + "region": { + "type": "string", + "required": true, "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request." + }, + "jobId": { "description": "Required. The job ID.", "type": "string", - "required": true + "required": true, + "location": "path" }, "projectId": { "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", "type": "string", "required": true, "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", + "id": "dataproc.projects.regions.jobs.cancel", + "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel" + }, + "get": { + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "region", + "jobId" + ], + "httpMethod": "GET", + "parameters": { + "jobId": { + "description": "Required. The job ID.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string", + "required": true }, "region": { "location": "path", @@ -45,12 +552,16 @@ "type": "string", "required": true } - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", + "id": "dataproc.projects.regions.jobs.get", + "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", + "description": "Gets the resource representation for a job in a project." }, "patch": { - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", - "id": "dataproc.projects.regions.jobs.patch", - "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", "request": { "$ref": "Job" }, @@ -75,16 +586,16 @@ "required": true }, "projectId": { + "location": "path", "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", "type": "string", - "required": true, - "location": "path" + "required": true }, "updateMask": { + "location": "query", "format": "google-fieldmask", "description": "Required. Specifies the path, relative to \u003ccode\u003eJob\u003c/code\u003e, of the field to update. For example, to update the labels of a Job the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003elabels\u003c/code\u003e, and the PATCH request body would specify the new value. \u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003elabels\u003c/code\u003e is the only field that can be updated.", - "type": "string", - "location": "query" + "type": "string" }, "region": { "location": "path", @@ -92,554 +603,44 @@ "type": "string", "required": true } - } - }, - "get": { - "httpMethod": "GET", - "response": { - "$ref": "Job" - }, - "parameterOrder": [ - "projectId", - "region", - "jobId" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "jobId": { - "description": "Required. The job ID.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string", - "required": true - }, - "region": { - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true, - "location": "path" - } }, "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", - "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", - "id": "dataproc.projects.regions.jobs.get", - "description": "Gets the resource representation for a job in a project." + "id": "dataproc.projects.regions.jobs.patch", + "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}" }, "submit": { - "description": "Submits a job to a cluster.", "request": { "$ref": "SubmitJobRequest" }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "region" - ], + "description": "Submits a job to a cluster.", "response": { "$ref": "Job" }, + "parameterOrder": [ + "projectId", + "region" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string", - "required": true, - "location": "path" - }, "region": { "location": "path", "description": "Required. The Cloud Dataproc region in which to handle the request.", "type": "string", "required": true + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string", + "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs:submit", - "path": "v1beta2/projects/{projectId}/regions/{region}/jobs:submit", - "id": "dataproc.projects.regions.jobs.submit" - }, - "delete": { - "httpMethod": "DELETE", - "parameterOrder": [ - "projectId", - "region", - "jobId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "region": { - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true - }, - "jobId": { - "description": "Required. The job ID.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", - "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", - "id": "dataproc.projects.regions.jobs.delete", - "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION." - }, - "list": { - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs", - "path": "v1beta2/projects/{projectId}/regions/{region}/jobs", - "id": "dataproc.projects.regions.jobs.list", - "description": "Lists regions/{region}/jobs in a project.", - "httpMethod": "GET", - "parameterOrder": [ - "projectId", - "region" - ], - "response": { - "$ref": "ListJobsResponse" - }, - "parameters": { - "filter": { - "location": "query", - "description": "Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or INACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = *", - "type": "string" - }, - "jobStateMatcher": { - "location": "query", - "enum": [ - "ALL", - "ACTIVE", - "NON_ACTIVE" - ], - "description": "Optional. Specifies enumerated categories of jobs to list (default = match ALL jobs).", - "type": "string" - }, - "pageToken": { - "description": "Optional. The page token, returned by a previous call, to request the next page of results.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "Optional. The number of results to return in each response.", - "type": "integer", - "location": "query" - }, - "region": { - "type": "string", - "required": true, - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request." - }, - "clusterName": { - "description": "Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.", - "type": "string", - "location": "query" - }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "clusters": { - "methods": { - "diagnose": { - "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose", - "id": "dataproc.projects.regions.clusters.diagnose", - "description": "Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation.", - "request": { - "$ref": "DiagnoseClusterRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "region": { - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true - }, - "clusterName": { - "location": "path", - "description": "Required. The cluster name.", - "type": "string", - "required": true - }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose" - }, - "delete": { - "description": "Deletes a cluster in a project.", - "httpMethod": "DELETE", - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "clusterName": { - "type": "string", - "required": true, - "location": "path", - "description": "Required. The cluster name." - }, - "projectId": { - "location": "path", - "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", - "type": "string", - "required": true - }, - "region": { - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "id": "dataproc.projects.regions.clusters.delete" - }, - "list": { - "parameters": { - "pageToken": { - "type": "string", - "location": "query", - "description": "Optional. The standard List page token." - }, - "pageSize": { - "format": "int32", - "description": "Optional. The standard List page size.", - "type": "integer", - "location": "query" - }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", - "type": "string", - "required": true, - "location": "path" - }, - "filter": { - "type": "string", - "location": "query", - "description": "Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *" - }, - "region": { - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters", - "id": "dataproc.projects.regions.clusters.list", - "path": "v1beta2/projects/{projectId}/regions/{region}/clusters", - "description": "Lists all regions/{region}/clusters in a project.", - "parameterOrder": [ - "projectId", - "region" - ], - "response": { - "$ref": "ListClustersResponse" - }, - "httpMethod": "GET" - }, - "create": { - "description": "Creates a cluster in a project.", - "request": { - "$ref": "Cluster" - }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "region" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "projectId": { - "type": "string", - "required": true, - "location": "path", - "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to." - }, - "region": { - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters", - "path": "v1beta2/projects/{projectId}/regions/{region}/clusters", - "id": "dataproc.projects.regions.clusters.create" - }, - "get": { - "httpMethod": "GET", - "response": { - "$ref": "Cluster" - }, - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "parameters": { - "clusterName": { - "description": "Required. The cluster name.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", - "type": "string", - "required": true, - "location": "path" - }, - "region": { - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "id": "dataproc.projects.regions.clusters.get", - "description": "Gets the resource representation for a cluster in a project." - }, - "patch": { - "httpMethod": "PATCH", - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Required. Specifies the path, relative to \u003ccode\u003eCluster\u003c/code\u003e, of the field to update. For example, to change the number of workers in a cluster to 5, the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003econfig.worker_config.num_instances\u003c/code\u003e, and the PATCH request body would specify the new value, as follows:\n{\n \"config\":{\n \"workerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\nSimilarly, to change the number of preemptible workers in a cluster to 5, the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be \u003ccode\u003econfig.secondary_worker_config.num_instances\u003c/code\u003e, and the PATCH request body would be set as follows:\n{\n \"config\":{\n \"secondaryWorkerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\n\u003cstrong\u003eNote:\u003c/strong\u003e currently only some fields can be updated: |Mask|Purpose| |labels|Updates labels| |config.worker_config.num_instances|Resize primary worker group| |config.secondary_worker_config.num_instances|Resize secondary worker group|", - "type": "string" - }, - "region": { - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true - }, - "clusterName": { - "description": "Required. The cluster name.", - "type": "string", - "required": true, - "location": "path" - }, - "gracefulDecommissionTimeout": { - "location": "query", - "format": "google-duration", - "description": "Optional. Timeout for graceful YARN decomissioning. Graceful decommissioning allows removing nodes from the cluster without interrupting jobs in progress. Timeout specifies how long to wait for jobs in progress to finish before forcefully removing nodes (and potentially interrupting jobs). Default timeout is 0 (for forceful decommission), and the maximum allowed timeout is 1 day.Only supported on Dataproc image versions 1.2 and higher.", - "type": "string" - }, - "projectId": { - "type": "string", - "required": true, - "location": "path", - "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to." - } - }, - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "id": "dataproc.projects.regions.clusters.patch", - "request": { - "$ref": "Cluster" - }, - "description": "Updates a cluster in a project." - } - } - }, - "operations": { - "methods": { - "delete": { - "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}", - "id": "dataproc.projects.regions.operations.delete", - "path": "v1beta2/{+name}", - "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", - "location": "path", - "description": "The name of the operation resource to be deleted.", - "type": "string", - "required": true - } - } - }, - "get": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The name of the operation resource.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}", - "id": "dataproc.projects.regions.operations.get", - "path": "v1beta2/{+name}", - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." - }, - "list": { - "path": "v1beta2/{+name}", - "id": "dataproc.projects.regions.operations.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.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "parameters": { - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" - }, - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "name": { - "pattern": "^projects/[^/]+/regions/[^/]+/operations$", - "location": "path", - "description": "The name of the operation's parent resource.", - "type": "string", - "required": true - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "The standard list page size." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations" - }, - "cancel": { - "path": "v1beta2/{+name}:cancel", - "id": "dataproc.projects.regions.operations.cancel", - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", - "location": "path", - "description": "The name of the operation resource to be cancelled.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:cancel" + "id": "dataproc.projects.regions.jobs.submit", + "path": "v1beta2/projects/{projectId}/regions/{region}/jobs:submit" } } } @@ -649,56 +650,48 @@ } }, "parameters": { - "bearer_token": { + "upload_protocol": { "location": "query", - "description": "OAuth bearer token.", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string" }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, "prettyPrint": { - "default": "true", - "type": "boolean", "location": "query", - "description": "Returns response with indentations and line breaks." - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" }, "fields": { - "description": "Selector specifying which fields to include in a partial response.", "type": "string", - "location": "query" + "location": "query", + "description": "Selector specifying which fields to include in a partial response." }, - "$.xgafv": { - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", + "uploadType": { "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." }, "callback": { "description": "JSONP", "type": "string", "location": "query" }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, "alt": { + "description": "Data format for response.", + "default": "json", "enum": [ "json", "media", @@ -710,38 +703,718 @@ "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], - "location": "query", - "description": "Data format for response.", - "default": "json" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" + "location": "query" }, "key": { "location": "query", "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.", "type": "string" }, + "access_token": { + "type": "string", + "location": "query", + "description": "OAuth access token." + }, "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.", "type": "string", "location": "query" }, "pp": { + "location": "query", "description": "Pretty-print response.", "default": "true", - "type": "boolean", + "type": "boolean" + }, + "oauth_token": { + "type": "string", + "location": "query", + "description": "OAuth 2.0 token for the current user." + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", "location": "query" } }, "schemas": { + "DiagnoseClusterRequest": { + "description": "A request to collect cluster diagnostic information.", + "type": "object", + "properties": {}, + "id": "DiagnoseClusterRequest" + }, + "DiskConfig": { + "properties": { + "numLocalSsds": { + "format": "int32", + "description": "Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.", + "type": "integer" + }, + "bootDiskSizeGb": { + "format": "int32", + "description": "Optional. Size in GB of the boot disk (default is 500GB).", + "type": "integer" + } + }, + "id": "DiskConfig", + "description": "Specifies the config of disk options for a group of VM instances.", + "type": "object" + }, + "ClusterOperationMetadata": { + "description": "Metadata describing the operation.", + "type": "object", + "properties": { + "operationType": { + "description": "Output-only. The operation type.", + "type": "string" + }, + "description": { + "description": "Output-only. Short description of operation.", + "type": "string" + }, + "warnings": { + "description": "Output-only. Errors encountered during operation execution.", + "items": { + "type": "string" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Output-only. Labels associated with the operation", + "type": "object" + }, + "status": { + "description": "Output-only. Current operation status.", + "$ref": "ClusterOperationStatus" + }, + "statusHistory": { + "description": "Output-only. The previous operation status.", + "items": { + "$ref": "ClusterOperationStatus" + }, + "type": "array" + }, + "clusterName": { + "description": "Output-only. Name of the cluster for the operation.", + "type": "string" + }, + "clusterUuid": { + "description": "Output-only. Cluster UUID for the operation.", + "type": "string" + } + }, + "id": "ClusterOperationMetadata" + }, + "HiveJob": { + "description": "A Cloud Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN.", + "type": "object", + "properties": { + "continueOnFailure": { + "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", + "type": "boolean" + }, + "queryFileUri": { + "type": "string", + "description": "The HCFS URI of the script that contains Hive queries." + }, + "queryList": { + "$ref": "QueryList", + "description": "A list of queries." + }, + "scriptVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=\"value\";).", + "type": "object" + }, + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", + "type": "object" + } + }, + "id": "HiveJob" + }, + "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 {}.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "DiagnoseClusterResults": { + "description": "The location of diagnostic output.", + "type": "object", + "properties": { + "outputUri": { + "type": "string", + "description": "Output-only. The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics." + } + }, + "id": "DiagnoseClusterResults" + }, + "ClusterConfig": { + "id": "ClusterConfig", + "description": "The cluster config.", + "type": "object", + "properties": { + "masterConfig": { + "$ref": "InstanceGroupConfig", + "description": "Optional. The Google Compute Engine config settings for the master instance in a cluster." + }, + "secondaryWorkerConfig": { + "$ref": "InstanceGroupConfig", + "description": "Optional. The Google Compute Engine config settings for additional worker instances in a cluster." + }, + "initializationActions": { + "description": "Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's \u003ccode\u003erole\u003c/code\u003e metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):\nROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-role)\nif [[ \"${ROLE}\" == 'Master' ]]; then\n ... master specific actions ...\nelse\n ... worker specific actions ...\nfi\n", + "items": { + "$ref": "NodeInitializationAction" + }, + "type": "array" + }, + "lifecycleConfig": { + "description": "Optional. The config setting for auto delete cluster schedule.", + "$ref": "LifecycleConfig" + }, + "configBucket": { + "description": "Optional. A Google 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" + }, + "workerConfig": { + "$ref": "InstanceGroupConfig", + "description": "Optional. The Google Compute Engine config settings for worker instances in a cluster." + }, + "gceClusterConfig": { + "description": "Required. The shared Google Compute Engine config settings for all instances in a cluster.", + "$ref": "GceClusterConfig" + }, + "softwareConfig": { + "description": "Optional. The config settings for software inside the cluster.", + "$ref": "SoftwareConfig" + } + } + }, + "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.", + "type": "object", + "properties": { + "loggingConfig": { + "$ref": "LoggingConfig", + "description": "Optional. The runtime log config for job execution." + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", + "type": "object" + }, + "args": { + "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "items": { + "type": "string" + }, + "type": "array" + }, + "fileUris": { + "description": "Optional. HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pythonFileUris": { + "description": "Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mainPythonFileUri": { + "type": "string", + "description": "Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file." + }, + "archiveUris": { + "description": "Optional. HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip.", + "items": { + "type": "string" + }, + "type": "array" + }, + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "PySparkJob" + }, + "GceClusterConfig": { + "description": "Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", + "type": "object", + "properties": { + "zoneUri": { + "description": "Optional. The zone where the Google Compute Engine cluster will be located. On a create request, it is required in the \"global\" region. If omitted in a non-global Cloud Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]\nprojects/[project_id]/zones/[zone]\nus-central1-f", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "The Google Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).", + "type": "object" + }, + "internalIpOnly": { + "description": "Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.", + "type": "boolean" + }, + "serviceAccountScopes": { + "description": "Optional. The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included:\nhttps://www.googleapis.com/auth/cloud.useraccounts.readonly\nhttps://www.googleapis.com/auth/devstorage.read_write\nhttps://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided:\nhttps://www.googleapis.com/auth/bigquery\nhttps://www.googleapis.com/auth/bigtable.admin.table\nhttps://www.googleapis.com/auth/bigtable.data\nhttps://www.googleapis.com/auth/devstorage.full_control", + "items": { + "type": "string" + }, + "type": "array" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The Google Compute Engine tags to add to all instances (see Tagging instances)." + }, + "serviceAccount": { + "description": "Optional. The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com", + "type": "string" + }, + "subnetworkUri": { + "description": "Optional. The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0\nprojects/[project_id]/regions/us-east1/sub0\nsub0", + "type": "string" + }, + "networkUri": { + "description": "Optional. The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default\nprojects/[project_id]/regions/global/default\ndefault", + "type": "string" + } + }, + "id": "GceClusterConfig" + }, + "AcceleratorConfig": { + "description": "Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine).", + "type": "object", + "properties": { + "acceleratorTypeUri": { + "description": "Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)Examples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80", + "type": "string" + }, + "acceleratorCount": { + "format": "int32", + "description": "The number of the accelerator cards of this type exposed to this instance.", + "type": "integer" + } + }, + "id": "AcceleratorConfig" + }, + "ClusterMetrics": { + "description": "Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", + "type": "object", + "properties": { + "hdfsMetrics": { + "type": "object", + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "The HDFS metrics." + }, + "yarnMetrics": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "The YARN metrics.", + "type": "object" + } + }, + "id": "ClusterMetrics" + }, + "LoggingConfig": { + "description": "The runtime logging config of the job.", + "type": "object", + "properties": { + "driverLogLevels": { + "additionalProperties": { + "type": "string", + "enum": [ + "LEVEL_UNSPECIFIED", + "ALL", + "TRACE", + "DEBUG", + "INFO", + "WARN", + "ERROR", + "FATAL", + "OFF" + ] + }, + "description": "The per-package log levels for the driver. This may include \"root\" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'", + "type": "object" + } + }, + "id": "LoggingConfig" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object", + "properties": { + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + } + }, + "id": "Operation" + }, + "JobReference": { + "description": "Encapsulates the full scoping used to reference a job.", + "type": "object", + "properties": { + "jobId": { + "description": "Optional. The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.", + "type": "string" + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string" + } + }, + "id": "JobReference" + }, + "SubmitJobRequest": { + "id": "SubmitJobRequest", + "description": "A request to submit a job.", + "type": "object", + "properties": { + "job": { + "description": "Required. The job resource.", + "$ref": "Job" + } + } + }, + "Status": { + "type": "object", + "properties": { + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "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" + }, + "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" + } + }, + "id": "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." + }, + "InstanceGroupConfig": { + "id": "InstanceGroupConfig", + "description": "Optional. The config settings for Google Compute Engine resources in an instance group, such as a master or worker group.", + "type": "object", + "properties": { + "accelerators": { + "description": "Optional. The Google Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release.", + "items": { + "$ref": "AcceleratorConfig" + }, + "type": "array" + }, + "numInstances": { + "type": "integer", + "format": "int32", + "description": "Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1." + }, + "diskConfig": { + "description": "Optional. Disk option config settings.", + "$ref": "DiskConfig" + }, + "machineTypeUri": { + "description": "Optional. The Google Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nprojects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nn1-standard-2", + "type": "string" + }, + "managedGroupConfig": { + "description": "Output-only. The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.", + "$ref": "ManagedGroupConfig" + }, + "isPreemptible": { + "description": "Optional. Specifies that this instance group contains preemptible instances.", + "type": "boolean" + }, + "imageUri": { + "description": "Output-only. The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version.", + "type": "string" + }, + "instanceNames": { + "description": "Optional. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).", + "items": { + "type": "string" + }, + "type": "array" + } + } + }, + "JobScheduling": { + "description": "Job scheduling options.Beta Feature: These options are available for testing purposes only. They may be changed before final release.", + "type": "object", + "properties": { + "maxFailuresPerHour": { + "format": "int32", + "description": "Optional. Maximum number of times per hour a driver may be restarted as a result of driver terminating with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.", + "type": "integer" + } + }, + "id": "JobScheduling" + }, + "NodeInitializationAction": { + "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion.", + "type": "object", + "properties": { + "executableFile": { + "description": "Required. Google Cloud Storage URI of executable file.", + "type": "string" + }, + "executionTimeout": { + "type": "string", + "format": "google-duration", + "description": "Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period." + } + }, + "id": "NodeInitializationAction" + }, + "ListJobsResponse": { + "description": "A list of jobs in a project.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Optional. 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\u003eListJobsRequest\u003c/code\u003e.", + "type": "string" + }, + "jobs": { + "description": "Output-only. Jobs list.", + "items": { + "$ref": "Job" + }, + "type": "array" + } + }, + "id": "ListJobsResponse" + }, + "CancelJobRequest": { + "description": "A request to cancel a job.", + "type": "object", + "properties": {}, + "id": "CancelJobRequest" + }, + "SparkSqlJob": { + "description": "A Cloud Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries.", + "type": "object", + "properties": { + "scriptVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=\"value\";).", + "type": "object" + }, + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "loggingConfig": { + "$ref": "LoggingConfig", + "description": "Optional. The runtime log config for job execution." + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.", + "type": "object" + }, + "queryList": { + "$ref": "QueryList", + "description": "A list of queries." + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains SQL queries.", + "type": "string" + } + }, + "id": "SparkSqlJob" + }, + "Cluster": { + "description": "Describes the identifying information, config, and status of a cluster of Google Compute Engine instances.", + "type": "object", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The labels to associate with this cluster. 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 cluster.", + "type": "object" + }, + "metrics": { + "$ref": "ClusterMetrics", + "description": "Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release." + }, + "status": { + "$ref": "ClusterStatus", + "description": "Output-only. Cluster status." + }, + "statusHistory": { + "description": "Output-only. The previous cluster status.", + "items": { + "$ref": "ClusterStatus" + }, + "type": "array" + }, + "config": { + "description": "Required. The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated.", + "$ref": "ClusterConfig" + }, + "clusterUuid": { + "type": "string", + "description": "Output-only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster." + }, + "clusterName": { + "description": "Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.", + "type": "string" + }, + "projectId": { + "description": "Required. The Google Cloud Platform project ID that the cluster belongs to.", + "type": "string" + } + }, + "id": "Cluster" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "id": "ListOperationsResponse" + }, + "JobPlacement": { + "description": "Cloud Dataproc job config.", + "type": "object", + "properties": { + "clusterUuid": { + "description": "Output-only. A cluster UUID generated by the Cloud Dataproc service when the job is submitted.", + "type": "string" + }, + "clusterName": { + "description": "Required. The name of the cluster where the job will be submitted.", + "type": "string" + } + }, + "id": "JobPlacement" + }, + "SoftwareConfig": { + "id": "SoftwareConfig", + "description": "Specifies the selection and config of software inside the cluster.", + "type": "object", + "properties": { + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, such as core:fs.defaultFS. The following are supported prefixes and their mappings:\ncapacity-scheduler: capacity-scheduler.xml\ncore: core-site.xml\ndistcp: distcp-default.xml\nhdfs: hdfs-site.xml\nhive: hive-site.xml\nmapred: mapred-site.xml\npig: pig.properties\nspark: spark-defaults.conf\nyarn: yarn-site.xmlFor more information, see Cluster properties.", + "type": "object" + }, + "imageVersion": { + "description": "Optional. The version of software inside the cluster. It must match the regular expression [0-9]+\\.[0-9]+. If unspecified, it defaults to the latest version (see Cloud Dataproc Versioning).", + "type": "string" + } + } + }, "PigJob": { - "id": "PigJob", "description": "A Cloud Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN.", "type": "object", "properties": { + "continueOnFailure": { + "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", + "type": "boolean" + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains the Pig queries.", + "type": "string" + }, + "queryList": { + "description": "A list of queries.", + "$ref": "QueryList" + }, "jarFileUris": { "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.", "items": { @@ -761,36 +1434,24 @@ "description": "Optional. The runtime log config for job execution." }, "properties": { - "description": "Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", - "type": "object", "additionalProperties": { "type": "string" - } - }, - "continueOnFailure": { - "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", - "type": "boolean" - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "queryFileUri": { - "type": "string", - "description": "The HCFS URI of the script that contains the Pig queries." + }, + "description": "Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", + "type": "object" } - } + }, + "id": "PigJob" }, "ClusterStatus": { - "id": "ClusterStatus", - "description": "The status of a cluster and its instances.", - "type": "object", "properties": { "detail": { "description": "Output-only. Optional details of cluster's state.", "type": "string" }, "state": { + "description": "Output-only. The cluster's state.", + "type": "string", "enumDescriptions": [ "The cluster state is unknown.", "The cluster is being created and set up. It is not ready for use.", @@ -806,22 +1467,20 @@ "ERROR", "DELETING", "UPDATING" - ], - "description": "Output-only. The cluster's state.", - "type": "string" + ] }, "substate": { - "enum": [ - "UNSPECIFIED", - "UNHEALTHY", - "STALE_STATUS" - ], "description": "Output-only. Additional state information that includes status reported by the agent.", "type": "string", "enumDescriptions": [ "", "The cluster is known to be in an unhealthy state (for example, critical daemons are not running or HDFS capacity is exhausted).Applies to RUNNING state.", "The agent-reported status is out of date (may occur if Cloud Dataproc loses communication with Agent).Applies to RUNNING state." + ], + "enum": [ + "UNSPECIFIED", + "UNHEALTHY", + "STALE_STATUS" ] }, "stateStartTime": { @@ -829,9 +1488,13 @@ "description": "Output-only. Time when this state was entered.", "type": "string" } - } + }, + "id": "ClusterStatus", + "description": "The status of a cluster and its instances.", + "type": "object" }, "ListClustersResponse": { + "id": "ListClustersResponse", "description": "The list of all clusters in a project.", "type": "object", "properties": { @@ -846,26 +1509,12 @@ }, "type": "array" } - }, - "id": "ListClustersResponse" + } }, "SparkJob": { + "description": "A Cloud Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN.", + "type": "object", "properties": { - "mainClass": { - "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.", - "type": "string" - }, - "archiveUris": { - "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", - "items": { - "type": "string" - }, - "type": "array" - }, - "mainJarFileUri": { - "description": "The HCFS URI of the jar file that contains the main class.", - "type": "string" - }, "jarFileUris": { "description": "Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.", "items": { @@ -897,21 +1546,33 @@ "type": "string" }, "type": "array" + }, + "mainClass": { + "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.", + "type": "string" + }, + "archiveUris": { + "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mainJarFileUri": { + "description": "The HCFS URI of the jar file that contains the main class.", + "type": "string" } }, - "id": "SparkJob", - "description": "A Cloud Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN.", - "type": "object" + "id": "SparkJob" }, "Job": { + "id": "Job", + "description": "A Cloud Dataproc job resource.", + "type": "object", "properties": { - "reference": { - "$ref": "JobReference", - "description": "Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a \u003ccode\u003ejob_id\u003c/code\u003e." - }, "hadoopJob": { - "$ref": "HadoopJob", - "description": "Job is a Hadoop job." + "description": "Job is a Hadoop job.", + "$ref": "HadoopJob" }, "placement": { "description": "Required. Job information, including how, when, and where to run the job.", @@ -934,19 +1595,27 @@ "$ref": "PigJob" }, "hiveJob": { - "description": "Job is a Hive job.", - "$ref": "HiveJob" + "$ref": "HiveJob", + "description": "Job is a Hive job." }, "labels": { - "description": "Optional. The labels to associate with this job. 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 job.", - "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "Optional. The labels to associate with this job. 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 job.", + "type": "object" }, "driverOutputResourceUri": { - "description": "Output-only. A URI pointing to the location of the stdout of the job's driver program.", - "type": "string" + "type": "string", + "description": "Output-only. A URI pointing to the location of the stdout of the job's driver program." + }, + "sparkSqlJob": { + "$ref": "SparkSqlJob", + "description": "Job is a SparkSql job." + }, + "sparkJob": { + "$ref": "SparkJob", + "description": "Job is a Spark job." }, "statusHistory": { "description": "Output-only. The previous job status.", @@ -955,14 +1624,6 @@ }, "type": "array" }, - "sparkJob": { - "$ref": "SparkJob", - "description": "Job is a Spark job." - }, - "sparkSqlJob": { - "$ref": "SparkSqlJob", - "description": "Job is a SparkSql job." - }, "yarnApplications": { "description": "Output-only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", "items": { @@ -971,45 +1632,24 @@ "type": "array" }, "pysparkJob": { - "$ref": "PySparkJob", - "description": "Job is a Pyspark job." + "description": "Job is a Pyspark job.", + "$ref": "PySparkJob" + }, + "reference": { + "description": "Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a \u003ccode\u003ejob_id\u003c/code\u003e.", + "$ref": "JobReference" } - }, - "id": "Job", - "description": "A Cloud Dataproc job resource.", - "type": "object" + } }, "JobStatus": { - "id": "JobStatus", - "description": "Cloud Dataproc job status.", - "type": "object", "properties": { - "substate": { - "enumDescriptions": [ - "", - "The Job is submitted to the agent.Applies to RUNNING state.", - "The Job has been received and is awaiting execution (it may be waiting for a condition to be met). See the \"details\" field for the reason for the delay.Applies to RUNNING state.", - "The agent-reported status is out of date, which may be caused by a loss of communication between the agent and Cloud Dataproc. If the agent does not send a timely update, the job will fail.Applies to RUNNING state." - ], - "enum": [ - "UNSPECIFIED", - "SUBMITTED", - "QUEUED", - "STALE_STATUS" - ], - "description": "Output-only. Additional state information, which includes status reported by the agent.", - "type": "string" - }, - "stateStartTime": { - "format": "google-datetime", - "description": "Output-only. The time when this state was entered.", - "type": "string" - }, "details": { - "type": "string", - "description": "Output-only. Optional job state details, such as an error description if the state is \u003ccode\u003eERROR\u003c/code\u003e." + "description": "Output-only. Optional job state details, such as an error description if the state is \u003ccode\u003eERROR\u003c/code\u003e.", + "type": "string" }, "state": { + "description": "Output-only. A state message specifying the overall job state.", + "type": "string", "enumDescriptions": [ "The job state is unknown.", "The job is pending; it has been submitted, but is not yet running.", @@ -1033,14 +1673,35 @@ "DONE", "ERROR", "ATTEMPT_FAILURE" + ] + }, + "substate": { + "enumDescriptions": [ + "", + "The Job is submitted to the agent.Applies to RUNNING state.", + "The Job has been received and is awaiting execution (it may be waiting for a condition to be met). See the \"details\" field for the reason for the delay.Applies to RUNNING state.", + "The agent-reported status is out of date, which may be caused by a loss of communication between the agent and Cloud Dataproc. If the agent does not send a timely update, the job will fail.Applies to RUNNING state." ], - "description": "Output-only. A state message specifying the overall job state.", + "enum": [ + "UNSPECIFIED", + "SUBMITTED", + "QUEUED", + "STALE_STATUS" + ], + "description": "Output-only. Additional state information, which includes status reported by the agent.", + "type": "string" + }, + "stateStartTime": { + "format": "google-datetime", + "description": "Output-only. The time when this state was entered.", "type": "string" } - } + }, + "id": "JobStatus", + "description": "Cloud Dataproc job status.", + "type": "object" }, "ManagedGroupConfig": { - "description": "Specifies the resources used to actively manage an instance group.", "type": "object", "properties": { "instanceGroupManagerName": { @@ -1052,27 +1713,45 @@ "type": "string" } }, - "id": "ManagedGroupConfig" + "id": "ManagedGroupConfig", + "description": "Specifies the resources used to actively manage an instance group." + }, + "LifecycleConfig": { + "description": "Specifies the cluster auto delete related schedule configuration.", + "type": "object", + "properties": { + "autoDeleteTtl": { + "format": "google-duration", + "description": "Optional. The life duration of cluster, the cluster will be auto-deleted at the end of this duration.", + "type": "string" + }, + "autoDeleteTime": { + "format": "google-datetime", + "description": "Optional. The time when cluster will be auto-deleted.", + "type": "string" + }, + "idleDeleteTtl": { + "format": "google-duration", + "description": "Optional. The longest duration that cluster would keep alive while staying idle; passing this threshold will cause cluster to be auto-deleted.", + "type": "string" + } + }, + "id": "LifecycleConfig" }, "ClusterOperationStatus": { + "description": "The status of the operation.", "type": "object", "properties": { "stateStartTime": { - "type": "string", "format": "google-datetime", - "description": "Output-only. The time this state was entered." + "description": "Output-only. The time this state was entered.", + "type": "string" }, "details": { "description": "Output-only.A message containing any operation metadata details.", "type": "string" }, "state": { - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "DONE" - ], "description": "Output-only. A message containing the operation state.", "type": "string", "enumDescriptions": [ @@ -1080,6 +1759,12 @@ "The operation has been created.", "The operation is running.", "The operation is done; either cancelled or completed." + ], + "enum": [ + "UNKNOWN", + "PENDING", + "RUNNING", + "DONE" ] }, "innerState": { @@ -1087,13 +1772,93 @@ "type": "string" } }, - "id": "ClusterOperationStatus", - "description": "The status of the operation." + "id": "ClusterOperationStatus" + }, + "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).", + "type": "object", + "properties": { + "jarFileUris": { + "description": "Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.", + "items": { + "type": "string" + }, + "type": "array" + }, + "loggingConfig": { + "$ref": "LoggingConfig", + "description": "Optional. The runtime log config for job execution." + }, + "properties": { + "description": "Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "args": { + "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "items": { + "type": "string" + }, + "type": "array" + }, + "fileUris": { + "description": "Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mainClass": { + "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.", + "type": "string" + }, + "archiveUris": { + "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mainJarFileUri": { + "description": "The HCFS URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'", + "type": "string" + } + }, + "id": "HadoopJob" + }, + "QueryList": { + "description": "A list of queries to run on a cluster.", + "type": "object", + "properties": { + "queries": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Required. The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob:\n\"hiveJob\": {\n \"queryList\": {\n \"queries\": [\n \"query1\",\n \"query2\",\n \"query3;query4\",\n ]\n }\n}\n" + } + }, + "id": "QueryList" }, "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.", "type": "object", "properties": { + "name": { + "description": "Required. The application name.", + "type": "string" + }, + "trackingUrl": { + "description": "Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.", + "type": "string" + }, + "progress": { + "format": "float", + "description": "Required. The numerical progress of the application, from 1 to 100.", + "type": "number" + }, "state": { "enumDescriptions": [ "Status is unspecified.", @@ -1119,754 +1884,16 @@ ], "description": "Required. The application state.", "type": "string" - }, - "name": { - "description": "Required. The application name.", - "type": "string" - }, - "trackingUrl": { - "description": "Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.", - "type": "string" - }, - "progress": { - "type": "number", - "format": "float", - "description": "Required. The numerical progress of the application, from 1 to 100." } }, "id": "YarnApplication" - }, - "QueryList": { - "description": "A list of queries to run on a cluster.", - "type": "object", - "properties": { - "queries": { - "description": "Required. The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob:\n\"hiveJob\": {\n \"queryList\": {\n \"queries\": [\n \"query1\",\n \"query2\",\n \"query3;query4\",\n ]\n }\n}\n", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "QueryList" - }, - "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).", - "type": "object", - "properties": { - "jarFileUris": { - "description": "Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.", - "items": { - "type": "string" - }, - "type": "array" - }, - "loggingConfig": { - "description": "Optional. The runtime log config for job execution.", - "$ref": "LoggingConfig" - }, - "properties": { - "description": "Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "args": { - "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "items": { - "type": "string" - }, - "type": "array" - }, - "fileUris": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks." - }, - "mainClass": { - "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.", - "type": "string" - }, - "archiveUris": { - "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.", - "items": { - "type": "string" - }, - "type": "array" - }, - "mainJarFileUri": { - "description": "The HCFS URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'", - "type": "string" - } - }, - "id": "HadoopJob" - }, - "DiagnoseClusterRequest": { - "description": "A request to collect cluster diagnostic information.", - "type": "object", - "properties": {}, - "id": "DiagnoseClusterRequest" - }, - "DiskConfig": { - "description": "Specifies the config of disk options for a group of VM instances.", - "type": "object", - "properties": { - "bootDiskSizeGb": { - "format": "int32", - "description": "Optional. Size in GB of the boot disk (default is 500GB).", - "type": "integer" - }, - "numLocalSsds": { - "format": "int32", - "description": "Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.", - "type": "integer" - } - }, - "id": "DiskConfig" - }, - "ClusterOperationMetadata": { - "id": "ClusterOperationMetadata", - "description": "Metadata describing the operation.", - "type": "object", - "properties": { - "operationType": { - "type": "string", - "description": "Output-only. The operation type." - }, - "description": { - "description": "Output-only. Short description of operation.", - "type": "string" - }, - "warnings": { - "description": "Output-only. Errors encountered during operation execution.", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Output-only. Labels associated with the operation", - "type": "object" - }, - "status": { - "$ref": "ClusterOperationStatus", - "description": "Output-only. Current operation status." - }, - "statusHistory": { - "description": "Output-only. The previous operation status.", - "items": { - "$ref": "ClusterOperationStatus" - }, - "type": "array" - }, - "clusterUuid": { - "description": "Output-only. Cluster UUID for the operation.", - "type": "string" - }, - "clusterName": { - "description": "Output-only. Name of the cluster for the operation.", - "type": "string" - } - } - }, - "HiveJob": { - "description": "A Cloud Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN.", - "type": "object", - "properties": { - "continueOnFailure": { - "type": "boolean", - "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries." - }, - "queryFileUri": { - "description": "The HCFS URI of the script that contains Hive queries.", - "type": "string" - }, - "queryList": { - "description": "A list of queries.", - "$ref": "QueryList" - }, - "jarFileUris": { - "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "scriptVariables": { - "description": "Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=\"value\";).", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", - "type": "object" - } - }, - "id": "HiveJob" - }, - "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 {}.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "DiagnoseClusterResults": { - "id": "DiagnoseClusterResults", - "description": "The location of diagnostic output.", - "type": "object", - "properties": { - "outputUri": { - "description": "Output-only. The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics.", - "type": "string" - } - } - }, - "ClusterConfig": { - "description": "The cluster config.", - "type": "object", - "properties": { - "initializationActions": { - "description": "Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's \u003ccode\u003erole\u003c/code\u003e metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):\nROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-role)\nif [[ \"${ROLE}\" == 'Master' ]]; then\n ... master specific actions ...\nelse\n ... worker specific actions ...\nfi\n", - "items": { - "$ref": "NodeInitializationAction" - }, - "type": "array" - }, - "configBucket": { - "description": "Optional. A Google 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" - }, - "workerConfig": { - "$ref": "InstanceGroupConfig", - "description": "Optional. The Google Compute Engine config settings for worker instances in a cluster." - }, - "gceClusterConfig": { - "$ref": "GceClusterConfig", - "description": "Required. The shared Google Compute Engine config settings for all instances in a cluster." - }, - "softwareConfig": { - "$ref": "SoftwareConfig", - "description": "Optional. The config settings for software inside the cluster." - }, - "masterConfig": { - "description": "Optional. The Google Compute Engine config settings for the master instance in a cluster.", - "$ref": "InstanceGroupConfig" - }, - "secondaryWorkerConfig": { - "$ref": "InstanceGroupConfig", - "description": "Optional. The Google Compute Engine config settings for additional worker instances in a cluster." - } - }, - "id": "ClusterConfig" - }, - "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.", - "type": "object", - "properties": { - "jarFileUris": { - "description": "Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.", - "items": { - "type": "string" - }, - "type": "array" - }, - "loggingConfig": { - "description": "Optional. The runtime log config for job execution.", - "$ref": "LoggingConfig" - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code." - }, - "args": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission." - }, - "fileUris": { - "description": "Optional. HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks.", - "items": { - "type": "string" - }, - "type": "array" - }, - "pythonFileUris": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip." - }, - "mainPythonFileUri": { - "description": "Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file.", - "type": "string" - }, - "archiveUris": { - "description": "Optional. HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "PySparkJob" - }, - "GceClusterConfig": { - "type": "object", - "properties": { - "internalIpOnly": { - "description": "Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.", - "type": "boolean" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "description": "The Google Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).", - "type": "object" - }, - "serviceAccountScopes": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Optional. The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included:\nhttps://www.googleapis.com/auth/cloud.useraccounts.readonly\nhttps://www.googleapis.com/auth/devstorage.read_write\nhttps://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided:\nhttps://www.googleapis.com/auth/bigquery\nhttps://www.googleapis.com/auth/bigtable.admin.table\nhttps://www.googleapis.com/auth/bigtable.data\nhttps://www.googleapis.com/auth/devstorage.full_control" - }, - "tags": { - "description": "The Google Compute Engine tags to add to all instances (see Tagging instances).", - "items": { - "type": "string" - }, - "type": "array" - }, - "serviceAccount": { - "description": "Optional. The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com", - "type": "string" - }, - "subnetworkUri": { - "description": "Optional. The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0\nprojects/[project_id]/regions/us-east1/sub0\nsub0", - "type": "string" - }, - "networkUri": { - "type": "string", - "description": "Optional. The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default\nprojects/[project_id]/regions/global/default\ndefault" - }, - "zoneUri": { - "description": "Optional. The zone where the Google Compute Engine cluster will be located. On a create request, it is required in the \"global\" region. If omitted in a non-global Cloud Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]\nprojects/[project_id]/zones/[zone]\nus-central1-f", - "type": "string" - } - }, - "id": "GceClusterConfig", - "description": "Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster." - }, - "AcceleratorConfig": { - "description": "Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine).", - "type": "object", - "properties": { - "acceleratorCount": { - "format": "int32", - "description": "The number of the accelerator cards of this type exposed to this instance.", - "type": "integer" - }, - "acceleratorTypeUri": { - "description": "Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)Examples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80", - "type": "string" - } - }, - "id": "AcceleratorConfig" - }, - "ClusterMetrics": { - "properties": { - "yarnMetrics": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "The YARN metrics.", - "type": "object" - }, - "hdfsMetrics": { - "type": "object", - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "The HDFS metrics." - } - }, - "id": "ClusterMetrics", - "description": "Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", - "type": "object" - }, - "LoggingConfig": { - "properties": { - "driverLogLevels": { - "additionalProperties": { - "type": "string", - "enum": [ - "LEVEL_UNSPECIFIED", - "ALL", - "TRACE", - "DEBUG", - "INFO", - "WARN", - "ERROR", - "FATAL", - "OFF" - ] - }, - "description": "The per-package log levels for the driver. This may include \"root\" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'", - "type": "object" - } - }, - "id": "LoggingConfig", - "description": "The runtime logging config of the job.", - "type": "object" - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a network API call.", - "type": "object", - "properties": { - "done": { - "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", - "type": "boolean" - }, - "response": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse." - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", - "type": "string" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object" - } - }, - "id": "Operation" - }, - "JobReference": { - "type": "object", - "properties": { - "jobId": { - "description": "Optional. The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.", - "type": "string" - }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string" - } - }, - "id": "JobReference", - "description": "Encapsulates the full scoping used to reference a job." - }, - "SubmitJobRequest": { - "description": "A request to submit a job.", - "type": "object", - "properties": { - "job": { - "description": "Required. The job resource.", - "$ref": "Job" - } - }, - "id": "SubmitJobRequest" - }, - "Status": { - "type": "object", - "properties": { - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "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" - }, - "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" - } - }, - "id": "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." - }, - "JobScheduling": { - "type": "object", - "properties": { - "maxFailuresPerHour": { - "format": "int32", - "description": "Optional. Maximum number of times per hour a driver may be restarted as a result of driver terminating with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.", - "type": "integer" - } - }, - "id": "JobScheduling", - "description": "Job scheduling options.Beta Feature: These options are available for testing purposes only. They may be changed before final release." - }, - "InstanceGroupConfig": { - "description": "Optional. The config settings for Google Compute Engine resources in an instance group, such as a master or worker group.", - "type": "object", - "properties": { - "managedGroupConfig": { - "description": "Output-only. The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.", - "$ref": "ManagedGroupConfig" - }, - "isPreemptible": { - "description": "Optional. Specifies that this instance group contains preemptible instances.", - "type": "boolean" - }, - "imageUri": { - "description": "Output-only. The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version.", - "type": "string" - }, - "machineTypeUri": { - "description": "Optional. The Google Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nprojects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nn1-standard-2", - "type": "string" - }, - "instanceNames": { - "description": "Optional. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).", - "items": { - "type": "string" - }, - "type": "array" - }, - "accelerators": { - "description": "Optional. The Google Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "numInstances": { - "format": "int32", - "description": "Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.", - "type": "integer" - }, - "diskConfig": { - "description": "Optional. Disk option config settings.", - "$ref": "DiskConfig" - } - }, - "id": "InstanceGroupConfig" - }, - "ListJobsResponse": { - "description": "A list of jobs in a project.", - "type": "object", - "properties": { - "jobs": { - "description": "Output-only. Jobs list.", - "items": { - "$ref": "Job" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Optional. 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\u003eListJobsRequest\u003c/code\u003e.", - "type": "string" - } - }, - "id": "ListJobsResponse" - }, - "NodeInitializationAction": { - "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion.", - "type": "object", - "properties": { - "executableFile": { - "description": "Required. Google Cloud Storage URI of executable file.", - "type": "string" - }, - "executionTimeout": { - "format": "google-duration", - "description": "Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.", - "type": "string" - } - }, - "id": "NodeInitializationAction" - }, - "CancelJobRequest": { - "description": "A request to cancel a job.", - "type": "object", - "properties": {}, - "id": "CancelJobRequest" - }, - "SparkSqlJob": { - "properties": { - "properties": { - "description": "Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "queryFileUri": { - "description": "The HCFS URI of the script that contains SQL queries.", - "type": "string" - }, - "jarFileUris": { - "description": "Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.", - "items": { - "type": "string" - }, - "type": "array" - }, - "scriptVariables": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=\"value\";)." - }, - "loggingConfig": { - "$ref": "LoggingConfig", - "description": "Optional. The runtime log config for job execution." - } - }, - "id": "SparkSqlJob", - "description": "A Cloud Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries.", - "type": "object" - }, - "Cluster": { - "type": "object", - "properties": { - "config": { - "description": "Required. The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated.", - "$ref": "ClusterConfig" - }, - "statusHistory": { - "description": "Output-only. The previous cluster status.", - "items": { - "$ref": "ClusterStatus" - }, - "type": "array" - }, - "clusterName": { - "description": "Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.", - "type": "string" - }, - "clusterUuid": { - "description": "Output-only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.", - "type": "string" - }, - "projectId": { - "description": "Required. The Google Cloud Platform project ID that the cluster belongs to.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. The labels to associate with this cluster. 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 cluster.", - "type": "object" - }, - "status": { - "$ref": "ClusterStatus", - "description": "Output-only. Cluster status." - }, - "metrics": { - "description": "Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", - "$ref": "ClusterMetrics" - } - }, - "id": "Cluster", - "description": "Describes the identifying information, config, and status of a cluster of Google Compute Engine instances." - }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - } - }, - "id": "ListOperationsResponse" - }, - "SoftwareConfig": { - "description": "Specifies the selection and config of software inside the cluster.", - "type": "object", - "properties": { - "imageVersion": { - "description": "Optional. The version of software inside the cluster. It must match the regular expression [0-9]+\\.[0-9]+. If unspecified, it defaults to the latest version (see Cloud Dataproc Versioning).", - "type": "string" - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, such as core:fs.defaultFS. The following are supported prefixes and their mappings:\ncapacity-scheduler: capacity-scheduler.xml\ncore: core-site.xml\ndistcp: distcp-default.xml\nhdfs: hdfs-site.xml\nhive: hive-site.xml\nmapred: mapred-site.xml\npig: pig.properties\nspark: spark-defaults.conf\nyarn: yarn-site.xml", - "type": "object" - } - }, - "id": "SoftwareConfig" - }, - "JobPlacement": { - "description": "Cloud Dataproc job config.", - "type": "object", - "properties": { - "clusterUuid": { - "description": "Output-only. A cluster UUID generated by the Cloud Dataproc service when the job is submitted.", - "type": "string" - }, - "clusterName": { - "description": "Required. The name of the cluster where the job will be submitted.", - "type": "string" - } - }, - "id": "JobPlacement" } }, + "protocol": "rest", "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "protocol": "rest", "version": "v1beta2", "baseUrl": "https://dataproc.googleapis.com/", "auth": { @@ -1886,11 +1913,10 @@ "ownerDomain": "google.com", "name": "dataproc", "batchPath": "batch", + "revision": "20170822", "id": "dataproc:v1beta2", "documentationLink": "https://cloud.google.com/dataproc/", - "revision": "20170801", "title": "Google Cloud Dataproc API", "discoveryVersion": "v1", - "ownerName": "Google", - "version_module": true + "ownerName": "Google" } diff --git a/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-gen.go b/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-gen.go index 3550c6e5e..78b463499 100644 --- a/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-gen.go +++ b/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-gen.go @@ -272,6 +272,10 @@ type ClusterConfig struct { // InitializationActions []*NodeInitializationAction `json:"initializationActions,omitempty"` + // LifecycleConfig: Optional. The config setting for auto delete cluster + // schedule. + LifecycleConfig *LifecycleConfig `json:"lifecycleConfig,omitempty"` + // MasterConfig: Optional. The Google Compute Engine config settings for // the master instance in a cluster. MasterConfig *InstanceGroupConfig `json:"masterConfig,omitempty"` @@ -1162,6 +1166,45 @@ func (s *JobStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LifecycleConfig: Specifies the cluster auto delete related schedule +// configuration. +type LifecycleConfig struct { + // AutoDeleteTime: Optional. The time when cluster will be auto-deleted. + AutoDeleteTime string `json:"autoDeleteTime,omitempty"` + + // AutoDeleteTtl: Optional. The life duration of cluster, the cluster + // will be auto-deleted at the end of this duration. + AutoDeleteTtl string `json:"autoDeleteTtl,omitempty"` + + // IdleDeleteTtl: Optional. The longest duration that cluster would keep + // alive while staying idle; passing this threshold will cause cluster + // to be auto-deleted. + IdleDeleteTtl string `json:"idleDeleteTtl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AutoDeleteTime") 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. "AutoDeleteTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LifecycleConfig) MarshalJSON() ([]byte, error) { + type noMethod LifecycleConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListClustersResponse: The list of all clusters in a project. type ListClustersResponse struct { // Clusters: Output-only. The clusters in the project. @@ -1623,7 +1666,7 @@ type SoftwareConfig struct { // mapred: mapred-site.xml // pig: pig.properties // spark: spark-defaults.conf - // yarn: yarn-site.xml + // yarn: yarn-site.xmlFor more information, see Cluster properties. Properties map[string]string `json:"properties,omitempty"` // ForceSendFields is a list of field names (e.g. "ImageVersion") to diff --git a/vendor/google.golang.org/api/datastore/v1/datastore-api.json b/vendor/google.golang.org/api/datastore/v1/datastore-api.json index b014a1182..a26cadc5c 100644 --- a/vendor/google.golang.org/api/datastore/v1/datastore-api.json +++ b/vendor/google.golang.org/api/datastore/v1/datastore-api.json @@ -1,41 +1,9 @@ { - "version": "v1", - "baseUrl": "https://datastore.googleapis.com/", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/datastore": { - "description": "View and manage your Google Cloud Datastore data" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "kind": "discovery#restDescription", - "description": "Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.\n", - "servicePath": "", - "rootUrl": "https://datastore.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "datastore", - "batchPath": "batch", - "id": "datastore:v1", - "documentationLink": "https://cloud.google.com/datastore/", - "revision": "20170711", - "title": "Google Cloud Datastore API", - "ownerName": "Google", - "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "resources": { "projects": { "methods": { "allocateIds": { - "request": { - "$ref": "AllocateIdsRequest" - }, - "description": "Allocates IDs for the given keys, which is useful for referencing an entity\nbefore it is inserted.", "httpMethod": "POST", "parameterOrder": [ "projectId" @@ -57,13 +25,48 @@ }, "flatPath": "v1/projects/{projectId}:allocateIds", "path": "v1/projects/{projectId}:allocateIds", - "id": "datastore.projects.allocateIds" + "id": "datastore.projects.allocateIds", + "request": { + "$ref": "AllocateIdsRequest" + }, + "description": "Allocates IDs for the given keys, which is useful for referencing an entity\nbefore it is inserted." + }, + "commit": { + "description": "Commits a transaction, optionally creating, deleting or modifying some\nentities.", + "request": { + "$ref": "CommitRequest" + }, + "response": { + "$ref": "CommitResponse" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "location": "path", + "description": "The ID of the project against which to make the request.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], + "flatPath": "v1/projects/{projectId}:commit", + "id": "datastore.projects.commit", + "path": "v1/projects/{projectId}:commit" }, "beginTransaction": { + "flatPath": "v1/projects/{projectId}:beginTransaction", + "id": "datastore.projects.beginTransaction", + "path": "v1/projects/{projectId}:beginTransaction", + "description": "Begins a new transaction.", "request": { "$ref": "BeginTransactionRequest" }, - "description": "Begins a new transaction.", "response": { "$ref": "BeginTransactionResponse" }, @@ -71,51 +74,22 @@ "projectId" ], "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore" - ], "parameters": { "projectId": { - "type": "string", - "required": true, "location": "path", - "description": "The ID of the project against which to make the request." + "description": "The ID of the project against which to make the request.", + "type": "string", + "required": true } }, - "flatPath": "v1/projects/{projectId}:beginTransaction", - "id": "datastore.projects.beginTransaction", - "path": "v1/projects/{projectId}:beginTransaction" - }, - "commit": { - "path": "v1/projects/{projectId}:commit", - "id": "datastore.projects.commit", - "request": { - "$ref": "CommitRequest" - }, - "description": "Commits a transaction, optionally creating, deleting or modifying some\nentities.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "CommitResponse" - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/datastore" - ], - "parameters": { - "projectId": { - "type": "string", - "required": true, - "location": "path", - "description": "The ID of the project against which to make the request." - } - }, - "flatPath": "v1/projects/{projectId}:commit" + ] }, "runQuery": { + "path": "v1/projects/{projectId}:runQuery", + "id": "datastore.projects.runQuery", "description": "Queries for entities.", "request": { "$ref": "RunQueryRequest" @@ -127,36 +101,6 @@ "response": { "$ref": "RunQueryResponse" }, - "parameters": { - "projectId": { - "location": "path", - "description": "The ID of the project against which to make the request.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore" - ], - "flatPath": "v1/projects/{projectId}:runQuery", - "path": "v1/projects/{projectId}:runQuery", - "id": "datastore.projects.runQuery" - }, - "rollback": { - "id": "datastore.projects.rollback", - "path": "v1/projects/{projectId}:rollback", - "description": "Rolls back a transaction.", - "request": { - "$ref": "RollbackRequest" - }, - "response": { - "$ref": "RollbackResponse" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "POST", "parameters": { "projectId": { "description": "The ID of the project against which to make the request.", @@ -169,7 +113,35 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/datastore" ], - "flatPath": "v1/projects/{projectId}:rollback" + "flatPath": "v1/projects/{projectId}:runQuery" + }, + "rollback": { + "response": { + "$ref": "RollbackResponse" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The ID of the project against which to make the request.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectId}:rollback", + "id": "datastore.projects.rollback", + "path": "v1/projects/{projectId}:rollback", + "request": { + "$ref": "RollbackRequest" + }, + "description": "Rolls back a transaction." }, "lookup": { "response": { @@ -179,54 +151,214 @@ "projectId" ], "httpMethod": "POST", - "parameters": { - "projectId": { - "type": "string", - "required": true, - "location": "path", - "description": "The ID of the project against which to make the request." - } - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/datastore" ], + "parameters": { + "projectId": { + "location": "path", + "description": "The ID of the project against which to make the request.", + "type": "string", + "required": true + } + }, "flatPath": "v1/projects/{projectId}:lookup", "id": "datastore.projects.lookup", "path": "v1/projects/{projectId}:lookup", - "description": "Looks up entities by key.", "request": { "$ref": "LookupRequest" + }, + "description": "Looks up entities by key." + } + }, + "resources": { + "operations": { + "methods": { + "get": { + "httpMethod": "GET", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/operations/[^/]+$", + "location": "path", + "description": "The name of the operation resource.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/operations/{operationsId}", + "path": "v1/{+name}", + "id": "datastore.projects.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + }, + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], + "flatPath": "v1/projects/{projectsId}/operations", + "path": "v1/{+name}/operations", + "id": "datastore.projects.operations.list", + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id." + }, + "cancel": { + "httpMethod": "POST", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource to be cancelled.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/operations/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/operations/{operationsId}:cancel", + "path": "v1/{+name}:cancel", + "id": "datastore.projects.operations.cancel", + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`." + }, + "delete": { + "flatPath": "v1/projects/{projectsId}/operations/{operationsId}", + "id": "datastore.projects.operations.delete", + "path": "v1/{+name}", + "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/operations/[^/]+$", + "location": "path" + } + } + } } } } } }, "parameters": { - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "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.", "type": "string", "location": "query" }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, "prettyPrint": { "description": "Returns response with indentations and line breaks.", "default": "true", "type": "boolean", "location": "query" }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, "fields": { + "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" }, "$.xgafv": { - "description": "V1 error format.", - "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -235,17 +367,11 @@ "enum": [ "1", "2" - ] - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" + ], + "description": "V1 error format.", + "type": "string" }, "alt": { - "location": "query", - "description": "Data format for response.", - "default": "json", "enum": [ "json", "media", @@ -256,477 +382,13 @@ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" - ] - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "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.", - "type": "string", - "location": "query" - }, - "quotaUser": { - "type": "string", + ], "location": "query", - "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." - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" + "description": "Data format for response.", + "default": "json" } }, "schemas": { - "PathElement": { - "description": "A (kind, ID/name) pair used to construct a key path.\n\nIf either name or ID is set, the element is complete.\nIf neither is set, the element is incomplete.", - "type": "object", - "properties": { - "kind": { - "description": "The kind of the entity.\nA kind matching regex `__.*__` is reserved/read-only.\nA kind must not contain more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.", - "type": "string" - }, - "id": { - "format": "int64", - "description": "The auto-allocated ID of the entity.\nNever equal to zero. Values less than zero are discouraged and may not\nbe supported in the future.", - "type": "string" - }, - "name": { - "description": "The name of the entity.\nA name matching regex `__.*__` is reserved/read-only.\nA name must not be more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.", - "type": "string" - } - }, - "id": "PathElement" - }, - "GqlQueryParameter": { - "description": "A binding parameter for a GQL query.", - "type": "object", - "properties": { - "cursor": { - "format": "byte", - "description": "A query cursor. Query cursors are returned in query\nresult batches.", - "type": "string" - }, - "value": { - "$ref": "Value", - "description": "A value parameter." - } - }, - "id": "GqlQueryParameter" - }, - "BeginTransactionResponse": { - "description": "The response for Datastore.BeginTransaction.", - "type": "object", - "properties": { - "transaction": { - "format": "byte", - "description": "The transaction identifier (always present).", - "type": "string" - } - }, - "id": "BeginTransactionResponse" - }, - "AllocateIdsRequest": { - "description": "The request for Datastore.AllocateIds.", - "type": "object", - "properties": { - "keys": { - "description": "A list of keys with incomplete key paths for which to allocate IDs.\nNo key may be reserved/read-only.", - "items": { - "$ref": "Key" - }, - "type": "array" - } - }, - "id": "AllocateIdsRequest" - }, - "LookupResponse": { - "type": "object", - "properties": { - "deferred": { - "description": "A list of keys that were not looked up due to resource constraints. The\norder of results in this field is undefined and has no relation to the\norder of the keys in the input.", - "items": { - "$ref": "Key" - }, - "type": "array" - }, - "missing": { - "description": "Entities not found as `ResultType.KEY_ONLY` entities. The order of results\nin this field is undefined and has no relation to the order of the keys\nin the input.", - "items": { - "$ref": "EntityResult" - }, - "type": "array" - }, - "found": { - "description": "Entities found as `ResultType.FULL` entities. The order of results in this\nfield is undefined and has no relation to the order of the keys in the\ninput.", - "items": { - "$ref": "EntityResult" - }, - "type": "array" - } - }, - "id": "LookupResponse", - "description": "The response for Datastore.Lookup." - }, - "RunQueryResponse": { - "id": "RunQueryResponse", - "description": "The response for Datastore.RunQuery.", - "type": "object", - "properties": { - "query": { - "$ref": "Query", - "description": "The parsed form of the `GqlQuery` from the request, if it was set." - }, - "batch": { - "description": "A batch of query results (always present).", - "$ref": "QueryResultBatch" - } - } - }, - "CommitRequest": { - "description": "The request for Datastore.Commit.", - "type": "object", - "properties": { - "mode": { - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "Transactional: The mutations are either all applied, or none are applied.\nLearn about transactions [here](https://cloud.google.com/datastore/docs/concepts/transactions).", - "Non-transactional: The mutations may not apply as all or none." - ], - "enum": [ - "MODE_UNSPECIFIED", - "TRANSACTIONAL", - "NON_TRANSACTIONAL" - ], - "description": "The type of commit to perform. Defaults to `TRANSACTIONAL`.", - "type": "string" - }, - "mutations": { - "description": "The mutations to perform.\n\nWhen mode is `TRANSACTIONAL`, mutations affecting a single entity are\napplied in order. The following sequences of mutations affecting a single\nentity are not permitted in a single `Commit` request:\n\n- `insert` followed by `insert`\n- `update` followed by `insert`\n- `upsert` followed by `insert`\n- `delete` followed by `update`\n\nWhen mode is `NON_TRANSACTIONAL`, no two mutations may affect a single\nentity.", - "items": { - "$ref": "Mutation" - }, - "type": "array" - }, - "transaction": { - "format": "byte", - "description": "The identifier of the transaction associated with the commit. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.", - "type": "string" - } - }, - "id": "CommitRequest" - }, - "BeginTransactionRequest": { - "description": "The request for Datastore.BeginTransaction.", - "type": "object", - "properties": {}, - "id": "BeginTransactionRequest" - }, - "PropertyOrder": { - "id": "PropertyOrder", - "description": "The desired order for a specific property.", - "type": "object", - "properties": { - "direction": { - "enum": [ - "DIRECTION_UNSPECIFIED", - "ASCENDING", - "DESCENDING" - ], - "description": "The direction to order by. Defaults to `ASCENDING`.", - "type": "string", - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "Ascending.", - "Descending." - ] - }, - "property": { - "$ref": "PropertyReference", - "description": "The property to order by." - } - } - }, - "KindExpression": { - "id": "KindExpression", - "description": "A representation of a kind.", - "type": "object", - "properties": { - "name": { - "description": "The name of the kind.", - "type": "string" - } - } - }, - "LatLng": { - "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", - "type": "object", - "properties": { - "latitude": { - "format": "double", - "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", - "type": "number" - }, - "longitude": { - "format": "double", - "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", - "type": "number" - } - }, - "id": "LatLng" - }, - "Key": { - "description": "A unique identifier for an entity.\nIf a key's partition ID or any of its path kinds or names are\nreserved/read-only, the key is reserved/read-only.\nA reserved/read-only key is forbidden in certain documented contexts.", - "type": "object", - "properties": { - "path": { - "items": { - "$ref": "PathElement" - }, - "type": "array", - "description": "The entity path.\nAn entity path consists of one or more elements composed of a kind and a\nstring or numerical identifier, which identify entities. The first\nelement identifies a _root entity_, the second element identifies\na _child_ of the root entity, the third element identifies a child of the\nsecond entity, and so forth. The entities identified by all prefixes of\nthe path are called the element's _ancestors_.\n\nAn entity path is always fully complete: *all* of the entity's ancestors\nare required to be in the path along with the entity identifier itself.\nThe only exception is that in some documented cases, the identifier in the\nlast path element (for the entity) itself may be omitted. For example,\nthe last path element of the key of `Mutation.insert` may have no\nidentifier.\n\nA path can never be empty, and a path can have at most 100 elements." - }, - "partitionId": { - "$ref": "PartitionId", - "description": "Entities are partitioned into subsets, currently identified by a project\nID and namespace ID.\nQueries are scoped to a single partition." - } - }, - "id": "Key" - }, - "PropertyReference": { - "description": "A reference to a property relative to the kind expressions.", - "type": "object", - "properties": { - "name": { - "description": "The name of the property.\nIf name includes \".\"s, it may be interpreted as a property name path.", - "type": "string" - } - }, - "id": "PropertyReference" - }, - "Projection": { - "description": "A representation of a property in a projection.", - "type": "object", - "properties": { - "property": { - "$ref": "PropertyReference", - "description": "The property to project." - } - }, - "id": "Projection" - }, - "ArrayValue": { - "description": "An array value.", - "type": "object", - "properties": { - "values": { - "description": "Values in the array.\nThe order of this array may not be preserved if it contains a mix of\nindexed and unindexed values.", - "items": { - "$ref": "Value" - }, - "type": "array" - } - }, - "id": "ArrayValue" - }, - "Mutation": { - "description": "A mutation to apply to an entity.", - "type": "object", - "properties": { - "delete": { - "$ref": "Key", - "description": "The key of the entity to delete. The entity may or may not already exist.\nMust have a complete key path and must not be reserved/read-only." - }, - "baseVersion": { - "format": "int64", - "description": "The version of the entity that this mutation is being applied to. If this\ndoes not match the current version on the server, the mutation conflicts.", - "type": "string" - }, - "insert": { - "$ref": "Entity", - "description": "The entity to insert. The entity must not already exist.\nThe entity key's final path element may be incomplete." - }, - "update": { - "$ref": "Entity", - "description": "The entity to update. The entity must already exist.\nMust have a complete key path." - }, - "upsert": { - "$ref": "Entity", - "description": "The entity to upsert. The entity may or may not already exist.\nThe entity key's final path element may be incomplete." - } - }, - "id": "Mutation" - }, - "ReadOptions": { - "properties": { - "transaction": { - "format": "byte", - "description": "The identifier of the transaction in which to read. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.", - "type": "string" - }, - "readConsistency": { - "description": "The non-transactional read consistency to use.\nCannot be set to `STRONG` for global queries.", - "type": "string", - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "Strong consistency.", - "Eventual consistency." - ], - "enum": [ - "READ_CONSISTENCY_UNSPECIFIED", - "STRONG", - "EVENTUAL" - ] - } - }, - "id": "ReadOptions", - "description": "The options shared by read requests.", - "type": "object" - }, - "RollbackResponse": { - "id": "RollbackResponse", - "description": "The response for Datastore.Rollback.\n(an empty message).", - "type": "object", - "properties": {} - }, - "MutationResult": { - "description": "The result of applying a mutation.", - "type": "object", - "properties": { - "conflictDetected": { - "description": "Whether a conflict was detected for this mutation. Always false when a\nconflict detection strategy field is not set in the mutation.", - "type": "boolean" - }, - "key": { - "description": "The automatically allocated key.\nSet only when the mutation allocated a key.", - "$ref": "Key" - }, - "version": { - "format": "int64", - "description": "The version of the entity on the server after processing the mutation. If\nthe mutation doesn't change anything on the server, then the version will\nbe the version of the current entity or, if no entity is present, a version\nthat is strictly greater than the version of any previous entity and less\nthan the version of any possible future entity.", - "type": "string" - } - }, - "id": "MutationResult" - }, - "GqlQuery": { - "description": "A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).", - "type": "object", - "properties": { - "queryString": { - "description": "A string of the format described\n[here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).", - "type": "string" - }, - "positionalBindings": { - "items": { - "$ref": "GqlQueryParameter" - }, - "type": "array", - "description": "Numbered binding site @1 references the first numbered parameter,\neffectively using 1-based indexing, rather than the usual 0.\n\nFor each binding site numbered i in `query_string`, there must be an i-th\nnumbered parameter. The inverse must also be true." - }, - "namedBindings": { - "type": "object", - "additionalProperties": { - "$ref": "GqlQueryParameter" - }, - "description": "For each non-reserved named binding site in the query string, there must be\na named parameter with that name, but not necessarily the inverse.\n\nKey must match regex `A-Za-z_$*`, must not match regex\n`__.*__`, and must not be `\"\"`." - }, - "allowLiterals": { - "description": "When false, the query string must not contain any literals and instead must\nbind all values. For example,\n`SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while\n`SELECT * FROM Kind WHERE a = @value` is.", - "type": "boolean" - } - }, - "id": "GqlQuery" - }, - "Filter": { - "id": "Filter", - "description": "A holder for any type of filter.", - "type": "object", - "properties": { - "compositeFilter": { - "description": "A composite filter.", - "$ref": "CompositeFilter" - }, - "propertyFilter": { - "$ref": "PropertyFilter", - "description": "A filter on a property." - } - } - }, - "RunQueryRequest": { - "description": "The request for Datastore.RunQuery.", - "type": "object", - "properties": { - "readOptions": { - "$ref": "ReadOptions", - "description": "The options for this query." - }, - "query": { - "description": "The query to run.", - "$ref": "Query" - }, - "gqlQuery": { - "$ref": "GqlQuery", - "description": "The GQL query to run." - }, - "partitionId": { - "$ref": "PartitionId", - "description": "Entities are partitioned into subsets, identified by a partition ID.\nQueries are scoped to a single partition.\nThis partition ID is normalized with the standard default context\npartition ID." - } - }, - "id": "RunQueryRequest" - }, - "RollbackRequest": { - "description": "The request for Datastore.Rollback.", - "type": "object", - "properties": { - "transaction": { - "format": "byte", - "description": "The transaction identifier, returned by a call to\nDatastore.BeginTransaction.", - "type": "string" - } - }, - "id": "RollbackRequest" - }, - "CompositeFilter": { - "description": "A filter that merges multiple other filters using the given operator.", - "type": "object", - "properties": { - "filters": { - "description": "The list of filters to combine.\nMust contain at least one filter.", - "items": { - "$ref": "Filter" - }, - "type": "array" - }, - "op": { - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "The results are required to satisfy each of the combined filters." - ], - "enum": [ - "OPERATOR_UNSPECIFIED", - "AND" - ], - "description": "The operator for combining multiple filters.", - "type": "string" - } - }, - "id": "CompositeFilter" - }, "AllocateIdsResponse": { "description": "The response for Datastore.AllocateIds.", "type": "object", @@ -745,6 +407,30 @@ "description": "A query for entities.", "type": "object", "properties": { + "endCursor": { + "format": "byte", + "description": "An ending point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", + "type": "string" + }, + "filter": { + "description": "The filter to apply.", + "$ref": "Filter" + }, + "limit": { + "format": "int32", + "description": "The maximum number of results to return. Applies after all other\nconstraints. Optional.\nUnspecified is interpreted as no limit.\nMust be \u003e= 0 if specified.", + "type": "integer" + }, + "offset": { + "format": "int32", + "description": "The number of results to skip. Applies before limit, but after all other\nconstraints. Optional. Must be \u003e= 0 if specified.", + "type": "integer" + }, + "startCursor": { + "format": "byte", + "description": "A starting point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", + "type": "string" + }, "kind": { "description": "The kinds to query (if empty, returns entities of all kinds).\nCurrently at most 1 kind may be specified.", "items": { @@ -772,38 +458,52 @@ "$ref": "Projection" }, "type": "array" - }, - "endCursor": { - "format": "byte", - "description": "An ending point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", - "type": "string" - }, - "filter": { - "description": "The filter to apply.", - "$ref": "Filter" - }, - "limit": { - "format": "int32", - "description": "The maximum number of results to return. Applies after all other\nconstraints. Optional.\nUnspecified is interpreted as no limit.\nMust be \u003e= 0 if specified.", - "type": "integer" - }, - "offset": { - "format": "int32", - "description": "The number of results to skip. Applies before limit, but after all other\nconstraints. Optional. Must be \u003e= 0 if specified.", - "type": "integer" - }, - "startCursor": { - "format": "byte", - "description": "A starting point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", - "type": "string" } }, "id": "Query" }, - "PropertyFilter": { - "id": "PropertyFilter", - "description": "A filter on a specific property.", + "GoogleLongrunningOperation": { + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" + }, + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object" + } + }, + "id": "GoogleLongrunningOperation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object" + }, + "ReadOnly": { + "description": "Options specific to read-only transactions.", "type": "object", + "properties": {}, + "id": "ReadOnly" + }, + "PropertyFilter": { "properties": { "value": { "$ref": "Value", @@ -814,8 +514,6 @@ "description": "The property to filter by." }, "op": { - "description": "The operator to filter by.", - "type": "string", "enumDescriptions": [ "Unspecified. This value must not be used.", "Less than.", @@ -833,9 +531,14 @@ "GREATER_THAN_OR_EQUAL", "EQUAL", "HAS_ANCESTOR" - ] + ], + "description": "The operator to filter by.", + "type": "string" } - } + }, + "id": "PropertyFilter", + "description": "A filter on a specific property.", + "type": "object" }, "EntityResult": { "description": "The result of fetching an entity from Datastore.", @@ -858,31 +561,27 @@ }, "id": "EntityResult" }, - "Value": { - "description": "A message that can hold any of the supported value types and associated\nmetadata.", + "CommitResponse": { + "description": "The response for Datastore.Commit.", "type": "object", "properties": { - "entityValue": { - "description": "An entity value.\n\n- May have no key.\n- May have a key with an incomplete key path.\n- May have a reserved/read-only key.", - "$ref": "Entity" - }, - "geoPointValue": { - "description": "A geo point value representing a point on the surface of Earth.", - "$ref": "LatLng" - }, - "integerValue": { - "format": "int64", - "description": "An integer value.", - "type": "string" - }, - "keyValue": { - "$ref": "Key", - "description": "A key value." - }, - "stringValue": { - "description": "A UTF-8 encoded string value.\nWhen `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.\nOtherwise, may be set to at least 1,000,000 bytes.", - "type": "string" + "indexUpdates": { + "format": "int32", + "description": "The number of index entries updated during the commit, or zero if none were\nupdated.", + "type": "integer" }, + "mutationResults": { + "description": "The result of performing the mutations.\nThe i-th mutation result corresponds to the i-th mutation in the request.", + "items": { + "$ref": "MutationResult" + }, + "type": "array" + } + }, + "id": "CommitResponse" + }, + "Value": { + "properties": { "excludeFromIndexes": { "description": "If the value should be excluded from all indexes including those defined\nexplicitly.", "type": "boolean" @@ -897,19 +596,19 @@ "description": "A timestamp value.\nWhen stored in the Datastore, precise only to microseconds;\nany additional precision is rounded down.", "type": "string" }, - "booleanValue": { - "description": "A boolean value.", - "type": "boolean" - }, "nullValue": { - "type": "string", - "enumDescriptions": [ - "Null value." - ], "enum": [ "NULL_VALUE" ], - "description": "A null value." + "description": "A null value.", + "type": "string", + "enumDescriptions": [ + "Null value." + ] + }, + "booleanValue": { + "description": "A boolean value.", + "type": "boolean" }, "blobValue": { "format": "byte", @@ -922,86 +621,124 @@ "type": "integer" }, "arrayValue": { - "$ref": "ArrayValue", - "description": "An array value.\nCannot contain another array value.\nA `Value` instance that sets field `array_value` must not set fields\n`meaning` or `exclude_from_indexes`." - } - }, - "id": "Value" - }, - "CommitResponse": { - "description": "The response for Datastore.Commit.", - "type": "object", - "properties": { - "mutationResults": { - "description": "The result of performing the mutations.\nThe i-th mutation result corresponds to the i-th mutation in the request.", - "items": { - "$ref": "MutationResult" - }, - "type": "array" + "description": "An array value.\nCannot contain another array value.\nA `Value` instance that sets field `array_value` must not set fields\n`meaning` or `exclude_from_indexes`.", + "$ref": "ArrayValue" }, - "indexUpdates": { - "format": "int32", - "description": "The number of index entries updated during the commit, or zero if none were\nupdated.", - "type": "integer" + "entityValue": { + "$ref": "Entity", + "description": "An entity value.\n\n- May have no key.\n- May have a key with an incomplete key path.\n- May have a reserved/read-only key." + }, + "geoPointValue": { + "$ref": "LatLng", + "description": "A geo point value representing a point on the surface of Earth." + }, + "keyValue": { + "description": "A key value.", + "$ref": "Key" + }, + "integerValue": { + "format": "int64", + "description": "An integer value.", + "type": "string" + }, + "stringValue": { + "description": "A UTF-8 encoded string value.\nWhen `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.\nOtherwise, may be set to at least 1,000,000 bytes.", + "type": "string" } }, - "id": "CommitResponse" + "id": "Value", + "description": "A message that can hold any of the supported value types and associated\nmetadata.", + "type": "object" }, "PartitionId": { - "description": "A partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty.\n\nA partition ID contains several dimensions:\nproject ID and namespace ID.\n\nPartition dimensions:\n\n- May be `\"\"`.\n- Must be valid UTF-8 bytes.\n- Must have values that match regex `[A-Za-z\\d\\.\\-_]{1,100}`\nIf the value of any dimension matches regex `__.*__`, the partition is\nreserved/read-only.\nA reserved/read-only partition ID is forbidden in certain documented\ncontexts.\n\nForeign partition IDs (in which the project ID does\nnot match the context project ID ) are discouraged.\nReads and writes of foreign partition IDs may fail if the project is not in an active state.", - "type": "object", "properties": { "projectId": { "description": "The ID of the project to which the entities belong.", "type": "string" }, "namespaceId": { - "type": "string", - "description": "If not empty, the ID of the namespace to which the entities belong." + "description": "If not empty, the ID of the namespace to which the entities belong.", + "type": "string" } }, - "id": "PartitionId" + "id": "PartitionId", + "description": "A partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty.\n\nA partition ID contains several dimensions:\nproject ID and namespace ID.\n\nPartition dimensions:\n\n- May be `\"\"`.\n- Must be valid UTF-8 bytes.\n- Must have values that match regex `[A-Za-z\\d\\.\\-_]{1,100}`\nIf the value of any dimension matches regex `__.*__`, the partition is\nreserved/read-only.\nA reserved/read-only partition ID is forbidden in certain documented\ncontexts.\n\nForeign partition IDs (in which the project ID does\nnot match the context project ID ) are discouraged.\nReads and writes of foreign partition IDs may fail if the project is not in an active state.", + "type": "object" + }, + "ReadWrite": { + "description": "Options specific to read / write transactions.", + "type": "object", + "properties": { + "previousTransaction": { + "format": "byte", + "description": "The transaction identifier of the transaction being retried.", + "type": "string" + } + }, + "id": "ReadWrite" }, "Entity": { "description": "A Datastore data object.\n\nAn entity is limited to 1 megabyte when stored. That _roughly_\ncorresponds to a limit of 1 megabyte for the serialized form of this\nmessage.", "type": "object", "properties": { + "key": { + "$ref": "Key", + "description": "The entity's key.\n\nAn entity must have a key, unless otherwise documented (for example,\nan entity in `Value.entity_value` may have no key).\nAn entity's kind is its key path's last element's kind,\nor null if it has no key." + }, "properties": { "additionalProperties": { "$ref": "Value" }, "description": "The entity's properties.\nThe map's keys are property names.\nA property name matching regex `__.*__` is reserved.\nA reserved property name is forbidden in certain documented contexts.\nThe name must not contain more than 500 characters.\nThe name cannot be `\"\"`.", "type": "object" - }, - "key": { - "$ref": "Key", - "description": "The entity's key.\n\nAn entity must have a key, unless otherwise documented (for example,\nan entity in `Value.entity_value` may have no key).\nAn entity's kind is its key path's last element's kind,\nor null if it has no key." } }, "id": "Entity" }, - "LookupRequest": { + "GoogleDatastoreAdminV1beta1Progress": { + "description": "Measures the progress of a particular metric.", "type": "object", "properties": { - "readOptions": { - "$ref": "ReadOptions", - "description": "The options for this lookup request." + "workEstimated": { + "format": "int64", + "description": "An estimate of how much work needs to be performed. May be zero if the\nwork estimate is unavailable.", + "type": "string" }, - "keys": { - "description": "Keys of entities to look up.", - "items": { - "$ref": "Key" - }, - "type": "array" + "workCompleted": { + "format": "int64", + "description": "Note that this may be greater than work_estimated.", + "type": "string" } }, - "id": "LookupRequest", - "description": "The request for Datastore.Lookup." + "id": "GoogleDatastoreAdminV1beta1Progress" }, "QueryResultBatch": { "description": "A batch of results produced by a query.", "type": "object", "properties": { + "entityResultType": { + "enumDescriptions": [ + "Unspecified. This value is never used.", + "The key and properties.", + "A projected subset of properties. The entity may have no key.", + "Only the key." + ], + "enum": [ + "RESULT_TYPE_UNSPECIFIED", + "FULL", + "PROJECTION", + "KEY_ONLY" + ], + "description": "The result type for every entity in `entity_results`.", + "type": "string" + }, + "entityResults": { + "description": "The results for this batch.", + "items": { + "$ref": "EntityResult" + }, + "type": "array" + }, "moreResults": { "enumDescriptions": [ "Unspecified. This value is never used.", @@ -1039,37 +776,719 @@ "format": "int32", "description": "The number of results skipped, typically because of an offset.", "type": "integer" + } + }, + "id": "QueryResultBatch" + }, + "LookupRequest": { + "properties": { + "readOptions": { + "$ref": "ReadOptions", + "description": "The options for this lookup request." }, - "entityResultType": { - "enumDescriptions": [ - "Unspecified. This value is never used.", - "The key and properties.", - "A projected subset of properties. The entity may have no key.", - "Only the key." - ], - "enum": [ - "RESULT_TYPE_UNSPECIFIED", - "FULL", - "PROJECTION", - "KEY_ONLY" - ], - "description": "The result type for every entity in `entity_results`.", + "keys": { + "description": "Keys of entities to look up.", + "items": { + "$ref": "Key" + }, + "type": "array" + } + }, + "id": "LookupRequest", + "description": "The request for Datastore.Lookup.", + "type": "object" + }, + "PathElement": { + "description": "A (kind, ID/name) pair used to construct a key path.\n\nIf either name or ID is set, the element is complete.\nIf neither is set, the element is incomplete.", + "type": "object", + "properties": { + "id": { + "format": "int64", + "description": "The auto-allocated ID of the entity.\nNever equal to zero. Values less than zero are discouraged and may not\nbe supported in the future.", "type": "string" }, - "entityResults": { - "description": "The results for this batch.", + "name": { + "description": "The name of the entity.\nA name matching regex `__.*__` is reserved/read-only.\nA name must not be more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.", + "type": "string" + }, + "kind": { + "description": "The kind of the entity.\nA kind matching regex `__.*__` is reserved/read-only.\nA kind must not contain more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.", + "type": "string" + } + }, + "id": "PathElement" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + } + }, + "id": "Status" + }, + "GqlQueryParameter": { + "description": "A binding parameter for a GQL query.", + "type": "object", + "properties": { + "cursor": { + "format": "byte", + "description": "A query cursor. Query cursors are returned in query\nresult batches.", + "type": "string" + }, + "value": { + "description": "A value parameter.", + "$ref": "Value" + } + }, + "id": "GqlQueryParameter" + }, + "GoogleLongrunningListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "GoogleLongrunningOperation" + }, + "type": "array" + } + }, + "id": "GoogleLongrunningListOperationsResponse" + }, + "BeginTransactionResponse": { + "properties": { + "transaction": { + "format": "byte", + "description": "The transaction identifier (always present).", + "type": "string" + } + }, + "id": "BeginTransactionResponse", + "description": "The response for Datastore.BeginTransaction.", + "type": "object" + }, + "LookupResponse": { + "description": "The response for Datastore.Lookup.", + "type": "object", + "properties": { + "deferred": { + "description": "A list of keys that were not looked up due to resource constraints. The\norder of results in this field is undefined and has no relation to the\norder of the keys in the input.", + "items": { + "$ref": "Key" + }, + "type": "array" + }, + "missing": { + "description": "Entities not found as `ResultType.KEY_ONLY` entities. The order of results\nin this field is undefined and has no relation to the order of the keys\nin the input.", + "items": { + "$ref": "EntityResult" + }, + "type": "array" + }, + "found": { + "description": "Entities found as `ResultType.FULL` entities. The order of results in this\nfield is undefined and has no relation to the order of the keys in the\ninput.", "items": { "$ref": "EntityResult" }, "type": "array" } }, - "id": "QueryResultBatch" + "id": "LookupResponse" + }, + "RunQueryResponse": { + "properties": { + "query": { + "$ref": "Query", + "description": "The parsed form of the `GqlQuery` from the request, if it was set." + }, + "batch": { + "description": "A batch of query results (always present).", + "$ref": "QueryResultBatch" + } + }, + "id": "RunQueryResponse", + "description": "The response for Datastore.RunQuery.", + "type": "object" + }, + "AllocateIdsRequest": { + "description": "The request for Datastore.AllocateIds.", + "type": "object", + "properties": { + "keys": { + "description": "A list of keys with incomplete key paths for which to allocate IDs.\nNo key may be reserved/read-only.", + "items": { + "$ref": "Key" + }, + "type": "array" + } + }, + "id": "AllocateIdsRequest" + }, + "PropertyOrder": { + "description": "The desired order for a specific property.", + "type": "object", + "properties": { + "direction": { + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "Ascending.", + "Descending." + ], + "enum": [ + "DIRECTION_UNSPECIFIED", + "ASCENDING", + "DESCENDING" + ], + "description": "The direction to order by. Defaults to `ASCENDING`.", + "type": "string" + }, + "property": { + "$ref": "PropertyReference", + "description": "The property to order by." + } + }, + "id": "PropertyOrder" + }, + "CommitRequest": { + "description": "The request for Datastore.Commit.", + "type": "object", + "properties": { + "transaction": { + "format": "byte", + "description": "The identifier of the transaction associated with the commit. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.", + "type": "string" + }, + "mode": { + "description": "The type of commit to perform. Defaults to `TRANSACTIONAL`.", + "type": "string", + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "Transactional: The mutations are either all applied, or none are applied.\nLearn about transactions [here](https://cloud.google.com/datastore/docs/concepts/transactions).", + "Non-transactional: The mutations may not apply as all or none." + ], + "enum": [ + "MODE_UNSPECIFIED", + "TRANSACTIONAL", + "NON_TRANSACTIONAL" + ] + }, + "mutations": { + "description": "The mutations to perform.\n\nWhen mode is `TRANSACTIONAL`, mutations affecting a single entity are\napplied in order. The following sequences of mutations affecting a single\nentity are not permitted in a single `Commit` request:\n\n- `insert` followed by `insert`\n- `update` followed by `insert`\n- `upsert` followed by `insert`\n- `delete` followed by `update`\n\nWhen mode is `NON_TRANSACTIONAL`, no two mutations may affect a single\nentity.", + "items": { + "$ref": "Mutation" + }, + "type": "array" + } + }, + "id": "CommitRequest" + }, + "BeginTransactionRequest": { + "description": "The request for Datastore.BeginTransaction.", + "type": "object", + "properties": { + "transactionOptions": { + "description": "Options for a new transaction.", + "$ref": "TransactionOptions" + } + }, + "id": "BeginTransactionRequest" + }, + "KindExpression": { + "properties": { + "name": { + "description": "The name of the kind.", + "type": "string" + } + }, + "id": "KindExpression", + "description": "A representation of a kind.", + "type": "object" + }, + "LatLng": { + "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", + "type": "object", + "properties": { + "latitude": { + "format": "double", + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", + "type": "number" + }, + "longitude": { + "format": "double", + "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", + "type": "number" + } + }, + "id": "LatLng" + }, + "Key": { + "description": "A unique identifier for an entity.\nIf a key's partition ID or any of its path kinds or names are\nreserved/read-only, the key is reserved/read-only.\nA reserved/read-only key is forbidden in certain documented contexts.", + "type": "object", + "properties": { + "path": { + "description": "The entity path.\nAn entity path consists of one or more elements composed of a kind and a\nstring or numerical identifier, which identify entities. The first\nelement identifies a _root entity_, the second element identifies\na _child_ of the root entity, the third element identifies a child of the\nsecond entity, and so forth. The entities identified by all prefixes of\nthe path are called the element's _ancestors_.\n\nAn entity path is always fully complete: *all* of the entity's ancestors\nare required to be in the path along with the entity identifier itself.\nThe only exception is that in some documented cases, the identifier in the\nlast path element (for the entity) itself may be omitted. For example,\nthe last path element of the key of `Mutation.insert` may have no\nidentifier.\n\nA path can never be empty, and a path can have at most 100 elements.", + "items": { + "$ref": "PathElement" + }, + "type": "array" + }, + "partitionId": { + "description": "Entities are partitioned into subsets, currently identified by a project\nID and namespace ID.\nQueries are scoped to a single partition.", + "$ref": "PartitionId" + } + }, + "id": "Key" + }, + "PropertyReference": { + "description": "A reference to a property relative to the kind expressions.", + "type": "object", + "properties": { + "name": { + "description": "The name of the property.\nIf name includes \".\"s, it may be interpreted as a property name path.", + "type": "string" + } + }, + "id": "PropertyReference" + }, + "GoogleDatastoreAdminV1beta1EntityFilter": { + "properties": { + "kinds": { + "description": "If empty, then this represents all kinds.", + "items": { + "type": "string" + }, + "type": "array" + }, + "namespaceIds": { + "description": "An empty list represents all namespaces. This is the preferred\nusage for projects that don't use namespaces.\n\nAn empty string element represents the default namespace. This should be\nused if the project has data in non-default namespaces, but doesn't want to\ninclude them.\nEach namespace in this list must be unique.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "GoogleDatastoreAdminV1beta1EntityFilter", + "description": "Identifies a subset of entities in a project. This is specified as\ncombinations of kind + namespace (either or both of which may be all, as\ndescribed in the following examples).\nExample usage:\n\nEntire project:\n kinds=[], namespace_ids=[]\n\nKinds Foo and Bar in all namespaces:\n kinds=['Foo', 'Bar'], namespace_ids=[]\n\nKinds Foo and Bar only in the default namespace:\n kinds=['Foo', 'Bar'], namespace_ids=['']\n\nKinds Foo and Bar in both the default and Baz namespaces:\n kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz']\n\nThe entire Baz namespace:\n kinds=[], namespace_ids=['Baz']", + "type": "object" + }, + "GoogleDatastoreAdminV1beta1CommonMetadata": { + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "The client-assigned labels which were provided when the operation was\ncreated. May also include additional labels.", + "type": "object" + }, + "endTime": { + "format": "google-datetime", + "description": "The time the operation ended, either successfully or otherwise.", + "type": "string" + }, + "state": { + "enumDescriptions": [ + "Unspecified.", + "Request is being prepared for processing.", + "Request is actively being processed.", + "Request is in the process of being cancelled after user called\nlongrunning.Operations.CancelOperation on the operation.", + "Request has been processed and is in its finalization stage.", + "Request has completed successfully.", + "Request has finished being processed, but encountered an error.", + "Request has finished being cancelled after user called\nlongrunning.Operations.CancelOperation." + ], + "enum": [ + "STATE_UNSPECIFIED", + "INITIALIZING", + "PROCESSING", + "CANCELLING", + "FINALIZING", + "SUCCESSFUL", + "FAILED", + "CANCELLED" + ], + "description": "The current state of the Operation.", + "type": "string" + }, + "operationType": { + "enumDescriptions": [ + "Unspecified.", + "ExportEntities.", + "ImportEntities.", + "Build an index.", + "Clear an index." + ], + "enum": [ + "OPERATION_TYPE_UNSPECIFIED", + "EXPORT_ENTITIES", + "IMPORT_ENTITIES", + "BUILD_INDEX", + "CLEAR_INDEX" + ], + "description": "The type of the operation. Can be used as a filter in\nListOperationsRequest.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "The time that work began on the operation.", + "type": "string" + } + }, + "id": "GoogleDatastoreAdminV1beta1CommonMetadata", + "description": "Metadata common to all Datastore Admin operations.", + "type": "object" + }, + "Projection": { + "properties": { + "property": { + "description": "The property to project.", + "$ref": "PropertyReference" + } + }, + "id": "Projection", + "description": "A representation of a property in a projection.", + "type": "object" + }, + "ArrayValue": { + "description": "An array value.", + "type": "object", + "properties": { + "values": { + "description": "Values in the array.\nThe order of this array may not be preserved if it contains a mix of\nindexed and unindexed values.", + "items": { + "$ref": "Value" + }, + "type": "array" + } + }, + "id": "ArrayValue" + }, + "Mutation": { + "properties": { + "delete": { + "$ref": "Key", + "description": "The key of the entity to delete. The entity may or may not already exist.\nMust have a complete key path and must not be reserved/read-only." + }, + "baseVersion": { + "format": "int64", + "description": "The version of the entity that this mutation is being applied to. If this\ndoes not match the current version on the server, the mutation conflicts.", + "type": "string" + }, + "insert": { + "description": "The entity to insert. The entity must not already exist.\nThe entity key's final path element may be incomplete.", + "$ref": "Entity" + }, + "update": { + "description": "The entity to update. The entity must already exist.\nMust have a complete key path.", + "$ref": "Entity" + }, + "upsert": { + "$ref": "Entity", + "description": "The entity to upsert. The entity may or may not already exist.\nThe entity key's final path element may be incomplete." + } + }, + "id": "Mutation", + "description": "A mutation to apply to an entity.", + "type": "object" + }, + "ReadOptions": { + "description": "The options shared by read requests.", + "type": "object", + "properties": { + "transaction": { + "format": "byte", + "description": "The identifier of the transaction in which to read. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.", + "type": "string" + }, + "readConsistency": { + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "Strong consistency.", + "Eventual consistency." + ], + "enum": [ + "READ_CONSISTENCY_UNSPECIFIED", + "STRONG", + "EVENTUAL" + ], + "description": "The non-transactional read consistency to use.\nCannot be set to `STRONG` for global queries.", + "type": "string" + } + }, + "id": "ReadOptions" + }, + "GoogleDatastoreAdminV1beta1ExportEntitiesResponse": { + "description": "The response for\ngoogle.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities.", + "type": "object", + "properties": { + "outputUrl": { + "description": "Location of the output metadata file. This can be used to begin an import\ninto Cloud Datastore (this project or another project). See\ngoogle.datastore.admin.v1beta1.ImportEntitiesRequest.input_url.\nOnly present if the operation completed successfully.", + "type": "string" + } + }, + "id": "GoogleDatastoreAdminV1beta1ExportEntitiesResponse" + }, + "RollbackResponse": { + "description": "The response for Datastore.Rollback.\n(an empty message).", + "type": "object", + "properties": {}, + "id": "RollbackResponse" + }, + "MutationResult": { + "description": "The result of applying a mutation.", + "type": "object", + "properties": { + "conflictDetected": { + "description": "Whether a conflict was detected for this mutation. Always false when a\nconflict detection strategy field is not set in the mutation.", + "type": "boolean" + }, + "key": { + "description": "The automatically allocated key.\nSet only when the mutation allocated a key.", + "$ref": "Key" + }, + "version": { + "format": "int64", + "description": "The version of the entity on the server after processing the mutation. If\nthe mutation doesn't change anything on the server, then the version will\nbe the version of the current entity or, if no entity is present, a version\nthat is strictly greater than the version of any previous entity and less\nthan the version of any possible future entity.", + "type": "string" + } + }, + "id": "MutationResult" + }, + "GqlQuery": { + "description": "A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).", + "type": "object", + "properties": { + "queryString": { + "description": "A string of the format described\n[here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).", + "type": "string" + }, + "positionalBindings": { + "description": "Numbered binding site @1 references the first numbered parameter,\neffectively using 1-based indexing, rather than the usual 0.\n\nFor each binding site numbered i in `query_string`, there must be an i-th\nnumbered parameter. The inverse must also be true.", + "items": { + "$ref": "GqlQueryParameter" + }, + "type": "array" + }, + "namedBindings": { + "additionalProperties": { + "$ref": "GqlQueryParameter" + }, + "description": "For each non-reserved named binding site in the query string, there must be\na named parameter with that name, but not necessarily the inverse.\n\nKey must match regex `A-Za-z_$*`, must not match regex\n`__.*__`, and must not be `\"\"`.", + "type": "object" + }, + "allowLiterals": { + "description": "When false, the query string must not contain any literals and instead must\nbind all values. For example,\n`SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while\n`SELECT * FROM Kind WHERE a = @value` is.", + "type": "boolean" + } + }, + "id": "GqlQuery" + }, + "Filter": { + "description": "A holder for any type of filter.", + "type": "object", + "properties": { + "compositeFilter": { + "description": "A composite filter.", + "$ref": "CompositeFilter" + }, + "propertyFilter": { + "$ref": "PropertyFilter", + "description": "A filter on a property." + } + }, + "id": "Filter" + }, + "RollbackRequest": { + "properties": { + "transaction": { + "format": "byte", + "description": "The transaction identifier, returned by a call to\nDatastore.BeginTransaction.", + "type": "string" + } + }, + "id": "RollbackRequest", + "description": "The request for Datastore.Rollback.", + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "RunQueryRequest": { + "description": "The request for Datastore.RunQuery.", + "type": "object", + "properties": { + "gqlQuery": { + "$ref": "GqlQuery", + "description": "The GQL query to run." + }, + "partitionId": { + "$ref": "PartitionId", + "description": "Entities are partitioned into subsets, identified by a partition ID.\nQueries are scoped to a single partition.\nThis partition ID is normalized with the standard default context\npartition ID." + }, + "readOptions": { + "$ref": "ReadOptions", + "description": "The options for this query." + }, + "query": { + "description": "The query to run.", + "$ref": "Query" + } + }, + "id": "RunQueryRequest" + }, + "GoogleDatastoreAdminV1beta1ExportEntitiesMetadata": { + "properties": { + "progressBytes": { + "$ref": "GoogleDatastoreAdminV1beta1Progress", + "description": "An estimate of the number of bytes processed." + }, + "outputUrlPrefix": { + "description": "Location for the export metadata and data files. This will be the same\nvalue as the\ngoogle.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_prefix\nfield. The final output location is provided in\ngoogle.datastore.admin.v1beta1.ExportEntitiesResponse.output_url.", + "type": "string" + }, + "entityFilter": { + "description": "Description of which entities are being exported.", + "$ref": "GoogleDatastoreAdminV1beta1EntityFilter" + }, + "progressEntities": { + "$ref": "GoogleDatastoreAdminV1beta1Progress", + "description": "An estimate of the number of entities processed." + }, + "common": { + "$ref": "GoogleDatastoreAdminV1beta1CommonMetadata", + "description": "Metadata common to all Datastore Admin operations." + } + }, + "id": "GoogleDatastoreAdminV1beta1ExportEntitiesMetadata", + "description": "Metadata for ExportEntities operations.", + "type": "object" + }, + "TransactionOptions": { + "description": "Options for beginning a new transaction.\n\nTransactions can be created explicitly with calls to\nDatastore.BeginTransaction or implicitly by setting\nReadOptions.new_transaction in read requests.", + "type": "object", + "properties": { + "readOnly": { + "description": "The transaction should only allow reads.", + "$ref": "ReadOnly" + }, + "readWrite": { + "$ref": "ReadWrite", + "description": "The transaction should allow both reads and writes." + } + }, + "id": "TransactionOptions" + }, + "CompositeFilter": { + "description": "A filter that merges multiple other filters using the given operator.", + "type": "object", + "properties": { + "filters": { + "description": "The list of filters to combine.\nMust contain at least one filter.", + "items": { + "$ref": "Filter" + }, + "type": "array" + }, + "op": { + "enum": [ + "OPERATOR_UNSPECIFIED", + "AND" + ], + "description": "The operator for combining multiple filters.", + "type": "string", + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "The results are required to satisfy each of the combined filters." + ] + } + }, + "id": "CompositeFilter" + }, + "GoogleDatastoreAdminV1beta1ImportEntitiesMetadata": { + "description": "Metadata for ImportEntities operations.", + "type": "object", + "properties": { + "common": { + "description": "Metadata common to all Datastore Admin operations.", + "$ref": "GoogleDatastoreAdminV1beta1CommonMetadata" + }, + "inputUrl": { + "description": "The location of the import metadata file. This will be the same value as\nthe google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url\nfield.", + "type": "string" + }, + "progressBytes": { + "$ref": "GoogleDatastoreAdminV1beta1Progress", + "description": "An estimate of the number of bytes processed." + }, + "entityFilter": { + "description": "Description of which entities are being imported.", + "$ref": "GoogleDatastoreAdminV1beta1EntityFilter" + }, + "progressEntities": { + "description": "An estimate of the number of entities processed.", + "$ref": "GoogleDatastoreAdminV1beta1Progress" + } + }, + "id": "GoogleDatastoreAdminV1beta1ImportEntitiesMetadata" } }, + "protocol": "rest", "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "protocol": "rest" + "version": "v1", + "baseUrl": "https://datastore.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/datastore": { + "description": "View and manage your Google Cloud Datastore data" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "description": "Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.\n", + "servicePath": "", + "kind": "discovery#restDescription", + "rootUrl": "https://datastore.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "datastore", + "batchPath": "batch", + "id": "datastore:v1", + "documentationLink": "https://cloud.google.com/datastore/", + "revision": "20170821", + "title": "Google Cloud Datastore API", + "ownerName": "Google", + "discoveryVersion": "v1" } diff --git a/vendor/google.golang.org/api/datastore/v1/datastore-gen.go b/vendor/google.golang.org/api/datastore/v1/datastore-gen.go index 20763310c..9094f311e 100644 --- a/vendor/google.golang.org/api/datastore/v1/datastore-gen.go +++ b/vendor/google.golang.org/api/datastore/v1/datastore-gen.go @@ -80,11 +80,23 @@ func (s *Service) userAgent() string { func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} + rs.Operations = NewProjectsOperationsService(s) return rs } type ProjectsService struct { s *Service + + Operations *ProjectsOperationsService +} + +func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { + rs := &ProjectsOperationsService{s: s} + return rs +} + +type ProjectsOperationsService struct { + s *Service } // AllocateIdsRequest: The request for Datastore.AllocateIds. @@ -184,6 +196,31 @@ func (s *ArrayValue) MarshalJSON() ([]byte, error) { // BeginTransactionRequest: The request for Datastore.BeginTransaction. type BeginTransactionRequest struct { + // TransactionOptions: Options for a new transaction. + TransactionOptions *TransactionOptions `json:"transactionOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TransactionOptions") + // 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. "TransactionOptions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BeginTransactionRequest) MarshalJSON() ([]byte, error) { + type noMethod BeginTransactionRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BeginTransactionResponse: The response for @@ -358,6 +395,24 @@ func (s *CompositeFilter) MarshalJSON() ([]byte, error) { 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:"-"` +} + // Entity: A Datastore data object. // // An entity is limited to 1 megabyte when stored. That @@ -486,6 +541,412 @@ func (s *Filter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleDatastoreAdminV1beta1CommonMetadata: Metadata common to all +// Datastore Admin operations. +type GoogleDatastoreAdminV1beta1CommonMetadata struct { + // EndTime: The time the operation ended, either successfully or + // otherwise. + EndTime string `json:"endTime,omitempty"` + + // Labels: The client-assigned labels which were provided when the + // operation was + // created. May also include additional labels. + Labels map[string]string `json:"labels,omitempty"` + + // OperationType: The type of the operation. Can be used as a filter + // in + // ListOperationsRequest. + // + // Possible values: + // "OPERATION_TYPE_UNSPECIFIED" - Unspecified. + // "EXPORT_ENTITIES" - ExportEntities. + // "IMPORT_ENTITIES" - ImportEntities. + // "BUILD_INDEX" - Build an index. + // "CLEAR_INDEX" - Clear an index. + OperationType string `json:"operationType,omitempty"` + + // StartTime: The time that work began on the operation. + StartTime string `json:"startTime,omitempty"` + + // State: The current state of the Operation. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified. + // "INITIALIZING" - Request is being prepared for processing. + // "PROCESSING" - Request is actively being processed. + // "CANCELLING" - Request is in the process of being cancelled after + // user called + // longrunning.Operations.CancelOperation on the operation. + // "FINALIZING" - Request has been processed and is in its + // finalization stage. + // "SUCCESSFUL" - Request has completed successfully. + // "FAILED" - Request has finished being processed, but encountered an + // error. + // "CANCELLED" - Request has finished being cancelled after user + // called + // longrunning.Operations.CancelOperation. + State string `json:"state,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 *GoogleDatastoreAdminV1beta1CommonMetadata) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1CommonMetadata + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1EntityFilter: Identifies a subset of +// entities in a project. This is specified as +// combinations of kind + namespace (either or both of which may be all, +// as +// described in the following examples). +// Example usage: +// +// Entire project: +// kinds=[], namespace_ids=[] +// +// Kinds Foo and Bar in all namespaces: +// kinds=['Foo', 'Bar'], namespace_ids=[] +// +// Kinds Foo and Bar only in the default namespace: +// kinds=['Foo', 'Bar'], namespace_ids=[''] +// +// Kinds Foo and Bar in both the default and Baz namespaces: +// kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] +// +// The entire Baz namespace: +// kinds=[], namespace_ids=['Baz'] +type GoogleDatastoreAdminV1beta1EntityFilter struct { + // Kinds: If empty, then this represents all kinds. + Kinds []string `json:"kinds,omitempty"` + + // NamespaceIds: An empty list represents all namespaces. This is the + // preferred + // usage for projects that don't use namespaces. + // + // An empty string element represents the default namespace. This + // should be + // used if the project has data in non-default namespaces, but doesn't + // want to + // include them. + // Each namespace in this list must be unique. + NamespaceIds []string `json:"namespaceIds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kinds") 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. "Kinds") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1EntityFilter) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1EntityFilter + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1ExportEntitiesMetadata: Metadata for +// ExportEntities operations. +type GoogleDatastoreAdminV1beta1ExportEntitiesMetadata struct { + // Common: Metadata common to all Datastore Admin operations. + Common *GoogleDatastoreAdminV1beta1CommonMetadata `json:"common,omitempty"` + + // EntityFilter: Description of which entities are being exported. + EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"` + + // OutputUrlPrefix: Location for the export metadata and data files. + // This will be the same + // value as + // the + // google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_pr + // efix + // field. The final output location is provided + // in + // google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url. + OutputUrlPrefix string `json:"outputUrlPrefix,omitempty"` + + // ProgressBytes: An estimate of the number of bytes processed. + ProgressBytes *GoogleDatastoreAdminV1beta1Progress `json:"progressBytes,omitempty"` + + // ProgressEntities: An estimate of the number of entities processed. + ProgressEntities *GoogleDatastoreAdminV1beta1Progress `json:"progressEntities,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") 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. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1ExportEntitiesMetadata) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1ExportEntitiesMetadata + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1ExportEntitiesResponse: The response +// for +// google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities. +type GoogleDatastoreAdminV1beta1ExportEntitiesResponse struct { + // OutputUrl: Location of the output metadata file. This can be used to + // begin an import + // into Cloud Datastore (this project or another project). + // See + // google.datastore.admin.v1beta1.ImportEntitiesRequest.input_url. + // On + // ly present if the operation completed successfully. + OutputUrl string `json:"outputUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "OutputUrl") 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. "OutputUrl") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1ExportEntitiesResponse) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1ExportEntitiesResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1ImportEntitiesMetadata: Metadata for +// ImportEntities operations. +type GoogleDatastoreAdminV1beta1ImportEntitiesMetadata struct { + // Common: Metadata common to all Datastore Admin operations. + Common *GoogleDatastoreAdminV1beta1CommonMetadata `json:"common,omitempty"` + + // EntityFilter: Description of which entities are being imported. + EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"` + + // InputUrl: The location of the import metadata file. This will be the + // same value as + // the + // google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url + // field + // . + InputUrl string `json:"inputUrl,omitempty"` + + // ProgressBytes: An estimate of the number of bytes processed. + ProgressBytes *GoogleDatastoreAdminV1beta1Progress `json:"progressBytes,omitempty"` + + // ProgressEntities: An estimate of the number of entities processed. + ProgressEntities *GoogleDatastoreAdminV1beta1Progress `json:"progressEntities,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") 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. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1ImportEntitiesMetadata) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1ImportEntitiesMetadata + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1Progress: Measures the progress of a +// particular metric. +type GoogleDatastoreAdminV1beta1Progress struct { + // WorkCompleted: Note that this may be greater than work_estimated. + WorkCompleted int64 `json:"workCompleted,omitempty,string"` + + // WorkEstimated: An estimate of how much work needs to be performed. + // May be zero if the + // work estimate is unavailable. + WorkEstimated int64 `json:"workEstimated,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "WorkCompleted") 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. "WorkCompleted") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1Progress) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1Progress + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "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 *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type noMethod GoogleLongrunningListOperationsResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a +// network API call. +type GoogleLongrunningOperation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. + // If true, the operation is completed, and either `error` or `response` + // is + // available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. + // It typically + // contains progress information and common metadata such as create + // time. + // Some services might not provide such metadata. Any method that + // returns a + // long-running operation should document the metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that + // originally returns it. If you use the default HTTP mapping, + // the + // `name` should have the format of `operations/some/unique/name`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. + // If the original + // method returns no data on success, such as `Delete`, the response + // is + // `google.protobuf.Empty`. If the original method is + // standard + // `Get`/`Create`/`Update`, the response should be the resource. For + // other + // methods, the response should have the type `XxxResponse`, where + // `Xxx` + // is the original method name. For example, if the original method + // name + // is `TakeSnapshot()`, the inferred response type + // is + // `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type noMethod GoogleLongrunningOperation + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GqlQuery: A [GQL // query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference) // . @@ -1332,6 +1793,10 @@ func (s *QueryResultBatch) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ReadOnly: Options specific to read-only transactions. +type ReadOnly struct { +} + // ReadOptions: The options shared by read requests. type ReadOptions struct { // ReadConsistency: The non-transactional read consistency to @@ -1376,6 +1841,36 @@ func (s *ReadOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ReadWrite: Options specific to read / write transactions. +type ReadWrite struct { + // PreviousTransaction: The transaction identifier of the transaction + // being retried. + PreviousTransaction string `json:"previousTransaction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PreviousTransaction") + // 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. "PreviousTransaction") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ReadWrite) MarshalJSON() ([]byte, error) { + type noMethod ReadWrite + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RollbackRequest: The request for Datastore.Rollback. type RollbackRequest struct { // Transaction: The transaction identifier, returned by a call @@ -1492,6 +1987,163 @@ func (s *RunQueryResponse) MarshalJSON() ([]byte, error) { 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 needs +// +// # Overview +// +// The `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 mapping +// +// The `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 uses +// +// The 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) +} + +// TransactionOptions: Options for beginning a new +// transaction. +// +// Transactions can be created explicitly with calls +// to +// Datastore.BeginTransaction or implicitly by +// setting +// ReadOptions.new_transaction in read requests. +type TransactionOptions struct { + // ReadOnly: The transaction should only allow reads. + ReadOnly *ReadOnly `json:"readOnly,omitempty"` + + // ReadWrite: The transaction should allow both reads and writes. + ReadWrite *ReadWrite `json:"readWrite,omitempty"` + + // 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 + // 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. "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:"-"` +} + +func (s *TransactionOptions) MarshalJSON() ([]byte, error) { + type noMethod TransactionOptions + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Value: A message that can hold any of the supported value types and // associated // metadata. @@ -2408,3 +3060,637 @@ func (c *ProjectsRunQueryCall) Do(opts ...googleapi.CallOption) (*RunQueryRespon // } } + +// method id "datastore.projects.operations.cancel": + +type ProjectsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server +// makes a best effort to cancel the operation, but success is +// not +// guaranteed. If the server doesn't support this method, it +// returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can +// use +// Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether +// the +// operation completed despite cancellation. On successful +// cancellation, +// the operation is not deleted; instead, it becomes an operation +// with +// an Operation.error value with a google.rpc.Status.code of +// 1, +// corresponding to `Code.CANCELLED`. +func (r *ProjectsOperationsService) Cancel(name string) *ProjectsOperationsCancelCall { + c := &ProjectsOperationsCancelCall{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 *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall { + 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 *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall { + 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 *ProjectsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datastore.projects.operations.cancel" 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 *ProjectsOperationsCancelCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "datastore.projects.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// method id "datastore.projects.operations.delete": + +type ProjectsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is +// no longer interested in the operation result. It does not cancel +// the +// operation. If the server doesn't support this method, it +// returns +// `google.rpc.Code.UNIMPLEMENTED`. +func (r *ProjectsOperationsService) Delete(name string) *ProjectsOperationsDeleteCall { + c := &ProjectsOperationsDeleteCall{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 *ProjectsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsOperationsDeleteCall { + 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 *ProjectsOperationsDeleteCall) Context(ctx context.Context) *ProjectsOperationsDeleteCall { + 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 *ProjectsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datastore.projects.operations.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 *ProjectsOperationsDeleteCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "datastore.projects.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// method id "datastore.projects.operations.get": + +type ProjectsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this +// method to poll the operation result at intervals as recommended by +// the API +// service. +func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall { + c := &ProjectsOperationsGetCall{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 *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall { + 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 *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall { + 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 *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall { + 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 *ProjectsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datastore.projects.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + // "flatPath": "v1/projects/{projectsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "datastore.projects.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// method id "datastore.projects.operations.list": + +type ProjectsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: 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. +func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall { + c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall { + 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 *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall { + 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 *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall { + 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 *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall { + 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 *ProjectsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datastore.projects.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + // "flatPath": "v1/projects/{projectsId}/operations", + // "httpMethod": "GET", + // "id": "datastore.projects.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// 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 *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) 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/datastore/v1beta1/datastore-api.json b/vendor/google.golang.org/api/datastore/v1beta1/datastore-api.json new file mode 100644 index 000000000..29d21c23a --- /dev/null +++ b/vendor/google.golang.org/api/datastore/v1beta1/datastore-api.json @@ -0,0 +1,463 @@ +{ + "version": "v1beta1", + "baseUrl": "https://datastore.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/datastore": { + "description": "View and manage your Google Cloud Datastore data" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "description": "Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.\n", + "kind": "discovery#restDescription", + "servicePath": "", + "rootUrl": "https://datastore.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "datastore", + "batchPath": "batch", + "documentationLink": "https://cloud.google.com/datastore/", + "id": "datastore:v1beta1", + "revision": "20170821", + "title": "Google Cloud Datastore API", + "ownerName": "Google", + "discoveryVersion": "v1", + "version_module": true, + "resources": { + "projects": { + "methods": { + "export": { + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "Project ID against which to make the request.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta1/projects/{projectId}:export", + "id": "datastore.projects.export", + "path": "v1beta1/projects/{projectId}:export", + "request": { + "$ref": "GoogleDatastoreAdminV1beta1ExportEntitiesRequest" + }, + "description": "Exports a copy of all or a subset of entities from Google Cloud Datastore\nto another storage system, such as Google Cloud Storage. Recent updates to\nentities may not be reflected in the export. The export occurs in the\nbackground and its progress can be monitored and managed via the\nOperation resource that is created. The output of an export may only be\nused once the associated operation is done. If an export operation is\ncancelled before completion it may leave partial data behind in Google\nCloud Storage." + }, + "import": { + "path": "v1beta1/projects/{projectId}:import", + "id": "datastore.projects.import", + "request": { + "$ref": "GoogleDatastoreAdminV1beta1ImportEntitiesRequest" + }, + "description": "Imports entities into Google Cloud Datastore. Existing entities with the\nsame key are overwritten. The import occurs in the background and its\nprogress can be monitored and managed via the Operation resource that is\ncreated. If an ImportEntities operation is cancelled, it is possible\nthat a subset of the data has already been imported to Cloud Datastore.", + "httpMethod": "POST", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], + "parameters": { + "projectId": { + "description": "Project ID against which to make the request.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectId}:import" + } + } + } + }, + "parameters": { + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "key": { + "location": "query", + "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.", + "type": "string" + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + } + }, + "schemas": { + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + } + }, + "id": "Status" + }, + "GoogleDatastoreAdminV1beta1ExportEntitiesRequest": { + "description": "The request for\ngoogle.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities.", + "type": "object", + "properties": { + "outputUrlPrefix": { + "description": "Location for the export metadata and data files.\n\nThe full resource URL of the external storage location. Currently, only\nGoogle Cloud Storage is supported. So output_url_prefix should be of the\nform: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the\nname of the Cloud Storage bucket and `NAMESPACE_PATH` is an optional Cloud\nStorage namespace path (this is not a Cloud Datastore namespace). For more\ninformation about Cloud Storage namespace paths, see\n[Object name\nconsiderations](https://cloud.google.com/storage/docs/naming#object-considerations).\n\nThe resulting files will be nested deeper than the specified URL prefix.\nThe final output URL will be provided in the\ngoogle.datastore.admin.v1beta1.ExportEntitiesResponse.output_url\nfield. That value should be used for subsequent ImportEntities operations.\n\nBy nesting the data files deeper, the same Cloud Storage bucket can be used\nin multiple ExportEntities operations without conflict.", + "type": "string" + }, + "entityFilter": { + "description": "Description of what data from the project is included in the export.", + "$ref": "GoogleDatastoreAdminV1beta1EntityFilter" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Client-assigned labels.", + "type": "object" + } + }, + "id": "GoogleDatastoreAdminV1beta1ExportEntitiesRequest" + }, + "GoogleDatastoreAdminV1beta1ExportEntitiesMetadata": { + "properties": { + "progressEntities": { + "$ref": "GoogleDatastoreAdminV1beta1Progress", + "description": "An estimate of the number of entities processed." + }, + "common": { + "description": "Metadata common to all Datastore Admin operations.", + "$ref": "GoogleDatastoreAdminV1beta1CommonMetadata" + }, + "progressBytes": { + "description": "An estimate of the number of bytes processed.", + "$ref": "GoogleDatastoreAdminV1beta1Progress" + }, + "outputUrlPrefix": { + "description": "Location for the export metadata and data files. This will be the same\nvalue as the\ngoogle.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_prefix\nfield. The final output location is provided in\ngoogle.datastore.admin.v1beta1.ExportEntitiesResponse.output_url.", + "type": "string" + }, + "entityFilter": { + "description": "Description of which entities are being exported.", + "$ref": "GoogleDatastoreAdminV1beta1EntityFilter" + } + }, + "id": "GoogleDatastoreAdminV1beta1ExportEntitiesMetadata", + "description": "Metadata for ExportEntities operations.", + "type": "object" + }, + "GoogleDatastoreAdminV1beta1ExportEntitiesResponse": { + "properties": { + "outputUrl": { + "description": "Location of the output metadata file. This can be used to begin an import\ninto Cloud Datastore (this project or another project). See\ngoogle.datastore.admin.v1beta1.ImportEntitiesRequest.input_url.\nOnly present if the operation completed successfully.", + "type": "string" + } + }, + "id": "GoogleDatastoreAdminV1beta1ExportEntitiesResponse", + "description": "The response for\ngoogle.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities.", + "type": "object" + }, + "GoogleDatastoreAdminV1beta1ImportEntitiesRequest": { + "description": "The request for\ngoogle.datastore.admin.v1beta1.DatastoreAdmin.ImportEntities.", + "type": "object", + "properties": { + "inputUrl": { + "description": "The full resource URL of the external storage location. Currently, only\nGoogle Cloud Storage is supported. So input_url should be of the form:\n`gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE`, where\n`BUCKET_NAME` is the name of the Cloud Storage bucket, `NAMESPACE_PATH` is\nan optional Cloud Storage namespace path (this is not a Cloud Datastore\nnamespace), and `OVERALL_EXPORT_METADATA_FILE` is the metadata file written\nby the ExportEntities operation. For more information about Cloud Storage\nnamespace paths, see\n[Object name\nconsiderations](https://cloud.google.com/storage/docs/naming#object-considerations).\n\nFor more information, see\ngoogle.datastore.admin.v1beta1.ExportEntitiesResponse.output_url.", + "type": "string" + }, + "entityFilter": { + "description": "Optionally specify which kinds/namespaces are to be imported. If provided,\nthe list must be a subset of the EntityFilter used in creating the export,\notherwise a FAILED_PRECONDITION error will be returned. If no filter is\nspecified then all entities from the export are imported.", + "$ref": "GoogleDatastoreAdminV1beta1EntityFilter" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Client-assigned labels.", + "type": "object" + } + }, + "id": "GoogleDatastoreAdminV1beta1ImportEntitiesRequest" + }, + "GoogleDatastoreAdminV1beta1ImportEntitiesMetadata": { + "properties": { + "common": { + "description": "Metadata common to all Datastore Admin operations.", + "$ref": "GoogleDatastoreAdminV1beta1CommonMetadata" + }, + "inputUrl": { + "description": "The location of the import metadata file. This will be the same value as\nthe google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url\nfield.", + "type": "string" + }, + "progressBytes": { + "$ref": "GoogleDatastoreAdminV1beta1Progress", + "description": "An estimate of the number of bytes processed." + }, + "entityFilter": { + "description": "Description of which entities are being imported.", + "$ref": "GoogleDatastoreAdminV1beta1EntityFilter" + }, + "progressEntities": { + "$ref": "GoogleDatastoreAdminV1beta1Progress", + "description": "An estimate of the number of entities processed." + } + }, + "id": "GoogleDatastoreAdminV1beta1ImportEntitiesMetadata", + "description": "Metadata for ImportEntities operations.", + "type": "object" + }, + "GoogleDatastoreAdminV1beta1Progress": { + "description": "Measures the progress of a particular metric.", + "type": "object", + "properties": { + "workEstimated": { + "format": "int64", + "description": "An estimate of how much work needs to be performed. May be zero if the\nwork estimate is unavailable.", + "type": "string" + }, + "workCompleted": { + "format": "int64", + "description": "Note that this may be greater than work_estimated.", + "type": "string" + } + }, + "id": "GoogleDatastoreAdminV1beta1Progress" + }, + "GoogleDatastoreAdminV1beta1EntityFilter": { + "properties": { + "namespaceIds": { + "description": "An empty list represents all namespaces. This is the preferred\nusage for projects that don't use namespaces.\n\nAn empty string element represents the default namespace. This should be\nused if the project has data in non-default namespaces, but doesn't want to\ninclude them.\nEach namespace in this list must be unique.", + "items": { + "type": "string" + }, + "type": "array" + }, + "kinds": { + "description": "If empty, then this represents all kinds.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "GoogleDatastoreAdminV1beta1EntityFilter", + "description": "Identifies a subset of entities in a project. This is specified as\ncombinations of kind + namespace (either or both of which may be all, as\ndescribed in the following examples).\nExample usage:\n\nEntire project:\n kinds=[], namespace_ids=[]\n\nKinds Foo and Bar in all namespaces:\n kinds=['Foo', 'Bar'], namespace_ids=[]\n\nKinds Foo and Bar only in the default namespace:\n kinds=['Foo', 'Bar'], namespace_ids=['']\n\nKinds Foo and Bar in both the default and Baz namespaces:\n kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz']\n\nThe entire Baz namespace:\n kinds=[], namespace_ids=['Baz']", + "type": "object" + }, + "GoogleLongrunningOperation": { + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object" + } + }, + "id": "GoogleLongrunningOperation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object" + }, + "GoogleDatastoreAdminV1beta1CommonMetadata": { + "description": "Metadata common to all Datastore Admin operations.", + "type": "object", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "The client-assigned labels which were provided when the operation was\ncreated. May also include additional labels.", + "type": "object" + }, + "endTime": { + "format": "google-datetime", + "description": "The time the operation ended, either successfully or otherwise.", + "type": "string" + }, + "state": { + "enum": [ + "STATE_UNSPECIFIED", + "INITIALIZING", + "PROCESSING", + "CANCELLING", + "FINALIZING", + "SUCCESSFUL", + "FAILED", + "CANCELLED" + ], + "description": "The current state of the Operation.", + "type": "string", + "enumDescriptions": [ + "Unspecified.", + "Request is being prepared for processing.", + "Request is actively being processed.", + "Request is in the process of being cancelled after user called\nlongrunning.Operations.CancelOperation on the operation.", + "Request has been processed and is in its finalization stage.", + "Request has completed successfully.", + "Request has finished being processed, but encountered an error.", + "Request has finished being cancelled after user called\nlongrunning.Operations.CancelOperation." + ] + }, + "operationType": { + "enumDescriptions": [ + "Unspecified.", + "ExportEntities.", + "ImportEntities.", + "Build an index.", + "Clear an index." + ], + "enum": [ + "OPERATION_TYPE_UNSPECIFIED", + "EXPORT_ENTITIES", + "IMPORT_ENTITIES", + "BUILD_INDEX", + "CLEAR_INDEX" + ], + "description": "The type of the operation. Can be used as a filter in\nListOperationsRequest.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "The time that work began on the operation.", + "type": "string" + } + }, + "id": "GoogleDatastoreAdminV1beta1CommonMetadata" + } + }, + "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + } +} diff --git a/vendor/google.golang.org/api/datastore/v1beta1/datastore-gen.go b/vendor/google.golang.org/api/datastore/v1beta1/datastore-gen.go new file mode 100644 index 000000000..9110c8737 --- /dev/null +++ b/vendor/google.golang.org/api/datastore/v1beta1/datastore-gen.go @@ -0,0 +1,1000 @@ +// Package datastore provides access to the Google Cloud Datastore API. +// +// See https://cloud.google.com/datastore/ +// +// Usage example: +// +// import "google.golang.org/api/datastore/v1beta1" +// ... +// datastoreService, err := datastore.New(oauthHttpClient) +package datastore // import "google.golang.org/api/datastore/v1beta1" + +import ( + "bytes" + "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" +) + +// 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 = "datastore:v1beta1" +const apiName = "datastore" +const apiVersion = "v1beta1" +const basePath = "https://datastore.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 manage your Google Cloud Datastore data + DatastoreScope = "https://www.googleapis.com/auth/datastore" +) + +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + return rs +} + +type ProjectsService struct { + s *Service +} + +// GoogleDatastoreAdminV1beta1CommonMetadata: Metadata common to all +// Datastore Admin operations. +type GoogleDatastoreAdminV1beta1CommonMetadata struct { + // EndTime: The time the operation ended, either successfully or + // otherwise. + EndTime string `json:"endTime,omitempty"` + + // Labels: The client-assigned labels which were provided when the + // operation was + // created. May also include additional labels. + Labels map[string]string `json:"labels,omitempty"` + + // OperationType: The type of the operation. Can be used as a filter + // in + // ListOperationsRequest. + // + // Possible values: + // "OPERATION_TYPE_UNSPECIFIED" - Unspecified. + // "EXPORT_ENTITIES" - ExportEntities. + // "IMPORT_ENTITIES" - ImportEntities. + // "BUILD_INDEX" - Build an index. + // "CLEAR_INDEX" - Clear an index. + OperationType string `json:"operationType,omitempty"` + + // StartTime: The time that work began on the operation. + StartTime string `json:"startTime,omitempty"` + + // State: The current state of the Operation. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified. + // "INITIALIZING" - Request is being prepared for processing. + // "PROCESSING" - Request is actively being processed. + // "CANCELLING" - Request is in the process of being cancelled after + // user called + // longrunning.Operations.CancelOperation on the operation. + // "FINALIZING" - Request has been processed and is in its + // finalization stage. + // "SUCCESSFUL" - Request has completed successfully. + // "FAILED" - Request has finished being processed, but encountered an + // error. + // "CANCELLED" - Request has finished being cancelled after user + // called + // longrunning.Operations.CancelOperation. + State string `json:"state,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 *GoogleDatastoreAdminV1beta1CommonMetadata) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1CommonMetadata + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1EntityFilter: Identifies a subset of +// entities in a project. This is specified as +// combinations of kind + namespace (either or both of which may be all, +// as +// described in the following examples). +// Example usage: +// +// Entire project: +// kinds=[], namespace_ids=[] +// +// Kinds Foo and Bar in all namespaces: +// kinds=['Foo', 'Bar'], namespace_ids=[] +// +// Kinds Foo and Bar only in the default namespace: +// kinds=['Foo', 'Bar'], namespace_ids=[''] +// +// Kinds Foo and Bar in both the default and Baz namespaces: +// kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] +// +// The entire Baz namespace: +// kinds=[], namespace_ids=['Baz'] +type GoogleDatastoreAdminV1beta1EntityFilter struct { + // Kinds: If empty, then this represents all kinds. + Kinds []string `json:"kinds,omitempty"` + + // NamespaceIds: An empty list represents all namespaces. This is the + // preferred + // usage for projects that don't use namespaces. + // + // An empty string element represents the default namespace. This + // should be + // used if the project has data in non-default namespaces, but doesn't + // want to + // include them. + // Each namespace in this list must be unique. + NamespaceIds []string `json:"namespaceIds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kinds") 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. "Kinds") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1EntityFilter) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1EntityFilter + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1ExportEntitiesMetadata: Metadata for +// ExportEntities operations. +type GoogleDatastoreAdminV1beta1ExportEntitiesMetadata struct { + // Common: Metadata common to all Datastore Admin operations. + Common *GoogleDatastoreAdminV1beta1CommonMetadata `json:"common,omitempty"` + + // EntityFilter: Description of which entities are being exported. + EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"` + + // OutputUrlPrefix: Location for the export metadata and data files. + // This will be the same + // value as + // the + // google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_pr + // efix + // field. The final output location is provided + // in + // google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url. + OutputUrlPrefix string `json:"outputUrlPrefix,omitempty"` + + // ProgressBytes: An estimate of the number of bytes processed. + ProgressBytes *GoogleDatastoreAdminV1beta1Progress `json:"progressBytes,omitempty"` + + // ProgressEntities: An estimate of the number of entities processed. + ProgressEntities *GoogleDatastoreAdminV1beta1Progress `json:"progressEntities,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") 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. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1ExportEntitiesMetadata) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1ExportEntitiesMetadata + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1ExportEntitiesRequest: The request +// for +// google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities. +type GoogleDatastoreAdminV1beta1ExportEntitiesRequest struct { + // EntityFilter: Description of what data from the project is included + // in the export. + EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"` + + // Labels: Client-assigned labels. + Labels map[string]string `json:"labels,omitempty"` + + // OutputUrlPrefix: Location for the export metadata and data + // files. + // + // The full resource URL of the external storage location. Currently, + // only + // Google Cloud Storage is supported. So output_url_prefix should be of + // the + // form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is + // the + // name of the Cloud Storage bucket and `NAMESPACE_PATH` is an optional + // Cloud + // Storage namespace path (this is not a Cloud Datastore namespace). For + // more + // information about Cloud Storage namespace paths, see + // [Object + // name + // considerations](https://cloud.google.com/storage/docs/naming#obje + // ct-considerations). + // + // The resulting files will be nested deeper than the specified URL + // prefix. + // The final output URL will be provided in + // the + // google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url + // f + // ield. That value should be used for subsequent ImportEntities + // operations. + // + // By nesting the data files deeper, the same Cloud Storage bucket can + // be used + // in multiple ExportEntities operations without conflict. + OutputUrlPrefix string `json:"outputUrlPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EntityFilter") 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. "EntityFilter") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1ExportEntitiesRequest) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1ExportEntitiesRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1ExportEntitiesResponse: The response +// for +// google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities. +type GoogleDatastoreAdminV1beta1ExportEntitiesResponse struct { + // OutputUrl: Location of the output metadata file. This can be used to + // begin an import + // into Cloud Datastore (this project or another project). + // See + // google.datastore.admin.v1beta1.ImportEntitiesRequest.input_url. + // On + // ly present if the operation completed successfully. + OutputUrl string `json:"outputUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "OutputUrl") 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. "OutputUrl") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1ExportEntitiesResponse) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1ExportEntitiesResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1ImportEntitiesMetadata: Metadata for +// ImportEntities operations. +type GoogleDatastoreAdminV1beta1ImportEntitiesMetadata struct { + // Common: Metadata common to all Datastore Admin operations. + Common *GoogleDatastoreAdminV1beta1CommonMetadata `json:"common,omitempty"` + + // EntityFilter: Description of which entities are being imported. + EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"` + + // InputUrl: The location of the import metadata file. This will be the + // same value as + // the + // google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url + // field + // . + InputUrl string `json:"inputUrl,omitempty"` + + // ProgressBytes: An estimate of the number of bytes processed. + ProgressBytes *GoogleDatastoreAdminV1beta1Progress `json:"progressBytes,omitempty"` + + // ProgressEntities: An estimate of the number of entities processed. + ProgressEntities *GoogleDatastoreAdminV1beta1Progress `json:"progressEntities,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") 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. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1ImportEntitiesMetadata) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1ImportEntitiesMetadata + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1ImportEntitiesRequest: The request +// for +// google.datastore.admin.v1beta1.DatastoreAdmin.ImportEntities. +type GoogleDatastoreAdminV1beta1ImportEntitiesRequest struct { + // EntityFilter: Optionally specify which kinds/namespaces are to be + // imported. If provided, + // the list must be a subset of the EntityFilter used in creating the + // export, + // otherwise a FAILED_PRECONDITION error will be returned. If no filter + // is + // specified then all entities from the export are imported. + EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"` + + // InputUrl: The full resource URL of the external storage location. + // Currently, only + // Google Cloud Storage is supported. So input_url should be of the + // form: + // `gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE` + // , where + // `BUCKET_NAME` is the name of the Cloud Storage bucket, + // `NAMESPACE_PATH` is + // an optional Cloud Storage namespace path (this is not a Cloud + // Datastore + // namespace), and `OVERALL_EXPORT_METADATA_FILE` is the metadata file + // written + // by the ExportEntities operation. For more information about Cloud + // Storage + // namespace paths, see + // [Object + // name + // considerations](https://cloud.google.com/storage/docs/naming#obje + // ct-considerations). + // + // For more information, + // see + // google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url. + InputUrl string `json:"inputUrl,omitempty"` + + // Labels: Client-assigned labels. + Labels map[string]string `json:"labels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EntityFilter") 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. "EntityFilter") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1ImportEntitiesRequest) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1ImportEntitiesRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1Progress: Measures the progress of a +// particular metric. +type GoogleDatastoreAdminV1beta1Progress struct { + // WorkCompleted: Note that this may be greater than work_estimated. + WorkCompleted int64 `json:"workCompleted,omitempty,string"` + + // WorkEstimated: An estimate of how much work needs to be performed. + // May be zero if the + // work estimate is unavailable. + WorkEstimated int64 `json:"workEstimated,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "WorkCompleted") 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. "WorkCompleted") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1Progress) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1Progress + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a +// network API call. +type GoogleLongrunningOperation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. + // If true, the operation is completed, and either `error` or `response` + // is + // available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. + // It typically + // contains progress information and common metadata such as create + // time. + // Some services might not provide such metadata. Any method that + // returns a + // long-running operation should document the metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that + // originally returns it. If you use the default HTTP mapping, + // the + // `name` should have the format of `operations/some/unique/name`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. + // If the original + // method returns no data on success, such as `Delete`, the response + // is + // `google.protobuf.Empty`. If the original method is + // standard + // `Get`/`Create`/`Update`, the response should be the resource. For + // other + // methods, the response should have the type `XxxResponse`, where + // `Xxx` + // is the original method name. For example, if the original method + // name + // is `TakeSnapshot()`, the inferred response type + // is + // `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type noMethod GoogleLongrunningOperation + 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 needs +// +// # Overview +// +// The `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 mapping +// +// The `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 uses +// +// The 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) +} + +// method id "datastore.projects.export": + +type ProjectsExportCall struct { + s *Service + projectId string + googledatastoreadminv1beta1exportentitiesrequest *GoogleDatastoreAdminV1beta1ExportEntitiesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Export: Exports a copy of all or a subset of entities from Google +// Cloud Datastore +// to another storage system, such as Google Cloud Storage. Recent +// updates to +// entities may not be reflected in the export. The export occurs in +// the +// background and its progress can be monitored and managed via +// the +// Operation resource that is created. The output of an export may only +// be +// used once the associated operation is done. If an export operation +// is +// cancelled before completion it may leave partial data behind in +// Google +// Cloud Storage. +func (r *ProjectsService) Export(projectId string, googledatastoreadminv1beta1exportentitiesrequest *GoogleDatastoreAdminV1beta1ExportEntitiesRequest) *ProjectsExportCall { + c := &ProjectsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.googledatastoreadminv1beta1exportentitiesrequest = googledatastoreadminv1beta1exportentitiesrequest + 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 *ProjectsExportCall) Fields(s ...googleapi.Field) *ProjectsExportCall { + 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 *ProjectsExportCall) Context(ctx context.Context) *ProjectsExportCall { + 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 *ProjectsExportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsExportCall) 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.googledatastoreadminv1beta1exportentitiesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}:export") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datastore.projects.export" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Exports a copy of all or a subset of entities from Google Cloud Datastore\nto another storage system, such as Google Cloud Storage. Recent updates to\nentities may not be reflected in the export. The export occurs in the\nbackground and its progress can be monitored and managed via the\nOperation resource that is created. The output of an export may only be\nused once the associated operation is done. If an export operation is\ncancelled before completion it may leave partial data behind in Google\nCloud Storage.", + // "flatPath": "v1beta1/projects/{projectId}:export", + // "httpMethod": "POST", + // "id": "datastore.projects.export", + // "parameterOrder": [ + // "projectId" + // ], + // "parameters": { + // "projectId": { + // "description": "Project ID against which to make the request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}:export", + // "request": { + // "$ref": "GoogleDatastoreAdminV1beta1ExportEntitiesRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// method id "datastore.projects.import": + +type ProjectsImportCall struct { + s *Service + projectId string + googledatastoreadminv1beta1importentitiesrequest *GoogleDatastoreAdminV1beta1ImportEntitiesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Imports entities into Google Cloud Datastore. Existing +// entities with the +// same key are overwritten. The import occurs in the background and +// its +// progress can be monitored and managed via the Operation resource that +// is +// created. If an ImportEntities operation is cancelled, it is +// possible +// that a subset of the data has already been imported to Cloud +// Datastore. +func (r *ProjectsService) Import(projectId string, googledatastoreadminv1beta1importentitiesrequest *GoogleDatastoreAdminV1beta1ImportEntitiesRequest) *ProjectsImportCall { + c := &ProjectsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.googledatastoreadminv1beta1importentitiesrequest = googledatastoreadminv1beta1importentitiesrequest + 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 *ProjectsImportCall) Fields(s ...googleapi.Field) *ProjectsImportCall { + 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 *ProjectsImportCall) Context(ctx context.Context) *ProjectsImportCall { + 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 *ProjectsImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsImportCall) 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.googledatastoreadminv1beta1importentitiesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}:import") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datastore.projects.import" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Imports entities into Google Cloud Datastore. Existing entities with the\nsame key are overwritten. The import occurs in the background and its\nprogress can be monitored and managed via the Operation resource that is\ncreated. If an ImportEntities operation is cancelled, it is possible\nthat a subset of the data has already been imported to Cloud Datastore.", + // "flatPath": "v1beta1/projects/{projectId}:import", + // "httpMethod": "POST", + // "id": "datastore.projects.import", + // "parameterOrder": [ + // "projectId" + // ], + // "parameters": { + // "projectId": { + // "description": "Project ID against which to make the request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/projects/{projectId}:import", + // "request": { + // "$ref": "GoogleDatastoreAdminV1beta1ImportEntitiesRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} diff --git a/vendor/google.golang.org/api/datastore/v1beta3/datastore-api.json b/vendor/google.golang.org/api/datastore/v1beta3/datastore-api.json index 744b69136..87a4f9a5e 100644 --- a/vendor/google.golang.org/api/datastore/v1beta3/datastore-api.json +++ b/vendor/google.golang.org/api/datastore/v1beta3/datastore-api.json @@ -1,23 +1,46 @@ { - "title": "Google Cloud Datastore API", - "discoveryVersion": "v1", "ownerName": "Google", - "version_module": "True", + "discoveryVersion": "v1", + "version_module": true, "resources": { "projects": { "methods": { - "commit": { - "description": "Commits a transaction, optionally creating, deleting or modifying some\nentities.", - "request": { - "$ref": "CommitRequest" + "beginTransaction": { + "response": { + "$ref": "BeginTransactionResponse" }, - "httpMethod": "POST", "parameterOrder": [ "projectId" ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The ID of the project against which to make the request.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta3/projects/{projectId}:beginTransaction", + "id": "datastore.projects.beginTransaction", + "path": "v1beta3/projects/{projectId}:beginTransaction", + "request": { + "$ref": "BeginTransactionRequest" + }, + "description": "Begins a new transaction." + }, + "commit": { "response": { "$ref": "CommitResponse" }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", "parameters": { "projectId": { "location": "path", @@ -31,38 +54,20 @@ "https://www.googleapis.com/auth/datastore" ], "flatPath": "v1beta3/projects/{projectId}:commit", + "id": "datastore.projects.commit", "path": "v1beta3/projects/{projectId}:commit", - "id": "datastore.projects.commit" - }, - "beginTransaction": { + "description": "Commits a transaction, optionally creating, deleting or modifying some\nentities.", "request": { - "$ref": "BeginTransactionRequest" - }, - "description": "Begins a new transaction.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "BeginTransactionResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore" - ], - "parameters": { - "projectId": { - "type": "string", - "required": true, - "location": "path", - "description": "The ID of the project against which to make the request." - } - }, - "flatPath": "v1beta3/projects/{projectId}:beginTransaction", - "path": "v1beta3/projects/{projectId}:beginTransaction", - "id": "datastore.projects.beginTransaction" + "$ref": "CommitRequest" + } }, "runQuery": { + "id": "datastore.projects.runQuery", + "path": "v1beta3/projects/{projectId}:runQuery", + "request": { + "$ref": "RunQueryRequest" + }, + "description": "Queries for entities.", "response": { "$ref": "RunQueryResponse" }, @@ -82,57 +87,20 @@ "location": "path" } }, - "flatPath": "v1beta3/projects/{projectId}:runQuery", - "id": "datastore.projects.runQuery", - "path": "v1beta3/projects/{projectId}:runQuery", - "request": { - "$ref": "RunQueryRequest" - }, - "description": "Queries for entities." + "flatPath": "v1beta3/projects/{projectId}:runQuery" }, "rollback": { - "httpMethod": "POST", - "parameterOrder": [ - "projectId" - ], + "request": { + "$ref": "RollbackRequest" + }, + "description": "Rolls back a transaction.", "response": { "$ref": "RollbackResponse" }, - "parameters": { - "projectId": { - "description": "The ID of the project against which to make the request.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore" - ], - "flatPath": "v1beta3/projects/{projectId}:rollback", - "path": "v1beta3/projects/{projectId}:rollback", - "id": "datastore.projects.rollback", - "description": "Rolls back a transaction.", - "request": { - "$ref": "RollbackRequest" - } - }, - "lookup": { - "flatPath": "v1beta3/projects/{projectId}:lookup", - "path": "v1beta3/projects/{projectId}:lookup", - "id": "datastore.projects.lookup", - "request": { - "$ref": "LookupRequest" - }, - "description": "Looks up entities by key.", - "httpMethod": "POST", "parameterOrder": [ "projectId" ], - "response": { - "$ref": "LookupResponse" - }, + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/datastore" @@ -144,15 +112,40 @@ "required": true, "location": "path" } - } + }, + "flatPath": "v1beta3/projects/{projectId}:rollback", + "id": "datastore.projects.rollback", + "path": "v1beta3/projects/{projectId}:rollback" + }, + "lookup": { + "response": { + "$ref": "LookupResponse" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], + "parameters": { + "projectId": { + "description": "The ID of the project against which to make the request.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta3/projects/{projectId}:lookup", + "id": "datastore.projects.lookup", + "path": "v1beta3/projects/{projectId}:lookup", + "request": { + "$ref": "LookupRequest" + }, + "description": "Looks up entities by key." }, "allocateIds": { - "path": "v1beta3/projects/{projectId}:allocateIds", - "id": "datastore.projects.allocateIds", - "description": "Allocates IDs for the given keys, which is useful for referencing an entity\nbefore it is inserted.", - "request": { - "$ref": "AllocateIdsRequest" - }, "httpMethod": "POST", "parameterOrder": [ "projectId" @@ -160,6 +153,10 @@ "response": { "$ref": "AllocateIdsResponse" }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], "parameters": { "projectId": { "location": "path", @@ -168,20 +165,22 @@ "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore" - ], - "flatPath": "v1beta3/projects/{projectId}:allocateIds" + "flatPath": "v1beta3/projects/{projectId}:allocateIds", + "path": "v1beta3/projects/{projectId}:allocateIds", + "id": "datastore.projects.allocateIds", + "request": { + "$ref": "AllocateIdsRequest" + }, + "description": "Allocates IDs for the given keys, which is useful for referencing an entity\nbefore it is inserted." } } } }, "parameters": { "quotaUser": { - "location": "query", "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.", - "type": "string" + "type": "string", + "location": "query" }, "pp": { "description": "Pretty-print response.", @@ -200,9 +199,9 @@ "type": "string" }, "upload_protocol": { - "type": "string", "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" }, "prettyPrint": { "location": "query", @@ -211,9 +210,9 @@ "type": "boolean" }, "fields": { + "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" + "type": "string" }, "uploadType": { "location": "query", @@ -239,6 +238,12 @@ "type": "string" }, "alt": { + "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", "description": "Data format for response.", "default": "json", "enum": [ @@ -246,18 +251,12 @@ "media", "proto" ], - "type": "string", - "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" }, "access_token": { + "description": "OAuth access token.", "type": "string", - "location": "query", - "description": "OAuth access token." + "location": "query" }, "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.", @@ -266,6 +265,316 @@ } }, "schemas": { + "MutationResult": { + "description": "The result of applying a mutation.", + "type": "object", + "properties": { + "version": { + "format": "int64", + "description": "The version of the entity on the server after processing the mutation. If\nthe mutation doesn't change anything on the server, then the version will\nbe the version of the current entity or, if no entity is present, a version\nthat is strictly greater than the version of any previous entity and less\nthan the version of any possible future entity.", + "type": "string" + }, + "conflictDetected": { + "description": "Whether a conflict was detected for this mutation. Always false when a\nconflict detection strategy field is not set in the mutation.", + "type": "boolean" + }, + "key": { + "description": "The automatically allocated key.\nSet only when the mutation allocated a key.", + "$ref": "Key" + } + }, + "id": "MutationResult" + }, + "GqlQuery": { + "description": "A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).", + "type": "object", + "properties": { + "queryString": { + "description": "A string of the format described\n[here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).", + "type": "string" + }, + "positionalBindings": { + "description": "Numbered binding site @1 references the first numbered parameter,\neffectively using 1-based indexing, rather than the usual 0.\n\nFor each binding site numbered i in `query_string`, there must be an i-th\nnumbered parameter. The inverse must also be true.", + "items": { + "$ref": "GqlQueryParameter" + }, + "type": "array" + }, + "namedBindings": { + "additionalProperties": { + "$ref": "GqlQueryParameter" + }, + "description": "For each non-reserved named binding site in the query string, there must be\na named parameter with that name, but not necessarily the inverse.\n\nKey must match regex `A-Za-z_$*`, must not match regex\n`__.*__`, and must not be `\"\"`.", + "type": "object" + }, + "allowLiterals": { + "description": "When false, the query string must not contain any literals and instead must\nbind all values. For example,\n`SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while\n`SELECT * FROM Kind WHERE a = @value` is.", + "type": "boolean" + } + }, + "id": "GqlQuery" + }, + "Filter": { + "description": "A holder for any type of filter.", + "type": "object", + "properties": { + "propertyFilter": { + "$ref": "PropertyFilter", + "description": "A filter on a property." + }, + "compositeFilter": { + "description": "A composite filter.", + "$ref": "CompositeFilter" + } + }, + "id": "Filter" + }, + "RollbackRequest": { + "description": "The request for Datastore.Rollback.", + "type": "object", + "properties": { + "transaction": { + "format": "byte", + "description": "The transaction identifier, returned by a call to\nDatastore.BeginTransaction.", + "type": "string" + } + }, + "id": "RollbackRequest" + }, + "RunQueryRequest": { + "properties": { + "gqlQuery": { + "$ref": "GqlQuery", + "description": "The GQL query to run." + }, + "partitionId": { + "description": "Entities are partitioned into subsets, identified by a partition ID.\nQueries are scoped to a single partition.\nThis partition ID is normalized with the standard default context\npartition ID.", + "$ref": "PartitionId" + }, + "readOptions": { + "$ref": "ReadOptions", + "description": "The options for this query." + }, + "query": { + "description": "The query to run.", + "$ref": "Query" + } + }, + "id": "RunQueryRequest", + "description": "The request for Datastore.RunQuery.", + "type": "object" + }, + "GoogleDatastoreAdminV1beta1ExportEntitiesMetadata": { + "description": "Metadata for ExportEntities operations.", + "type": "object", + "properties": { + "common": { + "description": "Metadata common to all Datastore Admin operations.", + "$ref": "GoogleDatastoreAdminV1beta1CommonMetadata" + }, + "progressBytes": { + "description": "An estimate of the number of bytes processed.", + "$ref": "GoogleDatastoreAdminV1beta1Progress" + }, + "outputUrlPrefix": { + "description": "Location for the export metadata and data files. This will be the same\nvalue as the\ngoogle.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_prefix\nfield. The final output location is provided in\ngoogle.datastore.admin.v1beta1.ExportEntitiesResponse.output_url.", + "type": "string" + }, + "entityFilter": { + "$ref": "GoogleDatastoreAdminV1beta1EntityFilter", + "description": "Description of which entities are being exported." + }, + "progressEntities": { + "description": "An estimate of the number of entities processed.", + "$ref": "GoogleDatastoreAdminV1beta1Progress" + } + }, + "id": "GoogleDatastoreAdminV1beta1ExportEntitiesMetadata" + }, + "TransactionOptions": { + "properties": { + "readOnly": { + "description": "The transaction should only allow reads.", + "$ref": "ReadOnly" + }, + "readWrite": { + "description": "The transaction should allow both reads and writes.", + "$ref": "ReadWrite" + } + }, + "id": "TransactionOptions", + "description": "Options for beginning a new transaction.\n\nTransactions can be created explicitly with calls to\nDatastore.BeginTransaction or implicitly by setting\nReadOptions.new_transaction in read requests.", + "type": "object" + }, + "CompositeFilter": { + "description": "A filter that merges multiple other filters using the given operator.", + "type": "object", + "properties": { + "filters": { + "description": "The list of filters to combine.\nMust contain at least one filter.", + "items": { + "$ref": "Filter" + }, + "type": "array" + }, + "op": { + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "The results are required to satisfy each of the combined filters." + ], + "enum": [ + "OPERATOR_UNSPECIFIED", + "AND" + ], + "description": "The operator for combining multiple filters.", + "type": "string" + } + }, + "id": "CompositeFilter" + }, + "GoogleDatastoreAdminV1beta1ImportEntitiesMetadata": { + "properties": { + "common": { + "description": "Metadata common to all Datastore Admin operations.", + "$ref": "GoogleDatastoreAdminV1beta1CommonMetadata" + }, + "inputUrl": { + "description": "The location of the import metadata file. This will be the same value as\nthe google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url\nfield.", + "type": "string" + }, + "progressBytes": { + "$ref": "GoogleDatastoreAdminV1beta1Progress", + "description": "An estimate of the number of bytes processed." + }, + "entityFilter": { + "description": "Description of which entities are being imported.", + "$ref": "GoogleDatastoreAdminV1beta1EntityFilter" + }, + "progressEntities": { + "description": "An estimate of the number of entities processed.", + "$ref": "GoogleDatastoreAdminV1beta1Progress" + } + }, + "id": "GoogleDatastoreAdminV1beta1ImportEntitiesMetadata", + "description": "Metadata for ImportEntities operations.", + "type": "object" + }, + "AllocateIdsResponse": { + "properties": { + "keys": { + "description": "The keys specified in the request (in the same order), each with\nits key path completed with a newly allocated ID.", + "items": { + "$ref": "Key" + }, + "type": "array" + } + }, + "id": "AllocateIdsResponse", + "description": "The response for Datastore.AllocateIds.", + "type": "object" + }, + "Query": { + "description": "A query for entities.", + "type": "object", + "properties": { + "projection": { + "description": "The projection to return. Defaults to returning all properties.", + "items": { + "$ref": "Projection" + }, + "type": "array" + }, + "endCursor": { + "format": "byte", + "description": "An ending point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", + "type": "string" + }, + "filter": { + "$ref": "Filter", + "description": "The filter to apply." + }, + "limit": { + "format": "int32", + "description": "The maximum number of results to return. Applies after all other\nconstraints. Optional.\nUnspecified is interpreted as no limit.\nMust be \u003e= 0 if specified.", + "type": "integer" + }, + "offset": { + "format": "int32", + "description": "The number of results to skip. Applies before limit, but after all other\nconstraints. Optional. Must be \u003e= 0 if specified.", + "type": "integer" + }, + "startCursor": { + "format": "byte", + "description": "A starting point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", + "type": "string" + }, + "kind": { + "description": "The kinds to query (if empty, returns entities of all kinds).\nCurrently at most 1 kind may be specified.", + "items": { + "$ref": "KindExpression" + }, + "type": "array" + }, + "distinctOn": { + "description": "The properties to make distinct. The query results will contain the first\nresult for each distinct combination of values for the given properties\n(if empty, all results are returned).", + "items": { + "$ref": "PropertyReference" + }, + "type": "array" + }, + "order": { + "description": "The order to apply to the query results (if empty, order is unspecified).", + "items": { + "$ref": "PropertyOrder" + }, + "type": "array" + } + }, + "id": "Query" + }, + "ReadOnly": { + "description": "Options specific to read-only transactions.", + "type": "object", + "properties": {}, + "id": "ReadOnly" + }, + "PropertyFilter": { + "properties": { + "value": { + "$ref": "Value", + "description": "The value to compare the property to." + }, + "property": { + "description": "The property to filter by.", + "$ref": "PropertyReference" + }, + "op": { + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "Less than.", + "Less than or equal.", + "Greater than.", + "Greater than or equal.", + "Equal.", + "Has ancestor." + ], + "enum": [ + "OPERATOR_UNSPECIFIED", + "LESS_THAN", + "LESS_THAN_OR_EQUAL", + "GREATER_THAN", + "GREATER_THAN_OR_EQUAL", + "EQUAL", + "HAS_ANCESTOR" + ], + "description": "The operator to filter by.", + "type": "string" + } + }, + "id": "PropertyFilter", + "description": "A filter on a specific property.", + "type": "object" + }, "EntityResult": { "properties": { "cursor": { @@ -279,79 +588,16 @@ "type": "string" }, "entity": { - "$ref": "Entity", - "description": "The resulting entity." + "description": "The resulting entity.", + "$ref": "Entity" } }, "id": "EntityResult", "description": "The result of fetching an entity from Datastore.", "type": "object" }, - "CommitResponse": { - "description": "The response for Datastore.Commit.", - "type": "object", - "properties": { - "mutationResults": { - "description": "The result of performing the mutations.\nThe i-th mutation result corresponds to the i-th mutation in the request.", - "items": { - "$ref": "MutationResult" - }, - "type": "array" - }, - "indexUpdates": { - "format": "int32", - "description": "The number of index entries updated during the commit, or zero if none were\nupdated.", - "type": "integer" - } - }, - "id": "CommitResponse" - }, "Value": { - "description": "A message that can hold any of the supported value types and associated\nmetadata.", - "type": "object", "properties": { - "excludeFromIndexes": { - "description": "If the value should be excluded from all indexes including those defined\nexplicitly.", - "type": "boolean" - }, - "doubleValue": { - "format": "double", - "description": "A double value.", - "type": "number" - }, - "timestampValue": { - "type": "string", - "format": "google-datetime", - "description": "A timestamp value.\nWhen stored in the Datastore, precise only to microseconds;\nany additional precision is rounded down." - }, - "booleanValue": { - "description": "A boolean value.", - "type": "boolean" - }, - "nullValue": { - "description": "A null value.", - "type": "string", - "enumDescriptions": [ - "Null value." - ], - "enum": [ - "NULL_VALUE" - ] - }, - "blobValue": { - "format": "byte", - "description": "A blob value.\nMay have at most 1,000,000 bytes.\nWhen `exclude_from_indexes` is false, may have at most 1500 bytes.\nIn JSON requests, must be base64-encoded.", - "type": "string" - }, - "meaning": { - "type": "integer", - "format": "int32", - "description": "The `meaning` field should only be populated for backwards compatibility." - }, - "arrayValue": { - "description": "An array value.\nCannot contain another array value.\nA `Value` instance that sets field `array_value` must not set fields\n`meaning` or `exclude_from_indexes`.", - "$ref": "ArrayValue" - }, "entityValue": { "$ref": "Entity", "description": "An entity value.\n\n- May have no key.\n- May have a key with an incomplete key path.\n- May have a reserved/read-only key." @@ -366,72 +612,174 @@ "type": "string" }, "keyValue": { - "$ref": "Key", - "description": "A key value." + "description": "A key value.", + "$ref": "Key" }, "stringValue": { "description": "A UTF-8 encoded string value.\nWhen `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.\nOtherwise, may be set to at least 1,000,000 bytes.", "type": "string" + }, + "excludeFromIndexes": { + "description": "If the value should be excluded from all indexes including those defined\nexplicitly.", + "type": "boolean" + }, + "doubleValue": { + "format": "double", + "description": "A double value.", + "type": "number" + }, + "timestampValue": { + "format": "google-datetime", + "description": "A timestamp value.\nWhen stored in the Datastore, precise only to microseconds;\nany additional precision is rounded down.", + "type": "string" + }, + "booleanValue": { + "description": "A boolean value.", + "type": "boolean" + }, + "nullValue": { + "enumDescriptions": [ + "Null value." + ], + "enum": [ + "NULL_VALUE" + ], + "description": "A null value.", + "type": "string" + }, + "blobValue": { + "format": "byte", + "description": "A blob value.\nMay have at most 1,000,000 bytes.\nWhen `exclude_from_indexes` is false, may have at most 1500 bytes.\nIn JSON requests, must be base64-encoded.", + "type": "string" + }, + "meaning": { + "format": "int32", + "description": "The `meaning` field should only be populated for backwards compatibility.", + "type": "integer" + }, + "arrayValue": { + "description": "An array value.\nCannot contain another array value.\nA `Value` instance that sets field `array_value` must not set fields\n`meaning` or `exclude_from_indexes`.", + "$ref": "ArrayValue" } }, - "id": "Value" + "id": "Value", + "description": "A message that can hold any of the supported value types and associated\nmetadata.", + "type": "object" }, - "PartitionId": { - "description": "A partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty.\n\nA partition ID contains several dimensions:\nproject ID and namespace ID.\n\nPartition dimensions:\n\n- May be `\"\"`.\n- Must be valid UTF-8 bytes.\n- Must have values that match regex `[A-Za-z\\d\\.\\-_]{1,100}`\nIf the value of any dimension matches regex `__.*__`, the partition is\nreserved/read-only.\nA reserved/read-only partition ID is forbidden in certain documented\ncontexts.\n\nForeign partition IDs (in which the project ID does\nnot match the context project ID ) are discouraged.\nReads and writes of foreign partition IDs may fail if the project is not in an active state.", + "CommitResponse": { + "description": "The response for Datastore.Commit.", "type": "object", "properties": { - "projectId": { - "type": "string", - "description": "The ID of the project to which the entities belong." + "indexUpdates": { + "format": "int32", + "description": "The number of index entries updated during the commit, or zero if none were\nupdated.", + "type": "integer" }, + "mutationResults": { + "description": "The result of performing the mutations.\nThe i-th mutation result corresponds to the i-th mutation in the request.", + "items": { + "$ref": "MutationResult" + }, + "type": "array" + } + }, + "id": "CommitResponse" + }, + "PartitionId": { + "properties": { "namespaceId": { "description": "If not empty, the ID of the namespace to which the entities belong.", "type": "string" + }, + "projectId": { + "description": "The ID of the project to which the entities belong.", + "type": "string" } }, - "id": "PartitionId" + "id": "PartitionId", + "description": "A partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty.\n\nA partition ID contains several dimensions:\nproject ID and namespace ID.\n\nPartition dimensions:\n\n- May be `\"\"`.\n- Must be valid UTF-8 bytes.\n- Must have values that match regex `[A-Za-z\\d\\.\\-_]{1,100}`\nIf the value of any dimension matches regex `__.*__`, the partition is\nreserved/read-only.\nA reserved/read-only partition ID is forbidden in certain documented\ncontexts.\n\nForeign partition IDs (in which the project ID does\nnot match the context project ID ) are discouraged.\nReads and writes of foreign partition IDs may fail if the project is not in an active state.", + "type": "object" }, "Entity": { "description": "A Datastore data object.\n\nAn entity is limited to 1 megabyte when stored. That _roughly_\ncorresponds to a limit of 1 megabyte for the serialized form of this\nmessage.", "type": "object", "properties": { - "key": { - "$ref": "Key", - "description": "The entity's key.\n\nAn entity must have a key, unless otherwise documented (for example,\nan entity in `Value.entity_value` may have no key).\nAn entity's kind is its key path's last element's kind,\nor null if it has no key." - }, "properties": { "additionalProperties": { "$ref": "Value" }, "description": "The entity's properties.\nThe map's keys are property names.\nA property name matching regex `__.*__` is reserved.\nA reserved property name is forbidden in certain documented contexts.\nThe name must not contain more than 500 characters.\nThe name cannot be `\"\"`.", "type": "object" + }, + "key": { + "description": "The entity's key.\n\nAn entity must have a key, unless otherwise documented (for example,\nan entity in `Value.entity_value` may have no key).\nAn entity's kind is its key path's last element's kind,\nor null if it has no key.", + "$ref": "Key" } }, "id": "Entity" }, - "LookupRequest": { - "description": "The request for Datastore.Lookup.", - "type": "object", + "ReadWrite": { "properties": { + "previousTransaction": { + "format": "byte", + "description": "The transaction identifier of the transaction being retried.", + "type": "string" + } + }, + "id": "ReadWrite", + "description": "Options specific to read / write transactions.", + "type": "object" + }, + "LookupRequest": { + "properties": { + "readOptions": { + "description": "The options for this lookup request.", + "$ref": "ReadOptions" + }, "keys": { "description": "Keys of entities to look up.", "items": { "$ref": "Key" }, "type": "array" - }, - "readOptions": { - "$ref": "ReadOptions", - "description": "The options for this lookup request." } }, - "id": "LookupRequest" + "id": "LookupRequest", + "description": "The request for Datastore.Lookup.", + "type": "object" }, "QueryResultBatch": { - "id": "QueryResultBatch", "description": "A batch of results produced by a query.", "type": "object", "properties": { + "moreResults": { + "enum": [ + "MORE_RESULTS_TYPE_UNSPECIFIED", + "NOT_FINISHED", + "MORE_RESULTS_AFTER_LIMIT", + "MORE_RESULTS_AFTER_CURSOR", + "NO_MORE_RESULTS" + ], + "description": "The state of the query after the current batch.", + "type": "string", + "enumDescriptions": [ + "Unspecified. This value is never used.", + "There may be additional batches to fetch from this query.", + "The query is finished, but there may be more results after the limit.", + "The query is finished, but there may be more results after the end\ncursor.", + "The query is finished, and there are no more results." + ] + }, + "endCursor": { + "format": "byte", + "description": "A cursor that points to the position after the last result in the batch.", + "type": "string" + }, + "snapshotVersion": { + "format": "int64", + "description": "The version number of the snapshot this batch was returned from.\nThis applies to the range of results from the query's `start_cursor` (or\nthe beginning of the query if no cursor was given) to this batch's\n`end_cursor` (not the query's `end_cursor`).\n\nIn a single transaction, subsequent query result batches for the same query\ncan have a greater snapshot version number. Each batch's snapshot version\nis valid for all preceding batches.\nThe value will be zero for eventually consistent queries.", + "type": "string" + }, "skippedCursor": { "format": "byte", "description": "A cursor that points to the position after the last skipped result.\nWill be set when `skipped_results` != 0.", @@ -459,53 +807,41 @@ ] }, "entityResults": { + "description": "The results for this batch.", "items": { "$ref": "EntityResult" }, - "type": "array", - "description": "The results for this batch." - }, - "endCursor": { - "format": "byte", - "description": "A cursor that points to the position after the last result in the batch.", + "type": "array" + } + }, + "id": "QueryResultBatch" + }, + "GoogleDatastoreAdminV1beta1Progress": { + "description": "Measures the progress of a particular metric.", + "type": "object", + "properties": { + "workEstimated": { + "format": "int64", + "description": "An estimate of how much work needs to be performed. May be zero if the\nwork estimate is unavailable.", "type": "string" }, - "moreResults": { - "description": "The state of the query after the current batch.", - "type": "string", - "enumDescriptions": [ - "Unspecified. This value is never used.", - "There may be additional batches to fetch from this query.", - "The query is finished, but there may be more results after the limit.", - "The query is finished, but there may be more results after the end\ncursor.", - "The query is finished, and there are no more results." - ], - "enum": [ - "MORE_RESULTS_TYPE_UNSPECIFIED", - "NOT_FINISHED", - "MORE_RESULTS_AFTER_LIMIT", - "MORE_RESULTS_AFTER_CURSOR", - "NO_MORE_RESULTS" - ] - }, - "snapshotVersion": { + "workCompleted": { "format": "int64", - "description": "The version number of the snapshot this batch was returned from.\nThis applies to the range of results from the query's `start_cursor` (or\nthe beginning of the query if no cursor was given) to this batch's\n`end_cursor` (not the query's `end_cursor`).\n\nIn a single transaction, subsequent query result batches for the same query\ncan have a greater snapshot version number. Each batch's snapshot version\nis valid for all preceding batches.\nThe value will be zero for eventually consistent queries.", + "description": "Note that this may be greater than work_estimated.", "type": "string" } - } + }, + "id": "GoogleDatastoreAdminV1beta1Progress" }, "PathElement": { - "description": "A (kind, ID/name) pair used to construct a key path.\n\nIf either name or ID is set, the element is complete.\nIf neither is set, the element is incomplete.", - "type": "object", "properties": { "name": { "description": "The name of the entity.\nA name matching regex `__.*__` is reserved/read-only.\nA name must not be more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.", "type": "string" }, "kind": { - "type": "string", - "description": "The kind of the entity.\nA kind matching regex `__.*__` is reserved/read-only.\nA kind must not contain more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`." + "description": "The kind of the entity.\nA kind matching regex `__.*__` is reserved/read-only.\nA kind must not contain more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.", + "type": "string" }, "id": { "format": "int64", @@ -513,7 +849,9 @@ "type": "string" } }, - "id": "PathElement" + "id": "PathElement", + "description": "A (kind, ID/name) pair used to construct a key path.\n\nIf either name or ID is set, the element is complete.\nIf neither is set, the element is incomplete.", + "type": "object" }, "GqlQueryParameter": { "description": "A binding parameter for a GQL query.", @@ -543,24 +881,7 @@ }, "id": "BeginTransactionResponse" }, - "RunQueryResponse": { - "id": "RunQueryResponse", - "description": "The response for Datastore.RunQuery.", - "type": "object", - "properties": { - "query": { - "$ref": "Query", - "description": "The parsed form of the `GqlQuery` from the request, if it was set." - }, - "batch": { - "$ref": "QueryResultBatch", - "description": "A batch of query results (always present)." - } - } - }, "AllocateIdsRequest": { - "description": "The request for Datastore.AllocateIds.", - "type": "object", "properties": { "keys": { "description": "A list of keys with incomplete key paths for which to allocate IDs.\nNo key may be reserved/read-only.", @@ -570,12 +891,11 @@ "type": "array" } }, - "id": "AllocateIdsRequest" + "id": "AllocateIdsRequest", + "description": "The request for Datastore.AllocateIds.", + "type": "object" }, "LookupResponse": { - "id": "LookupResponse", - "description": "The response for Datastore.Lookup.", - "type": "object", "properties": { "deferred": { "description": "A list of keys that were not looked up due to resource constraints. The\norder of results in this field is undefined and has no relation to the\norder of the keys in the input.", @@ -598,14 +918,31 @@ }, "type": "array" } - } + }, + "id": "LookupResponse", + "description": "The response for Datastore.Lookup.", + "type": "object" + }, + "RunQueryResponse": { + "properties": { + "batch": { + "description": "A batch of query results (always present).", + "$ref": "QueryResultBatch" + }, + "query": { + "description": "The parsed form of the `GqlQuery` from the request, if it was set.", + "$ref": "Query" + } + }, + "id": "RunQueryResponse", + "description": "The response for Datastore.RunQuery.", + "type": "object" }, "PropertyOrder": { "description": "The desired order for a specific property.", "type": "object", "properties": { "direction": { - "type": "string", "enumDescriptions": [ "Unspecified. This value must not be used.", "Ascending.", @@ -616,11 +953,12 @@ "ASCENDING", "DESCENDING" ], - "description": "The direction to order by. Defaults to `ASCENDING`." + "description": "The direction to order by. Defaults to `ASCENDING`.", + "type": "string" }, "property": { - "description": "The property to order by.", - "$ref": "PropertyReference" + "$ref": "PropertyReference", + "description": "The property to order by." } }, "id": "PropertyOrder" @@ -628,11 +966,23 @@ "BeginTransactionRequest": { "description": "The request for Datastore.BeginTransaction.", "type": "object", - "properties": {}, + "properties": { + "transactionOptions": { + "description": "Options for a new transaction.", + "$ref": "TransactionOptions" + } + }, "id": "BeginTransactionRequest" }, "CommitRequest": { + "description": "The request for Datastore.Commit.", + "type": "object", "properties": { + "transaction": { + "format": "byte", + "description": "The identifier of the transaction associated with the commit. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.", + "type": "string" + }, "mode": { "enum": [ "MODE_UNSPECIFIED", @@ -653,16 +1003,9 @@ "$ref": "Mutation" }, "type": "array" - }, - "transaction": { - "format": "byte", - "description": "The identifier of the transaction associated with the commit. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.", - "type": "string" } }, - "id": "CommitRequest", - "description": "The request for Datastore.Commit.", - "type": "object" + "id": "CommitRequest" }, "KindExpression": { "description": "A representation of a kind.", @@ -676,8 +1019,6 @@ "id": "KindExpression" }, "Key": { - "description": "A unique identifier for an entity.\nIf a key's partition ID or any of its path kinds or names are\nreserved/read-only, the key is reserved/read-only.\nA reserved/read-only key is forbidden in certain documented contexts.", - "type": "object", "properties": { "path": { "description": "The entity path.\nAn entity path consists of one or more elements composed of a kind and a\nstring or numerical identifier, which identify entities. The first\nelement identifies a _root entity_, the second element identifies\na _child_ of the root entity, the third element identifies a child of the\nsecond entity, and so forth. The entities identified by all prefixes of\nthe path are called the element's _ancestors_.\n\nAn entity path is always fully complete: *all* of the entity's ancestors\nare required to be in the path along with the entity identifier itself.\nThe only exception is that in some documented cases, the identifier in the\nlast path element (for the entity) itself may be omitted. For example,\nthe last path element of the key of `Mutation.insert` may have no\nidentifier.\n\nA path can never be empty, and a path can have at most 100 elements.", @@ -691,7 +1032,9 @@ "$ref": "PartitionId" } }, - "id": "Key" + "id": "Key", + "description": "A unique identifier for an entity.\nIf a key's partition ID or any of its path kinds or names are\nreserved/read-only, the key is reserved/read-only.\nA reserved/read-only key is forbidden in certain documented contexts.", + "type": "object" }, "LatLng": { "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", @@ -710,6 +1053,27 @@ }, "id": "LatLng" }, + "GoogleDatastoreAdminV1beta1EntityFilter": { + "description": "Identifies a subset of entities in a project. This is specified as\ncombinations of kind + namespace (either or both of which may be all, as\ndescribed in the following examples).\nExample usage:\n\nEntire project:\n kinds=[], namespace_ids=[]\n\nKinds Foo and Bar in all namespaces:\n kinds=['Foo', 'Bar'], namespace_ids=[]\n\nKinds Foo and Bar only in the default namespace:\n kinds=['Foo', 'Bar'], namespace_ids=['']\n\nKinds Foo and Bar in both the default and Baz namespaces:\n kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz']\n\nThe entire Baz namespace:\n kinds=[], namespace_ids=['Baz']", + "type": "object", + "properties": { + "kinds": { + "description": "If empty, then this represents all kinds.", + "items": { + "type": "string" + }, + "type": "array" + }, + "namespaceIds": { + "description": "An empty list represents all namespaces. This is the preferred\nusage for projects that don't use namespaces.\n\nAn empty string element represents the default namespace. This should be\nused if the project has data in non-default namespaces, but doesn't want to\ninclude them.\nEach namespace in this list must be unique.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "GoogleDatastoreAdminV1beta1EntityFilter" + }, "PropertyReference": { "description": "A reference to a property relative to the kind expressions.", "type": "object", @@ -721,20 +1085,73 @@ }, "id": "PropertyReference" }, - "Projection": { - "description": "A representation of a property in a projection.", - "type": "object", + "GoogleDatastoreAdminV1beta1CommonMetadata": { "properties": { - "property": { - "$ref": "PropertyReference", - "description": "The property to project." + "state": { + "enum": [ + "STATE_UNSPECIFIED", + "INITIALIZING", + "PROCESSING", + "CANCELLING", + "FINALIZING", + "SUCCESSFUL", + "FAILED", + "CANCELLED" + ], + "description": "The current state of the Operation.", + "type": "string", + "enumDescriptions": [ + "Unspecified.", + "Request is being prepared for processing.", + "Request is actively being processed.", + "Request is in the process of being cancelled after user called\nlongrunning.Operations.CancelOperation on the operation.", + "Request has been processed and is in its finalization stage.", + "Request has completed successfully.", + "Request has finished being processed, but encountered an error.", + "Request has finished being cancelled after user called\nlongrunning.Operations.CancelOperation." + ] + }, + "operationType": { + "enumDescriptions": [ + "Unspecified.", + "ExportEntities.", + "ImportEntities.", + "Build an index.", + "Clear an index." + ], + "enum": [ + "OPERATION_TYPE_UNSPECIFIED", + "EXPORT_ENTITIES", + "IMPORT_ENTITIES", + "BUILD_INDEX", + "CLEAR_INDEX" + ], + "description": "The type of the operation. Can be used as a filter in\nListOperationsRequest.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "The time that work began on the operation.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "The client-assigned labels which were provided when the operation was\ncreated. May also include additional labels.", + "type": "object" + }, + "endTime": { + "format": "google-datetime", + "description": "The time the operation ended, either successfully or otherwise.", + "type": "string" } }, - "id": "Projection" + "id": "GoogleDatastoreAdminV1beta1CommonMetadata", + "description": "Metadata common to all Datastore Admin operations.", + "type": "object" }, "ArrayValue": { - "description": "An array value.", - "type": "object", "properties": { "values": { "description": "Values in the array.\nThe order of this array may not be preserved if it contains a mix of\nindexed and unindexed values.", @@ -744,16 +1161,36 @@ "type": "array" } }, - "id": "ArrayValue" + "id": "ArrayValue", + "description": "An array value.", + "type": "object" + }, + "Projection": { + "properties": { + "property": { + "description": "The property to project.", + "$ref": "PropertyReference" + } + }, + "id": "Projection", + "description": "A representation of a property in a projection.", + "type": "object" }, "Mutation": { - "id": "Mutation", "description": "A mutation to apply to an entity.", "type": "object", "properties": { + "update": { + "$ref": "Entity", + "description": "The entity to update. The entity must already exist.\nMust have a complete key path." + }, + "upsert": { + "$ref": "Entity", + "description": "The entity to upsert. The entity may or may not already exist.\nThe entity key's final path element may be incomplete." + }, "delete": { - "$ref": "Key", - "description": "The key of the entity to delete. The entity may or may not already exist.\nMust have a complete key path and must not be reserved/read-only." + "description": "The key of the entity to delete. The entity may or may not already exist.\nMust have a complete key path and must not be reserved/read-only.", + "$ref": "Key" }, "baseVersion": { "format": "int64", @@ -763,19 +1200,11 @@ "insert": { "$ref": "Entity", "description": "The entity to insert. The entity must not already exist.\nThe entity key's final path element may be incomplete." - }, - "update": { - "description": "The entity to update. The entity must already exist.\nMust have a complete key path.", - "$ref": "Entity" - }, - "upsert": { - "description": "The entity to upsert. The entity may or may not already exist.\nThe entity key's final path element may be incomplete.", - "$ref": "Entity" } - } + }, + "id": "Mutation" }, "ReadOptions": { - "type": "object", "properties": { "transaction": { "format": "byte", @@ -783,270 +1212,47 @@ "type": "string" }, "readConsistency": { - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "Strong consistency.", - "Eventual consistency." - ], "enum": [ "READ_CONSISTENCY_UNSPECIFIED", "STRONG", "EVENTUAL" ], "description": "The non-transactional read consistency to use.\nCannot be set to `STRONG` for global queries.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "Strong consistency.", + "Eventual consistency." + ] } }, "id": "ReadOptions", - "description": "The options shared by read requests." + "description": "The options shared by read requests.", + "type": "object" + }, + "GoogleDatastoreAdminV1beta1ExportEntitiesResponse": { + "properties": { + "outputUrl": { + "description": "Location of the output metadata file. This can be used to begin an import\ninto Cloud Datastore (this project or another project). See\ngoogle.datastore.admin.v1beta1.ImportEntitiesRequest.input_url.\nOnly present if the operation completed successfully.", + "type": "string" + } + }, + "id": "GoogleDatastoreAdminV1beta1ExportEntitiesResponse", + "description": "The response for\ngoogle.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities.", + "type": "object" }, "RollbackResponse": { - "properties": {}, - "id": "RollbackResponse", "description": "The response for Datastore.Rollback.\n(an empty message).", - "type": "object" - }, - "MutationResult": { - "properties": { - "conflictDetected": { - "type": "boolean", - "description": "Whether a conflict was detected for this mutation. Always false when a\nconflict detection strategy field is not set in the mutation." - }, - "key": { - "$ref": "Key", - "description": "The automatically allocated key.\nSet only when the mutation allocated a key." - }, - "version": { - "format": "int64", - "description": "The version of the entity on the server after processing the mutation. If\nthe mutation doesn't change anything on the server, then the version will\nbe the version of the current entity or, if no entity is present, a version\nthat is strictly greater than the version of any previous entity and less\nthan the version of any possible future entity.", - "type": "string" - } - }, - "id": "MutationResult", - "description": "The result of applying a mutation.", - "type": "object" - }, - "GqlQuery": { - "description": "A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).", "type": "object", - "properties": { - "queryString": { - "description": "A string of the format described\n[here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).", - "type": "string" - }, - "positionalBindings": { - "description": "Numbered binding site @1 references the first numbered parameter,\neffectively using 1-based indexing, rather than the usual 0.\n\nFor each binding site numbered i in `query_string`, there must be an i-th\nnumbered parameter. The inverse must also be true.", - "items": { - "$ref": "GqlQueryParameter" - }, - "type": "array" - }, - "namedBindings": { - "description": "For each non-reserved named binding site in the query string, there must be\na named parameter with that name, but not necessarily the inverse.\n\nKey must match regex `A-Za-z_$*`, must not match regex\n`__.*__`, and must not be `\"\"`.", - "type": "object", - "additionalProperties": { - "$ref": "GqlQueryParameter" - } - }, - "allowLiterals": { - "description": "When false, the query string must not contain any literals and instead must\nbind all values. For example,\n`SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while\n`SELECT * FROM Kind WHERE a = @value` is.", - "type": "boolean" - } - }, - "id": "GqlQuery" - }, - "Filter": { - "description": "A holder for any type of filter.", - "type": "object", - "properties": { - "propertyFilter": { - "description": "A filter on a property.", - "$ref": "PropertyFilter" - }, - "compositeFilter": { - "$ref": "CompositeFilter", - "description": "A composite filter." - } - }, - "id": "Filter" - }, - "RollbackRequest": { - "type": "object", - "properties": { - "transaction": { - "format": "byte", - "description": "The transaction identifier, returned by a call to\nDatastore.BeginTransaction.", - "type": "string" - } - }, - "id": "RollbackRequest", - "description": "The request for Datastore.Rollback." - }, - "RunQueryRequest": { - "description": "The request for Datastore.RunQuery.", - "type": "object", - "properties": { - "readOptions": { - "$ref": "ReadOptions", - "description": "The options for this query." - }, - "query": { - "description": "The query to run.", - "$ref": "Query" - }, - "gqlQuery": { - "$ref": "GqlQuery", - "description": "The GQL query to run." - }, - "partitionId": { - "$ref": "PartitionId", - "description": "Entities are partitioned into subsets, identified by a partition ID.\nQueries are scoped to a single partition.\nThis partition ID is normalized with the standard default context\npartition ID." - } - }, - "id": "RunQueryRequest" - }, - "CompositeFilter": { - "properties": { - "filters": { - "description": "The list of filters to combine.\nMust contain at least one filter.", - "items": { - "$ref": "Filter" - }, - "type": "array" - }, - "op": { - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "The results are required to satisfy each of the combined filters." - ], - "enum": [ - "OPERATOR_UNSPECIFIED", - "AND" - ], - "description": "The operator for combining multiple filters.", - "type": "string" - } - }, - "id": "CompositeFilter", - "description": "A filter that merges multiple other filters using the given operator.", - "type": "object" - }, - "AllocateIdsResponse": { - "description": "The response for Datastore.AllocateIds.", - "type": "object", - "properties": { - "keys": { - "description": "The keys specified in the request (in the same order), each with\nits key path completed with a newly allocated ID.", - "items": { - "$ref": "Key" - }, - "type": "array" - } - }, - "id": "AllocateIdsResponse" - }, - "Query": { - "description": "A query for entities.", - "type": "object", - "properties": { - "kind": { - "description": "The kinds to query (if empty, returns entities of all kinds).\nCurrently at most 1 kind may be specified.", - "items": { - "$ref": "KindExpression" - }, - "type": "array" - }, - "distinctOn": { - "description": "The properties to make distinct. The query results will contain the first\nresult for each distinct combination of values for the given properties\n(if empty, all results are returned).", - "items": { - "$ref": "PropertyReference" - }, - "type": "array" - }, - "order": { - "description": "The order to apply to the query results (if empty, order is unspecified).", - "items": { - "$ref": "PropertyOrder" - }, - "type": "array" - }, - "projection": { - "description": "The projection to return. Defaults to returning all properties.", - "items": { - "$ref": "Projection" - }, - "type": "array" - }, - "endCursor": { - "format": "byte", - "description": "An ending point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", - "type": "string" - }, - "filter": { - "description": "The filter to apply.", - "$ref": "Filter" - }, - "limit": { - "format": "int32", - "description": "The maximum number of results to return. Applies after all other\nconstraints. Optional.\nUnspecified is interpreted as no limit.\nMust be \u003e= 0 if specified.", - "type": "integer" - }, - "startCursor": { - "format": "byte", - "description": "A starting point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", - "type": "string" - }, - "offset": { - "format": "int32", - "description": "The number of results to skip. Applies before limit, but after all other\nconstraints. Optional. Must be \u003e= 0 if specified.", - "type": "integer" - } - }, - "id": "Query" - }, - "PropertyFilter": { - "id": "PropertyFilter", - "description": "A filter on a specific property.", - "type": "object", - "properties": { - "value": { - "description": "The value to compare the property to.", - "$ref": "Value" - }, - "property": { - "description": "The property to filter by.", - "$ref": "PropertyReference" - }, - "op": { - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "Less than.", - "Less than or equal.", - "Greater than.", - "Greater than or equal.", - "Equal.", - "Has ancestor." - ], - "enum": [ - "OPERATOR_UNSPECIFIED", - "LESS_THAN", - "LESS_THAN_OR_EQUAL", - "GREATER_THAN", - "GREATER_THAN_OR_EQUAL", - "EQUAL", - "HAS_ANCESTOR" - ], - "description": "The operator to filter by.", - "type": "string" - } - } + "properties": {}, + "id": "RollbackResponse" } }, - "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, "version": "v1beta3", "baseUrl": "https://datastore.googleapis.com/", "auth": { @@ -1061,15 +1267,16 @@ } } }, + "kind": "discovery#restDescription", "servicePath": "", "description": "Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.\n", - "kind": "discovery#restDescription", "rootUrl": "https://datastore.googleapis.com/", "basePath": "", "ownerDomain": "google.com", "name": "datastore", "batchPath": "batch", "id": "datastore:v1beta3", + "revision": "20170821", "documentationLink": "https://cloud.google.com/datastore/", - "revision": "20170711" + "title": "Google Cloud Datastore API" } diff --git a/vendor/google.golang.org/api/datastore/v1beta3/datastore-gen.go b/vendor/google.golang.org/api/datastore/v1beta3/datastore-gen.go index 936a812aa..cb270d055 100644 --- a/vendor/google.golang.org/api/datastore/v1beta3/datastore-gen.go +++ b/vendor/google.golang.org/api/datastore/v1beta3/datastore-gen.go @@ -184,6 +184,31 @@ func (s *ArrayValue) MarshalJSON() ([]byte, error) { // BeginTransactionRequest: The request for Datastore.BeginTransaction. type BeginTransactionRequest struct { + // TransactionOptions: Options for a new transaction. + TransactionOptions *TransactionOptions `json:"transactionOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TransactionOptions") + // 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. "TransactionOptions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BeginTransactionRequest) MarshalJSON() ([]byte, error) { + type noMethod BeginTransactionRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BeginTransactionResponse: The response for @@ -486,6 +511,300 @@ func (s *Filter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleDatastoreAdminV1beta1CommonMetadata: Metadata common to all +// Datastore Admin operations. +type GoogleDatastoreAdminV1beta1CommonMetadata struct { + // EndTime: The time the operation ended, either successfully or + // otherwise. + EndTime string `json:"endTime,omitempty"` + + // Labels: The client-assigned labels which were provided when the + // operation was + // created. May also include additional labels. + Labels map[string]string `json:"labels,omitempty"` + + // OperationType: The type of the operation. Can be used as a filter + // in + // ListOperationsRequest. + // + // Possible values: + // "OPERATION_TYPE_UNSPECIFIED" - Unspecified. + // "EXPORT_ENTITIES" - ExportEntities. + // "IMPORT_ENTITIES" - ImportEntities. + // "BUILD_INDEX" - Build an index. + // "CLEAR_INDEX" - Clear an index. + OperationType string `json:"operationType,omitempty"` + + // StartTime: The time that work began on the operation. + StartTime string `json:"startTime,omitempty"` + + // State: The current state of the Operation. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified. + // "INITIALIZING" - Request is being prepared for processing. + // "PROCESSING" - Request is actively being processed. + // "CANCELLING" - Request is in the process of being cancelled after + // user called + // longrunning.Operations.CancelOperation on the operation. + // "FINALIZING" - Request has been processed and is in its + // finalization stage. + // "SUCCESSFUL" - Request has completed successfully. + // "FAILED" - Request has finished being processed, but encountered an + // error. + // "CANCELLED" - Request has finished being cancelled after user + // called + // longrunning.Operations.CancelOperation. + State string `json:"state,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 *GoogleDatastoreAdminV1beta1CommonMetadata) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1CommonMetadata + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1EntityFilter: Identifies a subset of +// entities in a project. This is specified as +// combinations of kind + namespace (either or both of which may be all, +// as +// described in the following examples). +// Example usage: +// +// Entire project: +// kinds=[], namespace_ids=[] +// +// Kinds Foo and Bar in all namespaces: +// kinds=['Foo', 'Bar'], namespace_ids=[] +// +// Kinds Foo and Bar only in the default namespace: +// kinds=['Foo', 'Bar'], namespace_ids=[''] +// +// Kinds Foo and Bar in both the default and Baz namespaces: +// kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] +// +// The entire Baz namespace: +// kinds=[], namespace_ids=['Baz'] +type GoogleDatastoreAdminV1beta1EntityFilter struct { + // Kinds: If empty, then this represents all kinds. + Kinds []string `json:"kinds,omitempty"` + + // NamespaceIds: An empty list represents all namespaces. This is the + // preferred + // usage for projects that don't use namespaces. + // + // An empty string element represents the default namespace. This + // should be + // used if the project has data in non-default namespaces, but doesn't + // want to + // include them. + // Each namespace in this list must be unique. + NamespaceIds []string `json:"namespaceIds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kinds") 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. "Kinds") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1EntityFilter) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1EntityFilter + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1ExportEntitiesMetadata: Metadata for +// ExportEntities operations. +type GoogleDatastoreAdminV1beta1ExportEntitiesMetadata struct { + // Common: Metadata common to all Datastore Admin operations. + Common *GoogleDatastoreAdminV1beta1CommonMetadata `json:"common,omitempty"` + + // EntityFilter: Description of which entities are being exported. + EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"` + + // OutputUrlPrefix: Location for the export metadata and data files. + // This will be the same + // value as + // the + // google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_pr + // efix + // field. The final output location is provided + // in + // google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url. + OutputUrlPrefix string `json:"outputUrlPrefix,omitempty"` + + // ProgressBytes: An estimate of the number of bytes processed. + ProgressBytes *GoogleDatastoreAdminV1beta1Progress `json:"progressBytes,omitempty"` + + // ProgressEntities: An estimate of the number of entities processed. + ProgressEntities *GoogleDatastoreAdminV1beta1Progress `json:"progressEntities,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") 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. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1ExportEntitiesMetadata) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1ExportEntitiesMetadata + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1ExportEntitiesResponse: The response +// for +// google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities. +type GoogleDatastoreAdminV1beta1ExportEntitiesResponse struct { + // OutputUrl: Location of the output metadata file. This can be used to + // begin an import + // into Cloud Datastore (this project or another project). + // See + // google.datastore.admin.v1beta1.ImportEntitiesRequest.input_url. + // On + // ly present if the operation completed successfully. + OutputUrl string `json:"outputUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "OutputUrl") 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. "OutputUrl") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1ExportEntitiesResponse) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1ExportEntitiesResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1ImportEntitiesMetadata: Metadata for +// ImportEntities operations. +type GoogleDatastoreAdminV1beta1ImportEntitiesMetadata struct { + // Common: Metadata common to all Datastore Admin operations. + Common *GoogleDatastoreAdminV1beta1CommonMetadata `json:"common,omitempty"` + + // EntityFilter: Description of which entities are being imported. + EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"` + + // InputUrl: The location of the import metadata file. This will be the + // same value as + // the + // google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url + // field + // . + InputUrl string `json:"inputUrl,omitempty"` + + // ProgressBytes: An estimate of the number of bytes processed. + ProgressBytes *GoogleDatastoreAdminV1beta1Progress `json:"progressBytes,omitempty"` + + // ProgressEntities: An estimate of the number of entities processed. + ProgressEntities *GoogleDatastoreAdminV1beta1Progress `json:"progressEntities,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") 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. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1ImportEntitiesMetadata) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1ImportEntitiesMetadata + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDatastoreAdminV1beta1Progress: Measures the progress of a +// particular metric. +type GoogleDatastoreAdminV1beta1Progress struct { + // WorkCompleted: Note that this may be greater than work_estimated. + WorkCompleted int64 `json:"workCompleted,omitempty,string"` + + // WorkEstimated: An estimate of how much work needs to be performed. + // May be zero if the + // work estimate is unavailable. + WorkEstimated int64 `json:"workEstimated,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "WorkCompleted") 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. "WorkCompleted") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDatastoreAdminV1beta1Progress) MarshalJSON() ([]byte, error) { + type noMethod GoogleDatastoreAdminV1beta1Progress + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GqlQuery: A [GQL // query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference) // . @@ -1332,6 +1651,10 @@ func (s *QueryResultBatch) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ReadOnly: Options specific to read-only transactions. +type ReadOnly struct { +} + // ReadOptions: The options shared by read requests. type ReadOptions struct { // ReadConsistency: The non-transactional read consistency to @@ -1376,6 +1699,36 @@ func (s *ReadOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ReadWrite: Options specific to read / write transactions. +type ReadWrite struct { + // PreviousTransaction: The transaction identifier of the transaction + // being retried. + PreviousTransaction string `json:"previousTransaction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PreviousTransaction") + // 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. "PreviousTransaction") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ReadWrite) MarshalJSON() ([]byte, error) { + type noMethod ReadWrite + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RollbackRequest: The request for Datastore.Rollback. type RollbackRequest struct { // Transaction: The transaction identifier, returned by a call @@ -1492,6 +1845,44 @@ func (s *RunQueryResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TransactionOptions: Options for beginning a new +// transaction. +// +// Transactions can be created explicitly with calls +// to +// Datastore.BeginTransaction or implicitly by +// setting +// ReadOptions.new_transaction in read requests. +type TransactionOptions struct { + // ReadOnly: The transaction should only allow reads. + ReadOnly *ReadOnly `json:"readOnly,omitempty"` + + // ReadWrite: The transaction should allow both reads and writes. + ReadWrite *ReadWrite `json:"readWrite,omitempty"` + + // 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 + // 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. "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:"-"` +} + +func (s *TransactionOptions) MarshalJSON() ([]byte, error) { + type noMethod TransactionOptions + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Value: A message that can hold any of the supported value types and // associated // metadata. diff --git a/vendor/google.golang.org/api/deploymentmanager/v0.alpha/deploymentmanager-api.json b/vendor/google.golang.org/api/deploymentmanager/v0.alpha/deploymentmanager-api.json index f3cb84ce8..7a99aed59 100644 --- a/vendor/google.golang.org/api/deploymentmanager/v0.alpha/deploymentmanager-api.json +++ b/vendor/google.golang.org/api/deploymentmanager/v0.alpha/deploymentmanager-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/DSQnXnJrdGCXbfLjaO33fHf1TP4\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/PsbV54STic97ire0OJuiC5JKfrE\"", "discoveryVersion": "v1", "id": "deploymentmanager:alpha", "name": "deploymentmanager", "canonicalName": "Deployment Manager Alpha", "version": "alpha", - "revision": "20170615", + "revision": "20170907", "title": "Google Cloud Deployment Manager Alpha API", "description": "The Deployment Manager API allows users to declaratively configure, deploy and run complex solutions on the Google Cloud Platform.", "ownerDomain": "google.com", @@ -129,6 +129,17 @@ } } }, + "AuthorizationLoggingOptions": { + "id": "AuthorizationLoggingOptions", + "type": "object", + "description": "Authorization-related information used by Cloud Audit Logging.", + "properties": { + "permissionType": { + "type": "string", + "description": "The type of the permission that was checked." + } + } + }, "BasicAuth": { "id": "BasicAuth", "type": "object", @@ -329,11 +340,19 @@ "Credential": { "id": "Credential", "type": "object", - "description": "Credential used by ConfigurableResourceTypes.", + "description": "The credential used by Deployment Manager and TypeProvider. Only one of the options is permitted.", "properties": { "basicAuth": { "$ref": "BasicAuth", - "description": "Basic Auth Credentials for this Type." + "description": "Basic Auth Credential, only used by TypeProvider." + }, + "serviceAccount": { + "$ref": "ServiceAccount", + "description": "Service Account Credential, only used by Deployment." + }, + "useProjectDefault": { + "type": "boolean", + "description": "Specify to use the project default credential, only supported by Deployment." } } }, @@ -379,6 +398,13 @@ "$ref": "Operation", "description": "[Output Only] The Operation that most recently ran, or is currently running, on this deployment." }, + "outputs": { + "type": "array", + "description": "api-linter: output-only-format=disabled [Output Only] Map of outputs from the last manifest that deployed successfully.", + "items": { + "$ref": "DeploymentOutputsEntry" + } + }, "selfLink": { "type": "string", "description": "[Output Only] Self link for the deployment." @@ -405,6 +431,18 @@ } } }, + "DeploymentOutputsEntry": { + "id": "DeploymentOutputsEntry", + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, "DeploymentUpdate": { "id": "DeploymentUpdate", "type": "object", @@ -554,6 +592,10 @@ "counter": { "$ref": "LogConfigCounterOptions", "description": "Counter options." + }, + "dataAccess": { + "$ref": "LogConfigDataAccessOptions", + "description": "Data access options." } } }, @@ -562,6 +604,10 @@ "type": "object", "description": "Write a Cloud Audit log", "properties": { + "authorizationLoggingOptions": { + "$ref": "AuthorizationLoggingOptions", + "description": "Information used by the Cloud Audit Logging pipeline." + }, "logName": { "type": "string", "description": "The log_name to populate in the Cloud Audit Record." @@ -571,7 +617,7 @@ "LogConfigCounterOptions": { "id": "LogConfigCounterOptions", "type": "object", - "description": "Options for counters", + "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", "properties": { "field": { "type": "string", @@ -583,6 +629,17 @@ } } }, + "LogConfigDataAccessOptions": { + "id": "LogConfigDataAccessOptions", + "type": "object", + "description": "Write a Data Access (Gin) log", + "properties": { + "logMode": { + "type": "string", + "description": "Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now." + } + } + }, "Manifest": { "id": "Manifest", "type": "object", @@ -1140,6 +1197,17 @@ } } }, + "ServiceAccount": { + "id": "ServiceAccount", + "type": "object", + "description": "Service Account used as a credential.", + "properties": { + "email": { + "type": "string", + "description": "The IAM service account email address like test@myproject.iam.gserviceaccount.com" + } + } + }, "TargetConfiguration": { "id": "TargetConfiguration", "type": "object", @@ -1816,7 +1884,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", "location": "path" } }, @@ -2002,7 +2070,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", "location": "path" } }, @@ -2074,7 +2142,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, diff --git a/vendor/google.golang.org/api/deploymentmanager/v0.alpha/deploymentmanager-gen.go b/vendor/google.golang.org/api/deploymentmanager/v0.alpha/deploymentmanager-gen.go index 9c2c97248..3f88fa6e2 100644 --- a/vendor/google.golang.org/api/deploymentmanager/v0.alpha/deploymentmanager-gen.go +++ b/vendor/google.golang.org/api/deploymentmanager/v0.alpha/deploymentmanager-gen.go @@ -268,6 +268,36 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AuthorizationLoggingOptions: Authorization-related information used +// by Cloud Audit Logging. +type AuthorizationLoggingOptions struct { + // PermissionType: The type of the permission that was checked. + PermissionType string `json:"permissionType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PermissionType") 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. "PermissionType") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuthorizationLoggingOptions) MarshalJSON() ([]byte, error) { + type noMethod AuthorizationLoggingOptions + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BasicAuth: Basic Auth used as a credential. type BasicAuth struct { Password string `json:"password,omitempty"` @@ -636,11 +666,19 @@ func (s *ConfigurableService) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Credential: Credential used by ConfigurableResourceTypes. +// Credential: The credential used by Deployment Manager and +// TypeProvider. Only one of the options is permitted. type Credential struct { - // BasicAuth: Basic Auth Credentials for this Type. + // BasicAuth: Basic Auth Credential, only used by TypeProvider. BasicAuth *BasicAuth `json:"basicAuth,omitempty"` + // ServiceAccount: Service Account Credential, only used by Deployment. + ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"` + + // UseProjectDefault: Specify to use the project default credential, + // only supported by Deployment. + UseProjectDefault bool `json:"useProjectDefault,omitempty"` + // ForceSendFields is a list of field names (e.g. "BasicAuth") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -713,6 +751,10 @@ type Deployment struct { // currently running, on this deployment. Operation *Operation `json:"operation,omitempty"` + // Outputs: api-linter: output-only-format=disabled [Output Only] Map of + // outputs from the last manifest that deployed successfully. + Outputs []*DeploymentOutputsEntry `json:"outputs,omitempty"` + // SelfLink: [Output Only] Self link for the deployment. SelfLink string `json:"selfLink,omitempty"` @@ -780,6 +822,34 @@ func (s *DeploymentLabelEntry) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type DeploymentOutputsEntry struct { + Key string `json:"key,omitempty"` + + 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 *DeploymentOutputsEntry) MarshalJSON() ([]byte, error) { + type noMethod DeploymentOutputsEntry + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type DeploymentUpdate struct { // Description: [Output Only] An optional user-provided description of // the deployment after the current update has been applied. @@ -1088,6 +1158,9 @@ type LogConfig struct { // Counter: Counter options. Counter *LogConfigCounterOptions `json:"counter,omitempty"` + // DataAccess: Data access options. + DataAccess *LogConfigDataAccessOptions `json:"dataAccess,omitempty"` + // ForceSendFields is a list of field names (e.g. "CloudAudit") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -1113,23 +1186,29 @@ func (s *LogConfig) MarshalJSON() ([]byte, error) { // LogConfigCloudAuditOptions: Write a Cloud Audit log type LogConfigCloudAuditOptions struct { + // AuthorizationLoggingOptions: Information used by the Cloud Audit + // Logging pipeline. + AuthorizationLoggingOptions *AuthorizationLoggingOptions `json:"authorizationLoggingOptions,omitempty"` + // LogName: The log_name to populate in the Cloud Audit Record. LogName string `json:"logName,omitempty"` - // ForceSendFields is a list of field names (e.g. "LogName") 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 is a list of field names (e.g. + // "AuthorizationLoggingOptions") 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. "LogName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. + // "AuthorizationLoggingOptions") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -1139,7 +1218,29 @@ func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LogConfigCounterOptions: Options for counters +// LogConfigCounterOptions: Increment a streamz counter with the +// specified metric and field names. +// +// Metric 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. +// +// Field names correspond to IAM request parameters and field values are +// their respective values. +// +// 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) * decrementing the counter * +// incrementing it by anything other than 1 type LogConfigCounterOptions struct { // Field: The field value to attribute. Field string `json:"field,omitempty"` @@ -1170,6 +1271,36 @@ func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LogConfigDataAccessOptions: Write a Data Access (Gin) log +type LogConfigDataAccessOptions struct { + // LogMode: Whether Gin logging should happen in a fail-closed manner at + // the caller. This is relevant only in the LocalIAM implementation, for + // now. + LogMode string `json:"logMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LogMode") 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. "LogMode") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) { + type noMethod LogConfigDataAccessOptions + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type Manifest struct { // Config: [Output Only] The YAML configuration for this manifest. Config *ConfigFile `json:"config,omitempty"` @@ -2151,6 +2282,35 @@ func (s *Rule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ServiceAccount: Service Account used as a credential. +type ServiceAccount struct { + // Email: The IAM service account email address like + // test@myproject.iam.gserviceaccount.com + Email string `json:"email,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Email") 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. "Email") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceAccount) MarshalJSON() ([]byte, error) { + type noMethod ServiceAccount + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TargetConfiguration struct { // Config: The configuration to use for this deployment. Config *ConfigFile `json:"config,omitempty"` @@ -4271,7 +4431,7 @@ func (c *DeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -5041,7 +5201,7 @@ func (c *DeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -5336,7 +5496,7 @@ func (c *DeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } diff --git a/vendor/google.golang.org/api/deploymentmanager/v2/deploymentmanager-api.json b/vendor/google.golang.org/api/deploymentmanager/v2/deploymentmanager-api.json index 6f0dc7335..c2eb542f4 100644 --- a/vendor/google.golang.org/api/deploymentmanager/v2/deploymentmanager-api.json +++ b/vendor/google.golang.org/api/deploymentmanager/v2/deploymentmanager-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/D9oyxr4DnVbupMt9dSmNXQp4YGQ\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/Wel7paJC_1D4E1HCo-ynj9yjUZ0\"", "discoveryVersion": "v1", "id": "deploymentmanager:v2", "name": "deploymentmanager", "canonicalName": "Deployment Manager", "version": "v2", - "revision": "20170615", + "revision": "20170907", "title": "Google Cloud Deployment Manager API", "description": "Declares, configures, and deploys complex solutions on Google Cloud Platform.", "ownerDomain": "google.com", @@ -129,6 +129,17 @@ } } }, + "AuthorizationLoggingOptions": { + "id": "AuthorizationLoggingOptions", + "type": "object", + "description": "Authorization-related information used by Cloud Audit Logging.", + "properties": { + "permissionType": { + "type": "string", + "description": "The type of the permission that was checked." + } + } + }, "Binding": { "id": "Binding", "type": "object", @@ -390,6 +401,10 @@ "counter": { "$ref": "LogConfigCounterOptions", "description": "Counter options." + }, + "dataAccess": { + "$ref": "LogConfigDataAccessOptions", + "description": "Data access options." } } }, @@ -398,6 +413,10 @@ "type": "object", "description": "Write a Cloud Audit log", "properties": { + "authorizationLoggingOptions": { + "$ref": "AuthorizationLoggingOptions", + "description": "Information used by the Cloud Audit Logging pipeline." + }, "logName": { "type": "string", "description": "The log_name to populate in the Cloud Audit Record." @@ -407,7 +426,7 @@ "LogConfigCounterOptions": { "id": "LogConfigCounterOptions", "type": "object", - "description": "Options for counters", + "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", "properties": { "field": { "type": "string", @@ -419,6 +438,17 @@ } } }, + "LogConfigDataAccessOptions": { + "id": "LogConfigDataAccessOptions", + "type": "object", + "description": "Write a Data Access (Gin) log", + "properties": { + "logMode": { + "type": "string", + "description": "Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now." + } + } + }, "Manifest": { "id": "Manifest", "type": "object", @@ -1183,7 +1213,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", "location": "path" } }, @@ -1369,7 +1399,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", "location": "path" } }, @@ -1441,7 +1471,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, diff --git a/vendor/google.golang.org/api/deploymentmanager/v2/deploymentmanager-gen.go b/vendor/google.golang.org/api/deploymentmanager/v2/deploymentmanager-gen.go index 492aa1f9c..0b66cc986 100644 --- a/vendor/google.golang.org/api/deploymentmanager/v2/deploymentmanager-gen.go +++ b/vendor/google.golang.org/api/deploymentmanager/v2/deploymentmanager-gen.go @@ -244,6 +244,36 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AuthorizationLoggingOptions: Authorization-related information used +// by Cloud Audit Logging. +type AuthorizationLoggingOptions struct { + // PermissionType: The type of the permission that was checked. + PermissionType string `json:"permissionType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PermissionType") 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. "PermissionType") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuthorizationLoggingOptions) MarshalJSON() ([]byte, error) { + type noMethod AuthorizationLoggingOptions + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Binding: Associates `members` with a `role`. type Binding struct { // Condition: The condition that is associated with this binding. NOTE: @@ -765,6 +795,9 @@ type LogConfig struct { // Counter: Counter options. Counter *LogConfigCounterOptions `json:"counter,omitempty"` + // DataAccess: Data access options. + DataAccess *LogConfigDataAccessOptions `json:"dataAccess,omitempty"` + // ForceSendFields is a list of field names (e.g. "CloudAudit") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -790,23 +823,29 @@ func (s *LogConfig) MarshalJSON() ([]byte, error) { // LogConfigCloudAuditOptions: Write a Cloud Audit log type LogConfigCloudAuditOptions struct { + // AuthorizationLoggingOptions: Information used by the Cloud Audit + // Logging pipeline. + AuthorizationLoggingOptions *AuthorizationLoggingOptions `json:"authorizationLoggingOptions,omitempty"` + // LogName: The log_name to populate in the Cloud Audit Record. LogName string `json:"logName,omitempty"` - // ForceSendFields is a list of field names (e.g. "LogName") 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 is a list of field names (e.g. + // "AuthorizationLoggingOptions") 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. "LogName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. + // "AuthorizationLoggingOptions") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -816,7 +855,29 @@ func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LogConfigCounterOptions: Options for counters +// LogConfigCounterOptions: Increment a streamz counter with the +// specified metric and field names. +// +// Metric 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. +// +// Field names correspond to IAM request parameters and field values are +// their respective values. +// +// 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) * decrementing the counter * +// incrementing it by anything other than 1 type LogConfigCounterOptions struct { // Field: The field value to attribute. Field string `json:"field,omitempty"` @@ -847,6 +908,36 @@ func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LogConfigDataAccessOptions: Write a Data Access (Gin) log +type LogConfigDataAccessOptions struct { + // LogMode: Whether Gin logging should happen in a fail-closed manner at + // the caller. This is relevant only in the LocalIAM implementation, for + // now. + LogMode string `json:"logMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LogMode") 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. "LogMode") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) { + type noMethod LogConfigDataAccessOptions + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type Manifest struct { // Config: [Output Only] The YAML configuration for this manifest. Config *ConfigFile `json:"config,omitempty"` @@ -2558,7 +2649,7 @@ func (c *DeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -3328,7 +3419,7 @@ func (c *DeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -3623,7 +3714,7 @@ func (c *DeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } diff --git a/vendor/google.golang.org/api/deploymentmanager/v2beta/deploymentmanager-api.json b/vendor/google.golang.org/api/deploymentmanager/v2beta/deploymentmanager-api.json index e680e4526..e9e4e63af 100644 --- a/vendor/google.golang.org/api/deploymentmanager/v2beta/deploymentmanager-api.json +++ b/vendor/google.golang.org/api/deploymentmanager/v2beta/deploymentmanager-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/BpAXxEaDX5Q7fHdBGIpwDxZQd84\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/pIU6gkhdkztp310WN4djWTN4XKE\"", "discoveryVersion": "v1", "id": "deploymentmanager:v2beta", "name": "deploymentmanager", "canonicalName": "Deployment Manager V2Beta", "version": "v2beta", - "revision": "20170615", + "revision": "20170907", "title": "Google Cloud Deployment Manager API V2Beta Methods", "description": "The Deployment Manager API allows users to declaratively configure, deploy and run complex solutions on the Google Cloud Platform.", "ownerDomain": "google.com", @@ -129,6 +129,17 @@ } } }, + "AuthorizationLoggingOptions": { + "id": "AuthorizationLoggingOptions", + "type": "object", + "description": "Authorization-related information used by Cloud Audit Logging.", + "properties": { + "permissionType": { + "type": "string", + "description": "The type of the permission that was checked." + } + } + }, "BaseType": { "id": "BaseType", "type": "object", @@ -329,11 +340,19 @@ "Credential": { "id": "Credential", "type": "object", - "description": "Credential used by ConfigurableResourceTypes.", + "description": "The credential used by Deployment Manager and TypeProvider. Only one of the options is permitted.", "properties": { "basicAuth": { "$ref": "BasicAuth", - "description": "Basic Auth Credentials for this Type." + "description": "Basic Auth Credential, only used by TypeProvider." + }, + "serviceAccount": { + "$ref": "ServiceAccount", + "description": "Service Account Credential, only used by Deployment." + }, + "useProjectDefault": { + "type": "boolean", + "description": "Specify to use the project default credential, only supported by Deployment." } } }, @@ -554,6 +573,10 @@ "counter": { "$ref": "LogConfigCounterOptions", "description": "Counter options." + }, + "dataAccess": { + "$ref": "LogConfigDataAccessOptions", + "description": "Data access options." } } }, @@ -562,6 +585,10 @@ "type": "object", "description": "Write a Cloud Audit log", "properties": { + "authorizationLoggingOptions": { + "$ref": "AuthorizationLoggingOptions", + "description": "Information used by the Cloud Audit Logging pipeline." + }, "logName": { "type": "string", "description": "The log_name to populate in the Cloud Audit Record." @@ -571,7 +598,7 @@ "LogConfigCounterOptions": { "id": "LogConfigCounterOptions", "type": "object", - "description": "Options for counters", + "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", "properties": { "field": { "type": "string", @@ -583,6 +610,17 @@ } } }, + "LogConfigDataAccessOptions": { + "id": "LogConfigDataAccessOptions", + "type": "object", + "description": "Write a Data Access (Gin) log", + "properties": { + "logMode": { + "type": "string", + "description": "Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now." + } + } + }, "Manifest": { "id": "Manifest", "type": "object", @@ -1140,6 +1178,17 @@ } } }, + "ServiceAccount": { + "id": "ServiceAccount", + "type": "object", + "description": "Service Account used as a credential.", + "properties": { + "email": { + "type": "string", + "description": "The IAM service account email address like test@myproject.iam.gserviceaccount.com" + } + } + }, "TargetConfiguration": { "id": "TargetConfiguration", "type": "object", @@ -1816,7 +1865,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", "location": "path" } }, @@ -2002,7 +2051,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", "location": "path" } }, @@ -2074,7 +2123,7 @@ "type": "string", "description": "Name of the resource for this request.", "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", "location": "path" } }, diff --git a/vendor/google.golang.org/api/deploymentmanager/v2beta/deploymentmanager-gen.go b/vendor/google.golang.org/api/deploymentmanager/v2beta/deploymentmanager-gen.go index 6a60dd6af..47af3d069 100644 --- a/vendor/google.golang.org/api/deploymentmanager/v2beta/deploymentmanager-gen.go +++ b/vendor/google.golang.org/api/deploymentmanager/v2beta/deploymentmanager-gen.go @@ -268,6 +268,36 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AuthorizationLoggingOptions: Authorization-related information used +// by Cloud Audit Logging. +type AuthorizationLoggingOptions struct { + // PermissionType: The type of the permission that was checked. + PermissionType string `json:"permissionType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PermissionType") 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. "PermissionType") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuthorizationLoggingOptions) MarshalJSON() ([]byte, error) { + type noMethod AuthorizationLoggingOptions + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BaseType: BaseType that describes a service-backed Type. type BaseType struct { // CollectionOverrides: Allows resource handling overrides for specific @@ -636,11 +666,19 @@ func (s *ConfigFile) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Credential: Credential used by ConfigurableResourceTypes. +// Credential: The credential used by Deployment Manager and +// TypeProvider. Only one of the options is permitted. type Credential struct { - // BasicAuth: Basic Auth Credentials for this Type. + // BasicAuth: Basic Auth Credential, only used by TypeProvider. BasicAuth *BasicAuth `json:"basicAuth,omitempty"` + // ServiceAccount: Service Account Credential, only used by Deployment. + ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"` + + // UseProjectDefault: Specify to use the project default credential, + // only supported by Deployment. + UseProjectDefault bool `json:"useProjectDefault,omitempty"` + // ForceSendFields is a list of field names (e.g. "BasicAuth") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -1088,6 +1126,9 @@ type LogConfig struct { // Counter: Counter options. Counter *LogConfigCounterOptions `json:"counter,omitempty"` + // DataAccess: Data access options. + DataAccess *LogConfigDataAccessOptions `json:"dataAccess,omitempty"` + // ForceSendFields is a list of field names (e.g. "CloudAudit") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -1113,23 +1154,29 @@ func (s *LogConfig) MarshalJSON() ([]byte, error) { // LogConfigCloudAuditOptions: Write a Cloud Audit log type LogConfigCloudAuditOptions struct { + // AuthorizationLoggingOptions: Information used by the Cloud Audit + // Logging pipeline. + AuthorizationLoggingOptions *AuthorizationLoggingOptions `json:"authorizationLoggingOptions,omitempty"` + // LogName: The log_name to populate in the Cloud Audit Record. LogName string `json:"logName,omitempty"` - // ForceSendFields is a list of field names (e.g. "LogName") 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 is a list of field names (e.g. + // "AuthorizationLoggingOptions") 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. "LogName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. + // "AuthorizationLoggingOptions") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -1139,7 +1186,29 @@ func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LogConfigCounterOptions: Options for counters +// LogConfigCounterOptions: Increment a streamz counter with the +// specified metric and field names. +// +// Metric 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. +// +// Field names correspond to IAM request parameters and field values are +// their respective values. +// +// 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) * decrementing the counter * +// incrementing it by anything other than 1 type LogConfigCounterOptions struct { // Field: The field value to attribute. Field string `json:"field,omitempty"` @@ -1170,6 +1239,36 @@ func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LogConfigDataAccessOptions: Write a Data Access (Gin) log +type LogConfigDataAccessOptions struct { + // LogMode: Whether Gin logging should happen in a fail-closed manner at + // the caller. This is relevant only in the LocalIAM implementation, for + // now. + LogMode string `json:"logMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LogMode") 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. "LogMode") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) { + type noMethod LogConfigDataAccessOptions + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type Manifest struct { // Config: [Output Only] The YAML configuration for this manifest. Config *ConfigFile `json:"config,omitempty"` @@ -2156,6 +2255,35 @@ func (s *Rule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ServiceAccount: Service Account used as a credential. +type ServiceAccount struct { + // Email: The IAM service account email address like + // test@myproject.iam.gserviceaccount.com + Email string `json:"email,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Email") 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. "Email") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceAccount) MarshalJSON() ([]byte, error) { + type noMethod ServiceAccount + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TargetConfiguration struct { // Config: The configuration to use for this deployment. Config *ConfigFile `json:"config,omitempty"` @@ -4270,7 +4398,7 @@ func (c *DeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -5040,7 +5168,7 @@ func (c *DeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } @@ -5335,7 +5463,7 @@ func (c *DeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T // "resource": { // "description": "Name of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", // "required": true, // "type": "string" // } diff --git a/vendor/google.golang.org/api/dfareporting/v2.7/dfareporting-api.json b/vendor/google.golang.org/api/dfareporting/v2.7/dfareporting-api.json index 84887ca43..b4e85d93d 100644 --- a/vendor/google.golang.org/api/dfareporting/v2.7/dfareporting-api.json +++ b/vendor/google.golang.org/api/dfareporting/v2.7/dfareporting-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/p-RysYnjE2Jp5kxjC09O1FcghzI\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/3Wqk_k4XWB3JARQsnkZ477HngjY\"", "discoveryVersion": "v1", "id": "dfareporting:v2.7", "name": "dfareporting", "version": "v2.7", - "revision": "20170428", + "revision": "20170818", "title": "DCM/DFA Reporting And Trafficking API", "description": "Manages your DoubleClick Campaign Manager ad campaigns and reports.", "ownerDomain": "google.com", @@ -2229,7 +2229,7 @@ }, "htmlCode": { "type": "string", - "description": "HTML code for the creative. This is a required field when applicable. This field is ignored if htmlCodeLocked is false. Applicable to the following creative types: all CUSTOM, FLASH_INPAGE, and HTML5_BANNER, and all RICH_MEDIA." + "description": "HTML code for the creative. This is a required field when applicable. This field is ignored if htmlCodeLocked is true. Applicable to the following creative types: all CUSTOM, FLASH_INPAGE, and HTML5_BANNER, and all RICH_MEDIA." }, "htmlCodeLocked": { "type": "boolean", @@ -4569,7 +4569,7 @@ }, "videoActiveViewOptOut": { "type": "boolean", - "description": "Whether this directory site has disabled active view for in-stream video creatives." + "description": "Whether this directory site has disabled active view for in-stream video creatives. This is a read-only field." } } }, @@ -5200,7 +5200,7 @@ }, "userDefinedVariableTypes": { "type": "array", - "description": "List of the user-defined variables used by this conversion tag. These map to the \"u[1-20]=\" in the tags. Each of these can have a user defined type.\nAcceptable values are:\n- \"U1\"\n- \"U2\"\n- \"U3\"\n- \"U4\"\n- \"U5\"\n- \"U6\"\n- \"U7\"\n- \"U8\"\n- \"U9\"\n- \"U10\"\n- \"U11\"\n- \"U12\"\n- \"U13\"\n- \"U14\"\n- \"U15\"\n- \"U16\"\n- \"U17\"\n- \"U18\"\n- \"U19\"\n- \"U20\"", + "description": "List of the user-defined variables used by this conversion tag. These map to the \"u[1-100]=\" in the tags. Each of these can have a user defined type.\nAcceptable values are U1 to U100, inclusive.", "items": { "type": "string", "enum": [ @@ -7125,7 +7125,7 @@ }, "vpaidAdapterChoice": { "type": "string", - "description": "VPAID adapter setting for this placement. Controls which VPAID format the measurement adapter will use for in-stream video creatives assigned to this placement.", + "description": "VPAID adapter setting for this placement. Controls which VPAID format the measurement adapter will use for in-stream video creatives assigned to this placement.\n\nNote: Flash is no longer supported. This field now defaults to HTML5 when the following values are provided: FLASH, BOTH.", "enum": [ "BOTH", "DEFAULT", @@ -9017,7 +9017,7 @@ }, "vpaidAdapterChoiceTemplate": { "type": "string", - "description": "Default VPAID adapter setting for new placements created under this site. This value will be used to populate the placements.vpaidAdapterChoice field, when no value is specified for the new placement. Controls which VPAID format the measurement adapter will use for in-stream video creatives assigned to the placement. The publisher's specifications will typically determine this setting. For VPAID creatives, the adapter format will match the VPAID format (HTML5 VPAID creatives use the HTML5 adapter, and Flash VPAID creatives use the Flash adapter).", + "description": "Default VPAID adapter setting for new placements created under this site. This value will be used to populate the placements.vpaidAdapterChoice field, when no value is specified for the new placement. Controls which VPAID format the measurement adapter will use for in-stream video creatives assigned to the placement. The publisher's specifications will typically determine this setting. For VPAID creatives, the adapter format will match the VPAID format (HTML5 VPAID creatives use the HTML5 adapter).\n\nNote: Flash is no longer supported. This field now defaults to HTML5 when the following values are provided: FLASH, BOTH.", "enum": [ "BOTH", "DEFAULT", @@ -16824,7 +16824,7 @@ }, "tagFormats": { "type": "string", - "description": "Tag formats to generate for these placements.", + "description": "Tag formats to generate for these placements.\n\nNote: PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements.", "enum": [ "PLACEMENT_TAG_CLICK_COMMANDS", "PLACEMENT_TAG_IFRAME_ILAYER", diff --git a/vendor/google.golang.org/api/dfareporting/v2.7/dfareporting-gen.go b/vendor/google.golang.org/api/dfareporting/v2.7/dfareporting-gen.go index c4fe7f6f0..6207c52a3 100644 --- a/vendor/google.golang.org/api/dfareporting/v2.7/dfareporting-gen.go +++ b/vendor/google.golang.org/api/dfareporting/v2.7/dfareporting-gen.go @@ -3740,7 +3740,7 @@ type Creative struct { FsCommand *FsCommand `json:"fsCommand,omitempty"` // HtmlCode: HTML code for the creative. This is a required field when - // applicable. This field is ignored if htmlCodeLocked is false. + // applicable. This field is ignored if htmlCodeLocked is true. // Applicable to the following creative types: all CUSTOM, FLASH_INPAGE, // and HTML5_BANNER, and all RICH_MEDIA. HtmlCode string `json:"htmlCode,omitempty"` @@ -6413,7 +6413,7 @@ type DirectorySiteSettings struct { VerificationTagOptOut bool `json:"verificationTagOptOut,omitempty"` // VideoActiveViewOptOut: Whether this directory site has disabled - // active view for in-stream video creatives. + // active view for in-stream video creatives. This is a read-only field. VideoActiveViewOptOut bool `json:"videoActiveViewOptOut,omitempty"` // ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to @@ -7228,29 +7228,9 @@ type FloodlightActivity struct { TagString string `json:"tagString,omitempty"` // UserDefinedVariableTypes: List of the user-defined variables used by - // this conversion tag. These map to the "u[1-20]=" in the tags. Each of - // these can have a user defined type. - // Acceptable values are: - // - "U1" - // - "U2" - // - "U3" - // - "U4" - // - "U5" - // - "U6" - // - "U7" - // - "U8" - // - "U9" - // - "U10" - // - "U11" - // - "U12" - // - "U13" - // - "U14" - // - "U15" - // - "U16" - // - "U17" - // - "U18" - // - "U19" - // - "U20" + // this conversion tag. These map to the "u[1-100]=" in the tags. Each + // of these can have a user defined type. + // Acceptable values are U1 to U100, inclusive. // // Possible values: // "U1" @@ -9681,6 +9661,9 @@ type Placement struct { // Controls which VPAID format the measurement adapter will use for // in-stream video creatives assigned to this placement. // + // Note: Flash is no longer supported. This field now defaults to HTML5 + // when the following values are provided: FLASH, BOTH. + // // Possible values: // "BOTH" // "DEFAULT" @@ -12087,8 +12070,11 @@ type SiteSettings struct { // measurement adapter will use for in-stream video creatives assigned // to the placement. The publisher's specifications will typically // determine this setting. For VPAID creatives, the adapter format will - // match the VPAID format (HTML5 VPAID creatives use the HTML5 adapter, - // and Flash VPAID creatives use the Flash adapter). + // match the VPAID format (HTML5 VPAID creatives use the HTML5 + // adapter). + // + // Note: Flash is no longer supported. This field now defaults to HTML5 + // when the following values are provided: FLASH, BOTH. // // Possible values: // "BOTH" @@ -23017,11 +23003,7 @@ type CreativeAssetsInsertCall struct { advertiserId int64 creativeassetmetadata *CreativeAssetMetadata urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater + mediaInfo_ *gensupport.MediaInfo ctx_ context.Context header_ http.Header } @@ -23044,12 +23026,7 @@ func (r *CreativeAssetsService) Insert(profileId int64, advertiserId int64, crea // supplied. // At most one of Media and ResumableMedia may be set. func (c *CreativeAssetsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CreativeAssetsInsertCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -23064,11 +23041,7 @@ func (c *CreativeAssetsInsertCall) Media(r io.Reader, options ...googleapi.Media // supersede any context previously provided to the Context method. func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CreativeAssetsInsertCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -23077,7 +23050,7 @@ func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.Read // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *CreativeAssetsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CreativeAssetsInsertCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -23122,27 +23095,16 @@ func (c *CreativeAssetsInsertCall) doRequest(alt string) (*http.Response, error) reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -23179,20 +23141,10 @@ func (c *CreativeAssetsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeAs if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -38552,6 +38504,9 @@ func (c *PlacementsGeneratetagsCall) PlacementIds(placementIds ...int64) *Placem // TagFormats sets the optional parameter "tagFormats": Tag formats to // generate for these placements. // +// Note: PLACEMENT_TAG_STANDARD can only be generated for 1x1 +// placements. +// // Possible values: // "PLACEMENT_TAG_CLICK_COMMANDS" // "PLACEMENT_TAG_IFRAME_ILAYER" @@ -38686,7 +38641,7 @@ func (c *PlacementsGeneratetagsCall) Do(opts ...googleapi.CallOption) (*Placemen // "type": "string" // }, // "tagFormats": { - // "description": "Tag formats to generate for these placements.", + // "description": "Tag formats to generate for these placements.\n\nNote: PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements.", // "enum": [ // "PLACEMENT_TAG_CLICK_COMMANDS", // "PLACEMENT_TAG_IFRAME_ILAYER", diff --git a/vendor/google.golang.org/api/dfareporting/v2.8/dfareporting-api.json b/vendor/google.golang.org/api/dfareporting/v2.8/dfareporting-api.json index ad3d63253..e52586cf0 100644 --- a/vendor/google.golang.org/api/dfareporting/v2.8/dfareporting-api.json +++ b/vendor/google.golang.org/api/dfareporting/v2.8/dfareporting-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/mDodB1FWVkZ2kJtHTr6oPPTc9mw\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/emGV_y_FRSYhyMgSPP7gVElVBpw\"", "discoveryVersion": "v1", "id": "dfareporting:v2.8", "name": "dfareporting", "version": "v2.8", - "revision": "20170428", + "revision": "20170818", "title": "DCM/DFA Reporting And Trafficking API", "description": "Manages your DoubleClick Campaign Manager ad campaigns and reports.", "ownerDomain": "google.com", @@ -1719,11 +1719,11 @@ }, "encryptedUserId": { "type": "string", - "description": "The alphanumeric encrypted user ID. When set, encryptionInfo should also be specified. This field is mutually exclusive with encryptedUserIdCandidates[] and mobileDeviceId. This or encryptedUserIdCandidates[] or mobileDeviceId is a required field." + "description": "The alphanumeric encrypted user ID. When set, encryptionInfo should also be specified. This field is mutually exclusive with encryptedUserIdCandidates[], mobileDeviceId and gclid. This or encryptedUserIdCandidates[] or mobileDeviceId or gclid is a required field." }, "encryptedUserIdCandidates": { "type": "array", - "description": "A list of the alphanumeric encrypted user IDs. Any user ID with exposure prior to the conversion timestamp will be used in the inserted conversion. If no such user ID is found then the conversion will be rejected with NO_COOKIE_MATCH_FOUND error. When set, encryptionInfo should also be specified. This field may only be used when calling batchinsert; it is not supported by batchupdate. This field is mutually exclusive with encryptedUserId and mobileDeviceId. This or encryptedUserId or mobileDeviceId is a required field.", + "description": "A list of the alphanumeric encrypted user IDs. Any user ID with exposure prior to the conversion timestamp will be used in the inserted conversion. If no such user ID is found then the conversion will be rejected with NO_COOKIE_MATCH_FOUND error. When set, encryptionInfo should also be specified. This field may only be used when calling batchinsert; it is not supported by batchupdate. This field is mutually exclusive with encryptedUserId, mobileDeviceId and gclid. This or encryptedUserId or mobileDeviceId or gclid is a required field.", "items": { "type": "string" } @@ -1738,6 +1738,10 @@ "description": "Floodlight Configuration ID of this conversion. This is a required field.", "format": "int64" }, + "gclid": { + "type": "string", + "description": "The Google click ID. This field is mutually exclusive with encryptedUserId, encryptedUserIdCandidates[] and mobileDeviceId. This or encryptedUserId or encryptedUserIdCandidates[] or mobileDeviceId is a required field." + }, "kind": { "type": "string", "description": "Identifies what kind of resource this is. Value: the fixed string \"dfareporting#conversion\".", @@ -1749,7 +1753,7 @@ }, "mobileDeviceId": { "type": "string", - "description": "The mobile device ID. This field is mutually exclusive with encryptedUserId and encryptedUserIdCandidates[]. This or encryptedUserId or encryptedUserIdCandidates[] is a required field." + "description": "The mobile device ID. This field is mutually exclusive with encryptedUserId, encryptedUserIdCandidates[] and gclid. This or encryptedUserId or encryptedUserIdCandidates[] or gclid is a required field." }, "ordinal": { "type": "string", @@ -2303,7 +2307,7 @@ }, "htmlCode": { "type": "string", - "description": "HTML code for the creative. This is a required field when applicable. This field is ignored if htmlCodeLocked is false. Applicable to the following creative types: all CUSTOM, FLASH_INPAGE, and HTML5_BANNER, and all RICH_MEDIA." + "description": "HTML code for the creative. This is a required field when applicable. This field is ignored if htmlCodeLocked is true. Applicable to the following creative types: all CUSTOM, FLASH_INPAGE, and HTML5_BANNER, and all RICH_MEDIA." }, "htmlCodeLocked": { "type": "boolean", @@ -4647,7 +4651,7 @@ }, "videoActiveViewOptOut": { "type": "boolean", - "description": "Whether this directory site has disabled active view for in-stream video creatives." + "description": "Whether this directory site has disabled active view for in-stream video creatives. This is a read-only field." } } }, @@ -5278,7 +5282,7 @@ }, "userDefinedVariableTypes": { "type": "array", - "description": "List of the user-defined variables used by this conversion tag. These map to the \"u[1-20]=\" in the tags. Each of these can have a user defined type.\nAcceptable values are:\n- \"U1\"\n- \"U2\"\n- \"U3\"\n- \"U4\"\n- \"U5\"\n- \"U6\"\n- \"U7\"\n- \"U8\"\n- \"U9\"\n- \"U10\"\n- \"U11\"\n- \"U12\"\n- \"U13\"\n- \"U14\"\n- \"U15\"\n- \"U16\"\n- \"U17\"\n- \"U18\"\n- \"U19\"\n- \"U20\"", + "description": "List of the user-defined variables used by this conversion tag. These map to the \"u[1-100]=\" in the tags. Each of these can have a user defined type.\nAcceptable values are U1 to U100, inclusive.", "items": { "type": "string", "enum": [ @@ -7188,7 +7192,7 @@ }, "vpaidAdapterChoice": { "type": "string", - "description": "VPAID adapter setting for this placement. Controls which VPAID format the measurement adapter will use for in-stream video creatives assigned to this placement.", + "description": "VPAID adapter setting for this placement. Controls which VPAID format the measurement adapter will use for in-stream video creatives assigned to this placement.\n\nNote: Flash is no longer supported. This field now defaults to HTML5 when the following values are provided: FLASH, BOTH.", "enum": [ "BOTH", "DEFAULT", @@ -9080,7 +9084,7 @@ }, "vpaidAdapterChoiceTemplate": { "type": "string", - "description": "Default VPAID adapter setting for new placements created under this site. This value will be used to populate the placements.vpaidAdapterChoice field, when no value is specified for the new placement. Controls which VPAID format the measurement adapter will use for in-stream video creatives assigned to the placement. The publisher's specifications will typically determine this setting. For VPAID creatives, the adapter format will match the VPAID format (HTML5 VPAID creatives use the HTML5 adapter, and Flash VPAID creatives use the Flash adapter).", + "description": "Default VPAID adapter setting for new placements created under this site. This value will be used to populate the placements.vpaidAdapterChoice field, when no value is specified for the new placement. Controls which VPAID format the measurement adapter will use for in-stream video creatives assigned to the placement. The publisher's specifications will typically determine this setting. For VPAID creatives, the adapter format will match the VPAID format (HTML5 VPAID creatives use the HTML5 adapter).\n\nNote: Flash is no longer supported. This field now defaults to HTML5 when the following values are provided: FLASH, BOTH.", "enum": [ "BOTH", "DEFAULT", @@ -16941,7 +16945,7 @@ }, "tagFormats": { "type": "string", - "description": "Tag formats to generate for these placements.", + "description": "Tag formats to generate for these placements.\n\nNote: PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements.", "enum": [ "PLACEMENT_TAG_CLICK_COMMANDS", "PLACEMENT_TAG_IFRAME_ILAYER", diff --git a/vendor/google.golang.org/api/dfareporting/v2.8/dfareporting-gen.go b/vendor/google.golang.org/api/dfareporting/v2.8/dfareporting-gen.go index 3a49b3684..d5211d6e0 100644 --- a/vendor/google.golang.org/api/dfareporting/v2.8/dfareporting-gen.go +++ b/vendor/google.golang.org/api/dfareporting/v2.8/dfareporting-gen.go @@ -3175,8 +3175,9 @@ type Conversion struct { // EncryptedUserId: The alphanumeric encrypted user ID. When set, // encryptionInfo should also be specified. This field is mutually - // exclusive with encryptedUserIdCandidates[] and mobileDeviceId. This - // or encryptedUserIdCandidates[] or mobileDeviceId is a required field. + // exclusive with encryptedUserIdCandidates[], mobileDeviceId and gclid. + // This or encryptedUserIdCandidates[] or mobileDeviceId or gclid is a + // required field. EncryptedUserId string `json:"encryptedUserId,omitempty"` // EncryptedUserIdCandidates: A list of the alphanumeric encrypted user @@ -3185,9 +3186,9 @@ type Conversion struct { // the conversion will be rejected with NO_COOKIE_MATCH_FOUND error. // When set, encryptionInfo should also be specified. This field may // only be used when calling batchinsert; it is not supported by - // batchupdate. This field is mutually exclusive with encryptedUserId - // and mobileDeviceId. This or encryptedUserId or mobileDeviceId is a - // required field. + // batchupdate. This field is mutually exclusive with encryptedUserId, + // mobileDeviceId and gclid. This or encryptedUserId or mobileDeviceId + // or gclid is a required field. EncryptedUserIdCandidates []string `json:"encryptedUserIdCandidates,omitempty"` // FloodlightActivityId: Floodlight Activity ID of this conversion. This @@ -3198,6 +3199,12 @@ type Conversion struct { // conversion. This is a required field. FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"` + // Gclid: The Google click ID. This field is mutually exclusive with + // encryptedUserId, encryptedUserIdCandidates[] and mobileDeviceId. This + // or encryptedUserId or encryptedUserIdCandidates[] or mobileDeviceId + // is a required field. + Gclid string `json:"gclid,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed // string "dfareporting#conversion". Kind string `json:"kind,omitempty"` @@ -3208,9 +3215,9 @@ type Conversion struct { LimitAdTracking bool `json:"limitAdTracking,omitempty"` // MobileDeviceId: The mobile device ID. This field is mutually - // exclusive with encryptedUserId and encryptedUserIdCandidates[]. This - // or encryptedUserId or encryptedUserIdCandidates[] is a required - // field. + // exclusive with encryptedUserId, encryptedUserIdCandidates[] and + // gclid. This or encryptedUserId or encryptedUserIdCandidates[] or + // gclid is a required field. MobileDeviceId string `json:"mobileDeviceId,omitempty"` // Ordinal: The ordinal of the conversion. Use this field to control how @@ -3867,7 +3874,7 @@ type Creative struct { FsCommand *FsCommand `json:"fsCommand,omitempty"` // HtmlCode: HTML code for the creative. This is a required field when - // applicable. This field is ignored if htmlCodeLocked is false. + // applicable. This field is ignored if htmlCodeLocked is true. // Applicable to the following creative types: all CUSTOM, FLASH_INPAGE, // and HTML5_BANNER, and all RICH_MEDIA. HtmlCode string `json:"htmlCode,omitempty"` @@ -6544,7 +6551,7 @@ type DirectorySiteSettings struct { VerificationTagOptOut bool `json:"verificationTagOptOut,omitempty"` // VideoActiveViewOptOut: Whether this directory site has disabled - // active view for in-stream video creatives. + // active view for in-stream video creatives. This is a read-only field. VideoActiveViewOptOut bool `json:"videoActiveViewOptOut,omitempty"` // ForceSendFields is a list of field names (e.g. "ActiveViewOptOut") to @@ -7359,29 +7366,9 @@ type FloodlightActivity struct { TagString string `json:"tagString,omitempty"` // UserDefinedVariableTypes: List of the user-defined variables used by - // this conversion tag. These map to the "u[1-20]=" in the tags. Each of - // these can have a user defined type. - // Acceptable values are: - // - "U1" - // - "U2" - // - "U3" - // - "U4" - // - "U5" - // - "U6" - // - "U7" - // - "U8" - // - "U9" - // - "U10" - // - "U11" - // - "U12" - // - "U13" - // - "U14" - // - "U15" - // - "U16" - // - "U17" - // - "U18" - // - "U19" - // - "U20" + // this conversion tag. These map to the "u[1-100]=" in the tags. Each + // of these can have a user defined type. + // Acceptable values are U1 to U100, inclusive. // // Possible values: // "U1" @@ -9803,6 +9790,9 @@ type Placement struct { // Controls which VPAID format the measurement adapter will use for // in-stream video creatives assigned to this placement. // + // Note: Flash is no longer supported. This field now defaults to HTML5 + // when the following values are provided: FLASH, BOTH. + // // Possible values: // "BOTH" // "DEFAULT" @@ -12211,8 +12201,11 @@ type SiteSettings struct { // measurement adapter will use for in-stream video creatives assigned // to the placement. The publisher's specifications will typically // determine this setting. For VPAID creatives, the adapter format will - // match the VPAID format (HTML5 VPAID creatives use the HTML5 adapter, - // and Flash VPAID creatives use the Flash adapter). + // match the VPAID format (HTML5 VPAID creatives use the HTML5 + // adapter). + // + // Note: Flash is no longer supported. This field now defaults to HTML5 + // when the following values are provided: FLASH, BOTH. // // Possible values: // "BOTH" @@ -23315,11 +23308,7 @@ type CreativeAssetsInsertCall struct { advertiserId int64 creativeassetmetadata *CreativeAssetMetadata urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater + mediaInfo_ *gensupport.MediaInfo ctx_ context.Context header_ http.Header } @@ -23342,12 +23331,7 @@ func (r *CreativeAssetsService) Insert(profileId int64, advertiserId int64, crea // supplied. // At most one of Media and ResumableMedia may be set. func (c *CreativeAssetsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CreativeAssetsInsertCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -23362,11 +23346,7 @@ func (c *CreativeAssetsInsertCall) Media(r io.Reader, options ...googleapi.Media // supersede any context previously provided to the Context method. func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CreativeAssetsInsertCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -23375,7 +23355,7 @@ func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.Read // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *CreativeAssetsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CreativeAssetsInsertCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -23420,27 +23400,16 @@ func (c *CreativeAssetsInsertCall) doRequest(alt string) (*http.Response, error) reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -23477,20 +23446,10 @@ func (c *CreativeAssetsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeAs if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -38850,6 +38809,9 @@ func (c *PlacementsGeneratetagsCall) PlacementIds(placementIds ...int64) *Placem // TagFormats sets the optional parameter "tagFormats": Tag formats to // generate for these placements. // +// Note: PLACEMENT_TAG_STANDARD can only be generated for 1x1 +// placements. +// // Possible values: // "PLACEMENT_TAG_CLICK_COMMANDS" // "PLACEMENT_TAG_IFRAME_ILAYER" @@ -38984,7 +38946,7 @@ func (c *PlacementsGeneratetagsCall) Do(opts ...googleapi.CallOption) (*Placemen // "type": "string" // }, // "tagFormats": { - // "description": "Tag formats to generate for these placements.", + // "description": "Tag formats to generate for these placements.\n\nNote: PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements.", // "enum": [ // "PLACEMENT_TAG_CLICK_COMMANDS", // "PLACEMENT_TAG_IFRAME_ILAYER", diff --git a/vendor/google.golang.org/api/discovery/v1/discovery-api.json b/vendor/google.golang.org/api/discovery/v1/discovery-api.json index b240e12e0..bf037a3d7 100644 --- a/vendor/google.golang.org/api/discovery/v1/discovery-api.json +++ b/vendor/google.golang.org/api/discovery/v1/discovery-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/Pyg0A4J33Dq212hoe9BYpSm0dl4\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/K3nEDF6hixE8Pks2-9Ysn9j9prQ\"", "discoveryVersion": "v1", "id": "discovery:v1", "name": "discovery", @@ -319,8 +319,7 @@ }, "batchPath": { "type": "string", - "description": "The path for REST batch requests.", - "default": "batch" + "description": "The path for REST batch requests." }, "canonicalName": { "type": "string", diff --git a/vendor/google.golang.org/api/dlp/v2beta1/dlp-api.json b/vendor/google.golang.org/api/dlp/v2beta1/dlp-api.json index 3a27a6511..f69c663f6 100644 --- a/vendor/google.golang.org/api/dlp/v2beta1/dlp-api.json +++ b/vendor/google.golang.org/api/dlp/v2beta1/dlp-api.json @@ -1,111 +1,26 @@ { + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "protocol": "rest", + "canonicalName": "DLP", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://dlp.googleapis.com/", "ownerDomain": "google.com", "name": "dlp", "batchPath": "batch", "title": "DLP API", "ownerName": "Google", "resources": { - "rootCategories": { - "methods": { - "list": { - "description": "Returns the list of root categories of sensitive information.", - "response": { - "$ref": "GooglePrivacyDlpV2beta1ListRootCategoriesResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "parameters": { - "languageCode": { - "description": "Optional language code for localized friendly category names.\nIf omitted or if localized strings are not available,\nen-US strings will be returned.", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta1/rootCategories", - "id": "dlp.rootCategories.list", - "path": "v2beta1/rootCategories" - } - }, - "resources": { - "infoTypes": { - "methods": { - "list": { - "response": { - "$ref": "GooglePrivacyDlpV2beta1ListInfoTypesResponse" - }, - "parameterOrder": [ - "category" - ], - "httpMethod": "GET", - "parameters": { - "category": { - "pattern": "^[^/]+$", - "location": "path", - "description": "Category name as returned by ListRootCategories.", - "type": "string", - "required": true - }, - "languageCode": { - "location": "query", - "description": "Optional BCP-47 language code for localized info type friendly\nnames. If omitted, or if localized strings are not available,\nen-US strings will be returned.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta1/rootCategories/{rootCategoriesId}/infoTypes", - "id": "dlp.rootCategories.infoTypes.list", - "path": "v2beta1/rootCategories/{+category}/infoTypes", - "description": "Returns sensitive information types for given category." - } - } - } - } - }, - "content": { - "methods": { - "inspect": { - "request": { - "$ref": "GooglePrivacyDlpV2beta1InspectContentRequest" - }, - "description": "Finds potentially sensitive info in a list of strings.\nThis method has limits on input size, processing time, and output size.", - "response": { - "$ref": "GooglePrivacyDlpV2beta1InspectContentResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {}, - "flatPath": "v2beta1/content:inspect", - "id": "dlp.content.inspect", - "path": "v2beta1/content:inspect" - }, - "redact": { - "response": { - "$ref": "GooglePrivacyDlpV2beta1RedactContentResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta1/content:redact", - "id": "dlp.content.redact", - "path": "v2beta1/content:redact", - "description": "Redacts potentially sensitive info from a list of strings.\nThis method has limits on input size, processing time, and output size.", - "request": { - "$ref": "GooglePrivacyDlpV2beta1RedactContentRequest" - } - } - } - }, "inspect": { "resources": { "results": { @@ -113,39 +28,39 @@ "findings": { "methods": { "list": { - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], "response": { "$ref": "GooglePrivacyDlpV2beta1ListInspectFindingsResponse" }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "filter": { - "description": "Restricts findings to items that match. Supports info_type and likelihood.\n\u003cp\u003eExamples:\u003cbr/\u003e\n\u003cli\u003einfo_type=EMAIL_ADDRESS\n\u003cli\u003einfo_type=PHONE_NUMBER,EMAIL_ADDRESS\n\u003cli\u003elikelihood=VERY_LIKELY\n\u003cli\u003elikelihood=VERY_LIKELY,LIKELY\n\u003cli\u003einfo_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY", "type": "string", - "location": "query" + "location": "query", + "description": "Restricts findings to items that match. Supports info_type and likelihood.\nExamples:\n- info_type=EMAIL_ADDRESS\n- info_type=PHONE_NUMBER,EMAIL_ADDRESS\n- likelihood=VERY_LIKELY\n- likelihood=VERY_LIKELY,LIKELY\n- info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY" + }, + "name": { + "location": "path", + "description": "Identifier of the results set returned as metadata of\nthe longrunning operation created by a call to InspectDataSource.\nShould be in the format of `inspect/results/{id}`.", + "required": true, + "type": "string", + "pattern": "^inspect/results/[^/]+$" }, "pageToken": { "location": "query", "description": "The value returned by the last `ListInspectFindingsResponse`; indicates\nthat this is a continuation of a prior `ListInspectFindings` call, and that\nthe system should return the next page of data.", "type": "string" }, - "name": { - "description": "Identifier of the results set returned as metadata of\nthe longrunning operation created by a call to CreateInspectOperation.\nShould be in the format of `inspect/results/{id}`.", - "type": "string", - "required": true, - "pattern": "^inspect/results/[^/]+$", - "location": "path" - }, "pageSize": { - "format": "int32", + "location": "query", "description": "Maximum number of results to return.\nIf 0, the implementation selects a reasonable value.", - "type": "integer", - "location": "query" + "format": "int32", + "type": "integer" } }, "flatPath": "v2beta1/inspect/results/{resultsId}/findings", @@ -168,23 +83,341 @@ "name" ], "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "name": { - "pattern": "^inspect/operations/[^/]+$", - "location": "path", "description": "The name of the operation resource to be deleted.", + "required": true, "type": "string", - "required": true + "pattern": "^inspect/operations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2beta1/inspect/operations/{operationsId}", + "path": "v2beta1/{+name}", + "id": "dlp.inspect.operations.delete" + }, + "list": { + "flatPath": "v2beta1/inspect/operations", + "id": "dlp.inspect.operations.list", + "path": "v2beta1/{+name}", + "description": "Fetch the list of long running operations.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "parameters": { + "filter": { + "description": "This parameter supports filtering by done, ie done=true or done=false.", + "type": "string", + "location": "query" + }, + "name": { + "pattern": "^inspect/operations$", + "location": "path", + "description": "The name of the operation's parent resource.", + "required": true, + "type": "string" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "The list page size. The max allowed value is 256 and default is 100.", + "format": "int32" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource.", + "required": true, + "type": "string", + "pattern": "^inspect/operations/[^/]+$" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v2beta1/inspect/operations/{operationsId}", - "id": "dlp.inspect.operations.delete", + "id": "dlp.inspect.operations.get", "path": "v2beta1/{+name}" }, + "create": { + "path": "v2beta1/inspect/operations", + "id": "dlp.inspect.operations.create", + "description": "Schedules a job scanning content in a Google Cloud Platform data\nrepository.", + "request": { + "$ref": "GooglePrivacyDlpV2beta1CreateInspectOperationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v2beta1/inspect/operations" + }, + "cancel": { + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "required": true, + "type": "string", + "pattern": "^inspect/operations/[^/]+$", + "location": "path", + "description": "The name of the operation resource to be cancelled." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta1/inspect/operations/{operationsId}:cancel", + "path": "v2beta1/{+name}:cancel", + "id": "dlp.inspect.operations.cancel", + "request": { + "$ref": "GoogleLongrunningCancelOperationRequest" + }, + "description": "Cancels an operation. Use the get method to check whether the cancellation succeeded or whether the operation completed despite cancellation." + } + } + } + } + }, + "content": { + "methods": { + "inspect": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "GooglePrivacyDlpV2beta1InspectContentResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta1/content:inspect", + "id": "dlp.content.inspect", + "path": "v2beta1/content:inspect", + "request": { + "$ref": "GooglePrivacyDlpV2beta1InspectContentRequest" + }, + "description": "Finds potentially sensitive info in a list of strings.\nThis method has limits on input size, processing time, and output size." + }, + "redact": { + "description": "Redacts potentially sensitive info from a list of strings.\nThis method has limits on input size, processing time, and output size.", + "request": { + "$ref": "GooglePrivacyDlpV2beta1RedactContentRequest" + }, + "response": { + "$ref": "GooglePrivacyDlpV2beta1RedactContentResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v2beta1/content:redact", + "path": "v2beta1/content:redact", + "id": "dlp.content.redact" + } + } + }, + "rootCategories": { + "methods": { + "list": { + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "GooglePrivacyDlpV2beta1ListRootCategoriesResponse" + }, + "parameters": { + "languageCode": { + "location": "query", + "description": "Optional language code for localized friendly category names.\nIf omitted or if localized strings are not available,\nen-US strings will be returned.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta1/rootCategories", + "id": "dlp.rootCategories.list", + "path": "v2beta1/rootCategories", + "description": "Returns the list of root categories of sensitive information." + } + }, + "resources": { + "infoTypes": { + "methods": { + "list": { + "response": { + "$ref": "GooglePrivacyDlpV2beta1ListInfoTypesResponse" + }, + "parameterOrder": [ + "category" + ], + "httpMethod": "GET", + "parameters": { + "languageCode": { + "location": "query", + "description": "Optional BCP-47 language code for localized info type friendly\nnames. If omitted, or if localized strings are not available,\nen-US strings will be returned.", + "type": "string" + }, + "category": { + "location": "path", + "description": "Category name as returned by ListRootCategories.", + "required": true, + "type": "string", + "pattern": "^[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta1/rootCategories/{rootCategoriesId}/infoTypes", + "path": "v2beta1/rootCategories/{+category}/infoTypes", + "id": "dlp.rootCategories.infoTypes.list", + "description": "Returns sensitive information types for given category." + } + } + } + } + }, + "riskAnalysis": { + "resources": { + "operations": { + "methods": { + "cancel": { + "description": "Cancels an operation. Use the get method to check whether the cancellation succeeded or whether the operation completed despite cancellation.", + "request": { + "$ref": "GoogleLongrunningCancelOperationRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "required": true, + "type": "string", + "pattern": "^riskAnalysis/operations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2beta1/riskAnalysis/operations/{operationsId}:cancel", + "path": "v2beta1/{+name}:cancel", + "id": "dlp.riskAnalysis.operations.cancel" + }, + "delete": { + "description": "This method is not supported and the server returns `UNIMPLEMENTED`.", + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource to be deleted.", + "required": true, + "type": "string", + "pattern": "^riskAnalysis/operations/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta1/riskAnalysis/operations/{operationsId}", + "id": "dlp.riskAnalysis.operations.delete", + "path": "v2beta1/{+name}" + }, + "list": { + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation's parent resource.", + "required": true, + "type": "string", + "pattern": "^riskAnalysis/operations$" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "The list page size. The max allowed value is 256 and default is 100.", + "format": "int32", + "type": "integer" + }, + "filter": { + "location": "query", + "description": "This parameter supports filtering by done, ie done=true or done=false.", + "type": "string" + } + }, + "flatPath": "v2beta1/riskAnalysis/operations", + "path": "v2beta1/{+name}", + "id": "dlp.riskAnalysis.operations.list", + "description": "Fetch the list of long running operations." + }, "get": { + "flatPath": "v2beta1/riskAnalysis/operations/{operationsId}", + "path": "v2beta1/{+name}", + "id": "dlp.riskAnalysis.operations.get", "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", "response": { "$ref": "GoogleLongrunningOperation" @@ -196,99 +429,9 @@ "parameters": { "name": { "description": "The name of the operation resource.", - "type": "string", "required": true, - "pattern": "^inspect/operations/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta1/inspect/operations/{operationsId}", - "id": "dlp.inspect.operations.get", - "path": "v2beta1/{+name}" - }, - "list": { - "description": "Fetch the list of long running operations.", - "response": { - "$ref": "GoogleLongrunningListOperationsResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "filter": { - "location": "query", - "description": "This parameter supports filtering by done, ie done=true or done=false.", - "type": "string" - }, - "pageToken": { - "description": "The standard list page token.", "type": "string", - "location": "query" - }, - "name": { - "description": "The name of the operation's parent resource.", - "type": "string", - "required": true, - "pattern": "^inspect/operations$", - "location": "path" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The list page size. The max allowed value is 256 and default is 100.", - "type": "integer" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta1/inspect/operations", - "id": "dlp.inspect.operations.list", - "path": "v2beta1/{+name}" - }, - "create": { - "flatPath": "v2beta1/inspect/operations", - "id": "dlp.inspect.operations.create", - "path": "v2beta1/inspect/operations", - "request": { - "$ref": "GooglePrivacyDlpV2beta1CreateInspectOperationRequest" - }, - "description": "Schedules a job scanning content in a Google Cloud Platform data\nrepository.", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {} - }, - "cancel": { - "flatPath": "v2beta1/inspect/operations/{operationsId}:cancel", - "path": "v2beta1/{+name}:cancel", - "id": "dlp.inspect.operations.cancel", - "description": "Cancels an operation. Use the get method to check whether the cancellation succeeded or whether the operation completed despite cancellation.", - "request": { - "$ref": "GoogleLongrunningCancelOperationRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "type": "string", - "required": true, - "pattern": "^inspect/operations/[^/]+$", + "pattern": "^riskAnalysis/operations/[^/]+$", "location": "path" } }, @@ -302,73 +445,35 @@ } }, "parameters": { - "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.", - "type": "string", - "location": "query" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "oauth_token": { + "fields": { "location": "query", - "description": "OAuth 2.0 token for the current user.", + "description": "Selector specifying which fields to include in a partial response.", "type": "string" }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "upload_protocol": { - "type": "string", - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, "uploadType": { "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, "$.xgafv": { + "location": "query", + "enum": [ + "1", + "2" + ], "description": "V1 error format.", "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" ] }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, "alt": { - "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", "description": "Data format for response.", "default": "json", "enum": [ @@ -376,41 +481,579 @@ "media", "proto" ], - "type": "string" + "type": "string", + "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" }, "access_token": { + "description": "OAuth access token.", "type": "string", - "location": "query", - "description": "OAuth access token." + "location": "query" }, "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.", "type": "string", + "location": "query" + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { "location": "query", - "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." + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" } }, "version": "v2beta1", "baseUrl": "https://dlp.googleapis.com/", - "servicePath": "", - "description": "The Google Data Loss Prevention API provides methods for detection of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories.", "kind": "discovery#restDescription", + "description": "The Google Data Loss Prevention API provides methods for detection of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories.", + "servicePath": "", "basePath": "", - "revision": "20170801", - "documentationLink": "https://cloud.google.com/dlp/docs/", "id": "dlp:v2beta1", + "revision": "20170905", + "documentationLink": "https://cloud.google.com/dlp/docs/", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "GooglePrivacyDlpV2beta1Range": { + "description": "Generic half-open interval [start, end)", + "type": "object", + "properties": { + "start": { + "description": "Index of the first character of the range (inclusive).", + "format": "int64", + "type": "string" + }, + "end": { + "type": "string", + "description": "Index of the last character of the range (exclusive).", + "format": "int64" + } + }, + "id": "GooglePrivacyDlpV2beta1Range" + }, + "GoogleTypeTimeOfDay": { + "id": "GoogleTypeTimeOfDay", + "description": "Represents a time of day. The date and time zone are either not significant\nor are specified elsewhere. An API may choose to allow leap seconds. Related\ntypes are google.type.Date and `google.protobuf.Timestamp`.", + "type": "object", + "properties": { + "seconds": { + "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may\nallow the value 60 if it allows leap-seconds.", + "format": "int32", + "type": "integer" + }, + "minutes": { + "description": "Minutes of hour of day. Must be from 0 to 59.", + "format": "int32", + "type": "integer" + }, + "hours": { + "type": "integer", + "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose\nto allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32" + }, + "nanos": { + "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "format": "int32", + "type": "integer" + } + } + }, + "GooglePrivacyDlpV2beta1InspectResult": { + "description": "All the findings for a single scanned item.", + "type": "object", + "properties": { + "findingsTruncated": { + "type": "boolean", + "description": "If true, then this item might have more findings than were returned,\nand the findings returned are an arbitrary subset of all findings.\nThe findings list might be truncated because the input items were too\nlarge, or because the server reached the maximum amount of resources\nallowed for a single API call. For best results, divide the input into\nsmaller batches." + }, + "findings": { + "description": "List of findings for an item.", + "type": "array", + "items": { + "$ref": "GooglePrivacyDlpV2beta1Finding" + } + } + }, + "id": "GooglePrivacyDlpV2beta1InspectResult" + }, + "GooglePrivacyDlpV2beta1ImageLocation": { + "description": "Bounding box encompassing detected text within an image.", + "type": "object", + "properties": { + "height": { + "description": "Height of the bounding box in pixels.", + "format": "int32", + "type": "integer" + }, + "top": { + "description": "Top coordinate of the bounding box. (0,0) is upper left.", + "format": "int32", + "type": "integer" + }, + "left": { + "type": "integer", + "description": "Left coordinate of the bounding box. (0,0) is upper left.", + "format": "int32" + }, + "width": { + "description": "Width of the bounding box in pixels.", + "format": "int32", + "type": "integer" + } + }, + "id": "GooglePrivacyDlpV2beta1ImageLocation" + }, + "GooglePrivacyDlpV2beta1StorageConfig": { + "id": "GooglePrivacyDlpV2beta1StorageConfig", + "description": "Shared message indicating Cloud storage type.", + "type": "object", + "properties": { + "cloudStorageOptions": { + "$ref": "GooglePrivacyDlpV2beta1CloudStorageOptions", + "description": "Google Cloud Storage options specification." + }, + "datastoreOptions": { + "$ref": "GooglePrivacyDlpV2beta1DatastoreOptions", + "description": "Google Cloud Datastore options specification." + }, + "bigQueryOptions": { + "$ref": "GooglePrivacyDlpV2beta1BigQueryOptions", + "description": "BigQuery options specification." + } + } + }, + "GooglePrivacyDlpV2beta1ContentItem": { + "description": "Container structure for the content to inspect.", + "type": "object", + "properties": { + "type": { + "description": "Type of the content, as defined in Content-Type HTTP header.\nSupported types are: all \"text\" types, octet streams, PNG images,\nJPEG images.", + "type": "string" + }, + "value": { + "description": "String data to inspect or redact.", + "type": "string" + }, + "table": { + "$ref": "GooglePrivacyDlpV2beta1Table", + "description": "Structured content for inspection." + }, + "data": { + "description": "Content data to inspect or redact.", + "format": "byte", + "type": "string" + } + }, + "id": "GooglePrivacyDlpV2beta1ContentItem" + }, + "GooglePrivacyDlpV2beta1OperationConfig": { + "type": "object", + "properties": { + "maxItemFindings": { + "description": "Max number of findings per file, Datastore entity, or database row.", + "format": "int64", + "type": "string" + } + }, + "id": "GooglePrivacyDlpV2beta1OperationConfig", + "description": "Additional configuration for inspect long running operations." + }, + "GooglePrivacyDlpV2beta1BigQueryOptions": { + "description": "Options defining BigQuery table and row identifiers.", + "type": "object", + "properties": { + "tableReference": { + "$ref": "GooglePrivacyDlpV2beta1BigQueryTable", + "description": "Complete BigQuery table reference." + }, + "identifyingFields": { + "description": "References to fields uniquely identifying rows within the table.\nNested fields in the format, like `person.birthdate.year`, are allowed.", + "type": "array", + "items": { + "$ref": "GooglePrivacyDlpV2beta1FieldId" + } + } + }, + "id": "GooglePrivacyDlpV2beta1BigQueryOptions" + }, + "GooglePrivacyDlpV2beta1ReplaceConfig": { + "type": "object", + "properties": { + "infoType": { + "description": "Type of information to replace. Only one ReplaceConfig per info_type\nshould be provided. If ReplaceConfig does not have an info_type, the DLP\nAPI matches it against all info_types that are found but not specified in\nanother ReplaceConfig.", + "$ref": "GooglePrivacyDlpV2beta1InfoType" + }, + "replaceWith": { + "description": "Content replacing sensitive information of given type. Max 256 chars.", + "type": "string" + } + }, + "id": "GooglePrivacyDlpV2beta1ReplaceConfig" + }, + "GooglePrivacyDlpV2beta1Color": { + "type": "object", + "properties": { + "red": { + "type": "number", + "description": "The amount of red in the color as a value in the interval [0, 1].", + "format": "float" + }, + "green": { + "description": "The amount of green in the color as a value in the interval [0, 1].", + "format": "float", + "type": "number" + }, + "blue": { + "type": "number", + "description": "The amount of blue in the color as a value in the interval [0, 1].", + "format": "float" + } + }, + "id": "GooglePrivacyDlpV2beta1Color", + "description": "Represents a color in the RGB color space." + }, + "GooglePrivacyDlpV2beta1Table": { + "description": "Structured content to inspect. Up to 50,000 `Value`s per request allowed.", + "type": "object", + "properties": { + "headers": { + "type": "array", + "items": { + "$ref": "GooglePrivacyDlpV2beta1FieldId" + } + }, + "rows": { + "type": "array", + "items": { + "$ref": "GooglePrivacyDlpV2beta1Row" + } + } + }, + "id": "GooglePrivacyDlpV2beta1Table" + }, + "GooglePrivacyDlpV2beta1InfoTypeLimit": { + "id": "GooglePrivacyDlpV2beta1InfoTypeLimit", + "description": "Max findings configuration per info type, per content item or long running\noperation.", + "type": "object", + "properties": { + "infoType": { + "description": "Type of information the findings limit applies to. Only one limit per\ninfo_type should be provided. If InfoTypeLimit does not have an\ninfo_type, the DLP API applies the limit against all info_types that are\nfound but not specified in another InfoTypeLimit.", + "$ref": "GooglePrivacyDlpV2beta1InfoType" + }, + "maxFindings": { + "type": "integer", + "description": "Max findings limit for the given infoType.", + "format": "int32" + } + } + }, + "GooglePrivacyDlpV2beta1ListInfoTypesResponse": { + "description": "Response to the ListInfoTypes request.", + "type": "object", + "properties": { + "infoTypes": { + "description": "Set of sensitive info types belonging to a category.", + "type": "array", + "items": { + "$ref": "GooglePrivacyDlpV2beta1InfoTypeDescription" + } + } + }, + "id": "GooglePrivacyDlpV2beta1ListInfoTypesResponse" + }, + "GooglePrivacyDlpV2beta1Value": { + "properties": { + "booleanValue": { + "type": "boolean" + }, + "floatValue": { + "format": "double", + "type": "number" + }, + "integerValue": { + "format": "int64", + "type": "string" + }, + "timeValue": { + "$ref": "GoogleTypeTimeOfDay" + }, + "stringValue": { + "type": "string" + }, + "dateValue": { + "$ref": "GoogleTypeDate" + }, + "timestampValue": { + "format": "google-datetime", + "type": "string" + } + }, + "id": "GooglePrivacyDlpV2beta1Value", + "description": "Set of primitive values supported by the system.", + "type": "object" + }, + "GooglePrivacyDlpV2beta1CloudStorageKey": { + "description": "Record key for a finding in a Cloud Storage file.", + "type": "object", + "properties": { + "startOffset": { + "description": "Byte offset of the referenced data in the file.", + "format": "int64", + "type": "string" + }, + "filePath": { + "description": "Path to the file.", + "type": "string" + } + }, + "id": "GooglePrivacyDlpV2beta1CloudStorageKey" + }, + "GooglePrivacyDlpV2beta1PartitionId": { + "description": "Datastore partition ID.\nA partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty.\n\nA partition ID contains several dimensions:\nproject ID and namespace ID.", + "type": "object", + "properties": { + "namespaceId": { + "description": "If not empty, the ID of the namespace to which the entities belong.", + "type": "string" + }, + "projectId": { + "description": "The ID of the project to which the entities belong.", + "type": "string" + } + }, + "id": "GooglePrivacyDlpV2beta1PartitionId" + }, + "GooglePrivacyDlpV2beta1InspectContentResponse": { + "id": "GooglePrivacyDlpV2beta1InspectContentResponse", + "description": "Results of inspecting a list of items.", + "type": "object", + "properties": { + "results": { + "description": "Each content_item from the request has a result in this list, in the\nsame order as the request.", + "type": "array", + "items": { + "$ref": "GooglePrivacyDlpV2beta1InspectResult" + } + } + } + }, + "GooglePrivacyDlpV2beta1RedactContentRequest": { + "description": "Request to search for potentially sensitive info in a list of items\nand replace it with a default or provided content.", + "type": "object", + "properties": { + "replaceConfigs": { + "description": "The strings to replace findings text findings with. Must specify at least\none of these or one ImageRedactionConfig if redacting images.", + "type": "array", + "items": { + "$ref": "GooglePrivacyDlpV2beta1ReplaceConfig" + } + }, + "imageRedactionConfigs": { + "description": "The configuration for specifying what content to redact from images.", + "type": "array", + "items": { + "$ref": "GooglePrivacyDlpV2beta1ImageRedactionConfig" + } + }, + "inspectConfig": { + "$ref": "GooglePrivacyDlpV2beta1InspectConfig", + "description": "Configuration for the inspector." + }, + "items": { + "description": "The list of items to inspect. Up to 100 are allowed per request.", + "type": "array", + "items": { + "$ref": "GooglePrivacyDlpV2beta1ContentItem" + } + } + }, + "id": "GooglePrivacyDlpV2beta1RedactContentRequest" + }, + "GooglePrivacyDlpV2beta1FieldId": { + "description": "General identifier of a data field in a storage service.", + "type": "object", + "properties": { + "columnName": { + "description": "Name describing the field.", + "type": "string" + } + }, + "id": "GooglePrivacyDlpV2beta1FieldId" + }, + "GooglePrivacyDlpV2beta1DatastoreOptions": { + "description": "Options defining a data set within Google Cloud Datastore.", + "type": "object", + "properties": { + "kind": { + "description": "The kind to process.", + "$ref": "GooglePrivacyDlpV2beta1KindExpression" + }, + "projection": { + "description": "Properties to scan. If none are specified, all properties will be scanned\nby default.", + "type": "array", + "items": { + "$ref": "GooglePrivacyDlpV2beta1Projection" + } + }, + "partitionId": { + "description": "A partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty.", + "$ref": "GooglePrivacyDlpV2beta1PartitionId" + } + }, + "id": "GooglePrivacyDlpV2beta1DatastoreOptions" + }, + "GoogleLongrunningCancelOperationRequest": { + "type": "object", + "properties": {}, + "id": "GoogleLongrunningCancelOperationRequest", + "description": "The request message for Operations.CancelOperation." + }, + "GooglePrivacyDlpV2beta1InspectConfig": { + "description": "Configuration description of the scanning process.\nWhen used with redactContent only info_types and min_likelihood are currently\nused.", + "type": "object", + "properties": { + "excludeTypes": { + "type": "boolean", + "description": "When true, excludes type information of the findings." + }, + "minLikelihood": { + "description": "Only returns findings equal or above this threshold.", + "type": "string", + "enumDescriptions": [ + "Default value; information with all likelihoods is included.", + "Few matching elements.", + "", + "Some matching elements.", + "", + "Many matching elements." + ], + "enum": [ + "LIKELIHOOD_UNSPECIFIED", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ] + }, + "maxFindings": { + "type": "integer", + "description": "Limits the number of findings per content item or long running operation.", + "format": "int32" + }, + "infoTypeLimits": { + "description": "Configuration of findings limit given for specified info types.", + "type": "array", + "items": { + "$ref": "GooglePrivacyDlpV2beta1InfoTypeLimit" + } + }, + "infoTypes": { + "type": "array", + "items": { + "$ref": "GooglePrivacyDlpV2beta1InfoType" + }, + "description": "Restricts what info_types to look for. The values must correspond to\nInfoType values returned by ListInfoTypes or found in documentation.\nEmpty info_types runs all enabled detectors." + }, + "includeQuote": { + "type": "boolean", + "description": "When true, a contextual quote from the data that triggered a finding is\nincluded in the response; see Finding.quote." + } + }, + "id": "GooglePrivacyDlpV2beta1InspectConfig" + }, + "GooglePrivacyDlpV2beta1Projection": { + "description": "A representation of a Datastore property in a projection.", + "type": "object", + "properties": { + "property": { + "$ref": "GooglePrivacyDlpV2beta1PropertyReference", + "description": "The property to project." + } + }, + "id": "GooglePrivacyDlpV2beta1Projection" + }, + "GooglePrivacyDlpV2beta1CreateInspectOperationRequest": { + "id": "GooglePrivacyDlpV2beta1CreateInspectOperationRequest", + "description": "Request for scheduling a scan of a data subset from a Google Platform data\nrepository.", + "type": "object", + "properties": { + "inspectConfig": { + "description": "Configuration for the inspector.", + "$ref": "GooglePrivacyDlpV2beta1InspectConfig" + }, + "storageConfig": { + "$ref": "GooglePrivacyDlpV2beta1StorageConfig", + "description": "Specification of the data set to process." + }, + "outputConfig": { + "description": "Optional location to store findings. The bucket must already exist and\nthe Google APIs service account for DLP must have write permission to\nwrite to the given bucket.\nResults are split over multiple csv files with each file name matching\nthe pattern \"[operation_id]_[count].csv\", for example\n`3094877188788974909_1.csv`. The `operation_id` matches the\nidentifier for the Operation, and the `count` is a counter used for\ntracking the number of files written.\nThe CSV file(s) contain the\nfollowing columns regardless of storage type scanned:\n- id\n- info_type\n- likelihood\n- byte size of finding\n- quote\n- timestamp\n\nFor Cloud Storage the next columns are:\n- file_path\n- start_offset\n\nFor Cloud Datastore the next columns are:\n- project_id\n- namespace_id\n- path\n- column_name\n- offset\n\nFor BigQuery the next columns are:\n- row_number\n- project_id\n- dataset_id\n- table_id", + "$ref": "GooglePrivacyDlpV2beta1OutputStorageConfig" + }, + "operationConfig": { + "$ref": "GooglePrivacyDlpV2beta1OperationConfig", + "description": "Additional configuration settings for long running operations." + } + } + }, + "GooglePrivacyDlpV2beta1Key": { + "description": "A unique identifier for a Datastore entity.\nIf a key's partition ID or any of its path kinds or names are\nreserved/read-only, the key is reserved/read-only.\nA reserved/read-only key is forbidden in certain documented contexts.", + "type": "object", + "properties": { + "partitionId": { + "$ref": "GooglePrivacyDlpV2beta1PartitionId", + "description": "Entities are partitioned into subsets, currently identified by a project\nID and namespace ID.\nQueries are scoped to a single partition." + }, + "path": { + "description": "The entity path.\nAn entity path consists of one or more elements composed of a kind and a\nstring or numerical identifier, which identify entities. The first\nelement identifies a _root entity_, the second element identifies\na _child_ of the root entity, the third element identifies a child of the\nsecond entity, and so forth. The entities identified by all prefixes of\nthe path are called the element's _ancestors_.\n\nA path can never be empty, and a path can have at most 100 elements.", + "type": "array", + "items": { + "$ref": "GooglePrivacyDlpV2beta1PathElement" + } + } + }, + "id": "GooglePrivacyDlpV2beta1Key" + }, "GooglePrivacyDlpV2beta1InspectContentRequest": { "description": "Request to search for potentially sensitive info in a list of items.", "type": "object", "properties": { "items": { "description": "The list of items to inspect. Items in a single request are\nconsidered \"related\" unless inspect_config.independent_inputs is true.\nUp to 100 are allowed per request.", + "type": "array", "items": { "$ref": "GooglePrivacyDlpV2beta1ContentItem" - }, - "type": "array" + } }, "inspectConfig": { "description": "Configuration for the inspector.", @@ -419,63 +1062,62 @@ }, "id": "GooglePrivacyDlpV2beta1InspectContentRequest" }, - "GooglePrivacyDlpV2beta1CloudStoragePath": { + "GoogleTypeDate": { + "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", "type": "object", "properties": { - "path": { - "type": "string", - "description": "The url, in the format of `gs://bucket/\u003cpath\u003e`." - } - }, - "id": "GooglePrivacyDlpV2beta1CloudStoragePath", - "description": "A location in Cloud Storage." - }, - "GooglePrivacyDlpV2beta1InspectOperationResult": { - "id": "GooglePrivacyDlpV2beta1InspectOperationResult", - "description": "The operational data.", - "type": "object", - "properties": { - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `inspect/results/{id}`.", - "type": "string" - } - } - }, - "GooglePrivacyDlpV2beta1Range": { - "description": "Generic half-open interval [start, end)", - "type": "object", - "properties": { - "end": { - "format": "int64", - "description": "Index of the last character of the range (exclusive).", - "type": "string" + "month": { + "description": "Month of year. Must be from 1 to 12.", + "format": "int32", + "type": "integer" }, - "start": { + "year": { + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "format": "int32", + "type": "integer" + }, + "day": { + "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", + "format": "int32", + "type": "integer" + } + }, + "id": "GoogleTypeDate" + }, + "GooglePrivacyDlpV2beta1InfoTypeStatistics": { + "description": "Statistics regarding a specific InfoType.", + "type": "object", + "properties": { + "infoType": { + "$ref": "GooglePrivacyDlpV2beta1InfoType", + "description": "The type of finding this stat is for." + }, + "count": { + "description": "Number of findings for this info type.", "format": "int64", - "description": "Index of the first character of the range (inclusive).", "type": "string" } }, - "id": "GooglePrivacyDlpV2beta1Range" + "id": "GooglePrivacyDlpV2beta1InfoTypeStatistics" }, "GooglePrivacyDlpV2beta1ImageRedactionConfig": { - "id": "GooglePrivacyDlpV2beta1ImageRedactionConfig", - "description": "Configuration for determing how redaction of images should occur.", "type": "object", "properties": { "redactionColor": { - "$ref": "GooglePrivacyDlpV2beta1Color", - "description": "The color to use when redacting content from an image. If not specified,\nthe default is black." + "description": "The color to use when redacting content from an image. If not specified,\nthe default is black.", + "$ref": "GooglePrivacyDlpV2beta1Color" }, "redactAllText": { - "description": "If true, all text found in the image, regardless if it matches an\ninfo_type, is redacted.", + "description": "If true, all text found in the image, regardless whether it matches an\ninfo_type, is redacted.", "type": "boolean" }, "infoType": { "$ref": "GooglePrivacyDlpV2beta1InfoType", - "description": "Only one per info_type should be provided per request. If not\nspecified, and redact_all_text is false, the DLP API will redacts all\ntext that it matches against all info_types that are found, but not\nspecified in another ImageRedactionConfig." + "description": "Only one per info_type should be provided per request. If not\nspecified, and redact_all_text is false, the DLP API will redact all\ntext that it matches against all info_types that are found, but not\nspecified in another ImageRedactionConfig." } - } + }, + "id": "GooglePrivacyDlpV2beta1ImageRedactionConfig", + "description": "Configuration for determing how redaction of images should occur." }, "GooglePrivacyDlpV2beta1RedactContentResponse": { "description": "Results of redacting a list of items.", @@ -483,47 +1125,30 @@ "properties": { "items": { "description": "The redacted content.", + "type": "array", "items": { "$ref": "GooglePrivacyDlpV2beta1ContentItem" - }, - "type": "array" + } } }, "id": "GooglePrivacyDlpV2beta1RedactContentResponse" }, - "GooglePrivacyDlpV2beta1InfoTypeStatistics": { - "description": "Statistics regarding a specific InfoType.", - "type": "object", - "properties": { - "count": { - "type": "string", - "format": "int64", - "description": "Number of findings for this info type." - }, - "infoType": { - "description": "The type of finding this stat is for.", - "$ref": "GooglePrivacyDlpV2beta1InfoType" - } - }, - "id": "GooglePrivacyDlpV2beta1InfoTypeStatistics" - }, "GooglePrivacyDlpV2beta1PropertyReference": { "description": "A reference to a property relative to the Datastore kind expressions.", "type": "object", "properties": { "name": { - "description": "The name of the property.\nIf name includes \".\"s, it may be interpreted as a property name path.", - "type": "string" + "type": "string", + "description": "The name of the property.\nIf name includes \".\"s, it may be interpreted as a property name path." } }, "id": "GooglePrivacyDlpV2beta1PropertyReference" }, "GooglePrivacyDlpV2beta1Location": { + "id": "GooglePrivacyDlpV2beta1Location", + "description": "Specifies the location of a finding within its source item.", + "type": "object", "properties": { - "recordKey": { - "description": "Key of the finding.", - "$ref": "GooglePrivacyDlpV2beta1RecordKey" - }, "codepointRange": { "description": "Character offsets within a content item, included when content type\nis a text. Default charset assumed to be UTF-8.", "$ref": "GooglePrivacyDlpV2beta1Range" @@ -534,64 +1159,24 @@ }, "imageBoxes": { "description": "Location within an image's pixels.", + "type": "array", "items": { "$ref": "GooglePrivacyDlpV2beta1ImageLocation" - }, - "type": "array" + } }, "byteRange": { "description": "Zero-based byte offsets within a content item.", "$ref": "GooglePrivacyDlpV2beta1Range" + }, + "recordKey": { + "$ref": "GooglePrivacyDlpV2beta1RecordKey", + "description": "Key of the finding." + }, + "tableLocation": { + "$ref": "GooglePrivacyDlpV2beta1TableLocation", + "description": "Location within a `ContentItem.Table`." } - }, - "id": "GooglePrivacyDlpV2beta1Location", - "description": "Specifies the location of a finding within its source item.", - "type": "object" - }, - "GooglePrivacyDlpV2beta1InspectResult": { - "description": "All the findings for a single scanned item.", - "type": "object", - "properties": { - "findings": { - "description": "List of findings for an item.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1Finding" - }, - "type": "array" - }, - "findingsTruncated": { - "description": "If true, then this item might have more findings than were returned,\nand the findings returned are an arbitrary subset of all findings.\nThe findings list might be truncated because the input items were too\nlarge, or because the server reached the maximum amount of resources\nallowed for a single API call. For best results, divide the input into\nsmaller batches.", - "type": "boolean" - } - }, - "id": "GooglePrivacyDlpV2beta1InspectResult" - }, - "GooglePrivacyDlpV2beta1ImageLocation": { - "description": "Bounding box encompassing detected text within an image.", - "type": "object", - "properties": { - "height": { - "format": "int32", - "description": "Height of the bounding box in pixels.", - "type": "integer" - }, - "top": { - "format": "int32", - "description": "Top coordinate of the bounding box. (0,0) is upper left.", - "type": "integer" - }, - "left": { - "format": "int32", - "description": "Left coordinate of the bounding box. (0,0) is upper left.", - "type": "integer" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Width of the bounding box in pixels." - } - }, - "id": "GooglePrivacyDlpV2beta1ImageLocation" + } }, "GooglePrivacyDlpV2beta1InfoTypeDescription": { "description": "Info type description.", @@ -607,10 +1192,10 @@ }, "categories": { "description": "List of categories this info type belongs to.", + "type": "array", "items": { "$ref": "GooglePrivacyDlpV2beta1CategoryDescription" - }, - "type": "array" + } } }, "id": "GooglePrivacyDlpV2beta1InfoTypeDescription" @@ -630,74 +1215,52 @@ }, "id": "GooglePrivacyDlpV2beta1OutputStorageConfig" }, - "GooglePrivacyDlpV2beta1StorageConfig": { - "properties": { - "datastoreOptions": { - "$ref": "GooglePrivacyDlpV2beta1DatastoreOptions", - "description": "Google Cloud Datastore options specification." - }, - "bigQueryOptions": { - "$ref": "GooglePrivacyDlpV2beta1BigQueryOptions", - "description": "BigQuery options specification." - }, - "cloudStorageOptions": { - "$ref": "GooglePrivacyDlpV2beta1CloudStorageOptions", - "description": "Google Cloud Storage options specification." - } - }, - "id": "GooglePrivacyDlpV2beta1StorageConfig", - "description": "Shared message indicating Cloud storage type.", - "type": "object" - }, "GoogleRpcStatus": { "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - }, "code": { - "format": "int32", + "type": "integer", "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" + "format": "int32" }, "message": { "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "type": "array", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + } } }, "id": "GoogleRpcStatus" }, "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, "response": { + "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "This field will contain an InspectOperationResult object.", - "type": "object" + "description": "This field will contain an InspectOperationResult object." }, "name": { - "type": "string", - "description": "The server-assigned name, The `name` should have the format of `inspect/operations/\u003cidentifier\u003e`." + "description": "The server-assigned name, The `name` should have the format of `inspect/operations/\u003cidentifier\u003e`.", + "type": "string" }, "error": { - "$ref": "GoogleRpcStatus", - "description": "The error result of the operation in case of failure or cancellation." + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "GoogleRpcStatus" }, "metadata": { "additionalProperties": { @@ -706,50 +1269,17 @@ }, "description": "This field will contain an InspectOperationMetadata object. This will always be returned with the Operation.", "type": "object" + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" } }, - "id": "GoogleLongrunningOperation", - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call." - }, - "GooglePrivacyDlpV2beta1ContentItem": { - "type": "object", - "properties": { - "type": { - "description": "Type of the content, as defined in Content-Type HTTP header.\nSupported types are: all \"text\" types, octet streams, PNG images,\nJPEG images.", - "type": "string" - }, - "value": { - "description": "String data to inspect or redact.", - "type": "string" - }, - "data": { - "format": "byte", - "description": "Content data to inspect or redact.", - "type": "string" - } - }, - "id": "GooglePrivacyDlpV2beta1ContentItem", - "description": "Container structure for the content to inspect." - }, - "GooglePrivacyDlpV2beta1BigQueryOptions": { - "description": "Options defining BigQuery table and row identifiers.", - "type": "object", - "properties": { - "tableReference": { - "$ref": "GooglePrivacyDlpV2beta1BigQueryTable", - "description": "Complete BigQuery table reference." - }, - "identifyingFields": { - "description": "References to fields uniquely identifying rows within the table.\nNested fields in the format like person.birthdate.year are allowed.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1FieldId" - }, - "type": "array" - } - }, - "id": "GooglePrivacyDlpV2beta1BigQueryOptions" + "id": "GoogleLongrunningOperation" }, "GooglePrivacyDlpV2beta1InspectOperationMetadata": { + "id": "GooglePrivacyDlpV2beta1InspectOperationMetadata", + "description": "Metadata returned within GetOperation for an inspect request.", "type": "object", "properties": { "requestOutputConfig": { @@ -757,92 +1287,52 @@ "description": "Optional location to store findings." }, "createTime": { - "format": "google-datetime", "description": "The time which this request was started.", + "format": "google-datetime", "type": "string" }, "requestStorageConfig": { - "description": "The storage config used to create the Operation.", - "$ref": "GooglePrivacyDlpV2beta1StorageConfig" + "$ref": "GooglePrivacyDlpV2beta1StorageConfig", + "description": "The storage config used to create the Operation." }, "processedBytes": { - "format": "int64", "description": "Total size in bytes that were processed.", + "format": "int64", "type": "string" }, "totalEstimatedBytes": { - "format": "int64", "description": "Estimate of the number of bytes to process.", + "format": "int64", "type": "string" }, "infoTypeStats": { + "type": "array", "items": { "$ref": "GooglePrivacyDlpV2beta1InfoTypeStatistics" - }, - "type": "array" + } }, "requestInspectConfig": { - "description": "The inspect config used to create the Operation.", - "$ref": "GooglePrivacyDlpV2beta1InspectConfig" + "$ref": "GooglePrivacyDlpV2beta1InspectConfig", + "description": "The inspect config used to create the Operation." } - }, - "id": "GooglePrivacyDlpV2beta1InspectOperationMetadata", - "description": "Metadata returned within GetOperation for an inspect request." + } }, "GooglePrivacyDlpV2beta1InfoType": { - "properties": { - "name": { - "description": "Name of the information type.", - "type": "string" - } - }, "id": "GooglePrivacyDlpV2beta1InfoType", "description": "Type of information detected by the API.", - "type": "object" - }, - "GooglePrivacyDlpV2beta1ReplaceConfig": { "type": "object", "properties": { - "infoType": { - "$ref": "GooglePrivacyDlpV2beta1InfoType", - "description": "Type of information to replace. Only one ReplaceConfig per info_type\nshould be provided. If ReplaceConfig does not have an info_type, the DLP\nAPI matches it against all info_types that are found but not specified in\nanother ReplaceConfig." - }, - "replaceWith": { - "description": "Content replacing sensitive information of given type. Max 256 chars.", - "type": "string" - } - }, - "id": "GooglePrivacyDlpV2beta1ReplaceConfig" - }, - "GooglePrivacyDlpV2beta1Color": { - "id": "GooglePrivacyDlpV2beta1Color", - "description": "Represents a color in the RGB color space.", - "type": "object", - "properties": { - "red": { - "format": "float", - "description": "The amount of red in the color as a value in the interval [0, 1].", - "type": "number" - }, - "blue": { - "format": "float", - "description": "The amount of blue in the color as a value in the interval [0, 1].", - "type": "number" - }, - "green": { - "format": "float", - "description": "The amount of green in the color as a value in the interval [0, 1].", - "type": "number" + "name": { + "type": "string", + "description": "Name of the information type." } } }, "GooglePrivacyDlpV2beta1PathElement": { - "description": "A (kind, ID/name) pair used to construct a key path.\n\nIf either name or ID is set, the element is complete.\nIf neither is set, the element is incomplete.", - "type": "object", "properties": { "id": { - "format": "int64", "description": "The auto-allocated ID of the entity.\nNever equal to zero. Values less than zero are discouraged and may not\nbe supported in the future.", + "format": "int64", "type": "string" }, "name": { @@ -854,9 +1344,12 @@ "type": "string" } }, - "id": "GooglePrivacyDlpV2beta1PathElement" + "id": "GooglePrivacyDlpV2beta1PathElement", + "description": "A (kind, ID/name) pair used to construct a key path.\n\nIf either name or ID is set, the element is complete.\nIf neither is set, the element is incomplete.", + "type": "object" }, "GooglePrivacyDlpV2beta1CategoryDescription": { + "description": "Info Type Category description.", "type": "object", "properties": { "name": { @@ -864,81 +1357,70 @@ "type": "string" }, "displayName": { - "type": "string", - "description": "Human readable form of the category name." + "description": "Human readable form of the category name.", + "type": "string" } }, - "id": "GooglePrivacyDlpV2beta1CategoryDescription", - "description": "Info Type Category description." - }, - "GooglePrivacyDlpV2beta1ListInfoTypesResponse": { - "description": "Response to the ListInfoTypes request.", - "type": "object", - "properties": { - "infoTypes": { - "description": "Set of sensitive info types belonging to a category.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1InfoTypeDescription" - }, - "type": "array" - } - }, - "id": "GooglePrivacyDlpV2beta1ListInfoTypesResponse" + "id": "GooglePrivacyDlpV2beta1CategoryDescription" }, "GooglePrivacyDlpV2beta1BigQueryTable": { - "description": "Message defining the location of a BigQuery table. A table is uniquely\nidentified by its project_id, dataset_id, and table_name.", + "description": "Message defining the location of a BigQuery table. A table is uniquely\nidentified by its project_id, dataset_id, and table_name. Within a query\na table is often referenced with a string in the format of:\n`\u003cproject_id\u003e:\u003cdataset_id\u003e.\u003ctable_id\u003e` or\n`\u003cproject_id\u003e.\u003cdataset_id\u003e.\u003ctable_id\u003e`.", "type": "object", "properties": { - "datasetId": { - "description": "Dataset ID of the table.", + "projectId": { + "description": "The Google Cloud Platform project ID of the project containing the table.\nIf omitted, project ID is inferred from the API call.", "type": "string" }, + "datasetId": { + "type": "string", + "description": "Dataset ID of the table." + }, "tableId": { "description": "Name of the table.", "type": "string" - }, - "projectId": { - "description": "The GCP project id of the project containing the table.\nIf omitted, project id is inferred from the API call.", - "type": "string" } }, "id": "GooglePrivacyDlpV2beta1BigQueryTable" }, "GooglePrivacyDlpV2beta1ListRootCategoriesResponse": { - "description": "Response for ListRootCategories request.", - "type": "object", "properties": { "categories": { "description": "List of all into type categories supported by the API.", + "type": "array", "items": { "$ref": "GooglePrivacyDlpV2beta1CategoryDescription" - }, - "type": "array" + } } }, - "id": "GooglePrivacyDlpV2beta1ListRootCategoriesResponse" - }, - "GooglePrivacyDlpV2beta1CloudStorageKey": { - "description": "Record key for a finding in a Cloud Storage file.", - "type": "object", - "properties": { - "filePath": { - "description": "Path to the file.", - "type": "string" - }, - "startOffset": { - "format": "int64", - "description": "Byte offset of the referenced data in the file.", - "type": "string" - } - }, - "id": "GooglePrivacyDlpV2beta1CloudStorageKey" + "id": "GooglePrivacyDlpV2beta1ListRootCategoriesResponse", + "description": "Response for ListRootCategories request.", + "type": "object" }, "GooglePrivacyDlpV2beta1Finding": { + "id": "GooglePrivacyDlpV2beta1Finding", "description": "Container structure describing a single finding within a string or image.", "type": "object", "properties": { + "infoType": { + "$ref": "GooglePrivacyDlpV2beta1InfoType", + "description": "The specific type of info the string might be." + }, + "createTime": { + "description": "Timestamp when finding was detected.", + "format": "google-datetime", + "type": "string" + }, + "quote": { + "description": "The specific string that may be potentially sensitive info.", + "type": "string" + }, + "location": { + "$ref": "GooglePrivacyDlpV2beta1Location", + "description": "Location of the info found." + }, "likelihood": { + "description": "Estimate of how likely it is that the info_type is correct.", + "type": "string", "enumDescriptions": [ "Default value; information with all likelihoods is included.", "Few matching elements.", @@ -954,110 +1436,30 @@ "POSSIBLE", "LIKELY", "VERY_LIKELY" - ], - "description": "Estimate of how likely it is that the info_type is correct.", - "type": "string" - }, - "createTime": { - "type": "string", - "format": "google-datetime", - "description": "Timestamp when finding was detected." - }, - "infoType": { - "description": "The specific type of info the string might be.", - "$ref": "GooglePrivacyDlpV2beta1InfoType" - }, - "location": { - "$ref": "GooglePrivacyDlpV2beta1Location", - "description": "Location of the info found." - }, - "quote": { - "description": "The specific string that may be potentially sensitive info.", - "type": "string" + ] } - }, - "id": "GooglePrivacyDlpV2beta1Finding" - }, - "GooglePrivacyDlpV2beta1PartitionId": { - "type": "object", - "properties": { - "projectId": { - "description": "The ID of the project to which the entities belong.", - "type": "string" - }, - "namespaceId": { - "type": "string", - "description": "If not empty, the ID of the namespace to which the entities belong." - } - }, - "id": "GooglePrivacyDlpV2beta1PartitionId", - "description": "Datastore partition ID.\nA partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty.\n\nA partition ID contains several dimensions:\nproject ID and namespace ID." - }, - "GooglePrivacyDlpV2beta1InspectContentResponse": { - "description": "Results of inspecting a list of items.", - "type": "object", - "properties": { - "results": { - "description": "Each content_item from the request has a result in this list, in the\nsame order as the request.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1InspectResult" - }, - "type": "array" - } - }, - "id": "GooglePrivacyDlpV2beta1InspectContentResponse" + } }, "GooglePrivacyDlpV2beta1KindExpression": { - "id": "GooglePrivacyDlpV2beta1KindExpression", "description": "A representation of a Datastore kind.", "type": "object", "properties": { "name": { - "description": "The name of the kind.", - "type": "string" - } - } - }, - "GooglePrivacyDlpV2beta1RedactContentRequest": { - "properties": { - "inspectConfig": { - "description": "Configuration for the inspector.", - "$ref": "GooglePrivacyDlpV2beta1InspectConfig" - }, - "items": { - "description": "The list of items to inspect. Up to 100 are allowed per request.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1ContentItem" - }, - "type": "array" - }, - "replaceConfigs": { - "description": "The strings to replace findings text findings with. Must specify at least\none of these or one ImageRedactionConfig if redacting images.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1ReplaceConfig" - }, - "type": "array" - }, - "imageRedactionConfigs": { - "description": "The configuration for specifying what content to redact from images.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1ImageRedactionConfig" - }, - "type": "array" + "type": "string", + "description": "The name of the kind." } }, - "id": "GooglePrivacyDlpV2beta1RedactContentRequest", - "description": "Request to search for potentially sensitive info in a list of items\nand replace it with a default or provided content.", - "type": "object" + "id": "GooglePrivacyDlpV2beta1KindExpression" }, "GoogleLongrunningListOperationsResponse": { + "type": "object", "properties": { "operations": { - "description": "A list of operations that matches the specified filter in the request.", + "type": "array", "items": { "$ref": "GoogleLongrunningOperation" }, - "type": "array" + "description": "A list of operations that matches the specified filter in the request." }, "nextPageToken": { "description": "The standard List next-page token.", @@ -1065,22 +1467,21 @@ } }, "id": "GoogleLongrunningListOperationsResponse", - "description": "The response message for Operations.ListOperations.", - "type": "object" + "description": "The response message for Operations.ListOperations." }, - "GooglePrivacyDlpV2beta1FieldId": { - "id": "GooglePrivacyDlpV2beta1FieldId", - "description": "General identifier of a data field in a storage service.", + "GooglePrivacyDlpV2beta1Row": { "type": "object", "properties": { - "columnName": { - "description": "Name describing the field.", - "type": "string" + "values": { + "type": "array", + "items": { + "$ref": "GooglePrivacyDlpV2beta1Value" + } } - } + }, + "id": "GooglePrivacyDlpV2beta1Row" }, "GooglePrivacyDlpV2beta1FileSet": { - "description": "Set of files to scan.", "type": "object", "properties": { "url": { @@ -1088,41 +1489,8 @@ "type": "string" } }, - "id": "GooglePrivacyDlpV2beta1FileSet" - }, - "GooglePrivacyDlpV2beta1DatastoreOptions": { - "description": "Options defining a data set within Google Cloud Datastore.", - "type": "object", - "properties": { - "projection": { - "description": "Properties to scan. If none are specified, all properties will be scanned\nby default.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1Projection" - }, - "type": "array" - }, - "kind": { - "description": "The kind to process.", - "$ref": "GooglePrivacyDlpV2beta1KindExpression" - }, - "partitionId": { - "$ref": "GooglePrivacyDlpV2beta1PartitionId", - "description": "A partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty." - } - }, - "id": "GooglePrivacyDlpV2beta1DatastoreOptions" - }, - "GoogleLongrunningCancelOperationRequest": { - "properties": {}, - "id": "GoogleLongrunningCancelOperationRequest", - "description": "The request message for Operations.CancelOperation.", - "type": "object" - }, - "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "GoogleProtobufEmpty" + "id": "GooglePrivacyDlpV2beta1FileSet", + "description": "Set of files to scan." }, "GooglePrivacyDlpV2beta1ListInspectFindingsResponse": { "id": "GooglePrivacyDlpV2beta1ListInspectFindingsResponse", @@ -1134,70 +1502,31 @@ "type": "string" }, "result": { - "description": "The results.", - "$ref": "GooglePrivacyDlpV2beta1InspectResult" + "$ref": "GooglePrivacyDlpV2beta1InspectResult", + "description": "The results." } } }, - "GooglePrivacyDlpV2beta1InspectConfig": { - "description": "Configuration description of the scanning process.\nWhen used with redactContent only info_types and min_likelihood are currently\nused.", + "GoogleProtobufEmpty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "type": "object", - "properties": { - "minLikelihood": { - "enumDescriptions": [ - "Default value; information with all likelihoods is included.", - "Few matching elements.", - "", - "Some matching elements.", - "", - "Many matching elements." - ], - "enum": [ - "LIKELIHOOD_UNSPECIFIED", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Only returns findings equal or above this threshold.", - "type": "string" - }, - "maxFindings": { - "format": "int32", - "description": "Limits the number of findings per content item or long running operation.", - "type": "integer" - }, - "excludeTypes": { - "description": "When true, excludes type information of the findings.", - "type": "boolean" - }, - "infoTypes": { - "items": { - "$ref": "GooglePrivacyDlpV2beta1InfoType" - }, - "type": "array", - "description": "Restricts what info_types to look for. The values must correspond to\nInfoType values returned by ListInfoTypes or found in documentation.\nEmpty info_types runs all enabled detectors." - }, - "includeQuote": { - "type": "boolean", - "description": "When true, a contextual quote from the data that triggered a finding is\nincluded in the response; see Finding.quote." - } - }, - "id": "GooglePrivacyDlpV2beta1InspectConfig" + "properties": {}, + "id": "GoogleProtobufEmpty" }, - "GooglePrivacyDlpV2beta1Projection": { - "description": "A representation of a Datastore property in a projection.", - "type": "object", + "GooglePrivacyDlpV2beta1TableLocation": { "properties": { - "property": { - "description": "The property to project.", - "$ref": "GooglePrivacyDlpV2beta1PropertyReference" + "rowIndex": { + "description": "The zero-based index of the row where the finding is located.", + "format": "int64", + "type": "string" } }, - "id": "GooglePrivacyDlpV2beta1Projection" + "id": "GooglePrivacyDlpV2beta1TableLocation", + "description": "Location of a finding within a `ContentItem.Table`.", + "type": "object" }, "GooglePrivacyDlpV2beta1DatastoreKey": { + "id": "GooglePrivacyDlpV2beta1DatastoreKey", "description": "Record key for a finding in Cloud Datastore.", "type": "object", "properties": { @@ -1205,40 +1534,19 @@ "$ref": "GooglePrivacyDlpV2beta1Key", "description": "Datastore entity key." } - }, - "id": "GooglePrivacyDlpV2beta1DatastoreKey" + } }, "GooglePrivacyDlpV2beta1CloudStorageOptions": { + "description": "Options defining a file or a set of files (path ending with *) within\na Google Cloud Storage bucket.", "type": "object", "properties": { "fileSet": { "$ref": "GooglePrivacyDlpV2beta1FileSet" } }, - "id": "GooglePrivacyDlpV2beta1CloudStorageOptions", - "description": "Options defining a file or a set of files (path ending with *) within\na Google Cloud Storage bucket." - }, - "GooglePrivacyDlpV2beta1CreateInspectOperationRequest": { - "properties": { - "outputConfig": { - "$ref": "GooglePrivacyDlpV2beta1OutputStorageConfig", - "description": "Optional location to store findings. The bucket must already exist and\nthe Google APIs service account for DLP must have write permission to\nwrite to the given bucket.\n\u003cp\u003eResults are split over multiple csv files with each file name matching\nthe pattern \"[operation_id]_[count].csv\", for example\n`3094877188788974909_1.csv`. The `operation_id` matches the\nidentifier for the Operation, and the `count` is a counter used for\ntracking the number of files written. \u003cp\u003eThe CSV file(s) contain the\nfollowing columns regardless of storage type scanned: \u003cli\u003eid \u003cli\u003einfo_type\n\u003cli\u003elikelihood \u003cli\u003ebyte size of finding \u003cli\u003equote \u003cli\u003etime_stamp\u003cbr/\u003e\n\u003cp\u003eFor Cloud Storage the next columns are: \u003cli\u003efile_path\n\u003cli\u003estart_offset\u003cbr/\u003e\n\u003cp\u003eFor Cloud Datastore the next columns are: \u003cli\u003eproject_id\n\u003cli\u003enamespace_id \u003cli\u003epath \u003cli\u003ecolumn_name \u003cli\u003eoffset" - }, - "inspectConfig": { - "$ref": "GooglePrivacyDlpV2beta1InspectConfig", - "description": "Configuration for the inspector." - }, - "storageConfig": { - "$ref": "GooglePrivacyDlpV2beta1StorageConfig", - "description": "Specification of the data set to process." - } - }, - "id": "GooglePrivacyDlpV2beta1CreateInspectOperationRequest", - "description": "Request for scheduling a scan of a data subset from a Google Platform data\nrepository.", - "type": "object" + "id": "GooglePrivacyDlpV2beta1CloudStorageOptions" }, "GooglePrivacyDlpV2beta1RecordKey": { - "description": "Message for a unique key indicating a record that contains a finding.", "type": "object", "properties": { "cloudStorageKey": { @@ -1248,41 +1556,30 @@ "$ref": "GooglePrivacyDlpV2beta1DatastoreKey" } }, - "id": "GooglePrivacyDlpV2beta1RecordKey" + "id": "GooglePrivacyDlpV2beta1RecordKey", + "description": "Message for a unique key indicating a record that contains a finding." }, - "GooglePrivacyDlpV2beta1Key": { - "description": "A unique identifier for a Datastore entity.\nIf a key's partition ID or any of its path kinds or names are\nreserved/read-only, the key is reserved/read-only.\nA reserved/read-only key is forbidden in certain documented contexts.", + "GooglePrivacyDlpV2beta1CloudStoragePath": { + "id": "GooglePrivacyDlpV2beta1CloudStoragePath", + "description": "A location in Cloud Storage.", "type": "object", "properties": { "path": { - "description": "The entity path.\nAn entity path consists of one or more elements composed of a kind and a\nstring or numerical identifier, which identify entities. The first\nelement identifies a _root entity_, the second element identifies\na _child_ of the root entity, the third element identifies a child of the\nsecond entity, and so forth. The entities identified by all prefixes of\nthe path are called the element's _ancestors_.\n\nA path can never be empty, and a path can have at most 100 elements.", - "items": { - "$ref": "GooglePrivacyDlpV2beta1PathElement" - }, - "type": "array" - }, - "partitionId": { - "$ref": "GooglePrivacyDlpV2beta1PartitionId", - "description": "Entities are partitioned into subsets, currently identified by a project\nID and namespace ID.\nQueries are scoped to a single partition." - } - }, - "id": "GooglePrivacyDlpV2beta1Key" - } - }, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "protocol": "rest", - "canonicalName": "DLP", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "The url, in the format of `gs://bucket/\u003cpath\u003e`.", + "type": "string" } } + }, + "GooglePrivacyDlpV2beta1InspectOperationResult": { + "description": "The operational data.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `inspect/results/{id}`." + } + }, + "id": "GooglePrivacyDlpV2beta1InspectOperationResult" } - }, - "rootUrl": "https://dlp.googleapis.com/" + } } diff --git a/vendor/google.golang.org/api/dlp/v2beta1/dlp-gen.go b/vendor/google.golang.org/api/dlp/v2beta1/dlp-gen.go index 2a14932b6..f7e669f35 100644 --- a/vendor/google.golang.org/api/dlp/v2beta1/dlp-gen.go +++ b/vendor/google.golang.org/api/dlp/v2beta1/dlp-gen.go @@ -58,6 +58,7 @@ func New(client *http.Client) (*Service, error) { s := &Service{client: client, BasePath: basePath} s.Content = NewContentService(s) s.Inspect = NewInspectService(s) + s.RiskAnalysis = NewRiskAnalysisService(s) s.RootCategories = NewRootCategoriesService(s) return s, nil } @@ -71,6 +72,8 @@ type Service struct { Inspect *InspectService + RiskAnalysis *RiskAnalysisService + RootCategories *RootCategoriesService } @@ -135,6 +138,27 @@ type InspectResultsFindingsService struct { s *Service } +func NewRiskAnalysisService(s *Service) *RiskAnalysisService { + rs := &RiskAnalysisService{s: s} + rs.Operations = NewRiskAnalysisOperationsService(s) + return rs +} + +type RiskAnalysisService struct { + s *Service + + Operations *RiskAnalysisOperationsService +} + +func NewRiskAnalysisOperationsService(s *Service) *RiskAnalysisOperationsService { + rs := &RiskAnalysisOperationsService{s: s} + return rs +} + +type RiskAnalysisOperationsService struct { + s *Service +} + func NewRootCategoriesService(s *Service) *RootCategoriesService { rs := &RootCategoriesService{s: s} rs.InfoTypes = NewRootCategoriesInfoTypesService(s) @@ -204,8 +228,8 @@ func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) type GoogleLongrunningOperation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` @@ -256,7 +280,8 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { type GooglePrivacyDlpV2beta1BigQueryOptions struct { // IdentifyingFields: References to fields uniquely identifying rows // within the table. - // Nested fields in the format like person.birthdate.year are allowed. + // Nested fields in the format, like `person.birthdate.year`, are + // allowed. IdentifyingFields []*GooglePrivacyDlpV2beta1FieldId `json:"identifyingFields,omitempty"` // TableReference: Complete BigQuery table reference. @@ -288,13 +313,20 @@ func (s *GooglePrivacyDlpV2beta1BigQueryOptions) MarshalJSON() ([]byte, error) { // GooglePrivacyDlpV2beta1BigQueryTable: Message defining the location // of a BigQuery table. A table is uniquely -// identified by its project_id, dataset_id, and table_name. +// identified by its project_id, dataset_id, and table_name. Within a +// query +// a table is often referenced with a string in the format +// of: +// `:.` +// or +// `..`. type GooglePrivacyDlpV2beta1BigQueryTable struct { // DatasetId: Dataset ID of the table. DatasetId string `json:"datasetId,omitempty"` - // ProjectId: The GCP project id of the project containing the table. - // If omitted, project id is inferred from the API call. + // ProjectId: The Google Cloud Platform project ID of the project + // containing the table. + // If omitted, project ID is inferred from the API call. ProjectId string `json:"projectId,omitempty"` // TableId: Name of the table. @@ -506,6 +538,9 @@ type GooglePrivacyDlpV2beta1ContentItem struct { // Data: Content data to inspect or redact. Data string `json:"data,omitempty"` + // Table: Structured content for inspection. + Table *GooglePrivacyDlpV2beta1Table `json:"table,omitempty"` + // Type: Type of the content, as defined in Content-Type HTTP // header. // Supported types are: all "text" types, octet streams, PNG @@ -547,12 +582,16 @@ type GooglePrivacyDlpV2beta1CreateInspectOperationRequest struct { // InspectConfig: Configuration for the inspector. InspectConfig *GooglePrivacyDlpV2beta1InspectConfig `json:"inspectConfig,omitempty"` + // OperationConfig: Additional configuration settings for long running + // operations. + OperationConfig *GooglePrivacyDlpV2beta1OperationConfig `json:"operationConfig,omitempty"` + // OutputConfig: Optional location to store findings. The bucket must // already exist and // the Google APIs service account for DLP must have write permission // to // write to the given bucket. - //

Results are split over multiple csv files with each file name + // Results are split over multiple csv files with each file name // matching // the pattern "[operation_id]_[count].csv", for // example @@ -560,18 +599,32 @@ type GooglePrivacyDlpV2beta1CreateInspectOperationRequest struct { // the // identifier for the Operation, and the `count` is a counter used // for - // tracking the number of files written.

The CSV file(s) contain - // the - // following columns regardless of storage type scanned:

  • id - //
  • info_type - //
  • likelihood
  • byte size of finding
  • quote - //
  • time_stamp
    - //

    For Cloud Storage the next columns are: - //

  • file_path - //
  • start_offset
    - //

    For Cloud Datastore the next columns are: - //

  • project_id - //
  • namespace_id
  • path
  • column_name
  • offset + // tracking the number of files written. + // The CSV file(s) contain the + // following columns regardless of storage type scanned: + // - id + // - info_type + // - likelihood + // - byte size of finding + // - quote + // - timestamp + // + // For Cloud Storage the next columns are: + // - file_path + // - start_offset + // + // For Cloud Datastore the next columns are: + // - project_id + // - namespace_id + // - path + // - column_name + // - offset + // + // For BigQuery the next columns are: + // - row_number + // - project_id + // - dataset_id + // - table_id OutputConfig *GooglePrivacyDlpV2beta1OutputStorageConfig `json:"outputConfig,omitempty"` // StorageConfig: Specification of the data set to process. @@ -821,15 +874,15 @@ func (s *GooglePrivacyDlpV2beta1ImageLocation) MarshalJSON() ([]byte, error) { type GooglePrivacyDlpV2beta1ImageRedactionConfig struct { // InfoType: Only one per info_type should be provided per request. If // not - // specified, and redact_all_text is false, the DLP API will redacts + // specified, and redact_all_text is false, the DLP API will redact // all // text that it matches against all info_types that are found, but // not // specified in another ImageRedactionConfig. InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"` - // RedactAllText: If true, all text found in the image, regardless if it - // matches an + // RedactAllText: If true, all text found in the image, regardless + // whether it matches an // info_type, is redacted. RedactAllText bool `json:"redactAllText,omitempty"` @@ -924,6 +977,45 @@ func (s *GooglePrivacyDlpV2beta1InfoTypeDescription) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2beta1InfoTypeLimit: Max findings configuration per +// info type, per content item or long running +// operation. +type GooglePrivacyDlpV2beta1InfoTypeLimit struct { + // InfoType: Type of information the findings limit applies to. Only one + // limit per + // info_type should be provided. If InfoTypeLimit does not have + // an + // info_type, the DLP API applies the limit against all info_types that + // are + // found but not specified in another InfoTypeLimit. + InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"` + + // MaxFindings: Max findings limit for the given infoType. + MaxFindings int64 `json:"maxFindings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InfoType") 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. "InfoType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2beta1InfoTypeLimit) MarshalJSON() ([]byte, error) { + type noMethod GooglePrivacyDlpV2beta1InfoTypeLimit + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2beta1InfoTypeStatistics: Statistics regarding a // specific InfoType. type GooglePrivacyDlpV2beta1InfoTypeStatistics struct { @@ -970,6 +1062,10 @@ type GooglePrivacyDlpV2beta1InspectConfig struct { // included in the response; see Finding.quote. IncludeQuote bool `json:"includeQuote,omitempty"` + // InfoTypeLimits: Configuration of findings limit given for specified + // info types. + InfoTypeLimits []*GooglePrivacyDlpV2beta1InfoTypeLimit `json:"infoTypeLimits,omitempty"` + // InfoTypes: Restricts what info_types to look for. The values must // correspond to // InfoType values returned by ListInfoTypes or found in @@ -1414,6 +1510,9 @@ type GooglePrivacyDlpV2beta1Location struct { // RecordKey: Key of the finding. RecordKey *GooglePrivacyDlpV2beta1RecordKey `json:"recordKey,omitempty"` + // TableLocation: Location within a `ContentItem.Table`. + TableLocation *GooglePrivacyDlpV2beta1TableLocation `json:"tableLocation,omitempty"` + // ForceSendFields is a list of field names (e.g. "ByteRange") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -1437,6 +1536,37 @@ func (s *GooglePrivacyDlpV2beta1Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2beta1OperationConfig: Additional configuration for +// inspect long running operations. +type GooglePrivacyDlpV2beta1OperationConfig struct { + // MaxItemFindings: Max number of findings per file, Datastore entity, + // or database row. + MaxItemFindings int64 `json:"maxItemFindings,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "MaxItemFindings") 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. "MaxItemFindings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2beta1OperationConfig) MarshalJSON() ([]byte, error) { + type noMethod GooglePrivacyDlpV2beta1OperationConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2beta1OutputStorageConfig: Cloud repository for // storing output. type GooglePrivacyDlpV2beta1OutputStorageConfig struct { @@ -1792,6 +1922,32 @@ func (s *GooglePrivacyDlpV2beta1ReplaceConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type GooglePrivacyDlpV2beta1Row struct { + Values []*GooglePrivacyDlpV2beta1Value `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 *GooglePrivacyDlpV2beta1Row) MarshalJSON() ([]byte, error) { + type noMethod GooglePrivacyDlpV2beta1Row + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2beta1StorageConfig: Shared message indicating Cloud // storage type. type GooglePrivacyDlpV2beta1StorageConfig struct { @@ -1828,6 +1984,120 @@ func (s *GooglePrivacyDlpV2beta1StorageConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2beta1Table: Structured content to inspect. Up to +// 50,000 `Value`s per request allowed. +type GooglePrivacyDlpV2beta1Table struct { + Headers []*GooglePrivacyDlpV2beta1FieldId `json:"headers,omitempty"` + + Rows []*GooglePrivacyDlpV2beta1Row `json:"rows,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Headers") 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. "Headers") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2beta1Table) MarshalJSON() ([]byte, error) { + type noMethod GooglePrivacyDlpV2beta1Table + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2beta1TableLocation: Location of a finding within a +// `ContentItem.Table`. +type GooglePrivacyDlpV2beta1TableLocation struct { + // RowIndex: The zero-based index of the row where the finding is + // located. + RowIndex int64 `json:"rowIndex,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "RowIndex") 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. "RowIndex") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2beta1TableLocation) MarshalJSON() ([]byte, error) { + type noMethod GooglePrivacyDlpV2beta1TableLocation + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2beta1Value: Set of primitive values supported by +// the system. +type GooglePrivacyDlpV2beta1Value struct { + BooleanValue bool `json:"booleanValue,omitempty"` + + DateValue *GoogleTypeDate `json:"dateValue,omitempty"` + + FloatValue float64 `json:"floatValue,omitempty"` + + IntegerValue int64 `json:"integerValue,omitempty,string"` + + StringValue string `json:"stringValue,omitempty"` + + TimeValue *GoogleTypeTimeOfDay `json:"timeValue,omitempty"` + + TimestampValue string `json:"timestampValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BooleanValue") 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. "BooleanValue") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2beta1Value) MarshalJSON() ([]byte, error) { + type noMethod GooglePrivacyDlpV2beta1Value + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GooglePrivacyDlpV2beta1Value) UnmarshalJSON(data []byte) error { + type noMethod GooglePrivacyDlpV2beta1Value + var s1 struct { + FloatValue gensupport.JSONFloat64 `json:"floatValue"` + *noMethod + } + s1.noMethod = (*noMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.FloatValue = float64(s1.FloatValue) + return nil +} + // GoogleProtobufEmpty: 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 @@ -1965,6 +2235,103 @@ func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleTypeDate: Represents a whole calendar date, e.g. date of birth. +// The time of day and +// time zone are either specified elsewhere or are not significant. The +// date +// is relative to the Proleptic Gregorian Calendar. The day may be 0 +// to +// represent a year and month where the day is not significant, e.g. +// credit card +// expiration date. The year may be 0 to represent a month and day +// independent +// of year, e.g. anniversary date. Related types are +// google.type.TimeOfDay +// and `google.protobuf.Timestamp`. +type GoogleTypeDate struct { + // Day: Day of month. Must be from 1 to 31 and valid for the year and + // month, or 0 + // if specifying a year/month where the day is not significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of year. Must be from 1 to 12. + Month int64 `json:"month,omitempty"` + + // Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date + // without + // a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") 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. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type noMethod GoogleTypeDate + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeTimeOfDay: Represents a time of day. The date and time zone +// are either not significant +// or are specified elsewhere. An API may choose to allow leap seconds. +// Related +// types are google.type.Date and `google.protobuf.Timestamp`. +type GoogleTypeTimeOfDay struct { + // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API + // may choose + // to allow the value "24:00:00" for scenarios like business closing + // time. + Hours int64 `json:"hours,omitempty"` + + // Minutes: Minutes of hour of day. Must be from 0 to 59. + Minutes int64 `json:"minutes,omitempty"` + + // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to + // 999,999,999. + Nanos int64 `json:"nanos,omitempty"` + + // Seconds: Seconds of minutes of the time. Must normally be from 0 to + // 59. An API may + // allow the value 60 if it allows leap-seconds. + Seconds int64 `json:"seconds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Hours") 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. "Hours") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeTimeOfDay) MarshalJSON() ([]byte, error) { + type noMethod GoogleTypeTimeOfDay + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "dlp.content.inspect": type ContentInspectCall struct { @@ -2960,17 +3327,13 @@ func (r *InspectResultsFindingsService) List(name string) *InspectResultsFinding } // Filter sets the optional parameter "filter": Restricts findings to -// items that match. Supports info_type and -// likelihood. -//

    Examples:
    -//

  • info_type=EMAIL_ADDRESS -//
  • info_typ -// e=PHONE_NUMBER,EMAIL_ADDRESS -//
  • likelihood=VERY_LIKELY -//
  • likelihood -// =VERY_LIKELY,LIKELY -//
  • info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY -// ,LIKELY +// items that match. Supports info_type and likelihood. +// Examples: +// - info_type=EMAIL_ADDRESS +// - info_type=PHONE_NUMBER,EMAIL_ADDRESS +// - likelihood=VERY_LIKELY +// - likelihood=VERY_LIKELY,LIKELY +// - info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY func (c *InspectResultsFindingsListCall) Filter(filter string) *InspectResultsFindingsListCall { c.urlParams_.Set("filter", filter) return c @@ -3099,12 +3462,12 @@ func (c *InspectResultsFindingsListCall) Do(opts ...googleapi.CallOption) (*Goog // ], // "parameters": { // "filter": { - // "description": "Restricts findings to items that match. Supports info_type and likelihood.\n\u003cp\u003eExamples:\u003cbr/\u003e\n\u003cli\u003einfo_type=EMAIL_ADDRESS\n\u003cli\u003einfo_type=PHONE_NUMBER,EMAIL_ADDRESS\n\u003cli\u003elikelihood=VERY_LIKELY\n\u003cli\u003elikelihood=VERY_LIKELY,LIKELY\n\u003cli\u003einfo_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY", + // "description": "Restricts findings to items that match. Supports info_type and likelihood.\nExamples:\n- info_type=EMAIL_ADDRESS\n- info_type=PHONE_NUMBER,EMAIL_ADDRESS\n- likelihood=VERY_LIKELY\n- likelihood=VERY_LIKELY,LIKELY\n- info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY", // "location": "query", // "type": "string" // }, // "name": { - // "description": "Identifier of the results set returned as metadata of\nthe longrunning operation created by a call to CreateInspectOperation.\nShould be in the format of `inspect/results/{id}`.", + // "description": "Identifier of the results set returned as metadata of\nthe longrunning operation created by a call to InspectDataSource.\nShould be in the format of `inspect/results/{id}`.", // "location": "path", // "pattern": "^inspect/results/[^/]+$", // "required": true, @@ -3154,6 +3517,610 @@ func (c *InspectResultsFindingsListCall) Pages(ctx context.Context, f func(*Goog } } +// method id "dlp.riskAnalysis.operations.cancel": + +type RiskAnalysisOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Cancels an operation. Use the get method to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. +func (r *RiskAnalysisOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *RiskAnalysisOperationsCancelCall { + c := &RiskAnalysisOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + 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 *RiskAnalysisOperationsCancelCall) Fields(s ...googleapi.Field) *RiskAnalysisOperationsCancelCall { + 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 *RiskAnalysisOperationsCancelCall) Context(ctx context.Context) *RiskAnalysisOperationsCancelCall { + 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 *RiskAnalysisOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RiskAnalysisOperationsCancelCall) 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.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.riskAnalysis.operations.cancel" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RiskAnalysisOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Cancels an operation. Use the get method to check whether the cancellation succeeded or whether the operation completed despite cancellation.", + // "flatPath": "v2beta1/riskAnalysis/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "dlp.riskAnalysis.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^riskAnalysis/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta1/{+name}:cancel", + // "request": { + // "$ref": "GoogleLongrunningCancelOperationRequest" + // }, + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.riskAnalysis.operations.delete": + +type RiskAnalysisOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: This method is not supported and the server returns +// `UNIMPLEMENTED`. +func (r *RiskAnalysisOperationsService) Delete(name string) *RiskAnalysisOperationsDeleteCall { + c := &RiskAnalysisOperationsDeleteCall{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 *RiskAnalysisOperationsDeleteCall) Fields(s ...googleapi.Field) *RiskAnalysisOperationsDeleteCall { + 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 *RiskAnalysisOperationsDeleteCall) Context(ctx context.Context) *RiskAnalysisOperationsDeleteCall { + 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 *RiskAnalysisOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RiskAnalysisOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.riskAnalysis.operations.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RiskAnalysisOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "This method is not supported and the server returns `UNIMPLEMENTED`.", + // "flatPath": "v2beta1/riskAnalysis/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "dlp.riskAnalysis.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^riskAnalysis/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta1/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.riskAnalysis.operations.get": + +type RiskAnalysisOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this +// method to poll the operation result at intervals as recommended by +// the API +// service. +func (r *RiskAnalysisOperationsService) Get(name string) *RiskAnalysisOperationsGetCall { + c := &RiskAnalysisOperationsGetCall{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 *RiskAnalysisOperationsGetCall) Fields(s ...googleapi.Field) *RiskAnalysisOperationsGetCall { + 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 *RiskAnalysisOperationsGetCall) IfNoneMatch(entityTag string) *RiskAnalysisOperationsGetCall { + 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 *RiskAnalysisOperationsGetCall) Context(ctx context.Context) *RiskAnalysisOperationsGetCall { + 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 *RiskAnalysisOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RiskAnalysisOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.riskAnalysis.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RiskAnalysisOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + // "flatPath": "v2beta1/riskAnalysis/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "dlp.riskAnalysis.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^riskAnalysis/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.riskAnalysis.operations.list": + +type RiskAnalysisOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Fetch the list of long running operations. +func (r *RiskAnalysisOperationsService) List(name string) *RiskAnalysisOperationsListCall { + c := &RiskAnalysisOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": This parameter supports +// filtering by done, ie done=true or done=false. +func (c *RiskAnalysisOperationsListCall) Filter(filter string) *RiskAnalysisOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The list page size. +// The max allowed value is 256 and default is 100. +func (c *RiskAnalysisOperationsListCall) PageSize(pageSize int64) *RiskAnalysisOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *RiskAnalysisOperationsListCall) PageToken(pageToken string) *RiskAnalysisOperationsListCall { + 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 *RiskAnalysisOperationsListCall) Fields(s ...googleapi.Field) *RiskAnalysisOperationsListCall { + 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 *RiskAnalysisOperationsListCall) IfNoneMatch(entityTag string) *RiskAnalysisOperationsListCall { + 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 *RiskAnalysisOperationsListCall) Context(ctx context.Context) *RiskAnalysisOperationsListCall { + 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 *RiskAnalysisOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RiskAnalysisOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.riskAnalysis.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RiskAnalysisOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Fetch the list of long running operations.", + // "flatPath": "v2beta1/riskAnalysis/operations", + // "httpMethod": "GET", + // "id": "dlp.riskAnalysis.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "This parameter supports filtering by done, ie done=true or done=false.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^riskAnalysis/operations$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The list page size. The max allowed value is 256 and default is 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2beta1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RiskAnalysisOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) 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 "dlp.rootCategories.list": type RootCategoriesListCall struct { diff --git a/vendor/google.golang.org/api/dns/v2beta1/dns-api.json b/vendor/google.golang.org/api/dns/v2beta1/dns-api.json index b35e07307..dee9dcc56 100644 --- a/vendor/google.golang.org/api/dns/v2beta1/dns-api.json +++ b/vendor/google.golang.org/api/dns/v2beta1/dns-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/LHpjntOBIuQr1aiz7vFFaZA7LV0\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/5iI5DqGWql1d7Ix1CktINwTdaEw\"", "discoveryVersion": "v1", "id": "dns:v2beta1", "name": "dns", "version": "v2beta1", - "revision": "20170602", + "revision": "20170831", "title": "Google Cloud DNS API", "description": "Configures and serves authoritative DNS records.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/doubleclicksearch/v2/doubleclicksearch-api.json b/vendor/google.golang.org/api/doubleclicksearch/v2/doubleclicksearch-api.json index 6a81256da..69c3155c0 100644 --- a/vendor/google.golang.org/api/doubleclicksearch/v2/doubleclicksearch-api.json +++ b/vendor/google.golang.org/api/doubleclicksearch/v2/doubleclicksearch-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/HNx5Z9luIGXFFG34jFOjICfZiIg\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/Bw6EqK9n7kcpWBfwyICiiT_-lIo\"", "discoveryVersion": "v1", "id": "doubleclicksearch:v2", "name": "doubleclicksearch", "version": "v2", - "revision": "20170607", + "revision": "20170831", "title": "DoubleClick Search API", "description": "Reports and modifies your advertising data in DoubleClick Search (for example, campaigns, ad groups, keywords, and conversions).", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/drive/v2/drive-api.json b/vendor/google.golang.org/api/drive/v2/drive-api.json index 32a2949b6..e939e793b 100644 --- a/vendor/google.golang.org/api/drive/v2/drive-api.json +++ b/vendor/google.golang.org/api/drive/v2/drive-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/GZBaoIT2JIa-WG47c56OJgYWjRw\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/DCrAVU-W3UzljIhuRMkT-kOc_P8\"", "discoveryVersion": "v1", "id": "drive:v2", "name": "drive", "version": "v2", - "revision": "20170623", + "revision": "20170825", "title": "Drive API", "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.", "ownerDomain": "google.com", @@ -20,7 +20,7 @@ "basePath": "/drive/v2/", "rootUrl": "https://www.googleapis.com/", "servicePath": "drive/v2/", - "batchPath": "batch", + "batchPath": "batch/drive/v2", "parameters": { "alt": { "type": "string", @@ -1332,6 +1332,13 @@ "$ref": "ParentReference" } }, + "permissionIds": { + "type": "array", + "description": "List of permission IDs for users with access to this file.", + "items": { + "type": "string" + } + }, "permissions": { "type": "array", "description": "The list of permissions for users with access to this file. Not populated for Team Drive files.", @@ -3255,7 +3262,7 @@ }, "orderBy": { "type": "string", - "description": "A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', and 'title'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.", + "description": "A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', 'title', and 'title_natural'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.", "location": "query" }, "pageToken": { diff --git a/vendor/google.golang.org/api/drive/v2/drive-gen.go b/vendor/google.golang.org/api/drive/v2/drive-gen.go index 87db7749d..867d93caf 100644 --- a/vendor/google.golang.org/api/drive/v2/drive-gen.go +++ b/vendor/google.golang.org/api/drive/v2/drive-gen.go @@ -1590,6 +1590,10 @@ type File struct { // default root folder. Parents []*ParentReference `json:"parents,omitempty"` + // PermissionIds: List of permission IDs for users with access to this + // file. + PermissionIds []string `json:"permissionIds,omitempty"` + // Permissions: The list of permissions for users with access to this // file. Not populated for Team Drive files. Permissions []*Permission `json:"permissions,omitempty"` @@ -7149,16 +7153,12 @@ func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) { // method id "drive.files.insert": type FilesInsertCall struct { - s *Service - file *File - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + file *File + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Insert: Insert a new file. @@ -7247,12 +7247,7 @@ func (c *FilesInsertCall) Visibility(visibility string) *FilesInsertCall { // supplied. // At most one of Media and ResumableMedia may be set. func (c *FilesInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *FilesInsertCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -7267,11 +7262,7 @@ func (c *FilesInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) * // supersede any context previously provided to the Context method. func (c *FilesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *FilesInsertCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -7280,7 +7271,7 @@ func (c *FilesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, siz // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *FilesInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *FilesInsertCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -7325,27 +7316,16 @@ func (c *FilesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "files") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -7378,20 +7358,10 @@ func (c *FilesInsertCall) Do(opts ...googleapi.CallOption) (*File, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -7574,12 +7544,12 @@ func (c *FilesListCall) MaxResults(maxResults int64) *FilesListCall { // OrderBy sets the optional parameter "orderBy": A comma-separated list // of sort keys. Valid keys are 'createdDate', 'folder', // 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', -// 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', and -// 'title'. Each key sorts ascending by default, but may be reversed -// with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate -// desc,title. Please note that there is a current limitation for users -// with approximately one million files in which the requested sort -// order is ignored. +// 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', 'title', +// and 'title_natural'. Each key sorts ascending by default, but may be +// reversed with the 'desc' modifier. Example usage: +// ?orderBy=folder,modifiedDate desc,title. Please note that there is a +// current limitation for users with approximately one million files in +// which the requested sort order is ignored. func (c *FilesListCall) OrderBy(orderBy string) *FilesListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -7759,7 +7729,7 @@ func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) { // "type": "integer" // }, // "orderBy": { - // "description": "A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', and 'title'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.", + // "description": "A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', 'title', and 'title_natural'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.", // "location": "query", // "type": "string" // }, @@ -8616,17 +8586,13 @@ func (c *FilesUntrashCall) Do(opts ...googleapi.CallOption) (*File, error) { // method id "drive.files.update": type FilesUpdateCall struct { - s *Service - fileId string - file *File - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + fileId string + file *File + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Update: Updates file metadata and/or content. @@ -8764,12 +8730,7 @@ func (c *FilesUpdateCall) UseContentAsIndexableText(useContentAsIndexableText bo // supplied. // At most one of Media and ResumableMedia may be set. func (c *FilesUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *FilesUpdateCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -8784,11 +8745,7 @@ func (c *FilesUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) * // supersede any context previously provided to the Context method. func (c *FilesUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *FilesUpdateCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -8797,7 +8754,7 @@ func (c *FilesUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, siz // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *FilesUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *FilesUpdateCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -8842,27 +8799,16 @@ func (c *FilesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders @@ -8898,20 +8844,10 @@ func (c *FilesUpdateCall) Do(opts ...googleapi.CallOption) (*File, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -12078,16 +12014,12 @@ func (c *RealtimeGetCall) Do(opts ...googleapi.CallOption) error { // method id "drive.realtime.update": type RealtimeUpdateCall struct { - s *Service - fileId string - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + fileId string + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Update: Overwrites the Realtime API data model associated with this @@ -12118,12 +12050,7 @@ func (c *RealtimeUpdateCall) BaseRevision(baseRevision string) *RealtimeUpdateCa // supplied. // At most one of Media and ResumableMedia may be set. func (c *RealtimeUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *RealtimeUpdateCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -12138,11 +12065,7 @@ func (c *RealtimeUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption // supersede any context previously provided to the Context method. func (c *RealtimeUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *RealtimeUpdateCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -12151,7 +12074,7 @@ func (c *RealtimeUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *RealtimeUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *RealtimeUpdateCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -12191,27 +12114,16 @@ func (c *RealtimeUpdateCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/realtime") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders @@ -12232,20 +12144,10 @@ func (c *RealtimeUpdateCall) Do(opts ...googleapi.CallOption) error { if err := googleapi.CheckResponse(res); err != nil { return err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() diff --git a/vendor/google.golang.org/api/drive/v3/drive-api.json b/vendor/google.golang.org/api/drive/v3/drive-api.json index 68f30fcac..af334955a 100644 --- a/vendor/google.golang.org/api/drive/v3/drive-api.json +++ b/vendor/google.golang.org/api/drive/v3/drive-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/UFnN-1uMaWxq-BESPylMBj6ravQ\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/4lSDxYnFTkLYmJZsTikGDh17fVo\"", "discoveryVersion": "v1", "id": "drive:v3", "name": "drive", "version": "v3", - "revision": "20170623", + "revision": "20170825", "title": "Drive API", "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.", "ownerDomain": "google.com", @@ -20,7 +20,7 @@ "basePath": "/drive/v3/", "rootUrl": "https://www.googleapis.com/", "servicePath": "drive/v3/", - "batchPath": "batch", + "batchPath": "batch/drive/v3", "parameters": { "alt": { "type": "string", @@ -759,6 +759,13 @@ "type": "string" } }, + "permissionIds": { + "type": "array", + "description": "List of permission IDs for users with access to this file.", + "items": { + "type": "string" + } + }, "permissions": { "type": "array", "description": "The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for Team Drive files.", @@ -2112,7 +2119,7 @@ }, "orderBy": { "type": "string", - "description": "A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.", + "description": "A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.", "location": "query" }, "pageSize": { diff --git a/vendor/google.golang.org/api/drive/v3/drive-gen.go b/vendor/google.golang.org/api/drive/v3/drive-gen.go index 23504e274..29c7a27d9 100644 --- a/vendor/google.golang.org/api/drive/v3/drive-gen.go +++ b/vendor/google.golang.org/api/drive/v3/drive-gen.go @@ -795,6 +795,10 @@ type File struct { // addParents and removeParents parameters to modify the values. Parents []string `json:"parents,omitempty"` + // PermissionIds: List of permission IDs for users with access to this + // file. + PermissionIds []string `json:"permissionIds,omitempty"` + // Permissions: The full list of permissions for the file. This is only // available if the requesting user can share the file. Not populated // for Team Drive files. @@ -3990,16 +3994,12 @@ func (c *FilesCopyCall) Do(opts ...googleapi.CallOption) (*File, error) { // method id "drive.files.create": type FilesCreateCall struct { - s *Service - file *File - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + file *File + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Create: Creates a new file. @@ -4060,12 +4060,7 @@ func (c *FilesCreateCall) UseContentAsIndexableText(useContentAsIndexableText bo // supplied. // At most one of Media and ResumableMedia may be set. func (c *FilesCreateCall) Media(r io.Reader, options ...googleapi.MediaOption) *FilesCreateCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -4080,11 +4075,7 @@ func (c *FilesCreateCall) Media(r io.Reader, options ...googleapi.MediaOption) * // supersede any context previously provided to the Context method. func (c *FilesCreateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *FilesCreateCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -4093,7 +4084,7 @@ func (c *FilesCreateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, siz // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *FilesCreateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *FilesCreateCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -4138,27 +4129,16 @@ func (c *FilesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "files") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -4191,20 +4171,10 @@ func (c *FilesCreateCall) Do(opts ...googleapi.CallOption) (*File, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -5022,13 +4992,13 @@ func (c *FilesListCall) IncludeTeamDriveItems(includeTeamDriveItems bool) *Files // OrderBy sets the optional parameter "orderBy": A comma-separated list // of sort keys. Valid keys are 'createdTime', 'folder', -// 'modifiedByMeTime', 'modifiedTime', 'name', 'quotaBytesUsed', -// 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each -// key sorts ascending by default, but may be reversed with the 'desc' -// modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. -// Please note that there is a current limitation for users with -// approximately one million files in which the requested sort order is -// ignored. +// 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', +// 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and +// 'viewedByMeTime'. Each key sorts ascending by default, but may be +// reversed with the 'desc' modifier. Example usage: +// ?orderBy=folder,modifiedTime desc,name. Please note that there is a +// current limitation for users with approximately one million files in +// which the requested sort order is ignored. func (c *FilesListCall) OrderBy(orderBy string) *FilesListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -5199,7 +5169,7 @@ func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) { // "type": "boolean" // }, // "orderBy": { - // "description": "A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.", + // "description": "A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.", // "location": "query", // "type": "string" // }, @@ -5281,17 +5251,13 @@ func (c *FilesListCall) Pages(ctx context.Context, f func(*FileList) error) erro // method id "drive.files.update": type FilesUpdateCall struct { - s *Service - fileId string - file *File - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + fileId string + file *File + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Update: Updates a file's metadata and/or content with patch @@ -5357,12 +5323,7 @@ func (c *FilesUpdateCall) UseContentAsIndexableText(useContentAsIndexableText bo // supplied. // At most one of Media and ResumableMedia may be set. func (c *FilesUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *FilesUpdateCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -5377,11 +5338,7 @@ func (c *FilesUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) * // supersede any context previously provided to the Context method. func (c *FilesUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *FilesUpdateCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -5390,7 +5347,7 @@ func (c *FilesUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, siz // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *FilesUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *FilesUpdateCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -5435,27 +5392,16 @@ func (c *FilesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders @@ -5491,20 +5437,10 @@ func (c *FilesUpdateCall) Do(opts ...googleapi.CallOption) (*File, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() diff --git a/vendor/google.golang.org/api/firebasedynamiclinks/v1/firebasedynamiclinks-api.json b/vendor/google.golang.org/api/firebasedynamiclinks/v1/firebasedynamiclinks-api.json index 6d45d879d..30bc7d82f 100644 --- a/vendor/google.golang.org/api/firebasedynamiclinks/v1/firebasedynamiclinks-api.json +++ b/vendor/google.golang.org/api/firebasedynamiclinks/v1/firebasedynamiclinks-api.json @@ -1,24 +1,286 @@ { + "batchPath": "batch", + "title": "Firebase Dynamic Links API", + "ownerName": "Google", + "resources": { + "shortLinks": { + "methods": { + "create": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "CreateShortDynamicLinkResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/firebase" + ], + "flatPath": "v1/shortLinks", + "id": "firebasedynamiclinks.shortLinks.create", + "path": "v1/shortLinks", + "request": { + "$ref": "CreateShortDynamicLinkRequest" + }, + "description": "Creates a short Dynamic Link given either a valid long Dynamic Link or\ndetails such as Dynamic Link domain, Android and iOS app information.\nThe created short Dynamic Link will not expire.\n\nRepeated calls with the same long Dynamic Link or Dynamic Link information\nwill produce the same short Dynamic Link.\n\nThe Dynamic Link domain in the request must be owned by requester's\nFirebase project." + } + } + }, + "v1": { + "methods": { + "getLinkStats": { + "httpMethod": "GET", + "parameterOrder": [ + "dynamicLink" + ], + "response": { + "$ref": "DynamicLinkStats" + }, + "scopes": [ + "https://www.googleapis.com/auth/firebase" + ], + "parameters": { + "durationDays": { + "location": "query", + "description": "The span of time requested in days.", + "format": "int64", + "type": "string" + }, + "dynamicLink": { + "location": "path", + "description": "Dynamic Link URL. e.g. https://abcd.app.goo.gl/wxyz", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/{dynamicLink}/linkStats", + "id": "firebasedynamiclinks.getLinkStats", + "path": "v1/{dynamicLink}/linkStats", + "description": "Fetches analytics stats of a short Dynamic Link for a given\nduration. Metrics include number of clicks, redirects, installs,\napp first opens, and app reopens." + }, + "installAttribution": { + "response": { + "$ref": "GetIosPostInstallAttributionResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/firebase" + ], + "parameters": {}, + "flatPath": "v1/installAttribution", + "path": "v1/installAttribution", + "id": "firebasedynamiclinks.installAttribution", + "description": "Get iOS strong/weak-match info for post-install attribution.", + "request": { + "$ref": "GetIosPostInstallAttributionRequest" + } + } + } + } + }, + "parameters": { + "key": { + "location": "query", + "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.", + "type": "string" + }, + "access_token": { + "type": "string", + "location": "query", + "description": "OAuth access token." + }, + "quotaUser": { + "type": "string", + "location": "query", + "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." + }, + "pp": { + "type": "boolean", + "default": "true", + "location": "query", + "description": "Pretty-print response." + }, + "oauth_token": { + "type": "string", + "location": "query", + "description": "OAuth 2.0 token for the current user." + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "uploadType": { + "type": "string", + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." + }, + "fields": { + "type": "string", + "location": "query", + "description": "Selector specifying which fields to include in a partial response." + }, + "$.xgafv": { + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format." + }, + "callback": { + "type": "string", + "location": "query", + "description": "JSONP" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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", + "description": "Data format for response.", + "default": "json" + } + }, + "version": "v1", + "baseUrl": "https://firebasedynamiclinks-ipv6.googleapis.com/", + "kind": "discovery#restDescription", + "description": "Programmatically creates and manages Firebase Dynamic Links.", + "servicePath": "", "basePath": "", "id": "firebasedynamiclinks:v1", "documentationLink": "https://firebase.google.com/docs/dynamic-links/", - "revision": "20170728", + "revision": "20170907", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "GetIosPostInstallAttributionResponse": { + "description": "Response for iSDK to execute strong match flow for post-install attribution.", + "type": "object", + "properties": { + "fallbackLink": { + "type": "string", + "description": "The link to navigate to update the app if min version is not met.\nThis is either (in order): 1) fallback link (from ?ifl= parameter, if\nspecified by developer) or 2) AppStore URL (from ?isi= parameter, if\nspecified), or 3) the payload link (from required link= parameter)." + }, + "requestedLink": { + "description": "Entire FDL (short or long) attributed post-install via one of several\ntechniques (fingerprint, copy unique).", + "type": "string" + }, + "utmMedium": { + "description": "Scion medium value to be propagated by iSDK to Scion at post-install.", + "type": "string" + }, + "utmSource": { + "description": "Scion source value to be propagated by iSDK to Scion at post-install.", + "type": "string" + }, + "isStrongMatchExecutable": { + "description": "Instruction for iSDK to attemmpt to perform strong match. For instance,\nif browser does not support/allow cookie or outside of support browsers,\nthis will be false.", + "type": "boolean" + }, + "appMinimumVersion": { + "type": "string", + "description": "The minimum version for app, specified by dev through ?imv= parameter.\nReturn to iSDK to allow app to evaluate if current version meets this." + }, + "invitationId": { + "description": "Invitation ID attributed post-install via one of several techniques\n(fingerprint, copy unique).", + "type": "string" + }, + "deepLink": { + "description": "The deep-link attributed post-install via one of several techniques\n(fingerprint, copy unique).", + "type": "string" + }, + "externalBrowserDestinationLink": { + "type": "string", + "description": "User-agent specific custom-scheme URIs for iSDK to open. This will be set\naccording to the user-agent tha the click was originally made in. There is\nno Safari-equivalent custom-scheme open URLs.\nie: googlechrome://www.example.com\nie: firefox://open-url?url=http://www.example.com\nie: opera-http://example.com" + }, + "attributionConfidence": { + "type": "string", + "enumDescriptions": [ + "Unset.", + "Weak confidence, more than one matching link found or link suspected to\nbe false positive", + "Default confidence, match based on fingerprint", + "Unique confidence, match based on \"unique match link to check\" or other\nmeans" + ], + "enum": [ + "UNKNOWN_ATTRIBUTION_CONFIDENCE", + "WEAK", + "DEFAULT", + "UNIQUE" + ], + "description": "The confidence of the returned attribution." + }, + "matchMessage": { + "type": "string", + "description": "Describes why match failed, ie: \"discarded due to low confidence\".\nThis message will be publicly visible." + }, + "resolvedLink": { + "description": "The entire FDL, expanded from a short link. It is the same as the\nrequested_link, if it is long. Parameters from this should not be\nused directly (ie: server can default utm_[campaign|medium|source]\nto a value when requested_link lack them, server determine the best\nfallback_link when requested_link specifies \u003e1 fallback links).", + "type": "string" + }, + "utmCampaign": { + "description": "Scion campaign value to be propagated by iSDK to Scion at post-install.", + "type": "string" + } + }, + "id": "GetIosPostInstallAttributionResponse" + }, + "SocialMetaTagInfo": { + "description": "Parameters for social meta tag params.\nUsed to set meta tag data for link previews on social sites.", + "type": "object", + "properties": { + "socialDescription": { + "description": "A short description of the link. Optional.", + "type": "string" + }, + "socialTitle": { + "type": "string", + "description": "Title to be displayed. Optional." + }, + "socialImageLink": { + "description": "An image url string. Optional.", + "type": "string" + } + }, + "id": "SocialMetaTagInfo" + }, "DynamicLinkStats": { - "description": "Analytics stats of a Dynamic Link for a given timeframe.", "type": "object", "properties": { "linkEventStats": { + "description": "Dynamic Link event stats.", + "type": "array", "items": { "$ref": "DynamicLinkEventStat" - }, - "type": "array", - "description": "Dynamic Link event stats." + } } }, - "id": "DynamicLinkStats" + "id": "DynamicLinkStats", + "description": "Analytics stats of a Dynamic Link for a given timeframe." }, "DynamicLinkWarning": { "description": "Dynamic Links warning messages.", @@ -91,37 +353,40 @@ ] }, "warningMessage": { - "description": "The warning message to help developers improve their requests.", - "type": "string" + "type": "string", + "description": "The warning message to help developers improve their requests." + }, + "warningDocumentLink": { + "type": "string", + "description": "The document describing the warning, and helps resolve." } }, "id": "DynamicLinkWarning" }, "AndroidInfo": { + "type": "object", "properties": { - "androidMinPackageVersionCode": { - "description": "Minimum version code for the Android app. If the installed app’s version\ncode is lower, then the user is taken to the Play Store.", - "type": "string" - }, "androidLink": { - "description": "If specified, this overrides the ‘link’ parameter on Android.", - "type": "string" + "type": "string", + "description": "If specified, this overrides the ‘link’ parameter on Android." }, "androidFallbackLink": { - "description": "Link to open on Android if the app is not installed.", - "type": "string" + "type": "string", + "description": "Link to open on Android if the app is not installed." }, "androidPackageName": { - "description": "Android package name of the app.", + "type": "string", + "description": "Android package name of the app." + }, + "androidMinPackageVersionCode": { + "description": "Minimum version code for the Android app. If the installed app’s version\ncode is lower, then the user is taken to the Play Store.", "type": "string" } }, "id": "AndroidInfo", - "description": "Android related attributes to the Dynamic Link.", - "type": "object" + "description": "Android related attributes to the Dynamic Link." }, "NavigationInfo": { - "description": "Information of navigation behavior.", "type": "object", "properties": { "enableForcedRedirect": { @@ -129,41 +394,41 @@ "type": "boolean" } }, - "id": "NavigationInfo" + "id": "NavigationInfo", + "description": "Information of navigation behavior." }, "IosInfo": { - "description": "iOS related attributes to the Dynamic Link..", "type": "object", "properties": { + "iosFallbackLink": { + "description": "Link to open on iOS if the app is not installed.", + "type": "string" + }, + "iosAppStoreId": { + "type": "string", + "description": "iOS App Store ID." + }, "iosIpadFallbackLink": { "description": "If specified, this overrides the ios_fallback_link value on iPads.", "type": "string" }, "iosIpadBundleId": { - "description": "iPad bundle ID of the app.", - "type": "string" + "type": "string", + "description": "iPad bundle ID of the app." }, "iosCustomScheme": { - "description": "Custom (destination) scheme to use for iOS. By default, we’ll use the\nbundle ID as the custom scheme. Developer can override this behavior using\nthis param.", - "type": "string" + "type": "string", + "description": "Custom (destination) scheme to use for iOS. By default, we’ll use the\nbundle ID as the custom scheme. Developer can override this behavior using\nthis param." }, "iosBundleId": { - "type": "string", - "description": "iOS bundle ID of the app." - }, - "iosFallbackLink": { - "type": "string", - "description": "Link to open on iOS if the app is not installed." - }, - "iosAppStoreId": { - "description": "iOS App Store ID.", + "description": "iOS bundle ID of the app.", "type": "string" } }, - "id": "IosInfo" + "id": "IosInfo", + "description": "iOS related attributes to the Dynamic Link.." }, "AnalyticsInfo": { - "description": "Tracking parameters supported by Dynamic Link.", "type": "object", "properties": { "itunesConnectAnalytics": { @@ -171,14 +436,14 @@ "description": "iTunes Connect App Analytics." }, "googlePlayAnalytics": { - "description": "Google Play Campaign Measurements.", - "$ref": "GooglePlayAnalytics" + "$ref": "GooglePlayAnalytics", + "description": "Google Play Campaign Measurements." } }, - "id": "AnalyticsInfo" + "id": "AnalyticsInfo", + "description": "Tracking parameters supported by Dynamic Link." }, "CreateShortDynamicLinkRequest": { - "description": "Request to create a short Dynamic Link.", "type": "object", "properties": { "dynamicLinkInfo": { @@ -194,18 +459,26 @@ "description": "Short Dynamic Link suffix. Optional." } }, - "id": "CreateShortDynamicLinkRequest" + "id": "CreateShortDynamicLinkRequest", + "description": "Request to create a short Dynamic Link." }, "DynamicLinkEventStat": { - "description": "Dynamic Link event stat.", "type": "object", "properties": { "count": { - "format": "int64", + "type": "string", "description": "The number of times this event occurred.", - "type": "string" + "format": "int64" }, "event": { + "enum": [ + "DYNAMIC_LINK_EVENT_UNSPECIFIED", + "CLICK", + "REDIRECT", + "APP_INSTALL", + "APP_FIRST_OPEN", + "APP_RE_OPEN" + ], "description": "Link event.", "type": "string", "enumDescriptions": [ @@ -215,72 +488,127 @@ "Indicates that an FDL triggers an app install from Play store, currently\nit's impossible to get stats from App store.", "Indicates that the app is opened for the first time after an install\ntriggered by FDLs", "Indicates that the app is opened via an FDL for non-first time." - ], - "enum": [ - "DYNAMIC_LINK_EVENT_UNSPECIFIED", - "CLICK", - "REDIRECT", - "APP_INSTALL", - "APP_FIRST_OPEN", - "APP_RE_OPEN" ] }, "platform": { - "enum": [ - "DYNAMIC_LINK_PLATFORM_UNSPECIFIED", - "ANDROID", - "IOS", - "DESKTOP" - ], - "description": "Requested platform.", "type": "string", "enumDescriptions": [ "Unspecified platform.", "Represents Android platform.\nAll apps and browsers on Android are classfied in this category.", "Represents iOS platform.\nAll apps and browsers on iOS are classfied in this category.", "Represents desktop.\nNote: other platforms like Windows, Blackberry, Amazon fall into this\ncategory." - ] + ], + "enum": [ + "DYNAMIC_LINK_PLATFORM_UNSPECIFIED", + "ANDROID", + "IOS", + "DESKTOP" + ], + "description": "Requested platform." } }, - "id": "DynamicLinkEventStat" + "id": "DynamicLinkEventStat", + "description": "Dynamic Link event stat." + }, + "GetIosPostInstallAttributionRequest": { + "type": "object", + "properties": { + "uniqueMatchLinkToCheck": { + "description": "Possible unique matched link that server need to check before performing\nfingerprint match. If passed link is short server need to expand the link.\nIf link is long server need to vslidate the link.", + "type": "string" + }, + "appInstallationTime": { + "description": "App installation epoch time (https://en.wikipedia.org/wiki/Unix_time).\nThis is a client signal for a more accurate weak match.", + "format": "int64", + "type": "string" + }, + "iosVersion": { + "type": "string", + "description": "iOS version, ie: 9.3.5.\nConsider adding \"build\"." + }, + "retrievalMethod": { + "type": "string", + "enumDescriptions": [ + "Unknown method.", + "iSDK performs a server lookup by device fingerprint in the background\nwhen app is first-opened; no API called by developer.", + "iSDK performs a server lookup by device fingerprint upon a dev API call.", + "iSDK performs a strong match only if weak match is found upon a dev\nAPI call." + ], + "enum": [ + "UNKNOWN_PAYLOAD_RETRIEVAL_METHOD", + "IMPLICIT_WEAK_MATCH", + "EXPLICIT_WEAK_MATCH", + "EXPLICIT_STRONG_AFTER_WEAK_MATCH" + ], + "description": "App post install attribution retrieval information. Disambiguates\nmechanism (iSDK or developer invoked) to retrieve payload from\nclicked link." + }, + "visualStyle": { + "type": "string", + "enumDescriptions": [ + "Unknown style.", + "Default style.", + "Custom style." + ], + "enum": [ + "UNKNOWN_VISUAL_STYLE", + "DEFAULT_STYLE", + "CUSTOM_STYLE" + ], + "description": "Strong match page information. Disambiguates between default UI and\ncustom page to present when strong match succeeds/fails to find cookie." + }, + "sdkVersion": { + "description": "Google SDK version.", + "type": "string" + }, + "bundleId": { + "type": "string", + "description": "APP bundle ID." + }, + "device": { + "$ref": "DeviceInfo", + "description": "Device information." + } + }, + "id": "GetIosPostInstallAttributionRequest", + "description": "Request for iSDK to execute strong match flow for post-install attribution.\nThis is meant for iOS requests only. Requests from other platforms will\nnot be honored." }, "CreateShortDynamicLinkResponse": { + "description": "Response to create a short Dynamic Link.", + "type": "object", "properties": { + "previewLink": { + "type": "string", + "description": "Preivew link to show the link flow chart." + }, "warning": { + "type": "array", "items": { "$ref": "DynamicLinkWarning" }, - "type": "array", "description": "Information about potential warnings on link creation." }, "shortLink": { "description": "Short Dynamic Link value. e.g. https://abcd.app.goo.gl/wxyz", "type": "string" - }, - "previewLink": { - "description": "Preivew link to show the link flow chart.", - "type": "string" } }, - "id": "CreateShortDynamicLinkResponse", - "description": "Response to create a short Dynamic Link.", - "type": "object" + "id": "CreateShortDynamicLinkResponse" }, "Suffix": { "type": "object", "properties": { "option": { + "enum": [ + "OPTION_UNSPECIFIED", + "UNGUESSABLE", + "SHORT" + ], "description": "Suffix option.", "type": "string", "enumDescriptions": [ "The suffix option is not specified, performs as NOT_GUESSABLE .", "Short Dynamic Link suffix is a base62 [0-9A-Za-z] encoded string of\na random generated 96 bit random number, which has a length of 17 chars.\nFor example, \"nlAR8U4SlKRZw1cb2\".\nIt prevents other people from guessing and crawling short Dynamic Links\nthat contain personal identifiable information.", "Short Dynamic Link suffix is a base62 [0-9A-Za-z] string starting with a\nlength of 4 chars. the length will increase when all the space is\noccupied." - ], - "enum": [ - "OPTION_UNSPECIFIED", - "UNGUESSABLE", - "SHORT" ] } }, @@ -288,41 +616,43 @@ "description": "Short Dynamic Link suffix." }, "GooglePlayAnalytics": { + "type": "object", "properties": { "utmContent": { - "description": "Campaign content; used for A/B testing and content-targeted ads to\ndifferentiate ads or links that point to the same URL.", - "type": "string" + "type": "string", + "description": "Campaign content; used for A/B testing and content-targeted ads to\ndifferentiate ads or links that point to the same URL." }, "utmMedium": { - "description": "Campaign medium; used to identify a medium such as email or cost-per-click.", - "type": "string" + "type": "string", + "description": "Campaign medium; used to identify a medium such as email or cost-per-click." }, "utmTerm": { "description": "Campaign term; used with paid search to supply the keywords for ads.", "type": "string" }, "utmSource": { - "type": "string", - "description": "Campaign source; used to identify a search engine, newsletter, or other\nsource." + "description": "Campaign source; used to identify a search engine, newsletter, or other\nsource.", + "type": "string" }, "gclid": { - "description": "[AdWords autotagging parameter](https://support.google.com/analytics/answer/1033981?hl=en);\nused to measure Google AdWords ads. This value is generated dynamically\nand should never be modified.", - "type": "string" + "type": "string", + "description": "[AdWords autotagging parameter](https://support.google.com/analytics/answer/1033981?hl=en);\nused to measure Google AdWords ads. This value is generated dynamically\nand should never be modified." }, "utmCampaign": { - "description": "Campaign name; used for keyword analysis to identify a specific product\npromotion or strategic campaign.", - "type": "string" + "type": "string", + "description": "Campaign name; used for keyword analysis to identify a specific product\npromotion or strategic campaign." } }, "id": "GooglePlayAnalytics", - "description": "Parameters for Google Play Campaign Measurements.\n[Learn more](https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#campaign-params)", - "type": "object" + "description": "Parameters for Google Play Campaign Measurements.\n[Learn more](https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#campaign-params)" }, "DynamicLinkInfo": { - "id": "DynamicLinkInfo", - "description": "Information about a Dynamic Link.", "type": "object", "properties": { + "dynamicLinkDomain": { + "type": "string", + "description": "Dynamic Links domain that the project owns, e.g. abcd.app.goo.gl\n[Learn more](https://firebase.google.com/docs/dynamic-links/android/receive)\non how to set up Dynamic Link domain associated with your Firebase project.\n\nRequired." + }, "link": { "type": "string", "description": "The link your app will open, You can specify any URL your app can handle.\nThis link must be a well-formatted URL, be properly URL-encoded, and use\nthe HTTP or HTTPS scheme. See 'link' parameters in the\n[documentation](https://firebase.google.com/docs/dynamic-links/create-manually).\n\nRequired." @@ -346,12 +676,10 @@ "analyticsInfo": { "$ref": "AnalyticsInfo", "description": "Parameters used for tracking. See all tracking parameters in the\n[documentation](https://firebase.google.com/docs/dynamic-links/create-manually)." - }, - "dynamicLinkDomain": { - "description": "Dynamic Links domain that the project owns, e.g. abcd.app.goo.gl\n[Learn more](https://firebase.google.com/docs/dynamic-links/android/receive)\non how to set up Dynamic Link domain associated with your Firebase project.\n\nRequired.", - "type": "string" } - } + }, + "id": "DynamicLinkInfo", + "description": "Information about a Dynamic Link." }, "ITunesConnectAnalytics": { "description": "Parameters for iTunes Connect App Analytics.", @@ -361,39 +689,49 @@ "description": "Affiliate token used to create affiliate-coded links.", "type": "string" }, - "mt": { - "description": "iTune media types, including music, podcasts, audiobooks and so on.", - "type": "string" - }, "ct": { "type": "string", "description": "Campaign text that developers can optionally add to any link in order to\ntrack sales from a specific marketing campaign." }, + "mt": { + "type": "string", + "description": "iTune media types, including music, podcasts, audiobooks and so on." + }, "pt": { - "description": "Provider token that enables analytics for Dynamic Links from within iTunes\nConnect.", - "type": "string" + "type": "string", + "description": "Provider token that enables analytics for Dynamic Links from within iTunes\nConnect." } }, "id": "ITunesConnectAnalytics" }, - "SocialMetaTagInfo": { + "DeviceInfo": { + "description": "Signals associated with the device making the request.", + "type": "object", "properties": { - "socialDescription": { + "screenResolutionWidth": { + "description": "Device display resolution width.", + "format": "int64", + "type": "string" + }, + "deviceModelName": { "type": "string", - "description": "A short description of the link. Optional." + "description": "Device model name." }, - "socialImageLink": { - "description": "An image url string. Optional.", + "screenResolutionHeight": { + "description": "Device display resolution height.", + "format": "int64", "type": "string" }, - "socialTitle": { - "description": "Title to be displayed. Optional.", - "type": "string" + "languageCode": { + "type": "string", + "description": "Device language code setting." + }, + "timezone": { + "type": "string", + "description": "Device timezone setting." } }, - "id": "SocialMetaTagInfo", - "description": "Parameters for social meta tag params.\nUsed to set meta tag data for link previews on social sites.", - "type": "object" + "id": "DeviceInfo" } }, "icons": { @@ -411,161 +749,7 @@ } } }, - "rootUrl": "https://firebasedynamiclinks.googleapis.com/", + "rootUrl": "https://firebasedynamiclinks-ipv6.googleapis.com/", "ownerDomain": "google.com", - "name": "firebasedynamiclinks", - "batchPath": "batch", - "title": "Firebase Dynamic Links API", - "ownerName": "Google", - "resources": { - "shortLinks": { - "methods": { - "create": { - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "CreateShortDynamicLinkResponse" - }, - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/firebase" - ], - "flatPath": "v1/shortLinks", - "path": "v1/shortLinks", - "id": "firebasedynamiclinks.shortLinks.create", - "description": "Creates a short Dynamic Link given either a valid long Dynamic Link or\ndetails such as Dynamic Link domain, Android and iOS app information.\nThe created short Dynamic Link will not expire.\n\nRepeated calls with the same long Dynamic Link or Dynamic Link information\nwill produce the same short Dynamic Link.\n\nThe Dynamic Link domain in the request must be owned by requester's\nFirebase project.", - "request": { - "$ref": "CreateShortDynamicLinkRequest" - } - } - } - }, - "v1": { - "methods": { - "getLinkStats": { - "description": "Fetches analytics stats of a short Dynamic Link for a given\nduration. Metrics include number of clicks, redirects, installs,\napp first opens, and app reopens.", - "response": { - "$ref": "DynamicLinkStats" - }, - "parameterOrder": [ - "dynamicLink" - ], - "httpMethod": "GET", - "parameters": { - "durationDays": { - "format": "int64", - "description": "The span of time requested in days.", - "type": "string", - "location": "query" - }, - "dynamicLink": { - "description": "Dynamic Link URL. e.g. https://abcd.app.goo.gl/wxyz", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/firebase" - ], - "flatPath": "v1/{dynamicLink}/linkStats", - "id": "firebasedynamiclinks.getLinkStats", - "path": "v1/{dynamicLink}/linkStats" - } - } - } - }, - "parameters": { - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "type": "string", - "location": "query", - "description": "OAuth 2.0 token for the current user." - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "type": "boolean", - "location": "query", - "description": "Returns response with indentations and line breaks." - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "$.xgafv": { - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ] - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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", - "description": "Data format for response.", - "default": "json" - }, - "access_token": { - "type": "string", - "location": "query", - "description": "OAuth access token." - }, - "key": { - "location": "query", - "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.", - "type": "string" - } - }, - "version": "v1", - "baseUrl": "https://firebasedynamiclinks.googleapis.com/", - "servicePath": "", - "description": "Programmatically creates and manages Firebase Dynamic Links.", - "kind": "discovery#restDescription" + "name": "firebasedynamiclinks" } diff --git a/vendor/google.golang.org/api/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go b/vendor/google.golang.org/api/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go index ed1f1dd55..2e197e7ae 100644 --- a/vendor/google.golang.org/api/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go +++ b/vendor/google.golang.org/api/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go @@ -43,7 +43,7 @@ var _ = ctxhttp.Do const apiId = "firebasedynamiclinks:v1" const apiName = "firebasedynamiclinks" const apiVersion = "v1" -const basePath = "https://firebasedynamiclinks.googleapis.com/" +const basePath = "https://firebasedynamiclinks-ipv6.googleapis.com/" // OAuth2 scopes used by this API. const ( @@ -258,6 +258,47 @@ func (s *CreateShortDynamicLinkResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DeviceInfo: Signals associated with the device making the request. +type DeviceInfo struct { + // DeviceModelName: Device model name. + DeviceModelName string `json:"deviceModelName,omitempty"` + + // LanguageCode: Device language code setting. + LanguageCode string `json:"languageCode,omitempty"` + + // ScreenResolutionHeight: Device display resolution height. + ScreenResolutionHeight int64 `json:"screenResolutionHeight,omitempty,string"` + + // ScreenResolutionWidth: Device display resolution width. + ScreenResolutionWidth int64 `json:"screenResolutionWidth,omitempty,string"` + + // Timezone: Device timezone setting. + Timezone string `json:"timezone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceModelName") 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. "DeviceModelName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DeviceInfo) MarshalJSON() ([]byte, error) { + type noMethod DeviceInfo + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DynamicLinkEventStat: Dynamic Link event stat. type DynamicLinkEventStat struct { // Count: The number of times this event occurred. @@ -482,6 +523,10 @@ type DynamicLinkWarning struct { // not match with the given iOS store ID. WarningCode string `json:"warningCode,omitempty"` + // WarningDocumentLink: The document describing the warning, and helps + // resolve. + WarningDocumentLink string `json:"warningDocumentLink,omitempty"` + // WarningMessage: The warning message to help developers improve their // requests. WarningMessage string `json:"warningMessage,omitempty"` @@ -509,6 +554,208 @@ func (s *DynamicLinkWarning) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GetIosPostInstallAttributionRequest: Request for iSDK to execute +// strong match flow for post-install attribution. +// This is meant for iOS requests only. Requests from other platforms +// will +// not be honored. +type GetIosPostInstallAttributionRequest struct { + // AppInstallationTime: App installation epoch time + // (https://en.wikipedia.org/wiki/Unix_time). + // This is a client signal for a more accurate weak match. + AppInstallationTime int64 `json:"appInstallationTime,omitempty,string"` + + // BundleId: APP bundle ID. + BundleId string `json:"bundleId,omitempty"` + + // Device: Device information. + Device *DeviceInfo `json:"device,omitempty"` + + // IosVersion: iOS version, ie: 9.3.5. + // Consider adding "build". + IosVersion string `json:"iosVersion,omitempty"` + + // RetrievalMethod: App post install attribution retrieval information. + // Disambiguates + // mechanism (iSDK or developer invoked) to retrieve payload + // from + // clicked link. + // + // Possible values: + // "UNKNOWN_PAYLOAD_RETRIEVAL_METHOD" - Unknown method. + // "IMPLICIT_WEAK_MATCH" - iSDK performs a server lookup by device + // fingerprint in the background + // when app is first-opened; no API called by developer. + // "EXPLICIT_WEAK_MATCH" - iSDK performs a server lookup by device + // fingerprint upon a dev API call. + // "EXPLICIT_STRONG_AFTER_WEAK_MATCH" - iSDK performs a strong match + // only if weak match is found upon a dev + // API call. + RetrievalMethod string `json:"retrievalMethod,omitempty"` + + // SdkVersion: Google SDK version. + SdkVersion string `json:"sdkVersion,omitempty"` + + // UniqueMatchLinkToCheck: Possible unique matched link that server need + // to check before performing + // fingerprint match. If passed link is short server need to expand the + // link. + // If link is long server need to vslidate the link. + UniqueMatchLinkToCheck string `json:"uniqueMatchLinkToCheck,omitempty"` + + // VisualStyle: Strong match page information. Disambiguates between + // default UI and + // custom page to present when strong match succeeds/fails to find + // cookie. + // + // Possible values: + // "UNKNOWN_VISUAL_STYLE" - Unknown style. + // "DEFAULT_STYLE" - Default style. + // "CUSTOM_STYLE" - Custom style. + VisualStyle string `json:"visualStyle,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AppInstallationTime") + // 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. "AppInstallationTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GetIosPostInstallAttributionRequest) MarshalJSON() ([]byte, error) { + type noMethod GetIosPostInstallAttributionRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GetIosPostInstallAttributionResponse: Response for iSDK to execute +// strong match flow for post-install attribution. +type GetIosPostInstallAttributionResponse struct { + // AppMinimumVersion: The minimum version for app, specified by dev + // through ?imv= parameter. + // Return to iSDK to allow app to evaluate if current version meets + // this. + AppMinimumVersion string `json:"appMinimumVersion,omitempty"` + + // AttributionConfidence: The confidence of the returned attribution. + // + // Possible values: + // "UNKNOWN_ATTRIBUTION_CONFIDENCE" - Unset. + // "WEAK" - Weak confidence, more than one matching link found or link + // suspected to + // be false positive + // "DEFAULT" - Default confidence, match based on fingerprint + // "UNIQUE" - Unique confidence, match based on "unique match link to + // check" or other + // means + AttributionConfidence string `json:"attributionConfidence,omitempty"` + + // DeepLink: The deep-link attributed post-install via one of several + // techniques + // (fingerprint, copy unique). + DeepLink string `json:"deepLink,omitempty"` + + // ExternalBrowserDestinationLink: User-agent specific custom-scheme + // URIs for iSDK to open. This will be set + // according to the user-agent tha the click was originally made in. + // There is + // no Safari-equivalent custom-scheme open URLs. + // ie: googlechrome://www.example.com + // ie: firefox://open-url?url=http://www.example.com + // ie: opera-http://example.com + ExternalBrowserDestinationLink string `json:"externalBrowserDestinationLink,omitempty"` + + // FallbackLink: The link to navigate to update the app if min version + // is not met. + // This is either (in order): 1) fallback link (from ?ifl= parameter, + // if + // specified by developer) or 2) AppStore URL (from ?isi= parameter, + // if + // specified), or 3) the payload link (from required link= parameter). + FallbackLink string `json:"fallbackLink,omitempty"` + + // InvitationId: Invitation ID attributed post-install via one of + // several techniques + // (fingerprint, copy unique). + InvitationId string `json:"invitationId,omitempty"` + + // IsStrongMatchExecutable: Instruction for iSDK to attemmpt to perform + // strong match. For instance, + // if browser does not support/allow cookie or outside of support + // browsers, + // this will be false. + IsStrongMatchExecutable bool `json:"isStrongMatchExecutable,omitempty"` + + // MatchMessage: Describes why match failed, ie: "discarded due to low + // confidence". + // This message will be publicly visible. + MatchMessage string `json:"matchMessage,omitempty"` + + // RequestedLink: Entire FDL (short or long) attributed post-install via + // one of several + // techniques (fingerprint, copy unique). + RequestedLink string `json:"requestedLink,omitempty"` + + // ResolvedLink: The entire FDL, expanded from a short link. It is the + // same as the + // requested_link, if it is long. Parameters from this should not + // be + // used directly (ie: server can default utm_[campaign|medium|source] + // to a value when requested_link lack them, server determine the + // best + // fallback_link when requested_link specifies >1 fallback links). + ResolvedLink string `json:"resolvedLink,omitempty"` + + // UtmCampaign: Scion campaign value to be propagated by iSDK to Scion + // at post-install. + UtmCampaign string `json:"utmCampaign,omitempty"` + + // UtmMedium: Scion medium value to be propagated by iSDK to Scion at + // post-install. + UtmMedium string `json:"utmMedium,omitempty"` + + // UtmSource: Scion source value to be propagated by iSDK to Scion at + // post-install. + UtmSource string `json:"utmSource,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AppMinimumVersion") + // 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. "AppMinimumVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GetIosPostInstallAttributionResponse) MarshalJSON() ([]byte, error) { + type noMethod GetIosPostInstallAttributionResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePlayAnalytics: Parameters for Google Play Campaign // Measurements. // [Learn @@ -1057,3 +1304,125 @@ func (c *V1GetLinkStatsCall) Do(opts ...googleapi.CallOption) (*DynamicLinkStats // } } + +// method id "firebasedynamiclinks.installAttribution": + +type V1InstallAttributionCall struct { + s *Service + getiospostinstallattributionrequest *GetIosPostInstallAttributionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// InstallAttribution: Get iOS strong/weak-match info for post-install +// attribution. +func (r *V1Service) InstallAttribution(getiospostinstallattributionrequest *GetIosPostInstallAttributionRequest) *V1InstallAttributionCall { + c := &V1InstallAttributionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.getiospostinstallattributionrequest = getiospostinstallattributionrequest + 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 *V1InstallAttributionCall) Fields(s ...googleapi.Field) *V1InstallAttributionCall { + 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 *V1InstallAttributionCall) Context(ctx context.Context) *V1InstallAttributionCall { + 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 *V1InstallAttributionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *V1InstallAttributionCall) 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.getiospostinstallattributionrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/installAttribution") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "firebasedynamiclinks.installAttribution" call. +// Exactly one of *GetIosPostInstallAttributionResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GetIosPostInstallAttributionResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *V1InstallAttributionCall) Do(opts ...googleapi.CallOption) (*GetIosPostInstallAttributionResponse, 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 := &GetIosPostInstallAttributionResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get iOS strong/weak-match info for post-install attribution.", + // "flatPath": "v1/installAttribution", + // "httpMethod": "POST", + // "id": "firebasedynamiclinks.installAttribution", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1/installAttribution", + // "request": { + // "$ref": "GetIosPostInstallAttributionRequest" + // }, + // "response": { + // "$ref": "GetIosPostInstallAttributionResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/firebase" + // ] + // } + +} diff --git a/vendor/google.golang.org/api/firebaseremoteconfig/v1/firebaseremoteconfig-api.json b/vendor/google.golang.org/api/firebaseremoteconfig/v1/firebaseremoteconfig-api.json new file mode 100644 index 000000000..7136e3a8b --- /dev/null +++ b/vendor/google.golang.org/api/firebaseremoteconfig/v1/firebaseremoteconfig-api.json @@ -0,0 +1,275 @@ +{ + "ownerDomain": "google.com", + "name": "firebaseremoteconfig", + "batchPath": "batch", + "fullyEncodeReservedExpansion": true, + "title": "Firebase Remote Config API", + "ownerName": "Google", + "resources": { + "projects": { + "methods": { + "updateRemoteConfig": { + "httpMethod": "PUT", + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "RemoteConfig" + }, + "parameters": { + "project": { + "description": "The GMP project identifier. Required.\nSee note at the beginning of this file regarding project ids.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "validateOnly": { + "location": "query", + "description": "Optional. Defaults to \u003ccode\u003efalse\u003c/code\u003e (UpdateRemoteConfig call should\nupdate the backend if there are no validation/interal errors). May be set\nto \u003ccode\u003etrue\u003c/code\u003e to indicate that, should no validation errors occur,\nthe call should return a \"200 OK\" instead of performing the update. Note\nthat other error messages (500 Internal Error, 412 Version Mismatch, etc)\nmay still result after flipping to \u003ccode\u003efalse\u003c/code\u003e, even if getting a\n\"200 OK\" when calling with \u003ccode\u003etrue\u003c/code\u003e.", + "type": "boolean" + } + }, + "flatPath": "v1/projects/{projectsId}/remoteConfig", + "path": "v1/{+project}/remoteConfig", + "id": "firebaseremoteconfig.projects.updateRemoteConfig", + "request": { + "$ref": "RemoteConfig" + }, + "description": "Update a RemoteConfig. We treat this as an always-existing\nresource (when it is not found in our data store, we treat it as version\n0, a template with zero conditions and zero parameters). Hence there are\nno Create or Delete operations. Returns the updated template when\nsuccessful (and the updated eTag as a response header), or an error if\nthings go wrong.\nPossible error messages:\n* VALIDATION_ERROR (HTTP status 400) with additional details if the\ntemplate being passed in can not be validated.\n* AUTHENTICATION_ERROR (HTTP status 401) if the request can not be\nauthenticate (e.g. no access token, or invalid access token).\n* AUTHORIZATION_ERROR (HTTP status 403) if the request can not be\nauthorized (e.g. the user has no access to the specified project id).\n* VERSION_MISMATCH (HTTP status 412) when trying to update when the\nexpected eTag (passed in via the \"If-match\" header) is not specified, or\nis specified but does does not match the current eTag.\n* Internal error (HTTP status 500) for Database problems or other internal\nerrors." + }, + "getRemoteConfig": { + "description": "Get the latest version Remote Configuration for a project.\nReturns the RemoteConfig as the payload, and also the eTag as a\nresponse header.", + "response": { + "$ref": "RemoteConfig" + }, + "parameterOrder": [ + "project" + ], + "httpMethod": "GET", + "parameters": { + "project": { + "description": "The GMP project identifier. Required.\nSee note at the beginning of this file regarding project ids.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/remoteConfig", + "id": "firebaseremoteconfig.projects.getRemoteConfig", + "path": "v1/{+project}/remoteConfig" + } + } + } + }, + "parameters": { + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "type": "boolean", + "location": "query", + "description": "Returns response with indentations and line breaks." + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format." + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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", + "description": "Data format for response.", + "default": "json" + }, + "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.", + "type": "string", + "location": "query" + }, + "access_token": { + "type": "string", + "location": "query", + "description": "OAuth access token." + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "default": "true", + "type": "boolean", + "location": "query", + "description": "Pretty-print response." + } + }, + "version": "v1", + "baseUrl": "https://firebaseremoteconfig.googleapis.com/", + "servicePath": "", + "kind": "discovery#restDescription", + "description": "Firebase Remote Config API allows the 3P clients to manage Remote Config conditions and parameters for Firebase applications.", + "basePath": "", + "revision": "20170901", + "documentationLink": "https://firebase.google.com/docs/remote-config/", + "id": "firebaseremoteconfig:v1", + "discoveryVersion": "v1", + "version_module": true, + "schemas": { + "RemoteConfigCondition": { + "id": "RemoteConfigCondition", + "description": "A single RemoteConfig Condition. A list of these (because order matters) are\npart of a single RemoteConfig template.", + "type": "object", + "properties": { + "name": { + "description": "Required.\nA non empty and unique name of this condition.", + "type": "string" + }, + "expression": { + "description": "Required.", + "type": "string" + }, + "tagColor": { + "enum": [ + "CONDITION_DISPLAY_COLOR_UNSPECIFIED", + "BLUE", + "BROWN", + "CYAN", + "DEEP_ORANGE", + "GREEN", + "INDIGO", + "LIME", + "ORANGE", + "PINK", + "PURPLE", + "TEAL" + ], + "description": "Optional.\nThe display (tag) color of this condition. This serves as part of a tag\n(in the future, we may add tag text as well as tag color, but that is not\nyet implemented in the UI).\nThis value has no affect on the semantics of the delivered config and it\nis ignored by the backend, except for passing it through write/read\nrequests.\nNot having this value or having the \"CONDITION_DISPLAY_COLOR_UNSPECIFIED\"\nvalue (0) have the same meaning: Let the UI choose any valid color when\ndisplaying the condition.", + "type": "string", + "enumDescriptions": [ + "", + "Blue", + "Brown", + "Cyan", + "aka \"Red Orange\"", + "Green", + "Indigo\n*", + "Lime - Approved deviation from Material color palette", + "Orange", + "Pink", + "Purple", + "Teal" + ] + } + } + }, + "RemoteConfigParameterValue": { + "description": "A RemoteConfigParameter's \"value\" (either the default value, or the value\nassociated with a condition name) is either a string, or the\n\"use_in_app_default\" indicator (which means to leave out the parameter from\nthe returned \u003ckey, value\u003e map that is the output of the parameter fetch).\nWe represent the \"use_in_app_default\" as a bool, but (when using the boolean\ninstead of the string) it should always be \u003ccode\u003etrue\u003c/code\u003e.", + "type": "object", + "properties": { + "useInAppDefault": { + "description": "if true, omit the parameter from the map of fetched parameter values", + "type": "boolean" + }, + "value": { + "description": "the string to set the parameter to", + "type": "string" + } + }, + "id": "RemoteConfigParameterValue" + }, + "RemoteConfig": { + "type": "object", + "properties": { + "parameters": { + "additionalProperties": { + "$ref": "RemoteConfigParameter" + }, + "description": "Map of parameter keys to their optional default values and optional submap\nof (condition name : value). Order doesn't affect semantics, and so is\nsorted by the server. The 'key' values of the params must be unique.", + "type": "object" + }, + "conditions": { + "description": "The list of named conditions. The order *does* affect the semantics.\nThe condition_name values of these entries must be unique.\n\nThe resolved value of a config parameter P is determined as follow:\n* Let Y be the set of values from the submap of P that refer to conditions\n that evaluate to \u003ccode\u003etrue\u003c/code\u003e.\n* If Y is non empty, the value is taken from the specific submap in Y whose\n condition_name is the earliest in this condition list.\n* Else, if P has a default value option (condition_name is empty) then\n the value is taken from that option.\n* Else, parameter P has no value and is omitted from the config result.\n\nExample: parameter key \"p1\", default value \"v1\", submap specified as\n{\"c1\": v2, \"c2\": v3} where \"c1\" and \"c2\" are names of conditions in the\ncondition list (where \"c1\" in this example appears before \"c2\"). The\nvalue of p1 would be v2 as long as c1 is true. Otherwise, if c2 is true,\np1 would evaluate to v3, and if c1 and c2 are both false, p1 would evaluate\nto v1. If no default value was specified, and c1 and c2 were both false,\nno value for p1 would be generated.", + "items": { + "$ref": "RemoteConfigCondition" + }, + "type": "array" + } + }, + "id": "RemoteConfig", + "description": "*\nThe RemoteConfig consists of a list of conditions (which can be\nthought of as named \"if\" statements) and a map of parameters (parameter key\nto a stucture containing an optional default value, as well as a optional\nsubmap of (condition name to value when that condition is true)." + }, + "RemoteConfigParameter": { + "id": "RemoteConfigParameter", + "description": "While default_value and conditional_values are each optional, at least one of\nthe two is required - otherwise, the parameter is meaningless (and an\nexception will be thrown by the validation logic).", + "type": "object", + "properties": { + "conditionalValues": { + "type": "object", + "additionalProperties": { + "$ref": "RemoteConfigParameterValue" + }, + "description": "Optional - a map of (condition_name, value). The condition_name of the\nhighest priority (the one listed first in the conditions array) determines\nthe value of this parameter." + }, + "defaultValue": { + "$ref": "RemoteConfigParameterValue", + "description": "Optional - value to set the parameter to, when none of the named conditions\nevaluate to \u003ccode\u003etrue\u003c/code\u003e." + } + } + } + }, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "protocol": "rest", + "canonicalName": "Firebase Remote Config", + "rootUrl": "https://firebaseremoteconfig.googleapis.com/" +} diff --git a/vendor/google.golang.org/api/firebaseremoteconfig/v1/firebaseremoteconfig-gen.go b/vendor/google.golang.org/api/firebaseremoteconfig/v1/firebaseremoteconfig-gen.go new file mode 100644 index 000000000..1bacecb95 --- /dev/null +++ b/vendor/google.golang.org/api/firebaseremoteconfig/v1/firebaseremoteconfig-gen.go @@ -0,0 +1,630 @@ +// Package firebaseremoteconfig provides access to the Firebase Remote Config API. +// +// See https://firebase.google.com/docs/remote-config/ +// +// Usage example: +// +// import "google.golang.org/api/firebaseremoteconfig/v1" +// ... +// firebaseremoteconfigService, err := firebaseremoteconfig.New(oauthHttpClient) +package firebaseremoteconfig // import "google.golang.org/api/firebaseremoteconfig/v1" + +import ( + "bytes" + "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" +) + +// 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 = "firebaseremoteconfig:v1" +const apiName = "firebaseremoteconfig" +const apiVersion = "v1" +const basePath = "https://firebaseremoteconfig.googleapis.com/" + +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + return rs +} + +type ProjectsService struct { + s *Service +} + +// RemoteConfig: * +// The RemoteConfig consists of a list of conditions (which can +// be +// thought of as named "if" statements) and a map of parameters +// (parameter key +// to a stucture containing an optional default value, as well as a +// optional +// submap of (condition name to value when that condition is true). +type RemoteConfig struct { + // Conditions: The list of named conditions. The order *does* affect the + // semantics. + // The condition_name values of these entries must be unique. + // + // The resolved value of a config parameter P is determined as follow: + // * Let Y be the set of values from the submap of P that refer to + // conditions + // that evaluate to true. + // * If Y is non empty, the value is taken from the specific submap in Y + // whose + // condition_name is the earliest in this condition list. + // * Else, if P has a default value option (condition_name is empty) + // then + // the value is taken from that option. + // * Else, parameter P has no value and is omitted from the config + // result. + // + // Example: parameter key "p1", default value "v1", submap specified + // as + // {"c1": v2, "c2": v3} where "c1" and "c2" are names of conditions in + // the + // condition list (where "c1" in this example appears before "c2"). + // The + // value of p1 would be v2 as long as c1 is true. Otherwise, if c2 is + // true, + // p1 would evaluate to v3, and if c1 and c2 are both false, p1 would + // evaluate + // to v1. If no default value was specified, and c1 and c2 were both + // false, + // no value for p1 would be generated. + Conditions []*RemoteConfigCondition `json:"conditions,omitempty"` + + // Parameters: Map of parameter keys to their optional default values + // and optional submap + // of (condition name : value). Order doesn't affect semantics, and so + // is + // sorted by the server. The 'key' values of the params must be unique. + Parameters map[string]RemoteConfigParameter `json:"parameters,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Conditions") 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. "Conditions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RemoteConfig) MarshalJSON() ([]byte, error) { + type noMethod RemoteConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RemoteConfigCondition: A single RemoteConfig Condition. A list of +// these (because order matters) are +// part of a single RemoteConfig template. +type RemoteConfigCondition struct { + // Expression: Required. + Expression string `json:"expression,omitempty"` + + // Name: Required. + // A non empty and unique name of this condition. + Name string `json:"name,omitempty"` + + // TagColor: Optional. + // The display (tag) color of this condition. This serves as part of a + // tag + // (in the future, we may add tag text as well as tag color, but that is + // not + // yet implemented in the UI). + // This value has no affect on the semantics of the delivered config and + // it + // is ignored by the backend, except for passing it through + // write/read + // requests. + // Not having this value or having the + // "CONDITION_DISPLAY_COLOR_UNSPECIFIED" + // value (0) have the same meaning: Let the UI choose any valid color + // when + // displaying the condition. + // + // Possible values: + // "CONDITION_DISPLAY_COLOR_UNSPECIFIED" + // "BLUE" - Blue + // "BROWN" - Brown + // "CYAN" - Cyan + // "DEEP_ORANGE" - aka "Red Orange" + // "GREEN" - Green + // "INDIGO" - Indigo + // * + // "LIME" - Lime - Approved deviation from Material color palette + // "ORANGE" - Orange + // "PINK" - Pink + // "PURPLE" - Purple + // "TEAL" - Teal + TagColor string `json:"tagColor,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Expression") 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. "Expression") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RemoteConfigCondition) MarshalJSON() ([]byte, error) { + type noMethod RemoteConfigCondition + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RemoteConfigParameter: While default_value and conditional_values are +// each optional, at least one of +// the two is required - otherwise, the parameter is meaningless (and +// an +// exception will be thrown by the validation logic). +type RemoteConfigParameter struct { + // ConditionalValues: Optional - a map of (condition_name, value). The + // condition_name of the + // highest priority (the one listed first in the conditions array) + // determines + // the value of this parameter. + ConditionalValues map[string]RemoteConfigParameterValue `json:"conditionalValues,omitempty"` + + // DefaultValue: Optional - value to set the parameter to, when none of + // the named conditions + // evaluate to true. + DefaultValue *RemoteConfigParameterValue `json:"defaultValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConditionalValues") + // 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. "ConditionalValues") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RemoteConfigParameter) MarshalJSON() ([]byte, error) { + type noMethod RemoteConfigParameter + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RemoteConfigParameterValue: A RemoteConfigParameter's "value" (either +// the default value, or the value +// associated with a condition name) is either a string, or +// the +// "use_in_app_default" indicator (which means to leave out the +// parameter from +// the returned map that is the output of the parameter +// fetch). +// We represent the "use_in_app_default" as a bool, but (when using the +// boolean +// instead of the string) it should always be true. +type RemoteConfigParameterValue struct { + // UseInAppDefault: if true, omit the parameter from the map of fetched + // parameter values + UseInAppDefault bool `json:"useInAppDefault,omitempty"` + + // Value: the string to set the parameter to + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UseInAppDefault") 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. "UseInAppDefault") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RemoteConfigParameterValue) MarshalJSON() ([]byte, error) { + type noMethod RemoteConfigParameterValue + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "firebaseremoteconfig.projects.getRemoteConfig": + +type ProjectsGetRemoteConfigCall struct { + s *Service + projectid string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetRemoteConfig: Get the latest version Remote Configuration for a +// project. +// Returns the RemoteConfig as the payload, and also the eTag as +// a +// response header. +func (r *ProjectsService) GetRemoteConfig(projectid string) *ProjectsGetRemoteConfigCall { + c := &ProjectsGetRemoteConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectid = projectid + 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 *ProjectsGetRemoteConfigCall) Fields(s ...googleapi.Field) *ProjectsGetRemoteConfigCall { + 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 *ProjectsGetRemoteConfigCall) IfNoneMatch(entityTag string) *ProjectsGetRemoteConfigCall { + 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 *ProjectsGetRemoteConfigCall) Context(ctx context.Context) *ProjectsGetRemoteConfigCall { + 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 *ProjectsGetRemoteConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsGetRemoteConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+project}/remoteConfig") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.projectid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "firebaseremoteconfig.projects.getRemoteConfig" call. +// Exactly one of *RemoteConfig or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *RemoteConfig.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsGetRemoteConfigCall) Do(opts ...googleapi.CallOption) (*RemoteConfig, 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 := &RemoteConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get the latest version Remote Configuration for a project.\nReturns the RemoteConfig as the payload, and also the eTag as a\nresponse header.", + // "flatPath": "v1/projects/{projectsId}/remoteConfig", + // "httpMethod": "GET", + // "id": "firebaseremoteconfig.projects.getRemoteConfig", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "The GMP project identifier. Required.\nSee note at the beginning of this file regarding project ids.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+project}/remoteConfig", + // "response": { + // "$ref": "RemoteConfig" + // } + // } + +} + +// method id "firebaseremoteconfig.projects.updateRemoteConfig": + +type ProjectsUpdateRemoteConfigCall struct { + s *Service + projectid string + remoteconfig *RemoteConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateRemoteConfig: Update a RemoteConfig. We treat this as an +// always-existing +// resource (when it is not found in our data store, we treat it as +// version +// 0, a template with zero conditions and zero parameters). Hence there +// are +// no Create or Delete operations. Returns the updated template +// when +// successful (and the updated eTag as a response header), or an error +// if +// things go wrong. +// Possible error messages: +// * VALIDATION_ERROR (HTTP status 400) with additional details if +// the +// template being passed in can not be validated. +// * AUTHENTICATION_ERROR (HTTP status 401) if the request can not +// be +// authenticate (e.g. no access token, or invalid access token). +// * AUTHORIZATION_ERROR (HTTP status 403) if the request can not +// be +// authorized (e.g. the user has no access to the specified project +// id). +// * VERSION_MISMATCH (HTTP status 412) when trying to update when +// the +// expected eTag (passed in via the "If-match" header) is not specified, +// or +// is specified but does does not match the current eTag. +// * Internal error (HTTP status 500) for Database problems or other +// internal +// errors. +func (r *ProjectsService) UpdateRemoteConfig(projectid string, remoteconfig *RemoteConfig) *ProjectsUpdateRemoteConfigCall { + c := &ProjectsUpdateRemoteConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectid = projectid + c.remoteconfig = remoteconfig + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Defaults to +// false (UpdateRemoteConfig call should +// update the backend if there are no validation/interal errors). May be +// set +// to true to indicate that, should no validation errors +// occur, +// the call should return a "200 OK" instead of performing the update. +// Note +// that other error messages (500 Internal Error, 412 Version Mismatch, +// etc) +// may still result after flipping to false, even if +// getting a +// "200 OK" when calling with true. +func (c *ProjectsUpdateRemoteConfigCall) ValidateOnly(validateOnly bool) *ProjectsUpdateRemoteConfigCall { + 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 *ProjectsUpdateRemoteConfigCall) Fields(s ...googleapi.Field) *ProjectsUpdateRemoteConfigCall { + 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 *ProjectsUpdateRemoteConfigCall) Context(ctx context.Context) *ProjectsUpdateRemoteConfigCall { + 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 *ProjectsUpdateRemoteConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsUpdateRemoteConfigCall) 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.remoteconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+project}/remoteConfig") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PUT", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.projectid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "firebaseremoteconfig.projects.updateRemoteConfig" call. +// Exactly one of *RemoteConfig or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *RemoteConfig.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsUpdateRemoteConfigCall) Do(opts ...googleapi.CallOption) (*RemoteConfig, 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 := &RemoteConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update a RemoteConfig. We treat this as an always-existing\nresource (when it is not found in our data store, we treat it as version\n0, a template with zero conditions and zero parameters). Hence there are\nno Create or Delete operations. Returns the updated template when\nsuccessful (and the updated eTag as a response header), or an error if\nthings go wrong.\nPossible error messages:\n* VALIDATION_ERROR (HTTP status 400) with additional details if the\ntemplate being passed in can not be validated.\n* AUTHENTICATION_ERROR (HTTP status 401) if the request can not be\nauthenticate (e.g. no access token, or invalid access token).\n* AUTHORIZATION_ERROR (HTTP status 403) if the request can not be\nauthorized (e.g. the user has no access to the specified project id).\n* VERSION_MISMATCH (HTTP status 412) when trying to update when the\nexpected eTag (passed in via the \"If-match\" header) is not specified, or\nis specified but does does not match the current eTag.\n* Internal error (HTTP status 500) for Database problems or other internal\nerrors.", + // "flatPath": "v1/projects/{projectsId}/remoteConfig", + // "httpMethod": "PUT", + // "id": "firebaseremoteconfig.projects.updateRemoteConfig", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "The GMP project identifier. Required.\nSee note at the beginning of this file regarding project ids.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Defaults to \u003ccode\u003efalse\u003c/code\u003e (UpdateRemoteConfig call should\nupdate the backend if there are no validation/interal errors). May be set\nto \u003ccode\u003etrue\u003c/code\u003e to indicate that, should no validation errors occur,\nthe call should return a \"200 OK\" instead of performing the update. Note\nthat other error messages (500 Internal Error, 412 Version Mismatch, etc)\nmay still result after flipping to \u003ccode\u003efalse\u003c/code\u003e, even if getting a\n\"200 OK\" when calling with \u003ccode\u003etrue\u003c/code\u003e.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+project}/remoteConfig", + // "request": { + // "$ref": "RemoteConfig" + // }, + // "response": { + // "$ref": "RemoteConfig" + // } + // } + +} diff --git a/vendor/google.golang.org/api/firebaserules/v1/firebaserules-api.json b/vendor/google.golang.org/api/firebaserules/v1/firebaserules-api.json index ea56eec80..42d94559f 100644 --- a/vendor/google.golang.org/api/firebaserules/v1/firebaserules-api.json +++ b/vendor/google.golang.org/api/firebaserules/v1/firebaserules-api.json @@ -1,475 +1,11 @@ { - "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/firebase.readonly": { - "description": "View all your Firebase data and settings" - }, - "https://www.googleapis.com/auth/firebase": { - "description": "View and administer all your Firebase data and settings" - } - } - } - }, - "rootUrl": "https://firebaserules.googleapis.com/", - "ownerDomain": "google.com", - "name": "firebaserules", - "batchPath": "batch", - "title": "Firebase Rules API", - "ownerName": "Google", - "resources": { - "projects": { - "resources": { - "rulesets": { - "methods": { - "list": { - "id": "firebaserules.projects.rulesets.list", - "path": "v1/{+name}/rulesets", - "description": "List `Ruleset` metadata only and optionally filter the results by `Ruleset`\nname.\n\nThe full `Source` contents of a `Ruleset` may be retrieved with\nGetRuleset.", - "response": { - "$ref": "ListRulesetsResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase", - "https://www.googleapis.com/auth/firebase.readonly" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "Next page token for loading the next batch of `Ruleset` instances.", - "type": "string" - }, - "name": { - "description": "Resource name for the project.\n\nFormat: `projects/{project_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Page size to load. Maximum of 100. Defaults to 10.\nNote: `page_size` is just a hint and the service may choose to load less\nthan `page_size` due to the size of the output. To traverse all of the\nreleases, caller should iterate until the `page_token` is empty.", - "type": "integer" - }, - "filter": { - "type": "string", - "location": "query", - "description": "`Ruleset` filter. The list method supports filters with restrictions on\n`Ruleset.name`.\n\nFilters on `Ruleset.create_time` should use the `date` function which\nparses strings that conform to the RFC 3339 date/time specifications.\n\nExample: `create_time \u003e date(\"2017-01-01\") AND name=UUID-*`" - } - }, - "flatPath": "v1/projects/{projectsId}/rulesets" - }, - "get": { - "path": "v1/{+name}", - "id": "firebaserules.projects.rulesets.get", - "description": "Get a `Ruleset` by name including the full `Source` contents.", - "httpMethod": "GET", - "response": { - "$ref": "Ruleset" - }, - "parameterOrder": [ - "name" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase", - "https://www.googleapis.com/auth/firebase.readonly" - ], - "parameters": { - "name": { - "description": "Resource name for the ruleset to get.\n\nFormat: `projects/{project_id}/rulesets/{ruleset_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/rulesets/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/rulesets/{rulesetsId}" - }, - "create": { - "response": { - "$ref": "Ruleset" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "Resource name for Project which owns this `Ruleset`.\n\nFormat: `projects/{project_id}`", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase" - ], - "flatPath": "v1/projects/{projectsId}/rulesets", - "id": "firebaserules.projects.rulesets.create", - "path": "v1/{+name}/rulesets", - "description": "Create a `Ruleset` from `Source`.\n\nThe `Ruleset` is given a unique generated name which is returned to the\ncaller. `Source` containing syntactic or semantics errors will result in an\nerror response indicating the first error encountered. For a detailed view\nof `Source` issues, use TestRuleset.", - "request": { - "$ref": "Ruleset" - } - }, - "delete": { - "description": "Delete a `Ruleset` by resource name.\n\nIf the `Ruleset` is referenced by a `Release` the operation will fail.", - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name for the ruleset to delete.\n\nFormat: `projects/{project_id}/rulesets/{ruleset_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/rulesets/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase" - ], - "flatPath": "v1/projects/{projectsId}/rulesets/{rulesetsId}", - "path": "v1/{+name}", - "id": "firebaserules.projects.rulesets.delete" - } - } - }, - "releases": { - "methods": { - "create": { - "response": { - "$ref": "Release" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase" - ], - "parameters": { - "name": { - "description": "Resource name for the project which owns this `Release`.\n\nFormat: `projects/{project_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/releases", - "id": "firebaserules.projects.releases.create", - "path": "v1/{+name}/releases", - "request": { - "$ref": "Release" - }, - "description": "Create a `Release`.\n\nRelease names should reflect the developer's deployment practices. For\nexample, the release name may include the environment name, application\nname, application version, or any other name meaningful to the developer.\nOnce a `Release` refers to a `Ruleset`, the rules can be enforced by\nFirebase Rules-enabled services.\n\nMore than one `Release` may be 'live' concurrently. Consider the following\nthree `Release` names for `projects/foo` and the `Ruleset` to which they\nrefer.\n\nRelease Name | Ruleset Name\n--------------------------------|-------------\nprojects/foo/releases/prod | projects/foo/rulesets/uuid123\nprojects/foo/releases/prod/beta | projects/foo/rulesets/uuid123\nprojects/foo/releases/prod/v23 | projects/foo/rulesets/uuid456\n\nThe table reflects the `Ruleset` rollout in progress. The `prod` and\n`prod/beta` releases refer to the same `Ruleset`. However, `prod/v23`\nrefers to a new `Ruleset`. The `Ruleset` reference for a `Release` may be\nupdated using the UpdateRelease method." - }, - "delete": { - "path": "v1/{+name}", - "id": "firebaserules.projects.releases.delete", - "description": "Delete a `Release` by resource name.", - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/releases/.+$", - "location": "path", - "description": "Resource name for the `Release` to delete.\n\nFormat: `projects/{project_id}/releases/{release_id}`" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase" - ], - "flatPath": "v1/projects/{projectsId}/releases/{releasesId}" - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListReleasesResponse" - }, - "parameters": { - "pageToken": { - "location": "query", - "description": "Next page token for the next batch of `Release` instances.", - "type": "string" - }, - "name": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "Resource name for the project.\n\nFormat: `projects/{project_id}`", - "type": "string", - "required": true - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Page size to load. Maximum of 100. Defaults to 10.\nNote: `page_size` is just a hint and the service may choose to load fewer\nthan `page_size` results due to the size of the output. To traverse all of\nthe releases, the caller should iterate until the `page_token` on the\nresponse is empty.", - "type": "integer" - }, - "filter": { - "description": "`Release` filter. The list method supports filters with restrictions on the\n`Release.name`, `Release.ruleset_name`, and `Release.test_suite_name`.\n\nExample 1: A filter of 'name=prod*' might return `Release`s with names\nwithin 'projects/foo' prefixed with 'prod':\n\nName | Ruleset Name\n------------------------------|-------------\nprojects/foo/releases/prod | projects/foo/rulesets/uuid1234\nprojects/foo/releases/prod/v1 | projects/foo/rulesets/uuid1234\nprojects/foo/releases/prod/v2 | projects/foo/rulesets/uuid8888\n\nExample 2: A filter of `name=prod* ruleset_name=uuid1234` would return only\n`Release` instances for 'projects/foo' with names prefixed with 'prod'\nreferring to the same `Ruleset` name of 'uuid1234':\n\nName | Ruleset Name\n------------------------------|-------------\nprojects/foo/releases/prod | projects/foo/rulesets/1234\nprojects/foo/releases/prod/v1 | projects/foo/rulesets/1234\n\nIn the examples, the filter parameters refer to the search filters are\nrelative to the project. Fully qualified prefixed may also be used. e.g.\n`test_suite_name=projects/foo/testsuites/uuid1`", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase", - "https://www.googleapis.com/auth/firebase.readonly" - ], - "flatPath": "v1/projects/{projectsId}/releases", - "path": "v1/{+name}/releases", - "id": "firebaserules.projects.releases.list", - "description": "List the `Release` values for a project. This list may optionally be\nfiltered by `Release` name, `Ruleset` name, `TestSuite` name, or any\ncombination thereof." - }, - "get": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase", - "https://www.googleapis.com/auth/firebase.readonly" - ], - "parameters": { - "name": { - "location": "path", - "description": "Resource name of the `Release`.\n\nFormat: `projects/{project_id}/releases/{release_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/releases/.+$" - } - }, - "flatPath": "v1/projects/{projectsId}/releases/{releasesId}", - "path": "v1/{+name}", - "id": "firebaserules.projects.releases.get", - "description": "Get a `Release` by name.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Release" - } - }, - "update": { - "id": "firebaserules.projects.releases.update", - "path": "v1/{+name}", - "request": { - "$ref": "Release" - }, - "description": "Update a `Release`.\n\nOnly updates to the `ruleset_name` and `test_suite_name` fields will be\nhonored. `Release` rename is not supported. To create a `Release` use the\nCreateRelease method.", - "response": { - "$ref": "Release" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PUT", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/releases/.+$", - "location": "path", - "description": "Resource name for the `Release`.\n\n`Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2`\nwhich affords developers a great deal of flexibility in mapping the name\nto the style that best fits their existing development practices. For\nexample, a name could refer to an environment, an app, a version, or some\ncombination of three.\n\nIn the table below, for the project name `projects/foo`, the following\nrelative release paths show how flat and structured names might be chosen\nto match a desired development / deployment strategy.\n\nUse Case | Flat Name | Structured Name\n-------------|---------------------|----------------\nEnvironments | releases/qa | releases/qa\nApps | releases/app1_qa | releases/app1/qa\nVersions | releases/app1_v2_qa | releases/app1/v2/qa\n\nThe delimiter between the release name path elements can be almost anything\nand it should work equally well with the release name list filter, but in\nmany ways the structured paths provide a clearer picture of the\nrelationship between `Release` instances.\n\nFormat: `projects/{project_id}/releases/{release_id}`", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectsId}/releases/{releasesId}" - } - } - } - }, - "methods": { - "test": { - "response": { - "$ref": "TestRulesetResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase", - "https://www.googleapis.com/auth/firebase.readonly" - ], - "parameters": { - "name": { - "description": "Tests may either provide `source` or a `Ruleset` resource name.\n\nFor tests against `source`, the resource name must refer to the project:\nFormat: `projects/{project_id}`\n\nFor tests against a `Ruleset`, this must be the `Ruleset` resource name:\nFormat: `projects/{project_id}/rulesets/{ruleset_id}`", - "type": "string", - "required": true, - "pattern": "^projects/.+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}:test", - "id": "firebaserules.projects.test", - "path": "v1/{+name}:test", - "request": { - "$ref": "TestRulesetRequest" - }, - "description": "Test `Source` for syntactic and semantic correctness. Issues present, if\nany, will be returned to the caller with a description, severity, and\nsource location.\n\nThe test method may be executed with `Source` or a `Ruleset` name.\nPassing `Source` is useful for unit testing new rules. Passing a `Ruleset`\nname is useful for regression testing an existing rule.\n\nThe following is an example of `Source` that permits users to upload images\nto a bucket bearing their user id and matching the correct metadata:\n\n_*Example*_\n\n // Users are allowed to subscribe and unsubscribe to the blog.\n service firebase.storage {\n match /users/{userId}/images/{imageName} {\n allow write: if userId == request.auth.uid\n && (imageName.matches('*.png$')\n || imageName.matches('*.jpg$'))\n && resource.mimeType.matches('^image/')\n }\n }" - } - } - } - }, - "parameters": { - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ] - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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", - "description": "Data format for response.", - "default": "json" - }, - "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.", - "type": "string", - "location": "query" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - } - }, - "version": "v1", - "baseUrl": "https://firebaserules.googleapis.com/", - "servicePath": "", - "description": "Creates and manages rules that determine when a Firebase Rules-enabled service should permit a request.\n", - "kind": "discovery#restDescription", - "basePath": "", + "revision": "20170807", "documentationLink": "https://firebase.google.com/docs/storage/security", - "revision": "20170523", "id": "firebaserules:v1", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { - "FunctionMock": { - "type": "object", - "properties": { - "result": { - "$ref": "Result", - "description": "The mock result of the function call." - }, - "args": { - "description": "The list of `Arg` values to match. The order in which the arguments are\nprovided is the order in which they must appear in the function\ninvocation.", - "items": { - "$ref": "Arg" - }, - "type": "array" - }, - "function": { - "description": "The name of the function.\n\nThe function name must match one provided by a service declaration.", - "type": "string" - } - }, - "id": "FunctionMock", - "description": "Mock function definition.\n\nMocks must refer to a function declared by the target service. The type of\nthe function args and result will be inferred at test time. If either the\narg or result values are not compatible with function type declaration, the\nrequest will be considered invalid.\n\nMore than one `FunctionMock` may be provided for a given function name so\nlong as the `Arg` matchers are distinct. There may be only one function\nfor a given overload where all `Arg` values are `Arg.any_value`." - }, "Source": { - "description": "`Source` is one or more `File` messages comprising a logical set of rules.", - "type": "object", "properties": { "files": { "description": "`File` set constituting the `Source` bundle.", @@ -479,7 +15,9 @@ "type": "array" } }, - "id": "Source" + "id": "Source", + "description": "`Source` is one or more `File` messages comprising a logical set of rules.", + "type": "object" }, "Result": { "description": "Possible result values from the function mock invocation.", @@ -497,9 +35,15 @@ "id": "Result" }, "SourcePosition": { + "id": "SourcePosition", "description": "Position in the `Source` content including its line, column number, and an\nindex of the `File` in the `Source` message. Used for debug purposes.", "type": "object", "properties": { + "line": { + "format": "int32", + "description": "Line number of the source fragment. 1-based.", + "type": "integer" + }, "column": { "format": "int32", "description": "First column on the source line associated with the source fragment.", @@ -508,31 +52,26 @@ "fileName": { "description": "Name of the `File`.", "type": "string" - }, - "line": { - "format": "int32", - "description": "Line number of the source fragment. 1-based.", - "type": "integer" } - }, - "id": "SourcePosition" + } }, "TestCase": { + "id": "TestCase", + "description": "`TestCase` messages provide the request context and an expectation as to\nwhether the given context will be allowed or denied. Test cases may specify\nthe `request`, `resource`, and `function_mocks` to mock a function call to\na service-provided function.\n\nThe `request` object represents context present at request-time.\n\nThe `resource` is the value of the target resource as it appears in\npersistent storage before the request is executed.", "type": "object", "properties": { "functionMocks": { - "description": "Optional function mocks for service-defined functions. If not set, any\nservice defined function is expected to return an error, which may or may\nnot influence the test outcome.", "items": { "$ref": "FunctionMock" }, - "type": "array" + "type": "array", + "description": "Optional function mocks for service-defined functions. If not set, any\nservice defined function is expected to return an error, which may or may\nnot influence the test outcome." }, "resource": { "description": "Optional resource value as it appears in persistent storage before the\nrequest is fulfilled.\n\nThe resource type depends on the `request.path` value.", "type": "any" }, "expectation": { - "type": "string", "enumDescriptions": [ "Unspecified expectation.", "Expect an allowed result.", @@ -543,57 +82,19 @@ "ALLOW", "DENY" ], - "description": "Test expectation." + "description": "Test expectation.", + "type": "string" }, "request": { "description": "Request context.\n\nThe exact format of the request context is service-dependent. See the\nappropriate service documentation for information about the supported\nfields and types on the request. Minimally, all services support the\nfollowing fields and types:\n\nRequest field | Type\n---------------|-----------------\nauth.uid | `string`\nauth.token | `map\u003cstring, string\u003e`\nheaders | `map\u003cstring, string\u003e`\nmethod | `string`\nparams | `map\u003cstring, string\u003e`\npath | `string`\ntime | `google.protobuf.Timestamp`\n\nIf the request value is not well-formed for the service, the request will\nbe rejected as an invalid argument.", "type": "any" } - }, - "id": "TestCase", - "description": "`TestCase` messages provide the request context and an expectation as to\nwhether the given context will be allowed or denied. Test cases may specify\nthe `request`, `resource`, and `function_mocks` to mock a function call to\na service-provided function.\n\nThe `request` object represents context present at request-time.\n\nThe `resource` is the value of the target resource as it appears in\npersistent storage before the request is executed." - }, - "Ruleset": { - "description": "`Ruleset` is an immutable copy of `Source` with a globally unique identifier\nand a creation time.", - "type": "object", - "properties": { - "name": { - "description": "Name of the `Ruleset`. The ruleset_id is auto generated by the service.\nFormat: `projects/{project_id}/rulesets/{ruleset_id}`\nOutput only.", - "type": "string" - }, - "source": { - "$ref": "Source", - "description": "`Source` for the `Ruleset`." - }, - "createTime": { - "format": "google-datetime", - "description": "Time the `Ruleset` was created.\nOutput only.", - "type": "string" - } - }, - "id": "Ruleset" - }, - "TestRulesetRequest": { - "description": "The request for FirebaseRulesService.TestRuleset.", - "type": "object", - "properties": { - "testSuite": { - "description": "Inline `TestSuite` to run.", - "$ref": "TestSuite" - }, - "source": { - "$ref": "Source", - "description": "Optional `Source` to be checked for correctness.\n\nThis field must not be set when the resource name refers to a `Ruleset`." - } - }, - "id": "TestRulesetRequest" + } }, "Issue": { + "description": "Issues include warnings, errors, and deprecation notices.", + "type": "object", "properties": { - "sourcePosition": { - "description": "Position of the issue in the `Source`.", - "$ref": "SourcePosition" - }, "severity": { "enumDescriptions": [ "An unspecified severity.", @@ -613,51 +114,52 @@ "description": { "description": "Short error description.", "type": "string" + }, + "sourcePosition": { + "description": "Position of the issue in the `Source`.", + "$ref": "SourcePosition" } }, - "id": "Issue", - "description": "Issues include warnings, errors, and deprecation notices.", - "type": "object" + "id": "Issue" }, - "File": { - "description": "`File` containing source content.", + "TestRulesetRequest": { + "description": "The request for FirebaseRulesService.TestRuleset.", "type": "object", "properties": { + "testSuite": { + "description": "Inline `TestSuite` to run.", + "$ref": "TestSuite" + }, + "source": { + "$ref": "Source", + "description": "Optional `Source` to be checked for correctness.\n\nThis field must not be set when the resource name refers to a `Ruleset`." + } + }, + "id": "TestRulesetRequest" + }, + "Ruleset": { + "id": "Ruleset", + "description": "`Ruleset` is an immutable copy of `Source` with a globally unique identifier\nand a creation time.", + "type": "object", + "properties": { + "createTime": { + "type": "string", + "format": "google-datetime", + "description": "Time the `Ruleset` was created.\nOutput only." + }, "name": { - "description": "File name.", - "type": "string" + "type": "string", + "description": "Name of the `Ruleset`. The ruleset_id is auto generated by the service.\nFormat: `projects/{project_id}/rulesets/{ruleset_id}`\nOutput only." }, - "content": { - "description": "Textual Content.", - "type": "string" - }, - "fingerprint": { - "format": "byte", - "description": "Fingerprint (e.g. github sha) associated with the `File`.", - "type": "string" + "source": { + "$ref": "Source", + "description": "`Source` for the `Ruleset`." } - }, - "id": "File" - }, - "FunctionCall": { - "description": "Represents a service-defined function call that was invoked during test\nexecution.", - "type": "object", - "properties": { - "function": { - "description": "Name of the function invoked.", - "type": "string" - }, - "args": { - "description": "The arguments that were provided to the function.", - "items": { - "type": "any" - }, - "type": "array" - } - }, - "id": "FunctionCall" + } }, "ListReleasesResponse": { + "description": "The response for FirebaseRulesService.ListReleases.", + "type": "object", "properties": { "releases": { "description": "List of `Release` instances.", @@ -671,45 +173,81 @@ "type": "string" } }, - "id": "ListReleasesResponse", - "description": "The response for FirebaseRulesService.ListReleases.", - "type": "object" + "id": "ListReleasesResponse" + }, + "FunctionCall": { + "description": "Represents a service-defined function call that was invoked during test\nexecution.", + "type": "object", + "properties": { + "args": { + "description": "The arguments that were provided to the function.", + "items": { + "type": "any" + }, + "type": "array" + }, + "function": { + "description": "Name of the function invoked.", + "type": "string" + } + }, + "id": "FunctionCall" + }, + "File": { + "description": "`File` containing source content.", + "type": "object", + "properties": { + "fingerprint": { + "format": "byte", + "description": "Fingerprint (e.g. github sha) associated with the `File`.", + "type": "string" + }, + "name": { + "description": "File name.", + "type": "string" + }, + "content": { + "description": "Textual Content.", + "type": "string" + } + }, + "id": "File" }, "Release": { + "id": "Release", "description": "`Release` is a named reference to a `Ruleset`. Once a `Release` refers to a\n`Ruleset`, rules-enabled services will be able to enforce the `Ruleset`.", "type": "object", "properties": { - "createTime": { - "format": "google-datetime", - "description": "Time the release was created.\nOutput only.", - "type": "string" - }, "updateTime": { "format": "google-datetime", "description": "Time the release was updated.\nOutput only.", "type": "string" }, "rulesetName": { - "description": "Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must\nexist the `Release` to be created.", - "type": "string" + "type": "string", + "description": "Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must\nexist the `Release` to be created." }, "name": { "description": "Resource name for the `Release`.\n\n`Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2`\nwhich affords developers a great deal of flexibility in mapping the name\nto the style that best fits their existing development practices. For\nexample, a name could refer to an environment, an app, a version, or some\ncombination of three.\n\nIn the table below, for the project name `projects/foo`, the following\nrelative release paths show how flat and structured names might be chosen\nto match a desired development / deployment strategy.\n\nUse Case | Flat Name | Structured Name\n-------------|---------------------|----------------\nEnvironments | releases/qa | releases/qa\nApps | releases/app1_qa | releases/app1/qa\nVersions | releases/app1_v2_qa | releases/app1/v2/qa\n\nThe delimiter between the release name path elements can be almost anything\nand it should work equally well with the release name list filter, but in\nmany ways the structured paths provide a clearer picture of the\nrelationship between `Release` instances.\n\nFormat: `projects/{project_id}/releases/{release_id}`", "type": "string" + }, + "createTime": { + "format": "google-datetime", + "description": "Time the release was created.\nOutput only.", + "type": "string" } - }, - "id": "Release" + } }, "TestRulesetResponse": { "description": "The response for FirebaseRulesService.TestRuleset.", "type": "object", "properties": { "issues": { - "description": "Syntactic and semantic `Source` issues of varying severity. Issues of\n`ERROR` severity will prevent tests from executing.", "items": { "$ref": "Issue" }, - "type": "array" + "type": "array", + "description": "Syntactic and semantic `Source` issues of varying severity. Issues of\n`ERROR` severity will prevent tests from executing." }, "testResults": { "description": "The set of test results given the test cases in the `TestSuite`.\nThe results will appear in the same order as the test cases appear in the\n`TestSuite`.", @@ -722,30 +260,30 @@ "id": "TestRulesetResponse" }, "ListRulesetsResponse": { + "id": "ListRulesetsResponse", "description": "The response for FirebaseRulesService.ListRulesets.", "type": "object", "properties": { - "nextPageToken": { - "description": "The pagination token to retrieve the next page of results. If the value is\nempty, no further results remain.", - "type": "string" - }, "rulesets": { - "description": "List of `Ruleset` instances.", "items": { "$ref": "Ruleset" }, - "type": "array" + "type": "array", + "description": "List of `Ruleset` instances." + }, + "nextPageToken": { + "description": "The pagination token to retrieve the next page of results. If the value is\nempty, no further results remain.", + "type": "string" } - }, - "id": "ListRulesetsResponse" + } }, "TestResult": { "description": "Test result message containing the state of the test as well as a\ndescription and source position for test failures.", "type": "object", "properties": { "errorPosition": { - "description": "Position in the `Source` or `Ruleset` where the principle runtime error\noccurs.\n\nEvaluation of an expression may result in an error. Rules are deny by\ndefault, so a `DENY` expectation when an error is generated is valid.\nWhen there is a `DENY` with an error, the `SourcePosition` is returned.\n\nE.g. `error_position { line: 19 column: 37 }`", - "$ref": "SourcePosition" + "$ref": "SourcePosition", + "description": "Position in the `Source` or `Ruleset` where the principle runtime error\noccurs.\n\nEvaluation of an expression may result in an error. Rules are deny by\ndefault, so a `DENY` expectation when an error is generated is valid.\nWhen there is a `DENY` with an error, the `SourcePosition` is returned.\n\nE.g. `error_position { line: 19 column: 37 }`" }, "functionCalls": { "description": "The set of function calls made to service-defined methods.\n\nFunction calls are included in the order in which they are encountered\nduring evaluation, are provided for both mocked and unmocked functions,\nand included on the response regardless of the test `state`.", @@ -783,8 +321,8 @@ "type": "object", "properties": { "anyValue": { - "description": "Argument matches any value provided.", - "$ref": "Empty" + "$ref": "Empty", + "description": "Argument matches any value provided." }, "exactValue": { "description": "Argument exactly matches value provided.", @@ -808,10 +346,32 @@ "id": "TestSuite" }, "Empty": { - "properties": {}, - "id": "Empty", "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object" + "type": "object", + "properties": {}, + "id": "Empty" + }, + "FunctionMock": { + "description": "Mock function definition.\n\nMocks must refer to a function declared by the target service. The type of\nthe function args and result will be inferred at test time. If either the\narg or result values are not compatible with function type declaration, the\nrequest will be considered invalid.\n\nMore than one `FunctionMock` may be provided for a given function name so\nlong as the `Arg` matchers are distinct. There may be only one function\nfor a given overload where all `Arg` values are `Arg.any_value`.", + "type": "object", + "properties": { + "args": { + "description": "The list of `Arg` values to match. The order in which the arguments are\nprovided is the order in which they must appear in the function\ninvocation.", + "items": { + "$ref": "Arg" + }, + "type": "array" + }, + "function": { + "description": "The name of the function.\n\nThe function name must match one provided by a service declaration.", + "type": "string" + }, + "result": { + "description": "The mock result of the function call.", + "$ref": "Result" + } + }, + "id": "FunctionMock" } }, "icons": { @@ -819,5 +379,445 @@ "x32": "http://www.google.com/images/icons/product/search-32.gif" }, "protocol": "rest", - "canonicalName": "Firebase Rules" + "canonicalName": "Firebase Rules", + "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/firebase.readonly": { + "description": "View all your Firebase data and settings" + }, + "https://www.googleapis.com/auth/firebase": { + "description": "View and administer all your Firebase data and settings" + } + } + } + }, + "rootUrl": "https://firebaserules.googleapis.com/", + "ownerDomain": "google.com", + "name": "firebaserules", + "batchPath": "batch", + "title": "Firebase Rules API", + "ownerName": "Google", + "resources": { + "projects": { + "methods": { + "test": { + "description": "Test `Source` for syntactic and semantic correctness. Issues present, if\nany, will be returned to the caller with a description, severity, and\nsource location.\n\nThe test method may be executed with `Source` or a `Ruleset` name.\nPassing `Source` is useful for unit testing new rules. Passing a `Ruleset`\nname is useful for regression testing an existing rule.\n\nThe following is an example of `Source` that permits users to upload images\nto a bucket bearing their user id and matching the correct metadata:\n\n_*Example*_\n\n // Users are allowed to subscribe and unsubscribe to the blog.\n service firebase.storage {\n match /users/{userId}/images/{imageName} {\n allow write: if userId == request.auth.uid\n && (imageName.matches('*.png$')\n || imageName.matches('*.jpg$'))\n && resource.mimeType.matches('^image/')\n }\n }", + "request": { + "$ref": "TestRulesetRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "TestRulesetResponse" + }, + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^projects/.+$", + "location": "path", + "description": "Tests may either provide `source` or a `Ruleset` resource name.\n\nFor tests against `source`, the resource name must refer to the project:\nFormat: `projects/{project_id}`\n\nFor tests against a `Ruleset`, this must be the `Ruleset` resource name:\nFormat: `projects/{project_id}/rulesets/{ruleset_id}`" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ], + "flatPath": "v1/projects/{projectsId}:test", + "path": "v1/{+name}:test", + "id": "firebaserules.projects.test" + } + }, + "resources": { + "rulesets": { + "methods": { + "delete": { + "path": "v1/{+name}", + "id": "firebaserules.projects.rulesets.delete", + "description": "Delete a `Ruleset` by resource name.\n\nIf the `Ruleset` is referenced by a `Release` the operation will fail.", + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ], + "parameters": { + "name": { + "description": "Resource name for the ruleset to delete.\n\nFormat: `projects/{project_id}/rulesets/{ruleset_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/rulesets/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/rulesets/{rulesetsId}" + }, + "list": { + "path": "v1/{+name}/rulesets", + "id": "firebaserules.projects.rulesets.list", + "description": "List `Ruleset` metadata only and optionally filter the results by `Ruleset`\nname.\n\nThe full `Source` contents of a `Ruleset` may be retrieved with\nGetRuleset.", + "httpMethod": "GET", + "response": { + "$ref": "ListRulesetsResponse" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "Next page token for loading the next batch of `Ruleset` instances.", + "type": "string" + }, + "name": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Resource name for the project.\n\nFormat: `projects/{project_id}`", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Page size to load. Maximum of 100. Defaults to 10.\nNote: `page_size` is just a hint and the service may choose to load less\nthan `page_size` due to the size of the output. To traverse all of the\nreleases, caller should iterate until the `page_token` is empty.", + "type": "integer" + }, + "filter": { + "location": "query", + "description": "`Ruleset` filter. The list method supports filters with restrictions on\n`Ruleset.name`.\n\nFilters on `Ruleset.create_time` should use the `date` function which\nparses strings that conform to the RFC 3339 date/time specifications.\n\nExample: `create_time \u003e date(\"2017-01-01\") AND name=UUID-*`", + "type": "string" + } + }, + "flatPath": "v1/projects/{projectsId}/rulesets" + }, + "get": { + "response": { + "$ref": "Ruleset" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/rulesets/[^/]+$", + "location": "path", + "description": "Resource name for the ruleset to get.\n\nFormat: `projects/{project_id}/rulesets/{ruleset_id}`", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ], + "flatPath": "v1/projects/{projectsId}/rulesets/{rulesetsId}", + "id": "firebaserules.projects.rulesets.get", + "path": "v1/{+name}", + "description": "Get a `Ruleset` by name including the full `Source` contents." + }, + "create": { + "flatPath": "v1/projects/{projectsId}/rulesets", + "id": "firebaserules.projects.rulesets.create", + "path": "v1/{+name}/rulesets", + "request": { + "$ref": "Ruleset" + }, + "description": "Create a `Ruleset` from `Source`.\n\nThe `Ruleset` is given a unique generated name which is returned to the\ncaller. `Source` containing syntactic or semantics errors will result in an\nerror response indicating the first error encountered. For a detailed view\nof `Source` issues, use TestRuleset.", + "response": { + "$ref": "Ruleset" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ], + "parameters": { + "name": { + "location": "path", + "description": "Resource name for Project which owns this `Ruleset`.\n\nFormat: `projects/{project_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$" + } + } + } + } + }, + "releases": { + "methods": { + "delete": { + "flatPath": "v1/projects/{projectsId}/releases/{releasesId}", + "id": "firebaserules.projects.releases.delete", + "path": "v1/{+name}", + "description": "Delete a `Release` by resource name.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "parameters": { + "name": { + "description": "Resource name for the `Release` to delete.\n\nFormat: `projects/{project_id}/releases/{release_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/releases/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListReleasesResponse" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ], + "parameters": { + "filter": { + "description": "`Release` filter. The list method supports filters with restrictions on the\n`Release.name`, `Release.ruleset_name`, and `Release.test_suite_name`.\n\nExample 1: A filter of 'name=prod*' might return `Release`s with names\nwithin 'projects/foo' prefixed with 'prod':\n\nName | Ruleset Name\n------------------------------|-------------\nprojects/foo/releases/prod | projects/foo/rulesets/uuid1234\nprojects/foo/releases/prod/v1 | projects/foo/rulesets/uuid1234\nprojects/foo/releases/prod/v2 | projects/foo/rulesets/uuid8888\n\nExample 2: A filter of `name=prod* ruleset_name=uuid1234` would return only\n`Release` instances for 'projects/foo' with names prefixed with 'prod'\nreferring to the same `Ruleset` name of 'uuid1234':\n\nName | Ruleset Name\n------------------------------|-------------\nprojects/foo/releases/prod | projects/foo/rulesets/1234\nprojects/foo/releases/prod/v1 | projects/foo/rulesets/1234\n\nIn the examples, the filter parameters refer to the search filters are\nrelative to the project. Fully qualified prefixed may also be used. e.g.\n`test_suite_name=projects/foo/testsuites/uuid1`", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "Next page token for the next batch of `Release` instances.", + "type": "string" + }, + "name": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Resource name for the project.\n\nFormat: `projects/{project_id}`", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Page size to load. Maximum of 100. Defaults to 10.\nNote: `page_size` is just a hint and the service may choose to load fewer\nthan `page_size` results due to the size of the output. To traverse all of\nthe releases, the caller should iterate until the `page_token` on the\nresponse is empty.", + "type": "integer" + } + }, + "flatPath": "v1/projects/{projectsId}/releases", + "path": "v1/{+name}/releases", + "id": "firebaserules.projects.releases.list", + "description": "List the `Release` values for a project. This list may optionally be\nfiltered by `Release` name, `Ruleset` name, `TestSuite` name, or any\ncombination thereof." + }, + "get": { + "response": { + "$ref": "Release" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ], + "parameters": { + "name": { + "description": "Resource name of the `Release`.\n\nFormat: `projects/{project_id}/releases/{release_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/releases/.+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/releases/{releasesId}", + "id": "firebaserules.projects.releases.get", + "path": "v1/{+name}", + "description": "Get a `Release` by name." + }, + "update": { + "response": { + "$ref": "Release" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "parameters": { + "name": { + "description": "Resource name for the `Release`.\n\n`Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2`\nwhich affords developers a great deal of flexibility in mapping the name\nto the style that best fits their existing development practices. For\nexample, a name could refer to an environment, an app, a version, or some\ncombination of three.\n\nIn the table below, for the project name `projects/foo`, the following\nrelative release paths show how flat and structured names might be chosen\nto match a desired development / deployment strategy.\n\nUse Case | Flat Name | Structured Name\n-------------|---------------------|----------------\nEnvironments | releases/qa | releases/qa\nApps | releases/app1_qa | releases/app1/qa\nVersions | releases/app1_v2_qa | releases/app1/v2/qa\n\nThe delimiter between the release name path elements can be almost anything\nand it should work equally well with the release name list filter, but in\nmany ways the structured paths provide a clearer picture of the\nrelationship between `Release` instances.\n\nFormat: `projects/{project_id}/releases/{release_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/releases/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ], + "flatPath": "v1/projects/{projectsId}/releases/{releasesId}", + "id": "firebaserules.projects.releases.update", + "path": "v1/{+name}", + "description": "Update a `Release`.\n\nOnly updates to the `ruleset_name` and `test_suite_name` fields will be\nhonored. `Release` rename is not supported. To create a `Release` use the\nCreateRelease method.", + "request": { + "$ref": "Release" + } + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Release" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ], + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Resource name for the project which owns this `Release`.\n\nFormat: `projects/{project_id}`" + } + }, + "flatPath": "v1/projects/{projectsId}/releases", + "path": "v1/{+name}/releases", + "id": "firebaserules.projects.releases.create", + "request": { + "$ref": "Release" + }, + "description": "Create a `Release`.\n\nRelease names should reflect the developer's deployment practices. For\nexample, the release name may include the environment name, application\nname, application version, or any other name meaningful to the developer.\nOnce a `Release` refers to a `Ruleset`, the rules can be enforced by\nFirebase Rules-enabled services.\n\nMore than one `Release` may be 'live' concurrently. Consider the following\nthree `Release` names for `projects/foo` and the `Ruleset` to which they\nrefer.\n\nRelease Name | Ruleset Name\n--------------------------------|-------------\nprojects/foo/releases/prod | projects/foo/rulesets/uuid123\nprojects/foo/releases/prod/beta | projects/foo/rulesets/uuid123\nprojects/foo/releases/prod/v23 | projects/foo/rulesets/uuid456\n\nThe table reflects the `Ruleset` rollout in progress. The `prod` and\n`prod/beta` releases refer to the same `Ruleset`. However, `prod/v23`\nrefers to a new `Ruleset`. The `Ruleset` reference for a `Release` may be\nupdated using the UpdateRelease method." + } + } + } + } + } + }, + "parameters": { + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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" + }, + "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.", + "type": "string", + "location": "query" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "type": "string", + "location": "query", + "description": "OAuth bearer token." + } + }, + "version": "v1", + "baseUrl": "https://firebaserules.googleapis.com/", + "servicePath": "", + "kind": "discovery#restDescription", + "description": "Creates and manages rules that determine when a Firebase Rules-enabled service should permit a request.\n", + "basePath": "" } diff --git a/vendor/google.golang.org/api/fusiontables/v1/fusiontables-gen.go b/vendor/google.golang.org/api/fusiontables/v1/fusiontables-gen.go index c242c94b2..1b3c87f5f 100644 --- a/vendor/google.golang.org/api/fusiontables/v1/fusiontables-gen.go +++ b/vendor/google.golang.org/api/fusiontables/v1/fusiontables-gen.go @@ -3664,16 +3664,12 @@ func (c *TableGetCall) Do(opts ...googleapi.CallOption) (*Table, error) { // method id "fusiontables.table.importRows": type TableImportRowsCall struct { - s *Service - tableId string - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + tableId string + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // ImportRows: Import more rows into a table. @@ -3737,12 +3733,7 @@ func (c *TableImportRowsCall) StartLine(startLine int64) *TableImportRowsCall { // supplied. // At most one of Media and ResumableMedia may be set. func (c *TableImportRowsCall) Media(r io.Reader, options ...googleapi.MediaOption) *TableImportRowsCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -3757,11 +3748,7 @@ func (c *TableImportRowsCall) Media(r io.Reader, options ...googleapi.MediaOptio // supersede any context previously provided to the Context method. func (c *TableImportRowsCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TableImportRowsCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -3770,7 +3757,7 @@ func (c *TableImportRowsCall) ResumableMedia(ctx context.Context, r io.ReaderAt, // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *TableImportRowsCall) ProgressUpdater(pu googleapi.ProgressUpdater) *TableImportRowsCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -3810,27 +3797,16 @@ func (c *TableImportRowsCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/import") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -3866,20 +3842,10 @@ func (c *TableImportRowsCall) Do(opts ...googleapi.CallOption) (*Import, error) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -3977,15 +3943,11 @@ func (c *TableImportRowsCall) Do(opts ...googleapi.CallOption) (*Import, error) // method id "fusiontables.table.importTable": type TableImportTableCall struct { - s *Service - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // ImportTable: Import a new table. @@ -4020,12 +3982,7 @@ func (c *TableImportTableCall) Encoding(encoding string) *TableImportTableCall { // supplied. // At most one of Media and ResumableMedia may be set. func (c *TableImportTableCall) Media(r io.Reader, options ...googleapi.MediaOption) *TableImportTableCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -4040,11 +3997,7 @@ func (c *TableImportTableCall) Media(r io.Reader, options ...googleapi.MediaOpti // supersede any context previously provided to the Context method. func (c *TableImportTableCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TableImportTableCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -4053,7 +4006,7 @@ func (c *TableImportTableCall) ResumableMedia(ctx context.Context, r io.ReaderAt // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *TableImportTableCall) ProgressUpdater(pu googleapi.ProgressUpdater) *TableImportTableCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -4093,27 +4046,16 @@ func (c *TableImportTableCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "tables/import") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -4146,20 +4088,10 @@ func (c *TableImportTableCall) Do(opts ...googleapi.CallOption) (*Table, error) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() diff --git a/vendor/google.golang.org/api/fusiontables/v2/fusiontables-gen.go b/vendor/google.golang.org/api/fusiontables/v2/fusiontables-gen.go index 3d47880f6..09d74b55a 100644 --- a/vendor/google.golang.org/api/fusiontables/v2/fusiontables-gen.go +++ b/vendor/google.golang.org/api/fusiontables/v2/fusiontables-gen.go @@ -3731,16 +3731,12 @@ func (c *TableGetCall) Do(opts ...googleapi.CallOption) (*Table, error) { // method id "fusiontables.table.importRows": type TableImportRowsCall struct { - s *Service - tableId string - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + tableId string + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // ImportRows: Imports more rows into a table. @@ -3799,12 +3795,7 @@ func (c *TableImportRowsCall) StartLine(startLine int64) *TableImportRowsCall { // supplied. // At most one of Media and ResumableMedia may be set. func (c *TableImportRowsCall) Media(r io.Reader, options ...googleapi.MediaOption) *TableImportRowsCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -3819,11 +3810,7 @@ func (c *TableImportRowsCall) Media(r io.Reader, options ...googleapi.MediaOptio // supersede any context previously provided to the Context method. func (c *TableImportRowsCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TableImportRowsCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -3832,7 +3819,7 @@ func (c *TableImportRowsCall) ResumableMedia(ctx context.Context, r io.ReaderAt, // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *TableImportRowsCall) ProgressUpdater(pu googleapi.ProgressUpdater) *TableImportRowsCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -3872,27 +3859,16 @@ func (c *TableImportRowsCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/import") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -3928,20 +3904,10 @@ func (c *TableImportRowsCall) Do(opts ...googleapi.CallOption) (*Import, error) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -4039,15 +4005,11 @@ func (c *TableImportRowsCall) Do(opts ...googleapi.CallOption) (*Import, error) // method id "fusiontables.table.importTable": type TableImportTableCall struct { - s *Service - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // ImportTable: Imports a new table. @@ -4082,12 +4044,7 @@ func (c *TableImportTableCall) Encoding(encoding string) *TableImportTableCall { // supplied. // At most one of Media and ResumableMedia may be set. func (c *TableImportTableCall) Media(r io.Reader, options ...googleapi.MediaOption) *TableImportTableCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -4102,11 +4059,7 @@ func (c *TableImportTableCall) Media(r io.Reader, options ...googleapi.MediaOpti // supersede any context previously provided to the Context method. func (c *TableImportTableCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TableImportTableCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -4115,7 +4068,7 @@ func (c *TableImportTableCall) ResumableMedia(ctx context.Context, r io.ReaderAt // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *TableImportTableCall) ProgressUpdater(pu googleapi.ProgressUpdater) *TableImportTableCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -4155,27 +4108,16 @@ func (c *TableImportTableCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "tables/import") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -4208,20 +4150,10 @@ func (c *TableImportTableCall) Do(opts ...googleapi.CallOption) (*Table, error) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -4739,16 +4671,12 @@ func (c *TablePatchCall) Do(opts ...googleapi.CallOption) (*Table, error) { // method id "fusiontables.table.replaceRows": type TableReplaceRowsCall struct { - s *Service - tableId string - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + tableId string + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // ReplaceRows: Replaces rows of an existing table. Current rows remain @@ -4810,12 +4738,7 @@ func (c *TableReplaceRowsCall) StartLine(startLine int64) *TableReplaceRowsCall // supplied. // At most one of Media and ResumableMedia may be set. func (c *TableReplaceRowsCall) Media(r io.Reader, options ...googleapi.MediaOption) *TableReplaceRowsCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -4830,11 +4753,7 @@ func (c *TableReplaceRowsCall) Media(r io.Reader, options ...googleapi.MediaOpti // supersede any context previously provided to the Context method. func (c *TableReplaceRowsCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TableReplaceRowsCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -4843,7 +4762,7 @@ func (c *TableReplaceRowsCall) ResumableMedia(ctx context.Context, r io.ReaderAt // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *TableReplaceRowsCall) ProgressUpdater(pu googleapi.ProgressUpdater) *TableReplaceRowsCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -4883,27 +4802,16 @@ func (c *TableReplaceRowsCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/replace") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -4939,20 +4847,10 @@ func (c *TableReplaceRowsCall) Do(opts ...googleapi.CallOption) (*Task, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() diff --git a/vendor/google.golang.org/api/games/v1/games-api.json b/vendor/google.golang.org/api/games/v1/games-api.json index 707af9008..5eed46697 100644 --- a/vendor/google.golang.org/api/games/v1/games-api.json +++ b/vendor/google.golang.org/api/games/v1/games-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/q_YPaIOiITyXFUcvpP2ZjCeLRJA\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/AluYBeM-ap_UK-7hz37851GQxJU\"", "discoveryVersion": "v1", "id": "games:v1", "name": "games", "canonicalName": "Games", "version": "v1", - "revision": "20170601", + "revision": "20170831", "title": "Google Play Game Services API", "description": "The API for Google Play Game Services.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/gamesconfiguration/v1configuration/gamesconfiguration-api.json b/vendor/google.golang.org/api/gamesconfiguration/v1configuration/gamesconfiguration-api.json index 4b6b3edba..24c3f4255 100644 --- a/vendor/google.golang.org/api/gamesconfiguration/v1configuration/gamesconfiguration-api.json +++ b/vendor/google.golang.org/api/gamesconfiguration/v1configuration/gamesconfiguration-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/EeinYhdEv3oJM--OvCR7gDew1T4\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/_7vulfAaATzvUDcyDfxHJGsHwZo\"", "discoveryVersion": "v1", "id": "gamesConfiguration:v1configuration", "name": "gamesConfiguration", "canonicalName": "Games Configuration", "version": "v1configuration", - "revision": "20170601", + "revision": "20170831", "title": "Google Play Game Services Publishing API", "description": "The Publishing API for Google Play Game Services.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/gamesconfiguration/v1configuration/gamesconfiguration-gen.go b/vendor/google.golang.org/api/gamesconfiguration/v1configuration/gamesconfiguration-gen.go index 9aa15d137..97f9681ec 100644 --- a/vendor/google.golang.org/api/gamesconfiguration/v1configuration/gamesconfiguration-gen.go +++ b/vendor/google.golang.org/api/gamesconfiguration/v1configuration/gamesconfiguration-gen.go @@ -1440,17 +1440,13 @@ func (c *AchievementConfigurationsUpdateCall) Do(opts ...googleapi.CallOption) ( // method id "gamesConfiguration.imageConfigurations.upload": type ImageConfigurationsUploadCall struct { - s *Service - resourceId string - imageType string - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + resourceId string + imageType string + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Upload: Uploads an image for a resource with the given ID and image @@ -1471,12 +1467,7 @@ func (r *ImageConfigurationsService) Upload(resourceId string, imageType string) // supplied. // At most one of Media and ResumableMedia may be set. func (c *ImageConfigurationsUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *ImageConfigurationsUploadCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -1491,11 +1482,7 @@ func (c *ImageConfigurationsUploadCall) Media(r io.Reader, options ...googleapi. // supersede any context previously provided to the Context method. func (c *ImageConfigurationsUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ImageConfigurationsUploadCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -1504,7 +1491,7 @@ func (c *ImageConfigurationsUploadCall) ResumableMedia(ctx context.Context, r io // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *ImageConfigurationsUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ImageConfigurationsUploadCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -1544,27 +1531,16 @@ func (c *ImageConfigurationsUploadCall) doRequest(alt string) (*http.Response, e var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "images/{resourceId}/imageType/{imageType}") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -1601,20 +1577,10 @@ func (c *ImageConfigurationsUploadCall) Do(opts ...googleapi.CallOption) (*Image if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() diff --git a/vendor/google.golang.org/api/gamesmanagement/v1management/gamesmanagement-api.json b/vendor/google.golang.org/api/gamesmanagement/v1management/gamesmanagement-api.json index 321ce54cf..a1c90be8c 100644 --- a/vendor/google.golang.org/api/gamesmanagement/v1management/gamesmanagement-api.json +++ b/vendor/google.golang.org/api/gamesmanagement/v1management/gamesmanagement-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/aOJoHLcG8sanKhT7niZhnljevtI\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/2NYw0mILjam7wyjJRi8Hm4qib6c\"", "discoveryVersion": "v1", "id": "gamesManagement:v1management", "name": "gamesManagement", "canonicalName": "Games Management", "version": "v1management", - "revision": "20170601", + "revision": "20170831", "title": "Google Play Game Services Management API", "description": "The Management API for Google Play Game Services.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/genomics/v1/genomics-api.json b/vendor/google.golang.org/api/genomics/v1/genomics-api.json index 582b774c1..523fa483f 100644 --- a/vendor/google.golang.org/api/genomics/v1/genomics-api.json +++ b/vendor/google.golang.org/api/genomics/v1/genomics-api.json @@ -1,26 +1,159 @@ { + "rootUrl": "https://genomics.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "genomics", + "batchPath": "batch", "id": "genomics:v1", "documentationLink": "https://cloud.google.com/genomics", - "revision": "20170803", + "revision": "20170909", "title": "Genomics API", - "ownerName": "Google", "discoveryVersion": "v1", + "ownerName": "Google", "resources": { - "callsets": { + "readgroupsets": { "methods": { - "get": { - "description": "Gets a call set by ID.\n\nFor the definitions of call sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "delete": { + "httpMethod": "DELETE", "response": { - "$ref": "CallSet" + "$ref": "Empty" }, "parameterOrder": [ - "callSetId" + "readGroupSetId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" ], - "httpMethod": "GET", "parameters": { - "callSetId": { + "readGroupSetId": { + "description": "The ID of the read group set to be deleted. The caller must have WRITE\npermissions to the dataset associated with this read group set.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/readgroupsets/{readGroupSetId}", + "path": "v1/readgroupsets/{readGroupSetId}", + "id": "genomics.readgroupsets.delete", + "description": "Deletes a read group set.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" + }, + "import": { + "description": "Creates read group sets by asynchronously importing the provided\ninformation.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThe caller must have WRITE permissions to the dataset.\n\n## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import\n\n- Tags will be converted to strings - tag types are not preserved\n- Comments (`@CO`) in the input file header will not be preserved\n- Original header order of references (`@SQ`) will not be preserved\n- Any reverse stranded unmapped reads will be reverse complemented, and\ntheir qualities (also the \"BQ\" and \"OQ\" tags, if any) will be reversed\n- Unmapped reads will be stripped of positional information (reference name\nand position)", + "request": { + "$ref": "ImportReadGroupSetsRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.read_write", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/readgroupsets:import", + "id": "genomics.readgroupsets.import", + "path": "v1/readgroupsets:import" + }, + "export": { + "description": "Exports a read group set to a BAM file in Google Cloud Storage.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nNote that currently there may be some differences between exported BAM\nfiles and the original BAM file at the time of import. See\nImportReadGroupSets\nfor caveats.", + "request": { + "$ref": "ExportReadGroupSetRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "readGroupSetId" + ], + "httpMethod": "POST", + "parameters": { + "readGroupSetId": { "location": "path", - "description": "The ID of the call set.", + "description": "Required. The ID of the read group set to export. The caller must have\nREAD access to this read group set.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.read_write", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/readgroupsets/{readGroupSetId}:export", + "id": "genomics.readgroupsets.export", + "path": "v1/readgroupsets/{readGroupSetId}:export" + }, + "search": { + "response": { + "$ref": "SearchReadGroupSetsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": {}, + "flatPath": "v1/readgroupsets/search", + "id": "genomics.readgroupsets.search", + "path": "v1/readgroupsets/search", + "request": { + "$ref": "SearchReadGroupSetsRequest" + }, + "description": "Searches for read group sets matching the criteria.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135)." + }, + "patch": { + "description": "Updates a read group set.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThis method supports patch semantics.", + "request": { + "$ref": "ReadGroupSet" + }, + "response": { + "$ref": "ReadGroupSet" + }, + "parameterOrder": [ + "readGroupSetId" + ], + "httpMethod": "PATCH", + "parameters": { + "readGroupSetId": { + "description": "The ID of the read group set to be updated. The caller must have WRITE\npermissions to the dataset associated with this read group set.", + "type": "string", + "required": true, + "location": "path" + }, + "updateMask": { + "type": "string", + "location": "query", + "format": "google-fieldmask", + "description": "An optional mask specifying which fields to update. Supported fields:\n\n* name.\n* referenceSetId.\n\nLeaving `updateMask` unset is equivalent to specifying all mutable\nfields." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/readgroupsets/{readGroupSetId}", + "id": "genomics.readgroupsets.patch", + "path": "v1/readgroupsets/{readGroupSetId}" + }, + "get": { + "description": "Gets a read group set by ID.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "httpMethod": "GET", + "response": { + "$ref": "ReadGroupSet" + }, + "parameterOrder": [ + "readGroupSetId" + ], + "parameters": { + "readGroupSetId": { + "location": "path", + "description": "The ID of the read group set.", "type": "string", "required": true } @@ -30,87 +163,147 @@ "https://www.googleapis.com/auth/genomics", "https://www.googleapis.com/auth/genomics.readonly" ], - "flatPath": "v1/callsets/{callSetId}", - "id": "genomics.callsets.get", - "path": "v1/callsets/{callSetId}" - }, - "patch": { - "id": "genomics.callsets.patch", - "path": "v1/callsets/{callSetId}", + "flatPath": "v1/readgroupsets/{readGroupSetId}", + "path": "v1/readgroupsets/{readGroupSetId}", + "id": "genomics.readgroupsets.get" + } + }, + "resources": { + "coveragebuckets": { + "methods": { + "list": { + "description": "Lists fixed width coverage buckets for a read group set, each of which\ncorrespond to a range of a reference sequence. Each bucket summarizes\ncoverage information across its corresponding genomic range.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nCoverage is defined as the number of reads which are aligned to a given\nbase in the reference sequence. Coverage buckets are available at several\nprecomputed bucket widths, enabling retrieval of various coverage 'zoom\nlevels'. The caller must have READ permissions for the target read group\nset.", + "httpMethod": "GET", + "response": { + "$ref": "ListCoverageBucketsResponse" + }, + "parameterOrder": [ + "readGroupSetId" + ], + "parameters": { + "pageToken": { + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 1024. The maximum value is 2048.", + "type": "integer" + }, + "start": { + "location": "query", + "format": "int64", + "description": "The start position of the range on the reference, 0-based inclusive. If\nspecified, `referenceName` must also be specified. Defaults to 0.", + "type": "string" + }, + "readGroupSetId": { + "type": "string", + "required": true, + "location": "path", + "description": "Required. The ID of the read group set over which coverage is requested." + }, + "targetBucketWidth": { + "location": "query", + "format": "int64", + "description": "The desired width of each reported coverage bucket in base pairs. This\nwill be rounded down to the nearest precomputed bucket width; the value\nof which is returned as `bucketWidth` in the response. Defaults\nto infinity (each bucket spans an entire reference sequence) or the length\nof the target range, if specified. The smallest precomputed\n`bucketWidth` is currently 2048 base pairs; this is subject to\nchange.", + "type": "string" + }, + "referenceName": { + "description": "The name of the reference to query, within the reference set associated\nwith this query. Optional.", + "type": "string", + "location": "query" + }, + "end": { + "type": "string", + "location": "query", + "format": "int64", + "description": "The end position of the range on the reference, 0-based exclusive. If\nspecified, `referenceName` must also be specified. If unset or 0, defaults\nto the length of the reference." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "flatPath": "v1/readgroupsets/{readGroupSetId}/coveragebuckets", + "path": "v1/readgroupsets/{readGroupSetId}/coveragebuckets", + "id": "genomics.readgroupsets.coveragebuckets.list" + } + } + } + } + }, + "reads": { + "methods": { + "search": { + "flatPath": "v1/reads/search", + "path": "v1/reads/search", + "id": "genomics.reads.search", + "description": "Gets a list of reads for one or more read group sets.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nReads search operates over a genomic coordinate space of reference sequence\n& position defined over the reference sequences to which the requested\nread group sets are aligned.\n\nIf a target positional range is specified, search returns all reads whose\nalignment to the reference genome overlap the range. A query which\nspecifies only read group set IDs yields all reads in those read group\nsets, including unmapped reads.\n\nAll reads returned (including reads on subsequent pages) are ordered by\ngenomic coordinate (by reference sequence, then position). Reads with\nequivalent genomic coordinates are returned in an unspecified order. This\norder is consistent, such that two queries for the same content (regardless\nof page size) yield reads in the same order across their respective streams\nof paginated responses.\n\nImplements\n[GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85).", + "request": { + "$ref": "SearchReadsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "SearchReadsResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ] + } + } + }, + "callsets": { + "methods": { + "create": { "request": { "$ref": "CallSet" }, - "description": "Updates a call set.\n\nFor the definitions of call sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThis method supports patch semantics.", + "description": "Creates a new call set.\n\nFor the definitions of call sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "httpMethod": "POST", + "parameterOrder": [], "response": { "$ref": "CallSet" }, - "parameterOrder": [ - "callSetId" - ], - "httpMethod": "PATCH", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "parameters": { - "updateMask": { - "format": "google-fieldmask", - "description": "An optional mask specifying which fields to update. At this time, the only\nmutable field is name. The only\nacceptable value is \"name\". If unspecified, all mutable fields will be\nupdated.", - "type": "string", - "location": "query" - }, - "callSetId": { - "description": "The ID of the call set to be updated.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/callsets/{callSetId}" - }, - "create": { "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics" ], "parameters": {}, "flatPath": "v1/callsets", - "id": "genomics.callsets.create", "path": "v1/callsets", - "request": { - "$ref": "CallSet" - }, - "description": "Creates a new call set.\n\nFor the definitions of call sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "response": { - "$ref": "CallSet" - }, - "parameterOrder": [], - "httpMethod": "POST" + "id": "genomics.callsets.create" }, "delete": { + "flatPath": "v1/callsets/{callSetId}", + "path": "v1/callsets/{callSetId}", + "id": "genomics.callsets.delete", "description": "Deletes a call set.\n\nFor the definitions of call sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", "httpMethod": "DELETE", - "parameterOrder": [ - "callSetId" - ], "response": { "$ref": "Empty" }, + "parameterOrder": [ + "callSetId" + ], "parameters": { "callSetId": { - "location": "path", "description": "The ID of the call set to be deleted.", "type": "string", - "required": true + "required": true, + "location": "path" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics" - ], - "flatPath": "v1/callsets/{callSetId}", - "path": "v1/callsets/{callSetId}", - "id": "genomics.callsets.delete" + ] }, "search": { "response": { @@ -131,97 +324,43 @@ "$ref": "SearchCallSetsRequest" }, "description": "Gets a list of call sets matching the criteria.\n\nFor the definitions of call sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178)." - } - } - }, - "reads": { - "methods": { - "search": { - "request": { - "$ref": "SearchReadsRequest" - }, - "description": "Gets a list of reads for one or more read group sets.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nReads search operates over a genomic coordinate space of reference sequence\n& position defined over the reference sequences to which the requested\nread group sets are aligned.\n\nIf a target positional range is specified, search returns all reads whose\nalignment to the reference genome overlap the range. A query which\nspecifies only read group set IDs yields all reads in those read group\nsets, including unmapped reads.\n\nAll reads returned (including reads on subsequent pages) are ordered by\ngenomic coordinate (by reference sequence, then position). Reads with\nequivalent genomic coordinates are returned in an unspecified order. This\norder is consistent, such that two queries for the same content (regardless\nof page size) yield reads in the same order across their respective streams\nof paginated responses.\n\nImplements\n[GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85).", - "httpMethod": "POST", - "parameterOrder": [], + }, + "get": { + "flatPath": "v1/callsets/{callSetId}", + "id": "genomics.callsets.get", + "path": "v1/callsets/{callSetId}", + "description": "Gets a call set by ID.\n\nFor the definitions of call sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", "response": { - "$ref": "SearchReadsResponse" + "$ref": "CallSet" }, + "parameterOrder": [ + "callSetId" + ], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics", "https://www.googleapis.com/auth/genomics.readonly" ], - "parameters": {}, - "flatPath": "v1/reads/search", - "path": "v1/reads/search", - "id": "genomics.reads.search" - } - } - }, - "readgroupsets": { - "methods": { - "export": { - "request": { - "$ref": "ExportReadGroupSetRequest" - }, - "description": "Exports a read group set to a BAM file in Google Cloud Storage.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nNote that currently there may be some differences between exported BAM\nfiles and the original BAM file at the time of import. See\nImportReadGroupSets\nfor caveats.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "readGroupSetId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.read_write", - "https://www.googleapis.com/auth/genomics" - ], "parameters": { - "readGroupSetId": { - "location": "path", - "description": "Required. The ID of the read group set to export. The caller must have\nREAD access to this read group set.", + "callSetId": { + "description": "The ID of the call set.", "type": "string", - "required": true + "required": true, + "location": "path" } - }, - "flatPath": "v1/readgroupsets/{readGroupSetId}:export", - "id": "genomics.readgroupsets.export", - "path": "v1/readgroupsets/{readGroupSetId}:export" - }, - "search": { - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "SearchReadGroupSetsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ], - "parameters": {}, - "flatPath": "v1/readgroupsets/search", - "path": "v1/readgroupsets/search", - "id": "genomics.readgroupsets.search", - "request": { - "$ref": "SearchReadGroupSetsRequest" - }, - "description": "Searches for read group sets matching the criteria.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135)." + } }, "patch": { - "flatPath": "v1/readgroupsets/{readGroupSetId}", - "id": "genomics.readgroupsets.patch", - "path": "v1/readgroupsets/{readGroupSetId}", "request": { - "$ref": "ReadGroupSet" + "$ref": "CallSet" }, - "description": "Updates a read group set.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThis method supports patch semantics.", + "description": "Updates a call set.\n\nFor the definitions of call sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThis method supports patch semantics.", "response": { - "$ref": "ReadGroupSet" + "$ref": "CallSet" }, "parameterOrder": [ - "readGroupSetId" + "callSetId" ], "httpMethod": "PATCH", "scopes": [ @@ -229,394 +368,165 @@ "https://www.googleapis.com/auth/genomics" ], "parameters": { - "readGroupSetId": { - "location": "path", - "description": "The ID of the read group set to be updated. The caller must have WRITE\npermissions to the dataset associated with this read group set.", - "type": "string", - "required": true - }, "updateMask": { "location": "query", "format": "google-fieldmask", - "description": "An optional mask specifying which fields to update. Supported fields:\n\n* name.\n* referenceSetId.\n\nLeaving `updateMask` unset is equivalent to specifying all mutable\nfields.", + "description": "An optional mask specifying which fields to update. At this time, the only\nmutable field is name. The only\nacceptable value is \"name\". If unspecified, all mutable fields will be\nupdated.", "type": "string" - } - } - }, - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "readGroupSetId" - ], - "response": { - "$ref": "ReadGroupSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ], - "parameters": { - "readGroupSetId": { - "location": "path", - "description": "The ID of the read group set.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/readgroupsets/{readGroupSetId}", - "path": "v1/readgroupsets/{readGroupSetId}", - "id": "genomics.readgroupsets.get", - "description": "Gets a read group set by ID.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" - }, - "import": { - "flatPath": "v1/readgroupsets:import", - "path": "v1/readgroupsets:import", - "id": "genomics.readgroupsets.import", - "request": { - "$ref": "ImportReadGroupSetsRequest" - }, - "description": "Creates read group sets by asynchronously importing the provided\ninformation.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThe caller must have WRITE permissions to the dataset.\n\n## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import\n\n- Tags will be converted to strings - tag types are not preserved\n- Comments (`@CO`) in the input file header will not be preserved\n- Original header order of references (`@SQ`) will not be preserved\n- Any reverse stranded unmapped reads will be reverse complemented, and\ntheir qualities (also the \"BQ\" and \"OQ\" tags, if any) will be reversed\n- Unmapped reads will be stripped of positional information (reference name\nand position)", - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.read_write", - "https://www.googleapis.com/auth/genomics" - ], - "parameters": {} - }, - "delete": { - "id": "genomics.readgroupsets.delete", - "path": "v1/readgroupsets/{readGroupSetId}", - "description": "Deletes a read group set.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "readGroupSetId" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "parameters": { - "readGroupSetId": { - "description": "The ID of the read group set to be deleted. The caller must have WRITE\npermissions to the dataset associated with this read group set.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/readgroupsets/{readGroupSetId}" - } - }, - "resources": { - "coveragebuckets": { - "methods": { - "list": { - "response": { - "$ref": "ListCoverageBucketsResponse" - }, - "parameterOrder": [ - "readGroupSetId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ], - "parameters": { - "referenceName": { - "location": "query", - "description": "The name of the reference to query, within the reference set associated\nwith this query. Optional.", - "type": "string" - }, - "end": { - "format": "int64", - "description": "The end position of the range on the reference, 0-based exclusive. If\nspecified, `referenceName` must also be specified. If unset or 0, defaults\nto the length of the reference.", - "type": "string", - "location": "query" - }, - "pageToken": { - "location": "query", - "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 1024. The maximum value is 2048.", - "type": "integer", - "location": "query" - }, - "start": { - "format": "int64", - "description": "The start position of the range on the reference, 0-based inclusive. If\nspecified, `referenceName` must also be specified. Defaults to 0.", - "type": "string", - "location": "query" - }, - "targetBucketWidth": { - "location": "query", - "format": "int64", - "description": "The desired width of each reported coverage bucket in base pairs. This\nwill be rounded down to the nearest precomputed bucket width; the value\nof which is returned as `bucketWidth` in the response. Defaults\nto infinity (each bucket spans an entire reference sequence) or the length\nof the target range, if specified. The smallest precomputed\n`bucketWidth` is currently 2048 base pairs; this is subject to\nchange.", - "type": "string" - }, - "readGroupSetId": { - "location": "path", - "description": "Required. The ID of the read group set over which coverage is requested.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/readgroupsets/{readGroupSetId}/coveragebuckets", - "id": "genomics.readgroupsets.coveragebuckets.list", - "path": "v1/readgroupsets/{readGroupSetId}/coveragebuckets", - "description": "Lists fixed width coverage buckets for a read group set, each of which\ncorrespond to a range of a reference sequence. Each bucket summarizes\ncoverage information across its corresponding genomic range.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nCoverage is defined as the number of reads which are aligned to a given\nbase in the reference sequence. Coverage buckets are available at several\nprecomputed bucket widths, enabling retrieval of various coverage 'zoom\nlevels'. The caller must have READ permissions for the target read group\nset." - } - } - } - } - }, - "annotationsets": { - "methods": { - "get": { - "parameters": { - "annotationSetId": { - "description": "The ID of the annotation set to be retrieved.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ], - "flatPath": "v1/annotationsets/{annotationSetId}", - "id": "genomics.annotationsets.get", - "path": "v1/annotationsets/{annotationSetId}", - "description": "Gets an annotation set. Caller must have READ permission for\nthe associated dataset.", - "response": { - "$ref": "AnnotationSet" - }, - "parameterOrder": [ - "annotationSetId" - ], - "httpMethod": "GET" - }, - "update": { - "flatPath": "v1/annotationsets/{annotationSetId}", - "path": "v1/annotationsets/{annotationSetId}", - "id": "genomics.annotationsets.update", - "request": { - "$ref": "AnnotationSet" - }, - "description": "Updates an annotation set. The update must respect all mutability\nrestrictions and other invariants described on the annotation set resource.\nCaller must have WRITE permission for the associated dataset.", - "httpMethod": "PUT", - "parameterOrder": [ - "annotationSetId" - ], - "response": { - "$ref": "AnnotationSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "parameters": { - "annotationSetId": { - "location": "path", - "description": "The ID of the annotation set to be updated.", - "type": "string", - "required": true }, - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "An optional mask specifying which fields to update. Mutable fields are\nname,\nsource_uri, and\ninfo. If unspecified, all\nmutable fields will be updated.", - "type": "string" - } - } - }, - "create": { - "response": { - "$ref": "AnnotationSet" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "flatPath": "v1/annotationsets", - "id": "genomics.annotationsets.create", - "path": "v1/annotationsets", - "description": "Creates a new annotation set. Caller must have WRITE permission for the\nassociated dataset.\n\nThe following fields are required:\n\n * datasetId\n * referenceSetId\n\nAll other fields may be optionally specified, unless documented as being\nserver-generated (for example, the `id` field).", - "request": { - "$ref": "AnnotationSet" - } - }, - "delete": { - "description": "Deletes an annotation set. Caller must have WRITE permission\nfor the associated annotation set.", - "httpMethod": "DELETE", - "parameterOrder": [ - "annotationSetId" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "annotationSetId": { - "description": "The ID of the annotation set to be deleted.", + "callSetId": { + "description": "The ID of the call set to be updated.", "type": "string", "required": true, "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "flatPath": "v1/annotationsets/{annotationSetId}", - "path": "v1/annotationsets/{annotationSetId}", - "id": "genomics.annotationsets.delete" - }, - "search": { - "response": { - "$ref": "SearchAnnotationSetsResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ], - "parameters": {}, - "flatPath": "v1/annotationsets/search", - "id": "genomics.annotationsets.search", - "path": "v1/annotationsets/search", - "request": { - "$ref": "SearchAnnotationSetsRequest" - }, - "description": "Searches for annotation sets that match the given criteria. Annotation sets\nare returned in an unspecified order. This order is consistent, such that\ntwo queries for the same content (regardless of page size) yield annotation\nsets in the same order across their respective streams of paginated\nresponses. Caller must have READ permission for the queried datasets." + "flatPath": "v1/callsets/{callSetId}", + "id": "genomics.callsets.patch", + "path": "v1/callsets/{callSetId}" } } }, "variants": { "methods": { "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "variantId" + ], + "httpMethod": "DELETE", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics" ], "parameters": { "variantId": { - "location": "path", "description": "The ID of the variant to be deleted.", "type": "string", - "required": true + "required": true, + "location": "path" } }, "flatPath": "v1/variants/{variantId}", - "path": "v1/variants/{variantId}", "id": "genomics.variants.delete", - "description": "Deletes a variant.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "httpMethod": "DELETE", - "parameterOrder": [ - "variantId" - ], + "path": "v1/variants/{variantId}", + "description": "Deletes a variant.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" + }, + "merge": { + "id": "genomics.variants.merge", + "path": "v1/variants:merge", + "request": { + "$ref": "MergeVariantsRequest" + }, + "description": "Merges the given variants with existing variants.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nEach variant will be\nmerged with an existing variant that matches its reference sequence,\nstart, end, reference bases, and alternative bases. If no such variant\nexists, a new one will be created.\n\nWhen variants are merged, the call information from the new variant\nis added to the existing variant. Variant info fields are merged as\nspecified in the\ninfoMergeConfig\nfield of the MergeVariantsRequest.\n\nPlease exercise caution when using this method! It is easy to introduce\nmistakes in existing variants and difficult to back out of them. For\nexample,\nsuppose you were trying to merge a new variant with an existing one and\nboth\nvariants contain calls that belong to callsets with the same callset ID.\n\n // Existing variant - irrelevant fields trimmed for clarity\n {\n \"variantSetId\": \"10473108253681171589\",\n \"referenceName\": \"1\",\n \"start\": \"10582\",\n \"referenceBases\": \"G\",\n \"alternateBases\": [\n \"A\"\n ],\n \"calls\": [\n {\n \"callSetId\": \"10473108253681171589-0\",\n \"callSetName\": \"CALLSET0\",\n \"genotype\": [\n 0,\n 1\n ],\n }\n ]\n }\n\n // New variant with conflicting call information\n {\n \"variantSetId\": \"10473108253681171589\",\n \"referenceName\": \"1\",\n \"start\": \"10582\",\n \"referenceBases\": \"G\",\n \"alternateBases\": [\n \"A\"\n ],\n \"calls\": [\n {\n \"callSetId\": \"10473108253681171589-0\",\n \"callSetName\": \"CALLSET0\",\n \"genotype\": [\n 1,\n 1\n ],\n }\n ]\n }\n\nThe resulting merged variant would overwrite the existing calls with those\nfrom the new variant:\n\n {\n \"variantSetId\": \"10473108253681171589\",\n \"referenceName\": \"1\",\n \"start\": \"10582\",\n \"referenceBases\": \"G\",\n \"alternateBases\": [\n \"A\"\n ],\n \"calls\": [\n {\n \"callSetId\": \"10473108253681171589-0\",\n \"callSetName\": \"CALLSET0\",\n \"genotype\": [\n 1,\n 1\n ],\n }\n ]\n }\n\nThis may be the desired outcome, but it is up to the user to determine if\nif that is indeed the case.", "response": { "$ref": "Empty" - } + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": {}, + "flatPath": "v1/variants:merge" }, "import": { - "id": "genomics.variants.import", - "path": "v1/variants:import", "description": "Creates variant data by asynchronously importing the provided information.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThe variants for import will be merged with any existing variant that\nmatches its reference sequence, start, end, reference bases, and\nalternative bases. If no such variant exists, a new one will be created.\n\nWhen variants are merged, the call information from the new variant\nis added to the existing variant, and Variant info fields are merged\nas specified in\ninfoMergeConfig.\nAs a special case, for single-sample VCF files, QUAL and FILTER fields will\nbe moved to the call level; these are sometimes interpreted in a\ncall-specific context.\nImported VCF headers are appended to the metadata already in a variant set.", "request": { "$ref": "ImportVariantsRequest" }, + "httpMethod": "POST", + "parameterOrder": [], "response": { "$ref": "Operation" }, - "parameterOrder": [], - "httpMethod": "POST", "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.read_write", "https://www.googleapis.com/auth/genomics" ], - "flatPath": "v1/variants:import" - }, - "merge": { - "description": "Merges the given variants with existing variants.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nEach variant will be\nmerged with an existing variant that matches its reference sequence,\nstart, end, reference bases, and alternative bases. If no such variant\nexists, a new one will be created.\n\nWhen variants are merged, the call information from the new variant\nis added to the existing variant. Variant info fields are merged as\nspecified in the\ninfoMergeConfig\nfield of the MergeVariantsRequest.\n\nPlease exercise caution when using this method! It is easy to introduce\nmistakes in existing variants and difficult to back out of them. For\nexample,\nsuppose you were trying to merge a new variant with an existing one and\nboth\nvariants contain calls that belong to callsets with the same callset ID.\n\n // Existing variant - irrelevant fields trimmed for clarity\n {\n \"variantSetId\": \"10473108253681171589\",\n \"referenceName\": \"1\",\n \"start\": \"10582\",\n \"referenceBases\": \"G\",\n \"alternateBases\": [\n \"A\"\n ],\n \"calls\": [\n {\n \"callSetId\": \"10473108253681171589-0\",\n \"callSetName\": \"CALLSET0\",\n \"genotype\": [\n 0,\n 1\n ],\n }\n ]\n }\n\n // New variant with conflicting call information\n {\n \"variantSetId\": \"10473108253681171589\",\n \"referenceName\": \"1\",\n \"start\": \"10582\",\n \"referenceBases\": \"G\",\n \"alternateBases\": [\n \"A\"\n ],\n \"calls\": [\n {\n \"callSetId\": \"10473108253681171589-0\",\n \"callSetName\": \"CALLSET0\",\n \"genotype\": [\n 1,\n 1\n ],\n }\n ]\n }\n\nThe resulting merged variant would overwrite the existing calls with those\nfrom the new variant:\n\n {\n \"variantSetId\": \"10473108253681171589\",\n \"referenceName\": \"1\",\n \"start\": \"10582\",\n \"referenceBases\": \"G\",\n \"alternateBases\": [\n \"A\"\n ],\n \"calls\": [\n {\n \"callSetId\": \"10473108253681171589-0\",\n \"callSetName\": \"CALLSET0\",\n \"genotype\": [\n 1,\n 1\n ],\n }\n ]\n }\n\nThis may be the desired outcome, but it is up to the user to determine if\nif that is indeed the case.", - "request": { - "$ref": "MergeVariantsRequest" - }, - "response": { - "$ref": "Empty" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "flatPath": "v1/variants:merge", - "id": "genomics.variants.merge", - "path": "v1/variants:merge" + "flatPath": "v1/variants:import", + "path": "v1/variants:import", + "id": "genomics.variants.import" }, "create": { "request": { "$ref": "Variant" }, "description": "Creates a new variant.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "httpMethod": "POST", - "parameterOrder": [], "response": { "$ref": "Variant" }, + "parameterOrder": [], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics" ], "parameters": {}, "flatPath": "v1/variants", - "path": "v1/variants", - "id": "genomics.variants.create" + "id": "genomics.variants.create", + "path": "v1/variants" }, "search": { + "request": { + "$ref": "SearchVariantsRequest" + }, + "description": "Gets a list of variants matching the criteria.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126).", "response": { "$ref": "SearchVariantsResponse" }, "parameterOrder": [], "httpMethod": "POST", - "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics", "https://www.googleapis.com/auth/genomics.readonly" ], + "parameters": {}, "flatPath": "v1/variants/search", "id": "genomics.variants.search", - "path": "v1/variants/search", - "description": "Gets a list of variants matching the criteria.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126).", + "path": "v1/variants/search" + }, + "patch": { + "description": "Updates a variant.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThis method supports patch semantics. Returns the modified variant without\nits calls.", "request": { - "$ref": "SearchVariantsRequest" - } + "$ref": "Variant" + }, + "response": { + "$ref": "Variant" + }, + "parameterOrder": [ + "variantId" + ], + "httpMethod": "PATCH", + "parameters": { + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "An optional mask specifying which fields to update. At this time, mutable\nfields are names and\ninfo. Acceptable values are \"names\" and\n\"info\". If unspecified, all mutable fields will be updated.", + "type": "string" + }, + "variantId": { + "location": "path", + "description": "The ID of the variant to be updated.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/variants/{variantId}", + "id": "genomics.variants.patch", + "path": "v1/variants/{variantId}" }, "get": { - "description": "Gets a variant by ID.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", "response": { "$ref": "Variant" }, @@ -639,65 +549,160 @@ ], "flatPath": "v1/variants/{variantId}", "id": "genomics.variants.get", - "path": "v1/variants/{variantId}" - }, - "patch": { + "path": "v1/variants/{variantId}", + "description": "Gets a variant by ID.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" + } + } + }, + "annotationsets": { + "methods": { + "delete": { + "description": "Deletes an annotation set. Caller must have WRITE permission\nfor the associated annotation set.", + "httpMethod": "DELETE", + "parameterOrder": [ + "annotationSetId" + ], "response": { - "$ref": "Variant" + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "annotationSetId": { + "location": "path", + "description": "The ID of the annotation set to be deleted.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/annotationsets/{annotationSetId}", + "path": "v1/annotationsets/{annotationSetId}", + "id": "genomics.annotationsets.delete" + }, + "search": { + "id": "genomics.annotationsets.search", + "path": "v1/annotationsets/search", + "description": "Searches for annotation sets that match the given criteria. Annotation sets\nare returned in an unspecified order. This order is consistent, such that\ntwo queries for the same content (regardless of page size) yield annotation\nsets in the same order across their respective streams of paginated\nresponses. Caller must have READ permission for the queried datasets.", + "request": { + "$ref": "SearchAnnotationSetsRequest" + }, + "response": { + "$ref": "SearchAnnotationSetsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "flatPath": "v1/annotationsets/search" + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "AnnotationSet" }, "parameterOrder": [ - "variantId" + "annotationSetId" ], - "httpMethod": "PATCH", "parameters": { - "updateMask": { - "format": "google-fieldmask", - "description": "An optional mask specifying which fields to update. At this time, mutable\nfields are names and\ninfo. Acceptable values are \"names\" and\n\"info\". If unspecified, all mutable fields will be updated.", - "type": "string", - "location": "query" - }, - "variantId": { - "description": "The ID of the variant to be updated.", + "annotationSetId": { + "description": "The ID of the annotation set to be retrieved.", "type": "string", "required": true, "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "flatPath": "v1/annotationsets/{annotationSetId}", + "path": "v1/annotationsets/{annotationSetId}", + "id": "genomics.annotationsets.get", + "description": "Gets an annotation set. Caller must have READ permission for\nthe associated dataset." + }, + "update": { "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics" ], - "flatPath": "v1/variants/{variantId}", - "id": "genomics.variants.patch", - "path": "v1/variants/{variantId}", - "description": "Updates a variant.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThis method supports patch semantics. Returns the modified variant without\nits calls.", + "parameters": { + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "An optional mask specifying which fields to update. Mutable fields are\nname,\nsource_uri, and\ninfo. If unspecified, all\nmutable fields will be updated.", + "type": "string" + }, + "annotationSetId": { + "description": "The ID of the annotation set to be updated.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/annotationsets/{annotationSetId}", + "id": "genomics.annotationsets.update", + "path": "v1/annotationsets/{annotationSetId}", "request": { - "$ref": "Variant" - } + "$ref": "AnnotationSet" + }, + "description": "Updates an annotation set. The update must respect all mutability\nrestrictions and other invariants described on the annotation set resource.\nCaller must have WRITE permission for the associated dataset.", + "response": { + "$ref": "AnnotationSet" + }, + "parameterOrder": [ + "annotationSetId" + ], + "httpMethod": "PUT" + }, + "create": { + "response": { + "$ref": "AnnotationSet" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": {}, + "flatPath": "v1/annotationsets", + "id": "genomics.annotationsets.create", + "path": "v1/annotationsets", + "request": { + "$ref": "AnnotationSet" + }, + "description": "Creates a new annotation set. Caller must have WRITE permission for the\nassociated dataset.\n\nThe following fields are required:\n\n * datasetId\n * referenceSetId\n\nAll other fields may be optionally specified, unless documented as being\nserver-generated (for example, the `id` field)." } } }, "references": { "methods": { "search": { - "flatPath": "v1/references/search", - "path": "v1/references/search", - "id": "genomics.references.search", "request": { "$ref": "SearchReferencesRequest" }, "description": "Searches for references which match the given criteria.\n\nFor the definitions of references and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146).", - "httpMethod": "POST", - "parameterOrder": [], "response": { "$ref": "SearchReferencesResponse" }, + "parameterOrder": [], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics", "https://www.googleapis.com/auth/genomics.readonly" ], - "parameters": {} + "parameters": {}, + "flatPath": "v1/references/search", + "id": "genomics.references.search", + "path": "v1/references/search" }, "get": { "response": { @@ -707,6 +712,11 @@ "referenceId" ], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], "parameters": { "referenceId": { "description": "The ID of the reference.", @@ -715,11 +725,6 @@ "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ], "flatPath": "v1/references/{referenceId}", "id": "genomics.references.get", "path": "v1/references/{referenceId}", @@ -730,9 +735,6 @@ "bases": { "methods": { "list": { - "flatPath": "v1/references/{referenceId}/bases", - "id": "genomics.references.bases.list", - "path": "v1/references/{referenceId}/bases", "description": "Lists the bases in a reference, optionally restricted to a range.\n\nFor the definitions of references and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221).", "response": { "$ref": "ListBasesResponse" @@ -741,29 +743,12 @@ "referenceId" ], "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ], "parameters": { - "start": { - "format": "int64", - "description": "The start position (0-based) of this query. Defaults to 0.", - "type": "string", - "location": "query" - }, - "referenceId": { - "description": "The ID of the reference.", - "type": "string", - "required": true, - "location": "path" - }, "end": { + "location": "query", "format": "int64", "description": "The end position (0-based, exclusive) of this query. Defaults to the length\nof this reference.", - "type": "string", - "location": "query" + "type": "string" }, "pageToken": { "location": "query", @@ -771,12 +756,32 @@ "type": "string" }, "pageSize": { - "type": "integer", - "location": "query", "format": "int32", - "description": "The maximum number of bases to return in a single page. If unspecified,\ndefaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base\npairs)." + "description": "The maximum number of bases to return in a single page. If unspecified,\ndefaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base\npairs).", + "type": "integer", + "location": "query" + }, + "start": { + "location": "query", + "format": "int64", + "description": "The start position (0-based) of this query. Defaults to 0.", + "type": "string" + }, + "referenceId": { + "description": "The ID of the reference.", + "type": "string", + "required": true, + "location": "path" } - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "flatPath": "v1/references/{referenceId}/bases", + "id": "genomics.references.bases.list", + "path": "v1/references/{referenceId}/bases" } } } @@ -784,89 +789,23 @@ }, "datasets": { "methods": { - "list": { - "response": { - "$ref": "ListDatasetsResponse" - }, - "httpMethod": "GET", - "parameterOrder": [], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ], - "parameters": { - "projectId": { - "location": "query", - "description": "Required. The Google Cloud project ID to list datasets for.", - "type": "string" - }, - "pageToken": { - "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 50. The maximum value is 1024.", - "type": "integer" - } - }, - "flatPath": "v1/datasets", - "id": "genomics.datasets.list", - "path": "v1/datasets", - "description": "Lists datasets within a project.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" - }, - "setIamPolicy": { - "request": { - "$ref": "SetIamPolicyRequest" - }, - "description": "Sets the access control policy on the specified dataset. Replaces any\nexisting policy.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nSee \u003ca href=\"/iam/docs/managing-policies#setting_a_policy\"\u003eSetting a\nPolicy\u003c/a\u003e for more information.", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", + "getIamPolicy": { "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics" ], "parameters": { "resource": { - "location": "path", "description": "REQUIRED: The resource for which policy is being specified. Format is\n`datasets/\u003cdataset ID\u003e`.", "type": "string", "required": true, - "pattern": "^datasets/[^/]+$" + "pattern": "^datasets/[^/]+$", + "location": "path" } }, - "flatPath": "v1/datasets/{datasetsId}:setIamPolicy", - "id": "genomics.datasets.setIamPolicy", - "path": "v1/{+resource}:setIamPolicy" - }, - "create": { - "id": "genomics.datasets.create", - "path": "v1/datasets", - "request": { - "$ref": "Dataset" - }, - "description": "Creates a new dataset.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "response": { - "$ref": "Dataset" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "parameters": {}, - "flatPath": "v1/datasets" - }, - "getIamPolicy": { + "flatPath": "v1/datasets/{datasetsId}:getIamPolicy", + "id": "genomics.datasets.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", "request": { "$ref": "GetIamPolicyRequest" }, @@ -877,31 +816,12 @@ "parameterOrder": [ "resource" ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "parameters": { - "resource": { - "type": "string", - "required": true, - "pattern": "^datasets/[^/]+$", - "location": "path", - "description": "REQUIRED: The resource for which policy is being specified. Format is\n`datasets/\u003cdataset ID\u003e`." - } - }, - "flatPath": "v1/datasets/{datasetsId}:getIamPolicy", - "id": "genomics.datasets.getIamPolicy", - "path": "v1/{+resource}:getIamPolicy" + "httpMethod": "POST" }, - "undelete": { - "flatPath": "v1/datasets/{datasetId}:undelete", - "id": "genomics.datasets.undelete", - "path": "v1/datasets/{datasetId}:undelete", - "description": "Undeletes a dataset by restoring a dataset which was deleted via this API.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThis operation is only possible for a week after the deletion occurred.", + "patch": { + "description": "Updates a dataset.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThis method supports patch semantics.", "request": { - "$ref": "UndeleteDatasetRequest" + "$ref": "Dataset" }, "response": { "$ref": "Dataset" @@ -909,7 +829,41 @@ "parameterOrder": [ "datasetId" ], + "httpMethod": "PATCH", + "parameters": { + "datasetId": { + "location": "path", + "description": "The ID of the dataset to be updated.", + "type": "string", + "required": true + }, + "updateMask": { + "format": "google-fieldmask", + "description": "An optional mask specifying which fields to update. At this time, the only\nmutable field is name. The only\nacceptable value is \"name\". If unspecified, all mutable fields will be\nupdated.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/datasets/{datasetId}", + "id": "genomics.datasets.patch", + "path": "v1/datasets/{datasetId}" + }, + "undelete": { + "description": "Undeletes a dataset by restoring a dataset which was deleted via this API.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThis operation is only possible for a week after the deletion occurred.", + "request": { + "$ref": "UndeleteDatasetRequest" + }, "httpMethod": "POST", + "parameterOrder": [ + "datasetId" + ], + "response": { + "$ref": "Dataset" + }, "parameters": { "datasetId": { "description": "The ID of the dataset to be undeleted.", @@ -921,9 +875,15 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics" - ] + ], + "flatPath": "v1/datasets/{datasetId}:undelete", + "path": "v1/datasets/{datasetId}:undelete", + "id": "genomics.datasets.undelete" }, "get": { + "flatPath": "v1/datasets/{datasetId}", + "id": "genomics.datasets.get", + "path": "v1/datasets/{datasetId}", "description": "Gets a dataset by ID.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", "response": { "$ref": "Dataset" @@ -932,6 +892,11 @@ "datasetId" ], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], "parameters": { "datasetId": { "location": "path", @@ -939,87 +904,46 @@ "type": "string", "required": true } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ], - "flatPath": "v1/datasets/{datasetId}", - "id": "genomics.datasets.get", - "path": "v1/datasets/{datasetId}" - }, - "patch": { - "response": { - "$ref": "Dataset" - }, - "parameterOrder": [ - "datasetId" - ], - "httpMethod": "PATCH", - "parameters": { - "datasetId": { - "description": "The ID of the dataset to be updated.", - "type": "string", - "required": true, - "location": "path" - }, - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "An optional mask specifying which fields to update. At this time, the only\nmutable field is name. The only\nacceptable value is \"name\". If unspecified, all mutable fields will be\nupdated.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "flatPath": "v1/datasets/{datasetId}", - "id": "genomics.datasets.patch", - "path": "v1/datasets/{datasetId}", - "description": "Updates a dataset.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThis method supports patch semantics.", - "request": { - "$ref": "Dataset" } }, "testIamPermissions": { - "flatPath": "v1/datasets/{datasetsId}:testIamPermissions", - "id": "genomics.datasets.testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "description": "Returns permissions that a caller has on the specified resource.\nSee \u003ca href=\"/iam/docs/managing-policies#testing_permissions\"\u003eTesting\nPermissions\u003c/a\u003e for more information.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "response": { - "$ref": "TestIamPermissionsResponse" - }, + "httpMethod": "POST", "parameterOrder": [ "resource" ], - "httpMethod": "POST", + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameters": { + "resource": { + "pattern": "^datasets/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which policy is being specified. Format is\n`datasets/\u003cdataset ID\u003e`.", + "type": "string", + "required": true + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics" ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which policy is being specified. Format is\n`datasets/\u003cdataset ID\u003e`.", - "type": "string", - "required": true, - "pattern": "^datasets/[^/]+$", - "location": "path" - } + "flatPath": "v1/datasets/{datasetsId}:testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "id": "genomics.datasets.testIamPermissions", + "description": "Returns permissions that a caller has on the specified resource.\nSee \u003ca href=\"/iam/docs/managing-policies#testing_permissions\"\u003eTesting\nPermissions\u003c/a\u003e for more information.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "request": { + "$ref": "TestIamPermissionsRequest" } }, "delete": { - "httpMethod": "DELETE", - "parameterOrder": [ - "datasetId" - ], + "description": "Deletes a dataset and all of its contents (all read group sets,\nreference sets, variant sets, call sets, annotation sets, etc.)\nThis is reversible (up to one week after the deletion) via\nthe\ndatasets.undelete\noperation.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", "response": { "$ref": "Empty" }, + "parameterOrder": [ + "datasetId" + ], + "httpMethod": "DELETE", "parameters": { "datasetId": { "description": "The ID of the dataset to be deleted.", @@ -1033,46 +957,98 @@ "https://www.googleapis.com/auth/genomics" ], "flatPath": "v1/datasets/{datasetId}", - "path": "v1/datasets/{datasetId}", "id": "genomics.datasets.delete", - "description": "Deletes a dataset and all of its contents (all read group sets,\nreference sets, variant sets, call sets, annotation sets, etc.)\nThis is reversible (up to one week after the deletion) via\nthe\ndatasets.undelete\noperation.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" - } - } - }, - "variantsets": { - "methods": { - "export": { + "path": "v1/datasets/{datasetId}" + }, + "list": { + "response": { + "$ref": "ListDatasetsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", "parameters": { - "variantSetId": { - "location": "path", - "description": "Required. The ID of the variant set that contains variant data which\nshould be exported. The caller must have READ access to this variant set.", - "type": "string", - "required": true + "pageToken": { + "location": "query", + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 50. The maximum value is 1024.", + "type": "integer", + "location": "query" + }, + "projectId": { + "location": "query", + "description": "Required. The Google Cloud project ID to list datasets for.", + "type": "string" } }, "scopes": [ - "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "flatPath": "v1/datasets", + "id": "genomics.datasets.list", + "path": "v1/datasets", + "description": "Lists datasets within a project.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" + }, + "create": { + "description": "Creates a new dataset.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "request": { + "$ref": "Dataset" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Dataset" + }, + "parameters": {}, + "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics" ], - "flatPath": "v1/variantsets/{variantSetId}:export", - "path": "v1/variantsets/{variantSetId}:export", - "id": "genomics.variantsets.export", - "description": "Exports variant set data to an external destination.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "flatPath": "v1/datasets", + "path": "v1/datasets", + "id": "genomics.datasets.create" + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified dataset. Replaces any\nexisting policy.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nSee \u003ca href=\"/iam/docs/managing-policies#setting_a_policy\"\u003eSetting a\nPolicy\u003c/a\u003e for more information.", "request": { - "$ref": "ExportVariantSetRequest" + "$ref": "SetIamPolicyRequest" }, "httpMethod": "POST", "parameterOrder": [ - "variantSetId" + "resource" ], "response": { - "$ref": "Operation" - } - }, + "$ref": "Policy" + }, + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which policy is being specified. Format is\n`datasets/\u003cdataset ID\u003e`.", + "type": "string", + "required": true, + "pattern": "^datasets/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/datasets/{datasetsId}:setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "id": "genomics.datasets.setIamPolicy" + } + } + }, + "annotations": { + "methods": { "search": { "response": { - "$ref": "SearchVariantSetsResponse" + "$ref": "SearchAnnotationsResponse" }, "parameterOrder": [], "httpMethod": "POST", @@ -1082,19 +1058,191 @@ "https://www.googleapis.com/auth/genomics", "https://www.googleapis.com/auth/genomics.readonly" ], - "flatPath": "v1/variantsets/search", - "id": "genomics.variantsets.search", - "path": "v1/variantsets/search", - "description": "Returns a list of all variant sets matching search criteria.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49).", + "flatPath": "v1/annotations/search", + "id": "genomics.annotations.search", + "path": "v1/annotations/search", + "description": "Searches for annotations that match the given criteria. Results are\nordered by genomic coordinate (by reference sequence, then position).\nAnnotations with equivalent genomic coordinates are returned in an\nunspecified order. This order is consistent, such that two queries for the\nsame content (regardless of page size) yield annotations in the same order\nacross their respective streams of paginated responses. Caller must have\nREAD permission for the queried annotation sets.", "request": { - "$ref": "SearchVariantSetsRequest" + "$ref": "SearchAnnotationsRequest" } }, - "patch": { - "description": "Updates a variant set using patch semantics.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "request": { - "$ref": "VariantSet" + "get": { + "description": "Gets an annotation. Caller must have READ permission\nfor the associated annotation set.", + "response": { + "$ref": "Annotation" }, + "parameterOrder": [ + "annotationId" + ], + "httpMethod": "GET", + "parameters": { + "annotationId": { + "description": "The ID of the annotation to be retrieved.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "flatPath": "v1/annotations/{annotationId}", + "id": "genomics.annotations.get", + "path": "v1/annotations/{annotationId}" + }, + "update": { + "id": "genomics.annotations.update", + "path": "v1/annotations/{annotationId}", + "description": "Updates an annotation. Caller must have\nWRITE permission for the associated dataset.", + "request": { + "$ref": "Annotation" + }, + "response": { + "$ref": "Annotation" + }, + "parameterOrder": [ + "annotationId" + ], + "httpMethod": "PUT", + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "description": "An optional mask specifying which fields to update. Mutable fields are\nname,\nvariant,\ntranscript, and\ninfo. If unspecified, all mutable\nfields will be updated.", + "type": "string", + "location": "query" + }, + "annotationId": { + "type": "string", + "required": true, + "location": "path", + "description": "The ID of the annotation to be updated." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/annotations/{annotationId}" + }, + "delete": { + "flatPath": "v1/annotations/{annotationId}", + "path": "v1/annotations/{annotationId}", + "id": "genomics.annotations.delete", + "description": "Deletes an annotation. Caller must have WRITE permission for\nthe associated annotation set.", + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "annotationId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "annotationId": { + "description": "The ID of the annotation to be deleted.", + "type": "string", + "required": true, + "location": "path" + } + } + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Annotation" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/annotations", + "path": "v1/annotations", + "id": "genomics.annotations.create", + "description": "Creates a new annotation. Caller must have WRITE permission\nfor the associated annotation set.\n\nThe following fields are required:\n\n* annotationSetId\n* referenceName or\n referenceId\n\n### Transcripts\n\nFor annotations of type TRANSCRIPT, the following fields of\ntranscript must be provided:\n\n* exons.start\n* exons.end\n\nAll other fields may be optionally specified, unless documented as being\nserver-generated (for example, the `id` field). The annotated\nrange must be no longer than 100Mbp (mega base pairs). See the\nAnnotation resource\nfor additional restrictions on each field.", + "request": { + "$ref": "Annotation" + } + }, + "batchCreate": { + "flatPath": "v1/annotations:batchCreate", + "path": "v1/annotations:batchCreate", + "id": "genomics.annotations.batchCreate", + "description": "Creates one or more new annotations atomically. All annotations must\nbelong to the same annotation set. Caller must have WRITE\npermission for this annotation set. For optimal performance, batch\npositionally adjacent annotations together.\n\nIf the request has a systemic issue, such as an attempt to write to\nan inaccessible annotation set, the entire RPC will fail accordingly. For\nlesser data issues, when possible an error will be isolated to the\ncorresponding batch entry in the response; the remaining well formed\nannotations will be created normally.\n\nFor details on the requirements for each individual annotation resource,\nsee\nCreateAnnotation.", + "request": { + "$ref": "BatchCreateAnnotationsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "BatchCreateAnnotationsResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ] + } + } + }, + "variantsets": { + "methods": { + "export": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "variantSetId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "variantSetId": { + "location": "path", + "description": "Required. The ID of the variant set that contains variant data which\nshould be exported. The caller must have READ access to this variant set.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/variantsets/{variantSetId}:export", + "id": "genomics.variantsets.export", + "path": "v1/variantsets/{variantSetId}:export", + "request": { + "$ref": "ExportVariantSetRequest" + }, + "description": "Exports variant set data to an external destination.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" + }, + "search": { + "request": { + "$ref": "SearchVariantSetsRequest" + }, + "description": "Returns a list of all variant sets matching search criteria.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49).", + "response": { + "$ref": "SearchVariantSetsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": {}, + "flatPath": "v1/variantsets/search", + "id": "genomics.variantsets.search", + "path": "v1/variantsets/search" + }, + "patch": { "response": { "$ref": "VariantSet" }, @@ -1102,6 +1250,10 @@ "variantSetId" ], "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], "parameters": { "updateMask": { "format": "google-fieldmask", @@ -1110,19 +1262,19 @@ "location": "query" }, "variantSetId": { + "location": "path", "description": "The ID of the variant to be updated (must already exist).", "type": "string", - "required": true, - "location": "path" + "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], "flatPath": "v1/variantsets/{variantSetId}", "id": "genomics.variantsets.patch", - "path": "v1/variantsets/{variantSetId}" + "path": "v1/variantsets/{variantSetId}", + "request": { + "$ref": "VariantSet" + }, + "description": "Updates a variant set using patch semantics.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" }, "get": { "description": "Gets a variant set by ID.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", @@ -1151,7 +1303,6 @@ "path": "v1/variantsets/{variantSetId}" }, "delete": { - "description": "Deletes a variant set including all variants, call sets, and calls within.\nThis is not reversible.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", "response": { "$ref": "Empty" }, @@ -1161,10 +1312,10 @@ "httpMethod": "DELETE", "parameters": { "variantSetId": { - "location": "path", "description": "The ID of the variant set to be deleted.", "type": "string", - "required": true + "required": true, + "location": "path" } }, "scopes": [ @@ -1173,7 +1324,8 @@ ], "flatPath": "v1/variantsets/{variantSetId}", "id": "genomics.variantsets.delete", - "path": "v1/variantsets/{variantSetId}" + "path": "v1/variantsets/{variantSetId}", + "description": "Deletes a variant set including all variants, call sets, and calls within.\nThis is not reversible.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" }, "create": { "response": { @@ -1181,180 +1333,59 @@ }, "parameterOrder": [], "httpMethod": "POST", + "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics" ], - "parameters": {}, "flatPath": "v1/variantsets", "id": "genomics.variantsets.create", "path": "v1/variantsets", + "description": "Creates a new variant set.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThe provided variant set must have a valid `datasetId` set - all other\nfields are optional. Note that the `id` field will be ignored, as this is\nassigned by the server.", "request": { "$ref": "VariantSet" - }, - "description": "Creates a new variant set.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThe provided variant set must have a valid `datasetId` set - all other\nfields are optional. Note that the `id` field will be ignored, as this is\nassigned by the server." - } - } - }, - "annotations": { - "methods": { - "create": { - "request": { - "$ref": "Annotation" - }, - "description": "Creates a new annotation. Caller must have WRITE permission\nfor the associated annotation set.\n\nThe following fields are required:\n\n* annotationSetId\n* referenceName or\n referenceId\n\n### Transcripts\n\nFor annotations of type TRANSCRIPT, the following fields of\ntranscript must be provided:\n\n* exons.start\n* exons.end\n\nAll other fields may be optionally specified, unless documented as being\nserver-generated (for example, the `id` field). The annotated\nrange must be no longer than 100Mbp (mega base pairs). See the\nAnnotation resource\nfor additional restrictions on each field.", - "response": { - "$ref": "Annotation" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "parameters": {}, - "flatPath": "v1/annotations", - "id": "genomics.annotations.create", - "path": "v1/annotations" - }, - "batchCreate": { - "request": { - "$ref": "BatchCreateAnnotationsRequest" - }, - "description": "Creates one or more new annotations atomically. All annotations must\nbelong to the same annotation set. Caller must have WRITE\npermission for this annotation set. For optimal performance, batch\npositionally adjacent annotations together.\n\nIf the request has a systemic issue, such as an attempt to write to\nan inaccessible annotation set, the entire RPC will fail accordingly. For\nlesser data issues, when possible an error will be isolated to the\ncorresponding batch entry in the response; the remaining well formed\nannotations will be created normally.\n\nFor details on the requirements for each individual annotation resource,\nsee\nCreateAnnotation.", - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "BatchCreateAnnotationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "parameters": {}, - "flatPath": "v1/annotations:batchCreate", - "path": "v1/annotations:batchCreate", - "id": "genomics.annotations.batchCreate" - }, - "search": { - "id": "genomics.annotations.search", - "path": "v1/annotations/search", - "request": { - "$ref": "SearchAnnotationsRequest" - }, - "description": "Searches for annotations that match the given criteria. Results are\nordered by genomic coordinate (by reference sequence, then position).\nAnnotations with equivalent genomic coordinates are returned in an\nunspecified order. This order is consistent, such that two queries for the\nsame content (regardless of page size) yield annotations in the same order\nacross their respective streams of paginated responses. Caller must have\nREAD permission for the queried annotation sets.", - "response": { - "$ref": "SearchAnnotationsResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ], - "parameters": {}, - "flatPath": "v1/annotations/search" - }, - "get": { - "flatPath": "v1/annotations/{annotationId}", - "path": "v1/annotations/{annotationId}", - "id": "genomics.annotations.get", - "description": "Gets an annotation. Caller must have READ permission\nfor the associated annotation set.", - "httpMethod": "GET", - "parameterOrder": [ - "annotationId" - ], - "response": { - "$ref": "Annotation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ], - "parameters": { - "annotationId": { - "type": "string", - "required": true, - "location": "path", - "description": "The ID of the annotation to be retrieved." - } } - }, - "update": { - "httpMethod": "PUT", - "parameterOrder": [ - "annotationId" - ], - "response": { - "$ref": "Annotation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "parameters": { - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "An optional mask specifying which fields to update. Mutable fields are\nname,\nvariant,\ntranscript, and\ninfo. If unspecified, all mutable\nfields will be updated.", - "type": "string" - }, - "annotationId": { - "location": "path", - "description": "The ID of the annotation to be updated.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/annotations/{annotationId}", - "path": "v1/annotations/{annotationId}", - "id": "genomics.annotations.update", - "request": { - "$ref": "Annotation" - }, - "description": "Updates an annotation. Caller must have\nWRITE permission for the associated dataset." - }, - "delete": { - "description": "Deletes an annotation. Caller must have WRITE permission for\nthe associated annotation set.", - "httpMethod": "DELETE", - "parameterOrder": [ - "annotationId" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "annotationId": { - "location": "path", - "description": "The ID of the annotation to be deleted.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "flatPath": "v1/annotations/{annotationId}", - "path": "v1/annotations/{annotationId}", - "id": "genomics.annotations.delete" } } }, "operations": { "methods": { - "get": { - "id": "genomics.operations.get", - "path": "v1/{+name}", - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "cancel": { + "id": "genomics.operations.cancel", + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients may use Operations.GetOperation or Operations.ListOperations to check whether the cancellation succeeded or the operation completed despite cancellation.", "response": { - "$ref": "Operation" + "$ref": "Empty" }, "parameterOrder": [ "name" ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "type": "string", + "required": true, + "pattern": "^operations/.+$", + "location": "path" + } + }, + "flatPath": "v1/operations/{operationsId}:cancel" + }, + "get": { + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -1369,110 +1400,91 @@ "location": "path" } }, - "flatPath": "v1/operations/{operationsId}" + "flatPath": "v1/operations/{operationsId}", + "id": "genomics.operations.get", + "path": "v1/{+name}", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." }, "list": { - "response": { - "$ref": "ListOperationsResponse" - }, "parameterOrder": [ "name" ], "httpMethod": "GET", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "The maximum number of results to return. If unspecified, defaults to\n256. The maximum value is 2048.", + "type": "integer" + }, + "filter": { + "description": "A string for filtering Operations.\nThe following filter fields are supported:\n\n* projectId: Required. Corresponds to\n OperationMetadata.projectId.\n* createTime: The time this job was created, in seconds from the\n [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `\u003e=` and/or `\u003c=`\n operators.\n* status: Can be `RUNNING`, `SUCCESS`, `FAILURE`, or `CANCELED`. Only\n one status may be specified.\n* labels.key where key is a label key.\n\nExamples:\n\n* `projectId = my-project AND createTime \u003e= 1432140000`\n* `projectId = my-project AND createTime \u003e= 1432140000 AND createTime \u003c= 1432150000 AND status = RUNNING`\n* `projectId = my-project AND labels.color = *`\n* `projectId = my-project AND labels.color = red`", + "type": "string", + "location": "query" + }, "pageToken": { "location": "query", "description": "The standard list page token.", "type": "string" }, "name": { - "type": "string", - "required": true, "pattern": "^operations$", "location": "path", - "description": "The name of the operation's parent resource." - }, - "pageSize": { - "format": "int32", - "description": "The maximum number of results to return. If unspecified, defaults to\n256. The maximum value is 2048.", - "type": "integer", - "location": "query" - }, - "filter": { - "description": "A string for filtering Operations.\nThe following filter fields are supported:\n\n* projectId: Required. Corresponds to\n OperationMetadata.projectId.\n* createTime: The time this job was created, in seconds from the\n [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `\u003e=` and/or `\u003c=`\n operators.\n* status: Can be `RUNNING`, `SUCCESS`, `FAILURE`, or `CANCELED`. Only\n one status may be specified.\n* labels.key where key is a label key.\n\nExamples:\n\n* `projectId = my-project AND createTime \u003e= 1432140000`\n* `projectId = my-project AND createTime \u003e= 1432140000 AND createTime \u003c= 1432150000 AND status = RUNNING`\n* `projectId = my-project AND labels.color = *`\n* `projectId = my-project AND labels.color = red`", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "flatPath": "v1/operations", - "id": "genomics.operations.list", - "path": "v1/{+name}", - "description": "Lists operations that match the specified filter in the request." - }, - "cancel": { - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "name": { - "pattern": "^operations/.+$", - "location": "path", - "description": "The name of the operation resource to be cancelled.", + "description": "The name of the operation's parent resource.", "type": "string", "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "flatPath": "v1/operations/{operationsId}:cancel", - "path": "v1/{+name}:cancel", - "id": "genomics.operations.cancel", - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients may use Operations.GetOperation or Operations.ListOperations to check whether the cancellation succeeded or the operation completed despite cancellation.", - "request": { - "$ref": "CancelOperationRequest" - } + "flatPath": "v1/operations", + "id": "genomics.operations.list", + "path": "v1/{+name}", + "description": "Lists operations that match the specified filter in the request." } } }, "referencesets": { "methods": { "search": { - "path": "v1/referencesets/search", - "id": "genomics.referencesets.search", - "description": "Searches for reference sets which match the given criteria.\n\nFor the definitions of references and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71)", "request": { "$ref": "SearchReferenceSetsRequest" }, + "description": "Searches for reference sets which match the given criteria.\n\nFor the definitions of references and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71)", "httpMethod": "POST", "parameterOrder": [], "response": { "$ref": "SearchReferenceSetsResponse" }, - "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics", "https://www.googleapis.com/auth/genomics.readonly" ], - "flatPath": "v1/referencesets/search" + "parameters": {}, + "flatPath": "v1/referencesets/search", + "path": "v1/referencesets/search", + "id": "genomics.referencesets.search" }, "get": { + "response": { + "$ref": "ReferenceSet" + }, + "parameterOrder": [ + "referenceSetId" + ], + "httpMethod": "GET", "parameters": { "referenceSetId": { - "type": "string", - "required": true, "location": "path", - "description": "The ID of the reference set." + "description": "The ID of the reference set.", + "type": "string", + "required": true } }, "scopes": [ @@ -1481,41 +1493,60 @@ "https://www.googleapis.com/auth/genomics.readonly" ], "flatPath": "v1/referencesets/{referenceSetId}", - "path": "v1/referencesets/{referenceSetId}", "id": "genomics.referencesets.get", - "description": "Gets a reference set.\n\nFor the definitions of references and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83).", - "httpMethod": "GET", - "parameterOrder": [ - "referenceSetId" - ], - "response": { - "$ref": "ReferenceSet" - } + "path": "v1/referencesets/{referenceSetId}", + "description": "Gets a reference set.\n\nFor the definitions of references and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83)." } } } }, "parameters": { - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "description": "Pretty-print response.", "default": "true", "type": "boolean", "location": "query" }, - "fields": { + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "upload_protocol": { "type": "string", "location": "query", - "description": "Selector specifying which fields to include in a partial response." + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" }, "uploadType": { - "type": "string", "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" }, "callback": { - "location": "query", "description": "JSONP", - "type": "string" + "type": "string", + "location": "query" }, "$.xgafv": { "enumDescriptions": [ @@ -1531,6 +1562,7 @@ "type": "string" }, "alt": { + "description": "Data format for response.", "default": "json", "enum": [ "json", @@ -1543,347 +1575,69 @@ "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], - "location": "query", - "description": "Data format for response." - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", "location": "query" }, "key": { + "type": "string", "location": "query", - "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.", + "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." + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", "type": "string" - }, - "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.", - "type": "string", - "location": "query" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" } }, "schemas": { - "Dataset": { - "id": "Dataset", - "description": "A Dataset is a collection of genomic data.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "type": "object", + "SearchReadsRequest": { "properties": { - "id": { + "end": { "type": "string", - "description": "The server-generated dataset ID, unique across all datasets." - }, - "createTime": { - "format": "google-datetime", - "description": "The time this dataset was created, in seconds from the epoch.", - "type": "string" - }, - "name": { - "description": "The dataset name.", - "type": "string" - }, - "projectId": { - "description": "The Google Cloud project ID that this dataset belongs to.", - "type": "string" - } - } - }, - "ImportVariantsResponse": { - "description": "The variant data import response.", - "type": "object", - "properties": { - "callSetIds": { - "description": "IDs of the call sets created during the import.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "ImportVariantsResponse" - }, - "ReadGroup": { - "description": "A read group is all the data that's processed the same way by the sequencer.", - "type": "object", - "properties": { - "programs": { - "description": "The programs used to generate this read group. Programs are always\nidentical for all read groups within a read group set. For this reason,\nonly the first read group in a returned set will have this field\npopulated.", - "items": { - "$ref": "Program" - }, - "type": "array" - }, - "predictedInsertSize": { - "type": "integer", - "format": "int32", - "description": "The predicted insert size of this read group. The insert size is the length\nthe sequenced DNA fragment from end-to-end, not including the adapters." - }, - "description": { - "type": "string", - "description": "A free-form text description of this read group." - }, - "sampleId": { - "description": "A client-supplied sample identifier for the reads in this read group.", - "type": "string" - }, - "datasetId": { - "description": "The dataset to which this read group belongs.", - "type": "string" - }, - "experiment": { - "$ref": "Experiment", - "description": "The experiment used to generate this read group." - }, - "name": { - "description": "The read group name. This corresponds to the @RG ID field in the SAM spec.", - "type": "string" - }, - "referenceSetId": { - "description": "The reference set the reads in this read group are aligned to.", - "type": "string" - }, - "info": { - "additionalProperties": { - "items": { - "type": "any" - }, - "type": "array" - }, - "description": "A map of additional read group information. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values).", - "type": "object" - }, - "id": { - "description": "The server-generated read group ID, unique for all read groups.\nNote: This is different than the @RG ID field in the SAM spec. For that\nvalue, see name.", - "type": "string" - } - }, - "id": "ReadGroup" - }, - "ReadGroupSet": { - "description": "A read group set is a logical collection of read groups, which are\ncollections of reads produced by a sequencer. A read group set typically\nmodels reads corresponding to one sample, sequenced one way, and aligned one\nway.\n\n* A read group set belongs to one dataset.\n* A read group belongs to one read group set.\n* A read belongs to one read group.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "type": "object", - "properties": { - "readGroups": { - "description": "The read groups in this set. There are typically 1-10 read groups in a read\ngroup set.", - "items": { - "$ref": "ReadGroup" - }, - "type": "array" - }, - "filename": { - "description": "The filename of the original source file for this read group set, if any.", - "type": "string" - }, - "name": { - "description": "The read group set name. By default this will be initialized to the sample\nname of the sequenced data contained in this set.", - "type": "string" - }, - "referenceSetId": { - "description": "The reference set to which the reads in this read group set are aligned.", - "type": "string" - }, - "info": { - "additionalProperties": { - "items": { - "type": "any" - }, - "type": "array" - }, - "description": "A map of additional read group set information.", - "type": "object" - }, - "id": { - "description": "The server-generated read group set ID, unique for all read group sets.", - "type": "string" - }, - "datasetId": { - "description": "The dataset to which this read group set belongs.", - "type": "string" - } - }, - "id": "ReadGroupSet" - }, - "SearchVariantSetsResponse": { - "description": "The search variant sets response.", - "type": "object", - "properties": { - "variantSets": { - "description": "The variant sets belonging to the requested dataset.", - "items": { - "$ref": "VariantSet" - }, - "type": "array" - }, - "nextPageToken": { - "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", - "type": "string" - } - }, - "id": "SearchVariantSetsResponse" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "Entry": { - "type": "object", - "properties": { - "annotation": { - "$ref": "Annotation", - "description": "The created annotation, if creation was successful." - }, - "status": { - "$ref": "Status", - "description": "The creation status." - } - }, - "id": "Entry" - }, - "Position": { - "description": "An abstraction for referring to a genomic position, in relation to some\nalready known reference. For now, represents a genomic position as a\nreference name, a base number on that reference (0-based), and a\ndetermination of forward or reverse strand.", - "type": "object", - "properties": { - "position": { "format": "int64", - "description": "The 0-based offset from the start of the forward strand for that reference.", - "type": "string" + "description": "The end position of the range on the reference, 0-based exclusive. If\nspecified, `referenceName` must also be specified." }, - "referenceName": { - "description": "The name of the reference in whatever reference set is being used.", - "type": "string" - }, - "reverseStrand": { - "description": "Whether this position is on the reverse strand, as opposed to the forward\nstrand.", - "type": "boolean" - } - }, - "id": "Position" - }, - "SearchReferenceSetsResponse": { - "type": "object", - "properties": { - "referenceSets": { - "description": "The matching references sets.", - "items": { - "$ref": "ReferenceSet" - }, - "type": "array" - }, - "nextPageToken": { - "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", - "type": "string" - } - }, - "id": "SearchReferenceSetsResponse" - }, - "SearchCallSetsRequest": { - "type": "object", - "properties": { "pageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response." - }, - "name": { - "description": "Only return call sets for which a substring of the name matches this\nstring.", + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", "type": "string" }, "pageSize": { "format": "int32", - "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 1024.", + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 256. The maximum value is 2048.", "type": "integer" }, - "variantSetIds": { - "description": "Restrict the query to call sets within the given variant sets. At least one\nID must be provided.", + "start": { + "format": "int64", + "description": "The start position of the range on the reference, 0-based inclusive. If\nspecified, `referenceName` must also be specified.", + "type": "string" + }, + "referenceName": { + "description": "The reference sequence name, for example `chr1`, `1`, or `chrX`. If set to\n`*`, only unmapped reads are returned. If unspecified, all reads (mapped\nand unmapped) are returned.", + "type": "string" + }, + "readGroupSetIds": { + "description": "The IDs of the read groups sets within which to search for reads. All\nspecified read group sets must be aligned against a common set of reference\nsequences; this defines the genomic coordinates for the query. Must specify\none of `readGroupSetIds` or `readGroupIds`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "readGroupIds": { + "description": "The IDs of the read groups within which to search for reads. All specified\nread groups must belong to the same read group sets. Must specify one of\n`readGroupSetIds` or `readGroupIds`.", "items": { "type": "string" }, "type": "array" } }, - "id": "SearchCallSetsRequest", - "description": "The call set search request." + "id": "SearchReadsRequest", + "description": "The read search request.", + "type": "object" }, - "ImportReadGroupSetsRequest": { - "id": "ImportReadGroupSetsRequest", - "description": "The read group set import request.", + "CancelOperationRequest": { + "id": "CancelOperationRequest", + "description": "The request message for Operations.CancelOperation.", "type": "object", - "properties": { - "referenceSetId": { - "type": "string", - "description": "The reference set to which the imported read group sets are aligned to, if\nany. The reference names of this reference set must be a superset of those\nfound in the imported file headers. If no reference set id is provided, a\nbest effort is made to associate with a matching reference set." - }, - "partitionStrategy": { - "description": "The partition strategy describes how read groups are partitioned into read\ngroup sets.", - "type": "string", - "enumDescriptions": [ - "", - "In most cases, this strategy yields one read group set per file. This is\nthe default behavior.\n\nAllocate one read group set per file per sample. For BAM files, read\ngroups are considered to share a sample if they have identical sample\nnames. Furthermore, all reads for each file which do not belong to a read\ngroup, if any, will be grouped into a single read group set per-file.", - "Includes all read groups in all imported files into a single read group\nset. Requires that the headers for all imported files are equivalent. All\nreads which do not belong to a read group, if any, will be grouped into a\nseparate read group set." - ], - "enum": [ - "PARTITION_STRATEGY_UNSPECIFIED", - "PER_FILE_PER_SAMPLE", - "MERGE_ALL" - ] - }, - "datasetId": { - "description": "Required. The ID of the dataset these read group sets will belong to. The\ncaller must have WRITE permissions to this dataset.", - "type": "string" - }, - "sourceUris": { - "description": "A list of URIs pointing at [BAM\nfiles](https://samtools.github.io/hts-specs/SAMv1.pdf)\nin Google Cloud Storage.\nThose URIs can include wildcards (*), but do not add or remove\nmatching files before import has completed.\n\nNote that Google Cloud Storage object listing is only eventually\nconsistent: files added may be not be immediately visible to\neveryone. Thus, if using a wildcard it is preferable not to start\nthe import immediately after the files are created.", - "items": { - "type": "string" - }, - "type": "array" - } - } - }, - "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "etag": { - "format": "byte", - "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.", - "type": "string" - }, - "version": { - "type": "integer", - "format": "int32", - "description": "Version of the `Policy`. The default version is 0." - }, - "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" - } - }, - "id": "Policy" + "properties": {} }, "Annotation": { "type": "object", @@ -1943,83 +1697,29 @@ "type": "string" }, "name": { - "description": "The display name of this annotation.", - "type": "string" + "type": "string", + "description": "The display name of this annotation." }, "variant": { "$ref": "VariantAnnotation", "description": "A variant annotation, which describes the effect of a variant on the\ngenome, the coding sequence, and/or higher level consequences at the\norganism level e.g. pathogenicity. This field is only set for annotations\nof type `VARIANT`." }, - "id": { - "description": "The server-generated annotation ID, unique across all annotations.", - "type": "string" - }, "referenceId": { "description": "The ID of the Google Genomics reference associated with this range.", "type": "string" + }, + "id": { + "type": "string", + "description": "The server-generated annotation ID, unique across all annotations." } }, "id": "Annotation", "description": "An annotation describes a region of reference genome. The value of an\nannotation may be one of several canonical types, supplemented by arbitrary\ninfo tags. An annotation is not inherently associated with a specific\nsample or individual (though a client could choose to use annotations in\nthis way). Example canonical annotation types are `GENE` and\n`VARIANT`." }, - "CancelOperationRequest": { - "description": "The request message for Operations.CancelOperation.", - "type": "object", - "properties": {}, - "id": "CancelOperationRequest" - }, - "SearchReadsRequest": { - "description": "The read search request.", - "type": "object", - "properties": { - "referenceName": { - "description": "The reference sequence name, for example `chr1`, `1`, or `chrX`. If set to\n`*`, only unmapped reads are returned. If unspecified, all reads (mapped\nand unmapped) are returned.", - "type": "string" - }, - "readGroupSetIds": { - "description": "The IDs of the read groups sets within which to search for reads. All\nspecified read group sets must be aligned against a common set of reference\nsequences; this defines the genomic coordinates for the query. Must specify\none of `readGroupSetIds` or `readGroupIds`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "readGroupIds": { - "description": "The IDs of the read groups within which to search for reads. All specified\nread groups must belong to the same read group sets. Must specify one of\n`readGroupSetIds` or `readGroupIds`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "end": { - "format": "int64", - "description": "The end position of the range on the reference, 0-based exclusive. If\nspecified, `referenceName` must also be specified.", - "type": "string" - }, - "pageToken": { - "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 256. The maximum value is 2048.", - "type": "integer" - }, - "start": { - "format": "int64", - "description": "The start position of the range on the reference, 0-based inclusive. If\nspecified, `referenceName` must also be specified.", - "type": "string" - } - }, - "id": "SearchReadsRequest" - }, "Operation": { "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, "response": { "description": "If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If importing Variants, an ImportVariantsResponse is returned. For pipelines and exports, an empty response is returned.", "type": "object", @@ -2029,20 +1729,24 @@ } }, "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. For example: `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw`", - "type": "string" + "type": "string", + "description": "The server-assigned name, which is only unique within the same service that originally returns it. For example: `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw`" }, "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" }, "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, "description": "An OperationMetadata object. This will always be returned with the Operation.", - "type": "object" + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + } + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" } }, "id": "Operation" @@ -2059,6 +1763,7 @@ "id": "RuntimeMetadata" }, "ImportReadGroupSetsResponse": { + "id": "ImportReadGroupSetsResponse", "description": "The read group set import response.", "type": "object", "properties": { @@ -2069,14 +1774,15 @@ }, "type": "array" } - }, - "id": "ImportReadGroupSetsResponse" + } }, "VariantCall": { + "description": "A call represents the determination of genotype with respect to a particular\nvariant. It may include associated information such as quality and phasing.\nFor example, a call might assign a probability of 0.32 to the occurrence of\na SNP named rs1234 in a call set with the name NA12345.", + "type": "object", "properties": { "phaseset": { - "type": "string", - "description": "If this field is present, this variant call's genotype ordering implies\nthe phase of the bases and is consistent with any other variant calls in\nthe same reference sequence which have the same phaseset value.\nWhen importing data from VCF, if the genotype data was phased but no\nphase set was specified this field will be set to `*`." + "description": "If this field is present, this variant call's genotype ordering implies\nthe phase of the bases and is consistent with any other variant calls in\nthe same reference sequence which have the same phaseset value.\nWhen importing data from VCF, if the genotype data was phased but no\nphase set was specified this field will be set to `*`.", + "type": "string" }, "info": { "additionalProperties": { @@ -2089,16 +1795,16 @@ "type": "object" }, "callSetName": { - "description": "The name of the call set this variant call belongs to.", - "type": "string" + "type": "string", + "description": "The name of the call set this variant call belongs to." }, "genotypeLikelihood": { + "description": "The genotype likelihoods for this variant call. Each array entry\nrepresents how likely a specific genotype is for this call. The value\nordering is defined by the GL tag in the VCF spec.\nIf Phred-scaled genotype likelihood scores (PL) are available and\nlog10(P) genotype likelihood scores (GL) are not, PL scores are converted\nto GL scores. If both are available, PL scores are stored in `info`.", "items": { "format": "double", "type": "number" }, - "type": "array", - "description": "The genotype likelihoods for this variant call. Each array entry\nrepresents how likely a specific genotype is for this call. The value\nordering is defined by the GL tag in the VCF spec.\nIf Phred-scaled genotype likelihood scores (PL) are available and\nlog10(P) genotype likelihood scores (GL) are not, PL scores are converted\nto GL scores. If both are available, PL scores are stored in `info`." + "type": "array" }, "callSetId": { "description": "The ID of the call set this variant call belongs to.", @@ -2113,9 +1819,7 @@ "type": "array" } }, - "id": "VariantCall", - "description": "A call represents the determination of genotype with respect to a particular\nvariant. It may include associated information such as quality and phasing.\nFor example, a call might assign a probability of 0.32 to the occurrence of\na SNP named rs1234 in a call set with the name NA12345.", - "type": "object" + "id": "VariantCall" }, "SearchVariantsResponse": { "description": "The variant search response.", @@ -2129,8 +1833,8 @@ "type": "array" }, "nextPageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results." + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", + "type": "string" } }, "id": "SearchVariantsResponse" @@ -2138,10 +1842,6 @@ "ListBasesResponse": { "type": "object", "properties": { - "sequence": { - "type": "string", - "description": "A substring of the bases that make up this reference." - }, "offset": { "format": "int64", "description": "The offset position (0-based) of the given `sequence` from the\nstart of this `Reference`. This value will differ for each page\nin a paginated request.", @@ -2150,6 +1850,10 @@ "nextPageToken": { "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", "type": "string" + }, + "sequence": { + "description": "A substring of the bases that make up this reference.", + "type": "string" } }, "id": "ListBasesResponse" @@ -2159,7 +1863,6 @@ "type": "object", "properties": { "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", @@ -2167,12 +1870,13 @@ }, "type": "object" }, - "type": "array" + "type": "array", + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." }, "code": { - "type": "integer", "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code." + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" }, "message": { "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", @@ -2181,9 +1885,12 @@ }, "id": "Status" }, - "Binding": { - "description": "Associates `members` with a `role`.", + "UndeleteDatasetRequest": { "type": "object", + "properties": {}, + "id": "UndeleteDatasetRequest" + }, + "Binding": { "properties": { "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` or `joe@example.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", @@ -2197,40 +1904,38 @@ "type": "string" } }, - "id": "Binding" - }, - "UndeleteDatasetRequest": { - "type": "object", - "properties": {}, - "id": "UndeleteDatasetRequest" + "id": "Binding", + "description": "Associates `members` with a `role`.", + "type": "object" }, "Range": { - "id": "Range", "description": "A 0-based half-open genomic coordinate range for search requests.", "type": "object", "properties": { - "start": { - "format": "int64", - "description": "The start position of the range on the reference, 0-based inclusive.", - "type": "string" - }, "end": { "format": "int64", "description": "The end position of the range on the reference, 0-based exclusive.", "type": "string" }, "referenceName": { - "type": "string", - "description": "The reference sequence name, for example `chr1`,\n`1`, or `chrX`." + "description": "The reference sequence name, for example `chr1`,\n`1`, or `chrX`.", + "type": "string" + }, + "start": { + "format": "int64", + "description": "The start position of the range on the reference, 0-based inclusive.", + "type": "string" } - } + }, + "id": "Range" }, "VariantSet": { + "description": "A variant set is a collection of call sets and variants. It contains summary\nstatistics of those contents. A variant set belongs to a dataset.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", "type": "object", "properties": { "description": { - "type": "string", - "description": "A textual description of this variant set." + "description": "A textual description of this variant set.", + "type": "string" }, "datasetId": { "description": "The dataset to which this variant set belongs.", @@ -2252,32 +1957,31 @@ "type": "array" }, "referenceBounds": { + "description": "A list of all references used by the variants in a variant set\nwith associated coordinate upper bounds for each one.", "items": { "$ref": "ReferenceBound" }, - "type": "array", - "description": "A list of all references used by the variants in a variant set\nwith associated coordinate upper bounds for each one." + "type": "array" }, "id": { "description": "The server-generated variant set ID, unique across all variant sets.", "type": "string" } }, - "id": "VariantSet", - "description": "A variant set is a collection of call sets and variants. It contains summary\nstatistics of those contents. A variant set belongs to a dataset.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" + "id": "VariantSet" }, "BatchCreateAnnotationsResponse": { + "id": "BatchCreateAnnotationsResponse", + "type": "object", "properties": { "entries": { + "description": "The resulting per-annotation entries, ordered consistently with the\noriginal request.", "items": { "$ref": "Entry" }, - "type": "array", - "description": "The resulting per-annotation entries, ordered consistently with the\noriginal request." + "type": "array" } - }, - "id": "BatchCreateAnnotationsResponse", - "type": "object" + } }, "ReferenceBound": { "description": "ReferenceBound records an upper bound for the starting coordinate of\nvariants in a particular reference.", @@ -2295,25 +1999,27 @@ }, "id": "ReferenceBound" }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", + "SearchCallSetsResponse": { + "description": "The call set search response.", "type": "object", "properties": { - "operations": { - "description": "A list of operations that matches the specified filter in the request.", + "nextPageToken": { + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", + "type": "string" + }, + "callSets": { + "description": "The list of matching call sets.", "items": { - "$ref": "Operation" + "$ref": "CallSet" }, "type": "array" - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" } }, - "id": "ListOperationsResponse" + "id": "SearchCallSetsResponse" }, "Variant": { + "description": "A variant represents a change in DNA sequence relative to a reference\nsequence. For example, a variant could represent a SNP or an insertion.\nVariants belong to a variant set.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nEach of the calls on a variant represent a determination of genotype with\nrespect to that variant. For example, a call might assign probability of 0.32\nto the occurrence of a SNP named rs1234 in a sample named NA12345. A call\nbelongs to a call set, which contains related calls typically from one\nsample.", + "type": "object", "properties": { "quality": { "format": "double", @@ -2333,28 +2039,28 @@ "type": "string" }, "info": { - "description": "A map of additional variant information. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values).", - "type": "object", "additionalProperties": { "items": { "type": "any" }, "type": "array" - } + }, + "description": "A map of additional variant information. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values).", + "type": "object" }, "referenceBases": { "description": "The reference bases for this variant. They start at the given\nposition.", "type": "string" }, - "names": { - "description": "Names for the variant, for example a RefSNP ID.", + "alternateBases": { + "description": "The bases that appear instead of the reference bases.", "items": { "type": "string" }, "type": "array" }, - "alternateBases": { - "description": "The bases that appear instead of the reference bases.", + "names": { + "description": "Names for the variant, for example a RefSNP ID.", "items": { "type": "string" }, @@ -2390,37 +2096,93 @@ "type": "string" } }, - "id": "Variant", - "description": "A variant represents a change in DNA sequence relative to a reference\nsequence. For example, a variant could represent a SNP or an insertion.\nVariants belong to a variant set.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nEach of the calls on a variant represent a determination of genotype with\nrespect to that variant. For example, a call might assign probability of 0.32\nto the occurrence of a SNP named rs1234 in a sample named NA12345. A call\nbelongs to a call set, which contains related calls typically from one\nsample.", - "type": "object" + "id": "Variant" }, - "SearchCallSetsResponse": { - "description": "The call set search response.", + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", "type": "object", "properties": { "nextPageToken": { - "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", + "description": "The standard List next-page token.", "type": "string" }, - "callSets": { - "description": "The list of matching call sets.", + "operations": { "items": { - "$ref": "CallSet" + "$ref": "Operation" }, - "type": "array" + "type": "array", + "description": "A list of operations that matches the specified filter in the request." } }, - "id": "SearchCallSetsResponse" + "id": "ListOperationsResponse" + }, + "OperationMetadata": { + "description": "Metadata describing an Operation.", + "type": "object", + "properties": { + "projectId": { + "description": "The Google Cloud Project in which the job is scoped.", + "type": "string" + }, + "clientId": { + "description": "This field is deprecated. Use `labels` instead. Optionally provided by the\ncaller when submitting the request that creates the operation.", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "The time at which the job stopped running.", + "type": "string" + }, + "events": { + "description": "Optional event messages that were generated during the job's execution.\nThis also contains any warnings that were generated during import\nor export.", + "items": { + "$ref": "OperationEvent" + }, + "type": "array" + }, + "startTime": { + "format": "google-datetime", + "description": "The time at which the job began to run.", + "type": "string" + }, + "request": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The original request that started the operation. Note that this will be in\ncurrent version of the API. If the operation was started with v1beta2 API\nand a GetOperation is performed on v1 API, a v1 request will be returned." + }, + "runtimeMetadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Runtime metadata on this Operation.", + "type": "object" + }, + "createTime": { + "format": "google-datetime", + "description": "The time at which the job was submitted to the Genomics service.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optionally provided by the caller when submitting the request that creates\nthe operation.", + "type": "object" + } + }, + "id": "OperationMetadata" }, "SearchVariantsRequest": { - "id": "SearchVariantsRequest", - "description": "The variant search request.", "type": "object", "properties": { "maxCalls": { + "type": "integer", "format": "int32", - "description": "The maximum number of calls to return in a single page. Note that this\nlimit may be exceeded in the event that a matching variant contains more\ncalls than the requested maximum. If unspecified, defaults to 5000. The\nmaximum value is 10000.", - "type": "integer" + "description": "The maximum number of calls to return in a single page. Note that this\nlimit may be exceeded in the event that a matching variant contains more\ncalls than the requested maximum. If unspecified, defaults to 5000. The\nmaximum value is 10000." }, "pageToken": { "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", @@ -2463,70 +2225,21 @@ "description": "The end of the window, 0-based exclusive. If unspecified or 0, defaults to\nthe length of the reference.", "type": "string" } - } + }, + "id": "SearchVariantsRequest", + "description": "The variant search request." }, - "OperationMetadata": { + "SearchReadGroupSetsRequest": { + "description": "The read group set search request.", "type": "object", "properties": { - "runtimeMetadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Runtime metadata on this Operation.", - "type": "object" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optionally provided by the caller when submitting the request that creates\nthe operation.", - "type": "object" - }, - "createTime": { - "format": "google-datetime", - "description": "The time at which the job was submitted to the Genomics service.", - "type": "string" - }, - "projectId": { - "description": "The Google Cloud Project in which the job is scoped.", - "type": "string" - }, - "clientId": { - "description": "This field is deprecated. Use `labels` instead. Optionally provided by the\ncaller when submitting the request that creates the operation.", - "type": "string" - }, - "events": { - "description": "Optional event messages that were generated during the job's execution.\nThis also contains any warnings that were generated during import\nor export.", + "datasetIds": { + "description": "Restricts this query to read group sets within the given datasets. At least\none ID must be provided.", "items": { - "$ref": "OperationEvent" + "type": "string" }, "type": "array" }, - "endTime": { - "format": "google-datetime", - "description": "The time at which the job stopped running.", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "The time at which the job began to run.", - "type": "string" - }, - "request": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The original request that started the operation. Note that this will be in\ncurrent version of the API. If the operation was started with v1beta2 API\nand a GetOperation is performed on v1 API, a v1 request will be returned.", - "type": "object" - } - }, - "id": "OperationMetadata", - "description": "Metadata describing an Operation." - }, - "SearchReadGroupSetsRequest": { - "properties": { "pageToken": { "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", "type": "string" @@ -2539,18 +2252,9 @@ "format": "int32", "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 256. The maximum value is 1024.", "type": "integer" - }, - "datasetIds": { - "description": "Restricts this query to read group sets within the given datasets. At least\none ID must be provided.", - "items": { - "type": "string" - }, - "type": "array" } }, - "id": "SearchReadGroupSetsRequest", - "description": "The read group set search request.", - "type": "object" + "id": "SearchReadGroupSetsRequest" }, "SearchAnnotationsResponse": { "type": "object", @@ -2570,8 +2274,11 @@ "id": "SearchAnnotationsResponse" }, "ClinicalCondition": { - "type": "object", "properties": { + "conceptId": { + "description": "The MedGen concept id associated with this gene.\nSearch for these IDs at http://www.ncbi.nlm.nih.gov/medgen/", + "type": "string" + }, "names": { "description": "A set of names for the condition.", "items": { @@ -2589,43 +2296,31 @@ "$ref": "ExternalId" }, "type": "array" - }, - "conceptId": { - "description": "The MedGen concept id associated with this gene.\nSearch for these IDs at http://www.ncbi.nlm.nih.gov/medgen/", - "type": "string" } }, - "id": "ClinicalCondition" + "id": "ClinicalCondition", + "type": "object" }, "SearchReadsResponse": { "description": "The read search response.", "type": "object", "properties": { - "nextPageToken": { - "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", - "type": "string" - }, "alignments": { "description": "The list of matching alignments sorted by mapped genomic coordinate,\nif any, ascending in position within the same reference. Unmapped reads,\nwhich have no position, are returned contiguously and are sorted in\nascending lexicographic order by fragment name.", "items": { "$ref": "Read" }, "type": "array" + }, + "nextPageToken": { + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", + "type": "string" } }, "id": "SearchReadsResponse" }, "Program": { - "type": "object", "properties": { - "prevProgramId": { - "description": "The ID of the program run before this one.", - "type": "string" - }, - "commandLine": { - "description": "The command line used to run this program.", - "type": "string" - }, "version": { "description": "The version of the program run.", "type": "string" @@ -2637,22 +2332,23 @@ "name": { "description": "The display name of the program. This is typically the colloquial name of\nthe tool used, for example 'bwa' or 'picard'.", "type": "string" + }, + "prevProgramId": { + "description": "The ID of the program run before this one.", + "type": "string" + }, + "commandLine": { + "description": "The command line used to run this program.", + "type": "string" } }, - "id": "Program" + "id": "Program", + "type": "object" }, "ComputeEngine": { "description": "Describes a Compute Engine resource that is being managed by a running\npipeline.", "type": "object", "properties": { - "instanceName": { - "description": "The instance on which the operation is running.", - "type": "string" - }, - "zone": { - "description": "The availability zone in which the instance resides.", - "type": "string" - }, "diskNames": { "description": "The names of the disks that were created for this pipeline.", "items": { @@ -2663,139 +2359,58 @@ "machineType": { "description": "The machine type of the instance.", "type": "string" + }, + "instanceName": { + "description": "The instance on which the operation is running.", + "type": "string" + }, + "zone": { + "description": "The availability zone in which the instance resides.", + "type": "string" } }, "id": "ComputeEngine" }, "CoverageBucket": { + "description": "A bucket over which read coverage has been precomputed. A bucket corresponds\nto a specific range of the reference sequence.", "type": "object", "properties": { - "range": { - "$ref": "Range", - "description": "The genomic coordinate range spanned by this bucket." - }, "meanCoverage": { "format": "float", "description": "The average number of reads which are aligned to each individual\nreference base in this bucket.", "type": "number" + }, + "range": { + "$ref": "Range", + "description": "The genomic coordinate range spanned by this bucket." } }, - "id": "CoverageBucket", - "description": "A bucket over which read coverage has been precomputed. A bucket corresponds\nto a specific range of the reference sequence." + "id": "CoverageBucket" }, "ExternalId": { + "id": "ExternalId", + "type": "object", "properties": { - "sourceName": { - "description": "The name of the source of this data.", - "type": "string" - }, "id": { "description": "The id used by the source of this data.", "type": "string" - } - }, - "id": "ExternalId", - "type": "object" - }, - "SearchVariantSetsRequest": { - "properties": { - "datasetIds": { - "description": "Exactly one dataset ID must be provided here. Only variant sets which\nbelong to this dataset will be returned.", - "items": { - "type": "string" - }, - "type": "array" }, - "pageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response." - }, - "pageSize": { - "format": "int32", - "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 1024.", - "type": "integer" - } - }, - "id": "SearchVariantSetsRequest", - "description": "The search variant sets request.", - "type": "object" - }, - "VariantSetMetadata": { - "description": "Metadata describes a single piece of variant call metadata.\nThese data include a top level key and either a single value string (value)\nor a list of key-value pairs (info.)\nValue and info are mutually exclusive.", - "type": "object", - "properties": { - "description": { - "description": "A textual description of this metadata.", - "type": "string" - }, - "info": { - "additionalProperties": { - "items": { - "type": "any" - }, - "type": "array" - }, - "description": "Remaining structured metadata key-value pairs. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values).", - "type": "object" - }, - "type": { - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "enum": [ - "TYPE_UNSPECIFIED", - "INTEGER", - "FLOAT", - "FLAG", - "CHARACTER", - "STRING" - ], - "description": "The type of data. Possible types include: Integer, Float,\nFlag, Character, and String.", - "type": "string" - }, - "number": { - "description": "The number of values that can be included in a field described by this\nmetadata.", - "type": "string" - }, - "id": { - "description": "User-provided ID field, not enforced by this API.\nTwo or more pieces of structured metadata with identical\nid and key fields are considered equivalent.", - "type": "string" - }, - "value": { - "type": "string", - "description": "The value field for simple metadata" - }, - "key": { - "description": "The top-level key.", + "sourceName": { + "description": "The name of the source of this data.", "type": "string" } - }, - "id": "VariantSetMetadata" + } }, "Reference": { "description": "A reference is a canonical assembled DNA sequence, intended to act as a\nreference coordinate space for other genomic annotations. A single reference\nmight represent the human chromosome 1 or mitochandrial DNA, for instance. A\nreference belongs to one or more reference sets.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", "type": "object", "properties": { - "id": { - "description": "The server-generated reference ID, unique across all references.", - "type": "string" - }, - "length": { - "format": "int64", - "description": "The length of this reference's sequence.", - "type": "string" - }, "sourceAccessions": { + "description": "All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally\nwith a version number, for example `GCF_000001405.26`.", "items": { "type": "string" }, - "type": "array", - "description": "All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally\nwith a version number, for example `GCF_000001405.26`." + "type": "array" }, "sourceUri": { "description": "The URI from which the sequence was obtained. Typically specifies a FASTA\nformat file.", @@ -2813,31 +2428,102 @@ "md5checksum": { "description": "MD5 of the upper-case sequence excluding all whitespace characters (this\nis equivalent to SQ:M5 in SAM). This value is represented in lower case\nhexadecimal format.", "type": "string" + }, + "id": { + "description": "The server-generated reference ID, unique across all references.", + "type": "string" + }, + "length": { + "format": "int64", + "description": "The length of this reference's sequence.", + "type": "string" } }, "id": "Reference" }, - "SearchReferenceSetsRequest": { + "SearchVariantSetsRequest": { + "description": "The search variant sets request.", "type": "object", "properties": { - "md5checksums": { - "description": "If present, return reference sets for which the\nmd5checksum matches exactly.", + "pageSize": { + "format": "int32", + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 1024.", + "type": "integer" + }, + "datasetIds": { + "description": "Exactly one dataset ID must be provided here. Only variant sets which\nbelong to this dataset will be returned.", "items": { "type": "string" }, "type": "array" }, "pageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response." + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string" + } + }, + "id": "SearchVariantSetsRequest" + }, + "VariantSetMetadata": { + "description": "Metadata describes a single piece of variant call metadata.\nThese data include a top level key and either a single value string (value)\nor a list of key-value pairs (info.)\nValue and info are mutually exclusive.", + "type": "object", + "properties": { + "value": { + "description": "The value field for simple metadata", + "type": "string" }, - "accessions": { - "description": "If present, return reference sets for which a prefix of any of\nsourceAccessions\nmatch any of these strings. Accession numbers typically have a main number\nand a version, for example `NC_000001.11`.", - "items": { - "type": "string" + "id": { + "description": "User-provided ID field, not enforced by this API.\nTwo or more pieces of structured metadata with identical\nid and key fields are considered equivalent.", + "type": "string" + }, + "number": { + "description": "The number of values that can be included in a field described by this\nmetadata.", + "type": "string" + }, + "key": { + "description": "The top-level key.", + "type": "string" + }, + "description": { + "description": "A textual description of this metadata.", + "type": "string" + }, + "info": { + "additionalProperties": { + "items": { + "type": "any" + }, + "type": "array" }, - "type": "array" + "description": "Remaining structured metadata key-value pairs. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values).", + "type": "object" }, + "type": { + "description": "The type of data. Possible types include: Integer, Float,\nFlag, Character, and String.", + "type": "string", + "enumDescriptions": [ + "", + "", + "", + "", + "", + "" + ], + "enum": [ + "TYPE_UNSPECIFIED", + "INTEGER", + "FLOAT", + "FLAG", + "CHARACTER", + "STRING" + ] + } + }, + "id": "VariantSetMetadata" + }, + "SearchReferenceSetsRequest": { + "type": "object", + "properties": { "pageSize": { "format": "int32", "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 1024. The maximum value is 4096.", @@ -2846,11 +2532,30 @@ "assemblyId": { "description": "If present, return reference sets for which a substring of their\n`assemblyId` matches this string (case insensitive).", "type": "string" + }, + "md5checksums": { + "description": "If present, return reference sets for which the\nmd5checksum matches exactly.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pageToken": { + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string" + }, + "accessions": { + "description": "If present, return reference sets for which a prefix of any of\nsourceAccessions\nmatch any of these strings. Accession numbers typically have a main number\nand a version, for example `NC_000001.11`.", + "items": { + "type": "string" + }, + "type": "array" } }, "id": "SearchReferenceSetsRequest" }, "SetIamPolicyRequest": { + "id": "SetIamPolicyRequest", "description": "Request message for `SetIamPolicy` method.", "type": "object", "properties": { @@ -2858,13 +2563,14 @@ "$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." } - }, - "id": "SetIamPolicyRequest" + } }, "MergeVariantsRequest": { "type": "object", "properties": { "infoMergeConfig": { + "description": "A mapping between info field keys and the InfoMergeOperations to\nbe performed on them.", + "type": "object", "additionalProperties": { "type": "string", "enum": [ @@ -2872,13 +2578,11 @@ "IGNORE_NEW", "MOVE_TO_CALLS" ] - }, - "description": "A mapping between info field keys and the InfoMergeOperations to\nbe performed on them.", - "type": "object" + } }, "variantSetId": { - "type": "string", - "description": "The destination variant set." + "description": "The destination variant set.", + "type": "string" }, "variants": { "description": "The variants to be merged with existing variants.", @@ -2894,34 +2598,42 @@ "description": "A read alignment describes a linear alignment of a string of DNA to a\nreference sequence, in addition to metadata\nabout the fragment (the molecule of DNA sequenced) and the read (the bases\nwhich were read by the sequencer). A read is equivalent to a line in a SAM\nfile. A read belongs to exactly one read group and exactly one\nread group set.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\n### Reverse-stranded reads\n\nMapped reads (reads having a non-null `alignment`) can be aligned to either\nthe forward or the reverse strand of their associated reference. Strandedness\nof a mapped read is encoded by `alignment.position.reverseStrand`.\n\nIf we consider the reference to be a forward-stranded coordinate space of\n`[0, reference.length)` with `0` as the left-most position and\n`reference.length` as the right-most position, reads are always aligned left\nto right. That is, `alignment.position.position` always refers to the\nleft-most reference coordinate and `alignment.cigar` describes the alignment\nof this read to the reference from left to right. All per-base fields such as\n`alignedSequence` and `alignedQuality` share this same left-to-right\norientation; this is true of reads which are aligned to either strand. For\nreverse-stranded reads, this means that `alignedSequence` is the reverse\ncomplement of the bases that were originally reported by the sequencing\nmachine.\n\n### Generating a reference-aligned sequence string\n\nWhen interacting with mapped reads, it's often useful to produce a string\nrepresenting the local alignment of the read to reference. The following\npseudocode demonstrates one way of doing this:\n\n out = \"\"\n offset = 0\n for c in read.alignment.cigar {\n switch c.operation {\n case \"ALIGNMENT_MATCH\", \"SEQUENCE_MATCH\", \"SEQUENCE_MISMATCH\":\n out += read.alignedSequence[offset:offset+c.operationLength]\n offset += c.operationLength\n break\n case \"CLIP_SOFT\", \"INSERT\":\n offset += c.operationLength\n break\n case \"PAD\":\n out += repeat(\"*\", c.operationLength)\n break\n case \"DELETE\":\n out += repeat(\"-\", c.operationLength)\n break\n case \"SKIP\":\n out += repeat(\" \", c.operationLength)\n break\n case \"CLIP_HARD\":\n break\n }\n }\n return out\n\n### Converting to SAM's CIGAR string\n\nThe following pseudocode generates a SAM CIGAR string from the\n`cigar` field. Note that this is a lossy conversion\n(`cigar.referenceSequence` is lost).\n\n cigarMap = {\n \"ALIGNMENT_MATCH\": \"M\",\n \"INSERT\": \"I\",\n \"DELETE\": \"D\",\n \"SKIP\": \"N\",\n \"CLIP_SOFT\": \"S\",\n \"CLIP_HARD\": \"H\",\n \"PAD\": \"P\",\n \"SEQUENCE_MATCH\": \"=\",\n \"SEQUENCE_MISMATCH\": \"X\",\n }\n cigarStr = \"\"\n for c in read.alignment.cigar {\n cigarStr += c.operationLength + cigarMap[c.operation]\n }\n return cigarStr", "type": "object", "properties": { - "alignment": { - "$ref": "LinearAlignment", - "description": "The linear alignment for this alignment record. This field is null for\nunmapped reads." + "alignedQuality": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "description": "The quality of the read sequence contained in this alignment record\n(equivalent to QUAL in SAM).\n`alignedSequence` and `alignedQuality` may be shorter than the full read\nsequence and quality. This will occur if the alignment is part of a\nchimeric alignment, or if the read was trimmed. When this occurs, the CIGAR\nfor this read will begin/end with a hard clip operator that will indicate\nthe length of the excised sequence." }, - "id": { - "description": "The server-generated read ID, unique across all reads. This is different\nfrom the `fragmentName`.", - "type": "string" + "alignment": { + "description": "The linear alignment for this alignment record. This field is null for\nunmapped reads.", + "$ref": "LinearAlignment" }, "numberReads": { + "type": "integer", "format": "int32", - "description": "The number of reads in the fragment (extension to SAM flag 0x1).", - "type": "integer" + "description": "The number of reads in the fragment (extension to SAM flag 0x1)." + }, + "id": { + "type": "string", + "description": "The server-generated read ID, unique across all reads. This is different\nfrom the `fragmentName`." }, "secondaryAlignment": { - "description": "Whether this alignment is secondary. Equivalent to SAM flag 0x100.\nA secondary alignment represents an alternative to the primary alignment\nfor this read. Aligners may return secondary alignments if a read can map\nambiguously to multiple coordinates in the genome. By convention, each read\nhas one and only one alignment where both `secondaryAlignment`\nand `supplementaryAlignment` are false.", - "type": "boolean" + "type": "boolean", + "description": "Whether this alignment is secondary. Equivalent to SAM flag 0x100.\nA secondary alignment represents an alternative to the primary alignment\nfor this read. Aligners may return secondary alignments if a read can map\nambiguously to multiple coordinates in the genome. By convention, each read\nhas one and only one alignment where both `secondaryAlignment`\nand `supplementaryAlignment` are false." }, "fragmentName": { "description": "The fragment name. Equivalent to QNAME (query template name) in SAM.", "type": "string" }, "readGroupSetId": { - "description": "The ID of the read group set this read belongs to. A read belongs to\nexactly one read group set.", - "type": "string" + "type": "string", + "description": "The ID of the read group set this read belongs to. A read belongs to\nexactly one read group set." }, "duplicateFragment": { - "type": "boolean", - "description": "The fragment is a PCR or optical duplicate (SAM flag 0x400)." + "description": "The fragment is a PCR or optical duplicate (SAM flag 0x400).", + "type": "boolean" }, "readNumber": { "format": "int32", @@ -2955,8 +2667,8 @@ "type": "boolean" }, "supplementaryAlignment": { - "description": "Whether this alignment is supplementary. Equivalent to SAM flag 0x800.\nSupplementary alignments are used in the representation of a chimeric\nalignment. In a chimeric alignment, a read is split into multiple\nlinear alignments that map to different reference contigs. The first\nlinear alignment in the read will be designated as the representative\nalignment; the remaining linear alignments will be designated as\nsupplementary alignments. These alignments may have different mapping\nquality scores. In each linear alignment in a chimeric alignment, the read\nwill be hard clipped. The `alignedSequence` and\n`alignedQuality` fields in the alignment record will only\nrepresent the bases for its respective linear alignment.", - "type": "boolean" + "type": "boolean", + "description": "Whether this alignment is supplementary. Equivalent to SAM flag 0x800.\nSupplementary alignments are used in the representation of a chimeric\nalignment. In a chimeric alignment, a read is split into multiple\nlinear alignments that map to different reference contigs. The first\nlinear alignment in the read will be designated as the representative\nalignment; the remaining linear alignments will be designated as\nsupplementary alignments. These alignments may have different mapping\nquality scores. In each linear alignment in a chimeric alignment, the read\nwill be hard clipped. The `alignedSequence` and\n`alignedQuality` fields in the alignment record will only\nrepresent the bases for its respective linear alignment." }, "fragmentLength": { "format": "int32", @@ -2966,14 +2678,6 @@ "failedVendorQualityChecks": { "description": "Whether this read did not pass filters, such as platform or vendor quality\ncontrols (SAM flag 0x200).", "type": "boolean" - }, - "alignedQuality": { - "description": "The quality of the read sequence contained in this alignment record\n(equivalent to QUAL in SAM).\n`alignedSequence` and `alignedQuality` may be shorter than the full read\nsequence and quality. This will occur if the alignment is part of a\nchimeric alignment, or if the read was trimmed. When this occurs, the CIGAR\nfor this read will begin/end with a hard clip operator that will indicate\nthe length of the excised sequence.", - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array" } }, "id": "Read" @@ -2996,30 +2700,15 @@ "id": "BatchCreateAnnotationsRequest" }, "CigarUnit": { + "description": "A single CIGAR operation.", "type": "object", "properties": { - "referenceSequence": { - "description": "`referenceSequence` is only used at mismatches\n(`SEQUENCE_MISMATCH`) and deletions (`DELETE`).\nFilling this field replaces SAM's MD tag. If the relevant information is\nnot available, this field is unset.", - "type": "string" - }, "operationLength": { "format": "int64", "description": "The number of genomic bases that the operation runs for. Required.", "type": "string" }, "operation": { - "enum": [ - "OPERATION_UNSPECIFIED", - "ALIGNMENT_MATCH", - "INSERT", - "DELETE", - "SKIP", - "CLIP_SOFT", - "CLIP_HARD", - "PAD", - "SEQUENCE_MATCH", - "SEQUENCE_MISMATCH" - ], "type": "string", "enumDescriptions": [ "", @@ -3032,36 +2721,29 @@ "The pad operator indicates that there is padding in an alignment. This\noperator is equivalent to SAM's `P`.", "This operator indicates that this portion of the aligned sequence exactly\nmatches the reference. This operator is equivalent to SAM's `=`.", "This operator indicates that this portion of the aligned sequence is an\nalignment match to the reference, but a sequence mismatch. This can\nindicate a SNP or a read error. This operator is equivalent to SAM's\n`X`." + ], + "enum": [ + "OPERATION_UNSPECIFIED", + "ALIGNMENT_MATCH", + "INSERT", + "DELETE", + "SKIP", + "CLIP_SOFT", + "CLIP_HARD", + "PAD", + "SEQUENCE_MATCH", + "SEQUENCE_MISMATCH" ] + }, + "referenceSequence": { + "description": "`referenceSequence` is only used at mismatches\n(`SEQUENCE_MISMATCH`) and deletions (`DELETE`).\nFilling this field replaces SAM's MD tag. If the relevant information is\nnot available, this field is unset.", + "type": "string" } }, - "id": "CigarUnit", - "description": "A single CIGAR operation." + "id": "CigarUnit" }, "ReferenceSet": { - "description": "A reference set is a set of references which typically comprise a reference\nassembly for a species, such as `GRCh38` which is representative\nof the human genome. A reference set defines a common coordinate space for\ncomparing reference-aligned experimental data. A reference set contains 1 or\nmore references.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "type": "object", "properties": { - "sourceAccessions": { - "description": "All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally\nwith a version number, for example `NC_000001.11`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "Free text description of this reference set.", - "type": "string" - }, - "sourceUri": { - "description": "The URI from which the references were obtained.", - "type": "string" - }, - "ncbiTaxonId": { - "format": "int32", - "description": "ID from http://www.ncbi.nlm.nih.gov/taxonomy (for example, 9606 for human)\nindicating the species which this reference set is intended to model. Note\nthat contained references may specify a different `ncbiTaxonId`, as\nassemblies may contain reference sequences which do not belong to the\nmodeled species, for example EBV in a human reference genome.", - "type": "integer" - }, "referenceIds": { "description": "The IDs of the reference objects that are part of this set.\n`Reference.md5checksum` must be unique within this set.", "items": { @@ -3069,25 +2751,51 @@ }, "type": "array" }, + "md5checksum": { + "description": "Order-independent MD5 checksum which identifies this reference set. The\nchecksum is computed by sorting all lower case hexidecimal string\n`reference.md5checksum` (for all reference in this set) in\nascending lexicographic order, concatenating, and taking the MD5 of that\nvalue. The resulting value is represented in lower case hexadecimal format.", + "type": "string" + }, "assemblyId": { "description": "Public id of this reference set, such as `GRCh37`.", "type": "string" }, - "md5checksum": { - "type": "string", - "description": "Order-independent MD5 checksum which identifies this reference set. The\nchecksum is computed by sorting all lower case hexidecimal string\n`reference.md5checksum` (for all reference in this set) in\nascending lexicographic order, concatenating, and taking the MD5 of that\nvalue. The resulting value is represented in lower case hexadecimal format." - }, "id": { "description": "The server-generated reference set ID, unique across all reference sets.", "type": "string" + }, + "description": { + "description": "Free text description of this reference set.", + "type": "string" + }, + "sourceAccessions": { + "description": "All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally\nwith a version number, for example `NC_000001.11`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "ncbiTaxonId": { + "format": "int32", + "description": "ID from http://www.ncbi.nlm.nih.gov/taxonomy (for example, 9606 for human)\nindicating the species which this reference set is intended to model. Note\nthat contained references may specify a different `ncbiTaxonId`, as\nassemblies may contain reference sequences which do not belong to the\nmodeled species, for example EBV in a human reference genome.", + "type": "integer" + }, + "sourceUri": { + "description": "The URI from which the references were obtained.", + "type": "string" } }, - "id": "ReferenceSet" + "id": "ReferenceSet", + "description": "A reference set is a set of references which typically comprise a reference\nassembly for a species, such as `GRCh38` which is representative\nof the human genome. A reference set defines a common coordinate space for\ncomparing reference-aligned experimental data. A reference set contains 1 or\nmore references.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "type": "object" }, "Transcript": { "description": "A transcript represents the assertion that a particular region of the\nreference genome may be transcribed as RNA.", "type": "object", "properties": { + "geneId": { + "description": "The annotation ID of the gene from which this transcript is transcribed.", + "type": "string" + }, "exons": { "description": "The \u003ca href=\"http://en.wikipedia.org/wiki/Exon\"\u003eexons\u003c/a\u003e that compose\nthis transcript. This field should be unset for genomes where transcript\nsplicing does not occur, for example prokaryotes.\n\nIntrons are regions of the transcript that are not included in the\nspliced RNA product. Though not explicitly modeled here, intron ranges can\nbe deduced; all regions of this transcript that are not exons are introns.\n\nExonic sequences do not necessarily code for a translational product\n(amino acids). Only the regions of exons bounded by the\ncodingSequence correspond\nto coding DNA sequence.\n\nExons are ordered by start position and may not overlap.", "items": { @@ -3096,32 +2804,22 @@ "type": "array" }, "codingSequence": { - "$ref": "CodingSequence", - "description": "The range of the coding sequence for this transcript, if any. To determine\nthe exact ranges of coding sequence, intersect this range with those of the\nexons, if any. If there are any\nexons, the\ncodingSequence must start\nand end within them.\n\nNote that in some cases, the reference genome will not exactly match the\nobserved mRNA transcript e.g. due to variance in the source genome from\nreference. In these cases,\nexon.frame will not necessarily\nmatch the expected reference reading frame and coding exon reference bases\ncannot necessarily be concatenated to produce the original transcript mRNA." - }, - "geneId": { - "description": "The annotation ID of the gene from which this transcript is transcribed.", - "type": "string" + "description": "The range of the coding sequence for this transcript, if any. To determine\nthe exact ranges of coding sequence, intersect this range with those of the\nexons, if any. If there are any\nexons, the\ncodingSequence must start\nand end within them.\n\nNote that in some cases, the reference genome will not exactly match the\nobserved mRNA transcript e.g. due to variance in the source genome from\nreference. In these cases,\nexon.frame will not necessarily\nmatch the expected reference reading frame and coding exon reference bases\ncannot necessarily be concatenated to produce the original transcript mRNA.", + "$ref": "CodingSequence" } }, "id": "Transcript" }, "AnnotationSet": { - "description": "An annotation set is a logical grouping of annotations that share consistent\ntype information and provenance. Examples of annotation sets include 'all\ngenes from refseq', and 'all variant annotations from ClinVar'.", - "type": "object", "properties": { - "id": { - "description": "The server-generated annotation set ID, unique across all annotation sets.", + "sourceUri": { + "description": "The source URI describing the file from which this annotation set was\ngenerated, if any.", "type": "string" }, "datasetId": { "description": "The dataset to which this annotation set belongs.", "type": "string" }, - "sourceUri": { - "description": "The source URI describing the file from which this annotation set was\ngenerated, if any.", - "type": "string" - }, "name": { "description": "The display name for this annotation set.", "type": "string" @@ -3130,18 +2828,7 @@ "description": "The ID of the reference set that defines the coordinate space for this\nset's annotations.", "type": "string" }, - "info": { - "additionalProperties": { - "items": { - "type": "any" - }, - "type": "array" - }, - "description": "A map of additional read alignment information. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values).", - "type": "object" - }, "type": { - "type": "string", "enumDescriptions": [ "", "A `GENERIC` annotation type should be used when no other annotation\ntype will suffice. This represents an untyped annotation of the reference\ngenome.", @@ -3156,18 +2843,31 @@ "GENE", "TRANSCRIPT" ], - "description": "The type of annotations contained within this set." + "description": "The type of annotations contained within this set.", + "type": "string" + }, + "info": { + "additionalProperties": { + "items": { + "type": "any" + }, + "type": "array" + }, + "description": "A map of additional read alignment information. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values).", + "type": "object" + }, + "id": { + "description": "The server-generated annotation set ID, unique across all annotation sets.", + "type": "string" } }, - "id": "AnnotationSet" + "id": "AnnotationSet", + "description": "An annotation set is a logical grouping of annotations that share consistent\ntype information and provenance. Examples of annotation sets include 'all\ngenes from refseq', and 'all variant annotations from ClinVar'.", + "type": "object" }, "Experiment": { "type": "object", "properties": { - "sequencingCenter": { - "description": "The sequencing center used as part of this experiment.", - "type": "string" - }, "platformUnit": { "description": "The platform unit used as part of this experiment, for example\nflowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to the\n@RG PU field in the SAM spec.", "type": "string" @@ -3179,6 +2879,10 @@ "libraryId": { "type": "string", "description": "A client-supplied library identifier; a library is a collection of DNA\nfragments which have been prepared for sequencing from a sample. This\nfield is important for quality control as error or bias can be introduced\nduring sample preparation." + }, + "sequencingCenter": { + "description": "The sequencing center used as part of this experiment.", + "type": "string" } }, "id": "Experiment" @@ -3188,8 +2892,8 @@ "type": "object", "properties": { "nextPageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results." + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", + "type": "string" }, "datasets": { "description": "The list of matching Datasets.", @@ -3215,6 +2919,27 @@ }, "id": "TestIamPermissionsRequest" }, + "Exon": { + "type": "object", + "properties": { + "start": { + "format": "int64", + "description": "The start position of the exon on this annotation's reference sequence,\n0-based inclusive. Note that this is relative to the reference start, and\n**not** the containing annotation start.", + "type": "string" + }, + "frame": { + "format": "int32", + "description": "The frame of this exon. Contains a value of 0, 1, or 2, which indicates\nthe offset of the first coding base of the exon within the reading frame\nof the coding DNA sequence, if any. This field is dependent on the\nstrandedness of this annotation (see\nAnnotation.reverse_strand).\nFor forward stranded annotations, this offset is relative to the\nexon.start. For reverse\nstrand annotations, this offset is relative to the\nexon.end `- 1`.\n\nUnset if this exon does not intersect the coding sequence. Upon creation\nof a transcript, the frame must be populated for all or none of the\ncoding exons.", + "type": "integer" + }, + "end": { + "format": "int64", + "description": "The end position of the exon on this annotation's reference sequence,\n0-based exclusive. Note that this is relative to the reference start, and\n*not* the containing annotation start.", + "type": "string" + } + }, + "id": "Exon" + }, "ExportReadGroupSetRequest": { "description": "The read group set export request.", "type": "object", @@ -3237,29 +2962,7 @@ }, "id": "ExportReadGroupSetRequest" }, - "Exon": { - "properties": { - "start": { - "format": "int64", - "description": "The start position of the exon on this annotation's reference sequence,\n0-based inclusive. Note that this is relative to the reference start, and\n**not** the containing annotation start.", - "type": "string" - }, - "frame": { - "type": "integer", - "format": "int32", - "description": "The frame of this exon. Contains a value of 0, 1, or 2, which indicates\nthe offset of the first coding base of the exon within the reading frame\nof the coding DNA sequence, if any. This field is dependent on the\nstrandedness of this annotation (see\nAnnotation.reverse_strand).\nFor forward stranded annotations, this offset is relative to the\nexon.start. For reverse\nstrand annotations, this offset is relative to the\nexon.end `- 1`.\n\nUnset if this exon does not intersect the coding sequence. Upon creation\nof a transcript, the frame must be populated for all or none of the\ncoding exons." - }, - "end": { - "type": "string", - "format": "int64", - "description": "The end position of the exon on this annotation's reference sequence,\n0-based exclusive. Note that this is relative to the reference start, and\n*not* the containing annotation start." - } - }, - "id": "Exon", - "type": "object" - }, "CallSet": { - "type": "object", "properties": { "created": { "format": "int64", @@ -3275,14 +2978,14 @@ "type": "string" }, "info": { + "description": "A map of additional call set information. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values).", + "type": "object", "additionalProperties": { "items": { "type": "any" }, "type": "array" - }, - "description": "A map of additional call set information. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values).", - "type": "object" + } }, "variantSetIds": { "description": "The IDs of the variant sets this call set belongs to. This field must\nhave exactly length one, as a call set belongs to a single variant set.\nThis field is repeated for compatibility with the\n[GA4GH 0.5.1\nAPI](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variants.avdl#L76).", @@ -3292,12 +2995,13 @@ "type": "array" }, "id": { - "description": "The server-generated call set ID, unique across all call sets.", - "type": "string" + "type": "string", + "description": "The server-generated call set ID, unique across all call sets." } }, "id": "CallSet", - "description": "A call set is a collection of variant calls, typically for one sample. It\nbelongs to a variant set.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" + "description": "A call set is a collection of variant calls, typically for one sample. It\nbelongs to a variant set.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "type": "object" }, "SearchAnnotationSetsResponse": { "type": "object", @@ -3307,19 +3011,22 @@ "type": "string" }, "annotationSets": { - "description": "The matching annotation sets.", "items": { "$ref": "AnnotationSet" }, - "type": "array" + "type": "array", + "description": "The matching annotation sets." } }, "id": "SearchAnnotationSetsResponse" }, "ImportVariantsRequest": { - "description": "The variant data import request.", "type": "object", "properties": { + "normalizeReferenceNames": { + "description": "Convert reference names to the canonical representation.\nhg19 haploytypes (those reference names containing \"_hap\")\nare not modified in any way.\nAll other reference names are modified according to the following rules:\nThe reference name is capitalized.\nThe \"chr\" prefix is dropped for all autosomes and sex chromsomes.\nFor example \"chr17\" becomes \"17\" and \"chrX\" becomes \"X\".\nAll mitochondrial chromosomes (\"chrM\", \"chrMT\", etc) become \"MT\".", + "type": "boolean" + }, "format": { "enumDescriptions": [ "", @@ -3347,25 +3054,29 @@ } }, "sourceUris": { + "description": "A list of URIs referencing variant files in Google Cloud Storage. URIs can\ninclude wildcards [as described\nhere](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames).\nNote that recursive wildcards ('**') are not supported.", "items": { "type": "string" }, - "type": "array", - "description": "A list of URIs referencing variant files in Google Cloud Storage. URIs can\ninclude wildcards [as described\nhere](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames).\nNote that recursive wildcards ('**') are not supported." + "type": "array" }, "variantSetId": { "description": "Required. The variant set to which variant data should be imported.", "type": "string" - }, - "normalizeReferenceNames": { - "description": "Convert reference names to the canonical representation.\nhg19 haploytypes (those reference names containing \"_hap\")\nare not modified in any way.\nAll other reference names are modified according to the following rules:\nThe reference name is capitalized.\nThe \"chr\" prefix is dropped for all autosomes and sex chromsomes.\nFor example \"chr17\" becomes \"17\" and \"chrX\" becomes \"X\".\nAll mitochondrial chromosomes (\"chrM\", \"chrMT\", etc) become \"MT\".", - "type": "boolean" } }, - "id": "ImportVariantsRequest" + "id": "ImportVariantsRequest", + "description": "The variant data import request." }, "VariantAnnotation": { "properties": { + "conditions": { + "items": { + "$ref": "ClinicalCondition" + }, + "type": "array", + "description": "The set of conditions associated with this variant.\nA condition describes the way a variant influences human health." + }, "effect": { "enumDescriptions": [ "", @@ -3400,7 +3111,6 @@ "type": "array" }, "type": { - "type": "string", "enumDescriptions": [ "", "`TYPE_OTHER` should be used when no other Type will suffice.\nFurther explanation of the variant type may be included in the\ninfo field.", @@ -3421,7 +3131,8 @@ "STRUCTURAL", "CNV" ], - "description": "Type has been adapted from ClinVar's list of variant types." + "description": "Type has been adapted from ClinVar's list of variant types.", + "type": "string" }, "alternateBases": { "description": "The alternate allele for this variant. If multiple alternate alleles\nexist at this location, create a separate variant for each one, as they\nmay represent distinct conditions.", @@ -3466,13 +3177,6 @@ ], "description": "Describes the clinical significance of a variant.\nIt is adapted from the ClinVar controlled vocabulary for clinical\nsignificance described at:\nhttp://www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/", "type": "string" - }, - "conditions": { - "description": "The set of conditions associated with this variant.\nA condition describes the way a variant influences human health.", - "items": { - "$ref": "ClinicalCondition" - }, - "type": "array" } }, "id": "VariantAnnotation", @@ -3491,11 +3195,11 @@ "type": "string" }, "coverageBuckets": { - "description": "The coverage buckets. The list of buckets is sparse; a bucket with 0\noverlapping reads is not returned. A bucket never crosses more than one\nreference sequence. Each bucket has width `bucketWidth`, unless\nits end is the end of the reference sequence.", "items": { "$ref": "CoverageBucket" }, - "type": "array" + "type": "array", + "description": "The coverage buckets. The list of buckets is sparse; a bucket with 0\noverlapping reads is not returned. A bucket never crosses more than one\nreference sequence. Each bucket has width `bucketWidth`, unless\nits end is the end of the reference sequence." } }, "id": "ListCoverageBucketsResponse" @@ -3505,41 +3209,52 @@ "type": "object", "properties": { "bigqueryTable": { - "description": "Required. The BigQuery table to export data to.\nIf the table doesn't exist, it will be created. If it already exists, it\nwill be overwritten.", - "type": "string" + "type": "string", + "description": "Required. The BigQuery table to export data to.\nIf the table doesn't exist, it will be created. If it already exists, it\nwill be overwritten." }, "bigqueryDataset": { "description": "Required. The BigQuery dataset to export data to. This dataset must already\nexist. Note that this is distinct from the Genomics concept of \"dataset\".", "type": "string" }, "format": { - "enumDescriptions": [ - "", - "Export the data to Google BigQuery." - ], "enum": [ "FORMAT_UNSPECIFIED", "FORMAT_BIGQUERY" ], "description": "The format for the exported data.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "", + "Export the data to Google BigQuery." + ] }, "projectId": { "description": "Required. The Google Cloud project ID that owns the destination\nBigQuery dataset. The caller must have WRITE access to this project. This\nproject will also own the resulting export job.", "type": "string" }, "callSetIds": { + "description": "If provided, only variant call information from the specified call sets\nwill be exported. By default all variant calls are exported.", "items": { "type": "string" }, - "type": "array", - "description": "If provided, only variant call information from the specified call sets\nwill be exported. By default all variant calls are exported." + "type": "array" } }, "id": "ExportVariantSetRequest" }, "SearchAnnotationsRequest": { + "id": "SearchAnnotationsRequest", + "type": "object", "properties": { + "referenceId": { + "description": "The ID of the reference to query.", + "type": "string" + }, + "end": { + "format": "int64", + "description": "The end position of the range on the reference, 0-based exclusive. If\nreferenceId or\nreferenceName\nmust be specified, Defaults to the length of the reference.", + "type": "string" + }, "pageToken": { "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", "type": "string" @@ -3564,73 +3279,62 @@ "referenceName": { "description": "The name of the reference to query, within the reference set associated\nwith this query.", "type": "string" - }, - "referenceId": { - "type": "string", - "description": "The ID of the reference to query." - }, - "end": { - "type": "string", - "format": "int64", - "description": "The end position of the range on the reference, 0-based exclusive. If\nreferenceId or\nreferenceName\nmust be specified, Defaults to the length of the reference." } - }, - "id": "SearchAnnotationsRequest", - "type": "object" + } }, "OperationEvent": { - "id": "OperationEvent", - "description": "An event that occurred during an Operation.", - "type": "object", "properties": { + "startTime": { + "format": "google-datetime", + "description": "Optional time of when event started.", + "type": "string" + }, "description": { "description": "Required description of event.", "type": "string" }, "endTime": { - "format": "google-datetime", - "description": "Optional time of when event finished. An event can have a start time and no\nfinish time. If an event has a finish time, there must be a start time.", - "type": "string" - }, - "startTime": { "type": "string", "format": "google-datetime", - "description": "Optional time of when event started." + "description": "Optional time of when event finished. An event can have a start time and no\nfinish time. If an event has a finish time, there must be a start time." } - } + }, + "id": "OperationEvent", + "description": "An event that occurred during an Operation.", + "type": "object" }, "CodingSequence": { "type": "object", "properties": { - "start": { - "format": "int64", - "description": "The start of the coding sequence on this annotation's reference sequence,\n0-based inclusive. Note that this position is relative to the reference\nstart, and *not* the containing annotation start.", - "type": "string" - }, "end": { "format": "int64", "description": "The end of the coding sequence on this annotation's reference sequence,\n0-based exclusive. Note that this position is relative to the reference\nstart, and *not* the containing annotation start.", "type": "string" + }, + "start": { + "format": "int64", + "description": "The start of the coding sequence on this annotation's reference sequence,\n0-based inclusive. Note that this position is relative to the reference\nstart, and *not* the containing annotation start.", + "type": "string" } }, "id": "CodingSequence" }, "SearchReferencesResponse": { - "id": "SearchReferencesResponse", "type": "object", "properties": { "references": { + "description": "The matching references.", "items": { "$ref": "Reference" }, - "type": "array", - "description": "The matching references." + "type": "array" }, "nextPageToken": { "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", "type": "string" } - } + }, + "id": "SearchReferencesResponse" }, "GetIamPolicyRequest": { "description": "Request message for `GetIamPolicy` method.", @@ -3655,22 +3359,14 @@ "SearchAnnotationSetsRequest": { "type": "object", "properties": { - "name": { - "description": "Only return annotations sets for which a substring of the name matches this\nstring (case insensitive).", - "type": "string" - }, - "referenceSetId": { - "description": "If specified, only annotation sets associated with the given reference set\nare returned.", - "type": "string" - }, "pageToken": { "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", "type": "string" }, "pageSize": { + "type": "integer", "format": "int32", - "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 128. The maximum value is 1024.", - "type": "integer" + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 128. The maximum value is 1024." }, "datasetIds": { "description": "Required. The dataset IDs to search within. Caller must have `READ` access\nto these datasets.", @@ -3680,13 +3376,6 @@ "type": "array" }, "types": { - "enumDescriptions": [ - "", - "A `GENERIC` annotation type should be used when no other annotation\ntype will suffice. This represents an untyped annotation of the reference\ngenome.", - "A `VARIANT` annotation type.", - "A `GENE` annotation type represents the existence of a gene at the\nassociated reference coordinates. The start coordinate is typically the\ngene's transcription start site and the end is typically the end of the\ngene's last exon.", - "A `TRANSCRIPT` annotation type represents the assertion that a\nparticular region of the reference genome may be transcribed as RNA." - ], "description": "If specified, only annotation sets that have any of these types are\nreturned.", "items": { "enum": [ @@ -3698,12 +3387,29 @@ ], "type": "string" }, - "type": "array" + "type": "array", + "enumDescriptions": [ + "", + "A `GENERIC` annotation type should be used when no other annotation\ntype will suffice. This represents an untyped annotation of the reference\ngenome.", + "A `VARIANT` annotation type.", + "A `GENE` annotation type represents the existence of a gene at the\nassociated reference coordinates. The start coordinate is typically the\ngene's transcription start site and the end is typically the end of the\ngene's last exon.", + "A `TRANSCRIPT` annotation type represents the assertion that a\nparticular region of the reference genome may be transcribed as RNA." + ] + }, + "name": { + "description": "Only return annotations sets for which a substring of the name matches this\nstring (case insensitive).", + "type": "string" + }, + "referenceSetId": { + "description": "If specified, only annotation sets associated with the given reference set\nare returned.", + "type": "string" } }, "id": "SearchAnnotationSetsRequest" }, "SearchReadGroupSetsResponse": { + "description": "The read group set search response.", + "type": "object", "properties": { "readGroupSets": { "items": { @@ -3717,11 +3423,10 @@ "type": "string" } }, - "id": "SearchReadGroupSetsResponse", - "description": "The read group set search response.", - "type": "object" + "id": "SearchReadGroupSetsResponse" }, "SearchReferencesRequest": { + "type": "object", "properties": { "md5checksums": { "description": "If present, return references for which the\nmd5checksum matches exactly.", @@ -3742,40 +3447,340 @@ "type": "array" }, "pageSize": { - "type": "integer", "format": "int32", - "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 1024. The maximum value is 4096." + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 1024. The maximum value is 4096.", + "type": "integer" }, "referenceSetId": { "description": "If present, return only references which belong to this reference set.", "type": "string" } }, - "id": "SearchReferencesRequest", - "type": "object" + "id": "SearchReferencesRequest" }, "LinearAlignment": { "description": "A linear alignment can be represented by one CIGAR string. Describes the\nmapped position and local alignment of the read to the reference.", "type": "object", "properties": { + "mappingQuality": { + "type": "integer", + "format": "int32", + "description": "The mapping quality of this alignment. Represents how likely\nthe read maps to this position as opposed to other locations.\n\nSpecifically, this is -10 log10 Pr(mapping position is wrong), rounded to\nthe nearest integer." + }, "cigar": { + "description": "Represents the local alignment of this sequence (alignment matches, indels,\netc) against the reference.", "items": { "$ref": "CigarUnit" }, - "type": "array", - "description": "Represents the local alignment of this sequence (alignment matches, indels,\netc) against the reference." + "type": "array" }, "position": { - "description": "The position of this alignment.", - "$ref": "Position" - }, - "mappingQuality": { - "format": "int32", - "description": "The mapping quality of this alignment. Represents how likely\nthe read maps to this position as opposed to other locations.\n\nSpecifically, this is -10 log10 Pr(mapping position is wrong), rounded to\nthe nearest integer.", - "type": "integer" + "$ref": "Position", + "description": "The position of this alignment." } }, "id": "LinearAlignment" + }, + "Dataset": { + "description": "A Dataset is a collection of genomic data.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "type": "object", + "properties": { + "name": { + "description": "The dataset name.", + "type": "string" + }, + "projectId": { + "description": "The Google Cloud project ID that this dataset belongs to.", + "type": "string" + }, + "id": { + "description": "The server-generated dataset ID, unique across all datasets.", + "type": "string" + }, + "createTime": { + "format": "google-datetime", + "description": "The time this dataset was created, in seconds from the epoch.", + "type": "string" + } + }, + "id": "Dataset" + }, + "ImportVariantsResponse": { + "description": "The variant data import response.", + "type": "object", + "properties": { + "callSetIds": { + "description": "IDs of the call sets created during the import.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "ImportVariantsResponse" + }, + "ReadGroup": { + "description": "A read group is all the data that's processed the same way by the sequencer.", + "type": "object", + "properties": { + "datasetId": { + "description": "The dataset to which this read group belongs.", + "type": "string" + }, + "experiment": { + "$ref": "Experiment", + "description": "The experiment used to generate this read group." + }, + "name": { + "description": "The read group name. This corresponds to the @RG ID field in the SAM spec.", + "type": "string" + }, + "referenceSetId": { + "description": "The reference set the reads in this read group are aligned to.", + "type": "string" + }, + "info": { + "type": "object", + "additionalProperties": { + "items": { + "type": "any" + }, + "type": "array" + }, + "description": "A map of additional read group information. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values)." + }, + "id": { + "description": "The server-generated read group ID, unique for all read groups.\nNote: This is different than the @RG ID field in the SAM spec. For that\nvalue, see name.", + "type": "string" + }, + "programs": { + "description": "The programs used to generate this read group. Programs are always\nidentical for all read groups within a read group set. For this reason,\nonly the first read group in a returned set will have this field\npopulated.", + "items": { + "$ref": "Program" + }, + "type": "array" + }, + "predictedInsertSize": { + "format": "int32", + "description": "The predicted insert size of this read group. The insert size is the length\nthe sequenced DNA fragment from end-to-end, not including the adapters.", + "type": "integer" + }, + "description": { + "description": "A free-form text description of this read group.", + "type": "string" + }, + "sampleId": { + "description": "A client-supplied sample identifier for the reads in this read group.", + "type": "string" + } + }, + "id": "ReadGroup" + }, + "ReadGroupSet": { + "description": "A read group set is a logical collection of read groups, which are\ncollections of reads produced by a sequencer. A read group set typically\nmodels reads corresponding to one sample, sequenced one way, and aligned one\nway.\n\n* A read group set belongs to one dataset.\n* A read group belongs to one read group set.\n* A read belongs to one read group.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "type": "object", + "properties": { + "datasetId": { + "type": "string", + "description": "The dataset to which this read group set belongs." + }, + "filename": { + "description": "The filename of the original source file for this read group set, if any.", + "type": "string" + }, + "readGroups": { + "description": "The read groups in this set. There are typically 1-10 read groups in a read\ngroup set.", + "items": { + "$ref": "ReadGroup" + }, + "type": "array" + }, + "name": { + "type": "string", + "description": "The read group set name. By default this will be initialized to the sample\nname of the sequenced data contained in this set." + }, + "referenceSetId": { + "description": "The reference set to which the reads in this read group set are aligned.", + "type": "string" + }, + "info": { + "additionalProperties": { + "items": { + "type": "any" + }, + "type": "array" + }, + "description": "A map of additional read group set information.", + "type": "object" + }, + "id": { + "description": "The server-generated read group set ID, unique for all read group sets.", + "type": "string" + } + }, + "id": "ReadGroupSet" + }, + "SearchVariantSetsResponse": { + "properties": { + "nextPageToken": { + "type": "string", + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results." + }, + "variantSets": { + "description": "The variant sets belonging to the requested dataset.", + "items": { + "$ref": "VariantSet" + }, + "type": "array" + } + }, + "id": "SearchVariantSetsResponse", + "description": "The search variant sets response.", + "type": "object" + }, + "Empty": { + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {} + }, + "Entry": { + "type": "object", + "properties": { + "annotation": { + "$ref": "Annotation", + "description": "The created annotation, if creation was successful." + }, + "status": { + "description": "The creation status.", + "$ref": "Status" + } + }, + "id": "Entry" + }, + "Position": { + "description": "An abstraction for referring to a genomic position, in relation to some\nalready known reference. For now, represents a genomic position as a\nreference name, a base number on that reference (0-based), and a\ndetermination of forward or reverse strand.", + "type": "object", + "properties": { + "reverseStrand": { + "type": "boolean", + "description": "Whether this position is on the reverse strand, as opposed to the forward\nstrand." + }, + "position": { + "format": "int64", + "description": "The 0-based offset from the start of the forward strand for that reference.", + "type": "string" + }, + "referenceName": { + "description": "The name of the reference in whatever reference set is being used.", + "type": "string" + } + }, + "id": "Position" + }, + "SearchReferenceSetsResponse": { + "id": "SearchReferenceSetsResponse", + "type": "object", + "properties": { + "referenceSets": { + "description": "The matching references sets.", + "items": { + "$ref": "ReferenceSet" + }, + "type": "array" + }, + "nextPageToken": { + "type": "string", + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results." + } + } + }, + "SearchCallSetsRequest": { + "description": "The call set search request.", + "type": "object", + "properties": { + "pageToken": { + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string" + }, + "name": { + "description": "Only return call sets for which a substring of the name matches this\nstring.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 1024.", + "type": "integer" + }, + "variantSetIds": { + "description": "Restrict the query to call sets within the given variant sets. At least one\nID must be provided.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "SearchCallSetsRequest" + }, + "ImportReadGroupSetsRequest": { + "description": "The read group set import request.", + "type": "object", + "properties": { + "sourceUris": { + "description": "A list of URIs pointing at [BAM\nfiles](https://samtools.github.io/hts-specs/SAMv1.pdf)\nin Google Cloud Storage.\nThose URIs can include wildcards (*), but do not add or remove\nmatching files before import has completed.\n\nNote that Google Cloud Storage object listing is only eventually\nconsistent: files added may be not be immediately visible to\neveryone. Thus, if using a wildcard it is preferable not to start\nthe import immediately after the files are created.", + "items": { + "type": "string" + }, + "type": "array" + }, + "referenceSetId": { + "type": "string", + "description": "The reference set to which the imported read group sets are aligned to, if\nany. The reference names of this reference set must be a superset of those\nfound in the imported file headers. If no reference set id is provided, a\nbest effort is made to associate with a matching reference set." + }, + "partitionStrategy": { + "description": "The partition strategy describes how read groups are partitioned into read\ngroup sets.", + "type": "string", + "enumDescriptions": [ + "", + "In most cases, this strategy yields one read group set per file. This is\nthe default behavior.\n\nAllocate one read group set per file per sample. For BAM files, read\ngroups are considered to share a sample if they have identical sample\nnames. Furthermore, all reads for each file which do not belong to a read\ngroup, if any, will be grouped into a single read group set per-file.", + "Includes all read groups in all imported files into a single read group\nset. Requires that the headers for all imported files are equivalent. All\nreads which do not belong to a read group, if any, will be grouped into a\nseparate read group set." + ], + "enum": [ + "PARTITION_STRATEGY_UNSPECIFIED", + "PER_FILE_PER_SAMPLE", + "MERGE_ALL" + ] + }, + "datasetId": { + "description": "Required. The ID of the dataset these read group sets will belong to. The\ncaller must have WRITE permissions to this dataset.", + "type": "string" + } + }, + "id": "ImportReadGroupSetsRequest" + }, + "Policy": { + "id": "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", + "properties": { + "etag": { + "type": "string", + "format": "byte", + "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." + }, + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" + }, + "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" + } + } } }, "protocol": "rest", @@ -3806,12 +3811,7 @@ } } }, - "servicePath": "", - "description": "Upload, process, query, and search Genomics data in the cloud.", "kind": "discovery#restDescription", - "rootUrl": "https://genomics.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "genomics", - "batchPath": "batch" + "description": "Upload, process, query, and search Genomics data in the cloud.", + "servicePath": "" } diff --git a/vendor/google.golang.org/api/genomics/v1/genomics-gen.go b/vendor/google.golang.org/api/genomics/v1/genomics-gen.go index da51ba3e1..db7a7547d 100644 --- a/vendor/google.golang.org/api/genomics/v1/genomics-gen.go +++ b/vendor/google.golang.org/api/genomics/v1/genomics-gen.go @@ -1737,8 +1737,8 @@ func (s *MergeVariantsRequest) MarshalJSON() ([]byte, error) { type Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` diff --git a/vendor/google.golang.org/api/genomics/v1alpha2/genomics-api.json b/vendor/google.golang.org/api/genomics/v1alpha2/genomics-api.json index b6c39ddde..08e1e0949 100644 --- a/vendor/google.golang.org/api/genomics/v1alpha2/genomics-api.json +++ b/vendor/google.golang.org/api/genomics/v1alpha2/genomics-api.json @@ -1,44 +1,190 @@ { - "batchPath": "batch", - "id": "genomics:v1alpha2", - "documentationLink": "https://cloud.google.com/genomics", - "revision": "20170803", - "title": "Genomics API", "discoveryVersion": "v1", "ownerName": "Google", "resources": { - "operations": { + "pipelines": { "methods": { - "cancel": { + "getControllerConfig": { + "flatPath": "v1alpha2/pipelines:getControllerConfig", + "path": "v1alpha2/pipelines:getControllerConfig", + "id": "genomics.pipelines.getControllerConfig", + "description": "Gets controller configuration information. Should only be called\nby VMs created by the Pipelines Service and not by end users.", + "httpMethod": "GET", + "response": { + "$ref": "ControllerConfig" + }, + "parameterOrder": [], + "parameters": { + "operationId": { + "location": "query", + "description": "The operation to retrieve controller configuration for.", + "type": "string" + }, + "validationToken": { + "format": "uint64", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ] + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "pipelineId" + ], "response": { "$ref": "Empty" }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics" ], "parameters": { - "name": { - "pattern": "^operations/.+$", + "pipelineId": { "location": "path", - "description": "The name of the operation resource to be cancelled.", + "description": "Caller must have WRITE access to the project in which this pipeline\nis defined.", "type": "string", "required": true } }, - "flatPath": "v1alpha2/operations/{operationsId}:cancel", - "id": "genomics.operations.cancel", - "path": "v1alpha2/{+name}:cancel", - "request": { - "$ref": "CancelOperationRequest" + "flatPath": "v1alpha2/pipelines/{pipelineId}", + "path": "v1alpha2/pipelines/{pipelineId}", + "id": "genomics.pipelines.delete", + "description": "Deletes a pipeline based on ID.\n\nCaller must have WRITE permission to the project." + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ListPipelinesResponse" }, - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients may use Operations.GetOperation or Operations.ListOperations to check whether the cancellation succeeded or the operation completed despite cancellation." + "parameters": { + "namePrefix": { + "location": "query", + "description": "Pipelines with names that match this prefix should be\nreturned. If unspecified, all pipelines in the project, up to\n`pageSize`, will be returned.", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Token to use to indicate where to start getting results.\nIf unspecified, returns the first page of results.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Number of pipelines to return at once. Defaults to 256, and max\nis 2048.", + "type": "integer", + "location": "query" + }, + "projectId": { + "location": "query", + "description": "Required. The name of the project to search for pipelines. Caller\nmust have READ access to this project.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1alpha2/pipelines", + "path": "v1alpha2/pipelines", + "id": "genomics.pipelines.list", + "description": "Lists pipelines.\n\nCaller must have READ permission to the project." + }, + "create": { + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1alpha2/pipelines", + "path": "v1alpha2/pipelines", + "id": "genomics.pipelines.create", + "description": "Creates a pipeline that can be run later. Create takes a Pipeline that\nhas all fields other than `pipelineId` populated, and then returns\nthe same pipeline with `pipelineId` populated. This id can be used\nto run the pipeline.\n\nCaller must have WRITE permission to the project.", + "request": { + "$ref": "Pipeline" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Pipeline" + } + }, + "run": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": {}, + "flatPath": "v1alpha2/pipelines:run", + "id": "genomics.pipelines.run", + "path": "v1alpha2/pipelines:run", + "request": { + "$ref": "RunPipelineRequest" + }, + "description": "Runs a pipeline. If `pipelineId` is specified in the request, then\nrun a saved pipeline. If `ephemeralPipeline` is specified, then run\nthat pipeline once without saving a copy.\n\nThe caller must have READ permission to the project where the pipeline\nis stored and WRITE permission to the project where the pipeline will be\nrun, as VMs will be created and storage will be used.\n\nIf a pipeline operation is still running after 6 days, it will be canceled." }, "get": { + "response": { + "$ref": "Pipeline" + }, + "parameterOrder": [ + "pipelineId" + ], + "httpMethod": "GET", + "parameters": { + "pipelineId": { + "description": "Caller must have READ access to the project in which this pipeline\nis defined.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1alpha2/pipelines/{pipelineId}", + "id": "genomics.pipelines.get", + "path": "v1alpha2/pipelines/{pipelineId}", + "description": "Retrieves a pipeline based on ID.\n\nCaller must have READ permission to the project." + }, + "setOperationStatus": { + "description": "Sets status of a given operation. Any new timestamps (as determined by\ndescription) are appended to TimestampEvents. Should only be called by VMs\ncreated by the Pipelines Service and not by end users.", + "request": { + "$ref": "SetOperationStatusRequest" + }, + "httpMethod": "PUT", + "parameterOrder": [], + "response": { + "$ref": "Empty" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1alpha2/pipelines:setOperationStatus", + "path": "v1alpha2/pipelines:setOperationStatus", + "id": "genomics.pipelines.setOperationStatus" + } + } + }, + "operations": { + "methods": { + "get": { + "flatPath": "v1alpha2/operations/{operationsId}", + "id": "genomics.operations.get", + "path": "v1alpha2/{+name}", "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", "response": { "$ref": "Operation" @@ -47,27 +193,21 @@ "name" ], "httpMethod": "GET", - "parameters": { - "name": { - "description": "The name of the operation resource.", - "type": "string", - "required": true, - "pattern": "^operations/.+$", - "location": "path" - } - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics" ], - "flatPath": "v1alpha2/operations/{operationsId}", - "id": "genomics.operations.get", - "path": "v1alpha2/{+name}" + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource.", + "type": "string", + "required": true, + "pattern": "^operations/.+$" + } + } }, "list": { - "flatPath": "v1alpha2/operations", - "id": "genomics.operations.list", - "path": "v1alpha2/{+name}", "description": "Lists operations that match the specified filter in the request.", "response": { "$ref": "ListOperationsResponse" @@ -92,11 +232,11 @@ "type": "string" }, "name": { + "pattern": "^operations$", + "location": "path", "description": "The name of the operation's parent resource.", "type": "string", - "required": true, - "pattern": "^operations$", - "location": "path" + "required": true }, "pageSize": { "location": "query", @@ -104,184 +244,39 @@ "description": "The maximum number of results to return. If unspecified, defaults to\n256. The maximum value is 2048.", "type": "integer" } - } - } - } - }, - "pipelines": { - "methods": { - "setOperationStatus": { - "response": { - "$ref": "Empty" }, - "parameterOrder": [], - "httpMethod": "PUT", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "flatPath": "v1alpha2/pipelines:setOperationStatus", - "id": "genomics.pipelines.setOperationStatus", - "path": "v1alpha2/pipelines:setOperationStatus", - "description": "Sets status of a given operation. Any new timestamps (as determined by\ndescription) are appended to TimestampEvents. Should only be called by VMs\ncreated by the Pipelines Service and not by end users.", - "request": { - "$ref": "SetOperationStatusRequest" - } + "flatPath": "v1alpha2/operations", + "id": "genomics.operations.list", + "path": "v1alpha2/{+name}" }, - "delete": { + "cancel": { + "id": "genomics.operations.cancel", + "path": "v1alpha2/{+name}:cancel", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients may use Operations.GetOperation or Operations.ListOperations to check whether the cancellation succeeded or the operation completed despite cancellation.", + "request": { + "$ref": "CancelOperationRequest" + }, "response": { "$ref": "Empty" }, "parameterOrder": [ - "pipelineId" + "name" ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "parameters": { - "pipelineId": { - "location": "path", - "description": "Caller must have WRITE access to the project in which this pipeline\nis defined.", - "type": "string", - "required": true - } - }, - "flatPath": "v1alpha2/pipelines/{pipelineId}", - "id": "genomics.pipelines.delete", - "path": "v1alpha2/pipelines/{pipelineId}", - "description": "Deletes a pipeline based on ID.\n\nCaller must have WRITE permission to the project." - }, - "getControllerConfig": { - "id": "genomics.pipelines.getControllerConfig", - "path": "v1alpha2/pipelines:getControllerConfig", - "description": "Gets controller configuration information. Should only be called\nby VMs created by the Pipelines Service and not by end users.", - "response": { - "$ref": "ControllerConfig" - }, - "parameterOrder": [], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "parameters": { - "operationId": { - "location": "query", - "description": "The operation to retrieve controller configuration for.", - "type": "string" - }, - "validationToken": { - "format": "uint64", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1alpha2/pipelines:getControllerConfig" - }, - "list": { - "path": "v1alpha2/pipelines", - "id": "genomics.pipelines.list", - "description": "Lists pipelines.\n\nCaller must have READ permission to the project.", - "httpMethod": "GET", - "parameterOrder": [], - "response": { - "$ref": "ListPipelinesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "parameters": { - "namePrefix": { - "description": "Pipelines with names that match this prefix should be\nreturned. If unspecified, all pipelines in the project, up to\n`pageSize`, will be returned.", - "type": "string", - "location": "query" - }, - "pageToken": { - "location": "query", - "description": "Token to use to indicate where to start getting results.\nIf unspecified, returns the first page of results.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Number of pipelines to return at once. Defaults to 256, and max\nis 2048.", - "type": "integer", - "location": "query" - }, - "projectId": { - "description": "Required. The name of the project to search for pipelines. Caller\nmust have READ access to this project.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1alpha2/pipelines" - }, - "create": { "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "Pipeline" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ], - "parameters": {}, - "flatPath": "v1alpha2/pipelines", - "path": "v1alpha2/pipelines", - "id": "genomics.pipelines.create", - "request": { - "$ref": "Pipeline" - }, - "description": "Creates a pipeline that can be run later. Create takes a Pipeline that\nhas all fields other than `pipelineId` populated, and then returns\nthe same pipeline with `pipelineId` populated. This id can be used\nto run the pipeline.\n\nCaller must have WRITE permission to the project." - }, - "run": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/genomics" - ], - "flatPath": "v1alpha2/pipelines:run", - "id": "genomics.pipelines.run", - "path": "v1alpha2/pipelines:run", - "description": "Runs a pipeline. If `pipelineId` is specified in the request, then\nrun a saved pipeline. If `ephemeralPipeline` is specified, then run\nthat pipeline once without saving a copy.\n\nThe caller must have READ permission to the project where the pipeline\nis stored and WRITE permission to the project where the pipeline will be\nrun, as VMs will be created and storage will be used.\n\nIf a pipeline operation is still running after 6 days, it will be canceled.", - "request": { - "$ref": "RunPipelineRequest" - } - }, - "get": { - "description": "Retrieves a pipeline based on ID.\n\nCaller must have READ permission to the project.", - "response": { - "$ref": "Pipeline" - }, - "parameterOrder": [ - "pipelineId" - ], - "httpMethod": "GET", "parameters": { - "pipelineId": { + "name": { "location": "path", - "description": "Caller must have READ access to the project in which this pipeline\nis defined.", + "description": "The name of the operation resource to be cancelled.", "type": "string", - "required": true + "required": true, + "pattern": "^operations/.+$" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/genomics" ], - "flatPath": "v1alpha2/pipelines/{pipelineId}", - "id": "genomics.pipelines.get", - "path": "v1alpha2/pipelines/{pipelineId}" + "flatPath": "v1alpha2/operations/{operationsId}:cancel" } } } @@ -293,15 +288,15 @@ "type": "string" }, "bearer_token": { - "location": "query", "description": "OAuth bearer token.", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, "prettyPrint": { "description": "Returns response with indentations and line breaks.", "default": "true", @@ -314,9 +309,9 @@ "type": "string" }, "fields": { + "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" + "type": "string" }, "callback": { "location": "query", @@ -324,6 +319,8 @@ "type": "string" }, "$.xgafv": { + "description": "V1 error format.", + "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -332,30 +329,28 @@ "enum": [ "1", "2" - ], - "description": "V1 error format.", - "type": "string" + ] }, "alt": { - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], "type": "string", "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" + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] }, "access_token": { - "type": "string", "location": "query", - "description": "OAuth access token." + "description": "OAuth access token.", + "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.", @@ -363,9 +358,9 @@ "location": "query" }, "quotaUser": { - "type": "string", "location": "query", - "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." + "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.", + "type": "string" }, "pp": { "description": "Pretty-print response.", @@ -375,450 +370,6 @@ } }, "schemas": { - "RunPipelineRequest": { - "properties": { - "ephemeralPipeline": { - "description": "A new pipeline object to run once and then delete.", - "$ref": "Pipeline" - }, - "pipelineArgs": { - "description": "The arguments to use when running this pipeline.", - "$ref": "RunPipelineArgs" - }, - "pipelineId": { - "description": "The already created pipeline to run.", - "type": "string" - } - }, - "id": "RunPipelineRequest", - "description": "The request to run a pipeline. If `pipelineId` is specified, it\nrefers to a saved pipeline created with CreatePipeline and set as\nthe `pipelineId` of the returned Pipeline object. If\n`ephemeralPipeline` is specified, that pipeline is run once\nwith the given args and not saved. It is an error to specify both\n`pipelineId` and `ephemeralPipeline`. `pipelineArgs`\nmust be specified.", - "type": "object" - }, - "CancelOperationRequest": { - "type": "object", - "properties": {}, - "id": "CancelOperationRequest", - "description": "The request message for Operations.CancelOperation." - }, - "Operation": { - "properties": { - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If importing Variants, an ImportVariantsResponse is returned. For pipelines and exports, an empty response is returned.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. For example: `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw`", - "type": "string" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "An OperationMetadata object. This will always be returned with the Operation.", - "type": "object" - } - }, - "id": "Operation", - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object" - }, - "RuntimeMetadata": { - "description": "Runtime metadata that will be populated in the\nruntimeMetadata\nfield of the Operation associated with a RunPipeline execution.", - "type": "object", - "properties": { - "computeEngine": { - "$ref": "ComputeEngine", - "description": "Execution information specific to Google Compute Engine." - } - }, - "id": "RuntimeMetadata" - }, - "ImportReadGroupSetsResponse": { - "id": "ImportReadGroupSetsResponse", - "description": "The read group set import response.", - "type": "object", - "properties": { - "readGroupSetIds": { - "description": "IDs of the read group sets that were created.", - "items": { - "type": "string" - }, - "type": "array" - } - } - }, - "Status": { - "type": "object", - "properties": { - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - } - }, - "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons." - }, - "ServiceAccount": { - "properties": { - "scopes": { - "description": "List of scopes to be enabled for this service account on the VM.\nThe following scopes are automatically included:\n\n* https://www.googleapis.com/auth/compute\n* https://www.googleapis.com/auth/devstorage.full_control\n* https://www.googleapis.com/auth/genomics\n* https://www.googleapis.com/auth/logging.write\n* https://www.googleapis.com/auth/monitoring.write", - "items": { - "type": "string" - }, - "type": "array" - }, - "email": { - "description": "Email address of the service account. Defaults to `default`,\nwhich uses the compute service account associated with the project.", - "type": "string" - } - }, - "id": "ServiceAccount", - "description": "A Google Cloud Service Account.", - "type": "object" - }, - "Pipeline": { - "properties": { - "projectId": { - "description": "Required. The project in which to create the pipeline. The caller must have\nWRITE access.", - "type": "string" - }, - "pipelineId": { - "description": "Unique pipeline id that is generated by the service when CreatePipeline\nis called. Cannot be specified in the Pipeline used in the\nCreatePipelineRequest, and will be populated in the response to\nCreatePipeline and all subsequent Get and List calls. Indicates that the\nservice has registered this pipeline.", - "type": "string" - }, - "outputParameters": { - "description": "Output parameters of the pipeline.", - "items": { - "$ref": "PipelineParameter" - }, - "type": "array" - }, - "description": { - "description": "User-specified description.", - "type": "string" - }, - "docker": { - "$ref": "DockerExecutor", - "description": "Specifies the docker run information." - }, - "inputParameters": { - "items": { - "$ref": "PipelineParameter" - }, - "type": "array", - "description": "Input parameters of the pipeline." - }, - "resources": { - "$ref": "PipelineResources", - "description": "Required. Specifies resource requirements for the pipeline run.\nRequired fields:\n\n*\nminimumCpuCores\n\n*\nminimumRamGb" - }, - "name": { - "description": "Required. A user specified pipeline name that does not have to be unique.\nThis name can be used for filtering Pipelines in ListPipelines.", - "type": "string" - } - }, - "id": "Pipeline", - "description": "The pipeline object. Represents a transformation from a set of input\nparameters to a set of output parameters. The transformation is defined\nas a docker image and command to run within that image. Each pipeline\nis run on a Google Compute Engine VM. A pipeline can be created with the\n`create` method and then later run with the `run` method, or a pipeline can\nbe defined and run all at once with the `run` method.", - "type": "object" - }, - "PipelineResources": { - "description": "The system resources for the pipeline run.", - "type": "object", - "properties": { - "bootDiskSizeGb": { - "format": "int32", - "description": "The size of the boot disk. Defaults to 10 (GB).", - "type": "integer" - }, - "preemptible": { - "description": "Whether to use preemptible VMs. Defaults to `false`. In order to use this,\nmust be true for both create time and run time. Cannot be true at run time\nif false at create time.", - "type": "boolean" - }, - "minimumRamGb": { - "type": "number", - "format": "double", - "description": "The minimum amount of RAM to use. Defaults to 3.75 (GB)" - }, - "zones": { - "description": "List of Google Compute Engine availability zones to which resource\ncreation will restricted. If empty, any zone may be chosen.", - "items": { - "type": "string" - }, - "type": "array" - }, - "minimumCpuCores": { - "type": "integer", - "format": "int32", - "description": "The minimum number of cores to use. Defaults to 1." - }, - "noAddress": { - "description": "Whether to assign an external IP to the instance. This is an experimental\nfeature that may go away. Defaults to false.\nCorresponds to `--no_address` flag for [gcloud compute instances create]\n(https://cloud.google.com/sdk/gcloud/reference/compute/instances/create).\nIn order to use this, must be true for both create time and run time.\nCannot be true at run time if false at create time. If you need to ssh into\na private IP VM for debugging, you can ssh to a public VM and then ssh into\nthe private VM's Internal IP. If noAddress is set, this pipeline run may\nonly load docker images from Google Container Registry and not Docker Hub.\nBefore using this, you must\n[configure access to Google services from internal IPs](https://cloud.google.com/compute/docs/configure-private-google-access#configuring_access_to_google_services_from_internal_ips).", - "type": "boolean" - }, - "disks": { - "description": "Disks to attach.", - "items": { - "$ref": "Disk" - }, - "type": "array" - } - }, - "id": "PipelineResources" - }, - "ControllerConfig": { - "properties": { - "gcsSources": { - "additionalProperties": { - "$ref": "RepeatedString" - }, - "type": "object" - }, - "gcsSinks": { - "type": "object", - "additionalProperties": { - "$ref": "RepeatedString" - } - }, - "disks": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "machineType": { - "type": "string" - }, - "cmd": { - "type": "string" - }, - "vars": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "image": { - "type": "string" - }, - "gcsLogPath": { - "type": "string" - } - }, - "id": "ControllerConfig", - "description": "Stores the information that the controller will fetch from the\nserver in order to run. Should only be used by VMs created by the\nPipelines Service and not by end users.", - "type": "object" - }, - "OperationEvent": { - "description": "An event that occurred during an Operation.", - "type": "object", - "properties": { - "endTime": { - "format": "google-datetime", - "description": "Optional time of when event finished. An event can have a start time and no\nfinish time. If an event has a finish time, there must be a start time.", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "Optional time of when event started.", - "type": "string" - }, - "description": { - "description": "Required description of event.", - "type": "string" - } - }, - "id": "OperationEvent" - }, - "RepeatedString": { - "type": "object", - "properties": { - "values": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "RepeatedString" - }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - } - }, - "id": "ListOperationsResponse" - }, - "OperationMetadata": { - "description": "Metadata describing an Operation.", - "type": "object", - "properties": { - "projectId": { - "description": "The Google Cloud Project in which the job is scoped.", - "type": "string" - }, - "clientId": { - "type": "string", - "description": "This field is deprecated. Use `labels` instead. Optionally provided by the\ncaller when submitting the request that creates the operation." - }, - "endTime": { - "format": "google-datetime", - "description": "The time at which the job stopped running.", - "type": "string" - }, - "events": { - "description": "Optional event messages that were generated during the job's execution.\nThis also contains any warnings that were generated during import\nor export.", - "items": { - "$ref": "OperationEvent" - }, - "type": "array" - }, - "startTime": { - "format": "google-datetime", - "description": "The time at which the job began to run.", - "type": "string" - }, - "request": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The original request that started the operation. Note that this will be in\ncurrent version of the API. If the operation was started with v1beta2 API\nand a GetOperation is performed on v1 API, a v1 request will be returned.", - "type": "object" - }, - "runtimeMetadata": { - "description": "Runtime metadata on this Operation.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "createTime": { - "type": "string", - "format": "google-datetime", - "description": "The time at which the job was submitted to the Genomics service." - }, - "labels": { - "description": "Optionally provided by the caller when submitting the request that creates\nthe operation.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "id": "OperationMetadata" - }, - "RunPipelineArgs": { - "description": "The pipeline run arguments.", - "type": "object", - "properties": { - "labels": { - "description": "Labels to apply to this pipeline run. Labels will also be applied to\ncompute resources (VM, disks) created by this pipeline run. When listing\noperations, operations can filtered by labels.\nLabel keys may not be empty; label values may be empty. Non-empty labels\nmust be 1-63 characters long, and comply with [RFC1035]\n(https://www.ietf.org/rfc/rfc1035.txt).\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "logging": { - "$ref": "LoggingOptions", - "description": "Required. Logging options. Used by the service to communicate results\nto the user." - }, - "outputs": { - "additionalProperties": { - "type": "string" - }, - "description": "Pipeline output arguments; keys are defined in the pipeline\ndocumentation. All output parameters of without default values\nmust be specified. If parameters with defaults are specified\nhere, the defaults will be overridden.", - "type": "object" - }, - "resources": { - "description": "Specifies resource requirements/overrides for the pipeline run.", - "$ref": "PipelineResources" - }, - "keepVmAliveOnFailureDuration": { - "format": "google-duration", - "description": "How long to keep the VM up after a failure (for example docker command\nfailed, copying input or output files failed, etc). While the VM is up, one\ncan ssh into the VM to debug. Default is 0; maximum allowed value is 1 day.", - "type": "string" - }, - "projectId": { - "description": "Required. The project in which to run the pipeline. The caller must have\nWRITER access to all Google Cloud services and resources (e.g. Google\nCompute Engine) will be used.", - "type": "string" - }, - "clientId": { - "type": "string", - "description": "This field is deprecated. Use `labels` instead. Client-specified pipeline\noperation identifier." - }, - "serviceAccount": { - "$ref": "ServiceAccount", - "description": "The Google Cloud Service Account that will be used to access data and\nservices. By default, the compute service account associated with\n`projectId` is used." - }, - "inputs": { - "description": "Pipeline input arguments; keys are defined in the pipeline documentation.\nAll input parameters that do not have default values must be specified.\nIf parameters with defaults are specified here, the defaults will be\noverridden.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "id": "RunPipelineArgs" - }, - "ListPipelinesResponse": { - "description": "The response of ListPipelines. Contains at most `pageSize`\npipelines. If it contains `pageSize` pipelines, and more pipelines\nexist, then `nextPageToken` will be populated and should be\nused as the `pageToken` argument to a subsequent ListPipelines\nrequest.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The token to use to get the next page of results.", - "type": "string" - }, - "pipelines": { - "items": { - "$ref": "Pipeline" - }, - "type": "array", - "description": "The matched pipelines." - } - }, - "id": "ListPipelinesResponse" - }, "SetOperationStatusRequest": { "description": "Request to set operation status. Should only be used by VMs\ncreated by the Pipelines Service and not by end users.", "type": "object", @@ -834,6 +385,7 @@ "type": "string" }, "errorCode": { + "type": "string", "enumDescriptions": [ "Not an error; returned on success\n\nHTTP Mapping: 200 OK", "The operation was cancelled, typically by the caller.\n\nHTTP Mapping: 499 Client Closed Request", @@ -871,8 +423,7 @@ "INTERNAL", "UNAVAILABLE", "DATA_LOSS" - ], - "type": "string" + ] }, "timestampEvents": { "items": { @@ -883,26 +434,10 @@ }, "id": "SetOperationStatusRequest" }, - "ImportVariantsResponse": { - "description": "The variant data import response.", + "ComputeEngine": { + "description": "Describes a Compute Engine resource that is being managed by a running\npipeline.", "type": "object", "properties": { - "callSetIds": { - "description": "IDs of the call sets created during the import.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "ImportVariantsResponse" - }, - "ComputeEngine": { - "properties": { - "zone": { - "type": "string", - "description": "The availability zone in which the instance resides." - }, "diskNames": { "description": "The names of the disks that were created for this pipeline.", "items": { @@ -917,11 +452,27 @@ "instanceName": { "description": "The instance on which the operation is running.", "type": "string" + }, + "zone": { + "description": "The availability zone in which the instance resides.", + "type": "string" } }, - "id": "ComputeEngine", - "description": "Describes a Compute Engine resource that is being managed by a running\npipeline.", - "type": "object" + "id": "ComputeEngine" + }, + "ImportVariantsResponse": { + "description": "The variant data import response.", + "type": "object", + "properties": { + "callSetIds": { + "description": "IDs of the call sets created during the import.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "ImportVariantsResponse" }, "TimestampEvent": { "description": "Stores the list of events and times they occured for major events in job\nexecution.", @@ -944,8 +495,8 @@ "type": "object", "properties": { "disk": { - "type": "string", - "description": "Required. The name of the disk where this parameter is\nlocated. Can be the name of one of the disks specified in the\nResources field, or \"boot\", which represents the Docker\ninstance's boot disk and has a mount point of `/`." + "description": "Required. The name of the disk where this parameter is\nlocated. Can be the name of one of the disks specified in the\nResources field, or \"boot\", which represents the Docker\ninstance's boot disk and has a mount point of `/`.", + "type": "string" }, "path": { "description": "Required. The path within the user's docker container where\nthis input should be localized to and from, relative to the specified\ndisk's mount point. For example: file.txt,", @@ -969,10 +520,36 @@ }, "id": "DockerExecutor" }, + "Empty": { + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {} + }, "Disk": { "description": "A Google Compute Engine disk resource specification.", "type": "object", "properties": { + "name": { + "description": "Required. The name of the disk that can be used in the pipeline\nparameters. Must be 1 - 63 characters.\nThe name \"boot\" is reserved for system use.", + "type": "string" + }, + "type": { + "enumDescriptions": [ + "Default disk type. Use one of the other options below.", + "Specifies a Google Compute Engine persistent hard disk. See\nhttps://cloud.google.com/compute/docs/disks/#pdspecs for details.", + "Specifies a Google Compute Engine persistent solid-state disk. See\nhttps://cloud.google.com/compute/docs/disks/#pdspecs for details.", + "Specifies a Google Compute Engine local SSD.\nSee https://cloud.google.com/compute/docs/disks/local-ssd for details." + ], + "enum": [ + "TYPE_UNSPECIFIED", + "PERSISTENT_HDD", + "PERSISTENT_SSD", + "LOCAL_SSD" + ], + "description": "Required. The type of the disk to create.", + "type": "string" + }, "autoDelete": { "description": "Deprecated. Disks created by the Pipelines API will be deleted at the end\nof the pipeline run, regardless of what this field is set to.", "type": "boolean" @@ -993,43 +570,13 @@ "source": { "description": "The full or partial URL of the persistent disk to attach. See\nhttps://cloud.google.com/compute/docs/reference/latest/instances#resource\nand\nhttps://cloud.google.com/compute/docs/disks/persistent-disks#snapshots\nfor more details.", "type": "string" - }, - "name": { - "description": "Required. The name of the disk that can be used in the pipeline\nparameters. Must be 1 - 63 characters.\nThe name \"boot\" is reserved for system use.", - "type": "string" - }, - "type": { - "enumDescriptions": [ - "Default disk type. Use one of the other options below.", - "Specifies a Google Compute Engine persistent hard disk. See\nhttps://cloud.google.com/compute/docs/disks/#pdspecs for details.", - "Specifies a Google Compute Engine persistent solid-state disk. See\nhttps://cloud.google.com/compute/docs/disks/#pdspecs for details.", - "Specifies a Google Compute Engine local SSD.\nSee https://cloud.google.com/compute/docs/disks/local-ssd for details." - ], - "enum": [ - "TYPE_UNSPECIFIED", - "PERSISTENT_HDD", - "PERSISTENT_SSD", - "LOCAL_SSD" - ], - "description": "Required. The type of the disk to create.", - "type": "string" } }, "id": "Disk" }, - "Empty": { - "properties": {}, - "id": "Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object" - }, "PipelineParameter": { "type": "object", "properties": { - "localCopy": { - "description": "If present, this parameter is marked for copying to and from the VM.\n`LocalCopy` indicates where on the VM the file should be. The value\ngiven to this parameter (either at runtime or using `defaultValue`)\nmust be the remote path where the file should be.", - "$ref": "LocalCopy" - }, "defaultValue": { "description": "The default value for this parameter. Can be overridden at runtime.\nIf `localCopy` is present, then this must be a Google Cloud Storage path\nbeginning with `gs://`.", "type": "string" @@ -1041,28 +588,476 @@ "description": { "description": "Human-readable description.", "type": "string" + }, + "localCopy": { + "$ref": "LocalCopy", + "description": "If present, this parameter is marked for copying to and from the VM.\n`LocalCopy` indicates where on the VM the file should be. The value\ngiven to this parameter (either at runtime or using `defaultValue`)\nmust be the remote path where the file should be." } }, "id": "PipelineParameter", "description": "Parameters facilitate setting and delivering data into the\npipeline's execution environment. They are defined at create time,\nwith optional defaults, and can be overridden at run time.\n\nIf `localCopy` is unset, then the parameter specifies a string that\nis passed as-is into the pipeline, as the value of the environment\nvariable with the given name. A default value can be optionally\nspecified at create time. The default can be overridden at run time\nusing the inputs map. If no default is given, a value must be\nsupplied at runtime.\n\nIf `localCopy` is defined, then the parameter specifies a data\nsource or sink, both in Google Cloud Storage and on the Docker container\nwhere the pipeline computation is run. The service account associated with\nthe Pipeline (by\ndefault the project's Compute Engine service account) must have access to the\nGoogle Cloud Storage paths.\n\nAt run time, the Google Cloud Storage paths can be overridden if a default\nwas provided at create time, or must be set otherwise. The pipeline runner\nshould add a key/value pair to either the inputs or outputs map. The\nindicated data copies will be carried out before/after pipeline execution,\njust as if the corresponding arguments were provided to `gsutil cp`.\n\nFor example: Given the following `PipelineParameter`, specified\nin the `inputParameters` list:\n\n```\n{name: \"input_file\", localCopy: {path: \"file.txt\", disk: \"pd1\"}}\n```\n\nwhere `disk` is defined in the `PipelineResources` object as:\n\n```\n{name: \"pd1\", mountPoint: \"/mnt/disk/\"}\n```\n\nWe create a disk named `pd1`, mount it on the host VM, and map\n`/mnt/pd1` to `/mnt/disk` in the docker container. At\nruntime, an entry for `input_file` would be required in the inputs\nmap, such as:\n\n```\n inputs[\"input_file\"] = \"gs://my-bucket/bar.txt\"\n```\n\nThis would generate the following gsutil call:\n\n```\n gsutil cp gs://my-bucket/bar.txt /mnt/pd1/file.txt\n```\n\nThe file `/mnt/pd1/file.txt` maps to `/mnt/disk/file.txt` in the\nDocker container. Acceptable paths are:\n\n\u003ctable\u003e\n \u003cthead\u003e\n \u003ctr\u003e\u003cth\u003eGoogle Cloud storage path\u003c/th\u003e\u003cth\u003eLocal path\u003c/th\u003e\u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\u003ctd\u003efile\u003c/td\u003e\u003ctd\u003efile\u003c/td\u003e\u003c/tr\u003e\n \u003ctr\u003e\u003ctd\u003eglob\u003c/td\u003e\u003ctd\u003edirectory\u003c/td\u003e\u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\nFor outputs, the direction of the copy is reversed:\n\n```\n gsutil cp /mnt/disk/file.txt gs://my-bucket/bar.txt\n```\n\nAcceptable paths are:\n\n\u003ctable\u003e\n \u003cthead\u003e\n \u003ctr\u003e\u003cth\u003eLocal path\u003c/th\u003e\u003cth\u003eGoogle Cloud Storage path\u003c/th\u003e\u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\u003ctd\u003efile\u003c/td\u003e\u003ctd\u003efile\u003c/td\u003e\u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003efile\u003c/td\u003e\n \u003ctd\u003edirectory - directory must already exist\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003eglob\u003c/td\u003e\n \u003ctd\u003edirectory - directory will be created if it doesn't exist\u003c/td\u003e\u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\nOne restriction due to docker limitations, is that for outputs that are found\non the boot disk, the local path cannot be a glob and must be a file." }, "LoggingOptions": { + "description": "The logging options for the pipeline run.", + "type": "object", "properties": { "gcsPath": { - "type": "string", - "description": "The location in Google Cloud Storage to which the pipeline logs\nwill be copied. Can be specified as a fully qualified directory\npath, in which case logs will be output with a unique identifier\nas the filename in that directory, or as a fully specified path,\nwhich must end in `.log`, in which case that path will be\nused, and the user must ensure that logs are not\noverwritten. Stdout and stderr logs from the run are also\ngenerated and output as `-stdout.log` and `-stderr.log`." + "description": "The location in Google Cloud Storage to which the pipeline logs\nwill be copied. Can be specified as a fully qualified directory\npath, in which case logs will be output with a unique identifier\nas the filename in that directory, or as a fully specified path,\nwhich must end in `.log`, in which case that path will be\nused, and the user must ensure that logs are not\noverwritten. Stdout and stderr logs from the run are also\ngenerated and output as `-stdout.log` and `-stderr.log`.", + "type": "string" } }, - "id": "LoggingOptions", - "description": "The logging options for the pipeline run.", + "id": "LoggingOptions" + }, + "RunPipelineRequest": { + "id": "RunPipelineRequest", + "description": "The request to run a pipeline. If `pipelineId` is specified, it\nrefers to a saved pipeline created with CreatePipeline and set as\nthe `pipelineId` of the returned Pipeline object. If\n`ephemeralPipeline` is specified, that pipeline is run once\nwith the given args and not saved. It is an error to specify both\n`pipelineId` and `ephemeralPipeline`. `pipelineArgs`\nmust be specified.", + "type": "object", + "properties": { + "pipelineArgs": { + "description": "The arguments to use when running this pipeline.", + "$ref": "RunPipelineArgs" + }, + "pipelineId": { + "description": "The already created pipeline to run.", + "type": "string" + }, + "ephemeralPipeline": { + "$ref": "Pipeline", + "description": "A new pipeline object to run once and then delete." + } + } + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "type": "object", + "properties": {}, + "id": "CancelOperationRequest" + }, + "Operation": { + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "properties": { + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "An OperationMetadata object. This will always be returned with the Operation.", + "type": "object" + }, + "done": { + "type": "boolean", + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable." + }, + "response": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If importing Variants, an ImportVariantsResponse is returned. For pipelines and exports, an empty response is returned." + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. For example: `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw`", + "type": "string" + } + } + }, + "RuntimeMetadata": { + "description": "Runtime metadata that will be populated in the\nruntimeMetadata\nfield of the Operation associated with a RunPipeline execution.", + "type": "object", + "properties": { + "computeEngine": { + "$ref": "ComputeEngine", + "description": "Execution information specific to Google Compute Engine." + } + }, + "id": "RuntimeMetadata" + }, + "ImportReadGroupSetsResponse": { + "description": "The read group set import response.", + "type": "object", + "properties": { + "readGroupSetIds": { + "description": "IDs of the read group sets that were created.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "ImportReadGroupSetsResponse" + }, + "Status": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code." + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + } + }, + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons." + }, + "ServiceAccount": { + "description": "A Google Cloud Service Account.", + "type": "object", + "properties": { + "scopes": { + "description": "List of scopes to be enabled for this service account on the VM.\nThe following scopes are automatically included:\n\n* https://www.googleapis.com/auth/compute\n* https://www.googleapis.com/auth/devstorage.full_control\n* https://www.googleapis.com/auth/genomics\n* https://www.googleapis.com/auth/logging.write\n* https://www.googleapis.com/auth/monitoring.write", + "items": { + "type": "string" + }, + "type": "array" + }, + "email": { + "description": "Email address of the service account. Defaults to `default`,\nwhich uses the compute service account associated with the project.", + "type": "string" + } + }, + "id": "ServiceAccount" + }, + "PipelineResources": { + "description": "The system resources for the pipeline run.", + "type": "object", + "properties": { + "noAddress": { + "description": "Whether to assign an external IP to the instance. This is an experimental\nfeature that may go away. Defaults to false.\nCorresponds to `--no_address` flag for [gcloud compute instances create]\n(https://cloud.google.com/sdk/gcloud/reference/compute/instances/create).\nIn order to use this, must be true for both create time and run time.\nCannot be true at run time if false at create time. If you need to ssh into\na private IP VM for debugging, you can ssh to a public VM and then ssh into\nthe private VM's Internal IP. If noAddress is set, this pipeline run may\nonly load docker images from Google Container Registry and not Docker Hub.\nBefore using this, you must\n[configure access to Google services from internal IPs](https://cloud.google.com/compute/docs/configure-private-google-access#configuring_access_to_google_services_from_internal_ips).", + "type": "boolean" + }, + "disks": { + "description": "Disks to attach.", + "items": { + "$ref": "Disk" + }, + "type": "array" + }, + "bootDiskSizeGb": { + "format": "int32", + "description": "The size of the boot disk. Defaults to 10 (GB).", + "type": "integer" + }, + "preemptible": { + "description": "Whether to use preemptible VMs. Defaults to `false`. In order to use this,\nmust be true for both create time and run time. Cannot be true at run time\nif false at create time.", + "type": "boolean" + }, + "minimumRamGb": { + "format": "double", + "description": "The minimum amount of RAM to use. Defaults to 3.75 (GB)", + "type": "number" + }, + "zones": { + "items": { + "type": "string" + }, + "type": "array", + "description": "List of Google Compute Engine availability zones to which resource\ncreation will restricted. If empty, any zone may be chosen." + }, + "minimumCpuCores": { + "format": "int32", + "description": "The minimum number of cores to use. Defaults to 1.", + "type": "integer" + } + }, + "id": "PipelineResources" + }, + "Pipeline": { + "id": "Pipeline", + "description": "The pipeline object. Represents a transformation from a set of input\nparameters to a set of output parameters. The transformation is defined\nas a docker image and command to run within that image. Each pipeline\nis run on a Google Compute Engine VM. A pipeline can be created with the\n`create` method and then later run with the `run` method, or a pipeline can\nbe defined and run all at once with the `run` method.", + "type": "object", + "properties": { + "outputParameters": { + "description": "Output parameters of the pipeline.", + "items": { + "$ref": "PipelineParameter" + }, + "type": "array" + }, + "docker": { + "$ref": "DockerExecutor", + "description": "Specifies the docker run information." + }, + "description": { + "type": "string", + "description": "User-specified description." + }, + "inputParameters": { + "items": { + "$ref": "PipelineParameter" + }, + "type": "array", + "description": "Input parameters of the pipeline." + }, + "resources": { + "$ref": "PipelineResources", + "description": "Required. Specifies resource requirements for the pipeline run.\nRequired fields:\n\n*\nminimumCpuCores\n\n*\nminimumRamGb" + }, + "name": { + "description": "Required. A user specified pipeline name that does not have to be unique.\nThis name can be used for filtering Pipelines in ListPipelines.", + "type": "string" + }, + "pipelineId": { + "description": "Unique pipeline id that is generated by the service when CreatePipeline\nis called. Cannot be specified in the Pipeline used in the\nCreatePipelineRequest, and will be populated in the response to\nCreatePipeline and all subsequent Get and List calls. Indicates that the\nservice has registered this pipeline.", + "type": "string" + }, + "projectId": { + "description": "Required. The project in which to create the pipeline. The caller must have\nWRITE access.", + "type": "string" + } + } + }, + "ControllerConfig": { + "description": "Stores the information that the controller will fetch from the\nserver in order to run. Should only be used by VMs created by the\nPipelines Service and not by end users.", + "type": "object", + "properties": { + "vars": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "image": { + "type": "string" + }, + "gcsLogPath": { + "type": "string" + }, + "gcsSources": { + "type": "object", + "additionalProperties": { + "$ref": "RepeatedString" + } + }, + "gcsSinks": { + "additionalProperties": { + "$ref": "RepeatedString" + }, + "type": "object" + }, + "disks": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "machineType": { + "type": "string" + }, + "cmd": { + "type": "string" + } + }, + "id": "ControllerConfig" + }, + "OperationEvent": { + "description": "An event that occurred during an Operation.", + "type": "object", + "properties": { + "endTime": { + "format": "google-datetime", + "description": "Optional time of when event finished. An event can have a start time and no\nfinish time. If an event has a finish time, there must be a start time.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "Optional time of when event started.", + "type": "string" + }, + "description": { + "description": "Required description of event.", + "type": "string" + } + }, + "id": "OperationEvent" + }, + "RepeatedString": { + "type": "object", + "properties": { + "values": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "RepeatedString" + }, + "ListOperationsResponse": { + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "operations": { + "items": { + "$ref": "Operation" + }, + "type": "array", + "description": "A list of operations that matches the specified filter in the request." + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + } + }, + "OperationMetadata": { + "description": "Metadata describing an Operation.", + "type": "object", + "properties": { + "clientId": { + "description": "This field is deprecated. Use `labels` instead. Optionally provided by the\ncaller when submitting the request that creates the operation.", + "type": "string" + }, + "events": { + "description": "Optional event messages that were generated during the job's execution.\nThis also contains any warnings that were generated during import\nor export.", + "items": { + "$ref": "OperationEvent" + }, + "type": "array" + }, + "endTime": { + "format": "google-datetime", + "description": "The time at which the job stopped running.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "The time at which the job began to run.", + "type": "string" + }, + "request": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The original request that started the operation. Note that this will be in\ncurrent version of the API. If the operation was started with v1beta2 API\nand a GetOperation is performed on v1 API, a v1 request will be returned.", + "type": "object" + }, + "runtimeMetadata": { + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + }, + "description": "Runtime metadata on this Operation.", + "type": "object" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Optionally provided by the caller when submitting the request that creates\nthe operation." + }, + "createTime": { + "format": "google-datetime", + "description": "The time at which the job was submitted to the Genomics service.", + "type": "string" + }, + "projectId": { + "description": "The Google Cloud Project in which the job is scoped.", + "type": "string" + } + }, + "id": "OperationMetadata" + }, + "RunPipelineArgs": { + "description": "The pipeline run arguments.", + "type": "object", + "properties": { + "logging": { + "description": "Required. Logging options. Used by the service to communicate results\nto the user.", + "$ref": "LoggingOptions" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels to apply to this pipeline run. Labels will also be applied to\ncompute resources (VM, disks) created by this pipeline run. When listing\noperations, operations can filtered by labels.\nLabel keys may not be empty; label values may be empty. Non-empty labels\nmust be 1-63 characters long, and comply with [RFC1035]\n(https://www.ietf.org/rfc/rfc1035.txt).\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", + "type": "object" + }, + "keepVmAliveOnFailureDuration": { + "format": "google-duration", + "description": "How long to keep the VM up after a failure (for example docker command\nfailed, copying input or output files failed, etc). While the VM is up, one\ncan ssh into the VM to debug. Default is 0; maximum allowed value is 1 day.", + "type": "string" + }, + "resources": { + "$ref": "PipelineResources", + "description": "Specifies resource requirements/overrides for the pipeline run." + }, + "outputs": { + "additionalProperties": { + "type": "string" + }, + "description": "Pipeline output arguments; keys are defined in the pipeline\ndocumentation. All output parameters of without default values\nmust be specified. If parameters with defaults are specified\nhere, the defaults will be overridden.", + "type": "object" + }, + "projectId": { + "description": "Required. The project in which to run the pipeline. The caller must have\nWRITER access to all Google Cloud services and resources (e.g. Google\nCompute Engine) will be used.", + "type": "string" + }, + "clientId": { + "type": "string", + "description": "This field is deprecated. Use `labels` instead. Client-specified pipeline\noperation identifier." + }, + "inputs": { + "description": "Pipeline input arguments; keys are defined in the pipeline documentation.\nAll input parameters that do not have default values must be specified.\nIf parameters with defaults are specified here, the defaults will be\noverridden.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceAccount": { + "$ref": "ServiceAccount", + "description": "The Google Cloud Service Account that will be used to access data and\nservices. By default, the compute service account associated with\n`projectId` is used." + } + }, + "id": "RunPipelineArgs" + }, + "ListPipelinesResponse": { + "properties": { + "nextPageToken": { + "description": "The token to use to get the next page of results.", + "type": "string" + }, + "pipelines": { + "description": "The matched pipelines.", + "items": { + "$ref": "Pipeline" + }, + "type": "array" + } + }, + "id": "ListPipelinesResponse", + "description": "The response of ListPipelines. Contains at most `pageSize`\npipelines. If it contains `pageSize` pipelines, and more pipelines\nexist, then `nextPageToken` will be populated and should be\nused as the `pageToken` argument to a subsequent ListPipelines\nrequest.", "type": "object" } }, - "protocol": "rest", "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, + "protocol": "rest", "version": "v1alpha2", "baseUrl": "https://genomics.googleapis.com/", "auth": { @@ -1080,11 +1075,16 @@ } } }, - "kind": "discovery#restDescription", - "description": "Upload, process, query, and search Genomics data in the cloud.", "servicePath": "", + "description": "Upload, process, query, and search Genomics data in the cloud.", + "kind": "discovery#restDescription", "rootUrl": "https://genomics.googleapis.com/", "basePath": "", "ownerDomain": "google.com", - "name": "genomics" + "name": "genomics", + "batchPath": "batch", + "revision": "20170909", + "documentationLink": "https://cloud.google.com/genomics", + "id": "genomics:v1alpha2", + "title": "Genomics API" } diff --git a/vendor/google.golang.org/api/genomics/v1alpha2/genomics-gen.go b/vendor/google.golang.org/api/genomics/v1alpha2/genomics-gen.go index 456d103d2..ead7beb02 100644 --- a/vendor/google.golang.org/api/genomics/v1alpha2/genomics-gen.go +++ b/vendor/google.golang.org/api/genomics/v1alpha2/genomics-gen.go @@ -561,8 +561,8 @@ func (s *LoggingOptions) MarshalJSON() ([]byte, error) { type Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` diff --git a/vendor/google.golang.org/api/gensupport/media.go b/vendor/google.golang.org/api/gensupport/media.go index c6410e89a..f3e77fc52 100644 --- a/vendor/google.golang.org/api/gensupport/media.go +++ b/vendor/google.golang.org/api/gensupport/media.go @@ -174,26 +174,126 @@ func typeHeader(contentType string) textproto.MIMEHeader { // PrepareUpload determines whether the data in the supplied reader should be // uploaded in a single request, or in sequential chunks. // chunkSize is the size of the chunk that media should be split into. -// If chunkSize is non-zero and the contents of media do not fit in a single -// chunk (or there is an error reading media), then media will be returned as a -// MediaBuffer. Otherwise, media will be returned as a Reader. +// +// If chunkSize is zero, media is returned as the first value, and the other +// two return values are nil, true. +// +// Otherwise, a MediaBuffer is returned, along with a bool indicating whether the +// contents of media fit in a single chunk. // // After PrepareUpload has been called, media should no longer be used: the // media content should be accessed via one of the return values. -func PrepareUpload(media io.Reader, chunkSize int) (io.Reader, *MediaBuffer) { +func PrepareUpload(media io.Reader, chunkSize int) (r io.Reader, mb *MediaBuffer, singleChunk bool) { if chunkSize == 0 { // do not chunk - return media, nil + return media, nil, true + } + mb = NewMediaBuffer(media, chunkSize) + _, _, _, err := mb.Chunk() + // If err is io.EOF, we can upload this in a single request. Otherwise, err is + // either nil or a non-EOF error. If it is the latter, then the next call to + // mb.Chunk will return the same error. Returning a MediaBuffer ensures that this + // error will be handled at some point. + return nil, mb, err == io.EOF +} + +// MediaInfo holds information for media uploads. It is intended for use by generated +// code only. +type MediaInfo struct { + // At most one of Media and MediaBuffer will be set. + media io.Reader + buffer *MediaBuffer + singleChunk bool + mType string + size int64 // mediaSize, if known. Used only for calls to progressUpdater_. + progressUpdater googleapi.ProgressUpdater +} + +// NewInfoFromMedia should be invoked from the Media method of a call. It returns a +// MediaInfo populated with chunk size and content type, and a reader or MediaBuffer +// if needed. +func NewInfoFromMedia(r io.Reader, options []googleapi.MediaOption) *MediaInfo { + mi := &MediaInfo{} + opts := googleapi.ProcessMediaOptions(options) + if !opts.ForceEmptyContentType { + r, mi.mType = DetermineContentType(r, opts.ContentType) + } + mi.media, mi.buffer, mi.singleChunk = PrepareUpload(r, opts.ChunkSize) + return mi +} + +// NewInfoFromResumableMedia should be invoked from the ResumableMedia method of a +// call. It returns a MediaInfo using the given reader, size and media type. +func NewInfoFromResumableMedia(r io.ReaderAt, size int64, mediaType string) *MediaInfo { + rdr := ReaderAtToReader(r, size) + rdr, mType := DetermineContentType(rdr, mediaType) + return &MediaInfo{ + size: size, + mType: mType, + buffer: NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize), + media: nil, + singleChunk: false, + } +} + +func (mi *MediaInfo) SetProgressUpdater(pu googleapi.ProgressUpdater) { + if mi != nil { + mi.progressUpdater = pu + } +} + +// UploadType determines the type of upload: a single request, or a resumable +// series of requests. +func (mi *MediaInfo) UploadType() string { + if mi.singleChunk { + return "multipart" + } + return "resumable" +} + +// UploadRequest sets up an HTTP request for media upload. It adds headers +// as necessary, and returns a replacement for the body. +func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newBody io.Reader, cleanup func()) { + cleanup = func() {} + if mi == nil { + return body, cleanup + } + var media io.Reader + if mi.media != nil { + // This only happens when the caller has turned off chunking. In that + // case, we write all of media in a single non-retryable request. + media = mi.media + } else if mi.singleChunk { + // The data fits in a single chunk, which has now been read into the MediaBuffer. + // We obtain that chunk so we can write it in a single request. The request can + // be retried because the data is stored in the MediaBuffer. + media, _, _, _ = mi.buffer.Chunk() + } + if media != nil { + combined, ctype := CombineBodyMedia(body, "application/json", media, mi.mType) + cleanup = func() { combined.Close() } + reqHeaders.Set("Content-Type", ctype) + body = combined + } + if mi.buffer != nil && mi.mType != "" && !mi.singleChunk { + reqHeaders.Set("X-Upload-Content-Type", mi.mType) + } + return body, cleanup +} + +// ResumableUpload returns an appropriately configured ResumableUpload value if the +// upload is resumable, or nil otherwise. +func (mi *MediaInfo) ResumableUpload(locURI string) *ResumableUpload { + if mi == nil || mi.singleChunk { + return nil + } + return &ResumableUpload{ + URI: locURI, + Media: mi.buffer, + MediaType: mi.mType, + Callback: func(curr int64) { + if mi.progressUpdater != nil { + mi.progressUpdater(curr, mi.size) + } + }, } - - mb := NewMediaBuffer(media, chunkSize) - rdr, _, _, err := mb.Chunk() - - if err == io.EOF { // we can upload this in a single request - return rdr, nil - } - // err might be a non-EOF error. If it is, the next call to mb.Chunk will - // return the same error. Returning a MediaBuffer ensures that this error - // will be handled at some point. - - return nil, mb } diff --git a/vendor/google.golang.org/api/gensupport/media_test.go b/vendor/google.golang.org/api/gensupport/media_test.go index f0dd36499..9112721ac 100644 --- a/vendor/google.golang.org/api/gensupport/media_test.go +++ b/vendor/google.golang.org/api/gensupport/media_test.go @@ -8,8 +8,12 @@ import ( "bytes" "io" "io/ioutil" + "net/http" "reflect" + "strings" "testing" + + "google.golang.org/api/googleapi" ) func TestContentSniffing(t *testing.T) { @@ -140,3 +144,195 @@ func TestDetermineContentType(t *testing.T) { } } } + +func TestNewInfoFromMedia(t *testing.T) { + const textType = "text/plain; charset=utf-8" + for _, test := range []struct { + desc string + r io.Reader + opts []googleapi.MediaOption + wantType string + wantMedia, wantBuffer, wantSingleChunk bool + }{ + { + desc: "an empty reader results in a MediaBuffer with a single, empty chunk", + r: new(bytes.Buffer), + opts: nil, + wantType: textType, + wantBuffer: true, + wantSingleChunk: true, + }, + { + desc: "ContentType is observed", + r: new(bytes.Buffer), + opts: []googleapi.MediaOption{googleapi.ContentType("xyz")}, + wantType: "xyz", + wantBuffer: true, + wantSingleChunk: true, + }, + { + desc: "chunk size of zero: don't use a MediaBuffer; upload as a single chunk", + r: strings.NewReader("12345"), + opts: []googleapi.MediaOption{googleapi.ChunkSize(0)}, + wantType: textType, + wantMedia: true, + wantSingleChunk: true, + }, + { + desc: "chunk size > data size: MediaBuffer with single chunk", + r: strings.NewReader("12345"), + opts: []googleapi.MediaOption{googleapi.ChunkSize(100)}, + wantType: textType, + wantBuffer: true, + wantSingleChunk: true, + }, + { + desc: "chunk size == data size: MediaBuffer with single chunk", + r: &nullReader{googleapi.MinUploadChunkSize}, + opts: []googleapi.MediaOption{googleapi.ChunkSize(1)}, + wantType: "application/octet-stream", + wantBuffer: true, + wantSingleChunk: true, + }, + { + desc: "chunk size < data size: MediaBuffer, not single chunk", + // Note that ChunkSize = 1 is rounded up to googleapi.MinUploadChunkSize. + r: &nullReader{2 * googleapi.MinUploadChunkSize}, + opts: []googleapi.MediaOption{googleapi.ChunkSize(1)}, + wantType: "application/octet-stream", + wantBuffer: true, + wantSingleChunk: false, + }, + } { + + mi := NewInfoFromMedia(test.r, test.opts) + if got, want := mi.mType, test.wantType; got != want { + t.Errorf("%s: type: got %q, want %q", test.desc, got, want) + } + if got, want := (mi.media != nil), test.wantMedia; got != want { + t.Errorf("%s: media non-nil: got %t, want %t", test.desc, got, want) + } + if got, want := (mi.buffer != nil), test.wantBuffer; got != want { + t.Errorf("%s: buffer non-nil: got %t, want %t", test.desc, got, want) + } + if got, want := mi.singleChunk, test.wantSingleChunk; got != want { + t.Errorf("%s: singleChunk: got %t, want %t", test.desc, got, want) + } + } +} + +func TestUploadRequest(t *testing.T) { + for _, test := range []struct { + desc string + r io.Reader + chunkSize int + wantContentType string + wantUploadType string + }{ + { + desc: "chunk size of zero: don't use a MediaBuffer; upload as a single chunk", + r: strings.NewReader("12345"), + chunkSize: 0, + wantContentType: "multipart/related;", + }, + { + desc: "chunk size > data size: MediaBuffer with single chunk", + r: strings.NewReader("12345"), + chunkSize: 100, + wantContentType: "multipart/related;", + }, + { + desc: "chunk size == data size: MediaBuffer with single chunk", + r: &nullReader{googleapi.MinUploadChunkSize}, + chunkSize: 1, + wantContentType: "multipart/related;", + }, + { + desc: "chunk size < data size: MediaBuffer, not single chunk", + // Note that ChunkSize = 1 is rounded up to googleapi.MinUploadChunkSize. + r: &nullReader{2 * googleapi.MinUploadChunkSize}, + chunkSize: 1, + wantUploadType: "application/octet-stream", + }, + } { + mi := NewInfoFromMedia(test.r, []googleapi.MediaOption{googleapi.ChunkSize(test.chunkSize)}) + h := http.Header{} + mi.UploadRequest(h, new(bytes.Buffer)) + if got, want := h.Get("Content-Type"), test.wantContentType; !strings.HasPrefix(got, want) { + t.Errorf("%s: Content-Type: got %q, want prefix %q", test.desc, got, want) + } + if got, want := h.Get("X-Upload-Content-Type"), test.wantUploadType; got != want { + t.Errorf("%s: X-Upload-Content-Type: got %q, want %q", test.desc, got, want) + } + } +} + +func TestResumableUpload(t *testing.T) { + for _, test := range []struct { + desc string + r io.Reader + chunkSize int + wantUploadType string + wantResumableUpload bool + }{ + + { + desc: "chunk size of zero: don't use a MediaBuffer; upload as a single chunk", + r: strings.NewReader("12345"), + chunkSize: 0, + wantUploadType: "multipart", + wantResumableUpload: false, + }, + { + desc: "chunk size > data size: MediaBuffer with single chunk", + r: strings.NewReader("12345"), + chunkSize: 100, + wantUploadType: "multipart", + wantResumableUpload: false, + }, + { + desc: "chunk size == data size: MediaBuffer with single chunk", + // (Because nullReader returns EOF with the last bytes.) + r: &nullReader{googleapi.MinUploadChunkSize}, + chunkSize: googleapi.MinUploadChunkSize, + wantUploadType: "multipart", + wantResumableUpload: false, + }, + { + desc: "chunk size < data size: MediaBuffer, not single chunk", + // Note that ChunkSize = 1 is rounded up to googleapi.MinUploadChunkSize. + r: &nullReader{2 * googleapi.MinUploadChunkSize}, + chunkSize: 1, + wantUploadType: "resumable", + wantResumableUpload: true, + }, + } { + mi := NewInfoFromMedia(test.r, []googleapi.MediaOption{googleapi.ChunkSize(test.chunkSize)}) + if got, want := mi.UploadType(), test.wantUploadType; got != want { + t.Errorf("%s: upload type: got %q, want %q", test.desc, got, want) + } + if got, want := mi.ResumableUpload("") != nil, test.wantResumableUpload; got != want { + t.Errorf("%s: resumable upload non-nil: got %t, want %t", test.desc, got, want) + } + } +} + +// A nullReader simulates reading a fixed number of bytes. +type nullReader struct { + remain int +} + +// Read doesn't touch buf, but it does reduce the amount of bytes remaining +// by len(buf). +func (r *nullReader) Read(buf []byte) (int, error) { + n := len(buf) + if r.remain < n { + n = r.remain + } + r.remain -= n + var err error + if r.remain == 0 { + err = io.EOF + } + return n, err +} diff --git a/vendor/google.golang.org/api/gmail/v1/gmail-api.json b/vendor/google.golang.org/api/gmail/v1/gmail-api.json index 52a293acf..f16e5ac0c 100644 --- a/vendor/google.golang.org/api/gmail/v1/gmail-api.json +++ b/vendor/google.golang.org/api/gmail/v1/gmail-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/Kao4BYxqk4XjAGvTP0MqtIG26pc\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/uYcO_Bfzv01oUg-u_-w9YZWy7FQ\"", "discoveryVersion": "v1", "id": "gmail:v1", "name": "gmail", "version": "v1", - "revision": "20170516", + "revision": "20170905", "title": "Gmail API", "description": "Access Gmail mailboxes including sending user email.", "ownerDomain": "google.com", @@ -457,6 +457,10 @@ "type": "object", "description": "Labels are used to categorize messages and threads within the user's mailbox.", "properties": { + "color": { + "$ref": "LabelColor", + "description": "Color to assign to the label. This field is hidden behind an API server mendel experiment and only available for user-defined labels. Will be unset if the label doesn't have a color configured." + }, "id": { "type": "string", "description": "The immutable ID of the label.", @@ -548,6 +552,20 @@ } } }, + "LabelColor": { + "id": "LabelColor", + "type": "object", + "properties": { + "backgroundColor": { + "type": "string", + "description": "Background color represented as hex string #RRGGBB (ex #000000). Only a restricted predefined set of color values are allowed. See (go/gmail-api-label-colors)." + }, + "textColor": { + "type": "string", + "description": "Text color represented as hex string #RRGGBB (ex #000000). Only a restricted predefined set of color values are allowed. See (go/gmail-api-label-colors)." + } + } + }, "ListDraftsResponse": { "id": "ListDraftsResponse", "type": "object", diff --git a/vendor/google.golang.org/api/gmail/v1/gmail-gen.go b/vendor/google.golang.org/api/gmail/v1/gmail-gen.go index 03788450e..1c7d8ad56 100644 --- a/vendor/google.golang.org/api/gmail/v1/gmail-gen.go +++ b/vendor/google.golang.org/api/gmail/v1/gmail-gen.go @@ -789,6 +789,11 @@ func (s *ImapSettings) MarshalJSON() ([]byte, error) { // Label: Labels are used to categorize messages and threads within the // user's mailbox. type Label struct { + // Color: Color to assign to the label. This field is hidden behind an + // API server mendel experiment and only available for user-defined + // labels. Will be unset if the label doesn't have a color configured. + Color *LabelColor `json:"color,omitempty"` + // Id: The immutable ID of the label. Id string `json:"id,omitempty"` @@ -843,7 +848,7 @@ type Label struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "Color") 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 @@ -851,7 +856,7 @@ type Label struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API + // NullFields is a list of field names (e.g. "Color") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -866,6 +871,41 @@ func (s *Label) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type LabelColor struct { + // BackgroundColor: Background color represented as hex string #RRGGBB + // (ex #000000). Only a restricted predefined set of color values are + // allowed. See (go/gmail-api-label-colors). + BackgroundColor string `json:"backgroundColor,omitempty"` + + // TextColor: Text color represented as hex string #RRGGBB (ex #000000). + // Only a restricted predefined set of color values are allowed. See + // (go/gmail-api-label-colors). + TextColor string `json:"textColor,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackgroundColor") 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. "BackgroundColor") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LabelColor) MarshalJSON() ([]byte, error) { + type noMethod LabelColor + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ListDraftsResponse struct { // Drafts: List of drafts. Drafts []*Draft `json:"drafts,omitempty"` @@ -2310,17 +2350,13 @@ func (c *UsersWatchCall) Do(opts ...googleapi.CallOption) (*WatchResponse, error // method id "gmail.users.drafts.create": type UsersDraftsCreateCall struct { - s *Service - userId string - draft *Draft - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + userId string + draft *Draft + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Create: Creates a new draft with the DRAFT label. @@ -2340,12 +2376,7 @@ func (r *UsersDraftsService) Create(userId string, draft *Draft) *UsersDraftsCre // supplied. // At most one of Media and ResumableMedia may be set. func (c *UsersDraftsCreateCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersDraftsCreateCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -2360,11 +2391,7 @@ func (c *UsersDraftsCreateCall) Media(r io.Reader, options ...googleapi.MediaOpt // supersede any context previously provided to the Context method. func (c *UsersDraftsCreateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersDraftsCreateCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -2373,7 +2400,7 @@ func (c *UsersDraftsCreateCall) ResumableMedia(ctx context.Context, r io.ReaderA // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *UsersDraftsCreateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersDraftsCreateCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -2418,27 +2445,16 @@ func (c *UsersDraftsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "{userId}/drafts") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -2474,20 +2490,10 @@ func (c *UsersDraftsCreateCall) Do(opts ...googleapi.CallOption) (*Draft, error) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -3070,17 +3076,13 @@ func (c *UsersDraftsListCall) Pages(ctx context.Context, f func(*ListDraftsRespo // method id "gmail.users.drafts.send": type UsersDraftsSendCall struct { - s *Service - userId string - draft *Draft - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + userId string + draft *Draft + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Send: Sends the specified, existing draft to the recipients in the @@ -3101,12 +3103,7 @@ func (r *UsersDraftsService) Send(userId string, draft *Draft) *UsersDraftsSendC // supplied. // At most one of Media and ResumableMedia may be set. func (c *UsersDraftsSendCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersDraftsSendCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -3121,11 +3118,7 @@ func (c *UsersDraftsSendCall) Media(r io.Reader, options ...googleapi.MediaOptio // supersede any context previously provided to the Context method. func (c *UsersDraftsSendCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersDraftsSendCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -3134,7 +3127,7 @@ func (c *UsersDraftsSendCall) ResumableMedia(ctx context.Context, r io.ReaderAt, // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *UsersDraftsSendCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersDraftsSendCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -3179,27 +3172,16 @@ func (c *UsersDraftsSendCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "{userId}/drafts/send") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -3235,20 +3217,10 @@ func (c *UsersDraftsSendCall) Do(opts ...googleapi.CallOption) (*Message, error) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -3325,18 +3297,14 @@ func (c *UsersDraftsSendCall) Do(opts ...googleapi.CallOption) (*Message, error) // method id "gmail.users.drafts.update": type UsersDraftsUpdateCall struct { - s *Service - userId string - id string - draft *Draft - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + userId string + id string + draft *Draft + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Update: Replaces a draft's content. @@ -3357,12 +3325,7 @@ func (r *UsersDraftsService) Update(userId string, id string, draft *Draft) *Use // supplied. // At most one of Media and ResumableMedia may be set. func (c *UsersDraftsUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersDraftsUpdateCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -3377,11 +3340,7 @@ func (c *UsersDraftsUpdateCall) Media(r io.Reader, options ...googleapi.MediaOpt // supersede any context previously provided to the Context method. func (c *UsersDraftsUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersDraftsUpdateCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -3390,7 +3349,7 @@ func (c *UsersDraftsUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderA // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *UsersDraftsUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersDraftsUpdateCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -3435,27 +3394,16 @@ func (c *UsersDraftsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "{userId}/drafts/{id}") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders @@ -3492,20 +3440,10 @@ func (c *UsersDraftsUpdateCall) Do(opts ...googleapi.CallOption) (*Draft, error) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -5193,17 +5131,13 @@ func (c *UsersMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, error // method id "gmail.users.messages.import": type UsersMessagesImportCall struct { - s *Service - userId string - message *Message - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + userId string + message *Message + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Import: Imports a message into only this user's mailbox, with @@ -5260,12 +5194,7 @@ func (c *UsersMessagesImportCall) ProcessForCalendar(processForCalendar bool) *U // supplied. // At most one of Media and ResumableMedia may be set. func (c *UsersMessagesImportCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersMessagesImportCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -5280,11 +5209,7 @@ func (c *UsersMessagesImportCall) Media(r io.Reader, options ...googleapi.MediaO // supersede any context previously provided to the Context method. func (c *UsersMessagesImportCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersMessagesImportCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -5293,7 +5218,7 @@ func (c *UsersMessagesImportCall) ResumableMedia(ctx context.Context, r io.Reade // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *UsersMessagesImportCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersMessagesImportCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -5338,27 +5263,16 @@ func (c *UsersMessagesImportCall) doRequest(alt string) (*http.Response, error) reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "{userId}/messages/import") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -5394,20 +5308,10 @@ func (c *UsersMessagesImportCall) Do(opts ...googleapi.CallOption) (*Message, er if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -5516,17 +5420,13 @@ func (c *UsersMessagesImportCall) Do(opts ...googleapi.CallOption) (*Message, er // method id "gmail.users.messages.insert": type UsersMessagesInsertCall struct { - s *Service - userId string - message *Message - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + userId string + message *Message + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Insert: Directly inserts a message into only this user's mailbox @@ -5567,12 +5467,7 @@ func (c *UsersMessagesInsertCall) InternalDateSource(internalDateSource string) // supplied. // At most one of Media and ResumableMedia may be set. func (c *UsersMessagesInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersMessagesInsertCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -5587,11 +5482,7 @@ func (c *UsersMessagesInsertCall) Media(r io.Reader, options ...googleapi.MediaO // supersede any context previously provided to the Context method. func (c *UsersMessagesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersMessagesInsertCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -5600,7 +5491,7 @@ func (c *UsersMessagesInsertCall) ResumableMedia(ctx context.Context, r io.Reade // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *UsersMessagesInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersMessagesInsertCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -5645,27 +5536,16 @@ func (c *UsersMessagesInsertCall) doRequest(alt string) (*http.Response, error) reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "{userId}/messages") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -5701,20 +5581,10 @@ func (c *UsersMessagesInsertCall) Do(opts ...googleapi.CallOption) (*Message, er if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -6185,17 +6055,13 @@ func (c *UsersMessagesModifyCall) Do(opts ...googleapi.CallOption) (*Message, er // method id "gmail.users.messages.send": type UsersMessagesSendCall struct { - s *Service - userId string - message *Message - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + userId string + message *Message + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Send: Sends the specified message to the recipients in the To, Cc, @@ -6216,12 +6082,7 @@ func (r *UsersMessagesService) Send(userId string, message *Message) *UsersMessa // supplied. // At most one of Media and ResumableMedia may be set. func (c *UsersMessagesSendCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersMessagesSendCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -6236,11 +6097,7 @@ func (c *UsersMessagesSendCall) Media(r io.Reader, options ...googleapi.MediaOpt // supersede any context previously provided to the Context method. func (c *UsersMessagesSendCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersMessagesSendCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -6249,7 +6106,7 @@ func (c *UsersMessagesSendCall) ResumableMedia(ctx context.Context, r io.ReaderA // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *UsersMessagesSendCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersMessagesSendCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -6294,27 +6151,16 @@ func (c *UsersMessagesSendCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "{userId}/messages/send") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -6350,20 +6196,10 @@ func (c *UsersMessagesSendCall) Do(opts ...googleapi.CallOption) (*Message, erro if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() diff --git a/vendor/google.golang.org/api/google-api-go-generator/Makefile b/vendor/google.golang.org/api/google-api-go-generator/Makefile new file mode 100644 index 000000000..a85d523fa --- /dev/null +++ b/vendor/google.golang.org/api/google-api-go-generator/Makefile @@ -0,0 +1,34 @@ +# This Makefile is for library maintainers, not end-developers. +# All the generated code is already checked in. + +API_JSON = $(wildcard ../*/*/*-api.json ../*/*/*/*-api.json) + +GENERATOR=./google-api-go-generator + +# Download all API specifications and rebuild Go bindings. +# All downloaded files are cached in $TMPDIR for reuse with 'cached' below. +all: $(GENERATOR) + $(GENERATOR) -cache=false -install -api=* + +# Reuse cached API specifications in $TMPDIR and rebuild Go bindings. +cached: $(GENERATOR) + $(GENERATOR) -cache=true -install -api=* + +# Only rebuild Go bindings, do not modify API specifications. +# For every existing */*/*-api.json file, */*/*-gen.go will be built. +local: $(API_JSON:-api.json=-gen.go) + +# Pattern rule for the 'local' target. +# Translates otherwise unnamed targets with a -gen.go suffix into the +# matching input file with a -api.json suffix. $< is the input file. +%-gen.go: %-api.json $(GENERATOR) + $(GENERATOR) -api_json_file=$< + +# Alias to rebuild and install $(GENERATOR) +generator: $(GENERATOR) + +# Marked as .PHONY so that make always invokes go build. +$(GENERATOR): + go build -o $@ + +.PHONY: all cached local generator $(GENERATOR) diff --git a/vendor/google.golang.org/api/google-api-go-generator/gen.go b/vendor/google.golang.org/api/google-api-go-generator/gen.go index 7812d1525..f108d9c55 100644 --- a/vendor/google.golang.org/api/google-api-go-generator/gen.go +++ b/vendor/google.golang.org/api/google-api-go-generator/gen.go @@ -1597,12 +1597,7 @@ func (meth *Method) generateCode() { } if meth.supportsMediaUpload() { - // At most one of media_ and resumbableBuffer_ will be set. - pn(" media_ io.Reader") - pn(" mediaBuffer_ *gensupport.MediaBuffer") - pn(" mediaType_ string") - pn(" mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_.") - pn(" progressUpdater_ googleapi.ProgressUpdater") + pn(" mediaInfo_ *gensupport.MediaInfo") } pn(" ctx_ context.Context") pn(" header_ http.Header") @@ -1711,12 +1706,7 @@ func (meth *Method) generateCode() { pn(" }") } } - pn(" opts := googleapi.ProcessMediaOptions(options)") - pn(" chunkSize := opts.ChunkSize") - pn(" if !opts.ForceEmptyContentType {") - pn(" r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType)") - pn(" }") - pn(" c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize)") + pn(" c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)") pn(" return c") pn("}") comment = "ResumableMedia specifies the media to upload in chunks and can be canceled with ctx. " + @@ -1729,11 +1719,7 @@ func (meth *Method) generateCode() { p("\n%s", asComment("", comment)) pn("func (c *%s) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *%s {", callName, callName) pn(" c.ctx_ = ctx") - pn(" rdr := gensupport.ReaderAtToReader(r, size)") - pn(" rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType)") - pn(" c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize)") - pn(" c.media_ = nil") - pn(" c.mediaSize_ = size") + pn(" c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)") pn(" return c") pn("}") comment = "ProgressUpdater provides a callback function that will be called after every chunk. " + @@ -1741,7 +1727,7 @@ func (meth *Method) generateCode() { "This should only be called when using ResumableMedia (as opposed to Media)." p("\n%s", asComment("", comment)) pn("func (c *%s) ProgressUpdater(pu googleapi.ProgressUpdater) *%s {", callName, callName) - pn(`c.progressUpdater_ = pu`) + pn(`c.mediaInfo_.SetProgressUpdater(pu)`) pn("return c") pn("}") } @@ -1822,31 +1808,20 @@ func (meth *Method) generateCode() { pn("urls := googleapi.ResolveRelative(c.s.BasePath, %q)", meth.m.Path) if meth.supportsMediaUpload() { - pn("if c.media_ != nil || c.mediaBuffer_ != nil{") + pn("if c.mediaInfo_ != nil {") // Hack guess, since we get a 404 otherwise: //pn("urls = googleapi.ResolveRelative(%q, %q)", a.apiBaseURL(), meth.mediaUploadPath()) // Further hack. Discovery doc is wrong? pn(" urls = strings.Replace(urls, %q, %q, 1)", "https://www.googleapis.com/", "https://www.googleapis.com/upload/") - pn(` protocol := "multipart"`) - pn(" if c.mediaBuffer_ != nil {") - pn(` protocol = "resumable"`) - pn(" }") - pn(` c.urlParams_.Set("uploadType", protocol)`) + pn(` c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())`) pn("}") pn("if body == nil {") pn(" body = new(bytes.Buffer)") pn(` reqHeaders.Set("Content-Type", "application/json")`) pn("}") - pn(`if c.media_ != nil {`) - pn(` combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_)`) - pn(" defer combined.Close()") - pn(` reqHeaders.Set("Content-Type", ctype)`) - pn(" body = combined") - pn("}") - pn(`if c.mediaBuffer_ != nil && c.mediaType_ != ""{`) - pn(` reqHeaders.Set("X-Upload-Content-Type", c.mediaType_)`) - pn("}") + pn("body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)") + pn("defer cleanup()") } pn("urls += \"?\" + c.urlParams_.Encode()") pn("req, _ := http.NewRequest(%q, urls, body)", httpMethod) @@ -1915,20 +1890,10 @@ func (meth *Method) generateCode() { pn("defer googleapi.CloseBody(res)") pn("if err := googleapi.CheckResponse(res); err != nil { return %serr }", nilRet) if meth.supportsMediaUpload() { - pn("if c.mediaBuffer_ != nil {") - pn(` loc := res.Header.Get("Location")`) - pn(" rx := &gensupport.ResumableUpload{") - pn(" Client: c.s.client,") - pn(" UserAgent: c.s.userAgent(),") - pn(" URI: loc,") - pn(" Media: c.mediaBuffer_,") - pn(" MediaType: c.mediaType_,") - pn(" Callback: func(curr int64){") - pn(" if c.progressUpdater_ != nil {") - pn(" c.progressUpdater_(curr, c.mediaSize_)") - pn(" }") - pn(" },") - pn(" }") + pn(`rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))`) + pn("if rx != nil {") + pn(" rx.Client = c.s.client") + pn(" rx.UserAgent = c.s.userAgent()") pn(" ctx := c.ctx_") pn(" if ctx == nil {") // TODO(mcgreevy): Require context when calling Media, or Do. diff --git a/vendor/google.golang.org/api/groupsmigration/v1/groupsmigration-gen.go b/vendor/google.golang.org/api/groupsmigration/v1/groupsmigration-gen.go index 127ef0298..13a223b6d 100644 --- a/vendor/google.golang.org/api/groupsmigration/v1/groupsmigration-gen.go +++ b/vendor/google.golang.org/api/groupsmigration/v1/groupsmigration-gen.go @@ -122,16 +122,12 @@ func (s *Groups) MarshalJSON() ([]byte, error) { // method id "groupsmigration.archive.insert": type ArchiveInsertCall struct { - s *Service - groupId string - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + groupId string + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Insert: Inserts a new mail into the archive of the Google group. @@ -150,12 +146,7 @@ func (r *ArchiveService) Insert(groupId string) *ArchiveInsertCall { // supplied. // At most one of Media and ResumableMedia may be set. func (c *ArchiveInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *ArchiveInsertCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -170,11 +161,7 @@ func (c *ArchiveInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) // supersede any context previously provided to the Context method. func (c *ArchiveInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ArchiveInsertCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -183,7 +170,7 @@ func (c *ArchiveInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, s // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *ArchiveInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ArchiveInsertCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -223,27 +210,16 @@ func (c *ArchiveInsertCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "{groupId}/archive") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -279,20 +255,10 @@ func (c *ArchiveInsertCall) Do(opts ...googleapi.CallOption) (*Groups, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() diff --git a/vendor/google.golang.org/api/iam/v1/iam-api.json b/vendor/google.golang.org/api/iam/v1/iam-api.json index be9a81664..42b43261e 100644 --- a/vendor/google.golang.org/api/iam/v1/iam-api.json +++ b/vendor/google.golang.org/api/iam/v1/iam-api.json @@ -1,10 +1,1496 @@ { + "canonicalName": "iam", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://iam.googleapis.com/", + "ownerDomain": "google.com", + "name": "iam", + "batchPath": "batch", + "fullyEncodeReservedExpansion": true, + "title": "Google Identity and Access Management (IAM) API", + "ownerName": "Google", + "resources": { + "permissions": { + "methods": { + "queryTestablePermissions": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "QueryTestablePermissionsResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/permissions:queryTestablePermissions", + "path": "v1/permissions:queryTestablePermissions", + "id": "iam.permissions.queryTestablePermissions", + "description": "Lists the permissions testable on a resource.\nA permission is testable if it can be tested for an identity on a resource.", + "request": { + "$ref": "QueryTestablePermissionsRequest" + } + } + } + }, + "roles": { + "methods": { + "queryGrantableRoles": { + "response": { + "$ref": "QueryGrantableRolesResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/roles:queryGrantableRoles", + "id": "iam.roles.queryGrantableRoles", + "path": "v1/roles:queryGrantableRoles", + "description": "Queries roles that can be granted on a particular resource.\nA role is grantable if it can be used as the role in a binding for a policy\nfor that resource.", + "request": { + "$ref": "QueryGrantableRolesRequest" + } + }, + "get": { + "path": "v1/{+name}", + "id": "iam.roles.get", + "description": "Gets a Role definition.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Role" + }, + "parameters": { + "name": { + "description": "The resource name of the role in one of the following formats:\n`roles/{ROLE_NAME}`\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", + "type": "string", + "required": true, + "pattern": "^roles/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/roles/{rolesId}" + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ListRolesResponse" + }, + "parameters": { + "parent": { + "description": "The resource name of the parent resource in one of the following formats:\n`` (empty string) -- this refers to curated roles.\n`organizations/{ORGANIZATION_ID}`\n`projects/{PROJECT_ID}`", + "type": "string", + "location": "query" + }, + "showDeleted": { + "location": "query", + "description": "Include Roles that have been deleted.", + "type": "boolean" + }, + "pageToken": { + "location": "query", + "description": "Optional pagination token returned in an earlier ListRolesResponse.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Optional limit on the number of roles to include in the response.", + "type": "integer", + "location": "query" + }, + "view": { + "location": "query", + "enum": [ + "BASIC", + "FULL" + ], + "description": "Optional view for the returned Role objects.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/roles", + "path": "v1/roles", + "id": "iam.roles.list", + "description": "Lists the Roles defined on a resource." + } + } + }, + "organizations": { + "resources": { + "roles": { + "methods": { + "undelete": { + "description": "Undelete a Role, bringing it back in its previous state.", + "request": { + "$ref": "UndeleteRoleRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Role" + }, + "parameters": { + "name": { + "pattern": "^organizations/[^/]+/roles/[^/]+$", + "location": "path", + "description": "The resource name of the role in one of the following formats:\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}:undelete", + "path": "v1/{+name}:undelete", + "id": "iam.organizations.roles.undelete" + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "Role" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "pattern": "^organizations/[^/]+/roles/[^/]+$", + "location": "path", + "description": "The resource name of the role in one of the following formats:\n`roles/{ROLE_NAME}`\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", + "path": "v1/{+name}", + "id": "iam.organizations.roles.get", + "description": "Gets a Role definition." + }, + "patch": { + "response": { + "$ref": "Role" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "description": "A mask describing which fields in the Role have changed.", + "type": "string", + "location": "query" + }, + "name": { + "description": "The resource name of the role in one of the following formats:\n`roles/{ROLE_NAME}`\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+/roles/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", + "id": "iam.organizations.roles.patch", + "path": "v1/{+name}", + "request": { + "$ref": "Role" + }, + "description": "Updates a Role definition." + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Role" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "etag": { + "format": "byte", + "description": "Used to perform a consistent read-modify-write.", + "type": "string", + "location": "query" + }, + "name": { + "description": "The resource name of the role in one of the following formats:\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+/roles/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", + "path": "v1/{+name}", + "id": "iam.organizations.roles.delete", + "description": "Soft deletes a role. The role is suspended and cannot be used to create new\nIAM Policy Bindings.\nThe Role will not be included in `ListRoles()` unless `show_deleted` is set\nin the `ListRolesRequest`. The Role contains the deleted boolean set.\nExisting Bindings remains, but are inactive. The Role can be undeleted\nwithin 7 days. After 7 days the Role is deleted and all Bindings associated\nwith the role are removed." + }, + "list": { + "description": "Lists the Roles defined on a resource.", + "response": { + "$ref": "ListRolesResponse" + }, + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageToken": { + "description": "Optional pagination token returned in an earlier ListRolesResponse.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Optional limit on the number of roles to include in the response.", + "type": "integer", + "location": "query" + }, + "view": { + "location": "query", + "enum": [ + "BASIC", + "FULL" + ], + "description": "Optional view for the returned Role objects.", + "type": "string" + }, + "parent": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "The resource name of the parent resource in one of the following formats:\n`` (empty string) -- this refers to curated roles.\n`organizations/{ORGANIZATION_ID}`\n`projects/{PROJECT_ID}`", + "type": "string", + "required": true + }, + "showDeleted": { + "description": "Include Roles that have been deleted.", + "type": "boolean", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/organizations/{organizationsId}/roles", + "id": "iam.organizations.roles.list", + "path": "v1/{+parent}/roles" + }, + "create": { + "path": "v1/{+parent}/roles", + "id": "iam.organizations.roles.create", + "description": "Creates a new Role.", + "request": { + "$ref": "CreateRoleRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "Role" + }, + "parameters": { + "parent": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "The resource name of the parent resource in one of the following formats:\n`organizations/{ORGANIZATION_ID}`\n`projects/{PROJECT_ID}`", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/organizations/{organizationsId}/roles" + } + } + } + } + }, + "projects": { + "resources": { + "roles": { + "methods": { + "undelete": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Role" + }, + "parameters": { + "name": { + "description": "The resource name of the role in one of the following formats:\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/roles/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/roles/{rolesId}:undelete", + "path": "v1/{+name}:undelete", + "id": "iam.projects.roles.undelete", + "description": "Undelete a Role, bringing it back in its previous state.", + "request": { + "$ref": "UndeleteRoleRequest" + } + }, + "get": { + "response": { + "$ref": "Role" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/roles/[^/]+$", + "location": "path", + "description": "The resource name of the role in one of the following formats:\n`roles/{ROLE_NAME}`\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", + "id": "iam.projects.roles.get", + "path": "v1/{+name}", + "description": "Gets a Role definition." + }, + "patch": { + "id": "iam.projects.roles.patch", + "path": "v1/{+name}", + "request": { + "$ref": "Role" + }, + "description": "Updates a Role definition.", + "response": { + "$ref": "Role" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/roles/[^/]+$", + "location": "path", + "description": "The resource name of the role in one of the following formats:\n`roles/{ROLE_NAME}`\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", + "type": "string", + "required": true + }, + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "A mask describing which fields in the Role have changed.", + "type": "string" + } + }, + "flatPath": "v1/projects/{projectsId}/roles/{rolesId}" + }, + "delete": { + "description": "Soft deletes a role. The role is suspended and cannot be used to create new\nIAM Policy Bindings.\nThe Role will not be included in `ListRoles()` unless `show_deleted` is set\nin the `ListRolesRequest`. The Role contains the deleted boolean set.\nExisting Bindings remains, but are inactive. The Role can be undeleted\nwithin 7 days. After 7 days the Role is deleted and all Bindings associated\nwith the role are removed.", + "response": { + "$ref": "Role" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/roles/[^/]+$", + "location": "path", + "description": "The resource name of the role in one of the following formats:\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", + "type": "string", + "required": true + }, + "etag": { + "format": "byte", + "description": "Used to perform a consistent read-modify-write.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", + "id": "iam.projects.roles.delete", + "path": "v1/{+name}" + }, + "list": { + "description": "Lists the Roles defined on a resource.", + "response": { + "$ref": "ListRolesResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "Optional pagination token returned in an earlier ListRolesResponse.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional limit on the number of roles to include in the response.", + "type": "integer" + }, + "view": { + "enum": [ + "BASIC", + "FULL" + ], + "description": "Optional view for the returned Role objects.", + "type": "string", + "location": "query" + }, + "parent": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "The resource name of the parent resource in one of the following formats:\n`` (empty string) -- this refers to curated roles.\n`organizations/{ORGANIZATION_ID}`\n`projects/{PROJECT_ID}`", + "type": "string", + "required": true + }, + "showDeleted": { + "location": "query", + "description": "Include Roles that have been deleted.", + "type": "boolean" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/roles", + "id": "iam.projects.roles.list", + "path": "v1/{+parent}/roles" + }, + "create": { + "description": "Creates a new Role.", + "request": { + "$ref": "CreateRoleRequest" + }, + "response": { + "$ref": "Role" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "parent": { + "description": "The resource name of the parent resource in one of the following formats:\n`organizations/{ORGANIZATION_ID}`\n`projects/{PROJECT_ID}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/roles", + "id": "iam.projects.roles.create", + "path": "v1/{+parent}/roles" + } + } + }, + "serviceAccounts": { + "methods": { + "create": { + "path": "v1/{+name}/serviceAccounts", + "id": "iam.projects.serviceAccounts.create", + "request": { + "$ref": "CreateServiceAccountRequest" + }, + "description": "Creates a ServiceAccount\nand returns it.", + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ServiceAccount" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The resource name of the project associated with the service\naccounts, such as `projects/my-project-123`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts" + }, + "signJwt": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "SignJwtResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path", + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signJwt", + "path": "v1/{+name}:signJwt", + "id": "iam.projects.serviceAccounts.signJwt", + "request": { + "$ref": "SignJwtRequest" + }, + "description": "Signs a JWT using a service account's system-managed private key.\n\nIf no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM sets an\nan expiry time of one hour by default. If you request an expiry time of\nmore than one hour, the request will fail." + }, + "setIamPolicy": { + "id": "iam.projects.serviceAccounts.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the IAM access control policy for a\nServiceAccount.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:setIamPolicy" + }, + "getIamPolicy": { + "response": { + "$ref": "Policy" + }, + "httpMethod": "POST", + "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.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:getIamPolicy", + "id": "iam.projects.serviceAccounts.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "description": "Returns the IAM access control policy for a\nServiceAccount." + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "ServiceAccount" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", + "path": "v1/{+name}", + "id": "iam.projects.serviceAccounts.get", + "description": "Gets a ServiceAccount." + }, + "update": { + "id": "iam.projects.serviceAccounts.update", + "path": "v1/{+name}", + "request": { + "$ref": "ServiceAccount" + }, + "description": "Updates a ServiceAccount.\n\nCurrently, only the following fields are updatable:\n`display_name` .\nThe `etag` is mandatory.", + "response": { + "$ref": "ServiceAccount" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path", + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\n\nRequests using `-` as a wildcard for the project will infer the project\nfrom the `account` and the `account` value can be the `email` address or\nthe `unique_id` of the service account.\n\nIn responses the resource name will always be in the format\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}" + }, + "testIamPermissions": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "id": "iam.projects.serviceAccounts.testIamPermissions", + "description": "Tests the specified permissions against the IAM access control policy\nfor a ServiceAccount.", + "request": { + "$ref": "TestIamPermissionsRequest" + } + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", + "path": "v1/{+name}", + "id": "iam.projects.serviceAccounts.delete", + "description": "Deletes a ServiceAccount." + }, + "list": { + "path": "v1/{+name}/serviceAccounts", + "id": "iam.projects.serviceAccounts.list", + "description": "Lists ServiceAccounts for a project.", + "httpMethod": "GET", + "response": { + "$ref": "ListServiceAccountsResponse" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "Optional pagination token returned in an earlier\nListServiceAccountsResponse.next_page_token.", + "type": "string" + }, + "name": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The resource name of the project associated with the service\naccounts, such as `projects/my-project-123`.", + "type": "string", + "required": true + }, + "pageSize": { + "format": "int32", + "description": "Optional limit on the number of service accounts to include in the\nresponse. Further accounts can subsequently be obtained by including the\nListServiceAccountsResponse.next_page_token\nin a subsequent request.", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/serviceAccounts" + }, + "signBlob": { + "response": { + "$ref": "SignBlobResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path", + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signBlob", + "id": "iam.projects.serviceAccounts.signBlob", + "path": "v1/{+name}:signBlob", + "description": "Signs a blob using a service account's system-managed private key.", + "request": { + "$ref": "SignBlobRequest" + } + } + }, + "resources": { + "keys": { + "methods": { + "create": { + "response": { + "$ref": "ServiceAccountKey" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path", + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys", + "id": "iam.projects.serviceAccounts.keys.create", + "path": "v1/{+name}/keys", + "request": { + "$ref": "CreateServiceAccountKeyRequest" + }, + "description": "Creates a ServiceAccountKey\nand returns it." + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+/keys/[^/]+$", + "location": "path", + "description": "The resource name of the service account key in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys/{keysId}", + "id": "iam.projects.serviceAccounts.keys.delete", + "path": "v1/{+name}", + "description": "Deletes a ServiceAccountKey." + }, + "get": { + "id": "iam.projects.serviceAccounts.keys.get", + "path": "v1/{+name}", + "description": "Gets the ServiceAccountKey\nby key id.", + "response": { + "$ref": "ServiceAccountKey" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "publicKeyType": { + "location": "query", + "enum": [ + "TYPE_NONE", + "TYPE_X509_PEM_FILE", + "TYPE_RAW_PUBLIC_KEY" + ], + "description": "The output format of the public key requested.\nX509_PEM is the default output format.", + "type": "string" + }, + "name": { + "description": "The resource name of the service account key in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`.\n\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+/keys/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys/{keysId}" + }, + "list": { + "response": { + "$ref": "ListServiceAccountKeysResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path", + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\n\nUsing `-` as a wildcard for the project, will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "type": "string", + "required": true + }, + "keyTypes": { + "repeated": true, + "location": "query", + "enum": [ + "KEY_TYPE_UNSPECIFIED", + "USER_MANAGED", + "SYSTEM_MANAGED" + ], + "description": "Filters the types of keys the user wants to include in the list\nresponse. Duplicate key types are not allowed. If no key type\nis provided, all keys are returned.", + "type": "string" + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys", + "id": "iam.projects.serviceAccounts.keys.list", + "path": "v1/{+name}/keys", + "description": "Lists ServiceAccountKeys." + } + } + } + } + } + } + } + }, + "parameters": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "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.", + "type": "string", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + } + }, + "version": "v1", + "baseUrl": "https://iam.googleapis.com/", + "kind": "discovery#restDescription", + "description": "Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls.", + "servicePath": "", + "basePath": "", + "id": "iam:v1", + "documentationLink": "https://cloud.google.com/iam/", + "revision": "20170901", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { - "PolicyDelta": { - "description": "The difference delta between two policies.", + "AuditData": { + "description": "Audit log information specific to Cloud IAM. This message is serialized\nas an `Any` type in the `ServiceData` message of an\n`AuditLog` message.", "type": "object", + "properties": { + "policyDelta": { + "$ref": "PolicyDelta", + "description": "Policy delta between the original policy and the newly set policy." + } + }, + "id": "AuditData" + }, + "BindingDelta": { + "properties": { + "condition": { + "description": "The condition that is associated with this binding.\nThis field is GOOGLE_INTERNAL.\nThis field is not logged in IAM side because it's only for audit logging.\nOptional", + "$ref": "Expr" + }, + "member": { + "description": "A single identity requesting access for a Cloud Platform resource.\nFollows the same format of Binding.members.\nRequired", + "type": "string" + }, + "role": { + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", + "type": "string" + }, + "action": { + "enumDescriptions": [ + "Unspecified.", + "Addition of a Binding.", + "Removal of a Binding." + ], + "enum": [ + "ACTION_UNSPECIFIED", + "ADD", + "REMOVE" + ], + "description": "The action that was performed on a Binding.\nRequired", + "type": "string" + } + }, + "id": "BindingDelta", + "description": "One delta entry for Binding. Each individual change (only one member in each\nentry) to a binding will be a separate entry.", + "type": "object" + }, + "UndeleteRoleRequest": { + "description": "The request to undelete an existing role.", + "type": "object", + "properties": { + "etag": { + "format": "byte", + "description": "Used to perform a consistent read-modify-write.", + "type": "string" + } + }, + "id": "UndeleteRoleRequest" + }, + "CreateServiceAccountRequest": { + "description": "The service account create request.", + "type": "object", + "properties": { + "accountId": { + "description": "Required. The account id that is used to generate the service account\nemail address and a stable unique id. It is unique within a project,\nmust be 6-30 characters long, and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035.", + "type": "string" + }, + "serviceAccount": { + "$ref": "ServiceAccount", + "description": "The ServiceAccount resource to create.\nCurrently, only the following values are user assignable:\n`display_name` ." + } + }, + "id": "CreateServiceAccountRequest" + }, + "Role": { + "description": "A role in the Identity and Access Management API.", + "type": "object", + "properties": { + "etag": { + "format": "byte", + "description": "Used to perform a consistent read-modify-write.", + "type": "string" + }, + "stage": { + "enum": [ + "ALPHA", + "BETA", + "GA", + "DEPRECATED", + "DISABLED", + "EAP" + ], + "description": "The current launch stage of the role.", + "type": "string", + "enumDescriptions": [ + "The user has indicated this role is currently in an alpha phase.", + "The user has indicated this role is currently in a beta phase.", + "The user has indicated this role is generally available.", + "The user has indicated this role is being deprecated.", + "This role is disabled and will not contribute permissions to any members\nit is granted to in policies.", + "The user has indicated this role is currently in an eap phase." + ] + }, + "name": { + "description": "The name of the role.\n\nWhen Role is used in CreateRole, the role name must not be set.\n\nWhen Role is used in output and other input such as UpdateRole, the role\nname is the complete path, e.g., roles/logging.viewer for curated roles\nand organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.", + "type": "string" + }, + "deleted": { + "description": "The current deleted state of the role. This field is read only.\nIt will be ignored in calls to CreateRole and UpdateRole.", + "type": "boolean" + }, + "title": { + "description": "Optional. A human-readable title for the role. Typically this\nis limited to 100 UTF-8 bytes.", + "type": "string" + }, + "includedPermissions": { + "description": "The names of the permissions this role grants when bound in an IAM policy.", + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "Optional. A human-readable description for the role.", + "type": "string" + } + }, + "id": "Role" + }, + "Binding": { + "properties": { + "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` or `joe@example.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`.\nRequired", + "type": "string" + } + }, + "id": "Binding", + "description": "Associates `members` with a `role`.", + "type": "object" + }, + "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" + } + }, + "id": "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\"", + "type": "object" + }, + "ServiceAccount": { + "description": "A service account in the Identity and Access Management API.\n\nTo create a service account, specify the `project_id` and the `account_id`\nfor the account. The `account_id` is unique within the project, and is used\nto generate the service account email address and a stable\n`unique_id`.\n\nIf the account already exists, the account's resource name is returned\nin util::Status's ResourceInfo.resource_name in the format of\nprojects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}. The caller can\nuse the name in other methods to access the account.\n\nAll other methods can identify the service account using the format\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "type": "object", + "properties": { + "etag": { + "format": "byte", + "description": "Used to perform a consistent read-modify-write.", + "type": "string" + }, + "email": { + "description": "@OutputOnly The email address of the service account.", + "type": "string" + }, + "name": { + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\n\nRequests using `-` as a wildcard for the project will infer the project\nfrom the `account` and the `account` value can be the `email` address or\nthe `unique_id` of the service account.\n\nIn responses the resource name will always be in the format\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.", + "type": "string" + }, + "projectId": { + "description": "@OutputOnly The id of the project that owns the service account.", + "type": "string" + }, + "oauth2ClientId": { + "description": "@OutputOnly. The OAuth2 client id for the service account.\nThis is used in conjunction with the OAuth2 clientconfig API to make\nthree legged OAuth2 (3LO) flows to access the data of Google users.", + "type": "string" + }, + "uniqueId": { + "description": "@OutputOnly The unique and stable id of the service account.", + "type": "string" + }, + "displayName": { + "description": "Optional. A user-specified description of the service account. Must be\nfewer than 100 UTF-8 bytes.", + "type": "string" + } + }, + "id": "ServiceAccount" + }, + "QueryGrantableRolesRequest": { + "properties": { + "fullResourceName": { + "description": "Required. The full resource name to query from the list of grantable roles.\n\nThe name follows the Google Cloud Platform resource format.\nFor example, a Cloud Platform project with id `my-project` will be named\n`//cloudresourcemanager.googleapis.com/projects/my-project`.", + "type": "string" + }, + "pageToken": { + "description": "Optional pagination token returned in an earlier\nQueryGrantableRolesResponse.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Optional limit on the number of roles to include in the response.", + "type": "integer" + }, + "view": { + "enumDescriptions": [ + "Omits the `included_permissions` field.\nThis is the default value.", + "Returns all fields." + ], + "enum": [ + "BASIC", + "FULL" + ], + "type": "string" + } + }, + "id": "QueryGrantableRolesRequest", + "description": "The grantable role query request.", + "type": "object" + }, + "CreateRoleRequest": { + "description": "The request to create a new role.", + "type": "object", + "properties": { + "roleId": { + "description": "The role id to use for this role.", + "type": "string" + }, + "role": { + "$ref": "Role", + "description": "The Role resource to create." + } + }, + "id": "CreateRoleRequest" + }, + "QueryTestablePermissionsRequest": { + "description": "A request to get permissions which can be tested on a resource.", + "type": "object", + "properties": { + "fullResourceName": { + "description": "Required. The full resource name to query from the list of testable\npermissions.\n\nThe name follows the Google Cloud Platform resource format.\nFor example, a Cloud Platform project with id `my-project` will be named\n`//cloudresourcemanager.googleapis.com/projects/my-project`.", + "type": "string" + }, + "pageToken": { + "description": "Optional pagination token returned in an earlier\nQueryTestablePermissionsRequest.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Optional limit on the number of permissions to include in the response.", + "type": "integer" + } + }, + "id": "QueryTestablePermissionsRequest" + }, + "TestIamPermissionsResponse": { + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestIamPermissionsResponse", + "description": "Response message for `TestIamPermissions` method.", + "type": "object" + }, + "ListServiceAccountKeysResponse": { + "properties": { + "keys": { + "description": "The public keys for the service account.", + "items": { + "$ref": "ServiceAccountKey" + }, + "type": "array" + } + }, + "id": "ListServiceAccountKeysResponse", + "description": "The service account keys list response.", + "type": "object" + }, + "ServiceAccountKey": { + "description": "Represents a service account key.\n\nA service account has two sets of key-pairs: user-managed, and\nsystem-managed.\n\nUser-managed key-pairs can be created and deleted by users. Users are\nresponsible for rotating these keys periodically to ensure security of\ntheir service accounts. Users retain the private key of these key-pairs,\nand Google retains ONLY the public key.\n\nSystem-managed key-pairs are managed automatically by Google, and rotated\ndaily without user intervention. The private key never leaves Google's\nservers to maximize security.\n\nPublic keys for all service accounts are also published at the OAuth2\nService Account API.", + "type": "object", + "properties": { + "privateKeyData": { + "format": "byte", + "description": "The private key data. Only provided in `CreateServiceAccountKey`\nresponses. Make sure to keep the private key data secure because it\nallows for the assertion of the service account identity.\nWhen decoded, the private key data can be used to authenticate with\nGoogle API client libraries and with\n\u003ca href=\"/sdk/gcloud/reference/auth/activate-service-account\"\u003egcloud\nauth activate-service-account\u003c/a\u003e.", + "type": "string" + }, + "publicKeyData": { + "format": "byte", + "description": "The public key data. Only provided in `GetServiceAccountKey` responses.", + "type": "string" + }, + "name": { + "description": "The resource name of the service account key in the following format\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`.", + "type": "string" + }, + "validBeforeTime": { + "format": "google-datetime", + "description": "The key can be used before this timestamp.", + "type": "string" + }, + "keyAlgorithm": { + "enum": [ + "KEY_ALG_UNSPECIFIED", + "KEY_ALG_RSA_1024", + "KEY_ALG_RSA_2048" + ], + "description": "Specifies the algorithm (and possibly key size) for the key.", + "type": "string", + "enumDescriptions": [ + "An unspecified key algorithm.", + "1k RSA Key.", + "2k RSA Key." + ] + }, + "validAfterTime": { + "format": "google-datetime", + "description": "The key can be used after this timestamp.", + "type": "string" + }, + "privateKeyType": { + "enum": [ + "TYPE_UNSPECIFIED", + "TYPE_PKCS12_FILE", + "TYPE_GOOGLE_CREDENTIALS_FILE" + ], + "description": "The output format for the private key.\nOnly provided in `CreateServiceAccountKey` responses, not\nin `GetServiceAccountKey` or `ListServiceAccountKey` responses.\n\nGoogle never exposes system-managed private keys, and never retains\nuser-managed private keys.", + "type": "string", + "enumDescriptions": [ + "Unspecified. Equivalent to `TYPE_GOOGLE_CREDENTIALS_FILE`.", + "PKCS12 format.\nThe password for the PKCS12 file is `notasecret`.\nFor more information, see https://tools.ietf.org/html/rfc7292.", + "Google Credentials File format." + ] + } + }, + "id": "ServiceAccountKey" + }, + "SignBlobResponse": { + "properties": { + "keyId": { + "description": "The id of the key used to sign the blob.", + "type": "string" + }, + "signature": { + "format": "byte", + "description": "The signed blob.", + "type": "string" + } + }, + "id": "SignBlobResponse", + "description": "The service account sign blob response.", + "type": "object" + }, + "Permission": { + "description": "A permission which can be included by a role.", + "type": "object", + "properties": { + "description": { + "description": "A brief description of what this Permission is used for.", + "type": "string" + }, + "customRolesSupportLevel": { + "enumDescriptions": [ + "Permission is fully supported for custom role use.", + "Permission is being tested to check custom role compatibility.", + "Permission is not supported for custom role use." + ], + "enum": [ + "SUPPORTED", + "TESTING", + "NOT_SUPPORTED" + ], + "description": "The current custom role support level.", + "type": "string" + }, + "stage": { + "enumDescriptions": [ + "The permission is currently in an alpha phase.", + "The permission is currently in a beta phase.", + "The permission is generally available.", + "The permission is being deprecated." + ], + "enum": [ + "ALPHA", + "BETA", + "GA", + "DEPRECATED" + ], + "description": "The current launch stage of the permission.", + "type": "string" + }, + "name": { + "description": "The name of this Permission.", + "type": "string" + }, + "onlyInPredefinedRoles": { + "description": "This permission can ONLY be used in predefined roles.", + "type": "boolean" + }, + "title": { + "description": "The title of this Permission.", + "type": "string" + } + }, + "id": "Permission" + }, + "SignJwtRequest": { + "properties": { + "payload": { + "description": "The JWT payload to sign, a JSON JWT Claim set.", + "type": "string" + } + }, + "id": "SignJwtRequest", + "description": "The service account sign JWT request.", + "type": "object" + }, + "PolicyDelta": { "properties": { "bindingDeltas": { "description": "The delta for Bindings between two policies.", @@ -14,7 +1500,9 @@ "type": "array" } }, - "id": "PolicyDelta" + "id": "PolicyDelta", + "description": "The difference delta between two policies.", + "type": "object" }, "ListServiceAccountsResponse": { "properties": { @@ -35,7 +1523,6 @@ "type": "object" }, "QueryGrantableRolesResponse": { - "id": "QueryGrantableRolesResponse", "description": "The grantable role query response.", "type": "object", "properties": { @@ -50,11 +1537,10 @@ }, "type": "array" } - } + }, + "id": "QueryGrantableRolesResponse" }, "SignBlobRequest": { - "description": "The service account sign blob request.", - "type": "object", "properties": { "bytesToSign": { "format": "byte", @@ -62,22 +1548,22 @@ "type": "string" } }, - "id": "SignBlobRequest" - }, - "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." - } - }, - "id": "SetIamPolicyRequest", - "description": "Request message for `SetIamPolicy` method.", + "id": "SignBlobRequest", + "description": "The service account sign blob request.", "type": "object" }, - "QueryTestablePermissionsResponse": { - "description": "The response containing permissions which can be tested on a resource.", + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", "type": "object", + "properties": { + "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.", + "$ref": "Policy" + } + }, + "id": "SetIamPolicyRequest" + }, + "QueryTestablePermissionsResponse": { "properties": { "nextPageToken": { "description": "To retrieve the next page of results, set\n`QueryTestableRolesRequest.page_token` to this value.", @@ -91,55 +1577,52 @@ "type": "array" } }, - "id": "QueryTestablePermissionsResponse" + "id": "QueryTestablePermissionsResponse", + "description": "The response containing permissions which can be tested on a resource.", + "type": "object" }, "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "type": "object", "properties": {}, - "id": "Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`." + "id": "Empty" }, "CreateServiceAccountKeyRequest": { - "description": "The service account key create request.", - "type": "object", "properties": { - "includePublicKeyData": { - "type": "boolean" - }, - "keyAlgorithm": { - "type": "string", - "enumDescriptions": [ - "An unspecified key algorithm.", - "1k RSA Key.", - "2k RSA Key." - ], - "enum": [ - "KEY_ALG_UNSPECIFIED", - "KEY_ALG_RSA_1024", - "KEY_ALG_RSA_2048" - ], - "description": "Which type of key and algorithm to use for the key.\nThe default is currently a 2K RSA key. However this may change in the\nfuture." - }, "privateKeyType": { + "enumDescriptions": [ + "Unspecified. Equivalent to `TYPE_GOOGLE_CREDENTIALS_FILE`.", + "PKCS12 format.\nThe password for the PKCS12 file is `notasecret`.\nFor more information, see https://tools.ietf.org/html/rfc7292.", + "Google Credentials File format." + ], "enum": [ "TYPE_UNSPECIFIED", "TYPE_PKCS12_FILE", "TYPE_GOOGLE_CREDENTIALS_FILE" ], "description": "The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the\ndefault output format.", + "type": "string" + }, + "keyAlgorithm": { + "enum": [ + "KEY_ALG_UNSPECIFIED", + "KEY_ALG_RSA_1024", + "KEY_ALG_RSA_2048" + ], + "description": "Which type of key and algorithm to use for the key.\nThe default is currently a 2K RSA key. However this may change in the\nfuture.", "type": "string", "enumDescriptions": [ - "Unspecified. Equivalent to `TYPE_GOOGLE_CREDENTIALS_FILE`.", - "PKCS12 format.\nThe password for the PKCS12 file is `notasecret`.\nFor more information, see https://tools.ietf.org/html/rfc7292.", - "Google Credentials File format." + "An unspecified key algorithm.", + "1k RSA Key.", + "2k RSA Key." ] } }, - "id": "CreateServiceAccountKeyRequest" + "id": "CreateServiceAccountKeyRequest", + "description": "The service account key create request.", + "type": "object" }, "SignJwtResponse": { - "description": "The service account sign JWT response.", - "type": "object", "properties": { "signedJwt": { "description": "The signed JWT.", @@ -150,7 +1633,9 @@ "type": "string" } }, - "id": "SignJwtResponse" + "id": "SignJwtResponse", + "description": "The service account sign JWT response.", + "type": "object" }, "TestIamPermissionsRequest": { "description": "Request message for `TestIamPermissions` method.", @@ -191,6 +1676,8 @@ "id": "Policy" }, "ListRolesResponse": { + "description": "The response containing the roles defined under a resource.", + "type": "object", "properties": { "nextPageToken": { "description": "To retrieve the next page of results, set\n`ListRolesRequest.page_token` to this value.", @@ -204,1502 +1691,12 @@ "type": "array" } }, - "id": "ListRolesResponse", - "description": "The response containing the roles defined under a resource.", - "type": "object" - }, - "AuditData": { - "description": "Audit log information specific to Cloud IAM. This message is serialized\nas an `Any` type in the `ServiceData` message of an\n`AuditLog` message.", - "type": "object", - "properties": { - "policyDelta": { - "$ref": "PolicyDelta", - "description": "Policy delta between the original policy and the newly set policy." - } - }, - "id": "AuditData" - }, - "BindingDelta": { - "description": "One delta entry for Binding. Each individual change (only one member in each\nentry) to a binding will be a separate entry.", - "type": "object", - "properties": { - "condition": { - "description": "The condition that is associated with this binding.\nThis field is GOOGLE_INTERNAL.\nThis field is not logged in IAM side because it's only for audit logging.\nOptional", - "$ref": "Expr" - }, - "member": { - "description": "A single identity requesting access for a Cloud Platform resource.\nFollows the same format of Binding.members.\nRequired", - "type": "string" - }, - "role": { - "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", - "type": "string" - }, - "action": { - "enumDescriptions": [ - "Unspecified.", - "Addition of a Binding.", - "Removal of a Binding." - ], - "enum": [ - "ACTION_UNSPECIFIED", - "ADD", - "REMOVE" - ], - "description": "The action that was performed on a Binding.\nRequired", - "type": "string" - } - }, - "id": "BindingDelta" - }, - "UndeleteRoleRequest": { - "description": "The request to undelete an existing role.", - "type": "object", - "properties": { - "etag": { - "format": "byte", - "description": "Used to perform a consistent read-modify-write.", - "type": "string" - } - }, - "id": "UndeleteRoleRequest" - }, - "CreateServiceAccountRequest": { - "id": "CreateServiceAccountRequest", - "description": "The service account create request.", - "type": "object", - "properties": { - "accountId": { - "description": "Required. The account id that is used to generate the service account\nemail address and a stable unique id. It is unique within a project,\nmust be 6-30 characters long, and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035.", - "type": "string" - }, - "serviceAccount": { - "description": "The ServiceAccount resource to create.\nCurrently, only the following values are user assignable:\n`display_name` .", - "$ref": "ServiceAccount" - } - } - }, - "Role": { - "description": "A role in the Identity and Access Management API.", - "type": "object", - "properties": { - "name": { - "description": "The name of the role.\n\nWhen Role is used in CreateRole, the role name must not be set.\n\nWhen Role is used in output and other input such as UpdateRole, the role\nname is the complete path, e.g., roles/logging.viewer for curated roles\nand organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.", - "type": "string" - }, - "deleted": { - "description": "The current deleted state of the role. This field is read only.\nIt will be ignored in calls to CreateRole and UpdateRole.", - "type": "boolean" - }, - "title": { - "description": "Optional. A human-readable title for the role. Typically this\nis limited to 100 UTF-8 bytes.", - "type": "string" - }, - "includedPermissions": { - "description": "The names of the permissions this role grants when bound in an IAM policy.", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "Optional. A human-readable description for the role.", - "type": "string" - }, - "etag": { - "format": "byte", - "description": "Used to perform a consistent read-modify-write.", - "type": "string" - }, - "stage": { - "description": "The current launch stage of the role.", - "type": "string", - "enumDescriptions": [ - "The user has indicated this role is currently in an alpha phase.", - "The user has indicated this role is currently in a beta phase.", - "The user has indicated this role is generally available.", - "The user has indicated this role is being deprecated.", - "This role is disabled and will not contribute permissions to any members\nit is granted to in policies.", - "The user has indicated this role is currently in an eap phase." - ], - "enum": [ - "ALPHA", - "BETA", - "GA", - "DEPRECATED", - "DISABLED", - "EAP" - ] - } - }, - "id": "Role" - }, - "Binding": { - "description": "Associates `members` with a `role`.", - "type": "object", - "properties": { - "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` or `joe@example.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`.\nRequired", - "type": "string" - } - }, - "id": "Binding" - }, - "ServiceAccount": { - "description": "A service account in the Identity and Access Management API.\n\nTo create a service account, specify the `project_id` and the `account_id`\nfor the account. The `account_id` is unique within the project, and is used\nto generate the service account email address and a stable\n`unique_id`.\n\nIf the account already exists, the account's resource name is returned\nin util::Status's ResourceInfo.resource_name in the format of\nprojects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}. The caller can\nuse the name in other methods to access the account.\n\nAll other methods can identify the service account using the format\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", - "type": "object", - "properties": { - "displayName": { - "description": "Optional. A user-specified description of the service account. Must be\nfewer than 100 UTF-8 bytes.", - "type": "string" - }, - "etag": { - "format": "byte", - "description": "Used to perform a consistent read-modify-write.", - "type": "string" - }, - "email": { - "type": "string", - "description": "@OutputOnly The email address of the service account." - }, - "name": { - "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\n\nRequests using `-` as a wildcard for the project will infer the project\nfrom the `account` and the `account` value can be the `email` address or\nthe `unique_id` of the service account.\n\nIn responses the resource name will always be in the format\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.", - "type": "string" - }, - "projectId": { - "description": "@OutputOnly The id of the project that owns the service account.", - "type": "string" - }, - "oauth2ClientId": { - "description": "@OutputOnly. The OAuth2 client id for the service account.\nThis is used in conjunction with the OAuth2 clientconfig API to make\nthree legged OAuth2 (3LO) flows to access the data of Google users.", - "type": "string" - }, - "uniqueId": { - "description": "@OutputOnly The unique and stable id of the service account.", - "type": "string" - } - }, - "id": "ServiceAccount" - }, - "Expr": { - "type": "object", - "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": { - "type": "string", - "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." - } - }, - "id": "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\"" - }, - "QueryGrantableRolesRequest": { - "description": "The grantable role query request.", - "type": "object", - "properties": { - "view": { - "type": "string", - "enumDescriptions": [ - "Omits the `included_permissions` field.\nThis is the default value.", - "Returns all fields." - ], - "enum": [ - "BASIC", - "FULL" - ] - }, - "fullResourceName": { - "type": "string", - "description": "Required. The full resource name to query from the list of grantable roles.\n\nThe name follows the Google Cloud Platform resource format.\nFor example, a Cloud Platform project with id `my-project` will be named\n`//cloudresourcemanager.googleapis.com/projects/my-project`." - }, - "pageToken": { - "description": "Optional pagination token returned in an earlier\nQueryGrantableRolesResponse.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Optional limit on the number of roles to include in the response.", - "type": "integer" - } - }, - "id": "QueryGrantableRolesRequest" - }, - "CreateRoleRequest": { - "description": "The request to create a new role.", - "type": "object", - "properties": { - "roleId": { - "description": "The role id to use for this role.", - "type": "string" - }, - "role": { - "description": "The Role resource to create.", - "$ref": "Role" - } - }, - "id": "CreateRoleRequest" - }, - "QueryTestablePermissionsRequest": { - "properties": { - "fullResourceName": { - "description": "Required. The full resource name to query from the list of testable\npermissions.\n\nThe name follows the Google Cloud Platform resource format.\nFor example, a Cloud Platform project with id `my-project` will be named\n`//cloudresourcemanager.googleapis.com/projects/my-project`.", - "type": "string" - }, - "pageToken": { - "description": "Optional pagination token returned in an earlier\nQueryTestablePermissionsRequest.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "format": "int32", - "description": "Optional limit on the number of permissions to include in the response." - } - }, - "id": "QueryTestablePermissionsRequest", - "description": "A request to get permissions which can be tested on a resource.", - "type": "object" - }, - "TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "TestIamPermissionsResponse" - }, - "ListServiceAccountKeysResponse": { - "description": "The service account keys list response.", - "type": "object", - "properties": { - "keys": { - "description": "The public keys for the service account.", - "items": { - "$ref": "ServiceAccountKey" - }, - "type": "array" - } - }, - "id": "ListServiceAccountKeysResponse" - }, - "ServiceAccountKey": { - "type": "object", - "properties": { - "privateKeyData": { - "format": "byte", - "description": "The private key data. Only provided in `CreateServiceAccountKey`\nresponses. Make sure to keep the private key data secure because it\nallows for the assertion of the service account identity.\nWhen decoded, the private key data can be used to authenticate with\nGoogle API client libraries and with\n\u003ca href=\"/sdk/gcloud/reference/auth/activate-service-account\"\u003egcloud\nauth activate-service-account\u003c/a\u003e.", - "type": "string" - }, - "publicKeyData": { - "format": "byte", - "description": "The public key data. Only provided in `GetServiceAccountKey` responses.", - "type": "string" - }, - "name": { - "description": "The resource name of the service account key in the following format\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`.", - "type": "string" - }, - "validBeforeTime": { - "format": "google-datetime", - "description": "The key can be used before this timestamp.", - "type": "string" - }, - "keyAlgorithm": { - "description": "Specifies the algorithm (and possibly key size) for the key.", - "type": "string", - "enumDescriptions": [ - "An unspecified key algorithm.", - "1k RSA Key.", - "2k RSA Key." - ], - "enum": [ - "KEY_ALG_UNSPECIFIED", - "KEY_ALG_RSA_1024", - "KEY_ALG_RSA_2048" - ] - }, - "privateKeyType": { - "enum": [ - "TYPE_UNSPECIFIED", - "TYPE_PKCS12_FILE", - "TYPE_GOOGLE_CREDENTIALS_FILE" - ], - "description": "The output format for the private key.\nOnly provided in `CreateServiceAccountKey` responses, not\nin `GetServiceAccountKey` or `ListServiceAccountKey` responses.\n\nGoogle never exposes system-managed private keys, and never retains\nuser-managed private keys.", - "type": "string", - "enumDescriptions": [ - "Unspecified. Equivalent to `TYPE_GOOGLE_CREDENTIALS_FILE`.", - "PKCS12 format.\nThe password for the PKCS12 file is `notasecret`.\nFor more information, see https://tools.ietf.org/html/rfc7292.", - "Google Credentials File format." - ] - }, - "validAfterTime": { - "format": "google-datetime", - "description": "The key can be used after this timestamp.", - "type": "string" - } - }, - "id": "ServiceAccountKey", - "description": "Represents a service account key.\n\nA service account has two sets of key-pairs: user-managed, and\nsystem-managed.\n\nUser-managed key-pairs can be created and deleted by users. Users are\nresponsible for rotating these keys periodically to ensure security of\ntheir service accounts. Users retain the private key of these key-pairs,\nand Google retains ONLY the public key.\n\nSystem-managed key-pairs are managed automatically by Google, and rotated\ndaily without user intervention. The private key never leaves Google's\nservers to maximize security.\n\nPublic keys for all service accounts are also published at the OAuth2\nService Account API." - }, - "SignBlobResponse": { - "description": "The service account sign blob response.", - "type": "object", - "properties": { - "signature": { - "format": "byte", - "description": "The signed blob.", - "type": "string" - }, - "keyId": { - "description": "The id of the key used to sign the blob.", - "type": "string" - } - }, - "id": "SignBlobResponse" - }, - "SignJwtRequest": { - "id": "SignJwtRequest", - "description": "The service account sign JWT request.", - "type": "object", - "properties": { - "payload": { - "description": "The JWT payload to sign, a JSON JWT Claim set.", - "type": "string" - } - } - }, - "Permission": { - "properties": { - "onlyInPredefinedRoles": { - "description": "This permission can ONLY be used in predefined roles.", - "type": "boolean" - }, - "title": { - "description": "The title of this Permission.", - "type": "string" - }, - "description": { - "description": "A brief description of what this Permission is used for.", - "type": "string" - }, - "customRolesSupportLevel": { - "description": "The current custom role support level.", - "type": "string", - "enumDescriptions": [ - "Permission is fully supported for custom role use.", - "Permission is being tested to check custom role compatibility.", - "Permission is not supported for custom role use." - ], - "enum": [ - "SUPPORTED", - "TESTING", - "NOT_SUPPORTED" - ] - }, - "stage": { - "description": "The current launch stage of the permission.", - "type": "string", - "enumDescriptions": [ - "The permission is currently in an alpha phase.", - "The permission is currently in a beta phase.", - "The permission is generally available.", - "The permission is being deprecated." - ], - "enum": [ - "ALPHA", - "BETA", - "GA", - "DEPRECATED" - ] - }, - "name": { - "description": "The name of this Permission.", - "type": "string" - } - }, - "id": "Permission", - "description": "A permission which can be included by a role.", - "type": "object" + "id": "ListRolesResponse" } }, "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "protocol": "rest", - "canonicalName": "iam", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "rootUrl": "https://iam.googleapis.com/", - "ownerDomain": "google.com", - "name": "iam", - "batchPath": "batch", - "fullyEncodeReservedExpansion": true, - "title": "Google Identity and Access Management (IAM) API", - "ownerName": "Google", - "resources": { - "permissions": { - "methods": { - "queryTestablePermissions": { - "flatPath": "v1/permissions:queryTestablePermissions", - "id": "iam.permissions.queryTestablePermissions", - "path": "v1/permissions:queryTestablePermissions", - "description": "Lists the permissions testable on a resource.\nA permission is testable if it can be tested for an identity on a resource.", - "request": { - "$ref": "QueryTestablePermissionsRequest" - }, - "response": { - "$ref": "QueryTestablePermissionsResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "roles": { - "methods": { - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Role" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^roles/[^/]+$", - "location": "path", - "description": "The resource name of the role in one of the following formats:\n`roles/{ROLE_NAME}`\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`" - } - }, - "flatPath": "v1/roles/{rolesId}", - "path": "v1/{+name}", - "id": "iam.roles.get", - "description": "Gets a Role definition." - }, - "list": { - "response": { - "$ref": "ListRolesResponse" - }, - "httpMethod": "GET", - "parameterOrder": [], - "parameters": { - "showDeleted": { - "description": "Include Roles that have been deleted.", - "type": "boolean", - "location": "query" - }, - "pageToken": { - "type": "string", - "location": "query", - "description": "Optional pagination token returned in an earlier ListRolesResponse." - }, - "pageSize": { - "format": "int32", - "description": "Optional limit on the number of roles to include in the response.", - "type": "integer", - "location": "query" - }, - "view": { - "location": "query", - "enum": [ - "BASIC", - "FULL" - ], - "description": "Optional view for the returned Role objects.", - "type": "string" - }, - "parent": { - "location": "query", - "description": "The resource name of the parent resource in one of the following formats:\n`` (empty string) -- this refers to curated roles.\n`organizations/{ORGANIZATION_ID}`\n`projects/{PROJECT_ID}`", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/roles", - "id": "iam.roles.list", - "path": "v1/roles", - "description": "Lists the Roles defined on a resource." - }, - "queryGrantableRoles": { - "path": "v1/roles:queryGrantableRoles", - "id": "iam.roles.queryGrantableRoles", - "request": { - "$ref": "QueryGrantableRolesRequest" - }, - "description": "Queries roles that can be granted on a particular resource.\nA role is grantable if it can be used as the role in a binding for a policy\nfor that resource.", - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "QueryGrantableRolesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {}, - "flatPath": "v1/roles:queryGrantableRoles" - } - } - }, - "organizations": { - "resources": { - "roles": { - "methods": { - "delete": { - "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", - "id": "iam.organizations.roles.delete", - "path": "v1/{+name}", - "description": "Soft deletes a role. The role is suspended and cannot be used to create new\nIAM Policy Bindings.\nThe Role will not be included in `ListRoles()` unless `show_deleted` is set\nin the `ListRolesRequest`. The Role contains the deleted boolean set.\nExisting Bindings remains, but are inactive. The Role can be undeleted\nwithin 7 days. After 7 days the Role is deleted and all Bindings associated\nwith the role are removed.", - "response": { - "$ref": "Role" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "etag": { - "type": "string", - "location": "query", - "format": "byte", - "description": "Used to perform a consistent read-modify-write." - }, - "name": { - "location": "path", - "description": "The resource name of the role in one of the following formats:\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+/roles/[^/]+$" - } - } - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "ListRolesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "pageToken": { - "description": "Optional pagination token returned in an earlier ListRolesResponse.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional limit on the number of roles to include in the response.", - "type": "integer" - }, - "view": { - "location": "query", - "enum": [ - "BASIC", - "FULL" - ], - "description": "Optional view for the returned Role objects.", - "type": "string" - }, - "parent": { - "description": "The resource name of the parent resource in one of the following formats:\n`` (empty string) -- this refers to curated roles.\n`organizations/{ORGANIZATION_ID}`\n`projects/{PROJECT_ID}`", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - }, - "showDeleted": { - "location": "query", - "description": "Include Roles that have been deleted.", - "type": "boolean" - } - }, - "flatPath": "v1/organizations/{organizationsId}/roles", - "path": "v1/{+parent}/roles", - "id": "iam.organizations.roles.list", - "description": "Lists the Roles defined on a resource." - }, - "create": { - "id": "iam.organizations.roles.create", - "path": "v1/{+parent}/roles", - "request": { - "$ref": "CreateRoleRequest" - }, - "description": "Creates a new Role.", - "response": { - "$ref": "Role" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "description": "The resource name of the parent resource in one of the following formats:\n`organizations/{ORGANIZATION_ID}`\n`projects/{PROJECT_ID}`", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/organizations/{organizationsId}/roles" - }, - "patch": { - "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", - "id": "iam.organizations.roles.patch", - "path": "v1/{+name}", - "request": { - "$ref": "Role" - }, - "description": "Updates a Role definition.", - "response": { - "$ref": "Role" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PATCH", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^organizations/[^/]+/roles/[^/]+$", - "location": "path", - "description": "The resource name of the role in one of the following formats:\n`roles/{ROLE_NAME}`\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", - "type": "string", - "required": true - }, - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "A mask describing which fields in the Role have changed.", - "type": "string" - } - } - }, - "undelete": { - "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}:undelete", - "id": "iam.organizations.roles.undelete", - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeleteRoleRequest" - }, - "description": "Undelete a Role, bringing it back in its previous state.", - "response": { - "$ref": "Role" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The resource name of the role in one of the following formats:\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+/roles/[^/]+$", - "location": "path" - } - } - }, - "get": { - "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", - "id": "iam.organizations.roles.get", - "path": "v1/{+name}", - "description": "Gets a Role definition.", - "response": { - "$ref": "Role" - }, - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^organizations/[^/]+/roles/[^/]+$", - "location": "path", - "description": "The resource name of the role in one of the following formats:\n`roles/{ROLE_NAME}`\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", - "type": "string", - "required": true - } - } - } - } - } - } - }, - "projects": { - "resources": { - "roles": { - "methods": { - "list": { - "id": "iam.projects.roles.list", - "path": "v1/{+parent}/roles", - "description": "Lists the Roles defined on a resource.", - "response": { - "$ref": "ListRolesResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "showDeleted": { - "type": "boolean", - "location": "query", - "description": "Include Roles that have been deleted." - }, - "pageToken": { - "location": "query", - "description": "Optional pagination token returned in an earlier ListRolesResponse.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Optional limit on the number of roles to include in the response." - }, - "view": { - "location": "query", - "enum": [ - "BASIC", - "FULL" - ], - "description": "Optional view for the returned Role objects.", - "type": "string" - }, - "parent": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "The resource name of the parent resource in one of the following formats:\n`` (empty string) -- this refers to curated roles.\n`organizations/{ORGANIZATION_ID}`\n`projects/{PROJECT_ID}`" - } - }, - "flatPath": "v1/projects/{projectsId}/roles" - }, - "create": { - "id": "iam.projects.roles.create", - "path": "v1/{+parent}/roles", - "request": { - "$ref": "CreateRoleRequest" - }, - "description": "Creates a new Role.", - "response": { - "$ref": "Role" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "description": "The resource name of the parent resource in one of the following formats:\n`organizations/{ORGANIZATION_ID}`\n`projects/{PROJECT_ID}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/roles" - }, - "get": { - "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", - "id": "iam.projects.roles.get", - "path": "v1/{+name}", - "description": "Gets a Role definition.", - "response": { - "$ref": "Role" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The resource name of the role in one of the following formats:\n`roles/{ROLE_NAME}`\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/roles/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates a Role definition.", - "request": { - "$ref": "Role" - }, - "httpMethod": "PATCH", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Role" - }, - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/roles/[^/]+$", - "location": "path", - "description": "The resource name of the role in one of the following formats:\n`roles/{ROLE_NAME}`\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`" - }, - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "A mask describing which fields in the Role have changed.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", - "path": "v1/{+name}", - "id": "iam.projects.roles.patch" - }, - "undelete": { - "path": "v1/{+name}:undelete", - "id": "iam.projects.roles.undelete", - "description": "Undelete a Role, bringing it back in its previous state.", - "request": { - "$ref": "UndeleteRoleRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Role" - }, - "parameters": { - "name": { - "description": "The resource name of the role in one of the following formats:\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/roles/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/roles/{rolesId}:undelete" - }, - "delete": { - "response": { - "$ref": "Role" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "etag": { - "format": "byte", - "description": "Used to perform a consistent read-modify-write.", - "type": "string", - "location": "query" - }, - "name": { - "location": "path", - "description": "The resource name of the role in one of the following formats:\n`organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`\n`projects/{PROJECT_ID}/roles/{ROLE_NAME}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/roles/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", - "id": "iam.projects.roles.delete", - "path": "v1/{+name}", - "description": "Soft deletes a role. The role is suspended and cannot be used to create new\nIAM Policy Bindings.\nThe Role will not be included in `ListRoles()` unless `show_deleted` is set\nin the `ListRolesRequest`. The Role contains the deleted boolean set.\nExisting Bindings remains, but are inactive. The Role can be undeleted\nwithin 7 days. After 7 days the Role is deleted and all Bindings associated\nwith the role are removed." - } - } - }, - "serviceAccounts": { - "methods": { - "getIamPolicy": { - "description": "Returns the IAM access control policy for a\nServiceAccount.", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "resource": { - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "location": "path", - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:getIamPolicy", - "id": "iam.projects.serviceAccounts.getIamPolicy", - "path": "v1/{+resource}:getIamPolicy" - }, - "get": { - "response": { - "$ref": "ServiceAccount" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "location": "path", - "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", - "id": "iam.projects.serviceAccounts.get", - "path": "v1/{+name}", - "description": "Gets a ServiceAccount." - }, - "update": { - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", - "id": "iam.projects.serviceAccounts.update", - "path": "v1/{+name}", - "description": "Updates a ServiceAccount.\n\nCurrently, only the following fields are updatable:\n`display_name` .\nThe `etag` is mandatory.", - "request": { - "$ref": "ServiceAccount" - }, - "response": { - "$ref": "ServiceAccount" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PUT", - "parameters": { - "name": { - "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\n\nRequests using `-` as a wildcard for the project will infer the project\nfrom the `account` and the `account` value can be the `email` address or\nthe `unique_id` of the service account.\n\nIn responses the resource name will always be in the format\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "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.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:testIamPermissions", - "id": "iam.projects.serviceAccounts.testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "description": "Tests the specified permissions against the IAM access control policy\nfor a ServiceAccount." - }, - "delete": { - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", - "path": "v1/{+name}", - "id": "iam.projects.serviceAccounts.delete", - "description": "Deletes a ServiceAccount.", - "httpMethod": "DELETE", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "name": { - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "location": "path", - "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists ServiceAccounts for a project.", - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "response": { - "$ref": "ListServiceAccountsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "pageToken": { - "description": "Optional pagination token returned in an earlier\nListServiceAccountsResponse.next_page_token.", - "type": "string", - "location": "query" - }, - "name": { - "location": "path", - "description": "Required. The resource name of the project associated with the service\naccounts, such as `projects/my-project-123`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Optional limit on the number of service accounts to include in the\nresponse. Further accounts can subsequently be obtained by including the\nListServiceAccountsResponse.next_page_token\nin a subsequent request." - } - }, - "flatPath": "v1/projects/{projectsId}/serviceAccounts", - "id": "iam.projects.serviceAccounts.list", - "path": "v1/{+name}/serviceAccounts" - }, - "signBlob": { - "response": { - "$ref": "SignBlobResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signBlob", - "id": "iam.projects.serviceAccounts.signBlob", - "path": "v1/{+name}:signBlob", - "request": { - "$ref": "SignBlobRequest" - }, - "description": "Signs a blob using a service account's system-managed private key." - }, - "create": { - "response": { - "$ref": "ServiceAccount" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "Required. The resource name of the project associated with the service\naccounts, such as `projects/my-project-123`." - } - }, - "flatPath": "v1/projects/{projectsId}/serviceAccounts", - "id": "iam.projects.serviceAccounts.create", - "path": "v1/{+name}/serviceAccounts", - "request": { - "$ref": "CreateServiceAccountRequest" - }, - "description": "Creates a ServiceAccount\nand returns it." - }, - "setIamPolicy": { - "description": "Sets the IAM access control policy for a\nServiceAccount.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "id": "iam.projects.serviceAccounts.setIamPolicy" - }, - "signJwt": { - "request": { - "$ref": "SignJwtRequest" - }, - "description": "Signs a JWT using a service account's system-managed private key.\n\nIf no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM sets an\nan expiry time of one hour by default. If you request an expiry time of\nmore than one hour, the request will fail.", - "response": { - "$ref": "SignJwtResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signJwt", - "id": "iam.projects.serviceAccounts.signJwt", - "path": "v1/{+name}:signJwt" - } - }, - "resources": { - "keys": { - "methods": { - "get": { - "description": "Gets the ServiceAccountKey\nby key id.", - "response": { - "$ref": "ServiceAccountKey" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "publicKeyType": { - "description": "The output format of the public key requested.\nX509_PEM is the default output format.", - "type": "string", - "location": "query", - "enum": [ - "TYPE_NONE", - "TYPE_X509_PEM_FILE", - "TYPE_RAW_PUBLIC_KEY" - ] - }, - "name": { - "description": "The resource name of the service account key in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`.\n\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+/keys/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys/{keysId}", - "id": "iam.projects.serviceAccounts.keys.get", - "path": "v1/{+name}" - }, - "list": { - "description": "Lists ServiceAccountKeys.", - "response": { - "$ref": "ListServiceAccountKeysResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "location": "path", - "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\n\nUsing `-` as a wildcard for the project, will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", - "type": "string", - "required": true - }, - "keyTypes": { - "location": "query", - "enum": [ - "KEY_TYPE_UNSPECIFIED", - "USER_MANAGED", - "SYSTEM_MANAGED" - ], - "description": "Filters the types of keys the user wants to include in the list\nresponse. Duplicate key types are not allowed. If no key type\nis provided, all keys are returned.", - "type": "string", - "repeated": true - } - }, - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys", - "id": "iam.projects.serviceAccounts.keys.list", - "path": "v1/{+name}/keys" - }, - "create": { - "description": "Creates a ServiceAccountKey\nand returns it.", - "request": { - "$ref": "CreateServiceAccountKeyRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ServiceAccountKey" - }, - "parameters": { - "name": { - "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys", - "path": "v1/{+name}/keys", - "id": "iam.projects.serviceAccounts.keys.create" - }, - "delete": { - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+/keys/[^/]+$", - "location": "path", - "description": "The resource name of the service account key in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys/{keysId}", - "path": "v1/{+name}", - "id": "iam.projects.serviceAccounts.keys.delete", - "description": "Deletes a ServiceAccountKey." - } - } - } - } - } - } - } - }, - "parameters": { - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "key": { - "location": "query", - "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.", - "type": "string" - }, - "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.", - "type": "string", - "location": "query" - }, - "pp": { - "default": "true", - "type": "boolean", - "location": "query", - "description": "Pretty-print response." - }, - "bearer_token": { - "type": "string", - "location": "query", - "description": "OAuth bearer token." - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - } - }, - "version": "v1", - "baseUrl": "https://iam.googleapis.com/", - "description": "Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls.", - "kind": "discovery#restDescription", - "servicePath": "", - "basePath": "", - "id": "iam:v1", - "documentationLink": "https://cloud.google.com/iam/", - "revision": "20170726" + "protocol": "rest" } diff --git a/vendor/google.golang.org/api/iam/v1/iam-gen.go b/vendor/google.golang.org/api/iam/v1/iam-gen.go index b2443ac29..1090157f0 100644 --- a/vendor/google.golang.org/api/iam/v1/iam-gen.go +++ b/vendor/google.golang.org/api/iam/v1/iam-gen.go @@ -355,8 +355,6 @@ func (s *CreateRoleRequest) MarshalJSON() ([]byte, error) { // CreateServiceAccountKeyRequest: The service account key create // request. type CreateServiceAccountKeyRequest struct { - IncludePublicKeyData bool `json:"includePublicKeyData,omitempty"` - // KeyAlgorithm: Which type of key and algorithm to use for the key. // The default is currently a 2K RSA key. However this may change in // the @@ -381,22 +379,20 @@ type CreateServiceAccountKeyRequest struct { // "TYPE_GOOGLE_CREDENTIALS_FILE" - Google Credentials File format. PrivateKeyType string `json:"privateKeyType,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "IncludePublicKeyData") 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 is a list of field names (e.g. "KeyAlgorithm") 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. "IncludePublicKeyData") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "KeyAlgorithm") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } diff --git a/vendor/google.golang.org/api/identitytoolkit/v3/identitytoolkit-api.json b/vendor/google.golang.org/api/identitytoolkit/v3/identitytoolkit-api.json index 075042673..9a9d2620f 100644 --- a/vendor/google.golang.org/api/identitytoolkit/v3/identitytoolkit-api.json +++ b/vendor/google.golang.org/api/identitytoolkit/v3/identitytoolkit-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/lY4purhHKClSF7bHp4Xq20FjMmM\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/YDuUtEWk-s4RoFmU1uyfiL_piZ0\"", "discoveryVersion": "v1", "id": "identitytoolkit:v3", "name": "identitytoolkit", "canonicalName": "Identity Toolkit", "version": "v3", - "revision": "20170803", + "revision": "20170828", "title": "Google Identity Toolkit API", "description": "Help the third party sites to implement federated login.", "ownerDomain": "google.com", @@ -488,6 +488,40 @@ } } }, + "IdentitytoolkitRelyingpartySendVerificationCodeRequest": { + "id": "IdentitytoolkitRelyingpartySendVerificationCodeRequest", + "type": "object", + "description": "Request for Identitytoolkit-SendVerificationCode", + "properties": { + "iosReceipt": { + "type": "string", + "description": "Receipt of successful app token validation with APNS." + }, + "iosSecret": { + "type": "string", + "description": "Secret delivered to iOS app via APNS." + }, + "phoneNumber": { + "type": "string", + "description": "The phone number to send the verification code to in E.164 format." + }, + "recaptchaToken": { + "type": "string", + "description": "Recaptcha solution." + } + } + }, + "IdentitytoolkitRelyingpartySendVerificationCodeResponse": { + "id": "IdentitytoolkitRelyingpartySendVerificationCodeResponse", + "type": "object", + "description": "Response for Identitytoolkit-SendVerificationCode", + "properties": { + "sessionInfo": { + "type": "string", + "description": "Encrypted session information" + } + } + }, "IdentitytoolkitRelyingpartySetAccountInfoRequest": { "id": "IdentitytoolkitRelyingpartySetAccountInfoRequest", "type": "object", @@ -506,6 +540,10 @@ "description": "The timestamp when the account is created.", "format": "int64" }, + "customAttributes": { + "type": "string", + "description": "The custom attributes to be set in the user's id token." + }, "delegatedProjectNumber": { "type": "string", "description": "GCP project number of the requesting delegated app. Currently only intended for Firebase V1 migration.", @@ -755,11 +793,24 @@ "type": "boolean", "description": "Whether allow overwrite existing account when user local_id exists." }, + "blockSize": { + "type": "integer", + "format": "int32" + }, + "cpuMemCost": { + "type": "integer", + "description": "The following 4 fields are for standard scrypt algorithm.", + "format": "int32" + }, "delegatedProjectNumber": { "type": "string", "description": "GCP project number of the requesting delegated app. Currently only intended for Firebase V1 migration.", "format": "int64" }, + "dkLen": { + "type": "integer", + "format": "int32" + }, "hashAlgorithm": { "type": "string", "description": "The password hash algorithm." @@ -769,6 +820,10 @@ "description": "Memory cost for hash calculation. Used by scrypt similar algorithms.", "format": "int32" }, + "parallelization": { + "type": "integer", + "format": "int32" + }, "rounds": { "type": "integer", "description": "Rounds for hash calculation. Used by scrypt and similar algorithms.", @@ -921,6 +976,75 @@ } } }, + "IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest": { + "id": "IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest", + "type": "object", + "description": "Request for Identitytoolkit-VerifyPhoneNumber", + "properties": { + "code": { + "type": "string" + }, + "idToken": { + "type": "string" + }, + "operation": { + "type": "string" + }, + "phoneNumber": { + "type": "string" + }, + "sessionInfo": { + "type": "string", + "description": "The session info previously returned by IdentityToolkit-SendVerificationCode." + }, + "temporaryProof": { + "type": "string" + }, + "verificationProof": { + "type": "string" + } + } + }, + "IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse": { + "id": "IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse", + "type": "object", + "description": "Response for Identitytoolkit-VerifyPhoneNumber", + "properties": { + "expiresIn": { + "type": "string", + "format": "int64" + }, + "idToken": { + "type": "string" + }, + "isNewUser": { + "type": "boolean" + }, + "localId": { + "type": "string" + }, + "phoneNumber": { + "type": "string" + }, + "refreshToken": { + "type": "string" + }, + "temporaryProof": { + "type": "string" + }, + "temporaryProofExpiresIn": { + "type": "string", + "format": "int64" + }, + "verificationProof": { + "type": "string" + }, + "verificationProofExpiresIn": { + "type": "string", + "format": "int64" + } + } + }, "IdpConfig": { "id": "IdpConfig", "type": "object", @@ -1204,6 +1328,10 @@ "description": "User creation timestamp.", "format": "int64" }, + "customAttributes": { + "type": "string", + "description": "The custom attributes to be set in the user's id token." + }, "customAuth": { "type": "boolean", "description": "Whether the user is authenticated by the developer." @@ -1500,6 +1628,10 @@ "type": "string", "description": "The GITKit token for authenticated user." }, + "isNewUser": { + "type": "boolean", + "description": "True if it's a new user sign-in, false if it's a returning user." + }, "kind": { "type": "string", "description": "The fixed string \"identitytoolkit#VerifyCustomTokenResponse\".", @@ -1712,6 +1844,21 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "sendVerificationCode": { + "id": "identitytoolkit.relyingparty.sendVerificationCode", + "path": "sendVerificationCode", + "httpMethod": "POST", + "description": "Send SMS verification code.", + "request": { + "$ref": "IdentitytoolkitRelyingpartySendVerificationCodeRequest" + }, + "response": { + "$ref": "IdentitytoolkitRelyingpartySendVerificationCodeResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "setAccountInfo": { "id": "identitytoolkit.relyingparty.setAccountInfo", "path": "setAccountInfo", @@ -1832,6 +1979,21 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "verifyPhoneNumber": { + "id": "identitytoolkit.relyingparty.verifyPhoneNumber", + "path": "verifyPhoneNumber", + "httpMethod": "POST", + "description": "Verifies ownership of a phone number and creates/updates the user account accordingly.", + "request": { + "$ref": "IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest" + }, + "response": { + "$ref": "IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } } diff --git a/vendor/google.golang.org/api/identitytoolkit/v3/identitytoolkit-gen.go b/vendor/google.golang.org/api/identitytoolkit/v3/identitytoolkit-gen.go index 3804306dc..3ef58a5d2 100644 --- a/vendor/google.golang.org/api/identitytoolkit/v3/identitytoolkit-gen.go +++ b/vendor/google.golang.org/api/identitytoolkit/v3/identitytoolkit-gen.go @@ -685,6 +685,78 @@ func (s *IdentitytoolkitRelyingpartyResetPasswordRequest) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// IdentitytoolkitRelyingpartySendVerificationCodeRequest: Request for +// Identitytoolkit-SendVerificationCode +type IdentitytoolkitRelyingpartySendVerificationCodeRequest struct { + // IosReceipt: Receipt of successful app token validation with APNS. + IosReceipt string `json:"iosReceipt,omitempty"` + + // IosSecret: Secret delivered to iOS app via APNS. + IosSecret string `json:"iosSecret,omitempty"` + + // PhoneNumber: The phone number to send the verification code to in + // E.164 format. + PhoneNumber string `json:"phoneNumber,omitempty"` + + // RecaptchaToken: Recaptcha solution. + RecaptchaToken string `json:"recaptchaToken,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IosReceipt") 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. "IosReceipt") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *IdentitytoolkitRelyingpartySendVerificationCodeRequest) MarshalJSON() ([]byte, error) { + type noMethod IdentitytoolkitRelyingpartySendVerificationCodeRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// IdentitytoolkitRelyingpartySendVerificationCodeResponse: Response for +// Identitytoolkit-SendVerificationCode +type IdentitytoolkitRelyingpartySendVerificationCodeResponse struct { + // SessionInfo: Encrypted session information + SessionInfo string `json:"sessionInfo,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "SessionInfo") 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. "SessionInfo") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *IdentitytoolkitRelyingpartySendVerificationCodeResponse) MarshalJSON() ([]byte, error) { + type noMethod IdentitytoolkitRelyingpartySendVerificationCodeResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // IdentitytoolkitRelyingpartySetAccountInfoRequest: Request to set the // account information. type IdentitytoolkitRelyingpartySetAccountInfoRequest struct { @@ -697,6 +769,10 @@ type IdentitytoolkitRelyingpartySetAccountInfoRequest struct { // CreatedAt: The timestamp when the account is created. CreatedAt int64 `json:"createdAt,omitempty,string"` + // CustomAttributes: The custom attributes to be set in the user's id + // token. + CustomAttributes string `json:"customAttributes,omitempty"` + // DelegatedProjectNumber: GCP project number of the requesting // delegated app. Currently only intended for Firebase V1 migration. DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"` @@ -1013,10 +1089,17 @@ type IdentitytoolkitRelyingpartyUploadAccountRequest struct { // local_id exists. AllowOverwrite bool `json:"allowOverwrite,omitempty"` + BlockSize int64 `json:"blockSize,omitempty"` + + // CpuMemCost: The following 4 fields are for standard scrypt algorithm. + CpuMemCost int64 `json:"cpuMemCost,omitempty"` + // DelegatedProjectNumber: GCP project number of the requesting // delegated app. Currently only intended for Firebase V1 migration. DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"` + DkLen int64 `json:"dkLen,omitempty"` + // HashAlgorithm: The password hash algorithm. HashAlgorithm string `json:"hashAlgorithm,omitempty"` @@ -1024,6 +1107,8 @@ type IdentitytoolkitRelyingpartyUploadAccountRequest struct { // algorithms. MemoryCost int64 `json:"memoryCost,omitempty"` + Parallelization int64 `json:"parallelization,omitempty"` + // Rounds: Rounds for hash calculation. Used by scrypt and similar // algorithms. Rounds int64 `json:"rounds,omitempty"` @@ -1235,6 +1320,98 @@ func (s *IdentitytoolkitRelyingpartyVerifyPasswordRequest) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest: Request for +// Identitytoolkit-VerifyPhoneNumber +type IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest struct { + Code string `json:"code,omitempty"` + + IdToken string `json:"idToken,omitempty"` + + Operation string `json:"operation,omitempty"` + + PhoneNumber string `json:"phoneNumber,omitempty"` + + // SessionInfo: The session info previously returned by + // IdentityToolkit-SendVerificationCode. + SessionInfo string `json:"sessionInfo,omitempty"` + + TemporaryProof string `json:"temporaryProof,omitempty"` + + VerificationProof string `json:"verificationProof,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 *IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest) MarshalJSON() ([]byte, error) { + type noMethod IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse: Response for +// Identitytoolkit-VerifyPhoneNumber +type IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse struct { + ExpiresIn int64 `json:"expiresIn,omitempty,string"` + + IdToken string `json:"idToken,omitempty"` + + IsNewUser bool `json:"isNewUser,omitempty"` + + LocalId string `json:"localId,omitempty"` + + PhoneNumber string `json:"phoneNumber,omitempty"` + + RefreshToken string `json:"refreshToken,omitempty"` + + TemporaryProof string `json:"temporaryProof,omitempty"` + + TemporaryProofExpiresIn int64 `json:"temporaryProofExpiresIn,omitempty,string"` + + VerificationProof string `json:"verificationProof,omitempty"` + + VerificationProofExpiresIn int64 `json:"verificationProofExpiresIn,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ExpiresIn") 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. "ExpiresIn") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse) MarshalJSON() ([]byte, error) { + type noMethod IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // IdpConfig: Template for a single idp configuration. type IdpConfig struct { // ClientId: OAuth2 client ID. @@ -1628,6 +1805,10 @@ type UserInfo struct { // CreatedAt: User creation timestamp. CreatedAt int64 `json:"createdAt,omitempty,string"` + // CustomAttributes: The custom attributes to be set in the user's id + // token. + CustomAttributes string `json:"customAttributes,omitempty"` + // CustomAuth: Whether the user is authenticated by the developer. CustomAuth bool `json:"customAuth,omitempty"` @@ -1941,6 +2122,10 @@ type VerifyCustomTokenResponse struct { // IdToken: The GITKit token for authenticated user. IdToken string `json:"idToken,omitempty"` + // IsNewUser: True if it's a new user sign-in, false if it's a returning + // user. + IsNewUser bool `json:"isNewUser,omitempty"` + // Kind: The fixed string "identitytoolkit#VerifyCustomTokenResponse". Kind string `json:"kind,omitempty"` @@ -3141,6 +3326,126 @@ func (c *RelyingpartyResetPasswordCall) Do(opts ...googleapi.CallOption) (*Reset } +// method id "identitytoolkit.relyingparty.sendVerificationCode": + +type RelyingpartySendVerificationCodeCall struct { + s *Service + identitytoolkitrelyingpartysendverificationcoderequest *IdentitytoolkitRelyingpartySendVerificationCodeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SendVerificationCode: Send SMS verification code. +func (r *RelyingpartyService) SendVerificationCode(identitytoolkitrelyingpartysendverificationcoderequest *IdentitytoolkitRelyingpartySendVerificationCodeRequest) *RelyingpartySendVerificationCodeCall { + c := &RelyingpartySendVerificationCodeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.identitytoolkitrelyingpartysendverificationcoderequest = identitytoolkitrelyingpartysendverificationcoderequest + 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 *RelyingpartySendVerificationCodeCall) Fields(s ...googleapi.Field) *RelyingpartySendVerificationCodeCall { + 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 *RelyingpartySendVerificationCodeCall) Context(ctx context.Context) *RelyingpartySendVerificationCodeCall { + 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 *RelyingpartySendVerificationCodeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RelyingpartySendVerificationCodeCall) 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.identitytoolkitrelyingpartysendverificationcoderequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "sendVerificationCode") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "identitytoolkit.relyingparty.sendVerificationCode" call. +// Exactly one of +// *IdentitytoolkitRelyingpartySendVerificationCodeResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *IdentitytoolkitRelyingpartySendVerificationCodeResponse.ServerRespons +// e.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *RelyingpartySendVerificationCodeCall) Do(opts ...googleapi.CallOption) (*IdentitytoolkitRelyingpartySendVerificationCodeResponse, 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 := &IdentitytoolkitRelyingpartySendVerificationCodeResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Send SMS verification code.", + // "httpMethod": "POST", + // "id": "identitytoolkit.relyingparty.sendVerificationCode", + // "path": "sendVerificationCode", + // "request": { + // "$ref": "IdentitytoolkitRelyingpartySendVerificationCodeRequest" + // }, + // "response": { + // "$ref": "IdentitytoolkitRelyingpartySendVerificationCodeResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "identitytoolkit.relyingparty.setAccountInfo": type RelyingpartySetAccountInfoCall struct { @@ -4081,3 +4386,123 @@ func (c *RelyingpartyVerifyPasswordCall) Do(opts ...googleapi.CallOption) (*Veri // } } + +// method id "identitytoolkit.relyingparty.verifyPhoneNumber": + +type RelyingpartyVerifyPhoneNumberCall struct { + s *Service + identitytoolkitrelyingpartyverifyphonenumberrequest *IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// VerifyPhoneNumber: Verifies ownership of a phone number and +// creates/updates the user account accordingly. +func (r *RelyingpartyService) VerifyPhoneNumber(identitytoolkitrelyingpartyverifyphonenumberrequest *IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest) *RelyingpartyVerifyPhoneNumberCall { + c := &RelyingpartyVerifyPhoneNumberCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.identitytoolkitrelyingpartyverifyphonenumberrequest = identitytoolkitrelyingpartyverifyphonenumberrequest + 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 *RelyingpartyVerifyPhoneNumberCall) Fields(s ...googleapi.Field) *RelyingpartyVerifyPhoneNumberCall { + 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 *RelyingpartyVerifyPhoneNumberCall) Context(ctx context.Context) *RelyingpartyVerifyPhoneNumberCall { + 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 *RelyingpartyVerifyPhoneNumberCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RelyingpartyVerifyPhoneNumberCall) 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.identitytoolkitrelyingpartyverifyphonenumberrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "verifyPhoneNumber") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "identitytoolkit.relyingparty.verifyPhoneNumber" call. +// Exactly one of *IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse.ServerResponse.H +// eader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *RelyingpartyVerifyPhoneNumberCall) Do(opts ...googleapi.CallOption) (*IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse, 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 := &IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Verifies ownership of a phone number and creates/updates the user account accordingly.", + // "httpMethod": "POST", + // "id": "identitytoolkit.relyingparty.verifyPhoneNumber", + // "path": "verifyPhoneNumber", + // "request": { + // "$ref": "IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest" + // }, + // "response": { + // "$ref": "IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/vendor/google.golang.org/api/internal/creds.go b/vendor/google.golang.org/api/internal/creds.go index 21139b78c..b546b63b4 100644 --- a/vendor/google.golang.org/api/internal/creds.go +++ b/vendor/google.golang.org/api/internal/creds.go @@ -52,8 +52,7 @@ func credFileTokenSource(ctx context.Context, filename string, scope ...string) if ok { return &google.DefaultCredentials{ TokenSource: ts, - // TODO(jba): uncomment after https://go-review.googlesource.com/c/51111 is in. - // JSON: data, + JSON: data, }, nil } @@ -72,8 +71,7 @@ func credFileTokenSource(ctx context.Context, filename string, scope ...string) return &google.DefaultCredentials{ ProjectID: pid.ProjectID, TokenSource: cfg.TokenSource(ctx), - // TODO(jba): uncomment after https://go-review.googlesource.com/c/51111 is in. - // JSON: data, + JSON: data, }, nil } diff --git a/vendor/google.golang.org/api/kgsearch/v1/kgsearch-api.json b/vendor/google.golang.org/api/kgsearch/v1/kgsearch-api.json index b8c9ff17d..f54d19e26 100644 --- a/vendor/google.golang.org/api/kgsearch/v1/kgsearch-api.json +++ b/vendor/google.golang.org/api/kgsearch/v1/kgsearch-api.json @@ -1,36 +1,24 @@ { - "kind": "discovery#restDescription", - "description": "Searches the Google Knowledge Graph for entities.", - "servicePath": "", - "rootUrl": "https://kgsearch.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "kgsearch", - "batchPath": "batch", "id": "kgsearch:v1", "documentationLink": "https://developers.google.com/knowledge-graph/", "revision": "20170109", "title": "Knowledge Graph Search API", - "ownerName": "Google", "discoveryVersion": "v1", + "ownerName": "Google", "version_module": "True", "resources": { "entities": { "methods": { "search": { + "id": "kgsearch.entities.search", + "path": "v1/entities:search", "description": "Searches Knowledge Graph for entities that match the constraints.\nA list of matched entities will be returned in response, which will be in\nJSON-LD format and compatible with http://schema.org", "response": { "$ref": "SearchResponse" }, - "parameterOrder": [], "httpMethod": "GET", + "parameterOrder": [], "parameters": { - "limit": { - "location": "query", - "format": "int32", - "description": "Limits the number of entities to be returned.", - "type": "integer" - }, "prefix": { "location": "query", "description": "Enables prefix match against names and aliases of entities", @@ -42,15 +30,15 @@ "location": "query" }, "types": { - "type": "string", "repeated": true, "location": "query", - "description": "Restricts returned entities with these types, e.g. Person\n(as defined in http://schema.org/Person). If multiple types are specified,\nreturned entities will contain one or more of these types." + "description": "Restricts returned entities with these types, e.g. Person\n(as defined in http://schema.org/Person). If multiple types are specified,\nreturned entities will contain one or more of these types.", + "type": "string" }, "indent": { - "location": "query", "description": "Enables indenting of json results.", - "type": "boolean" + "type": "boolean", + "location": "query" }, "languages": { "repeated": true, @@ -59,15 +47,19 @@ "type": "string" }, "ids": { - "location": "query", "description": "The list of entity id to be used for search instead of query string.\nTo specify multiple ids in the HTTP request, repeat the parameter in the\nURL as in ...?ids=A&ids=B", "type": "string", - "repeated": true + "repeated": true, + "location": "query" + }, + "limit": { + "format": "int32", + "description": "Limits the number of entities to be returned.", + "type": "integer", + "location": "query" } }, - "flatPath": "v1/entities:search", - "id": "kgsearch.entities.search", - "path": "v1/entities:search" + "flatPath": "v1/entities:search" } } } @@ -79,9 +71,9 @@ "type": "string" }, "key": { - "type": "string", "location": "query", - "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." + "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.", + "type": "string" }, "quotaUser": { "location": "query", @@ -110,10 +102,10 @@ "location": "query" }, "prettyPrint": { + "location": "query", "description": "Returns response with indentations and line breaks.", "default": "true", - "type": "boolean", - "location": "query" + "type": "boolean" }, "uploadType": { "location": "query", @@ -144,7 +136,6 @@ "type": "string" }, "alt": { - "location": "query", "description": "Data format for response.", "default": "json", "enum": [ @@ -157,11 +148,13 @@ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" - ] + ], + "location": "query" } }, "schemas": { "SearchResponse": { + "id": "SearchResponse", "description": "Response message includes the context and a list of matching results\nwhich contain the detail of associated entities.", "type": "object", "properties": { @@ -180,8 +173,7 @@ "description": "The schema type of top-level JSON-LD object, e.g. ItemList.", "type": "any" } - }, - "id": "SearchResponse" + } } }, "protocol": "rest", @@ -190,5 +182,13 @@ "x16": "http://www.google.com/images/icons/product/search-16.gif" }, "version": "v1", - "baseUrl": "https://kgsearch.googleapis.com/" + "baseUrl": "https://kgsearch.googleapis.com/", + "servicePath": "", + "description": "Searches the Google Knowledge Graph for entities.", + "kind": "discovery#restDescription", + "rootUrl": "https://kgsearch.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "kgsearch", + "batchPath": "batch" } diff --git a/vendor/google.golang.org/api/language/v1/language-api.json b/vendor/google.golang.org/api/language/v1/language-api.json index b9e6c247e..a471af44d 100644 --- a/vendor/google.golang.org/api/language/v1/language-api.json +++ b/vendor/google.golang.org/api/language/v1/language-api.json @@ -1,14 +1,66 @@ { - "title": "Google Cloud Natural Language API", "ownerName": "Google", "resources": { "documents": { "methods": { - "annotateText": { - "description": "A convenience method that provides all the features that analyzeSentiment,\nanalyzeEntities, and analyzeSyntax provide in one call.", + "analyzeEntities": { + "path": "v1/documents:analyzeEntities", + "id": "language.documents.analyzeEntities", "request": { - "$ref": "AnnotateTextRequest" + "$ref": "AnalyzeEntitiesRequest" }, + "description": "Finds named entities (currently proper names and common nouns) in the text\nalong with entity types, salience, mentions for each entity, and\nother properties.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "AnalyzeEntitiesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-language", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1/documents:analyzeEntities" + }, + "analyzeSyntax": { + "description": "Analyzes the syntax of the text and provides sentence boundaries and\ntokenization along with part of speech tags, dependency trees, and other\nproperties.", + "request": { + "$ref": "AnalyzeSyntaxRequest" + }, + "response": { + "$ref": "AnalyzeSyntaxResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-language", + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/documents:analyzeSyntax", + "id": "language.documents.analyzeSyntax", + "path": "v1/documents:analyzeSyntax" + }, + "analyzeSentiment": { + "request": { + "$ref": "AnalyzeSentimentRequest" + }, + "description": "Analyzes the sentiment of the provided text.", + "response": { + "$ref": "AnalyzeSentimentResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-language", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1/documents:analyzeSentiment", + "id": "language.documents.analyzeSentiment", + "path": "v1/documents:analyzeSentiment" + }, + "annotateText": { "response": { "$ref": "AnnotateTextResponse" }, @@ -21,104 +73,39 @@ ], "flatPath": "v1/documents:annotateText", "id": "language.documents.annotateText", - "path": "v1/documents:annotateText" - }, - "analyzeEntities": { - "flatPath": "v1/documents:analyzeEntities", - "path": "v1/documents:analyzeEntities", - "id": "language.documents.analyzeEntities", - "description": "Finds named entities (currently proper names and common nouns) in the text\nalong with entity types, salience, mentions for each entity, and\nother properties.", + "path": "v1/documents:annotateText", + "description": "A convenience method that provides all the features that analyzeSentiment,\nanalyzeEntities, and analyzeSyntax provide in one call.", "request": { - "$ref": "AnalyzeEntitiesRequest" - }, - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "AnalyzeEntitiesResponse" - }, - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-language", - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "analyzeSyntax": { - "request": { - "$ref": "AnalyzeSyntaxRequest" - }, - "description": "Analyzes the syntax of the text and provides sentence boundaries and\ntokenization along with part of speech tags, dependency trees, and other\nproperties.", - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "AnalyzeSyntaxResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-language", - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {}, - "flatPath": "v1/documents:analyzeSyntax", - "path": "v1/documents:analyzeSyntax", - "id": "language.documents.analyzeSyntax" - }, - "analyzeSentiment": { - "response": { - "$ref": "AnalyzeSentimentResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-language", - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/documents:analyzeSentiment", - "id": "language.documents.analyzeSentiment", - "path": "v1/documents:analyzeSentiment", - "description": "Analyzes the sentiment of the provided text.", - "request": { - "$ref": "AnalyzeSentimentRequest" + "$ref": "AnnotateTextRequest" } + }, + "analyzeEntitySentiment": { + "request": { + "$ref": "AnalyzeEntitySentimentRequest" + }, + "description": "Finds entities, similar to AnalyzeEntities in the text and analyzes\nsentiment associated with each entity and its mentions.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "AnalyzeEntitySentimentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-language", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1/documents:analyzeEntitySentiment", + "path": "v1/documents:analyzeEntitySentiment", + "id": "language.documents.analyzeEntitySentiment" } } } }, "parameters": { - "access_token": { - "location": "query", - "description": "OAuth access token.", - "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.", - "type": "string", - "location": "query" - }, - "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.", - "type": "string", - "location": "query" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, "upload_protocol": { + "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" }, "prettyPrint": { "location": "query", @@ -136,6 +123,11 @@ "description": "Selector specifying which fields to include in a partial response.", "type": "string" }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, "$.xgafv": { "enumDescriptions": [ "v1 error format", @@ -149,11 +141,6 @@ "description": "V1 error format.", "type": "string" }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, "alt": { "enumDescriptions": [ "Responses with Content-Type of application/json", @@ -169,46 +156,150 @@ "proto" ], "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.", + "type": "string", + "location": "query" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" } }, "version": "v1", "baseUrl": "https://language.googleapis.com/", - "servicePath": "", - "description": "Provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, entity sentiment analysis, and text annotations.", "kind": "discovery#restDescription", + "description": "Provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, entity sentiment analysis, and text annotations.", + "servicePath": "", "basePath": "", - "id": "language:v1", + "revision": "20170911", "documentationLink": "https://cloud.google.com/natural-language/", - "revision": "20170726", + "id": "language:v1", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { - "AnalyzeEntitiesRequest": { - "description": "The entity analysis request message.", + "Features": { + "description": "All available features for sentiment, syntax, and semantic analysis.\nSetting each one to true will enable that specific analysis for the input.", "type": "object", "properties": { - "document": { - "description": "Input document.", - "$ref": "Document" + "extractEntities": { + "description": "Extract entities.", + "type": "boolean" }, - "encodingType": { - "description": "The encoding type used by the API to calculate offsets.", + "extractEntitySentiment": { + "description": "Extract entities and their associated sentiment.", + "type": "boolean" + }, + "extractDocumentSentiment": { + "description": "Extract document-level sentiment.", + "type": "boolean" + }, + "extractSyntax": { + "description": "Extract syntax information.", + "type": "boolean" + } + }, + "id": "Features" + }, + "EntityMention": { + "description": "Represents a mention for an entity in the text. Currently, proper noun\nmentions are supported.", + "type": "object", + "properties": { + "type": { + "description": "The type of the entity mention.", "type": "string", "enumDescriptions": [ - "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." + "Unknown", + "Proper name", + "Common noun (or noun compound)" ], "enum": [ - "NONE", - "UTF8", - "UTF16", - "UTF32" + "TYPE_UNKNOWN", + "PROPER", + "COMMON" + ] + }, + "text": { + "description": "The mention text.", + "$ref": "TextSpan" + }, + "sentiment": { + "description": "For calls to AnalyzeEntitySentiment or if\nAnnotateTextRequest.Features.extract_entity_sentiment is set to\ntrue, this field will contain the sentiment expressed for this mention of\nthe entity in the provided document.", + "$ref": "Sentiment" + } + }, + "id": "EntityMention" + }, + "Sentence": { + "id": "Sentence", + "description": "Represents a sentence in the input document.", + "type": "object", + "properties": { + "text": { + "$ref": "TextSpan", + "description": "The sentence text." + }, + "sentiment": { + "description": "For calls to AnalyzeSentiment or if\nAnnotateTextRequest.Features.extract_document_sentiment is set to\ntrue, this field will contain the sentiment for the sentence.", + "$ref": "Sentiment" + } + } + }, + "Document": { + "description": "################################################################ #\n\nRepresents the input to API methods.", + "type": "object", + "properties": { + "gcsContentUri": { + "description": "The Google Cloud Storage URI where the file content is located.\nThis URI must be of the form: gs://bucket_name/object_name. For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nNOTE: Cloud Storage object versioning is not supported.", + "type": "string" + }, + "language": { + "description": "The language of the document (if not specified, the language is\nautomatically detected). Both ISO and BCP-47 language codes are\naccepted.\u003cbr\u003e\n[Language Support](/natural-language/docs/languages)\nlists currently supported languages for each API method.\nIf the language (either specified by the caller or automatically detected)\nis not supported by the called API method, an `INVALID_ARGUMENT` error\nis returned.", + "type": "string" + }, + "content": { + "description": "The content of the input in string format.", + "type": "string" + }, + "type": { + "description": "Required. If the type is not set or is `TYPE_UNSPECIFIED`,\nreturns an `INVALID_ARGUMENT` error.", + "type": "string", + "enumDescriptions": [ + "The content type is not specified.", + "Plain text", + "HTML" + ], + "enum": [ + "TYPE_UNSPECIFIED", + "PLAIN_TEXT", + "HTML" ] } }, - "id": "AnalyzeEntitiesRequest" + "id": "Document" }, "Sentiment": { "description": "Represents the feeling associated with the entire text or entities in\nthe text.", @@ -227,13 +318,83 @@ }, "id": "Sentiment" }, + "AnalyzeEntitiesRequest": { + "description": "The entity analysis request message.", + "type": "object", + "properties": { + "encodingType": { + "enumDescriptions": [ + "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." + ], + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ], + "description": "The encoding type used by the API to calculate offsets.", + "type": "string" + }, + "document": { + "description": "Input document.", + "$ref": "Document" + } + }, + "id": "AnalyzeEntitiesRequest" + }, + "AnalyzeEntitySentimentResponse": { + "description": "The entity-level sentiment analysis response message.", + "type": "object", + "properties": { + "language": { + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", + "type": "string" + }, + "entities": { + "description": "The recognized entities in the input document with associated sentiments.", + "items": { + "$ref": "Entity" + }, + "type": "array" + } + }, + "id": "AnalyzeEntitySentimentResponse" + }, + "AnalyzeEntitySentimentRequest": { + "id": "AnalyzeEntitySentimentRequest", + "description": "The entity-level sentiment analysis request message.", + "type": "object", + "properties": { + "encodingType": { + "enumDescriptions": [ + "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." + ], + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ], + "description": "The encoding type used by the API to calculate offsets.", + "type": "string" + }, + "document": { + "description": "Input document.", + "$ref": "Document" + } + } + }, "PartOfSpeech": { "description": "Represents part of speech information for a token. Parts of speech\nare as defined in\nhttp://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf", "type": "object", "properties": { "form": { - "description": "The grammatical form.", - "type": "string", "enumDescriptions": [ "Form is not applicable in the analyzed language or is not predicted.", "Adnomial", @@ -261,9 +422,13 @@ "LONG", "ORDER", "SPECIFIC" - ] + ], + "description": "The grammatical form.", + "type": "string" }, "number": { + "description": "The grammatical number.", + "type": "string", "enumDescriptions": [ "Number is not applicable in the analyzed language or is not predicted.", "Singular", @@ -275,9 +440,7 @@ "SINGULAR", "PLURAL", "DUAL" - ], - "description": "The grammatical number.", - "type": "string" + ] }, "voice": { "description": "The grammatical voice.", @@ -296,8 +459,6 @@ ] }, "aspect": { - "description": "The grammatical aspect.", - "type": "string", "enumDescriptions": [ "Aspect is not applicable in the analyzed language or is not predicted.", "Perfective", @@ -309,7 +470,9 @@ "PERFECTIVE", "IMPERFECTIVE", "PROGRESSIVE" - ] + ], + "description": "The grammatical aspect.", + "type": "string" }, "mood": { "enumDescriptions": [ @@ -334,6 +497,8 @@ "type": "string" }, "tag": { + "description": "The part of speech tag.", + "type": "string", "enumDescriptions": [ "Unknown", "Adjective", @@ -365,13 +530,9 @@ "VERB", "X", "AFFIX" - ], - "description": "The part of speech tag.", - "type": "string" + ] }, "gender": { - "description": "The grammatical gender.", - "type": "string", "enumDescriptions": [ "Gender is not applicable in the analyzed language or is not predicted.", "Feminine", @@ -383,11 +544,11 @@ "FEMININE", "MASCULINE", "NEUTER" - ] + ], + "description": "The grammatical gender.", + "type": "string" }, "person": { - "description": "The grammatical person.", - "type": "string", "enumDescriptions": [ "Person is not applicable in the analyzed language or is not predicted.", "First", @@ -401,11 +562,11 @@ "SECOND", "THIRD", "REFLEXIVE_PERSON" - ] + ], + "description": "The grammatical person.", + "type": "string" }, "proper": { - "description": "The grammatical properness.", - "type": "string", "enumDescriptions": [ "Proper is not applicable in the analyzed language or is not predicted.", "Proper", @@ -415,11 +576,11 @@ "PROPER_UNKNOWN", "PROPER", "NOT_PROPER" - ] + ], + "description": "The grammatical properness.", + "type": "string" }, "case": { - "description": "The grammatical case.", - "type": "string", "enumDescriptions": [ "Case is not applicable in the analyzed language or is not predicted.", "Accusative", @@ -453,7 +614,9 @@ "REFLEXIVE_CASE", "RELATIVE_CASE", "VOCATIVE" - ] + ], + "description": "The grammatical case.", + "type": "string" }, "tense": { "description": "The grammatical tense.", @@ -478,6 +641,8 @@ ] }, "reciprocity": { + "description": "The grammatical reciprocity.", + "type": "string", "enumDescriptions": [ "Reciprocity is not applicable in the analyzed language or is not\npredicted.", "Reciprocal", @@ -487,21 +652,16 @@ "RECIPROCITY_UNKNOWN", "RECIPROCAL", "NON_RECIPROCAL" - ], - "description": "The grammatical reciprocity.", - "type": "string" + ] } }, "id": "PartOfSpeech" }, "AnalyzeSyntaxRequest": { + "id": "AnalyzeSyntaxRequest", "description": "The syntax analysis request message.", "type": "object", "properties": { - "document": { - "$ref": "Document", - "description": "Input document." - }, "encodingType": { "description": "The encoding type used by the API to calculate offsets.", "type": "string", @@ -517,11 +677,15 @@ "UTF16", "UTF32" ] + }, + "document": { + "$ref": "Document", + "description": "Input document." } - }, - "id": "AnalyzeSyntaxRequest" + } }, "AnalyzeSentimentResponse": { + "id": "AnalyzeSentimentResponse", "description": "The sentiment analysis response message.", "type": "object", "properties": { @@ -540,8 +704,7 @@ }, "type": "array" } - }, - "id": "AnalyzeSentimentResponse" + } }, "AnalyzeEntitiesResponse": { "description": "The entity analysis response message.", @@ -562,9 +725,14 @@ "id": "AnalyzeEntitiesResponse" }, "AnalyzeSyntaxResponse": { + "id": "AnalyzeSyntaxResponse", "description": "The syntax analysis response message.", "type": "object", "properties": { + "language": { + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", + "type": "string" + }, "sentences": { "description": "Sentences in the input document.", "items": { @@ -578,31 +746,20 @@ "$ref": "Token" }, "type": "array" - }, - "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", - "type": "string" } - }, - "id": "AnalyzeSyntaxResponse" + } }, "Entity": { "description": "Represents a phrase in the text that is a known entity, such as\na person, an organization, or location. The API associates information, such\nas salience and mentions, with entities.", "type": "object", "properties": { - "salience": { - "format": "float", - "description": "The salience score associated with the entity in the [0, 1.0] range.\n\nThe salience score for an entity provides information about the\nimportance or centrality of that entity to the entire document text.\nScores closer to 0 are less salient, while scores closer to 1.0 are highly\nsalient.", - "type": "number" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "description": "Metadata associated with the entity.\n\nCurrently, Wikipedia URLs and Knowledge Graph MIDs are provided, if\navailable. The associated keys are \"wikipedia_url\" and \"mid\", respectively.", - "type": "object" + "name": { + "description": "The representative name for the entity.", + "type": "string" }, "type": { + "description": "The entity type.", + "type": "string", "enumDescriptions": [ "Unknown", "Person", @@ -622,9 +779,23 @@ "WORK_OF_ART", "CONSUMER_GOOD", "OTHER" - ], - "description": "The entity type.", - "type": "string" + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata associated with the entity.\n\nCurrently, Wikipedia URLs and Knowledge Graph MIDs are provided, if\navailable. The associated keys are \"wikipedia_url\" and \"mid\", respectively.", + "type": "object" + }, + "salience": { + "format": "float", + "description": "The salience score associated with the entity in the [0, 1.0] range.\n\nThe salience score for an entity provides information about the\nimportance or centrality of that entity to the entire document text.\nScores closer to 0 are less salient, while scores closer to 1.0 are highly\nsalient.", + "type": "number" + }, + "sentiment": { + "$ref": "Sentiment", + "description": "For calls to AnalyzeEntitySentiment or if\nAnnotateTextRequest.Features.extract_entity_sentiment is set to\ntrue, this field will contain the aggregate sentiment expressed for this\nentity in the provided document." }, "mentions": { "description": "The mentions of this entity in the input document. The API currently\nsupports proper noun mentions.", @@ -632,26 +803,15 @@ "$ref": "EntityMention" }, "type": "array" - }, - "name": { - "description": "The representative name for the entity.", - "type": "string" } }, "id": "Entity" }, "AnnotateTextRequest": { + "id": "AnnotateTextRequest", "description": "The request message for the text annotation API, which can perform multiple\nanalysis types (sentiment, entities, and syntax) in one call.", "type": "object", "properties": { - "document": { - "description": "Input document.", - "$ref": "Document" - }, - "features": { - "description": "The enabled features.", - "$ref": "Features" - }, "encodingType": { "enumDescriptions": [ "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", @@ -667,18 +827,21 @@ ], "description": "The encoding type used by the API to calculate offsets.", "type": "string" + }, + "document": { + "description": "Input document.", + "$ref": "Document" + }, + "features": { + "$ref": "Features", + "description": "The enabled features." } - }, - "id": "AnnotateTextRequest" + } }, "AnnotateTextResponse": { "description": "The text annotations response message.", "type": "object", "properties": { - "documentSentiment": { - "description": "The overall sentiment for the document. Populated if the user enables\nAnnotateTextRequest.Features.extract_document_sentiment.", - "$ref": "Sentiment" - }, "language": { "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", "type": "string" @@ -703,21 +866,20 @@ "$ref": "Entity" }, "type": "array" + }, + "documentSentiment": { + "$ref": "Sentiment", + "description": "The overall sentiment for the document. Populated if the user enables\nAnnotateTextRequest.Features.extract_document_sentiment." } }, "id": "AnnotateTextResponse" }, "AnalyzeSentimentRequest": { + "id": "AnalyzeSentimentRequest", "description": "The sentiment analysis request message.", "type": "object", "properties": { - "document": { - "$ref": "Document", - "description": "Input document." - }, "encodingType": { - "description": "The encoding type used by the API to calculate sentence offsets.", - "type": "string", "enumDescriptions": [ "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", @@ -729,12 +891,18 @@ "UTF8", "UTF16", "UTF32" - ] + ], + "description": "The encoding type used by the API to calculate sentence offsets.", + "type": "string" + }, + "document": { + "$ref": "Document", + "description": "Input document." } - }, - "id": "AnalyzeSentimentRequest" + } }, "DependencyEdge": { + "id": "DependencyEdge", "description": "Represents dependency parse tree information for a token. (For more\ninformation on dependency labels, see\nhttp://www.aclweb.org/anthology/P13-2017", "type": "object", "properties": { @@ -816,7 +984,13 @@ "Nominalized clausal passive", "Compound of numeric modifier", "Copula", - "Dislocated relation (for fronted/topicalized elements)" + "Dislocated relation (for fronted/topicalized elements)", + "Aspect marker", + "Genitive modifier", + "Genitive object", + "Infinitival modifier", + "Measure", + "Nominal complement of a noun" ], "enum": [ "UNKNOWN", @@ -895,7 +1069,13 @@ "NOMCSUBJPASS", "NUMC", "COP", - "DISLOCATED" + "DISLOCATED", + "ASP", + "GMOD", + "GOBJ", + "INFMOD", + "MES", + "NCOMP" ], "description": "The parse label for the token.", "type": "string" @@ -905,8 +1085,30 @@ "description": "Represents the head of this token in the dependency tree.\nThis is the index of the token which has an arc going to this token.\nThe index is the position of the token in the array of tokens returned\nby the API method. If this token is a root token, then the\n`head_token_index` is its own index.", "type": "integer" } - }, - "id": "DependencyEdge" + } + }, + "Token": { + "id": "Token", + "description": "Represents the smallest syntactic building block of the text.", + "type": "object", + "properties": { + "dependencyEdge": { + "$ref": "DependencyEdge", + "description": "Dependency tree parse for this token." + }, + "text": { + "description": "The token text.", + "$ref": "TextSpan" + }, + "lemma": { + "description": "[Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.", + "type": "string" + }, + "partOfSpeech": { + "$ref": "PartOfSpeech", + "description": "Parts of speech tag for this token." + } + } }, "TextSpan": { "description": "Represents an output piece of text.", @@ -924,41 +1126,22 @@ }, "id": "TextSpan" }, - "Token": { - "description": "Represents the smallest syntactic building block of the text.", - "type": "object", - "properties": { - "partOfSpeech": { - "$ref": "PartOfSpeech", - "description": "Parts of speech tag for this token." - }, - "dependencyEdge": { - "$ref": "DependencyEdge", - "description": "Dependency tree parse for this token." - }, - "text": { - "description": "The token text.", - "$ref": "TextSpan" - }, - "lemma": { - "description": "[Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.", - "type": "string" - } - }, - "id": "Token" - }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, "details": { "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { - "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - } + }, + "type": "object" }, "type": "array" }, @@ -966,112 +1149,16 @@ "format": "int32", "description": "The status code, which should be an enum value of google.rpc.Code.", "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" } }, "id": "Status" - }, - "EntityMention": { - "description": "Represents a mention for an entity in the text. Currently, proper noun\nmentions are supported.", - "type": "object", - "properties": { - "type": { - "description": "The type of the entity mention.", - "type": "string", - "enumDescriptions": [ - "Unknown", - "Proper name", - "Common noun (or noun compound)" - ], - "enum": [ - "TYPE_UNKNOWN", - "PROPER", - "COMMON" - ] - }, - "text": { - "$ref": "TextSpan", - "description": "The mention text." - } - }, - "id": "EntityMention" - }, - "Features": { - "description": "All available features for sentiment, syntax, and semantic analysis.\nSetting each one to true will enable that specific analysis for the input.", - "type": "object", - "properties": { - "extractEntities": { - "description": "Extract entities.", - "type": "boolean" - }, - "extractDocumentSentiment": { - "description": "Extract document-level sentiment.", - "type": "boolean" - }, - "extractSyntax": { - "description": "Extract syntax information.", - "type": "boolean" - } - }, - "id": "Features" - }, - "Document": { - "description": "################################################################ #\n\nRepresents the input to API methods.", - "type": "object", - "properties": { - "language": { - "description": "The language of the document (if not specified, the language is\nautomatically detected). Both ISO and BCP-47 language codes are\naccepted.\u003cbr\u003e\n[Language Support](/natural-language/docs/languages)\nlists currently supported languages for each API method.\nIf the language (either specified by the caller or automatically detected)\nis not supported by the called API method, an `INVALID_ARGUMENT` error\nis returned.", - "type": "string" - }, - "content": { - "description": "The content of the input in string format.", - "type": "string" - }, - "type": { - "enumDescriptions": [ - "The content type is not specified.", - "Plain text", - "HTML" - ], - "enum": [ - "TYPE_UNSPECIFIED", - "PLAIN_TEXT", - "HTML" - ], - "description": "Required. If the type is not set or is `TYPE_UNSPECIFIED`,\nreturns an `INVALID_ARGUMENT` error.", - "type": "string" - }, - "gcsContentUri": { - "description": "The Google Cloud Storage URI where the file content is located.\nThis URI must be of the form: gs://bucket_name/object_name. For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nNOTE: Cloud Storage object versioning is not supported.", - "type": "string" - } - }, - "id": "Document" - }, - "Sentence": { - "description": "Represents a sentence in the input document.", - "type": "object", - "properties": { - "text": { - "description": "The sentence text.", - "$ref": "TextSpan" - }, - "sentiment": { - "description": "For calls to AnalyzeSentiment or if\nAnnotateTextRequest.Features.extract_document_sentiment is set to\ntrue, this field will contain the sentiment for the sentence.", - "$ref": "Sentiment" - } - }, - "id": "Sentence" } }, + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "protocol": "rest", "canonicalName": "Cloud Natural Language", "auth": { "oauth2": { @@ -1088,5 +1175,6 @@ "rootUrl": "https://language.googleapis.com/", "ownerDomain": "google.com", "name": "language", - "batchPath": "batch" + "batchPath": "batch", + "title": "Google Cloud Natural Language API" } diff --git a/vendor/google.golang.org/api/language/v1/language-gen.go b/vendor/google.golang.org/api/language/v1/language-gen.go index 30639f25b..21fafb2b4 100644 --- a/vendor/google.golang.org/api/language/v1/language-gen.go +++ b/vendor/google.golang.org/api/language/v1/language-gen.go @@ -178,6 +178,99 @@ func (s *AnalyzeEntitiesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AnalyzeEntitySentimentRequest: The entity-level sentiment analysis +// request message. +type AnalyzeEntitySentimentRequest struct { + // Document: Input document. + Document *Document `json:"document,omitempty"` + + // EncodingType: The encoding type used by the API to calculate offsets. + // + // Possible values: + // "NONE" - If `EncodingType` is not specified, encoding-dependent + // information (such as + // `begin_offset`) will be set at `-1`. + // "UTF8" - Encoding-dependent information (such as `begin_offset`) is + // calculated based + // on the UTF-8 encoding of the input. C++ and Go are examples of + // languages + // that use this encoding natively. + // "UTF16" - Encoding-dependent information (such as `begin_offset`) + // is calculated based + // on the UTF-16 encoding of the input. Java and Javascript are examples + // of + // languages that use this encoding natively. + // "UTF32" - Encoding-dependent information (such as `begin_offset`) + // is calculated based + // on the UTF-32 encoding of the input. Python is an example of a + // language + // that uses this encoding natively. + EncodingType string `json:"encodingType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Document") 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. "Document") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AnalyzeEntitySentimentRequest) MarshalJSON() ([]byte, error) { + type noMethod AnalyzeEntitySentimentRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AnalyzeEntitySentimentResponse: The entity-level sentiment analysis +// response message. +type AnalyzeEntitySentimentResponse struct { + // Entities: The recognized entities in the input document with + // associated sentiments. + Entities []*Entity `json:"entities,omitempty"` + + // Language: The language of the text, which will be the same as the + // language specified + // in the request or, if not specified, the automatically-detected + // language. + // See Document.language field for more details. + Language string `json:"language,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Entities") 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. "Entities") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AnalyzeEntitySentimentResponse) MarshalJSON() ([]byte, error) { + type noMethod AnalyzeEntitySentimentResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AnalyzeSentimentRequest: The sentiment analysis request message. type AnalyzeSentimentRequest struct { // Document: Input document. @@ -584,6 +677,12 @@ type DependencyEdge struct { // "COP" - Copula // "DISLOCATED" - Dislocated relation (for fronted/topicalized // elements) + // "ASP" - Aspect marker + // "GMOD" - Genitive modifier + // "GOBJ" - Genitive object + // "INFMOD" - Infinitival modifier + // "MES" - Measure + // "NCOMP" - Nominal complement of a noun Label string `json:"label,omitempty"` // ForceSendFields is a list of field names (e.g. "HeadTokenIndex") to @@ -709,6 +808,14 @@ type Entity struct { // salient. Salience float64 `json:"salience,omitempty"` + // Sentiment: For calls to AnalyzeEntitySentiment or + // if + // AnnotateTextRequest.Features.extract_entity_sentiment is set to + // true, this field will contain the aggregate sentiment expressed for + // this + // entity in the provided document. + Sentiment *Sentiment `json:"sentiment,omitempty"` + // Type: The entity type. // // Possible values: @@ -763,6 +870,14 @@ func (s *Entity) UnmarshalJSON(data []byte) error { // Currently, proper noun // mentions are supported. type EntityMention struct { + // Sentiment: For calls to AnalyzeEntitySentiment or + // if + // AnnotateTextRequest.Features.extract_entity_sentiment is set to + // true, this field will contain the sentiment expressed for this + // mention of + // the entity in the provided document. + Sentiment *Sentiment `json:"sentiment,omitempty"` + // Text: The mention text. Text *TextSpan `json:"text,omitempty"` @@ -774,7 +889,7 @@ type EntityMention struct { // "COMMON" - Common noun (or noun compound) Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Text") to + // ForceSendFields is a list of field names (e.g. "Sentiment") 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 @@ -782,8 +897,8 @@ type EntityMention struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Text") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Sentiment") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -808,6 +923,10 @@ type Features struct { // ExtractEntities: Extract entities. ExtractEntities bool `json:"extractEntities,omitempty"` + // ExtractEntitySentiment: Extract entities and their associated + // sentiment. + ExtractEntitySentiment bool `json:"extractEntitySentiment,omitempty"` + // ExtractSyntax: Extract syntax information. ExtractSyntax bool `json:"extractSyntax,omitempty"` @@ -1425,6 +1544,129 @@ func (c *DocumentsAnalyzeEntitiesCall) Do(opts ...googleapi.CallOption) (*Analyz } +// method id "language.documents.analyzeEntitySentiment": + +type DocumentsAnalyzeEntitySentimentCall struct { + s *Service + analyzeentitysentimentrequest *AnalyzeEntitySentimentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AnalyzeEntitySentiment: Finds entities, similar to AnalyzeEntities in +// the text and analyzes +// sentiment associated with each entity and its mentions. +func (r *DocumentsService) AnalyzeEntitySentiment(analyzeentitysentimentrequest *AnalyzeEntitySentimentRequest) *DocumentsAnalyzeEntitySentimentCall { + c := &DocumentsAnalyzeEntitySentimentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.analyzeentitysentimentrequest = analyzeentitysentimentrequest + 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 *DocumentsAnalyzeEntitySentimentCall) Fields(s ...googleapi.Field) *DocumentsAnalyzeEntitySentimentCall { + 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 *DocumentsAnalyzeEntitySentimentCall) Context(ctx context.Context) *DocumentsAnalyzeEntitySentimentCall { + 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 *DocumentsAnalyzeEntitySentimentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DocumentsAnalyzeEntitySentimentCall) 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.analyzeentitysentimentrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/documents:analyzeEntitySentiment") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "language.documents.analyzeEntitySentiment" call. +// Exactly one of *AnalyzeEntitySentimentResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *AnalyzeEntitySentimentResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *DocumentsAnalyzeEntitySentimentCall) Do(opts ...googleapi.CallOption) (*AnalyzeEntitySentimentResponse, 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 := &AnalyzeEntitySentimentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Finds entities, similar to AnalyzeEntities in the text and analyzes\nsentiment associated with each entity and its mentions.", + // "flatPath": "v1/documents:analyzeEntitySentiment", + // "httpMethod": "POST", + // "id": "language.documents.analyzeEntitySentiment", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1/documents:analyzeEntitySentiment", + // "request": { + // "$ref": "AnalyzeEntitySentimentRequest" + // }, + // "response": { + // "$ref": "AnalyzeEntitySentimentResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-language", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "language.documents.analyzeSentiment": type DocumentsAnalyzeSentimentCall struct { diff --git a/vendor/google.golang.org/api/language/v1beta1/language-api.json b/vendor/google.golang.org/api/language/v1beta1/language-api.json index 4891f39e5..585d8bf71 100644 --- a/vendor/google.golang.org/api/language/v1beta1/language-api.json +++ b/vendor/google.golang.org/api/language/v1beta1/language-api.json @@ -1,347 +1,76 @@ { - "kind": "discovery#restDescription", - "description": "Provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, entity sentiment analysis, and text annotations.", - "servicePath": "", - "basePath": "", - "id": "language:v1beta1", - "documentationLink": "https://cloud.google.com/natural-language/", - "revision": "20170726", - "discoveryVersion": "v1", - "version_module": "True", "schemas": { - "PartOfSpeech": { - "description": "Represents part of speech information for a token.", - "type": "object", - "properties": { - "voice": { - "enumDescriptions": [ - "Voice is not applicable in the analyzed language or is not predicted.", - "Active", - "Causative", - "Passive" - ], - "enum": [ - "VOICE_UNKNOWN", - "ACTIVE", - "CAUSATIVE", - "PASSIVE" - ], - "description": "The grammatical voice.", - "type": "string" - }, - "aspect": { - "description": "The grammatical aspect.", - "type": "string", - "enumDescriptions": [ - "Aspect is not applicable in the analyzed language or is not predicted.", - "Perfective", - "Imperfective", - "Progressive" - ], - "enum": [ - "ASPECT_UNKNOWN", - "PERFECTIVE", - "IMPERFECTIVE", - "PROGRESSIVE" - ] - }, - "mood": { - "description": "The grammatical mood.", - "type": "string", - "enumDescriptions": [ - "Mood is not applicable in the analyzed language or is not predicted.", - "Conditional", - "Imperative", - "Indicative", - "Interrogative", - "Jussive", - "Subjunctive" - ], - "enum": [ - "MOOD_UNKNOWN", - "CONDITIONAL_MOOD", - "IMPERATIVE", - "INDICATIVE", - "INTERROGATIVE", - "JUSSIVE", - "SUBJUNCTIVE" - ] - }, - "tag": { - "description": "The part of speech tag.", - "type": "string", - "enumDescriptions": [ - "Unknown", - "Adjective", - "Adposition (preposition and postposition)", - "Adverb", - "Conjunction", - "Determiner", - "Noun (common and proper)", - "Cardinal number", - "Pronoun", - "Particle or other function word", - "Punctuation", - "Verb (all tenses and modes)", - "Other: foreign words, typos, abbreviations", - "Affix" - ], - "enum": [ - "UNKNOWN", - "ADJ", - "ADP", - "ADV", - "CONJ", - "DET", - "NOUN", - "NUM", - "PRON", - "PRT", - "PUNCT", - "VERB", - "X", - "AFFIX" - ] - }, - "gender": { - "enumDescriptions": [ - "Gender is not applicable in the analyzed language or is not predicted.", - "Feminine", - "Masculine", - "Neuter" - ], - "enum": [ - "GENDER_UNKNOWN", - "FEMININE", - "MASCULINE", - "NEUTER" - ], - "description": "The grammatical gender.", - "type": "string" - }, - "person": { - "enumDescriptions": [ - "Person is not applicable in the analyzed language or is not predicted.", - "First", - "Second", - "Third", - "Reflexive" - ], - "enum": [ - "PERSON_UNKNOWN", - "FIRST", - "SECOND", - "THIRD", - "REFLEXIVE_PERSON" - ], - "description": "The grammatical person.", - "type": "string" - }, - "proper": { - "description": "The grammatical properness.", - "type": "string", - "enumDescriptions": [ - "Proper is not applicable in the analyzed language or is not predicted.", - "Proper", - "Not proper" - ], - "enum": [ - "PROPER_UNKNOWN", - "PROPER", - "NOT_PROPER" - ] - }, - "case": { - "description": "The grammatical case.", - "type": "string", - "enumDescriptions": [ - "Case is not applicable in the analyzed language or is not predicted.", - "Accusative", - "Adverbial", - "Complementive", - "Dative", - "Genitive", - "Instrumental", - "Locative", - "Nominative", - "Oblique", - "Partitive", - "Prepositional", - "Reflexive", - "Relative", - "Vocative" - ], - "enum": [ - "CASE_UNKNOWN", - "ACCUSATIVE", - "ADVERBIAL", - "COMPLEMENTIVE", - "DATIVE", - "GENITIVE", - "INSTRUMENTAL", - "LOCATIVE", - "NOMINATIVE", - "OBLIQUE", - "PARTITIVE", - "PREPOSITIONAL", - "REFLEXIVE_CASE", - "RELATIVE_CASE", - "VOCATIVE" - ] - }, - "tense": { - "description": "The grammatical tense.", - "type": "string", - "enumDescriptions": [ - "Tense is not applicable in the analyzed language or is not predicted.", - "Conditional", - "Future", - "Past", - "Present", - "Imperfect", - "Pluperfect" - ], - "enum": [ - "TENSE_UNKNOWN", - "CONDITIONAL_TENSE", - "FUTURE", - "PAST", - "PRESENT", - "IMPERFECT", - "PLUPERFECT" - ] - }, - "reciprocity": { - "description": "The grammatical reciprocity.", - "type": "string", - "enumDescriptions": [ - "Reciprocity is not applicable in the analyzed language or is not\npredicted.", - "Reciprocal", - "Non-reciprocal" - ], - "enum": [ - "RECIPROCITY_UNKNOWN", - "RECIPROCAL", - "NON_RECIPROCAL" - ] - }, - "form": { - "description": "The grammatical form.", - "type": "string", - "enumDescriptions": [ - "Form is not applicable in the analyzed language or is not predicted.", - "Adnomial", - "Auxiliary", - "Complementizer", - "Final ending", - "Gerund", - "Realis", - "Irrealis", - "Short form", - "Long form", - "Order form", - "Specific form" - ], - "enum": [ - "FORM_UNKNOWN", - "ADNOMIAL", - "AUXILIARY", - "COMPLEMENTIZER", - "FINAL_ENDING", - "GERUND", - "REALIS", - "IRREALIS", - "SHORT", - "LONG", - "ORDER", - "SPECIFIC" - ] - }, - "number": { - "description": "The grammatical number.", - "type": "string", - "enumDescriptions": [ - "Number is not applicable in the analyzed language or is not predicted.", - "Singular", - "Plural", - "Dual" - ], - "enum": [ - "NUMBER_UNKNOWN", - "SINGULAR", - "PLURAL", - "DUAL" - ] - } - }, - "id": "PartOfSpeech" - }, - "AnalyzeSyntaxRequest": { - "description": "The syntax analysis request message.", - "type": "object", - "properties": { - "encodingType": { - "enumDescriptions": [ - "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." - ], - "enum": [ - "NONE", - "UTF8", - "UTF16", - "UTF32" - ], - "description": "The encoding type used by the API to calculate offsets.", - "type": "string" - }, - "document": { - "$ref": "Document", - "description": "Input document." - } - }, - "id": "AnalyzeSyntaxRequest" - }, - "AnalyzeSentimentResponse": { - "description": "The sentiment analysis response message.", - "type": "object", - "properties": { - "sentences": { - "description": "The sentiment for all the sentences in the document.", - "items": { - "$ref": "Sentence" - }, - "type": "array" - }, - "documentSentiment": { - "description": "The overall sentiment of the input document.", - "$ref": "Sentiment" - }, - "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", - "type": "string" - } - }, - "id": "AnalyzeSentimentResponse" - }, "AnalyzeEntitiesResponse": { + "id": "AnalyzeEntitiesResponse", "description": "The entity analysis response message.", "type": "object", "properties": { + "language": { + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", + "type": "string" + }, "entities": { "description": "The recognized entities in the input document.", "items": { "$ref": "Entity" }, "type": "array" + } + } + }, + "Entity": { + "description": "Represents a phrase in the text that is a known entity, such as\na person, an organization, or location. The API associates information, such\nas salience and mentions, with entities.", + "type": "object", + "properties": { + "mentions": { + "description": "The mentions of this entity in the input document. The API currently\nsupports proper noun mentions.", + "items": { + "$ref": "EntityMention" + }, + "type": "array" }, - "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", - "type": "string" + "name": { + "type": "string", + "description": "The representative name for the entity." + }, + "salience": { + "format": "float", + "description": "The salience score associated with the entity in the [0, 1.0] range.\n\nThe salience score for an entity provides information about the\nimportance or centrality of that entity to the entire document text.\nScores closer to 0 are less salient, while scores closer to 1.0 are highly\nsalient.", + "type": "number" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata associated with the entity.\n\nCurrently, Wikipedia URLs and Knowledge Graph MIDs are provided, if\navailable. The associated keys are \"wikipedia_url\" and \"mid\", respectively.", + "type": "object" + }, + "type": { + "description": "The entity type.", + "type": "string", + "enumDescriptions": [ + "Unknown", + "Person", + "Location", + "Organization", + "Event", + "Work of art", + "Consumer goods", + "Other types" + ], + "enum": [ + "UNKNOWN", + "PERSON", + "LOCATION", + "ORGANIZATION", + "EVENT", + "WORK_OF_ART", + "CONSUMER_GOOD", + "OTHER" + ] } }, - "id": "AnalyzeEntitiesResponse" + "id": "Entity" }, "AnalyzeSyntaxResponse": { "description": "The syntax analysis response message.", @@ -362,79 +91,22 @@ "type": "array" }, "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", - "type": "string" + "type": "string", + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details." } }, "id": "AnalyzeSyntaxResponse" }, - "Entity": { - "description": "Represents a phrase in the text that is a known entity, such as\na person, an organization, or location. The API associates information, such\nas salience and mentions, with entities.", - "type": "object", - "properties": { - "mentions": { - "description": "The mentions of this entity in the input document. The API currently\nsupports proper noun mentions.", - "items": { - "$ref": "EntityMention" - }, - "type": "array" - }, - "name": { - "description": "The representative name for the entity.", - "type": "string" - }, - "salience": { - "format": "float", - "description": "The salience score associated with the entity in the [0, 1.0] range.\n\nThe salience score for an entity provides information about the\nimportance or centrality of that entity to the entire document text.\nScores closer to 0 are less salient, while scores closer to 1.0 are highly\nsalient.", - "type": "number" - }, - "metadata": { - "description": "Metadata associated with the entity.\n\nCurrently, Wikipedia URLs and Knowledge Graph MIDs are provided, if\navailable. The associated keys are \"wikipedia_url\" and \"mid\", respectively.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "type": { - "enumDescriptions": [ - "Unknown", - "Person", - "Location", - "Organization", - "Event", - "Work of art", - "Consumer goods", - "Other types" - ], - "enum": [ - "UNKNOWN", - "PERSON", - "LOCATION", - "ORGANIZATION", - "EVENT", - "WORK_OF_ART", - "CONSUMER_GOOD", - "OTHER" - ], - "description": "The entity type.", - "type": "string" - } - }, - "id": "Entity" - }, "AnnotateTextRequest": { - "description": "The request message for the text annotation API, which can perform multiple\nanalysis types (sentiment, entities, and syntax) in one call.", "type": "object", "properties": { - "document": { - "description": "Input document.", - "$ref": "Document" - }, - "features": { - "description": "The enabled features.", - "$ref": "Features" - }, "encodingType": { + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ], "description": "The encoding type used by the API to calculate offsets.", "type": "string", "enumDescriptions": [ @@ -442,21 +114,38 @@ "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." - ], - "enum": [ - "NONE", - "UTF8", - "UTF16", - "UTF32" ] + }, + "document": { + "description": "Input document.", + "$ref": "Document" + }, + "features": { + "$ref": "Features", + "description": "The enabled features." } }, - "id": "AnnotateTextRequest" + "id": "AnnotateTextRequest", + "description": "The request message for the text annotation API, which can perform multiple\nanalysis types (sentiment, entities, and syntax) in one call." }, "AnnotateTextResponse": { "description": "The text annotations response message.", "type": "object", "properties": { + "tokens": { + "description": "Tokens, along with their syntactic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_syntax.", + "items": { + "$ref": "Token" + }, + "type": "array" + }, + "entities": { + "description": "Entities, along with their semantic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_entities.", + "items": { + "$ref": "Entity" + }, + "type": "array" + }, "documentSentiment": { "$ref": "Sentiment", "description": "The overall sentiment for the document. Populated if the user enables\nAnnotateTextRequest.Features.extract_document_sentiment." @@ -471,32 +160,15 @@ "$ref": "Sentence" }, "type": "array" - }, - "tokens": { - "description": "Tokens, along with their syntactic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_syntax.", - "items": { - "$ref": "Token" - }, - "type": "array" - }, - "entities": { - "description": "Entities, along with their semantic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_entities.", - "items": { - "$ref": "Entity" - }, - "type": "array" } }, "id": "AnnotateTextResponse" }, "AnalyzeSentimentRequest": { + "id": "AnalyzeSentimentRequest", "description": "The sentiment analysis request message.", "type": "object", "properties": { - "document": { - "$ref": "Document", - "description": "Input document." - }, "encodingType": { "description": "The encoding type used by the API to calculate sentence offsets for the\nsentence sentiment.", "type": "string", @@ -512,17 +184,18 @@ "UTF16", "UTF32" ] + }, + "document": { + "description": "Input document.", + "$ref": "Document" } - }, - "id": "AnalyzeSentimentRequest" + } }, "DependencyEdge": { "description": "Represents dependency parse tree information for a token.", "type": "object", "properties": { "label": { - "description": "The parse label for the token.", - "type": "string", "enumDescriptions": [ "Unknown", "Abbreviation modifier", @@ -600,7 +273,13 @@ "Nominalized clausal passive", "Compound of numeric modifier", "Copula", - "Dislocated relation (for fronted/topicalized elements)" + "Dislocated relation (for fronted/topicalized elements)", + "Aspect marker", + "Genitive modifier", + "Genitive object", + "Infinitival modifier", + "Measure", + "Nominal complement of a noun" ], "enum": [ "UNKNOWN", @@ -679,8 +358,16 @@ "NOMCSUBJPASS", "NUMC", "COP", - "DISLOCATED" - ] + "DISLOCATED", + "ASP", + "GMOD", + "GOBJ", + "INFMOD", + "MES", + "NCOMP" + ], + "description": "The parse label for the token.", + "type": "string" }, "headTokenIndex": { "format": "int32", @@ -690,37 +377,14 @@ }, "id": "DependencyEdge" }, - "Token": { - "description": "Represents the smallest syntactic building block of the text.", - "type": "object", - "properties": { - "dependencyEdge": { - "description": "Dependency tree parse for this token.", - "$ref": "DependencyEdge" - }, - "text": { - "description": "The token text.", - "$ref": "TextSpan" - }, - "lemma": { - "description": "[Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.", - "type": "string" - }, - "partOfSpeech": { - "$ref": "PartOfSpeech", - "description": "Parts of speech tag for this token." - } - }, - "id": "Token" - }, "TextSpan": { "description": "Represents an output piece of text.", "type": "object", "properties": { "beginOffset": { + "type": "integer", "format": "int32", - "description": "The API calculates the beginning offset of the content in the original\ndocument according to the EncodingType specified in the API request.", - "type": "integer" + "description": "The API calculates the beginning offset of the content in the original\ndocument according to the EncodingType specified in the API request." }, "content": { "description": "The content of the output text.", @@ -729,6 +393,29 @@ }, "id": "TextSpan" }, + "Token": { + "description": "Represents the smallest syntactic building block of the text.", + "type": "object", + "properties": { + "lemma": { + "description": "[Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.", + "type": "string" + }, + "partOfSpeech": { + "description": "Parts of speech tag for this token.", + "$ref": "PartOfSpeech" + }, + "dependencyEdge": { + "$ref": "DependencyEdge", + "description": "Dependency tree parse for this token." + }, + "text": { + "$ref": "TextSpan", + "description": "The token text." + } + }, + "id": "Token" + }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", @@ -776,41 +463,58 @@ "id": "Features" }, "EntityMention": { - "description": "Represents a mention for an entity in the text. Currently, proper noun\nmentions are supported.", - "type": "object", "properties": { "type": { - "enumDescriptions": [ - "Unknown", - "Proper name", - "Common noun (or noun compound)" - ], "enum": [ "TYPE_UNKNOWN", "PROPER", "COMMON" ], "description": "The type of the entity mention.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Unknown", + "Proper name", + "Common noun (or noun compound)" + ] }, "text": { - "$ref": "TextSpan", - "description": "The mention text." + "description": "The mention text.", + "$ref": "TextSpan" } }, - "id": "EntityMention" + "id": "EntityMention", + "description": "Represents a mention for an entity in the text. Currently, proper noun\nmentions are supported.", + "type": "object" + }, + "Sentence": { + "description": "Represents a sentence in the input document.", + "type": "object", + "properties": { + "text": { + "$ref": "TextSpan", + "description": "The sentence text." + }, + "sentiment": { + "$ref": "Sentiment", + "description": "For calls to AnalyzeSentiment or if\nAnnotateTextRequest.Features.extract_document_sentiment is set to\ntrue, this field will contain the sentiment for the sentence." + } + }, + "id": "Sentence" }, "Document": { "description": "################################################################ #\n\nRepresents the input to API methods.", "type": "object", "properties": { + "language": { + "description": "The language of the document (if not specified, the language is\nautomatically detected). Both ISO and BCP-47 language codes are\naccepted.\u003cbr\u003e\n[Language Support](/natural-language/docs/languages)\nlists currently supported languages for each API method.\nIf the language (either specified by the caller or automatically detected)\nis not supported by the called API method, an `INVALID_ARGUMENT` error\nis returned.", + "type": "string" + }, "content": { "description": "The content of the input in string format.", "type": "string" }, "type": { - "description": "Required. If the type is not set or is `TYPE_UNSPECIFIED`,\nreturns an `INVALID_ARGUMENT` error.", - "type": "string", "enumDescriptions": [ "The content type is not specified.", "Plain text", @@ -820,34 +524,17 @@ "TYPE_UNSPECIFIED", "PLAIN_TEXT", "HTML" - ] + ], + "description": "Required. If the type is not set or is `TYPE_UNSPECIFIED`,\nreturns an `INVALID_ARGUMENT` error.", + "type": "string" }, "gcsContentUri": { - "description": "The Google Cloud Storage URI where the file content is located.\nThis URI must be of the form: gs://bucket_name/object_name. For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nNOTE: Cloud Storage object versioning is not supported.", - "type": "string" - }, - "language": { - "description": "The language of the document (if not specified, the language is\nautomatically detected). Both ISO and BCP-47 language codes are\naccepted.\u003cbr\u003e\n[Language Support](/natural-language/docs/languages)\nlists currently supported languages for each API method.\nIf the language (either specified by the caller or automatically detected)\nis not supported by the called API method, an `INVALID_ARGUMENT` error\nis returned.", - "type": "string" + "type": "string", + "description": "The Google Cloud Storage URI where the file content is located.\nThis URI must be of the form: gs://bucket_name/object_name. For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nNOTE: Cloud Storage object versioning is not supported." } }, "id": "Document" }, - "Sentence": { - "description": "Represents a sentence in the input document.", - "type": "object", - "properties": { - "text": { - "description": "The sentence text.", - "$ref": "TextSpan" - }, - "sentiment": { - "description": "For calls to AnalyzeSentiment or if\nAnnotateTextRequest.Features.extract_document_sentiment is set to\ntrue, this field will contain the sentiment for the sentence.", - "$ref": "Sentiment" - } - }, - "id": "Sentence" - }, "Sentiment": { "description": "Represents the feeling associated with the entire text or entities in\nthe text.", "type": "object", @@ -875,7 +562,300 @@ "type": "object", "properties": { "encodingType": { + "enumDescriptions": [ + "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." + ], + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ], "description": "The encoding type used by the API to calculate offsets.", + "type": "string" + }, + "document": { + "$ref": "Document", + "description": "Input document." + } + }, + "id": "AnalyzeEntitiesRequest" + }, + "PartOfSpeech": { + "description": "Represents part of speech information for a token.", + "type": "object", + "properties": { + "form": { + "description": "The grammatical form.", + "type": "string", + "enumDescriptions": [ + "Form is not applicable in the analyzed language or is not predicted.", + "Adnomial", + "Auxiliary", + "Complementizer", + "Final ending", + "Gerund", + "Realis", + "Irrealis", + "Short form", + "Long form", + "Order form", + "Specific form" + ], + "enum": [ + "FORM_UNKNOWN", + "ADNOMIAL", + "AUXILIARY", + "COMPLEMENTIZER", + "FINAL_ENDING", + "GERUND", + "REALIS", + "IRREALIS", + "SHORT", + "LONG", + "ORDER", + "SPECIFIC" + ] + }, + "number": { + "enum": [ + "NUMBER_UNKNOWN", + "SINGULAR", + "PLURAL", + "DUAL" + ], + "description": "The grammatical number.", + "type": "string", + "enumDescriptions": [ + "Number is not applicable in the analyzed language or is not predicted.", + "Singular", + "Plural", + "Dual" + ] + }, + "voice": { + "type": "string", + "enumDescriptions": [ + "Voice is not applicable in the analyzed language or is not predicted.", + "Active", + "Causative", + "Passive" + ], + "enum": [ + "VOICE_UNKNOWN", + "ACTIVE", + "CAUSATIVE", + "PASSIVE" + ], + "description": "The grammatical voice." + }, + "aspect": { + "description": "The grammatical aspect.", + "type": "string", + "enumDescriptions": [ + "Aspect is not applicable in the analyzed language or is not predicted.", + "Perfective", + "Imperfective", + "Progressive" + ], + "enum": [ + "ASPECT_UNKNOWN", + "PERFECTIVE", + "IMPERFECTIVE", + "PROGRESSIVE" + ] + }, + "mood": { + "description": "The grammatical mood.", + "type": "string", + "enumDescriptions": [ + "Mood is not applicable in the analyzed language or is not predicted.", + "Conditional", + "Imperative", + "Indicative", + "Interrogative", + "Jussive", + "Subjunctive" + ], + "enum": [ + "MOOD_UNKNOWN", + "CONDITIONAL_MOOD", + "IMPERATIVE", + "INDICATIVE", + "INTERROGATIVE", + "JUSSIVE", + "SUBJUNCTIVE" + ] + }, + "tag": { + "enum": [ + "UNKNOWN", + "ADJ", + "ADP", + "ADV", + "CONJ", + "DET", + "NOUN", + "NUM", + "PRON", + "PRT", + "PUNCT", + "VERB", + "X", + "AFFIX" + ], + "description": "The part of speech tag.", + "type": "string", + "enumDescriptions": [ + "Unknown", + "Adjective", + "Adposition (preposition and postposition)", + "Adverb", + "Conjunction", + "Determiner", + "Noun (common and proper)", + "Cardinal number", + "Pronoun", + "Particle or other function word", + "Punctuation", + "Verb (all tenses and modes)", + "Other: foreign words, typos, abbreviations", + "Affix" + ] + }, + "gender": { + "type": "string", + "enumDescriptions": [ + "Gender is not applicable in the analyzed language or is not predicted.", + "Feminine", + "Masculine", + "Neuter" + ], + "enum": [ + "GENDER_UNKNOWN", + "FEMININE", + "MASCULINE", + "NEUTER" + ], + "description": "The grammatical gender." + }, + "person": { + "description": "The grammatical person.", + "type": "string", + "enumDescriptions": [ + "Person is not applicable in the analyzed language or is not predicted.", + "First", + "Second", + "Third", + "Reflexive" + ], + "enum": [ + "PERSON_UNKNOWN", + "FIRST", + "SECOND", + "THIRD", + "REFLEXIVE_PERSON" + ] + }, + "proper": { + "enum": [ + "PROPER_UNKNOWN", + "PROPER", + "NOT_PROPER" + ], + "description": "The grammatical properness.", + "type": "string", + "enumDescriptions": [ + "Proper is not applicable in the analyzed language or is not predicted.", + "Proper", + "Not proper" + ] + }, + "case": { + "description": "The grammatical case.", + "type": "string", + "enumDescriptions": [ + "Case is not applicable in the analyzed language or is not predicted.", + "Accusative", + "Adverbial", + "Complementive", + "Dative", + "Genitive", + "Instrumental", + "Locative", + "Nominative", + "Oblique", + "Partitive", + "Prepositional", + "Reflexive", + "Relative", + "Vocative" + ], + "enum": [ + "CASE_UNKNOWN", + "ACCUSATIVE", + "ADVERBIAL", + "COMPLEMENTIVE", + "DATIVE", + "GENITIVE", + "INSTRUMENTAL", + "LOCATIVE", + "NOMINATIVE", + "OBLIQUE", + "PARTITIVE", + "PREPOSITIONAL", + "REFLEXIVE_CASE", + "RELATIVE_CASE", + "VOCATIVE" + ] + }, + "tense": { + "description": "The grammatical tense.", + "type": "string", + "enumDescriptions": [ + "Tense is not applicable in the analyzed language or is not predicted.", + "Conditional", + "Future", + "Past", + "Present", + "Imperfect", + "Pluperfect" + ], + "enum": [ + "TENSE_UNKNOWN", + "CONDITIONAL_TENSE", + "FUTURE", + "PAST", + "PRESENT", + "IMPERFECT", + "PLUPERFECT" + ] + }, + "reciprocity": { + "enumDescriptions": [ + "Reciprocity is not applicable in the analyzed language or is not\npredicted.", + "Reciprocal", + "Non-reciprocal" + ], + "enum": [ + "RECIPROCITY_UNKNOWN", + "RECIPROCAL", + "NON_RECIPROCAL" + ], + "description": "The grammatical reciprocity.", + "type": "string" + } + }, + "id": "PartOfSpeech" + }, + "AnalyzeSyntaxRequest": { + "description": "The syntax analysis request message.", + "type": "object", + "properties": { + "encodingType": { "type": "string", "enumDescriptions": [ "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", @@ -888,14 +868,37 @@ "UTF8", "UTF16", "UTF32" - ] + ], + "description": "The encoding type used by the API to calculate offsets." }, "document": { - "$ref": "Document", - "description": "Input document." + "description": "Input document.", + "$ref": "Document" } }, - "id": "AnalyzeEntitiesRequest" + "id": "AnalyzeSyntaxRequest" + }, + "AnalyzeSentimentResponse": { + "description": "The sentiment analysis response message.", + "type": "object", + "properties": { + "documentSentiment": { + "$ref": "Sentiment", + "description": "The overall sentiment of the input document." + }, + "language": { + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", + "type": "string" + }, + "sentences": { + "description": "The sentiment for all the sentences in the document.", + "items": { + "$ref": "Sentence" + }, + "type": "array" + } + }, + "id": "AnalyzeSentimentResponse" } }, "icons": { @@ -925,89 +928,95 @@ "resources": { "documents": { "methods": { - "analyzeSyntax": { - "description": "Analyzes the syntax of the text and provides sentence boundaries and\ntokenization along with part of speech tags, dependency trees, and other\nproperties.", - "request": { - "$ref": "AnalyzeSyntaxRequest" - }, - "response": { - "$ref": "AnalyzeSyntaxResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-language", - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/documents:analyzeSyntax", - "id": "language.documents.analyzeSyntax", - "path": "v1beta1/documents:analyzeSyntax" - }, "analyzeSentiment": { "request": { "$ref": "AnalyzeSentimentRequest" }, "description": "Analyzes the sentiment of the provided text.", - "httpMethod": "POST", - "parameterOrder": [], "response": { "$ref": "AnalyzeSentimentResponse" }, + "parameterOrder": [], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-language", "https://www.googleapis.com/auth/cloud-platform" ], "parameters": {}, "flatPath": "v1beta1/documents:analyzeSentiment", - "path": "v1beta1/documents:analyzeSentiment", - "id": "language.documents.analyzeSentiment" + "id": "language.documents.analyzeSentiment", + "path": "v1beta1/documents:analyzeSentiment" }, "annotateText": { - "description": "A convenience method that provides all the features that analyzeSentiment,\nanalyzeEntities, and analyzeSyntax provide in one call.", - "request": { - "$ref": "AnnotateTextRequest" - }, - "httpMethod": "POST", - "parameterOrder": [], "response": { "$ref": "AnnotateTextResponse" }, - "parameters": {}, + "parameterOrder": [], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-language", "https://www.googleapis.com/auth/cloud-platform" ], + "parameters": {}, "flatPath": "v1beta1/documents:annotateText", + "id": "language.documents.annotateText", "path": "v1beta1/documents:annotateText", - "id": "language.documents.annotateText" + "request": { + "$ref": "AnnotateTextRequest" + }, + "description": "A convenience method that provides all the features that analyzeSentiment,\nanalyzeEntities, and analyzeSyntax provide in one call." }, "analyzeEntities": { - "description": "Finds named entities (currently proper names and common nouns) in the text\nalong with entity types, salience, mentions for each entity, and\nother properties.", - "request": { - "$ref": "AnalyzeEntitiesRequest" - }, "httpMethod": "POST", "parameterOrder": [], "response": { "$ref": "AnalyzeEntitiesResponse" }, - "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/cloud-language", "https://www.googleapis.com/auth/cloud-platform" ], + "parameters": {}, "flatPath": "v1beta1/documents:analyzeEntities", "path": "v1beta1/documents:analyzeEntities", - "id": "language.documents.analyzeEntities" + "id": "language.documents.analyzeEntities", + "request": { + "$ref": "AnalyzeEntitiesRequest" + }, + "description": "Finds named entities (currently proper names and common nouns) in the text\nalong with entity types, salience, mentions for each entity, and\nother properties." + }, + "analyzeSyntax": { + "response": { + "$ref": "AnalyzeSyntaxResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-language", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1beta1/documents:analyzeSyntax", + "id": "language.documents.analyzeSyntax", + "path": "v1beta1/documents:analyzeSyntax", + "request": { + "$ref": "AnalyzeSyntaxRequest" + }, + "description": "Analyzes the syntax of the text and provides sentence boundaries and\ntokenization along with part of speech tags, dependency trees, and other\nproperties." } } } }, "parameters": { - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", "location": "query" }, "oauth_token": { @@ -1015,10 +1024,15 @@ "description": "OAuth 2.0 token for the current user.", "type": "string" }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, "upload_protocol": { + "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" }, "prettyPrint": { "location": "query", @@ -1026,15 +1040,20 @@ "default": "true", "type": "boolean" }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, "fields": { "location": "query", "description": "Selector specifying which fields to include in a partial response.", "type": "string" }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" }, "$.xgafv": { "enumDescriptions": [ @@ -1049,12 +1068,9 @@ "description": "V1 error format.", "type": "string" }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, "alt": { + "description": "Data format for response.", + "default": "json", "enum": [ "json", "media", @@ -1066,32 +1082,28 @@ "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], - "location": "query", - "description": "Data format for response.", - "default": "json" - }, - "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.", - "type": "string", "location": "query" }, "access_token": { - "location": "query", "description": "OAuth access token.", - "type": "string" + "type": "string", + "location": "query" }, - "quotaUser": { + "key": { "location": "query", - "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.", + "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.", "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" } }, "version": "v1beta1", - "baseUrl": "https://language.googleapis.com/" + "baseUrl": "https://language.googleapis.com/", + "description": "Provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, entity sentiment analysis, and text annotations.", + "kind": "discovery#restDescription", + "servicePath": "", + "basePath": "", + "id": "language:v1beta1", + "documentationLink": "https://cloud.google.com/natural-language/", + "revision": "20170911", + "discoveryVersion": "v1", + "version_module": true } diff --git a/vendor/google.golang.org/api/language/v1beta1/language-gen.go b/vendor/google.golang.org/api/language/v1beta1/language-gen.go index 457c87837..50acf6193 100644 --- a/vendor/google.golang.org/api/language/v1beta1/language-gen.go +++ b/vendor/google.golang.org/api/language/v1beta1/language-gen.go @@ -582,6 +582,12 @@ type DependencyEdge struct { // "COP" - Copula // "DISLOCATED" - Dislocated relation (for fronted/topicalized // elements) + // "ASP" - Aspect marker + // "GMOD" - Genitive modifier + // "GOBJ" - Genitive object + // "INFMOD" - Infinitival modifier + // "MES" - Measure + // "NCOMP" - Nominal complement of a noun Label string `json:"label,omitempty"` // ForceSendFields is a list of field names (e.g. "HeadTokenIndex") to diff --git a/vendor/google.golang.org/api/language/v1beta2/language-api.json b/vendor/google.golang.org/api/language/v1beta2/language-api.json index 8664cd664..49e456d49 100644 --- a/vendor/google.golang.org/api/language/v1beta2/language-api.json +++ b/vendor/google.golang.org/api/language/v1beta2/language-api.json @@ -1,4 +1,23 @@ { + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "protocol": "rest", + "canonicalName": "Cloud Natural Language", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-language": { + "description": "Apply machine learning models to reveal the structure and meaning of text" + } + } + } + }, + "rootUrl": "https://language.googleapis.com/", "ownerDomain": "google.com", "name": "language", "batchPath": "batch", @@ -7,53 +26,53 @@ "resources": { "documents": { "methods": { - "analyzeSentiment": { - "description": "Analyzes the sentiment of the provided text.", - "request": { - "$ref": "AnalyzeSentimentRequest" - }, - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "AnalyzeSentimentResponse" - }, - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-language", - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/documents:analyzeSentiment", - "path": "v1beta2/documents:analyzeSentiment", - "id": "language.documents.analyzeSentiment" - }, "annotateText": { - "request": { - "$ref": "AnnotateTextRequest" - }, - "description": "A convenience method that provides all syntax, sentiment, entity, and\nclassification features in one call.", "response": { "$ref": "AnnotateTextResponse" }, "parameterOrder": [], "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-language", + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/documents:annotateText", + "id": "language.documents.annotateText", + "path": "v1beta2/documents:annotateText", + "description": "A convenience method that provides all syntax, sentiment, entity, and\nclassification features in one call.", + "request": { + "$ref": "AnnotateTextRequest" + } + }, + "classifyText": { + "request": { + "$ref": "ClassifyTextRequest" + }, + "description": "Classifies a document into categories.", + "response": { + "$ref": "ClassifyTextResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-language", "https://www.googleapis.com/auth/cloud-platform" ], "parameters": {}, - "flatPath": "v1beta2/documents:annotateText", - "id": "language.documents.annotateText", - "path": "v1beta2/documents:annotateText" + "flatPath": "v1beta2/documents:classifyText", + "id": "language.documents.classifyText", + "path": "v1beta2/documents:classifyText" }, - "analyzeEntitySentiment": { - "id": "language.documents.analyzeEntitySentiment", - "path": "v1beta2/documents:analyzeEntitySentiment", - "description": "Finds entities, similar to AnalyzeEntities in the text and analyzes\nsentiment associated with each entity and its mentions.", + "analyzeSentiment": { + "id": "language.documents.analyzeSentiment", + "path": "v1beta2/documents:analyzeSentiment", + "description": "Analyzes the sentiment of the provided text.", "request": { - "$ref": "AnalyzeEntitySentimentRequest" + "$ref": "AnalyzeSentimentRequest" }, "response": { - "$ref": "AnalyzeEntitySentimentResponse" + "$ref": "AnalyzeSentimentResponse" }, "parameterOrder": [], "httpMethod": "POST", @@ -62,26 +81,45 @@ "https://www.googleapis.com/auth/cloud-language", "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1beta2/documents:analyzeEntitySentiment" + "flatPath": "v1beta2/documents:analyzeSentiment" }, - "analyzeEntities": { - "parameters": {}, + "analyzeEntitySentiment": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "AnalyzeEntitySentimentResponse" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-language", "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1beta2/documents:analyzeEntities", - "path": "v1beta2/documents:analyzeEntities", + "parameters": {}, + "flatPath": "v1beta2/documents:analyzeEntitySentiment", + "path": "v1beta2/documents:analyzeEntitySentiment", + "id": "language.documents.analyzeEntitySentiment", + "request": { + "$ref": "AnalyzeEntitySentimentRequest" + }, + "description": "Finds entities, similar to AnalyzeEntities in the text and analyzes\nsentiment associated with each entity and its mentions." + }, + "analyzeEntities": { "id": "language.documents.analyzeEntities", + "path": "v1beta2/documents:analyzeEntities", "description": "Finds named entities (currently proper names and common nouns) in the text\nalong with entity types, salience, mentions for each entity, and\nother properties.", "request": { "$ref": "AnalyzeEntitiesRequest" }, - "httpMethod": "POST", - "parameterOrder": [], "response": { "$ref": "AnalyzeEntitiesResponse" - } + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-language", + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/documents:analyzeEntities" }, "analyzeSyntax": { "response": { @@ -89,27 +127,27 @@ }, "parameterOrder": [], "httpMethod": "POST", - "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/cloud-language", "https://www.googleapis.com/auth/cloud-platform" ], + "parameters": {}, "flatPath": "v1beta2/documents:analyzeSyntax", "id": "language.documents.analyzeSyntax", "path": "v1beta2/documents:analyzeSyntax", - "description": "Analyzes the syntax of the text and provides sentence boundaries and\ntokenization along with part of speech tags, dependency trees, and other\nproperties.", "request": { "$ref": "AnalyzeSyntaxRequest" - } + }, + "description": "Analyzes the syntax of the text and provides sentence boundaries and\ntokenization along with part of speech tags, dependency trees, and other\nproperties." } } } }, "parameters": { "upload_protocol": { + "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" }, "prettyPrint": { "location": "query", @@ -117,16 +155,16 @@ "default": "true", "type": "boolean" }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, "fields": { "location": "query", "description": "Selector specifying which fields to include in a partial response.", "type": "string" }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, "$.xgafv": { "enumDescriptions": [ "v1 error format", @@ -141,589 +179,80 @@ "type": "string" }, "callback": { - "description": "JSONP", "type": "string", - "location": "query" + "location": "query", + "description": "JSONP" }, "alt": { - "type": "string", - "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", "description": "Data format for response.", "default": "json", "enum": [ "json", "media", "proto" - ] - }, - "access_token": { - "description": "OAuth access token.", + ], "type": "string", + "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" }, "key": { + "location": "query", "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.", - "type": "string", - "location": "query" - }, - "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.", - "type": "string", - "location": "query" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", "type": "string" }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "default": "true", + "type": "boolean", + "location": "query", + "description": "Pretty-print response." + }, + "bearer_token": { + "description": "OAuth bearer token.", "type": "string", "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" } }, "version": "v1beta2", "baseUrl": "https://language.googleapis.com/", - "servicePath": "", - "kind": "discovery#restDescription", "description": "Provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, entity sentiment analysis, and text annotations.", + "kind": "discovery#restDescription", + "servicePath": "", "basePath": "", - "revision": "20170726", - "documentationLink": "https://cloud.google.com/natural-language/", "id": "language:v1beta2", + "revision": "20170911", + "documentationLink": "https://cloud.google.com/natural-language/", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { - "PartOfSpeech": { - "description": "Represents part of speech information for a token.", - "type": "object", - "properties": { - "mood": { - "enumDescriptions": [ - "Mood is not applicable in the analyzed language or is not predicted.", - "Conditional", - "Imperative", - "Indicative", - "Interrogative", - "Jussive", - "Subjunctive" - ], - "enum": [ - "MOOD_UNKNOWN", - "CONDITIONAL_MOOD", - "IMPERATIVE", - "INDICATIVE", - "INTERROGATIVE", - "JUSSIVE", - "SUBJUNCTIVE" - ], - "description": "The grammatical mood.", - "type": "string" - }, - "tag": { - "description": "The part of speech tag.", - "type": "string", - "enumDescriptions": [ - "Unknown", - "Adjective", - "Adposition (preposition and postposition)", - "Adverb", - "Conjunction", - "Determiner", - "Noun (common and proper)", - "Cardinal number", - "Pronoun", - "Particle or other function word", - "Punctuation", - "Verb (all tenses and modes)", - "Other: foreign words, typos, abbreviations", - "Affix" - ], - "enum": [ - "UNKNOWN", - "ADJ", - "ADP", - "ADV", - "CONJ", - "DET", - "NOUN", - "NUM", - "PRON", - "PRT", - "PUNCT", - "VERB", - "X", - "AFFIX" - ] - }, - "gender": { - "enumDescriptions": [ - "Gender is not applicable in the analyzed language or is not predicted.", - "Feminine", - "Masculine", - "Neuter" - ], - "enum": [ - "GENDER_UNKNOWN", - "FEMININE", - "MASCULINE", - "NEUTER" - ], - "description": "The grammatical gender.", - "type": "string" - }, - "person": { - "enumDescriptions": [ - "Person is not applicable in the analyzed language or is not predicted.", - "First", - "Second", - "Third", - "Reflexive" - ], - "enum": [ - "PERSON_UNKNOWN", - "FIRST", - "SECOND", - "THIRD", - "REFLEXIVE_PERSON" - ], - "description": "The grammatical person.", - "type": "string" - }, - "proper": { - "enumDescriptions": [ - "Proper is not applicable in the analyzed language or is not predicted.", - "Proper", - "Not proper" - ], - "enum": [ - "PROPER_UNKNOWN", - "PROPER", - "NOT_PROPER" - ], - "description": "The grammatical properness.", - "type": "string" - }, - "case": { - "description": "The grammatical case.", - "type": "string", - "enumDescriptions": [ - "Case is not applicable in the analyzed language or is not predicted.", - "Accusative", - "Adverbial", - "Complementive", - "Dative", - "Genitive", - "Instrumental", - "Locative", - "Nominative", - "Oblique", - "Partitive", - "Prepositional", - "Reflexive", - "Relative", - "Vocative" - ], - "enum": [ - "CASE_UNKNOWN", - "ACCUSATIVE", - "ADVERBIAL", - "COMPLEMENTIVE", - "DATIVE", - "GENITIVE", - "INSTRUMENTAL", - "LOCATIVE", - "NOMINATIVE", - "OBLIQUE", - "PARTITIVE", - "PREPOSITIONAL", - "REFLEXIVE_CASE", - "RELATIVE_CASE", - "VOCATIVE" - ] - }, - "tense": { - "enumDescriptions": [ - "Tense is not applicable in the analyzed language or is not predicted.", - "Conditional", - "Future", - "Past", - "Present", - "Imperfect", - "Pluperfect" - ], - "enum": [ - "TENSE_UNKNOWN", - "CONDITIONAL_TENSE", - "FUTURE", - "PAST", - "PRESENT", - "IMPERFECT", - "PLUPERFECT" - ], - "description": "The grammatical tense.", - "type": "string" - }, - "reciprocity": { - "enumDescriptions": [ - "Reciprocity is not applicable in the analyzed language or is not\npredicted.", - "Reciprocal", - "Non-reciprocal" - ], - "enum": [ - "RECIPROCITY_UNKNOWN", - "RECIPROCAL", - "NON_RECIPROCAL" - ], - "description": "The grammatical reciprocity.", - "type": "string" - }, - "form": { - "description": "The grammatical form.", - "type": "string", - "enumDescriptions": [ - "Form is not applicable in the analyzed language or is not predicted.", - "Adnomial", - "Auxiliary", - "Complementizer", - "Final ending", - "Gerund", - "Realis", - "Irrealis", - "Short form", - "Long form", - "Order form", - "Specific form" - ], - "enum": [ - "FORM_UNKNOWN", - "ADNOMIAL", - "AUXILIARY", - "COMPLEMENTIZER", - "FINAL_ENDING", - "GERUND", - "REALIS", - "IRREALIS", - "SHORT", - "LONG", - "ORDER", - "SPECIFIC" - ] - }, - "number": { - "description": "The grammatical number.", - "type": "string", - "enumDescriptions": [ - "Number is not applicable in the analyzed language or is not predicted.", - "Singular", - "Plural", - "Dual" - ], - "enum": [ - "NUMBER_UNKNOWN", - "SINGULAR", - "PLURAL", - "DUAL" - ] - }, - "voice": { - "enumDescriptions": [ - "Voice is not applicable in the analyzed language or is not predicted.", - "Active", - "Causative", - "Passive" - ], - "enum": [ - "VOICE_UNKNOWN", - "ACTIVE", - "CAUSATIVE", - "PASSIVE" - ], - "description": "The grammatical voice.", - "type": "string" - }, - "aspect": { - "description": "The grammatical aspect.", - "type": "string", - "enumDescriptions": [ - "Aspect is not applicable in the analyzed language or is not predicted.", - "Perfective", - "Imperfective", - "Progressive" - ], - "enum": [ - "ASPECT_UNKNOWN", - "PERFECTIVE", - "IMPERFECTIVE", - "PROGRESSIVE" - ] - } - }, - "id": "PartOfSpeech" - }, - "AnalyzeSyntaxRequest": { - "id": "AnalyzeSyntaxRequest", - "description": "The syntax analysis request message.", - "type": "object", - "properties": { - "encodingType": { - "description": "The encoding type used by the API to calculate offsets.", - "type": "string", - "enumDescriptions": [ - "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." - ], - "enum": [ - "NONE", - "UTF8", - "UTF16", - "UTF32" - ] - }, - "document": { - "description": "Input document.", - "$ref": "Document" - } - } - }, - "AnalyzeSentimentResponse": { - "description": "The sentiment analysis response message.", - "type": "object", - "properties": { - "documentSentiment": { - "$ref": "Sentiment", - "description": "The overall sentiment of the input document." - }, - "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", - "type": "string" - }, - "sentences": { - "description": "The sentiment for all the sentences in the document.", - "items": { - "$ref": "Sentence" - }, - "type": "array" - } - }, - "id": "AnalyzeSentimentResponse" - }, - "AnalyzeEntitiesResponse": { - "description": "The entity analysis response message.", - "type": "object", - "properties": { - "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", - "type": "string" - }, - "entities": { - "description": "The recognized entities in the input document.", - "items": { - "$ref": "Entity" - }, - "type": "array" - } - }, - "id": "AnalyzeEntitiesResponse" - }, - "AnalyzeSyntaxResponse": { - "description": "The syntax analysis response message.", - "type": "object", - "properties": { - "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", - "type": "string" - }, - "sentences": { - "description": "Sentences in the input document.", - "items": { - "$ref": "Sentence" - }, - "type": "array" - }, - "tokens": { - "description": "Tokens, along with their syntactic information, in the input document.", - "items": { - "$ref": "Token" - }, - "type": "array" - } - }, - "id": "AnalyzeSyntaxResponse" - }, - "Entity": { - "id": "Entity", - "description": "Represents a phrase in the text that is a known entity, such as\na person, an organization, or location. The API associates information, such\nas salience and mentions, with entities.", - "type": "object", - "properties": { - "name": { - "description": "The representative name for the entity.", - "type": "string" - }, - "salience": { - "format": "float", - "description": "The salience score associated with the entity in the [0, 1.0] range.\n\nThe salience score for an entity provides information about the\nimportance or centrality of that entity to the entire document text.\nScores closer to 0 are less salient, while scores closer to 1.0 are highly\nsalient.", - "type": "number" - }, - "type": { - "enumDescriptions": [ - "Unknown", - "Person", - "Location", - "Organization", - "Event", - "Work of art", - "Consumer goods", - "Other types" - ], - "enum": [ - "UNKNOWN", - "PERSON", - "LOCATION", - "ORGANIZATION", - "EVENT", - "WORK_OF_ART", - "CONSUMER_GOOD", - "OTHER" - ], - "description": "The entity type.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "description": "Metadata associated with the entity.\n\nCurrently, Wikipedia URLs and Knowledge Graph MIDs are provided, if\navailable. The associated keys are \"wikipedia_url\" and \"mid\", respectively.", - "type": "object" - }, - "sentiment": { - "description": "For calls to AnalyzeEntitySentiment or if\nAnnotateTextRequest.Features.extract_entity_sentiment is set to\ntrue, this field will contain the aggregate sentiment expressed for this\nentity in the provided document.", - "$ref": "Sentiment" - }, - "mentions": { - "description": "The mentions of this entity in the input document. The API currently\nsupports proper noun mentions.", - "items": { - "$ref": "EntityMention" - }, - "type": "array" - } - } - }, - "AnnotateTextRequest": { - "description": "The request message for the text annotation API, which can perform multiple\nanalysis types (sentiment, entities, and syntax) in one call.", - "type": "object", - "properties": { - "encodingType": { - "enumDescriptions": [ - "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." - ], - "enum": [ - "NONE", - "UTF8", - "UTF16", - "UTF32" - ], - "description": "The encoding type used by the API to calculate offsets.", - "type": "string" - }, - "document": { - "$ref": "Document", - "description": "Input document." - }, - "features": { - "$ref": "Features", - "description": "The enabled features." - } - }, - "id": "AnnotateTextRequest" - }, - "AnalyzeSentimentRequest": { - "description": "The sentiment analysis request message.", - "type": "object", - "properties": { - "encodingType": { - "enumDescriptions": [ - "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." - ], - "enum": [ - "NONE", - "UTF8", - "UTF16", - "UTF32" - ], - "description": "The encoding type used by the API to calculate sentence offsets for the\nsentence sentiment.", - "type": "string" - }, - "document": { - "description": "Input document.", - "$ref": "Document" - } - }, - "id": "AnalyzeSentimentRequest" - }, - "AnnotateTextResponse": { - "id": "AnnotateTextResponse", - "description": "The text annotations response message.", - "type": "object", - "properties": { - "documentSentiment": { - "description": "The overall sentiment for the document. Populated if the user enables\nAnnotateTextRequest.Features.extract_document_sentiment.", - "$ref": "Sentiment" - }, - "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", - "type": "string" - }, - "sentences": { - "description": "Sentences in the input document. Populated if the user enables\nAnnotateTextRequest.Features.extract_syntax.", - "items": { - "$ref": "Sentence" - }, - "type": "array" - }, - "tokens": { - "description": "Tokens, along with their syntactic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_syntax.", - "items": { - "$ref": "Token" - }, - "type": "array" - }, - "entities": { - "description": "Entities, along with their semantic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_entities.", - "items": { - "$ref": "Entity" - }, - "type": "array" - } - } - }, "DependencyEdge": { - "id": "DependencyEdge", "description": "Represents dependency parse tree information for a token.", "type": "object", "properties": { + "headTokenIndex": { + "format": "int32", + "description": "Represents the head of this token in the dependency tree.\nThis is the index of the token which has an arc going to this token.\nThe index is the position of the token in the array of tokens returned\nby the API method. If this token is a root token, then the\n`head_token_index` is its own index.", + "type": "integer" + }, "label": { - "description": "The parse label for the token.", - "type": "string", "enumDescriptions": [ "Unknown", "Abbreviation modifier", @@ -801,7 +330,13 @@ "Nominalized clausal passive", "Compound of numeric modifier", "Copula", - "Dislocated relation (for fronted/topicalized elements)" + "Dislocated relation (for fronted/topicalized elements)", + "Aspect marker", + "Genitive modifier", + "Genitive object", + "Infinitival modifier", + "Measure", + "Nominal complement of a noun" ], "enum": [ "UNKNOWN", @@ -880,39 +415,25 @@ "NOMCSUBJPASS", "NUMC", "COP", - "DISLOCATED" - ] - }, - "headTokenIndex": { - "format": "int32", - "description": "Represents the head of this token in the dependency tree.\nThis is the index of the token which has an arc going to this token.\nThe index is the position of the token in the array of tokens returned\nby the API method. If this token is a root token, then the\n`head_token_index` is its own index.", - "type": "integer" - } - } - }, - "TextSpan": { - "description": "Represents an output piece of text.", - "type": "object", - "properties": { - "beginOffset": { - "format": "int32", - "description": "The API calculates the beginning offset of the content in the original\ndocument according to the EncodingType specified in the API request.", - "type": "integer" - }, - "content": { - "description": "The content of the output text.", + "DISLOCATED", + "ASP", + "GMOD", + "GOBJ", + "INFMOD", + "MES", + "NCOMP" + ], + "description": "The parse label for the token.", "type": "string" } }, - "id": "TextSpan" + "id": "DependencyEdge" }, "Token": { - "description": "Represents the smallest syntactic building block of the text.", - "type": "object", "properties": { "dependencyEdge": { - "description": "Dependency tree parse for this token.", - "$ref": "DependencyEdge" + "$ref": "DependencyEdge", + "description": "Dependency tree parse for this token." }, "text": { "$ref": "TextSpan", @@ -927,63 +448,31 @@ "description": "Parts of speech tag for this token." } }, - "id": "Token" + "id": "Token", + "description": "Represents the smallest syntactic building block of the text.", + "type": "object" }, - "Status": { - "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "TextSpan": { + "id": "TextSpan", + "description": "Represents an output piece of text.", "type": "object", "properties": { - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "code": { + "beginOffset": { + "type": "integer", "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - } - } - }, - "Features": { - "id": "Features", - "description": "All available features for sentiment, syntax, and semantic analysis.\nSetting each one to true will enable that specific analysis for the input.", - "type": "object", - "properties": { - "extractEntities": { - "description": "Extract entities.", - "type": "boolean" + "description": "The API calculates the beginning offset of the content in the original\ndocument according to the EncodingType specified in the API request." }, - "extractEntitySentiment": { - "description": "Extract entities and their associated sentiment.", - "type": "boolean" - }, - "extractDocumentSentiment": { - "description": "Extract document-level sentiment.", - "type": "boolean" - }, - "extractSyntax": { - "description": "Extract syntax information.", - "type": "boolean" + "content": { + "description": "The content of the output text.", + "type": "string" } } }, "EntityMention": { - "description": "Represents a mention for an entity in the text. Currently, proper noun\nmentions are supported.", - "type": "object", "properties": { "type": { + "description": "The type of the entity mention.", + "type": "string", "enumDescriptions": [ "Unknown", "Proper name", @@ -993,71 +482,51 @@ "TYPE_UNKNOWN", "PROPER", "COMMON" - ], - "description": "The type of the entity mention.", - "type": "string" + ] }, "text": { "$ref": "TextSpan", "description": "The mention text." }, "sentiment": { - "$ref": "Sentiment", - "description": "For calls to AnalyzeEntitySentiment or if\nAnnotateTextRequest.Features.extract_entity_sentiment is set to\ntrue, this field will contain the sentiment expressed for this mention of\nthe entity in the provided document." + "description": "For calls to AnalyzeEntitySentiment or if\nAnnotateTextRequest.Features.extract_entity_sentiment is set to\ntrue, this field will contain the sentiment expressed for this mention of\nthe entity in the provided document.", + "$ref": "Sentiment" } }, - "id": "EntityMention" + "id": "EntityMention", + "description": "Represents a mention for an entity in the text. Currently, proper noun\nmentions are supported.", + "type": "object" + }, + "ClassifyTextResponse": { + "description": "The document classification response message.", + "type": "object", + "properties": { + "categories": { + "description": "Categories representing the input document.", + "items": { + "$ref": "ClassificationCategory" + }, + "type": "array" + } + }, + "id": "ClassifyTextResponse" }, "Sentence": { "description": "Represents a sentence in the input document.", "type": "object", "properties": { "text": { - "$ref": "TextSpan", - "description": "The sentence text." + "description": "The sentence text.", + "$ref": "TextSpan" }, "sentiment": { - "description": "For calls to AnalyzeSentiment or if\nAnnotateTextRequest.Features.extract_document_sentiment is set to\ntrue, this field will contain the sentiment for the sentence.", - "$ref": "Sentiment" + "$ref": "Sentiment", + "description": "For calls to AnalyzeSentiment or if\nAnnotateTextRequest.Features.extract_document_sentiment is set to\ntrue, this field will contain the sentiment for the sentence." } }, "id": "Sentence" }, - "Document": { - "id": "Document", - "description": "################################################################ #\n\nRepresents the input to API methods.", - "type": "object", - "properties": { - "gcsContentUri": { - "description": "The Google Cloud Storage URI where the file content is located.\nThis URI must be of the form: gs://bucket_name/object_name. For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nNOTE: Cloud Storage object versioning is not supported.", - "type": "string" - }, - "language": { - "description": "The language of the document (if not specified, the language is\nautomatically detected). Both ISO and BCP-47 language codes are\naccepted.\u003cbr\u003e\n[Language Support](/natural-language/docs/languages)\nlists currently supported languages for each API method.\nIf the language (either specified by the caller or automatically detected)\nis not supported by the called API method, an `INVALID_ARGUMENT` error\nis returned.", - "type": "string" - }, - "content": { - "description": "The content of the input in string format.", - "type": "string" - }, - "type": { - "description": "Required. If the type is not set or is `TYPE_UNSPECIFIED`,\nreturns an `INVALID_ARGUMENT` error.", - "type": "string", - "enumDescriptions": [ - "The content type is not specified.", - "Plain text", - "HTML" - ], - "enum": [ - "TYPE_UNSPECIFIED", - "PLAIN_TEXT", - "HTML" - ] - } - } - }, "Sentiment": { - "id": "Sentiment", "description": "Represents the feeling associated with the entire text or entities in\nthe text.", "type": "object", "properties": { @@ -1071,13 +540,326 @@ "description": "A non-negative number in the [0, +inf) range, which represents\nthe absolute magnitude of sentiment regardless of score (positive or\nnegative).", "type": "number" } - } + }, + "id": "Sentiment" }, - "AnalyzeEntitiesRequest": { - "description": "The entity analysis request message.", + "AnalyzeEntitySentimentRequest": { + "properties": { + "encodingType": { + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ], + "description": "The encoding type used by the API to calculate offsets.", + "type": "string", + "enumDescriptions": [ + "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." + ] + }, + "document": { + "description": "Input document.", + "$ref": "Document" + } + }, + "id": "AnalyzeEntitySentimentRequest", + "description": "The entity-level sentiment analysis request message.", + "type": "object" + }, + "PartOfSpeech": { + "description": "Represents part of speech information for a token.", + "type": "object", + "properties": { + "tense": { + "enumDescriptions": [ + "Tense is not applicable in the analyzed language or is not predicted.", + "Conditional", + "Future", + "Past", + "Present", + "Imperfect", + "Pluperfect" + ], + "enum": [ + "TENSE_UNKNOWN", + "CONDITIONAL_TENSE", + "FUTURE", + "PAST", + "PRESENT", + "IMPERFECT", + "PLUPERFECT" + ], + "description": "The grammatical tense.", + "type": "string" + }, + "reciprocity": { + "enumDescriptions": [ + "Reciprocity is not applicable in the analyzed language or is not\npredicted.", + "Reciprocal", + "Non-reciprocal" + ], + "enum": [ + "RECIPROCITY_UNKNOWN", + "RECIPROCAL", + "NON_RECIPROCAL" + ], + "description": "The grammatical reciprocity.", + "type": "string" + }, + "form": { + "enum": [ + "FORM_UNKNOWN", + "ADNOMIAL", + "AUXILIARY", + "COMPLEMENTIZER", + "FINAL_ENDING", + "GERUND", + "REALIS", + "IRREALIS", + "SHORT", + "LONG", + "ORDER", + "SPECIFIC" + ], + "description": "The grammatical form.", + "type": "string", + "enumDescriptions": [ + "Form is not applicable in the analyzed language or is not predicted.", + "Adnomial", + "Auxiliary", + "Complementizer", + "Final ending", + "Gerund", + "Realis", + "Irrealis", + "Short form", + "Long form", + "Order form", + "Specific form" + ] + }, + "number": { + "enumDescriptions": [ + "Number is not applicable in the analyzed language or is not predicted.", + "Singular", + "Plural", + "Dual" + ], + "enum": [ + "NUMBER_UNKNOWN", + "SINGULAR", + "PLURAL", + "DUAL" + ], + "description": "The grammatical number.", + "type": "string" + }, + "voice": { + "description": "The grammatical voice.", + "type": "string", + "enumDescriptions": [ + "Voice is not applicable in the analyzed language or is not predicted.", + "Active", + "Causative", + "Passive" + ], + "enum": [ + "VOICE_UNKNOWN", + "ACTIVE", + "CAUSATIVE", + "PASSIVE" + ] + }, + "aspect": { + "description": "The grammatical aspect.", + "type": "string", + "enumDescriptions": [ + "Aspect is not applicable in the analyzed language or is not predicted.", + "Perfective", + "Imperfective", + "Progressive" + ], + "enum": [ + "ASPECT_UNKNOWN", + "PERFECTIVE", + "IMPERFECTIVE", + "PROGRESSIVE" + ] + }, + "mood": { + "description": "The grammatical mood.", + "type": "string", + "enumDescriptions": [ + "Mood is not applicable in the analyzed language or is not predicted.", + "Conditional", + "Imperative", + "Indicative", + "Interrogative", + "Jussive", + "Subjunctive" + ], + "enum": [ + "MOOD_UNKNOWN", + "CONDITIONAL_MOOD", + "IMPERATIVE", + "INDICATIVE", + "INTERROGATIVE", + "JUSSIVE", + "SUBJUNCTIVE" + ] + }, + "tag": { + "type": "string", + "enumDescriptions": [ + "Unknown", + "Adjective", + "Adposition (preposition and postposition)", + "Adverb", + "Conjunction", + "Determiner", + "Noun (common and proper)", + "Cardinal number", + "Pronoun", + "Particle or other function word", + "Punctuation", + "Verb (all tenses and modes)", + "Other: foreign words, typos, abbreviations", + "Affix" + ], + "enum": [ + "UNKNOWN", + "ADJ", + "ADP", + "ADV", + "CONJ", + "DET", + "NOUN", + "NUM", + "PRON", + "PRT", + "PUNCT", + "VERB", + "X", + "AFFIX" + ], + "description": "The part of speech tag." + }, + "gender": { + "description": "The grammatical gender.", + "type": "string", + "enumDescriptions": [ + "Gender is not applicable in the analyzed language or is not predicted.", + "Feminine", + "Masculine", + "Neuter" + ], + "enum": [ + "GENDER_UNKNOWN", + "FEMININE", + "MASCULINE", + "NEUTER" + ] + }, + "person": { + "type": "string", + "enumDescriptions": [ + "Person is not applicable in the analyzed language or is not predicted.", + "First", + "Second", + "Third", + "Reflexive" + ], + "enum": [ + "PERSON_UNKNOWN", + "FIRST", + "SECOND", + "THIRD", + "REFLEXIVE_PERSON" + ], + "description": "The grammatical person." + }, + "proper": { + "enumDescriptions": [ + "Proper is not applicable in the analyzed language or is not predicted.", + "Proper", + "Not proper" + ], + "enum": [ + "PROPER_UNKNOWN", + "PROPER", + "NOT_PROPER" + ], + "description": "The grammatical properness.", + "type": "string" + }, + "case": { + "type": "string", + "enumDescriptions": [ + "Case is not applicable in the analyzed language or is not predicted.", + "Accusative", + "Adverbial", + "Complementive", + "Dative", + "Genitive", + "Instrumental", + "Locative", + "Nominative", + "Oblique", + "Partitive", + "Prepositional", + "Reflexive", + "Relative", + "Vocative" + ], + "enum": [ + "CASE_UNKNOWN", + "ACCUSATIVE", + "ADVERBIAL", + "COMPLEMENTIVE", + "DATIVE", + "GENITIVE", + "INSTRUMENTAL", + "LOCATIVE", + "NOMINATIVE", + "OBLIQUE", + "PARTITIVE", + "PREPOSITIONAL", + "REFLEXIVE_CASE", + "RELATIVE_CASE", + "VOCATIVE" + ], + "description": "The grammatical case." + } + }, + "id": "PartOfSpeech" + }, + "ClassificationCategory": { + "description": "Represents a category returned from the text classifier.", + "type": "object", + "properties": { + "confidence": { + "format": "float", + "description": "The classifier's confidence of the category. Number represents how certain\nthe classifier is that this category represents the given text.", + "type": "number" + }, + "name": { + "description": "The name of the category representing the document.", + "type": "string" + } + }, + "id": "ClassificationCategory" + }, + "AnalyzeSyntaxRequest": { + "id": "AnalyzeSyntaxRequest", + "description": "The syntax analysis request message.", "type": "object", "properties": { "encodingType": { + "type": "string", "enumDescriptions": [ "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", @@ -1090,18 +872,274 @@ "UTF16", "UTF32" ], - "description": "The encoding type used by the API to calculate offsets.", + "description": "The encoding type used by the API to calculate offsets." + }, + "document": { + "$ref": "Document", + "description": "Input document." + } + } + }, + "AnalyzeEntitiesResponse": { + "description": "The entity analysis response message.", + "type": "object", + "properties": { + "language": { + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", "type": "string" }, + "entities": { + "description": "The recognized entities in the input document.", + "items": { + "$ref": "Entity" + }, + "type": "array" + } + }, + "id": "AnalyzeEntitiesResponse" + }, + "Entity": { + "description": "Represents a phrase in the text that is a known entity, such as\na person, an organization, or location. The API associates information, such\nas salience and mentions, with entities.", + "type": "object", + "properties": { + "name": { + "description": "The representative name for the entity.", + "type": "string" + }, + "salience": { + "format": "float", + "description": "The salience score associated with the entity in the [0, 1.0] range.\n\nThe salience score for an entity provides information about the\nimportance or centrality of that entity to the entire document text.\nScores closer to 0 are less salient, while scores closer to 1.0 are highly\nsalient.", + "type": "number" + }, + "type": { + "description": "The entity type.", + "type": "string", + "enumDescriptions": [ + "Unknown", + "Person", + "Location", + "Organization", + "Event", + "Work of art", + "Consumer goods", + "Other types" + ], + "enum": [ + "UNKNOWN", + "PERSON", + "LOCATION", + "ORGANIZATION", + "EVENT", + "WORK_OF_ART", + "CONSUMER_GOOD", + "OTHER" + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata associated with the entity.\n\nCurrently, Wikipedia URLs and Knowledge Graph MIDs are provided, if\navailable. The associated keys are \"wikipedia_url\" and \"mid\", respectively.", + "type": "object" + }, + "sentiment": { + "$ref": "Sentiment", + "description": "For calls to AnalyzeEntitySentiment or if\nAnnotateTextRequest.Features.extract_entity_sentiment is set to\ntrue, this field will contain the aggregate sentiment expressed for this\nentity in the provided document." + }, + "mentions": { + "description": "The mentions of this entity in the input document. The API currently\nsupports proper noun mentions.", + "items": { + "$ref": "EntityMention" + }, + "type": "array" + } + }, + "id": "Entity" + }, + "AnnotateTextRequest": { + "description": "The request message for the text annotation API, which can perform multiple\nanalysis types (sentiment, entities, and syntax) in one call.", + "type": "object", + "properties": { + "encodingType": { + "description": "The encoding type used by the API to calculate offsets.", + "type": "string", + "enumDescriptions": [ + "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." + ], + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ] + }, + "document": { + "description": "Input document.", + "$ref": "Document" + }, + "features": { + "$ref": "Features", + "description": "The enabled features." + } + }, + "id": "AnnotateTextRequest" + }, + "AnalyzeSentimentRequest": { + "description": "The sentiment analysis request message.", + "type": "object", + "properties": { + "encodingType": { + "type": "string", + "enumDescriptions": [ + "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." + ], + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ], + "description": "The encoding type used by the API to calculate sentence offsets for the\nsentence sentiment." + }, "document": { "$ref": "Document", "description": "Input document." } }, + "id": "AnalyzeSentimentRequest" + }, + "Status": { + "properties": { + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client." + }, + "details": { + "items": { + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + }, + "type": "object" + }, + "type": "array", + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." + } + }, + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object" + }, + "Features": { + "description": "All available features for sentiment, syntax, and semantic analysis.\nSetting each one to true will enable that specific analysis for the input.", + "type": "object", + "properties": { + "extractEntitySentiment": { + "description": "Extract entities and their associated sentiment.", + "type": "boolean" + }, + "extractDocumentSentiment": { + "description": "Extract document-level sentiment.", + "type": "boolean" + }, + "extractSyntax": { + "description": "Extract syntax information.", + "type": "boolean" + }, + "extractEntities": { + "type": "boolean", + "description": "Extract entities." + }, + "classifyText": { + "description": "Classify the full document into categories.", + "type": "boolean" + } + }, + "id": "Features" + }, + "Document": { + "type": "object", + "properties": { + "content": { + "description": "The content of the input in string format.", + "type": "string" + }, + "type": { + "enum": [ + "TYPE_UNSPECIFIED", + "PLAIN_TEXT", + "HTML" + ], + "description": "Required. If the type is not set or is `TYPE_UNSPECIFIED`,\nreturns an `INVALID_ARGUMENT` error.", + "type": "string", + "enumDescriptions": [ + "The content type is not specified.", + "Plain text", + "HTML" + ] + }, + "gcsContentUri": { + "description": "The Google Cloud Storage URI where the file content is located.\nThis URI must be of the form: gs://bucket_name/object_name. For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nNOTE: Cloud Storage object versioning is not supported.", + "type": "string" + }, + "language": { + "description": "The language of the document (if not specified, the language is\nautomatically detected). Both ISO and BCP-47 language codes are\naccepted.\u003cbr\u003e\n[Language Support](/natural-language/docs/languages)\nlists currently supported languages for each API method.\nIf the language (either specified by the caller or automatically detected)\nis not supported by the called API method, an `INVALID_ARGUMENT` error\nis returned.", + "type": "string" + } + }, + "id": "Document", + "description": "################################################################ #\n\nRepresents the input to API methods." + }, + "AnalyzeEntitiesRequest": { + "description": "The entity analysis request message.", + "type": "object", + "properties": { + "encodingType": { + "description": "The encoding type used by the API to calculate offsets.", + "type": "string", + "enumDescriptions": [ + "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." + ], + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ] + }, + "document": { + "description": "Input document.", + "$ref": "Document" + } + }, "id": "AnalyzeEntitiesRequest" }, + "ClassifyTextRequest": { + "id": "ClassifyTextRequest", + "description": "The document classification request message.", + "type": "object", + "properties": { + "document": { + "description": "Input document.", + "$ref": "Document" + } + } + }, "AnalyzeEntitySentimentResponse": { - "id": "AnalyzeEntitySentimentResponse", "description": "The entity-level sentiment analysis response message.", "type": "object", "properties": { @@ -1116,53 +1154,98 @@ }, "type": "array" } - } + }, + "id": "AnalyzeEntitySentimentResponse" }, - "AnalyzeEntitySentimentRequest": { - "id": "AnalyzeEntitySentimentRequest", - "description": "The entity-level sentiment analysis request message.", + "AnalyzeSentimentResponse": { + "properties": { + "sentences": { + "description": "The sentiment for all the sentences in the document.", + "items": { + "$ref": "Sentence" + }, + "type": "array" + }, + "documentSentiment": { + "description": "The overall sentiment of the input document.", + "$ref": "Sentiment" + }, + "language": { + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", + "type": "string" + } + }, + "id": "AnalyzeSentimentResponse", + "description": "The sentiment analysis response message.", + "type": "object" + }, + "AnalyzeSyntaxResponse": { + "description": "The syntax analysis response message.", "type": "object", "properties": { - "encodingType": { - "enumDescriptions": [ - "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." - ], - "enum": [ - "NONE", - "UTF8", - "UTF16", - "UTF32" - ], - "description": "The encoding type used by the API to calculate offsets.", + "tokens": { + "description": "Tokens, along with their syntactic information, in the input document.", + "items": { + "$ref": "Token" + }, + "type": "array" + }, + "language": { + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", "type": "string" }, - "document": { - "$ref": "Document", - "description": "Input document." + "sentences": { + "description": "Sentences in the input document.", + "items": { + "$ref": "Sentence" + }, + "type": "array" } - } - } - }, - "protocol": "rest", - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "canonicalName": "Cloud Natural Language", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-language": { - "description": "Apply machine learning models to reveal the structure and meaning of text" + }, + "id": "AnalyzeSyntaxResponse" + }, + "AnnotateTextResponse": { + "id": "AnnotateTextResponse", + "description": "The text annotations response message.", + "type": "object", + "properties": { + "categories": { + "description": "Categories identified in the input document.", + "items": { + "$ref": "ClassificationCategory" + }, + "type": "array" }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "documentSentiment": { + "$ref": "Sentiment", + "description": "The overall sentiment for the document. Populated if the user enables\nAnnotateTextRequest.Features.extract_document_sentiment." + }, + "language": { + "type": "string", + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details." + }, + "entities": { + "description": "Entities, along with their semantic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_entities.", + "items": { + "$ref": "Entity" + }, + "type": "array" + }, + "sentences": { + "description": "Sentences in the input document. Populated if the user enables\nAnnotateTextRequest.Features.extract_syntax.", + "items": { + "$ref": "Sentence" + }, + "type": "array" + }, + "tokens": { + "description": "Tokens, along with their syntactic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_syntax.", + "items": { + "$ref": "Token" + }, + "type": "array" } } } - }, - "rootUrl": "https://language.googleapis.com/" + } } diff --git a/vendor/google.golang.org/api/language/v1beta2/language-gen.go b/vendor/google.golang.org/api/language/v1beta2/language-gen.go index 016566dc2..d87313aac 100644 --- a/vendor/google.golang.org/api/language/v1beta2/language-gen.go +++ b/vendor/google.golang.org/api/language/v1beta2/language-gen.go @@ -519,6 +519,9 @@ func (s *AnnotateTextRequest) MarshalJSON() ([]byte, error) { // AnnotateTextResponse: The text annotations response message. type AnnotateTextResponse struct { + // Categories: Categories identified in the input document. + Categories []*ClassificationCategory `json:"categories,omitempty"` + // DocumentSentiment: The overall sentiment for the document. Populated // if the user // enables @@ -555,21 +558,20 @@ type AnnotateTextResponse struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DocumentSentiment") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "Categories") 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. "DocumentSentiment") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Categories") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -579,6 +581,114 @@ func (s *AnnotateTextResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ClassificationCategory: Represents a category returned from the text +// classifier. +type ClassificationCategory struct { + // Confidence: The classifier's confidence of the category. Number + // represents how certain + // the classifier is that this category represents the given text. + Confidence float64 `json:"confidence,omitempty"` + + // Name: The name of the category representing the document. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Confidence") 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. "Confidence") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ClassificationCategory) MarshalJSON() ([]byte, error) { + type noMethod ClassificationCategory + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *ClassificationCategory) UnmarshalJSON(data []byte) error { + type noMethod ClassificationCategory + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *noMethod + } + s1.noMethod = (*noMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + +// ClassifyTextRequest: The document classification request message. +type ClassifyTextRequest struct { + // Document: Input document. + Document *Document `json:"document,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Document") 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. "Document") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ClassifyTextRequest) MarshalJSON() ([]byte, error) { + type noMethod ClassifyTextRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ClassifyTextResponse: The document classification response message. +type ClassifyTextResponse struct { + // Categories: Categories representing the input document. + Categories []*ClassificationCategory `json:"categories,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Categories") 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. "Categories") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ClassifyTextResponse) MarshalJSON() ([]byte, error) { + type noMethod ClassifyTextResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DependencyEdge: Represents dependency parse tree information for a // token. type DependencyEdge struct { @@ -675,6 +785,12 @@ type DependencyEdge struct { // "COP" - Copula // "DISLOCATED" - Dislocated relation (for fronted/topicalized // elements) + // "ASP" - Aspect marker + // "GMOD" - Genitive modifier + // "GOBJ" - Genitive object + // "INFMOD" - Infinitival modifier + // "MES" - Measure + // "NCOMP" - Nominal complement of a noun Label string `json:"label,omitempty"` // ForceSendFields is a list of field names (e.g. "HeadTokenIndex") to @@ -909,6 +1025,9 @@ func (s *EntityMention) MarshalJSON() ([]byte, error) { // Setting each one to true will enable that specific analysis for the // input. type Features struct { + // ClassifyText: Classify the full document into categories. + ClassifyText bool `json:"classifyText,omitempty"` + // ExtractDocumentSentiment: Extract document-level sentiment. ExtractDocumentSentiment bool `json:"extractDocumentSentiment,omitempty"` @@ -922,22 +1041,20 @@ type Features struct { // ExtractSyntax: Extract syntax information. ExtractSyntax bool `json:"extractSyntax,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ExtractDocumentSentiment") 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 is a list of field names (e.g. "ClassifyText") 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. "ExtractDocumentSentiment") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "ClassifyText") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -2023,3 +2140,124 @@ func (c *DocumentsAnnotateTextCall) Do(opts ...googleapi.CallOption) (*AnnotateT // } } + +// method id "language.documents.classifyText": + +type DocumentsClassifyTextCall struct { + s *Service + classifytextrequest *ClassifyTextRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ClassifyText: Classifies a document into categories. +func (r *DocumentsService) ClassifyText(classifytextrequest *ClassifyTextRequest) *DocumentsClassifyTextCall { + c := &DocumentsClassifyTextCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.classifytextrequest = classifytextrequest + 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 *DocumentsClassifyTextCall) Fields(s ...googleapi.Field) *DocumentsClassifyTextCall { + 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 *DocumentsClassifyTextCall) Context(ctx context.Context) *DocumentsClassifyTextCall { + 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 *DocumentsClassifyTextCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DocumentsClassifyTextCall) 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.classifytextrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/documents:classifyText") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "language.documents.classifyText" call. +// Exactly one of *ClassifyTextResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ClassifyTextResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *DocumentsClassifyTextCall) Do(opts ...googleapi.CallOption) (*ClassifyTextResponse, 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 := &ClassifyTextResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Classifies a document into categories.", + // "flatPath": "v1beta2/documents:classifyText", + // "httpMethod": "POST", + // "id": "language.documents.classifyText", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1beta2/documents:classifyText", + // "request": { + // "$ref": "ClassifyTextRequest" + // }, + // "response": { + // "$ref": "ClassifyTextResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-language", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} 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 ffcee8e10..aa0f6a999 100644 --- a/vendor/google.golang.org/api/logging/v2/logging-api.json +++ b/vendor/google.golang.org/api/logging/v2/logging-api.json @@ -1,58 +1,35 @@ { - "id": "logging:v2", - "revision": "20170717", + "baseUrl": "https://logging.googleapis.com/", + "kind": "discovery#restDescription", + "description": "Writes log entries and manages your Stackdriver Logging configuration.", + "servicePath": "", + "basePath": "", + "revision": "20170911", "documentationLink": "https://cloud.google.com/logging/docs/", + "id": "logging:v2", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { - "LogLine": { - "id": "LogLine", - "description": "Application log line emitted while processing a request.", + "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.", "type": "object", "properties": { - "logMessage": { - "description": "App-provided log message.", - "type": "string" + "exponentialBuckets": { + "$ref": "Exponential", + "description": "The exponential buckets." }, - "severity": { - "description": "Severity of this log entry.", - "type": "string", - "enumDescriptions": [ - "(0) The log entry has no assigned severity level.", - "(100) Debug or trace information.", - "(200) Routine information, such as ongoing status or performance.", - "(300) Normal but significant events, such as start up, shut down, or a configuration change.", - "(400) Warning events might cause problems.", - "(500) Error events are likely to cause problems.", - "(600) Critical events cause more severe problems or outages.", - "(700) A person must take an action immediately.", - "(800) One or more systems are unusable." - ], - "enum": [ - "DEFAULT", - "DEBUG", - "INFO", - "NOTICE", - "WARNING", - "ERROR", - "CRITICAL", - "ALERT", - "EMERGENCY" - ] + "explicitBuckets": { + "$ref": "Explicit", + "description": "The explicit buckets." }, - "sourceLocation": { - "description": "Where in the source code this log message was written.", - "$ref": "SourceLocation" - }, - "time": { - "format": "google-datetime", - "description": "Approximate time when this log entry was made.", - "type": "string" + "linearBuckets": { + "$ref": "Linear", + "description": "The linear bucket." } - } + }, + "id": "BucketOptions" }, "ListLogMetricsResponse": { - "description": "Result returned from ListLogMetrics.", "type": "object", "properties": { "metrics": { @@ -67,30 +44,120 @@ "type": "string" } }, - "id": "ListLogMetricsResponse" + "id": "ListLogMetricsResponse", + "description": "Result returned from ListLogMetrics." }, - "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 {}.", + "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.", "type": "object", - "properties": {}, - "id": "Empty" + "properties": { + "unit": { + "type": "string", + "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 includes the dimensionless unit 1, such as 1/s.The 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 '}'." + }, + "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" + }, + "name": { + "description": "The resource name of the metric descriptor. Depending on the implementation, the name typically includes: (1) the parent resource name that defines the scope of the metric type or of its data; and (2) the metric's URL-encoded type, which also appears in the type field of this descriptor. For example, following is the resource name of a custom metric within the GCP project my-project-id:\n\"projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount\"\n", + "type": "string" + }, + "type": { + "description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined custom metric types have the DNS name custom.googleapis.com. Metric types should use a natural hierarchical grouping. For example:\n\"custom.googleapis.com/invoice/paid/amount\"\n\"appengine.googleapis.com/http/server/response_latencies\"\n", + "type": "string" + }, + "valueType": { + "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." + ], + "enum": [ + "VALUE_TYPE_UNSPECIFIED", + "BOOL", + "INT64", + "DOUBLE", + "STRING", + "DISTRIBUTION", + "MONEY" + ], + "description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of metric_kind and value_type might not be supported.", + "type": "string" + }, + "metricKind": { + "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." + ], + "enum": [ + "METRIC_KIND_UNSPECIFIED", + "GAUGE", + "DELTA", + "CUMULATIVE" + ], + "description": "Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metric_kind and value_type might not be supported.", + "type": "string" + }, + "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\".", + "type": "string" + } + }, + "id": "MetricDescriptor" }, "LogEntry": { - "id": "LogEntry", "description": "An individual entry in a log.", "type": "object", "properties": { + "httpRequest": { + "$ref": "HttpRequest", + "description": "Optional. Information about the HTTP request associated with this log entry, if applicable." + }, + "resource": { + "$ref": "MonitoredResource", + "description": "Required. The monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error." + }, + "jsonPayload": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The log entry payload, represented as a structure that is expressed as a JSON object.", + "type": "object" + }, + "operation": { + "description": "Optional. Information about an operation associated with the log entry, if applicable.", + "$ref": "LogEntryOperation" + }, + "insertId": { + "description": "Optional. A unique identifier for the log entry. If you provide a value, then Stackdriver Logging considers other log entries in the same project, with the same timestamp, and with the same insert_id to be duplicates which can be removed. If omitted in new log entries, then Stackdriver Logging assigns its own unique identifier. The insert_id is also used to order log entries that have the same timestamp value.", + "type": "string" + }, "textPayload": { "description": "The log entry payload, represented as a Unicode string (UTF-8).", "type": "string" }, "protoPayload": { + "type": "object", "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" }, - "description": "The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads.", - "type": "object" + "description": "The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads." }, "labels": { "additionalProperties": { @@ -100,21 +167,10 @@ "type": "object" }, "trace": { - "type": "string", - "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" + "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" }, "severity": { - "enumDescriptions": [ - "(0) The log entry has no assigned severity level.", - "(100) Debug or trace information.", - "(200) Routine information, such as ongoing status or performance.", - "(300) Normal but significant events, such as start up, shut down, or a configuration change.", - "(400) Warning events might cause problems.", - "(500) Error events are likely to cause problems.", - "(600) Critical events cause more severe problems or outages.", - "(700) A person must take an action immediately.", - "(800) One or more systems are unusable." - ], "enum": [ "DEFAULT", "DEBUG", @@ -127,219 +183,45 @@ "EMERGENCY" ], "description": "Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "(0) The log entry has no assigned severity level.", + "(100) Debug or trace information.", + "(200) Routine information, such as ongoing status or performance.", + "(300) Normal but significant events, such as start up, shut down, or a configuration change.", + "(400) Warning events might cause problems.", + "(500) Error events are likely to cause problems.", + "(600) Critical events cause more severe problems or outages.", + "(700) A person must take an action immediately.", + "(800) One or more systems are unusable." + ] }, "sourceLocation": { "$ref": "LogEntrySourceLocation", "description": "Optional. Source code location information associated with the log entry, if any." }, "receiveTimestamp": { + "type": "string", "format": "google-datetime", - "description": "Output only. The time the log entry was received by Stackdriver Logging.", - "type": "string" + "description": "Output only. The time the log entry was received by Stackdriver Logging." }, "timestamp": { "format": "google-datetime", - "description": "Optional. The time the event described by the log entry occurred. If omitted in a new log entry, Stackdriver Logging will insert the time the log entry is received. Stackdriver Logging might reject log entries whose time stamps are more than a couple of hours in the future. Log entries with time stamps in the past are accepted.", + "description": "Optional. The time the event described by the log entry occurred. This time is used to compute the log entry's age and to enforce the logs retention period. If this field is omitted in a new log entry, then Stackdriver Logging assigns it the current time.Incoming log entries should have timestamps that are no more than the logs retention period in the past, and no more than 24 hours in the future. See the entries.write API method for more information.", "type": "string" }, "logName": { "description": "Required. The resource name of the log to which this log entry belongs:\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 within log_name. Example: \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results.", "type": "string" - }, - "httpRequest": { - "$ref": "HttpRequest", - "description": "Optional. Information about the HTTP request associated with this log entry, if applicable." - }, - "resource": { - "description": "Required. The monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error.", - "$ref": "MonitoredResource" - }, - "jsonPayload": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The log entry payload, represented as a structure that is expressed as a JSON object.", - "type": "object" - }, - "insertId": { - "description": "Optional. A unique identifier for the log entry. If you provide a value, then Stackdriver Logging considers other log entries in the same project, with the same timestamp, and with the same insert_id to be duplicates which can be removed. If omitted in new log entries, then Stackdriver Logging will insert its own unique identifier. The insert_id is used to order log entries that have the same timestamp value.", - "type": "string" - }, - "operation": { - "$ref": "LogEntryOperation", - "description": "Optional. Information about an operation associated with the log entry, if applicable." - } - } - }, - "SourceLocation": { - "description": "Specifies a location in a source code file.", - "type": "object", - "properties": { - "file": { - "description": "Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", - "type": "string" - }, - "functionName": { - "description": "Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information is used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).", - "type": "string" - }, - "line": { - "format": "int64", - "description": "Line within the source file.", - "type": "string" } }, - "id": "SourceLocation" - }, - "ListLogEntriesRequest": { - "type": "object", - "properties": { - "orderBy": { - "description": "Optional. How the results should be sorted. Presently, the only permitted values are \"timestamp asc\" (default) and \"timestamp desc\". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of their insert_id values.", - "type": "string" - }, - "resourceNames": { - "description": "Required. Names of one or more parent resources from which to retrieve log entries:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nProjects listed in the project_ids field are added to this list.", - "items": { - "type": "string" - }, - "type": "array" - }, - "projectIds": { - "description": "Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: \"my-project-1A\". If present, these project identifiers are converted to resource name format and added to the list of resources in resource_names.", - "items": { - "type": "string" - }, - "type": "array" - }, - "filter": { - "description": "Optional. A filter that chooses which log entries to return. See Advanced Logs Filters. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource_names. Referencing a parent resource that is not listed in resource_names will cause the filter to return no results. The maximum length of the filter is 20000 characters.", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of other method parameters should be identical to those in the previous call.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of next_page_token in the response indicates that more results might be available.", - "type": "integer" - } - }, - "id": "ListLogEntriesRequest", - "description": "The parameters to ListLogEntries." + "id": "LogEntry" }, "RequestLog": { "id": "RequestLog", "description": "Complete log information about a single HTTP request to an App Engine application.", "type": "object", "properties": { - "sourceReference": { - "items": { - "$ref": "SourceReference" - }, - "type": "array", - "description": "Source code for the application that handled this request. There can be more than one source reference per deployed application if source code is distributed among multiple repositories." - }, - "responseSize": { - "format": "int64", - "description": "Size in bytes sent back to client by request.", - "type": "string" - }, - "traceId": { - "type": "string", - "description": "Stackdriver Trace identifier for this request." - }, - "line": { - "description": "A list of log lines emitted by the application while serving this request.", - "items": { - "$ref": "LogLine" - }, - "type": "array" - }, - "taskQueueName": { - "description": "Queue name of the request, in the case of an offline request.", - "type": "string" - }, - "referrer": { - "description": "Referrer URL of request.", - "type": "string" - }, - "requestId": { - "description": "Globally unique identifier for a request, which is based on the request start time. Request IDs for requests which started later will compare greater as strings than those for requests which started earlier.", - "type": "string" - }, - "nickname": { - "description": "The logged-in user who made the request.Most likely, this is the part of the user's email before the @ sign. The field value is the same for different requests from the same user, but different users can have similar names. This information is also available to the application via the App Engine Users API.This field will be populated starting with App Engine 1.9.21.", - "type": "string" - }, - "pendingTime": { - "format": "google-duration", - "description": "Time this request spent in the pending request queue.", - "type": "string" - }, - "resource": { - "description": "Contains the path and query portion of the URL that was requested. For example, if the URL was \"http://example.com/app?name=val\", the resource would be \"/app?name=val\". The fragment identifier, which is identified by the # character, is not included.", - "type": "string" - }, - "status": { - "format": "int32", - "description": "HTTP response status code. Example: 200, 404.", - "type": "integer" - }, - "taskName": { - "type": "string", - "description": "Task name of the request, in the case of an offline request." - }, - "urlMapEntry": { - "type": "string", - "description": "File or class that handled the request." - }, - "instanceIndex": { - "format": "int32", - "description": "If the instance processing this request belongs to a manually scaled module, then this is the 0-based index of the instance. Otherwise, this value is -1.", - "type": "integer" - }, - "finished": { - "type": "boolean", - "description": "Whether this request is finished or active." - }, - "host": { - "type": "string", - "description": "Internet host and port number of the resource being requested." - }, - "httpVersion": { - "description": "HTTP version of request. Example: \"HTTP/1.1\".", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "Time when the request started.", - "type": "string" - }, - "latency": { - "format": "google-duration", - "description": "Latency of the request.", - "type": "string" - }, - "ip": { - "description": "Origin IP address.", - "type": "string" - }, - "appId": { - "description": "Application that handled this request.", - "type": "string" - }, - "appEngineRelease": { - "description": "App Engine release version.", - "type": "string" - }, - "method": { - "description": "Request method. Example: \"GET\", \"HEAD\", \"PUT\", \"POST\", \"DELETE\".", - "type": "string" - }, "cost": { "format": "double", "description": "An indication of the relative cost of serving this request.", @@ -355,8 +237,8 @@ "type": "string" }, "first": { - "type": "boolean", - "description": "Whether this is the first RequestLog entry for this request. If an active request has several RequestLog entries written to Stackdriver Logging, then this field will be set for one of them." + "description": "Whether this is the first RequestLog entry for this request. If an active request has several RequestLog entries written to Stackdriver Logging, then this field will be set for one of them.", + "type": "boolean" }, "versionId": { "description": "Version of the application that handled this request.", @@ -378,52 +260,230 @@ "wasLoadingRequest": { "description": "Whether this was a loading request for the instance.", "type": "boolean" + }, + "sourceReference": { + "description": "Source code for the application that handled this request. There can be more than one source reference per deployed application if source code is distributed among multiple repositories.", + "items": { + "$ref": "SourceReference" + }, + "type": "array" + }, + "responseSize": { + "format": "int64", + "description": "Size in bytes sent back to client by request.", + "type": "string" + }, + "traceId": { + "description": "Stackdriver Trace identifier for this request.", + "type": "string" + }, + "line": { + "description": "A list of log lines emitted by the application while serving this request.", + "items": { + "$ref": "LogLine" + }, + "type": "array" + }, + "taskQueueName": { + "description": "Queue name of the request, in the case of an offline request.", + "type": "string" + }, + "referrer": { + "description": "Referrer URL of request.", + "type": "string" + }, + "requestId": { + "type": "string", + "description": "Globally unique identifier for a request, which is based on the request start time. Request IDs for requests which started later will compare greater as strings than those for requests which started earlier." + }, + "nickname": { + "description": "The logged-in user who made the request.Most likely, this is the part of the user's email before the @ sign. The field value is the same for different requests from the same user, but different users can have similar names. This information is also available to the application via the App Engine Users API.This field will be populated starting with App Engine 1.9.21.", + "type": "string" + }, + "status": { + "format": "int32", + "description": "HTTP response status code. Example: 200, 404.", + "type": "integer" + }, + "resource": { + "description": "Contains the path and query portion of the URL that was requested. For example, if the URL was \"http://example.com/app?name=val\", the resource would be \"/app?name=val\". The fragment identifier, which is identified by the # character, is not included.", + "type": "string" + }, + "pendingTime": { + "format": "google-duration", + "description": "Time this request spent in the pending request queue.", + "type": "string" + }, + "taskName": { + "description": "Task name of the request, in the case of an offline request.", + "type": "string" + }, + "urlMapEntry": { + "description": "File or class that handled the request.", + "type": "string" + }, + "instanceIndex": { + "format": "int32", + "description": "If the instance processing this request belongs to a manually scaled module, then this is the 0-based index of the instance. Otherwise, this value is -1.", + "type": "integer" + }, + "host": { + "description": "Internet host and port number of the resource being requested.", + "type": "string" + }, + "finished": { + "description": "Whether this request is finished or active.", + "type": "boolean" + }, + "httpVersion": { + "description": "HTTP version of request. Example: \"HTTP/1.1\".", + "type": "string" + }, + "startTime": { + "type": "string", + "format": "google-datetime", + "description": "Time when the request started." + }, + "latency": { + "format": "google-duration", + "description": "Latency of the request.", + "type": "string" + }, + "ip": { + "description": "Origin IP address.", + "type": "string" + }, + "appId": { + "description": "Application that handled this request.", + "type": "string" + }, + "appEngineRelease": { + "description": "App Engine release version.", + "type": "string" + }, + "method": { + "description": "Request method. Example: \"GET\", \"HEAD\", \"PUT\", \"POST\", \"DELETE\".", + "type": "string" } } }, + "LogExclusion": { + "description": "Specifies a set of log entries that are not to be stored in Stackdriver Logging. If your project receives a large volume of logs, you might be able to use exclusions to reduce your chargeable logs. Exclusions are processed after log sinks, so you can export log entries before they are excluded. Audit log entries and log entries from Amazon Web Services are never excluded.", + "type": "object", + "properties": { + "disabled": { + "description": "Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can use exclusions.patch to change the value of this field.", + "type": "boolean" + }, + "filter": { + "description": "Required. An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. For example, the following filter matches 99% of low-severity log entries from load balancers:\n\"resource.type=http_load_balancer severity\u003cERROR sample(insertId, 0.99)\"\n", + "type": "string" + }, + "name": { + "description": "Required. A client-assigned identifier, such as \"load-balancer-exclusion\". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.", + "type": "string" + }, + "description": { + "description": "Optional. A description of this exclusion.", + "type": "string" + } + }, + "id": "LogExclusion" + }, "ListMonitoredResourceDescriptorsResponse": { "description": "Result returned from ListMonitoredResourceDescriptors.", "type": "object", "properties": { + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", + "type": "string" + }, "resourceDescriptors": { "description": "A list of resource descriptors.", "items": { "$ref": "MonitoredResourceDescriptor" }, "type": "array" - }, - "nextPageToken": { - "type": "string", - "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken." } }, "id": "ListMonitoredResourceDescriptorsResponse" }, - "SourceReference": { + "ListExclusionsResponse": { + "id": "ListExclusionsResponse", + "description": "Result returned from ListExclusions.", + "type": "object", "properties": { - "revisionId": { - "description": "The canonical and persistent identifier of the deployed revision. Example (git): \"0035781c50ec7aa23385dc841529ce8a4b70db1b\"", + "nextPageToken": { + "description": "If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken.", "type": "string" }, - "repository": { - "description": "Optional. A URI string identifying the repository. Example: \"https://github.com/GoogleCloudPlatform/kubernetes.git\"", + "exclusions": { + "description": "A list of exclusions.", + "items": { + "$ref": "LogExclusion" + }, + "type": "array" + } + } + }, + "LogMetric": { + "description": "Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.Logs-based metric can also be used to extract values from logs and create a a distribution of the values. The distribution records the statistics of the extracted values along with an optional histogram of the values as specified by the bucket options.", + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Optional. A description of this metric, which is used in documentation." + }, + "valueExtractor": { + "description": "Optional. A value_extractor is required when using a distribution logs-based metric to extract the values to record from a log entry. Two functions are supported for value extraction: EXTRACT(field) or REGEXP_EXTRACT(field, regex). The argument are: 1. field: The name of the log entry field from which the value is to be extracted. 2. regex: A regular expression using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax) with a single capture group to extract data from the specified log entry field. The value of the field is converted to a string before applying the regex. It is an error to specify a regex that does not include exactly one capture group.The result of the extraction must be convertible to a double type, as the distribution always records double values. If either the extraction or the conversion to double fails, then those values are not recorded in the distribution.Example: REGEXP_EXTRACT(jsonPayload.request, \".*quantity=(\\d+).*\")", + "type": "string" + }, + "bucketOptions": { + "$ref": "BucketOptions", + "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." + }, + "name": { + "description": "Required. The client-assigned metric identifier. Examples: \"error_count\", \"nginx/requests\".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: \"projects/my-project/metrics/nginx%2Frequests\".", + "type": "string" + }, + "labelExtractors": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value. Each label key specified in the LabelDescriptor must have an associated extractor expression in this map. The syntax of the extractor expression is the same as for the value_extractor field.The extracted value is converted to the type defined in the label descriptor. If the either the extraction or the type conversion fails, the label will have a default value. The default value for a string label is an empty string, for an integer label its 0, and for a boolean label its false.Note that there are upper bounds on the maximum number of labels and the number of active time series that are allowed in a project." + }, + "metricDescriptor": { + "description": "Optional. The metric descriptor associated with the logs-based metric. If unspecified, it uses a default metric descriptor with a DELTA metric kind, INT64 value type, with no labels and a unit of \"1\". Such a metric counts the number of log entries matching the filter expression.The name, type, and description fields in the metric_descriptor are output only, and is constructed using the name and description field in the LogMetric.To create a logs-based metric that records a distribution of log values, a DELTA metric kind with a DISTRIBUTION value type must be used along with a value_extractor expression in the LogMetric.Each label in the metric descriptor must have a matching label name as the key and an extractor expression as the value in the label_extractors map.The metric_kind and value_type fields in the metric_descriptor cannot be updated once initially configured. New labels can be added in the metric_descriptor, but existing labels cannot be modified except for their description.", + "$ref": "MetricDescriptor" + }, + "version": { + "enumDescriptions": [ + "Stackdriver Logging API v2.", + "Stackdriver Logging API v1." + ], + "enum": [ + "V2", + "V1" + ], + "description": "Deprecated. The API version that created or updated this metric. The v2 format is used by default and cannot be changed.", + "type": "string" + }, + "filter": { + "description": "Required. An advanced logs filter which is used to match log entries. Example:\n\"resource.type=gae_app AND severity\u003e=ERROR\"\nThe maximum length of the filter is 20000 characters.", "type": "string" } }, - "id": "SourceReference", - "description": "A reference to a particular snapshot of the source tree used to build and deploy an application.", - "type": "object" - }, - "WriteLogEntriesResponse": { - "description": "Result returned from WriteLogEntries. empty", - "type": "object", - "properties": {}, - "id": "WriteLogEntriesResponse" + "id": "LogMetric" }, "LogEntryOperation": { "description": "Additional information about a potentially long-running operation with which a log entry is associated.", "type": "object", "properties": { + "id": { + "type": "string", + "description": "Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation." + }, "first": { "description": "Optional. Set this to True if this is the first log entry in the operation.", "type": "boolean" @@ -435,122 +495,61 @@ "last": { "description": "Optional. Set this to True if this is the last log entry in the operation.", "type": "boolean" - }, - "id": { - "description": "Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.", - "type": "string" } }, "id": "LogEntryOperation" }, - "LogMetric": { - "id": "LogMetric", - "description": "Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.", + "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", + "type": "object", + "properties": { + "labels": { + "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", + "additionalProperties": { + "type": "string" + } + }, + "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.", + "type": "string" + } + }, + "id": "MonitoredResource" + }, + "LogSink": { "type": "object", "properties": { "name": { - "type": "string", - "description": "Required. The client-assigned metric identifier. Examples: \"error_count\", \"nginx/requests\".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: \"projects/my-project/metrics/nginx%2Frequests\"." - }, - "description": { - "description": "Optional. A description of this metric, which is used in documentation.", + "description": "Required. The client-assigned sink identifier, unique within the project. Example: \"my-syslog-errors-to-pubsub\". Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods.", "type": "string" }, - "version": { - "enumDescriptions": [ - "Stackdriver Logging API v2.", - "Stackdriver Logging API v1." - ], - "enum": [ - "V2", - "V1" - ], - "description": "Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.", - "type": "string" - }, - "filter": { - "description": "Required. An advanced logs filter which is used to match log entries. Example:\n\"resource.type=gae_app AND severity\u003e=ERROR\"\nThe maximum length of the filter is 20000 characters.", - "type": "string" - } - } - }, - "MonitoredResource": { - "type": "object", - "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": { - "type": "string", - "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." - } - }, - "id": "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" - }, - "WriteLogEntriesRequest": { - "description": "The parameters to WriteLogEntries.", - "type": "object", - "properties": { - "entries": { - "description": "Required. The log entries to write. Values supplied for the fields log_name, resource, and labels in this entries.write request are inserted into those log entries in this list that do not provide their own values.Stackdriver Logging also creates and inserts values for timestamp and insert_id if the entries do not provide them. The created insert_id for the N'th entry in this list will be greater than earlier entries and less than later entries. Otherwise, the order of log entries in this list does not matter.To improve throughput and to avoid exceeding the quota limit for calls to entries.write, you should write multiple log entries at once rather than calling this method for each individual log entry.", - "items": { - "$ref": "LogEntry" - }, - "type": "array" - }, - "logName": { - "type": "string", - "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." - }, - "partialSuccess": { - "description": "Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, then the response status is the error associated with one of the failed entries and the response includes error details keyed by the entries' zero-based index in the entries.write method.", + "includeChildren": { + "description": "Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends on the sink's filter expression. For example, if this field is true, then the filter resource.type=gce_instance would export all Compute Engine VM instance log entries from all projects in the sink's parent. To only export entries from certain child projects, filter on the project part of the log name:\nlogName:(\"projects/test-project1/\" OR \"projects/test-project2/\") AND\nresource.type=gce_instance\n", "type": "boolean" }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Default labels that are added to the labels field of all log entries in entries. If a log entry already has a label with the same key as a label in this parameter, then the log entry's label is not changed. See LogEntry.", - "type": "object" + "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" }, - "resource": { - "description": "Optional. A default monitored resource object that is assigned to all log entries in entries that do not specify a value for resource. Example:\n{ \"type\": \"gce_instance\",\n \"labels\": {\n \"zone\": \"us-central1-a\", \"instance_id\": \"00000000000000000000\" }}\nSee LogEntry.", - "$ref": "MonitoredResource" - } - }, - "id": "WriteLogEntriesRequest" - }, - "LogSink": { - "description": "Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder.", - "type": "object", - "properties": { "destination": { "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" }, - "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. The filter must use the log entry format specified by the output_version_format parameter. For example, in the v2 format:\nlogName=\"projects/[PROJECT_ID]/logs/[LOG_ID]\" AND severity\u003e=ERROR\n", - "type": "string" - }, "endTime": { "format": "google-datetime", - "description": "Optional. The time at which this sink will stop exporting log entries. Log entries are exported only if their timestamp is earlier than the end time. If this field is not supplied, there is no end time. If both a start time and an end time are provided, then the end time must be later than the start time.", + "description": "Deprecated. This field is ignored when creating or updating sinks.", "type": "string" }, - "startTime": { - "type": "string", - "format": "google-datetime", - "description": "Optional. The time at which this sink will begin exporting log entries. Log entries are exported only if their timestamp is not earlier than the start time. The default value of this field is the time the sink is created or updated." - }, "writerIdentity": { "description": "Output only. An IAM identity—a service account or group—under which Stackdriver 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" }, + "startTime": { + "format": "google-datetime", + "description": "Deprecated. This field is ignored when creating or updating sinks.", + "type": "string" + }, "outputVersionFormat": { "enum": [ "VERSION_FORMAT_UNSPECIFIED", @@ -564,17 +563,10 @@ "LogEntry version 2 format.", "LogEntry version 1 format." ] - }, - "name": { - "description": "Required. The client-assigned sink identifier, unique within the project. Example: \"my-syslog-errors-to-pubsub\". Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods.", - "type": "string" - }, - "includeChildren": { - "description": "Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends on the sink's filter expression. For example, if this field is true, then the filter resource.type=gce_instance would export all Compute Engine VM instance log entries from all projects in the sink's parent. To only export entries from certain child projects, filter on the project part of the log name:\nlogName:(\"projects/test-project1/\" OR \"projects/test-project2/\") AND\nresource.type=gce_instance\n", - "type": "boolean" } }, - "id": "LogSink" + "id": "LogSink", + "description": "Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder." }, "ListLogsResponse": { "description": "Result returned from ListLogs.", @@ -595,27 +587,35 @@ "id": "ListLogsResponse" }, "ListSinksResponse": { + "id": "ListSinksResponse", "description": "Result returned from ListSinks.", "type": "object", "properties": { "sinks": { - "description": "A list of sinks.", "items": { "$ref": "LogSink" }, - "type": "array" + "type": "array", + "description": "A list of sinks." }, "nextPageToken": { "description": "If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken.", "type": "string" } - }, - "id": "ListSinksResponse" + } }, "HttpRequest": { - "description": "A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.", "type": "object", "properties": { + "userAgent": { + "description": "The user agent sent by the client. Example: \"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\".", + "type": "string" + }, + "latency": { + "format": "google-duration", + "description": "The request processing latency on the server, from the time the request was received until the response was sent.", + "type": "string" + }, "cacheFillBytes": { "format": "int64", "description": "The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.", @@ -625,28 +625,32 @@ "description": "The request method. Examples: \"GET\", \"HEAD\", \"PUT\", \"POST\".", "type": "string" }, - "responseSize": { - "format": "int64", - "description": "The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.", - "type": "string" - }, "requestSize": { "format": "int64", "description": "The size of the HTTP request message in bytes, including the request headers and the request body.", "type": "string" }, + "responseSize": { + "type": "string", + "format": "int64", + "description": "The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body." + }, + "protocol": { + "description": "Protocol used for the request. Examples: \"HTTP/1.1\", \"HTTP/2\", \"websocket\"", + "type": "string" + }, "requestUrl": { "description": "The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: \"http://example.com/some/info?color=red\".", "type": "string" }, - "serverIp": { - "type": "string", - "description": "The IP address (IPv4 or IPv6) of the origin server that the request was sent to." - }, "remoteIp": { "description": "The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: \"192.168.1.1\", \"FE80::0202:B3FF:FE1E:8329\".", "type": "string" }, + "serverIp": { + "description": "The IP address (IPv4 or IPv6) of the origin server that the request was sent to.", + "type": "string" + }, "cacheLookup": { "description": "Whether or not a cache lookup was attempted.", "type": "boolean" @@ -665,67 +669,17 @@ "type": "integer" }, "referer": { - "type": "string", - "description": "The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html)." - }, - "latency": { - "format": "google-duration", - "description": "The request processing latency on the server, from the time the request was received until the response was sent.", - "type": "string" - }, - "userAgent": { - "description": "The user agent sent by the client. Example: \"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\".", + "description": "The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).", "type": "string" } }, - "id": "HttpRequest" - }, - "LabelDescriptor": { - "properties": { - "key": { - "description": "The label key.", - "type": "string" - }, - "description": { - "description": "A human-readable description for the label.", - "type": "string" - }, - "valueType": { - "enumDescriptions": [ - "A variable-length string. This is the default.", - "Boolean; true or false.", - "A 64-bit signed integer." - ], - "enum": [ - "STRING", - "BOOL", - "INT64" - ], - "description": "The type of data that can be assigned to the label.", - "type": "string" - } - }, - "id": "LabelDescriptor", - "description": "A description of a label.", - "type": "object" + "id": "HttpRequest", + "description": "A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message." }, "MonitoredResourceDescriptor": { - "id": "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.", "type": "object", "properties": { - "description": { - "type": "string", - "description": "Optional. A detailed description of the monitored resource type that might be used in documentation." - }, - "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" - }, - "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" - }, "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": { @@ -736,17 +690,26 @@ "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" + }, + "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" + }, + "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" } - } + }, + "id": "MonitoredResourceDescriptor" }, "LogEntrySourceLocation": { "description": "Additional information about the source code location that produced the log entry.", "type": "object", "properties": { - "file": { - "description": "Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", - "type": "string" - }, "function": { "description": "Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).", "type": "string" @@ -755,34 +718,290 @@ "format": "int64", "description": "Optional. Line within the source file. 1-based; 0 indicates no line number available.", "type": "string" + }, + "file": { + "type": "string", + "description": "Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name." } }, "id": "LogEntrySourceLocation" }, "ListLogEntriesResponse": { - "description": "Result returned from ListLogEntries.", "type": "object", "properties": { - "nextPageToken": { - "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.If a value for next_page_token appears and the entries field is empty, it means that the search found no log entries so far but it did not have time to search all the possible log entries. Retry the method with this value for page_token to continue the search. Alternatively, consider speeding up the search by changing your filter to specify a single log name or resource type, or to narrow the time range of the search.", - "type": "string" - }, "entries": { - "description": "A list of log entries.", + "description": "A list of log entries. If entries is empty, nextPageToken may still be returned, indicating that more entries may exist. See nextPageToken for more information.", "items": { "$ref": "LogEntry" }, "type": "array" + }, + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.If a value for next_page_token appears and the entries field is empty, it means that the search found no log entries so far but it did not have time to search all the possible log entries. Retry the method with this value for page_token to continue the search. Alternatively, consider speeding up the search by changing your filter to specify a single log name or resource type, or to narrow the time range of the search.", + "type": "string" } }, - "id": "ListLogEntriesResponse" + "id": "ListLogEntriesResponse", + "description": "Result returned from ListLogEntries." + }, + "LogLine": { + "properties": { + "logMessage": { + "description": "App-provided log message.", + "type": "string" + }, + "severity": { + "enum": [ + "DEFAULT", + "DEBUG", + "INFO", + "NOTICE", + "WARNING", + "ERROR", + "CRITICAL", + "ALERT", + "EMERGENCY" + ], + "description": "Severity of this log entry.", + "type": "string", + "enumDescriptions": [ + "(0) The log entry has no assigned severity level.", + "(100) Debug or trace information.", + "(200) Routine information, such as ongoing status or performance.", + "(300) Normal but significant events, such as start up, shut down, or a configuration change.", + "(400) Warning events might cause problems.", + "(500) Error events are likely to cause problems.", + "(600) Critical events cause more severe problems or outages.", + "(700) A person must take an action immediately.", + "(800) One or more systems are unusable." + ] + }, + "sourceLocation": { + "description": "Where in the source code this log message was written.", + "$ref": "SourceLocation" + }, + "time": { + "format": "google-datetime", + "description": "Approximate time when this log entry was made.", + "type": "string" + } + }, + "id": "LogLine", + "description": "Application log line emitted while processing a request.", + "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)).", + "type": "object", + "properties": { + "numFiniteBuckets": { + "format": "int32", + "description": "Must be greater than 0.", + "type": "integer" + }, + "width": { + "format": "double", + "description": "Must be greater than 0.", + "type": "number" + }, + "offset": { + "format": "double", + "description": "Lower bound of the first bucket.", + "type": "number" + } + }, + "id": "Linear" + }, + "Empty": { + "properties": {}, + "id": "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 {}.", + "type": "object" + }, + "SourceLocation": { + "properties": { + "file": { + "description": "Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", + "type": "string" + }, + "functionName": { + "description": "Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information is used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).", + "type": "string" + }, + "line": { + "format": "int64", + "description": "Line within the source file.", + "type": "string" + } + }, + "id": "SourceLocation", + "description": "Specifies a location in a source code file.", + "type": "object" + }, + "ListLogEntriesRequest": { + "description": "The parameters to ListLogEntries.", + "type": "object", + "properties": { + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of next_page_token in the response indicates that more results might be available.", + "type": "integer" + }, + "orderBy": { + "description": "Optional. How the results should be sorted. Presently, the only permitted values are \"timestamp asc\" (default) and \"timestamp desc\". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of their insert_id values.", + "type": "string" + }, + "resourceNames": { + "description": "Required. Names of one or more parent resources from which to retrieve log entries:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nProjects listed in the project_ids field are added to this list.", + "items": { + "type": "string" + }, + "type": "array" + }, + "projectIds": { + "description": "Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: \"my-project-1A\". If present, these project identifiers are converted to resource name format and added to the list of resources in resource_names.", + "items": { + "type": "string" + }, + "type": "array" + }, + "filter": { + "description": "Optional. A filter that chooses which log entries to return. See Advanced Logs Filters. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource_names. Referencing a parent resource that is not listed in resource_names will cause the filter to return no results. The maximum length of the filter is 20000 characters.", + "type": "string" + } + }, + "id": "ListLogEntriesRequest" + }, + "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.", + "type": "object", + "properties": { + "bounds": { + "description": "The values must be monotonically increasing.", + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + } + }, + "id": "Explicit" + }, + "SourceReference": { + "description": "A reference to a particular snapshot of the source tree used to build and deploy an application.", + "type": "object", + "properties": { + "repository": { + "description": "Optional. A URI string identifying the repository. Example: \"https://github.com/GoogleCloudPlatform/kubernetes.git\"", + "type": "string" + }, + "revisionId": { + "description": "The canonical and persistent identifier of the deployed revision. Example (git): \"0035781c50ec7aa23385dc841529ce8a4b70db1b\"", + "type": "string" + } + }, + "id": "SourceReference" + }, + "WriteLogEntriesResponse": { + "description": "Result returned from WriteLogEntries. empty", + "type": "object", + "properties": {}, + "id": "WriteLogEntriesResponse" + }, + "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)).", + "type": "object", + "properties": { + "growthFactor": { + "format": "double", + "description": "Must be greater than 1.", + "type": "number" + }, + "scale": { + "format": "double", + "description": "Must be greater than 0.", + "type": "number" + }, + "numFiniteBuckets": { + "format": "int32", + "description": "Must be greater than 0.", + "type": "integer" + } + }, + "id": "Exponential" + }, + "WriteLogEntriesRequest": { + "description": "The parameters to WriteLogEntries.", + "type": "object", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Default labels that are added to the labels field of all log entries in entries. If a log entry already has a label with the same key as a label in this parameter, then the log entry's label is not changed. See LogEntry.", + "type": "object" + }, + "resource": { + "description": "Optional. A default monitored resource object that is assigned to all log entries in entries that do not specify a value for resource. Example:\n{ \"type\": \"gce_instance\",\n \"labels\": {\n \"zone\": \"us-central1-a\", \"instance_id\": \"00000000000000000000\" }}\nSee LogEntry.", + "$ref": "MonitoredResource" + }, + "entries": { + "description": "Required. The log entries to send to Stackdriver Logging. The order of log entries in this list does not matter. Values supplied in this method's log_name, resource, and labels fields are copied into those log entries in this list that do not include values for their corresponding fields. For more information, see the LogEntry type.If the timestamp or insert_id fields are missing in log entries, then this method supplies the current time or a unique identifier, respectively. The supplied values are chosen so that, among the log entries that did not supply their own values, the entries earlier in the list will sort before the entries later in the list. See the entries.list method.Log entries with timestamps that are more than the logs retention period in the past or more than 24 hours in the future might be discarded. Discarding does not return an error.To improve throughput and to avoid exceeding the quota limit for calls to entries.write, you should try to include several log entries in this list, rather than calling this method for each individual log entry.", + "items": { + "$ref": "LogEntry" + }, + "type": "array" + }, + "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, \"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": { + "description": "Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, then the response status is the error associated with one of the failed entries and the response includes error details keyed by the entries' zero-based index in the entries.write method.", + "type": "boolean" + } + }, + "id": "WriteLogEntriesRequest" + }, + "LabelDescriptor": { + "description": "A description of a label.", + "type": "object", + "properties": { + "key": { + "description": "The label key.", + "type": "string" + }, + "description": { + "description": "A human-readable description for the label.", + "type": "string" + }, + "valueType": { + "enum": [ + "STRING", + "BOOL", + "INT64" + ], + "description": "The type of data that can be assigned to the label.", + "type": "string", + "enumDescriptions": [ + "A variable-length string. This is the default.", + "Boolean; true or false.", + "A 64-bit signed integer." + ] + } + }, + "id": "LabelDescriptor" } }, - "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, + "protocol": "rest", "canonicalName": "Logging", "auth": { "oauth2": { @@ -816,40 +1035,55 @@ "resources": { "sinks": { "methods": { - "delete": { - "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.", + "create": { + "flatPath": "v2/folders/{foldersId}/sinks", + "id": "logging.folders.sinks.create", + "path": "v2/{+parent}/sinks", + "request": { + "$ref": "LogSink" + }, + "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", "response": { - "$ref": "Empty" + "$ref": "LogSink" }, "parameterOrder": [ - "sinkName" + "parent" ], - "httpMethod": "DELETE", + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/logging.admin" ], "parameters": { - "sinkName": { - "location": "path", - "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "parent": { + "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", "type": "string", "required": true, - "pattern": "^folders/[^/]+/sinks/[^/]+$" + "pattern": "^folders/[^/]+$", + "location": "path" + }, + "uniqueWriterIdentity": { + "location": "query", + "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Stackdriver Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.", + "type": "boolean" } - }, - "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", - "id": "logging.folders.sinks.delete", - "path": "v2/{+sinkName}" + } }, "get": { - "response": { - "$ref": "LogSink" - }, + "description": "Gets a sink.", + "httpMethod": "GET", "parameterOrder": [ "sinkName" ], - "httpMethod": "GET", + "response": { + "$ref": "LogSink" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], "parameters": { "sinkName": { "pattern": "^folders/[^/]+/sinks/[^/]+$", @@ -859,57 +1093,55 @@ "required": true } }, + "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", + "path": "v2/{+sinkName}", + "id": "logging.folders.sinks.get" + }, + "patch": { + "httpMethod": "PATCH", + "parameterOrder": [ + "sinkName" + ], + "response": { + "$ref": "LogSink" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" + "https://www.googleapis.com/auth/logging.admin" ], - "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", - "id": "logging.folders.sinks.get", - "path": "v2/{+sinkName}", - "description": "Gets a sink." - }, - "list": { - "description": "Lists sinks.", - "response": { - "$ref": "ListSinksResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", "parameters": { - "parent": { - "location": "path", - "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$" - }, - "pageToken": { + "updateMask": { "location": "query", - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "format": "google-fieldmask", + "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.", "type": "string" }, - "pageSize": { - "type": "integer", + "uniqueWriterIdentity": { "location": "query", - "format": "int32", - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available." + "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", + "type": "boolean" + }, + "sinkName": { + "pattern": "^folders/[^/]+/sinks/[^/]+$", + "location": "path", + "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "type": "string", + "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ], - "flatPath": "v2/folders/{foldersId}/sinks", - "id": "logging.folders.sinks.list", - "path": "v2/{+parent}/sinks" + "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", + "path": "v2/{+sinkName}", + "id": "logging.folders.sinks.patch", + "request": { + "$ref": "LogSink" + }, + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field." }, "update": { + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "request": { + "$ref": "LogSink" + }, "response": { "$ref": "LogSink" }, @@ -917,11 +1149,13 @@ "sinkName" ], "httpMethod": "PUT", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ], "parameters": { + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "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.", + "type": "string" + }, "uniqueWriterIdentity": { "location": "query", "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", @@ -935,54 +1169,110 @@ "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", "id": "logging.folders.sinks.update", - "path": "v2/{+sinkName}", - "request": { - "$ref": "LogSink" - }, - "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field." + "path": "v2/{+sinkName}" }, - "create": { - "response": { - "$ref": "LogSink" - }, + "delete": { + "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", + "path": "v2/{+sinkName}", + "id": "logging.folders.sinks.delete", + "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.", + "httpMethod": "DELETE", "parameterOrder": [ - "parent" + "sinkName" ], - "httpMethod": "POST", + "response": { + "$ref": "Empty" + }, "parameters": { - "parent": { + "sinkName": { + "pattern": "^folders/[^/]+/sinks/[^/]+$", "location": "path", - "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", + "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", "type": "string", - "required": true, - "pattern": "^folders/[^/]+$" - }, - "uniqueWriterIdentity": { - "location": "query", - "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Stackdriver Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.", - "type": "boolean" + "required": true } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/logging.admin" - ], + ] + }, + "list": { "flatPath": "v2/folders/{foldersId}/sinks", - "id": "logging.folders.sinks.create", "path": "v2/{+parent}/sinks", - "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", - "request": { - "$ref": "LogSink" - } + "id": "logging.folders.sinks.list", + "description": "Lists sinks.", + "httpMethod": "GET", + "response": { + "$ref": "ListSinksResponse" + }, + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer", + "location": "query" + }, + "parent": { + "location": "path", + "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ] } } }, "logs": { "methods": { + "delete": { + "id": "logging.folders.logs.delete", + "path": "v2/{+logName}", + "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "logName" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "logName": { + "location": "path", + "description": "Required. The resource name of the log to delete:\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\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+/logs/[^/]+$" + } + }, + "flatPath": "v2/folders/{foldersId}/logs/{logsId}" + }, "list": { - "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", "response": { "$ref": "ListLogsResponse" }, @@ -990,24 +1280,91 @@ "parent" ], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], "parameters": { + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string", + "location": "query" + }, "pageSize": { - "location": "query", "format": "int32", "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "type": "integer" + "type": "integer", + "location": "query" }, "parent": { - "pattern": "^folders/[^/]+$", - "location": "path", "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", "type": "string", - "required": true - }, - "pageToken": { + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2/folders/{foldersId}/logs", + "id": "logging.folders.logs.list", + "path": "v2/{+parent}/logs", + "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed." + } + } + }, + "exclusions": { + "methods": { + "patch": { + "request": { + "$ref": "LogExclusion" + }, + "description": "Changes one or more properties of an existing exclusion.", + "response": { + "$ref": "LogExclusion" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "updateMask": { "location": "query", - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "format": "google-fieldmask", + "description": "Required. A nonempty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an update_mask of \"filter,description\".", "type": "string" + }, + "name": { + "pattern": "^folders/[^/]+/exclusions/[^/]+$", + "location": "path", + "description": "Required. The resource name of the exclusion to update:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + "type": "string", + "required": true + } + }, + "flatPath": "v2/folders/{foldersId}/exclusions/{exclusionsId}", + "id": "logging.folders.exclusions.patch", + "path": "v2/{+name}" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "LogExclusion" + }, + "parameters": { + "name": { + "description": "Required. The resource name of an existing exclusion:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+/exclusions/[^/]+$", + "location": "path" } }, "scopes": [ @@ -1016,35 +1373,104 @@ "https://www.googleapis.com/auth/logging.admin", "https://www.googleapis.com/auth/logging.read" ], - "flatPath": "v2/folders/{foldersId}/logs", - "id": "logging.folders.logs.list", - "path": "v2/{+parent}/logs" + "flatPath": "v2/folders/{foldersId}/exclusions/{exclusionsId}", + "path": "v2/{+name}", + "id": "logging.folders.exclusions.get", + "description": "Gets the description of an exclusion." }, - "delete": { - "httpMethod": "DELETE", + "list": { + "description": "Lists all the exclusions in a parent resource.", "response": { - "$ref": "Empty" + "$ref": "ListExclusionsResponse" }, + "httpMethod": "GET", "parameterOrder": [ - "logName" + "parent" ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer" + }, + "parent": { + "description": "Required. The parent resource whose exclusions are to be listed.\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + } + }, + "flatPath": "v2/folders/{foldersId}/exclusions", + "id": "logging.folders.exclusions.list", + "path": "v2/{+parent}/exclusions" + }, + "create": { + "request": { + "$ref": "LogExclusion" + }, + "description": "Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.", + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "LogExclusion" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/logging.admin" ], "parameters": { - "logName": { - "description": "Required. The resource name of the log to delete:\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\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", + "parent": { "type": "string", "required": true, - "pattern": "^folders/[^/]+/logs/[^/]+$", + "pattern": "^folders/[^/]+$", + "location": "path", + "description": "Required. The parent resource in which to create the exclusion:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\"." + } + }, + "flatPath": "v2/folders/{foldersId}/exclusions", + "path": "v2/{+parent}/exclusions", + "id": "logging.folders.exclusions.create" + }, + "delete": { + "id": "logging.folders.exclusions.delete", + "path": "v2/{+name}", + "description": "Deletes an exclusion.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "name": { + "description": "Required. The resource name of an existing exclusion to delete:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+/exclusions/[^/]+$", "location": "path" } }, - "flatPath": "v2/folders/{foldersId}/logs/{logsId}", - "path": "v2/{+logName}", - "id": "logging.folders.logs.delete", - "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted." + "flatPath": "v2/folders/{foldersId}/exclusions/{exclusionsId}" } } } @@ -1053,62 +1479,123 @@ "monitoredResourceDescriptors": { "methods": { "list": { - "httpMethod": "GET", - "parameterOrder": [], + "description": "Lists the descriptors for monitored resource types used by Stackdriver Logging.", "response": { "$ref": "ListMonitoredResourceDescriptorsResponse" }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer", + "location": "query" + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/logging.admin", "https://www.googleapis.com/auth/logging.read" ], - "parameters": { - "pageToken": { - "location": "query", - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available." - } - }, "flatPath": "v2/monitoredResourceDescriptors", - "path": "v2/monitoredResourceDescriptors", "id": "logging.monitoredResourceDescriptors.list", - "description": "Lists the descriptors for monitored resource types used by Stackdriver Logging." + "path": "v2/monitoredResourceDescriptors" } } }, "organizations": { "resources": { - "sinks": { + "exclusions": { "methods": { - "get": { - "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", - "id": "logging.organizations.sinks.get", - "path": "v2/{+sinkName}", - "description": "Gets a sink.", + "delete": { "response": { - "$ref": "LogSink" + "$ref": "Empty" }, "parameterOrder": [ - "sinkName" + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" ], - "httpMethod": "GET", "parameters": { - "sinkName": { - "pattern": "^organizations/[^/]+/sinks/[^/]+$", + "name": { + "pattern": "^organizations/[^/]+/exclusions/[^/]+$", "location": "path", - "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "description": "Required. The resource name of an existing exclusion to delete:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", "type": "string", "required": true } }, + "flatPath": "v2/organizations/{organizationsId}/exclusions/{exclusionsId}", + "id": "logging.organizations.exclusions.delete", + "path": "v2/{+name}", + "description": "Deletes an exclusion." + }, + "patch": { + "response": { + "$ref": "LogExclusion" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "description": "Required. A nonempty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an update_mask of \"filter,description\".", + "type": "string", + "location": "query" + }, + "name": { + "location": "path", + "description": "Required. The resource name of the exclusion to update:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+/exclusions/[^/]+$" + } + }, + "flatPath": "v2/organizations/{organizationsId}/exclusions/{exclusionsId}", + "id": "logging.organizations.exclusions.patch", + "path": "v2/{+name}", + "request": { + "$ref": "LogExclusion" + }, + "description": "Changes one or more properties of an existing exclusion." + }, + "get": { + "flatPath": "v2/organizations/{organizationsId}/exclusions/{exclusionsId}", + "path": "v2/{+name}", + "id": "logging.organizations.exclusions.get", + "description": "Gets the description of an exclusion.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "LogExclusion" + }, + "parameters": { + "name": { + "location": "path", + "description": "Required. The resource name of an existing exclusion:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+/exclusions/[^/]+$" + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", @@ -1117,14 +1604,14 @@ ] }, "list": { - "description": "Lists sinks.", - "httpMethod": "GET", + "description": "Lists all the exclusions in a parent resource.", "response": { - "$ref": "ListSinksResponse" + "$ref": "ListExclusionsResponse" }, "parameterOrder": [ "parent" ], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", @@ -1134,15 +1621,15 @@ "parameters": { "parent": { "location": "path", - "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "description": "Required. The parent resource whose exclusions are to be listed.\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", "type": "string", "required": true, "pattern": "^organizations/[^/]+$" }, "pageToken": { - "location": "query", "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "type": "string" + "type": "string", + "location": "query" }, "pageSize": { "location": "query", @@ -1151,18 +1638,156 @@ "type": "integer" } }, + "flatPath": "v2/organizations/{organizationsId}/exclusions", + "id": "logging.organizations.exclusions.list", + "path": "v2/{+parent}/exclusions" + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "LogExclusion" + }, + "parameters": { + "parent": { + "description": "Required. The parent resource in which to create the exclusion:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2/organizations/{organizationsId}/exclusions", + "path": "v2/{+parent}/exclusions", + "id": "logging.organizations.exclusions.create", + "description": "Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.", + "request": { + "$ref": "LogExclusion" + } + } + } + }, + "sinks": { + "methods": { + "update": { + "id": "logging.organizations.sinks.update", + "path": "v2/{+sinkName}", + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "request": { + "$ref": "LogSink" + }, + "response": { + "$ref": "LogSink" + }, + "parameterOrder": [ + "sinkName" + ], + "httpMethod": "PUT", + "parameters": { + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "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.", + "type": "string" + }, + "uniqueWriterIdentity": { + "location": "query", + "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", + "type": "boolean" + }, + "sinkName": { + "location": "path", + "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+/sinks/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}" + }, + "delete": { + "id": "logging.organizations.sinks.delete", + "path": "v2/{+sinkName}", + "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "sinkName" + ], + "httpMethod": "DELETE", + "parameters": { + "sinkName": { + "location": "path", + "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+/sinks/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}" + }, + "list": { + "description": "Lists sinks.", + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListSinksResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer", + "location": "query" + }, + "parent": { + "location": "path", + "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+$" + } + }, "flatPath": "v2/organizations/{organizationsId}/sinks", "path": "v2/{+parent}/sinks", "id": "logging.organizations.sinks.list" }, - "update": { + "create": { "request": { "$ref": "LogSink" }, - "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", - "httpMethod": "PUT", + "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", + "httpMethod": "POST", "parameterOrder": [ - "sinkName" + "parent" ], "response": { "$ref": "LogSink" @@ -1171,32 +1796,6 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/logging.admin" ], - "parameters": { - "uniqueWriterIdentity": { - "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", - "type": "boolean", - "location": "query" - }, - "sinkName": { - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+/sinks/[^/]+$", - "location": "path", - "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\"." - } - }, - "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", - "path": "v2/{+sinkName}", - "id": "logging.organizations.sinks.update" - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "LogSink" - }, "parameters": { "parent": { "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", @@ -1211,112 +1810,146 @@ "location": "query" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ], "flatPath": "v2/organizations/{organizationsId}/sinks", "path": "v2/{+parent}/sinks", - "id": "logging.organizations.sinks.create", - "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", - "request": { - "$ref": "LogSink" - } + "id": "logging.organizations.sinks.create" }, - "delete": { - "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.", - "httpMethod": "DELETE", + "get": { + "description": "Gets a sink.", "response": { - "$ref": "Empty" + "$ref": "LogSink" }, "parameterOrder": [ "sinkName" ], + "httpMethod": "GET", "parameters": { "sinkName": { - "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "location": "path", + "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", "type": "string", "required": true, - "pattern": "^organizations/[^/]+/sinks/[^/]+$", - "location": "path" + "pattern": "^organizations/[^/]+/sinks/[^/]+$" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ], - "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", - "path": "v2/{+sinkName}", - "id": "logging.organizations.sinks.delete" - } - } - }, - "logs": { - "methods": { - "delete": { - "httpMethod": "DELETE", - "parameterOrder": [ - "logName" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "logName": { - "pattern": "^organizations/[^/]+/logs/[^/]+$", - "location": "path", - "description": "Required. The resource name of the log to delete:\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\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ], - "flatPath": "v2/organizations/{organizationsId}/logs/{logsId}", - "path": "v2/{+logName}", - "id": "logging.organizations.logs.delete", - "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted." - }, - "list": { - "path": "v2/{+parent}/logs", - "id": "logging.organizations.logs.list", - "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "ListLogsResponse" - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/logging.admin", "https://www.googleapis.com/auth/logging.read" ], + "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", + "id": "logging.organizations.sinks.get", + "path": "v2/{+sinkName}" + }, + "patch": { + "request": { + "$ref": "LogSink" + }, + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "response": { + "$ref": "LogSink" + }, + "parameterOrder": [ + "sinkName" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "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.", + "type": "string", + "location": "query" + }, + "uniqueWriterIdentity": { + "location": "query", + "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", + "type": "boolean" + }, + "sinkName": { + "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+/sinks/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", + "id": "logging.organizations.sinks.patch", + "path": "v2/{+sinkName}" + } + } + }, + "logs": { + "methods": { + "list": { + "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", + "response": { + "$ref": "ListLogsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", "parameters": { "parent": { + "pattern": "^organizations/[^/]+$", "location": "path", "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$" + "required": true }, "pageToken": { - "location": "query", "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "type": "string" + "type": "string", + "location": "query" }, "pageSize": { - "type": "integer", - "location": "query", "format": "int32", - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available." + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer", + "location": "query" } }, - "flatPath": "v2/organizations/{organizationsId}/logs" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2/organizations/{organizationsId}/logs", + "id": "logging.organizations.logs.list", + "path": "v2/{+parent}/logs" + }, + "delete": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "logName": { + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+/logs/[^/]+$", + "location": "path", + "description": "Required. The resource name of the log to delete:\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\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry." + } + }, + "flatPath": "v2/organizations/{organizationsId}/logs/{logsId}", + "id": "logging.organizations.logs.delete", + "path": "v2/{+logName}", + "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "logName" + ], + "httpMethod": "DELETE" } } } @@ -1329,11 +1962,11 @@ "$ref": "ListLogEntriesRequest" }, "description": "Lists log entries. Use this method to retrieve log entries from Stackdriver Logging. For ways to export log entries, see Exporting Logs.", - "httpMethod": "POST", - "parameterOrder": [], "response": { "$ref": "ListLogEntriesResponse" }, + "parameterOrder": [], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", @@ -1342,8 +1975,8 @@ ], "parameters": {}, "flatPath": "v2/entries:list", - "path": "v2/entries:list", - "id": "logging.entries.list" + "id": "logging.entries.list", + "path": "v2/entries:list" }, "write": { "response": { @@ -1360,7 +1993,7 @@ "flatPath": "v2/entries:write", "id": "logging.entries.write", "path": "v2/entries:write", - "description": "Writes log entries to Stackdriver Logging.", + "description": "Log entry resourcesWrites log entries to Stackdriver Logging. This API method is the only way to send log entries to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver Logging agent (fluentd) and all logging libraries configured to use Stackdriver Logging.", "request": { "$ref": "WriteLogEntriesRequest" } @@ -1369,22 +2002,21 @@ }, "projects": { "resources": { - "sinks": { + "exclusions": { "methods": { "delete": { - "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.", "response": { "$ref": "Empty" }, "parameterOrder": [ - "sinkName" + "name" ], "httpMethod": "DELETE", "parameters": { - "sinkName": { - "pattern": "^projects/[^/]+/sinks/[^/]+$", + "name": { + "pattern": "^projects/[^/]+/exclusions/[^/]+$", "location": "path", - "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "description": "Required. The resource name of an existing exclusion to delete:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", "type": "string", "required": true } @@ -1393,179 +2025,205 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/logging.admin" ], - "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", - "id": "logging.projects.sinks.delete", - "path": "v2/{+sinkName}" + "flatPath": "v2/projects/{projectsId}/exclusions/{exclusionsId}", + "id": "logging.projects.exclusions.delete", + "path": "v2/{+name}", + "description": "Deletes an exclusion." }, - "get": { - "response": { - "$ref": "LogSink" + "patch": { + "flatPath": "v2/projects/{projectsId}/exclusions/{exclusionsId}", + "path": "v2/{+name}", + "id": "logging.projects.exclusions.patch", + "request": { + "$ref": "LogExclusion" }, - "httpMethod": "GET", + "description": "Changes one or more properties of an existing exclusion.", + "httpMethod": "PATCH", "parameterOrder": [ - "sinkName" + "name" + ], + "response": { + "$ref": "LogExclusion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" ], "parameters": { - "sinkName": { - "pattern": "^projects/[^/]+/sinks/[^/]+$", + "updateMask": { + "type": "string", + "location": "query", + "format": "google-fieldmask", + "description": "Required. A nonempty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an update_mask of \"filter,description\"." + }, + "name": { + "pattern": "^projects/[^/]+/exclusions/[^/]+$", "location": "path", - "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "description": "Required. The resource name of the exclusion to update:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", "type": "string", "required": true } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ], - "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", - "id": "logging.projects.sinks.get", - "path": "v2/{+sinkName}", - "description": "Gets a sink." + } }, - "list": { + "get": { + "description": "Gets the description of an exclusion.", "response": { - "$ref": "ListSinksResponse" + "$ref": "LogExclusion" }, + "parameterOrder": [ + "name" + ], "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "location": "path", - "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "type": "string", - "location": "query" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available." - } - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/logging.admin", "https://www.googleapis.com/auth/logging.read" ], - "flatPath": "v2/projects/{projectsId}/sinks", - "id": "logging.projects.sinks.list", - "path": "v2/{+parent}/sinks", - "description": "Lists sinks." - }, - "update": { - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "sinkName" - ], - "httpMethod": "PUT", "parameters": { - "uniqueWriterIdentity": { - "location": "query", - "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", - "type": "boolean" - }, - "sinkName": { - "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "name": { + "description": "Required. The resource name of an existing exclusion:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", "type": "string", "required": true, - "pattern": "^projects/[^/]+/sinks/[^/]+$", + "pattern": "^projects/[^/]+/exclusions/[^/]+$", "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ], - "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", - "id": "logging.projects.sinks.update", - "path": "v2/{+sinkName}", - "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", - "request": { - "$ref": "LogSink" - } + "flatPath": "v2/projects/{projectsId}/exclusions/{exclusionsId}", + "id": "logging.projects.exclusions.get", + "path": "v2/{+name}" }, - "create": { - "httpMethod": "POST", + "list": { + "response": { + "$ref": "ListExclusionsResponse" + }, "parameterOrder": [ "parent" ], - "response": { - "$ref": "LogSink" + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "parent": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The parent resource whose exclusions are to be listed.\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "type": "string", + "required": true + }, + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer" + } }, + "flatPath": "v2/projects/{projectsId}/exclusions", + "id": "logging.projects.exclusions.list", + "path": "v2/{+parent}/exclusions", + "description": "Lists all the exclusions in a parent resource." + }, + "create": { + "response": { + "$ref": "LogExclusion" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/logging.admin" ], "parameters": { "parent": { - "type": "string", - "required": true, "pattern": "^projects/[^/]+$", "location": "path", - "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\"." - }, - "uniqueWriterIdentity": { - "location": "query", - "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Stackdriver Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.", - "type": "boolean" + "description": "Required. The parent resource in which to create the exclusion:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", + "type": "string", + "required": true } }, - "flatPath": "v2/projects/{projectsId}/sinks", - "path": "v2/{+parent}/sinks", - "id": "logging.projects.sinks.create", + "flatPath": "v2/projects/{projectsId}/exclusions", + "id": "logging.projects.exclusions.create", + "path": "v2/{+parent}/exclusions", "request": { - "$ref": "LogSink" + "$ref": "LogExclusion" }, - "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink." + "description": "Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource." } } }, - "logs": { + "metrics": { "methods": { "delete": { - "httpMethod": "DELETE", + "description": "Deletes a logs-based metric.", "response": { "$ref": "Empty" }, + "httpMethod": "DELETE", "parameterOrder": [ - "logName" + "metricName" ], "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.write" ], "parameters": { - "logName": { - "description": "Required. The resource name of the log to delete:\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\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", + "metricName": { + "location": "path", + "description": "The resource name of the metric to delete:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n", "type": "string", "required": true, - "pattern": "^projects/[^/]+/logs/[^/]+$", - "location": "path" + "pattern": "^projects/[^/]+/metrics/[^/]+$" } }, - "flatPath": "v2/projects/{projectsId}/logs/{logsId}", - "path": "v2/{+logName}", - "id": "logging.projects.logs.delete", - "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted." + "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}", + "id": "logging.projects.metrics.delete", + "path": "v2/{+metricName}" + }, + "get": { + "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}", + "path": "v2/{+metricName}", + "id": "logging.projects.metrics.get", + "description": "Gets a logs-based metric.", + "httpMethod": "GET", + "response": { + "$ref": "LogMetric" + }, + "parameterOrder": [ + "metricName" + ], + "parameters": { + "metricName": { + "location": "path", + "description": "The resource name of the desired metric:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/metrics/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ] }, "list": { - "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", + "description": "Lists logs-based metrics.", "response": { - "$ref": "ListLogsResponse" + "$ref": "ListLogMetricsResponse" }, "parameterOrder": [ "parent" @@ -1589,103 +2247,6 @@ "type": "integer", "location": "query" }, - "parent": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n" - } - }, - "flatPath": "v2/projects/{projectsId}/logs", - "id": "logging.projects.logs.list", - "path": "v2/{+parent}/logs" - } - } - }, - "metrics": { - "methods": { - "delete": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "metricName" - ], - "httpMethod": "DELETE", - "parameters": { - "metricName": { - "description": "The resource name of the metric to delete:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/metrics/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.write" - ], - "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}", - "id": "logging.projects.metrics.delete", - "path": "v2/{+metricName}", - "description": "Deletes a logs-based metric." - }, - "get": { - "httpMethod": "GET", - "response": { - "$ref": "LogMetric" - }, - "parameterOrder": [ - "metricName" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ], - "parameters": { - "metricName": { - "pattern": "^projects/[^/]+/metrics/[^/]+$", - "location": "path", - "description": "The resource name of the desired metric:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n", - "type": "string", - "required": true - } - }, - "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}", - "path": "v2/{+metricName}", - "id": "logging.projects.metrics.get", - "description": "Gets a logs-based metric." - }, - "list": { - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "response": { - "$ref": "ListLogMetricsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ], - "parameters": { - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "type": "integer" - }, "parent": { "description": "Required. The name of the project containing the metrics:\n\"projects/[PROJECT_ID]\"\n", "type": "string", @@ -1696,8 +2257,7 @@ }, "flatPath": "v2/projects/{projectsId}/metrics", "id": "logging.projects.metrics.list", - "path": "v2/{+parent}/metrics", - "description": "Lists logs-based metrics." + "path": "v2/{+parent}/metrics" }, "update": { "httpMethod": "PUT", @@ -1730,12 +2290,6 @@ } }, "create": { - "id": "logging.projects.metrics.create", - "path": "v2/{+parent}/metrics", - "description": "Creates a logs-based metric.", - "request": { - "$ref": "LogMetric" - }, "response": { "$ref": "LogMetric" }, @@ -1745,11 +2299,11 @@ "httpMethod": "POST", "parameters": { "parent": { - "description": "The resource name of the project in which to create the metric:\n\"projects/[PROJECT_ID]\"\nThe new metric must be provided in the request.", "type": "string", "required": true, "pattern": "^projects/[^/]+$", - "location": "path" + "location": "path", + "description": "The resource name of the project in which to create the metric:\n\"projects/[PROJECT_ID]\"\nThe new metric must be provided in the request." } }, "scopes": [ @@ -1757,7 +2311,293 @@ "https://www.googleapis.com/auth/logging.admin", "https://www.googleapis.com/auth/logging.write" ], - "flatPath": "v2/projects/{projectsId}/metrics" + "flatPath": "v2/projects/{projectsId}/metrics", + "id": "logging.projects.metrics.create", + "path": "v2/{+parent}/metrics", + "description": "Creates a logs-based metric.", + "request": { + "$ref": "LogMetric" + } + } + } + }, + "sinks": { + "methods": { + "get": { + "id": "logging.projects.sinks.get", + "path": "v2/{+sinkName}", + "description": "Gets a sink.", + "response": { + "$ref": "LogSink" + }, + "parameterOrder": [ + "sinkName" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "sinkName": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/sinks/[^/]+$", + "location": "path", + "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\"." + } + }, + "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}" + }, + "patch": { + "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", + "path": "v2/{+sinkName}", + "id": "logging.projects.sinks.patch", + "request": { + "$ref": "LogSink" + }, + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "httpMethod": "PATCH", + "parameterOrder": [ + "sinkName" + ], + "response": { + "$ref": "LogSink" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "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.", + "type": "string", + "location": "query" + }, + "uniqueWriterIdentity": { + "location": "query", + "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", + "type": "boolean" + }, + "sinkName": { + "location": "path", + "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/sinks/[^/]+$" + } + } + }, + "update": { + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "request": { + "$ref": "LogSink" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "sinkName" + ], + "response": { + "$ref": "LogSink" + }, + "parameters": { + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "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.", + "type": "string" + }, + "uniqueWriterIdentity": { + "location": "query", + "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", + "type": "boolean" + }, + "sinkName": { + "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/sinks/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", + "path": "v2/{+sinkName}", + "id": "logging.projects.sinks.update" + }, + "delete": { + "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", + "path": "v2/{+sinkName}", + "id": "logging.projects.sinks.delete", + "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.", + "httpMethod": "DELETE", + "parameterOrder": [ + "sinkName" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "sinkName": { + "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/sinks/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ] + }, + "list": { + "response": { + "$ref": "ListSinksResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer" + }, + "parent": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n" + }, + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2/projects/{projectsId}/sinks", + "id": "logging.projects.sinks.list", + "path": "v2/{+parent}/sinks", + "description": "Lists sinks." + }, + "create": { + "flatPath": "v2/projects/{projectsId}/sinks", + "id": "logging.projects.sinks.create", + "path": "v2/{+parent}/sinks", + "request": { + "$ref": "LogSink" + }, + "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", + "response": { + "$ref": "LogSink" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "parent": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", + "type": "string", + "required": true + }, + "uniqueWriterIdentity": { + "location": "query", + "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Stackdriver Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.", + "type": "boolean" + } + } + } + } + }, + "logs": { + "methods": { + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "logName" + ], + "httpMethod": "DELETE", + "parameters": { + "logName": { + "pattern": "^projects/[^/]+/logs/[^/]+$", + "location": "path", + "description": "Required. The resource name of the log to delete:\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\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2/projects/{projectsId}/logs/{logsId}", + "id": "logging.projects.logs.delete", + "path": "v2/{+logName}", + "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted." + }, + "list": { + "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", + "httpMethod": "GET", + "response": { + "$ref": "ListLogsResponse" + }, + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2/projects/{projectsId}/logs", + "path": "v2/{+parent}/logs", + "id": "logging.projects.logs.list" } } } @@ -1765,9 +2605,172 @@ }, "billingAccounts": { "resources": { + "exclusions": { + "methods": { + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "LogExclusion" + }, + "parameters": { + "parent": { + "location": "path", + "description": "Required. The parent resource in which to create the exclusion:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", + "type": "string", + "required": true, + "pattern": "^billingAccounts/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions", + "path": "v2/{+parent}/exclusions", + "id": "logging.billingAccounts.exclusions.create", + "description": "Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.", + "request": { + "$ref": "LogExclusion" + } + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "name": { + "location": "path", + "description": "Required. The resource name of an existing exclusion to delete:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + "type": "string", + "required": true, + "pattern": "^billingAccounts/[^/]+/exclusions/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions/{exclusionsId}", + "path": "v2/{+name}", + "id": "logging.billingAccounts.exclusions.delete", + "description": "Deletes an exclusion." + }, + "patch": { + "response": { + "$ref": "LogExclusion" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PATCH", + "parameters": { + "updateMask": { + "type": "string", + "location": "query", + "format": "google-fieldmask", + "description": "Required. A nonempty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an update_mask of \"filter,description\"." + }, + "name": { + "pattern": "^billingAccounts/[^/]+/exclusions/[^/]+$", + "location": "path", + "description": "Required. The resource name of the exclusion to update:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions/{exclusionsId}", + "id": "logging.billingAccounts.exclusions.patch", + "path": "v2/{+name}", + "description": "Changes one or more properties of an existing exclusion.", + "request": { + "$ref": "LogExclusion" + } + }, + "get": { + "description": "Gets the description of an exclusion.", + "httpMethod": "GET", + "response": { + "$ref": "LogExclusion" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "name": { + "pattern": "^billingAccounts/[^/]+/exclusions/[^/]+$", + "location": "path", + "description": "Required. The resource name of an existing exclusion:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + "type": "string", + "required": true + } + }, + "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions/{exclusionsId}", + "path": "v2/{+name}", + "id": "logging.billingAccounts.exclusions.get" + }, + "list": { + "response": { + "$ref": "ListExclusionsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer" + }, + "parent": { + "pattern": "^billingAccounts/[^/]+$", + "location": "path", + "description": "Required. The parent resource whose exclusions are to be listed.\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions", + "id": "logging.billingAccounts.exclusions.list", + "path": "v2/{+parent}/exclusions", + "description": "Lists all the exclusions in a parent resource." + } + } + }, "sinks": { "methods": { "get": { + "path": "v2/{+sinkName}", + "id": "logging.billingAccounts.sinks.get", "description": "Gets a sink.", "httpMethod": "GET", "parameterOrder": [ @@ -1778,11 +2781,11 @@ }, "parameters": { "sinkName": { - "type": "string", - "required": true, "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$", "location": "path", - "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\"." + "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "type": "string", + "required": true } }, "scopes": [ @@ -1791,51 +2794,14 @@ "https://www.googleapis.com/auth/logging.admin", "https://www.googleapis.com/auth/logging.read" ], - "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", - "path": "v2/{+sinkName}", - "id": "logging.billingAccounts.sinks.get" + "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}" }, - "list": { - "id": "logging.billingAccounts.sinks.list", - "path": "v2/{+parent}/sinks", - "description": "Lists sinks.", - "response": { - "$ref": "ListSinksResponse" + "patch": { + "request": { + "$ref": "LogSink" }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ], - "parameters": { - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available." - }, - "parent": { - "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", - "type": "string", - "required": true, - "pattern": "^billingAccounts/[^/]+$", - "location": "path" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks" - }, - "update": { - "httpMethod": "PUT", + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "httpMethod": "PATCH", "parameterOrder": [ "sinkName" ], @@ -1847,28 +2813,139 @@ "https://www.googleapis.com/auth/logging.admin" ], "parameters": { + "updateMask": { + "type": "string", + "location": "query", + "format": "google-fieldmask", + "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." + }, "uniqueWriterIdentity": { "location": "query", "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", "type": "boolean" }, "sinkName": { + "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "type": "string", + "required": true, "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", + "path": "v2/{+sinkName}", + "id": "logging.billingAccounts.sinks.patch" + }, + "update": { + "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", + "id": "logging.billingAccounts.sinks.update", + "path": "v2/{+sinkName}", + "request": { + "$ref": "LogSink" + }, + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "response": { + "$ref": "LogSink" + }, + "parameterOrder": [ + "sinkName" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "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.", + "type": "string", + "location": "query" + }, + "uniqueWriterIdentity": { + "location": "query", + "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", + "type": "boolean" + }, + "sinkName": { "location": "path", "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", "type": "string", + "required": true, + "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$" + } + } + }, + "delete": { + "parameterOrder": [ + "sinkName" + ], + "response": { + "$ref": "Empty" + }, + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "sinkName": { + "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$", + "location": "path", + "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "type": "string", "required": true } }, "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", + "id": "logging.billingAccounts.sinks.delete", "path": "v2/{+sinkName}", - "id": "logging.billingAccounts.sinks.update", + "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted." + }, + "list": { + "path": "v2/{+parent}/sinks", + "id": "logging.billingAccounts.sinks.list", + "description": "Lists sinks.", + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListSinksResponse" + }, + "parameters": { + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer", + "location": "query" + }, + "parent": { + "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "type": "string", + "required": true, + "pattern": "^billingAccounts/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks" + }, + "create": { "request": { "$ref": "LogSink" }, - "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field." - }, - "create": { + "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", "response": { "$ref": "LogSink" }, @@ -1882,60 +2959,27 @@ ], "parameters": { "parent": { + "type": "string", + "required": true, "pattern": "^billingAccounts/[^/]+$", "location": "path", - "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", - "type": "string", - "required": true + "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\"." }, "uniqueWriterIdentity": { + "location": "query", "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Stackdriver Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.", - "type": "boolean", - "location": "query" + "type": "boolean" } }, "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks", "id": "logging.billingAccounts.sinks.create", - "path": "v2/{+parent}/sinks", - "request": { - "$ref": "LogSink" - }, - "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink." - }, - "delete": { - "parameterOrder": [ - "sinkName" - ], - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ], - "parameters": { - "sinkName": { - "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", - "type": "string", - "required": true, - "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$", - "location": "path" - } - }, - "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", - "id": "logging.billingAccounts.sinks.delete", - "path": "v2/{+sinkName}", - "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted." + "path": "v2/{+parent}/sinks" } } }, "logs": { "methods": { "delete": { - "flatPath": "v2/billingAccounts/{billingAccountsId}/logs/{logsId}", - "id": "logging.billingAccounts.logs.delete", - "path": "v2/{+logName}", "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted.", "response": { "$ref": "Empty" @@ -1944,10 +2988,6 @@ "logName" ], "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ], "parameters": { "logName": { "description": "Required. The resource name of the log to delete:\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\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", @@ -1956,9 +2996,17 @@ "pattern": "^billingAccounts/[^/]+/logs/[^/]+$", "location": "path" } - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2/billingAccounts/{billingAccountsId}/logs/{logsId}", + "id": "logging.billingAccounts.logs.delete", + "path": "v2/{+logName}" }, "list": { + "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", "httpMethod": "GET", "response": { "$ref": "ListLogsResponse" @@ -1966,36 +3014,35 @@ "parameterOrder": [ "parent" ], - "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "type": "integer" - }, - "parent": { - "location": "path", - "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", - "type": "string", - "required": true, - "pattern": "^billingAccounts/[^/]+$" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "type": "string", - "location": "query" - } - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/logging.admin", "https://www.googleapis.com/auth/logging.read" ], + "parameters": { + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "type": "integer", + "location": "query", + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available." + }, + "parent": { + "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "type": "string", + "required": true, + "pattern": "^billingAccounts/[^/]+$", + "location": "path" + } + }, "flatPath": "v2/billingAccounts/{billingAccountsId}/logs", "path": "v2/{+parent}/logs", - "id": "logging.billingAccounts.logs.list", - "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed." + "id": "logging.billingAccounts.logs.list" } } } @@ -2004,30 +3051,30 @@ }, "parameters": { "quotaUser": { + "location": "query", "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.", - "type": "string", - "location": "query" + "type": "string" }, "pp": { + "location": "query", "description": "Pretty-print response.", "default": "true", - "type": "boolean", - "location": "query" + "type": "boolean" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" }, "oauth_token": { "description": "OAuth 2.0 token for the current user.", "type": "string", "location": "query" }, - "bearer_token": { - "type": "string", - "location": "query", - "description": "OAuth bearer token." - }, "upload_protocol": { + "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" }, "prettyPrint": { "description": "Returns response with indentations and line breaks.", @@ -2036,22 +3083,16 @@ "location": "query" }, "uploadType": { + "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" }, "fields": { "location": "query", "description": "Selector specifying which fields to include in a partial response.", "type": "string" }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, "$.xgafv": { - "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -2061,7 +3102,13 @@ "1", "2" ], - "description": "V1 error format." + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "type": "string", + "location": "query", + "description": "JSONP" }, "alt": { "description": "Data format for response.", @@ -2085,15 +3132,10 @@ "type": "string" }, "access_token": { - "type": "string", "location": "query", - "description": "OAuth access token." + "description": "OAuth access token.", + "type": "string" } }, - "version": "v2", - "baseUrl": "https://logging.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Writes log entries and manages your Stackdriver Logging configuration.", - "servicePath": "", - "basePath": "" + "version": "v2" } 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 d0ade0438..16350dfe8 100644 --- a/vendor/google.golang.org/api/logging/v2/logging-gen.go +++ b/vendor/google.golang.org/api/logging/v2/logging-gen.go @@ -104,6 +104,7 @@ func (s *Service) userAgent() string { func NewBillingAccountsService(s *Service) *BillingAccountsService { rs := &BillingAccountsService{s: s} + rs.Exclusions = NewBillingAccountsExclusionsService(s) rs.Logs = NewBillingAccountsLogsService(s) rs.Sinks = NewBillingAccountsSinksService(s) return rs @@ -112,11 +113,22 @@ func NewBillingAccountsService(s *Service) *BillingAccountsService { type BillingAccountsService struct { s *Service + Exclusions *BillingAccountsExclusionsService + Logs *BillingAccountsLogsService Sinks *BillingAccountsSinksService } +func NewBillingAccountsExclusionsService(s *Service) *BillingAccountsExclusionsService { + rs := &BillingAccountsExclusionsService{s: s} + return rs +} + +type BillingAccountsExclusionsService struct { + s *Service +} + func NewBillingAccountsLogsService(s *Service) *BillingAccountsLogsService { rs := &BillingAccountsLogsService{s: s} return rs @@ -146,6 +158,7 @@ type EntriesService struct { func NewFoldersService(s *Service) *FoldersService { rs := &FoldersService{s: s} + rs.Exclusions = NewFoldersExclusionsService(s) rs.Logs = NewFoldersLogsService(s) rs.Sinks = NewFoldersSinksService(s) return rs @@ -154,11 +167,22 @@ func NewFoldersService(s *Service) *FoldersService { type FoldersService struct { s *Service + Exclusions *FoldersExclusionsService + Logs *FoldersLogsService Sinks *FoldersSinksService } +func NewFoldersExclusionsService(s *Service) *FoldersExclusionsService { + rs := &FoldersExclusionsService{s: s} + return rs +} + +type FoldersExclusionsService struct { + s *Service +} + func NewFoldersLogsService(s *Service) *FoldersLogsService { rs := &FoldersLogsService{s: s} return rs @@ -188,6 +212,7 @@ type MonitoredResourceDescriptorsService struct { func NewOrganizationsService(s *Service) *OrganizationsService { rs := &OrganizationsService{s: s} + rs.Exclusions = NewOrganizationsExclusionsService(s) rs.Logs = NewOrganizationsLogsService(s) rs.Sinks = NewOrganizationsSinksService(s) return rs @@ -196,11 +221,22 @@ func NewOrganizationsService(s *Service) *OrganizationsService { type OrganizationsService struct { s *Service + Exclusions *OrganizationsExclusionsService + Logs *OrganizationsLogsService Sinks *OrganizationsSinksService } +func NewOrganizationsExclusionsService(s *Service) *OrganizationsExclusionsService { + rs := &OrganizationsExclusionsService{s: s} + return rs +} + +type OrganizationsExclusionsService struct { + s *Service +} + func NewOrganizationsLogsService(s *Service) *OrganizationsLogsService { rs := &OrganizationsLogsService{s: s} return rs @@ -221,6 +257,7 @@ type OrganizationsSinksService struct { func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} + rs.Exclusions = NewProjectsExclusionsService(s) rs.Logs = NewProjectsLogsService(s) rs.Metrics = NewProjectsMetricsService(s) rs.Sinks = NewProjectsSinksService(s) @@ -230,6 +267,8 @@ func NewProjectsService(s *Service) *ProjectsService { type ProjectsService struct { s *Service + Exclusions *ProjectsExclusionsService + Logs *ProjectsLogsService Metrics *ProjectsMetricsService @@ -237,6 +276,15 @@ type ProjectsService struct { Sinks *ProjectsSinksService } +func NewProjectsExclusionsService(s *Service) *ProjectsExclusionsService { + rs := &ProjectsExclusionsService{s: s} + return rs +} + +type ProjectsExclusionsService struct { + s *Service +} + func NewProjectsLogsService(s *Service) *ProjectsLogsService { rs := &ProjectsLogsService{s: s} return rs @@ -264,6 +312,55 @@ type ProjectsSinksService struct { s *Service } +// 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) +} + // 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 @@ -279,6 +376,96 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// 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 +} + // HttpRequest: A common proto for logging HTTP requests. Only contains // semantics defined by the HTTP specification. Product-specific logging // information MUST be defined in a separate message. @@ -303,6 +490,10 @@ type HttpRequest struct { // the request was received until the response was sent. Latency string `json:"latency,omitempty"` + // Protocol: Protocol used for the request. Examples: "HTTP/1.1", + // "HTTP/2", "websocket" + Protocol string `json:"protocol,omitempty"` + // Referer: The referer URL of the request, as defined in HTTP/1.1 // Header Field Definitions // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). @@ -405,6 +596,100 @@ func (s *LabelDescriptor) MarshalJSON() ([]byte, error) { 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 +} + +// ListExclusionsResponse: Result returned from ListExclusions. +type ListExclusionsResponse struct { + // Exclusions: A list of exclusions. + Exclusions []*LogExclusion `json:"exclusions,omitempty"` + + // NextPageToken: If there might be more results than appear in this + // response, then nextPageToken is included. To get the next set of + // results, call the same method again using the value of nextPageToken + // as pageToken. + 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. "Exclusions") 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. "Exclusions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListExclusionsResponse) MarshalJSON() ([]byte, error) { + type noMethod ListExclusionsResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListLogEntriesRequest: The parameters to ListLogEntries. type ListLogEntriesRequest struct { // Filter: Optional. A filter that chooses which log entries to return. @@ -480,7 +765,9 @@ func (s *ListLogEntriesRequest) MarshalJSON() ([]byte, error) { // ListLogEntriesResponse: Result returned from ListLogEntries. type ListLogEntriesResponse struct { - // Entries: A list of log entries. + // Entries: A list of log entries. If entries is empty, nextPageToken + // may still be returned, indicating that more entries may exist. See + // nextPageToken for more information. Entries []*LogEntry `json:"entries,omitempty"` // NextPageToken: If there might be more results than those appearing in @@ -687,9 +974,9 @@ type LogEntry struct { // provide a value, then Stackdriver Logging considers other log entries // in the same project, with the same timestamp, and with the same // insert_id to be duplicates which can be removed. If omitted in new - // log entries, then Stackdriver Logging will insert its own unique - // identifier. The insert_id is used to order log entries that have the - // same timestamp value. + // log entries, then Stackdriver Logging assigns its own unique + // identifier. The insert_id is also used to order log entries that have + // the same timestamp value. InsertId string `json:"insertId,omitempty"` // JsonPayload: The log entry payload, represented as a structure that @@ -767,10 +1054,12 @@ type LogEntry struct { TextPayload string `json:"textPayload,omitempty"` // Timestamp: Optional. The time the event described by the log entry - // occurred. If omitted in a new log entry, Stackdriver Logging will - // insert the time the log entry is received. Stackdriver Logging might - // reject log entries whose time stamps are more than a couple of hours - // in the future. Log entries with time stamps in the past are accepted. + // occurred. This time is used to compute the log entry's age and to + // enforce the logs retention period. If this field is omitted in a new + // log entry, then Stackdriver Logging assigns it the current + // time.Incoming log entries should have timestamps that are no more + // than the logs retention period in the past, and no more than 24 hours + // in the future. See the entries.write API method for more information. Timestamp string `json:"timestamp,omitempty"` // Trace: Optional. Resource name of the trace associated with the log @@ -887,6 +1176,64 @@ func (s *LogEntrySourceLocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LogExclusion: Specifies a set of log entries that are not to be +// stored in Stackdriver Logging. If your project receives a large +// volume of logs, you might be able to use exclusions to reduce your +// chargeable logs. Exclusions are processed after log sinks, so you can +// export log entries before they are excluded. Audit log entries and +// log entries from Amazon Web Services are never excluded. +type LogExclusion struct { + // Description: Optional. A description of this exclusion. + Description string `json:"description,omitempty"` + + // Disabled: Optional. If set to True, then this exclusion is disabled + // and it does not exclude any log entries. You can use exclusions.patch + // to change the value of this field. + Disabled bool `json:"disabled,omitempty"` + + // Filter: Required. An advanced logs filter that matches the log + // entries to be excluded. By using the sample function, you can exclude + // less than 100% of the matching log entries. For example, the + // following filter matches 99% of low-severity log entries from load + // balancers: + // "resource.type=http_load_balancer severity=ERROR // Filter string `json:"filter,omitempty"` @@ -1073,10 +1473,8 @@ type LogSink struct { // "V1" - LogEntry version 1 format. OutputVersionFormat string `json:"outputVersionFormat,omitempty"` - // StartTime: Optional. The time at which this sink will begin exporting - // log entries. Log entries are exported only if their timestamp is not - // earlier than the start time. The default value of this field is the - // time the sink is created or updated. + // 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 @@ -1117,6 +1515,154 @@ func (s *LogSink) MarshalJSON() ([]byte, error) { 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". + 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"` + + // 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. Depending on the + // implementation, the name typically includes: (1) the parent resource + // name that defines the scope of the metric type or of its data; and + // (2) the metric's URL-encoded type, which also appears in the type + // field of this descriptor. For example, following is the resource name + // of a custom metric within the GCP project + // my-project-id: + // "projects/my-project-id/metricDescriptors/custom.google + // apis.com%2Finvoice%2Fpaid%2Famount" + // + Name string `json:"name,omitempty"` + + // Type: The metric type, including its DNS name prefix. The type is not + // URL-encoded. All user-defined custom metric types have the DNS name + // custom.googleapis.com. Metric types should use a natural hierarchical + // grouping. For + // example: + // "custom.googleapis.com/invoice/paid/amount" + // "appengine.google + // apis.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 includes the dimensionless unit 1, + // such as 1/s.The grammar also includes these connectors: + // / division (as an infix operator, e.g. 1/s). + // . multiplication (as an infix operator, e.g. GBy.d)The grammar for a + // unit is as follows: + // Expression = Component { "." Component } { "/" Component } + // ; + // + // Component = [ PREFIX ] UNIT [ Annotation ] + // | Annotation + // | "1" + // ; + // + // Annotation = "{" NAME "}" ; + // Notes: + // Annotation is just a comment if it follows a UNIT and is equivalent + // to 1 if it is used alone. For examples, {requests}/s == 1/s, + // By{transmitted}/s == By/s. + // NAME is a sequence of non-blank printable ASCII characters not + // containing '{' or '}'. + Unit string `json:"unit,omitempty"` + + // 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"` + + // 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) +} + // 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 @@ -1464,17 +2010,23 @@ func (s *SourceReference) MarshalJSON() ([]byte, error) { // WriteLogEntriesRequest: The parameters to WriteLogEntries. type WriteLogEntriesRequest struct { - // Entries: Required. The log entries to write. Values supplied for the - // fields log_name, resource, and labels in this entries.write request - // are inserted into those log entries in this list that do not provide - // their own values.Stackdriver Logging also creates and inserts values - // for timestamp and insert_id if the entries do not provide them. The - // created insert_id for the N'th entry in this list will be greater - // than earlier entries and less than later entries. Otherwise, the - // order of log entries in this list does not matter.To improve - // throughput and to avoid exceeding the quota limit for calls to - // entries.write, you should write multiple log entries at once rather - // than calling this method for each individual log entry. + // Entries: Required. The log entries to send to Stackdriver Logging. + // The order of log entries in this list does not matter. Values + // supplied in this method's log_name, resource, and labels fields are + // copied into those log entries in this list that do not include values + // for their corresponding fields. For more information, see the + // LogEntry type.If the timestamp or insert_id fields are missing in log + // entries, then this method supplies the current time or a unique + // identifier, respectively. The supplied values are chosen so that, + // among the log entries that did not supply their own values, the + // entries earlier in the list will sort before the entries later in the + // list. See the entries.list method.Log entries with timestamps that + // are more than the logs retention period in the past or more than 24 + // hours in the future might be discarded. Discarding does not return an + // error.To improve throughput and to avoid exceeding the quota limit + // for calls to entries.write, you should try to include several log + // entries in this list, rather than calling this method for each + // individual log entry. Entries []*LogEntry `json:"entries,omitempty"` // Labels: Optional. Default labels that are added to the labels field @@ -1546,6 +2098,759 @@ type WriteLogEntriesResponse struct { googleapi.ServerResponse `json:"-"` } +// method id "logging.billingAccounts.exclusions.create": + +type BillingAccountsExclusionsCreateCall struct { + s *Service + parent string + logexclusion *LogExclusion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new exclusion in a specified parent resource. Only +// log entries belonging to that resource can be excluded. You can have +// up to 10 exclusions in a resource. +func (r *BillingAccountsExclusionsService) Create(parent string, logexclusion *LogExclusion) *BillingAccountsExclusionsCreateCall { + c := &BillingAccountsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logexclusion = logexclusion + 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 *BillingAccountsExclusionsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsCreateCall { + 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 *BillingAccountsExclusionsCreateCall) Context(ctx context.Context) *BillingAccountsExclusionsCreateCall { + 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 *BillingAccountsExclusionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsExclusionsCreateCall) 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.logexclusion) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.billingAccounts.exclusions.create" call. +// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *LogExclusion.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BillingAccountsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, 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 := &LogExclusion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.", + // "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions", + // "httpMethod": "POST", + // "id": "logging.billingAccounts.exclusions.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource in which to create the exclusion:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/exclusions", + // "request": { + // "$ref": "LogExclusion" + // }, + // "response": { + // "$ref": "LogExclusion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + +// method id "logging.billingAccounts.exclusions.delete": + +type BillingAccountsExclusionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an exclusion. +func (r *BillingAccountsExclusionsService) Delete(name string) *BillingAccountsExclusionsDeleteCall { + c := &BillingAccountsExclusionsDeleteCall{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 *BillingAccountsExclusionsDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsDeleteCall { + 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 *BillingAccountsExclusionsDeleteCall) Context(ctx context.Context) *BillingAccountsExclusionsDeleteCall { + 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 *BillingAccountsExclusionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.billingAccounts.exclusions.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 *BillingAccountsExclusionsDeleteCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an exclusion.", + // "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions/{exclusionsId}", + // "httpMethod": "DELETE", + // "id": "logging.billingAccounts.exclusions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of an existing exclusion to delete:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+/exclusions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + +// method id "logging.billingAccounts.exclusions.get": + +type BillingAccountsExclusionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the description of an exclusion. +func (r *BillingAccountsExclusionsService) Get(name string) *BillingAccountsExclusionsGetCall { + c := &BillingAccountsExclusionsGetCall{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 *BillingAccountsExclusionsGetCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsGetCall { + 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 *BillingAccountsExclusionsGetCall) IfNoneMatch(entityTag string) *BillingAccountsExclusionsGetCall { + 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 *BillingAccountsExclusionsGetCall) Context(ctx context.Context) *BillingAccountsExclusionsGetCall { + 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 *BillingAccountsExclusionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsExclusionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.billingAccounts.exclusions.get" call. +// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *LogExclusion.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BillingAccountsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, 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 := &LogExclusion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the description of an exclusion.", + // "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions/{exclusionsId}", + // "httpMethod": "GET", + // "id": "logging.billingAccounts.exclusions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of an existing exclusion:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+/exclusions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "LogExclusion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/logging.admin", + // "https://www.googleapis.com/auth/logging.read" + // ] + // } + +} + +// method id "logging.billingAccounts.exclusions.list": + +type BillingAccountsExclusionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the exclusions in a parent resource. +func (r *BillingAccountsExclusionsService) List(parent string) *BillingAccountsExclusionsListCall { + c := &BillingAccountsExclusionsListCall{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 from this request. Non-positive values are +// ignored. The presence of nextPageToken in the response indicates that +// more results might be available. +func (c *BillingAccountsExclusionsListCall) PageSize(pageSize int64) *BillingAccountsExclusionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then +// retrieve the next batch of results from the preceding call to this +// method. pageToken must be the value of nextPageToken from the +// previous response. The values of other method parameters should be +// identical to those in the previous call. +func (c *BillingAccountsExclusionsListCall) PageToken(pageToken string) *BillingAccountsExclusionsListCall { + 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 *BillingAccountsExclusionsListCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsListCall { + 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 *BillingAccountsExclusionsListCall) IfNoneMatch(entityTag string) *BillingAccountsExclusionsListCall { + 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 *BillingAccountsExclusionsListCall) Context(ctx context.Context) *BillingAccountsExclusionsListCall { + 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 *BillingAccountsExclusionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsExclusionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.billingAccounts.exclusions.list" call. +// Exactly one of *ListExclusionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListExclusionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *BillingAccountsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, 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 := &ListExclusionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all the exclusions in a parent resource.", + // "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions", + // "httpMethod": "GET", + // "id": "logging.billingAccounts.exclusions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource whose exclusions are to be listed.\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/exclusions", + // "response": { + // "$ref": "ListExclusionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/logging.admin", + // "https://www.googleapis.com/auth/logging.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 *BillingAccountsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) 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 "logging.billingAccounts.exclusions.patch": + +type BillingAccountsExclusionsPatchCall struct { + s *Service + name string + logexclusion *LogExclusion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Changes one or more properties of an existing exclusion. +func (r *BillingAccountsExclusionsService) Patch(name string, logexclusion *LogExclusion) *BillingAccountsExclusionsPatchCall { + c := &BillingAccountsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.logexclusion = logexclusion + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A +// nonempty list of fields to change in the existing exclusion. New +// values for the fields are taken from the corresponding fields in the +// LogExclusion included in this request. Fields not mentioned in +// update_mask are not changed and are ignored in the request.For +// example, to change the filter and description of an exclusion, +// specify an update_mask of "filter,description". +func (c *BillingAccountsExclusionsPatchCall) UpdateMask(updateMask string) *BillingAccountsExclusionsPatchCall { + 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 *BillingAccountsExclusionsPatchCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsPatchCall { + 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 *BillingAccountsExclusionsPatchCall) Context(ctx context.Context) *BillingAccountsExclusionsPatchCall { + 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 *BillingAccountsExclusionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsExclusionsPatchCall) 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.logexclusion) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.billingAccounts.exclusions.patch" call. +// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *LogExclusion.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BillingAccountsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, 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 := &LogExclusion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Changes one or more properties of an existing exclusion.", + // "flatPath": "v2/billingAccounts/{billingAccountsId}/exclusions/{exclusionsId}", + // "httpMethod": "PATCH", + // "id": "logging.billingAccounts.exclusions.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the exclusion to update:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+/exclusions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. A nonempty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an update_mask of \"filter,description\".", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "LogExclusion" + // }, + // "response": { + // "$ref": "LogExclusion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + // method id "logging.billingAccounts.logs.delete": type BillingAccountsLogsDeleteCall struct { @@ -1881,10 +3186,9 @@ type BillingAccountsSinksCreateCall struct { // Create: Creates a sink that exports specified log entries to a // destination. The export of newly-ingested log entries begins -// immediately, unless the current time is outside the sink's start and -// end times or the sink's writer_identity is not permitted to write to -// the destination. A sink can export log entries only from the resource -// owning the sink. +// immediately, unless the sink's writer_identity is not permitted to +// write to the destination. A sink can export log entries only from the +// resource owning the sink. func (r *BillingAccountsSinksService) Create(parent string, logsink *LogSink) *BillingAccountsSinksCreateCall { c := &BillingAccountsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -1995,7 +3299,7 @@ func (c *BillingAccountsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogS } return ret, nil // { - // "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", + // "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", // "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks", // "httpMethod": "POST", // "id": "logging.billingAccounts.sinks.create", @@ -2493,6 +3797,187 @@ func (c *BillingAccountsSinksListCall) Pages(ctx context.Context, f func(*ListSi } } +// method id "logging.billingAccounts.sinks.patch": + +type BillingAccountsSinksPatchCall struct { + s *Service + sinkNameid string + logsink *LogSink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a sink. This method replaces the following fields in +// the existing sink with values from the new sink: destination, and +// filter. The updated sink might also have a new writer_identity; see +// the unique_writer_identity field. +func (r *BillingAccountsSinksService) Patch(sinkNameid string, logsink *LogSink) *BillingAccountsSinksPatchCall { + c := &BillingAccountsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sinkNameid = sinkNameid + c.logsink = logsink + return c +} + +// UniqueWriterIdentity sets the optional parameter +// "uniqueWriterIdentity": See sinks.create for a description of this +// field. When updating a sink, the effect of this field on the value of +// writer_identity in the updated sink depends on both the old and new +// values of this field: +// If the old and new values of this field are both false or both true, +// then there is no change to the sink's writer_identity. +// If the old value is false and the new value is true, then +// writer_identity is changed to a unique service account. +// It is an error if the old value is true and the new value is set to +// false or defaulted to false. +func (c *BillingAccountsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *BillingAccountsSinksPatchCall { + c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": 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. +func (c *BillingAccountsSinksPatchCall) UpdateMask(updateMask string) *BillingAccountsSinksPatchCall { + 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 *BillingAccountsSinksPatchCall) Fields(s ...googleapi.Field) *BillingAccountsSinksPatchCall { + 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 *BillingAccountsSinksPatchCall) Context(ctx context.Context) *BillingAccountsSinksPatchCall { + 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 *BillingAccountsSinksPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsSinksPatchCall) 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.logsink) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "sinkName": c.sinkNameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.billingAccounts.sinks.patch" call. +// Exactly one of *LogSink or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *LogSink.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *BillingAccountsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, 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 := &LogSink{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + // "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", + // "httpMethod": "PATCH", + // "id": "logging.billingAccounts.sinks.patch", + // "parameterOrder": [ + // "sinkName" + // ], + // "parameters": { + // "sinkName": { + // "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "uniqueWriterIdentity": { + // "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", + // "location": "query", + // "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#fieldmaskExample: updateMask=filter.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+sinkName}", + // "request": { + // "$ref": "LogSink" + // }, + // "response": { + // "$ref": "LogSink" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + // method id "logging.billingAccounts.sinks.update": type BillingAccountsSinksUpdateCall struct { @@ -2504,13 +3989,10 @@ type BillingAccountsSinksUpdateCall struct { header_ http.Header } -// Update: Updates a sink. If the named sink doesn't exist, then this -// method is identical to sinks.create. If the named sink does exist, -// then this method replaces the following fields in the existing sink -// with values from the new sink: destination, filter, -// output_version_format, start_time, and end_time. The updated filter -// might also have a new writer_identity; see the unique_writer_identity -// field. +// Update: Updates a sink. This method replaces the following fields in +// the existing sink with values from the new sink: destination, and +// filter. The updated sink might also have a new writer_identity; see +// the unique_writer_identity field. func (r *BillingAccountsSinksService) Update(sinkNameid string, logsink *LogSink) *BillingAccountsSinksUpdateCall { c := &BillingAccountsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.sinkNameid = sinkNameid @@ -2534,6 +4016,21 @@ func (c *BillingAccountsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdenti return c } +// UpdateMask sets the optional parameter "updateMask": 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. +func (c *BillingAccountsSinksUpdateCall) UpdateMask(updateMask string) *BillingAccountsSinksUpdateCall { + 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. @@ -2620,7 +4117,7 @@ func (c *BillingAccountsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogS } return ret, nil // { - // "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", // "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", // "httpMethod": "PUT", // "id": "logging.billingAccounts.sinks.update", @@ -2639,6 +4136,12 @@ func (c *BillingAccountsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogS // "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", // "location": "query", // "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#fieldmaskExample: updateMask=filter.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v2/{+sinkName}", @@ -2812,7 +4315,11 @@ type EntriesWriteCall struct { header_ http.Header } -// Write: Writes log entries to Stackdriver Logging. +// Write: Log entry resourcesWrites log entries to Stackdriver Logging. +// This API method is the only way to send log entries to Stackdriver +// Logging. This method is used, directly or indirectly, by the +// Stackdriver Logging agent (fluentd) and all logging libraries +// configured to use Stackdriver Logging. func (r *EntriesService) Write(writelogentriesrequest *WriteLogEntriesRequest) *EntriesWriteCall { c := &EntriesWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.writelogentriesrequest = writelogentriesrequest @@ -2902,7 +4409,7 @@ func (c *EntriesWriteCall) Do(opts ...googleapi.CallOption) (*WriteLogEntriesRes } return ret, nil // { - // "description": "Writes log entries to Stackdriver Logging.", + // "description": "Log entry resourcesWrites log entries to Stackdriver Logging. This API method is the only way to send log entries to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver Logging agent (fluentd) and all logging libraries configured to use Stackdriver Logging.", // "flatPath": "v2/entries:write", // "httpMethod": "POST", // "id": "logging.entries.write", @@ -2924,6 +4431,759 @@ func (c *EntriesWriteCall) Do(opts ...googleapi.CallOption) (*WriteLogEntriesRes } +// method id "logging.folders.exclusions.create": + +type FoldersExclusionsCreateCall struct { + s *Service + parent string + logexclusion *LogExclusion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new exclusion in a specified parent resource. Only +// log entries belonging to that resource can be excluded. You can have +// up to 10 exclusions in a resource. +func (r *FoldersExclusionsService) Create(parent string, logexclusion *LogExclusion) *FoldersExclusionsCreateCall { + c := &FoldersExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logexclusion = logexclusion + 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 *FoldersExclusionsCreateCall) Fields(s ...googleapi.Field) *FoldersExclusionsCreateCall { + 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 *FoldersExclusionsCreateCall) Context(ctx context.Context) *FoldersExclusionsCreateCall { + 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 *FoldersExclusionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersExclusionsCreateCall) 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.logexclusion) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.folders.exclusions.create" call. +// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *LogExclusion.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FoldersExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, 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 := &LogExclusion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.", + // "flatPath": "v2/folders/{foldersId}/exclusions", + // "httpMethod": "POST", + // "id": "logging.folders.exclusions.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource in which to create the exclusion:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", + // "location": "path", + // "pattern": "^folders/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/exclusions", + // "request": { + // "$ref": "LogExclusion" + // }, + // "response": { + // "$ref": "LogExclusion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + +// method id "logging.folders.exclusions.delete": + +type FoldersExclusionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an exclusion. +func (r *FoldersExclusionsService) Delete(name string) *FoldersExclusionsDeleteCall { + c := &FoldersExclusionsDeleteCall{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 *FoldersExclusionsDeleteCall) Fields(s ...googleapi.Field) *FoldersExclusionsDeleteCall { + 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 *FoldersExclusionsDeleteCall) Context(ctx context.Context) *FoldersExclusionsDeleteCall { + 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 *FoldersExclusionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.folders.exclusions.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 *FoldersExclusionsDeleteCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an exclusion.", + // "flatPath": "v2/folders/{foldersId}/exclusions/{exclusionsId}", + // "httpMethod": "DELETE", + // "id": "logging.folders.exclusions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of an existing exclusion to delete:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + // "location": "path", + // "pattern": "^folders/[^/]+/exclusions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + +// method id "logging.folders.exclusions.get": + +type FoldersExclusionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the description of an exclusion. +func (r *FoldersExclusionsService) Get(name string) *FoldersExclusionsGetCall { + c := &FoldersExclusionsGetCall{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 *FoldersExclusionsGetCall) Fields(s ...googleapi.Field) *FoldersExclusionsGetCall { + 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 *FoldersExclusionsGetCall) IfNoneMatch(entityTag string) *FoldersExclusionsGetCall { + 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 *FoldersExclusionsGetCall) Context(ctx context.Context) *FoldersExclusionsGetCall { + 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 *FoldersExclusionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersExclusionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.folders.exclusions.get" call. +// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *LogExclusion.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FoldersExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, 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 := &LogExclusion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the description of an exclusion.", + // "flatPath": "v2/folders/{foldersId}/exclusions/{exclusionsId}", + // "httpMethod": "GET", + // "id": "logging.folders.exclusions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of an existing exclusion:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + // "location": "path", + // "pattern": "^folders/[^/]+/exclusions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "LogExclusion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/logging.admin", + // "https://www.googleapis.com/auth/logging.read" + // ] + // } + +} + +// method id "logging.folders.exclusions.list": + +type FoldersExclusionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the exclusions in a parent resource. +func (r *FoldersExclusionsService) List(parent string) *FoldersExclusionsListCall { + c := &FoldersExclusionsListCall{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 from this request. Non-positive values are +// ignored. The presence of nextPageToken in the response indicates that +// more results might be available. +func (c *FoldersExclusionsListCall) PageSize(pageSize int64) *FoldersExclusionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then +// retrieve the next batch of results from the preceding call to this +// method. pageToken must be the value of nextPageToken from the +// previous response. The values of other method parameters should be +// identical to those in the previous call. +func (c *FoldersExclusionsListCall) PageToken(pageToken string) *FoldersExclusionsListCall { + 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 *FoldersExclusionsListCall) Fields(s ...googleapi.Field) *FoldersExclusionsListCall { + 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 *FoldersExclusionsListCall) IfNoneMatch(entityTag string) *FoldersExclusionsListCall { + 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 *FoldersExclusionsListCall) Context(ctx context.Context) *FoldersExclusionsListCall { + 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 *FoldersExclusionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersExclusionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.folders.exclusions.list" call. +// Exactly one of *ListExclusionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListExclusionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *FoldersExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, 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 := &ListExclusionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all the exclusions in a parent resource.", + // "flatPath": "v2/folders/{foldersId}/exclusions", + // "httpMethod": "GET", + // "id": "logging.folders.exclusions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource whose exclusions are to be listed.\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + // "location": "path", + // "pattern": "^folders/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/exclusions", + // "response": { + // "$ref": "ListExclusionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/logging.admin", + // "https://www.googleapis.com/auth/logging.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 *FoldersExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) 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 "logging.folders.exclusions.patch": + +type FoldersExclusionsPatchCall struct { + s *Service + name string + logexclusion *LogExclusion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Changes one or more properties of an existing exclusion. +func (r *FoldersExclusionsService) Patch(name string, logexclusion *LogExclusion) *FoldersExclusionsPatchCall { + c := &FoldersExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.logexclusion = logexclusion + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A +// nonempty list of fields to change in the existing exclusion. New +// values for the fields are taken from the corresponding fields in the +// LogExclusion included in this request. Fields not mentioned in +// update_mask are not changed and are ignored in the request.For +// example, to change the filter and description of an exclusion, +// specify an update_mask of "filter,description". +func (c *FoldersExclusionsPatchCall) UpdateMask(updateMask string) *FoldersExclusionsPatchCall { + 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 *FoldersExclusionsPatchCall) Fields(s ...googleapi.Field) *FoldersExclusionsPatchCall { + 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 *FoldersExclusionsPatchCall) Context(ctx context.Context) *FoldersExclusionsPatchCall { + 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 *FoldersExclusionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersExclusionsPatchCall) 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.logexclusion) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.folders.exclusions.patch" call. +// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *LogExclusion.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FoldersExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, 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 := &LogExclusion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Changes one or more properties of an existing exclusion.", + // "flatPath": "v2/folders/{foldersId}/exclusions/{exclusionsId}", + // "httpMethod": "PATCH", + // "id": "logging.folders.exclusions.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the exclusion to update:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + // "location": "path", + // "pattern": "^folders/[^/]+/exclusions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. A nonempty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an update_mask of \"filter,description\".", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "LogExclusion" + // }, + // "response": { + // "$ref": "LogExclusion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + // method id "logging.folders.logs.delete": type FoldersLogsDeleteCall struct { @@ -3259,10 +5519,9 @@ type FoldersSinksCreateCall struct { // Create: Creates a sink that exports specified log entries to a // destination. The export of newly-ingested log entries begins -// immediately, unless the current time is outside the sink's start and -// end times or the sink's writer_identity is not permitted to write to -// the destination. A sink can export log entries only from the resource -// owning the sink. +// immediately, unless the sink's writer_identity is not permitted to +// write to the destination. A sink can export log entries only from the +// resource owning the sink. func (r *FoldersSinksService) Create(parent string, logsink *LogSink) *FoldersSinksCreateCall { c := &FoldersSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -3373,7 +5632,7 @@ func (c *FoldersSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, err } return ret, nil // { - // "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", + // "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", // "flatPath": "v2/folders/{foldersId}/sinks", // "httpMethod": "POST", // "id": "logging.folders.sinks.create", @@ -3871,6 +6130,187 @@ func (c *FoldersSinksListCall) Pages(ctx context.Context, f func(*ListSinksRespo } } +// method id "logging.folders.sinks.patch": + +type FoldersSinksPatchCall struct { + s *Service + sinkNameid string + logsink *LogSink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a sink. This method replaces the following fields in +// the existing sink with values from the new sink: destination, and +// filter. The updated sink might also have a new writer_identity; see +// the unique_writer_identity field. +func (r *FoldersSinksService) Patch(sinkNameid string, logsink *LogSink) *FoldersSinksPatchCall { + c := &FoldersSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sinkNameid = sinkNameid + c.logsink = logsink + return c +} + +// UniqueWriterIdentity sets the optional parameter +// "uniqueWriterIdentity": See sinks.create for a description of this +// field. When updating a sink, the effect of this field on the value of +// writer_identity in the updated sink depends on both the old and new +// values of this field: +// If the old and new values of this field are both false or both true, +// then there is no change to the sink's writer_identity. +// If the old value is false and the new value is true, then +// writer_identity is changed to a unique service account. +// It is an error if the old value is true and the new value is set to +// false or defaulted to false. +func (c *FoldersSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksPatchCall { + c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": 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. +func (c *FoldersSinksPatchCall) UpdateMask(updateMask string) *FoldersSinksPatchCall { + 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 *FoldersSinksPatchCall) Fields(s ...googleapi.Field) *FoldersSinksPatchCall { + 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 *FoldersSinksPatchCall) Context(ctx context.Context) *FoldersSinksPatchCall { + 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 *FoldersSinksPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersSinksPatchCall) 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.logsink) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "sinkName": c.sinkNameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.folders.sinks.patch" call. +// Exactly one of *LogSink or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *LogSink.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *FoldersSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, 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 := &LogSink{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + // "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", + // "httpMethod": "PATCH", + // "id": "logging.folders.sinks.patch", + // "parameterOrder": [ + // "sinkName" + // ], + // "parameters": { + // "sinkName": { + // "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + // "location": "path", + // "pattern": "^folders/[^/]+/sinks/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "uniqueWriterIdentity": { + // "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", + // "location": "query", + // "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#fieldmaskExample: updateMask=filter.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+sinkName}", + // "request": { + // "$ref": "LogSink" + // }, + // "response": { + // "$ref": "LogSink" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + // method id "logging.folders.sinks.update": type FoldersSinksUpdateCall struct { @@ -3882,13 +6322,10 @@ type FoldersSinksUpdateCall struct { header_ http.Header } -// Update: Updates a sink. If the named sink doesn't exist, then this -// method is identical to sinks.create. If the named sink does exist, -// then this method replaces the following fields in the existing sink -// with values from the new sink: destination, filter, -// output_version_format, start_time, and end_time. The updated filter -// might also have a new writer_identity; see the unique_writer_identity -// field. +// Update: Updates a sink. This method replaces the following fields in +// the existing sink with values from the new sink: destination, and +// filter. The updated sink might also have a new writer_identity; see +// the unique_writer_identity field. func (r *FoldersSinksService) Update(sinkNameid string, logsink *LogSink) *FoldersSinksUpdateCall { c := &FoldersSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.sinkNameid = sinkNameid @@ -3912,6 +6349,21 @@ func (c *FoldersSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) return c } +// UpdateMask sets the optional parameter "updateMask": 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. +func (c *FoldersSinksUpdateCall) UpdateMask(updateMask string) *FoldersSinksUpdateCall { + 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. @@ -3998,7 +6450,7 @@ func (c *FoldersSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, err } return ret, nil // { - // "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", // "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", // "httpMethod": "PUT", // "id": "logging.folders.sinks.update", @@ -4017,6 +6469,12 @@ func (c *FoldersSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, err // "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", // "location": "query", // "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#fieldmaskExample: updateMask=filter.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v2/{+sinkName}", @@ -4216,6 +6674,759 @@ func (c *MonitoredResourceDescriptorsListCall) Pages(ctx context.Context, f func } } +// method id "logging.organizations.exclusions.create": + +type OrganizationsExclusionsCreateCall struct { + s *Service + parent string + logexclusion *LogExclusion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new exclusion in a specified parent resource. Only +// log entries belonging to that resource can be excluded. You can have +// up to 10 exclusions in a resource. +func (r *OrganizationsExclusionsService) Create(parent string, logexclusion *LogExclusion) *OrganizationsExclusionsCreateCall { + c := &OrganizationsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logexclusion = logexclusion + 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 *OrganizationsExclusionsCreateCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsCreateCall { + 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 *OrganizationsExclusionsCreateCall) Context(ctx context.Context) *OrganizationsExclusionsCreateCall { + 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 *OrganizationsExclusionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsExclusionsCreateCall) 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.logexclusion) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.organizations.exclusions.create" call. +// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *LogExclusion.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrganizationsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, 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 := &LogExclusion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.", + // "flatPath": "v2/organizations/{organizationsId}/exclusions", + // "httpMethod": "POST", + // "id": "logging.organizations.exclusions.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource in which to create the exclusion:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/exclusions", + // "request": { + // "$ref": "LogExclusion" + // }, + // "response": { + // "$ref": "LogExclusion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + +// method id "logging.organizations.exclusions.delete": + +type OrganizationsExclusionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an exclusion. +func (r *OrganizationsExclusionsService) Delete(name string) *OrganizationsExclusionsDeleteCall { + c := &OrganizationsExclusionsDeleteCall{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 *OrganizationsExclusionsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsDeleteCall { + 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 *OrganizationsExclusionsDeleteCall) Context(ctx context.Context) *OrganizationsExclusionsDeleteCall { + 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 *OrganizationsExclusionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.organizations.exclusions.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 *OrganizationsExclusionsDeleteCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an exclusion.", + // "flatPath": "v2/organizations/{organizationsId}/exclusions/{exclusionsId}", + // "httpMethod": "DELETE", + // "id": "logging.organizations.exclusions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of an existing exclusion to delete:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/exclusions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + +// method id "logging.organizations.exclusions.get": + +type OrganizationsExclusionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the description of an exclusion. +func (r *OrganizationsExclusionsService) Get(name string) *OrganizationsExclusionsGetCall { + c := &OrganizationsExclusionsGetCall{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 *OrganizationsExclusionsGetCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsGetCall { + 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 *OrganizationsExclusionsGetCall) IfNoneMatch(entityTag string) *OrganizationsExclusionsGetCall { + 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 *OrganizationsExclusionsGetCall) Context(ctx context.Context) *OrganizationsExclusionsGetCall { + 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 *OrganizationsExclusionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsExclusionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.organizations.exclusions.get" call. +// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *LogExclusion.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrganizationsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, 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 := &LogExclusion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the description of an exclusion.", + // "flatPath": "v2/organizations/{organizationsId}/exclusions/{exclusionsId}", + // "httpMethod": "GET", + // "id": "logging.organizations.exclusions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of an existing exclusion:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/exclusions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "LogExclusion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/logging.admin", + // "https://www.googleapis.com/auth/logging.read" + // ] + // } + +} + +// method id "logging.organizations.exclusions.list": + +type OrganizationsExclusionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the exclusions in a parent resource. +func (r *OrganizationsExclusionsService) List(parent string) *OrganizationsExclusionsListCall { + c := &OrganizationsExclusionsListCall{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 from this request. Non-positive values are +// ignored. The presence of nextPageToken in the response indicates that +// more results might be available. +func (c *OrganizationsExclusionsListCall) PageSize(pageSize int64) *OrganizationsExclusionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then +// retrieve the next batch of results from the preceding call to this +// method. pageToken must be the value of nextPageToken from the +// previous response. The values of other method parameters should be +// identical to those in the previous call. +func (c *OrganizationsExclusionsListCall) PageToken(pageToken string) *OrganizationsExclusionsListCall { + 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 *OrganizationsExclusionsListCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsListCall { + 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 *OrganizationsExclusionsListCall) IfNoneMatch(entityTag string) *OrganizationsExclusionsListCall { + 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 *OrganizationsExclusionsListCall) Context(ctx context.Context) *OrganizationsExclusionsListCall { + 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 *OrganizationsExclusionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsExclusionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.organizations.exclusions.list" call. +// Exactly one of *ListExclusionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListExclusionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, 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 := &ListExclusionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all the exclusions in a parent resource.", + // "flatPath": "v2/organizations/{organizationsId}/exclusions", + // "httpMethod": "GET", + // "id": "logging.organizations.exclusions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource whose exclusions are to be listed.\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/exclusions", + // "response": { + // "$ref": "ListExclusionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/logging.admin", + // "https://www.googleapis.com/auth/logging.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 *OrganizationsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) 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 "logging.organizations.exclusions.patch": + +type OrganizationsExclusionsPatchCall struct { + s *Service + name string + logexclusion *LogExclusion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Changes one or more properties of an existing exclusion. +func (r *OrganizationsExclusionsService) Patch(name string, logexclusion *LogExclusion) *OrganizationsExclusionsPatchCall { + c := &OrganizationsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.logexclusion = logexclusion + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A +// nonempty list of fields to change in the existing exclusion. New +// values for the fields are taken from the corresponding fields in the +// LogExclusion included in this request. Fields not mentioned in +// update_mask are not changed and are ignored in the request.For +// example, to change the filter and description of an exclusion, +// specify an update_mask of "filter,description". +func (c *OrganizationsExclusionsPatchCall) UpdateMask(updateMask string) *OrganizationsExclusionsPatchCall { + 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 *OrganizationsExclusionsPatchCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsPatchCall { + 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 *OrganizationsExclusionsPatchCall) Context(ctx context.Context) *OrganizationsExclusionsPatchCall { + 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 *OrganizationsExclusionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsExclusionsPatchCall) 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.logexclusion) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.organizations.exclusions.patch" call. +// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *LogExclusion.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrganizationsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, 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 := &LogExclusion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Changes one or more properties of an existing exclusion.", + // "flatPath": "v2/organizations/{organizationsId}/exclusions/{exclusionsId}", + // "httpMethod": "PATCH", + // "id": "logging.organizations.exclusions.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the exclusion to update:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/exclusions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. A nonempty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an update_mask of \"filter,description\".", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "LogExclusion" + // }, + // "response": { + // "$ref": "LogExclusion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + // method id "logging.organizations.logs.delete": type OrganizationsLogsDeleteCall struct { @@ -4551,10 +7762,9 @@ type OrganizationsSinksCreateCall struct { // Create: Creates a sink that exports specified log entries to a // destination. The export of newly-ingested log entries begins -// immediately, unless the current time is outside the sink's start and -// end times or the sink's writer_identity is not permitted to write to -// the destination. A sink can export log entries only from the resource -// owning the sink. +// immediately, unless the sink's writer_identity is not permitted to +// write to the destination. A sink can export log entries only from the +// resource owning the sink. func (r *OrganizationsSinksService) Create(parent string, logsink *LogSink) *OrganizationsSinksCreateCall { c := &OrganizationsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -4665,7 +7875,7 @@ func (c *OrganizationsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSin } return ret, nil // { - // "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", + // "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", // "flatPath": "v2/organizations/{organizationsId}/sinks", // "httpMethod": "POST", // "id": "logging.organizations.sinks.create", @@ -5163,6 +8373,187 @@ func (c *OrganizationsSinksListCall) Pages(ctx context.Context, f func(*ListSink } } +// method id "logging.organizations.sinks.patch": + +type OrganizationsSinksPatchCall struct { + s *Service + sinkNameid string + logsink *LogSink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a sink. This method replaces the following fields in +// the existing sink with values from the new sink: destination, and +// filter. The updated sink might also have a new writer_identity; see +// the unique_writer_identity field. +func (r *OrganizationsSinksService) Patch(sinkNameid string, logsink *LogSink) *OrganizationsSinksPatchCall { + c := &OrganizationsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sinkNameid = sinkNameid + c.logsink = logsink + return c +} + +// UniqueWriterIdentity sets the optional parameter +// "uniqueWriterIdentity": See sinks.create for a description of this +// field. When updating a sink, the effect of this field on the value of +// writer_identity in the updated sink depends on both the old and new +// values of this field: +// If the old and new values of this field are both false or both true, +// then there is no change to the sink's writer_identity. +// If the old value is false and the new value is true, then +// writer_identity is changed to a unique service account. +// It is an error if the old value is true and the new value is set to +// false or defaulted to false. +func (c *OrganizationsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksPatchCall { + c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": 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. +func (c *OrganizationsSinksPatchCall) UpdateMask(updateMask string) *OrganizationsSinksPatchCall { + 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 *OrganizationsSinksPatchCall) Fields(s ...googleapi.Field) *OrganizationsSinksPatchCall { + 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 *OrganizationsSinksPatchCall) Context(ctx context.Context) *OrganizationsSinksPatchCall { + 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 *OrganizationsSinksPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsSinksPatchCall) 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.logsink) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "sinkName": c.sinkNameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.organizations.sinks.patch" call. +// Exactly one of *LogSink or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *LogSink.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrganizationsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, 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 := &LogSink{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + // "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", + // "httpMethod": "PATCH", + // "id": "logging.organizations.sinks.patch", + // "parameterOrder": [ + // "sinkName" + // ], + // "parameters": { + // "sinkName": { + // "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/sinks/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "uniqueWriterIdentity": { + // "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", + // "location": "query", + // "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#fieldmaskExample: updateMask=filter.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+sinkName}", + // "request": { + // "$ref": "LogSink" + // }, + // "response": { + // "$ref": "LogSink" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + // method id "logging.organizations.sinks.update": type OrganizationsSinksUpdateCall struct { @@ -5174,13 +8565,10 @@ type OrganizationsSinksUpdateCall struct { header_ http.Header } -// Update: Updates a sink. If the named sink doesn't exist, then this -// method is identical to sinks.create. If the named sink does exist, -// then this method replaces the following fields in the existing sink -// with values from the new sink: destination, filter, -// output_version_format, start_time, and end_time. The updated filter -// might also have a new writer_identity; see the unique_writer_identity -// field. +// Update: Updates a sink. This method replaces the following fields in +// the existing sink with values from the new sink: destination, and +// filter. The updated sink might also have a new writer_identity; see +// the unique_writer_identity field. func (r *OrganizationsSinksService) Update(sinkNameid string, logsink *LogSink) *OrganizationsSinksUpdateCall { c := &OrganizationsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.sinkNameid = sinkNameid @@ -5204,6 +8592,21 @@ func (c *OrganizationsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity return c } +// UpdateMask sets the optional parameter "updateMask": 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. +func (c *OrganizationsSinksUpdateCall) UpdateMask(updateMask string) *OrganizationsSinksUpdateCall { + 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. @@ -5290,7 +8693,7 @@ func (c *OrganizationsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSin } return ret, nil // { - // "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", // "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", // "httpMethod": "PUT", // "id": "logging.organizations.sinks.update", @@ -5309,6 +8712,12 @@ func (c *OrganizationsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSin // "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", // "location": "query", // "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#fieldmaskExample: updateMask=filter.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v2/{+sinkName}", @@ -5326,6 +8735,759 @@ func (c *OrganizationsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSin } +// method id "logging.projects.exclusions.create": + +type ProjectsExclusionsCreateCall struct { + s *Service + parent string + logexclusion *LogExclusion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new exclusion in a specified parent resource. Only +// log entries belonging to that resource can be excluded. You can have +// up to 10 exclusions in a resource. +func (r *ProjectsExclusionsService) Create(parent string, logexclusion *LogExclusion) *ProjectsExclusionsCreateCall { + c := &ProjectsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logexclusion = logexclusion + 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 *ProjectsExclusionsCreateCall) Fields(s ...googleapi.Field) *ProjectsExclusionsCreateCall { + 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 *ProjectsExclusionsCreateCall) Context(ctx context.Context) *ProjectsExclusionsCreateCall { + 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 *ProjectsExclusionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsExclusionsCreateCall) 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.logexclusion) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.projects.exclusions.create" call. +// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *LogExclusion.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, 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 := &LogExclusion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.", + // "flatPath": "v2/projects/{projectsId}/exclusions", + // "httpMethod": "POST", + // "id": "logging.projects.exclusions.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource in which to create the exclusion:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/exclusions", + // "request": { + // "$ref": "LogExclusion" + // }, + // "response": { + // "$ref": "LogExclusion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + +// method id "logging.projects.exclusions.delete": + +type ProjectsExclusionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an exclusion. +func (r *ProjectsExclusionsService) Delete(name string) *ProjectsExclusionsDeleteCall { + c := &ProjectsExclusionsDeleteCall{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 *ProjectsExclusionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsExclusionsDeleteCall { + 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 *ProjectsExclusionsDeleteCall) Context(ctx context.Context) *ProjectsExclusionsDeleteCall { + 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 *ProjectsExclusionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.projects.exclusions.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 *ProjectsExclusionsDeleteCall) 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 := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an exclusion.", + // "flatPath": "v2/projects/{projectsId}/exclusions/{exclusionsId}", + // "httpMethod": "DELETE", + // "id": "logging.projects.exclusions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of an existing exclusion to delete:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + // "location": "path", + // "pattern": "^projects/[^/]+/exclusions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + +// method id "logging.projects.exclusions.get": + +type ProjectsExclusionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the description of an exclusion. +func (r *ProjectsExclusionsService) Get(name string) *ProjectsExclusionsGetCall { + c := &ProjectsExclusionsGetCall{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 *ProjectsExclusionsGetCall) Fields(s ...googleapi.Field) *ProjectsExclusionsGetCall { + 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 *ProjectsExclusionsGetCall) IfNoneMatch(entityTag string) *ProjectsExclusionsGetCall { + 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 *ProjectsExclusionsGetCall) Context(ctx context.Context) *ProjectsExclusionsGetCall { + 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 *ProjectsExclusionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsExclusionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.projects.exclusions.get" call. +// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *LogExclusion.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, 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 := &LogExclusion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the description of an exclusion.", + // "flatPath": "v2/projects/{projectsId}/exclusions/{exclusionsId}", + // "httpMethod": "GET", + // "id": "logging.projects.exclusions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of an existing exclusion:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + // "location": "path", + // "pattern": "^projects/[^/]+/exclusions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "LogExclusion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/logging.admin", + // "https://www.googleapis.com/auth/logging.read" + // ] + // } + +} + +// method id "logging.projects.exclusions.list": + +type ProjectsExclusionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the exclusions in a parent resource. +func (r *ProjectsExclusionsService) List(parent string) *ProjectsExclusionsListCall { + c := &ProjectsExclusionsListCall{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 from this request. Non-positive values are +// ignored. The presence of nextPageToken in the response indicates that +// more results might be available. +func (c *ProjectsExclusionsListCall) PageSize(pageSize int64) *ProjectsExclusionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then +// retrieve the next batch of results from the preceding call to this +// method. pageToken must be the value of nextPageToken from the +// previous response. The values of other method parameters should be +// identical to those in the previous call. +func (c *ProjectsExclusionsListCall) PageToken(pageToken string) *ProjectsExclusionsListCall { + 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 *ProjectsExclusionsListCall) Fields(s ...googleapi.Field) *ProjectsExclusionsListCall { + 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 *ProjectsExclusionsListCall) IfNoneMatch(entityTag string) *ProjectsExclusionsListCall { + 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 *ProjectsExclusionsListCall) Context(ctx context.Context) *ProjectsExclusionsListCall { + 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 *ProjectsExclusionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsExclusionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.projects.exclusions.list" call. +// Exactly one of *ListExclusionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListExclusionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, 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 := &ListExclusionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all the exclusions in a parent resource.", + // "flatPath": "v2/projects/{projectsId}/exclusions", + // "httpMethod": "GET", + // "id": "logging.projects.exclusions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource whose exclusions are to be listed.\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/exclusions", + // "response": { + // "$ref": "ListExclusionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/logging.admin", + // "https://www.googleapis.com/auth/logging.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 *ProjectsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) 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 "logging.projects.exclusions.patch": + +type ProjectsExclusionsPatchCall struct { + s *Service + name string + logexclusion *LogExclusion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Changes one or more properties of an existing exclusion. +func (r *ProjectsExclusionsService) Patch(name string, logexclusion *LogExclusion) *ProjectsExclusionsPatchCall { + c := &ProjectsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.logexclusion = logexclusion + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A +// nonempty list of fields to change in the existing exclusion. New +// values for the fields are taken from the corresponding fields in the +// LogExclusion included in this request. Fields not mentioned in +// update_mask are not changed and are ignored in the request.For +// example, to change the filter and description of an exclusion, +// specify an update_mask of "filter,description". +func (c *ProjectsExclusionsPatchCall) UpdateMask(updateMask string) *ProjectsExclusionsPatchCall { + 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 *ProjectsExclusionsPatchCall) Fields(s ...googleapi.Field) *ProjectsExclusionsPatchCall { + 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 *ProjectsExclusionsPatchCall) Context(ctx context.Context) *ProjectsExclusionsPatchCall { + 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 *ProjectsExclusionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsExclusionsPatchCall) 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.logexclusion) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.projects.exclusions.patch" call. +// Exactly one of *LogExclusion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *LogExclusion.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, 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 := &LogExclusion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Changes one or more properties of an existing exclusion.", + // "flatPath": "v2/projects/{projectsId}/exclusions/{exclusionsId}", + // "httpMethod": "PATCH", + // "id": "logging.projects.exclusions.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the exclusion to update:\n\"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]\"\n\"organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]\"\n\"folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]\"\nExample: \"projects/my-project-id/exclusions/my-exclusion-id\".", + // "location": "path", + // "pattern": "^projects/[^/]+/exclusions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. A nonempty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the LogExclusion included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an update_mask of \"filter,description\".", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "LogExclusion" + // }, + // "response": { + // "$ref": "LogExclusion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + // method id "logging.projects.logs.delete": type ProjectsLogsDeleteCall struct { @@ -6397,10 +10559,9 @@ type ProjectsSinksCreateCall struct { // Create: Creates a sink that exports specified log entries to a // destination. The export of newly-ingested log entries begins -// immediately, unless the current time is outside the sink's start and -// end times or the sink's writer_identity is not permitted to write to -// the destination. A sink can export log entries only from the resource -// owning the sink. +// immediately, unless the sink's writer_identity is not permitted to +// write to the destination. A sink can export log entries only from the +// resource owning the sink. func (r *ProjectsSinksService) Create(parent string, logsink *LogSink) *ProjectsSinksCreateCall { c := &ProjectsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -6511,7 +10672,7 @@ func (c *ProjectsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, er } return ret, nil // { - // "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", + // "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", // "flatPath": "v2/projects/{projectsId}/sinks", // "httpMethod": "POST", // "id": "logging.projects.sinks.create", @@ -7009,6 +11170,187 @@ func (c *ProjectsSinksListCall) Pages(ctx context.Context, f func(*ListSinksResp } } +// method id "logging.projects.sinks.patch": + +type ProjectsSinksPatchCall struct { + s *Service + sinkNameid string + logsink *LogSink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a sink. This method replaces the following fields in +// the existing sink with values from the new sink: destination, and +// filter. The updated sink might also have a new writer_identity; see +// the unique_writer_identity field. +func (r *ProjectsSinksService) Patch(sinkNameid string, logsink *LogSink) *ProjectsSinksPatchCall { + c := &ProjectsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sinkNameid = sinkNameid + c.logsink = logsink + return c +} + +// UniqueWriterIdentity sets the optional parameter +// "uniqueWriterIdentity": See sinks.create for a description of this +// field. When updating a sink, the effect of this field on the value of +// writer_identity in the updated sink depends on both the old and new +// values of this field: +// If the old and new values of this field are both false or both true, +// then there is no change to the sink's writer_identity. +// If the old value is false and the new value is true, then +// writer_identity is changed to a unique service account. +// It is an error if the old value is true and the new value is set to +// false or defaulted to false. +func (c *ProjectsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *ProjectsSinksPatchCall { + c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": 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. +func (c *ProjectsSinksPatchCall) UpdateMask(updateMask string) *ProjectsSinksPatchCall { + 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 *ProjectsSinksPatchCall) Fields(s ...googleapi.Field) *ProjectsSinksPatchCall { + 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 *ProjectsSinksPatchCall) Context(ctx context.Context) *ProjectsSinksPatchCall { + 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 *ProjectsSinksPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsSinksPatchCall) 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.logsink) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "sinkName": c.sinkNameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.projects.sinks.patch" call. +// Exactly one of *LogSink or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *LogSink.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, 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 := &LogSink{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + // "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", + // "httpMethod": "PATCH", + // "id": "logging.projects.sinks.patch", + // "parameterOrder": [ + // "sinkName" + // ], + // "parameters": { + // "sinkName": { + // "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + // "location": "path", + // "pattern": "^projects/[^/]+/sinks/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "uniqueWriterIdentity": { + // "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", + // "location": "query", + // "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#fieldmaskExample: updateMask=filter.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+sinkName}", + // "request": { + // "$ref": "LogSink" + // }, + // "response": { + // "$ref": "LogSink" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/logging.admin" + // ] + // } + +} + // method id "logging.projects.sinks.update": type ProjectsSinksUpdateCall struct { @@ -7020,13 +11362,10 @@ type ProjectsSinksUpdateCall struct { header_ http.Header } -// Update: Updates a sink. If the named sink doesn't exist, then this -// method is identical to sinks.create. If the named sink does exist, -// then this method replaces the following fields in the existing sink -// with values from the new sink: destination, filter, -// output_version_format, start_time, and end_time. The updated filter -// might also have a new writer_identity; see the unique_writer_identity -// field. +// Update: Updates a sink. This method replaces the following fields in +// the existing sink with values from the new sink: destination, and +// filter. The updated sink might also have a new writer_identity; see +// the unique_writer_identity field. func (r *ProjectsSinksService) Update(sinkNameid string, logsink *LogSink) *ProjectsSinksUpdateCall { c := &ProjectsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.sinkNameid = sinkNameid @@ -7050,6 +11389,21 @@ func (c *ProjectsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool return c } +// UpdateMask sets the optional parameter "updateMask": 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. +func (c *ProjectsSinksUpdateCall) UpdateMask(updateMask string) *ProjectsSinksUpdateCall { + 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. @@ -7136,7 +11490,7 @@ func (c *ProjectsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, er } return ret, nil // { - // "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", // "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", // "httpMethod": "PUT", // "id": "logging.projects.sinks.update", @@ -7155,6 +11509,12 @@ func (c *ProjectsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, er // "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", // "location": "query", // "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#fieldmaskExample: updateMask=filter.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v2/{+sinkName}", diff --git a/vendor/google.golang.org/api/logging/v2beta1/logging-api.json b/vendor/google.golang.org/api/logging/v2beta1/logging-api.json index 277b084fe..f180fd289 100644 --- a/vendor/google.golang.org/api/logging/v2beta1/logging-api.json +++ b/vendor/google.golang.org/api/logging/v2beta1/logging-api.json @@ -1,977 +1,13 @@ { - "canonicalName": "Logging", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/logging.write": { - "description": "Submit log data for your projects" - }, - "https://www.googleapis.com/auth/logging.read": { - "description": "View log data for your projects" - }, - "https://www.googleapis.com/auth/logging.admin": { - "description": "Administrate log data for your projects" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "rootUrl": "https://logging.googleapis.com/", - "ownerDomain": "google.com", - "name": "logging", - "batchPath": "batch", - "title": "Stackdriver Logging API", - "ownerName": "Google", - "resources": { - "monitoredResourceDescriptors": { - "methods": { - "list": { - "description": "Lists the descriptors for monitored resource types used by Stackdriver Logging.", - "response": { - "$ref": "ListMonitoredResourceDescriptorsResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "type": "integer" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ], - "flatPath": "v2beta1/monitoredResourceDescriptors", - "id": "logging.monitoredResourceDescriptors.list", - "path": "v2beta1/monitoredResourceDescriptors" - } - } - }, - "organizations": { - "resources": { - "logs": { - "methods": { - "list": { - "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", - "httpMethod": "GET", - "response": { - "$ref": "ListLogsResponse" - }, - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "type": "integer" - }, - "parent": { - "location": "path", - "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$" - }, - "pageToken": { - "type": "string", - "location": "query", - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ], - "flatPath": "v2beta1/organizations/{organizationsId}/logs", - "path": "v2beta1/{+parent}/logs", - "id": "logging.organizations.logs.list" - }, - "delete": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "logName" - ], - "httpMethod": "DELETE", - "parameters": { - "logName": { - "description": "Required. The resource name of the log to delete:\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\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+/logs/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ], - "flatPath": "v2beta1/organizations/{organizationsId}/logs/{logsId}", - "id": "logging.organizations.logs.delete", - "path": "v2beta1/{+logName}", - "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted." - } - } - } - } - }, - "entries": { - "methods": { - "write": { - "id": "logging.entries.write", - "path": "v2beta1/entries:write", - "description": "Writes log entries to Stackdriver Logging.", - "request": { - "$ref": "WriteLogEntriesRequest" - }, - "response": { - "$ref": "WriteLogEntriesResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.write" - ], - "flatPath": "v2beta1/entries:write" - }, - "list": { - "response": { - "$ref": "ListLogEntriesResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ], - "flatPath": "v2beta1/entries:list", - "id": "logging.entries.list", - "path": "v2beta1/entries:list", - "description": "Lists log entries. Use this method to retrieve log entries from Stackdriver Logging. For ways to export log entries, see Exporting Logs.", - "request": { - "$ref": "ListLogEntriesRequest" - } - } - } - }, - "projects": { - "resources": { - "sinks": { - "methods": { - "delete": { - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "sinkName" - ], - "parameters": { - "sinkName": { - "pattern": "^projects/[^/]+/sinks/[^/]+$", - "location": "path", - "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ], - "flatPath": "v2beta1/projects/{projectsId}/sinks/{sinksId}", - "path": "v2beta1/{+sinkName}", - "id": "logging.projects.sinks.delete", - "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted." - }, - "get": { - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "sinkName" - ], - "httpMethod": "GET", - "parameters": { - "sinkName": { - "pattern": "^projects/[^/]+/sinks/[^/]+$", - "location": "path", - "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ], - "flatPath": "v2beta1/projects/{projectsId}/sinks/{sinksId}", - "id": "logging.projects.sinks.get", - "path": "v2beta1/{+sinkName}", - "description": "Gets a sink." - }, - "list": { - "response": { - "$ref": "ListSinksResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "type": "integer" - }, - "parent": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ], - "flatPath": "v2beta1/projects/{projectsId}/sinks", - "id": "logging.projects.sinks.list", - "path": "v2beta1/{+parent}/sinks", - "description": "Lists sinks." - }, - "update": { - "httpMethod": "PUT", - "parameterOrder": [ - "sinkName" - ], - "response": { - "$ref": "LogSink" - }, - "parameters": { - "uniqueWriterIdentity": { - "location": "query", - "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", - "type": "boolean" - }, - "sinkName": { - "location": "path", - "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/sinks/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ], - "flatPath": "v2beta1/projects/{projectsId}/sinks/{sinksId}", - "path": "v2beta1/{+sinkName}", - "id": "logging.projects.sinks.update", - "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", - "request": { - "$ref": "LogSink" - } - }, - "create": { - "request": { - "$ref": "LogSink" - }, - "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ], - "parameters": { - "parent": { - "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - }, - "uniqueWriterIdentity": { - "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Stackdriver Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.", - "type": "boolean", - "location": "query" - } - }, - "flatPath": "v2beta1/projects/{projectsId}/sinks", - "id": "logging.projects.sinks.create", - "path": "v2beta1/{+parent}/sinks" - } - } - }, - "logs": { - "methods": { - "delete": { - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "logName" - ], - "parameters": { - "logName": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/logs/[^/]+$", - "location": "path", - "description": "Required. The resource name of the log to delete:\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\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ], - "flatPath": "v2beta1/projects/{projectsId}/logs/{logsId}", - "path": "v2beta1/{+logName}", - "id": "logging.projects.logs.delete", - "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted." - }, - "list": { - "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "ListLogsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ], - "parameters": { - "parent": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", - "type": "string", - "required": true - }, - "pageToken": { - "location": "query", - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available." - } - }, - "flatPath": "v2beta1/projects/{projectsId}/logs", - "path": "v2beta1/{+parent}/logs", - "id": "logging.projects.logs.list" - } - } - }, - "metrics": { - "methods": { - "update": { - "parameters": { - "metricName": { - "location": "path", - "description": "The resource name of the metric to update:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\nThe updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/metrics/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.write" - ], - "flatPath": "v2beta1/projects/{projectsId}/metrics/{metricsId}", - "id": "logging.projects.metrics.update", - "path": "v2beta1/{+metricName}", - "description": "Creates or updates a logs-based metric.", - "request": { - "$ref": "LogMetric" - }, - "response": { - "$ref": "LogMetric" - }, - "parameterOrder": [ - "metricName" - ], - "httpMethod": "PUT" - }, - "create": { - "response": { - "$ref": "LogMetric" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "parameters": { - "parent": { - "description": "The resource name of the project in which to create the metric:\n\"projects/[PROJECT_ID]\"\nThe new metric must be provided in the request.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.write" - ], - "flatPath": "v2beta1/projects/{projectsId}/metrics", - "id": "logging.projects.metrics.create", - "path": "v2beta1/{+parent}/metrics", - "description": "Creates a logs-based metric.", - "request": { - "$ref": "LogMetric" - } - }, - "delete": { - "httpMethod": "DELETE", - "parameterOrder": [ - "metricName" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "metricName": { - "description": "The resource name of the metric to delete:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/metrics/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.write" - ], - "flatPath": "v2beta1/projects/{projectsId}/metrics/{metricsId}", - "path": "v2beta1/{+metricName}", - "id": "logging.projects.metrics.delete", - "description": "Deletes a logs-based metric." - }, - "get": { - "flatPath": "v2beta1/projects/{projectsId}/metrics/{metricsId}", - "id": "logging.projects.metrics.get", - "path": "v2beta1/{+metricName}", - "description": "Gets a logs-based metric.", - "response": { - "$ref": "LogMetric" - }, - "parameterOrder": [ - "metricName" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ], - "parameters": { - "metricName": { - "location": "path", - "description": "The resource name of the desired metric:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/metrics/[^/]+$" - } - } - }, - "list": { - "id": "logging.projects.metrics.list", - "path": "v2beta1/{+parent}/metrics", - "description": "Lists logs-based metrics.", - "response": { - "$ref": "ListLogMetricsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ], - "parameters": { - "pageToken": { - "type": "string", - "location": "query", - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call." - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "type": "integer" - }, - "parent": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "Required. The name of the project containing the metrics:\n\"projects/[PROJECT_ID]\"\n", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/projects/{projectsId}/metrics" - } - } - } - } - }, - "billingAccounts": { - "resources": { - "logs": { - "methods": { - "delete": { - "flatPath": "v2beta1/billingAccounts/{billingAccountsId}/logs/{logsId}", - "id": "logging.billingAccounts.logs.delete", - "path": "v2beta1/{+logName}", - "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "logName" - ], - "httpMethod": "DELETE", - "parameters": { - "logName": { - "description": "Required. The resource name of the log to delete:\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\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", - "type": "string", - "required": true, - "pattern": "^billingAccounts/[^/]+/logs/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - }, - "list": { - "response": { - "$ref": "ListLogsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "parameters": { - "parent": { - "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", - "type": "string", - "required": true, - "pattern": "^billingAccounts/[^/]+$", - "location": "path" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "type": "integer" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ], - "flatPath": "v2beta1/billingAccounts/{billingAccountsId}/logs", - "id": "logging.billingAccounts.logs.list", - "path": "v2beta1/{+parent}/logs", - "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed." - } - } - } - } - } - }, - "parameters": { - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "$.xgafv": { - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ] - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "alt": { - "location": "query", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ] - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "key": { - "location": "query", - "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.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - } - }, - "version": "v2beta1", - "baseUrl": "https://logging.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Writes log entries and manages your Stackdriver Logging configuration.", - "servicePath": "", - "basePath": "", - "id": "logging:v2beta1", - "revision": "20170717", - "documentationLink": "https://cloud.google.com/logging/docs/", - "discoveryVersion": "v1", - "version_module": "True", "schemas": { - "Empty": { - "type": "object", - "properties": {}, - "id": "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 {}." - }, - "LogEntry": { - "description": "An individual entry in a log.", - "type": "object", - "properties": { - "receiveTimestamp": { - "format": "google-datetime", - "description": "Output only. The time the log entry was received by Stackdriver Logging.", - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "google-datetime", - "description": "Optional. The time the event described by the log entry occurred. If omitted in a new log entry, Stackdriver Logging will insert the time the log entry is received. Stackdriver Logging might reject log entries whose time stamps are more than a couple of hours in the future. Log entries with time stamps in the past are accepted." - }, - "logName": { - "description": "Required. The resource name of the log to which this log entry belongs:\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 within log_name. Example: \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results.", - "type": "string" - }, - "httpRequest": { - "$ref": "HttpRequest", - "description": "Optional. Information about the HTTP request associated with this log entry, if applicable." - }, - "resource": { - "description": "Required. The monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error.", - "$ref": "MonitoredResource" - }, - "jsonPayload": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The log entry payload, represented as a structure that is expressed as a JSON object.", - "type": "object" - }, - "insertId": { - "description": "Optional. A unique identifier for the log entry. If you provide a value, then Stackdriver Logging considers other log entries in the same project, with the same timestamp, and with the same insert_id to be duplicates which can be removed. If omitted in new log entries, then Stackdriver Logging will insert its own unique identifier. The insert_id is used to order log entries that have the same timestamp value.", - "type": "string" - }, - "operation": { - "description": "Optional. Information about an operation associated with the log entry, if applicable.", - "$ref": "LogEntryOperation" - }, - "textPayload": { - "description": "The log entry payload, represented as a Unicode string (UTF-8).", - "type": "string" - }, - "protoPayload": { - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - }, - "description": "The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads.", - "type": "object" - }, - "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" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. A set of user-defined (key, value) data that provides additional information about the log entry.", - "type": "object" - }, - "severity": { - "description": "Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT.", - "type": "string", - "enumDescriptions": [ - "(0) The log entry has no assigned severity level.", - "(100) Debug or trace information.", - "(200) Routine information, such as ongoing status or performance.", - "(300) Normal but significant events, such as start up, shut down, or a configuration change.", - "(400) Warning events might cause problems.", - "(500) Error events are likely to cause problems.", - "(600) Critical events cause more severe problems or outages.", - "(700) A person must take an action immediately.", - "(800) One or more systems are unusable." - ], - "enum": [ - "DEFAULT", - "DEBUG", - "INFO", - "NOTICE", - "WARNING", - "ERROR", - "CRITICAL", - "ALERT", - "EMERGENCY" - ] - }, - "sourceLocation": { - "$ref": "LogEntrySourceLocation", - "description": "Optional. Source code location information associated with the log entry, if any." - } - }, - "id": "LogEntry" - }, - "SourceLocation": { - "description": "Specifies a location in a source code file.", - "type": "object", - "properties": { - "file": { - "description": "Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", - "type": "string" - }, - "functionName": { - "type": "string", - "description": "Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information is used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python)." - }, - "line": { - "format": "int64", - "description": "Line within the source file.", - "type": "string" - } - }, - "id": "SourceLocation" - }, - "ListLogEntriesRequest": { - "id": "ListLogEntriesRequest", - "description": "The parameters to ListLogEntries.", - "type": "object", - "properties": { - "orderBy": { - "description": "Optional. How the results should be sorted. Presently, the only permitted values are \"timestamp asc\" (default) and \"timestamp desc\". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of their insert_id values.", - "type": "string" - }, - "resourceNames": { - "description": "Required. Names of one or more parent resources from which to retrieve log entries:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nProjects listed in the project_ids field are added to this list.", - "items": { - "type": "string" - }, - "type": "array" - }, - "projectIds": { - "description": "Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: \"my-project-1A\". If present, these project identifiers are converted to resource name format and added to the list of resources in resource_names.", - "items": { - "type": "string" - }, - "type": "array" - }, - "filter": { - "type": "string", - "description": "Optional. A filter that chooses which log entries to return. See Advanced Logs Filters. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource_names. Referencing a parent resource that is not listed in resource_names will cause the filter to return no results. The maximum length of the filter is 20000 characters." - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of other method parameters should be identical to those in the previous call.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of next_page_token in the response indicates that more results might be available.", - "type": "integer" - } - } - }, "RequestLog": { "description": "Complete log information about a single HTTP request to an App Engine application.", "type": "object", "properties": { - "instanceIndex": { - "format": "int32", - "description": "If the instance processing this request belongs to a manually scaled module, then this is the 0-based index of the instance. Otherwise, this value is -1.", - "type": "integer" - }, - "finished": { - "type": "boolean", - "description": "Whether this request is finished or active." - }, - "host": { - "description": "Internet host and port number of the resource being requested.", - "type": "string" - }, - "httpVersion": { - "description": "HTTP version of request. Example: \"HTTP/1.1\".", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "Time when the request started.", - "type": "string" - }, - "latency": { - "format": "google-duration", - "description": "Latency of the request.", - "type": "string" - }, - "ip": { - "description": "Origin IP address.", - "type": "string" - }, - "appId": { - "type": "string", - "description": "Application that handled this request." - }, - "appEngineRelease": { - "description": "App Engine release version.", - "type": "string" - }, - "method": { - "description": "Request method. Example: \"GET\", \"HEAD\", \"PUT\", \"POST\", \"DELETE\".", - "type": "string" - }, - "cost": { - "format": "double", - "description": "An indication of the relative cost of serving this request.", - "type": "number" - }, - "instanceId": { - "description": "An identifier for the instance that handled the request.", - "type": "string" - }, "megaCycles": { + "type": "string", "format": "int64", - "description": "Number of CPU megacycles used to process request.", - "type": "string" + "description": "Number of CPU megacycles used to process request." }, "first": { "description": "Whether this is the first RequestLog entry for this request. If an active request has several RequestLog entries written to Stackdriver Logging, then this field will be set for one of them.", @@ -1034,8 +70,8 @@ "type": "string" }, "nickname": { - "type": "string", - "description": "The logged-in user who made the request.Most likely, this is the part of the user's email before the @ sign. The field value is the same for different requests from the same user, but different users can have similar names. This information is also available to the application via the App Engine Users API.This field will be populated starting with App Engine 1.9.21." + "description": "The logged-in user who made the request.Most likely, this is the part of the user's email before the @ sign. The field value is the same for different requests from the same user, but different users can have similar names. This information is also available to the application via the App Engine Users API.This field will be populated starting with App Engine 1.9.21.", + "type": "string" }, "pendingTime": { "format": "google-duration", @@ -1047,9 +83,9 @@ "type": "string" }, "status": { - "type": "integer", "format": "int32", - "description": "HTTP response status code. Example: 200, 404." + "description": "HTTP response status code. Example: 200, 404.", + "type": "integer" }, "taskName": { "description": "Task name of the request, in the case of an offline request.", @@ -1058,6 +94,58 @@ "urlMapEntry": { "description": "File or class that handled the request.", "type": "string" + }, + "instanceIndex": { + "format": "int32", + "description": "If the instance processing this request belongs to a manually scaled module, then this is the 0-based index of the instance. Otherwise, this value is -1.", + "type": "integer" + }, + "finished": { + "description": "Whether this request is finished or active.", + "type": "boolean" + }, + "host": { + "description": "Internet host and port number of the resource being requested.", + "type": "string" + }, + "httpVersion": { + "description": "HTTP version of request. Example: \"HTTP/1.1\".", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "Time when the request started.", + "type": "string" + }, + "latency": { + "format": "google-duration", + "description": "Latency of the request.", + "type": "string" + }, + "ip": { + "description": "Origin IP address.", + "type": "string" + }, + "appId": { + "description": "Application that handled this request.", + "type": "string" + }, + "appEngineRelease": { + "type": "string", + "description": "App Engine release version." + }, + "method": { + "description": "Request method. Example: \"GET\", \"HEAD\", \"PUT\", \"POST\", \"DELETE\".", + "type": "string" + }, + "cost": { + "type": "number", + "format": "double", + "description": "An indication of the relative cost of serving this request." + }, + "instanceId": { + "description": "An identifier for the instance that handled the request.", + "type": "string" } }, "id": "RequestLog" @@ -1074,58 +162,12 @@ "type": "array" }, "nextPageToken": { - "type": "string", - "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken." + "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", + "type": "string" } }, "id": "ListMonitoredResourceDescriptorsResponse" }, - "SourceReference": { - "description": "A reference to a particular snapshot of the source tree used to build and deploy an application.", - "type": "object", - "properties": { - "repository": { - "description": "Optional. A URI string identifying the repository. Example: \"https://github.com/GoogleCloudPlatform/kubernetes.git\"", - "type": "string" - }, - "revisionId": { - "description": "The canonical and persistent identifier of the deployed revision. Example (git): \"0035781c50ec7aa23385dc841529ce8a4b70db1b\"", - "type": "string" - } - }, - "id": "SourceReference" - }, - "LogMetric": { - "description": "Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.", - "type": "object", - "properties": { - "description": { - "description": "Optional. A description of this metric, which is used in documentation.", - "type": "string" - }, - "version": { - "enumDescriptions": [ - "Stackdriver Logging API v2.", - "Stackdriver Logging API v1." - ], - "enum": [ - "V2", - "V1" - ], - "description": "Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.", - "type": "string" - }, - "filter": { - "description": "Required. An advanced logs filter which is used to match log entries. Example:\n\"resource.type=gae_app AND severity\u003e=ERROR\"\nThe maximum length of the filter is 20000 characters.", - "type": "string" - }, - "name": { - "description": "Required. The client-assigned metric identifier. Examples: \"error_count\", \"nginx/requests\".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: \"projects/my-project/metrics/nginx%2Frequests\".", - "type": "string" - } - }, - "id": "LogMetric" - }, "LogEntryOperation": { "description": "Additional information about a potentially long-running operation with which a log entry is associated.", "type": "object", @@ -1149,31 +191,76 @@ }, "id": "LogEntryOperation" }, - "WriteLogEntriesResponse": { - "description": "Result returned from WriteLogEntries. empty", + "LogMetric": { "type": "object", - "properties": {}, - "id": "WriteLogEntriesResponse" + "properties": { + "description": { + "type": "string", + "description": "Optional. A description of this metric, which is used in documentation." + }, + "valueExtractor": { + "description": "Optional. A value_extractor is required when using a distribution logs-based metric to extract the values to record from a log entry. Two functions are supported for value extraction: EXTRACT(field) or REGEXP_EXTRACT(field, regex). The argument are: 1. field: The name of the log entry field from which the value is to be extracted. 2. regex: A regular expression using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax) with a single capture group to extract data from the specified log entry field. The value of the field is converted to a string before applying the regex. It is an error to specify a regex that does not include exactly one capture group.The result of the extraction must be convertible to a double type, as the distribution always records double values. If either the extraction or the conversion to double fails, then those values are not recorded in the distribution.Example: REGEXP_EXTRACT(jsonPayload.request, \".*quantity=(\\d+).*\")", + "type": "string" + }, + "bucketOptions": { + "$ref": "BucketOptions", + "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." + }, + "name": { + "description": "Required. The client-assigned metric identifier. Examples: \"error_count\", \"nginx/requests\".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: \"projects/my-project/metrics/nginx%2Frequests\".", + "type": "string" + }, + "labelExtractors": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value. Each label key specified in the LabelDescriptor must have an associated extractor expression in this map. The syntax of the extractor expression is the same as for the value_extractor field.The extracted value is converted to the type defined in the label descriptor. If the either the extraction or the type conversion fails, the label will have a default value. The default value for a string label is an empty string, for an integer label its 0, and for a boolean label its false.Note that there are upper bounds on the maximum number of labels and the number of active time series that are allowed in a project.", + "type": "object" + }, + "metricDescriptor": { + "description": "Optional. The metric descriptor associated with the logs-based metric. If unspecified, it uses a default metric descriptor with a DELTA metric kind, INT64 value type, with no labels and a unit of \"1\". Such a metric counts the number of log entries matching the filter expression.The name, type, and description fields in the metric_descriptor are output only, and is constructed using the name and description field in the LogMetric.To create a logs-based metric that records a distribution of log values, a DELTA metric kind with a DISTRIBUTION value type must be used along with a value_extractor expression in the LogMetric.Each label in the metric descriptor must have a matching label name as the key and an extractor expression as the value in the label_extractors map.The metric_kind and value_type fields in the metric_descriptor cannot be updated once initially configured. New labels can be added in the metric_descriptor, but existing labels cannot be modified except for their description.", + "$ref": "MetricDescriptor" + }, + "version": { + "description": "Deprecated. The API version that created or updated this metric. The v2 format is used by default and cannot be changed.", + "type": "string", + "enumDescriptions": [ + "Stackdriver Logging API v2.", + "Stackdriver Logging API v1." + ], + "enum": [ + "V2", + "V1" + ] + }, + "filter": { + "description": "Required. An advanced logs filter which is used to match log entries. Example:\n\"resource.type=gae_app AND severity\u003e=ERROR\"\nThe maximum length of the filter is 20000 characters.", + "type": "string" + } + }, + "id": "LogMetric", + "description": "Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.Logs-based metric can also be used to extract values from logs and create a a distribution of the values. The distribution records the statistics of the extracted values along with an optional histogram of the values as specified by the bucket options." }, "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", "type": "object", "properties": { - "type": { - "type": "string", - "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." - }, "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.", + "type": "string" } }, "id": "MonitoredResource" }, "LogSink": { + "description": "Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder.", "type": "object", "properties": { "name": { @@ -1181,113 +268,78 @@ "type": "string" }, "includeChildren": { - "description": "Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends on the sink's filter expression. For example, if this field is true, then the filter resource.type=gce_instance would export all Compute Engine VM instance log entries from all projects in the sink's parent. To only export entries from certain child projects, filter on the project part of the log name:\nlogName:(\"projects/test-project1/\" OR \"projects/test-project2/\") AND\nresource.type=gce_instance\n", - "type": "boolean" + "type": "boolean", + "description": "Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends on the sink's filter expression. For example, if this field is true, then the filter resource.type=gce_instance would export all Compute Engine VM instance log entries from all projects in the sink's parent. To only export entries from certain child projects, filter on the project part of the log name:\nlogName:(\"projects/test-project1/\" OR \"projects/test-project2/\") AND\nresource.type=gce_instance\n" }, "destination": { "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" }, "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. The filter must use the log entry format specified by the output_version_format parameter. For example, in the v2 format:\nlogName=\"projects/[PROJECT_ID]/logs/[LOG_ID]\" AND severity\u003e=ERROR\n", + "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" }, "endTime": { "format": "google-datetime", - "description": "Optional. The time at which this sink will stop exporting log entries. Log entries are exported only if their timestamp is earlier than the end time. If this field is not supplied, there is no end time. If both a start time and an end time are provided, then the end time must be later than the start time.", + "description": "Deprecated. This field is ignored when creating or updating sinks.", "type": "string" }, "startTime": { + "type": "string", "format": "google-datetime", - "description": "Optional. The time at which this sink will begin exporting log entries. Log entries are exported only if their timestamp is not earlier than the start time. The default value of this field is the time the sink is created or updated.", - "type": "string" + "description": "Deprecated. This field is ignored when creating or updating sinks." }, "writerIdentity": { "description": "Output only. An IAM identity—a service account or group—under which Stackdriver 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" }, "outputVersionFormat": { + "enumDescriptions": [ + "An unspecified format version that will default to V2.", + "LogEntry version 2 format.", + "LogEntry version 1 format." + ], "enum": [ "VERSION_FORMAT_UNSPECIFIED", "V2", "V1" ], "description": "Deprecated. The log entry format to use for this sink's exported log entries. The v2 format is used by default and cannot be changed.", - "type": "string", - "enumDescriptions": [ - "An unspecified format version that will default to V2.", - "LogEntry version 2 format.", - "LogEntry version 1 format." - ] + "type": "string" } }, - "id": "LogSink", - "description": "Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder." - }, - "WriteLogEntriesRequest": { - "id": "WriteLogEntriesRequest", - "description": "The parameters to WriteLogEntries.", - "type": "object", - "properties": { - "entries": { - "description": "Required. The log entries to write. Values supplied for the fields log_name, resource, and labels in this entries.write request are inserted into those log entries in this list that do not provide their own values.Stackdriver Logging also creates and inserts values for timestamp and insert_id if the entries do not provide them. The created insert_id for the N'th entry in this list will be greater than earlier entries and less than later entries. Otherwise, the order of log entries in this list does not matter.To improve throughput and to avoid exceeding the quota limit for calls to entries.write, you should write multiple log entries at once rather than calling this method for each individual log entry.", - "items": { - "$ref": "LogEntry" - }, - "type": "array" - }, - "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, \"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": { - "description": "Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, then the response status is the error associated with one of the failed entries and the response includes error details keyed by the entries' zero-based index in the entries.write method.", - "type": "boolean" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Default labels that are added to the labels field of all log entries in entries. If a log entry already has a label with the same key as a label in this parameter, then the log entry's label is not changed. See LogEntry.", - "type": "object" - }, - "resource": { - "$ref": "MonitoredResource", - "description": "Optional. A default monitored resource object that is assigned to all log entries in entries that do not specify a value for resource. Example:\n{ \"type\": \"gce_instance\",\n \"labels\": {\n \"zone\": \"us-central1-a\", \"instance_id\": \"00000000000000000000\" }}\nSee LogEntry." - } - } + "id": "LogSink" }, "ListLogsResponse": { "description": "Result returned from ListLogs.", "type": "object", "properties": { - "logNames": { - "description": "A list of log names. For example, \"projects/my-project/syslog\" or \"organizations/123/cloudresourcemanager.googleapis.com%2Factivity\".", - "items": { - "type": "string" - }, - "type": "array" - }, "nextPageToken": { "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", "type": "string" + }, + "logNames": { + "items": { + "type": "string" + }, + "type": "array", + "description": "A list of log names. For example, \"projects/my-project/syslog\" or \"organizations/123/cloudresourcemanager.googleapis.com%2Factivity\"." } }, "id": "ListLogsResponse" }, "HttpRequest": { - "description": "A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.", "type": "object", "properties": { - "userAgent": { - "description": "The user agent sent by the client. Example: \"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\".", - "type": "string" - }, "latency": { "format": "google-duration", "description": "The request processing latency on the server, from the time the request was received until the response was sent.", "type": "string" }, + "userAgent": { + "description": "The user agent sent by the client. Example: \"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\".", + "type": "string" + }, "cacheFillBytes": { "format": "int64", "description": "The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.", @@ -1302,6 +354,10 @@ "description": "The size of the HTTP request message in bytes, including the request headers and the request body.", "type": "string" }, + "protocol": { + "type": "string", + "description": "Protocol used for the request. Examples: \"HTTP/1.1\", \"HTTP/2\", \"websocket\"" + }, "responseSize": { "format": "int64", "description": "The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.", @@ -1311,17 +367,17 @@ "description": "The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: \"http://example.com/some/info?color=red\".", "type": "string" }, - "remoteIp": { - "type": "string", - "description": "The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: \"192.168.1.1\", \"FE80::0202:B3FF:FE1E:8329\"." - }, "serverIp": { "description": "The IP address (IPv4 or IPv6) of the origin server that the request was sent to.", "type": "string" }, + "remoteIp": { + "description": "The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: \"192.168.1.1\", \"FE80::0202:B3FF:FE1E:8329\".", + "type": "string" + }, "cacheLookup": { - "type": "boolean", - "description": "Whether or not a cache lookup was attempted." + "description": "Whether or not a cache lookup was attempted.", + "type": "boolean" }, "cacheHit": { "description": "Whether or not an entity was served from cache (with or without validation).", @@ -1341,74 +397,34 @@ "type": "string" } }, - "id": "HttpRequest" + "id": "HttpRequest", + "description": "A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message." }, "ListSinksResponse": { - "description": "Result returned from ListSinks.", - "type": "object", "properties": { + "nextPageToken": { + "description": "If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken.", + "type": "string" + }, "sinks": { "description": "A list of sinks.", "items": { "$ref": "LogSink" }, "type": "array" - }, - "nextPageToken": { - "description": "If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken.", - "type": "string" } }, - "id": "ListSinksResponse" - }, - "LabelDescriptor": { - "description": "A description of a label.", - "type": "object", - "properties": { - "key": { - "description": "The label key.", - "type": "string" - }, - "description": { - "description": "A human-readable description for the label.", - "type": "string" - }, - "valueType": { - "enumDescriptions": [ - "A variable-length string. This is the default.", - "Boolean; true or false.", - "A 64-bit signed integer." - ], - "enum": [ - "STRING", - "BOOL", - "INT64" - ], - "description": "The type of data that can be assigned to the label.", - "type": "string" - } - }, - "id": "LabelDescriptor" + "id": "ListSinksResponse", + "description": "Result returned from ListSinks.", + "type": "object" }, "MonitoredResourceDescriptor": { - "id": "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.", "type": "object", "properties": { - "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": { - "type": "string", - "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}\"." - }, "description": { - "description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", - "type": "string" + "type": "string", + "description": "Optional. A detailed description of the monitored resource type that might be used in documentation." }, "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\".", @@ -1417,31 +433,42 @@ "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" + }, + "labels": { + "items": { + "$ref": "LabelDescriptor" + }, + "type": "array", + "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\"." + }, + "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" } - } + }, + "id": "MonitoredResourceDescriptor" }, "LogEntrySourceLocation": { "description": "Additional information about the source code location that produced the log entry.", "type": "object", "properties": { - "file": { - "description": "Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", - "type": "string" - }, "function": { "type": "string", "description": "Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python)." }, "line": { + "type": "string", "format": "int64", - "description": "Optional. Line within the source file. 1-based; 0 indicates no line number available.", + "description": "Optional. Line within the source file. 1-based; 0 indicates no line number available." + }, + "file": { + "description": "Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", "type": "string" } }, "id": "LogEntrySourceLocation" }, "ListLogEntriesResponse": { - "description": "Result returned from ListLogEntries.", "type": "object", "properties": { "nextPageToken": { @@ -1449,25 +476,25 @@ "type": "string" }, "entries": { - "description": "A list of log entries.", + "description": "A list of log entries. If entries is empty, nextPageToken may still be returned, indicating that more entries may exist. See nextPageToken for more information.", "items": { "$ref": "LogEntry" }, "type": "array" } }, - "id": "ListLogEntriesResponse" + "id": "ListLogEntriesResponse", + "description": "Result returned from ListLogEntries." }, "LogLine": { "description": "Application log line emitted while processing a request.", "type": "object", "properties": { "logMessage": { - "description": "App-provided log message.", - "type": "string" + "type": "string", + "description": "App-provided log message." }, "severity": { - "type": "string", "enumDescriptions": [ "(0) The log entry has no assigned severity level.", "(100) Debug or trace information.", @@ -1490,7 +517,8 @@ "ALERT", "EMERGENCY" ], - "description": "Severity of this log entry." + "description": "Severity of this log entry.", + "type": "string" }, "sourceLocation": { "description": "Where in the source code this log message was written.", @@ -1504,28 +532,1179 @@ }, "id": "LogLine" }, - "ListLogMetricsResponse": { + "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)).", + "type": "object", "properties": { + "numFiniteBuckets": { + "format": "int32", + "description": "Must be greater than 0.", + "type": "integer" + }, + "width": { + "format": "double", + "description": "Must be greater than 0.", + "type": "number" + }, + "offset": { + "format": "double", + "description": "Lower bound of the first bucket.", + "type": "number" + } + }, + "id": "Linear" + }, + "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 {}.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "SourceLocation": { + "id": "SourceLocation", + "description": "Specifies a location in a source code file.", + "type": "object", + "properties": { + "file": { + "description": "Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", + "type": "string" + }, + "functionName": { + "description": "Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information is used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).", + "type": "string" + }, + "line": { + "type": "string", + "format": "int64", + "description": "Line within the source file." + } + } + }, + "ListLogEntriesRequest": { + "description": "The parameters to ListLogEntries.", + "type": "object", + "properties": { + "projectIds": { + "description": "Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: \"my-project-1A\". If present, these project identifiers are converted to resource name format and added to the list of resources in resource_names.", + "items": { + "type": "string" + }, + "type": "array" + }, + "filter": { + "type": "string", + "description": "Optional. A filter that chooses which log entries to return. See Advanced Logs Filters. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource_names. Referencing a parent resource that is not listed in resource_names will cause the filter to return no results. The maximum length of the filter is 20000 characters." + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of next_page_token in the response indicates that more results might be available.", + "type": "integer" + }, + "orderBy": { + "description": "Optional. How the results should be sorted. Presently, the only permitted values are \"timestamp asc\" (default) and \"timestamp desc\". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of their insert_id values.", + "type": "string" + }, + "resourceNames": { + "description": "Required. Names of one or more parent resources from which to retrieve log entries:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nProjects listed in the project_ids field are added to this list.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "ListLogEntriesRequest" + }, + "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.", + "type": "object", + "properties": { + "bounds": { + "description": "The values must be monotonically increasing.", + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + } + }, + "id": "Explicit" + }, + "SourceReference": { + "description": "A reference to a particular snapshot of the source tree used to build and deploy an application.", + "type": "object", + "properties": { + "revisionId": { + "description": "The canonical and persistent identifier of the deployed revision. Example (git): \"0035781c50ec7aa23385dc841529ce8a4b70db1b\"", + "type": "string" + }, + "repository": { + "description": "Optional. A URI string identifying the repository. Example: \"https://github.com/GoogleCloudPlatform/kubernetes.git\"", + "type": "string" + } + }, + "id": "SourceReference" + }, + "WriteLogEntriesResponse": { + "id": "WriteLogEntriesResponse", + "description": "Result returned from WriteLogEntries. empty", + "type": "object", + "properties": {} + }, + "Exponential": { + "id": "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)).", + "type": "object", + "properties": { + "growthFactor": { + "format": "double", + "description": "Must be greater than 1.", + "type": "number" + }, + "scale": { + "format": "double", + "description": "Must be greater than 0.", + "type": "number" + }, + "numFiniteBuckets": { + "format": "int32", + "description": "Must be greater than 0.", + "type": "integer" + } + } + }, + "WriteLogEntriesRequest": { + "description": "The parameters to WriteLogEntries.", + "type": "object", + "properties": { + "entries": { + "description": "Required. The log entries to send to Stackdriver Logging. The order of log entries in this list does not matter. Values supplied in this method's log_name, resource, and labels fields are copied into those log entries in this list that do not include values for their corresponding fields. For more information, see the LogEntry type.If the timestamp or insert_id fields are missing in log entries, then this method supplies the current time or a unique identifier, respectively. The supplied values are chosen so that, among the log entries that did not supply their own values, the entries earlier in the list will sort before the entries later in the list. See the entries.list method.Log entries with timestamps that are more than the logs retention period in the past or more than 24 hours in the future might be discarded. Discarding does not return an error.To improve throughput and to avoid exceeding the quota limit for calls to entries.write, you should try to include several log entries in this list, rather than calling this method for each individual log entry.", + "items": { + "$ref": "LogEntry" + }, + "type": "array" + }, + "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, \"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": { + "type": "boolean", + "description": "Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, then the response status is the error associated with one of the failed entries and the response includes error details keyed by the entries' zero-based index in the entries.write method." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Default labels that are added to the labels field of all log entries in entries. If a log entry already has a label with the same key as a label in this parameter, then the log entry's label is not changed. See LogEntry." + }, + "resource": { + "$ref": "MonitoredResource", + "description": "Optional. A default monitored resource object that is assigned to all log entries in entries that do not specify a value for resource. Example:\n{ \"type\": \"gce_instance\",\n \"labels\": {\n \"zone\": \"us-central1-a\", \"instance_id\": \"00000000000000000000\" }}\nSee LogEntry." + } + }, + "id": "WriteLogEntriesRequest" + }, + "LabelDescriptor": { + "properties": { + "key": { + "description": "The label key.", + "type": "string" + }, + "description": { + "description": "A human-readable description for the label.", + "type": "string" + }, + "valueType": { + "description": "The type of data that can be assigned to the label.", + "type": "string", + "enumDescriptions": [ + "A variable-length string. This is the default.", + "Boolean; true or false.", + "A 64-bit signed integer." + ], + "enum": [ + "STRING", + "BOOL", + "INT64" + ] + } + }, + "id": "LabelDescriptor", + "description": "A description of a label.", + "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.", + "type": "object", + "properties": { + "explicitBuckets": { + "description": "The explicit buckets.", + "$ref": "Explicit" + }, + "linearBuckets": { + "$ref": "Linear", + "description": "The linear bucket." + }, + "exponentialBuckets": { + "description": "The exponential buckets.", + "$ref": "Exponential" + } + }, + "id": "BucketOptions" + }, + "ListLogMetricsResponse": { + "id": "ListLogMetricsResponse", + "description": "Result returned from ListLogMetrics.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", + "type": "string" + }, "metrics": { "description": "A list of logs-based metrics.", "items": { "$ref": "LogMetric" }, "type": "array" + } + } + }, + "MetricDescriptor": { + "type": "object", + "properties": { + "metricKind": { + "type": "string", + "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." + ], + "enum": [ + "METRIC_KIND_UNSPECIFIED", + "GAUGE", + "DELTA", + "CUMULATIVE" + ], + "description": "Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metric_kind and value_type might not be supported." }, - "nextPageToken": { - "description": "If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", + "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\".", + "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 includes the dimensionless unit 1, such as 1/s.The 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 '}'.", + "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" + }, + "name": { + "description": "The resource name of the metric descriptor. Depending on the implementation, the name typically includes: (1) the parent resource name that defines the scope of the metric type or of its data; and (2) the metric's URL-encoded type, which also appears in the type field of this descriptor. For example, following is the resource name of a custom metric within the GCP project my-project-id:\n\"projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount\"\n", + "type": "string" + }, + "type": { + "description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined custom metric types have the DNS name custom.googleapis.com. Metric types should use a natural hierarchical grouping. For example:\n\"custom.googleapis.com/invoice/paid/amount\"\n\"appengine.googleapis.com/http/server/response_latencies\"\n", + "type": "string" + }, + "valueType": { + "enum": [ + "VALUE_TYPE_UNSPECIFIED", + "BOOL", + "INT64", + "DOUBLE", + "STRING", + "DISTRIBUTION", + "MONEY" + ], + "description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of metric_kind and value_type might not be supported.", + "type": "string", + "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." + ] + } + }, + "id": "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." + }, + "LogEntry": { + "properties": { + "logName": { + "description": "Required. The resource name of the log to which this log entry belongs:\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 within log_name. Example: \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results.", + "type": "string" + }, + "resource": { + "description": "Required. The monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error.", + "$ref": "MonitoredResource" + }, + "httpRequest": { + "$ref": "HttpRequest", + "description": "Optional. Information about the HTTP request associated with this log entry, if applicable." + }, + "jsonPayload": { + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + }, + "description": "The log entry payload, represented as a structure that is expressed as a JSON object.", + "type": "object" + }, + "operation": { + "description": "Optional. Information about an operation associated with the log entry, if applicable.", + "$ref": "LogEntryOperation" + }, + "insertId": { + "description": "Optional. A unique identifier for the log entry. If you provide a value, then Stackdriver Logging considers other log entries in the same project, with the same timestamp, and with the same insert_id to be duplicates which can be removed. If omitted in new log entries, then Stackdriver Logging assigns its own unique identifier. The insert_id is also used to order log entries that have the same timestamp value.", + "type": "string" + }, + "textPayload": { + "description": "The log entry payload, represented as a Unicode string (UTF-8).", + "type": "string" + }, + "protoPayload": { + "description": "The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "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" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A set of user-defined (key, value) data that provides additional information about the log entry.", + "type": "object" + }, + "severity": { + "enumDescriptions": [ + "(0) The log entry has no assigned severity level.", + "(100) Debug or trace information.", + "(200) Routine information, such as ongoing status or performance.", + "(300) Normal but significant events, such as start up, shut down, or a configuration change.", + "(400) Warning events might cause problems.", + "(500) Error events are likely to cause problems.", + "(600) Critical events cause more severe problems or outages.", + "(700) A person must take an action immediately.", + "(800) One or more systems are unusable." + ], + "enum": [ + "DEFAULT", + "DEBUG", + "INFO", + "NOTICE", + "WARNING", + "ERROR", + "CRITICAL", + "ALERT", + "EMERGENCY" + ], + "description": "Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT.", + "type": "string" + }, + "sourceLocation": { + "$ref": "LogEntrySourceLocation", + "description": "Optional. Source code location information associated with the log entry, if any." + }, + "timestamp": { + "format": "google-datetime", + "description": "Optional. The time the event described by the log entry occurred. This time is used to compute the log entry's age and to enforce the logs retention period. If this field is omitted in a new log entry, then Stackdriver Logging assigns it the current time.Incoming log entries should have timestamps that are no more than the logs retention period in the past, and no more than 24 hours in the future. See the entries.write API method for more information.", + "type": "string" + }, + "receiveTimestamp": { + "format": "google-datetime", + "description": "Output only. The time the log entry was received by Stackdriver Logging.", "type": "string" } }, - "id": "ListLogMetricsResponse", - "description": "Result returned from ListLogMetrics.", + "id": "LogEntry", + "description": "An individual entry in a log.", "type": "object" } }, + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "protocol": "rest" + "canonicalName": "Logging", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/logging.write": { + "description": "Submit log data for your projects" + }, + "https://www.googleapis.com/auth/logging.read": { + "description": "View log data for your projects" + }, + "https://www.googleapis.com/auth/logging.admin": { + "description": "Administrate log data for your projects" + }, + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://logging.googleapis.com/", + "ownerDomain": "google.com", + "name": "logging", + "batchPath": "batch", + "title": "Stackdriver Logging API", + "ownerName": "Google", + "resources": { + "monitoredResourceDescriptors": { + "methods": { + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListMonitoredResourceDescriptorsResponse" + }, + "parameterOrder": [], + "parameters": { + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2beta1/monitoredResourceDescriptors", + "path": "v2beta1/monitoredResourceDescriptors", + "id": "logging.monitoredResourceDescriptors.list", + "description": "Lists the descriptors for monitored resource types used by Stackdriver Logging." + } + } + }, + "organizations": { + "resources": { + "logs": { + "methods": { + "delete": { + "flatPath": "v2beta1/organizations/{organizationsId}/logs/{logsId}", + "path": "v2beta1/{+logName}", + "id": "logging.organizations.logs.delete", + "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted.", + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "logName" + ], + "parameters": { + "logName": { + "description": "Required. The resource name of the log to delete:\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\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+/logs/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ] + }, + "list": { + "flatPath": "v2beta1/organizations/{organizationsId}/logs", + "path": "v2beta1/{+parent}/logs", + "id": "logging.organizations.logs.list", + "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListLogsResponse" + }, + "parameters": { + "parent": { + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n" + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ] + } + } + } + } + }, + "entries": { + "methods": { + "list": { + "flatPath": "v2beta1/entries:list", + "path": "v2beta1/entries:list", + "id": "logging.entries.list", + "description": "Lists log entries. Use this method to retrieve log entries from Stackdriver Logging. For ways to export log entries, see Exporting Logs.", + "request": { + "$ref": "ListLogEntriesRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "ListLogEntriesResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ] + }, + "write": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "WriteLogEntriesResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.write" + ], + "flatPath": "v2beta1/entries:write", + "path": "v2beta1/entries:write", + "id": "logging.entries.write", + "description": "Log entry resourcesWrites log entries to Stackdriver Logging. This API method is the only way to send log entries to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver Logging agent (fluentd) and all logging libraries configured to use Stackdriver Logging.", + "request": { + "$ref": "WriteLogEntriesRequest" + } + } + } + }, + "projects": { + "resources": { + "metrics": { + "methods": { + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "LogMetric" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.write" + ], + "parameters": { + "parent": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "The resource name of the project in which to create the metric:\n\"projects/[PROJECT_ID]\"\nThe new metric must be provided in the request.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/projects/{projectsId}/metrics", + "path": "v2beta1/{+parent}/metrics", + "id": "logging.projects.metrics.create", + "request": { + "$ref": "LogMetric" + }, + "description": "Creates a logs-based metric." + }, + "delete": { + "description": "Deletes a logs-based metric.", + "httpMethod": "DELETE", + "parameterOrder": [ + "metricName" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "metricName": { + "description": "The resource name of the metric to delete:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/metrics/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.write" + ], + "flatPath": "v2beta1/projects/{projectsId}/metrics/{metricsId}", + "path": "v2beta1/{+metricName}", + "id": "logging.projects.metrics.delete" + }, + "get": { + "response": { + "$ref": "LogMetric" + }, + "parameterOrder": [ + "metricName" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "metricName": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/metrics/[^/]+$", + "location": "path", + "description": "The resource name of the desired metric:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n" + } + }, + "flatPath": "v2beta1/projects/{projectsId}/metrics/{metricsId}", + "id": "logging.projects.metrics.get", + "path": "v2beta1/{+metricName}", + "description": "Gets a logs-based metric." + }, + "list": { + "description": "Lists logs-based metrics.", + "response": { + "$ref": "ListLogMetricsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer", + "location": "query" + }, + "parent": { + "description": "Required. The name of the project containing the metrics:\n\"projects/[PROJECT_ID]\"\n", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2beta1/projects/{projectsId}/metrics", + "id": "logging.projects.metrics.list", + "path": "v2beta1/{+parent}/metrics" + }, + "update": { + "request": { + "$ref": "LogMetric" + }, + "description": "Creates or updates a logs-based metric.", + "response": { + "$ref": "LogMetric" + }, + "parameterOrder": [ + "metricName" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.write" + ], + "parameters": { + "metricName": { + "description": "The resource name of the metric to update:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\nThe updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/metrics/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2beta1/projects/{projectsId}/metrics/{metricsId}", + "id": "logging.projects.metrics.update", + "path": "v2beta1/{+metricName}" + } + } + }, + "sinks": { + "methods": { + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "sinkName" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "sinkName": { + "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/sinks/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2beta1/projects/{projectsId}/sinks/{sinksId}", + "id": "logging.projects.sinks.delete", + "path": "v2beta1/{+sinkName}", + "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted." + }, + "get": { + "path": "v2beta1/{+sinkName}", + "id": "logging.projects.sinks.get", + "description": "Gets a sink.", + "httpMethod": "GET", + "parameterOrder": [ + "sinkName" + ], + "response": { + "$ref": "LogSink" + }, + "parameters": { + "sinkName": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/sinks/[^/]+$", + "location": "path", + "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\"." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2beta1/projects/{projectsId}/sinks/{sinksId}" + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListSinksResponse" + }, + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer" + }, + "parent": { + "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2beta1/projects/{projectsId}/sinks", + "path": "v2beta1/{+parent}/sinks", + "id": "logging.projects.sinks.list", + "description": "Lists sinks." + }, + "update": { + "flatPath": "v2beta1/projects/{projectsId}/sinks/{sinksId}", + "path": "v2beta1/{+sinkName}", + "id": "logging.projects.sinks.update", + "request": { + "$ref": "LogSink" + }, + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "httpMethod": "PUT", + "parameterOrder": [ + "sinkName" + ], + "response": { + "$ref": "LogSink" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "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.", + "type": "string" + }, + "uniqueWriterIdentity": { + "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", + "type": "boolean", + "location": "query" + }, + "sinkName": { + "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/sinks/[^/]+$", + "location": "path" + } + } + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "LogSink" + }, + "parameters": { + "parent": { + "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "uniqueWriterIdentity": { + "type": "boolean", + "location": "query", + "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Stackdriver Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2beta1/projects/{projectsId}/sinks", + "path": "v2beta1/{+parent}/sinks", + "id": "logging.projects.sinks.create", + "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", + "request": { + "$ref": "LogSink" + } + } + } + }, + "logs": { + "methods": { + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "logName" + ], + "httpMethod": "DELETE", + "parameters": { + "logName": { + "description": "Required. The resource name of the log to delete:\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\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/logs/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2beta1/projects/{projectsId}/logs/{logsId}", + "id": "logging.projects.logs.delete", + "path": "v2beta1/{+logName}", + "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted." + }, + "list": { + "response": { + "$ref": "ListLogsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer" + }, + "parent": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/projects/{projectsId}/logs", + "id": "logging.projects.logs.list", + "path": "v2beta1/{+parent}/logs", + "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed." + } + } + } + } + }, + "billingAccounts": { + "resources": { + "logs": { + "methods": { + "delete": { + "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted.", + "httpMethod": "DELETE", + "parameterOrder": [ + "logName" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "logName": { + "description": "Required. The resource name of the log to delete:\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\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", + "type": "string", + "required": true, + "pattern": "^billingAccounts/[^/]+/logs/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2beta1/billingAccounts/{billingAccountsId}/logs/{logsId}", + "path": "v2beta1/{+logName}", + "id": "logging.billingAccounts.logs.delete" + }, + "list": { + "response": { + "$ref": "ListLogsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "parent": { + "pattern": "^billingAccounts/[^/]+$", + "location": "path", + "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "type": "string", + "required": true + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "type": "integer" + } + }, + "flatPath": "v2beta1/billingAccounts/{billingAccountsId}/logs", + "id": "logging.billingAccounts.logs.list", + "path": "v2beta1/{+parent}/logs", + "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed." + } + } + } + } + } + }, + "parameters": { + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "callback": { + "type": "string", + "location": "query", + "description": "JSONP" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "type": "string", + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "key": { + "location": "query", + "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.", + "type": "string" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "default": "true", + "type": "boolean", + "location": "query", + "description": "Pretty-print response." + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "type": "string", + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." + } + }, + "version": "v2beta1", + "baseUrl": "https://logging.googleapis.com/", + "kind": "discovery#restDescription", + "servicePath": "", + "description": "Writes log entries and manages your Stackdriver Logging configuration.", + "basePath": "", + "id": "logging:v2beta1", + "documentationLink": "https://cloud.google.com/logging/docs/", + "revision": "20170905", + "discoveryVersion": "v1", + "version_module": true } diff --git a/vendor/google.golang.org/api/logging/v2beta1/logging-gen.go b/vendor/google.golang.org/api/logging/v2beta1/logging-gen.go index 2e2eab389..f164012e5 100644 --- a/vendor/google.golang.org/api/logging/v2beta1/logging-gen.go +++ b/vendor/google.golang.org/api/logging/v2beta1/logging-gen.go @@ -204,6 +204,55 @@ type ProjectsSinksService struct { s *Service } +// 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) +} + // 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 @@ -219,6 +268,96 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// 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 +} + // HttpRequest: A common proto for logging HTTP requests. Only contains // semantics defined by the HTTP specification. Product-specific logging // information MUST be defined in a separate message. @@ -243,6 +382,10 @@ type HttpRequest struct { // the request was received until the response was sent. Latency string `json:"latency,omitempty"` + // Protocol: Protocol used for the request. Examples: "HTTP/1.1", + // "HTTP/2", "websocket" + Protocol string `json:"protocol,omitempty"` + // Referer: The referer URL of the request, as defined in HTTP/1.1 // Header Field Definitions // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). @@ -345,6 +488,62 @@ func (s *LabelDescriptor) MarshalJSON() ([]byte, error) { 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 +} + // ListLogEntriesRequest: The parameters to ListLogEntries. type ListLogEntriesRequest struct { // Filter: Optional. A filter that chooses which log entries to return. @@ -420,7 +619,9 @@ func (s *ListLogEntriesRequest) MarshalJSON() ([]byte, error) { // ListLogEntriesResponse: Result returned from ListLogEntries. type ListLogEntriesResponse struct { - // Entries: A list of log entries. + // Entries: A list of log entries. If entries is empty, nextPageToken + // may still be returned, indicating that more entries may exist. See + // nextPageToken for more information. Entries []*LogEntry `json:"entries,omitempty"` // NextPageToken: If there might be more results than those appearing in @@ -627,9 +828,9 @@ type LogEntry struct { // provide a value, then Stackdriver Logging considers other log entries // in the same project, with the same timestamp, and with the same // insert_id to be duplicates which can be removed. If omitted in new - // log entries, then Stackdriver Logging will insert its own unique - // identifier. The insert_id is used to order log entries that have the - // same timestamp value. + // log entries, then Stackdriver Logging assigns its own unique + // identifier. The insert_id is also used to order log entries that have + // the same timestamp value. InsertId string `json:"insertId,omitempty"` // JsonPayload: The log entry payload, represented as a structure that @@ -707,10 +908,12 @@ type LogEntry struct { TextPayload string `json:"textPayload,omitempty"` // Timestamp: Optional. The time the event described by the log entry - // occurred. If omitted in a new log entry, Stackdriver Logging will - // insert the time the log entry is received. Stackdriver Logging might - // reject log entries whose time stamps are more than a couple of hours - // in the future. Log entries with time stamps in the past are accepted. + // occurred. This time is used to compute the log entry's age and to + // enforce the logs retention period. If this field is omitted in a new + // log entry, then Stackdriver Logging assigns it the current + // time.Incoming log entries should have timestamps that are no more + // than the logs retention period in the past, and no more than 24 hours + // in the future. See the entries.write API method for more information. Timestamp string `json:"timestamp,omitempty"` // Trace: Optional. Resource name of the trace associated with the log @@ -881,8 +1084,17 @@ func (s *LogLine) MarshalJSON() ([]byte, error) { // LogMetric: Describes a logs-based metric. The value of the metric is // the number of log entries that match a logs filter in a given time -// interval. +// interval.Logs-based metric can also be used to extract values from +// logs and create a a distribution of the values. The distribution +// records the statistics of the extracted values along with an optional +// histogram of the values as specified by the bucket options. type LogMetric struct { + // BucketOptions: 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. + BucketOptions *BucketOptions `json:"bucketOptions,omitempty"` + // Description: Optional. A description of this metric, which is used in // documentation. Description string `json:"description,omitempty"` @@ -893,6 +1105,38 @@ type LogMetric struct { // The maximum length of the filter is 20000 characters. Filter string `json:"filter,omitempty"` + // LabelExtractors: Optional. A map from a label key string to an + // extractor expression which is used to extract data from a log entry + // field and assign as the label value. Each label key specified in the + // LabelDescriptor must have an associated extractor expression in this + // map. The syntax of the extractor expression is the same as for the + // value_extractor field.The extracted value is converted to the type + // defined in the label descriptor. If the either the extraction or the + // type conversion fails, the label will have a default value. The + // default value for a string label is an empty string, for an integer + // label its 0, and for a boolean label its false.Note that there are + // upper bounds on the maximum number of labels and the number of active + // time series that are allowed in a project. + LabelExtractors map[string]string `json:"labelExtractors,omitempty"` + + // MetricDescriptor: Optional. The metric descriptor associated with the + // logs-based metric. If unspecified, it uses a default metric + // descriptor with a DELTA metric kind, INT64 value type, with no labels + // and a unit of "1". Such a metric counts the number of log entries + // matching the filter expression.The name, type, and description fields + // in the metric_descriptor are output only, and is constructed using + // the name and description field in the LogMetric.To create a + // logs-based metric that records a distribution of log values, a DELTA + // metric kind with a DISTRIBUTION value type must be used along with a + // value_extractor expression in the LogMetric.Each label in the metric + // descriptor must have a matching label name as the key and an + // extractor expression as the value in the label_extractors map.The + // metric_kind and value_type fields in the metric_descriptor cannot be + // updated once initially configured. New labels can be added in the + // metric_descriptor, but existing labels cannot be modified except for + // their description. + MetricDescriptor *MetricDescriptor `json:"metricDescriptor,omitempty"` + // Name: Required. The client-assigned metric identifier. Examples: // "error_count", "nginx/requests".Metric identifiers are limited to 100 // characters and can include only the following characters: A-Z, a-z, @@ -906,10 +1150,26 @@ type LogMetric struct { // Example: "projects/my-project/metrics/nginx%2Frequests". Name string `json:"name,omitempty"` - // Version: Output only. The API version that created or updated this - // metric. The version also dictates the syntax of the filter - // expression. When a value for this field is missing, the default value - // of V2 should be assumed. + // ValueExtractor: Optional. A value_extractor is required when using a + // distribution logs-based metric to extract the values to record from a + // log entry. Two functions are supported for value extraction: + // EXTRACT(field) or REGEXP_EXTRACT(field, regex). The argument are: 1. + // field: The name of the log entry field from which the value is to be + // extracted. 2. regex: A regular expression using the Google RE2 + // syntax (https://github.com/google/re2/wiki/Syntax) with a single + // capture group to extract data from the specified log entry field. + // The value of the field is converted to a string before applying the + // regex. It is an error to specify a regex that does not include + // exactly one capture group.The result of the extraction must be + // convertible to a double type, as the distribution always records + // double values. If either the extraction or the conversion to double + // fails, then those values are not recorded in the + // distribution.Example: REGEXP_EXTRACT(jsonPayload.request, + // ".*quantity=(\d+).*") + ValueExtractor string `json:"valueExtractor,omitempty"` + + // Version: Deprecated. The API version that created or updated this + // metric. The v2 format is used by default and cannot be changed. // // Possible values: // "V2" - Stackdriver Logging API v2. @@ -920,7 +1180,7 @@ type LogMetric struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "BucketOptions") 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 @@ -928,7 +1188,7 @@ type LogMetric struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include + // NullFields is a list of field names (e.g. "BucketOptions") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -961,18 +1221,14 @@ type LogSink struct { // not exported. For more information, see Exporting Logs With Sinks. Destination string `json:"destination,omitempty"` - // EndTime: Optional. The time at which this sink will stop exporting - // log entries. Log entries are exported only if their timestamp is - // earlier than the end time. If this field is not supplied, there is no - // end time. If both a start time and an end time are provided, then the - // end time must be later than the start time. + // 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. The filter must use the log entry format specified - // by the output_version_format parameter. For example, in the v2 - // format: + // match the filter. For + // example: // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR // Filter string `json:"filter,omitempty"` @@ -1013,10 +1269,8 @@ type LogSink struct { // "V1" - LogEntry version 1 format. OutputVersionFormat string `json:"outputVersionFormat,omitempty"` - // StartTime: Optional. The time at which this sink will begin exporting - // log entries. Log entries are exported only if their timestamp is not - // earlier than the start time. The default value of this field is the - // time the sink is created or updated. + // 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 @@ -1057,6 +1311,154 @@ func (s *LogSink) MarshalJSON() ([]byte, error) { 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". + 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"` + + // 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. Depending on the + // implementation, the name typically includes: (1) the parent resource + // name that defines the scope of the metric type or of its data; and + // (2) the metric's URL-encoded type, which also appears in the type + // field of this descriptor. For example, following is the resource name + // of a custom metric within the GCP project + // my-project-id: + // "projects/my-project-id/metricDescriptors/custom.google + // apis.com%2Finvoice%2Fpaid%2Famount" + // + Name string `json:"name,omitempty"` + + // Type: The metric type, including its DNS name prefix. The type is not + // URL-encoded. All user-defined custom metric types have the DNS name + // custom.googleapis.com. Metric types should use a natural hierarchical + // grouping. For + // example: + // "custom.googleapis.com/invoice/paid/amount" + // "appengine.google + // apis.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 includes the dimensionless unit 1, + // such as 1/s.The grammar also includes these connectors: + // / division (as an infix operator, e.g. 1/s). + // . multiplication (as an infix operator, e.g. GBy.d)The grammar for a + // unit is as follows: + // Expression = Component { "." Component } { "/" Component } + // ; + // + // Component = [ PREFIX ] UNIT [ Annotation ] + // | Annotation + // | "1" + // ; + // + // Annotation = "{" NAME "}" ; + // Notes: + // Annotation is just a comment if it follows a UNIT and is equivalent + // to 1 if it is used alone. For examples, {requests}/s == 1/s, + // By{transmitted}/s == By/s. + // NAME is a sequence of non-blank printable ASCII characters not + // containing '{' or '}'. + Unit string `json:"unit,omitempty"` + + // 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"` + + // 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) +} + // 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 @@ -1404,17 +1806,23 @@ func (s *SourceReference) MarshalJSON() ([]byte, error) { // WriteLogEntriesRequest: The parameters to WriteLogEntries. type WriteLogEntriesRequest struct { - // Entries: Required. The log entries to write. Values supplied for the - // fields log_name, resource, and labels in this entries.write request - // are inserted into those log entries in this list that do not provide - // their own values.Stackdriver Logging also creates and inserts values - // for timestamp and insert_id if the entries do not provide them. The - // created insert_id for the N'th entry in this list will be greater - // than earlier entries and less than later entries. Otherwise, the - // order of log entries in this list does not matter.To improve - // throughput and to avoid exceeding the quota limit for calls to - // entries.write, you should write multiple log entries at once rather - // than calling this method for each individual log entry. + // Entries: Required. The log entries to send to Stackdriver Logging. + // The order of log entries in this list does not matter. Values + // supplied in this method's log_name, resource, and labels fields are + // copied into those log entries in this list that do not include values + // for their corresponding fields. For more information, see the + // LogEntry type.If the timestamp or insert_id fields are missing in log + // entries, then this method supplies the current time or a unique + // identifier, respectively. The supplied values are chosen so that, + // among the log entries that did not supply their own values, the + // entries earlier in the list will sort before the entries later in the + // list. See the entries.list method.Log entries with timestamps that + // are more than the logs retention period in the past or more than 24 + // hours in the future might be discarded. Discarding does not return an + // error.To improve throughput and to avoid exceeding the quota limit + // for calls to entries.write, you should try to include several log + // entries in this list, rather than calling this method for each + // individual log entry. Entries []*LogEntry `json:"entries,omitempty"` // Labels: Optional. Default labels that are added to the labels field @@ -1964,7 +2372,11 @@ type EntriesWriteCall struct { header_ http.Header } -// Write: Writes log entries to Stackdriver Logging. +// Write: Log entry resourcesWrites log entries to Stackdriver Logging. +// This API method is the only way to send log entries to Stackdriver +// Logging. This method is used, directly or indirectly, by the +// Stackdriver Logging agent (fluentd) and all logging libraries +// configured to use Stackdriver Logging. func (r *EntriesService) Write(writelogentriesrequest *WriteLogEntriesRequest) *EntriesWriteCall { c := &EntriesWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.writelogentriesrequest = writelogentriesrequest @@ -2054,7 +2466,7 @@ func (c *EntriesWriteCall) Do(opts ...googleapi.CallOption) (*WriteLogEntriesRes } return ret, nil // { - // "description": "Writes log entries to Stackdriver Logging.", + // "description": "Log entry resourcesWrites log entries to Stackdriver Logging. This API method is the only way to send log entries to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver Logging agent (fluentd) and all logging libraries configured to use Stackdriver Logging.", // "flatPath": "v2beta1/entries:write", // "httpMethod": "POST", // "id": "logging.entries.write", @@ -3651,10 +4063,9 @@ type ProjectsSinksCreateCall struct { // Create: Creates a sink that exports specified log entries to a // destination. The export of newly-ingested log entries begins -// immediately, unless the current time is outside the sink's start and -// end times or the sink's writer_identity is not permitted to write to -// the destination. A sink can export log entries only from the resource -// owning the sink. +// immediately, unless the sink's writer_identity is not permitted to +// write to the destination. A sink can export log entries only from the +// resource owning the sink. func (r *ProjectsSinksService) Create(parent string, logsink *LogSink) *ProjectsSinksCreateCall { c := &ProjectsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -3765,7 +4176,7 @@ func (c *ProjectsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, er } return ret, nil // { - // "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", + // "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", // "flatPath": "v2beta1/projects/{projectsId}/sinks", // "httpMethod": "POST", // "id": "logging.projects.sinks.create", @@ -4274,13 +4685,10 @@ type ProjectsSinksUpdateCall struct { header_ http.Header } -// Update: Updates a sink. If the named sink doesn't exist, then this -// method is identical to sinks.create. If the named sink does exist, -// then this method replaces the following fields in the existing sink -// with values from the new sink: destination, filter, -// output_version_format, start_time, and end_time. The updated filter -// might also have a new writer_identity; see the unique_writer_identity -// field. +// Update: Updates a sink. This method replaces the following fields in +// the existing sink with values from the new sink: destination, and +// filter. The updated sink might also have a new writer_identity; see +// the unique_writer_identity field. func (r *ProjectsSinksService) Update(sinkNameid string, logsink *LogSink) *ProjectsSinksUpdateCall { c := &ProjectsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.sinkNameid = sinkNameid @@ -4304,6 +4712,21 @@ func (c *ProjectsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool return c } +// UpdateMask sets the optional parameter "updateMask": 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. +func (c *ProjectsSinksUpdateCall) UpdateMask(updateMask string) *ProjectsSinksUpdateCall { + 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. @@ -4390,7 +4813,7 @@ func (c *ProjectsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, er } return ret, nil // { - // "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", // "flatPath": "v2beta1/projects/{projectsId}/sinks/{sinksId}", // "httpMethod": "PUT", // "id": "logging.projects.sinks.update", @@ -4409,6 +4832,12 @@ func (c *ProjectsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, er // "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is set to false or defaulted to false.", // "location": "query", // "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#fieldmaskExample: updateMask=filter.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v2beta1/{+sinkName}", diff --git a/vendor/google.golang.org/api/manufacturers/v1/manufacturers-api.json b/vendor/google.golang.org/api/manufacturers/v1/manufacturers-api.json index 47a194fd7..c5040275c 100644 --- a/vendor/google.golang.org/api/manufacturers/v1/manufacturers-api.json +++ b/vendor/google.golang.org/api/manufacturers/v1/manufacturers-api.json @@ -1,39 +1,134 @@ { - "version": "v1", - "baseUrl": "https://manufacturers.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Public API for managing Manufacturer Center related data.", - "servicePath": "", "basePath": "", - "documentationLink": "https://developers.google.com/manufacturers/", "id": "manufacturers:v1", - "revision": "20170703", + "revision": "20170808", + "documentationLink": "https://developers.google.com/manufacturers/", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "ListProductsResponse": { + "type": "object", + "properties": { + "products": { + "description": "List of the products.", + "items": { + "$ref": "Product" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The token for the retrieval of the next page of product statuses.", + "type": "string" + } + }, + "id": "ListProductsResponse" + }, + "ProductDetail": { + "description": "A product detail of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#productdetail.", + "type": "object", + "properties": { + "attributeValue": { + "description": "The value of the attribute.", + "type": "string" + }, + "sectionName": { + "description": "A short section name that can be reused between multiple product details.", + "type": "string" + }, + "attributeName": { + "description": "The name of the attribute.", + "type": "string" + } + }, + "id": "ProductDetail" + }, + "FeatureDescription": { + "description": "A feature description of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#featuredesc.", + "type": "object", + "properties": { + "image": { + "$ref": "Image", + "description": "An optional image describing the feature." + }, + "headline": { + "description": "A short description of the feature.", + "type": "string" + }, + "text": { + "description": "A detailed description of the feature.", + "type": "string" + } + }, + "id": "FeatureDescription" + }, + "Issue": { + "description": "Product issue.", + "type": "object", + "properties": { + "description": { + "description": "Description of the issue.", + "type": "string" + }, + "type": { + "description": "The server-generated type of the issue, for example,\n“INCORRECT_TEXT_FORMATTING”, “IMAGE_NOT_SERVEABLE”, etc.", + "type": "string" + }, + "attribute": { + "description": "If present, the attribute that triggered the issue. For more information\nabout attributes, see\nhttps://support.google.com/manufacturers/answer/6124116.", + "type": "string" + }, + "timestamp": { + "format": "google-datetime", + "description": "The timestamp when this issue appeared.", + "type": "string" + }, + "severity": { + "enumDescriptions": [ + "Unspecified severity, never used.", + "Error severity. The issue prevents the usage of the whole item.", + "Warning severity. The issue is either one that prevents the usage of the\nattribute that triggered it or one that will soon prevent the usage of\nthe whole item.", + "Info severity. The issue is one that doesn't require immediate attention.\nIt is, for example, used to communicate which attributes are still\npending review." + ], + "enum": [ + "SEVERITY_UNSPECIFIED", + "ERROR", + "WARNING", + "INFO" + ], + "description": "The severity of the issue.", + "type": "string" + } + }, + "id": "Issue" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "Price": { + "description": "A price.", + "type": "object", + "properties": { + "amount": { + "description": "The numeric value of the price.", + "type": "string" + }, + "currency": { + "description": "The currency in which the price is denoted.", + "type": "string" + } + }, + "id": "Price" + }, "Image": { "description": "An image.", "type": "object", "properties": { - "type": { - "enumDescriptions": [ - "Type is unspecified. Should not be used.", - "The image was crawled from a provided URL.", - "The image was uploaded." - ], - "enum": [ - "TYPE_UNSPECIFIED", - "CRAWLED", - "UPLOADED" - ], - "description": "The type of the image, i.e., crawled or uploaded.\n@OutputOnly", - "type": "string" - }, - "imageUrl": { - "description": "The URL of the image. For crawled images, this is the provided URL. For\nuploaded images, this is a serving URL from Google if the image has been\nprocessed successfully.", - "type": "string" - }, "status": { + "description": "The status of the image.\n@OutputOnly", + "type": "string", "enumDescriptions": [ "Status is unspecified. Should not be used.", "Image was uploaded and is being processed.", @@ -59,8 +154,24 @@ "DECODING_ERROR", "TOO_BIG", "CRAWL_SKIPPED" + ] + }, + "type": { + "enumDescriptions": [ + "Type is unspecified. Should not be used.", + "The image was crawled from a provided URL.", + "The image was uploaded." ], - "description": "The status of the image.\n@OutputOnly", + "enum": [ + "TYPE_UNSPECIFIED", + "CRAWLED", + "UPLOADED" + ], + "description": "The type of the image, i.e., crawled or uploaded.\n@OutputOnly", + "type": "string" + }, + "imageUrl": { + "description": "The URL of the image. For crawled images, this is the provided URL. For\nuploaded images, this is a serving URL from Google if the image has been\nprocessed successfully.", "type": "string" } }, @@ -70,6 +181,10 @@ "description": "Attributes of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116.", "type": "object", "properties": { + "color": { + "description": "The color of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#color.", + "type": "string" + }, "productName": { "description": "The canonical name of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#productname.", "type": "string" @@ -89,6 +204,11 @@ }, "type": "array" }, + "targetAccountId": { + "format": "int64", + "description": "The target account id. Should only be used in the accounts of the data\npartners.", + "type": "string" + }, "size": { "description": "The size of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#size.", "type": "string" @@ -98,12 +218,12 @@ "type": "string" }, "count": { - "$ref": "Count", - "description": "The count of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#count." + "description": "The count of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#count.", + "$ref": "Count" }, "brand": { - "type": "string", - "description": "The brand name of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#brand." + "description": "The brand name of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#brand.", + "type": "string" }, "disclosureDate": { "description": "The disclosure date of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#disclosure.", @@ -117,10 +237,6 @@ "description": "The scent of the product. For more information, see\n https://support.google.com/manufacturers/answer/6124116#scent.", "type": "string" }, - "flavor": { - "description": "The flavor of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#flavor.", - "type": "string" - }, "productDetail": { "description": "The details of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#productdetail.", "items": { @@ -132,6 +248,10 @@ "description": "The target age group of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#agegroup.", "type": "string" }, + "flavor": { + "description": "The flavor of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#flavor.", + "type": "string" + }, "productPageUrl": { "description": "The URL of the detail page of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#productpage.", "type": "string" @@ -145,8 +265,8 @@ "type": "string" }, "itemGroupId": { - "type": "string", - "description": "The item group id of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#itemgroupid." + "description": "The item group id of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#itemgroupid.", + "type": "string" }, "gtin": { "description": "The Global Trade Item Number (GTIN) of the product. For more information,\nsee https://support.google.com/manufacturers/answer/6124116#gtin.", @@ -184,8 +304,8 @@ "type": "string" }, "imageLink": { - "$ref": "Image", - "description": "The image of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#image." + "description": "The image of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#image.", + "$ref": "Image" }, "productType": { "description": "The category of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#producttype.", @@ -211,10 +331,6 @@ "type": "string" }, "type": "array" - }, - "color": { - "description": "The color of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#color.", - "type": "string" } }, "id": "Attributes" @@ -224,8 +340,8 @@ "type": "object", "properties": { "unit": { - "type": "string", - "description": "The unit in which these products are counted." + "description": "The unit in which these products are counted.", + "type": "string" }, "value": { "format": "int64", @@ -239,6 +355,10 @@ "description": "Product data.", "type": "object", "properties": { + "finalAttributes": { + "description": "Final attributes of the product. The final attributes are obtained by\noverriding the uploaded attributes with the manually provided and deleted\nattributes. Google systems only process, evaluate, review, and/or use final\nattributes.\n@OutputOnly", + "$ref": "Attributes" + }, "productId": { "description": "The ID of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#id.\n@OutputOnly", "type": "string" @@ -248,32 +368,25 @@ "description": "Attributes of the product uploaded via the Manufacturer Center API or via\nfeeds." }, "parent": { - "type": "string", - "description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.\n@OutputOnly" + "description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.\n@OutputOnly", + "type": "string" }, "manuallyProvidedAttributes": { - "$ref": "Attributes", - "description": "Attributes of the product provided manually via the Manufacturer Center UI.\n@OutputOnly" - }, - "targetCountry": { - "description": "The target country of the product as a CLDR territory code (for example,\nUS).\n@OutputOnly", - "type": "string" + "description": "Attributes of the product provided manually via the Manufacturer Center UI.\n@OutputOnly", + "$ref": "Attributes" }, "contentLanguage": { "description": "The content language of the product as a two-letter ISO 639-1 language code\n(for example, en).\n@OutputOnly", "type": "string" }, + "targetCountry": { + "description": "The target country of the product as a CLDR territory code (for example,\nUS).\n@OutputOnly", + "type": "string" + }, "name": { "description": "Name in the format `{target_country}:{content_language}:{product_id}`.\n\n`target_country` - The target country of the product as a CLDR territory\n code (for example, US).\n\n`content_language` - The content language of the product as a two-letter\n ISO 639-1 language code (for example, en).\n\n`product_id` - The ID of the product. For more information, see\n https://support.google.com/manufacturers/answer/6124116#id.\n@OutputOnly", "type": "string" }, - "manuallyDeletedAttributes": { - "description": "Names of the attributes of the product deleted manually via the\nManufacturer Center UI.\n@OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, "issues": { "description": "A server-generated list of issues associated with the product.\n@OutputOnly", "items": { @@ -281,14 +394,19 @@ }, "type": "array" }, - "finalAttributes": { - "$ref": "Attributes", - "description": "Final attributes of the product. The final attributes are obtained by\noverriding the uploaded attributes with the manually provided and deleted\nattributes. Google systems only process, evaluate, review, and/or use final\nattributes.\n@OutputOnly" + "manuallyDeletedAttributes": { + "description": "Names of the attributes of the product deleted manually via the\nManufacturer Center UI.\n@OutputOnly", + "items": { + "type": "string" + }, + "type": "array" } }, "id": "Product" }, "Capacity": { + "description": "The capacity of a product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#capacity.", + "type": "object", "properties": { "unit": { "description": "The unit of the capacity, i.e., MB, GB, or TB.", @@ -300,125 +418,7 @@ "type": "string" } }, - "id": "Capacity", - "description": "The capacity of a product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#capacity.", - "type": "object" - }, - "ListProductsResponse": { - "type": "object", - "properties": { - "products": { - "description": "List of the products.", - "items": { - "$ref": "Product" - }, - "type": "array" - }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of product statuses.", - "type": "string" - } - }, - "id": "ListProductsResponse" - }, - "ProductDetail": { - "description": "A product detail of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#productdetail.", - "type": "object", - "properties": { - "attributeValue": { - "description": "The value of the attribute.", - "type": "string" - }, - "sectionName": { - "description": "A short section name that can be reused between multiple product details.", - "type": "string" - }, - "attributeName": { - "description": "The name of the attribute.", - "type": "string" - } - }, - "id": "ProductDetail" - }, - "Issue": { - "type": "object", - "properties": { - "timestamp": { - "format": "google-datetime", - "description": "The timestamp when this issue appeared.", - "type": "string" - }, - "severity": { - "enumDescriptions": [ - "Unspecified severity, never used.", - "Error severity. The issue prevents the usage of the whole item.", - "Warning severity. The issue is either one that prevents the usage of the\nattribute that triggered it or one that will soon prevent the usage of\nthe whole item.", - "Info severity. The issue is one that doesn't require immediate attention.\nIt is, for example, used to communicate which attributes are still\npending review." - ], - "enum": [ - "SEVERITY_UNSPECIFIED", - "ERROR", - "WARNING", - "INFO" - ], - "description": "The severity of the issue.", - "type": "string" - }, - "description": { - "description": "Description of the issue.", - "type": "string" - }, - "type": { - "type": "string", - "description": "The server-generated type of the issue, for example,\n“INCORRECT_TEXT_FORMATTING”, “IMAGE_NOT_SERVEABLE”, etc." - }, - "attribute": { - "description": "If present, the attribute that triggered the issue. For more information\nabout attributes, see\nhttps://support.google.com/manufacturers/answer/6124116.", - "type": "string" - } - }, - "id": "Issue", - "description": "Product issue." - }, - "FeatureDescription": { - "id": "FeatureDescription", - "description": "A feature description of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#featuredesc.", - "type": "object", - "properties": { - "image": { - "description": "An optional image describing the feature.", - "$ref": "Image" - }, - "headline": { - "description": "A short description of the feature.", - "type": "string" - }, - "text": { - "description": "A detailed description of the feature.", - "type": "string" - } - } - }, - "Price": { - "description": "A price.", - "type": "object", - "properties": { - "amount": { - "description": "The numeric value of the price.", - "type": "string" - }, - "currency": { - "description": "The currency in which the price is denoted.", - "type": "string" - } - }, - "id": "Price" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" + "id": "Capacity" } }, "icons": { @@ -448,42 +448,39 @@ "products": { "methods": { "get": { - "description": "Gets the product from a Manufacturer Center account, including product\nissues.\n\nA recently updated product takes some time to be processed before any\nchanges are visible. While some issues may be available once the product\nhas been processed, other issues may take days to appear.", - "httpMethod": "GET", + "description": "Gets the product from a Manufacturer Center account, including product\nissues.\n\nA recently updated product takes around 15 minutes to process. Changes are\nonly visible after it has been processed. While some issues may be\navailable once the product has been processed, other issues may take days\nto appear.", + "response": { + "$ref": "Product" + }, "parameterOrder": [ "parent", "name" ], - "response": { - "$ref": "Product" + "httpMethod": "GET", + "parameters": { + "name": { + "location": "path", + "description": "Name in the format `{target_country}:{content_language}:{product_id}`.\n\n`target_country` - The target country of the product as a CLDR territory\n code (for example, US).\n\n`content_language` - The content language of the product as a two-letter\n ISO 639-1 language code (for example, en).\n\n`product_id` - The ID of the product. For more information, see\n https://support.google.com/manufacturers/answer/6124116#id.", + "type": "string", + "required": true, + "pattern": "^[^/]+$" + }, + "parent": { + "description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.", + "type": "string", + "required": true, + "pattern": "^accounts/[^/]+$", + "location": "path" + } }, "scopes": [ "https://www.googleapis.com/auth/manufacturercenter" ], - "parameters": { - "name": { - "description": "Name in the format `{target_country}:{content_language}:{product_id}`.\n\n`target_country` - The target country of the product as a CLDR territory\n code (for example, US).\n\n`content_language` - The content language of the product as a two-letter\n ISO 639-1 language code (for example, en).\n\n`product_id` - The ID of the product. For more information, see\n https://support.google.com/manufacturers/answer/6124116#id.", - "type": "string", - "required": true, - "pattern": "^[^/]+$", - "location": "path" - }, - "parent": { - "location": "path", - "description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.", - "type": "string", - "required": true, - "pattern": "^accounts/[^/]+$" - } - }, "flatPath": "v1/accounts/{accountsId}/products/{productsId}", - "path": "v1/{+parent}/products/{+name}", - "id": "manufacturers.accounts.products.get" + "id": "manufacturers.accounts.products.get", + "path": "v1/{+parent}/products/{+name}" }, "list": { - "path": "v1/{+parent}/products", - "id": "manufacturers.accounts.products.list", - "description": "Lists all the products in a Manufacturer Center account.", "httpMethod": "GET", "parameterOrder": [ "parent" @@ -491,39 +488,53 @@ "response": { "$ref": "ListProductsResponse" }, + "scopes": [ + "https://www.googleapis.com/auth/manufacturercenter" + ], "parameters": { - "parent": { - "type": "string", - "required": true, - "pattern": "^accounts/[^/]+$", - "location": "path", - "description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account." - }, - "pageToken": { - "location": "query", - "description": "The token returned by the previous request.", - "type": "string" - }, "pageSize": { "location": "query", "format": "int32", "description": "Maximum number of product statuses to return in the response, used for\npaging.", "type": "integer" + }, + "parent": { + "location": "path", + "description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.", + "type": "string", + "required": true, + "pattern": "^accounts/[^/]+$" + }, + "pageToken": { + "description": "The token returned by the previous request.", + "type": "string", + "location": "query" } }, + "flatPath": "v1/accounts/{accountsId}/products", + "path": "v1/{+parent}/products", + "id": "manufacturers.accounts.products.list", + "description": "Lists all the products in a Manufacturer Center account." + }, + "update": { + "httpMethod": "PUT", + "parameterOrder": [ + "parent", + "name" + ], + "response": { + "$ref": "Product" + }, "scopes": [ "https://www.googleapis.com/auth/manufacturercenter" ], - "flatPath": "v1/accounts/{accountsId}/products" - }, - "update": { "parameters": { "name": { - "pattern": "^[^/]+$", "location": "path", "description": "Name in the format `{target_country}:{content_language}:{product_id}`.\n\n`target_country` - The target country of the product as a CLDR territory\n code (for example, US).\n\n`content_language` - The content language of the product as a two-letter\n ISO 639-1 language code (for example, en).\n\n`product_id` - The ID of the product. For more information, see\n https://support.google.com/manufacturers/answer/6124116#id.", "type": "string", - "required": true + "required": true, + "pattern": "^[^/]+$" }, "parent": { "location": "path", @@ -533,44 +544,31 @@ "pattern": "^accounts/[^/]+$" } }, - "scopes": [ - "https://www.googleapis.com/auth/manufacturercenter" - ], "flatPath": "v1/accounts/{accountsId}/products/{productsId}", "path": "v1/{+parent}/products/{+name}", "id": "manufacturers.accounts.products.update", - "description": "Inserts or updates the product in a Manufacturer Center account.\n\nThe checks at upload time are minimal. All required attributes need to be\npresent for a product to be valid. Issues may show up later\nafter the API has accepted an update for a product and it is possible to\noverwrite an existing valid product with an invalid product. To detect\nthis, you should retrieve the product and check it for issues once the\nupdated version is available.\n\nInserted or updated products first need to be processed before they can be\nretrieved. Until then, new products will be unavailable, and retrieval\nof updated products will return the original state of the product.", "request": { "$ref": "Product" }, - "httpMethod": "PUT", - "parameterOrder": [ - "parent", - "name" - ], - "response": { - "$ref": "Product" - } + "description": "Inserts or updates the product in a Manufacturer Center account.\n\nThe checks at upload time are minimal. All required attributes need to be\npresent for a product to be valid. Issues may show up later\nafter the API has accepted an update for a product and it is possible to\noverwrite an existing valid product with an invalid product. To detect\nthis, you should retrieve the product and check it for issues once the\nupdated version is available.\n\nInserted or updated products first need to be processed before they can be\nretrieved. Until then, new products will be unavailable, and retrieval\nof updated products will return the original state of the product." }, "delete": { - "httpMethod": "DELETE", - "parameterOrder": [ - "parent", - "name" - ], + "description": "Deletes the product from a Manufacturer Center account.", "response": { "$ref": "Empty" }, - "scopes": [ - "https://www.googleapis.com/auth/manufacturercenter" + "parameterOrder": [ + "parent", + "name" ], + "httpMethod": "DELETE", "parameters": { "parent": { + "location": "path", "description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.", "type": "string", "required": true, - "pattern": "^accounts/[^/]+$", - "location": "path" + "pattern": "^accounts/[^/]+$" }, "name": { "description": "Name in the format `{target_country}:{content_language}:{product_id}`.\n\n`target_country` - The target country of the product as a CLDR territory\n code (for example, US).\n\n`content_language` - The content language of the product as a two-letter\n ISO 639-1 language code (for example, en).\n\n`product_id` - The ID of the product. For more information, see\n https://support.google.com/manufacturers/answer/6124116#id.", @@ -580,10 +578,12 @@ "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/manufacturercenter" + ], "flatPath": "v1/accounts/{accountsId}/products/{productsId}", - "path": "v1/{+parent}/products/{+name}", "id": "manufacturers.accounts.products.delete", - "description": "Deletes the product from a Manufacturer Center account." + "path": "v1/{+parent}/products/{+name}" } } } @@ -591,35 +591,47 @@ } }, "parameters": { - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" }, "fields": { "description": "Selector specifying which fields to include in a partial response.", "type": "string", "location": "query" }, - "callback": { - "description": "JSONP", + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", "location": "query" }, "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], "location": "query", "enum": [ "1", "2" ], "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ] + "location": "query" }, "alt": { + "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", @@ -632,50 +644,43 @@ "json", "media", "proto" - ], - "type": "string" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" + ] }, "key": { "location": "query", "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.", "type": "string" }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, "quotaUser": { "location": "query", "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.", "type": "string" }, "pp": { - "location": "query", "description": "Pretty-print response.", "default": "true", - "type": "boolean" + "type": "boolean", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" }, "oauth_token": { "location": "query", "description": "OAuth 2.0 token for the current user.", "type": "string" - }, - "bearer_token": { - "type": "string", - "location": "query", - "description": "OAuth bearer token." - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" } - } + }, + "version": "v1", + "baseUrl": "https://manufacturers.googleapis.com/", + "servicePath": "", + "description": "Public API for managing Manufacturer Center related data.", + "kind": "discovery#restDescription" } diff --git a/vendor/google.golang.org/api/manufacturers/v1/manufacturers-gen.go b/vendor/google.golang.org/api/manufacturers/v1/manufacturers-gen.go index 1d4f8690a..50c8f5ba2 100644 --- a/vendor/google.golang.org/api/manufacturers/v1/manufacturers-gen.go +++ b/vendor/google.golang.org/api/manufacturers/v1/manufacturers-gen.go @@ -260,6 +260,11 @@ type Attributes struct { // see https://support.google.com/manufacturers/answer/6124116#price. SuggestedRetailPrice *Price `json:"suggestedRetailPrice,omitempty"` + // TargetAccountId: The target account id. Should only be used in the + // accounts of the data + // partners. + TargetAccountId int64 `json:"targetAccountId,omitempty,string"` + // Theme: The theme of the product. For more information, // see // https://support.google.com/manufacturers/answer/6124116#theme. @@ -907,11 +912,13 @@ type AccountsProductsGetCall struct { // product // issues. // -// A recently updated product takes some time to be processed before -// any -// changes are visible. While some issues may be available once the -// product -// has been processed, other issues may take days to appear. +// A recently updated product takes around 15 minutes to process. +// Changes are +// only visible after it has been processed. While some issues may +// be +// available once the product has been processed, other issues may take +// days +// to appear. func (r *AccountsProductsService) Get(parent string, name string) *AccountsProductsGetCall { c := &AccountsProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -1014,7 +1021,7 @@ func (c *AccountsProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, er } return ret, nil // { - // "description": "Gets the product from a Manufacturer Center account, including product\nissues.\n\nA recently updated product takes some time to be processed before any\nchanges are visible. While some issues may be available once the product\nhas been processed, other issues may take days to appear.", + // "description": "Gets the product from a Manufacturer Center account, including product\nissues.\n\nA recently updated product takes around 15 minutes to process. Changes are\nonly visible after it has been processed. While some issues may be\navailable once the product has been processed, other issues may take days\nto appear.", // "flatPath": "v1/accounts/{accountsId}/products/{productsId}", // "httpMethod": "GET", // "id": "manufacturers.accounts.products.get", diff --git a/vendor/google.golang.org/api/mirror/v1/mirror-gen.go b/vendor/google.golang.org/api/mirror/v1/mirror-gen.go index fb63974ed..c2654a659 100644 --- a/vendor/google.golang.org/api/mirror/v1/mirror-gen.go +++ b/vendor/google.golang.org/api/mirror/v1/mirror-gen.go @@ -3239,16 +3239,12 @@ func (c *TimelineGetCall) Do(opts ...googleapi.CallOption) (*TimelineItem, error // method id "mirror.timeline.insert": type TimelineInsertCall struct { - s *Service - timelineitem *TimelineItem - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + timelineitem *TimelineItem + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Insert: Inserts a new item into the timeline. @@ -3267,12 +3263,7 @@ func (r *TimelineService) Insert(timelineitem *TimelineItem) *TimelineInsertCall // supplied. // At most one of Media and ResumableMedia may be set. func (c *TimelineInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *TimelineInsertCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -3287,11 +3278,7 @@ func (c *TimelineInsertCall) Media(r io.Reader, options ...googleapi.MediaOption // supersede any context previously provided to the Context method. func (c *TimelineInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TimelineInsertCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -3300,7 +3287,7 @@ func (c *TimelineInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *TimelineInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *TimelineInsertCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -3345,27 +3332,16 @@ func (c *TimelineInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "timeline") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -3398,20 +3374,10 @@ func (c *TimelineInsertCall) Do(opts ...googleapi.CallOption) (*TimelineItem, er if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -3856,17 +3822,13 @@ func (c *TimelinePatchCall) Do(opts ...googleapi.CallOption) (*TimelineItem, err // method id "mirror.timeline.update": type TimelineUpdateCall struct { - s *Service - id string - timelineitem *TimelineItem - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + id string + timelineitem *TimelineItem + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Update: Updates a timeline item in place. @@ -3886,12 +3848,7 @@ func (r *TimelineService) Update(id string, timelineitem *TimelineItem) *Timelin // supplied. // At most one of Media and ResumableMedia may be set. func (c *TimelineUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *TimelineUpdateCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -3906,11 +3863,7 @@ func (c *TimelineUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption // supersede any context previously provided to the Context method. func (c *TimelineUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TimelineUpdateCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -3919,7 +3872,7 @@ func (c *TimelineUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *TimelineUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *TimelineUpdateCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -3964,27 +3917,16 @@ func (c *TimelineUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "timeline/{id}") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders @@ -4020,20 +3962,10 @@ func (c *TimelineUpdateCall) Do(opts ...googleapi.CallOption) (*TimelineItem, er if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -4380,16 +4312,12 @@ func (c *TimelineAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*Attachme // method id "mirror.timeline.attachments.insert": type TimelineAttachmentsInsertCall struct { - s *Service - itemId string - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + itemId string + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Insert: Adds a new attachment to a timeline item. @@ -4408,12 +4336,7 @@ func (r *TimelineAttachmentsService) Insert(itemId string) *TimelineAttachmentsI // supplied. // At most one of Media and ResumableMedia may be set. func (c *TimelineAttachmentsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *TimelineAttachmentsInsertCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -4428,11 +4351,7 @@ func (c *TimelineAttachmentsInsertCall) Media(r io.Reader, options ...googleapi. // supersede any context previously provided to the Context method. func (c *TimelineAttachmentsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TimelineAttachmentsInsertCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -4441,7 +4360,7 @@ func (c *TimelineAttachmentsInsertCall) ResumableMedia(ctx context.Context, r io // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *TimelineAttachmentsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *TimelineAttachmentsInsertCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -4481,27 +4400,16 @@ func (c *TimelineAttachmentsInsertCall) doRequest(alt string) (*http.Response, e var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "timeline/{itemId}/attachments") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -4537,20 +4445,10 @@ func (c *TimelineAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*Attac if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() diff --git a/vendor/google.golang.org/api/ml/v1/ml-api.json b/vendor/google.golang.org/api/ml/v1/ml-api.json index c3729dbf6..55264a7db 100644 --- a/vendor/google.golang.org/api/ml/v1/ml-api.json +++ b/vendor/google.golang.org/api/ml/v1/ml-api.json @@ -1,856 +1,857 @@ { - "revision": "20170729", - "documentationLink": "https://cloud.google.com/ml/", - "id": "ml:v1", - "discoveryVersion": "v1", - "version_module": "True", - "schemas": { - "GoogleIamV1__LogConfig": { - "type": "object", - "properties": { - "cloudAudit": { - "description": "Cloud audit options.", - "$ref": "GoogleIamV1_LogConfig_CloudAuditOptions" - }, - "counter": { - "description": "Counter options.", - "$ref": "GoogleIamV1_LogConfig_CounterOptions" - }, - "dataAccess": { - "description": "Data access options.", - "$ref": "GoogleIamV1_LogConfig_DataAccessOptions" - } - }, - "id": "GoogleIamV1__LogConfig", - "description": "Specifies what kind of log the caller must write" - }, - "GoogleRpc__Status": { - "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "code": { - "type": "integer", - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code." - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "id": "GoogleRpc__Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object" - }, - "GoogleCloudMlV1__AutoScaling": { - "description": "Options for automatically scaling a model.", - "type": "object", - "properties": { - "minNodes": { - "format": "int32", - "description": "Optional. The minimum number of nodes to allocate for this model. These\nnodes are always up, starting from the time the model is deployed, so the\ncost of operating this model will be at least\n`rate` * `min_nodes` * number of hours since last billing cycle,\nwhere `rate` is the cost per node-hour as documented in\n[pricing](https://cloud.google.com/ml-engine/pricing#prediction_pricing),\neven if no predictions are performed. There is additional cost for each\nprediction performed.\n\nUnlike manual scaling, if the load gets too heavy for the nodes\nthat are up, the service will automatically add nodes to handle the\nincreased load as well as scale back as traffic drops, always maintaining\nat least `min_nodes`. You will be charged for the time in which additional\nnodes are used.\n\nIf not specified, `min_nodes` defaults to 0, in which case, when traffic\nto a model stops (and after a cool-down period), nodes will be shut down\nand no charges will be incurred until traffic to the model resumes.", - "type": "integer" - } - }, - "id": "GoogleCloudMlV1__AutoScaling" - }, - "GoogleCloudMlV1__TrainingInput": { - "description": "Represents input parameters for a training job.", - "type": "object", - "properties": { - "runtimeVersion": { - "description": "Optional. The Google Cloud ML runtime version to use for training. If not\nset, Google Cloud ML will choose the latest stable version.", - "type": "string" - }, - "pythonModule": { - "description": "Required. The Python module name to run after installing the packages.", - "type": "string" - }, - "workerType": { - "description": "Optional. Specifies the type of virtual machine to use for your training\njob's worker nodes.\n\nThe supported values are the same as those described in the entry for\n`masterType`.\n\nThis value must be present when `scaleTier` is set to `CUSTOM` and\n`workerCount` is greater than zero.", - "type": "string" - }, - "args": { - "description": "Optional. Command line arguments to pass to the program.", - "items": { - "type": "string" - }, - "type": "array" - }, - "region": { - "type": "string", - "description": "Required. The Google Compute Engine region to run the training job in." - }, - "parameterServerType": { - "description": "Optional. Specifies the type of virtual machine to use for your training\njob's parameter server.\n\nThe supported values are the same as those described in the entry for\n`master_type`.\n\nThis value must be present when `scaleTier` is set to `CUSTOM` and\n`parameter_server_count` is greater than zero.", - "type": "string" - }, - "scaleTier": { - "enum": [ - "BASIC", - "STANDARD_1", - "PREMIUM_1", - "BASIC_GPU", - "CUSTOM" - ], - "description": "Required. Specifies the machine types, the number of replicas for workers\nand parameter servers.", - "type": "string", - "enumDescriptions": [ - "A single worker instance. This tier is suitable for learning how to use\nCloud ML, and for experimenting with new models using small datasets.", - "Many workers and a few parameter servers.", - "A large number of workers with many parameter servers.", - "A single worker instance [with a\nGPU](/ml-engine/docs/how-tos/using-gpus).", - "The CUSTOM tier is not a set tier, but rather enables you to use your\nown cluster specification. When you use this tier, set values to\nconfigure your processing cluster according to these guidelines:\n\n* You _must_ set `TrainingInput.masterType` to specify the type\n of machine to use for your master node. This is the only required\n setting.\n\n* You _may_ set `TrainingInput.workerCount` to specify the number of\n workers to use. If you specify one or more workers, you _must_ also\n set `TrainingInput.workerType` to specify the type of machine to use\n for your worker nodes.\n\n* You _may_ set `TrainingInput.parameterServerCount` to specify the\n number of parameter servers to use. If you specify one or more\n parameter servers, you _must_ also set\n `TrainingInput.parameterServerType` to specify the type of machine to\n use for your parameter servers.\n\nNote that all of your workers must use the same machine type, which can\nbe different from your parameter server type and master type. Your\nparameter servers must likewise use the same machine type, which can be\ndifferent from your worker type and master type." - ] - }, - "jobDir": { - "type": "string", - "description": "Optional. A Google Cloud Storage path in which to store training outputs\nand other data needed for training. This path is passed to your TensorFlow\nprogram as the 'job_dir' command-line argument. The benefit of specifying\nthis field is that Cloud ML validates the path for use in training." - }, - "hyperparameters": { - "description": "Optional. The set of Hyperparameters to tune.", - "$ref": "GoogleCloudMlV1__HyperparameterSpec" - }, - "parameterServerCount": { - "format": "int64", - "description": "Optional. The number of parameter server replicas to use for the training\njob. Each replica in the cluster will be of the type specified in\n`parameter_server_type`.\n\nThis value can only be used when `scale_tier` is set to `CUSTOM`.If you\nset this value, you must also set `parameter_server_type`.", - "type": "string" - }, - "packageUris": { - "description": "Required. The Google Cloud Storage location of the packages with\nthe training program and any additional dependencies.\nThe maximum number of package URIs is 100.", - "items": { - "type": "string" - }, - "type": "array" - }, - "workerCount": { - "format": "int64", - "description": "Optional. The number of worker replicas to use for the training job. Each\nreplica in the cluster will be of the type specified in `worker_type`.\n\nThis value can only be used when `scale_tier` is set to `CUSTOM`. If you\nset this value, you must also set `worker_type`.", - "type": "string" - }, - "masterType": { - "description": "Optional. Specifies the type of virtual machine to use for your training\njob's master worker.\n\nThe following types are supported:\n\n\u003cdl\u003e\n \u003cdt\u003estandard\u003c/dt\u003e\n \u003cdd\u003e\n A basic machine configuration suitable for training simple models with\n small to moderate datasets.\n \u003c/dd\u003e\n \u003cdt\u003elarge_model\u003c/dt\u003e\n \u003cdd\u003e\n A machine with a lot of memory, specially suited for parameter servers\n when your model is large (having many hidden layers or layers with very\n large numbers of nodes).\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_s\u003c/dt\u003e\n \u003cdd\u003e\n A machine suitable for the master and workers of the cluster when your\n model requires more computation than the standard machine can handle\n satisfactorily.\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_m\u003c/dt\u003e\n \u003cdd\u003e\n A machine with roughly twice the number of cores and roughly double the\n memory of \u003ccode suppresswarning=\"true\"\u003ecomplex_model_s\u003c/code\u003e.\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_l\u003c/dt\u003e\n \u003cdd\u003e\n A machine with roughly twice the number of cores and roughly double the\n memory of \u003ccode suppresswarning=\"true\"\u003ecomplex_model_m\u003c/code\u003e.\n \u003c/dd\u003e\n \u003cdt\u003estandard_gpu\u003c/dt\u003e\n \u003cdd\u003e\n A machine equivalent to \u003ccode suppresswarning=\"true\"\u003estandard\u003c/code\u003e that\n also includes a\n \u003ca href=\"/ml-engine/docs/how-tos/using-gpus\"\u003e\n GPU that you can use in your trainer\u003c/a\u003e.\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_m_gpu\u003c/dt\u003e\n \u003cdd\u003e\n A machine equivalent to\n \u003ccode suppresswarning=\"true\"\u003ecomplex_model_m\u003c/code\u003e that also includes\n four GPUs.\n \u003c/dd\u003e\n\u003c/dl\u003e\n\nYou must set this value when `scaleTier` is set to `CUSTOM`.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1__TrainingInput" - }, - "GoogleCloudMlV1__ListModelsResponse": { - "properties": { - "models": { - "description": "The list of models.", - "items": { - "$ref": "GoogleCloudMlV1__Model" - }, - "type": "array" - }, - "nextPageToken": { - "type": "string", - "description": "Optional. Pass this token as the `page_token` field of the request for a\nsubsequent call." - } - }, - "id": "GoogleCloudMlV1__ListModelsResponse", - "description": "Response message for the ListModels method.", - "type": "object" - }, - "GoogleCloudMlV1__Job": { - "id": "GoogleCloudMlV1__Job", - "description": "Represents a training or prediction job.\n\nNext ID: 16", - "type": "object", - "properties": { - "startTime": { - "format": "google-datetime", - "description": "Output only. When the job processing was started.", - "type": "string" - }, - "predictionOutput": { - "$ref": "GoogleCloudMlV1__PredictionOutput", - "description": "The current prediction job result." - }, - "trainingOutput": { - "description": "The current training job result.", - "$ref": "GoogleCloudMlV1__TrainingOutput" - }, - "trainingInput": { - "description": "Input parameters to create a training job.", - "$ref": "GoogleCloudMlV1__TrainingInput" - }, - "createTime": { - "type": "string", - "format": "google-datetime", - "description": "Output only. When the job was created." - }, - "state": { - "enumDescriptions": [ - "The job state is unspecified.", - "The job has been just created and processing has not yet begun.", - "The service is preparing to run the job.", - "The job is in progress.", - "The job completed successfully.", - "The job failed.\n`error_message` should contain the details of the failure.", - "The job is being cancelled.\n`error_message` should describe the reason for the cancellation.", - "The job has been cancelled.\n`error_message` should describe the reason for the cancellation." - ], - "enum": [ - "STATE_UNSPECIFIED", - "QUEUED", - "PREPARING", - "RUNNING", - "SUCCEEDED", - "FAILED", - "CANCELLING", - "CANCELLED" - ], - "description": "Output only. The detailed state of a job.", - "type": "string" - }, - "predictionInput": { - "$ref": "GoogleCloudMlV1__PredictionInput", - "description": "Input parameters to create a prediction job." - }, - "jobId": { - "description": "Required. The user-specified id of the job.", - "type": "string" - }, - "errorMessage": { - "description": "Output only. The details of a failure or a cancellation.", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Output only. When the job processing was completed.", - "type": "string" + "canonicalName": "Cloud Machine Learning Engine", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" } } - }, - "GoogleApi__HttpBody": { - "properties": { - "extensions": { - "description": "Application specific response metadata. Must be set in the first response\nfor streaming APIs.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" + } + }, + "rootUrl": "https://ml.googleapis.com/", + "ownerDomain": "google.com", + "name": "ml", + "batchPath": "batch", + "title": "Google Cloud Machine Learning Engine", + "ownerName": "Google", + "resources": { + "projects": { + "methods": { + "getConfig": { + "response": { + "$ref": "GoogleCloudMlV1__GetConfigResponse" }, - "type": "array" - }, - "data": { - "format": "byte", - "description": "HTTP body binary data.", - "type": "string" - }, - "contentType": { - "description": "The HTTP Content-Type string representing the content type of the body.", - "type": "string" - } - }, - "id": "GoogleApi__HttpBody", - "description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n message GetResourceRequest {\n // A unique request id.\n string request_id = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty);\n }\n\nExample with streaming methods:\n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged.", - "type": "object" - }, - "GoogleCloudMlV1beta1__Version": { - "description": "Represents a version of the model.\n\nEach version is a trained model deployed in the cloud, ready to handle\nprediction requests. A model can have multiple versions. You can get\ninformation about all of the versions of a given model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list).\n\nNext ID: 18", - "type": "object", - "properties": { - "runtimeVersion": { - "description": "Optional. The Google Cloud ML runtime version to use for this deployment.\nIf not set, Google Cloud ML will choose a version.", - "type": "string" - }, - "lastUseTime": { - "format": "google-datetime", - "description": "Output only. The time the version was last used for prediction.", - "type": "string" - }, - "description": { - "description": "Optional. The description specified for the version when it was created.", - "type": "string" - }, - "deploymentUri": { - "description": "Required. The Google Cloud Storage location of the trained model used to\ncreate the version. See the\n[overview of model\ndeployment](/ml-engine/docs/concepts/deployment-overview) for more\ninformation.\n\nWhen passing Version to\n[projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects.models.versions/create)\nthe model service uses the specified location as the source of the model.\nOnce deployed, the model version is hosted by the prediction service, so\nthis location is useful only as a historical record.\nThe total number of model files can't exceed 1000.", - "type": "string" - }, - "autoScaling": { - "$ref": "GoogleCloudMlV1beta1__AutoScaling", - "description": "Automatically scale the number of nodes used to serve the model in\nresponse to increases and decreases in traffic. Care should be\ntaken to ramp up traffic according to the model's ability to scale\nor you will start seeing increases in latency and 429 response codes." - }, - "isDefault": { - "description": "Output only. If true, this version will be used to handle prediction\nrequests that do not specify a version.\n\nYou can change the default version by calling\n[projects.methods.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault).", - "type": "boolean" - }, - "createTime": { - "format": "google-datetime", - "description": "Output only. The time the version was created.", - "type": "string" - }, - "state": { - "enum": [ - "UNKNOWN", - "READY", - "CREATING", - "FAILED" + "parameterOrder": [ + "name" ], - "description": "Output only. The state of a version.", - "type": "string", - "enumDescriptions": [ - "The version state is unspecified.", - "The version is ready for prediction.", - "The version is still in the process of creation.", - "The version failed to be created, possibly cancelled.\n`error_message` should contain the details of the failure." - ] - }, - "manualScaling": { - "$ref": "GoogleCloudMlV1beta1__ManualScaling", - "description": "Manually select the number of nodes to use for serving the\nmodel. You should generally use `auto_scaling` with an appropriate\n`min_nodes` instead, but this option is available if you want more\npredictable billing. Beware that latency and error rates will increase\nif the traffic exceeds that capability of the system to serve it based\non the selected number of nodes." - }, - "name": { - "description": "Required.The name specified for the version when it was created.\n\nThe version name must be unique within the model it is created in.", - "type": "string" - }, - "errorMessage": { - "description": "Output only. The details of a failure or a cancellation.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1beta1__Version" - }, - "GoogleCloudMlV1__GetConfigResponse": { - "description": "Returns service account information associated with a project.", - "type": "object", - "properties": { - "serviceAccountProject": { - "format": "int64", - "description": "The project number for `service_account`.", - "type": "string" - }, - "serviceAccount": { - "description": "The service account Cloud ML uses to access resources in the project.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1__GetConfigResponse" - }, - "GoogleIamV1__TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", - "items": { - "type": "string" + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The project name.", + "type": "string", + "required": true + } }, - "type": "array" + "flatPath": "v1/projects/{projectsId}:getConfig", + "id": "ml.projects.getConfig", + "path": "v1/{+name}:getConfig", + "description": "Get the service account information associated with your project. You need\nthis information in order to grant the service account persmissions for\nthe Google Cloud Storage location where you put your model training code\nfor training the model with Google Cloud Machine Learning." + }, + "predict": { + "response": { + "$ref": "GoogleApi__HttpBody" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/.+$", + "location": "path", + "description": "Required. The resource name of a model or a version.\n\nAuthorization: requires the `predict` permission on the specified resource.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}:predict", + "id": "ml.projects.predict", + "path": "v1/{+name}:predict", + "request": { + "$ref": "GoogleCloudMlV1__PredictRequest" + }, + "description": "Performs prediction on the data in the request.\n\n**** REMOVE FROM GENERATED DOCUMENTATION" } }, - "id": "GoogleIamV1__TestIamPermissionsResponse" - }, - "GoogleCloudMlV1__HyperparameterOutput": { - "description": "Represents the result of a single hyperparameter tuning trial from a\ntraining job. The TrainingOutput object that is returned on successful\ncompletion of a training job with hyperparameter tuning includes a list\nof HyperparameterOutput objects, one for each successful trial.", - "type": "object", - "properties": { - "allMetrics": { - "description": "All recorded object metrics for this trial.", - "items": { - "$ref": "GoogleCloudMlV1_HyperparameterOutput_HyperparameterMetric" + "resources": { + "jobs": { + "methods": { + "create": { + "response": { + "$ref": "GoogleCloudMlV1__Job" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "parent": { + "description": "Required. The project name.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/jobs", + "id": "ml.projects.jobs.create", + "path": "v1/{+parent}/jobs", + "request": { + "$ref": "GoogleCloudMlV1__Job" + }, + "description": "Creates a training or a batch prediction job." + }, + "setIamPolicy": { + "response": { + "$ref": "GoogleIamV1__Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/jobs/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/jobs/{jobsId}:setIamPolicy", + "id": "ml.projects.jobs.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "GoogleIamV1__SetIamPolicyRequest" + } + }, + "cancel": { + "description": "Cancels a running job.", + "request": { + "$ref": "GoogleCloudMlV1__CancelJobRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "GoogleProtobuf__Empty" + }, + "parameters": { + "name": { + "pattern": "^projects/[^/]+/jobs/[^/]+$", + "location": "path", + "description": "Required. The name of the job to cancel.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/jobs/{jobsId}:cancel", + "path": "v1/{+name}:cancel", + "id": "ml.projects.jobs.cancel" + }, + "getIamPolicy": { + "id": "ml.projects.jobs.getIamPolicy", + "path": "v1/{+resource}: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.", + "response": { + "$ref": "GoogleIamV1__Policy" + }, + "httpMethod": "GET", + "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.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/jobs/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/jobs/{jobsId}:getIamPolicy" + }, + "get": { + "description": "Describes a job.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "GoogleCloudMlV1__Job" + }, + "parameters": { + "name": { + "pattern": "^projects/[^/]+/jobs/[^/]+$", + "location": "path", + "description": "Required. The name of the job to get the description of.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/jobs/{jobsId}", + "path": "v1/{+name}", + "id": "ml.projects.jobs.get" + }, + "testIamPermissions": { + "response": { + "$ref": "GoogleIamV1__TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/jobs/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/jobs/{jobsId}:testIamPermissions", + "id": "ml.projects.jobs.testIamPermissions", + "path": "v1/{+resource}: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.", + "request": { + "$ref": "GoogleIamV1__TestIamPermissionsRequest" + } + }, + "list": { + "description": "Lists the jobs in the project.", + "response": { + "$ref": "GoogleCloudMlV1__ListJobsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageToken": { + "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional. The number of jobs to retrieve per \"page\" of results. If there\nare more remaining results than this number, the response message will\ncontain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", + "type": "integer" + }, + "parent": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The name of the project for which to list jobs.", + "type": "string", + "required": true + }, + "filter": { + "location": "query", + "description": "Optional. Specifies the subset of jobs to retrieve.", + "type": "string" + } + }, + "flatPath": "v1/projects/{projectsId}/jobs", + "id": "ml.projects.jobs.list", + "path": "v1/{+parent}/jobs" + } + } + }, + "models": { + "resources": { + "versions": { + "methods": { + "create": { + "id": "ml.projects.models.versions.create", + "path": "v1/{+parent}/versions", + "request": { + "$ref": "GoogleCloudMlV1__Version" + }, + "description": "Creates a new version of a model from a trained TensorFlow model.\n\nIf the version created in the cloud by this call is the first deployed\nversion of the specified model, it will be made the default version of the\nmodel. When you add a version to a model that already has one or more\nversions, the default version does not automatically change. If you want a\nnew version to be the default, you must call\n[projects.models.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault).", + "response": { + "$ref": "GoogleLongrunning__Operation" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "parent": { + "description": "Required. The name of the model.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/models/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions" + }, + "setDefault": { + "response": { + "$ref": "GoogleCloudMlV1__Version" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", + "location": "path", + "description": "Required. The name of the version to make the default for the model. You\ncan get the names of all the versions of a model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}:setDefault", + "id": "ml.projects.models.versions.setDefault", + "path": "v1/{+name}:setDefault", + "request": { + "$ref": "GoogleCloudMlV1__SetDefaultVersionRequest" + }, + "description": "Designates a version to be the default for the model.\n\nThe default version is used for prediction requests made against the model\nthat don't specify a version.\n\nThe first version to be created for a model is automatically set as the\ndefault. You must make any subsequent changes to the default version\nsetting manually using this method." + }, + "delete": { + "response": { + "$ref": "GoogleLongrunning__Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", + "location": "path", + "description": "Required. The name of the version. You can get the names of all the\nversions of a model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}", + "id": "ml.projects.models.versions.delete", + "path": "v1/{+name}", + "description": "Deletes a model version.\n\nEach model can have multiple versions deployed and in use at any given\ntime. Use this method to remove a single version.\n\nNote: You cannot delete the version that is set as the default version\nof the model unless it is the only remaining version." + }, + "get": { + "id": "ml.projects.models.versions.get", + "path": "v1/{+name}", + "description": "Gets information about a model version.\n\nModels can have multiple versions. You can call\n[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list)\nto get the same information that this method returns for all of the\nversions of a model.", + "response": { + "$ref": "GoogleCloudMlV1__Version" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", + "location": "path", + "description": "Required. The name of the version.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}" + }, + "list": { + "response": { + "$ref": "GoogleCloudMlV1__ListVersionsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "parent": { + "description": "Required. The name of the model for which to list the version.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/models/[^/]+$", + "location": "path" + }, + "pageToken": { + "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional. The number of versions to retrieve per \"page\" of results. If\nthere are more remaining results than this number, the response message\nwill contain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions", + "id": "ml.projects.models.versions.list", + "path": "v1/{+parent}/versions", + "description": "Gets basic information about all the versions of a model.\n\nIf you expect that a model has a lot of versions, or if you need to handle\nonly a limited number of results at a time, you can request that the list\nbe retrieved in batches (called pages):" + } + } + } }, - "type": "array" - }, - "finalMetric": { - "$ref": "GoogleCloudMlV1_HyperparameterOutput_HyperparameterMetric", - "description": "The final objective metric seen for this trial." - }, - "hyperparameters": { - "additionalProperties": { - "type": "string" - }, - "description": "The hyperparameters given to this trial.", - "type": "object" - }, - "trialId": { - "type": "string", - "description": "The trial id for these results." - } - }, - "id": "GoogleCloudMlV1__HyperparameterOutput" - }, - "GoogleIamV1__SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "properties": { - "policy": { - "$ref": "GoogleIamV1__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": { - "format": "google-fieldmask", - "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.", - "type": "string" - } - }, - "id": "GoogleIamV1__SetIamPolicyRequest" - }, - "GoogleCloudMlV1__PredictionOutput": { - "description": "Represents results of a prediction job.", - "type": "object", - "properties": { - "nodeHours": { - "format": "double", - "description": "Node hours used by the batch prediction job.", - "type": "number" - }, - "outputPath": { - "type": "string", - "description": "The output Google Cloud Storage location provided at the job creation time." - }, - "predictionCount": { - "format": "int64", - "description": "The number of generated predictions.", - "type": "string" - }, - "errorCount": { - "type": "string", - "format": "int64", - "description": "The number of data instances which resulted in errors." - } - }, - "id": "GoogleCloudMlV1__PredictionOutput" - }, - "GoogleIamV1__Policy": { - "properties": { - "auditConfigs": { - "description": "Specifies cloud audit logging configuration for this policy.", - "items": { - "$ref": "GoogleIamV1__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": "GoogleIamV1__Binding" - }, - "type": "array" - }, - "etag": { - "format": "byte", - "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.", - "type": "string" - }, - "iamOwned": { - "type": "boolean" - }, - "rules": { - "description": "If more than one rule is specified, the rules are applied in the following\nmanner:\n- All matching LOG rules are always applied.\n- If any DENY/DENY_WITH_LOG rule matches, permission is denied.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is\n granted.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if no rule applies, permission is denied.", - "items": { - "$ref": "GoogleIamV1__Rule" - }, - "type": "array" - }, - "version": { - "format": "int32", - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer" - } - }, - "id": "GoogleIamV1__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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object" - }, - "GoogleLongrunning__ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." + "methods": { + "testIamPermissions": { + "id": "ml.projects.models.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1__TestIamPermissionsRequest" + }, + "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.", + "response": { + "$ref": "GoogleIamV1__TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "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.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/models/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/models/{modelsId}:testIamPermissions" + }, + "delete": { + "description": "Deletes a model.\n\nYou can only delete a model if there are no versions in it. You can delete\nversions by calling\n[projects.models.versions.delete](/ml-engine/reference/rest/v1/projects.models.versions/delete).", + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "GoogleLongrunning__Operation" + }, + "parameters": { + "name": { + "description": "Required. The name of the model.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/models/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/models/{modelsId}", + "path": "v1/{+name}", + "id": "ml.projects.models.delete" + }, + "list": { + "response": { + "$ref": "GoogleCloudMlV1__ListModelsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Optional. The number of models to retrieve per \"page\" of results. If there\nare more remaining results than this number, the response message will\ncontain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", + "type": "integer", + "location": "query" + }, + "parent": { + "description": "Required. The name of the project whose models are to be listed.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/models", + "id": "ml.projects.models.list", + "path": "v1/{+parent}/models", + "description": "Lists the models in a project.\n\nEach project can contain multiple models, and each model can have multiple\nversions." + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "GoogleIamV1__SetIamPolicyRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "GoogleIamV1__Policy" + }, + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/models/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/models/{modelsId}:setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "id": "ml.projects.models.setIamPolicy" + }, + "create": { + "id": "ml.projects.models.create", + "path": "v1/{+parent}/models", + "description": "Creates a model which will later contain one or more versions.\n\nYou must add at least one version before you can request predictions from\nthe model. Add versions by calling\n[projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create).", + "request": { + "$ref": "GoogleCloudMlV1__Model" + }, + "response": { + "$ref": "GoogleCloudMlV1__Model" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "parent": { + "description": "Required. The project name.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/models" + }, + "getIamPolicy": { + "id": "ml.projects.models.getIamPolicy", + "path": "v1/{+resource}: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.", + "response": { + "$ref": "GoogleIamV1__Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/models/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/models/{modelsId}:getIamPolicy" + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "GoogleCloudMlV1__Model" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/models/[^/]+$", + "location": "path", + "description": "Required. The name of the model.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/models/{modelsId}", + "path": "v1/{+name}", + "id": "ml.projects.models.get", + "description": "Gets information about a model, including its name, the description (if\nset), and the default version (if at least one version of the model has\nbeen deployed)." + } + } }, "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "GoogleLongrunning__Operation" - }, - "type": "array" - } - }, - "id": "GoogleLongrunning__ListOperationsResponse" - }, - "GoogleIamV1__Condition": { - "properties": { - "op": { - "enum": [ - "NO_OP", - "EQUALS", - "NOT_EQUALS", - "IN", - "NOT_IN", - "DISCHARGED" - ], - "description": "An operator to apply the subject with.", - "type": "string", - "enumDescriptions": [ - "Default no-op.", - "DEPRECATED. Use IN instead.", - "DEPRECATED. Use NOT_IN instead.", - "The condition is true if the subject (or any element of it if it is\na set) matches any of the supplied values.", - "The condition is true if the subject (or every element of it if it is\na set) matches none of the supplied values.", - "Subject is discharged" - ] - }, - "svc": { - "type": "string", - "description": "Trusted attributes discharged by the service." - }, - "sys": { - "enum": [ - "NO_ATTR", - "REGION", - "SERVICE", - "NAME", - "IP" - ], - "description": "Trusted attributes supplied by any service that owns resources and uses\nthe IAM system for access control.", - "type": "string", - "enumDescriptions": [ - "Default non-attribute type", - "Region of the resource", - "Service name", - "Resource name", - "IP address of the caller" - ] - }, - "value": { - "description": "DEPRECATED. Use 'values' instead.", - "type": "string" - }, - "values": { - "description": "The objects of the condition. This is mutually exclusive with 'value'.", - "items": { - "type": "string" - }, - "type": "array" - }, - "iam": { - "enumDescriptions": [ - "Default non-attribute.", - "Either principal or (if present) authority selector.", - "The principal (even if an authority selector is present), which\nmust only be used for attribution, not authorization.", - "An approver (distinct from the requester) that has authorized this\nrequest.\nWhen used with IN, the condition indicates that one of the approvers\nassociated with the request matches the specified principal, or is a\nmember of the specified group. Approvers can only grant additional\naccess, and are thus only used in a strictly positive context\n(e.g. ALLOW/IN or DENY/NOT_IN).", - "What types of justifications have been supplied with this request.\nString values should match enum names from tech.iam.JustificationType,\ne.g. \"MANUAL_STRING\". It is not permitted to grant access based on\nthe *absence* of a justification, so justification conditions can only\nbe used in a \"positive\" context (e.g., ALLOW/IN or DENY/NOT_IN).\n\nMultiple justifications, e.g., a Buganizer ID and a manually-entered\nreason, are normal and supported." - ], - "enum": [ - "NO_ATTR", - "AUTHORITY", - "ATTRIBUTION", - "APPROVER", - "JUSTIFICATION_TYPE" - ], - "description": "Trusted attributes supplied by the IAM system.", - "type": "string" - } - }, - "id": "GoogleIamV1__Condition", - "description": "A condition to be met.", - "type": "object" - }, - "GoogleCloudMlV1__ManualScaling": { - "type": "object", - "properties": { - "nodes": { - "format": "int32", - "description": "The number of nodes to allocate for this model. These nodes are always up,\nstarting from the time the model is deployed, so the cost of operating\nthis model will be proportional to `nodes` * number of hours since\nlast billing cycle plus the cost for each prediction performed.", - "type": "integer" - } - }, - "id": "GoogleCloudMlV1__ManualScaling", - "description": "Options for manually scaling a model." - }, - "GoogleCloudMlV1__TrainingOutput": { - "description": "Represents results of a training job. Output only.", - "type": "object", - "properties": { - "completedTrialCount": { - "format": "int64", - "description": "The number of hyperparameter tuning trials that completed successfully.\nOnly set for hyperparameter tuning jobs.", - "type": "string" - }, - "isHyperparameterTuningJob": { - "description": "Whether this job is a hyperparameter tuning job.", - "type": "boolean" - }, - "consumedMLUnits": { - "format": "double", - "description": "The amount of ML units consumed by the job.", - "type": "number" - }, - "trials": { - "description": "Results for individual Hyperparameter trials.\nOnly set for hyperparameter tuning jobs.", - "items": { - "$ref": "GoogleCloudMlV1__HyperparameterOutput" - }, - "type": "array" - } - }, - "id": "GoogleCloudMlV1__TrainingOutput" - }, - "GoogleIamV1__Binding": { - "description": "Associates `members` with a `role`.", - "type": "object", - "properties": { - "condition": { - "$ref": "GoogleType__Expr", - "description": "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.\nThis field is GOOGLE_INTERNAL." - }, - "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` or `joe@example.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`.\nRequired", - "type": "string" - } - }, - "id": "GoogleIamV1__Binding" - }, - "GoogleIamV1__Rule": { - "type": "object", - "properties": { - "notIn": { - "description": "If one or more 'not_in' clauses are specified, the rule matches\nif the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.\nThe format for in and not_in entries is the same as for members in a\nBinding (see google/iam/v1/policy.proto).", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "Human-readable description of the rule.", - "type": "string" - }, - "conditions": { - "description": "Additional restrictions that must be met", - "items": { - "$ref": "GoogleIamV1__Condition" - }, - "type": "array" - }, - "logConfig": { - "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries\nthat match the LOG action.", - "items": { - "$ref": "GoogleIamV1__LogConfig" - }, - "type": "array" - }, - "in": { - "description": "If one or more 'in' clauses are specified, the rule matches if\nthe PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.", - "items": { - "type": "string" - }, - "type": "array" - }, - "permissions": { - "description": "A permission is a string of form '\u003cservice\u003e.\u003cresource type\u003e.\u003cverb\u003e'\n(e.g., 'storage.buckets.list'). A value of '*' matches all permissions,\nand a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "action": { - "enumDescriptions": [ - "Default no action.", - "Matching 'Entries' grant access.", - "Matching 'Entries' grant access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' deny access.", - "Matching 'Entries' deny access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' tell IAM.Check callers to generate logs." - ], - "enum": [ - "NO_ACTION", - "ALLOW", - "ALLOW_WITH_LOG", - "DENY", - "DENY_WITH_LOG", - "LOG" - ], - "description": "Required", - "type": "string" - } - }, - "id": "GoogleIamV1__Rule", - "description": "A rule to be applied in a Policy." - }, - "GoogleCloudMlV1beta1__AutoScaling": { - "description": "Options for automatically scaling a model.", - "type": "object", - "properties": { - "minNodes": { - "format": "int32", - "description": "Optional. The minimum number of nodes to allocate for this model. These\nnodes are always up, starting from the time the model is deployed, so the\ncost of operating this model will be at least\n`rate` * `min_nodes` * number of hours since last billing cycle,\nwhere `rate` is the cost per node-hour as documented in\n[pricing](https://cloud.google.com/ml-engine/pricing#prediction_pricing),\neven if no predictions are performed. There is additional cost for each\nprediction performed.\n\nUnlike manual scaling, if the load gets too heavy for the nodes\nthat are up, the service will automatically add nodes to handle the\nincreased load as well as scale back as traffic drops, always maintaining\nat least `min_nodes`. You will be charged for the time in which additional\nnodes are used.\n\nIf not specified, `min_nodes` defaults to 0, in which case, when traffic\nto a model stops (and after a cool-down period), nodes will be shut down\nand no charges will be incurred until traffic to the model resumes.", - "type": "integer" - } - }, - "id": "GoogleCloudMlV1beta1__AutoScaling" - }, - "GoogleIamV1_LogConfig_CounterOptions": { - "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only,\nand end in \"_count\". Field names should not contain an initial slash.\nThe actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are\ntheir respective values.\n\nAt present the only supported field names are\n - \"iam_principal\", corresponding to IAMContext.principal;\n - \"\" (empty string), resulting in one aggretated counter with no field.\n\nExamples:\n counter { metric: \"/debug_access_count\" field: \"iam_principal\" }\n ==\u003e increment counter /iam/policy/backend_debug_access_count\n {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support:\n* multiple field names (though this may be supported in the future)\n* decrementing the counter\n* incrementing it by anything other than 1", - "type": "object", - "properties": { - "field": { - "description": "The field value to attribute.", - "type": "string" - }, - "metric": { - "description": "The metric to update.", - "type": "string" - } - }, - "id": "GoogleIamV1_LogConfig_CounterOptions" - }, - "GoogleCloudMlV1__PredictRequest": { - "description": "Request for predictions to be issued against a trained model.\n\nThe body of the request is a single JSON object with a single top-level\nfield:\n\n\u003cdl\u003e\n \u003cdt\u003einstances\u003c/dt\u003e\n \u003cdd\u003eA JSON array containing values representing the instances to use for\n prediction.\u003c/dd\u003e\n\u003c/dl\u003e\n\nThe structure of each element of the instances list is determined by your\nmodel's input definition. Instances can include named inputs or can contain\nonly unlabeled values.\n\nNot all data includes named inputs. Some instances will be simple\nJSON values (boolean, number, or string). However, instances are often lists\nof simple values, or complex nested lists. Here are some examples of request\nbodies:\n\nCSV data with each row encoded as a string value:\n\u003cpre\u003e\n{\"instances\": [\"1.0,true,\\\\\"x\\\\\"\", \"-2.0,false,\\\\\"y\\\\\"\"]}\n\u003c/pre\u003e\nPlain text:\n\u003cpre\u003e\n{\"instances\": [\"the quick brown fox\", \"la bruja le dio\"]}\n\u003c/pre\u003e\nSentences encoded as lists of words (vectors of strings):\n\u003cpre\u003e\n{\n \"instances\": [\n [\"the\",\"quick\",\"brown\"],\n [\"la\",\"bruja\",\"le\"],\n ...\n ]\n}\n\u003c/pre\u003e\nFloating point scalar values:\n\u003cpre\u003e\n{\"instances\": [0.0, 1.1, 2.2]}\n\u003c/pre\u003e\nVectors of integers:\n\u003cpre\u003e\n{\n \"instances\": [\n [0, 1, 2],\n [3, 4, 5],\n ...\n ]\n}\n\u003c/pre\u003e\nTensors (in this case, two-dimensional tensors):\n\u003cpre\u003e\n{\n \"instances\": [\n [\n [0, 1, 2],\n [3, 4, 5]\n ],\n ...\n ]\n}\n\u003c/pre\u003e\nImages can be represented different ways. In this encoding scheme the first\ntwo dimensions represent the rows and columns of the image, and the third\ncontains lists (vectors) of the R, G, and B values for each pixel.\n\u003cpre\u003e\n{\n \"instances\": [\n [\n [\n [138, 30, 66],\n [130, 20, 56],\n ...\n ],\n [\n [126, 38, 61],\n [122, 24, 57],\n ...\n ],\n ...\n ],\n ...\n ]\n}\n\u003c/pre\u003e\nJSON strings must be encoded as UTF-8. To send binary data, you must\nbase64-encode the data and mark it as binary. To mark a JSON string\nas binary, replace it with a JSON object with a single attribute named `b64`:\n\u003cpre\u003e{\"b64\": \"...\"} \u003c/pre\u003e\nFor example:\n\nTwo Serialized tf.Examples (fake data, for illustrative purposes only):\n\u003cpre\u003e\n{\"instances\": [{\"b64\": \"X5ad6u\"}, {\"b64\": \"IA9j4nx\"}]}\n\u003c/pre\u003e\nTwo JPEG image byte strings (fake data, for illustrative purposes only):\n\u003cpre\u003e\n{\"instances\": [{\"b64\": \"ASa8asdf\"}, {\"b64\": \"JLK7ljk3\"}]}\n\u003c/pre\u003e\nIf your data includes named references, format each instance as a JSON object\nwith the named references as the keys:\n\nJSON input data to be preprocessed:\n\u003cpre\u003e\n{\n \"instances\": [\n {\n \"a\": 1.0,\n \"b\": true,\n \"c\": \"x\"\n },\n {\n \"a\": -2.0,\n \"b\": false,\n \"c\": \"y\"\n }\n ]\n}\n\u003c/pre\u003e\nSome models have an underlying TensorFlow graph that accepts multiple input\ntensors. In this case, you should use the names of JSON name/value pairs to\nidentify the input tensors, as shown in the following exmaples:\n\nFor a graph with input tensor aliases \"tag\" (string) and \"image\"\n(base64-encoded string):\n\u003cpre\u003e\n{\n \"instances\": [\n {\n \"tag\": \"beach\",\n \"image\": {\"b64\": \"ASa8asdf\"}\n },\n {\n \"tag\": \"car\",\n \"image\": {\"b64\": \"JLK7ljk3\"}\n }\n ]\n}\n\u003c/pre\u003e\nFor a graph with input tensor aliases \"tag\" (string) and \"image\"\n(3-dimensional array of 8-bit ints):\n\u003cpre\u003e\n{\n \"instances\": [\n {\n \"tag\": \"beach\",\n \"image\": [\n [\n [138, 30, 66],\n [130, 20, 56],\n ...\n ],\n [\n [126, 38, 61],\n [122, 24, 57],\n ...\n ],\n ...\n ]\n },\n {\n \"tag\": \"car\",\n \"image\": [\n [\n [255, 0, 102],\n [255, 0, 97],\n ...\n ],\n [\n [254, 1, 101],\n [254, 2, 93],\n ...\n ],\n ...\n ]\n },\n ...\n ]\n}\n\u003c/pre\u003e\nIf the call is successful, the response body will contain one prediction\nentry per instance in the request body. If prediction fails for any\ninstance, the response body will contain no predictions and will contian\na single error entry instead.", - "type": "object", - "properties": { - "httpBody": { - "$ref": "GoogleApi__HttpBody", - "description": "\nRequired. The prediction request body." - } - }, - "id": "GoogleCloudMlV1__PredictRequest" - }, - "GoogleCloudMlV1_HyperparameterOutput_HyperparameterMetric": { - "properties": { - "objectiveValue": { - "format": "double", - "description": "The objective value at this training step.", - "type": "number" - }, - "trainingStep": { - "format": "int64", - "description": "The global training step for this metric.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1_HyperparameterOutput_HyperparameterMetric", - "description": "An observed value of a metric.", - "type": "object" - }, - "GoogleIamV1_LogConfig_CloudAuditOptions": { - "id": "GoogleIamV1_LogConfig_CloudAuditOptions", - "description": "Write a Cloud Audit log", - "type": "object", - "properties": { - "logName": { - "enumDescriptions": [ - "Default. Should not be used.", - "Corresponds to \"cloudaudit.googleapis.com/activity\"", - "Corresponds to \"cloudaudit.googleapis.com/data_access\"" - ], - "enum": [ - "UNSPECIFIED_LOG_NAME", - "ADMIN_ACTIVITY", - "DATA_ACCESS" - ], - "description": "The log_name to populate in the Cloud Audit Record.", - "type": "string" + "methods": { + "cancel": { + "id": "ml.projects.operations.cancel", + "path": "v1/{+name}:cancel", + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + "response": { + "$ref": "GoogleProtobuf__Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/operations/[^/]+$", + "location": "path", + "description": "The name of the operation resource to be cancelled.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/operations/{operationsId}:cancel" + }, + "delete": { + "id": "ml.projects.operations.delete", + "path": "v1/{+name}", + "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", + "response": { + "$ref": "GoogleProtobuf__Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/operations/[^/]+$", + "location": "path", + "description": "The name of the operation resource to be deleted.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/operations/{operationsId}" + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "httpMethod": "GET", + "response": { + "$ref": "GoogleLongrunning__Operation" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/operations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/operations/{operationsId}", + "path": "v1/{+name}", + "id": "ml.projects.operations.get" + }, + "list": { + "response": { + "$ref": "GoogleLongrunning__ListOperationsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "name": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "The name of the operation's parent resource.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + } + }, + "flatPath": "v1/projects/{projectsId}/operations", + "id": "ml.projects.operations.list", + "path": "v1/{+name}/operations", + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id." + } + } } } + } + }, + "parameters": { + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" }, - "GoogleCloudMlV1__Version": { - "description": "Represents a version of the model.\n\nEach version is a trained model deployed in the cloud, ready to handle\nprediction requests. A model can have multiple versions. You can get\ninformation about all of the versions of a given model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).\n\nNext ID: 18", - "type": "object", - "properties": { - "description": { - "description": "Optional. The description specified for the version when it was created.", - "type": "string" - }, - "deploymentUri": { - "description": "Required. The Google Cloud Storage location of the trained model used to\ncreate the version. See the\n[overview of model\ndeployment](/ml-engine/docs/concepts/deployment-overview) for more\ninformation.\n\nWhen passing Version to\n[projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create)\nthe model service uses the specified location as the source of the model.\nOnce deployed, the model version is hosted by the prediction service, so\nthis location is useful only as a historical record.\nThe total number of model files can't exceed 1000.", - "type": "string" - }, - "isDefault": { - "description": "Output only. If true, this version will be used to handle prediction\nrequests that do not specify a version.\n\nYou can change the default version by calling\n[projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault).", - "type": "boolean" - }, - "autoScaling": { - "$ref": "GoogleCloudMlV1__AutoScaling", - "description": "Automatically scale the number of nodes used to serve the model in\nresponse to increases and decreases in traffic. Care should be\ntaken to ramp up traffic according to the model's ability to scale\nor you will start seeing increases in latency and 429 response codes." - }, - "createTime": { - "format": "google-datetime", - "description": "Output only. The time the version was created.", - "type": "string" - }, - "state": { - "type": "string", - "enumDescriptions": [ - "The version state is unspecified.", - "The version is ready for prediction.", - "The version is still in the process of creation.", - "The version failed to be created, possibly cancelled.\n`error_message` should contain the details of the failure." - ], - "enum": [ - "UNKNOWN", - "READY", - "CREATING", - "FAILED" - ], - "description": "Output only. The state of a version." - }, - "manualScaling": { - "$ref": "GoogleCloudMlV1__ManualScaling", - "description": "Manually select the number of nodes to use for serving the\nmodel. You should generally use `auto_scaling` with an appropriate\n`min_nodes` instead, but this option is available if you want more\npredictable billing. Beware that latency and error rates will increase\nif the traffic exceeds that capability of the system to serve it based\non the selected number of nodes." - }, - "name": { - "description": "Required.The name specified for the version when it was created.\n\nThe version name must be unique within the model it is created in.", - "type": "string" - }, - "errorMessage": { - "type": "string", - "description": "Output only. The details of a failure or a cancellation." - }, - "lastUseTime": { - "format": "google-datetime", - "description": "Output only. The time the version was last used for prediction.", - "type": "string" - }, - "runtimeVersion": { - "description": "Optional. The Google Cloud ML runtime version to use for this deployment.\nIf not set, Google Cloud ML will choose a version.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1__Version" + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "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.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + } + }, + "version": "v1", + "baseUrl": "https://ml.googleapis.com/", + "kind": "discovery#restDescription", + "description": "An API to enable creating and using machine learning models.", + "servicePath": "", + "basePath": "", + "revision": "20170909", + "id": "ml:v1", + "documentationLink": "https://cloud.google.com/ml/", + "discoveryVersion": "v1", + "version_module": true, + "schemas": { "GoogleCloudMlV1__ParameterSpec": { - "description": "Represents a single hyperparameter to optimize.", - "type": "object", "properties": { - "parameterName": { - "description": "Required. The parameter name must be unique amongst all ParameterConfigs in\na HyperparameterSpec message. E.g., \"learning_rate\".", - "type": "string" - }, - "categoricalValues": { - "description": "Required if type is `CATEGORICAL`. The list of possible categories.", - "items": { - "type": "string" - }, - "type": "array" - }, - "minValue": { - "format": "double", - "description": "Required if type is `DOUBLE` or `INTEGER`. This field\nshould be unset if type is `CATEGORICAL`. This value should be integers if\ntype is INTEGER.", - "type": "number" - }, "discreteValues": { "description": "Required if type is `DISCRETE`.\nA list of feasible points.\nThe list should be in strictly increasing order. For instance, this\nparameter might have possible settings of 1.5, 2.5, and 4.0. This list\nshould not contain more than 1,000 values.", "items": { @@ -897,43 +898,58 @@ "The parameter is categorical, with a value chosen from the categories\nfield.", "The parameter is real valued, with a fixed set of feasible points. If\n`type==DISCRETE`, feasible_points must be provided, and\n{`min_value`, `max_value`} will be ignored." ] + }, + "parameterName": { + "description": "Required. The parameter name must be unique amongst all ParameterConfigs in\na HyperparameterSpec message. E.g., \"learning_rate\".", + "type": "string" + }, + "categoricalValues": { + "description": "Required if type is `CATEGORICAL`. The list of possible categories.", + "items": { + "type": "string" + }, + "type": "array" + }, + "minValue": { + "format": "double", + "description": "Required if type is `DOUBLE` or `INTEGER`. This field\nshould be unset if type is `CATEGORICAL`. This value should be integers if\ntype is INTEGER.", + "type": "number" } }, - "id": "GoogleCloudMlV1__ParameterSpec" - }, - "GoogleIamV1_LogConfig_DataAccessOptions": { - "description": "Write a Data Access (Gin) log", - "type": "object", - "properties": { - "logMode": { - "type": "string", - "enumDescriptions": [ - "Client is not required to write a partial Gin log immediately after\nthe authorization check. If client chooses to write one and it fails,\nclient may either fail open (allow the operation to continue) or\nfail closed (handle as a DENY outcome).", - "The application's operation in the context of which this authorization\ncheck is being made may only be performed if it is successfully logged\nto Gin. For instance, the authorization library may satisfy this\nobligation by emitting a partial log entry at authorization check time\nand only returning ALLOW to the application if it succeeds.\n\nIf a matching Rule has this directive, but the client has not indicated\nthat it will honor such requirements, then the IAM check will result in\nauthorization failure by setting CheckPolicyResponse.success=false." - ], - "enum": [ - "LOG_MODE_UNSPECIFIED", - "LOG_FAIL_CLOSED" - ], - "description": "Whether Gin logging should happen in a fail-closed manner at the caller.\nThis is relevant only in the LocalIAM implementation, for now." - } - }, - "id": "GoogleIamV1_LogConfig_DataAccessOptions" + "id": "GoogleCloudMlV1__ParameterSpec", + "description": "Represents a single hyperparameter to optimize.", + "type": "object" }, "GoogleCloudMlV1__PredictionInput": { - "description": "Represents input parameters for a prediction job.", - "type": "object", "properties": { + "versionName": { + "description": "Use this field if you want to specify a version of the model to use. The\nstring is formatted the same way as `model_version`, with the addition\nof the version information:\n\n`\"projects/\u003cvar\u003e[YOUR_PROJECT]\u003c/var\u003e/models/\u003cvar\u003eYOUR_MODEL/versions/\u003cvar\u003e[YOUR_VERSION]\u003c/var\u003e\"`", + "type": "string" + }, + "modelName": { + "description": "Use this field if you want to use the default version for the specified\nmodel. The string must use the following format:\n\n`\"projects/\u003cvar\u003e[YOUR_PROJECT]\u003c/var\u003e/models/\u003cvar\u003e[YOUR_MODEL]\u003c/var\u003e\"`", + "type": "string" + }, + "outputPath": { + "description": "Required. The output Google Cloud Storage location.", + "type": "string" + }, "maxWorkerCount": { - "type": "string", "format": "int64", - "description": "Optional. The maximum number of workers to be used for parallel processing.\nDefaults to 10 if not specified." + "description": "Optional. The maximum number of workers to be used for parallel processing.\nDefaults to 10 if not specified.", + "type": "string" }, "uri": { "description": "Use this field if you want to specify a Google Cloud Storage path for\nthe model to use.", "type": "string" }, "dataFormat": { + "enum": [ + "DATA_FORMAT_UNSPECIFIED", + "TEXT", + "TF_RECORD", + "TF_RECORD_GZIP" + ], "description": "Required. The format of the input data files.", "type": "string", "enumDescriptions": [ @@ -941,23 +957,17 @@ "The source file is a text file with instances separated by the\nnew-line character.", "The source file is a TFRecord file.", "The source file is a GZIP-compressed TFRecord file." - ], - "enum": [ - "DATA_FORMAT_UNSPECIFIED", - "TEXT", - "TF_RECORD", - "TF_RECORD_GZIP" ] }, + "runtimeVersion": { + "description": "Optional. The Google Cloud ML runtime version to use for this batch\nprediction. If not set, Google Cloud ML will pick the runtime version used\nduring the CreateVersion request for this model version, or choose the\nlatest stable version when model version information is not available\nsuch as when the model is specified by uri.", + "type": "string" + }, "batchSize": { "format": "int64", "description": "Optional. Number of records per batch, defaults to 64.\nThe service will buffer batch_size number of records in memory before\ninvoking one Tensorflow prediction call internally. So take the record\nsize and memory available into consideration when setting this parameter.", "type": "string" }, - "runtimeVersion": { - "description": "Optional. The Google Cloud ML runtime version to use for this batch\nprediction. If not set, Google Cloud ML will pick the runtime version used\nduring the CreateVersion request for this model version, or choose the\nlatest stable version when model version information is not available\nsuch as when the model is specified by uri.", - "type": "string" - }, "inputPaths": { "description": "Required. The Google Cloud Storage location of the input data files.\nMay contain wildcards.", "items": { @@ -968,146 +978,14 @@ "region": { "description": "Required. The Google Compute Engine region to run the prediction job in.", "type": "string" - }, - "versionName": { - "description": "Use this field if you want to specify a version of the model to use. The\nstring is formatted the same way as `model_version`, with the addition\nof the version information:\n\n`\"projects/\u003cvar\u003e[YOUR_PROJECT]\u003c/var\u003e/models/\u003cvar\u003eYOUR_MODEL/versions/\u003cvar\u003e[YOUR_VERSION]\u003c/var\u003e\"`", - "type": "string" - }, - "modelName": { - "description": "Use this field if you want to use the default version for the specified\nmodel. The string must use the following format:\n\n`\"projects/\u003cvar\u003e[YOUR_PROJECT]\u003c/var\u003e/models/\u003cvar\u003e[YOUR_MODEL]\u003c/var\u003e\"`", - "type": "string" - }, - "outputPath": { - "type": "string", - "description": "Required. The output Google Cloud Storage location." } }, - "id": "GoogleCloudMlV1__PredictionInput" - }, - "GoogleType__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\"", - "type": "object", - "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": { - "type": "string", - "description": "An optional string indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file." - }, - "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" - } - }, - "id": "GoogleType__Expr" - }, - "GoogleCloudMlV1__OperationMetadata": { - "description": "Represents the metadata of the long-running operation.\n\nNext ID: 9", - "type": "object", - "properties": { - "version": { - "$ref": "GoogleCloudMlV1__Version", - "description": "Contains the version associated with the operation." - }, - "endTime": { - "format": "google-datetime", - "description": "The time operation processing completed.", - "type": "string" - }, - "operationType": { - "enum": [ - "OPERATION_TYPE_UNSPECIFIED", - "CREATE_VERSION", - "DELETE_VERSION", - "DELETE_MODEL" - ], - "description": "The operation type.", - "type": "string", - "enumDescriptions": [ - "Unspecified operation type.", - "An operation to create a new version.", - "An operation to delete an existing version.", - "An operation to delete an existing model." - ] - }, - "startTime": { - "format": "google-datetime", - "description": "The time operation processing started.", - "type": "string" - }, - "isCancellationRequested": { - "description": "Indicates whether a request to cancel this operation has been made.", - "type": "boolean" - }, - "createTime": { - "format": "google-datetime", - "description": "The time the operation was submitted.", - "type": "string" - }, - "modelName": { - "description": "Contains the name of the model associated with the operation.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1__OperationMetadata" - }, - "GoogleCloudMlV1beta1__OperationMetadata": { - "description": "Represents the metadata of the long-running operation.\n\nNext ID: 9", - "type": "object", - "properties": { - "isCancellationRequested": { - "description": "Indicates whether a request to cancel this operation has been made.", - "type": "boolean" - }, - "createTime": { - "type": "string", - "format": "google-datetime", - "description": "The time the operation was submitted." - }, - "modelName": { - "description": "Contains the name of the model associated with the operation.", - "type": "string" - }, - "version": { - "$ref": "GoogleCloudMlV1beta1__Version", - "description": "Contains the version associated with the operation." - }, - "endTime": { - "type": "string", - "format": "google-datetime", - "description": "The time operation processing completed." - }, - "operationType": { - "enumDescriptions": [ - "Unspecified operation type.", - "An operation to create a new version.", - "An operation to delete an existing version.", - "An operation to delete an existing model." - ], - "enum": [ - "OPERATION_TYPE_UNSPECIFIED", - "CREATE_VERSION", - "DELETE_VERSION", - "DELETE_MODEL" - ], - "description": "The operation type.", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "The time operation processing started.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1beta1__OperationMetadata" + "id": "GoogleCloudMlV1__PredictionInput", + "description": "Represents input parameters for a prediction job.", + "type": "object" }, "GoogleIamV1__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.", "type": "object", "properties": { "exemptedMembers": { @@ -1134,8 +1012,84 @@ "type": "string" } }, - "id": "GoogleIamV1__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": "GoogleIamV1__AuditLogConfig" + }, + "GoogleCloudMlV1__OperationMetadata": { + "properties": { + "modelName": { + "description": "Contains the name of the model associated with the operation.", + "type": "string" + }, + "version": { + "$ref": "GoogleCloudMlV1__Version", + "description": "Contains the version associated with the operation." + }, + "endTime": { + "format": "google-datetime", + "description": "The time operation processing completed.", + "type": "string" + }, + "operationType": { + "enum": [ + "OPERATION_TYPE_UNSPECIFIED", + "CREATE_VERSION", + "DELETE_VERSION", + "DELETE_MODEL", + "UPDATE_MODEL", + "UPDATE_VERSION" + ], + "description": "The operation type.", + "type": "string", + "enumDescriptions": [ + "Unspecified operation type.", + "An operation to create a new version.", + "An operation to delete an existing version.", + "An operation to delete an existing model.", + "An operation to update an existing model.", + "An operation to update an existing version." + ] + }, + "startTime": { + "format": "google-datetime", + "description": "The time operation processing started.", + "type": "string" + }, + "isCancellationRequested": { + "description": "Indicates whether a request to cancel this operation has been made.", + "type": "boolean" + }, + "createTime": { + "format": "google-datetime", + "description": "The time the operation was submitted.", + "type": "string" + } + }, + "id": "GoogleCloudMlV1__OperationMetadata", + "description": "Represents the metadata of the long-running operation.\n\nNext ID: 9", + "type": "object" + }, + "GoogleType__Expr": { + "properties": { + "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": { + "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" + } + }, + "id": "GoogleType__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\"", + "type": "object" }, "GoogleCloudMlV1__HyperparameterSpec": { "description": "Represents a set of hyperparameters to optimize.", @@ -1163,24 +1117,23 @@ "type": "string" }, "goal": { + "enumDescriptions": [ + "Goal Type will default to maximize.", + "Maximize the goal metric.", + "Minimize the goal metric." + ], "enum": [ "GOAL_TYPE_UNSPECIFIED", "MAXIMIZE", "MINIMIZE" ], "description": "Required. The type of goal to use for tuning. Available types are\n`MAXIMIZE` and `MINIMIZE`.\n\nDefaults to `MAXIMIZE`.", - "type": "string", - "enumDescriptions": [ - "Goal Type will default to maximize.", - "Maximize the goal metric.", - "Minimize the goal metric." - ] + "type": "string" } }, "id": "GoogleCloudMlV1__HyperparameterSpec" }, "GoogleCloudMlV1__ListJobsResponse": { - "id": "GoogleCloudMlV1__ListJobsResponse", "description": "Response message for the ListJobs method.", "type": "object", "properties": { @@ -1195,18 +1148,21 @@ "description": "Optional. Pass this token as the `page_token` field of the request for a\nsubsequent call.", "type": "string" } - } + }, + "id": "GoogleCloudMlV1__ListJobsResponse" }, "GoogleCloudMlV1__SetDefaultVersionRequest": { - "id": "GoogleCloudMlV1__SetDefaultVersionRequest", "description": "Request message for the SetDefaultVersion request.", "type": "object", - "properties": {} + "properties": {}, + "id": "GoogleCloudMlV1__SetDefaultVersionRequest" }, "GoogleLongrunning__Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, "response": { "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", @@ -1224,48 +1180,24 @@ "description": "The error result of the operation in case of failure or cancellation." }, "metadata": { - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - } - }, - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object" } }, - "id": "GoogleLongrunning__Operation" - }, - "GoogleIamV1__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\nAuditConfig 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.", - "type": "object", - "properties": { - "exemptedMembers": { - "items": { - "type": "string" - }, - "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" - }, - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.\nNext ID: 4", - "items": { - "$ref": "GoogleIamV1__AuditLogConfig" - }, - "type": "array" - } - }, - "id": "GoogleIamV1__AuditConfig" + "id": "GoogleLongrunning__Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object" }, "GoogleCloudMlV1__Model": { - "description": "Represents a machine learning solution.\n\nA model can have multiple versions, each of which is a deployed, trained\nmodel ready to receive prediction requests. The model itself is just a\ncontainer.\n\nNext ID: 8", - "type": "object", "properties": { + "defaultVersion": { + "description": "Output only. The default version of the model. This version will be used to\nhandle prediction requests that do not specify a version.\n\nYou can change the default version by calling\n[projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault).", + "$ref": "GoogleCloudMlV1__Version" + }, "regions": { "description": "Optional. The list of regions where the model is going to be deployed.\nCurrently only one region per model is supported.\nDefaults to 'us-central1' if nothing is set.\nNote:\n* No matter where a model is deployed, it can always be accessed by\n users from anywhere, both for online and batch prediction.\n* The region for a batch prediction job is set by the region field when\n submitting the batch prediction job and does not take its value from\n this field.", "items": { @@ -1282,21 +1214,43 @@ "type": "string" }, "onlinePredictionLogging": { - "type": "boolean", - "description": "Optional. If true, enables StackDriver Logging for online prediction.\nDefault is false." - }, - "defaultVersion": { - "$ref": "GoogleCloudMlV1__Version", - "description": "Output only. The default version of the model. This version will be used to\nhandle prediction requests that do not specify a version.\n\nYou can change the default version by calling\n[projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault)." + "description": "Optional. If true, enables StackDriver Logging for online prediction.\nDefault is false.", + "type": "boolean" } }, - "id": "GoogleCloudMlV1__Model" + "id": "GoogleCloudMlV1__Model", + "description": "Represents a machine learning solution.\n\nA model can have multiple versions, each of which is a deployed, trained\nmodel ready to receive prediction requests. The model itself is just a\ncontainer.\n\nNext ID: 8", + "type": "object" + }, + "GoogleIamV1__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\nAuditConfig 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.", + "type": "object", + "properties": { + "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" + }, + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.\nNext ID: 4", + "items": { + "$ref": "GoogleIamV1__AuditLogConfig" + }, + "type": "array" + }, + "exemptedMembers": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "GoogleIamV1__AuditConfig" }, "GoogleProtobuf__Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", "properties": {}, - "id": "GoogleProtobuf__Empty" + "id": "GoogleProtobuf__Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object" }, "GoogleIamV1__TestIamPermissionsRequest": { "description": "Request message for `TestIamPermissions` method.", @@ -1313,19 +1267,18 @@ "id": "GoogleIamV1__TestIamPermissionsRequest" }, "GoogleCloudMlV1__CancelJobRequest": { - "description": "Request message for the CancelJob method.", - "type": "object", "properties": {}, - "id": "GoogleCloudMlV1__CancelJobRequest" + "id": "GoogleCloudMlV1__CancelJobRequest", + "description": "Request message for the CancelJob method.", + "type": "object" }, "GoogleCloudMlV1__ListVersionsResponse": { - "id": "GoogleCloudMlV1__ListVersionsResponse", "description": "Response message for the ListVersions method.", "type": "object", "properties": { "nextPageToken": { - "type": "string", - "description": "Optional. Pass this token as the `page_token` field of the request for a\nsubsequent call." + "description": "Optional. Pass this token as the `page_token` field of the request for a\nsubsequent call.", + "type": "string" }, "versions": { "description": "The list of versions.", @@ -1334,9 +1287,398 @@ }, "type": "array" } - } + }, + "id": "GoogleCloudMlV1__ListVersionsResponse" }, - "GoogleCloudMlV1beta1__ManualScaling": { + "GoogleCloudMlV1__AutoScaling": { + "properties": { + "minNodes": { + "format": "int32", + "description": "Optional. The minimum number of nodes to allocate for this model. These\nnodes are always up, starting from the time the model is deployed, so the\ncost of operating this model will be at least\n`rate` * `min_nodes` * number of hours since last billing cycle,\nwhere `rate` is the cost per node-hour as documented in\n[pricing](https://cloud.google.com/ml-engine/pricing#prediction_pricing),\neven if no predictions are performed. There is additional cost for each\nprediction performed.\n\nUnlike manual scaling, if the load gets too heavy for the nodes\nthat are up, the service will automatically add nodes to handle the\nincreased load as well as scale back as traffic drops, always maintaining\nat least `min_nodes`. You will be charged for the time in which additional\nnodes are used.\n\nIf not specified, `min_nodes` defaults to 0, in which case, when traffic\nto a model stops (and after a cool-down period), nodes will be shut down\nand no charges will be incurred until traffic to the model resumes.", + "type": "integer" + } + }, + "id": "GoogleCloudMlV1__AutoScaling", + "description": "Options for automatically scaling a model.", + "type": "object" + }, + "GoogleRpc__Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "GoogleRpc__Status" + }, + "GoogleCloudMlV1__ListModelsResponse": { + "description": "Response message for the ListModels method.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Optional. Pass this token as the `page_token` field of the request for a\nsubsequent call.", + "type": "string" + }, + "models": { + "description": "The list of models.", + "items": { + "$ref": "GoogleCloudMlV1__Model" + }, + "type": "array" + } + }, + "id": "GoogleCloudMlV1__ListModelsResponse" + }, + "GoogleCloudMlV1__TrainingInput": { + "description": "Represents input parameters for a training job.", + "type": "object", + "properties": { + "workerCount": { + "format": "int64", + "description": "Optional. The number of worker replicas to use for the training job. Each\nreplica in the cluster will be of the type specified in `worker_type`.\n\nThis value can only be used when `scale_tier` is set to `CUSTOM`. If you\nset this value, you must also set `worker_type`.", + "type": "string" + }, + "masterType": { + "description": "Optional. Specifies the type of virtual machine to use for your training\njob's master worker.\n\nThe following types are supported:\n\n\u003cdl\u003e\n \u003cdt\u003estandard\u003c/dt\u003e\n \u003cdd\u003e\n A basic machine configuration suitable for training simple models with\n small to moderate datasets.\n \u003c/dd\u003e\n \u003cdt\u003elarge_model\u003c/dt\u003e\n \u003cdd\u003e\n A machine with a lot of memory, specially suited for parameter servers\n when your model is large (having many hidden layers or layers with very\n large numbers of nodes).\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_s\u003c/dt\u003e\n \u003cdd\u003e\n A machine suitable for the master and workers of the cluster when your\n model requires more computation than the standard machine can handle\n satisfactorily.\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_m\u003c/dt\u003e\n \u003cdd\u003e\n A machine with roughly twice the number of cores and roughly double the\n memory of \u003ccode suppresswarning=\"true\"\u003ecomplex_model_s\u003c/code\u003e.\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_l\u003c/dt\u003e\n \u003cdd\u003e\n A machine with roughly twice the number of cores and roughly double the\n memory of \u003ccode suppresswarning=\"true\"\u003ecomplex_model_m\u003c/code\u003e.\n \u003c/dd\u003e\n \u003cdt\u003estandard_gpu\u003c/dt\u003e\n \u003cdd\u003e\n A machine equivalent to \u003ccode suppresswarning=\"true\"\u003estandard\u003c/code\u003e that\n also includes a\n \u003ca href=\"/ml-engine/docs/how-tos/using-gpus\"\u003e\n GPU that you can use in your trainer\u003c/a\u003e.\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_m_gpu\u003c/dt\u003e\n \u003cdd\u003e\n A machine equivalent to\n \u003ccode suppresswarning=\"true\"\u003ecomplex_model_m\u003c/code\u003e that also includes\n four GPUs.\n \u003c/dd\u003e\n\u003c/dl\u003e\n\nYou must set this value when `scaleTier` is set to `CUSTOM`.", + "type": "string" + }, + "runtimeVersion": { + "description": "Optional. The Google Cloud ML runtime version to use for training. If not\nset, Google Cloud ML will choose the latest stable version.", + "type": "string" + }, + "pythonModule": { + "description": "Required. The Python module name to run after installing the packages.", + "type": "string" + }, + "region": { + "description": "Required. The Google Compute Engine region to run the training job in.", + "type": "string" + }, + "args": { + "description": "Optional. Command line arguments to pass to the program.", + "items": { + "type": "string" + }, + "type": "array" + }, + "workerType": { + "description": "Optional. Specifies the type of virtual machine to use for your training\njob's worker nodes.\n\nThe supported values are the same as those described in the entry for\n`masterType`.\n\nThis value must be present when `scaleTier` is set to `CUSTOM` and\n`workerCount` is greater than zero.", + "type": "string" + }, + "parameterServerType": { + "description": "Optional. Specifies the type of virtual machine to use for your training\njob's parameter server.\n\nThe supported values are the same as those described in the entry for\n`master_type`.\n\nThis value must be present when `scaleTier` is set to `CUSTOM` and\n`parameter_server_count` is greater than zero.", + "type": "string" + }, + "scaleTier": { + "enumDescriptions": [ + "A single worker instance. This tier is suitable for learning how to use\nCloud ML, and for experimenting with new models using small datasets.", + "Many workers and a few parameter servers.", + "A large number of workers with many parameter servers.", + "A single worker instance [with a\nGPU](/ml-engine/docs/how-tos/using-gpus).", + "The CUSTOM tier is not a set tier, but rather enables you to use your\nown cluster specification. When you use this tier, set values to\nconfigure your processing cluster according to these guidelines:\n\n* You _must_ set `TrainingInput.masterType` to specify the type\n of machine to use for your master node. This is the only required\n setting.\n\n* You _may_ set `TrainingInput.workerCount` to specify the number of\n workers to use. If you specify one or more workers, you _must_ also\n set `TrainingInput.workerType` to specify the type of machine to use\n for your worker nodes.\n\n* You _may_ set `TrainingInput.parameterServerCount` to specify the\n number of parameter servers to use. If you specify one or more\n parameter servers, you _must_ also set\n `TrainingInput.parameterServerType` to specify the type of machine to\n use for your parameter servers.\n\nNote that all of your workers must use the same machine type, which can\nbe different from your parameter server type and master type. Your\nparameter servers must likewise use the same machine type, which can be\ndifferent from your worker type and master type." + ], + "enum": [ + "BASIC", + "STANDARD_1", + "PREMIUM_1", + "BASIC_GPU", + "CUSTOM" + ], + "description": "Required. Specifies the machine types, the number of replicas for workers\nand parameter servers.", + "type": "string" + }, + "jobDir": { + "description": "Optional. A Google Cloud Storage path in which to store training outputs\nand other data needed for training. This path is passed to your TensorFlow\nprogram as the 'job_dir' command-line argument. The benefit of specifying\nthis field is that Cloud ML validates the path for use in training.", + "type": "string" + }, + "hyperparameters": { + "description": "Optional. The set of Hyperparameters to tune.", + "$ref": "GoogleCloudMlV1__HyperparameterSpec" + }, + "parameterServerCount": { + "format": "int64", + "description": "Optional. The number of parameter server replicas to use for the training\njob. Each replica in the cluster will be of the type specified in\n`parameter_server_type`.\n\nThis value can only be used when `scale_tier` is set to `CUSTOM`.If you\nset this value, you must also set `parameter_server_type`.", + "type": "string" + }, + "packageUris": { + "description": "Required. The Google Cloud Storage location of the packages with\nthe training program and any additional dependencies.\nThe maximum number of package URIs is 100.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "GoogleCloudMlV1__TrainingInput" + }, + "GoogleCloudMlV1__Job": { + "properties": { + "predictionInput": { + "$ref": "GoogleCloudMlV1__PredictionInput", + "description": "Input parameters to create a prediction job." + }, + "state": { + "enum": [ + "STATE_UNSPECIFIED", + "QUEUED", + "PREPARING", + "RUNNING", + "SUCCEEDED", + "FAILED", + "CANCELLING", + "CANCELLED" + ], + "description": "Output only. The detailed state of a job.", + "type": "string", + "enumDescriptions": [ + "The job state is unspecified.", + "The job has been just created and processing has not yet begun.", + "The service is preparing to run the job.", + "The job is in progress.", + "The job completed successfully.", + "The job failed.\n`error_message` should contain the details of the failure.", + "The job is being cancelled.\n`error_message` should describe the reason for the cancellation.", + "The job has been cancelled.\n`error_message` should describe the reason for the cancellation." + ] + }, + "jobId": { + "description": "Required. The user-specified id of the job.", + "type": "string" + }, + "errorMessage": { + "description": "Output only. The details of a failure or a cancellation.", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Output only. When the job processing was completed.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "Output only. When the job processing was started.", + "type": "string" + }, + "predictionOutput": { + "description": "The current prediction job result.", + "$ref": "GoogleCloudMlV1__PredictionOutput" + }, + "trainingOutput": { + "$ref": "GoogleCloudMlV1__TrainingOutput", + "description": "The current training job result." + }, + "trainingInput": { + "description": "Input parameters to create a training job.", + "$ref": "GoogleCloudMlV1__TrainingInput" + }, + "createTime": { + "format": "google-datetime", + "description": "Output only. When the job was created.", + "type": "string" + } + }, + "id": "GoogleCloudMlV1__Job", + "description": "Represents a training or prediction job.\n\nNext ID: 16", + "type": "object" + }, + "GoogleApi__HttpBody": { + "properties": { + "extensions": { + "description": "Application specific response metadata. Must be set in the first response\nfor streaming APIs.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "data": { + "format": "byte", + "description": "HTTP body binary data.", + "type": "string" + }, + "contentType": { + "description": "The HTTP Content-Type string representing the content type of the body.", + "type": "string" + } + }, + "id": "GoogleApi__HttpBody", + "description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n message GetResourceRequest {\n // A unique request id.\n string request_id = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty);\n }\n\nExample with streaming methods:\n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged.", + "type": "object" + }, + "GoogleCloudMlV1__GetConfigResponse": { + "description": "Returns service account information associated with a project.", + "type": "object", + "properties": { + "serviceAccountProject": { + "format": "int64", + "description": "The project number for `service_account`.", + "type": "string" + }, + "serviceAccount": { + "description": "The service account Cloud ML uses to access resources in the project.", + "type": "string" + } + }, + "id": "GoogleCloudMlV1__GetConfigResponse" + }, + "GoogleIamV1__TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "GoogleIamV1__TestIamPermissionsResponse" + }, + "GoogleIamV1__SetIamPolicyRequest": { + "properties": { + "policy": { + "$ref": "GoogleIamV1__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": { + "format": "google-fieldmask", + "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.", + "type": "string" + } + }, + "id": "GoogleIamV1__SetIamPolicyRequest", + "description": "Request message for `SetIamPolicy` method.", + "type": "object" + }, + "GoogleCloudMlV1__HyperparameterOutput": { + "properties": { + "finalMetric": { + "$ref": "GoogleCloudMlV1_HyperparameterOutput_HyperparameterMetric", + "description": "The final objective metric seen for this trial." + }, + "hyperparameters": { + "additionalProperties": { + "type": "string" + }, + "description": "The hyperparameters given to this trial.", + "type": "object" + }, + "trialId": { + "description": "The trial id for these results.", + "type": "string" + }, + "allMetrics": { + "description": "All recorded object metrics for this trial.", + "items": { + "$ref": "GoogleCloudMlV1_HyperparameterOutput_HyperparameterMetric" + }, + "type": "array" + } + }, + "id": "GoogleCloudMlV1__HyperparameterOutput", + "description": "Represents the result of a single hyperparameter tuning trial from a\ntraining job. The TrainingOutput object that is returned on successful\ncompletion of a training job with hyperparameter tuning includes a list\nof HyperparameterOutput objects, one for each successful trial.", + "type": "object" + }, + "GoogleCloudMlV1__PredictionOutput": { + "properties": { + "predictionCount": { + "format": "int64", + "description": "The number of generated predictions.", + "type": "string" + }, + "errorCount": { + "format": "int64", + "description": "The number of data instances which resulted in errors.", + "type": "string" + }, + "nodeHours": { + "format": "double", + "description": "Node hours used by the batch prediction job.", + "type": "number" + }, + "outputPath": { + "description": "The output Google Cloud Storage location provided at the job creation time.", + "type": "string" + } + }, + "id": "GoogleCloudMlV1__PredictionOutput", + "description": "Represents results of a prediction job.", + "type": "object" + }, + "GoogleIamV1__Policy": { + "properties": { + "etag": { + "format": "byte", + "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.", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" + }, + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "GoogleIamV1__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": "GoogleIamV1__Binding" + }, + "type": "array" + }, + "iamOwned": { + "type": "boolean" + } + }, + "id": "GoogleIamV1__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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object" + }, + "GoogleLongrunning__ListOperationsResponse": { + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "GoogleLongrunning__Operation" + }, + "type": "array" + } + }, + "id": "GoogleLongrunning__ListOperationsResponse", + "description": "The response message for Operations.ListOperations.", + "type": "object" + }, + "GoogleCloudMlV1__ManualScaling": { "description": "Options for manually scaling a model.", "type": "object", "properties": { @@ -1346,776 +1688,157 @@ "type": "integer" } }, - "id": "GoogleCloudMlV1beta1__ManualScaling" + "id": "GoogleCloudMlV1__ManualScaling" + }, + "GoogleCloudMlV1__TrainingOutput": { + "properties": { + "completedTrialCount": { + "format": "int64", + "description": "The number of hyperparameter tuning trials that completed successfully.\nOnly set for hyperparameter tuning jobs.", + "type": "string" + }, + "isHyperparameterTuningJob": { + "description": "Whether this job is a hyperparameter tuning job.", + "type": "boolean" + }, + "consumedMLUnits": { + "format": "double", + "description": "The amount of ML units consumed by the job.", + "type": "number" + }, + "trials": { + "description": "Results for individual Hyperparameter trials.\nOnly set for hyperparameter tuning jobs.", + "items": { + "$ref": "GoogleCloudMlV1__HyperparameterOutput" + }, + "type": "array" + } + }, + "id": "GoogleCloudMlV1__TrainingOutput", + "description": "Represents results of a training job. Output only.", + "type": "object" + }, + "GoogleIamV1__Binding": { + "properties": { + "condition": { + "description": "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.\nThis field is GOOGLE_INTERNAL.", + "$ref": "GoogleType__Expr" + }, + "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` or `joe@example.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`.\nRequired", + "type": "string" + } + }, + "id": "GoogleIamV1__Binding", + "description": "Associates `members` with a `role`.", + "type": "object" + }, + "GoogleCloudMlV1__PredictRequest": { + "description": "Request for predictions to be issued against a trained model.\n\nThe body of the request is a single JSON object with a single top-level\nfield:\n\n\u003cdl\u003e\n \u003cdt\u003einstances\u003c/dt\u003e\n \u003cdd\u003eA JSON array containing values representing the instances to use for\n prediction.\u003c/dd\u003e\n\u003c/dl\u003e\n\nThe structure of each element of the instances list is determined by your\nmodel's input definition. Instances can include named inputs or can contain\nonly unlabeled values.\n\nNot all data includes named inputs. Some instances will be simple\nJSON values (boolean, number, or string). However, instances are often lists\nof simple values, or complex nested lists. Here are some examples of request\nbodies:\n\nCSV data with each row encoded as a string value:\n\u003cpre\u003e\n{\"instances\": [\"1.0,true,\\\\\"x\\\\\"\", \"-2.0,false,\\\\\"y\\\\\"\"]}\n\u003c/pre\u003e\nPlain text:\n\u003cpre\u003e\n{\"instances\": [\"the quick brown fox\", \"la bruja le dio\"]}\n\u003c/pre\u003e\nSentences encoded as lists of words (vectors of strings):\n\u003cpre\u003e\n{\n \"instances\": [\n [\"the\",\"quick\",\"brown\"],\n [\"la\",\"bruja\",\"le\"],\n ...\n ]\n}\n\u003c/pre\u003e\nFloating point scalar values:\n\u003cpre\u003e\n{\"instances\": [0.0, 1.1, 2.2]}\n\u003c/pre\u003e\nVectors of integers:\n\u003cpre\u003e\n{\n \"instances\": [\n [0, 1, 2],\n [3, 4, 5],\n ...\n ]\n}\n\u003c/pre\u003e\nTensors (in this case, two-dimensional tensors):\n\u003cpre\u003e\n{\n \"instances\": [\n [\n [0, 1, 2],\n [3, 4, 5]\n ],\n ...\n ]\n}\n\u003c/pre\u003e\nImages can be represented different ways. In this encoding scheme the first\ntwo dimensions represent the rows and columns of the image, and the third\ncontains lists (vectors) of the R, G, and B values for each pixel.\n\u003cpre\u003e\n{\n \"instances\": [\n [\n [\n [138, 30, 66],\n [130, 20, 56],\n ...\n ],\n [\n [126, 38, 61],\n [122, 24, 57],\n ...\n ],\n ...\n ],\n ...\n ]\n}\n\u003c/pre\u003e\nJSON strings must be encoded as UTF-8. To send binary data, you must\nbase64-encode the data and mark it as binary. To mark a JSON string\nas binary, replace it with a JSON object with a single attribute named `b64`:\n\u003cpre\u003e{\"b64\": \"...\"} \u003c/pre\u003e\nFor example:\n\nTwo Serialized tf.Examples (fake data, for illustrative purposes only):\n\u003cpre\u003e\n{\"instances\": [{\"b64\": \"X5ad6u\"}, {\"b64\": \"IA9j4nx\"}]}\n\u003c/pre\u003e\nTwo JPEG image byte strings (fake data, for illustrative purposes only):\n\u003cpre\u003e\n{\"instances\": [{\"b64\": \"ASa8asdf\"}, {\"b64\": \"JLK7ljk3\"}]}\n\u003c/pre\u003e\nIf your data includes named references, format each instance as a JSON object\nwith the named references as the keys:\n\nJSON input data to be preprocessed:\n\u003cpre\u003e\n{\n \"instances\": [\n {\n \"a\": 1.0,\n \"b\": true,\n \"c\": \"x\"\n },\n {\n \"a\": -2.0,\n \"b\": false,\n \"c\": \"y\"\n }\n ]\n}\n\u003c/pre\u003e\nSome models have an underlying TensorFlow graph that accepts multiple input\ntensors. In this case, you should use the names of JSON name/value pairs to\nidentify the input tensors, as shown in the following exmaples:\n\nFor a graph with input tensor aliases \"tag\" (string) and \"image\"\n(base64-encoded string):\n\u003cpre\u003e\n{\n \"instances\": [\n {\n \"tag\": \"beach\",\n \"image\": {\"b64\": \"ASa8asdf\"}\n },\n {\n \"tag\": \"car\",\n \"image\": {\"b64\": \"JLK7ljk3\"}\n }\n ]\n}\n\u003c/pre\u003e\nFor a graph with input tensor aliases \"tag\" (string) and \"image\"\n(3-dimensional array of 8-bit ints):\n\u003cpre\u003e\n{\n \"instances\": [\n {\n \"tag\": \"beach\",\n \"image\": [\n [\n [138, 30, 66],\n [130, 20, 56],\n ...\n ],\n [\n [126, 38, 61],\n [122, 24, 57],\n ...\n ],\n ...\n ]\n },\n {\n \"tag\": \"car\",\n \"image\": [\n [\n [255, 0, 102],\n [255, 0, 97],\n ...\n ],\n [\n [254, 1, 101],\n [254, 2, 93],\n ...\n ],\n ...\n ]\n },\n ...\n ]\n}\n\u003c/pre\u003e\nIf the call is successful, the response body will contain one prediction\nentry per instance in the request body. If prediction fails for any\ninstance, the response body will contain no predictions and will contian\na single error entry instead.", + "type": "object", + "properties": { + "httpBody": { + "$ref": "GoogleApi__HttpBody", + "description": "\nRequired. The prediction request body." + } + }, + "id": "GoogleCloudMlV1__PredictRequest" + }, + "GoogleCloudMlV1_HyperparameterOutput_HyperparameterMetric": { + "properties": { + "trainingStep": { + "format": "int64", + "description": "The global training step for this metric.", + "type": "string" + }, + "objectiveValue": { + "format": "double", + "description": "The objective value at this training step.", + "type": "number" + } + }, + "id": "GoogleCloudMlV1_HyperparameterOutput_HyperparameterMetric", + "description": "An observed value of a metric.", + "type": "object" + }, + "GoogleCloudMlV1__Version": { + "description": "Represents a version of the model.\n\nEach version is a trained model deployed in the cloud, ready to handle\nprediction requests. A model can have multiple versions. You can get\ninformation about all of the versions of a given model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).\n\nNext ID: 18\nLINT.IfChange", + "type": "object", + "properties": { + "runtimeVersion": { + "description": "Optional. The Google Cloud ML runtime version to use for this deployment.\nIf not set, Google Cloud ML will choose a version.", + "type": "string" + }, + "lastUseTime": { + "format": "google-datetime", + "description": "Output only. The time the version was last used for prediction.", + "type": "string" + }, + "description": { + "description": "Optional. The description specified for the version when it was created.", + "type": "string" + }, + "deploymentUri": { + "description": "Required. The Google Cloud Storage location of the trained model used to\ncreate the version. See the\n[overview of model\ndeployment](/ml-engine/docs/concepts/deployment-overview) for more\ninformation.\n\nWhen passing Version to\n[projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create)\nthe model service uses the specified location as the source of the model.\nOnce deployed, the model version is hosted by the prediction service, so\nthis location is useful only as a historical record.\nThe total number of model files can't exceed 1000.", + "type": "string" + }, + "isDefault": { + "description": "Output only. If true, this version will be used to handle prediction\nrequests that do not specify a version.\n\nYou can change the default version by calling\n[projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault).", + "type": "boolean" + }, + "autoScaling": { + "description": "Automatically scale the number of nodes used to serve the model in\nresponse to increases and decreases in traffic. Care should be\ntaken to ramp up traffic according to the model's ability to scale\nor you will start seeing increases in latency and 429 response codes.", + "$ref": "GoogleCloudMlV1__AutoScaling" + }, + "createTime": { + "format": "google-datetime", + "description": "Output only. The time the version was created.", + "type": "string" + }, + "manualScaling": { + "description": "Manually select the number of nodes to use for serving the\nmodel. You should generally use `auto_scaling` with an appropriate\n`min_nodes` instead, but this option is available if you want more\npredictable billing. Beware that latency and error rates will increase\nif the traffic exceeds that capability of the system to serve it based\non the selected number of nodes.", + "$ref": "GoogleCloudMlV1__ManualScaling" + }, + "state": { + "enumDescriptions": [ + "The version state is unspecified.", + "The version is ready for prediction.", + "The version is in the process of creation.", + "The version failed to be created, possibly cancelled.\n`error_message` should contain the details of the failure.", + "The version is in the process of deletion." + ], + "enum": [ + "UNKNOWN", + "READY", + "CREATING", + "FAILED", + "DELETING" + ], + "description": "Output only. The state of a version.", + "type": "string" + }, + "name": { + "description": "Required.The name specified for the version when it was created.\n\nThe version name must be unique within the model it is created in.", + "type": "string" + }, + "errorMessage": { + "description": "Output only. The details of a failure or a cancellation.", + "type": "string" + } + }, + "id": "GoogleCloudMlV1__Version" } }, - "protocol": "rest", "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "canonicalName": "Cloud Machine Learning Engine", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "rootUrl": "https://ml.googleapis.com/", - "ownerDomain": "google.com", - "name": "ml", - "batchPath": "batch", - "title": "Google Cloud Machine Learning Engine", - "ownerName": "Google", - "resources": { - "projects": { - "methods": { - "getConfig": { - "path": "v1/{+name}:getConfig", - "id": "ml.projects.getConfig", - "description": "Get the service account information associated with your project. You need\nthis information in order to grant the service account persmissions for\nthe Google Cloud Storage location where you put your model training code\nfor training the model with Google Cloud Machine Learning.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "GoogleCloudMlV1__GetConfigResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "Required. The project name.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}:getConfig" - }, - "predict": { - "id": "ml.projects.predict", - "path": "v1/{+name}:predict", - "description": "Performs prediction on the data in the request.\n\n**** REMOVE FROM GENERATED DOCUMENTATION", - "request": { - "$ref": "GoogleCloudMlV1__PredictRequest" - }, - "response": { - "$ref": "GoogleApi__HttpBody" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "pattern": "^projects/.+$", - "location": "path", - "description": "Required. The resource name of a model or a version.\n\nAuthorization: requires the `predict` permission on the specified resource.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}:predict" - } - }, - "resources": { - "models": { - "methods": { - "getIamPolicy": { - "response": { - "$ref": "GoogleIamV1__Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/models/{modelsId}:getIamPolicy", - "id": "ml.projects.models.getIamPolicy", - "path": "v1/{+resource}: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." - }, - "get": { - "response": { - "$ref": "GoogleCloudMlV1__Model" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "Required. The name of the model.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/models/{modelsId}", - "id": "ml.projects.models.get", - "path": "v1/{+name}", - "description": "Gets information about a model, including its name, the description (if\nset), and the default version (if at least one version of the model has\nbeen deployed)." - }, - "testIamPermissions": { - "response": { - "$ref": "GoogleIamV1__TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "resource": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$", - "location": "path", - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field." - } - }, - "flatPath": "v1/projects/{projectsId}/models/{modelsId}:testIamPermissions", - "id": "ml.projects.models.testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "GoogleIamV1__TestIamPermissionsRequest" - }, - "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." - }, - "delete": { - "flatPath": "v1/projects/{projectsId}/models/{modelsId}", - "id": "ml.projects.models.delete", - "path": "v1/{+name}", - "description": "Deletes a model.\n\nYou can only delete a model if there are no versions in it. You can delete\nversions by calling\n[projects.models.versions.delete](/ml-engine/reference/rest/v1/projects.models.versions/delete).", - "response": { - "$ref": "GoogleLongrunning__Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$", - "location": "path", - "description": "Required. The name of the model." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists the models in a project.\n\nEach project can contain multiple models, and each model can have multiple\nversions.", - "response": { - "$ref": "GoogleCloudMlV1__ListModelsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "pageSize": { - "format": "int32", - "description": "Optional. The number of models to retrieve per \"page\" of results. If there\nare more remaining results than this number, the response message will\ncontain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", - "type": "integer", - "location": "query" - }, - "parent": { - "location": "path", - "description": "Required. The name of the project whose models are to be listed.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - }, - "pageToken": { - "location": "query", - "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", - "type": "string" - } - }, - "flatPath": "v1/projects/{projectsId}/models", - "id": "ml.projects.models.list", - "path": "v1/{+parent}/models" - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "GoogleCloudMlV1__Model" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "location": "path", - "description": "Required. The project name.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/models", - "path": "v1/{+parent}/models", - "id": "ml.projects.models.create", - "request": { - "$ref": "GoogleCloudMlV1__Model" - }, - "description": "Creates a model which will later contain one or more versions.\n\nYou must add at least one version before you can request predictions from\nthe model. Add versions by calling\n[projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create)." - }, - "setIamPolicy": { - "request": { - "$ref": "GoogleIamV1__SetIamPolicyRequest" - }, - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "response": { - "$ref": "GoogleIamV1__Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/models/{modelsId}:setIamPolicy", - "id": "ml.projects.models.setIamPolicy", - "path": "v1/{+resource}:setIamPolicy" - } - }, - "resources": { - "versions": { - "methods": { - "setDefault": { - "request": { - "$ref": "GoogleCloudMlV1__SetDefaultVersionRequest" - }, - "description": "Designates a version to be the default for the model.\n\nThe default version is used for prediction requests made against the model\nthat don't specify a version.\n\nThe first version to be created for a model is automatically set as the\ndefault. You must make any subsequent changes to the default version\nsetting manually using this method.", - "response": { - "$ref": "GoogleCloudMlV1__Version" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "Required. The name of the version to make the default for the model. You\ncan get the names of all the versions of a model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}:setDefault", - "id": "ml.projects.models.versions.setDefault", - "path": "v1/{+name}:setDefault" - }, - "delete": { - "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}", - "path": "v1/{+name}", - "id": "ml.projects.models.versions.delete", - "description": "Deletes a model version.\n\nEach model can have multiple versions deployed and in use at any given\ntime. Use this method to remove a single version.\n\nNote: You cannot delete the version that is set as the default version\nof the model unless it is the only remaining version.", - "httpMethod": "DELETE", - "response": { - "$ref": "GoogleLongrunning__Operation" - }, - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", - "location": "path", - "description": "Required. The name of the version. You can get the names of all the\nversions of a model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "ml.projects.models.versions.get", - "path": "v1/{+name}", - "description": "Gets information about a model version.\n\nModels can have multiple versions. You can call\n[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list)\nto get the same information that this method returns for all of the\nversions of a model.", - "response": { - "$ref": "GoogleCloudMlV1__Version" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "Required. The name of the version.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}" - }, - "list": { - "description": "Gets basic information about all the versions of a model.\n\nIf you expect that a model has a lot of versions, or if you need to handle\nonly a limited number of results at a time, you can request that the list\nbe retrieved in batches (called pages):", - "response": { - "$ref": "GoogleCloudMlV1__ListVersionsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Optional. The number of versions to retrieve per \"page\" of results. If\nthere are more remaining results than this number, the response message\nwill contain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", - "type": "integer", - "location": "query" - }, - "parent": { - "location": "path", - "description": "Required. The name of the model for which to list the version.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions", - "id": "ml.projects.models.versions.list", - "path": "v1/{+parent}/versions" - }, - "create": { - "request": { - "$ref": "GoogleCloudMlV1__Version" - }, - "description": "Creates a new version of a model from a trained TensorFlow model.\n\nIf the version created in the cloud by this call is the first deployed\nversion of the specified model, it will be made the default version of the\nmodel. When you add a version to a model that already has one or more\nversions, the default version does not automatically change. If you want a\nnew version to be the default, you must call\n[projects.models.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault).", - "httpMethod": "POST", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "GoogleLongrunning__Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "location": "path", - "description": "Required. The name of the model.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions", - "path": "v1/{+parent}/versions", - "id": "ml.projects.models.versions.create" - } - } - } - } - }, - "operations": { - "methods": { - "get": { - "response": { - "$ref": "GoogleLongrunning__Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "The name of the operation resource.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/operations/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/operations/{operationsId}", - "id": "ml.projects.operations.get", - "path": "v1/{+name}", - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." - }, - "list": { - "response": { - "$ref": "GoogleLongrunning__ListOperationsResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - }, - "pageToken": { - "location": "query", - "description": "The standard list page token.", - "type": "string" - }, - "name": { - "location": "path", - "description": "The name of the operation's parent resource.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/operations", - "id": "ml.projects.operations.list", - "path": "v1/{+name}/operations", - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id." - }, - "cancel": { - "path": "v1/{+name}:cancel", - "id": "ml.projects.operations.cancel", - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "GoogleProtobuf__Empty" - }, - "parameters": { - "name": { - "pattern": "^projects/[^/]+/operations/[^/]+$", - "location": "path", - "description": "The name of the operation resource to be cancelled.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/operations/{operationsId}:cancel" - }, - "delete": { - "response": { - "$ref": "GoogleProtobuf__Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "The name of the operation resource to be deleted.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/operations/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/operations/{operationsId}", - "id": "ml.projects.operations.delete", - "path": "v1/{+name}", - "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`." - } - } - }, - "jobs": { - "methods": { - "get": { - "httpMethod": "GET", - "response": { - "$ref": "GoogleCloudMlV1__Job" - }, - "parameterOrder": [ - "name" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "Required. The name of the job to get the description of.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/jobs/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/jobs/{jobsId}", - "path": "v1/{+name}", - "id": "ml.projects.jobs.get", - "description": "Describes a job." - }, - "list": { - "description": "Lists the jobs in the project.", - "response": { - "$ref": "GoogleCloudMlV1__ListJobsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional. The number of jobs to retrieve per \"page\" of results. If there\nare more remaining results than this number, the response message will\ncontain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", - "type": "integer" - }, - "parent": { - "location": "path", - "description": "Required. The name of the project for which to list jobs.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - }, - "filter": { - "type": "string", - "location": "query", - "description": "Optional. Specifies the subset of jobs to retrieve." - }, - "pageToken": { - "location": "query", - "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/jobs", - "id": "ml.projects.jobs.list", - "path": "v1/{+parent}/jobs" - }, - "create": { - "response": { - "$ref": "GoogleCloudMlV1__Job" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "parameters": { - "parent": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "Required. The project name.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/jobs", - "id": "ml.projects.jobs.create", - "path": "v1/{+parent}/jobs", - "description": "Creates a training or a batch prediction job.", - "request": { - "$ref": "GoogleCloudMlV1__Job" - } - }, - "cancel": { - "flatPath": "v1/projects/{projectsId}/jobs/{jobsId}:cancel", - "id": "ml.projects.jobs.cancel", - "path": "v1/{+name}:cancel", - "description": "Cancels a running job.", - "request": { - "$ref": "GoogleCloudMlV1__CancelJobRequest" - }, - "response": { - "$ref": "GoogleProtobuf__Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "description": "Required. The name of the job to cancel.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/jobs/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - } - }, - "parameters": { - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "type": "string", - "location": "query", - "description": "OAuth 2.0 token for the current user." - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ] - }, - "alt": { - "type": "string", - "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", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ] - }, - "key": { - "location": "query", - "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.", - "type": "string" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - } - }, - "version": "v1", - "baseUrl": "https://ml.googleapis.com/", - "description": "An API to enable creating and using machine learning models.", - "kind": "discovery#restDescription", - "servicePath": "", - "basePath": "" + "protocol": "rest" } diff --git a/vendor/google.golang.org/api/ml/v1/ml-gen.go b/vendor/google.golang.org/api/ml/v1/ml-gen.go index 760e11d03..eadea977d 100644 --- a/vendor/google.golang.org/api/ml/v1/ml-gen.go +++ b/vendor/google.golang.org/api/ml/v1/ml-gen.go @@ -811,6 +811,8 @@ type GoogleCloudMlV1__OperationMetadata struct { // "CREATE_VERSION" - An operation to create a new version. // "DELETE_VERSION" - An operation to delete an existing version. // "DELETE_MODEL" - An operation to delete an existing model. + // "UPDATE_MODEL" - An operation to update an existing model. + // "UPDATE_VERSION" - An operation to update an existing version. OperationType string `json:"operationType,omitempty"` // StartTime: The time operation processing started. @@ -1640,6 +1642,7 @@ func (s *GoogleCloudMlV1__TrainingOutput) UnmarshalJSON(data []byte) error { // rojects.models.versions/list). // // Next ID: 18 +// LINT.IfChange type GoogleCloudMlV1__Version struct { // AutoScaling: Automatically scale the number of nodes used to serve // the model in @@ -1723,10 +1726,11 @@ type GoogleCloudMlV1__Version struct { // Possible values: // "UNKNOWN" - The version state is unspecified. // "READY" - The version is ready for prediction. - // "CREATING" - The version is still in the process of creation. + // "CREATING" - The version is in the process of creation. // "FAILED" - The version failed to be created, possibly // cancelled. // `error_message` should contain the details of the failure. + // "DELETING" - The version is in the process of deletion. State string `json:"state,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1756,427 +1760,6 @@ func (s *GoogleCloudMlV1__Version) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudMlV1beta1__AutoScaling: Options for automatically scaling -// a model. -type GoogleCloudMlV1beta1__AutoScaling struct { - // MinNodes: Optional. The minimum number of nodes to allocate for this - // model. These - // nodes are always up, starting from the time the model is deployed, so - // the - // cost of operating this model will be at least - // `rate` * `min_nodes` * number of hours since last billing - // cycle, - // where `rate` is the cost per node-hour as documented - // in - // [pricing](https://cloud.google.com/ml-engine/pricing#prediction_pri - // cing), - // even if no predictions are performed. There is additional cost for - // each - // prediction performed. - // - // Unlike manual scaling, if the load gets too heavy for the nodes - // that are up, the service will automatically add nodes to handle - // the - // increased load as well as scale back as traffic drops, always - // maintaining - // at least `min_nodes`. You will be charged for the time in which - // additional - // nodes are used. - // - // If not specified, `min_nodes` defaults to 0, in which case, when - // traffic - // to a model stops (and after a cool-down period), nodes will be shut - // down - // and no charges will be incurred until traffic to the model resumes. - MinNodes int64 `json:"minNodes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MinNodes") 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. "MinNodes") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__AutoScaling) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__AutoScaling - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__ManualScaling: Options for manually scaling a -// model. -type GoogleCloudMlV1beta1__ManualScaling struct { - // Nodes: The number of nodes to allocate for this model. These nodes - // are always up, - // starting from the time the model is deployed, so the cost of - // operating - // this model will be proportional to `nodes` * number of hours - // since - // last billing cycle plus the cost for each prediction performed. - Nodes int64 `json:"nodes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Nodes") 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. "Nodes") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__ManualScaling) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__ManualScaling - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__OperationMetadata: Represents the metadata of -// the long-running operation. -// -// Next ID: 9 -type GoogleCloudMlV1beta1__OperationMetadata struct { - // CreateTime: The time the operation was submitted. - CreateTime string `json:"createTime,omitempty"` - - // EndTime: The time operation processing completed. - EndTime string `json:"endTime,omitempty"` - - // IsCancellationRequested: Indicates whether a request to cancel this - // operation has been made. - IsCancellationRequested bool `json:"isCancellationRequested,omitempty"` - - // ModelName: Contains the name of the model associated with the - // operation. - ModelName string `json:"modelName,omitempty"` - - // OperationType: The operation type. - // - // Possible values: - // "OPERATION_TYPE_UNSPECIFIED" - Unspecified operation type. - // "CREATE_VERSION" - An operation to create a new version. - // "DELETE_VERSION" - An operation to delete an existing version. - // "DELETE_MODEL" - An operation to delete an existing model. - OperationType string `json:"operationType,omitempty"` - - // StartTime: The time operation processing started. - StartTime string `json:"startTime,omitempty"` - - // Version: Contains the version associated with the operation. - Version *GoogleCloudMlV1beta1__Version `json:"version,omitempty"` - - // 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 *GoogleCloudMlV1beta1__OperationMetadata) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__OperationMetadata - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__Version: Represents a version of the -// model. -// -// Each version is a trained model deployed in the cloud, ready to -// handle -// prediction requests. A model can have multiple versions. You can -// get -// information about all of the versions of a given model by -// calling -// [projects.models.versions.list](/ml-engine/reference/rest/v1be -// ta1/projects.models.versions/list). -// -// Next ID: 18 -type GoogleCloudMlV1beta1__Version struct { - // AutoScaling: Automatically scale the number of nodes used to serve - // the model in - // response to increases and decreases in traffic. Care should be - // taken to ramp up traffic according to the model's ability to scale - // or you will start seeing increases in latency and 429 response codes. - AutoScaling *GoogleCloudMlV1beta1__AutoScaling `json:"autoScaling,omitempty"` - - // CreateTime: Output only. The time the version was created. - CreateTime string `json:"createTime,omitempty"` - - // DeploymentUri: Required. The Google Cloud Storage location of the - // trained model used to - // create the version. See the - // [overview of - // model - // deployment](/ml-engine/docs/concepts/deployment-overview) for - // more - // information. - // - // When passing Version - // to - // [projects.models.versions.create](/ml-engine/reference/rest/v1beta1 - // /projects.models.versions/create) - // the model service uses the specified location as the source of the - // model. - // Once deployed, the model version is hosted by the prediction service, - // so - // this location is useful only as a historical record. - // The total number of model files can't exceed 1000. - DeploymentUri string `json:"deploymentUri,omitempty"` - - // Description: Optional. The description specified for the version when - // it was created. - Description string `json:"description,omitempty"` - - // ErrorMessage: Output only. The details of a failure or a - // cancellation. - ErrorMessage string `json:"errorMessage,omitempty"` - - // IsDefault: Output only. If true, this version will be used to handle - // prediction - // requests that do not specify a version. - // - // You can change the default version by - // calling - // [projects.methods.versions.setDefault](/ml-engine/reference/re - // st/v1beta1/projects.models.versions/setDefault). - IsDefault bool `json:"isDefault,omitempty"` - - // LastUseTime: Output only. The time the version was last used for - // prediction. - LastUseTime string `json:"lastUseTime,omitempty"` - - // ManualScaling: Manually select the number of nodes to use for serving - // the - // model. You should generally use `auto_scaling` with an - // appropriate - // `min_nodes` instead, but this option is available if you want - // more - // predictable billing. Beware that latency and error rates will - // increase - // if the traffic exceeds that capability of the system to serve it - // based - // on the selected number of nodes. - ManualScaling *GoogleCloudMlV1beta1__ManualScaling `json:"manualScaling,omitempty"` - - // Name: Required.The name specified for the version when it was - // created. - // - // The version name must be unique within the model it is created in. - Name string `json:"name,omitempty"` - - // RuntimeVersion: Optional. The Google Cloud ML runtime version to use - // for this deployment. - // If not set, Google Cloud ML will choose a version. - RuntimeVersion string `json:"runtimeVersion,omitempty"` - - // State: Output only. The state of a version. - // - // Possible values: - // "UNKNOWN" - The version state is unspecified. - // "READY" - The version is ready for prediction. - // "CREATING" - The version is still in the process of creation. - // "FAILED" - The version failed to be created, possibly - // cancelled. - // `error_message` should contain the details of the failure. - State string `json:"state,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoScaling") 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. "AutoScaling") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__Version) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__Version - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1LogConfigCloudAuditOptions: Write a Cloud Audit log -type GoogleIamV1LogConfigCloudAuditOptions struct { - // LogName: The log_name to populate in the Cloud Audit Record. - // - // Possible values: - // "UNSPECIFIED_LOG_NAME" - Default. Should not be used. - // "ADMIN_ACTIVITY" - Corresponds to - // "cloudaudit.googleapis.com/activity" - // "DATA_ACCESS" - Corresponds to - // "cloudaudit.googleapis.com/data_access" - LogName string `json:"logName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LogName") 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. "LogName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleIamV1LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1LogConfigCloudAuditOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1LogConfigCounterOptions: Increment a streamz counter with -// the specified metric and field names. -// -// Metric 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. -// -// Field names correspond to IAM request parameters and field values -// are -// their respective values. -// -// 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) -// * decrementing the counter -// * incrementing it by anything other than 1 -type GoogleIamV1LogConfigCounterOptions struct { - // Field: The field value to attribute. - Field string `json:"field,omitempty"` - - // Metric: The metric to update. - Metric string `json:"metric,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleIamV1LogConfigCounterOptions) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1LogConfigCounterOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1LogConfigDataAccessOptions: Write a Data Access (Gin) log -type GoogleIamV1LogConfigDataAccessOptions struct { - // LogMode: Whether Gin logging should happen in a fail-closed manner at - // the caller. - // This is relevant only in the LocalIAM implementation, for now. - // - // Possible values: - // "LOG_MODE_UNSPECIFIED" - Client is not required to write a partial - // Gin log immediately after - // the authorization check. If client chooses to write one and it - // fails, - // client may either fail open (allow the operation to continue) or - // fail closed (handle as a DENY outcome). - // "LOG_FAIL_CLOSED" - The application's operation in the context of - // which this authorization - // check is being made may only be performed if it is successfully - // logged - // to Gin. For instance, the authorization library may satisfy - // this - // obligation by emitting a partial log entry at authorization check - // time - // and only returning ALLOW to the application if it succeeds. - // - // If a matching Rule has this directive, but the client has not - // indicated - // that it will honor such requirements, then the IAM check will result - // in - // authorization failure by setting CheckPolicyResponse.success=false. - LogMode string `json:"logMode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LogMode") 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. "LogMode") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleIamV1LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1LogConfigDataAccessOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleIamV1__AuditConfig: Specifies the audit configuration for a // service. // The configuration determines which permission types are logged, and @@ -2410,138 +1993,6 @@ func (s *GoogleIamV1__Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1__Condition: A condition to be met. -type GoogleIamV1__Condition struct { - // Iam: Trusted attributes supplied by the IAM system. - // - // Possible values: - // "NO_ATTR" - Default non-attribute. - // "AUTHORITY" - Either principal or (if present) authority selector. - // "ATTRIBUTION" - The principal (even if an authority selector is - // present), which - // must only be used for attribution, not authorization. - // "APPROVER" - An approver (distinct from the requester) that has - // authorized this - // request. - // When used with IN, the condition indicates that one of the - // approvers - // associated with the request matches the specified principal, or is - // a - // member of the specified group. Approvers can only grant - // additional - // access, and are thus only used in a strictly positive context - // (e.g. ALLOW/IN or DENY/NOT_IN). - // "JUSTIFICATION_TYPE" - What types of justifications have been - // supplied with this request. - // String values should match enum names from - // tech.iam.JustificationType, - // e.g. "MANUAL_STRING". It is not permitted to grant access based - // on - // the *absence* of a justification, so justification conditions can - // only - // be used in a "positive" context (e.g., ALLOW/IN or - // DENY/NOT_IN). - // - // Multiple justifications, e.g., a Buganizer ID and a - // manually-entered - // reason, are normal and supported. - Iam string `json:"iam,omitempty"` - - // Op: An operator to apply the subject with. - // - // Possible values: - // "NO_OP" - Default no-op. - // "EQUALS" - DEPRECATED. Use IN instead. - // "NOT_EQUALS" - DEPRECATED. Use NOT_IN instead. - // "IN" - The condition is true if the subject (or any element of it - // if it is - // a set) matches any of the supplied values. - // "NOT_IN" - The condition is true if the subject (or every element - // of it if it is - // a set) matches none of the supplied values. - // "DISCHARGED" - Subject is discharged - Op string `json:"op,omitempty"` - - // Svc: Trusted attributes discharged by the service. - Svc string `json:"svc,omitempty"` - - // Sys: Trusted attributes supplied by any service that owns resources - // and uses - // the IAM system for access control. - // - // Possible values: - // "NO_ATTR" - Default non-attribute type - // "REGION" - Region of the resource - // "SERVICE" - Service name - // "NAME" - Resource name - // "IP" - IP address of the caller - Sys string `json:"sys,omitempty"` - - // Value: DEPRECATED. Use 'values' instead. - Value string `json:"value,omitempty"` - - // Values: The objects of the condition. This is mutually exclusive with - // 'value'. - Values []string `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Iam") 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. "Iam") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleIamV1__Condition) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1__Condition - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1__LogConfig: Specifies what kind of log the caller must -// write -type GoogleIamV1__LogConfig struct { - // CloudAudit: Cloud audit options. - CloudAudit *GoogleIamV1LogConfigCloudAuditOptions `json:"cloudAudit,omitempty"` - - // Counter: Counter options. - Counter *GoogleIamV1LogConfigCounterOptions `json:"counter,omitempty"` - - // DataAccess: Data access options. - DataAccess *GoogleIamV1LogConfigDataAccessOptions `json:"dataAccess,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CloudAudit") 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. "CloudAudit") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleIamV1__LogConfig) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1__LogConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleIamV1__Policy: Defines an Identity and Access Management (IAM) // policy. It is used to // specify access control policies for Cloud Platform resources. @@ -2609,20 +2060,6 @@ type GoogleIamV1__Policy struct { IamOwned bool `json:"iamOwned,omitempty"` - // Rules: If more than one rule is specified, the rules are applied in - // the following - // manner: - // - All matching LOG rules are always applied. - // - If any DENY/DENY_WITH_LOG rule matches, permission is denied. - // Logging will be applied if one or more matching rule requires - // logging. - // - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is - // granted. - // Logging will be applied if one or more matching rule requires - // logging. - // - Otherwise, if no rule applies, permission is denied. - Rules []*GoogleIamV1__Rule `json:"rules,omitempty"` - // Version: Version of the `Policy`. The default version is 0. Version int64 `json:"version,omitempty"` @@ -2653,77 +2090,6 @@ func (s *GoogleIamV1__Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1__Rule: A rule to be applied in a Policy. -type GoogleIamV1__Rule struct { - // Action: Required - // - // Possible values: - // "NO_ACTION" - Default no action. - // "ALLOW" - Matching 'Entries' grant access. - // "ALLOW_WITH_LOG" - Matching 'Entries' grant access and the caller - // promises to log - // the request per the returned log_configs. - // "DENY" - Matching 'Entries' deny access. - // "DENY_WITH_LOG" - Matching 'Entries' deny access and the caller - // promises to log - // the request per the returned log_configs. - // "LOG" - Matching 'Entries' tell IAM.Check callers to generate logs. - Action string `json:"action,omitempty"` - - // Conditions: Additional restrictions that must be met - Conditions []*GoogleIamV1__Condition `json:"conditions,omitempty"` - - // Description: Human-readable description of the rule. - Description string `json:"description,omitempty"` - - // In: If one or more 'in' clauses are specified, the rule matches - // if - // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. - In []string `json:"in,omitempty"` - - // LogConfig: The config returned to callers of tech.iam.IAM.CheckPolicy - // for any entries - // that match the LOG action. - LogConfig []*GoogleIamV1__LogConfig `json:"logConfig,omitempty"` - - // NotIn: If one or more 'not_in' clauses are specified, the rule - // matches - // if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. - // The format for in and not_in entries is the same as for members in - // a - // Binding (see google/iam/v1/policy.proto). - NotIn []string `json:"notIn,omitempty"` - - // Permissions: A permission is a string of form '..' - // (e.g., 'storage.buckets.list'). A value of '*' matches all - // permissions, - // and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleIamV1__Rule) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1__Rule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleIamV1__SetIamPolicyRequest: Request message for `SetIamPolicy` // method. type GoogleIamV1__SetIamPolicyRequest struct { @@ -2880,8 +2246,8 @@ func (s *GoogleLongrunning__ListOperationsResponse) MarshalJSON() ([]byte, error type GoogleLongrunning__Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` @@ -3832,6 +3198,148 @@ func (c *ProjectsJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1 } +// method id "ml.projects.jobs.getIamPolicy": + +type ProjectsJobsGetIamPolicyCall 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 *ProjectsJobsService) GetIamPolicy(resource string) *ProjectsJobsGetIamPolicyCall { + c := &ProjectsJobsGetIamPolicyCall{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 *ProjectsJobsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsJobsGetIamPolicyCall { + 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 *ProjectsJobsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsJobsGetIamPolicyCall { + 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 *ProjectsJobsGetIamPolicyCall) Context(ctx context.Context) *ProjectsJobsGetIamPolicyCall { + 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 *ProjectsJobsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsJobsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + 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 "ml.projects.jobs.getIamPolicy" call. +// Exactly one of *GoogleIamV1__Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1__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 *ProjectsJobsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__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 := &GoogleIamV1__Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return 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}/jobs/{jobsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "ml.projects.jobs.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/[^/]+/jobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1__Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "ml.projects.jobs.list": type ProjectsJobsListCall struct { @@ -4039,6 +3547,289 @@ func (c *ProjectsJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV } } +// method id "ml.projects.jobs.setIamPolicy": + +type ProjectsJobsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1__setiampolicyrequest *GoogleIamV1__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 *ProjectsJobsService) SetIamPolicy(resource string, googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest) *ProjectsJobsSetIamPolicyCall { + c := &ProjectsJobsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1__setiampolicyrequest = googleiamv1__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 *ProjectsJobsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsJobsSetIamPolicyCall { + 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 *ProjectsJobsSetIamPolicyCall) Context(ctx context.Context) *ProjectsJobsSetIamPolicyCall { + 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 *ProjectsJobsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsJobsSetIamPolicyCall) 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.googleiamv1__setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + 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 "ml.projects.jobs.setIamPolicy" call. +// Exactly one of *GoogleIamV1__Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1__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 *ProjectsJobsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__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 := &GoogleIamV1__Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + // "flatPath": "v1/projects/{projectsId}/jobs/{jobsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "ml.projects.jobs.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/[^/]+/jobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1__SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1__Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "ml.projects.jobs.testIamPermissions": + +type ProjectsJobsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1__testiampermissionsrequest *GoogleIamV1__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 *ProjectsJobsService) TestIamPermissions(resource string, googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest) *ProjectsJobsTestIamPermissionsCall { + c := &ProjectsJobsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1__testiampermissionsrequest = googleiamv1__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 *ProjectsJobsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsJobsTestIamPermissionsCall { + 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 *ProjectsJobsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsJobsTestIamPermissionsCall { + 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 *ProjectsJobsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsJobsTestIamPermissionsCall) 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.googleiamv1__testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + 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 "ml.projects.jobs.testIamPermissions" call. +// Exactly one of *GoogleIamV1__TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1__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 *ProjectsJobsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__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 := &GoogleIamV1__TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return 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}/jobs/{jobsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "ml.projects.jobs.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/[^/]+/jobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1__TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1__TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "ml.projects.models.create": type ProjectsModelsCreateCall struct { diff --git a/vendor/google.golang.org/api/ml/v1beta1/ml-api.json b/vendor/google.golang.org/api/ml/v1beta1/ml-api.json index f32e88b6a..3ed10642c 100644 --- a/vendor/google.golang.org/api/ml/v1beta1/ml-api.json +++ b/vendor/google.golang.org/api/ml/v1beta1/ml-api.json @@ -1,2121 +1,7 @@ { - "basePath": "", - "id": "ml:v1beta1", - "revision": "20170729", - "documentationLink": "https://cloud.google.com/ml/", - "discoveryVersion": "v1", - "version_module": "True", - "schemas": { - "GoogleIamV1__TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "type": "object", - "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" - } - }, - "id": "GoogleIamV1__TestIamPermissionsRequest" - }, - "GoogleCloudMlV1beta1__ManualScaling": { - "description": "Options for manually scaling a model.", - "type": "object", - "properties": { - "nodes": { - "format": "int32", - "description": "The number of nodes to allocate for this model. These nodes are always up,\nstarting from the time the model is deployed, so the cost of operating\nthis model will be proportional to `nodes` * number of hours since\nlast billing cycle plus the cost for each prediction performed.", - "type": "integer" - } - }, - "id": "GoogleCloudMlV1beta1__ManualScaling" - }, - "GoogleIamV1__LogConfig": { - "description": "Specifies what kind of log the caller must write", - "type": "object", - "properties": { - "dataAccess": { - "$ref": "GoogleIamV1_LogConfig_DataAccessOptions", - "description": "Data access options." - }, - "cloudAudit": { - "$ref": "GoogleIamV1_LogConfig_CloudAuditOptions", - "description": "Cloud audit options." - }, - "counter": { - "$ref": "GoogleIamV1_LogConfig_CounterOptions", - "description": "Counter options." - } - }, - "id": "GoogleIamV1__LogConfig" - }, - "GoogleCloudMlV1__AutoScaling": { - "description": "Options for automatically scaling a model.", - "type": "object", - "properties": { - "minNodes": { - "format": "int32", - "description": "Optional. The minimum number of nodes to allocate for this model. These\nnodes are always up, starting from the time the model is deployed, so the\ncost of operating this model will be at least\n`rate` * `min_nodes` * number of hours since last billing cycle,\nwhere `rate` is the cost per node-hour as documented in\n[pricing](https://cloud.google.com/ml-engine/pricing#prediction_pricing),\neven if no predictions are performed. There is additional cost for each\nprediction performed.\n\nUnlike manual scaling, if the load gets too heavy for the nodes\nthat are up, the service will automatically add nodes to handle the\nincreased load as well as scale back as traffic drops, always maintaining\nat least `min_nodes`. You will be charged for the time in which additional\nnodes are used.\n\nIf not specified, `min_nodes` defaults to 0, in which case, when traffic\nto a model stops (and after a cool-down period), nodes will be shut down\nand no charges will be incurred until traffic to the model resumes.", - "type": "integer" - } - }, - "id": "GoogleCloudMlV1__AutoScaling" - }, - "GoogleRpc__Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - } - }, - "id": "GoogleRpc__Status" - }, - "GoogleCloudMlV1beta1__PredictRequest": { - "description": "Request for predictions to be issued against a trained model.\n\nThe body of the request is a single JSON object with a single top-level\nfield:\n\n\u003cdl\u003e\n \u003cdt\u003einstances\u003c/dt\u003e\n \u003cdd\u003eA JSON array containing values representing the instances to use for\n prediction.\u003c/dd\u003e\n\u003c/dl\u003e\n\nThe structure of each element of the instances list is determined by your\nmodel's input definition. Instances can include named inputs or can contain\nonly unlabeled values.\n\nNot all data includes named inputs. Some instances will be simple\nJSON values (boolean, number, or string). However, instances are often lists\nof simple values, or complex nested lists. Here are some examples of request\nbodies:\n\nCSV data with each row encoded as a string value:\n\u003cpre\u003e\n{\"instances\": [\"1.0,true,\\\\\"x\\\\\"\", \"-2.0,false,\\\\\"y\\\\\"\"]}\n\u003c/pre\u003e\nPlain text:\n\u003cpre\u003e\n{\"instances\": [\"the quick brown fox\", \"la bruja le dio\"]}\n\u003c/pre\u003e\nSentences encoded as lists of words (vectors of strings):\n\u003cpre\u003e\n{\n \"instances\": [\n [\"the\",\"quick\",\"brown\"],\n [\"la\",\"bruja\",\"le\"],\n ...\n ]\n}\n\u003c/pre\u003e\nFloating point scalar values:\n\u003cpre\u003e\n{\"instances\": [0.0, 1.1, 2.2]}\n\u003c/pre\u003e\nVectors of integers:\n\u003cpre\u003e\n{\n \"instances\": [\n [0, 1, 2],\n [3, 4, 5],\n ...\n ]\n}\n\u003c/pre\u003e\nTensors (in this case, two-dimensional tensors):\n\u003cpre\u003e\n{\n \"instances\": [\n [\n [0, 1, 2],\n [3, 4, 5]\n ],\n ...\n ]\n}\n\u003c/pre\u003e\nImages can be represented different ways. In this encoding scheme the first\ntwo dimensions represent the rows and columns of the image, and the third\ncontains lists (vectors) of the R, G, and B values for each pixel.\n\u003cpre\u003e\n{\n \"instances\": [\n [\n [\n [138, 30, 66],\n [130, 20, 56],\n ...\n ],\n [\n [126, 38, 61],\n [122, 24, 57],\n ...\n ],\n ...\n ],\n ...\n ]\n}\n\u003c/pre\u003e\nJSON strings must be encoded as UTF-8. To send binary data, you must\nbase64-encode the data and mark it as binary. To mark a JSON string\nas binary, replace it with a JSON object with a single attribute named `b64`:\n\u003cpre\u003e{\"b64\": \"...\"} \u003c/pre\u003e\nFor example:\n\nTwo Serialized tf.Examples (fake data, for illustrative purposes only):\n\u003cpre\u003e\n{\"instances\": [{\"b64\": \"X5ad6u\"}, {\"b64\": \"IA9j4nx\"}]}\n\u003c/pre\u003e\nTwo JPEG image byte strings (fake data, for illustrative purposes only):\n\u003cpre\u003e\n{\"instances\": [{\"b64\": \"ASa8asdf\"}, {\"b64\": \"JLK7ljk3\"}]}\n\u003c/pre\u003e\nIf your data includes named references, format each instance as a JSON object\nwith the named references as the keys:\n\nJSON input data to be preprocessed:\n\u003cpre\u003e\n{\n \"instances\": [\n {\n \"a\": 1.0,\n \"b\": true,\n \"c\": \"x\"\n },\n {\n \"a\": -2.0,\n \"b\": false,\n \"c\": \"y\"\n }\n ]\n}\n\u003c/pre\u003e\nSome models have an underlying TensorFlow graph that accepts multiple input\ntensors. In this case, you should use the names of JSON name/value pairs to\nidentify the input tensors, as shown in the following exmaples:\n\nFor a graph with input tensor aliases \"tag\" (string) and \"image\"\n(base64-encoded string):\n\u003cpre\u003e\n{\n \"instances\": [\n {\n \"tag\": \"beach\",\n \"image\": {\"b64\": \"ASa8asdf\"}\n },\n {\n \"tag\": \"car\",\n \"image\": {\"b64\": \"JLK7ljk3\"}\n }\n ]\n}\n\u003c/pre\u003e\nFor a graph with input tensor aliases \"tag\" (string) and \"image\"\n(3-dimensional array of 8-bit ints):\n\u003cpre\u003e\n{\n \"instances\": [\n {\n \"tag\": \"beach\",\n \"image\": [\n [\n [138, 30, 66],\n [130, 20, 56],\n ...\n ],\n [\n [126, 38, 61],\n [122, 24, 57],\n ...\n ],\n ...\n ]\n },\n {\n \"tag\": \"car\",\n \"image\": [\n [\n [255, 0, 102],\n [255, 0, 97],\n ...\n ],\n [\n [254, 1, 101],\n [254, 2, 93],\n ...\n ],\n ...\n ]\n },\n ...\n ]\n}\n\u003c/pre\u003e\nIf the call is successful, the response body will contain one prediction\nentry per instance in the request body. If prediction fails for any\ninstance, the response body will contain no predictions and will contian\na single error entry instead.", - "type": "object", - "properties": { - "httpBody": { - "$ref": "GoogleApi__HttpBody", - "description": "\nRequired. The prediction request body." - } - }, - "id": "GoogleCloudMlV1beta1__PredictRequest" - }, - "GoogleApi__HttpBody": { - "description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n message GetResourceRequest {\n // A unique request id.\n string request_id = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty);\n }\n\nExample with streaming methods:\n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged.", - "type": "object", - "properties": { - "extensions": { - "description": "Application specific response metadata. Must be set in the first response\nfor streaming APIs.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "data": { - "format": "byte", - "description": "HTTP body binary data.", - "type": "string" - }, - "contentType": { - "description": "The HTTP Content-Type string representing the content type of the body.", - "type": "string" - } - }, - "id": "GoogleApi__HttpBody" - }, - "GoogleCloudMlV1beta1__PredictionInput": { - "description": "Represents input parameters for a prediction job.", - "type": "object", - "properties": { - "region": { - "description": "Required. The Google Compute Engine region to run the prediction job in.", - "type": "string" - }, - "versionName": { - "type": "string", - "description": "Use this field if you want to specify a version of the model to use. The\nstring is formatted the same way as `model_version`, with the addition\nof the version information:\n\n`\"projects/\u003cvar\u003e[YOUR_PROJECT]\u003c/var\u003e/models/\u003cvar\u003eYOUR_MODEL/versions/\u003cvar\u003e[YOUR_VERSION]\u003c/var\u003e\"`" - }, - "modelName": { - "description": "Use this field if you want to use the default version for the specified\nmodel. The string must use the following format:\n\n`\"projects/\u003cvar\u003e[YOUR_PROJECT]\u003c/var\u003e/models/\u003cvar\u003e[YOUR_MODEL]\u003c/var\u003e\"`", - "type": "string" - }, - "outputPath": { - "description": "Required. The output Google Cloud Storage location.", - "type": "string" - }, - "maxWorkerCount": { - "format": "int64", - "description": "Optional. The maximum number of workers to be used for parallel processing.\nDefaults to 10 if not specified.", - "type": "string" - }, - "uri": { - "description": "Use this field if you want to specify a Google Cloud Storage path for\nthe model to use.", - "type": "string" - }, - "dataFormat": { - "enumDescriptions": [ - "Unspecified format.", - "The source file is a text file with instances separated by the\nnew-line character.", - "The source file is a TFRecord file.", - "The source file is a GZIP-compressed TFRecord file." - ], - "enum": [ - "DATA_FORMAT_UNSPECIFIED", - "TEXT", - "TF_RECORD", - "TF_RECORD_GZIP" - ], - "description": "Required. The format of the input data files.", - "type": "string" - }, - "runtimeVersion": { - "type": "string", - "description": "Optional. The Google Cloud ML runtime version to use for this batch\nprediction. If not set, Google Cloud ML will pick the runtime version used\nduring the CreateVersion request for this model version, or choose the\nlatest stable version when model version information is not available\nsuch as when the model is specified by uri." - }, - "batchSize": { - "type": "string", - "format": "int64", - "description": "Optional. Number of records per batch, defaults to 64.\nThe service will buffer batch_size number of records in memory before\ninvoking one Tensorflow prediction call internally. So take the record\nsize and memory available into consideration when setting this parameter." - }, - "inputPaths": { - "description": "Required. The Google Cloud Storage location of the input data files.\nMay contain wildcards.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "GoogleCloudMlV1beta1__PredictionInput" - }, - "GoogleCloudMlV1beta1__ListJobsResponse": { - "description": "Response message for the ListJobs method.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Optional. Pass this token as the `page_token` field of the request for a\nsubsequent call.", - "type": "string" - }, - "jobs": { - "description": "The list of jobs.", - "items": { - "$ref": "GoogleCloudMlV1beta1__Job" - }, - "type": "array" - } - }, - "id": "GoogleCloudMlV1beta1__ListJobsResponse" - }, - "GoogleCloudMlV1beta1__Version": { - "type": "object", - "properties": { - "lastUseTime": { - "format": "google-datetime", - "description": "Output only. The time the version was last used for prediction.", - "type": "string" - }, - "runtimeVersion": { - "description": "Optional. The Google Cloud ML runtime version to use for this deployment.\nIf not set, Google Cloud ML will choose a version.", - "type": "string" - }, - "description": { - "description": "Optional. The description specified for the version when it was created.", - "type": "string" - }, - "deploymentUri": { - "description": "Required. The Google Cloud Storage location of the trained model used to\ncreate the version. See the\n[overview of model\ndeployment](/ml-engine/docs/concepts/deployment-overview) for more\ninformation.\n\nWhen passing Version to\n[projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects.models.versions/create)\nthe model service uses the specified location as the source of the model.\nOnce deployed, the model version is hosted by the prediction service, so\nthis location is useful only as a historical record.\nThe total number of model files can't exceed 1000.", - "type": "string" - }, - "autoScaling": { - "description": "Automatically scale the number of nodes used to serve the model in\nresponse to increases and decreases in traffic. Care should be\ntaken to ramp up traffic according to the model's ability to scale\nor you will start seeing increases in latency and 429 response codes.", - "$ref": "GoogleCloudMlV1beta1__AutoScaling" - }, - "isDefault": { - "description": "Output only. If true, this version will be used to handle prediction\nrequests that do not specify a version.\n\nYou can change the default version by calling\n[projects.methods.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault).", - "type": "boolean" - }, - "createTime": { - "format": "google-datetime", - "description": "Output only. The time the version was created.", - "type": "string" - }, - "manualScaling": { - "description": "Manually select the number of nodes to use for serving the\nmodel. You should generally use `auto_scaling` with an appropriate\n`min_nodes` instead, but this option is available if you want more\npredictable billing. Beware that latency and error rates will increase\nif the traffic exceeds that capability of the system to serve it based\non the selected number of nodes.", - "$ref": "GoogleCloudMlV1beta1__ManualScaling" - }, - "state": { - "enum": [ - "UNKNOWN", - "READY", - "CREATING", - "FAILED" - ], - "description": "Output only. The state of a version.", - "type": "string", - "enumDescriptions": [ - "The version state is unspecified.", - "The version is ready for prediction.", - "The version is still in the process of creation.", - "The version failed to be created, possibly cancelled.\n`error_message` should contain the details of the failure." - ] - }, - "name": { - "description": "Required.The name specified for the version when it was created.\n\nThe version name must be unique within the model it is created in.", - "type": "string" - }, - "errorMessage": { - "description": "Output only. The details of a failure or a cancellation.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1beta1__Version", - "description": "Represents a version of the model.\n\nEach version is a trained model deployed in the cloud, ready to handle\nprediction requests. A model can have multiple versions. You can get\ninformation about all of the versions of a given model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list).\n\nNext ID: 18" - }, - "GoogleCloudMlV1beta1__ListVersionsResponse": { - "properties": { - "versions": { - "items": { - "$ref": "GoogleCloudMlV1beta1__Version" - }, - "type": "array", - "description": "The list of versions." - }, - "nextPageToken": { - "description": "Optional. Pass this token as the `page_token` field of the request for a\nsubsequent call.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1beta1__ListVersionsResponse", - "description": "Response message for the ListVersions method.", - "type": "object" - }, - "GoogleIamV1__TestIamPermissionsResponse": { - "properties": { - "permissions": { - "items": { - "type": "string" - }, - "type": "array", - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed." - } - }, - "id": "GoogleIamV1__TestIamPermissionsResponse", - "description": "Response message for `TestIamPermissions` method.", - "type": "object" - }, - "GoogleIamV1__SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "properties": { - "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.", - "$ref": "GoogleIamV1__Policy" - }, - "updateMask": { - "format": "google-fieldmask", - "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.", - "type": "string" - } - }, - "id": "GoogleIamV1__SetIamPolicyRequest" - }, - "GoogleCloudMlV1beta1__CancelJobRequest": { - "properties": {}, - "id": "GoogleCloudMlV1beta1__CancelJobRequest", - "description": "Request message for the CancelJob method.", - "type": "object" - }, - "GoogleCloudMlV1beta1__Model": { - "description": "Represents a machine learning solution.\n\nA model can have multiple versions, each of which is a deployed, trained\nmodel ready to receive prediction requests. The model itself is just a\ncontainer.\n\nNext ID: 8", - "type": "object", - "properties": { - "defaultVersion": { - "$ref": "GoogleCloudMlV1beta1__Version", - "description": "Output only. The default version of the model. This version will be used to\nhandle prediction requests that do not specify a version.\n\nYou can change the default version by calling\n[projects.methods.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault)." - }, - "regions": { - "description": "Optional. The list of regions where the model is going to be deployed.\nCurrently only one region per model is supported.\nDefaults to 'us-central1' if nothing is set.\nNote:\n* No matter where a model is deployed, it can always be accessed by\n users from anywhere, both for online and batch prediction.\n* The region for a batch prediction job is set by the region field when\n submitting the batch prediction job and does not take its value from\n this field.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Required. The name specified for the model when it was created.\n\nThe model name must be unique within the project it is created in.", - "type": "string" - }, - "description": { - "description": "Optional. The description specified for the model when it was created.", - "type": "string" - }, - "onlinePredictionLogging": { - "type": "boolean", - "description": "Optional. If true, enables StackDriver Logging for online prediction.\nDefault is false." - } - }, - "id": "GoogleCloudMlV1beta1__Model" - }, - "GoogleIamV1__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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "etag": { - "format": "byte", - "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.", - "type": "string" - }, - "iamOwned": { - "type": "boolean" - }, - "rules": { - "description": "If more than one rule is specified, the rules are applied in the following\nmanner:\n- All matching LOG rules are always applied.\n- If any DENY/DENY_WITH_LOG rule matches, permission is denied.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is\n granted.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if no rule applies, permission is denied.", - "items": { - "$ref": "GoogleIamV1__Rule" - }, - "type": "array" - }, - "version": { - "format": "int32", - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer" - }, - "auditConfigs": { - "description": "Specifies cloud audit logging configuration for this policy.", - "items": { - "$ref": "GoogleIamV1__AuditConfig" - }, - "type": "array" - }, - "bindings": { - "items": { - "$ref": "GoogleIamV1__Binding" - }, - "type": "array", - "description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error." - } - }, - "id": "GoogleIamV1__Policy" - }, - "GoogleCloudMlV1beta1__Job": { - "id": "GoogleCloudMlV1beta1__Job", - "description": "Represents a training or prediction job.\n\nNext ID: 16", - "type": "object", - "properties": { - "trainingOutput": { - "$ref": "GoogleCloudMlV1beta1__TrainingOutput", - "description": "The current training job result." - }, - "createTime": { - "format": "google-datetime", - "description": "Output only. When the job was created.", - "type": "string" - }, - "trainingInput": { - "description": "Input parameters to create a training job.", - "$ref": "GoogleCloudMlV1beta1__TrainingInput" - }, - "predictionInput": { - "description": "Input parameters to create a prediction job.", - "$ref": "GoogleCloudMlV1beta1__PredictionInput" - }, - "state": { - "enum": [ - "STATE_UNSPECIFIED", - "QUEUED", - "PREPARING", - "RUNNING", - "SUCCEEDED", - "FAILED", - "CANCELLING", - "CANCELLED" - ], - "description": "Output only. The detailed state of a job.", - "type": "string", - "enumDescriptions": [ - "The job state is unspecified.", - "The job has been just created and processing has not yet begun.", - "The service is preparing to run the job.", - "The job is in progress.", - "The job completed successfully.", - "The job failed.\n`error_message` should contain the details of the failure.", - "The job is being cancelled.\n`error_message` should describe the reason for the cancellation.", - "The job has been cancelled.\n`error_message` should describe the reason for the cancellation." - ] - }, - "errorMessage": { - "description": "Output only. The details of a failure or a cancellation.", - "type": "string" - }, - "jobId": { - "description": "Required. The user-specified id of the job.", - "type": "string" - }, - "endTime": { - "type": "string", - "format": "google-datetime", - "description": "Output only. When the job processing was completed." - }, - "startTime": { - "format": "google-datetime", - "description": "Output only. When the job processing was started.", - "type": "string" - }, - "predictionOutput": { - "$ref": "GoogleCloudMlV1beta1__PredictionOutput", - "description": "The current prediction job result." - } - } - }, - "GoogleCloudMlV1beta1__TrainingInput": { - "description": "Represents input parameters for a training job.", - "type": "object", - "properties": { - "pythonModule": { - "description": "Required. The Python module name to run after installing the packages.", - "type": "string" - }, - "workerType": { - "description": "Optional. Specifies the type of virtual machine to use for your training\njob's worker nodes.\n\nThe supported values are the same as those described in the entry for\n`masterType`.\n\nThis value must be present when `scaleTier` is set to `CUSTOM` and\n`workerCount` is greater than zero.", - "type": "string" - }, - "args": { - "description": "Optional. Command line arguments to pass to the program.", - "items": { - "type": "string" - }, - "type": "array" - }, - "region": { - "description": "Required. The Google Compute Engine region to run the training job in.", - "type": "string" - }, - "parameterServerType": { - "type": "string", - "description": "Optional. Specifies the type of virtual machine to use for your training\njob's parameter server.\n\nThe supported values are the same as those described in the entry for\n`master_type`.\n\nThis value must be present when `scaleTier` is set to `CUSTOM` and\n`parameter_server_count` is greater than zero." - }, - "scaleTier": { - "enum": [ - "BASIC", - "STANDARD_1", - "PREMIUM_1", - "BASIC_GPU", - "CUSTOM" - ], - "description": "Required. Specifies the machine types, the number of replicas for workers\nand parameter servers.", - "type": "string", - "enumDescriptions": [ - "A single worker instance. This tier is suitable for learning how to use\nCloud ML, and for experimenting with new models using small datasets.", - "Many workers and a few parameter servers.", - "A large number of workers with many parameter servers.", - "A single worker instance [with a\nGPU](/ml-engine/docs/how-tos/using-gpus).", - "The CUSTOM tier is not a set tier, but rather enables you to use your\nown cluster specification. When you use this tier, set values to\nconfigure your processing cluster according to these guidelines:\n\n* You _must_ set `TrainingInput.masterType` to specify the type\n of machine to use for your master node. This is the only required\n setting.\n\n* You _may_ set `TrainingInput.workerCount` to specify the number of\n workers to use. If you specify one or more workers, you _must_ also\n set `TrainingInput.workerType` to specify the type of machine to use\n for your worker nodes.\n\n* You _may_ set `TrainingInput.parameterServerCount` to specify the\n number of parameter servers to use. If you specify one or more\n parameter servers, you _must_ also set\n `TrainingInput.parameterServerType` to specify the type of machine to\n use for your parameter servers.\n\nNote that all of your workers must use the same machine type, which can\nbe different from your parameter server type and master type. Your\nparameter servers must likewise use the same machine type, which can be\ndifferent from your worker type and master type." - ] - }, - "jobDir": { - "description": "Optional. A Google Cloud Storage path in which to store training outputs\nand other data needed for training. This path is passed to your TensorFlow\nprogram as the 'job_dir' command-line argument. The benefit of specifying\nthis field is that Cloud ML validates the path for use in training.", - "type": "string" - }, - "hyperparameters": { - "description": "Optional. The set of Hyperparameters to tune.", - "$ref": "GoogleCloudMlV1beta1__HyperparameterSpec" - }, - "parameterServerCount": { - "format": "int64", - "description": "Optional. The number of parameter server replicas to use for the training\njob. Each replica in the cluster will be of the type specified in\n`parameter_server_type`.\n\nThis value can only be used when `scale_tier` is set to `CUSTOM`.If you\nset this value, you must also set `parameter_server_type`.", - "type": "string" - }, - "packageUris": { - "description": "Required. The Google Cloud Storage location of the packages with\nthe training program and any additional dependencies.\nThe maximum number of package URIs is 100.", - "items": { - "type": "string" - }, - "type": "array" - }, - "workerCount": { - "format": "int64", - "description": "Optional. The number of worker replicas to use for the training job. Each\nreplica in the cluster will be of the type specified in `worker_type`.\n\nThis value can only be used when `scale_tier` is set to `CUSTOM`. If you\nset this value, you must also set `worker_type`.", - "type": "string" - }, - "masterType": { - "description": "Optional. Specifies the type of virtual machine to use for your training\njob's master worker.\n\nThe following types are supported:\n\n\u003cdl\u003e\n \u003cdt\u003estandard\u003c/dt\u003e\n \u003cdd\u003e\n A basic machine configuration suitable for training simple models with\n small to moderate datasets.\n \u003c/dd\u003e\n \u003cdt\u003elarge_model\u003c/dt\u003e\n \u003cdd\u003e\n A machine with a lot of memory, specially suited for parameter servers\n when your model is large (having many hidden layers or layers with very\n large numbers of nodes).\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_s\u003c/dt\u003e\n \u003cdd\u003e\n A machine suitable for the master and workers of the cluster when your\n model requires more computation than the standard machine can handle\n satisfactorily.\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_m\u003c/dt\u003e\n \u003cdd\u003e\n A machine with roughly twice the number of cores and roughly double the\n memory of \u003ccode suppresswarning=\"true\"\u003ecomplex_model_s\u003c/code\u003e.\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_l\u003c/dt\u003e\n \u003cdd\u003e\n A machine with roughly twice the number of cores and roughly double the\n memory of \u003ccode suppresswarning=\"true\"\u003ecomplex_model_m\u003c/code\u003e.\n \u003c/dd\u003e\n \u003cdt\u003estandard_gpu\u003c/dt\u003e\n \u003cdd\u003e\n A machine equivalent to \u003ccode suppresswarning=\"true\"\u003estandard\u003c/code\u003e that\n also includes a\n \u003ca href=\"/ml-engine/docs/how-tos/using-gpus\"\u003e\n GPU that you can use in your trainer\u003c/a\u003e.\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_m_gpu\u003c/dt\u003e\n \u003cdd\u003e\n A machine equivalent to\n \u003ccode suppresswarning=\"true\"\u003ecomplex_model_m\u003c/code\u003e that also includes\n four GPUs.\n \u003c/dd\u003e\n\u003c/dl\u003e\n\nYou must set this value when `scaleTier` is set to `CUSTOM`.", - "type": "string" - }, - "runtimeVersion": { - "description": "Optional. The Google Cloud ML runtime version to use for training. If not\nset, Google Cloud ML will choose the latest stable version.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1beta1__TrainingInput" - }, - "GoogleLongrunning__ListOperationsResponse": { - "type": "object", - "properties": { - "operations": { - "items": { - "$ref": "GoogleLongrunning__Operation" - }, - "type": "array", - "description": "A list of operations that matches the specified filter in the request." - }, - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." - } - }, - "id": "GoogleLongrunning__ListOperationsResponse", - "description": "The response message for Operations.ListOperations." - }, - "GoogleIamV1__Condition": { - "description": "A condition to be met.", - "type": "object", - "properties": { - "op": { - "description": "An operator to apply the subject with.", - "type": "string", - "enumDescriptions": [ - "Default no-op.", - "DEPRECATED. Use IN instead.", - "DEPRECATED. Use NOT_IN instead.", - "The condition is true if the subject (or any element of it if it is\na set) matches any of the supplied values.", - "The condition is true if the subject (or every element of it if it is\na set) matches none of the supplied values.", - "Subject is discharged" - ], - "enum": [ - "NO_OP", - "EQUALS", - "NOT_EQUALS", - "IN", - "NOT_IN", - "DISCHARGED" - ] - }, - "svc": { - "type": "string", - "description": "Trusted attributes discharged by the service." - }, - "value": { - "description": "DEPRECATED. Use 'values' instead.", - "type": "string" - }, - "sys": { - "enumDescriptions": [ - "Default non-attribute type", - "Region of the resource", - "Service name", - "Resource name", - "IP address of the caller" - ], - "enum": [ - "NO_ATTR", - "REGION", - "SERVICE", - "NAME", - "IP" - ], - "description": "Trusted attributes supplied by any service that owns resources and uses\nthe IAM system for access control.", - "type": "string" - }, - "iam": { - "type": "string", - "enumDescriptions": [ - "Default non-attribute.", - "Either principal or (if present) authority selector.", - "The principal (even if an authority selector is present), which\nmust only be used for attribution, not authorization.", - "An approver (distinct from the requester) that has authorized this\nrequest.\nWhen used with IN, the condition indicates that one of the approvers\nassociated with the request matches the specified principal, or is a\nmember of the specified group. Approvers can only grant additional\naccess, and are thus only used in a strictly positive context\n(e.g. ALLOW/IN or DENY/NOT_IN).", - "What types of justifications have been supplied with this request.\nString values should match enum names from tech.iam.JustificationType,\ne.g. \"MANUAL_STRING\". It is not permitted to grant access based on\nthe *absence* of a justification, so justification conditions can only\nbe used in a \"positive\" context (e.g., ALLOW/IN or DENY/NOT_IN).\n\nMultiple justifications, e.g., a Buganizer ID and a manually-entered\nreason, are normal and supported." - ], - "enum": [ - "NO_ATTR", - "AUTHORITY", - "ATTRIBUTION", - "APPROVER", - "JUSTIFICATION_TYPE" - ], - "description": "Trusted attributes supplied by the IAM system." - }, - "values": { - "items": { - "type": "string" - }, - "type": "array", - "description": "The objects of the condition. This is mutually exclusive with 'value'." - } - }, - "id": "GoogleIamV1__Condition" - }, - "GoogleCloudMlV1beta1__GetConfigResponse": { - "description": "Returns service account information associated with a project.", - "type": "object", - "properties": { - "serviceAccountProject": { - "format": "int64", - "description": "The project number for `service_account`.", - "type": "string" - }, - "serviceAccount": { - "description": "The service account Cloud ML uses to access resources in the project.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1beta1__GetConfigResponse" - }, - "GoogleCloudMlV1beta1__SetDefaultVersionRequest": { - "description": "Request message for the SetDefaultVersion request.", - "type": "object", - "properties": {}, - "id": "GoogleCloudMlV1beta1__SetDefaultVersionRequest" - }, - "GoogleCloudMlV1__ManualScaling": { - "description": "Options for manually scaling a model.", - "type": "object", - "properties": { - "nodes": { - "format": "int32", - "description": "The number of nodes to allocate for this model. These nodes are always up,\nstarting from the time the model is deployed, so the cost of operating\nthis model will be proportional to `nodes` * number of hours since\nlast billing cycle plus the cost for each prediction performed.", - "type": "integer" - } - }, - "id": "GoogleCloudMlV1__ManualScaling" - }, - "GoogleIamV1__Binding": { - "description": "Associates `members` with a `role`.", - "type": "object", - "properties": { - "condition": { - "$ref": "GoogleType__Expr", - "description": "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.\nThis field is GOOGLE_INTERNAL." - }, - "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` or `joe@example.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`.\nRequired", - "type": "string" - } - }, - "id": "GoogleIamV1__Binding" - }, - "GoogleIamV1__Rule": { - "description": "A rule to be applied in a Policy.", - "type": "object", - "properties": { - "in": { - "description": "If one or more 'in' clauses are specified, the rule matches if\nthe PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.", - "items": { - "type": "string" - }, - "type": "array" - }, - "permissions": { - "items": { - "type": "string" - }, - "type": "array", - "description": "A permission is a string of form '\u003cservice\u003e.\u003cresource type\u003e.\u003cverb\u003e'\n(e.g., 'storage.buckets.list'). A value of '*' matches all permissions,\nand a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs." - }, - "action": { - "type": "string", - "enumDescriptions": [ - "Default no action.", - "Matching 'Entries' grant access.", - "Matching 'Entries' grant access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' deny access.", - "Matching 'Entries' deny access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' tell IAM.Check callers to generate logs." - ], - "enum": [ - "NO_ACTION", - "ALLOW", - "ALLOW_WITH_LOG", - "DENY", - "DENY_WITH_LOG", - "LOG" - ], - "description": "Required" - }, - "notIn": { - "description": "If one or more 'not_in' clauses are specified, the rule matches\nif the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.\nThe format for in and not_in entries is the same as for members in a\nBinding (see google/iam/v1/policy.proto).", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "Human-readable description of the rule.", - "type": "string" - }, - "conditions": { - "description": "Additional restrictions that must be met", - "items": { - "$ref": "GoogleIamV1__Condition" - }, - "type": "array" - }, - "logConfig": { - "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries\nthat match the LOG action.", - "items": { - "$ref": "GoogleIamV1__LogConfig" - }, - "type": "array" - } - }, - "id": "GoogleIamV1__Rule" - }, - "GoogleCloudMlV1beta1__AutoScaling": { - "properties": { - "minNodes": { - "type": "integer", - "format": "int32", - "description": "Optional. The minimum number of nodes to allocate for this model. These\nnodes are always up, starting from the time the model is deployed, so the\ncost of operating this model will be at least\n`rate` * `min_nodes` * number of hours since last billing cycle,\nwhere `rate` is the cost per node-hour as documented in\n[pricing](https://cloud.google.com/ml-engine/pricing#prediction_pricing),\neven if no predictions are performed. There is additional cost for each\nprediction performed.\n\nUnlike manual scaling, if the load gets too heavy for the nodes\nthat are up, the service will automatically add nodes to handle the\nincreased load as well as scale back as traffic drops, always maintaining\nat least `min_nodes`. You will be charged for the time in which additional\nnodes are used.\n\nIf not specified, `min_nodes` defaults to 0, in which case, when traffic\nto a model stops (and after a cool-down period), nodes will be shut down\nand no charges will be incurred until traffic to the model resumes." - } - }, - "id": "GoogleCloudMlV1beta1__AutoScaling", - "description": "Options for automatically scaling a model.", - "type": "object" - }, - "GoogleIamV1_LogConfig_CounterOptions": { - "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only,\nand end in \"_count\". Field names should not contain an initial slash.\nThe actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are\ntheir respective values.\n\nAt present the only supported field names are\n - \"iam_principal\", corresponding to IAMContext.principal;\n - \"\" (empty string), resulting in one aggretated counter with no field.\n\nExamples:\n counter { metric: \"/debug_access_count\" field: \"iam_principal\" }\n ==\u003e increment counter /iam/policy/backend_debug_access_count\n {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support:\n* multiple field names (though this may be supported in the future)\n* decrementing the counter\n* incrementing it by anything other than 1", - "type": "object", - "properties": { - "field": { - "description": "The field value to attribute.", - "type": "string" - }, - "metric": { - "description": "The metric to update.", - "type": "string" - } - }, - "id": "GoogleIamV1_LogConfig_CounterOptions" - }, - "GoogleCloudMlV1beta1__ParameterSpec": { - "description": "Represents a single hyperparameter to optimize.", - "type": "object", - "properties": { - "minValue": { - "format": "double", - "description": "Required if type is `DOUBLE` or `INTEGER`. This field\nshould be unset if type is `CATEGORICAL`. This value should be integers if\ntype is INTEGER.", - "type": "number" - }, - "discreteValues": { - "description": "Required if type is `DISCRETE`.\nA list of feasible points.\nThe list should be in strictly increasing order. For instance, this\nparameter might have possible settings of 1.5, 2.5, and 4.0. This list\nshould not contain more than 1,000 values.", - "items": { - "format": "double", - "type": "number" - }, - "type": "array" - }, - "scaleType": { - "description": "Optional. How the parameter should be scaled to the hypercube.\nLeave unset for categorical parameters.\nSome kind of scaling is strongly recommended for real or integral\nparameters (e.g., `UNIT_LINEAR_SCALE`).", - "type": "string", - "enumDescriptions": [ - "By default, no scaling is applied.", - "Scales the feasible space to (0, 1) linearly.", - "Scales the feasible space logarithmically to (0, 1). The entire feasible\nspace must be strictly positive.", - "Scales the feasible space \"reverse\" logarithmically to (0, 1). The result\nis that values close to the top of the feasible space are spread out more\nthan points near the bottom. The entire feasible space must be strictly\npositive." - ], - "enum": [ - "NONE", - "UNIT_LINEAR_SCALE", - "UNIT_LOG_SCALE", - "UNIT_REVERSE_LOG_SCALE" - ] - }, - "maxValue": { - "format": "double", - "description": "Required if typeis `DOUBLE` or `INTEGER`. This field\nshould be unset if type is `CATEGORICAL`. This value should be integers if\ntype is `INTEGER`.", - "type": "number" - }, - "type": { - "enum": [ - "PARAMETER_TYPE_UNSPECIFIED", - "DOUBLE", - "INTEGER", - "CATEGORICAL", - "DISCRETE" - ], - "description": "Required. The type of the parameter.", - "type": "string", - "enumDescriptions": [ - "You must specify a valid type. Using this unspecified type will result in\nan error.", - "Type for real-valued parameters.", - "Type for integral parameters.", - "The parameter is categorical, with a value chosen from the categories\nfield.", - "The parameter is real valued, with a fixed set of feasible points. If\n`type==DISCRETE`, feasible_points must be provided, and\n{`min_value`, `max_value`} will be ignored." - ] - }, - "parameterName": { - "description": "Required. The parameter name must be unique amongst all ParameterConfigs in\na HyperparameterSpec message. E.g., \"learning_rate\".", - "type": "string" - }, - "categoricalValues": { - "description": "Required if type is `CATEGORICAL`. The list of possible categories.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "GoogleCloudMlV1beta1__ParameterSpec" - }, - "GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric": { - "id": "GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric", - "description": "An observed value of a metric.", - "type": "object", - "properties": { - "trainingStep": { - "format": "int64", - "description": "The global training step for this metric.", - "type": "string" - }, - "objectiveValue": { - "format": "double", - "description": "The objective value at this training step.", - "type": "number" - } - } - }, - "GoogleCloudMlV1beta1__PredictionOutput": { - "type": "object", - "properties": { - "errorCount": { - "format": "int64", - "description": "The number of data instances which resulted in errors.", - "type": "string" - }, - "nodeHours": { - "format": "double", - "description": "Node hours used by the batch prediction job.", - "type": "number" - }, - "outputPath": { - "description": "The output Google Cloud Storage location provided at the job creation time.", - "type": "string" - }, - "predictionCount": { - "type": "string", - "format": "int64", - "description": "The number of generated predictions." - } - }, - "id": "GoogleCloudMlV1beta1__PredictionOutput", - "description": "Represents results of a prediction job." - }, - "GoogleCloudMlV1beta1__TrainingOutput": { - "description": "Represents results of a training job. Output only.", - "type": "object", - "properties": { - "completedTrialCount": { - "format": "int64", - "description": "The number of hyperparameter tuning trials that completed successfully.\nOnly set for hyperparameter tuning jobs.", - "type": "string" - }, - "isHyperparameterTuningJob": { - "description": "Whether this job is a hyperparameter tuning job.", - "type": "boolean" - }, - "consumedMLUnits": { - "format": "double", - "description": "The amount of ML units consumed by the job.", - "type": "number" - }, - "trials": { - "items": { - "$ref": "GoogleCloudMlV1beta1__HyperparameterOutput" - }, - "type": "array", - "description": "Results for individual Hyperparameter trials.\nOnly set for hyperparameter tuning jobs." - } - }, - "id": "GoogleCloudMlV1beta1__TrainingOutput" - }, - "GoogleIamV1_LogConfig_CloudAuditOptions": { - "description": "Write a Cloud Audit log", - "type": "object", - "properties": { - "logName": { - "enumDescriptions": [ - "Default. Should not be used.", - "Corresponds to \"cloudaudit.googleapis.com/activity\"", - "Corresponds to \"cloudaudit.googleapis.com/data_access\"" - ], - "enum": [ - "UNSPECIFIED_LOG_NAME", - "ADMIN_ACTIVITY", - "DATA_ACCESS" - ], - "description": "The log_name to populate in the Cloud Audit Record.", - "type": "string" - } - }, - "id": "GoogleIamV1_LogConfig_CloudAuditOptions" - }, - "GoogleCloudMlV1__Version": { - "description": "Represents a version of the model.\n\nEach version is a trained model deployed in the cloud, ready to handle\nprediction requests. A model can have multiple versions. You can get\ninformation about all of the versions of a given model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).\n\nNext ID: 18", - "type": "object", - "properties": { - "isDefault": { - "description": "Output only. If true, this version will be used to handle prediction\nrequests that do not specify a version.\n\nYou can change the default version by calling\n[projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault).", - "type": "boolean" - }, - "autoScaling": { - "$ref": "GoogleCloudMlV1__AutoScaling", - "description": "Automatically scale the number of nodes used to serve the model in\nresponse to increases and decreases in traffic. Care should be\ntaken to ramp up traffic according to the model's ability to scale\nor you will start seeing increases in latency and 429 response codes." - }, - "createTime": { - "type": "string", - "format": "google-datetime", - "description": "Output only. The time the version was created." - }, - "manualScaling": { - "$ref": "GoogleCloudMlV1__ManualScaling", - "description": "Manually select the number of nodes to use for serving the\nmodel. You should generally use `auto_scaling` with an appropriate\n`min_nodes` instead, but this option is available if you want more\npredictable billing. Beware that latency and error rates will increase\nif the traffic exceeds that capability of the system to serve it based\non the selected number of nodes." - }, - "state": { - "enum": [ - "UNKNOWN", - "READY", - "CREATING", - "FAILED" - ], - "description": "Output only. The state of a version.", - "type": "string", - "enumDescriptions": [ - "The version state is unspecified.", - "The version is ready for prediction.", - "The version is still in the process of creation.", - "The version failed to be created, possibly cancelled.\n`error_message` should contain the details of the failure." - ] - }, - "name": { - "description": "Required.The name specified for the version when it was created.\n\nThe version name must be unique within the model it is created in.", - "type": "string" - }, - "errorMessage": { - "description": "Output only. The details of a failure or a cancellation.", - "type": "string" - }, - "lastUseTime": { - "format": "google-datetime", - "description": "Output only. The time the version was last used for prediction.", - "type": "string" - }, - "runtimeVersion": { - "type": "string", - "description": "Optional. The Google Cloud ML runtime version to use for this deployment.\nIf not set, Google Cloud ML will choose a version." - }, - "description": { - "description": "Optional. The description specified for the version when it was created.", - "type": "string" - }, - "deploymentUri": { - "type": "string", - "description": "Required. The Google Cloud Storage location of the trained model used to\ncreate the version. See the\n[overview of model\ndeployment](/ml-engine/docs/concepts/deployment-overview) for more\ninformation.\n\nWhen passing Version to\n[projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create)\nthe model service uses the specified location as the source of the model.\nOnce deployed, the model version is hosted by the prediction service, so\nthis location is useful only as a historical record.\nThe total number of model files can't exceed 1000." - } - }, - "id": "GoogleCloudMlV1__Version" - }, - "GoogleIamV1_LogConfig_DataAccessOptions": { - "properties": { - "logMode": { - "enum": [ - "LOG_MODE_UNSPECIFIED", - "LOG_FAIL_CLOSED" - ], - "description": "Whether Gin logging should happen in a fail-closed manner at the caller.\nThis is relevant only in the LocalIAM implementation, for now.", - "type": "string", - "enumDescriptions": [ - "Client is not required to write a partial Gin log immediately after\nthe authorization check. If client chooses to write one and it fails,\nclient may either fail open (allow the operation to continue) or\nfail closed (handle as a DENY outcome).", - "The application's operation in the context of which this authorization\ncheck is being made may only be performed if it is successfully logged\nto Gin. For instance, the authorization library may satisfy this\nobligation by emitting a partial log entry at authorization check time\nand only returning ALLOW to the application if it succeeds.\n\nIf a matching Rule has this directive, but the client has not indicated\nthat it will honor such requirements, then the IAM check will result in\nauthorization failure by setting CheckPolicyResponse.success=false." - ] - } - }, - "id": "GoogleIamV1_LogConfig_DataAccessOptions", - "description": "Write a Data Access (Gin) log", - "type": "object" - }, - "GoogleCloudMlV1beta1__HyperparameterSpec": { - "description": "Represents a set of hyperparameters to optimize.", - "type": "object", - "properties": { - "maxParallelTrials": { - "format": "int32", - "description": "Optional. The number of training trials to run concurrently.\nYou can reduce the time it takes to perform hyperparameter tuning by adding\ntrials in parallel. However, each trail only benefits from the information\ngained in completed trials. That means that a trial does not get access to\nthe results of trials running at the same time, which could reduce the\nquality of the overall optimization.\n\nEach trial will use the same scale tier and machine types.\n\nDefaults to one.", - "type": "integer" - }, - "hyperparameterMetricTag": { - "description": "Optional. The Tensorflow summary tag name to use for optimizing trials. For\ncurrent versions of Tensorflow, this tag name should exactly match what is\nshown in Tensorboard, including all scopes. For versions of Tensorflow\nprior to 0.12, this should be only the tag passed to tf.Summary.\nBy default, \"training/hptuning/metric\" will be used.", - "type": "string" - }, - "goal": { - "description": "Required. The type of goal to use for tuning. Available types are\n`MAXIMIZE` and `MINIMIZE`.\n\nDefaults to `MAXIMIZE`.", - "type": "string", - "enumDescriptions": [ - "Goal Type will default to maximize.", - "Maximize the goal metric.", - "Minimize the goal metric." - ], - "enum": [ - "GOAL_TYPE_UNSPECIFIED", - "MAXIMIZE", - "MINIMIZE" - ] - }, - "maxTrials": { - "format": "int32", - "description": "Optional. How many training trials should be attempted to optimize\nthe specified hyperparameters.\n\nDefaults to one.", - "type": "integer" - }, - "params": { - "description": "Required. The set of parameters to tune.", - "items": { - "$ref": "GoogleCloudMlV1beta1__ParameterSpec" - }, - "type": "array" - } - }, - "id": "GoogleCloudMlV1beta1__HyperparameterSpec" - }, - "GoogleCloudMlV1__OperationMetadata": { - "type": "object", - "properties": { - "modelName": { - "description": "Contains the name of the model associated with the operation.", - "type": "string" - }, - "version": { - "$ref": "GoogleCloudMlV1__Version", - "description": "Contains the version associated with the operation." - }, - "endTime": { - "format": "google-datetime", - "description": "The time operation processing completed.", - "type": "string" - }, - "operationType": { - "description": "The operation type.", - "type": "string", - "enumDescriptions": [ - "Unspecified operation type.", - "An operation to create a new version.", - "An operation to delete an existing version.", - "An operation to delete an existing model." - ], - "enum": [ - "OPERATION_TYPE_UNSPECIFIED", - "CREATE_VERSION", - "DELETE_VERSION", - "DELETE_MODEL" - ] - }, - "startTime": { - "format": "google-datetime", - "description": "The time operation processing started.", - "type": "string" - }, - "isCancellationRequested": { - "description": "Indicates whether a request to cancel this operation has been made.", - "type": "boolean" - }, - "createTime": { - "format": "google-datetime", - "description": "The time the operation was submitted.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1__OperationMetadata", - "description": "Represents the metadata of the long-running operation.\n\nNext ID: 9" - }, - "GoogleCloudMlV1beta1__OperationMetadata": { - "properties": { - "isCancellationRequested": { - "description": "Indicates whether a request to cancel this operation has been made.", - "type": "boolean" - }, - "createTime": { - "format": "google-datetime", - "description": "The time the operation was submitted.", - "type": "string" - }, - "modelName": { - "description": "Contains the name of the model associated with the operation.", - "type": "string" - }, - "version": { - "description": "Contains the version associated with the operation.", - "$ref": "GoogleCloudMlV1beta1__Version" - }, - "endTime": { - "format": "google-datetime", - "description": "The time operation processing completed.", - "type": "string" - }, - "operationType": { - "enumDescriptions": [ - "Unspecified operation type.", - "An operation to create a new version.", - "An operation to delete an existing version.", - "An operation to delete an existing model." - ], - "enum": [ - "OPERATION_TYPE_UNSPECIFIED", - "CREATE_VERSION", - "DELETE_VERSION", - "DELETE_MODEL" - ], - "description": "The operation type.", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "The time operation processing started.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1beta1__OperationMetadata", - "description": "Represents the metadata of the long-running operation.\n\nNext ID: 9", - "type": "object" - }, - "GoogleIamV1__AuditLogConfig": { - "type": "object", - "properties": { - "logType": { - "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" - ], - "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" - ], - "description": "The log type that this config enables.", - "type": "string" - }, - "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" - } - }, - "id": "GoogleIamV1__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." - }, - "GoogleType__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\"", - "type": "object", - "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" - } - }, - "id": "GoogleType__Expr" - }, - "GoogleCloudMlV1beta1__ListModelsResponse": { - "description": "Response message for the ListModels method.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Optional. Pass this token as the `page_token` field of the request for a\nsubsequent call.", - "type": "string" - }, - "models": { - "description": "The list of models.", - "items": { - "$ref": "GoogleCloudMlV1beta1__Model" - }, - "type": "array" - } - }, - "id": "GoogleCloudMlV1beta1__ListModelsResponse" - }, - "GoogleLongrunning__Operation": { - "type": "object", - "properties": { - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "response": { - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" - }, - "error": { - "$ref": "GoogleRpc__Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any." - } - }, - "id": "GoogleLongrunning__Operation", - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call." - }, - "GoogleIamV1__AuditConfig": { - "properties": { - "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" - }, - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.\nNext ID: 4", - "items": { - "$ref": "GoogleIamV1__AuditLogConfig" - }, - "type": "array" - }, - "exemptedMembers": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "GoogleIamV1__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\nAuditConfig 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.", - "type": "object" - }, - "GoogleCloudMlV1beta1__HyperparameterOutput": { - "description": "Represents the result of a single hyperparameter tuning trial from a\ntraining job. The TrainingOutput object that is returned on successful\ncompletion of a training job with hyperparameter tuning includes a list\nof HyperparameterOutput objects, one for each successful trial.", - "type": "object", - "properties": { - "hyperparameters": { - "additionalProperties": { - "type": "string" - }, - "description": "The hyperparameters given to this trial.", - "type": "object" - }, - "trialId": { - "description": "The trial id for these results.", - "type": "string" - }, - "allMetrics": { - "items": { - "$ref": "GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric" - }, - "type": "array", - "description": "All recorded object metrics for this trial." - }, - "finalMetric": { - "description": "The final objective metric seen for this trial.", - "$ref": "GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric" - } - }, - "id": "GoogleCloudMlV1beta1__HyperparameterOutput" - }, - "GoogleProtobuf__Empty": { - "type": "object", - "properties": {}, - "id": "GoogleProtobuf__Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`." - } - }, - "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, - "protocol": "rest", - "canonicalName": "Cloud Machine Learning Engine", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "rootUrl": "https://ml.googleapis.com/", - "ownerDomain": "google.com", - "name": "ml", - "batchPath": "batch", - "title": "Google Cloud Machine Learning Engine", - "ownerName": "Google", - "resources": { - "projects": { - "methods": { - "getConfig": { - "description": "Get the service account information associated with your project. You need\nthis information in order to grant the service account persmissions for\nthe Google Cloud Storage location where you put your model training code\nfor training the model with Google Cloud Machine Learning.", - "httpMethod": "GET", - "response": { - "$ref": "GoogleCloudMlV1beta1__GetConfigResponse" - }, - "parameterOrder": [ - "name" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "Required. The project name.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1beta1/projects/{projectsId}:getConfig", - "path": "v1beta1/{+name}:getConfig", - "id": "ml.projects.getConfig" - }, - "predict": { - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "GoogleApi__HttpBody" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "Required. The resource name of a model or a version.\n\nAuthorization: requires the `predict` permission on the specified resource.", - "type": "string", - "required": true, - "pattern": "^projects/.+$", - "location": "path" - } - }, - "flatPath": "v1beta1/projects/{projectsId}:predict", - "path": "v1beta1/{+name}:predict", - "id": "ml.projects.predict", - "request": { - "$ref": "GoogleCloudMlV1beta1__PredictRequest" - }, - "description": "Performs prediction on the data in the request.\n\n**** REMOVE FROM GENERATED DOCUMENTATION" - } - }, - "resources": { - "models": { - "methods": { - "delete": { - "path": "v1beta1/{+name}", - "id": "ml.projects.models.delete", - "description": "Deletes a model.\n\nYou can only delete a model if there are no versions in it. You can delete\nversions by calling\n[projects.models.versions.delete](/ml-engine/reference/rest/v1beta1/projects.models.versions/delete).", - "httpMethod": "DELETE", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "GoogleLongrunning__Operation" - }, - "parameters": { - "name": { - "location": "path", - "description": "Required. The name of the model.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}" - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "GoogleCloudMlV1beta1__ListModelsResponse" - }, - "parameters": { - "parent": { - "description": "Required. The name of the project whose models are to be listed.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - }, - "pageToken": { - "type": "string", - "location": "query", - "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call." - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional. The number of models to retrieve per \"page\" of results. If there\nare more remaining results than this number, the response message will\ncontain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", - "type": "integer" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/models", - "path": "v1beta1/{+parent}/models", - "id": "ml.projects.models.list", - "description": "Lists the models in a project.\n\nEach project can contain multiple models, and each model can have multiple\nversions." - }, - "create": { - "request": { - "$ref": "GoogleCloudMlV1beta1__Model" - }, - "description": "Creates a model which will later contain one or more versions.\n\nYou must add at least one version before you can request predictions from\nthe model. Add versions by calling\n[projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects.models.versions/create).", - "response": { - "$ref": "GoogleCloudMlV1beta1__Model" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "location": "path", - "description": "Required. The project name.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - } - }, - "flatPath": "v1beta1/projects/{projectsId}/models", - "id": "ml.projects.models.create", - "path": "v1beta1/{+parent}/models" - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "GoogleIamV1__SetIamPolicyRequest" - }, - "response": { - "$ref": "GoogleIamV1__Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}:setIamPolicy", - "id": "ml.projects.models.setIamPolicy", - "path": "v1beta1/{+resource}:setIamPolicy" - }, - "getIamPolicy": { - "path": "v1beta1/{+resource}:getIamPolicy", - "id": "ml.projects.models.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.", - "httpMethod": "GET", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "GoogleIamV1__Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$" - } - }, - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}:getIamPolicy" - }, - "get": { - "description": "Gets information about a model, including its name, the description (if\nset), and the default version (if at least one version of the model has\nbeen deployed).", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "GoogleCloudMlV1beta1__Model" - }, - "parameters": { - "name": { - "description": "Required. The name of the model.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}", - "path": "v1beta1/{+name}", - "id": "ml.projects.models.get" - }, - "testIamPermissions": { - "request": { - "$ref": "GoogleIamV1__TestIamPermissionsRequest" - }, - "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.", - "response": { - "$ref": "GoogleIamV1__TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "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.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}:testIamPermissions", - "id": "ml.projects.models.testIamPermissions", - "path": "v1beta1/{+resource}:testIamPermissions" - } - }, - "resources": { - "versions": { - "methods": { - "get": { - "path": "v1beta1/{+name}", - "id": "ml.projects.models.versions.get", - "description": "Gets information about a model version.\n\nModels can have multiple versions. You can call\n[projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list)\nto get the same information that this method returns for all of the\nversions of a model.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "GoogleCloudMlV1beta1__Version" - }, - "parameters": { - "name": { - "location": "path", - "description": "Required. The name of the version.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}" - }, - "list": { - "description": "Gets basic information about all the versions of a model.\n\nIf you expect that a model has a lot of versions, or if you need to handle\nonly a limited number of results at a time, you can request that the list\nbe retrieved in batches (called pages):", - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "GoogleCloudMlV1beta1__ListVersionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "pageToken": { - "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional. The number of versions to retrieve per \"page\" of results. If\nthere are more remaining results than this number, the response message\nwill contain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", - "type": "integer" - }, - "parent": { - "pattern": "^projects/[^/]+/models/[^/]+$", - "location": "path", - "description": "Required. The name of the model for which to list the version.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions", - "path": "v1beta1/{+parent}/versions", - "id": "ml.projects.models.versions.list" - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "GoogleLongrunning__Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "pattern": "^projects/[^/]+/models/[^/]+$", - "location": "path", - "description": "Required. The name of the model.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions", - "path": "v1beta1/{+parent}/versions", - "id": "ml.projects.models.versions.create", - "request": { - "$ref": "GoogleCloudMlV1beta1__Version" - }, - "description": "Creates a new version of a model from a trained TensorFlow model.\n\nIf the version created in the cloud by this call is the first deployed\nversion of the specified model, it will be made the default version of the\nmodel. When you add a version to a model that already has one or more\nversions, the default version does not automatically change. If you want a\nnew version to be the default, you must call\n[projects.models.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault)." - }, - "setDefault": { - "parameters": { - "name": { - "description": "Required. The name of the version to make the default for the model. You\ncan get the names of all the versions of a model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list).", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}:setDefault", - "id": "ml.projects.models.versions.setDefault", - "path": "v1beta1/{+name}:setDefault", - "description": "Designates a version to be the default for the model.\n\nThe default version is used for prediction requests made against the model\nthat don't specify a version.\n\nThe first version to be created for a model is automatically set as the\ndefault. You must make any subsequent changes to the default version\nsetting manually using this method.", - "request": { - "$ref": "GoogleCloudMlV1beta1__SetDefaultVersionRequest" - }, - "response": { - "$ref": "GoogleCloudMlV1beta1__Version" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST" - }, - "delete": { - "description": "Deletes a model version.\n\nEach model can have multiple versions deployed and in use at any given\ntime. Use this method to remove a single version.\n\nNote: You cannot delete the version that is set as the default version\nof the model unless it is the only remaining version.", - "response": { - "$ref": "GoogleLongrunning__Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "parameters": { - "name": { - "description": "Required. The name of the version. You can get the names of all the\nversions of a model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list).", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}", - "id": "ml.projects.models.versions.delete", - "path": "v1beta1/{+name}" - } - } - } - } - }, - "operations": { - "methods": { - "cancel": { - "response": { - "$ref": "GoogleProtobuf__Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/operations/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1beta1/projects/{projectsId}/operations/{operationsId}:cancel", - "id": "ml.projects.operations.cancel", - "path": "v1beta1/{+name}:cancel", - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`." - }, - "delete": { - "httpMethod": "DELETE", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "GoogleProtobuf__Empty" - }, - "parameters": { - "name": { - "description": "The name of the operation resource to be deleted.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/operations/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/operations/{operationsId}", - "path": "v1beta1/{+name}", - "id": "ml.projects.operations.delete", - "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`." - }, - "get": { - "response": { - "$ref": "GoogleLongrunning__Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "pattern": "^projects/[^/]+/operations/[^/]+$", - "location": "path", - "description": "The name of the operation resource.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/operations/{operationsId}", - "id": "ml.projects.operations.get", - "path": "v1beta1/{+name}", - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "GoogleLongrunning__ListOperationsResponse" - }, - "parameters": { - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" - }, - "pageToken": { - "location": "query", - "description": "The standard list page token.", - "type": "string" - }, - "name": { - "description": "The name of the operation's parent resource.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/operations", - "path": "v1beta1/{+name}/operations", - "id": "ml.projects.operations.list", - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id." - } - } - }, - "jobs": { - "methods": { - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "GoogleCloudMlV1beta1__Job" - }, - "parameters": { - "name": { - "location": "path", - "description": "Required. The name of the job to get the description of.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/jobs/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/jobs/{jobsId}", - "path": "v1beta1/{+name}", - "id": "ml.projects.jobs.get", - "description": "Describes a job." - }, - "list": { - "response": { - "$ref": "GoogleCloudMlV1beta1__ListJobsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional. The number of jobs to retrieve per \"page\" of results. If there\nare more remaining results than this number, the response message will\ncontain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", - "type": "integer" - }, - "parent": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "Required. The name of the project for which to list jobs.", - "type": "string", - "required": true - }, - "filter": { - "description": "Optional. Specifies the subset of jobs to retrieve.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1beta1/projects/{projectsId}/jobs", - "id": "ml.projects.jobs.list", - "path": "v1beta1/{+parent}/jobs", - "description": "Lists the jobs in the project." - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "GoogleCloudMlV1beta1__Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "Required. The project name.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta1/projects/{projectsId}/jobs", - "path": "v1beta1/{+parent}/jobs", - "id": "ml.projects.jobs.create", - "request": { - "$ref": "GoogleCloudMlV1beta1__Job" - }, - "description": "Creates a training or a batch prediction job." - }, - "cancel": { - "request": { - "$ref": "GoogleCloudMlV1beta1__CancelJobRequest" - }, - "description": "Cancels a running job.", - "response": { - "$ref": "GoogleProtobuf__Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "Required. The name of the job to cancel.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/jobs/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1beta1/projects/{projectsId}/jobs/{jobsId}:cancel", - "id": "ml.projects.jobs.cancel", - "path": "v1beta1/{+name}:cancel" - } - } - } - } - } - }, - "parameters": { - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "key": { - "location": "query", - "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.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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", - "description": "Data format for response.", - "default": "json" - } - }, - "version": "v1beta1", - "baseUrl": "https://ml.googleapis.com/", - "servicePath": "", - "description": "An API to enable creating and using machine learning models.", - "kind": "discovery#restDescription" + "error": { + "code": 404, + "message": "Discovery document not found for API service: ml.googleapis.com format: rest version: v1beta1", + "status": "NOT_FOUND" + } } diff --git a/vendor/google.golang.org/api/ml/v1beta1/ml-gen.go b/vendor/google.golang.org/api/ml/v1beta1/ml-gen.go index 11ca3acc9..aac3ad9f0 100644 --- a/vendor/google.golang.org/api/ml/v1beta1/ml-gen.go +++ b/vendor/google.golang.org/api/ml/v1beta1/ml-gen.go @@ -1,6 +1,4 @@ -// Package ml provides access to the Google Cloud Machine Learning Engine. -// -// See https://cloud.google.com/ml/ +// Package ml provides access to the . // // Usage example: // @@ -40,23 +38,16 @@ var _ = strings.Replace var _ = context.Canceled var _ = ctxhttp.Do -const apiId = "ml:v1beta1" -const apiName = "ml" -const apiVersion = "v1beta1" -const basePath = "https://ml.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" -) +const apiId = "" +const apiName = "" +const apiVersion = "" +const basePath = "https://www.googleapis.com/discovery/v1/apis" func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} - s.Projects = NewProjectsService(s) return s, nil } @@ -64,8 +55,6 @@ type Service struct { client *http.Client BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment - - Projects *ProjectsService } func (s *Service) userAgent() string { @@ -74,6420 +63,3 @@ func (s *Service) userAgent() string { } return googleapi.UserAgent + " " + s.UserAgent } - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - rs.Jobs = NewProjectsJobsService(s) - rs.Models = NewProjectsModelsService(s) - rs.Operations = NewProjectsOperationsService(s) - return rs -} - -type ProjectsService struct { - s *Service - - Jobs *ProjectsJobsService - - Models *ProjectsModelsService - - Operations *ProjectsOperationsService -} - -func NewProjectsJobsService(s *Service) *ProjectsJobsService { - rs := &ProjectsJobsService{s: s} - return rs -} - -type ProjectsJobsService struct { - s *Service -} - -func NewProjectsModelsService(s *Service) *ProjectsModelsService { - rs := &ProjectsModelsService{s: s} - rs.Versions = NewProjectsModelsVersionsService(s) - return rs -} - -type ProjectsModelsService struct { - s *Service - - Versions *ProjectsModelsVersionsService -} - -func NewProjectsModelsVersionsService(s *Service) *ProjectsModelsVersionsService { - rs := &ProjectsModelsVersionsService{s: s} - return rs -} - -type ProjectsModelsVersionsService struct { - s *Service -} - -func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { - rs := &ProjectsOperationsService{s: s} - return rs -} - -type ProjectsOperationsService struct { - s *Service -} - -// GoogleApi__HttpBody: Message that represents an arbitrary HTTP body. -// It should only be used for -// payload formats that can't be represented as JSON, such as raw binary -// or -// an HTML page. -// -// -// This message can be used both in streaming and non-streaming API -// methods in -// the request as well as the response. -// -// It can be used as a top-level request field, which is convenient if -// one -// wants to extract parameters from either the URL or HTTP template into -// the -// request fields and also want access to the raw HTTP body. -// -// Example: -// -// message GetResourceRequest { -// // A unique request id. -// string request_id = 1; -// -// // The raw HTTP body is bound to this field. -// google.api.HttpBody http_body = 2; -// } -// -// service ResourceService { -// rpc GetResource(GetResourceRequest) returns -// (google.api.HttpBody); -// rpc UpdateResource(google.api.HttpBody) returns -// (google.protobuf.Empty); -// } -// -// Example with streaming methods: -// -// service CaldavService { -// rpc GetCalendar(stream google.api.HttpBody) -// returns (stream google.api.HttpBody); -// rpc UpdateCalendar(stream google.api.HttpBody) -// returns (stream google.api.HttpBody); -// } -// -// Use of this type only changes how the request and response bodies -// are -// handled, all other features will continue to work unchanged. -type GoogleApi__HttpBody struct { - // ContentType: The HTTP Content-Type string representing the content - // type of the body. - ContentType string `json:"contentType,omitempty"` - - // Data: HTTP body binary data. - Data string `json:"data,omitempty"` - - // Extensions: Application specific response metadata. Must be set in - // the first response - // for streaming APIs. - Extensions []googleapi.RawMessage `json:"extensions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ContentType") 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. "ContentType") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleApi__HttpBody) MarshalJSON() ([]byte, error) { - type noMethod GoogleApi__HttpBody - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1__AutoScaling: Options for automatically scaling a -// model. -type GoogleCloudMlV1__AutoScaling struct { - // MinNodes: Optional. The minimum number of nodes to allocate for this - // model. These - // nodes are always up, starting from the time the model is deployed, so - // the - // cost of operating this model will be at least - // `rate` * `min_nodes` * number of hours since last billing - // cycle, - // where `rate` is the cost per node-hour as documented - // in - // [pricing](https://cloud.google.com/ml-engine/pricing#prediction_pri - // cing), - // even if no predictions are performed. There is additional cost for - // each - // prediction performed. - // - // Unlike manual scaling, if the load gets too heavy for the nodes - // that are up, the service will automatically add nodes to handle - // the - // increased load as well as scale back as traffic drops, always - // maintaining - // at least `min_nodes`. You will be charged for the time in which - // additional - // nodes are used. - // - // If not specified, `min_nodes` defaults to 0, in which case, when - // traffic - // to a model stops (and after a cool-down period), nodes will be shut - // down - // and no charges will be incurred until traffic to the model resumes. - MinNodes int64 `json:"minNodes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MinNodes") 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. "MinNodes") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1__AutoScaling) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1__AutoScaling - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1__ManualScaling: Options for manually scaling a model. -type GoogleCloudMlV1__ManualScaling struct { - // Nodes: The number of nodes to allocate for this model. These nodes - // are always up, - // starting from the time the model is deployed, so the cost of - // operating - // this model will be proportional to `nodes` * number of hours - // since - // last billing cycle plus the cost for each prediction performed. - Nodes int64 `json:"nodes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Nodes") 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. "Nodes") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1__ManualScaling) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1__ManualScaling - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1__OperationMetadata: Represents the metadata of the -// long-running operation. -// -// Next ID: 9 -type GoogleCloudMlV1__OperationMetadata struct { - // CreateTime: The time the operation was submitted. - CreateTime string `json:"createTime,omitempty"` - - // EndTime: The time operation processing completed. - EndTime string `json:"endTime,omitempty"` - - // IsCancellationRequested: Indicates whether a request to cancel this - // operation has been made. - IsCancellationRequested bool `json:"isCancellationRequested,omitempty"` - - // ModelName: Contains the name of the model associated with the - // operation. - ModelName string `json:"modelName,omitempty"` - - // OperationType: The operation type. - // - // Possible values: - // "OPERATION_TYPE_UNSPECIFIED" - Unspecified operation type. - // "CREATE_VERSION" - An operation to create a new version. - // "DELETE_VERSION" - An operation to delete an existing version. - // "DELETE_MODEL" - An operation to delete an existing model. - OperationType string `json:"operationType,omitempty"` - - // StartTime: The time operation processing started. - StartTime string `json:"startTime,omitempty"` - - // Version: Contains the version associated with the operation. - Version *GoogleCloudMlV1__Version `json:"version,omitempty"` - - // 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 *GoogleCloudMlV1__OperationMetadata) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1__OperationMetadata - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1__Version: Represents a version of the model. -// -// Each version is a trained model deployed in the cloud, ready to -// handle -// prediction requests. A model can have multiple versions. You can -// get -// information about all of the versions of a given model by -// calling -// [projects.models.versions.list](/ml-engine/reference/rest/v1/p -// rojects.models.versions/list). -// -// Next ID: 18 -type GoogleCloudMlV1__Version struct { - // AutoScaling: Automatically scale the number of nodes used to serve - // the model in - // response to increases and decreases in traffic. Care should be - // taken to ramp up traffic according to the model's ability to scale - // or you will start seeing increases in latency and 429 response codes. - AutoScaling *GoogleCloudMlV1__AutoScaling `json:"autoScaling,omitempty"` - - // CreateTime: Output only. The time the version was created. - CreateTime string `json:"createTime,omitempty"` - - // DeploymentUri: Required. The Google Cloud Storage location of the - // trained model used to - // create the version. See the - // [overview of - // model - // deployment](/ml-engine/docs/concepts/deployment-overview) for - // more - // information. - // - // When passing Version - // to - // [projects.models.versions.create](/ml-engine/reference/rest/v1/proj - // ects.models.versions/create) - // the model service uses the specified location as the source of the - // model. - // Once deployed, the model version is hosted by the prediction service, - // so - // this location is useful only as a historical record. - // The total number of model files can't exceed 1000. - DeploymentUri string `json:"deploymentUri,omitempty"` - - // Description: Optional. The description specified for the version when - // it was created. - Description string `json:"description,omitempty"` - - // ErrorMessage: Output only. The details of a failure or a - // cancellation. - ErrorMessage string `json:"errorMessage,omitempty"` - - // IsDefault: Output only. If true, this version will be used to handle - // prediction - // requests that do not specify a version. - // - // You can change the default version by - // calling - // [projects.methods.versions.setDefault](/ml-engine/reference/re - // st/v1/projects.models.versions/setDefault). - IsDefault bool `json:"isDefault,omitempty"` - - // LastUseTime: Output only. The time the version was last used for - // prediction. - LastUseTime string `json:"lastUseTime,omitempty"` - - // ManualScaling: Manually select the number of nodes to use for serving - // the - // model. You should generally use `auto_scaling` with an - // appropriate - // `min_nodes` instead, but this option is available if you want - // more - // predictable billing. Beware that latency and error rates will - // increase - // if the traffic exceeds that capability of the system to serve it - // based - // on the selected number of nodes. - ManualScaling *GoogleCloudMlV1__ManualScaling `json:"manualScaling,omitempty"` - - // Name: Required.The name specified for the version when it was - // created. - // - // The version name must be unique within the model it is created in. - Name string `json:"name,omitempty"` - - // RuntimeVersion: Optional. The Google Cloud ML runtime version to use - // for this deployment. - // If not set, Google Cloud ML will choose a version. - RuntimeVersion string `json:"runtimeVersion,omitempty"` - - // State: Output only. The state of a version. - // - // Possible values: - // "UNKNOWN" - The version state is unspecified. - // "READY" - The version is ready for prediction. - // "CREATING" - The version is still in the process of creation. - // "FAILED" - The version failed to be created, possibly - // cancelled. - // `error_message` should contain the details of the failure. - State string `json:"state,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoScaling") 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. "AutoScaling") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1__Version) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1__Version - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric: An -// observed value of a metric. -type GoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric struct { - // ObjectiveValue: The objective value at this training step. - ObjectiveValue float64 `json:"objectiveValue,omitempty"` - - // TrainingStep: The global training step for this metric. - TrainingStep int64 `json:"trainingStep,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ObjectiveValue") 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. "ObjectiveValue") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric) UnmarshalJSON(data []byte) error { - type noMethod GoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric - var s1 struct { - ObjectiveValue gensupport.JSONFloat64 `json:"objectiveValue"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ObjectiveValue = float64(s1.ObjectiveValue) - return nil -} - -// GoogleCloudMlV1beta1__AutoScaling: Options for automatically scaling -// a model. -type GoogleCloudMlV1beta1__AutoScaling struct { - // MinNodes: Optional. The minimum number of nodes to allocate for this - // model. These - // nodes are always up, starting from the time the model is deployed, so - // the - // cost of operating this model will be at least - // `rate` * `min_nodes` * number of hours since last billing - // cycle, - // where `rate` is the cost per node-hour as documented - // in - // [pricing](https://cloud.google.com/ml-engine/pricing#prediction_pri - // cing), - // even if no predictions are performed. There is additional cost for - // each - // prediction performed. - // - // Unlike manual scaling, if the load gets too heavy for the nodes - // that are up, the service will automatically add nodes to handle - // the - // increased load as well as scale back as traffic drops, always - // maintaining - // at least `min_nodes`. You will be charged for the time in which - // additional - // nodes are used. - // - // If not specified, `min_nodes` defaults to 0, in which case, when - // traffic - // to a model stops (and after a cool-down period), nodes will be shut - // down - // and no charges will be incurred until traffic to the model resumes. - MinNodes int64 `json:"minNodes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MinNodes") 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. "MinNodes") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__AutoScaling) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__AutoScaling - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__CancelJobRequest: Request message for the -// CancelJob method. -type GoogleCloudMlV1beta1__CancelJobRequest struct { -} - -// GoogleCloudMlV1beta1__GetConfigResponse: Returns service account -// information associated with a project. -type GoogleCloudMlV1beta1__GetConfigResponse struct { - // ServiceAccount: The service account Cloud ML uses to access resources - // in the project. - ServiceAccount string `json:"serviceAccount,omitempty"` - - // ServiceAccountProject: The project number for `service_account`. - ServiceAccountProject int64 `json:"serviceAccountProject,omitempty,string"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ServiceAccount") 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. "ServiceAccount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__GetConfigResponse) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__GetConfigResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__HyperparameterOutput: Represents the result of -// a single hyperparameter tuning trial from a -// training job. The TrainingOutput object that is returned on -// successful -// completion of a training job with hyperparameter tuning includes a -// list -// of HyperparameterOutput objects, one for each successful trial. -type GoogleCloudMlV1beta1__HyperparameterOutput struct { - // AllMetrics: All recorded object metrics for this trial. - AllMetrics []*GoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric `json:"allMetrics,omitempty"` - - // FinalMetric: The final objective metric seen for this trial. - FinalMetric *GoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric `json:"finalMetric,omitempty"` - - // Hyperparameters: The hyperparameters given to this trial. - Hyperparameters map[string]string `json:"hyperparameters,omitempty"` - - // TrialId: The trial id for these results. - TrialId string `json:"trialId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AllMetrics") 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. "AllMetrics") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__HyperparameterOutput) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__HyperparameterOutput - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__HyperparameterSpec: Represents a set of -// hyperparameters to optimize. -type GoogleCloudMlV1beta1__HyperparameterSpec struct { - // Goal: Required. The type of goal to use for tuning. Available types - // are - // `MAXIMIZE` and `MINIMIZE`. - // - // Defaults to `MAXIMIZE`. - // - // Possible values: - // "GOAL_TYPE_UNSPECIFIED" - Goal Type will default to maximize. - // "MAXIMIZE" - Maximize the goal metric. - // "MINIMIZE" - Minimize the goal metric. - Goal string `json:"goal,omitempty"` - - // HyperparameterMetricTag: Optional. The Tensorflow summary tag name to - // use for optimizing trials. For - // current versions of Tensorflow, this tag name should exactly match - // what is - // shown in Tensorboard, including all scopes. For versions of - // Tensorflow - // prior to 0.12, this should be only the tag passed to tf.Summary. - // By default, "training/hptuning/metric" will be used. - HyperparameterMetricTag string `json:"hyperparameterMetricTag,omitempty"` - - // MaxParallelTrials: Optional. The number of training trials to run - // concurrently. - // You can reduce the time it takes to perform hyperparameter tuning by - // adding - // trials in parallel. However, each trail only benefits from the - // information - // gained in completed trials. That means that a trial does not get - // access to - // the results of trials running at the same time, which could reduce - // the - // quality of the overall optimization. - // - // Each trial will use the same scale tier and machine types. - // - // Defaults to one. - MaxParallelTrials int64 `json:"maxParallelTrials,omitempty"` - - // MaxTrials: Optional. How many training trials should be attempted to - // optimize - // the specified hyperparameters. - // - // Defaults to one. - MaxTrials int64 `json:"maxTrials,omitempty"` - - // Params: Required. The set of parameters to tune. - Params []*GoogleCloudMlV1beta1__ParameterSpec `json:"params,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Goal") 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. "Goal") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__HyperparameterSpec) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__HyperparameterSpec - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__Job: Represents a training or prediction -// job. -// -// Next ID: 16 -type GoogleCloudMlV1beta1__Job struct { - // CreateTime: Output only. When the job was created. - CreateTime string `json:"createTime,omitempty"` - - // EndTime: Output only. When the job processing was completed. - EndTime string `json:"endTime,omitempty"` - - // ErrorMessage: Output only. The details of a failure or a - // cancellation. - ErrorMessage string `json:"errorMessage,omitempty"` - - // JobId: Required. The user-specified id of the job. - JobId string `json:"jobId,omitempty"` - - // PredictionInput: Input parameters to create a prediction job. - PredictionInput *GoogleCloudMlV1beta1__PredictionInput `json:"predictionInput,omitempty"` - - // PredictionOutput: The current prediction job result. - PredictionOutput *GoogleCloudMlV1beta1__PredictionOutput `json:"predictionOutput,omitempty"` - - // StartTime: Output only. When the job processing was started. - StartTime string `json:"startTime,omitempty"` - - // State: Output only. The detailed state of a job. - // - // Possible values: - // "STATE_UNSPECIFIED" - The job state is unspecified. - // "QUEUED" - The job has been just created and processing has not yet - // begun. - // "PREPARING" - The service is preparing to run the job. - // "RUNNING" - The job is in progress. - // "SUCCEEDED" - The job completed successfully. - // "FAILED" - The job failed. - // `error_message` should contain the details of the failure. - // "CANCELLING" - The job is being cancelled. - // `error_message` should describe the reason for the cancellation. - // "CANCELLED" - The job has been cancelled. - // `error_message` should describe the reason for the cancellation. - State string `json:"state,omitempty"` - - // TrainingInput: Input parameters to create a training job. - TrainingInput *GoogleCloudMlV1beta1__TrainingInput `json:"trainingInput,omitempty"` - - // TrainingOutput: The current training job result. - TrainingOutput *GoogleCloudMlV1beta1__TrainingOutput `json:"trainingOutput,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 *GoogleCloudMlV1beta1__Job) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__Job - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__ListJobsResponse: Response message for the -// ListJobs method. -type GoogleCloudMlV1beta1__ListJobsResponse struct { - // Jobs: The list of jobs. - Jobs []*GoogleCloudMlV1beta1__Job `json:"jobs,omitempty"` - - // NextPageToken: Optional. Pass this token as the `page_token` field of - // the request for a - // subsequent call. - 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. "Jobs") 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. "Jobs") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__ListJobsResponse) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__ListJobsResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__ListModelsResponse: Response message for the -// ListModels method. -type GoogleCloudMlV1beta1__ListModelsResponse struct { - // Models: The list of models. - Models []*GoogleCloudMlV1beta1__Model `json:"models,omitempty"` - - // NextPageToken: Optional. Pass this token as the `page_token` field of - // the request for a - // subsequent call. - 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. "Models") 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. "Models") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__ListModelsResponse) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__ListModelsResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__ListVersionsResponse: Response message for the -// ListVersions method. -type GoogleCloudMlV1beta1__ListVersionsResponse struct { - // NextPageToken: Optional. Pass this token as the `page_token` field of - // the request for a - // subsequent call. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Versions: The list of versions. - Versions []*GoogleCloudMlV1beta1__Version `json:"versions,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 *GoogleCloudMlV1beta1__ListVersionsResponse) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__ListVersionsResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__ManualScaling: Options for manually scaling a -// model. -type GoogleCloudMlV1beta1__ManualScaling struct { - // Nodes: The number of nodes to allocate for this model. These nodes - // are always up, - // starting from the time the model is deployed, so the cost of - // operating - // this model will be proportional to `nodes` * number of hours - // since - // last billing cycle plus the cost for each prediction performed. - Nodes int64 `json:"nodes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Nodes") 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. "Nodes") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__ManualScaling) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__ManualScaling - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__Model: Represents a machine learning -// solution. -// -// A model can have multiple versions, each of which is a deployed, -// trained -// model ready to receive prediction requests. The model itself is just -// a -// container. -// -// Next ID: 8 -type GoogleCloudMlV1beta1__Model struct { - // DefaultVersion: Output only. The default version of the model. This - // version will be used to - // handle prediction requests that do not specify a version. - // - // You can change the default version by - // calling - // [projects.methods.versions.setDefault](/ml-engine/reference/re - // st/v1beta1/projects.models.versions/setDefault). - DefaultVersion *GoogleCloudMlV1beta1__Version `json:"defaultVersion,omitempty"` - - // Description: Optional. The description specified for the model when - // it was created. - Description string `json:"description,omitempty"` - - // Name: Required. The name specified for the model when it was - // created. - // - // The model name must be unique within the project it is created in. - Name string `json:"name,omitempty"` - - // OnlinePredictionLogging: Optional. If true, enables StackDriver - // Logging for online prediction. - // Default is false. - OnlinePredictionLogging bool `json:"onlinePredictionLogging,omitempty"` - - // Regions: Optional. The list of regions where the model is going to be - // deployed. - // Currently only one region per model is supported. - // Defaults to 'us-central1' if nothing is set. - // Note: - // * No matter where a model is deployed, it can always be accessed - // by - // users from anywhere, both for online and batch prediction. - // * The region for a batch prediction job is set by the region field - // when - // submitting the batch prediction job and does not take its value - // from - // this field. - Regions []string `json:"regions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "DefaultVersion") 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. "DefaultVersion") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__Model) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__Model - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__OperationMetadata: Represents the metadata of -// the long-running operation. -// -// Next ID: 9 -type GoogleCloudMlV1beta1__OperationMetadata struct { - // CreateTime: The time the operation was submitted. - CreateTime string `json:"createTime,omitempty"` - - // EndTime: The time operation processing completed. - EndTime string `json:"endTime,omitempty"` - - // IsCancellationRequested: Indicates whether a request to cancel this - // operation has been made. - IsCancellationRequested bool `json:"isCancellationRequested,omitempty"` - - // ModelName: Contains the name of the model associated with the - // operation. - ModelName string `json:"modelName,omitempty"` - - // OperationType: The operation type. - // - // Possible values: - // "OPERATION_TYPE_UNSPECIFIED" - Unspecified operation type. - // "CREATE_VERSION" - An operation to create a new version. - // "DELETE_VERSION" - An operation to delete an existing version. - // "DELETE_MODEL" - An operation to delete an existing model. - OperationType string `json:"operationType,omitempty"` - - // StartTime: The time operation processing started. - StartTime string `json:"startTime,omitempty"` - - // Version: Contains the version associated with the operation. - Version *GoogleCloudMlV1beta1__Version `json:"version,omitempty"` - - // 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 *GoogleCloudMlV1beta1__OperationMetadata) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__OperationMetadata - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__ParameterSpec: Represents a single -// hyperparameter to optimize. -type GoogleCloudMlV1beta1__ParameterSpec struct { - // CategoricalValues: Required if type is `CATEGORICAL`. The list of - // possible categories. - CategoricalValues []string `json:"categoricalValues,omitempty"` - - // DiscreteValues: Required if type is `DISCRETE`. - // A list of feasible points. - // The list should be in strictly increasing order. For instance, - // this - // parameter might have possible settings of 1.5, 2.5, and 4.0. This - // list - // should not contain more than 1,000 values. - DiscreteValues []float64 `json:"discreteValues,omitempty"` - - // MaxValue: Required if typeis `DOUBLE` or `INTEGER`. This field - // should be unset if type is `CATEGORICAL`. This value should be - // integers if - // type is `INTEGER`. - MaxValue float64 `json:"maxValue,omitempty"` - - // MinValue: Required if type is `DOUBLE` or `INTEGER`. This - // field - // should be unset if type is `CATEGORICAL`. This value should be - // integers if - // type is INTEGER. - MinValue float64 `json:"minValue,omitempty"` - - // ParameterName: Required. The parameter name must be unique amongst - // all ParameterConfigs in - // a HyperparameterSpec message. E.g., "learning_rate". - ParameterName string `json:"parameterName,omitempty"` - - // ScaleType: Optional. How the parameter should be scaled to the - // hypercube. - // Leave unset for categorical parameters. - // Some kind of scaling is strongly recommended for real or - // integral - // parameters (e.g., `UNIT_LINEAR_SCALE`). - // - // Possible values: - // "NONE" - By default, no scaling is applied. - // "UNIT_LINEAR_SCALE" - Scales the feasible space to (0, 1) linearly. - // "UNIT_LOG_SCALE" - Scales the feasible space logarithmically to (0, - // 1). The entire feasible - // space must be strictly positive. - // "UNIT_REVERSE_LOG_SCALE" - Scales the feasible space "reverse" - // logarithmically to (0, 1). The result - // is that values close to the top of the feasible space are spread out - // more - // than points near the bottom. The entire feasible space must be - // strictly - // positive. - ScaleType string `json:"scaleType,omitempty"` - - // Type: Required. The type of the parameter. - // - // Possible values: - // "PARAMETER_TYPE_UNSPECIFIED" - You must specify a valid type. Using - // this unspecified type will result in - // an error. - // "DOUBLE" - Type for real-valued parameters. - // "INTEGER" - Type for integral parameters. - // "CATEGORICAL" - The parameter is categorical, with a value chosen - // from the categories - // field. - // "DISCRETE" - The parameter is real valued, with a fixed set of - // feasible points. If - // `type==DISCRETE`, feasible_points must be provided, and - // {`min_value`, `max_value`} will be ignored. - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CategoricalValues") - // 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. "CategoricalValues") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__ParameterSpec) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__ParameterSpec - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudMlV1beta1__ParameterSpec) UnmarshalJSON(data []byte) error { - type noMethod GoogleCloudMlV1beta1__ParameterSpec - var s1 struct { - MaxValue gensupport.JSONFloat64 `json:"maxValue"` - MinValue gensupport.JSONFloat64 `json:"minValue"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MaxValue = float64(s1.MaxValue) - s.MinValue = float64(s1.MinValue) - return nil -} - -// GoogleCloudMlV1beta1__PredictRequest: Request for predictions to be -// issued against a trained model. -// -// The body of the request is a single JSON object with a single -// top-level -// field: -// -//
    -//
    instances
    -//
    A JSON array containing values representing the instances to -// use for -// prediction.
    -//
    -// -// The structure of each element of the instances list is determined by -// your -// model's input definition. Instances can include named inputs or can -// contain -// only unlabeled values. -// -// Not all data includes named inputs. Some instances will be -// simple -// JSON values (boolean, number, or string). However, instances are -// often lists -// of simple values, or complex nested lists. Here are some examples of -// request -// bodies: -// -// CSV data with each row encoded as a string value: -//
    -// {"instances": ["1.0,true,\\"x\\"",
    -// "-2.0,false,\\"y\\""]}
    -// 
    -// Plain text: -//
    -// {"instances": ["the quick brown fox", "la bruja le
    -// dio"]}
    -// 
    -// Sentences encoded as lists of words (vectors of strings): -//
    -// {
    -//   "instances": [
    -//     ["the","quick","brown"],
    -//     ["la","bruja","le"],
    -//     ...
    -//   ]
    -// }
    -// 
    -// Floating point scalar values: -//
    -// {"instances": [0.0, 1.1, 2.2]}
    -// 
    -// Vectors of integers: -//
    -// {
    -//   "instances": [
    -//     [0, 1, 2],
    -//     [3, 4, 5],
    -//     ...
    -//   ]
    -// }
    -// 
    -// Tensors (in this case, two-dimensional tensors): -//
    -// {
    -//   "instances": [
    -//     [
    -//       [0, 1, 2],
    -//       [3, 4, 5]
    -//     ],
    -//     ...
    -//   ]
    -// }
    -// 
    -// Images can be represented different ways. In this encoding scheme the -// first -// two dimensions represent the rows and columns of the image, and the -// third -// contains lists (vectors) of the R, G, and B values for each -// pixel. -//
    -// {
    -//   "instances": [
    -//     [
    -//       [
    -//         [138, 30, 66],
    -//         [130, 20, 56],
    -//         ...
    -//       ],
    -//       [
    -//         [126, 38, 61],
    -//         [122, 24, 57],
    -//         ...
    -//       ],
    -//       ...
    -//     ],
    -//     ...
    -//   ]
    -// }
    -// 
    -// JSON strings must be encoded as UTF-8. To send binary data, you -// must -// base64-encode the data and mark it as binary. To mark a JSON -// string -// as binary, replace it with a JSON object with a single attribute -// named `b64`: -//
    {"b64": "..."} 
    -// For example: -// -// Two Serialized tf.Examples (fake data, for illustrative purposes -// only): -//
    -// {"instances": [{"b64": "X5ad6u"}, {"b64": "IA9j4nx"}]}
    -// 
    -// Two JPEG image byte strings (fake data, for illustrative purposes -// only): -//
    -// {"instances": [{"b64": "ASa8asdf"}, {"b64": "JLK7ljk3"}]}
    -// 
    -// If your data includes named references, format each instance as a -// JSON object -// with the named references as the keys: -// -// JSON input data to be preprocessed: -//
    -// {
    -//   "instances": [
    -//     {
    -//       "a": 1.0,
    -//       "b": true,
    -//       "c": "x"
    -//     },
    -//     {
    -//       "a": -2.0,
    -//       "b": false,
    -//       "c": "y"
    -//     }
    -//   ]
    -// }
    -// 
    -// Some models have an underlying TensorFlow graph that accepts multiple -// input -// tensors. In this case, you should use the names of JSON name/value -// pairs to -// identify the input tensors, as shown in the following exmaples: -// -// For a graph with input tensor aliases "tag" (string) and -// "image" -// (base64-encoded string): -//
    -// {
    -//   "instances": [
    -//     {
    -//       "tag": "beach",
    -//       "image": {"b64": "ASa8asdf"}
    -//     },
    -//     {
    -//       "tag": "car",
    -//       "image": {"b64": "JLK7ljk3"}
    -//     }
    -//   ]
    -// }
    -// 
    -// For a graph with input tensor aliases "tag" (string) and -// "image" -// (3-dimensional array of 8-bit ints): -//
    -// {
    -//   "instances": [
    -//     {
    -//       "tag": "beach",
    -//       "image": [
    -//         [
    -//           [138, 30, 66],
    -//           [130, 20, 56],
    -//           ...
    -//         ],
    -//         [
    -//           [126, 38, 61],
    -//           [122, 24, 57],
    -//           ...
    -//         ],
    -//         ...
    -//       ]
    -//     },
    -//     {
    -//       "tag": "car",
    -//       "image": [
    -//         [
    -//           [255, 0, 102],
    -//           [255, 0, 97],
    -//           ...
    -//         ],
    -//         [
    -//           [254, 1, 101],
    -//           [254, 2, 93],
    -//           ...
    -//         ],
    -//         ...
    -//       ]
    -//     },
    -//     ...
    -//   ]
    -// }
    -// 
    -// If the call is successful, the response body will contain one -// prediction -// entry per instance in the request body. If prediction fails for -// any -// instance, the response body will contain no predictions and will -// contian -// a single error entry instead. -type GoogleCloudMlV1beta1__PredictRequest struct { - // HttpBody: - // Required. The prediction request body. - HttpBody *GoogleApi__HttpBody `json:"httpBody,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HttpBody") 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. "HttpBody") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__PredictRequest) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__PredictRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__PredictionInput: Represents input parameters -// for a prediction job. -type GoogleCloudMlV1beta1__PredictionInput struct { - // BatchSize: Optional. Number of records per batch, defaults to 64. - // The service will buffer batch_size number of records in memory - // before - // invoking one Tensorflow prediction call internally. So take the - // record - // size and memory available into consideration when setting this - // parameter. - BatchSize int64 `json:"batchSize,omitempty,string"` - - // DataFormat: Required. The format of the input data files. - // - // Possible values: - // "DATA_FORMAT_UNSPECIFIED" - Unspecified format. - // "TEXT" - The source file is a text file with instances separated by - // the - // new-line character. - // "TF_RECORD" - The source file is a TFRecord file. - // "TF_RECORD_GZIP" - The source file is a GZIP-compressed TFRecord - // file. - DataFormat string `json:"dataFormat,omitempty"` - - // InputPaths: Required. The Google Cloud Storage location of the input - // data files. - // May contain wildcards. - InputPaths []string `json:"inputPaths,omitempty"` - - // MaxWorkerCount: Optional. The maximum number of workers to be used - // for parallel processing. - // Defaults to 10 if not specified. - MaxWorkerCount int64 `json:"maxWorkerCount,omitempty,string"` - - // ModelName: Use this field if you want to use the default version for - // the specified - // model. The string must use the following - // format: - // - // "projects/[YOUR_PROJECT]/models/[YOUR_MODEL] - // " - ModelName string `json:"modelName,omitempty"` - - // OutputPath: Required. The output Google Cloud Storage location. - OutputPath string `json:"outputPath,omitempty"` - - // Region: Required. The Google Compute Engine region to run the - // prediction job in. - Region string `json:"region,omitempty"` - - // RuntimeVersion: Optional. The Google Cloud ML runtime version to use - // for this batch - // prediction. If not set, Google Cloud ML will pick the runtime version - // used - // during the CreateVersion request for this model version, or choose - // the - // latest stable version when model version information is not - // available - // such as when the model is specified by uri. - RuntimeVersion string `json:"runtimeVersion,omitempty"` - - // Uri: Use this field if you want to specify a Google Cloud Storage - // path for - // the model to use. - Uri string `json:"uri,omitempty"` - - // VersionName: Use this field if you want to specify a version of the - // model to use. The - // string is formatted the same way as `model_version`, with the - // addition - // of the version - // information: - // - // "projects/[YOUR_PROJECT]/models/YOUR_MO - // DEL/versions/[YOUR_VERSION]" - VersionName string `json:"versionName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BatchSize") 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. "BatchSize") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__PredictionInput) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__PredictionInput - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__PredictionOutput: Represents results of a -// prediction job. -type GoogleCloudMlV1beta1__PredictionOutput struct { - // ErrorCount: The number of data instances which resulted in errors. - ErrorCount int64 `json:"errorCount,omitempty,string"` - - // NodeHours: Node hours used by the batch prediction job. - NodeHours float64 `json:"nodeHours,omitempty"` - - // OutputPath: The output Google Cloud Storage location provided at the - // job creation time. - OutputPath string `json:"outputPath,omitempty"` - - // PredictionCount: The number of generated predictions. - PredictionCount int64 `json:"predictionCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ErrorCount") 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. "ErrorCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__PredictionOutput) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__PredictionOutput - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudMlV1beta1__PredictionOutput) UnmarshalJSON(data []byte) error { - type noMethod GoogleCloudMlV1beta1__PredictionOutput - var s1 struct { - NodeHours gensupport.JSONFloat64 `json:"nodeHours"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.NodeHours = float64(s1.NodeHours) - return nil -} - -// GoogleCloudMlV1beta1__SetDefaultVersionRequest: Request message for -// the SetDefaultVersion request. -type GoogleCloudMlV1beta1__SetDefaultVersionRequest struct { -} - -// GoogleCloudMlV1beta1__TrainingInput: Represents input parameters for -// a training job. -type GoogleCloudMlV1beta1__TrainingInput struct { - // Args: Optional. Command line arguments to pass to the program. - Args []string `json:"args,omitempty"` - - // Hyperparameters: Optional. The set of Hyperparameters to tune. - Hyperparameters *GoogleCloudMlV1beta1__HyperparameterSpec `json:"hyperparameters,omitempty"` - - // JobDir: Optional. A Google Cloud Storage path in which to store - // training outputs - // and other data needed for training. This path is passed to your - // TensorFlow - // program as the 'job_dir' command-line argument. The benefit of - // specifying - // this field is that Cloud ML validates the path for use in training. - JobDir string `json:"jobDir,omitempty"` - - // MasterType: Optional. Specifies the type of virtual machine to use - // for your training - // job's master worker. - // - // The following types are supported: - // - //
    - //
    standard
    - //
    - // A basic machine configuration suitable for training simple models - // with - // small to moderate datasets. - //
    - //
    large_model
    - //
    - // A machine with a lot of memory, specially suited for parameter - // servers - // when your model is large (having many hidden layers or layers with - // very - // large numbers of nodes). - //
    - //
    complex_model_s
    - //
    - // A machine suitable for the master and workers of the cluster when - // your - // model requires more computation than the standard machine can - // handle - // satisfactorily. - //
    - //
    complex_model_m
    - //
    - // A machine with roughly twice the number of cores and roughly double - // the - // memory of complex_model_s. - //
    - //
    complex_model_l
    - //
    - // A machine with roughly twice the number of cores and roughly double - // the - // memory of complex_model_m. - //
    - //
    standard_gpu
    - //
    - // A machine equivalent to standard that - // also includes a - // - // GPU that you can use in your trainer. - //
    - //
    complex_model_m_gpu
    - //
    - // A machine equivalent to - // complex_model_m that also - // includes - // four GPUs. - //
    - //
    - // - // You must set this value when `scaleTier` is set to `CUSTOM`. - MasterType string `json:"masterType,omitempty"` - - // PackageUris: Required. The Google Cloud Storage location of the - // packages with - // the training program and any additional dependencies. - // The maximum number of package URIs is 100. - PackageUris []string `json:"packageUris,omitempty"` - - // ParameterServerCount: Optional. The number of parameter server - // replicas to use for the training - // job. Each replica in the cluster will be of the type specified - // in - // `parameter_server_type`. - // - // This value can only be used when `scale_tier` is set to `CUSTOM`.If - // you - // set this value, you must also set `parameter_server_type`. - ParameterServerCount int64 `json:"parameterServerCount,omitempty,string"` - - // ParameterServerType: Optional. Specifies the type of virtual machine - // to use for your training - // job's parameter server. - // - // The supported values are the same as those described in the entry - // for - // `master_type`. - // - // This value must be present when `scaleTier` is set to `CUSTOM` - // and - // `parameter_server_count` is greater than zero. - ParameterServerType string `json:"parameterServerType,omitempty"` - - // PythonModule: Required. The Python module name to run after - // installing the packages. - PythonModule string `json:"pythonModule,omitempty"` - - // Region: Required. The Google Compute Engine region to run the - // training job in. - Region string `json:"region,omitempty"` - - // RuntimeVersion: Optional. The Google Cloud ML runtime version to use - // for training. If not - // set, Google Cloud ML will choose the latest stable version. - RuntimeVersion string `json:"runtimeVersion,omitempty"` - - // ScaleTier: Required. Specifies the machine types, the number of - // replicas for workers - // and parameter servers. - // - // Possible values: - // "BASIC" - A single worker instance. This tier is suitable for - // learning how to use - // Cloud ML, and for experimenting with new models using small datasets. - // "STANDARD_1" - Many workers and a few parameter servers. - // "PREMIUM_1" - A large number of workers with many parameter - // servers. - // "BASIC_GPU" - A single worker instance [with - // a - // GPU](/ml-engine/docs/how-tos/using-gpus). - // "CUSTOM" - The CUSTOM tier is not a set tier, but rather enables - // you to use your - // own cluster specification. When you use this tier, set values - // to - // configure your processing cluster according to these guidelines: - // - // * You _must_ set `TrainingInput.masterType` to specify the type - // of machine to use for your master node. This is the only - // required - // setting. - // - // * You _may_ set `TrainingInput.workerCount` to specify the number - // of - // workers to use. If you specify one or more workers, you _must_ - // also - // set `TrainingInput.workerType` to specify the type of machine to - // use - // for your worker nodes. - // - // * You _may_ set `TrainingInput.parameterServerCount` to specify - // the - // number of parameter servers to use. If you specify one or more - // parameter servers, you _must_ also set - // `TrainingInput.parameterServerType` to specify the type of - // machine to - // use for your parameter servers. - // - // Note that all of your workers must use the same machine type, which - // can - // be different from your parameter server type and master type. - // Your - // parameter servers must likewise use the same machine type, which can - // be - // different from your worker type and master type. - ScaleTier string `json:"scaleTier,omitempty"` - - // WorkerCount: Optional. The number of worker replicas to use for the - // training job. Each - // replica in the cluster will be of the type specified in - // `worker_type`. - // - // This value can only be used when `scale_tier` is set to `CUSTOM`. If - // you - // set this value, you must also set `worker_type`. - WorkerCount int64 `json:"workerCount,omitempty,string"` - - // WorkerType: Optional. Specifies the type of virtual machine to use - // for your training - // job's worker nodes. - // - // The supported values are the same as those described in the entry - // for - // `masterType`. - // - // This value must be present when `scaleTier` is set to `CUSTOM` - // and - // `workerCount` is greater than zero. - WorkerType string `json:"workerType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Args") 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. "Args") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__TrainingInput) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__TrainingInput - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudMlV1beta1__TrainingOutput: Represents results of a -// training job. Output only. -type GoogleCloudMlV1beta1__TrainingOutput struct { - // CompletedTrialCount: The number of hyperparameter tuning trials that - // completed successfully. - // Only set for hyperparameter tuning jobs. - CompletedTrialCount int64 `json:"completedTrialCount,omitempty,string"` - - // ConsumedMLUnits: The amount of ML units consumed by the job. - ConsumedMLUnits float64 `json:"consumedMLUnits,omitempty"` - - // IsHyperparameterTuningJob: Whether this job is a hyperparameter - // tuning job. - IsHyperparameterTuningJob bool `json:"isHyperparameterTuningJob,omitempty"` - - // Trials: Results for individual Hyperparameter trials. - // Only set for hyperparameter tuning jobs. - Trials []*GoogleCloudMlV1beta1__HyperparameterOutput `json:"trials,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CompletedTrialCount") - // 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. "CompletedTrialCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__TrainingOutput) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__TrainingOutput - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudMlV1beta1__TrainingOutput) UnmarshalJSON(data []byte) error { - type noMethod GoogleCloudMlV1beta1__TrainingOutput - var s1 struct { - ConsumedMLUnits gensupport.JSONFloat64 `json:"consumedMLUnits"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConsumedMLUnits = float64(s1.ConsumedMLUnits) - return nil -} - -// GoogleCloudMlV1beta1__Version: Represents a version of the -// model. -// -// Each version is a trained model deployed in the cloud, ready to -// handle -// prediction requests. A model can have multiple versions. You can -// get -// information about all of the versions of a given model by -// calling -// [projects.models.versions.list](/ml-engine/reference/rest/v1be -// ta1/projects.models.versions/list). -// -// Next ID: 18 -type GoogleCloudMlV1beta1__Version struct { - // AutoScaling: Automatically scale the number of nodes used to serve - // the model in - // response to increases and decreases in traffic. Care should be - // taken to ramp up traffic according to the model's ability to scale - // or you will start seeing increases in latency and 429 response codes. - AutoScaling *GoogleCloudMlV1beta1__AutoScaling `json:"autoScaling,omitempty"` - - // CreateTime: Output only. The time the version was created. - CreateTime string `json:"createTime,omitempty"` - - // DeploymentUri: Required. The Google Cloud Storage location of the - // trained model used to - // create the version. See the - // [overview of - // model - // deployment](/ml-engine/docs/concepts/deployment-overview) for - // more - // information. - // - // When passing Version - // to - // [projects.models.versions.create](/ml-engine/reference/rest/v1beta1 - // /projects.models.versions/create) - // the model service uses the specified location as the source of the - // model. - // Once deployed, the model version is hosted by the prediction service, - // so - // this location is useful only as a historical record. - // The total number of model files can't exceed 1000. - DeploymentUri string `json:"deploymentUri,omitempty"` - - // Description: Optional. The description specified for the version when - // it was created. - Description string `json:"description,omitempty"` - - // ErrorMessage: Output only. The details of a failure or a - // cancellation. - ErrorMessage string `json:"errorMessage,omitempty"` - - // IsDefault: Output only. If true, this version will be used to handle - // prediction - // requests that do not specify a version. - // - // You can change the default version by - // calling - // [projects.methods.versions.setDefault](/ml-engine/reference/re - // st/v1beta1/projects.models.versions/setDefault). - IsDefault bool `json:"isDefault,omitempty"` - - // LastUseTime: Output only. The time the version was last used for - // prediction. - LastUseTime string `json:"lastUseTime,omitempty"` - - // ManualScaling: Manually select the number of nodes to use for serving - // the - // model. You should generally use `auto_scaling` with an - // appropriate - // `min_nodes` instead, but this option is available if you want - // more - // predictable billing. Beware that latency and error rates will - // increase - // if the traffic exceeds that capability of the system to serve it - // based - // on the selected number of nodes. - ManualScaling *GoogleCloudMlV1beta1__ManualScaling `json:"manualScaling,omitempty"` - - // Name: Required.The name specified for the version when it was - // created. - // - // The version name must be unique within the model it is created in. - Name string `json:"name,omitempty"` - - // RuntimeVersion: Optional. The Google Cloud ML runtime version to use - // for this deployment. - // If not set, Google Cloud ML will choose a version. - RuntimeVersion string `json:"runtimeVersion,omitempty"` - - // State: Output only. The state of a version. - // - // Possible values: - // "UNKNOWN" - The version state is unspecified. - // "READY" - The version is ready for prediction. - // "CREATING" - The version is still in the process of creation. - // "FAILED" - The version failed to be created, possibly - // cancelled. - // `error_message` should contain the details of the failure. - State string `json:"state,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AutoScaling") 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. "AutoScaling") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudMlV1beta1__Version) MarshalJSON() ([]byte, error) { - type noMethod GoogleCloudMlV1beta1__Version - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1LogConfigCloudAuditOptions: Write a Cloud Audit log -type GoogleIamV1LogConfigCloudAuditOptions struct { - // LogName: The log_name to populate in the Cloud Audit Record. - // - // Possible values: - // "UNSPECIFIED_LOG_NAME" - Default. Should not be used. - // "ADMIN_ACTIVITY" - Corresponds to - // "cloudaudit.googleapis.com/activity" - // "DATA_ACCESS" - Corresponds to - // "cloudaudit.googleapis.com/data_access" - LogName string `json:"logName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LogName") 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. "LogName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleIamV1LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1LogConfigCloudAuditOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1LogConfigCounterOptions: Increment a streamz counter with -// the specified metric and field names. -// -// Metric 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. -// -// Field names correspond to IAM request parameters and field values -// are -// their respective values. -// -// 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) -// * decrementing the counter -// * incrementing it by anything other than 1 -type GoogleIamV1LogConfigCounterOptions struct { - // Field: The field value to attribute. - Field string `json:"field,omitempty"` - - // Metric: The metric to update. - Metric string `json:"metric,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleIamV1LogConfigCounterOptions) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1LogConfigCounterOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1LogConfigDataAccessOptions: Write a Data Access (Gin) log -type GoogleIamV1LogConfigDataAccessOptions struct { - // LogMode: Whether Gin logging should happen in a fail-closed manner at - // the caller. - // This is relevant only in the LocalIAM implementation, for now. - // - // Possible values: - // "LOG_MODE_UNSPECIFIED" - Client is not required to write a partial - // Gin log immediately after - // the authorization check. If client chooses to write one and it - // fails, - // client may either fail open (allow the operation to continue) or - // fail closed (handle as a DENY outcome). - // "LOG_FAIL_CLOSED" - The application's operation in the context of - // which this authorization - // check is being made may only be performed if it is successfully - // logged - // to Gin. For instance, the authorization library may satisfy - // this - // obligation by emitting a partial log entry at authorization check - // time - // and only returning ALLOW to the application if it succeeds. - // - // If a matching Rule has this directive, but the client has not - // indicated - // that it will honor such requirements, then the IAM check will result - // in - // authorization failure by setting CheckPolicyResponse.success=false. - LogMode string `json:"logMode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LogMode") 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. "LogMode") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleIamV1LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1LogConfigDataAccessOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1__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 -// AuditConfig 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 GoogleIamV1__AuditConfig struct { - // AuditLogConfigs: The configuration for logging of each type of - // permission. - // Next ID: 4 - AuditLogConfigs []*GoogleIamV1__AuditLogConfig `json:"auditLogConfigs,omitempty"` - - ExemptedMembers []string `json:"exemptedMembers,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 *GoogleIamV1__AuditConfig) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1__AuditConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1__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 GoogleIamV1__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 *GoogleIamV1__AuditLogConfig) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1__AuditLogConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1__Binding: Associates `members` with a `role`. -type GoogleIamV1__Binding struct { - // Condition: 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. - // This field is GOOGLE_INTERNAL. - Condition *GoogleType__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` or `joe@example.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`. - // Required - 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 *GoogleIamV1__Binding) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1__Binding - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1__Condition: A condition to be met. -type GoogleIamV1__Condition struct { - // Iam: Trusted attributes supplied by the IAM system. - // - // Possible values: - // "NO_ATTR" - Default non-attribute. - // "AUTHORITY" - Either principal or (if present) authority selector. - // "ATTRIBUTION" - The principal (even if an authority selector is - // present), which - // must only be used for attribution, not authorization. - // "APPROVER" - An approver (distinct from the requester) that has - // authorized this - // request. - // When used with IN, the condition indicates that one of the - // approvers - // associated with the request matches the specified principal, or is - // a - // member of the specified group. Approvers can only grant - // additional - // access, and are thus only used in a strictly positive context - // (e.g. ALLOW/IN or DENY/NOT_IN). - // "JUSTIFICATION_TYPE" - What types of justifications have been - // supplied with this request. - // String values should match enum names from - // tech.iam.JustificationType, - // e.g. "MANUAL_STRING". It is not permitted to grant access based - // on - // the *absence* of a justification, so justification conditions can - // only - // be used in a "positive" context (e.g., ALLOW/IN or - // DENY/NOT_IN). - // - // Multiple justifications, e.g., a Buganizer ID and a - // manually-entered - // reason, are normal and supported. - Iam string `json:"iam,omitempty"` - - // Op: An operator to apply the subject with. - // - // Possible values: - // "NO_OP" - Default no-op. - // "EQUALS" - DEPRECATED. Use IN instead. - // "NOT_EQUALS" - DEPRECATED. Use NOT_IN instead. - // "IN" - The condition is true if the subject (or any element of it - // if it is - // a set) matches any of the supplied values. - // "NOT_IN" - The condition is true if the subject (or every element - // of it if it is - // a set) matches none of the supplied values. - // "DISCHARGED" - Subject is discharged - Op string `json:"op,omitempty"` - - // Svc: Trusted attributes discharged by the service. - Svc string `json:"svc,omitempty"` - - // Sys: Trusted attributes supplied by any service that owns resources - // and uses - // the IAM system for access control. - // - // Possible values: - // "NO_ATTR" - Default non-attribute type - // "REGION" - Region of the resource - // "SERVICE" - Service name - // "NAME" - Resource name - // "IP" - IP address of the caller - Sys string `json:"sys,omitempty"` - - // Value: DEPRECATED. Use 'values' instead. - Value string `json:"value,omitempty"` - - // Values: The objects of the condition. This is mutually exclusive with - // 'value'. - Values []string `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Iam") 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. "Iam") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleIamV1__Condition) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1__Condition - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1__LogConfig: Specifies what kind of log the caller must -// write -type GoogleIamV1__LogConfig struct { - // CloudAudit: Cloud audit options. - CloudAudit *GoogleIamV1LogConfigCloudAuditOptions `json:"cloudAudit,omitempty"` - - // Counter: Counter options. - Counter *GoogleIamV1LogConfigCounterOptions `json:"counter,omitempty"` - - // DataAccess: Data access options. - DataAccess *GoogleIamV1LogConfigDataAccessOptions `json:"dataAccess,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CloudAudit") 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. "CloudAudit") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleIamV1__LogConfig) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1__LogConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1__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. -// -// **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"] -// } -// ] -// } -// -// For a description of IAM and its features, see the -// [IAM developer's guide](https://cloud.google.com/iam). -type GoogleIamV1__Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this - // policy. - AuditConfigs []*GoogleIamV1__AuditConfig `json:"auditConfigs,omitempty"` - - // Bindings: Associates a list of `members` to a `role`. - // `bindings` with no members will result in an error. - Bindings []*GoogleIamV1__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"` - - IamOwned bool `json:"iamOwned,omitempty"` - - // Rules: If more than one rule is specified, the rules are applied in - // the following - // manner: - // - All matching LOG rules are always applied. - // - If any DENY/DENY_WITH_LOG rule matches, permission is denied. - // Logging will be applied if one or more matching rule requires - // logging. - // - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is - // granted. - // Logging will be applied if one or more matching rule requires - // logging. - // - Otherwise, if no rule applies, permission is denied. - Rules []*GoogleIamV1__Rule `json:"rules,omitempty"` - - // Version: Version of the `Policy`. The default version is 0. - 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 *GoogleIamV1__Policy) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1__Policy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1__Rule: A rule to be applied in a Policy. -type GoogleIamV1__Rule struct { - // Action: Required - // - // Possible values: - // "NO_ACTION" - Default no action. - // "ALLOW" - Matching 'Entries' grant access. - // "ALLOW_WITH_LOG" - Matching 'Entries' grant access and the caller - // promises to log - // the request per the returned log_configs. - // "DENY" - Matching 'Entries' deny access. - // "DENY_WITH_LOG" - Matching 'Entries' deny access and the caller - // promises to log - // the request per the returned log_configs. - // "LOG" - Matching 'Entries' tell IAM.Check callers to generate logs. - Action string `json:"action,omitempty"` - - // Conditions: Additional restrictions that must be met - Conditions []*GoogleIamV1__Condition `json:"conditions,omitempty"` - - // Description: Human-readable description of the rule. - Description string `json:"description,omitempty"` - - // In: If one or more 'in' clauses are specified, the rule matches - // if - // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. - In []string `json:"in,omitempty"` - - // LogConfig: The config returned to callers of tech.iam.IAM.CheckPolicy - // for any entries - // that match the LOG action. - LogConfig []*GoogleIamV1__LogConfig `json:"logConfig,omitempty"` - - // NotIn: If one or more 'not_in' clauses are specified, the rule - // matches - // if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. - // The format for in and not_in entries is the same as for members in - // a - // Binding (see google/iam/v1/policy.proto). - NotIn []string `json:"notIn,omitempty"` - - // Permissions: A permission is a string of form '..' - // (e.g., 'storage.buckets.list'). A value of '*' matches all - // permissions, - // and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleIamV1__Rule) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1__Rule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1__SetIamPolicyRequest: Request message for `SetIamPolicy` -// method. -type GoogleIamV1__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 *GoogleIamV1__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 *GoogleIamV1__SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1__SetIamPolicyRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1__TestIamPermissionsRequest: Request message for -// `TestIamPermissions` method. -type GoogleIamV1__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 *GoogleIamV1__TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1__TestIamPermissionsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1__TestIamPermissionsResponse: Response message for -// `TestIamPermissions` method. -type GoogleIamV1__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 *GoogleIamV1__TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type noMethod GoogleIamV1__TestIamPermissionsResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleLongrunning__ListOperationsResponse: The response message for -// Operations.ListOperations. -type GoogleLongrunning__ListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*GoogleLongrunning__Operation `json:"operations,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "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 *GoogleLongrunning__ListOperationsResponse) MarshalJSON() ([]byte, error) { - type noMethod GoogleLongrunning__ListOperationsResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleLongrunning__Operation: This resource represents a long-running -// operation that is the result of a -// network API call. -type GoogleLongrunning__Operation struct { - // Done: If the value is `false`, it means the operation is still in - // progress. - // If true, the operation is completed, and either `error` or `response` - // is - // available. - Done bool `json:"done,omitempty"` - - // Error: The error result of the operation in case of failure or - // cancellation. - Error *GoogleRpc__Status `json:"error,omitempty"` - - // Metadata: Service-specific metadata associated with the operation. - // It typically - // contains progress information and common metadata such as create - // time. - // Some services might not provide such metadata. Any method that - // returns a - // long-running operation should document the metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - - // Name: The server-assigned name, which is only unique within the same - // service that - // originally returns it. If you use the default HTTP mapping, - // the - // `name` should have the format of `operations/some/unique/name`. - Name string `json:"name,omitempty"` - - // Response: The normal response of the operation in case of success. - // If the original - // method returns no data on success, such as `Delete`, the response - // is - // `google.protobuf.Empty`. If the original method is - // standard - // `Get`/`Create`/`Update`, the response should be the resource. For - // other - // methods, the response should have the type `XxxResponse`, where - // `Xxx` - // is the original method name. For example, if the original method - // name - // is `TakeSnapshot()`, the inferred response type - // is - // `TakeSnapshotResponse`. - Response googleapi.RawMessage `json:"response,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleLongrunning__Operation) MarshalJSON() ([]byte, error) { - type noMethod GoogleLongrunning__Operation - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleProtobuf__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 GoogleProtobuf__Empty struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} - -// GoogleRpc__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 needs -// -// # Overview -// -// The `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 mapping -// -// The `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 uses -// -// The 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 GoogleRpc__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 *GoogleRpc__Status) MarshalJSON() ([]byte, error) { - type noMethod GoogleRpc__Status - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleType__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 GoogleType__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 *GoogleType__Expr) MarshalJSON() ([]byte, error) { - type noMethod GoogleType__Expr - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "ml.projects.getConfig": - -type ProjectsGetConfigCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetConfig: Get the service account information associated with your -// project. You need -// this information in order to grant the service account persmissions -// for -// the Google Cloud Storage location where you put your model training -// code -// for training the model with Google Cloud Machine Learning. -func (r *ProjectsService) GetConfig(name string) *ProjectsGetConfigCall { - c := &ProjectsGetConfigCall{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 *ProjectsGetConfigCall) Fields(s ...googleapi.Field) *ProjectsGetConfigCall { - 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 *ProjectsGetConfigCall) IfNoneMatch(entityTag string) *ProjectsGetConfigCall { - 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 *ProjectsGetConfigCall) Context(ctx context.Context) *ProjectsGetConfigCall { - 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 *ProjectsGetConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:getConfig") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.getConfig" call. -// Exactly one of *GoogleCloudMlV1beta1__GetConfigResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudMlV1beta1__GetConfigResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1beta1__GetConfigResponse, 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 := &GoogleCloudMlV1beta1__GetConfigResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Get the service account information associated with your project. You need\nthis information in order to grant the service account persmissions for\nthe Google Cloud Storage location where you put your model training code\nfor training the model with Google Cloud Machine Learning.", - // "flatPath": "v1beta1/projects/{projectsId}:getConfig", - // "httpMethod": "GET", - // "id": "ml.projects.getConfig", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The project name.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:getConfig", - // "response": { - // "$ref": "GoogleCloudMlV1beta1__GetConfigResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.predict": - -type ProjectsPredictCall struct { - s *Service - name string - googlecloudmlv1beta1__predictrequest *GoogleCloudMlV1beta1__PredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Predict: Performs prediction on the data in the request. -// -// **** REMOVE FROM GENERATED DOCUMENTATION -func (r *ProjectsService) Predict(name string, googlecloudmlv1beta1__predictrequest *GoogleCloudMlV1beta1__PredictRequest) *ProjectsPredictCall { - c := &ProjectsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudmlv1beta1__predictrequest = googlecloudmlv1beta1__predictrequest - 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 *ProjectsPredictCall) Fields(s ...googleapi.Field) *ProjectsPredictCall { - 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 *ProjectsPredictCall) Context(ctx context.Context) *ProjectsPredictCall { - 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 *ProjectsPredictCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsPredictCall) 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.googlecloudmlv1beta1__predictrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:predict") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.predict" call. -// Exactly one of *GoogleApi__HttpBody or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleApi__HttpBody.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApi__HttpBody, 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 := &GoogleApi__HttpBody{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Performs prediction on the data in the request.\n\n**** REMOVE FROM GENERATED DOCUMENTATION", - // "flatPath": "v1beta1/projects/{projectsId}:predict", - // "httpMethod": "POST", - // "id": "ml.projects.predict", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The resource name of a model or a version.\n\nAuthorization: requires the `predict` permission on the specified resource.", - // "location": "path", - // "pattern": "^projects/.+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:predict", - // "request": { - // "$ref": "GoogleCloudMlV1beta1__PredictRequest" - // }, - // "response": { - // "$ref": "GoogleApi__HttpBody" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.jobs.cancel": - -type ProjectsJobsCancelCall struct { - s *Service - name string - googlecloudmlv1beta1__canceljobrequest *GoogleCloudMlV1beta1__CancelJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels a running job. -func (r *ProjectsJobsService) Cancel(name string, googlecloudmlv1beta1__canceljobrequest *GoogleCloudMlV1beta1__CancelJobRequest) *ProjectsJobsCancelCall { - c := &ProjectsJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudmlv1beta1__canceljobrequest = googlecloudmlv1beta1__canceljobrequest - 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 *ProjectsJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsJobsCancelCall { - 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 *ProjectsJobsCancelCall) Context(ctx context.Context) *ProjectsJobsCancelCall { - 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 *ProjectsJobsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsJobsCancelCall) 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.googlecloudmlv1beta1__canceljobrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.jobs.cancel" call. -// Exactly one of *GoogleProtobuf__Empty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobuf__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 *ProjectsJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__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 := &GoogleProtobuf__Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Cancels a running job.", - // "flatPath": "v1beta1/projects/{projectsId}/jobs/{jobsId}:cancel", - // "httpMethod": "POST", - // "id": "ml.projects.jobs.cancel", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the job to cancel.", - // "location": "path", - // "pattern": "^projects/[^/]+/jobs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:cancel", - // "request": { - // "$ref": "GoogleCloudMlV1beta1__CancelJobRequest" - // }, - // "response": { - // "$ref": "GoogleProtobuf__Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.jobs.create": - -type ProjectsJobsCreateCall struct { - s *Service - parent string - googlecloudmlv1beta1__job *GoogleCloudMlV1beta1__Job - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a training or a batch prediction job. -func (r *ProjectsJobsService) Create(parent string, googlecloudmlv1beta1__job *GoogleCloudMlV1beta1__Job) *ProjectsJobsCreateCall { - c := &ProjectsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudmlv1beta1__job = googlecloudmlv1beta1__job - 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 *ProjectsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsJobsCreateCall { - 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 *ProjectsJobsCreateCall) Context(ctx context.Context) *ProjectsJobsCreateCall { - 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 *ProjectsJobsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsJobsCreateCall) 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.googlecloudmlv1beta1__job) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/jobs") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.jobs.create" call. -// Exactly one of *GoogleCloudMlV1beta1__Job or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudMlV1beta1__Job.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1beta1__Job, 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 := &GoogleCloudMlV1beta1__Job{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a training or a batch prediction job.", - // "flatPath": "v1beta1/projects/{projectsId}/jobs", - // "httpMethod": "POST", - // "id": "ml.projects.jobs.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The project name.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+parent}/jobs", - // "request": { - // "$ref": "GoogleCloudMlV1beta1__Job" - // }, - // "response": { - // "$ref": "GoogleCloudMlV1beta1__Job" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.jobs.get": - -type ProjectsJobsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Describes a job. -func (r *ProjectsJobsService) Get(name string) *ProjectsJobsGetCall { - c := &ProjectsJobsGetCall{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 *ProjectsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsJobsGetCall { - 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 *ProjectsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsJobsGetCall { - 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 *ProjectsJobsGetCall) Context(ctx context.Context) *ProjectsJobsGetCall { - 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 *ProjectsJobsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsJobsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.jobs.get" call. -// Exactly one of *GoogleCloudMlV1beta1__Job or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudMlV1beta1__Job.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1beta1__Job, 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 := &GoogleCloudMlV1beta1__Job{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Describes a job.", - // "flatPath": "v1beta1/projects/{projectsId}/jobs/{jobsId}", - // "httpMethod": "GET", - // "id": "ml.projects.jobs.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the job to get the description of.", - // "location": "path", - // "pattern": "^projects/[^/]+/jobs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "response": { - // "$ref": "GoogleCloudMlV1beta1__Job" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.jobs.list": - -type ProjectsJobsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the jobs in the project. -func (r *ProjectsJobsService) List(parent string) *ProjectsJobsListCall { - c := &ProjectsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Specifies the subset of -// jobs to retrieve. -func (c *ProjectsJobsListCall) Filter(filter string) *ProjectsJobsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The number of jobs -// to retrieve per "page" of results. If there -// are more remaining results than this number, the response message -// will -// contain a valid value in the `next_page_token` field. -// -// The default value is 20, and the maximum page size is 100. -func (c *ProjectsJobsListCall) PageSize(pageSize int64) *ProjectsJobsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token to -// request the next page of results. -// -// You get the token from the `next_page_token` field of the response -// from -// the previous call. -func (c *ProjectsJobsListCall) PageToken(pageToken string) *ProjectsJobsListCall { - 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 *ProjectsJobsListCall) Fields(s ...googleapi.Field) *ProjectsJobsListCall { - 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 *ProjectsJobsListCall) IfNoneMatch(entityTag string) *ProjectsJobsListCall { - 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 *ProjectsJobsListCall) Context(ctx context.Context) *ProjectsJobsListCall { - 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 *ProjectsJobsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsJobsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/jobs") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.jobs.list" call. -// Exactly one of *GoogleCloudMlV1beta1__ListJobsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudMlV1beta1__ListJobsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1beta1__ListJobsResponse, 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 := &GoogleCloudMlV1beta1__ListJobsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the jobs in the project.", - // "flatPath": "v1beta1/projects/{projectsId}/jobs", - // "httpMethod": "GET", - // "id": "ml.projects.jobs.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. Specifies the subset of jobs to retrieve.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The number of jobs to retrieve per \"page\" of results. If there\nare more remaining results than this number, the response message will\ncontain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The name of the project for which to list jobs.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+parent}/jobs", - // "response": { - // "$ref": "GoogleCloudMlV1beta1__ListJobsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV1beta1__ListJobsResponse) 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 "ml.projects.models.create": - -type ProjectsModelsCreateCall struct { - s *Service - parent string - googlecloudmlv1beta1__model *GoogleCloudMlV1beta1__Model - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a model which will later contain one or more -// versions. -// -// You must add at least one version before you can request predictions -// from -// the model. Add versions by -// calling -// [projects.models.versions.create](/ml-engine/reference/rest/v1 -// beta1/projects.models.versions/create). -func (r *ProjectsModelsService) Create(parent string, googlecloudmlv1beta1__model *GoogleCloudMlV1beta1__Model) *ProjectsModelsCreateCall { - c := &ProjectsModelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudmlv1beta1__model = googlecloudmlv1beta1__model - 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 *ProjectsModelsCreateCall) Fields(s ...googleapi.Field) *ProjectsModelsCreateCall { - 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 *ProjectsModelsCreateCall) Context(ctx context.Context) *ProjectsModelsCreateCall { - 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 *ProjectsModelsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsModelsCreateCall) 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.googlecloudmlv1beta1__model) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/models") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.models.create" call. -// Exactly one of *GoogleCloudMlV1beta1__Model or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudMlV1beta1__Model.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsModelsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1beta1__Model, 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 := &GoogleCloudMlV1beta1__Model{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a model which will later contain one or more versions.\n\nYou must add at least one version before you can request predictions from\nthe model. Add versions by calling\n[projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects.models.versions/create).", - // "flatPath": "v1beta1/projects/{projectsId}/models", - // "httpMethod": "POST", - // "id": "ml.projects.models.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The project name.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+parent}/models", - // "request": { - // "$ref": "GoogleCloudMlV1beta1__Model" - // }, - // "response": { - // "$ref": "GoogleCloudMlV1beta1__Model" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.models.delete": - -type ProjectsModelsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a model. -// -// You can only delete a model if there are no versions in it. You can -// delete -// versions by -// calling -// [projects.models.versions.delete](/ml-engine/reference/rest/v1 -// beta1/projects.models.versions/delete). -func (r *ProjectsModelsService) Delete(name string) *ProjectsModelsDeleteCall { - c := &ProjectsModelsDeleteCall{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 *ProjectsModelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsModelsDeleteCall { - 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 *ProjectsModelsDeleteCall) Context(ctx context.Context) *ProjectsModelsDeleteCall { - 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 *ProjectsModelsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsModelsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.models.delete" call. -// Exactly one of *GoogleLongrunning__Operation or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleLongrunning__Operation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleLongrunning__Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a model.\n\nYou can only delete a model if there are no versions in it. You can delete\nversions by calling\n[projects.models.versions.delete](/ml-engine/reference/rest/v1beta1/projects.models.versions/delete).", - // "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}", - // "httpMethod": "DELETE", - // "id": "ml.projects.models.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the model.", - // "location": "path", - // "pattern": "^projects/[^/]+/models/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "response": { - // "$ref": "GoogleLongrunning__Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.models.get": - -type ProjectsModelsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets information about a model, including its name, the -// description (if -// set), and the default version (if at least one version of the model -// has -// been deployed). -func (r *ProjectsModelsService) Get(name string) *ProjectsModelsGetCall { - c := &ProjectsModelsGetCall{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 *ProjectsModelsGetCall) Fields(s ...googleapi.Field) *ProjectsModelsGetCall { - 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 *ProjectsModelsGetCall) IfNoneMatch(entityTag string) *ProjectsModelsGetCall { - 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 *ProjectsModelsGetCall) Context(ctx context.Context) *ProjectsModelsGetCall { - 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 *ProjectsModelsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsModelsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.models.get" call. -// Exactly one of *GoogleCloudMlV1beta1__Model or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudMlV1beta1__Model.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsModelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1beta1__Model, 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 := &GoogleCloudMlV1beta1__Model{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets information about a model, including its name, the description (if\nset), and the default version (if at least one version of the model has\nbeen deployed).", - // "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}", - // "httpMethod": "GET", - // "id": "ml.projects.models.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the model.", - // "location": "path", - // "pattern": "^projects/[^/]+/models/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "response": { - // "$ref": "GoogleCloudMlV1beta1__Model" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.models.getIamPolicy": - -type ProjectsModelsGetIamPolicyCall 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 *ProjectsModelsService) GetIamPolicy(resource string) *ProjectsModelsGetIamPolicyCall { - c := &ProjectsModelsGetIamPolicyCall{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 *ProjectsModelsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsModelsGetIamPolicyCall { - 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 *ProjectsModelsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsModelsGetIamPolicyCall { - 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 *ProjectsModelsGetIamPolicyCall) Context(ctx context.Context) *ProjectsModelsGetIamPolicyCall { - 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 *ProjectsModelsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsModelsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - 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 "ml.projects.models.getIamPolicy" call. -// Exactly one of *GoogleIamV1__Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1__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 *ProjectsModelsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__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 := &GoogleIamV1__Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return 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": "v1beta1/projects/{projectsId}/models/{modelsId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "ml.projects.models.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/[^/]+/models/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+resource}:getIamPolicy", - // "response": { - // "$ref": "GoogleIamV1__Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.models.list": - -type ProjectsModelsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the models in a project. -// -// Each project can contain multiple models, and each model can have -// multiple -// versions. -func (r *ProjectsModelsService) List(parent string) *ProjectsModelsListCall { - c := &ProjectsModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The number of models -// to retrieve per "page" of results. If there -// are more remaining results than this number, the response message -// will -// contain a valid value in the `next_page_token` field. -// -// The default value is 20, and the maximum page size is 100. -func (c *ProjectsModelsListCall) PageSize(pageSize int64) *ProjectsModelsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token to -// request the next page of results. -// -// You get the token from the `next_page_token` field of the response -// from -// the previous call. -func (c *ProjectsModelsListCall) PageToken(pageToken string) *ProjectsModelsListCall { - 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 *ProjectsModelsListCall) Fields(s ...googleapi.Field) *ProjectsModelsListCall { - 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 *ProjectsModelsListCall) IfNoneMatch(entityTag string) *ProjectsModelsListCall { - 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 *ProjectsModelsListCall) Context(ctx context.Context) *ProjectsModelsListCall { - 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 *ProjectsModelsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsModelsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/models") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.models.list" call. -// Exactly one of *GoogleCloudMlV1beta1__ListModelsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudMlV1beta1__ListModelsResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1beta1__ListModelsResponse, 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 := &GoogleCloudMlV1beta1__ListModelsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the models in a project.\n\nEach project can contain multiple models, and each model can have multiple\nversions.", - // "flatPath": "v1beta1/projects/{projectsId}/models", - // "httpMethod": "GET", - // "id": "ml.projects.models.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "pageSize": { - // "description": "Optional. The number of models to retrieve per \"page\" of results. If there\nare more remaining results than this number, the response message will\ncontain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The name of the project whose models are to be listed.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+parent}/models", - // "response": { - // "$ref": "GoogleCloudMlV1beta1__ListModelsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsModelsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV1beta1__ListModelsResponse) 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 "ml.projects.models.setIamPolicy": - -type ProjectsModelsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1__setiampolicyrequest *GoogleIamV1__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 *ProjectsModelsService) SetIamPolicy(resource string, googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest) *ProjectsModelsSetIamPolicyCall { - c := &ProjectsModelsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1__setiampolicyrequest = googleiamv1__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 *ProjectsModelsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsModelsSetIamPolicyCall { - 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 *ProjectsModelsSetIamPolicyCall) Context(ctx context.Context) *ProjectsModelsSetIamPolicyCall { - 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 *ProjectsModelsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsModelsSetIamPolicyCall) 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.googleiamv1__setiampolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - 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 "ml.projects.models.setIamPolicy" call. -// Exactly one of *GoogleIamV1__Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1__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 *ProjectsModelsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__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 := &GoogleIamV1__Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - // "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "ml.projects.models.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/[^/]+/models/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "GoogleIamV1__SetIamPolicyRequest" - // }, - // "response": { - // "$ref": "GoogleIamV1__Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.models.testIamPermissions": - -type ProjectsModelsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1__testiampermissionsrequest *GoogleIamV1__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 *ProjectsModelsService) TestIamPermissions(resource string, googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest) *ProjectsModelsTestIamPermissionsCall { - c := &ProjectsModelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1__testiampermissionsrequest = googleiamv1__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 *ProjectsModelsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsModelsTestIamPermissionsCall { - 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 *ProjectsModelsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsModelsTestIamPermissionsCall { - 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 *ProjectsModelsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsModelsTestIamPermissionsCall) 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.googleiamv1__testiampermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - 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 "ml.projects.models.testIamPermissions" call. -// Exactly one of *GoogleIamV1__TestIamPermissionsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleIamV1__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 *ProjectsModelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__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 := &GoogleIamV1__TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return 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": "v1beta1/projects/{projectsId}/models/{modelsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "ml.projects.models.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/[^/]+/models/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "GoogleIamV1__TestIamPermissionsRequest" - // }, - // "response": { - // "$ref": "GoogleIamV1__TestIamPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.models.versions.create": - -type ProjectsModelsVersionsCreateCall struct { - s *Service - parent string - googlecloudmlv1beta1__version *GoogleCloudMlV1beta1__Version - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new version of a model from a trained TensorFlow -// model. -// -// If the version created in the cloud by this call is the first -// deployed -// version of the specified model, it will be made the default version -// of the -// model. When you add a version to a model that already has one or -// more -// versions, the default version does not automatically change. If you -// want a -// new version to be the default, you must -// call -// [projects.models.versions.setDefault](/ml-engine/reference/rest/v -// 1beta1/projects.models.versions/setDefault). -func (r *ProjectsModelsVersionsService) Create(parent string, googlecloudmlv1beta1__version *GoogleCloudMlV1beta1__Version) *ProjectsModelsVersionsCreateCall { - c := &ProjectsModelsVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudmlv1beta1__version = googlecloudmlv1beta1__version - 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 *ProjectsModelsVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsCreateCall { - 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 *ProjectsModelsVersionsCreateCall) Context(ctx context.Context) *ProjectsModelsVersionsCreateCall { - 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 *ProjectsModelsVersionsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsModelsVersionsCreateCall) 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.googlecloudmlv1beta1__version) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/versions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.models.versions.create" call. -// Exactly one of *GoogleLongrunning__Operation or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleLongrunning__Operation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsModelsVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleLongrunning__Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new version of a model from a trained TensorFlow model.\n\nIf the version created in the cloud by this call is the first deployed\nversion of the specified model, it will be made the default version of the\nmodel. When you add a version to a model that already has one or more\nversions, the default version does not automatically change. If you want a\nnew version to be the default, you must call\n[projects.models.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault).", - // "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions", - // "httpMethod": "POST", - // "id": "ml.projects.models.versions.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The name of the model.", - // "location": "path", - // "pattern": "^projects/[^/]+/models/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+parent}/versions", - // "request": { - // "$ref": "GoogleCloudMlV1beta1__Version" - // }, - // "response": { - // "$ref": "GoogleLongrunning__Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.models.versions.delete": - -type ProjectsModelsVersionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a model version. -// -// Each model can have multiple versions deployed and in use at any -// given -// time. Use this method to remove a single version. -// -// Note: You cannot delete the version that is set as the default -// version -// of the model unless it is the only remaining version. -func (r *ProjectsModelsVersionsService) Delete(name string) *ProjectsModelsVersionsDeleteCall { - c := &ProjectsModelsVersionsDeleteCall{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 *ProjectsModelsVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsDeleteCall { - 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 *ProjectsModelsVersionsDeleteCall) Context(ctx context.Context) *ProjectsModelsVersionsDeleteCall { - 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 *ProjectsModelsVersionsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsModelsVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.models.versions.delete" call. -// Exactly one of *GoogleLongrunning__Operation or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleLongrunning__Operation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsModelsVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleLongrunning__Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a model version.\n\nEach model can have multiple versions deployed and in use at any given\ntime. Use this method to remove a single version.\n\nNote: You cannot delete the version that is set as the default version\nof the model unless it is the only remaining version.", - // "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}", - // "httpMethod": "DELETE", - // "id": "ml.projects.models.versions.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the version. You can get the names of all the\nversions of a model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list).", - // "location": "path", - // "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "response": { - // "$ref": "GoogleLongrunning__Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.models.versions.get": - -type ProjectsModelsVersionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets information about a model version. -// -// Models can have multiple versions. You can -// call -// [projects.models.versions.list](/ml-engine/reference/rest/v1beta1 -// /projects.models.versions/list) -// to get the same information that this method returns for all of -// the -// versions of a model. -func (r *ProjectsModelsVersionsService) Get(name string) *ProjectsModelsVersionsGetCall { - c := &ProjectsModelsVersionsGetCall{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 *ProjectsModelsVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsGetCall { - 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 *ProjectsModelsVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsModelsVersionsGetCall { - 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 *ProjectsModelsVersionsGetCall) Context(ctx context.Context) *ProjectsModelsVersionsGetCall { - 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 *ProjectsModelsVersionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsModelsVersionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.models.versions.get" call. -// Exactly one of *GoogleCloudMlV1beta1__Version or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudMlV1beta1__Version.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsModelsVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1beta1__Version, 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 := &GoogleCloudMlV1beta1__Version{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets information about a model version.\n\nModels can have multiple versions. You can call\n[projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list)\nto get the same information that this method returns for all of the\nversions of a model.", - // "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}", - // "httpMethod": "GET", - // "id": "ml.projects.models.versions.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the version.", - // "location": "path", - // "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "response": { - // "$ref": "GoogleCloudMlV1beta1__Version" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.models.versions.list": - -type ProjectsModelsVersionsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Gets basic information about all the versions of a model. -// -// If you expect that a model has a lot of versions, or if you need to -// handle -// only a limited number of results at a time, you can request that the -// list -// be retrieved in batches (called pages): -func (r *ProjectsModelsVersionsService) List(parent string) *ProjectsModelsVersionsListCall { - c := &ProjectsModelsVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The number of -// versions to retrieve per "page" of results. If -// there are more remaining results than this number, the response -// message -// will contain a valid value in the `next_page_token` field. -// -// The default value is 20, and the maximum page size is 100. -func (c *ProjectsModelsVersionsListCall) PageSize(pageSize int64) *ProjectsModelsVersionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token to -// request the next page of results. -// -// You get the token from the `next_page_token` field of the response -// from -// the previous call. -func (c *ProjectsModelsVersionsListCall) PageToken(pageToken string) *ProjectsModelsVersionsListCall { - 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 *ProjectsModelsVersionsListCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsListCall { - 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 *ProjectsModelsVersionsListCall) IfNoneMatch(entityTag string) *ProjectsModelsVersionsListCall { - 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 *ProjectsModelsVersionsListCall) Context(ctx context.Context) *ProjectsModelsVersionsListCall { - 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 *ProjectsModelsVersionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsModelsVersionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/versions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.models.versions.list" call. -// Exactly one of *GoogleCloudMlV1beta1__ListVersionsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudMlV1beta1__ListVersionsResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsModelsVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1beta1__ListVersionsResponse, 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 := &GoogleCloudMlV1beta1__ListVersionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets basic information about all the versions of a model.\n\nIf you expect that a model has a lot of versions, or if you need to handle\nonly a limited number of results at a time, you can request that the list\nbe retrieved in batches (called pages):", - // "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions", - // "httpMethod": "GET", - // "id": "ml.projects.models.versions.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "pageSize": { - // "description": "Optional. The number of versions to retrieve per \"page\" of results. If\nthere are more remaining results than this number, the response message\nwill contain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The name of the model for which to list the version.", - // "location": "path", - // "pattern": "^projects/[^/]+/models/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+parent}/versions", - // "response": { - // "$ref": "GoogleCloudMlV1beta1__ListVersionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsModelsVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV1beta1__ListVersionsResponse) 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 "ml.projects.models.versions.setDefault": - -type ProjectsModelsVersionsSetDefaultCall struct { - s *Service - name string - googlecloudmlv1beta1__setdefaultversionrequest *GoogleCloudMlV1beta1__SetDefaultVersionRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetDefault: Designates a version to be the default for the -// model. -// -// The default version is used for prediction requests made against the -// model -// that don't specify a version. -// -// The first version to be created for a model is automatically set as -// the -// default. You must make any subsequent changes to the default -// version -// setting manually using this method. -func (r *ProjectsModelsVersionsService) SetDefault(name string, googlecloudmlv1beta1__setdefaultversionrequest *GoogleCloudMlV1beta1__SetDefaultVersionRequest) *ProjectsModelsVersionsSetDefaultCall { - c := &ProjectsModelsVersionsSetDefaultCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudmlv1beta1__setdefaultversionrequest = googlecloudmlv1beta1__setdefaultversionrequest - 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 *ProjectsModelsVersionsSetDefaultCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsSetDefaultCall { - 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 *ProjectsModelsVersionsSetDefaultCall) Context(ctx context.Context) *ProjectsModelsVersionsSetDefaultCall { - 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 *ProjectsModelsVersionsSetDefaultCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsModelsVersionsSetDefaultCall) 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.googlecloudmlv1beta1__setdefaultversionrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setDefault") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.models.versions.setDefault" call. -// Exactly one of *GoogleCloudMlV1beta1__Version or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudMlV1beta1__Version.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsModelsVersionsSetDefaultCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1beta1__Version, 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 := &GoogleCloudMlV1beta1__Version{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Designates a version to be the default for the model.\n\nThe default version is used for prediction requests made against the model\nthat don't specify a version.\n\nThe first version to be created for a model is automatically set as the\ndefault. You must make any subsequent changes to the default version\nsetting manually using this method.", - // "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}:setDefault", - // "httpMethod": "POST", - // "id": "ml.projects.models.versions.setDefault", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the version to make the default for the model. You\ncan get the names of all the versions of a model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list).", - // "location": "path", - // "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:setDefault", - // "request": { - // "$ref": "GoogleCloudMlV1beta1__SetDefaultVersionRequest" - // }, - // "response": { - // "$ref": "GoogleCloudMlV1beta1__Version" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.operations.cancel": - -type ProjectsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server -// makes a best effort to cancel the operation, but success is -// not -// guaranteed. If the server doesn't support this method, it -// returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can -// use -// Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether -// the -// operation completed despite cancellation. On successful -// cancellation, -// the operation is not deleted; instead, it becomes an operation -// with -// an Operation.error value with a google.rpc.Status.code of -// 1, -// corresponding to `Code.CANCELLED`. -func (r *ProjectsOperationsService) Cancel(name string) *ProjectsOperationsCancelCall { - c := &ProjectsOperationsCancelCall{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 *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall { - 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 *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall { - 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 *ProjectsOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.operations.cancel" call. -// Exactly one of *GoogleProtobuf__Empty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobuf__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 *ProjectsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__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 := &GoogleProtobuf__Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", - // "flatPath": "v1beta1/projects/{projectsId}/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "ml.projects.operations.cancel", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", - // "location": "path", - // "pattern": "^projects/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:cancel", - // "response": { - // "$ref": "GoogleProtobuf__Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.operations.delete": - -type ProjectsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a long-running operation. This method indicates that -// the client is -// no longer interested in the operation result. It does not cancel -// the -// operation. If the server doesn't support this method, it -// returns -// `google.rpc.Code.UNIMPLEMENTED`. -func (r *ProjectsOperationsService) Delete(name string) *ProjectsOperationsDeleteCall { - c := &ProjectsOperationsDeleteCall{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 *ProjectsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsOperationsDeleteCall { - 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 *ProjectsOperationsDeleteCall) Context(ctx context.Context) *ProjectsOperationsDeleteCall { - 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 *ProjectsOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.operations.delete" call. -// Exactly one of *GoogleProtobuf__Empty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobuf__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 *ProjectsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__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 := &GoogleProtobuf__Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1beta1/projects/{projectsId}/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "ml.projects.operations.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be deleted.", - // "location": "path", - // "pattern": "^projects/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "response": { - // "$ref": "GoogleProtobuf__Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.operations.get": - -type ProjectsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can -// use this -// method to poll the operation result at intervals as recommended by -// the API -// service. -func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall { - c := &ProjectsOperationsGetCall{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 *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall { - 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 *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall { - 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 *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall { - 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 *ProjectsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.operations.get" call. -// Exactly one of *GoogleLongrunning__Operation or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleLongrunning__Operation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleLongrunning__Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - // "flatPath": "v1beta1/projects/{projectsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "ml.projects.operations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "response": { - // "$ref": "GoogleLongrunning__Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "ml.projects.operations.list": - -type ProjectsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: 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. -func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall { - c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall { - 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 *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall { - 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 *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall { - 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 *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall { - 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 *ProjectsOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "ml.projects.operations.list" call. -// Exactly one of *GoogleLongrunning__ListOperationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleLongrunning__ListOperationsResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__ListOperationsResponse, 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 := &GoogleLongrunning__ListOperationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", - // "flatPath": "v1beta1/projects/{projectsId}/operations", - // "httpMethod": "GET", - // "id": "ml.projects.operations.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}/operations", - // "response": { - // "$ref": "GoogleLongrunning__ListOperationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunning__ListOperationsResponse) 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/monitoring/v3/monitoring-api.json b/vendor/google.golang.org/api/monitoring/v3/monitoring-api.json index e8c3d8817..0924ee4a3 100644 --- a/vendor/google.golang.org/api/monitoring/v3/monitoring-api.json +++ b/vendor/google.golang.org/api/monitoring/v3/monitoring-api.json @@ -1,24 +1,1320 @@ { + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "metricDescriptors": { + "methods": { + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "MetricDescriptor" + }, + "parameters": { + "name": { + "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/monitoring.write" + ], + "flatPath": "v3/projects/{projectsId}/metricDescriptors", + "path": "v3/{+name}/metricDescriptors", + "id": "monitoring.projects.metricDescriptors.create", + "description": "Creates a new metric descriptor. User-created metric descriptors define custom metrics.", + "request": { + "$ref": "MetricDescriptor" + } + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring" + ], + "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\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/metricDescriptors/.+$", + "location": "path" + } + }, + "flatPath": "v3/projects/{projectsId}/metricDescriptors/{metricDescriptorsId}", + "id": "monitoring.projects.metricDescriptors.delete", + "path": "v3/{+name}", + "description": "Deletes a metric descriptor. Only user-created custom metrics can be deleted." + }, + "get": { + "path": "v3/{+name}", + "id": "monitoring.projects.metricDescriptors.get", + "description": "Gets a single metric descriptor. This method does not require a Stackdriver account.", + "httpMethod": "GET", + "response": { + "$ref": "MetricDescriptor" + }, + "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\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/metricDescriptors/.+$", + "location": "path" + } + }, + "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" + ], + "flatPath": "v3/projects/{projectsId}/metricDescriptors/{metricDescriptorsId}" + }, + "list": { + "description": "Lists metric descriptors that match a filter. This method does not require a Stackdriver account.", + "response": { + "$ref": "ListMetricDescriptorsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "filter": { + "location": "query", + "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", + "type": "string" + }, + "pageToken": { + "location": "query", + "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.", + "type": "string" + }, + "name": { + "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "pageSize": { + "format": "int32", + "description": "A positive number that is the maximum number of results to return.", + "type": "integer", + "location": "query" + } + }, + "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" + ], + "flatPath": "v3/projects/{projectsId}/metricDescriptors", + "id": "monitoring.projects.metricDescriptors.list", + "path": "v3/{+name}/metricDescriptors" + } + } + }, + "monitoredResourceDescriptors": { + "methods": { + "get": { + "httpMethod": "GET", + "response": { + "$ref": "MonitoredResourceDescriptor" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/monitoredResourceDescriptors/[^/]+$", + "location": "path", + "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.", + "type": "string", + "required": true + } + }, + "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" + ], + "flatPath": "v3/projects/{projectsId}/monitoredResourceDescriptors/{monitoredResourceDescriptorsId}", + "path": "v3/{+name}", + "id": "monitoring.projects.monitoredResourceDescriptors.get", + "description": "Gets a single monitored resource descriptor. This method does not require a Stackdriver account." + }, + "list": { + "response": { + "$ref": "ListMonitoredResourceDescriptorsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "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" + ], + "parameters": { + "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.", + "type": "string", + "location": "query" + }, + "name": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", + "type": "string", + "required": true + }, + "pageSize": { + "format": "int32", + "description": "A positive number that is the maximum number of results to return.", + "type": "integer", + "location": "query" + }, + "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", + "type": "string", + "location": "query" + } + }, + "flatPath": "v3/projects/{projectsId}/monitoredResourceDescriptors", + "id": "monitoring.projects.monitoredResourceDescriptors.list", + "path": "v3/{+name}/monitoredResourceDescriptors", + "description": "Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account." + } + } + }, + "groups": { + "resources": { + "members": { + "methods": { + "list": { + "description": "Lists the monitored resources that are members of a group.", + "response": { + "$ref": "ListGroupMembersResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/monitoring.read" + ], + "parameters": { + "name": { + "description": "The group whose members are listed. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/groups/[^/]+$", + "location": "path" + }, + "interval.endTime": { + "location": "query", + "format": "google-datetime", + "description": "Required. The end of the time interval.", + "type": "string" + }, + "filter": { + "location": "query", + "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", + "type": "string" + }, + "pageToken": { + "location": "query", + "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.", + "type": "string" + }, + "interval.startTime": { + "location": "query", + "format": "google-datetime", + "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.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "A positive number that is the maximum number of results to return.", + "type": "integer" + } + }, + "flatPath": "v3/projects/{projectsId}/groups/{groupsId}/members", + "id": "monitoring.projects.groups.members.list", + "path": "v3/{+name}/members" + } + } + } + }, + "methods": { + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/groups/[^/]+$", + "location": "path", + "description": "The group to delete. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", + "type": "string", + "required": true + } + }, + "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", + "path": "v3/{+name}", + "id": "monitoring.projects.groups.delete", + "description": "Deletes an existing group." + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "Group" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The group to retrieve. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/groups/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/monitoring.read" + ], + "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", + "path": "v3/{+name}", + "id": "monitoring.projects.groups.get", + "description": "Gets a single group." + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListGroupsResponse" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The project whose groups are to be listed. The format is \"projects/{project_id_or_number}\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "childrenOfGroup": { + "location": "query", + "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.", + "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.", + "type": "string", + "location": "query" + }, + "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.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "A positive number that is the maximum number of results to return.", + "type": "integer" + }, + "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.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/monitoring.read" + ], + "flatPath": "v3/projects/{projectsId}/groups", + "path": "v3/{+name}/groups", + "id": "monitoring.projects.groups.list", + "description": "Lists the existing groups." + }, + "update": { + "description": "Updates an existing group. You can change any group attributes except name.", + "request": { + "$ref": "Group" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Group" + }, + "parameters": { + "validateOnly": { + "description": "If true, validate this request but do not update the existing group.", + "type": "boolean", + "location": "query" + }, + "name": { + "pattern": "^projects/[^/]+/groups/[^/]+$", + "location": "path", + "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", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring" + ], + "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", + "path": "v3/{+name}", + "id": "monitoring.projects.groups.update" + }, + "create": { + "id": "monitoring.projects.groups.create", + "path": "v3/{+name}/groups", + "request": { + "$ref": "Group" + }, + "description": "Creates a new group.", + "response": { + "$ref": "Group" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring" + ], + "parameters": { + "validateOnly": { + "description": "If true, validate this request but do not create the group.", + "type": "boolean", + "location": "query" + }, + "name": { + "description": "The project in which to create the group. The format is \"projects/{project_id_or_number}\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "flatPath": "v3/projects/{projectsId}/groups" + } + } + }, + "collectdTimeSeries": { + "methods": { + "create": { + "path": "v3/{+name}/collectdTimeSeries", + "id": "monitoring.projects.collectdTimeSeries.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", + "request": { + "$ref": "CreateCollectdTimeSeriesRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "CreateCollectdTimeSeriesResponse" + }, + "parameters": { + "name": { + "description": "The project in which to create the time series. The format is \"projects/PROJECT_ID_OR_NUMBER\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/monitoring.write" + ], + "flatPath": "v3/projects/{projectsId}/collectdTimeSeries" + } + } + }, + "timeSeries": { + "methods": { + "create": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/monitoring.write" + ], + "parameters": { + "name": { + "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "flatPath": "v3/projects/{projectsId}/timeSeries", + "id": "monitoring.projects.timeSeries.create", + "path": "v3/{+name}/timeSeries", + "request": { + "$ref": "CreateTimeSeriesRequest" + }, + "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." + }, + "list": { + "description": "Lists time series that match a filter. This method does not require a Stackdriver account.", + "httpMethod": "GET", + "response": { + "$ref": "ListTimeSeriesResponse" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "A positive number that is the maximum number of results to return. When view field sets to FULL, it limits the number of Points server will return; if view field is HEADERS, it limits the number of TimeSeries server will return.", + "type": "integer" + }, + "orderBy": { + "description": "Specifies the order in which the points of the time series should be returned. By default, results are not ordered. Currently, this field must be left blank.", + "type": "string", + "location": "query" + }, + "aggregation.crossSeriesReducer": { + "enum": [ + "REDUCE_NONE", + "REDUCE_MEAN", + "REDUCE_MIN", + "REDUCE_MAX", + "REDUCE_SUM", + "REDUCE_STDDEV", + "REDUCE_COUNT", + "REDUCE_COUNT_TRUE", + "REDUCE_FRACTION_TRUE", + "REDUCE_PERCENTILE_99", + "REDUCE_PERCENTILE_95", + "REDUCE_PERCENTILE_50", + "REDUCE_PERCENTILE_05" + ], + "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.", + "type": "string", + "location": "query" + }, + "filter": { + "location": "query", + "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", + "type": "string" + }, + "pageToken": { + "location": "query", + "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.", + "type": "string" + }, + "aggregation.perSeriesAligner": { + "location": "query", + "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_FRACTION_TRUE", + "ALIGN_PERCENTILE_99", + "ALIGN_PERCENTILE_95", + "ALIGN_PERCENTILE_50", + "ALIGN_PERCENTILE_05" + ], + "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.", + "type": "string" + }, + "interval.startTime": { + "location": "query", + "format": "google-datetime", + "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.", + "type": "string" + }, + "view": { + "enum": [ + "FULL", + "HEADERS" + ], + "description": "Specifies which information is returned about the time series.", + "type": "string", + "location": "query" + }, + "name": { + "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "aggregation.groupByFields": { + "repeated": true, + "location": "query", + "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.", + "type": "string" + }, + "interval.endTime": { + "location": "query", + "format": "google-datetime", + "description": "Required. The end of the time interval.", + "type": "string" + }, + "aggregation.alignmentPeriod": { + "format": "google-duration", + "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.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/monitoring.read" + ], + "flatPath": "v3/projects/{projectsId}/timeSeries", + "path": "v3/{+name}/timeSeries", + "id": "monitoring.projects.timeSeries.list" + } + } + } + } + } + }, + "parameters": { + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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", + "description": "Data format for response.", + "default": "json" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "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.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + } + }, + "version": "v3", "baseUrl": "https://monitoring.googleapis.com/", + "kind": "discovery#restDescription", "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.", "servicePath": "", - "kind": "discovery#restDescription", "basePath": "", "id": "monitoring:v3", "documentationLink": "https://cloud.google.com/monitoring/api/", - "revision": "20170731", + "revision": "20170904", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { - "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)).", + "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.", "type": "object", "properties": { - "numFiniteBuckets": { + "exponentialBuckets": { + "description": "The exponential buckets.", + "$ref": "Exponential" + }, + "explicitBuckets": { + "$ref": "Explicit", + "description": "The explicit buckets." + }, + "linearBuckets": { + "$ref": "Linear", + "description": "The linear bucket." + } + }, + "id": "BucketOptions" + }, + "CollectdValue": { + "properties": { + "value": { + "description": "The measurement value.", + "$ref": "TypedValue" + }, + "dataSourceType": { + "enum": [ + "UNSPECIFIED_DATA_SOURCE_TYPE", + "GAUGE", + "COUNTER", + "DERIVE", + "ABSOLUTE" + ], + "description": "The type of measurement.", + "type": "string", + "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." + ] + }, + "dataSourceName": { + "description": "The data source for the collectd value. For example there are two data sources for network measurements: \"rx\" and \"tx\".", + "type": "string" + } + }, + "id": "CollectdValue", + "description": "A single data point from a collectd-based plugin.", + "type": "object" + }, + "Status": { + "properties": { + "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" + }, + "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" + }, + "code": { "format": "int32", - "description": "Must be greater than 0.", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + } + }, + "id": "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.", + "type": "object" + }, + "MetricDescriptor": { + "properties": { + "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 includes the dimensionless unit 1, such as 1/s.The 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 '}'.", + "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" + }, + "name": { + "description": "The resource name of the metric descriptor. Depending on the implementation, the name typically includes: (1) the parent resource name that defines the scope of the metric type or of its data; and (2) the metric's URL-encoded type, which also appears in the type field of this descriptor. For example, following is the resource name of a custom metric within the GCP project my-project-id:\n\"projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount\"\n", + "type": "string" + }, + "type": { + "description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined custom metric types have the DNS name custom.googleapis.com. Metric types should use a natural hierarchical grouping. For example:\n\"custom.googleapis.com/invoice/paid/amount\"\n\"appengine.googleapis.com/http/server/response_latencies\"\n", + "type": "string" + }, + "valueType": { + "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." + ], + "enum": [ + "VALUE_TYPE_UNSPECIFIED", + "BOOL", + "INT64", + "DOUBLE", + "STRING", + "DISTRIBUTION", + "MONEY" + ], + "description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of metric_kind and value_type might not be supported.", + "type": "string" + }, + "metricKind": { + "enum": [ + "METRIC_KIND_UNSPECIFIED", + "GAUGE", + "DELTA", + "CUMULATIVE" + ], + "description": "Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metric_kind and value_type might not be supported.", + "type": "string", + "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." + ] + }, + "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\".", + "type": "string" + } + }, + "id": "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.", + "type": "object" + }, + "SourceContext": { + "description": "SourceContext represents information about the source of a protobuf element, like the file in which it is defined.", + "type": "object", + "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" + } + }, + "id": "SourceContext" + }, + "Range": { + "description": "The range of the population values.", + "type": "object", + "properties": { + "max": { + "format": "double", + "description": "The maximum of the population values.", + "type": "number" + }, + "min": { + "format": "double", + "description": "The minimum of the population values.", + "type": "number" + } + }, + "id": "Range" + }, + "ListGroupsResponse": { + "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" + }, + "group": { + "description": "The groups that match the specified filters.", + "items": { + "$ref": "Group" + }, + "type": "array" + } + }, + "id": "ListGroupsResponse", + "description": "The ListGroups response.", + "type": "object" + }, + "CreateCollectdTimeSeriesRequest": { + "description": "The CreateCollectdTimeSeries request.", + "type": "object", + "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" + }, + "resource": { + "$ref": "MonitoredResource", + "description": "The monitored resource associated with the time series." + }, + "collectdVersion": { + "description": "The version of collectd that collected the data. Example: \"5.3.0-192.el6\".", + "type": "string" + } + }, + "id": "CreateCollectdTimeSeriesRequest" + }, + "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": { + "format": "int32", + "description": "The total number of elements matching this request.", + "type": "integer" + } + }, + "id": "ListGroupMembersResponse", + "description": "The ListGroupMembers response.", + "type": "object" + }, + "ListMonitoredResourceDescriptorsResponse": { + "description": "The ListMonitoredResourceDescriptors response.", + "type": "object", + "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" + } + }, + "id": "ListMonitoredResourceDescriptorsResponse" + }, + "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.", + "type": "object", + "properties": { + "metricKind": { + "enum": [ + "METRIC_KIND_UNSPECIFIED", + "GAUGE", + "DELTA", + "CUMULATIVE" + ], + "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.", + "type": "string", + "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." + ] + }, + "points": { + "description": "The data points of this time series. When listing time series, the order of the points is specified by the list method.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" + }, + "metric": { + "description": "The associated metric. A fully-specified metric used to identify the time series.", + "$ref": "Metric" + }, + "valueType": { + "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." + ], + "enum": [ + "VALUE_TYPE_UNSPECIFIED", + "BOOL", + "INT64", + "DOUBLE", + "STRING", + "DISTRIBUTION", + "MONEY" + ], + "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.", + "type": "string" + }, + "resource": { + "$ref": "MonitoredResource", + "description": "The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data." + } + }, + "id": "TimeSeries" + }, + "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" + } + }, + "id": "CreateTimeSeriesRequest", + "description": "The CreateTimeSeries request.", + "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.", + "type": "object", + "properties": { + "count": { + "format": "int64", + "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.", + "type": "string" + }, + "mean": { + "format": "double", + "description": "The arithmetic mean of the values in the population. If count is zero then this field must be zero.", + "type": "number" + }, + "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": { + "description": "Required in the Stackdriver Monitoring API v3. Defines the histogram bucket boundaries.", + "$ref": "BucketOptions" + }, + "sumOfSquaredDeviation": { + "format": "double", + "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.", + "type": "number" + }, + "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.", + "$ref": "Range" + } + }, + "id": "Distribution" + }, + "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", + "type": "object", + "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.", + "type": "string" + } + }, + "id": "MonitoredResource" + }, + "ListMetricDescriptorsResponse": { + "description": "The ListMetricDescriptors response.", + "type": "object", + "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" + }, + "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" + } + }, + "id": "ListMetricDescriptorsResponse" + }, + "CollectdPayloadError": { + "properties": { + "index": { + "format": "int32", + "description": "The zero-based index in CreateCollectdTimeSeriesRequest.collectd_payloads.", "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" + }, + "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." + } + }, + "id": "CollectdPayloadError", + "description": "Describes the error status for payloads that were not written.", + "type": "object" + }, + "MonitoredResourceDescriptor": { + "properties": { + "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" + }, + "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" + }, + "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" + } + }, + "id": "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.", + "type": "object" + }, + "TypedValue": { + "description": "A single strongly-typed value.", + "type": "object", + "properties": { + "int64Value": { + "format": "int64", + "description": "A 64-bit integer. Its range is approximately ±9.2x10\u003csup\u003e18\u003c/sup\u003e.", + "type": "string" + }, + "distributionValue": { + "description": "A distribution value.", + "$ref": "Distribution" + }, + "stringValue": { + "description": "A variable-length string value.", + "type": "string" + }, + "boolValue": { + "description": "A Boolean value: true or false.", + "type": "boolean" + }, + "doubleValue": { + "format": "double", + "description": "A 64-bit double-precision floating-point number. Its magnitude is approximately ±10\u003csup\u003e±300\u003c/sup\u003e and it has 16 significant digits of precision.", + "type": "number" + } + }, + "id": "TypedValue" + }, + "CollectdValueError": { + "description": "Describes the error status for values that were not written.", + "type": "object", + "properties": { + "index": { + "format": "int32", + "description": "The zero-based index in CollectdPayload.values within the parent CreateCollectdTimeSeriesRequest.collectd_payloads.", + "type": "integer" + }, + "error": { + "$ref": "Status", + "description": "Records the error status for the value." + } + }, + "id": "CollectdValueError" + }, + "CollectdPayload": { + "properties": { + "startTime": { + "format": "google-datetime", + "description": "The start time of the interval.", + "type": "string" + }, + "values": { + "description": "The measured values during this time interval. Each value must have a different dataSourceName.", + "items": { + "$ref": "CollectdValue" + }, + "type": "array" + }, + "typeInstance": { + "description": "The measurement type instance. Example: \"used\".", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "$ref": "TypedValue" + }, + "description": "The measurement metadata. Example: \"process_id\" -\u003e 12345", + "type": "object" + }, + "type": { + "description": "The measurement type. Example: \"memory\".", + "type": "string" + }, + "plugin": { + "description": "The name of the plugin. Example: \"disk\".", + "type": "string" + }, + "pluginInstance": { + "description": "The instance name of the plugin Example: \"hdcl\".", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "The end time of the interval.", + "type": "string" + } + }, + "id": "CollectdPayload", + "description": "A collection of data points sent from a collectd-based plugin. See the collectd documentation for more information.", + "type": "object" + }, + "CreateCollectdTimeSeriesResponse": { + "description": "The CreateCollectdTimeSeries response.", + "type": "object", + "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" + } + }, + "id": "CreateCollectdTimeSeriesResponse" + }, + "Linear": { + "properties": { "width": { "format": "double", "description": "Must be greater than 0.", @@ -28,9 +1324,22 @@ "format": "double", "description": "Lower bound of the first bucket.", "type": "number" + }, + "numFiniteBuckets": { + "format": "int32", + "description": "Must be greater than 0.", + "type": "integer" } }, - "id": "Linear" + "id": "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)).", + "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 {}.", + "type": "object", + "properties": {}, + "id": "Empty" }, "Option": { "description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.", @@ -51,12 +1360,6 @@ }, "id": "Option" }, - "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 {}.", - "type": "object", - "properties": {}, - "id": "Empty" - }, "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.", "type": "object", @@ -76,28 +1379,21 @@ "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.", "type": "object", "properties": { - "endTime": { - "format": "google-datetime", - "description": "Required. The end of the time interval.", - "type": "string" - }, "startTime": { "format": "google-datetime", "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.", "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Required. The end of the time interval.", + "type": "string" } }, "id": "TimeInterval" }, "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)).", - "type": "object", "properties": { - "numFiniteBuckets": { - "format": "int32", - "description": "Must be greater than 0.", - "type": "integer" - }, "growthFactor": { "format": "double", "description": "Must be greater than 1.", @@ -107,9 +1403,16 @@ "format": "double", "description": "Must be greater than 0.", "type": "number" + }, + "numFiniteBuckets": { + "format": "int32", + "description": "Must be greater than 0.", + "type": "integer" } }, - "id": "Exponential" + "id": "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)).", + "type": "object" }, "Point": { "description": "A single data point in a time series.", @@ -120,8 +1423,8 @@ "description": "The value of the data point." }, "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." + "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.", + "$ref": "TimeInterval" } }, "id": "Point" @@ -130,6 +1433,10 @@ "description": "A single field of a message type.", "type": "object", "properties": { + "name": { + "description": "The field name.", + "type": "string" + }, "typeUrl": { "description": "The field type URL, without the scheme, for message or enumeration types. Example: \"type.googleapis.com/google.protobuf.Timestamp\".", "type": "string" @@ -144,8 +1451,6 @@ "type": "string" }, "kind": { - "description": "The field type.", - "type": "string", "enumDescriptions": [ "Field type unknown.", "Field type double.", @@ -187,7 +1492,9 @@ "TYPE_SFIXED64", "TYPE_SINT32", "TYPE_SINT64" - ] + ], + "description": "The field type.", + "type": "string" }, "options": { "description": "The protocol buffer options.", @@ -206,8 +1513,6 @@ "type": "boolean" }, "cardinality": { - "description": "The field cardinality.", - "type": "string", "enumDescriptions": [ "For fields with unknown cardinality.", "For optional fields.", @@ -219,66 +1524,66 @@ "CARDINALITY_OPTIONAL", "CARDINALITY_REQUIRED", "CARDINALITY_REPEATED" - ] + ], + "description": "The field cardinality.", + "type": "string" }, "defaultValue": { "description": "The string value of the default value of this field. Proto2 syntax only.", "type": "string" - }, - "name": { - "description": "The field name.", - "type": "string" } }, "id": "Field" }, "Metric": { - "description": "A specific metric, identified by specifying values for all of the labels of a MetricDescriptor.", - "type": "object", "properties": { "labels": { - "description": "The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values.", - "type": "object", "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" } }, - "id": "Metric" + "id": "Metric", + "description": "A specific metric, identified by specifying values for all of the labels of a MetricDescriptor.", + "type": "object" }, "ListTimeSeriesResponse": { - "description": "The ListTimeSeries response.", - "type": "object", "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" + }, "timeSeries": { "description": "One or more time series that match the filter included in the request.", "items": { "$ref": "TimeSeries" }, "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" } }, - "id": "ListTimeSeriesResponse" + "id": "ListTimeSeriesResponse", + "description": "The ListTimeSeries response.", + "type": "object" }, "LabelDescriptor": { "description": "A description of a label.", "type": "object", "properties": { + "key": { + "description": "The label key.", + "type": "string" + }, "description": { "description": "A human-readable description for the label.", "type": "string" }, "valueType": { - "description": "The type of data that can be assigned to the label.", - "type": "string", "enumDescriptions": [ "A variable-length string. This is the default.", "Boolean; true or false.", @@ -288,19 +1593,31 @@ "STRING", "BOOL", "INT64" - ] - }, - "key": { - "description": "The label key.", + ], + "description": "The type of data that can be assigned to the label.", "type": "string" } }, "id": "LabelDescriptor" }, "Type": { - "description": "A protocol buffer message type.", - "type": "object", "properties": { + "syntax": { + "enum": [ + "SYNTAX_PROTO2", + "SYNTAX_PROTO3" + ], + "description": "The source syntax.", + "type": "string", + "enumDescriptions": [ + "Syntax proto2.", + "Syntax proto3." + ] + }, + "sourceContext": { + "description": "The source context.", + "$ref": "SourceContext" + }, "options": { "description": "The protocol buffer options.", "items": { @@ -325,30 +1642,24 @@ "type": "string" }, "type": "array" - }, - "sourceContext": { - "description": "The source context.", - "$ref": "SourceContext" - }, - "syntax": { - "description": "The source syntax.", - "type": "string", - "enumDescriptions": [ - "Syntax proto2.", - "Syntax proto3." - ], - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ] } }, - "id": "Type" + "id": "Type", + "description": "A protocol buffer message type.", + "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.", "type": "object", "properties": { + "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" + }, + "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" + }, "displayName": { "description": "A user-assigned name for this group, used only for display purposes.", "type": "string" @@ -360,511 +1671,16 @@ "filter": { "description": "The filter used to determine which monitored resources belong to this group.", "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" - }, - "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" } }, "id": "Group" - }, - "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.", - "type": "object", - "properties": { - "explicitBuckets": { - "description": "The explicit buckets.", - "$ref": "Explicit" - }, - "linearBuckets": { - "$ref": "Linear", - "description": "The linear bucket." - }, - "exponentialBuckets": { - "$ref": "Exponential", - "description": "The exponential buckets." - } - }, - "id": "BucketOptions" - }, - "CollectdValue": { - "description": "A single data point from a collectd-based plugin.", - "type": "object", - "properties": { - "value": { - "description": "The measurement value.", - "$ref": "TypedValue" - }, - "dataSourceType": { - "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." - ], - "enum": [ - "UNSPECIFIED_DATA_SOURCE_TYPE", - "GAUGE", - "COUNTER", - "DERIVE", - "ABSOLUTE" - ], - "description": "The type of measurement.", - "type": "string" - }, - "dataSourceName": { - "description": "The data source for the collectd value. For example there are two data sources for network measurements: \"rx\" and \"tx\".", - "type": "string" - } - }, - "id": "CollectdValue" - }, - "SourceContext": { - "description": "SourceContext represents information about the source of a protobuf element, like the file in which it is defined.", - "type": "object", - "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" - } - }, - "id": "SourceContext" - }, - "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.", - "type": "object", - "properties": { - "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.", - "type": "string", - "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." - ], - "enum": [ - "METRIC_KIND_UNSPECIFIED", - "GAUGE", - "DELTA", - "CUMULATIVE" - ] - }, - "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\".", - "type": "string" - }, - "description": { - "description": "A detailed description of the metric, which can be used in documentation.", - "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 includes the dimensionless unit 1, such as 1/s.The 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 '}'.", - "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" - }, - "name": { - "description": "The resource name of the metric descriptor. Depending on the implementation, the name typically includes: (1) the parent resource name that defines the scope of the metric type or of its data; and (2) the metric's URL-encoded type, which also appears in the type field of this descriptor. For example, following is the resource name of a custom metric within the GCP project my-project-id:\n\"projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount\"\n", - "type": "string" - }, - "type": { - "description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined custom metric types have the DNS name custom.googleapis.com. Metric types should use a natural hierarchical grouping. For example:\n\"custom.googleapis.com/invoice/paid/amount\"\n\"appengine.googleapis.com/http/server/response_latencies\"\n", - "type": "string" - }, - "valueType": { - "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." - ], - "enum": [ - "VALUE_TYPE_UNSPECIFIED", - "BOOL", - "INT64", - "DOUBLE", - "STRING", - "DISTRIBUTION", - "MONEY" - ], - "description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of metric_kind and value_type might not be supported.", - "type": "string" - } - }, - "id": "MetricDescriptor" - }, - "Range": { - "description": "The range of the population values.", - "type": "object", - "properties": { - "min": { - "format": "double", - "description": "The minimum of the population values.", - "type": "number" - }, - "max": { - "format": "double", - "description": "The maximum of the population values.", - "type": "number" - } - }, - "id": "Range" - }, - "ListGroupsResponse": { - "description": "The ListGroups response.", - "type": "object", - "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" - }, - "group": { - "description": "The groups that match the specified filters.", - "items": { - "$ref": "Group" - }, - "type": "array" - } - }, - "id": "ListGroupsResponse" - }, - "CreateCollectdTimeSeriesRequest": { - "description": "The CreateCollectdTimeSeries request.", - "type": "object", - "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" - }, - "resource": { - "$ref": "MonitoredResource", - "description": "The monitored resource associated with the time series." - }, - "collectdVersion": { - "description": "The version of collectd that collected the data. Example: \"5.3.0-192.el6\".", - "type": "string" - } - }, - "id": "CreateCollectdTimeSeriesRequest" - }, - "ListGroupMembersResponse": { - "description": "The ListGroupMembers response.", - "type": "object", - "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": { - "format": "int32", - "description": "The total number of elements matching this request.", - "type": "integer" - } - }, - "id": "ListGroupMembersResponse" - }, - "ListMonitoredResourceDescriptorsResponse": { - "description": "The ListMonitoredResourceDescriptors response.", - "type": "object", - "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" - } - }, - "id": "ListMonitoredResourceDescriptorsResponse" - }, - "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.", - "type": "object", - "properties": { - "resource": { - "description": "The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data.", - "$ref": "MonitoredResource" - }, - "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.", - "type": "string", - "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." - ], - "enum": [ - "METRIC_KIND_UNSPECIFIED", - "GAUGE", - "DELTA", - "CUMULATIVE" - ] - }, - "points": { - "description": "The data points of this time series. When listing time series, the order of the points is specified by the list method.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" - }, - "metric": { - "$ref": "Metric", - "description": "The associated metric. A fully-specified metric used to identify the time series." - }, - "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.", - "type": "string", - "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." - ], - "enum": [ - "VALUE_TYPE_UNSPECIFIED", - "BOOL", - "INT64", - "DOUBLE", - "STRING", - "DISTRIBUTION", - "MONEY" - ] - } - }, - "id": "TimeSeries" - }, - "CreateTimeSeriesRequest": { - "description": "The CreateTimeSeries request.", - "type": "object", - "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" - } - }, - "id": "CreateTimeSeriesRequest" - }, - "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.", - "type": "object", - "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": { - "description": "Required in the Stackdriver Monitoring API v3. Defines the histogram bucket boundaries.", - "$ref": "BucketOptions" - }, - "sumOfSquaredDeviation": { - "format": "double", - "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.", - "type": "number" - }, - "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.", - "$ref": "Range" - }, - "count": { - "format": "int64", - "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.", - "type": "string" - }, - "mean": { - "format": "double", - "description": "The arithmetic mean of the values in the population. If count is zero then this field must be zero.", - "type": "number" - } - }, - "id": "Distribution" - }, - "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", - "type": "object", - "properties": { - "labels": { - "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", - "additionalProperties": { - "type": "string" - } - }, - "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.", - "type": "string" - } - }, - "id": "MonitoredResource" - }, - "ListMetricDescriptorsResponse": { - "description": "The ListMetricDescriptors response.", - "type": "object", - "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" - }, - "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" - } - }, - "id": "ListMetricDescriptorsResponse" - }, - "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.", - "type": "object", - "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" - }, - "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" - }, - "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" - } - }, - "id": "MonitoredResourceDescriptor" - }, - "TypedValue": { - "description": "A single strongly-typed value.", - "type": "object", - "properties": { - "doubleValue": { - "format": "double", - "description": "A 64-bit double-precision floating-point number. Its magnitude is approximately ±10\u003csup\u003e±300\u003c/sup\u003e and it has 16 significant digits of precision.", - "type": "number" - }, - "int64Value": { - "format": "int64", - "description": "A 64-bit integer. Its range is approximately ±9.2x10\u003csup\u003e18\u003c/sup\u003e.", - "type": "string" - }, - "distributionValue": { - "$ref": "Distribution", - "description": "A distribution value." - }, - "stringValue": { - "description": "A variable-length string value.", - "type": "string" - }, - "boolValue": { - "description": "A Boolean value: true or false.", - "type": "boolean" - } - }, - "id": "TypedValue" - }, - "CollectdPayload": { - "description": "A collection of data points sent from a collectd-based plugin. See the collectd documentation for more information.", - "type": "object", - "properties": { - "endTime": { - "format": "google-datetime", - "description": "The end time of the interval.", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "The start time of the interval.", - "type": "string" - }, - "values": { - "description": "The measured values during this time interval. Each value must have a different dataSourceName.", - "items": { - "$ref": "CollectdValue" - }, - "type": "array" - }, - "typeInstance": { - "description": "The measurement type instance. Example: \"used\".", - "type": "string" - }, - "type": { - "description": "The measurement type. Example: \"memory\".", - "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" - } - }, - "id": "CollectdPayload" } }, - "protocol": "rest", "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, + "protocol": "rest", "canonicalName": "Monitoring", "auth": { "oauth2": { @@ -889,741 +1705,5 @@ "name": "monitoring", "batchPath": "batch", "fullyEncodeReservedExpansion": true, - "title": "Stackdriver Monitoring API", - "ownerName": "Google", - "resources": { - "projects": { - "resources": { - "timeSeries": { - "methods": { - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListTimeSeriesResponse" - }, - "parameters": { - "interval.endTime": { - "format": "google-datetime", - "description": "Required. The end of the time interval.", - "type": "string", - "location": "query" - }, - "aggregation.alignmentPeriod": { - "format": "google-duration", - "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.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "A positive number that is the maximum number of results to return. When view field sets to FULL, it limits the number of Points server will return; if view field is HEADERS, it limits the number of TimeSeries server will return.", - "type": "integer", - "location": "query" - }, - "orderBy": { - "description": "Specifies the order in which the points of the time series should be returned. By default, results are not ordered. Currently, this field must be left blank.", - "type": "string", - "location": "query" - }, - "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.", - "type": "string", - "location": "query", - "enum": [ - "REDUCE_NONE", - "REDUCE_MEAN", - "REDUCE_MIN", - "REDUCE_MAX", - "REDUCE_SUM", - "REDUCE_STDDEV", - "REDUCE_COUNT", - "REDUCE_COUNT_TRUE", - "REDUCE_FRACTION_TRUE", - "REDUCE_PERCENTILE_99", - "REDUCE_PERCENTILE_95", - "REDUCE_PERCENTILE_50", - "REDUCE_PERCENTILE_05" - ] - }, - "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", - "type": "string", - "location": "query" - }, - "pageToken": { - "location": "query", - "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.", - "type": "string" - }, - "aggregation.perSeriesAligner": { - "location": "query", - "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_FRACTION_TRUE", - "ALIGN_PERCENTILE_99", - "ALIGN_PERCENTILE_95", - "ALIGN_PERCENTILE_50", - "ALIGN_PERCENTILE_05" - ], - "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.", - "type": "string" - }, - "interval.startTime": { - "format": "google-datetime", - "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.", - "type": "string", - "location": "query" - }, - "view": { - "description": "Specifies which information is returned about the time series.", - "type": "string", - "location": "query", - "enum": [ - "FULL", - "HEADERS" - ] - }, - "name": { - "location": "path", - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - }, - "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.", - "type": "string", - "repeated": true, - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ], - "flatPath": "v3/projects/{projectsId}/timeSeries", - "path": "v3/{+name}/timeSeries", - "id": "monitoring.projects.timeSeries.list", - "description": "Lists time series that match a filter. This method does not require a Stackdriver account." - }, - "create": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "location": "path", - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.write" - ], - "flatPath": "v3/projects/{projectsId}/timeSeries", - "id": "monitoring.projects.timeSeries.create", - "path": "v3/{+name}/timeSeries", - "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.", - "request": { - "$ref": "CreateTimeSeriesRequest" - } - } - } - }, - "metricDescriptors": { - "methods": { - "get": { - "description": "Gets a single metric descriptor. This method does not require a Stackdriver account.", - "response": { - "$ref": "MetricDescriptor" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "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\".", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/metricDescriptors/.+$", - "location": "path" - } - }, - "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" - ], - "flatPath": "v3/projects/{projectsId}/metricDescriptors/{metricDescriptorsId}", - "id": "monitoring.projects.metricDescriptors.get", - "path": "v3/{+name}" - }, - "list": { - "description": "Lists metric descriptors that match a filter. This method does not require a Stackdriver account.", - "response": { - "$ref": "ListMetricDescriptorsResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "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" - ], - "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "A positive number that is the maximum number of results to return.", - "type": "integer" - }, - "filter": { - "location": "query", - "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", - "type": "string" - }, - "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.", - "type": "string", - "location": "query" - }, - "name": { - "location": "path", - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - } - }, - "flatPath": "v3/projects/{projectsId}/metricDescriptors", - "id": "monitoring.projects.metricDescriptors.list", - "path": "v3/{+name}/metricDescriptors" - }, - "create": { - "description": "Creates a new metric descriptor. User-created metric descriptors define custom metrics.", - "request": { - "$ref": "MetricDescriptor" - }, - "response": { - "$ref": "MetricDescriptor" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "location": "path", - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.write" - ], - "flatPath": "v3/projects/{projectsId}/metricDescriptors", - "id": "monitoring.projects.metricDescriptors.create", - "path": "v3/{+name}/metricDescriptors" - }, - "delete": { - "description": "Deletes a metric descriptor. Only user-created custom metrics can be deleted.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "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\".", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/metricDescriptors/.+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ], - "flatPath": "v3/projects/{projectsId}/metricDescriptors/{metricDescriptorsId}", - "id": "monitoring.projects.metricDescriptors.delete", - "path": "v3/{+name}" - } - } - }, - "monitoredResourceDescriptors": { - "methods": { - "get": { - "response": { - "$ref": "MonitoredResourceDescriptor" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "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" - ], - "parameters": { - "name": { - "location": "path", - "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.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/monitoredResourceDescriptors/[^/]+$" - } - }, - "flatPath": "v3/projects/{projectsId}/monitoredResourceDescriptors/{monitoredResourceDescriptorsId}", - "id": "monitoring.projects.monitoredResourceDescriptors.get", - "path": "v3/{+name}", - "description": "Gets a single monitored resource descriptor. This method does not require a Stackdriver account." - }, - "list": { - "description": "Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListMonitoredResourceDescriptorsResponse" - }, - "parameters": { - "pageSize": { - "format": "int32", - "description": "A positive number that is the maximum number of results to return.", - "type": "integer", - "location": "query" - }, - "filter": { - "location": "query", - "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", - "type": "string" - }, - "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.", - "type": "string", - "location": "query" - }, - "name": { - "location": "path", - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - } - }, - "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" - ], - "flatPath": "v3/projects/{projectsId}/monitoredResourceDescriptors", - "path": "v3/{+name}/monitoredResourceDescriptors", - "id": "monitoring.projects.monitoredResourceDescriptors.list" - } - } - }, - "groups": { - "methods": { - "get": { - "description": "Gets a single group.", - "response": { - "$ref": "Group" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The group to retrieve. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/groups/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ], - "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", - "id": "monitoring.projects.groups.get", - "path": "v3/{+name}" - }, - "list": { - "response": { - "$ref": "ListGroupsResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ], - "parameters": { - "pageSize": { - "format": "int32", - "description": "A positive number that is the maximum number of results to return.", - "type": "integer", - "location": "query" - }, - "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.", - "type": "string", - "location": "query" - }, - "name": { - "description": "The project whose groups are to be listed. The format is \"projects/{project_id_or_number}\".", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - }, - "childrenOfGroup": { - "location": "query", - "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.", - "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.", - "type": "string", - "location": "query" - }, - "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.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v3/projects/{projectsId}/groups", - "id": "monitoring.projects.groups.list", - "path": "v3/{+name}/groups", - "description": "Lists the existing groups." - }, - "update": { - "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", - "path": "v3/{+name}", - "id": "monitoring.projects.groups.update", - "request": { - "$ref": "Group" - }, - "description": "Updates an existing group. You can change any group attributes except name.", - "httpMethod": "PUT", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Group" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ], - "parameters": { - "validateOnly": { - "location": "query", - "description": "If true, validate this request but do not update the existing group.", - "type": "boolean" - }, - "name": { - "location": "path", - "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", - "required": true, - "pattern": "^projects/[^/]+/groups/[^/]+$" - } - } - }, - "create": { - "request": { - "$ref": "Group" - }, - "description": "Creates a new group.", - "response": { - "$ref": "Group" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ], - "parameters": { - "validateOnly": { - "description": "If true, validate this request but do not create the group.", - "type": "boolean", - "location": "query" - }, - "name": { - "location": "path", - "description": "The project in which to create the group. The format is \"projects/{project_id_or_number}\".", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - } - }, - "flatPath": "v3/projects/{projectsId}/groups", - "id": "monitoring.projects.groups.create", - "path": "v3/{+name}/groups" - }, - "delete": { - "description": "Deletes an existing group.", - "httpMethod": "DELETE", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ], - "parameters": { - "name": { - "description": "The group to delete. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/groups/[^/]+$", - "location": "path" - } - }, - "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", - "path": "v3/{+name}", - "id": "monitoring.projects.groups.delete" - } - }, - "resources": { - "members": { - "methods": { - "list": { - "flatPath": "v3/projects/{projectsId}/groups/{groupsId}/members", - "path": "v3/{+name}/members", - "id": "monitoring.projects.groups.members.list", - "description": "Lists the monitored resources that are members of a group.", - "httpMethod": "GET", - "response": { - "$ref": "ListGroupMembersResponse" - }, - "parameterOrder": [ - "name" - ], - "parameters": { - "pageSize": { - "format": "int32", - "description": "A positive number that is the maximum number of results to return.", - "type": "integer", - "location": "query" - }, - "interval.startTime": { - "location": "query", - "format": "google-datetime", - "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.", - "type": "string" - }, - "name": { - "location": "path", - "description": "The group whose members are listed. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/groups/[^/]+$" - }, - "interval.endTime": { - "location": "query", - "format": "google-datetime", - "description": "Required. The end of the time interval.", - "type": "string" - }, - "filter": { - "location": "query", - "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", - "type": "string" - }, - "pageToken": { - "location": "query", - "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.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - } - } - } - } - }, - "collectdTimeSeries": { - "methods": { - "create": { - "flatPath": "v3/projects/{projectsId}/collectdTimeSeries", - "path": "v3/{+name}/collectdTimeSeries", - "id": "monitoring.projects.collectdTimeSeries.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", - "request": { - "$ref": "CreateCollectdTimeSeriesRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "name": { - "location": "path", - "description": "The project in which to create the time series. The format is \"projects/PROJECT_ID_OR_NUMBER\".", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.write" - ] - } - } - } - } - } - }, - "parameters": { - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "alt": { - "type": "string", - "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", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ] - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "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.", - "type": "string", - "location": "query" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - } - }, - "version": "v3" + "title": "Stackdriver Monitoring API" } diff --git a/vendor/google.golang.org/api/monitoring/v3/monitoring-gen.go b/vendor/google.golang.org/api/monitoring/v3/monitoring-gen.go index 13eb249b3..a7cfe9623 100644 --- a/vendor/google.golang.org/api/monitoring/v3/monitoring-gen.go +++ b/vendor/google.golang.org/api/monitoring/v3/monitoring-gen.go @@ -268,6 +268,45 @@ func (s *CollectdPayload) MarshalJSON() ([]byte, error) { 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 @@ -317,6 +356,39 @@ func (s *CollectdValue) MarshalJSON() ([]byte, error) { 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) +} + // CreateCollectdTimeSeriesRequest: The CreateCollectdTimeSeries // request. type CreateCollectdTimeSeriesRequest struct { @@ -357,6 +429,41 @@ func (s *CreateCollectdTimeSeriesRequest) MarshalJSON() ([]byte, error) { 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 @@ -1492,6 +1599,82 @@ func (s *SourceContext) MarshalJSON() ([]byte, error) { 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) +} + // 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. @@ -1789,13 +1972,13 @@ func (c *ProjectsCollectdTimeSeriesCreateCall) doRequest(alt string) (*http.Resp } // Do executes the "monitoring.projects.collectdTimeSeries.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 *ProjectsCollectdTimeSeriesCreateCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// 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 { @@ -1814,7 +1997,7 @@ func (c *ProjectsCollectdTimeSeriesCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Empty{ + ret := &CreateCollectdTimeSeriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1847,7 +2030,7 @@ func (c *ProjectsCollectdTimeSeriesCreateCall) Do(opts ...googleapi.CallOption) // "$ref": "CreateCollectdTimeSeriesRequest" // }, // "response": { - // "$ref": "Empty" + // "$ref": "CreateCollectdTimeSeriesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", diff --git a/vendor/google.golang.org/api/oauth2/v1/oauth2-api.json b/vendor/google.golang.org/api/oauth2/v1/oauth2-api.json index 9838be754..39163baf4 100644 --- a/vendor/google.golang.org/api/oauth2/v1/oauth2-api.json +++ b/vendor/google.golang.org/api/oauth2/v1/oauth2-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/yA-nmrGtGyV39fzR7zooTCbGs10\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/PozAB5R3hMeaeI5NL5FrPjwfUdY\"", "discoveryVersion": "v1", "id": "oauth2:v1", "name": "oauth2", "version": "v1", - "revision": "20170509", + "revision": "20170807", "title": "Google OAuth2 API", "description": "Obtains end-user authorization grants for use with other Google APIs.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/oauth2/v2/oauth2-api.json b/vendor/google.golang.org/api/oauth2/v2/oauth2-api.json index 277bbd1d2..7cd7d2a7f 100644 --- a/vendor/google.golang.org/api/oauth2/v2/oauth2-api.json +++ b/vendor/google.golang.org/api/oauth2/v2/oauth2-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/JnT6R6N-Azl-6h2VUiLhx9Ixv98\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/UI_PjeJG3puXfKEXm-20UHWIhYQ\"", "discoveryVersion": "v1", "id": "oauth2:v2", "name": "oauth2", "version": "v2", - "revision": "20170509", + "revision": "20170807", "title": "Google OAuth2 API", "description": "Obtains end-user authorization grants for use with other Google APIs.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/option/option.go b/vendor/google.golang.org/api/option/option.go index 37a11b80b..e3080e38d 100644 --- a/vendor/google.golang.org/api/option/option.go +++ b/vendor/google.golang.org/api/option/option.go @@ -56,7 +56,7 @@ func WithCredentialsFile(filename string) ClientOption { // WithServiceAccountFile returns a ClientOption that uses a Google service // account credentials file to authenticate. // -// Deprecated: Use WithCredentialsJSONFile instead. +// Deprecated: Use WithCredentialsFile instead. func WithServiceAccountFile(filename string) ClientOption { return WithCredentialsFile(filename) } diff --git a/vendor/google.golang.org/api/oslogin/v1alpha/oslogin-api.json b/vendor/google.golang.org/api/oslogin/v1alpha/oslogin-api.json index 3a235efb7..6f2b40bad 100644 --- a/vendor/google.golang.org/api/oslogin/v1alpha/oslogin-api.json +++ b/vendor/google.golang.org/api/oslogin/v1alpha/oslogin-api.json @@ -1,15 +1,329 @@ { + "ownerDomain": "google.com", + "name": "oslogin", + "batchPath": "batch", + "title": "Google Cloud OS Login API", + "ownerName": "Google", + "resources": { + "users": { + "methods": { + "importSshPublicKey": { + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ImportSshPublicKeyResponse" + }, + "parameters": { + "parent": { + "location": "path", + "description": "The unique ID for the user in format `users/{user}`.", + "type": "string", + "required": true, + "pattern": "^users/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1alpha/users/{usersId}:importSshPublicKey", + "path": "v1alpha/{+parent}:importSshPublicKey", + "id": "oslogin.users.importSshPublicKey", + "description": "Adds an SSH public key and returns the profile information. Default POSIX\naccount information is set when no username and UID exist as part of the\nlogin profile.", + "request": { + "$ref": "SshPublicKey" + } + }, + "getLoginProfile": { + "response": { + "$ref": "LoginProfile" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The unique ID for the user in format `users/{user}`.", + "type": "string", + "required": true, + "pattern": "^users/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1alpha/users/{usersId}/loginProfile", + "id": "oslogin.users.getLoginProfile", + "path": "v1alpha/{+name}/loginProfile", + "description": "Retrieves the profile information used for logging in to a virtual machine\non Google Compute Engine." + } + }, + "resources": { + "sshPublicKeys": { + "methods": { + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "parameters": { + "name": { + "location": "path", + "description": "The fingerprint of the public key to update. Public keys are identified by\ntheir SHA-256 fingerprint. The fingerprint of the public key is in format\n`users/{user}/sshPublicKeys/{fingerprint}`.", + "type": "string", + "required": true, + "pattern": "^users/[^/]+/sshPublicKeys/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1alpha/users/{usersId}/sshPublicKeys/{sshPublicKeysId}", + "id": "oslogin.users.sshPublicKeys.delete", + "path": "v1alpha/{+name}", + "description": "Deletes an SSH public key." + }, + "patch": { + "flatPath": "v1alpha/users/{usersId}/sshPublicKeys/{sshPublicKeysId}", + "id": "oslogin.users.sshPublicKeys.patch", + "path": "v1alpha/{+name}", + "request": { + "$ref": "SshPublicKey" + }, + "description": "Updates an SSH public key and returns the profile information. This method\nsupports patch semantics.", + "response": { + "$ref": "SshPublicKey" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "description": "Mask to control which fields get updated. Updates all if not present.", + "type": "string", + "location": "query" + }, + "name": { + "location": "path", + "description": "The fingerprint of the public key to update. Public keys are identified by\ntheir SHA-256 fingerprint. The fingerprint of the public key is in format\n`users/{user}/sshPublicKeys/{fingerprint}`.", + "type": "string", + "required": true, + "pattern": "^users/[^/]+/sshPublicKeys/[^/]+$" + } + } + }, + "get": { + "description": "Retrieves an SSH public key.", + "httpMethod": "GET", + "response": { + "$ref": "SshPublicKey" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "location": "path", + "description": "The fingerprint of the public key to retrieve. Public keys are identified\nby their SHA-256 fingerprint. The fingerprint of the public key is in\nformat `users/{user}/sshPublicKeys/{fingerprint}`.", + "type": "string", + "required": true, + "pattern": "^users/[^/]+/sshPublicKeys/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1alpha/users/{usersId}/sshPublicKeys/{sshPublicKeysId}", + "path": "v1alpha/{+name}", + "id": "oslogin.users.sshPublicKeys.get" + } + } + } + } + } + }, + "parameters": { + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "key": { + "location": "query", + "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.", + "type": "string" + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + } + }, + "version": "v1alpha", "baseUrl": "https://oslogin.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Manages OS login configuration for Directory API users.", "servicePath": "", + "description": "Manages OS login configuration for Directory API users.", + "kind": "discovery#restDescription", "basePath": "", - "revision": "20170726", "documentationLink": "https://cloud.google.com/compute/docs/oslogin/rest/", + "revision": "20170906", "id": "oslogin:v1alpha", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "PosixAccount": { + "description": "The POSIX account information associated with a Directory API User.", + "type": "object", + "properties": { + "homeDirectory": { + "description": "The path to the home directory for this account.", + "type": "string" + }, + "gecos": { + "description": "The GECOS (user information) entry for this account.", + "type": "string" + }, + "systemId": { + "description": "System identifier for which account the username or uid applies to.\nBy default, the empty value is used.", + "type": "string" + }, + "primary": { + "description": "Only one POSIX account can be marked as primary.", + "type": "boolean" + }, + "gid": { + "format": "uint32", + "description": "The default group ID.", + "type": "integer" + }, + "uid": { + "format": "uint32", + "description": "The user ID.", + "type": "integer" + }, + "username": { + "description": "The username of the POSIX account.", + "type": "string" + }, + "shell": { + "description": "The path to the logic shell for this account.", + "type": "string" + } + }, + "id": "PosixAccount" + }, + "LoginProfile": { + "description": "The Directory API profile information used for logging in to a virtual\nmachine on Google Compute Engine.", + "type": "object", + "properties": { + "suspended": { + "description": "Indicates if the user is suspended.", + "type": "boolean" + }, + "sshPublicKeys": { + "additionalProperties": { + "$ref": "SshPublicKey" + }, + "description": "A map from SSH public key fingerprint to the associated key object.", + "type": "object" + }, + "posixAccounts": { + "description": "The list of POSIX accounts associated with the Directory API user.", + "items": { + "$ref": "PosixAccount" + }, + "type": "array" + }, + "name": { + "description": "A unique user ID for identifying the user.", + "type": "string" + } + }, + "id": "LoginProfile" + }, "SshPublicKey": { "description": "The SSH public key information associated with a Directory API User.", "type": "object", @@ -41,88 +355,18 @@ "type": "object", "properties": { "loginProfile": { - "description": "The login profile information for the user.", - "$ref": "LoginProfile" + "$ref": "LoginProfile", + "description": "The login profile information for the user." } }, "id": "ImportSshPublicKeyResponse" - }, - "PosixAccount": { - "description": "The POSIX account information associated with a Directory API User.", - "type": "object", - "properties": { - "shell": { - "description": "The path to the logic shell for this account.", - "type": "string" - }, - "homeDirectory": { - "description": "The path to the home directory for this account.", - "type": "string" - }, - "systemId": { - "description": "System identifier for which account the username or uid applies to.\nBy default, the empty value is used.", - "type": "string" - }, - "gecos": { - "description": "The GECOS (user information) entry for this account.", - "type": "string" - }, - "primary": { - "description": "Only one POSIX account can be marked as primary.", - "type": "boolean" - }, - "gid": { - "format": "int32", - "description": "The default group ID.", - "type": "integer" - }, - "uid": { - "format": "int32", - "description": "The user ID.", - "type": "integer" - }, - "username": { - "description": "The username of the POSIX account.", - "type": "string" - } - }, - "id": "PosixAccount" - }, - "LoginProfile": { - "description": "The Directory API profile information used for logging in to a virtual\nmachine on Google Compute Engine.", - "type": "object", - "properties": { - "posixAccounts": { - "description": "The list of POSIX accounts associated with the Directory API user.", - "items": { - "$ref": "PosixAccount" - }, - "type": "array" - }, - "name": { - "description": "A unique user ID for identifying the user.", - "type": "string" - }, - "suspended": { - "description": "Indicates if the user is suspended.", - "type": "boolean" - }, - "sshPublicKeys": { - "additionalProperties": { - "$ref": "SshPublicKey" - }, - "description": "A map from SSH public key fingerprint to the associated key object.", - "type": "object" - } - }, - "id": "LoginProfile" } }, - "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, "canonicalName": "Cloud OS Login", "auth": { "oauth2": { @@ -136,249 +380,5 @@ } } }, - "rootUrl": "https://oslogin.googleapis.com/", - "ownerDomain": "google.com", - "name": "oslogin", - "batchPath": "batch", - "title": "Google Cloud OS Login API", - "ownerName": "Google", - "resources": { - "users": { - "methods": { - "importSshPublicKey": { - "request": { - "$ref": "SshPublicKey" - }, - "description": "Adds an SSH public key and returns the profile information. Default POSIX\naccount information is set when no username and UID exist as part of the\nlogin profile.", - "response": { - "$ref": "ImportSshPublicKeyResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "location": "path", - "description": "The unique ID for the user in format `users/{user}`.", - "type": "string", - "required": true, - "pattern": "^users/[^/]+$" - } - }, - "flatPath": "v1alpha/users/{usersId}:importSshPublicKey", - "id": "oslogin.users.importSshPublicKey", - "path": "v1alpha/{+parent}:importSshPublicKey" - }, - "getLoginProfile": { - "flatPath": "v1alpha/users/{usersId}/loginProfile", - "id": "oslogin.users.getLoginProfile", - "path": "v1alpha/{+name}/loginProfile", - "description": "Retrieves the profile information used for logging in to a virtual machine\non Google Compute Engine.", - "response": { - "$ref": "LoginProfile" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "name": { - "location": "path", - "description": "The unique ID for the user in format `users/{user}`.", - "type": "string", - "required": true, - "pattern": "^users/[^/]+$" - } - } - } - }, - "resources": { - "sshPublicKeys": { - "methods": { - "delete": { - "description": "Deletes an SSH public key.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The fingerprint of the public key to update. Public keys are identified by\ntheir SHA-256 fingerprint. The fingerprint of the public key is in format\n`users/{user}/sshPublicKeys/{fingerprint}`.", - "type": "string", - "required": true, - "pattern": "^users/[^/]+/sshPublicKeys/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1alpha/users/{usersId}/sshPublicKeys/{sshPublicKeysId}", - "id": "oslogin.users.sshPublicKeys.delete", - "path": "v1alpha/{+name}" - }, - "patch": { - "description": "Updates an SSH public key and returns the profile information. This method\nsupports patch semantics.", - "request": { - "$ref": "SshPublicKey" - }, - "httpMethod": "PATCH", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "SshPublicKey" - }, - "parameters": { - "updateMask": { - "format": "google-fieldmask", - "description": "Mask to control which fields get updated. Updates all if not present.", - "type": "string", - "location": "query" - }, - "name": { - "location": "path", - "description": "The fingerprint of the public key to update. Public keys are identified by\ntheir SHA-256 fingerprint. The fingerprint of the public key is in format\n`users/{user}/sshPublicKeys/{fingerprint}`.", - "type": "string", - "required": true, - "pattern": "^users/[^/]+/sshPublicKeys/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1alpha/users/{usersId}/sshPublicKeys/{sshPublicKeysId}", - "path": "v1alpha/{+name}", - "id": "oslogin.users.sshPublicKeys.patch" - }, - "get": { - "flatPath": "v1alpha/users/{usersId}/sshPublicKeys/{sshPublicKeysId}", - "id": "oslogin.users.sshPublicKeys.get", - "path": "v1alpha/{+name}", - "description": "Retrieves an SSH public key.", - "response": { - "$ref": "SshPublicKey" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "The fingerprint of the public key to retrieve. Public keys are identified\nby their SHA-256 fingerprint. The fingerprint of the public key is in\nformat `users/{user}/sshPublicKeys/{fingerprint}`.", - "type": "string", - "required": true, - "pattern": "^users/[^/]+/sshPublicKeys/[^/]+$" - } - } - } - } - } - } - } - }, - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "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.", - "type": "string", - "location": "query" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "alt": { - "type": "string", - "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", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ] - } - }, - "version": "v1alpha" + "rootUrl": "https://oslogin.googleapis.com/" } diff --git a/vendor/google.golang.org/api/partners/v2/partners-api.json b/vendor/google.golang.org/api/partners/v2/partners-api.json index 626bbff0c..87b1ee952 100644 --- a/vendor/google.golang.org/api/partners/v2/partners-api.json +++ b/vendor/google.golang.org/api/partners/v2/partners-api.json @@ -1,53 +1,106 @@ { + "title": "Google Partners API", "ownerName": "Google", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "resources": { - "leads": { + "offers": { + "resources": { + "history": { + "methods": { + "list": { + "id": "partners.offers.history.list", + "path": "v2/offers/history", + "description": "Lists the Historical Offers for the current user (or user's entire company)", + "response": { + "$ref": "ListOffersHistoryResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "requestMetadata.userOverrides.ipAddress": { + "location": "query", + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string" + }, + "entireCompany": { + "description": "if true, show history for the entire company. Requires user to be admin.", + "type": "boolean", + "location": "query" + }, + "requestMetadata.experimentIds": { + "location": "query", + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true + }, + "orderBy": { + "location": "query", + "description": "Comma-separated list of fields to order by, e.g.: \"foo,bar,baz\".\nUse \"foo desc\" to sort descending.\nList of valid field names is: name, offer_code, expiration_time, status,\n last_modified_time, sender_name, creation_time, country_code,\n offer_type.", + "type": "string" + }, + "requestMetadata.trafficSource.trafficSubId": { + "location": "query", + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.userOverrides.userId": { + "location": "query", + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string" + }, + "requestMetadata.partnersSessionId": { + "location": "query", + "description": "Google Partners session ID.", + "type": "string" + }, + "pageToken": { + "description": "Token to retrieve a specific page.", + "type": "string", + "location": "query" + }, + "pageSize": { + "type": "integer", + "location": "query", + "format": "int32", + "description": "Maximum number of rows to return per page." + }, + "requestMetadata.trafficSource.trafficSourceId": { + "location": "query", + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.locale": { + "location": "query", + "description": "Locale to use for the current request.", + "type": "string" + } + }, + "flatPath": "v2/offers/history" + } + } + } + }, "methods": { "list": { - "httpMethod": "GET", - "parameterOrder": [], + "id": "partners.offers.list", + "path": "v2/offers", + "description": "Lists the Offers available for the current user", "response": { - "$ref": "ListLeadsResponse" + "$ref": "ListOffersResponse" }, + "parameterOrder": [], + "httpMethod": "GET", "parameters": { - "requestMetadata.experimentIds": { - "description": "Experiment IDs the current request belongs to.", - "type": "string", - "repeated": true, - "location": "query" - }, - "requestMetadata.trafficSource.trafficSubId": { - "location": "query", - "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string" - }, - "orderBy": { - "type": "string", - "location": "query", - "description": "How to order Leads. Currently, only `create_time`\nand `create_time desc` are supported" - }, "requestMetadata.userOverrides.userId": { + "location": "query", "description": "Logged-in user ID to impersonate instead of the user's ID.", - "type": "string", - "location": "query" + "type": "string" }, "requestMetadata.partnersSessionId": { - "location": "query", - "description": "Google Partners session ID.", - "type": "string" - }, - "pageToken": { - "description": "A token identifying a page of results that the server returns.\nTypically, this is the value of `ListLeadsResponse.next_page_token`\nreturned from the previous call to\nListLeads.", "type": "string", - "location": "query" - }, - "pageSize": { "location": "query", - "format": "int32", - "description": "Requested page size. Server may return fewer leads than requested.\nIf unspecified, server picks an appropriate default.", - "type": "integer" + "description": "Google Partners session ID." }, "requestMetadata.trafficSource.trafficSourceId": { "location": "query", @@ -60,28 +113,57 @@ "type": "string" }, "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", "type": "string", + "location": "query" + }, + "requestMetadata.experimentIds": { + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true, + "location": "query" + }, + "requestMetadata.trafficSource.trafficSubId": { "location": "query", - "description": "IP address to use instead of the user's geo-located IP address." + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" } }, - "flatPath": "v2/leads", - "path": "v2/leads", - "id": "partners.leads.list", - "description": "Lists advertiser leads for a user's associated company.\nShould only be called within the context of an authorized logged in user." + "flatPath": "v2/offers" } } }, - "offers": { + "userStates": { "methods": { "list": { - "description": "Lists the Offers available for the current user", - "parameterOrder": [], + "description": "Lists states for current user.", "response": { - "$ref": "ListOffersResponse" + "$ref": "ListUserStatesResponse" }, + "parameterOrder": [], "httpMethod": "GET", "parameters": { + "requestMetadata.experimentIds": { + "type": "string", + "repeated": true, + "location": "query", + "description": "Experiment IDs the current request belongs to." + }, + "requestMetadata.trafficSource.trafficSubId": { + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "requestMetadata.partnersSessionId": { + "location": "query", + "description": "Google Partners session ID.", + "type": "string" + }, + "requestMetadata.userOverrides.userId": { + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string", + "location": "query" + }, "requestMetadata.trafficSource.trafficSourceId": { "location": "query", "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", @@ -92,6 +174,48 @@ "type": "string", "location": "query" }, + "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v2/userStates", + "id": "partners.userStates.list", + "path": "v2/userStates" + } + } + }, + "analytics": { + "methods": { + "list": { + "response": { + "$ref": "ListAnalyticsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "A token identifying a page of results that the server returns.\nTypically, this is the value of `ListAnalyticsResponse.next_page_token`\nreturned from the previous call to\nListAnalytics.\nWill be a date string in `YYYY-MM-DD` format representing the end date\nof the date range of results to return.\nIf unspecified or set to \"\", default value is the current date.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Requested page size. Server may return fewer analytics than requested.\nIf unspecified or set to 0, default value is 30.\nSpecifies the number of days in the date range when querying analytics.\nThe `page_token` represents the end date of the date range\nand the start date is calculated using the `page_size` as the number\nof days BEFORE the end date.\nMust be a non-negative integer.", + "type": "integer", + "location": "query" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "location": "query", + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.locale": { + "location": "query", + "description": "Locale to use for the current request.", + "type": "string" + }, "requestMetadata.userOverrides.ipAddress": { "description": "IP address to use instead of the user's geo-located IP address.", "type": "string", @@ -104,9 +228,9 @@ "repeated": true }, "requestMetadata.trafficSource.trafficSubId": { + "location": "query", "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string", - "location": "query" + "type": "string" }, "requestMetadata.partnersSessionId": { "location": "query", @@ -119,145 +243,6 @@ "location": "query" } }, - "flatPath": "v2/offers", - "id": "partners.offers.list", - "path": "v2/offers" - } - }, - "resources": { - "history": { - "methods": { - "list": { - "flatPath": "v2/offers/history", - "path": "v2/offers/history", - "id": "partners.offers.history.list", - "description": "Lists the Historical Offers for the current user (or user's entire company)", - "httpMethod": "GET", - "response": { - "$ref": "ListOffersHistoryResponse" - }, - "parameterOrder": [], - "parameters": { - "requestMetadata.trafficSource.trafficSourceId": { - "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string", - "location": "query" - }, - "requestMetadata.locale": { - "type": "string", - "location": "query", - "description": "Locale to use for the current request." - }, - "requestMetadata.userOverrides.ipAddress": { - "location": "query", - "description": "IP address to use instead of the user's geo-located IP address.", - "type": "string" - }, - "entireCompany": { - "description": "if true, show history for the entire company. Requires user to be admin.", - "type": "boolean", - "location": "query" - }, - "requestMetadata.experimentIds": { - "repeated": true, - "location": "query", - "description": "Experiment IDs the current request belongs to.", - "type": "string" - }, - "requestMetadata.trafficSource.trafficSubId": { - "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string", - "location": "query" - }, - "orderBy": { - "type": "string", - "location": "query", - "description": "Comma-separated list of fields to order by, e.g.: \"foo,bar,baz\".\nUse \"foo desc\" to sort descending.\nList of valid field names is: name, offer_code, expiration_time, status,\n last_modified_time, sender_name, creation_time, country_code,\n offer_type." - }, - "requestMetadata.partnersSessionId": { - "location": "query", - "description": "Google Partners session ID.", - "type": "string" - }, - "requestMetadata.userOverrides.userId": { - "description": "Logged-in user ID to impersonate instead of the user's ID.", - "type": "string", - "location": "query" - }, - "pageToken": { - "location": "query", - "description": "Token to retrieve a specific page.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum number of rows to return per page.", - "type": "integer" - } - } - } - } - } - } - }, - "analytics": { - "methods": { - "list": { - "response": { - "$ref": "ListAnalyticsResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "parameters": { - "requestMetadata.experimentIds": { - "repeated": true, - "location": "query", - "description": "Experiment IDs the current request belongs to.", - "type": "string" - }, - "requestMetadata.trafficSource.trafficSubId": { - "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string", - "location": "query" - }, - "requestMetadata.userOverrides.userId": { - "type": "string", - "location": "query", - "description": "Logged-in user ID to impersonate instead of the user's ID." - }, - "requestMetadata.partnersSessionId": { - "description": "Google Partners session ID.", - "type": "string", - "location": "query" - }, - "pageToken": { - "type": "string", - "location": "query", - "description": "A token identifying a page of results that the server returns.\nTypically, this is the value of `ListAnalyticsResponse.next_page_token`\nreturned from the previous call to\nListAnalytics.\nWill be a date string in `YYYY-MM-DD` format representing the end date\nof the date range of results to return.\nIf unspecified or set to \"\", default value is the current date." - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. Server may return fewer analytics than requested.\nIf unspecified or set to 0, default value is 30.\nSpecifies the number of days in the date range when querying analytics.\nThe `page_token` represents the end date of the date range\nand the start date is calculated using the `page_size` as the number\nof days BEFORE the end date.\nMust be a non-negative integer.", - "type": "integer" - }, - "requestMetadata.trafficSource.trafficSourceId": { - "type": "string", - "location": "query", - "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us." - }, - "requestMetadata.locale": { - "location": "query", - "description": "Locale to use for the current request.", - "type": "string" - }, - "requestMetadata.userOverrides.ipAddress": { - "description": "IP address to use instead of the user's geo-located IP address.", - "type": "string", - "location": "query" - } - }, "flatPath": "v2/analytics", "id": "partners.analytics.list", "path": "v2/analytics", @@ -265,73 +250,31 @@ } } }, - "userStates": { - "methods": { - "list": { - "response": { - "$ref": "ListUserStatesResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "parameters": { - "requestMetadata.experimentIds": { - "description": "Experiment IDs the current request belongs to.", - "type": "string", - "repeated": true, - "location": "query" - }, - "requestMetadata.trafficSource.trafficSubId": { - "location": "query", - "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string" - }, - "requestMetadata.userOverrides.userId": { - "description": "Logged-in user ID to impersonate instead of the user's ID.", - "type": "string", - "location": "query" - }, - "requestMetadata.partnersSessionId": { - "location": "query", - "description": "Google Partners session ID.", - "type": "string" - }, - "requestMetadata.trafficSource.trafficSourceId": { - "location": "query", - "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string" - }, - "requestMetadata.locale": { - "location": "query", - "description": "Locale to use for the current request.", - "type": "string" - }, - "requestMetadata.userOverrides.ipAddress": { - "location": "query", - "description": "IP address to use instead of the user's geo-located IP address.", - "type": "string" - } - }, - "flatPath": "v2/userStates", - "id": "partners.userStates.list", - "path": "v2/userStates", - "description": "Lists states for current user." - } - } - }, "v2": { "methods": { - "updateLeads": { - "response": { - "$ref": "Lead" - }, + "getPartnersstatus": { + "description": "Gets Partners Status of the logged in user's agency.\nShould only be called if the logged in user is the admin of the agency.", + "httpMethod": "GET", "parameterOrder": [], - "httpMethod": "PATCH", + "response": { + "$ref": "GetPartnersStatusResponse" + }, "parameters": { - "requestMetadata.trafficSource.trafficSourceId": { + "requestMetadata.userOverrides.userId": { "location": "query", - "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "description": "Logged-in user ID to impersonate instead of the user's ID.", "type": "string" }, + "requestMetadata.partnersSessionId": { + "description": "Google Partners session ID.", + "type": "string", + "location": "query" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, "requestMetadata.locale": { "location": "query", "description": "Locale to use for the current request.", @@ -342,12 +285,6 @@ "description": "IP address to use instead of the user's geo-located IP address.", "type": "string" }, - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.\nRequired with at least 1 value in FieldMask's paths.\nOnly `state` and `adwords_customer_id` are currently supported.", - "type": "string" - }, "requestMetadata.experimentIds": { "type": "string", "repeated": true, @@ -355,56 +292,100 @@ "description": "Experiment IDs the current request belongs to." }, "requestMetadata.trafficSource.trafficSubId": { - "location": "query", "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string" - }, - "requestMetadata.userOverrides.userId": { - "description": "Logged-in user ID to impersonate instead of the user's ID.", "type": "string", "location": "query" - }, - "requestMetadata.partnersSessionId": { - "location": "query", - "description": "Google Partners session ID.", - "type": "string" } }, - "flatPath": "v2/leads", - "id": "partners.updateLeads", - "path": "v2/leads", - "request": { - "$ref": "Lead" - }, - "description": "Updates the specified lead." + "flatPath": "v2/partnersstatus", + "path": "v2/partnersstatus", + "id": "partners.getPartnersstatus" }, - "updateCompanies": { + "updateLeads": { "httpMethod": "PATCH", "parameterOrder": [], "response": { - "$ref": "Company" + "$ref": "Lead" }, "parameters": { + "requestMetadata.partnersSessionId": { + "description": "Google Partners session ID.", + "type": "string", + "location": "query" + }, "requestMetadata.userOverrides.userId": { "description": "Logged-in user ID to impersonate instead of the user's ID.", "type": "string", "location": "query" }, - "requestMetadata.partnersSessionId": { - "type": "string", - "location": "query", - "description": "Google Partners session ID." - }, "requestMetadata.trafficSource.trafficSourceId": { "type": "string", "location": "query", "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us." }, "requestMetadata.locale": { - "location": "query", "description": "Locale to use for the current request.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string", + "location": "query" + }, + "updateMask": { + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.\nRequired with at least 1 value in FieldMask's paths.\nOnly `state` and `adwords_customer_id` are currently supported.", + "type": "string", + "location": "query" + }, + "requestMetadata.experimentIds": { + "repeated": true, + "location": "query", + "description": "Experiment IDs the current request belongs to.", "type": "string" }, + "requestMetadata.trafficSource.trafficSubId": { + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v2/leads", + "path": "v2/leads", + "id": "partners.updateLeads", + "description": "Updates the specified lead.", + "request": { + "$ref": "Lead" + } + }, + "updateCompanies": { + "response": { + "$ref": "Company" + }, + "parameterOrder": [], + "httpMethod": "PATCH", + "parameters": { + "requestMetadata.userOverrides.userId": { + "location": "query", + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string" + }, + "requestMetadata.partnersSessionId": { + "type": "string", + "location": "query", + "description": "Google Partners session ID." + }, + "requestMetadata.trafficSource.trafficSourceId": { + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "requestMetadata.locale": { + "description": "Locale to use for the current request.", + "type": "string", + "location": "query" + }, "requestMetadata.userOverrides.ipAddress": { "location": "query", "description": "IP address to use instead of the user's geo-located IP address.", @@ -429,307 +410,19 @@ } }, "flatPath": "v2/companies", - "path": "v2/companies", "id": "partners.updateCompanies", + "path": "v2/companies", + "description": "Update company.\nShould only be called within the context of an authorized logged in user.", "request": { "$ref": "Company" - }, - "description": "Update company.\nShould only be called within the context of an authorized logged in user." - }, - "getPartnersstatus": { - "description": "Gets Partners Status of the logged in user's agency.\nShould only be called if the logged in user is the admin of the agency.", - "response": { - "$ref": "GetPartnersStatusResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "parameters": { - "requestMetadata.trafficSource.trafficSourceId": { - "location": "query", - "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string" - }, - "requestMetadata.locale": { - "location": "query", - "description": "Locale to use for the current request.", - "type": "string" - }, - "requestMetadata.userOverrides.ipAddress": { - "description": "IP address to use instead of the user's geo-located IP address.", - "type": "string", - "location": "query" - }, - "requestMetadata.experimentIds": { - "type": "string", - "repeated": true, - "location": "query", - "description": "Experiment IDs the current request belongs to." - }, - "requestMetadata.trafficSource.trafficSubId": { - "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string", - "location": "query" - }, - "requestMetadata.partnersSessionId": { - "location": "query", - "description": "Google Partners session ID.", - "type": "string" - }, - "requestMetadata.userOverrides.userId": { - "type": "string", - "location": "query", - "description": "Logged-in user ID to impersonate instead of the user's ID." - } - }, - "flatPath": "v2/partnersstatus", - "id": "partners.getPartnersstatus", - "path": "v2/partnersstatus" - } - } - }, - "users": { - "methods": { - "deleteCompanyRelation": { - "response": { - "$ref": "Empty" - }, - "httpMethod": "DELETE", - "parameterOrder": [ - "userId" - ], - "parameters": { - "requestMetadata.userOverrides.userId": { - "description": "Logged-in user ID to impersonate instead of the user's ID.", - "type": "string", - "location": "query" - }, - "requestMetadata.partnersSessionId": { - "location": "query", - "description": "Google Partners session ID.", - "type": "string" - }, - "requestMetadata.trafficSource.trafficSourceId": { - "location": "query", - "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string" - }, - "requestMetadata.locale": { - "description": "Locale to use for the current request.", - "type": "string", - "location": "query" - }, - "requestMetadata.userOverrides.ipAddress": { - "location": "query", - "description": "IP address to use instead of the user's geo-located IP address.", - "type": "string" - }, - "requestMetadata.experimentIds": { - "description": "Experiment IDs the current request belongs to.", - "type": "string", - "repeated": true, - "location": "query" - }, - "requestMetadata.trafficSource.trafficSubId": { - "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string", - "location": "query" - }, - "userId": { - "description": "The ID of the user. Can be set to \u003ccode\u003eme\u003c/code\u003e to mean\nthe currently authenticated user.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v2/users/{userId}/companyRelation", - "id": "partners.users.deleteCompanyRelation", - "path": "v2/users/{userId}/companyRelation", - "description": "Deletes a user's company relation. Unaffiliaites the user from a company." - }, - "createCompanyRelation": { - "httpMethod": "PUT", - "parameterOrder": [ - "userId" - ], - "response": { - "$ref": "CompanyRelation" - }, - "parameters": { - "requestMetadata.userOverrides.ipAddress": { - "description": "IP address to use instead of the user's geo-located IP address.", - "type": "string", - "location": "query" - }, - "requestMetadata.experimentIds": { - "description": "Experiment IDs the current request belongs to.", - "type": "string", - "repeated": true, - "location": "query" - }, - "requestMetadata.trafficSource.trafficSubId": { - "type": "string", - "location": "query", - "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us." - }, - "userId": { - "description": "The ID of the user. Can be set to \u003ccode\u003eme\u003c/code\u003e to mean\nthe currently authenticated user.", - "type": "string", - "required": true, - "location": "path" - }, - "requestMetadata.userOverrides.userId": { - "location": "query", - "description": "Logged-in user ID to impersonate instead of the user's ID.", - "type": "string" - }, - "requestMetadata.partnersSessionId": { - "description": "Google Partners session ID.", - "type": "string", - "location": "query" - }, - "requestMetadata.trafficSource.trafficSourceId": { - "location": "query", - "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string" - }, - "requestMetadata.locale": { - "location": "query", - "description": "Locale to use for the current request.", - "type": "string" - } - }, - "flatPath": "v2/users/{userId}/companyRelation", - "path": "v2/users/{userId}/companyRelation", - "id": "partners.users.createCompanyRelation", - "request": { - "$ref": "CompanyRelation" - }, - "description": "Creates a user's company relation. Affiliates the user to a company." - }, - "get": { - "id": "partners.users.get", - "path": "v2/users/{userId}", - "description": "Gets a user.", - "response": { - "$ref": "User" - }, - "parameterOrder": [ - "userId" - ], - "httpMethod": "GET", - "parameters": { - "requestMetadata.userOverrides.userId": { - "description": "Logged-in user ID to impersonate instead of the user's ID.", - "type": "string", - "location": "query" - }, - "requestMetadata.partnersSessionId": { - "location": "query", - "description": "Google Partners session ID.", - "type": "string" - }, - "userView": { - "location": "query", - "enum": [ - "BASIC", - "PROFILE", - "PUBLIC_PROFILE" - ], - "description": "Specifies what parts of the user information to return.", - "type": "string" - }, - "requestMetadata.trafficSource.trafficSourceId": { - "location": "query", - "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string" - }, - "requestMetadata.locale": { - "location": "query", - "description": "Locale to use for the current request.", - "type": "string" - }, - "requestMetadata.userOverrides.ipAddress": { - "location": "query", - "description": "IP address to use instead of the user's geo-located IP address.", - "type": "string" - }, - "requestMetadata.experimentIds": { - "description": "Experiment IDs the current request belongs to.", - "type": "string", - "repeated": true, - "location": "query" - }, - "requestMetadata.trafficSource.trafficSubId": { - "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string", - "location": "query" - }, - "userId": { - "location": "path", - "description": "Identifier of the user. Can be set to \u003ccode\u003eme\u003c/code\u003e to mean the currently\nauthenticated user.", - "type": "string", - "required": true - } - }, - "flatPath": "v2/users/{userId}" - }, - "updateProfile": { - "parameters": { - "requestMetadata.userOverrides.userId": { - "location": "query", - "description": "Logged-in user ID to impersonate instead of the user's ID.", - "type": "string" - }, - "requestMetadata.partnersSessionId": { - "location": "query", - "description": "Google Partners session ID.", - "type": "string" - }, - "requestMetadata.trafficSource.trafficSourceId": { - "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string", - "location": "query" - }, - "requestMetadata.locale": { - "description": "Locale to use for the current request.", - "type": "string", - "location": "query" - }, - "requestMetadata.userOverrides.ipAddress": { - "location": "query", - "description": "IP address to use instead of the user's geo-located IP address.", - "type": "string" - }, - "requestMetadata.experimentIds": { - "description": "Experiment IDs the current request belongs to.", - "type": "string", - "repeated": true, - "location": "query" - }, - "requestMetadata.trafficSource.trafficSubId": { - "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v2/users/profile", - "id": "partners.users.updateProfile", - "path": "v2/users/profile", - "request": { - "$ref": "UserProfile" - }, - "description": "Updates a user's profile. A user can only update their own profile and\nshould only be called within the context of a logged in user.", - "response": { - "$ref": "UserProfile" - }, - "parameterOrder": [], - "httpMethod": "PATCH" + } } } }, "companies": { "methods": { "list": { + "flatPath": "v2/companies", "path": "v2/companies", "id": "partners.companies.list", "description": "Lists companies.", @@ -739,13 +432,147 @@ "$ref": "ListCompaniesResponse" }, "parameters": { - "maxMonthlyBudget.nanos": { + "requestMetadata.partnersSessionId": { + "description": "Google Partners session ID.", + "type": "string", + "location": "query" + }, + "pageToken": { + "type": "string", + "location": "query", + "description": "A token identifying a page of results that the server returns.\nTypically, this is the value of `ListCompaniesResponse.next_page_token`\nreturned from the previous call to\nListCompanies." + }, + "companyName": { + "description": "Company name to search for.", + "type": "string", + "location": "query" + }, + "industries": { + "location": "query", + "enum": [ + "INDUSTRY_UNSPECIFIED", + "I_AUTOMOTIVE", + "I_BUSINESS_TO_BUSINESS", + "I_CONSUMER_PACKAGED_GOODS", + "I_EDUCATION", + "I_FINANCE", + "I_HEALTHCARE", + "I_MEDIA_AND_ENTERTAINMENT", + "I_RETAIL", + "I_TECHNOLOGY", + "I_TRAVEL" + ], + "description": "List of industries the company can help with.", + "type": "string", + "repeated": true + }, + "websiteUrl": { + "location": "query", + "description": "Website URL that will help to find a better matched company.\n.", + "type": "string" + }, + "gpsMotivations": { + "location": "query", + "enum": [ + "GPS_MOTIVATION_UNSPECIFIED", + "GPSM_HELP_WITH_ADVERTISING", + "GPSM_HELP_WITH_WEBSITE", + "GPSM_NO_WEBSITE" + ], + "description": "List of reasons for using Google Partner Search to get companies.", + "type": "string", + "repeated": true + }, + "languageCodes": { + "repeated": true, + "location": "query", + "description": "List of language codes that company can support. Only primary language\nsubtags are accepted as defined by\n\u003ca href=\"https://tools.ietf.org/html/bcp47\"\u003eBCP 47\u003c/a\u003e\n(IETF BCP 47, \"Tags for Identifying Languages\").", + "type": "string" + }, + "pageSize": { "location": "query", "format": "int32", - "description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", + "description": "Requested page size. Server may return fewer companies than requested.\nIf unspecified, server picks an appropriate default.", "type": "integer" }, + "requestMetadata.userOverrides.ipAddress": { + "type": "string", + "location": "query", + "description": "IP address to use instead of the user's geo-located IP address." + }, + "requestMetadata.experimentIds": { + "type": "string", + "repeated": true, + "location": "query", + "description": "Experiment IDs the current request belongs to." + }, + "orderBy": { + "location": "query", + "description": "How to order addresses within the returned companies. Currently, only\n`address` and `address desc` is supported which will sorted by closest to\nfarthest in distance from given address and farthest to closest distance\nfrom given address respectively.", + "type": "string" + }, + "specializations": { + "description": "List of specializations that the returned agencies should provide. If this\nis not empty, any returned agency must have at least one of these\nspecializations, or one of the services in the \"services\" field.", + "type": "string", + "repeated": true, + "location": "query", + "enum": [ + "BADGE_SPECIALIZATION_UNKNOWN", + "BADGE_SPECIALIZATION_ADWORDS_SEARCH", + "BADGE_SPECIALIZATION_ADWORDS_DISPLAY", + "BADGE_SPECIALIZATION_ADWORDS_MOBILE", + "BADGE_SPECIALIZATION_ADWORDS_VIDEO", + "BADGE_SPECIALIZATION_ADWORDS_SHOPPING" + ] + }, + "maxMonthlyBudget.currencyCode": { + "location": "query", + "description": "The 3-letter currency code defined in ISO 4217.", + "type": "string" + }, + "minMonthlyBudget.currencyCode": { + "location": "query", + "description": "The 3-letter currency code defined in ISO 4217.", + "type": "string" + }, + "requestMetadata.userOverrides.userId": { + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string", + "location": "query" + }, + "view": { + "enum": [ + "COMPANY_VIEW_UNSPECIFIED", + "CV_GOOGLE_PARTNER_SEARCH" + ], + "description": "The view of the `Company` resource to be returned. This must not be\n`COMPANY_VIEW_UNSPECIFIED`.", + "type": "string", + "location": "query" + }, + "requestMetadata.locale": { + "location": "query", + "description": "Locale to use for the current request.", + "type": "string" + }, + "address": { + "description": "The address to use when searching for companies.\nIf not given, the geo-located address of the request is used.", + "type": "string", + "location": "query" + }, + "minMonthlyBudget.units": { + "location": "query", + "format": "int64", + "description": "The whole units of the amount.\nFor example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", + "type": "string" + }, + "maxMonthlyBudget.nanos": { + "format": "int32", + "description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", + "type": "integer", + "location": "query" + }, "services": { + "location": "query", "enum": [ "SERVICE_UNSPECIFIED", "S_ADVANCED_ADWORDS_SUPPORT", @@ -757,8 +584,7 @@ ], "description": "List of services that the returned agencies should provide. If this is\nnot empty, any returned agency must have at least one of these services,\nor one of the specializations in the \"specializations\" field.", "type": "string", - "repeated": true, - "location": "query" + "repeated": true }, "requestMetadata.trafficSource.trafficSourceId": { "location": "query", @@ -781,188 +607,44 @@ "description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", "type": "integer", "location": "query" - }, - "requestMetadata.partnersSessionId": { - "location": "query", - "description": "Google Partners session ID.", - "type": "string" - }, - "pageToken": { - "location": "query", - "description": "A token identifying a page of results that the server returns.\nTypically, this is the value of `ListCompaniesResponse.next_page_token`\nreturned from the previous call to\nListCompanies.", - "type": "string" - }, - "companyName": { - "description": "Company name to search for.", - "type": "string", - "location": "query" - }, - "industries": { - "type": "string", - "repeated": true, - "location": "query", - "enum": [ - "INDUSTRY_UNSPECIFIED", - "I_AUTOMOTIVE", - "I_BUSINESS_TO_BUSINESS", - "I_CONSUMER_PACKAGED_GOODS", - "I_EDUCATION", - "I_FINANCE", - "I_HEALTHCARE", - "I_MEDIA_AND_ENTERTAINMENT", - "I_RETAIL", - "I_TECHNOLOGY", - "I_TRAVEL" - ], - "description": "List of industries the company can help with." - }, - "websiteUrl": { - "description": "Website URL that will help to find a better matched company.\n.", - "type": "string", - "location": "query" - }, - "gpsMotivations": { - "location": "query", - "enum": [ - "GPS_MOTIVATION_UNSPECIFIED", - "GPSM_HELP_WITH_ADVERTISING", - "GPSM_HELP_WITH_WEBSITE", - "GPSM_NO_WEBSITE" - ], - "description": "List of reasons for using Google Partner Search to get companies.", - "type": "string", - "repeated": true - }, - "languageCodes": { - "description": "List of language codes that company can support. Only primary language\nsubtags are accepted as defined by\n\u003ca href=\"https://tools.ietf.org/html/bcp47\"\u003eBCP 47\u003c/a\u003e\n(IETF BCP 47, \"Tags for Identifying Languages\").", - "type": "string", - "repeated": true, - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "Requested page size. Server may return fewer companies than requested.\nIf unspecified, server picks an appropriate default.", - "type": "integer", - "location": "query" - }, - "requestMetadata.userOverrides.ipAddress": { - "location": "query", - "description": "IP address to use instead of the user's geo-located IP address.", - "type": "string" - }, - "requestMetadata.experimentIds": { - "type": "string", - "repeated": true, - "location": "query", - "description": "Experiment IDs the current request belongs to." - }, - "orderBy": { - "location": "query", - "description": "How to order addresses within the returned companies. Currently, only\n`address` and `address desc` is supported which will sorted by closest to\nfarthest in distance from given address and farthest to closest distance\nfrom given address respectively.", - "type": "string" - }, - "specializations": { - "repeated": true, - "location": "query", - "enum": [ - "BADGE_SPECIALIZATION_UNKNOWN", - "BADGE_SPECIALIZATION_ADWORDS_SEARCH", - "BADGE_SPECIALIZATION_ADWORDS_DISPLAY", - "BADGE_SPECIALIZATION_ADWORDS_MOBILE", - "BADGE_SPECIALIZATION_ADWORDS_VIDEO", - "BADGE_SPECIALIZATION_ADWORDS_SHOPPING" - ], - "description": "List of specializations that the returned agencies should provide. If this\nis not empty, any returned agency must have at least one of these\nspecializations, or one of the services in the \"services\" field.", - "type": "string" - }, - "maxMonthlyBudget.currencyCode": { - "location": "query", - "description": "The 3-letter currency code defined in ISO 4217.", - "type": "string" - }, - "minMonthlyBudget.currencyCode": { - "type": "string", - "location": "query", - "description": "The 3-letter currency code defined in ISO 4217." - }, - "requestMetadata.userOverrides.userId": { - "location": "query", - "description": "Logged-in user ID to impersonate instead of the user's ID.", - "type": "string" - }, - "view": { - "enum": [ - "COMPANY_VIEW_UNSPECIFIED", - "CV_GOOGLE_PARTNER_SEARCH" - ], - "description": "The view of the `Company` resource to be returned. This must not be\n`COMPANY_VIEW_UNSPECIFIED`.", - "type": "string", - "location": "query" - }, - "requestMetadata.locale": { - "location": "query", - "description": "Locale to use for the current request.", - "type": "string" - }, - "address": { - "location": "query", - "description": "The address to use when searching for companies.\nIf not given, the geo-located address of the request is used.", - "type": "string" - }, - "minMonthlyBudget.units": { - "format": "int64", - "description": "The whole units of the amount.\nFor example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", - "type": "string", - "location": "query" } - }, - "flatPath": "v2/companies" + } }, "get": { + "response": { + "$ref": "GetCompanyResponse" + }, "httpMethod": "GET", "parameterOrder": [ "companyId" ], - "response": { - "$ref": "GetCompanyResponse" - }, "parameters": { - "address": { - "location": "query", - "description": "The address to use for sorting the company's addresses by proximity.\nIf not given, the geo-located address of the request is used.\nUsed when order_by is set.", - "type": "string" - }, - "requestMetadata.locale": { - "description": "Locale to use for the current request.", - "type": "string", - "location": "query" - }, "requestMetadata.trafficSource.trafficSourceId": { "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", "type": "string", "location": "query" }, "requestMetadata.userOverrides.ipAddress": { - "location": "query", "description": "IP address to use instead of the user's geo-located IP address.", - "type": "string" + "type": "string", + "location": "query" }, "companyId": { - "location": "path", "description": "The ID of the company to retrieve.", "type": "string", - "required": true + "required": true, + "location": "path" }, "requestMetadata.experimentIds": { + "repeated": true, "location": "query", "description": "Experiment IDs the current request belongs to.", - "type": "string", - "repeated": true + "type": "string" }, "currencyCode": { - "type": "string", "location": "query", - "description": "If the company's budget is in a different currency code than this one, then\nthe converted budget is converted to this currency code." + "description": "If the company's budget is in a different currency code than this one, then\nthe converted budget is converted to this currency code.", + "type": "string" }, "requestMetadata.trafficSource.trafficSubId": { "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", @@ -992,11 +674,21 @@ "CV_GOOGLE_PARTNER_SEARCH" ], "description": "The view of `Company` resource to be returned. This must not be\n`COMPANY_VIEW_UNSPECIFIED`." + }, + "address": { + "description": "The address to use for sorting the company's addresses by proximity.\nIf not given, the geo-located address of the request is used.\nUsed when order_by is set.", + "type": "string", + "location": "query" + }, + "requestMetadata.locale": { + "location": "query", + "description": "Locale to use for the current request.", + "type": "string" } }, "flatPath": "v2/companies/{companyId}", - "path": "v2/companies/{companyId}", "id": "partners.companies.get", + "path": "v2/companies/{companyId}", "description": "Gets a company." } }, @@ -1004,116 +696,230 @@ "leads": { "methods": { "create": { - "parameters": { - "companyId": { - "location": "path", - "description": "The ID of the company to contact.", - "type": "string", - "required": true - } - }, - "flatPath": "v2/companies/{companyId}/leads", - "path": "v2/companies/{companyId}/leads", - "id": "partners.companies.leads.create", - "request": { - "$ref": "CreateLeadRequest" - }, - "description": "Creates an advertiser lead for the given company ID.", "httpMethod": "POST", "parameterOrder": [ "companyId" ], "response": { "$ref": "CreateLeadResponse" + }, + "parameters": { + "companyId": { + "description": "The ID of the company to contact.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v2/companies/{companyId}/leads", + "path": "v2/companies/{companyId}/leads", + "id": "partners.companies.leads.create", + "description": "Creates an advertiser lead for the given company ID.", + "request": { + "$ref": "CreateLeadRequest" } } } } } }, - "userEvents": { + "users": { "methods": { - "log": { - "request": { - "$ref": "LogUserEventRequest" - }, - "description": "Logs a user event.", - "httpMethod": "POST", - "parameterOrder": [], + "get": { "response": { - "$ref": "LogUserEventResponse" - }, - "parameters": {}, - "flatPath": "v2/userEvents:log", - "path": "v2/userEvents:log", - "id": "partners.userEvents.log" - } - } - }, - "clientMessages": { - "methods": { - "log": { - "description": "Logs a generic message from the client, such as\n`Failed to render component`, `Profile page is running slow`,\n`More than 500 users have accessed this result.`, etc.", - "request": { - "$ref": "LogMessageRequest" - }, - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "LogMessageResponse" - }, - "parameters": {}, - "flatPath": "v2/clientMessages:log", - "path": "v2/clientMessages:log", - "id": "partners.clientMessages.log" - } - } - }, - "exams": { - "methods": { - "getToken": { - "response": { - "$ref": "ExamToken" + "$ref": "User" }, "parameterOrder": [ - "examType" + "userId" ], "httpMethod": "GET", "parameters": { - "requestMetadata.trafficSource.trafficSubId": { + "userView": { + "description": "Specifies what parts of the user information to return.", + "type": "string", "location": "query", - "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "enum": [ + "BASIC", + "PROFILE", + "PUBLIC_PROFILE" + ] + }, + "requestMetadata.trafficSource.trafficSourceId": { + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "requestMetadata.locale": { + "description": "Locale to use for the current request.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.ipAddress": { + "location": "query", + "description": "IP address to use instead of the user's geo-located IP address.", "type": "string" }, - "examType": { + "requestMetadata.experimentIds": { + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true, + "location": "query" + }, + "requestMetadata.trafficSource.trafficSubId": { + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "userId": { "location": "path", - "enum": [ - "CERTIFICATION_EXAM_TYPE_UNSPECIFIED", - "CET_ADWORDS_FUNDAMENTALS", - "CET_ADWORDS_ADVANCED_SEARCH", - "CET_ADWORDS_ADVANCED_DISPLAY", - "CET_VIDEO_ADS", - "CET_DOUBLECLICK", - "CET_ANALYTICS", - "CET_SHOPPING", - "CET_MOBILE", - "CET_DIGITAL_SALES", - "CET_MOBILE_SITES" - ], - "description": "The exam type we are requesting a token for.", + "description": "Identifier of the user. Can be set to \u003ccode\u003eme\u003c/code\u003e to mean the currently\nauthenticated user.", "type": "string", "required": true }, + "requestMetadata.partnersSessionId": { + "description": "Google Partners session ID.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.userId": { + "location": "query", + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string" + } + }, + "flatPath": "v2/users/{userId}", + "id": "partners.users.get", + "path": "v2/users/{userId}", + "description": "Gets a user." + }, + "updateProfile": { + "description": "Updates a user's profile. A user can only update their own profile and\nshould only be called within the context of a logged in user.", + "request": { + "$ref": "UserProfile" + }, + "response": { + "$ref": "UserProfile" + }, + "parameterOrder": [], + "httpMethod": "PATCH", + "parameters": { "requestMetadata.partnersSessionId": { "location": "query", "description": "Google Partners session ID.", "type": "string" }, "requestMetadata.userOverrides.userId": { - "location": "query", "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string", + "location": "query" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "requestMetadata.locale": { + "location": "query", + "description": "Locale to use for the current request.", "type": "string" }, + "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string", + "location": "query" + }, + "requestMetadata.experimentIds": { + "repeated": true, + "location": "query", + "description": "Experiment IDs the current request belongs to.", + "type": "string" + }, + "requestMetadata.trafficSource.trafficSubId": { + "location": "query", + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + } + }, + "flatPath": "v2/users/profile", + "id": "partners.users.updateProfile", + "path": "v2/users/profile" + }, + "deleteCompanyRelation": { + "path": "v2/users/{userId}/companyRelation", + "id": "partners.users.deleteCompanyRelation", + "description": "Deletes a user's company relation. Unaffiliaites the user from a company.", + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "userId" + ], + "parameters": { + "requestMetadata.userOverrides.userId": { + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string", + "location": "query" + }, + "requestMetadata.partnersSessionId": { + "location": "query", + "description": "Google Partners session ID.", + "type": "string" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "requestMetadata.locale": { + "location": "query", + "description": "Locale to use for the current request.", + "type": "string" + }, + "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string", + "location": "query" + }, + "requestMetadata.experimentIds": { + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true, + "location": "query" + }, + "userId": { + "type": "string", + "required": true, + "location": "path", + "description": "The ID of the user. Can be set to \u003ccode\u003eme\u003c/code\u003e to mean\nthe currently authenticated user." + }, + "requestMetadata.trafficSource.trafficSubId": { + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v2/users/{userId}/companyRelation" + }, + "createCompanyRelation": { + "httpMethod": "PUT", + "parameterOrder": [ + "userId" + ], + "response": { + "$ref": "CompanyRelation" + }, + "parameters": { + "requestMetadata.partnersSessionId": { + "description": "Google Partners session ID.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.userId": { + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string", + "location": "query" + }, "requestMetadata.trafficSource.trafficSourceId": { "location": "query", "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", @@ -1134,6 +940,132 @@ "type": "string", "repeated": true, "location": "query" + }, + "userId": { + "location": "path", + "description": "The ID of the user. Can be set to \u003ccode\u003eme\u003c/code\u003e to mean\nthe currently authenticated user.", + "type": "string", + "required": true + }, + "requestMetadata.trafficSource.trafficSubId": { + "location": "query", + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + } + }, + "flatPath": "v2/users/{userId}/companyRelation", + "path": "v2/users/{userId}/companyRelation", + "id": "partners.users.createCompanyRelation", + "description": "Creates a user's company relation. Affiliates the user to a company.", + "request": { + "$ref": "CompanyRelation" + } + } + } + }, + "userEvents": { + "methods": { + "log": { + "parameters": {}, + "flatPath": "v2/userEvents:log", + "path": "v2/userEvents:log", + "id": "partners.userEvents.log", + "description": "Logs a user event.", + "request": { + "$ref": "LogUserEventRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "LogUserEventResponse" + } + } + } + }, + "clientMessages": { + "methods": { + "log": { + "response": { + "$ref": "LogMessageResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "flatPath": "v2/clientMessages:log", + "id": "partners.clientMessages.log", + "path": "v2/clientMessages:log", + "description": "Logs a generic message from the client, such as\n`Failed to render component`, `Profile page is running slow`,\n`More than 500 users have accessed this result.`, etc.", + "request": { + "$ref": "LogMessageRequest" + } + } + } + }, + "exams": { + "methods": { + "getToken": { + "response": { + "$ref": "ExamToken" + }, + "parameterOrder": [ + "examType" + ], + "httpMethod": "GET", + "parameters": { + "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string", + "location": "query" + }, + "requestMetadata.experimentIds": { + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true, + "location": "query" + }, + "requestMetadata.trafficSource.trafficSubId": { + "location": "query", + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "examType": { + "type": "string", + "required": true, + "location": "path", + "enum": [ + "CERTIFICATION_EXAM_TYPE_UNSPECIFIED", + "CET_ADWORDS_FUNDAMENTALS", + "CET_ADWORDS_ADVANCED_SEARCH", + "CET_ADWORDS_ADVANCED_DISPLAY", + "CET_VIDEO_ADS", + "CET_DOUBLECLICK", + "CET_ANALYTICS", + "CET_SHOPPING", + "CET_MOBILE", + "CET_DIGITAL_SALES", + "CET_MOBILE_SITES" + ], + "description": "The exam type we are requesting a token for." + }, + "requestMetadata.partnersSessionId": { + "description": "Google Partners session ID.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.userId": { + "location": "query", + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "requestMetadata.locale": { + "description": "Locale to use for the current request.", + "type": "string", + "location": "query" } }, "flatPath": "v2/exams/{examType}/token", @@ -1142,20 +1074,101 @@ "description": "Gets an Exam Token for a Partner's user to take an exam in the Exams System" } } + }, + "leads": { + "methods": { + "list": { + "description": "Lists advertiser leads for a user's associated company.\nShould only be called within the context of an authorized logged in user.", + "httpMethod": "GET", + "response": { + "$ref": "ListLeadsResponse" + }, + "parameterOrder": [], + "parameters": { + "requestMetadata.userOverrides.userId": { + "location": "query", + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string" + }, + "requestMetadata.partnersSessionId": { + "location": "query", + "description": "Google Partners session ID.", + "type": "string" + }, + "pageToken": { + "description": "A token identifying a page of results that the server returns.\nTypically, this is the value of `ListLeadsResponse.next_page_token`\nreturned from the previous call to\nListLeads.", + "type": "string", + "location": "query" + }, + "pageSize": { + "type": "integer", + "location": "query", + "format": "int32", + "description": "Requested page size. Server may return fewer leads than requested.\nIf unspecified, server picks an appropriate default." + }, + "requestMetadata.trafficSource.trafficSourceId": { + "location": "query", + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.locale": { + "description": "Locale to use for the current request.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string", + "location": "query" + }, + "requestMetadata.experimentIds": { + "repeated": true, + "location": "query", + "description": "Experiment IDs the current request belongs to.", + "type": "string" + }, + "requestMetadata.trafficSource.trafficSubId": { + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "orderBy": { + "location": "query", + "description": "How to order Leads. Currently, only `create_time`\nand `create_time desc` are supported", + "type": "string" + } + }, + "flatPath": "v2/leads", + "path": "v2/leads", + "id": "partners.leads.list" + } + } } }, "parameters": { - "uploadType": { - "type": "string", + "upload_protocol": { "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" }, "fields": { + "type": "string", "location": "query", - "description": "Selector specifying which fields to include in a partial response.", + "description": "Selector specifying which fields to include in a partial response." + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, "$.xgafv": { + "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -1165,8 +1178,7 @@ "1", "2" ], - "description": "V1 error format.", - "type": "string" + "description": "V1 error format." }, "callback": { "description": "JSONP", @@ -1190,14 +1202,14 @@ "type": "string" }, "key": { + "location": "query", "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.", - "type": "string", - "location": "query" + "type": "string" }, "access_token": { + "location": "query", "description": "OAuth access token.", - "type": "string", - "location": "query" + "type": "string" }, "quotaUser": { "location": "query", @@ -1211,30 +1223,452 @@ "type": "boolean" }, "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { "type": "string", "location": "query", - "description": "OAuth 2.0 token for the current user." + "description": "OAuth bearer token." }, - "upload_protocol": { + "oauth_token": { "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "description": "OAuth 2.0 token for the current user.", "type": "string" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" } }, "schemas": { + "Certification": { + "properties": { + "warning": { + "type": "boolean", + "description": "Whether this certification is in the state of warning." + }, + "expiration": { + "format": "google-datetime", + "description": "Date this certification is due to expire.", + "type": "string" + }, + "achieved": { + "description": "Whether this certification has been achieved.", + "type": "boolean" + }, + "certificationType": { + "enumDescriptions": [ + "Unchosen.", + "AdWords certified.", + "YouTube certified.", + "VideoAds certified.", + "Analytics certified.", + "DoubleClick certified.", + "Shopping certified.", + "Mobile certified.", + "Digital sales certified.", + "AdWords Search certified.", + "AdWords Display certified.", + "Mobile Sites certified." + ], + "enum": [ + "CERTIFICATION_TYPE_UNSPECIFIED", + "CT_ADWORDS", + "CT_YOUTUBE", + "CT_VIDEOADS", + "CT_ANALYTICS", + "CT_DOUBLECLICK", + "CT_SHOPPING", + "CT_MOBILE", + "CT_DIGITAL_SALES", + "CT_ADWORDS_SEARCH", + "CT_ADWORDS_DISPLAY", + "CT_MOBILE_SITES" + ], + "description": "The type of certification, the area of expertise.", + "type": "string" + }, + "lastAchieved": { + "format": "google-datetime", + "description": "The date the user last achieved certification.", + "type": "string" + } + }, + "id": "Certification", + "description": "A user's information on a specific certification.", + "type": "object" + }, + "User": { + "description": "A resource representing a user of the Partners platform.", + "type": "object", + "properties": { + "company": { + "description": "The company that the user is associated with.\nIf not present, the user is not associated with any company.", + "$ref": "CompanyRelation" + }, + "profile": { + "description": "The profile information of a Partners user, contains all the directly\neditable user information.", + "$ref": "UserProfile" + }, + "lastAccessTime": { + "format": "google-datetime", + "description": "The most recent time the user interacted with the Partners site.\n@OutputOnly", + "type": "string" + }, + "primaryEmails": { + "description": "The list of emails the user has access to/can select as primary.\n@OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "availableAdwordsManagerAccounts": { + "description": "This is the list of AdWords Manager Accounts the user has edit access to.\nIf the user has edit access to multiple accounts, the user can choose the\npreferred account and we use this when a personal account is needed. Can\nbe empty meaning the user has access to no accounts.\n@OutputOnly", + "items": { + "$ref": "AdWordsManagerAccountInfo" + }, + "type": "array" + }, + "internalId": { + "description": "The internal user ID.\nOnly available for a whitelisted set of api clients.", + "type": "string" + }, + "examStatus": { + "description": "The list of exams the user ever taken. For each type of exam, only one\nentry is listed.", + "items": { + "$ref": "ExamStatus" + }, + "type": "array" + }, + "id": { + "type": "string", + "description": "The ID of the user." + }, + "publicProfile": { + "$ref": "PublicProfile", + "description": "Information about a user's external public profile outside Google Partners." + }, + "companyVerificationEmail": { + "type": "string", + "description": "The email address used by the user used for company verification.\n@OutputOnly" + }, + "certificationStatus": { + "description": "The list of achieved certifications. These are calculated based on exam\nresults and other requirements.\n@OutputOnly", + "items": { + "$ref": "Certification" + }, + "type": "array" + } + }, + "id": "User" + }, + "ListAnalyticsResponse": { + "id": "ListAnalyticsResponse", + "description": "Response message for\nListAnalytics.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve next page of results.\nPass this value in the `ListAnalyticsRequest.page_token` field in the\nsubsequent call to\nListAnalytics to retrieve the\nnext page of results.", + "type": "string" + }, + "analyticsSummary": { + "$ref": "AnalyticsSummary", + "description": "Aggregated information across the response's\nanalytics." + }, + "responseMetadata": { + "$ref": "ResponseMetadata", + "description": "Current response metadata." + }, + "analytics": { + "description": "The list of analytics.\nSorted in ascending order of\nAnalytics.event_date.", + "items": { + "$ref": "Analytics" + }, + "type": "array" + } + } + }, + "ListLeadsResponse": { + "id": "ListLeadsResponse", + "description": "Response message for ListLeads.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve next page of results.\nPass this value in the `ListLeadsRequest.page_token` field in the\nsubsequent call to\nListLeads to retrieve the\nnext page of results.", + "type": "string" + }, + "totalSize": { + "format": "int32", + "description": "The total count of leads for the given company.", + "type": "integer" + }, + "responseMetadata": { + "$ref": "ResponseMetadata", + "description": "Current response metadata." + }, + "leads": { + "description": "The list of leads.", + "items": { + "$ref": "Lead" + }, + "type": "array" + } + } + }, + "Company": { + "id": "Company", + "description": "A company resource in the Google Partners API. Once certified, it qualifies\nfor being searched by advertisers.", + "type": "object", + "properties": { + "ranks": { + "description": "Information related to the ranking of the company within the list of\ncompanies.", + "items": { + "$ref": "Rank" + }, + "type": "array" + }, + "specializationStatus": { + "description": "The list of Google Partners specialization statuses for the company.", + "items": { + "$ref": "SpecializationStatus" + }, + "type": "array" + }, + "badgeTier": { + "enumDescriptions": [ + "Tier badge is not set.", + "Agency has regular partner badge.", + "Agency has premier badge." + ], + "enum": [ + "BADGE_TIER_NONE", + "BADGE_TIER_REGULAR", + "BADGE_TIER_PREMIER" + ], + "description": "Partner badge tier", + "type": "string" + }, + "companyTypes": { + "items": { + "type": "string", + "enum": [ + "COMPANY_TYPE_UNSPECIFIED", + "FULL_SERVICE_AGENCY", + "MEDIA_AGENCY", + "CREATIVE_AGENCY", + "CDIGITAL_AGENCY", + "SEM_SEO", + "PERFORMANCE_MARKETING", + "ADVERTISING_TOOL_DEVELOPMENT", + "PR", + "SELF_MANAGED", + "RESELLER" + ] + }, + "type": "array", + "enumDescriptions": [ + "Unchosen.", + "Handles all aspects of the advertising process.", + "Focuses solely on an advertiser's media placement.", + "Plans/executes advertising campaigns.", + "Like a\nFULL_SERVICE_AGENCY,\nbut specializing in digital.", + "Increases visibility in search engine result pages.", + "Drives promotional efforts for immediate impact.", + "Focuses on bid management, conversion, reporting.", + "Establishes favorable relationship with public through low/no-cost\ncommunications.", + "Does not manage other company's accounts, manages own marketing programs.", + "Full-service AdWords account management for local businesses." + ], + "description": "Company type labels listed on the company's profile." + }, + "autoApprovalEmailDomains": { + "description": "Email domains that allow users with a matching email address to get\nauto-approved for associating with this company.", + "items": { + "type": "string" + }, + "type": "array" + }, + "primaryLanguageCode": { + "description": "The primary language code of the company, as defined by\n\u003ca href=\"https://tools.ietf.org/html/bcp47\"\u003eBCP 47\u003c/a\u003e\n(IETF BCP 47, \"Tags for Identifying Languages\").", + "type": "string" + }, + "profileStatus": { + "enumDescriptions": [ + "Unchosen.", + "Company profile does not show up publicly.", + "Company profile can only be viewed by the profile's URL\nand not by Google Partner Search.", + "Company profile can be viewed by the profile's URL\nand by Google Partner Search." + ], + "enum": [ + "COMPANY_PROFILE_STATUS_UNSPECIFIED", + "HIDDEN", + "PUBLISHED", + "SEARCHABLE" + ], + "description": "The public viewability status of the company's profile.", + "type": "string" + }, + "locations": { + "description": "The list of all company locations.\nIf set, must include the\nprimary_location\nin the list.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "convertedMinMonthlyBudget": { + "$ref": "Money", + "description": "The minimum monthly budget that the company accepts for partner business,\nconverted to the requested currency code." + }, + "industries": { + "enumDescriptions": [ + "Unchosen.", + "The automotive industry.", + "The business-to-business industry.", + "The consumer packaged goods industry.", + "The education industry.", + "The finance industry.", + "The healthcare industry.", + "The media and entertainment industry.", + "The retail industry.", + "The technology industry.", + "The travel industry." + ], + "description": "Industries the company can help with.", + "items": { + "type": "string", + "enum": [ + "INDUSTRY_UNSPECIFIED", + "I_AUTOMOTIVE", + "I_BUSINESS_TO_BUSINESS", + "I_CONSUMER_PACKAGED_GOODS", + "I_EDUCATION", + "I_FINANCE", + "I_HEALTHCARE", + "I_MEDIA_AND_ENTERTAINMENT", + "I_RETAIL", + "I_TECHNOLOGY", + "I_TRAVEL" + ] + }, + "type": "array" + }, + "additionalWebsites": { + "description": "URL of the company's additional websites used to verify the dynamic badges.\nThese are stored as full URLs as entered by the user, but only the TLD will\nbe used for the actual verification.", + "items": { + "type": "string" + }, + "type": "array" + }, + "websiteUrl": { + "description": "URL of the company's website.", + "type": "string" + }, + "primaryAdwordsManagerAccountId": { + "format": "int64", + "description": "The Primary AdWords Manager Account id.", + "type": "string" + }, + "name": { + "description": "The name of the company.", + "type": "string" + }, + "localizedInfos": { + "description": "The list of localized info for the company.", + "items": { + "$ref": "LocalizedCompanyInfo" + }, + "type": "array" + }, + "id": { + "description": "The ID of the company.", + "type": "string" + }, + "certificationStatuses": { + "items": { + "$ref": "CertificationStatus" + }, + "type": "array", + "description": "The list of Google Partners certification statuses for the company." + }, + "publicProfile": { + "description": "Basic information from the company's public profile.", + "$ref": "PublicProfile" + }, + "originalMinMonthlyBudget": { + "$ref": "Money", + "description": "The unconverted minimum monthly budget that the company accepts for partner\nbusiness." + }, + "services": { + "enumDescriptions": [ + "Unchosen.", + "Help with advanced AdWords support.", + "Help with advertising on Google.", + "Help with an enhanced website.", + "Help with an online marketing plan.", + "Help with mobile and video ads.", + "Help with mobile websites." + ], + "description": "Services the company can help with.", + "items": { + "type": "string", + "enum": [ + "SERVICE_UNSPECIFIED", + "S_ADVANCED_ADWORDS_SUPPORT", + "S_ADVERTISING_ON_GOOGLE", + "S_AN_ENHANCED_WEBSITE", + "S_AN_ONLINE_MARKETING_PLAN", + "S_MOBILE_AND_VIDEO_ADS", + "S_MOBILE_WEBSITE_SERVICES" + ] + }, + "type": "array" + }, + "primaryLocation": { + "$ref": "Location", + "description": "The primary location of the company." + } + } + }, + "CreateLeadResponse": { + "description": "Response message for CreateLead.", + "type": "object", + "properties": { + "recaptchaStatus": { + "type": "string", + "enumDescriptions": [ + "Unchosen.", + "No reCaptcha validation needed.", + "reCaptcha challenge passed.", + "reCaptcha challenge failed." + ], + "enum": [ + "RECAPTCHA_STATUS_UNSPECIFIED", + "RS_NOT_NEEDED", + "RS_PASSED", + "RS_FAILED" + ], + "description": "The outcome of \u003ca href=\"https://www.google.com/recaptcha/\"\u003ereCaptcha\u003c/a\u003e\nvalidation." + }, + "lead": { + "description": "Lead that was created depending on the outcome of\n\u003ca href=\"https://www.google.com/recaptcha/\"\u003ereCaptcha\u003c/a\u003e validation.", + "$ref": "Lead" + }, + "responseMetadata": { + "$ref": "ResponseMetadata", + "description": "Current response metadata." + } + }, + "id": "CreateLeadResponse" + }, + "GetCompanyResponse": { + "description": "Response message for GetCompany.", + "type": "object", + "properties": { + "responseMetadata": { + "$ref": "ResponseMetadata", + "description": "Current response metadata." + }, + "company": { + "description": "The company.", + "$ref": "Company" + } + }, + "id": "GetCompanyResponse" + }, "Location": { - "id": "Location", "description": "A location with address and geographic coordinates. May optionally contain a\ndetailed (multi-field) version of the address.", "type": "object", "properties": { @@ -1243,36 +1677,36 @@ "type": "string" }, "locality": { - "type": "string", - "description": "Generally refers to the city/town portion of an address." + "description": "Generally refers to the city/town portion of an address.", + "type": "string" }, "latLng": { - "$ref": "LatLng", - "description": "The latitude and longitude of the location, in degrees." + "description": "The latitude and longitude of the location, in degrees.", + "$ref": "LatLng" }, "address": { "description": "The single string version of the address.", "type": "string" }, "regionCode": { - "type": "string", - "description": "CLDR (Common Locale Data Repository) region code ." + "description": "CLDR (Common Locale Data Repository) region code .", + "type": "string" }, "dependentLocality": { - "description": "Dependent locality or sublocality. Used for UK dependent localities, or\nneighborhoods or boroughs in other locations.", - "type": "string" + "type": "string", + "description": "Dependent locality or sublocality. Used for UK dependent localities, or\nneighborhoods or boroughs in other locations." }, "postalCode": { - "description": "Values are frequently alphanumeric.", - "type": "string" + "type": "string", + "description": "Values are frequently alphanumeric." }, "languageCode": { "description": "Language code of the address. Should be in BCP 47 format.", "type": "string" }, "sortingCode": { - "type": "string", - "description": "Use of this code is very country-specific, but will refer to a secondary\nclassification code for sorting mail." + "description": "Use of this code is very country-specific, but will refer to a secondary\nclassification code for sorting mail.", + "type": "string" }, "addressLine": { "description": "The following address lines represent the most specific part of any\naddress.", @@ -1281,12 +1715,18 @@ }, "type": "array" } - } + }, + "id": "Location" }, "CertificationExamStatus": { + "type": "object", "properties": { + "numberUsersPass": { + "format": "int32", + "description": "The number of people who have passed the certification exam.", + "type": "integer" + }, "type": { - "type": "string", "enumDescriptions": [ "Unchosen.", "Adwords Fundamentals exam.", @@ -1313,26 +1753,17 @@ "CET_DIGITAL_SALES", "CET_MOBILE_SITES" ], - "description": "The type of certification exam." - }, - "numberUsersPass": { - "format": "int32", - "description": "The number of people who have passed the certification exam.", - "type": "integer" + "description": "The type of certification exam.", + "type": "string" } }, "id": "CertificationExamStatus", - "description": "Status for a Google Partners certification exam.", - "type": "object" + "description": "Status for a Google Partners certification exam." }, "ExamToken": { + "description": "A token that allows a user to take an exam.", "type": "object", "properties": { - "examId": { - "format": "int64", - "description": "The id of the exam the token is for.", - "type": "string" - }, "token": { "description": "The token, only present if the user has access to the exam.", "type": "string" @@ -1366,18 +1797,30 @@ ], "description": "The type of the exam the token belongs to.", "type": "string" + }, + "examId": { + "format": "int64", + "description": "The id of the exam the token is for.", + "type": "string" } }, - "id": "ExamToken", - "description": "A token that allows a user to take an exam." + "id": "ExamToken" }, "OptIns": { "description": "A set of opt-ins for a user.", "type": "object", "properties": { + "specialOffers": { + "description": "An opt-in about receiving email regarding new features and products.", + "type": "boolean" + }, + "performanceSuggestions": { + "description": "An opt-in about receiving email with customized AdWords campaign management\ntips.", + "type": "boolean" + }, "phoneContact": { - "type": "boolean", - "description": "An opt-in to allow recieivng phone calls about their Partners account." + "description": "An opt-in to allow recieivng phone calls about their Partners account.", + "type": "boolean" }, "physicalMail": { "description": "An opt-in to receive special promotional gifts and material in the mail.", @@ -1386,67 +1829,52 @@ "marketComm": { "description": "An opt-in about receiving email from Partners marketing teams. Includes\nmember-only events and special promotional offers for Google products.", "type": "boolean" - }, - "specialOffers": { - "description": "An opt-in about receiving email regarding new features and products.", - "type": "boolean" - }, - "performanceSuggestions": { - "description": "An opt-in about receiving email with customized AdWords campaign management\ntips.", - "type": "boolean" } }, "id": "OptIns" }, "Rank": { + "description": "Information related to ranking of results.", + "type": "object", "properties": { - "value": { - "format": "double", - "description": "The numerical value of the rank.", - "type": "number" - }, "type": { + "enum": [ + "RANK_TYPE_UNSPECIFIED", + "RT_FINAL_SCORE" + ], "description": "The type of rank.", "type": "string", "enumDescriptions": [ "Unchosen.", "Total final score." - ], - "enum": [ - "RANK_TYPE_UNSPECIFIED", - "RT_FINAL_SCORE" ] + }, + "value": { + "format": "double", + "description": "The numerical value of the rank.", + "type": "number" } }, - "id": "Rank", - "description": "Information related to ranking of results.", + "id": "Rank" + }, + "GetPartnersStatusResponse": { + "properties": { + "responseMetadata": { + "$ref": "ResponseMetadata", + "description": "Current response metadata." + } + }, + "id": "GetPartnersStatusResponse", + "description": "Response message for\nGetPartnersStatus.", "type": "object" }, "UserProfile": { "description": "The profile information of a Partners user.", "type": "object", "properties": { - "profilePublic": { - "description": "Whether the user's public profile is visible to anyone with the URL.", - "type": "boolean" - }, - "channels": { - "items": { - "type": "string" - }, - "type": "array", - "description": "A list of ids representing which channels the user selected they were in." - }, - "jobFunctions": { - "description": "A list of ids represnting which job categories the user selected.", - "items": { - "type": "string" - }, - "type": "array" - }, "givenName": { - "description": "The user's given name.", - "type": "string" + "type": "string", + "description": "The user's given name." }, "address": { "$ref": "Location", @@ -1459,14 +1887,14 @@ }, "type": "array" }, - "familyName": { - "description": "The user's family name.", - "type": "string" - }, "emailOptIns": { "$ref": "OptIns", "description": "The list of opt-ins for the user, related to communication preferences." }, + "familyName": { + "type": "string", + "description": "The user's family name." + }, "languages": { "description": "The list of languages this user understands.", "items": { @@ -1475,19 +1903,19 @@ "type": "array" }, "markets": { - "description": "A list of ids representing which markets the user was interested in.", "items": { "type": "string" }, - "type": "array" - }, - "adwordsManagerAccount": { - "type": "string", - "format": "int64", - "description": "If the user has edit access to multiple accounts, the user can choose the\npreferred account and it is used when a personal account is needed. Can\nbe empty." + "type": "array", + "description": "A list of ids representing which markets the user was interested in." }, "phoneNumber": { - "description": "The user's phone number.", + "type": "string", + "description": "The user's phone number." + }, + "adwordsManagerAccount": { + "format": "int64", + "description": "If the user has edit access to multiple accounts, the user can choose the\npreferred account and it is used when a personal account is needed. Can\nbe empty.", "type": "string" }, "primaryCountryCode": { @@ -1495,24 +1923,32 @@ "type": "string" }, "emailAddress": { - "type": "string", - "description": "The email address the user has selected on the Partners site as primary." + "description": "The email address the user has selected on the Partners site as primary.", + "type": "string" + }, + "profilePublic": { + "type": "boolean", + "description": "Whether the user's public profile is visible to anyone with the URL." + }, + "channels": { + "description": "A list of ids representing which channels the user selected they were in.", + "items": { + "type": "string" + }, + "type": "array" + }, + "jobFunctions": { + "description": "A list of ids represnting which job categories the user selected.", + "items": { + "type": "string" + }, + "type": "array" } }, "id": "UserProfile" }, - "GetPartnersStatusResponse": { - "description": "Response message for\nGetPartnersStatus.", - "type": "object", - "properties": { - "responseMetadata": { - "$ref": "ResponseMetadata", - "description": "Current response metadata." - } - }, - "id": "GetPartnersStatusResponse" - }, "HistoricalOffer": { + "description": "Historical information about a Google Partners Offer.", "type": "object", "properties": { "lastModifiedTime": { @@ -1525,6 +1961,8 @@ "type": "string" }, "offerType": { + "description": "Type of offer.", + "type": "string", "enumDescriptions": [ "Unset.", "AdWords spend X get Y.", @@ -1536,9 +1974,7 @@ "OFFER_TYPE_SPEND_X_GET_Y", "OFFER_TYPE_VIDEO", "OFFER_TYPE_SPEND_MATCH" - ], - "description": "Type of offer.", - "type": "string" + ] }, "senderName": { "description": "Name (First + Last) of the partners user to whom the incentive is allocated.", @@ -1567,14 +2003,6 @@ "type": "string" }, "status": { - "enum": [ - "OFFER_STATUS_UNSPECIFIED", - "OFFER_STATUS_DISTRIBUTED", - "OFFER_STATUS_REDEEMED", - "OFFER_STATUS_AWARDED", - "OFFER_STATUS_EXPIRED" - ], - "description": "Status of the offer.", "type": "string", "enumDescriptions": [ "Unset.", @@ -1582,7 +2010,15 @@ "Offer redeemed.", "Offer awarded.", "Offer expired." - ] + ], + "enum": [ + "OFFER_STATUS_UNSPECIFIED", + "OFFER_STATUS_DISTRIBUTED", + "OFFER_STATUS_REDEEMED", + "OFFER_STATUS_AWARDED", + "OFFER_STATUS_EXPIRED" + ], + "description": "Status of the offer." }, "clientId": { "format": "int64", @@ -1594,16 +2030,11 @@ "type": "string" } }, - "id": "HistoricalOffer", - "description": "Historical information about a Google Partners Offer." + "id": "HistoricalOffer" }, "LogUserEventRequest": { - "description": "Request message for\nLogUserEvent.", - "type": "object", "properties": { "eventCategory": { - "description": "The category the action belongs to.", - "type": "string", "enumDescriptions": [ "Unchosen.", "Google Partner Search category.", @@ -1639,13 +2070,174 @@ "GOOGLE_PARTNER_PORTAL_COMPANY_PROFILE", "EXTERNAL_LINKS", "GOOGLE_PARTNER_LANDING" - ] + ], + "description": "The category the action belongs to.", + "type": "string" }, "lead": { - "description": "Advertiser lead information.", - "$ref": "Lead" + "$ref": "Lead", + "description": "Advertiser lead information." }, "eventAction": { + "enum": [ + "EVENT_ACTION_UNSPECIFIED", + "SMB_CLICKED_FIND_A_PARTNER_BUTTON_BOTTOM", + "SMB_CLICKED_FIND_A_PARTNER_BUTTON_TOP", + "AGENCY_CLICKED_JOIN_NOW_BUTTON_BOTTOM", + "AGENCY_CLICKED_JOIN_NOW_BUTTON_TOP", + "SMB_CANCELED_PARTNER_CONTACT_FORM", + "SMB_CLICKED_CONTACT_A_PARTNER", + "SMB_COMPLETED_PARTNER_CONTACT_FORM", + "SMB_ENTERED_EMAIL_IN_CONTACT_PARTNER_FORM", + "SMB_ENTERED_NAME_IN_CONTACT_PARTNER_FORM", + "SMB_ENTERED_PHONE_IN_CONTACT_PARTNER_FORM", + "SMB_FAILED_RECAPTCHA_IN_CONTACT_PARTNER_FORM", + "PARTNER_VIEWED_BY_SMB", + "SMB_CANCELED_PARTNER_CONTACT_FORM_ON_GPS", + "SMB_CHANGED_A_SEARCH_PARAMETER_TOP", + "SMB_CLICKED_CONTACT_A_PARTNER_ON_GPS", + "SMB_CLICKED_SHOW_MORE_PARTNERS_BUTTON_BOTTOM", + "SMB_COMPLETED_PARTNER_CONTACT_FORM_ON_GPS", + "SMB_NO_PARTNERS_AVAILABLE_WITH_SEARCH_CRITERIA", + "SMB_PERFORMED_SEARCH_ON_GPS", + "SMB_VIEWED_A_PARTNER_ON_GPS", + "SMB_CANCELED_PARTNER_CONTACT_FORM_ON_PROFILE_PAGE", + "SMB_CLICKED_CONTACT_A_PARTNER_ON_PROFILE_PAGE", + "SMB_CLICKED_PARTNER_WEBSITE", + "SMB_COMPLETED_PARTNER_CONTACT_FORM_ON_PROFILE_PAGE", + "SMB_VIEWED_A_PARTNER_PROFILE", + "AGENCY_CLICKED_ACCEPT_TOS_BUTTON", + "AGENCY_CHANGED_TOS_COUNTRY", + "AGENCY_ADDED_ADDRESS_IN_MY_PROFILE_PORTAL", + "AGENCY_ADDED_PHONE_NUMBER_IN_MY_PROFILE_PORTAL", + "AGENCY_CHANGED_PRIMARY_ACCOUNT_ASSOCIATION", + "AGENCY_CHANGED_PRIMARY_COUNTRY_ASSOCIATION", + "AGENCY_CLICKED_AFFILIATE_BUTTON_IN_MY_PROFILE_IN_PORTAL", + "AGENCY_CLICKED_GIVE_EDIT_ACCESS_IN_MY_PROFILE_PORTAL", + "AGENCY_CLICKED_LOG_OUT_IN_MY_PROFILE_PORTAL", + "AGENCY_CLICKED_MY_PROFILE_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_SAVE_AND_CONTINUE_AT_BOT_OF_COMPLETE_PROFILE", + "AGENCY_CLICKED_UNAFFILIATE_IN_MY_PROFILE_PORTAL", + "AGENCY_FILLED_OUT_COMP_AFFILIATION_IN_MY_PROFILE_PORTAL", + "AGENCY_SUCCESSFULLY_CONNECTED_WITH_COMPANY_IN_MY_PROFILE", + "AGENCY_CLICKED_CREATE_MCC_IN_MY_PROFILE_PORTAL", + "AGENCY_DIDNT_HAVE_AN_MCC_ASSOCIATED_ON_COMPLETE_PROFILE", + "AGENCY_HAD_AN_MCC_ASSOCIATED_ON_COMPLETE_PROFILE", + "AGENCY_ADDED_JOB_FUNCTION_IN_MY_PROFILE_PORTAL", + "AGENCY_LOOKED_AT_JOB_FUNCTION_DROP_DOWN", + "AGENCY_SELECTED_ACCOUNT_MANAGER_AS_JOB_FUNCTION", + "AGENCY_SELECTED_ACCOUNT_PLANNER_AS_JOB_FUNCTION", + "AGENCY_SELECTED_ANALYTICS_AS_JOB_FUNCTION", + "AGENCY_SELECTED_CREATIVE_AS_JOB_FUNCTION", + "AGENCY_SELECTED_MEDIA_BUYER_AS_JOB_FUNCTION", + "AGENCY_SELECTED_MEDIA_PLANNER_AS_JOB_FUNCTION", + "AGENCY_SELECTED_OTHER_AS_JOB_FUNCTION", + "AGENCY_SELECTED_PRODUCTION_AS_JOB_FUNCTION", + "AGENCY_SELECTED_SEO_AS_JOB_FUNCTION", + "AGENCY_SELECTED_SALES_REP_AS_JOB_FUNCTION", + "AGENCY_SELECTED_SEARCH_SPECIALIST_AS_JOB_FUNCTION", + "AGENCY_ADDED_CHANNELS_IN_MY_PROFILE_PORTAL", + "AGENCY_LOOKED_AT_ADD_CHANNEL_DROP_DOWN", + "AGENCY_SELECTED_CROSS_CHANNEL_FROM_ADD_CHANNEL", + "AGENCY_SELECTED_DISPLAY_FROM_ADD_CHANNEL", + "AGENCY_SELECTED_MOBILE_FROM_ADD_CHANNEL", + "AGENCY_SELECTED_SEARCH_FROM_ADD_CHANNEL", + "AGENCY_SELECTED_SOCIAL_FROM_ADD_CHANNEL", + "AGENCY_SELECTED_TOOLS_FROM_ADD_CHANNEL", + "AGENCY_SELECTED_YOUTUBE_FROM_ADD_CHANNEL", + "AGENCY_ADDED_INDUSTRIES_IN_MY_PROFILE_PORTAL", + "AGENCY_CHANGED_ADD_INDUSTRIES_DROP_DOWN", + "AGENCY_ADDED_MARKETS_IN_MY_PROFILE_PORTAL", + "AGENCY_CHANGED_ADD_MARKETS_DROP_DOWN", + "AGENCY_CHECKED_RECIEVE_MAIL_PROMOTIONS_MYPROFILE", + "AGENCY_CHECKED_RECIEVE_MAIL_PROMOTIONS_SIGNUP", + "AGENCY_SELECTED_OPT_IN_BETA_TESTS_AND_MKT_RESEARCH", + "AGENCY_SELECTED_OPT_IN_BETA_TESTS_IN_MY_PROFILE_PORTAL", + "AGENCY_SELECTED_OPT_IN_NEWS_IN_MY_PROFILE_PORTAL", + "AGENCY_SELECTED_OPT_IN_NEWS_INVITATIONS_AND_PROMOS", + "AGENCY_SELECTED_OPT_IN_PERFORMANCE_SUG_IN_MY_PROFILE_PORTAL", + "AGENCY_SELECTED_OPT_IN_PERFORMANCE_SUGGESTIONS", + "AGENCY_SELECTED_OPT_IN_SELECT_ALL_EMAIL_NOTIFICATIONS", + "AGENCY_SELECTED_SELECT_ALL_OPT_INS_IN_MY_PROFILE_PORTAL", + "AGENCY_CLICKED_BACK_BUTTON_ON_CONNECT_WITH_COMPANY", + "AGENCY_CLICKED_CONTINUE_TO_OVERVIEW_ON_CONNECT_WITH_COMPANY", + "AGECNY_CLICKED_CREATE_MCC_CONNECT_WITH_COMPANY_NOT_FOUND", + "AGECNY_CLICKED_GIVE_EDIT_ACCESS_CONNECT_WITH_COMPANY_NOT_FOUND", + "AGECNY_CLICKED_LOG_OUT_CONNECT_WITH_COMPANY_NOT_FOUND", + "AGENCY_CLICKED_SKIP_FOR_NOW_ON_CONNECT_WITH_COMPANY_PAGE", + "AGENCY_CLOSED_CONNECTED_TO_COMPANY_X_BUTTON_WRONG_COMPANY", + "AGENCY_COMPLETED_FIELD_CONNECT_WITH_COMPANY", + "AGECNY_FOUND_COMPANY_TO_CONNECT_WITH", + "AGENCY_SUCCESSFULLY_CREATED_COMPANY", + "AGENCY_ADDED_NEW_COMPANY_LOCATION", + "AGENCY_CLICKED_COMMUNITY_JOIN_NOW_LINK_IN_PORTAL_NOTIFICATIONS", + "AGENCY_CLICKED_CONNECT_TO_COMPANY_LINK_IN_PORTAL_NOTIFICATIONS", + "AGENCY_CLICKED_GET_CERTIFIED_LINK_IN_PORTAL_NOTIFICATIONS", + "AGENCY_CLICKED_GET_VIDEO_ADS_CERTIFIED_LINK_IN_PORTAL_NOTIFICATIONS", + "AGENCY_CLICKED_LINK_TO_MCC_LINK_IN_PORTAL_NOTIFICATIONS", + "AGENCY_CLICKED_INSIGHT_CONTENT_IN_PORTAL", + "AGENCY_CLICKED_INSIGHTS_VIEW_NOW_PITCH_DECKS_IN_PORTAL", + "AGENCY_CLICKED_INSIGHTS_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_INSIGHTS_UPLOAD_CONTENT", + "AGENCY_CLICKED_INSIGHTS_VIEWED_DEPRECATED", + "AGENCY_CLICKED_COMMUNITY_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_JOIN_COMMUNITY_BUTTON_COMMUNITY_PORTAL", + "AGENCY_CLICKED_CERTIFICATIONS_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_CERTIFICATIONS_PRODUCT_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_PARTNER_STATUS_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_PARTNER_STATUS_PRODUCT_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_OFFERS_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_SEND_BUTTON_ON_OFFERS_PAGE", + "AGENCY_CLICKED_EXAM_DETAILS_ON_CERT_ADWORDS_PAGE", + "AGENCY_CLICKED_SEE_EXAMS_CERTIFICATION_MAIN_PAGE", + "AGENCY_CLICKED_TAKE_EXAM_ON_CERT_EXAM_PAGE", + "AGENCY_OPENED_LAST_ADMIN_DIALOG", + "AGENCY_OPENED_DIALOG_WITH_NO_USERS", + "AGENCY_PROMOTED_USER_TO_ADMIN", + "AGENCY_UNAFFILIATED", + "AGENCY_CHANGED_ROLES", + "SMB_CLICKED_COMPANY_NAME_LINK_TO_PROFILE", + "SMB_VIEWED_ADWORDS_CERTIFICATE", + "SMB_VIEWED_ADWORDS_SEARCH_CERTIFICATE", + "SMB_VIEWED_ADWORDS_DISPLAY_CERTIFICATE", + "SMB_CLICKED_ADWORDS_CERTIFICATE_HELP_ICON", + "SMB_VIEWED_ANALYTICS_CERTIFICATE", + "SMB_VIEWED_DOUBLECLICK_CERTIFICATE", + "SMB_VIEWED_MOBILE_SITES_CERTIFICATE", + "SMB_VIEWED_VIDEO_ADS_CERTIFICATE", + "SMB_VIEWED_SHOPPING_CERTIFICATE", + "SMB_CLICKED_VIDEO_ADS_CERTIFICATE_HELP_ICON", + "SMB_VIEWED_DIGITAL_SALES_CERTIFICATE", + "CLICKED_HELP_AT_BOTTOM", + "CLICKED_HELP_AT_TOP", + "CLIENT_ERROR", + "AGENCY_CLICKED_LEFT_NAV_STORIES", + "CLICKED", + "SMB_VIEWED_MOBILE_CERTIFICATE", + "AGENCY_FAILED_COMPANY_VERIFICATION", + "VISITED_LANDING", + "VISITED_GPS", + "VISITED_AGENCY_PORTAL", + "CANCELLED_INDIVIDUAL_SIGN_UP", + "CANCELLED_COMPANY_SIGN_UP", + "AGENCY_CLICKED_SIGN_IN_BUTTON_TOP", + "AGENCY_CLICKED_SAVE_AND_CONTINUE_AT_BOT_OF_INCOMPLETE_PROFILE", + "AGENCY_UNSELECTED_OPT_IN_NEWS_INVITATIONS_AND_PROMOS", + "AGENCY_UNSELECTED_OPT_IN_BETA_TESTS_AND_MKT_RESEARCH", + "AGENCY_UNSELECTED_OPT_IN_PERFORMANCE_SUGGESTIONS", + "AGENCY_SELECTED_OPT_OUT_UNSELECT_ALL_EMAIL_NOTIFICATIONS", + "AGENCY_LINKED_INDIVIDUAL_MCC", + "AGENCY_SUGGESTED_TO_USER", + "AGENCY_IGNORED_SUGGESTED_AGENCIES_AND_SEARCHED", + "AGENCY_PICKED_SUGGESTED_AGENCY", + "AGENCY_SEARCHED_FOR_AGENCIES", + "AGENCY_PICKED_SEARCHED_AGENCY", + "AGENCY_DISMISSED_AFFILIATION_WIDGET", + "AGENCY_CLICKED_INSIGHTS_DOWNLOAD_CONTENT", + "AGENCY_PROGRESS_INSIGHTS_VIEW_CONTENT", + "AGENCY_CLICKED_CANCEL_ACCEPT_TOS_BUTTON", + "SMB_ENTERED_WEBSITE_IN_CONTACT_PARTNER_FORM" + ], "description": "The action that occurred.", "type": "string", "enumDescriptions": [ @@ -1806,175 +2398,16 @@ "Agency user is maklingg progress viewing a content item.", "Agency clicked `cancel Terms Of Service` button.", "Advertiser entered website in contact form." - ], - "enum": [ - "EVENT_ACTION_UNSPECIFIED", - "SMB_CLICKED_FIND_A_PARTNER_BUTTON_BOTTOM", - "SMB_CLICKED_FIND_A_PARTNER_BUTTON_TOP", - "AGENCY_CLICKED_JOIN_NOW_BUTTON_BOTTOM", - "AGENCY_CLICKED_JOIN_NOW_BUTTON_TOP", - "SMB_CANCELED_PARTNER_CONTACT_FORM", - "SMB_CLICKED_CONTACT_A_PARTNER", - "SMB_COMPLETED_PARTNER_CONTACT_FORM", - "SMB_ENTERED_EMAIL_IN_CONTACT_PARTNER_FORM", - "SMB_ENTERED_NAME_IN_CONTACT_PARTNER_FORM", - "SMB_ENTERED_PHONE_IN_CONTACT_PARTNER_FORM", - "SMB_FAILED_RECAPTCHA_IN_CONTACT_PARTNER_FORM", - "PARTNER_VIEWED_BY_SMB", - "SMB_CANCELED_PARTNER_CONTACT_FORM_ON_GPS", - "SMB_CHANGED_A_SEARCH_PARAMETER_TOP", - "SMB_CLICKED_CONTACT_A_PARTNER_ON_GPS", - "SMB_CLICKED_SHOW_MORE_PARTNERS_BUTTON_BOTTOM", - "SMB_COMPLETED_PARTNER_CONTACT_FORM_ON_GPS", - "SMB_NO_PARTNERS_AVAILABLE_WITH_SEARCH_CRITERIA", - "SMB_PERFORMED_SEARCH_ON_GPS", - "SMB_VIEWED_A_PARTNER_ON_GPS", - "SMB_CANCELED_PARTNER_CONTACT_FORM_ON_PROFILE_PAGE", - "SMB_CLICKED_CONTACT_A_PARTNER_ON_PROFILE_PAGE", - "SMB_CLICKED_PARTNER_WEBSITE", - "SMB_COMPLETED_PARTNER_CONTACT_FORM_ON_PROFILE_PAGE", - "SMB_VIEWED_A_PARTNER_PROFILE", - "AGENCY_CLICKED_ACCEPT_TOS_BUTTON", - "AGENCY_CHANGED_TOS_COUNTRY", - "AGENCY_ADDED_ADDRESS_IN_MY_PROFILE_PORTAL", - "AGENCY_ADDED_PHONE_NUMBER_IN_MY_PROFILE_PORTAL", - "AGENCY_CHANGED_PRIMARY_ACCOUNT_ASSOCIATION", - "AGENCY_CHANGED_PRIMARY_COUNTRY_ASSOCIATION", - "AGENCY_CLICKED_AFFILIATE_BUTTON_IN_MY_PROFILE_IN_PORTAL", - "AGENCY_CLICKED_GIVE_EDIT_ACCESS_IN_MY_PROFILE_PORTAL", - "AGENCY_CLICKED_LOG_OUT_IN_MY_PROFILE_PORTAL", - "AGENCY_CLICKED_MY_PROFILE_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_SAVE_AND_CONTINUE_AT_BOT_OF_COMPLETE_PROFILE", - "AGENCY_CLICKED_UNAFFILIATE_IN_MY_PROFILE_PORTAL", - "AGENCY_FILLED_OUT_COMP_AFFILIATION_IN_MY_PROFILE_PORTAL", - "AGENCY_SUCCESSFULLY_CONNECTED_WITH_COMPANY_IN_MY_PROFILE", - "AGENCY_CLICKED_CREATE_MCC_IN_MY_PROFILE_PORTAL", - "AGENCY_DIDNT_HAVE_AN_MCC_ASSOCIATED_ON_COMPLETE_PROFILE", - "AGENCY_HAD_AN_MCC_ASSOCIATED_ON_COMPLETE_PROFILE", - "AGENCY_ADDED_JOB_FUNCTION_IN_MY_PROFILE_PORTAL", - "AGENCY_LOOKED_AT_JOB_FUNCTION_DROP_DOWN", - "AGENCY_SELECTED_ACCOUNT_MANAGER_AS_JOB_FUNCTION", - "AGENCY_SELECTED_ACCOUNT_PLANNER_AS_JOB_FUNCTION", - "AGENCY_SELECTED_ANALYTICS_AS_JOB_FUNCTION", - "AGENCY_SELECTED_CREATIVE_AS_JOB_FUNCTION", - "AGENCY_SELECTED_MEDIA_BUYER_AS_JOB_FUNCTION", - "AGENCY_SELECTED_MEDIA_PLANNER_AS_JOB_FUNCTION", - "AGENCY_SELECTED_OTHER_AS_JOB_FUNCTION", - "AGENCY_SELECTED_PRODUCTION_AS_JOB_FUNCTION", - "AGENCY_SELECTED_SEO_AS_JOB_FUNCTION", - "AGENCY_SELECTED_SALES_REP_AS_JOB_FUNCTION", - "AGENCY_SELECTED_SEARCH_SPECIALIST_AS_JOB_FUNCTION", - "AGENCY_ADDED_CHANNELS_IN_MY_PROFILE_PORTAL", - "AGENCY_LOOKED_AT_ADD_CHANNEL_DROP_DOWN", - "AGENCY_SELECTED_CROSS_CHANNEL_FROM_ADD_CHANNEL", - "AGENCY_SELECTED_DISPLAY_FROM_ADD_CHANNEL", - "AGENCY_SELECTED_MOBILE_FROM_ADD_CHANNEL", - "AGENCY_SELECTED_SEARCH_FROM_ADD_CHANNEL", - "AGENCY_SELECTED_SOCIAL_FROM_ADD_CHANNEL", - "AGENCY_SELECTED_TOOLS_FROM_ADD_CHANNEL", - "AGENCY_SELECTED_YOUTUBE_FROM_ADD_CHANNEL", - "AGENCY_ADDED_INDUSTRIES_IN_MY_PROFILE_PORTAL", - "AGENCY_CHANGED_ADD_INDUSTRIES_DROP_DOWN", - "AGENCY_ADDED_MARKETS_IN_MY_PROFILE_PORTAL", - "AGENCY_CHANGED_ADD_MARKETS_DROP_DOWN", - "AGENCY_CHECKED_RECIEVE_MAIL_PROMOTIONS_MYPROFILE", - "AGENCY_CHECKED_RECIEVE_MAIL_PROMOTIONS_SIGNUP", - "AGENCY_SELECTED_OPT_IN_BETA_TESTS_AND_MKT_RESEARCH", - "AGENCY_SELECTED_OPT_IN_BETA_TESTS_IN_MY_PROFILE_PORTAL", - "AGENCY_SELECTED_OPT_IN_NEWS_IN_MY_PROFILE_PORTAL", - "AGENCY_SELECTED_OPT_IN_NEWS_INVITATIONS_AND_PROMOS", - "AGENCY_SELECTED_OPT_IN_PERFORMANCE_SUG_IN_MY_PROFILE_PORTAL", - "AGENCY_SELECTED_OPT_IN_PERFORMANCE_SUGGESTIONS", - "AGENCY_SELECTED_OPT_IN_SELECT_ALL_EMAIL_NOTIFICATIONS", - "AGENCY_SELECTED_SELECT_ALL_OPT_INS_IN_MY_PROFILE_PORTAL", - "AGENCY_CLICKED_BACK_BUTTON_ON_CONNECT_WITH_COMPANY", - "AGENCY_CLICKED_CONTINUE_TO_OVERVIEW_ON_CONNECT_WITH_COMPANY", - "AGECNY_CLICKED_CREATE_MCC_CONNECT_WITH_COMPANY_NOT_FOUND", - "AGECNY_CLICKED_GIVE_EDIT_ACCESS_CONNECT_WITH_COMPANY_NOT_FOUND", - "AGECNY_CLICKED_LOG_OUT_CONNECT_WITH_COMPANY_NOT_FOUND", - "AGENCY_CLICKED_SKIP_FOR_NOW_ON_CONNECT_WITH_COMPANY_PAGE", - "AGENCY_CLOSED_CONNECTED_TO_COMPANY_X_BUTTON_WRONG_COMPANY", - "AGENCY_COMPLETED_FIELD_CONNECT_WITH_COMPANY", - "AGECNY_FOUND_COMPANY_TO_CONNECT_WITH", - "AGENCY_SUCCESSFULLY_CREATED_COMPANY", - "AGENCY_ADDED_NEW_COMPANY_LOCATION", - "AGENCY_CLICKED_COMMUNITY_JOIN_NOW_LINK_IN_PORTAL_NOTIFICATIONS", - "AGENCY_CLICKED_CONNECT_TO_COMPANY_LINK_IN_PORTAL_NOTIFICATIONS", - "AGENCY_CLICKED_GET_CERTIFIED_LINK_IN_PORTAL_NOTIFICATIONS", - "AGENCY_CLICKED_GET_VIDEO_ADS_CERTIFIED_LINK_IN_PORTAL_NOTIFICATIONS", - "AGENCY_CLICKED_LINK_TO_MCC_LINK_IN_PORTAL_NOTIFICATIONS", - "AGENCY_CLICKED_INSIGHT_CONTENT_IN_PORTAL", - "AGENCY_CLICKED_INSIGHTS_VIEW_NOW_PITCH_DECKS_IN_PORTAL", - "AGENCY_CLICKED_INSIGHTS_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_INSIGHTS_UPLOAD_CONTENT", - "AGENCY_CLICKED_INSIGHTS_VIEWED_DEPRECATED", - "AGENCY_CLICKED_COMMUNITY_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_JOIN_COMMUNITY_BUTTON_COMMUNITY_PORTAL", - "AGENCY_CLICKED_CERTIFICATIONS_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_CERTIFICATIONS_PRODUCT_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_PARTNER_STATUS_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_PARTNER_STATUS_PRODUCT_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_OFFERS_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_SEND_BUTTON_ON_OFFERS_PAGE", - "AGENCY_CLICKED_EXAM_DETAILS_ON_CERT_ADWORDS_PAGE", - "AGENCY_CLICKED_SEE_EXAMS_CERTIFICATION_MAIN_PAGE", - "AGENCY_CLICKED_TAKE_EXAM_ON_CERT_EXAM_PAGE", - "AGENCY_OPENED_LAST_ADMIN_DIALOG", - "AGENCY_OPENED_DIALOG_WITH_NO_USERS", - "AGENCY_PROMOTED_USER_TO_ADMIN", - "AGENCY_UNAFFILIATED", - "AGENCY_CHANGED_ROLES", - "SMB_CLICKED_COMPANY_NAME_LINK_TO_PROFILE", - "SMB_VIEWED_ADWORDS_CERTIFICATE", - "SMB_VIEWED_ADWORDS_SEARCH_CERTIFICATE", - "SMB_VIEWED_ADWORDS_DISPLAY_CERTIFICATE", - "SMB_CLICKED_ADWORDS_CERTIFICATE_HELP_ICON", - "SMB_VIEWED_ANALYTICS_CERTIFICATE", - "SMB_VIEWED_DOUBLECLICK_CERTIFICATE", - "SMB_VIEWED_MOBILE_SITES_CERTIFICATE", - "SMB_VIEWED_VIDEO_ADS_CERTIFICATE", - "SMB_VIEWED_SHOPPING_CERTIFICATE", - "SMB_CLICKED_VIDEO_ADS_CERTIFICATE_HELP_ICON", - "SMB_VIEWED_DIGITAL_SALES_CERTIFICATE", - "CLICKED_HELP_AT_BOTTOM", - "CLICKED_HELP_AT_TOP", - "CLIENT_ERROR", - "AGENCY_CLICKED_LEFT_NAV_STORIES", - "CLICKED", - "SMB_VIEWED_MOBILE_CERTIFICATE", - "AGENCY_FAILED_COMPANY_VERIFICATION", - "VISITED_LANDING", - "VISITED_GPS", - "VISITED_AGENCY_PORTAL", - "CANCELLED_INDIVIDUAL_SIGN_UP", - "CANCELLED_COMPANY_SIGN_UP", - "AGENCY_CLICKED_SIGN_IN_BUTTON_TOP", - "AGENCY_CLICKED_SAVE_AND_CONTINUE_AT_BOT_OF_INCOMPLETE_PROFILE", - "AGENCY_UNSELECTED_OPT_IN_NEWS_INVITATIONS_AND_PROMOS", - "AGENCY_UNSELECTED_OPT_IN_BETA_TESTS_AND_MKT_RESEARCH", - "AGENCY_UNSELECTED_OPT_IN_PERFORMANCE_SUGGESTIONS", - "AGENCY_SELECTED_OPT_OUT_UNSELECT_ALL_EMAIL_NOTIFICATIONS", - "AGENCY_LINKED_INDIVIDUAL_MCC", - "AGENCY_SUGGESTED_TO_USER", - "AGENCY_IGNORED_SUGGESTED_AGENCIES_AND_SEARCHED", - "AGENCY_PICKED_SUGGESTED_AGENCY", - "AGENCY_SEARCHED_FOR_AGENCIES", - "AGENCY_PICKED_SEARCHED_AGENCY", - "AGENCY_DISMISSED_AFFILIATION_WIDGET", - "AGENCY_CLICKED_INSIGHTS_DOWNLOAD_CONTENT", - "AGENCY_PROGRESS_INSIGHTS_VIEW_CONTENT", - "AGENCY_CLICKED_CANCEL_ACCEPT_TOS_BUTTON", - "SMB_ENTERED_WEBSITE_IN_CONTACT_PARTNER_FORM" ] }, - "requestMetadata": { - "description": "Current request metadata.", - "$ref": "RequestMetadata" - }, "url": { "description": "The URL where the event occurred.", "type": "string" }, + "requestMetadata": { + "$ref": "RequestMetadata", + "description": "Current request metadata." + }, "eventDatas": { "description": "List of event data for the event.", "items": { @@ -1983,27 +2416,27 @@ "type": "array" }, "eventScope": { - "enum": [ - "EVENT_SCOPE_UNSPECIFIED", - "VISITOR", - "SESSION", - "PAGE" - ], - "description": "The scope of the event.", "type": "string", "enumDescriptions": [ "Unchosen.", "Based on visitor.", "Based on session.", "Based on page visit." - ] + ], + "enum": [ + "EVENT_SCOPE_UNSPECIFIED", + "VISITOR", + "SESSION", + "PAGE" + ], + "description": "The scope of the event." } }, - "id": "LogUserEventRequest" + "id": "LogUserEventRequest", + "description": "Request message for\nLogUserEvent.", + "type": "object" }, "UserOverrides": { - "description": "Values to use instead of the user's respective defaults. These are only\nhonored by whitelisted products.", - "type": "object", "properties": { "userId": { "description": "Logged-in user ID to impersonate instead of the user's ID.", @@ -2014,123 +2447,164 @@ "type": "string" } }, - "id": "UserOverrides" + "id": "UserOverrides", + "description": "Values to use instead of the user's respective defaults. These are only\nhonored by whitelisted products.", + "type": "object" }, "AnalyticsDataPoint": { - "id": "AnalyticsDataPoint", "description": "Details of the analytics events for a `Company` within a single day.", "type": "object", "properties": { + "eventCount": { + "type": "integer", + "format": "int32", + "description": "Number of times the type of event occurred.\nMeaning depends on context (e.g. profile views, contacts, etc.)." + }, "eventLocations": { + "description": "Location information of where these events occurred.", "items": { "$ref": "LatLng" }, - "type": "array", - "description": "Location information of where these events occurred." - }, - "eventCount": { - "format": "int32", - "description": "Number of times the type of event occurred.\nMeaning depends on context (e.g. profile views, contacts, etc.).", - "type": "integer" + "type": "array" } - } + }, + "id": "AnalyticsDataPoint" }, "Analytics": { + "id": "Analytics", "description": "Analytics data for a `Company` within a single day.", "type": "object", "properties": { - "contacts": { - "description": "Instances of users contacting the `Company`\non the specified date.", - "$ref": "AnalyticsDataPoint" - }, "searchViews": { "description": "Instances of users seeing the `Company` in Google Partners Search results\non the specified date.", "$ref": "AnalyticsDataPoint" }, "profileViews": { - "description": "Instances of users viewing the `Company` profile\non the specified date.", - "$ref": "AnalyticsDataPoint" + "$ref": "AnalyticsDataPoint", + "description": "Instances of users viewing the `Company` profile\non the specified date." }, "eventDate": { "$ref": "Date", "description": "Date on which these events occurred." - } - }, - "id": "Analytics" - }, - "AdWordsManagerAccountInfo": { - "description": "Information about a particular AdWords Manager Account.\nRead more at https://support.google.com/adwords/answer/6139186", - "type": "object", - "properties": { - "id": { - "format": "int64", - "description": "The AdWords Manager Account id.", - "type": "string" }, - "customerName": { - "description": "Name of the customer this account represents.", - "type": "string" + "contacts": { + "description": "Instances of users contacting the `Company`\non the specified date.", + "$ref": "AnalyticsDataPoint" } - }, - "id": "AdWordsManagerAccountInfo" + } }, "PublicProfile": { + "type": "object", "properties": { - "profileImage": { - "description": "The URL to the main profile image of the public profile.", - "type": "string" - }, - "displayImageUrl": { - "type": "string", - "description": "The URL to the main display image of the public profile. Being deprecated." - }, - "displayName": { - "description": "The display name of the public profile.", - "type": "string" - }, "url": { - "description": "The URL of the public profile.", - "type": "string" + "type": "string", + "description": "The URL of the public profile." }, "id": { "description": "The ID which can be used to retrieve more details about the public profile.", "type": "string" + }, + "profileImage": { + "type": "string", + "description": "The URL to the main profile image of the public profile." + }, + "displayImageUrl": { + "description": "The URL to the main display image of the public profile. Being deprecated.", + "type": "string" + }, + "displayName": { + "description": "The display name of the public profile.", + "type": "string" } }, "id": "PublicProfile", - "description": "Basic information from a public profile.", - "type": "object" + "description": "Basic information from a public profile." }, - "ResponseMetadata": { + "AdWordsManagerAccountInfo": { + "type": "object", "properties": { - "debugInfo": { - "description": "Debug information about this request.", - "$ref": "DebugInfo" + "customerName": { + "description": "Name of the customer this account represents.", + "type": "string" + }, + "id": { + "format": "int64", + "description": "The AdWords Manager Account id.", + "type": "string" } }, - "id": "ResponseMetadata", + "id": "AdWordsManagerAccountInfo", + "description": "Information about a particular AdWords Manager Account.\nRead more at https://support.google.com/adwords/answer/6139186" + }, + "ResponseMetadata": { "description": "Common data that is in each API response.", - "type": "object" + "type": "object", + "properties": { + "debugInfo": { + "$ref": "DebugInfo", + "description": "Debug information about this request." + } + }, + "id": "ResponseMetadata" }, "RecaptchaChallenge": { - "id": "RecaptchaChallenge", "description": "\u003ca href=\"https://www.google.com/recaptcha/\"\u003ereCaptcha\u003c/a\u003e challenge info.", "type": "object", "properties": { "id": { - "type": "string", - "description": "The ID of the reCaptcha challenge." + "description": "The ID of the reCaptcha challenge.", + "type": "string" }, "response": { - "type": "string", - "description": "The response to the reCaptcha challenge." + "description": "The response to the reCaptcha challenge.", + "type": "string" } - } + }, + "id": "RecaptchaChallenge" }, "AvailableOffer": { - "description": "Available Offers to be distributed.", - "type": "object", "properties": { + "offerType": { + "enumDescriptions": [ + "Unset.", + "AdWords spend X get Y.", + "Youtube video.", + "Spend Match up to Y." + ], + "enum": [ + "OFFER_TYPE_UNSPECIFIED", + "OFFER_TYPE_SPEND_X_GET_Y", + "OFFER_TYPE_VIDEO", + "OFFER_TYPE_SPEND_MATCH" + ], + "description": "Type of offer.", + "type": "string" + }, + "maxAccountAge": { + "format": "int32", + "description": "The maximum age of an account [in days] to be eligible.", + "type": "integer" + }, + "qualifiedCustomer": { + "description": "Customers who qualify for this offer.", + "items": { + "$ref": "OfferCustomer" + }, + "type": "array" + }, + "terms": { + "description": "Terms of the offer.", + "type": "string" + }, + "showSpecialOfferCopy": { + "type": "boolean", + "description": "Should special text be shown on the offers page." + }, + "available": { + "format": "int32", + "description": "The number of codes for this offer that are available for distribution.", + "type": "integer" + }, "description": { "description": "Description of the offer.", "type": "string" @@ -2160,8 +2634,8 @@ ] }, "name": { - "type": "string", - "description": "Name of the offer." + "description": "Name of the offer.", + "type": "string" }, "qualifiedCustomersComplete": { "description": "Whether or not the list of qualified customers is definitely complete.", @@ -2178,76 +2652,33 @@ "$ref": "CountryOfferInfo" }, "type": "array" - }, - "offerType": { - "description": "Type of offer.", - "type": "string", - "enumDescriptions": [ - "Unset.", - "AdWords spend X get Y.", - "Youtube video.", - "Spend Match up to Y." - ], - "enum": [ - "OFFER_TYPE_UNSPECIFIED", - "OFFER_TYPE_SPEND_X_GET_Y", - "OFFER_TYPE_VIDEO", - "OFFER_TYPE_SPEND_MATCH" - ] - }, - "maxAccountAge": { - "format": "int32", - "description": "The maximum age of an account [in days] to be eligible.", - "type": "integer" - }, - "qualifiedCustomer": { - "description": "Customers who qualify for this offer.", - "items": { - "$ref": "OfferCustomer" - }, - "type": "array" - }, - "terms": { - "type": "string", - "description": "Terms of the offer." - }, - "showSpecialOfferCopy": { - "description": "Should special text be shown on the offers page.", - "type": "boolean" - }, - "available": { - "format": "int32", - "description": "The number of codes for this offer that are available for distribution.", - "type": "integer" } }, - "id": "AvailableOffer" + "id": "AvailableOffer", + "description": "Available Offers to be distributed.", + "type": "object" }, "LatLng": { - "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", - "type": "object", "properties": { - "latitude": { - "format": "double", - "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", - "type": "number" - }, "longitude": { "format": "double", "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", "type": "number" + }, + "latitude": { + "type": "number", + "format": "double", + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0]." } }, - "id": "LatLng" + "id": "LatLng", + "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", + "type": "object" }, "Money": { + "description": "Represents an amount of money with its currency type.", "type": "object", "properties": { - "nanos": { - "format": "int32", - "description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", - "type": "integer" - }, "units": { "format": "int64", "description": "The whole units of the amount.\nFor example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", @@ -2256,10 +2687,14 @@ "currencyCode": { "description": "The 3-letter currency code defined in ISO 4217.", "type": "string" + }, + "nanos": { + "format": "int32", + "description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", + "type": "integer" } }, - "id": "Money", - "description": "Represents an amount of money with its currency type." + "id": "Money" }, "AnalyticsSummary": { "description": "Analytics aggregated data for a `Company` for a given date range.", @@ -2271,9 +2706,9 @@ "type": "integer" }, "contactsCount": { + "type": "integer", "format": "int32", - "description": "Aggregated number of times users contacted the `Company`\nfor given date range.", - "type": "integer" + "description": "Aggregated number of times users contacted the `Company`\nfor given date range." }, "profileViewsCount": { "format": "int32", @@ -2287,6 +2722,28 @@ "description": "Request message for\nLogClientMessage.", "type": "object", "properties": { + "requestMetadata": { + "$ref": "RequestMetadata", + "description": "Current request metadata." + }, + "level": { + "description": "Message level of client message.", + "type": "string", + "enumDescriptions": [ + "Unchosen.", + "Message level for tracing information.", + "Message level for informational messages.", + "Message level for potential problems.", + "Message level for serious failures." + ], + "enum": [ + "MESSAGE_LEVEL_UNSPECIFIED", + "ML_FINE", + "ML_INFO", + "ML_WARNING", + "ML_SEVERE" + ] + }, "details": { "description": "Details about the client message.", "type": "string" @@ -2297,28 +2754,6 @@ "type": "string" }, "description": "Map of client info, such as URL, browser navigator, browser platform, etc." - }, - "requestMetadata": { - "$ref": "RequestMetadata", - "description": "Current request metadata." - }, - "level": { - "enum": [ - "MESSAGE_LEVEL_UNSPECIFIED", - "ML_FINE", - "ML_INFO", - "ML_WARNING", - "ML_SEVERE" - ], - "description": "Message level of client message.", - "type": "string", - "enumDescriptions": [ - "Unchosen.", - "Message level for tracing information.", - "Message level for informational messages.", - "Message level for potential problems.", - "Message level for serious failures." - ] } }, "id": "LogMessageRequest" @@ -2327,15 +2762,6 @@ "description": "A lead resource that represents an advertiser contact for a `Company`. These\nare usually generated via Google Partner Search (the advertiser portal).", "type": "object", "properties": { - "adwordsCustomerId": { - "format": "int64", - "description": "The AdWords Customer ID of the lead.", - "type": "string" - }, - "phoneNumber": { - "type": "string", - "description": "Phone number of lead source." - }, "createTime": { "format": "google-datetime", "description": "Timestamp of when this lead was created.", @@ -2346,51 +2772,32 @@ "type": "boolean" }, "type": { + "enumDescriptions": [ + "Unchosen.", + "Google Partner Search." + ], "enum": [ "LEAD_TYPE_UNSPECIFIED", "LT_GPS" ], "description": "Type of lead.", - "type": "string", - "enumDescriptions": [ - "Unchosen.", - "Google Partner Search." - ] - }, - "minMonthlyBudget": { - "$ref": "Money", - "description": "The minimum monthly budget lead source is willing to spend." + "type": "string" }, "givenName": { "description": "First name of lead source.", "type": "string" }, - "languageCode": { - "description": "Language code of the lead's language preference, as defined by\n\u003ca href=\"https://tools.ietf.org/html/bcp47\"\u003eBCP 47\u003c/a\u003e\n(IETF BCP 47, \"Tags for Identifying Languages\").", - "type": "string" + "minMonthlyBudget": { + "description": "The minimum monthly budget lead source is willing to spend.", + "$ref": "Money" }, "websiteUrl": { "description": "Website URL of lead source.", "type": "string" }, - "gpsMotivations": { - "enumDescriptions": [ - "Unchosen.", - "Advertiser needs help with their advertising.", - "Advertiser needs help with their website.", - "Advertiser does not have a website." - ], - "description": "List of reasons for using Google Partner Search and creating a lead.", - "items": { - "enum": [ - "GPS_MOTIVATION_UNSPECIFIED", - "GPSM_HELP_WITH_ADVERTISING", - "GPSM_HELP_WITH_WEBSITE", - "GPSM_NO_WEBSITE" - ], - "type": "string" - }, - "type": "array" + "languageCode": { + "description": "Language code of the lead's language preference, as defined by\n\u003ca href=\"https://tools.ietf.org/html/bcp47\"\u003eBCP 47\u003c/a\u003e\n(IETF BCP 47, \"Tags for Identifying Languages\").", + "type": "string" }, "state": { "enumDescriptions": [ @@ -2410,6 +2817,25 @@ "description": "The lead's state in relation to the company.", "type": "string" }, + "gpsMotivations": { + "description": "List of reasons for using Google Partner Search and creating a lead.", + "items": { + "enum": [ + "GPS_MOTIVATION_UNSPECIFIED", + "GPSM_HELP_WITH_ADVERTISING", + "GPSM_HELP_WITH_WEBSITE", + "GPSM_NO_WEBSITE" + ], + "type": "string" + }, + "type": "array", + "enumDescriptions": [ + "Unchosen.", + "Advertiser needs help with their advertising.", + "Advertiser needs help with their website.", + "Advertiser does not have a website." + ] + }, "email": { "description": "Email address of lead source.", "type": "string" @@ -2418,25 +2844,29 @@ "description": "Last name of lead source.", "type": "string" }, + "id": { + "description": "ID of the lead.", + "type": "string" + }, "comments": { "description": "Comments lead source gave.", "type": "string" }, - "id": { - "description": "ID of the lead.", + "adwordsCustomerId": { + "format": "int64", + "description": "The AdWords Customer ID of the lead.", + "type": "string" + }, + "phoneNumber": { + "description": "Phone number of lead source.", "type": "string" } }, "id": "Lead" }, "DebugInfo": { - "description": "Debug information about this request.", "type": "object", "properties": { - "serviceUrl": { - "description": "URL of the service that handled this request.", - "type": "string" - }, "serverTraceInfo": { "description": "Server-side debug stack trace.", "type": "string" @@ -2444,18 +2874,24 @@ "serverInfo": { "description": "Info about the server that serviced this request.", "type": "string" + }, + "serviceUrl": { + "description": "URL of the service that handled this request.", + "type": "string" } }, - "id": "DebugInfo" + "id": "DebugInfo", + "description": "Debug information about this request." }, "ListUserStatesResponse": { + "description": "Response message for\nListUserStates.", "type": "object", "properties": { + "responseMetadata": { + "$ref": "ResponseMetadata", + "description": "Current response metadata." + }, "userStates": { - "enumDescriptions": [ - "Unchosen.", - "User must pass \u003ca href=\"https://www.google.com/recaptcha/\"\u003ereCaptcha\u003c/a\u003e to\ncontact a Partner via Google Partner Search." - ], "description": "User's states.", "items": { "type": "string", @@ -2464,63 +2900,19 @@ "US_REQUIRES_RECAPTCHA_FOR_GPS_CONTACT" ] }, - "type": "array" - }, - "responseMetadata": { - "$ref": "ResponseMetadata", - "description": "Current response metadata." + "type": "array", + "enumDescriptions": [ + "Unchosen.", + "User must pass \u003ca href=\"https://www.google.com/recaptcha/\"\u003ereCaptcha\u003c/a\u003e to\ncontact a Partner via Google Partner Search." + ] } }, - "id": "ListUserStatesResponse", - "description": "Response message for\nListUserStates." + "id": "ListUserStatesResponse" }, "CompanyRelation": { + "description": "A CompanyRelation resource representing information about a user's\naffiliation and standing with a company in Partners.", + "type": "object", "properties": { - "specializationStatus": { - "description": "The list of Google Partners specialization statuses for the company.", - "items": { - "$ref": "SpecializationStatus" - }, - "type": "array" - }, - "badgeTier": { - "enum": [ - "BADGE_TIER_NONE", - "BADGE_TIER_REGULAR", - "BADGE_TIER_PREMIER" - ], - "description": "Whether the company is a Partner.", - "type": "string", - "enumDescriptions": [ - "Tier badge is not set.", - "Agency has regular partner badge.", - "Agency has premier badge." - ] - }, - "website": { - "description": "The website URL for this company.", - "type": "string" - }, - "phoneNumber": { - "type": "string", - "description": "The phone number for the company's primary address." - }, - "primaryCountryCode": { - "description": "The primary country code of the company.", - "type": "string" - }, - "companyId": { - "description": "The ID of the company. There may be no id if this is a\npending company.5", - "type": "string" - }, - "primaryLanguageCode": { - "description": "The primary language code of the company.", - "type": "string" - }, - "logoUrl": { - "description": "A URL to a profile photo, e.g. a G+ profile photo.", - "type": "string" - }, "resolvedTimestamp": { "format": "google-datetime", "description": "The timestamp when the user was approved.\n@OutputOnly", @@ -2548,12 +2940,6 @@ "$ref": "Location" }, "state": { - "enumDescriptions": [ - "Default unspecified value.", - "User has filled in a request to be associated with an company.\nNow waiting email confirmation.", - "Pending approval from company.\nEmail confirmation will not approve this one.", - "Approved by company." - ], "enum": [ "USER_COMPANY_REATION_STATE_NONE_SPECIFIED", "USER_COMPANY_RELATION_STATE_AWAIT_EMAIL", @@ -2561,27 +2947,32 @@ "USER_COMPANY_RELATION_STATE_APPROVED" ], "description": "The state of relationship, in terms of approvals.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Default unspecified value.", + "User has filled in a request to be associated with an company.\nNow waiting email confirmation.", + "Pending approval from company.\nEmail confirmation will not approve this one.", + "Approved by company." + ] }, "name": { "description": "The name (in the company's primary language) for the company.", "type": "string" }, "managerAccount": { + "type": "string", "format": "int64", - "description": "The AdWords manager account # associated this company.", - "type": "string" + "description": "The AdWords manager account # associated this company." }, "segment": { - "description": "The segment the company is classified as.", "items": { - "type": "string", "enum": [ "COMPANY_SEGMENT_UNKNOWN", "COMPANY_SEGMENT_NAL", "COMPANY_SEGMENT_PSP", "COMPANY_SEGMENT_PPSP" - ] + ], + "type": "string" }, "type": "array", "enumDescriptions": [ @@ -2589,19 +2980,62 @@ "Segment representing a selected group of Partners", "Segment representing Premier SMB Partners, an AdWords partnership program.", "A segment of Premier SMB Partners that have relationship with Google." - ] + ], + "description": "The segment the company is classified as." }, "internalCompanyId": { "description": "The internal company ID.\nOnly available for a whitelisted set of api clients.", "type": "string" + }, + "specializationStatus": { + "description": "The list of Google Partners specialization statuses for the company.", + "items": { + "$ref": "SpecializationStatus" + }, + "type": "array" + }, + "badgeTier": { + "enumDescriptions": [ + "Tier badge is not set.", + "Agency has regular partner badge.", + "Agency has premier badge." + ], + "enum": [ + "BADGE_TIER_NONE", + "BADGE_TIER_REGULAR", + "BADGE_TIER_PREMIER" + ], + "description": "Whether the company is a Partner.", + "type": "string" + }, + "website": { + "type": "string", + "description": "The website URL for this company." + }, + "phoneNumber": { + "description": "The phone number for the company's primary address.", + "type": "string" + }, + "primaryCountryCode": { + "description": "The primary country code of the company.", + "type": "string" + }, + "companyId": { + "description": "The ID of the company. There may be no id if this is a\npending company.5", + "type": "string" + }, + "primaryLanguageCode": { + "description": "The primary language code of the company.", + "type": "string" + }, + "logoUrl": { + "description": "A URL to a profile photo, e.g. a G+ profile photo.", + "type": "string" } }, - "id": "CompanyRelation", - "description": "A CompanyRelation resource representing information about a user's\naffiliation and standing with a company in Partners.", - "type": "object" + "id": "CompanyRelation" }, "Date": { - "id": "Date", "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", "type": "object", "properties": { @@ -2611,16 +3045,17 @@ "type": "integer" }, "year": { + "type": "integer", "format": "int32", - "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", - "type": "integer" + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year." }, "month": { "format": "int32", "description": "Month of year. Must be from 1 to 12.", "type": "integer" } - } + }, + "id": "Date" }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", @@ -2629,21 +3064,22 @@ "id": "Empty" }, "TrafficSource": { - "description": "Source of traffic for the current request.", - "type": "object", "properties": { - "trafficSourceId": { - "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", - "type": "string" - }, "trafficSubId": { "type": "string", "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us." + }, + "trafficSourceId": { + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" } }, - "id": "TrafficSource" + "id": "TrafficSource", + "description": "Source of traffic for the current request.", + "type": "object" }, "CreateLeadRequest": { + "description": "Request message for CreateLead.", "type": "object", "properties": { "requestMetadata": { @@ -2659,8 +3095,7 @@ "description": "The lead resource. The `LeadType` must not be `LEAD_TYPE_UNSPECIFIED`\nand either `email` or `phone_number` must be provided." } }, - "id": "CreateLeadRequest", - "description": "Request message for CreateLead." + "id": "CreateLeadRequest" }, "RequestMetadata": { "description": "Common data that is in each API request.", @@ -2671,23 +3106,23 @@ "type": "string" }, "partnersSessionId": { - "description": "Google Partners session ID.", - "type": "string" + "type": "string", + "description": "Google Partners session ID." }, "userOverrides": { "$ref": "UserOverrides", "description": "Values to use instead of the user's respective defaults for the current\nrequest. These are only honored by whitelisted products." }, "trafficSource": { - "$ref": "TrafficSource", - "description": "Source of traffic for the current request." + "description": "Source of traffic for the current request.", + "$ref": "TrafficSource" }, "experimentIds": { - "description": "Experiment IDs the current request belongs to.", "items": { "type": "string" }, - "type": "array" + "type": "array", + "description": "Experiment IDs the current request belongs to." } }, "id": "RequestMetadata" @@ -2696,7 +3131,16 @@ "description": "Key value data pair for an event.", "type": "object", "properties": { + "values": { + "description": "Data values.", + "items": { + "type": "string" + }, + "type": "array" + }, "key": { + "description": "Data type.", + "type": "string", "enumDescriptions": [ "Unchosen.", "Action data.", @@ -2776,16 +3220,7 @@ "URL", "ELEMENT_FOCUS", "PROGRESS" - ], - "description": "Data type.", - "type": "string" - }, - "values": { - "description": "Data values.", - "items": { - "type": "string" - }, - "type": "array" + ] } }, "id": "EventData" @@ -2795,8 +3230,6 @@ "type": "object", "properties": { "examType": { - "description": "The type of the exam.", - "type": "string", "enumDescriptions": [ "Unchosen.", "Adwords Fundamentals exam.", @@ -2822,17 +3255,19 @@ "CET_MOBILE", "CET_DIGITAL_SALES", "CET_MOBILE_SITES" - ] + ], + "description": "The type of the exam.", + "type": "string" + }, + "taken": { + "format": "google-datetime", + "description": "The date the user last taken this exam.", + "type": "string" }, "passed": { "description": "Whether this exam has been passed and not expired.", "type": "boolean" }, - "taken": { - "type": "string", - "format": "google-datetime", - "description": "The date the user last taken this exam." - }, "warning": { "description": "Whether this exam is in the state of warning.", "type": "boolean" @@ -2843,17 +3278,22 @@ "type": "string" }, "lastPassed": { + "type": "string", "format": "google-datetime", - "description": "The date the user last passed this exam.", - "type": "string" + "description": "The date the user last passed this exam." } }, "id": "ExamStatus" }, "ListOffersResponse": { + "id": "ListOffersResponse", "description": "Response for ListOffer.", "type": "object", "properties": { + "responseMetadata": { + "$ref": "ResponseMetadata", + "description": "Current response metadata." + }, "noOfferReason": { "description": "Reason why no Offers are available.", "type": "string", @@ -2876,21 +3316,15 @@ "$ref": "AvailableOffer" }, "type": "array" - }, - "responseMetadata": { - "description": "Current response metadata.", - "$ref": "ResponseMetadata" } - }, - "id": "ListOffersResponse" + } }, "CountryOfferInfo": { - "description": "Offer info by country.", "type": "object", "properties": { "spendXAmount": { - "description": "(localized) Spend X amount for that country's offer.", - "type": "string" + "type": "string", + "description": "(localized) Spend X amount for that country's offer." }, "offerCountryCode": { "description": "Country code for which offer codes may be requested.", @@ -2913,13 +3347,16 @@ "type": "string" }, "getYAmount": { - "type": "string", - "description": "(localized) Get Y amount for that country's offer." + "description": "(localized) Get Y amount for that country's offer.", + "type": "string" } }, - "id": "CountryOfferInfo" + "id": "CountryOfferInfo", + "description": "Offer info by country." }, "ListCompaniesResponse": { + "description": "Response message for\nListCompanies.", + "type": "object", "properties": { "nextPageToken": { "description": "A token to retrieve next page of results.\nPass this value in the `ListCompaniesRequest.page_token` field in the\nsubsequent call to\nListCompanies to retrieve the\nnext page of results.", @@ -2937,40 +3374,23 @@ "type": "array" } }, - "id": "ListCompaniesResponse", - "description": "Response message for\nListCompanies.", - "type": "object" + "id": "ListCompaniesResponse" }, "OfferCustomer": { "description": "Customers qualified for an offer.", "type": "object", "properties": { - "adwordsUrl": { - "description": "URL to the customer's AdWords page.", - "type": "string" - }, - "countryCode": { - "type": "string", - "description": "Country code of the customer." - }, - "externalCid": { - "format": "int64", - "description": "External CID for the customer.", - "type": "string" - }, - "eligibilityDaysLeft": { - "format": "int32", - "description": "Days the customer is still eligible.", - "type": "integer" - }, "creationTime": { "format": "google-datetime", "description": "Time the customer was created.", "type": "string" }, + "eligibilityDaysLeft": { + "type": "integer", + "format": "int32", + "description": "Days the customer is still eligible." + }, "offerType": { - "description": "Type of the offer", - "type": "string", "enumDescriptions": [ "Unset.", "AdWords spend X get Y.", @@ -2982,7 +3402,18 @@ "OFFER_TYPE_SPEND_X_GET_Y", "OFFER_TYPE_VIDEO", "OFFER_TYPE_SPEND_MATCH" - ] + ], + "description": "Type of the offer", + "type": "string" + }, + "externalCid": { + "format": "int64", + "description": "External CID for the customer.", + "type": "string" + }, + "countryCode": { + "type": "string", + "description": "Country code of the customer." }, "getYAmount": { "description": "Formatted Get Y amount with currency code.", @@ -2995,6 +3426,10 @@ "spendXAmount": { "description": "Formatted Spend X amount with currency code.", "type": "string" + }, + "adwordsUrl": { + "description": "URL to the customer's AdWords page.", + "type": "string" } }, "id": "OfferCustomer" @@ -3004,15 +3439,13 @@ "type": "object", "properties": { "examStatuses": { - "description": "List of certification exam statuses.", "items": { "$ref": "CertificationExamStatus" }, - "type": "array" + "type": "array", + "description": "List of certification exam statuses." }, "type": { - "description": "The type of the certification.", - "type": "string", "enumDescriptions": [ "Unchosen.", "AdWords certified.", @@ -3040,7 +3473,9 @@ "CT_ADWORDS_SEARCH", "CT_ADWORDS_DISPLAY", "CT_MOBILE_SITES" - ] + ], + "description": "The type of the certification.", + "type": "string" }, "userCount": { "format": "int32", @@ -3048,22 +3483,24 @@ "type": "integer" }, "isCertified": { - "description": "Whether certification is passing.", - "type": "boolean" + "type": "boolean", + "description": "Whether certification is passing." } }, "id": "CertificationStatus" }, "LocalizedCompanyInfo": { - "description": "The localized company information.", - "type": "object", "properties": { + "languageCode": { + "description": "Language code of the localized company info, as defined by\n\u003ca href=\"https://tools.ietf.org/html/bcp47\"\u003eBCP 47\u003c/a\u003e\n(IETF BCP 47, \"Tags for Identifying Languages\").", + "type": "string" + }, "countryCodes": { + "description": "List of country codes for the localized company info.", "items": { "type": "string" }, - "type": "array", - "description": "List of country codes for the localized company info." + "type": "array" }, "overview": { "description": "Localized brief description that the company uses to advertise themselves.", @@ -3072,13 +3509,11 @@ "displayName": { "description": "Localized display name.", "type": "string" - }, - "languageCode": { - "description": "Language code of the localized company info, as defined by\n\u003ca href=\"https://tools.ietf.org/html/bcp47\"\u003eBCP 47\u003c/a\u003e\n(IETF BCP 47, \"Tags for Identifying Languages\").", - "type": "string" } }, - "id": "LocalizedCompanyInfo" + "id": "LocalizedCompanyInfo", + "description": "The localized company information.", + "type": "object" }, "LogUserEventResponse": { "description": "Response message for\nLogUserEvent.", @@ -3095,17 +3530,9 @@ "description": "Response for ListOfferHistory.", "type": "object", "properties": { - "nextPageToken": { - "description": "Supply this token in a ListOffersHistoryRequest to retrieve the next page.", - "type": "string" - }, - "responseMetadata": { - "$ref": "ResponseMetadata", - "description": "Current response metadata." - }, "canShowEntireCompany": { - "description": "True if the user has the option to show entire company history.", - "type": "boolean" + "type": "boolean", + "description": "True if the user has the option to show entire company history." }, "totalResults": { "format": "int32", @@ -3122,6 +3549,14 @@ "$ref": "HistoricalOffer" }, "type": "array" + }, + "nextPageToken": { + "type": "string", + "description": "Supply this token in a ListOffersHistoryRequest to retrieve the next page." + }, + "responseMetadata": { + "$ref": "ResponseMetadata", + "description": "Current response metadata." } }, "id": "ListOffersHistoryResponse" @@ -3141,23 +3576,15 @@ "description": "Agency specialization status", "type": "object", "properties": { - "badgeSpecializationState": { - "enum": [ - "BADGE_SPECIALIZATION_STATE_UNKNOWN", - "BADGE_SPECIALIZATION_STATE_PASSED", - "BADGE_SPECIALIZATION_STATE_NOT_PASSED", - "BADGE_SPECIALIZATION_STATE_IN_GRACE" - ], - "description": "State of agency specialization.", - "type": "string", - "enumDescriptions": [ - "Unknown state", - "Specialization passed", - "Specialization not passed", - "Specialization in grace" - ] - }, "badgeSpecialization": { + "enum": [ + "BADGE_SPECIALIZATION_UNKNOWN", + "BADGE_SPECIALIZATION_ADWORDS_SEARCH", + "BADGE_SPECIALIZATION_ADWORDS_DISPLAY", + "BADGE_SPECIALIZATION_ADWORDS_MOBILE", + "BADGE_SPECIALIZATION_ADWORDS_VIDEO", + "BADGE_SPECIALIZATION_ADWORDS_SHOPPING" + ], "description": "The specialization this status is for.", "type": "string", "enumDescriptions": [ @@ -3167,459 +3594,33 @@ "AdWords Mobile specialization", "AdWords Video specialization", "AdWords Shopping specialization" + ] + }, + "badgeSpecializationState": { + "enumDescriptions": [ + "Unknown state", + "Specialization passed", + "Specialization not passed", + "Specialization in grace" ], "enum": [ - "BADGE_SPECIALIZATION_UNKNOWN", - "BADGE_SPECIALIZATION_ADWORDS_SEARCH", - "BADGE_SPECIALIZATION_ADWORDS_DISPLAY", - "BADGE_SPECIALIZATION_ADWORDS_MOBILE", - "BADGE_SPECIALIZATION_ADWORDS_VIDEO", - "BADGE_SPECIALIZATION_ADWORDS_SHOPPING" - ] + "BADGE_SPECIALIZATION_STATE_UNKNOWN", + "BADGE_SPECIALIZATION_STATE_PASSED", + "BADGE_SPECIALIZATION_STATE_NOT_PASSED", + "BADGE_SPECIALIZATION_STATE_IN_GRACE" + ], + "description": "State of agency specialization.", + "type": "string" } }, "id": "SpecializationStatus" - }, - "Certification": { - "description": "A user's information on a specific certification.", - "type": "object", - "properties": { - "lastAchieved": { - "format": "google-datetime", - "description": "The date the user last achieved certification.", - "type": "string" - }, - "warning": { - "type": "boolean", - "description": "Whether this certification is in the state of warning." - }, - "expiration": { - "format": "google-datetime", - "description": "Date this certification is due to expire.", - "type": "string" - }, - "achieved": { - "description": "Whether this certification has been achieved.", - "type": "boolean" - }, - "certificationType": { - "enumDescriptions": [ - "Unchosen.", - "AdWords certified.", - "YouTube certified.", - "VideoAds certified.", - "Analytics certified.", - "DoubleClick certified.", - "Shopping certified.", - "Mobile certified.", - "Digital sales certified.", - "AdWords Search certified.", - "AdWords Display certified.", - "Mobile Sites certified." - ], - "enum": [ - "CERTIFICATION_TYPE_UNSPECIFIED", - "CT_ADWORDS", - "CT_YOUTUBE", - "CT_VIDEOADS", - "CT_ANALYTICS", - "CT_DOUBLECLICK", - "CT_SHOPPING", - "CT_MOBILE", - "CT_DIGITAL_SALES", - "CT_ADWORDS_SEARCH", - "CT_ADWORDS_DISPLAY", - "CT_MOBILE_SITES" - ], - "description": "The type of certification, the area of expertise.", - "type": "string" - } - }, - "id": "Certification" - }, - "User": { - "properties": { - "publicProfile": { - "description": "Information about a user's external public profile outside Google Partners.", - "$ref": "PublicProfile" - }, - "companyVerificationEmail": { - "description": "The email address used by the user used for company verification.\n@OutputOnly", - "type": "string" - }, - "certificationStatus": { - "description": "The list of achieved certifications. These are calculated based on exam\nresults and other requirements.\n@OutputOnly", - "items": { - "$ref": "Certification" - }, - "type": "array" - }, - "company": { - "$ref": "CompanyRelation", - "description": "The company that the user is associated with.\nIf not present, the user is not associated with any company." - }, - "profile": { - "$ref": "UserProfile", - "description": "The profile information of a Partners user, contains all the directly\neditable user information." - }, - "lastAccessTime": { - "type": "string", - "format": "google-datetime", - "description": "The most recent time the user interacted with the Partners site.\n@OutputOnly" - }, - "primaryEmails": { - "items": { - "type": "string" - }, - "type": "array", - "description": "The list of emails the user has access to/can select as primary.\n@OutputOnly" - }, - "availableAdwordsManagerAccounts": { - "description": "This is the list of AdWords Manager Accounts the user has edit access to.\nIf the user has edit access to multiple accounts, the user can choose the\npreferred account and we use this when a personal account is needed. Can\nbe empty meaning the user has access to no accounts.\n@OutputOnly", - "items": { - "$ref": "AdWordsManagerAccountInfo" - }, - "type": "array" - }, - "internalId": { - "description": "The internal user ID.\nOnly available for a whitelisted set of api clients.", - "type": "string" - }, - "examStatus": { - "description": "The list of exams the user ever taken. For each type of exam, only one\nentry is listed.", - "items": { - "$ref": "ExamStatus" - }, - "type": "array" - }, - "id": { - "description": "The ID of the user.", - "type": "string" - } - }, - "id": "User", - "description": "A resource representing a user of the Partners platform.", - "type": "object" - }, - "ListAnalyticsResponse": { - "description": "Response message for\nListAnalytics.", - "type": "object", - "properties": { - "analytics": { - "items": { - "$ref": "Analytics" - }, - "type": "array", - "description": "The list of analytics.\nSorted in ascending order of\nAnalytics.event_date." - }, - "nextPageToken": { - "description": "A token to retrieve next page of results.\nPass this value in the `ListAnalyticsRequest.page_token` field in the\nsubsequent call to\nListAnalytics to retrieve the\nnext page of results.", - "type": "string" - }, - "analyticsSummary": { - "$ref": "AnalyticsSummary", - "description": "Aggregated information across the response's\nanalytics." - }, - "responseMetadata": { - "description": "Current response metadata.", - "$ref": "ResponseMetadata" - } - }, - "id": "ListAnalyticsResponse" - }, - "Company": { - "description": "A company resource in the Google Partners API. Once certified, it qualifies\nfor being searched by advertisers.", - "type": "object", - "properties": { - "websiteUrl": { - "description": "URL of the company's website.", - "type": "string" - }, - "additionalWebsites": { - "description": "URL of the company's additional websites used to verify the dynamic badges.\nThese are stored as full URLs as entered by the user, but only the TLD will\nbe used for the actual verification.", - "items": { - "type": "string" - }, - "type": "array" - }, - "primaryAdwordsManagerAccountId": { - "format": "int64", - "description": "The Primary AdWords Manager Account id.", - "type": "string" - }, - "name": { - "type": "string", - "description": "The name of the company." - }, - "localizedInfos": { - "description": "The list of localized info for the company.", - "items": { - "$ref": "LocalizedCompanyInfo" - }, - "type": "array" - }, - "certificationStatuses": { - "description": "The list of Google Partners certification statuses for the company.", - "items": { - "$ref": "CertificationStatus" - }, - "type": "array" - }, - "id": { - "description": "The ID of the company.", - "type": "string" - }, - "primaryLocation": { - "$ref": "Location", - "description": "The primary location of the company." - }, - "publicProfile": { - "$ref": "PublicProfile", - "description": "Basic information from the company's public profile." - }, - "originalMinMonthlyBudget": { - "$ref": "Money", - "description": "The unconverted minimum monthly budget that the company accepts for partner\nbusiness." - }, - "services": { - "description": "Services the company can help with.", - "items": { - "type": "string", - "enum": [ - "SERVICE_UNSPECIFIED", - "S_ADVANCED_ADWORDS_SUPPORT", - "S_ADVERTISING_ON_GOOGLE", - "S_AN_ENHANCED_WEBSITE", - "S_AN_ONLINE_MARKETING_PLAN", - "S_MOBILE_AND_VIDEO_ADS", - "S_MOBILE_WEBSITE_SERVICES" - ] - }, - "type": "array", - "enumDescriptions": [ - "Unchosen.", - "Help with advanced AdWords support.", - "Help with advertising on Google.", - "Help with an enhanced website.", - "Help with an online marketing plan.", - "Help with mobile and video ads.", - "Help with mobile websites." - ] - }, - "ranks": { - "items": { - "$ref": "Rank" - }, - "type": "array", - "description": "Information related to the ranking of the company within the list of\ncompanies." - }, - "specializationStatus": { - "description": "The list of Google Partners specialization statuses for the company.", - "items": { - "$ref": "SpecializationStatus" - }, - "type": "array" - }, - "badgeTier": { - "enumDescriptions": [ - "Tier badge is not set.", - "Agency has regular partner badge.", - "Agency has premier badge." - ], - "enum": [ - "BADGE_TIER_NONE", - "BADGE_TIER_REGULAR", - "BADGE_TIER_PREMIER" - ], - "description": "Partner badge tier", - "type": "string" - }, - "autoApprovalEmailDomains": { - "description": "Email domains that allow users with a matching email address to get\nauto-approved for associating with this company.", - "items": { - "type": "string" - }, - "type": "array" - }, - "companyTypes": { - "enumDescriptions": [ - "Unchosen.", - "Handles all aspects of the advertising process.", - "Focuses solely on an advertiser's media placement.", - "Plans/executes advertising campaigns.", - "Like a\nFULL_SERVICE_AGENCY,\nbut specializing in digital.", - "Increases visibility in search engine result pages.", - "Drives promotional efforts for immediate impact.", - "Focuses on bid management, conversion, reporting.", - "Establishes favorable relationship with public through low/no-cost\ncommunications.", - "Does not manage other company's accounts, manages own marketing programs.", - "Full-service AdWords account management for local businesses." - ], - "description": "Company type labels listed on the company's profile.", - "items": { - "type": "string", - "enum": [ - "COMPANY_TYPE_UNSPECIFIED", - "FULL_SERVICE_AGENCY", - "MEDIA_AGENCY", - "CREATIVE_AGENCY", - "CDIGITAL_AGENCY", - "SEM_SEO", - "PERFORMANCE_MARKETING", - "ADVERTISING_TOOL_DEVELOPMENT", - "PR", - "SELF_MANAGED", - "RESELLER" - ] - }, - "type": "array" - }, - "profileStatus": { - "enumDescriptions": [ - "Unchosen.", - "Company profile does not show up publicly.", - "Company profile can only be viewed by the profile's URL\nand not by Google Partner Search.", - "Company profile can be viewed by the profile's URL\nand by Google Partner Search." - ], - "enum": [ - "COMPANY_PROFILE_STATUS_UNSPECIFIED", - "HIDDEN", - "PUBLISHED", - "SEARCHABLE" - ], - "description": "The public viewability status of the company's profile.", - "type": "string" - }, - "primaryLanguageCode": { - "description": "The primary language code of the company, as defined by\n\u003ca href=\"https://tools.ietf.org/html/bcp47\"\u003eBCP 47\u003c/a\u003e\n(IETF BCP 47, \"Tags for Identifying Languages\").", - "type": "string" - }, - "locations": { - "description": "The list of all company locations.\nIf set, must include the\nprimary_location\nin the list.", - "items": { - "$ref": "Location" - }, - "type": "array" - }, - "convertedMinMonthlyBudget": { - "$ref": "Money", - "description": "The minimum monthly budget that the company accepts for partner business,\nconverted to the requested currency code." - }, - "industries": { - "enumDescriptions": [ - "Unchosen.", - "The automotive industry.", - "The business-to-business industry.", - "The consumer packaged goods industry.", - "The education industry.", - "The finance industry.", - "The healthcare industry.", - "The media and entertainment industry.", - "The retail industry.", - "The technology industry.", - "The travel industry." - ], - "description": "Industries the company can help with.", - "items": { - "enum": [ - "INDUSTRY_UNSPECIFIED", - "I_AUTOMOTIVE", - "I_BUSINESS_TO_BUSINESS", - "I_CONSUMER_PACKAGED_GOODS", - "I_EDUCATION", - "I_FINANCE", - "I_HEALTHCARE", - "I_MEDIA_AND_ENTERTAINMENT", - "I_RETAIL", - "I_TECHNOLOGY", - "I_TRAVEL" - ], - "type": "string" - }, - "type": "array" - } - }, - "id": "Company" - }, - "ListLeadsResponse": { - "description": "Response message for ListLeads.", - "type": "object", - "properties": { - "leads": { - "description": "The list of leads.", - "items": { - "$ref": "Lead" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A token to retrieve next page of results.\nPass this value in the `ListLeadsRequest.page_token` field in the\nsubsequent call to\nListLeads to retrieve the\nnext page of results.", - "type": "string" - }, - "totalSize": { - "format": "int32", - "description": "The total count of leads for the given company.", - "type": "integer" - }, - "responseMetadata": { - "$ref": "ResponseMetadata", - "description": "Current response metadata." - } - }, - "id": "ListLeadsResponse" - }, - "CreateLeadResponse": { - "description": "Response message for CreateLead.", - "type": "object", - "properties": { - "recaptchaStatus": { - "enumDescriptions": [ - "Unchosen.", - "No reCaptcha validation needed.", - "reCaptcha challenge passed.", - "reCaptcha challenge failed." - ], - "enum": [ - "RECAPTCHA_STATUS_UNSPECIFIED", - "RS_NOT_NEEDED", - "RS_PASSED", - "RS_FAILED" - ], - "description": "The outcome of \u003ca href=\"https://www.google.com/recaptcha/\"\u003ereCaptcha\u003c/a\u003e\nvalidation.", - "type": "string" - }, - "lead": { - "$ref": "Lead", - "description": "Lead that was created depending on the outcome of\n\u003ca href=\"https://www.google.com/recaptcha/\"\u003ereCaptcha\u003c/a\u003e validation." - }, - "responseMetadata": { - "description": "Current response metadata.", - "$ref": "ResponseMetadata" - } - }, - "id": "CreateLeadResponse" - }, - "GetCompanyResponse": { - "id": "GetCompanyResponse", - "description": "Response message for GetCompany.", - "type": "object", - "properties": { - "responseMetadata": { - "description": "Current response metadata.", - "$ref": "ResponseMetadata" - }, - "company": { - "$ref": "Company", - "description": "The company." - } - } } }, + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "protocol": "rest", "version": "v2", "baseUrl": "https://partners.googleapis.com/", "canonicalName": "Partners", @@ -3631,8 +3632,7 @@ "ownerDomain": "google.com", "name": "partners", "batchPath": "batch", - "revision": "20170725", + "revision": "20170829", "documentationLink": "https://developers.google.com/partners/", - "id": "partners:v2", - "title": "Google Partners API" + "id": "partners:v2" } diff --git a/vendor/google.golang.org/api/people/v1/people-api.json b/vendor/google.golang.org/api/people/v1/people-api.json index f6c1ab7d8..e0ff313c1 100644 --- a/vendor/google.golang.org/api/people/v1/people-api.json +++ b/vendor/google.golang.org/api/people/v1/people-api.json @@ -1,251 +1,18 @@ { - "ownerDomain": "google.com", "name": "people", "batchPath": "batch", "title": "Google People API", "ownerName": "Google", "resources": { - "contactGroups": { - "methods": { - "batchGet": { - "response": { - "$ref": "BatchGetContactGroupsResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "parameters": { - "maxMembers": { - "format": "int32", - "description": "Specifies the maximum number of members to return for each group.", - "type": "integer", - "location": "query" - }, - "resourceNames": { - "repeated": true, - "location": "query", - "description": "The resource names of the contact groups to get.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/contacts", - "https://www.googleapis.com/auth/contacts.readonly" - ], - "flatPath": "v1/contactGroups:batchGet", - "id": "people.contactGroups.batchGet", - "path": "v1/contactGroups:batchGet", - "description": "Get a list of contact groups owned by the authenticated user by specifying\na list of contact group resource names." - }, - "delete": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "resourceName" - ], - "httpMethod": "DELETE", - "parameters": { - "resourceName": { - "description": "The resource name of the contact group to delete.", - "type": "string", - "required": true, - "pattern": "^contactGroups/[^/]+$", - "location": "path" - }, - "deleteContacts": { - "location": "query", - "description": "Set to true to also delete the contacts in the specified group.", - "type": "boolean" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/contacts" - ], - "flatPath": "v1/contactGroups/{contactGroupsId}", - "id": "people.contactGroups.delete", - "path": "v1/{+resourceName}", - "description": "Delete an existing contact group owned by the authenticated user by\nspecifying a contact group resource name." - }, - "list": { - "response": { - "$ref": "ListContactGroupsResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "parameters": { - "syncToken": { - "description": "A sync token, returned by a previous call to `contactgroups.list`.\nOnly resources changed since the sync token was created will be returned.", - "type": "string", - "location": "query" - }, - "pageToken": { - "location": "query", - "description": "The next_page_token value returned from a previous call to\n[ListContactGroups](/people/api/rest/v1/contactgroups/list).\nRequests the next page of resources.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "The maximum number of resources to return.", - "type": "integer", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/contacts", - "https://www.googleapis.com/auth/contacts.readonly" - ], - "flatPath": "v1/contactGroups", - "id": "people.contactGroups.list", - "path": "v1/contactGroups", - "description": "List all contact groups owned by the authenticated user. Members of the\ncontact groups are not populated." - }, - "create": { - "description": "Create a new contact group owned by the authenticated user.", - "request": { - "$ref": "CreateContactGroupRequest" - }, - "response": { - "$ref": "ContactGroup" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/contacts" - ], - "flatPath": "v1/contactGroups", - "id": "people.contactGroups.create", - "path": "v1/contactGroups" - }, - "get": { - "description": "Get a specific contact group owned by the authenticated user by specifying\na contact group resource name.", - "httpMethod": "GET", - "parameterOrder": [ - "resourceName" - ], - "response": { - "$ref": "ContactGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/contacts", - "https://www.googleapis.com/auth/contacts.readonly" - ], - "parameters": { - "maxMembers": { - "format": "int32", - "description": "Specifies the maximum number of members to return.", - "type": "integer", - "location": "query" - }, - "resourceName": { - "pattern": "^contactGroups/[^/]+$", - "location": "path", - "description": "The resource name of the contact group to get.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/contactGroups/{contactGroupsId}", - "path": "v1/{+resourceName}", - "id": "people.contactGroups.get" - }, - "update": { - "request": { - "$ref": "UpdateContactGroupRequest" - }, - "description": "Update the name of an existing contact group owned by the authenticated\nuser.", - "response": { - "$ref": "ContactGroup" - }, - "parameterOrder": [ - "resourceName" - ], - "httpMethod": "PUT", - "scopes": [ - "https://www.googleapis.com/auth/contacts" - ], - "parameters": { - "resourceName": { - "pattern": "^contactGroups/[^/]+$", - "location": "path", - "description": "The resource name for the contact group, assigned by the server. An ASCII\nstring, in the form of `contactGroups/`\u003cvar\u003econtact_group_id\u003c/var\u003e.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/contactGroups/{contactGroupsId}", - "id": "people.contactGroups.update", - "path": "v1/{+resourceName}" - } - }, - "resources": { - "members": { - "methods": { - "modify": { - "path": "v1/{+resourceName}/members:modify", - "id": "people.contactGroups.members.modify", - "description": "Modify the members of a contact group owned by the authenticated user.", - "request": { - "$ref": "ModifyContactGroupMembersRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resourceName" - ], - "response": { - "$ref": "ModifyContactGroupMembersResponse" - }, - "parameters": { - "resourceName": { - "location": "path", - "description": "The resource name of the contact group to modify.", - "type": "string", - "required": true, - "pattern": "^contactGroups/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/contacts" - ], - "flatPath": "v1/contactGroups/{contactGroupsId}/members:modify" - } - } - } - } - }, "people": { "methods": { - "deleteContact": { - "description": "Delete a contact person. Any non-contact data will not be deleted.", - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "resourceName" - ], - "scopes": [ - "https://www.googleapis.com/auth/contacts" - ], - "parameters": { - "resourceName": { - "pattern": "^people/[^/]+$", - "location": "path", - "description": "The resource name of the contact to delete.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/people/{peopleId}:deleteContact", - "path": "v1/{+resourceName}:deleteContact", - "id": "people.people.deleteContact" - }, "getBatchGet": { - "httpMethod": "GET", - "parameterOrder": [], + "description": "Provides information about a list of specific people by specifying a list\nof requested resource names. Use `people/me` to indicate the authenticated\nuser.\n\u003cbr\u003e\nThe request throws a 400 error if 'personFields' is not specified.", "response": { "$ref": "GetPeopleResponse" }, + "parameterOrder": [], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/contacts", "https://www.googleapis.com/auth/contacts.readonly", @@ -258,10 +25,16 @@ "https://www.googleapis.com/auth/userinfo.profile" ], "parameters": { + "personFields": { + "location": "query", + "description": "**Required.** A field mask to restrict which fields on each person are\nreturned. Valid values are:\n\n* addresses\n* ageRanges\n* biographies\n* birthdays\n* braggingRights\n* coverPhotos\n* emailAddresses\n* events\n* genders\n* imClients\n* interests\n* locales\n* memberships\n* metadata\n* names\n* nicknames\n* occupations\n* organizations\n* phoneNumbers\n* photos\n* relations\n* relationshipInterests\n* relationshipStatuses\n* residences\n* skills\n* taglines\n* urls", + "format": "google-fieldmask", + "type": "string" + }, "requestMask.includeField": { "location": "query", - "format": "google-fieldmask", "description": "**Required.** Comma-separated list of person fields to be included in the\nresponse. Each path should start with `person.`: for example,\n`person.names` or `person.photos`.", + "format": "google-fieldmask", "type": "string" }, "resourceNames": { @@ -269,30 +42,44 @@ "type": "string", "repeated": true, "location": "query" - }, - "personFields": { - "location": "query", - "format": "google-fieldmask", - "description": "**Required.** A field mask to restrict which fields on each person are\nreturned. Valid values are:\n\n* addresses\n* ageRanges\n* biographies\n* birthdays\n* braggingRights\n* coverPhotos\n* emailAddresses\n* events\n* genders\n* imClients\n* interests\n* locales\n* memberships\n* metadata\n* names\n* nicknames\n* occupations\n* organizations\n* phoneNumbers\n* photos\n* relations\n* relationshipInterests\n* relationshipStatuses\n* residences\n* skills\n* taglines\n* urls", - "type": "string" } }, "flatPath": "v1/people:batchGet", "path": "v1/people:batchGet", - "id": "people.people.getBatchGet", - "description": "Provides information about a list of specific people by specifying a list\nof requested resource names. Use `people/me` to indicate the authenticated\nuser.\n\u003cbr\u003e\nThe request throws a 400 error if 'personFields' is not specified." + "id": "people.people.getBatchGet" }, "get": { "id": "people.people.get", "path": "v1/{+resourceName}", "description": "Provides information about a person by specifying a resource name. Use\n`people/me` to indicate the authenticated user.\n\u003cbr\u003e\nThe request throws a 400 error if 'personFields' is not specified.", - "response": { - "$ref": "Person" - }, + "httpMethod": "GET", "parameterOrder": [ "resourceName" ], - "httpMethod": "GET", + "response": { + "$ref": "Person" + }, + "parameters": { + "resourceName": { + "required": true, + "type": "string", + "pattern": "^people/[^/]+$", + "location": "path", + "description": "The resource name of the person to provide information about.\n\n- To get information about the authenticated user, specify `people/me`.\n- To get information about a google account, specify\n `people/`\u003cvar\u003eaccount_id\u003c/var\u003e.\n- To get information about a contact, specify the resource name that\n identifies the contact as returned by\n[`people.connections.list`](/people/api/rest/v1/people.connections/list)." + }, + "personFields": { + "type": "string", + "location": "query", + "description": "**Required.** A field mask to restrict which fields on the person are\nreturned. Valid values are:\n\n* addresses\n* ageRanges\n* biographies\n* birthdays\n* braggingRights\n* coverPhotos\n* emailAddresses\n* events\n* genders\n* imClients\n* interests\n* locales\n* memberships\n* metadata\n* names\n* nicknames\n* occupations\n* organizations\n* phoneNumbers\n* photos\n* relations\n* relationshipInterests\n* relationshipStatuses\n* residences\n* skills\n* taglines\n* urls", + "format": "google-fieldmask" + }, + "requestMask.includeField": { + "location": "query", + "description": "**Required.** Comma-separated list of person fields to be included in the\nresponse. Each path should start with `person.`: for example,\n`person.names` or `person.photos`.", + "format": "google-fieldmask", + "type": "string" + } + }, "scopes": [ "https://www.googleapis.com/auth/contacts", "https://www.googleapis.com/auth/contacts.readonly", @@ -304,30 +91,13 @@ "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile" ], - "parameters": { - "personFields": { - "location": "query", - "format": "google-fieldmask", - "description": "**Required.** A field mask to restrict which fields on the person are\nreturned. Valid values are:\n\n* addresses\n* ageRanges\n* biographies\n* birthdays\n* braggingRights\n* coverPhotos\n* emailAddresses\n* events\n* genders\n* imClients\n* interests\n* locales\n* memberships\n* metadata\n* names\n* nicknames\n* occupations\n* organizations\n* phoneNumbers\n* photos\n* relations\n* relationshipInterests\n* relationshipStatuses\n* residences\n* skills\n* taglines\n* urls", - "type": "string" - }, - "resourceName": { - "pattern": "^people/[^/]+$", - "location": "path", - "description": "The resource name of the person to provide information about.\n\n- To get information about the authenticated user, specify `people/me`.\n- To get information about a google account, specify\n `people/`\u003cvar\u003eaccount_id\u003c/var\u003e.\n- To get information about a contact, specify the resource name that\n identifies the contact as returned by\n[`people.connections.list`](/people/api/rest/v1/people.connections/list).", - "type": "string", - "required": true - }, - "requestMask.includeField": { - "format": "google-fieldmask", - "description": "**Required.** Comma-separated list of person fields to be included in the\nresponse. Each path should start with `person.`: for example,\n`person.names` or `person.photos`.", - "type": "string", - "location": "query" - } - }, "flatPath": "v1/people/{peopleId}" }, "updateContact": { + "request": { + "$ref": "Person" + }, + "description": "Update contact data for an existing contact person. Any non-contact data\nwill not be modified.\n\nThe request throws a 400 error if `updatePersonFields` is not specified.\n\u003cbr\u003e\nThe request throws a 400 error if `person.metadata.sources` is not\nspecified for the contact to be updated.\n\u003cbr\u003e\nThe request throws a 412 error if `person.metadata.sources.etag` is\ndifferent than the contact's etag, which indicates the contact has changed\nsince its data was read. Clients should get the latest person and re-apply\ntheir updates to the latest person.", "response": { "$ref": "Person" }, @@ -337,16 +107,16 @@ "httpMethod": "PATCH", "parameters": { "resourceName": { - "description": "The resource name for the person, assigned by the server. An ASCII string\nwith a max length of 27 characters, in the form of\n`people/`\u003cvar\u003eperson_id\u003c/var\u003e.", - "type": "string", - "required": true, "pattern": "^people/[^/]+$", - "location": "path" + "location": "path", + "description": "The resource name for the person, assigned by the server. An ASCII string\nwith a max length of 27 characters, in the form of\n`people/`\u003cvar\u003eperson_id\u003c/var\u003e.", + "required": true, + "type": "string" }, "updatePersonFields": { "location": "query", - "format": "google-fieldmask", "description": "**Required.** A field mask to restrict which fields on the person are\nupdated. Valid values are:\n\n* addresses\n* biographies\n* birthdays\n* braggingRights\n* emailAddresses\n* events\n* genders\n* imClients\n* interests\n* locales\n* names\n* nicknames\n* occupations\n* organizations\n* phoneNumbers\n* relations\n* residences\n* skills\n* urls", + "format": "google-fieldmask", "type": "string" } }, @@ -354,21 +124,16 @@ "https://www.googleapis.com/auth/contacts" ], "flatPath": "v1/people/{peopleId}:updateContact", - "id": "people.people.updateContact", "path": "v1/{+resourceName}:updateContact", - "description": "Update contact data for an existing contact person. Any non-contact data\nwill not be modified.\n\nThe request throws a 400 error if `updatePersonFields` is not specified.\n\u003cbr\u003e\nThe request throws a 400 error if `person.metadata.sources` is not\nspecified for the contact to be updated.\n\u003cbr\u003e\nThe request throws a 412 error if `person.metadata.sources.etag` is\ndifferent than the contact's etag, which indicates the contact has changed\nsince its data was read. Clients should get the latest person and re-apply\ntheir updates to the latest person.", - "request": { - "$ref": "Person" - } + "id": "people.people.updateContact" }, "createContact": { - "flatPath": "v1/people:createContact", - "id": "people.people.createContact", "path": "v1/people:createContact", + "id": "people.people.createContact", + "description": "Create a new contact and return the person resource for that contact.", "request": { "$ref": "Person" }, - "description": "Create a new contact and return the person resource for that contact.", "response": { "$ref": "Person" }, @@ -379,29 +144,79 @@ ], "parameters": { "parent": { - "location": "query", "description": "The resource name of the owning person resource.", - "type": "string" + "type": "string", + "location": "query" } - } + }, + "flatPath": "v1/people:createContact" + }, + "deleteContact": { + "description": "Delete a contact person. Any non-contact data will not be deleted.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "resourceName" + ], + "httpMethod": "DELETE", + "parameters": { + "resourceName": { + "required": true, + "type": "string", + "pattern": "^people/[^/]+$", + "location": "path", + "description": "The resource name of the contact to delete." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/contacts" + ], + "flatPath": "v1/people/{peopleId}:deleteContact", + "path": "v1/{+resourceName}:deleteContact", + "id": "people.people.deleteContact" } }, "resources": { "connections": { "methods": { "list": { - "httpMethod": "GET", - "parameterOrder": [ - "resourceName" - ], + "description": "Provides a list of the authenticated user's contacts merged with any\nconnected profiles.\n\u003cbr\u003e\nThe request throws a 400 error if 'personFields' is not specified.", "response": { "$ref": "ListConnectionsResponse" }, + "parameterOrder": [ + "resourceName" + ], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/contacts", "https://www.googleapis.com/auth/contacts.readonly" ], "parameters": { + "pageSize": { + "type": "integer", + "location": "query", + "description": "The number of connections to include in the response. Valid values are\nbetween 1 and 2000, inclusive. Defaults to 100.", + "format": "int32" + }, + "requestMask.includeField": { + "description": "**Required.** Comma-separated list of person fields to be included in the\nresponse. Each path should start with `person.`: for example,\n`person.names` or `person.photos`.", + "format": "google-fieldmask", + "type": "string", + "location": "query" + }, + "syncToken": { + "description": "A sync token, returned by a previous call to `people.connections.list`.\nOnly resources changed since the sync token was created will be returned.", + "type": "string", + "location": "query" + }, + "personFields": { + "description": "**Required.** A field mask to restrict which fields on each person are\nreturned. Valid values are:\n\n* addresses\n* ageRanges\n* biographies\n* birthdays\n* braggingRights\n* coverPhotos\n* emailAddresses\n* events\n* genders\n* imClients\n* interests\n* locales\n* memberships\n* metadata\n* names\n* nicknames\n* occupations\n* organizations\n* phoneNumbers\n* photos\n* relations\n* relationshipInterests\n* relationshipStatuses\n* residences\n* skills\n* taglines\n* urls", + "format": "google-fieldmask", + "type": "string", + "location": "query" + }, "sortOrder": { "location": "query", "enum": [ @@ -413,50 +228,234 @@ "type": "string" }, "requestSyncToken": { - "location": "query", "description": "Whether the response should include a sync token, which can be used to get\nall changes since the last request.", - "type": "boolean" - }, - "resourceName": { - "location": "path", - "description": "The resource name to return connections for. Only `people/me` is valid.", - "type": "string", - "required": true, - "pattern": "^people/[^/]+$" + "type": "boolean", + "location": "query" }, "pageToken": { "location": "query", "description": "The token of the page to be returned.", "type": "string" }, - "requestMask.includeField": { - "location": "query", - "format": "google-fieldmask", - "description": "**Required.** Comma-separated list of person fields to be included in the\nresponse. Each path should start with `person.`: for example,\n`person.names` or `person.photos`.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The number of connections to include in the response. Valid values are\nbetween 1 and 2000, inclusive. Defaults to 100.", - "type": "integer" - }, - "syncToken": { - "description": "A sync token, returned by a previous call to `people.connections.list`.\nOnly resources changed since the sync token was created will be returned.", + "resourceName": { + "description": "The resource name to return connections for. Only `people/me` is valid.", + "required": true, "type": "string", - "location": "query" - }, - "personFields": { - "format": "google-fieldmask", - "description": "**Required.** A field mask to restrict which fields on each person are\nreturned. Valid values are:\n\n* addresses\n* ageRanges\n* biographies\n* birthdays\n* braggingRights\n* coverPhotos\n* emailAddresses\n* events\n* genders\n* imClients\n* interests\n* locales\n* memberships\n* metadata\n* names\n* nicknames\n* occupations\n* organizations\n* phoneNumbers\n* photos\n* relations\n* relationshipInterests\n* relationshipStatuses\n* residences\n* skills\n* taglines\n* urls", - "type": "string", - "location": "query" + "pattern": "^people/[^/]+$", + "location": "path" } }, "flatPath": "v1/people/{peopleId}/connections", "path": "v1/{+resourceName}/connections", - "id": "people.people.connections.list", - "description": "Provides a list of the authenticated user's contacts merged with any\nconnected profiles.\n\u003cbr\u003e\nThe request throws a 400 error if 'personFields' is not specified." + "id": "people.people.connections.list" + } + } + } + } + }, + "contactGroups": { + "methods": { + "get": { + "description": "Get a specific contact group owned by the authenticated user by specifying\na contact group resource name.", + "response": { + "$ref": "ContactGroup" + }, + "parameterOrder": [ + "resourceName" + ], + "httpMethod": "GET", + "parameters": { + "maxMembers": { + "description": "Specifies the maximum number of members to return.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "resourceName": { + "description": "The resource name of the contact group to get.", + "required": true, + "type": "string", + "pattern": "^contactGroups/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/contacts", + "https://www.googleapis.com/auth/contacts.readonly" + ], + "flatPath": "v1/contactGroups/{contactGroupsId}", + "path": "v1/{+resourceName}", + "id": "people.contactGroups.get" + }, + "update": { + "request": { + "$ref": "UpdateContactGroupRequest" + }, + "description": "Update the name of an existing contact group owned by the authenticated\nuser.", + "httpMethod": "PUT", + "parameterOrder": [ + "resourceName" + ], + "response": { + "$ref": "ContactGroup" + }, + "parameters": { + "resourceName": { + "location": "path", + "description": "The resource name for the contact group, assigned by the server. An ASCII\nstring, in the form of `contactGroups/`\u003cvar\u003econtact_group_id\u003c/var\u003e.", + "required": true, + "type": "string", + "pattern": "^contactGroups/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/contacts" + ], + "flatPath": "v1/contactGroups/{contactGroupsId}", + "id": "people.contactGroups.update", + "path": "v1/{+resourceName}" + }, + "batchGet": { + "description": "Get a list of contact groups owned by the authenticated user by specifying\na list of contact group resource names.", + "response": { + "$ref": "BatchGetContactGroupsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/contacts", + "https://www.googleapis.com/auth/contacts.readonly" + ], + "parameters": { + "maxMembers": { + "location": "query", + "description": "Specifies the maximum number of members to return for each group.", + "format": "int32", + "type": "integer" + }, + "resourceNames": { + "description": "The resource names of the contact groups to get.", + "type": "string", + "repeated": true, + "location": "query" + } + }, + "flatPath": "v1/contactGroups:batchGet", + "path": "v1/contactGroups:batchGet", + "id": "people.contactGroups.batchGet" + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "resourceName" + ], + "httpMethod": "DELETE", + "parameters": { + "resourceName": { + "required": true, + "type": "string", + "pattern": "^contactGroups/[^/]+$", + "location": "path", + "description": "The resource name of the contact group to delete." + }, + "deleteContacts": { + "description": "Set to true to also delete the contacts in the specified group.", + "type": "boolean", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/contacts" + ], + "flatPath": "v1/contactGroups/{contactGroupsId}", + "path": "v1/{+resourceName}", + "id": "people.contactGroups.delete", + "description": "Delete an existing contact group owned by the authenticated user by\nspecifying a contact group resource name." + }, + "list": { + "flatPath": "v1/contactGroups", + "path": "v1/contactGroups", + "id": "people.contactGroups.list", + "description": "List all contact groups owned by the authenticated user. Members of the\ncontact groups are not populated.", + "response": { + "$ref": "ListContactGroupsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/contacts", + "https://www.googleapis.com/auth/contacts.readonly" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "The next_page_token value returned from a previous call to\n[ListContactGroups](/people/api/rest/v1/contactgroups/list).\nRequests the next page of resources.", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of resources to return.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "syncToken": { + "description": "A sync token, returned by a previous call to `contactgroups.list`.\nOnly resources changed since the sync token was created will be returned.", + "type": "string", + "location": "query" + } + } + }, + "create": { + "description": "Create a new contact group owned by the authenticated user.", + "request": { + "$ref": "CreateContactGroupRequest" + }, + "response": { + "$ref": "ContactGroup" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/contacts" + ], + "parameters": {}, + "flatPath": "v1/contactGroups", + "path": "v1/contactGroups", + "id": "people.contactGroups.create" + } + }, + "resources": { + "members": { + "methods": { + "modify": { + "response": { + "$ref": "ModifyContactGroupMembersResponse" + }, + "parameterOrder": [ + "resourceName" + ], + "httpMethod": "POST", + "parameters": { + "resourceName": { + "description": "The resource name of the contact group to modify.", + "required": true, + "type": "string", + "pattern": "^contactGroups/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/contacts" + ], + "flatPath": "v1/contactGroups/{contactGroupsId}/members:modify", + "path": "v1/{+resourceName}/members:modify", + "id": "people.contactGroups.members.modify", + "request": { + "$ref": "ModifyContactGroupMembersRequest" + }, + "description": "Modify the members of a contact group owned by the authenticated user." } } } @@ -464,6 +463,32 @@ } }, "parameters": { + "alt": { + "type": "string", + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "key": { + "location": "query", + "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.", + "type": "string" + }, "quotaUser": { "location": "query", "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.", @@ -472,46 +497,48 @@ "pp": { "location": "query", "description": "Pretty-print response.", - "default": "true", - "type": "boolean" + "type": "boolean", + "default": "true" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" }, "oauth_token": { "description": "OAuth 2.0 token for the current user.", "type": "string", "location": "query" }, - "bearer_token": { - "description": "OAuth bearer token.", + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, "prettyPrint": { "location": "query", "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" + "type": "boolean", + "default": "true" }, "fields": { "description": "Selector specifying which fields to include in a partial response.", "type": "string", "location": "query" }, - "callback": { + "uploadType": { "location": "query", - "description": "JSONP", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, "$.xgafv": { + "description": "V1 error format.", + "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -520,49 +547,806 @@ "enum": [ "1", "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "alt": { - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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" - }, - "key": { - "location": "query", - "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.", - "type": "string" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" + ] } }, "version": "v1", "baseUrl": "https://people.googleapis.com/", - "servicePath": "", - "description": "Provides access to information about profiles and contacts.", "kind": "discovery#restDescription", + "description": "Provides access to information about profiles and contacts.", + "servicePath": "", "basePath": "", - "revision": "20170801", - "id": "people:v1", + "revision": "20170909", "documentationLink": "https://developers.google.com/people/", + "id": "people:v1", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "DomainMembership": { + "type": "object", + "properties": { + "inViewerDomain": { + "description": "True if the person is in the viewer's Google Apps domain.", + "type": "boolean" + } + }, + "id": "DomainMembership", + "description": "A Google Apps Domain membership." + }, + "BatchGetContactGroupsResponse": { + "description": "The response to a batch get contact groups request.", + "type": "object", + "properties": { + "responses": { + "description": "The list of responses for each requested contact group resource.", + "type": "array", + "items": { + "$ref": "ContactGroupResponse" + } + } + }, + "id": "BatchGetContactGroupsResponse" + }, + "Membership": { + "description": "A person's read-only membership in a group.", + "type": "object", + "properties": { + "contactGroupMembership": { + "description": "The contact group membership.", + "$ref": "ContactGroupMembership" + }, + "domainMembership": { + "description": "The domain membership.", + "$ref": "DomainMembership" + }, + "metadata": { + "description": "Metadata about the membership.", + "$ref": "FieldMetadata" + } + }, + "id": "Membership" + }, + "RelationshipStatus": { + "type": "object", + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the relationship status." + }, + "value": { + "description": "The relationship status. The value can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `single`\n* `inARelationship`\n* `engaged`\n* `married`\n* `itsComplicated`\n* `openRelationship`\n* `widowed`\n* `inDomesticPartnership`\n* `inCivilUnion`", + "type": "string" + }, + "formattedValue": { + "description": "The read-only value of the relationship status translated and formatted in\nthe viewer's account locale or the `Accept-Language` HTTP header locale.", + "type": "string" + } + }, + "id": "RelationshipStatus", + "description": "A person's read-only relationship status." + }, + "BraggingRights": { + "description": "A person's bragging rights.", + "type": "object", + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the bragging rights." + }, + "value": { + "description": "The bragging rights; for example, `climbed mount everest`.", + "type": "string" + } + }, + "id": "BraggingRights" + }, + "Organization": { + "description": "A person's past or current organization. Overlapping date ranges are\npermitted.", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of the organization. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `work`\n* `school`" + }, + "phoneticName": { + "description": "The phonetic name of the organization.", + "type": "string" + }, + "jobDescription": { + "description": "The person's job description at the organization.", + "type": "string" + }, + "endDate": { + "description": "The end date when the person left the organization.", + "$ref": "Date" + }, + "symbol": { + "description": "The symbol associated with the organization; for example, a stock ticker\nsymbol, abbreviation, or acronym.", + "type": "string" + }, + "name": { + "description": "The name of the organization.", + "type": "string" + }, + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the organization." + }, + "title": { + "description": "The person's job title at the organization.", + "type": "string" + }, + "location": { + "description": "The location of the organization office the person works at.", + "type": "string" + }, + "current": { + "description": "True if the organization is the person's current organization;\nfalse if the organization is a past organization.", + "type": "boolean" + }, + "startDate": { + "$ref": "Date", + "description": "The start date when the person joined the organization." + }, + "formattedType": { + "description": "The read-only type of the organization translated and formatted in the\nviewer's account locale or the `Accept-Language` HTTP header locale.", + "type": "string" + }, + "domain": { + "description": "The domain name associated with the organization; for example, `google.com`.", + "type": "string" + }, + "department": { + "type": "string", + "description": "The person's department at the organization." + } + }, + "id": "Organization" + }, + "AgeRangeType": { + "description": "A person's age range.", + "type": "object", + "properties": { + "ageRange": { + "description": "The age range.", + "type": "string", + "enumDescriptions": [ + "Unspecified.", + "Younger than eighteen.", + "Between eighteen and twenty.", + "Twenty-one and older." + ], + "enum": [ + "AGE_RANGE_UNSPECIFIED", + "LESS_THAN_EIGHTEEN", + "EIGHTEEN_TO_TWENTY", + "TWENTY_ONE_OR_OLDER" + ] + }, + "metadata": { + "description": "Metadata about the age range.", + "$ref": "FieldMetadata" + } + }, + "id": "AgeRangeType" + }, + "ListContactGroupsResponse": { + "type": "object", + "properties": { + "contactGroups": { + "description": "The list of contact groups. Members of the contact groups are not\npopulated.", + "type": "array", + "items": { + "$ref": "ContactGroup" + } + }, + "nextPageToken": { + "type": "string", + "description": "The token that can be used to retrieve the next page of results." + }, + "totalItems": { + "type": "integer", + "description": "The total number of items in the list without pagination.", + "format": "int32" + }, + "nextSyncToken": { + "description": "The token that can be used to retrieve changes since the last request.", + "type": "string" + } + }, + "id": "ListContactGroupsResponse", + "description": "The response to a list contact groups request." + }, + "PersonResponse": { + "type": "object", + "properties": { + "person": { + "description": "The person.", + "$ref": "Person" + }, + "status": { + "$ref": "Status", + "description": "The status of the response." + }, + "httpStatusCode": { + "type": "integer", + "description": "**DEPRECATED** (Please use status instead)\n\n[HTTP 1.1 status code]\n(http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).", + "format": "int32" + }, + "requestedResourceName": { + "type": "string", + "description": "The original requested resource name. May be different than the resource\nname on the returned person.\n\nThe resource name can change when adding or removing fields that link a\ncontact and profile such as a verified email, verified phone number, or a\nprofile URL." + } + }, + "id": "PersonResponse", + "description": "The response for a single person" + }, + "Relation": { + "type": "object", + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the relation." + }, + "type": { + "description": "The person's relation to the other person. The type can be custom or predefined.\nPossible values include, but are not limited to, the following values:\n\n* `spouse`\n* `child`\n* `mother`\n* `father`\n* `parent`\n* `brother`\n* `sister`\n* `friend`\n* `relative`\n* `domesticPartner`\n* `manager`\n* `assistant`\n* `referredBy`\n* `partner`", + "type": "string" + }, + "person": { + "description": "The name of the other person this relation refers to.", + "type": "string" + }, + "formattedType": { + "description": "The type of the relation translated and formatted in the viewer's account\nlocale or the locale specified in the Accept-Language HTTP header.", + "type": "string" + } + }, + "id": "Relation", + "description": "A person's relation to another person." + }, + "Occupation": { + "description": "A person's occupation.", + "type": "object", + "properties": { + "value": { + "description": "The occupation; for example, `carpenter`.", + "type": "string" + }, + "metadata": { + "description": "Metadata about the occupation.", + "$ref": "FieldMetadata" + } + }, + "id": "Occupation" + }, + "ContactGroup": { + "description": "A contact group.", + "type": "object", + "properties": { + "memberResourceNames": { + "description": "The list of contact person resource names that are members of the contact\ngroup. The field is not populated for LIST requests and can only be updated\nthrough the\n[ModifyContactGroupMembers](/people/api/rest/v1/contactgroups/members/modify).", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "description": "The contact group name set by the group owner or a system provided name\nfor system groups.", + "type": "string" + }, + "metadata": { + "$ref": "ContactGroupMetadata", + "description": "Metadata about the contact group." + }, + "memberCount": { + "description": "The total number of contacts in the group irrespective of max members in\nspecified in the request.", + "format": "int32", + "type": "integer" + }, + "resourceName": { + "description": "The resource name for the contact group, assigned by the server. An ASCII\nstring, in the form of `contactGroups/`\u003cvar\u003econtact_group_id\u003c/var\u003e.", + "type": "string" + }, + "etag": { + "description": "The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the\nresource. Used for web cache validation.", + "type": "string" + }, + "formattedName": { + "description": "The read-only name translated and formatted in the viewer's account locale\nor the `Accept-Language` HTTP header locale for system groups names.\nGroup names set by the owner are the same as name.", + "type": "string" + }, + "groupType": { + "enum": [ + "GROUP_TYPE_UNSPECIFIED", + "USER_CONTACT_GROUP", + "SYSTEM_CONTACT_GROUP" + ], + "description": "The read-only contact group type.", + "type": "string", + "enumDescriptions": [ + "Unspecified.", + "User defined contact group.", + "System defined contact group." + ] + } + }, + "id": "ContactGroup" + }, + "Person": { + "description": "Information about a person merged from various data sources such as the\nauthenticated user's contacts and profile data.\n\nMost fields can have multiple items. The items in a field have no guaranteed\norder, but each non-empty field is guaranteed to have exactly one field with\n`metadata.primary` set to true.", + "type": "object", + "properties": { + "metadata": { + "$ref": "PersonMetadata", + "description": "Read-only metadata about the person." + }, + "residences": { + "type": "array", + "items": { + "$ref": "Residence" + }, + "description": "The person's residences." + }, + "genders": { + "description": "The person's genders.", + "type": "array", + "items": { + "$ref": "Gender" + } + }, + "interests": { + "description": "The person's interests.", + "type": "array", + "items": { + "$ref": "Interest" + } + }, + "resourceName": { + "type": "string", + "description": "The resource name for the person, assigned by the server. An ASCII string\nwith a max length of 27 characters, in the form of\n`people/`\u003cvar\u003eperson_id\u003c/var\u003e." + }, + "biographies": { + "description": "The person's biographies.", + "type": "array", + "items": { + "$ref": "Biography" + } + }, + "skills": { + "description": "The person's skills.", + "type": "array", + "items": { + "$ref": "Skill" + } + }, + "relationshipStatuses": { + "description": "The person's read-only relationship statuses.", + "type": "array", + "items": { + "$ref": "RelationshipStatus" + } + }, + "photos": { + "description": "The person's read-only photos.", + "type": "array", + "items": { + "$ref": "Photo" + } + }, + "ageRange": { + "enumDescriptions": [ + "Unspecified.", + "Younger than eighteen.", + "Between eighteen and twenty.", + "Twenty-one and older." + ], + "enum": [ + "AGE_RANGE_UNSPECIFIED", + "LESS_THAN_EIGHTEEN", + "EIGHTEEN_TO_TWENTY", + "TWENTY_ONE_OR_OLDER" + ], + "description": "**DEPRECATED** (Please use `person.ageRanges` instead)**\n\nThe person's read-only age range.", + "type": "string" + }, + "taglines": { + "description": "The person's read-only taglines.", + "type": "array", + "items": { + "$ref": "Tagline" + } + }, + "ageRanges": { + "type": "array", + "items": { + "$ref": "AgeRangeType" + }, + "description": "The person's read-only age ranges." + }, + "addresses": { + "description": "The person's street addresses.", + "type": "array", + "items": { + "$ref": "Address" + } + }, + "events": { + "description": "The person's events.", + "type": "array", + "items": { + "$ref": "Event" + } + }, + "memberships": { + "description": "The person's read-only group memberships.", + "type": "array", + "items": { + "$ref": "Membership" + } + }, + "phoneNumbers": { + "type": "array", + "items": { + "$ref": "PhoneNumber" + }, + "description": "The person's phone numbers." + }, + "coverPhotos": { + "description": "The person's read-only cover photos.", + "type": "array", + "items": { + "$ref": "CoverPhoto" + } + }, + "imClients": { + "description": "The person's instant messaging clients.", + "type": "array", + "items": { + "$ref": "ImClient" + } + }, + "birthdays": { + "description": "The person's birthdays.", + "type": "array", + "items": { + "$ref": "Birthday" + } + }, + "userDefined": { + "description": "The person's user defined data.", + "type": "array", + "items": { + "$ref": "UserDefined" + } + }, + "locales": { + "description": "The person's locale preferences.", + "type": "array", + "items": { + "$ref": "Locale" + } + }, + "relationshipInterests": { + "description": "The person's read-only relationship interests.", + "type": "array", + "items": { + "$ref": "RelationshipInterest" + } + }, + "urls": { + "type": "array", + "items": { + "$ref": "Url" + }, + "description": "The person's associated URLs." + }, + "nicknames": { + "description": "The person's nicknames.", + "type": "array", + "items": { + "$ref": "Nickname" + } + }, + "names": { + "description": "The person's names.", + "type": "array", + "items": { + "$ref": "Name" + } + }, + "relations": { + "description": "The person's relations.", + "type": "array", + "items": { + "$ref": "Relation" + } + }, + "occupations": { + "description": "The person's occupations.", + "type": "array", + "items": { + "$ref": "Occupation" + } + }, + "emailAddresses": { + "description": "The person's email addresses.", + "type": "array", + "items": { + "$ref": "EmailAddress" + } + }, + "organizations": { + "type": "array", + "items": { + "$ref": "Organization" + }, + "description": "The person's past or current organizations." + }, + "etag": { + "description": "The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the\nresource. Used for web cache validation.", + "type": "string" + }, + "braggingRights": { + "description": "The person's bragging rights.", + "type": "array", + "items": { + "$ref": "BraggingRights" + } + } + }, + "id": "Person" + }, + "UpdateContactGroupRequest": { + "description": "A request to update an existing contact group. Only the name can be updated.", + "type": "object", + "properties": { + "contactGroup": { + "$ref": "ContactGroup", + "description": "The contact group to update." + } + }, + "id": "UpdateContactGroupRequest" + }, + "ContactGroupMetadata": { + "description": "The read-only metadata about a contact group.", + "type": "object", + "properties": { + "deleted": { + "description": "True if the contact group resource has been deleted. Populated only for\n[`ListContactGroups`](/people/api/rest/v1/contactgroups/list) requests\nthat include a sync token.", + "type": "boolean" + }, + "updateTime": { + "description": "The time the group was last updated.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "ContactGroupMetadata" + }, + "Residence": { + "description": "A person's past or current residence.", + "type": "object", + "properties": { + "value": { + "description": "The address of the residence.", + "type": "string" + }, + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the residence." + }, + "current": { + "description": "True if the residence is the person's current residence;\nfalse if the residence is a past residence.", + "type": "boolean" + } + }, + "id": "Residence" + }, + "Event": { + "description": "An event related to the person.", + "type": "object", + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the event." + }, + "type": { + "description": "The type of the event. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `anniversary`\n* `other`", + "type": "string" + }, + "date": { + "$ref": "Date", + "description": "The date of the event." + }, + "formattedType": { + "description": "The read-only type of the event translated and formatted in the\nviewer's account locale or the `Accept-Language` HTTP header locale.", + "type": "string" + } + }, + "id": "Event" + }, + "ModifyContactGroupMembersResponse": { + "description": "The response to a modify contact group members request.", + "type": "object", + "properties": { + "notFoundResourceNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The contact people resource names that were not found." + } + }, + "id": "ModifyContactGroupMembersResponse" + }, + "ProfileMetadata": { + "id": "ProfileMetadata", + "description": "The read-only metadata about a profile.", + "type": "object", + "properties": { + "userTypes": { + "description": "The user types.", + "type": "array", + "items": { + "enum": [ + "USER_TYPE_UNKNOWN", + "GOOGLE_USER", + "GPLUS_USER", + "GOOGLE_APPS_USER" + ], + "type": "string" + }, + "enumDescriptions": [ + "The user type is not known.", + "The user is a Google user.", + "The user is a Google+ user.", + "The user is a Google Apps for Work user." + ] + }, + "objectType": { + "description": "The profile object type.", + "type": "string", + "enumDescriptions": [ + "Unspecified.", + "Person.", + "[Google+ Page.](http://www.google.com/+/brands/)" + ], + "enum": [ + "OBJECT_TYPE_UNSPECIFIED", + "PERSON", + "PAGE" + ] + } + } + }, + "Gender": { + "properties": { + "metadata": { + "description": "Metadata about the gender.", + "$ref": "FieldMetadata" + }, + "value": { + "description": "The gender for the person. The gender can be custom or predefined.\nPossible values include, but are not limited to, the\nfollowing:\n\n* `male`\n* `female`\n* `other`\n* `unknown`", + "type": "string" + }, + "formattedValue": { + "description": "The read-only value of the gender translated and formatted in the viewer's\naccount locale or the `Accept-Language` HTTP header locale.", + "type": "string" + } + }, + "id": "Gender", + "description": "A person's gender.", + "type": "object" + }, + "CoverPhoto": { + "properties": { + "metadata": { + "description": "Metadata about the cover photo.", + "$ref": "FieldMetadata" + }, + "default": { + "description": "True if the cover photo is the default cover photo;\nfalse if the cover photo is a user-provided cover photo.", + "type": "boolean" + }, + "url": { + "description": "The URL of the cover photo.", + "type": "string" + } + }, + "id": "CoverPhoto", + "description": "A person's read-only cover photo. A large image shown on the person's\nprofile page that represents who they are or what they care about.", + "type": "object" + }, + "Interest": { + "description": "One of the person's interests.", + "type": "object", + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the interest." + }, + "value": { + "description": "The interest; for example, `stargazing`.", + "type": "string" + } + }, + "id": "Interest" + }, + "EmailAddress": { + "description": "A person's email address.", + "type": "object", + "properties": { + "value": { + "description": "The email address.", + "type": "string" + }, + "formattedType": { + "description": "The read-only type of the email address translated and formatted in the\nviewer's account locale or the `Accept-Language` HTTP header locale.", + "type": "string" + }, + "displayName": { + "description": "The display name of the email.", + "type": "string" + }, + "metadata": { + "description": "Metadata about the email address.", + "$ref": "FieldMetadata" + }, + "type": { + "description": "The type of the email address. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `home`\n* `work`\n* `other`", + "type": "string" + } + }, + "id": "EmailAddress" + }, + "Nickname": { + "description": "A person's nickname.", + "type": "object", + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the nickname." + }, + "type": { + "description": "The type of the nickname.", + "type": "string", + "enumDescriptions": [ + "Generic nickname.", + "Maiden name or birth family name. Used when the person's family name has\nchanged as a result of marriage.", + "Initials.", + "Google+ profile nickname.", + "A professional affiliation or other name; for example, `Dr. Smith.`" + ], + "enum": [ + "DEFAULT", + "MAIDEN_NAME", + "INITIALS", + "GPLUS", + "OTHER_NAME" + ] + }, + "value": { + "type": "string", + "description": "The nickname." + } + }, + "id": "Nickname" + }, + "Skill": { + "type": "object", + "properties": { + "metadata": { + "description": "Metadata about the skill.", + "$ref": "FieldMetadata" + }, + "value": { + "description": "The skill; for example, `underwater basket weaving`.", + "type": "string" + } + }, + "id": "Skill", + "description": "A skill that the person has." + }, "Tagline": { "description": "A read-only brief one-line description of the person.", "type": "object", @@ -579,29 +1363,28 @@ "id": "Tagline" }, "Date": { + "description": "Represents a whole calendar date, for example a date of birth. The time\nof day and time zone are either specified elsewhere or are not\nsignificant. The date is relative to the\n[Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar).\nThe day may be 0 to represent a year and month where the day is not\nsignificant. The year may be 0 to represent a month and day independent\nof year; for example, anniversary date.", + "type": "object", "properties": { - "day": { - "format": "int32", - "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", - "type": "integer" + "month": { + "type": "integer", + "description": "Month of year. Must be from 1 to 12.", + "format": "int32" }, "year": { - "format": "int32", "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "format": "int32", "type": "integer" }, - "month": { + "day": { + "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", "format": "int32", - "description": "Month of year. Must be from 1 to 12.", "type": "integer" } }, - "id": "Date", - "description": "Represents a whole calendar date, for example a date of birth. The time\nof day and time zone are either specified elsewhere or are not\nsignificant. The date is relative to the\n[Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar).\nThe day may be 0 to represent a year and month where the day is not\nsignificant. The year may be 0 to represent a month and day independent\nof year; for example, anniversary date.", - "type": "object" + "id": "Date" }, "Name": { - "description": "A person's name. If the name is a mononym, the family name is empty.", "type": "object", "properties": { "phoneticFullName": { @@ -628,18 +1411,18 @@ "description": "The honorific suffixes spelled as they sound.", "type": "string" }, - "givenName": { - "description": "The given name.", - "type": "string" - }, "middleName": { "description": "The middle name(s).", "type": "string" }, - "phoneticHonorificPrefix": { - "description": "The honorific prefixes spelled as they sound.", + "givenName": { + "description": "The given name.", "type": "string" }, + "phoneticHonorificPrefix": { + "type": "string", + "description": "The honorific prefixes spelled as they sound." + }, "phoneticGivenName": { "description": "The given name spelled as it sounds.", "type": "string" @@ -649,19 +1432,20 @@ "type": "string" }, "familyName": { - "description": "The family name.", - "type": "string" + "type": "string", + "description": "The family name." }, "phoneticMiddleName": { "description": "The middle name(s) spelled as they sound.", "type": "string" }, "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the name." + "description": "Metadata about the name.", + "$ref": "FieldMetadata" } }, - "id": "Name" + "id": "Name", + "description": "A person's name. If the name is a mononym, the family name is empty." }, "Locale": { "description": "A person's locale preference.", @@ -672,71 +1456,96 @@ "$ref": "FieldMetadata" }, "value": { - "description": "The well-formed [IETF BCP 47](https://tools.ietf.org/html/bcp47)\nlanguage tag representing the locale.", - "type": "string" + "type": "string", + "description": "The well-formed [IETF BCP 47](https://tools.ietf.org/html/bcp47)\nlanguage tag representing the locale." } }, "id": "Locale" }, "Empty": { + "id": "Empty", "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "type": "object", - "properties": {}, - "id": "Empty" + "properties": {} + }, + "UserDefined": { + "description": "Arbitrary user data that is populated by the end users.", + "type": "object", + "properties": { + "key": { + "description": "The end user specified key of the user defined data.", + "type": "string" + }, + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the user defined data." + }, + "value": { + "description": "The end user specified value of the user defined data.", + "type": "string" + } + }, + "id": "UserDefined" }, "Biography": { + "id": "Biography", "description": "A person's short biography.", "type": "object", "properties": { - "metadata": { - "description": "Metadata about the biography.", - "$ref": "FieldMetadata" - }, "value": { "description": "The short biography.", "type": "string" }, "contentType": { - "enum": [ - "CONTENT_TYPE_UNSPECIFIED", - "TEXT_PLAIN", - "TEXT_HTML" - ], "description": "The content type of the biography.", "type": "string", "enumDescriptions": [ "Unspecified.", "Plain text.", "HTML text." + ], + "enum": [ + "CONTENT_TYPE_UNSPECIFIED", + "TEXT_PLAIN", + "TEXT_HTML" ] + }, + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the biography." } - }, - "id": "Biography" + } }, "FieldMetadata": { - "description": "Metadata about a field.", - "type": "object", "properties": { - "source": { - "$ref": "Source", - "description": "The source of the field." - }, "verified": { "description": "True if the field is verified; false if the field is unverified. A\nverified field is typically a name, email address, phone number, or\nwebsite that has been confirmed to be owned by the person.", "type": "boolean" }, "primary": { - "description": "True if the field is the primary field; false if the field is a secondary\nfield.", - "type": "boolean" + "type": "boolean", + "description": "True if the field is the primary field; false if the field is a secondary\nfield." + }, + "source": { + "$ref": "Source", + "description": "The source of the field." } }, - "id": "FieldMetadata" + "id": "FieldMetadata", + "description": "Metadata about a field.", + "type": "object" }, "Source": { "description": "The source of a field.", "type": "object", "properties": { + "updateTime": { + "description": "**Only populated in `person.metadata.sources`.**\n\nLast update timestamp of this source.", + "format": "google-datetime", + "type": "string" + }, "type": { + "type": "string", "enumDescriptions": [ "Unspecified.", "[Google Account](https://accounts.google.com).", @@ -751,8 +1560,7 @@ "DOMAIN_PROFILE", "CONTACT" ], - "description": "The source type.", - "type": "string" + "description": "The source type." }, "etag": { "description": "**Only populated in `person.metadata.sources`.**\n\nThe [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the\nsource. Used for web cache validation.", @@ -765,11 +1573,6 @@ "profileMetadata": { "$ref": "ProfileMetadata", "description": "**Only populated in `person.metadata.sources`.**\n\nMetadata about a source of type PROFILE." - }, - "updateTime": { - "format": "google-datetime", - "description": "**Only populated in `person.metadata.sources`.**\n\nLast update timestamp of this source.", - "type": "string" } }, "id": "Source" @@ -778,17 +1581,17 @@ "description": "A person's read-only relationship interest .", "type": "object", "properties": { + "formattedValue": { + "description": "The value of the relationship interest translated and formatted in the\nviewer's account locale or the locale specified in the Accept-Language\nHTTP header.", + "type": "string" + }, "metadata": { - "description": "Metadata about the relationship interest.", - "$ref": "FieldMetadata" + "$ref": "FieldMetadata", + "description": "Metadata about the relationship interest." }, "value": { "description": "The kind of relationship the person is looking for. The value can be custom\nor predefined. Possible values include, but are not limited to, the\nfollowing values:\n\n* `friend`\n* `date`\n* `relationship`\n* `networking`", "type": "string" - }, - "formattedValue": { - "description": "The value of the relationship interest translated and formatted in the\nviewer's account locale or the locale specified in the Accept-Language\nHTTP header.", - "type": "string" } }, "id": "RelationshipInterest" @@ -798,33 +1601,26 @@ "properties": { "responses": { "description": "The response for each requested resource name.", + "type": "array", "items": { "$ref": "PersonResponse" - }, - "type": "array" + } } }, "id": "GetPeopleResponse" }, - "Photo": { - "description": "A person's read-only photo. A picture shown next to the person's name to\nhelp others recognize the person.", - "type": "object", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the photo." - }, - "url": { - "description": "The URL of the photo. You can change the desired size by appending a query\nparameter `sz=`\u003cvar\u003esize\u003c/var\u003e at the end of the url. Example:\n`https://lh3.googleusercontent.com/-T_wVWLlmg7w/AAAAAAAAAAI/AAAAAAAABa8/00gzXvDBYqw/s100/photo.jpg?sz=50`", - "type": "string" - } - }, - "id": "Photo" - }, "PhoneNumber": { "description": "A person's phone number.", "type": "object", "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the phone number." + }, + "type": { + "description": "The type of the phone number. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `home`\n* `work`\n* `mobile`\n* `homeFax`\n* `workFax`\n* `otherFax`\n* `pager`\n* `workMobile`\n* `workPager`\n* `main`\n* `googleVoice`\n* `other`", + "type": "string" + }, "value": { "description": "The phone number.", "type": "string" @@ -834,20 +1630,31 @@ "type": "string" }, "canonicalForm": { - "description": "The read-only canonicalized [ITU-T E.164](https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.1.2008.pdf)\nform of the phone number.", - "type": "string" - }, - "type": { - "description": "The type of the phone number. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `home`\n* `work`\n* `mobile`\n* `homeFax`\n* `workFax`\n* `otherFax`\n* `pager`\n* `workMobile`\n* `workPager`\n* `main`\n* `googleVoice`\n* `other`", - "type": "string" - }, - "metadata": { - "description": "Metadata about the phone number.", - "$ref": "FieldMetadata" + "type": "string", + "description": "The read-only canonicalized [ITU-T E.164](https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.1.2008.pdf)\nform of the phone number." } }, "id": "PhoneNumber" }, + "Photo": { + "description": "A person's read-only photo. A picture shown next to the person's name to\nhelp others recognize the person.", + "type": "object", + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the photo." + }, + "default": { + "type": "boolean", + "description": "True if the photo is a default photo;\nfalse if the photo is a user-provided photo." + }, + "url": { + "description": "The URL of the photo. You can change the desired size by appending a query\nparameter `sz=`\u003cvar\u003esize\u003c/var\u003e at the end of the url. Example:\n`https://lh3.googleusercontent.com/-T_wVWLlmg7w/AAAAAAAAAAI/AAAAAAAABa8/00gzXvDBYqw/s100/photo.jpg?sz=50`", + "type": "string" + } + }, + "id": "Photo" + }, "ListConnectionsResponse": { "type": "object", "properties": { @@ -855,64 +1662,83 @@ "description": "The token that can be used to retrieve the next page of results.", "type": "string" }, - "totalItems": { - "format": "int32", - "description": "The total number of items in the list without pagination.", - "type": "integer" - }, - "nextSyncToken": { - "description": "The token that can be used to retrieve changes since the last request.", - "type": "string" - }, "connections": { "description": "The list of people that the requestor is connected to.", + "type": "array", "items": { "$ref": "Person" - }, - "type": "array" + } + }, + "nextSyncToken": { + "type": "string", + "description": "The token that can be used to retrieve changes since the last request." + }, + "totalItems": { + "description": "The total number of items in the list without pagination.", + "format": "int32", + "type": "integer" }, "totalPeople": { - "format": "int32", "description": "**DEPRECATED** (Please use totalItems)\nThe total number of people in the list without pagination.", + "format": "int32", "type": "integer" } }, "id": "ListConnectionsResponse" }, "Birthday": { + "id": "Birthday", "description": "A person's birthday. At least one of the `date` and `text` fields are\nspecified. The `date` and `text` fields typically represent the same\ndate, but are not guaranteed to.", "type": "object", "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the birthday." + }, "text": { "description": "A free-form string representing the user's birthday.", "type": "string" }, - "metadata": { - "description": "Metadata about the birthday.", - "$ref": "FieldMetadata" - }, "date": { - "description": "The date of the birthday.", - "$ref": "Date" + "$ref": "Date", + "description": "The date of the birthday." } - }, - "id": "Birthday" + } }, "CreateContactGroupRequest": { - "properties": { - "contactGroup": { - "description": "The contact group to create.", - "$ref": "ContactGroup" - } - }, - "id": "CreateContactGroupRequest", "description": "A request to create a new contact group.", - "type": "object" - }, - "Address": { - "description": "A person's physical address. May be a P.O. box or street address. All fields\nare optional.", "type": "object", "properties": { + "contactGroup": { + "$ref": "ContactGroup", + "description": "The contact group to create." + } + }, + "id": "CreateContactGroupRequest" + }, + "Address": { + "type": "object", + "properties": { + "type": { + "description": "The type of the address. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `home`\n* `work`\n* `other`", + "type": "string" + }, + "extendedAddress": { + "description": "The extended address of the address; for example, the apartment number.", + "type": "string" + }, + "poBox": { + "description": "The P.O. box of the address.", + "type": "string" + }, + "postalCode": { + "description": "The postal code of the address.", + "type": "string" + }, + "region": { + "type": "string", + "description": "The region of the address; for example, the state or province." + }, "streetAddress": { "description": "The street address.", "type": "string" @@ -934,79 +1760,86 @@ "type": "string" }, "formattedValue": { - "description": "The unstructured value of the address. If this is not set by the user it\nwill be automatically constructed from structured values.", - "type": "string" + "type": "string", + "description": "The unstructured value of the address. If this is not set by the user it\nwill be automatically constructed from structured values." }, "country": { "description": "The country of the address.", "type": "string" - }, - "type": { - "description": "The type of the address. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `home`\n* `work`\n* `other`", - "type": "string" - }, - "extendedAddress": { - "description": "The extended address of the address; for example, the apartment number.", - "type": "string" - }, - "poBox": { - "description": "The P.O. box of the address.", - "type": "string" - }, - "postalCode": { - "description": "The postal code of the address.", - "type": "string" - }, - "region": { - "description": "The region of the address; for example, the state or province.", - "type": "string" } }, - "id": "Address" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "id": "Status" + "id": "Address", + "description": "A person's physical address. May be a P.O. box or street address. All fields\nare optional." }, "ContactGroupMembership": { "description": "A Google contact group membership.", "type": "object", "properties": { "contactGroupId": { - "description": "The contact group ID for the contact group membership. The contact group\nID can be custom or predefined. Possible values include, but are not\nlimited to, the following:\n\n* `myContacts`\n* `starred`\n* A numerical ID for user-created groups.", - "type": "string" + "type": "string", + "description": "The contact group ID for the contact group membership. The contact group\nID can be custom or predefined. Possible values include, but are not\nlimited to, the following:\n\n* `myContacts`\n* `starred`\n* A numerical ID for user-created groups." } }, "id": "ContactGroupMembership" }, + "Status": { + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "type": "array", + "items": { + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + }, + "type": "object" + } + }, + "code": { + "type": "integer", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons." + }, "PersonMetadata": { "description": "The read-only metadata about a person.", "type": "object", "properties": { + "linkedPeopleResourceNames": { + "description": "Resource names of people linked to this resource.", + "type": "array", + "items": { + "type": "string" + } + }, + "sources": { + "description": "The sources of data for the person.", + "type": "array", + "items": { + "$ref": "Source" + } + }, + "previousResourceNames": { + "description": "Any former resource names this person has had. Populated only for\n[`connections.list`](/people/api/rest/v1/people.connections/list) requests\nthat include a sync token.\n\nThe resource name may change when adding or removing fields that link a\ncontact and profile such as a verified email, verified phone number, or\nprofile URL.", + "type": "array", + "items": { + "type": "string" + } + }, + "deleted": { + "description": "True if the person resource has been deleted. Populated only for\n[`connections.list`](/people/api/rest/v1/people.connections/list) requests\nthat include a sync token.", + "type": "boolean" + }, "objectType": { + "type": "string", "enumDescriptions": [ "Unspecified.", "Person.", @@ -1017,33 +1850,7 @@ "PERSON", "PAGE" ], - "description": "**DEPRECATED** (Please use\n`person.metadata.sources.profileMetadata.objectType` instead)\n\nThe type of the person object.", - "type": "string" - }, - "linkedPeopleResourceNames": { - "description": "Resource names of people linked to this resource.", - "items": { - "type": "string" - }, - "type": "array" - }, - "previousResourceNames": { - "description": "Any former resource names this person has had. Populated only for\n[`connections.list`](/people/api/rest/v1/people.connections/list) requests\nthat include a sync token.\n\nThe resource name may change when adding or removing fields that link a\ncontact and profile such as a verified email, verified phone number, or\nprofile URL.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sources": { - "description": "The sources of data for the person.", - "items": { - "$ref": "Source" - }, - "type": "array" - }, - "deleted": { - "description": "True if the person resource has been deleted. Populated only for\n[`connections.list`](/people/api/rest/v1/people.connections/list) requests\nthat include a sync token.", - "type": "boolean" + "description": "**DEPRECATED** (Please use\n`person.metadata.sources.profileMetadata.objectType` instead)\n\nThe type of the person object." } }, "id": "PersonMetadata" @@ -1054,52 +1861,52 @@ "properties": { "resourceNamesToAdd": { "description": "The resource names of the contact people to add in the form of in the form\n`people/`\u003cvar\u003eperson_id\u003c/var\u003e.", + "type": "array", "items": { "type": "string" - }, - "type": "array" + } }, "resourceNamesToRemove": { "description": "The resource names of the contact people to remove in the form of in the\nform of `people/`\u003cvar\u003eperson_id\u003c/var\u003e.", + "type": "array", "items": { "type": "string" - }, - "type": "array" + } } }, "id": "ModifyContactGroupMembersRequest" }, "ContactGroupResponse": { - "description": "The response for a specific contact group.", - "type": "object", "properties": { "contactGroup": { - "$ref": "ContactGroup", - "description": "The contact group." + "description": "The contact group.", + "$ref": "ContactGroup" }, "status": { - "$ref": "Status", - "description": "The status of the response." + "description": "The status of the response.", + "$ref": "Status" }, "requestedResourceName": { "description": "The original requested resource name.", "type": "string" } }, - "id": "ContactGroupResponse" + "id": "ContactGroupResponse", + "description": "The response for a specific contact group.", + "type": "object" }, "Url": { "description": "A person's associated URLs.", "type": "object", "properties": { + "metadata": { + "description": "Metadata about the URL.", + "$ref": "FieldMetadata" + }, "type": { "description": "The type of the URL. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `home`\n* `work`\n* `blog`\n* `profile`\n* `homePage`\n* `ftp`\n* `reservations`\n* `appInstallPage`: website for a Google+ application.\n* `other`", "type": "string" }, - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the URL." - }, "value": { "description": "The URL.", "type": "string" @@ -1115,22 +1922,22 @@ "description": "A person's instant messaging client.", "type": "object", "properties": { - "protocol": { - "description": "The protocol of the IM client. The protocol can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `aim`\n* `msn`\n* `yahoo`\n* `skype`\n* `qq`\n* `googleTalk`\n* `icq`\n* `jabber`\n* `netMeeting`", - "type": "string" - }, "metadata": { - "description": "Metadata about the IM client.", - "$ref": "FieldMetadata" + "$ref": "FieldMetadata", + "description": "Metadata about the IM client." }, "type": { "description": "The type of the IM client. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `home`\n* `work`\n* `other`", "type": "string" }, - "username": { - "description": "The user name used in the IM client.", + "protocol": { + "description": "The protocol of the IM client. The protocol can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `aim`\n* `msn`\n* `yahoo`\n* `skype`\n* `qq`\n* `googleTalk`\n* `icq`\n* `jabber`\n* `netMeeting`", "type": "string" }, + "username": { + "type": "string", + "description": "The user name used in the IM client." + }, "formattedProtocol": { "description": "The read-only protocol of the IM client formatted in the viewer's account\nlocale or the `Accept-Language` HTTP header locale.", "type": "string" @@ -1141,784 +1948,6 @@ } }, "id": "ImClient" - }, - "DomainMembership": { - "description": "A Google Apps Domain membership.", - "type": "object", - "properties": { - "inViewerDomain": { - "description": "True if the person is in the viewer's Google Apps domain.", - "type": "boolean" - } - }, - "id": "DomainMembership" - }, - "BatchGetContactGroupsResponse": { - "description": "The response to a batch get contact groups request.", - "type": "object", - "properties": { - "responses": { - "description": "The list of responses for each requested contact group resource.", - "items": { - "$ref": "ContactGroupResponse" - }, - "type": "array" - } - }, - "id": "BatchGetContactGroupsResponse" - }, - "Membership": { - "description": "A person's read-only membership in a group.", - "type": "object", - "properties": { - "metadata": { - "description": "Metadata about the membership.", - "$ref": "FieldMetadata" - }, - "domainMembership": { - "$ref": "DomainMembership", - "description": "The domain membership." - }, - "contactGroupMembership": { - "description": "The contact group membership.", - "$ref": "ContactGroupMembership" - } - }, - "id": "Membership" - }, - "RelationshipStatus": { - "description": "A person's read-only relationship status.", - "type": "object", - "properties": { - "value": { - "description": "The relationship status. The value can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `single`\n* `inARelationship`\n* `engaged`\n* `married`\n* `itsComplicated`\n* `openRelationship`\n* `widowed`\n* `inDomesticPartnership`\n* `inCivilUnion`", - "type": "string" - }, - "formattedValue": { - "description": "The read-only value of the relationship status translated and formatted in\nthe viewer's account locale or the `Accept-Language` HTTP header locale.", - "type": "string" - }, - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the relationship status." - } - }, - "id": "RelationshipStatus" - }, - "BraggingRights": { - "description": "A person's bragging rights.", - "type": "object", - "properties": { - "metadata": { - "description": "Metadata about the bragging rights.", - "$ref": "FieldMetadata" - }, - "value": { - "description": "The bragging rights; for example, `climbed mount everest`.", - "type": "string" - } - }, - "id": "BraggingRights" - }, - "Organization": { - "description": "A person's past or current organization. Overlapping date ranges are\npermitted.", - "type": "object", - "properties": { - "endDate": { - "$ref": "Date", - "description": "The end date when the person left the organization." - }, - "symbol": { - "description": "The symbol associated with the organization; for example, a stock ticker\nsymbol, abbreviation, or acronym.", - "type": "string" - }, - "name": { - "description": "The name of the organization.", - "type": "string" - }, - "metadata": { - "description": "Metadata about the organization.", - "$ref": "FieldMetadata" - }, - "location": { - "description": "The location of the organization office the person works at.", - "type": "string" - }, - "title": { - "description": "The person's job title at the organization.", - "type": "string" - }, - "current": { - "description": "True if the organization is the person's current organization;\nfalse if the organization is a past organization.", - "type": "boolean" - }, - "startDate": { - "$ref": "Date", - "description": "The start date when the person joined the organization." - }, - "formattedType": { - "description": "The read-only type of the organization translated and formatted in the\nviewer's account locale or the `Accept-Language` HTTP header locale.", - "type": "string" - }, - "domain": { - "description": "The domain name associated with the organization; for example, `google.com`.", - "type": "string" - }, - "department": { - "description": "The person's department at the organization.", - "type": "string" - }, - "type": { - "description": "The type of the organization. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `work`\n* `school`", - "type": "string" - }, - "phoneticName": { - "description": "The phonetic name of the organization.", - "type": "string" - }, - "jobDescription": { - "description": "The person's job description at the organization.", - "type": "string" - } - }, - "id": "Organization" - }, - "AgeRangeType": { - "description": "A person's age range.", - "type": "object", - "properties": { - "metadata": { - "description": "Metadata about the age range.", - "$ref": "FieldMetadata" - }, - "ageRange": { - "enumDescriptions": [ - "Unspecified.", - "Younger than eighteen.", - "Between eighteen and twenty.", - "Twenty-one and older." - ], - "enum": [ - "AGE_RANGE_UNSPECIFIED", - "LESS_THAN_EIGHTEEN", - "EIGHTEEN_TO_TWENTY", - "TWENTY_ONE_OR_OLDER" - ], - "description": "The age range.", - "type": "string" - } - }, - "id": "AgeRangeType" - }, - "ListContactGroupsResponse": { - "properties": { - "contactGroups": { - "description": "The list of contact groups. Members of the contact groups are not\npopulated.", - "items": { - "$ref": "ContactGroup" - }, - "type": "array" - }, - "nextPageToken": { - "description": "The token that can be used to retrieve the next page of results.", - "type": "string" - }, - "nextSyncToken": { - "description": "The token that can be used to retrieve changes since the last request.", - "type": "string" - }, - "totalItems": { - "format": "int32", - "description": "The total number of items in the list without pagination.", - "type": "integer" - } - }, - "id": "ListContactGroupsResponse", - "description": "The response to a list contact groups request.", - "type": "object" - }, - "PersonResponse": { - "description": "The response for a single person", - "type": "object", - "properties": { - "person": { - "$ref": "Person", - "description": "The person." - }, - "status": { - "$ref": "Status", - "description": "The status of the response." - }, - "httpStatusCode": { - "format": "int32", - "description": "**DEPRECATED** (Please use status instead)\n\n[HTTP 1.1 status code]\n(http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).", - "type": "integer" - }, - "requestedResourceName": { - "description": "The original requested resource name. May be different than the resource\nname on the returned person.\n\nThe resource name can change when adding or removing fields that link a\ncontact and profile such as a verified email, verified phone number, or a\nprofile URL.", - "type": "string" - } - }, - "id": "PersonResponse" - }, - "Relation": { - "description": "A person's relation to another person.", - "type": "object", - "properties": { - "type": { - "description": "The person's relation to the other person. The type can be custom or predefined.\nPossible values include, but are not limited to, the following values:\n\n* `spouse`\n* `child`\n* `mother`\n* `father`\n* `parent`\n* `brother`\n* `sister`\n* `friend`\n* `relative`\n* `domesticPartner`\n* `manager`\n* `assistant`\n* `referredBy`\n* `partner`", - "type": "string" - }, - "metadata": { - "description": "Metadata about the relation.", - "$ref": "FieldMetadata" - }, - "formattedType": { - "description": "The type of the relation translated and formatted in the viewer's account\nlocale or the locale specified in the Accept-Language HTTP header.", - "type": "string" - }, - "person": { - "description": "The name of the other person this relation refers to.", - "type": "string" - } - }, - "id": "Relation" - }, - "Occupation": { - "description": "A person's occupation.", - "type": "object", - "properties": { - "value": { - "description": "The occupation; for example, `carpenter`.", - "type": "string" - }, - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the occupation." - } - }, - "id": "Occupation" - }, - "ContactGroup": { - "description": "A contact group.", - "type": "object", - "properties": { - "resourceName": { - "description": "The resource name for the contact group, assigned by the server. An ASCII\nstring, in the form of `contactGroups/`\u003cvar\u003econtact_group_id\u003c/var\u003e.", - "type": "string" - }, - "etag": { - "description": "The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the\nresource. Used for web cache validation.", - "type": "string" - }, - "groupType": { - "enumDescriptions": [ - "Unspecified.", - "User defined contact group.", - "System defined contact group." - ], - "enum": [ - "GROUP_TYPE_UNSPECIFIED", - "USER_CONTACT_GROUP", - "SYSTEM_CONTACT_GROUP" - ], - "description": "The read-only contact group type.", - "type": "string" - }, - "formattedName": { - "description": "The read-only name translated and formatted in the viewer's account locale\nor the `Accept-Language` HTTP header locale for system groups names.\nGroup names set by the owner are the same as name.", - "type": "string" - }, - "memberResourceNames": { - "description": "The list of contact person resource names that are members of the contact\ngroup. The field is not populated for LIST requests and can only be updated\nthrough the\n[ModifyContactGroupMembers](/people/api/rest/v1/contactgroups/members/modify).", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "The contact group name set by the group owner or a system provided name\nfor system groups.", - "type": "string" - }, - "metadata": { - "description": "Metadata about the contact group.", - "$ref": "ContactGroupMetadata" - }, - "memberCount": { - "format": "int32", - "description": "The total number of contacts in the group irrespective of max members in\nspecified in the request.", - "type": "integer" - } - }, - "id": "ContactGroup" - }, - "Person": { - "description": "Information about a person merged from various data sources such as the\nauthenticated user's contacts and profile data.\n\nMost fields can have multiple items. The items in a field have no guaranteed\norder, but each non-empty field is guaranteed to have exactly one field with\n`metadata.primary` set to true.", - "type": "object", - "properties": { - "interests": { - "description": "The person's interests.", - "items": { - "$ref": "Interest" - }, - "type": "array" - }, - "resourceName": { - "description": "The resource name for the person, assigned by the server. An ASCII string\nwith a max length of 27 characters, in the form of\n`people/`\u003cvar\u003eperson_id\u003c/var\u003e.", - "type": "string" - }, - "biographies": { - "description": "The person's biographies.", - "items": { - "$ref": "Biography" - }, - "type": "array" - }, - "skills": { - "description": "The person's skills.", - "items": { - "$ref": "Skill" - }, - "type": "array" - }, - "relationshipStatuses": { - "description": "The person's read-only relationship statuses.", - "items": { - "$ref": "RelationshipStatus" - }, - "type": "array" - }, - "photos": { - "description": "The person's read-only photos.", - "items": { - "$ref": "Photo" - }, - "type": "array" - }, - "ageRange": { - "enum": [ - "AGE_RANGE_UNSPECIFIED", - "LESS_THAN_EIGHTEEN", - "EIGHTEEN_TO_TWENTY", - "TWENTY_ONE_OR_OLDER" - ], - "description": "**DEPRECATED** (Please use `person.ageRanges` instead)**\n\nThe person's read-only age range.", - "type": "string", - "enumDescriptions": [ - "Unspecified.", - "Younger than eighteen.", - "Between eighteen and twenty.", - "Twenty-one and older." - ] - }, - "taglines": { - "description": "The person's read-only taglines.", - "items": { - "$ref": "Tagline" - }, - "type": "array" - }, - "ageRanges": { - "description": "The person's read-only age ranges.", - "items": { - "$ref": "AgeRangeType" - }, - "type": "array" - }, - "addresses": { - "description": "The person's street addresses.", - "items": { - "$ref": "Address" - }, - "type": "array" - }, - "events": { - "description": "The person's events.", - "items": { - "$ref": "Event" - }, - "type": "array" - }, - "memberships": { - "description": "The person's read-only group memberships.", - "items": { - "$ref": "Membership" - }, - "type": "array" - }, - "phoneNumbers": { - "description": "The person's phone numbers.", - "items": { - "$ref": "PhoneNumber" - }, - "type": "array" - }, - "coverPhotos": { - "description": "The person's read-only cover photos.", - "items": { - "$ref": "CoverPhoto" - }, - "type": "array" - }, - "imClients": { - "description": "The person's instant messaging clients.", - "items": { - "$ref": "ImClient" - }, - "type": "array" - }, - "birthdays": { - "description": "The person's birthdays.", - "items": { - "$ref": "Birthday" - }, - "type": "array" - }, - "locales": { - "description": "The person's locale preferences.", - "items": { - "$ref": "Locale" - }, - "type": "array" - }, - "relationshipInterests": { - "description": "The person's read-only relationship interests.", - "items": { - "$ref": "RelationshipInterest" - }, - "type": "array" - }, - "urls": { - "description": "The person's associated URLs.", - "items": { - "$ref": "Url" - }, - "type": "array" - }, - "nicknames": { - "description": "The person's nicknames.", - "items": { - "$ref": "Nickname" - }, - "type": "array" - }, - "relations": { - "description": "The person's relations.", - "items": { - "$ref": "Relation" - }, - "type": "array" - }, - "names": { - "description": "The person's names.", - "items": { - "$ref": "Name" - }, - "type": "array" - }, - "occupations": { - "description": "The person's occupations.", - "items": { - "$ref": "Occupation" - }, - "type": "array" - }, - "emailAddresses": { - "description": "The person's email addresses.", - "items": { - "$ref": "EmailAddress" - }, - "type": "array" - }, - "organizations": { - "description": "The person's past or current organizations.", - "items": { - "$ref": "Organization" - }, - "type": "array" - }, - "etag": { - "description": "The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the\nresource. Used for web cache validation.", - "type": "string" - }, - "braggingRights": { - "description": "The person's bragging rights.", - "items": { - "$ref": "BraggingRights" - }, - "type": "array" - }, - "metadata": { - "$ref": "PersonMetadata", - "description": "Read-only metadata about the person." - }, - "residences": { - "description": "The person's residences.", - "items": { - "$ref": "Residence" - }, - "type": "array" - }, - "genders": { - "description": "The person's genders.", - "items": { - "$ref": "Gender" - }, - "type": "array" - } - }, - "id": "Person" - }, - "UpdateContactGroupRequest": { - "description": "A request to update an existing contact group. Only the name can be updated.", - "type": "object", - "properties": { - "contactGroup": { - "description": "The contact group to update.", - "$ref": "ContactGroup" - } - }, - "id": "UpdateContactGroupRequest" - }, - "ContactGroupMetadata": { - "description": "The read-only metadata about a contact group.", - "type": "object", - "properties": { - "deleted": { - "description": "True if the contact group resource has been deleted. Populated only for\n[`ListContactGroups`](/people/api/rest/v1/contactgroups/list) requests\nthat include a sync token.", - "type": "boolean" - }, - "updateTime": { - "format": "google-datetime", - "description": "The time the group was last updated.", - "type": "string" - } - }, - "id": "ContactGroupMetadata" - }, - "Residence": { - "description": "A person's past or current residence.", - "type": "object", - "properties": { - "current": { - "description": "True if the residence is the person's current residence;\nfalse if the residence is a past residence.", - "type": "boolean" - }, - "metadata": { - "description": "Metadata about the residence.", - "$ref": "FieldMetadata" - }, - "value": { - "description": "The address of the residence.", - "type": "string" - } - }, - "id": "Residence" - }, - "Event": { - "description": "An event related to the person.", - "type": "object", - "properties": { - "formattedType": { - "description": "The read-only type of the event translated and formatted in the\nviewer's account locale or the `Accept-Language` HTTP header locale.", - "type": "string" - }, - "type": { - "description": "The type of the event. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `anniversary`\n* `other`", - "type": "string" - }, - "metadata": { - "description": "Metadata about the event.", - "$ref": "FieldMetadata" - }, - "date": { - "$ref": "Date", - "description": "The date of the event." - } - }, - "id": "Event" - }, - "ModifyContactGroupMembersResponse": { - "description": "The response to a modify contact group members request.", - "type": "object", - "properties": { - "notFoundResourceNames": { - "description": "The contact people resource names that were not found.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "ModifyContactGroupMembersResponse" - }, - "ProfileMetadata": { - "description": "The read-only metadata about a profile.", - "type": "object", - "properties": { - "objectType": { - "description": "The profile object type.", - "type": "string", - "enumDescriptions": [ - "Unspecified.", - "Person.", - "[Google+ Page.](http://www.google.com/+/brands/)" - ], - "enum": [ - "OBJECT_TYPE_UNSPECIFIED", - "PERSON", - "PAGE" - ] - }, - "userTypes": { - "enumDescriptions": [ - "The user type is not known.", - "The user is a Google user.", - "The user is a Google+ user.", - "The user is a Google Apps for Work user." - ], - "description": "The user types.", - "items": { - "type": "string", - "enum": [ - "USER_TYPE_UNKNOWN", - "GOOGLE_USER", - "GPLUS_USER", - "GOOGLE_APPS_USER" - ] - }, - "type": "array" - } - }, - "id": "ProfileMetadata" - }, - "Gender": { - "description": "A person's gender.", - "type": "object", - "properties": { - "value": { - "description": "The gender for the person. The gender can be custom or predefined.\nPossible values include, but are not limited to, the\nfollowing:\n\n* `male`\n* `female`\n* `other`\n* `unknown`", - "type": "string" - }, - "formattedValue": { - "description": "The read-only value of the gender translated and formatted in the viewer's\naccount locale or the `Accept-Language` HTTP header locale.", - "type": "string" - }, - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the gender." - } - }, - "id": "Gender" - }, - "CoverPhoto": { - "description": "A person's read-only cover photo. A large image shown on the person's\nprofile page that represents who they are or what they care about.", - "type": "object", - "properties": { - "default": { - "description": "True if the cover photo is the default cover photo;\nfalse if the cover photo is a user-provided cover photo.", - "type": "boolean" - }, - "metadata": { - "description": "Metadata about the cover photo.", - "$ref": "FieldMetadata" - }, - "url": { - "description": "The URL of the cover photo.", - "type": "string" - } - }, - "id": "CoverPhoto" - }, - "Interest": { - "description": "One of the person's interests.", - "type": "object", - "properties": { - "value": { - "description": "The interest; for example, `stargazing`.", - "type": "string" - }, - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the interest." - } - }, - "id": "Interest" - }, - "EmailAddress": { - "properties": { - "displayName": { - "description": "The display name of the email.", - "type": "string" - }, - "type": { - "description": "The type of the email address. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `home`\n* `work`\n* `other`", - "type": "string" - }, - "metadata": { - "description": "Metadata about the email address.", - "$ref": "FieldMetadata" - }, - "value": { - "description": "The email address.", - "type": "string" - }, - "formattedType": { - "description": "The read-only type of the email address translated and formatted in the\nviewer's account locale or the `Accept-Language` HTTP header locale.", - "type": "string" - } - }, - "id": "EmailAddress", - "description": "A person's email address.", - "type": "object" - }, - "Nickname": { - "description": "A person's nickname.", - "type": "object", - "properties": { - "value": { - "description": "The nickname.", - "type": "string" - }, - "type": { - "enumDescriptions": [ - "Generic nickname.", - "Maiden name or birth family name. Used when the person's family name has\nchanged as a result of marriage.", - "Initials.", - "Google+ profile nickname.", - "A professional affiliation or other name; for example, `Dr. Smith.`" - ], - "enum": [ - "DEFAULT", - "MAIDEN_NAME", - "INITIALS", - "GPLUS", - "OTHER_NAME" - ], - "description": "The type of the nickname.", - "type": "string" - }, - "metadata": { - "description": "Metadata about the nickname.", - "$ref": "FieldMetadata" - } - }, - "id": "Nickname" - }, - "Skill": { - "description": "A skill that the person has.", - "type": "object", - "properties": { - "value": { - "description": "The skill; for example, `underwater basket weaving`.", - "type": "string" - }, - "metadata": { - "description": "Metadata about the skill.", - "$ref": "FieldMetadata" - } - }, - "id": "Skill" } }, "icons": { @@ -1930,12 +1959,12 @@ "auth": { "oauth2": { "scopes": { - "https://www.googleapis.com/auth/user.phonenumbers.read": { - "description": "View your phone numbers" - }, "https://www.googleapis.com/auth/userinfo.email": { "description": "View your email address" }, + "https://www.googleapis.com/auth/user.phonenumbers.read": { + "description": "View your phone numbers" + }, "https://www.googleapis.com/auth/user.birthday.read": { "description": "View your complete date of birth" }, @@ -1948,17 +1977,18 @@ "https://www.googleapis.com/auth/userinfo.profile": { "description": "View your basic profile info" }, - "https://www.googleapis.com/auth/user.addresses.read": { - "description": "View your street addresses" + "https://www.googleapis.com/auth/user.emails.read": { + "description": "View your email addresses" }, "https://www.googleapis.com/auth/contacts": { "description": "Manage your contacts" }, - "https://www.googleapis.com/auth/user.emails.read": { - "description": "View your email addresses" + "https://www.googleapis.com/auth/user.addresses.read": { + "description": "View your street addresses" } } } }, - "rootUrl": "https://people.googleapis.com/" + "rootUrl": "https://people.googleapis.com/", + "ownerDomain": "google.com" } diff --git a/vendor/google.golang.org/api/people/v1/people-gen.go b/vendor/google.golang.org/api/people/v1/people-gen.go index 47ff5bdf2..a8ae8ffa4 100644 --- a/vendor/google.golang.org/api/people/v1/people-gen.go +++ b/vendor/google.golang.org/api/people/v1/people-gen.go @@ -1633,6 +1633,9 @@ type Person struct { // Urls: The person's associated URLs. Urls []*Url `json:"urls,omitempty"` + // UserDefined: The person's user defined data. + UserDefined []*UserDefined `json:"userDefined,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -1839,6 +1842,10 @@ func (s *PhoneNumber) MarshalJSON() ([]byte, error) { // person's name to // help others recognize the person. type Photo struct { + // Default: True if the photo is a default photo; + // false if the photo is a user-provided photo. + Default bool `json:"default,omitempty"` + // Metadata: Metadata about the photo. Metadata *FieldMetadata `json:"metadata,omitempty"` @@ -1850,7 +1857,7 @@ type Photo struct { // AAAAAAABa8/00gzXvDBYqw/s100/photo.jpg?sz=50` Url string `json:"url,omitempty"` - // ForceSendFields is a list of field names (e.g. "Metadata") to + // ForceSendFields is a list of field names (e.g. "Default") 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 @@ -1858,7 +1865,7 @@ type Photo struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Metadata") to include in + // NullFields is a list of field names (e.g. "Default") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -2433,6 +2440,40 @@ func (s *Url) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UserDefined: Arbitrary user data that is populated by the end users. +type UserDefined struct { + // Key: The end user specified key of the user defined data. + Key string `json:"key,omitempty"` + + // Metadata: Metadata about the user defined data. + Metadata *FieldMetadata `json:"metadata,omitempty"` + + // Value: The end user specified value of the user defined data. + 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 *UserDefined) MarshalJSON() ([]byte, error) { + type noMethod UserDefined + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "people.contactGroups.batchGet": type ContactGroupsBatchGetCall struct { diff --git a/vendor/google.golang.org/api/playcustomapp/v1/playcustomapp-gen.go b/vendor/google.golang.org/api/playcustomapp/v1/playcustomapp-gen.go index e2d3ee23a..7646cd87b 100644 --- a/vendor/google.golang.org/api/playcustomapp/v1/playcustomapp-gen.go +++ b/vendor/google.golang.org/api/playcustomapp/v1/playcustomapp-gen.go @@ -134,17 +134,13 @@ func (s *CustomApp) MarshalJSON() ([]byte, error) { // method id "playcustomapp.accounts.customApps.create": type AccountsCustomAppsCreateCall struct { - s *Service - account int64 - customapp *CustomApp - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + account int64 + customapp *CustomApp + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Create: Create and publish a new custom app. @@ -164,12 +160,7 @@ func (r *AccountsCustomAppsService) Create(account int64, customapp *CustomApp) // supplied. // At most one of Media and ResumableMedia may be set. func (c *AccountsCustomAppsCreateCall) Media(r io.Reader, options ...googleapi.MediaOption) *AccountsCustomAppsCreateCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -184,11 +175,7 @@ func (c *AccountsCustomAppsCreateCall) Media(r io.Reader, options ...googleapi.M // supersede any context previously provided to the Context method. func (c *AccountsCustomAppsCreateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *AccountsCustomAppsCreateCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -197,7 +184,7 @@ func (c *AccountsCustomAppsCreateCall) ResumableMedia(ctx context.Context, r io. // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *AccountsCustomAppsCreateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *AccountsCustomAppsCreateCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -242,27 +229,16 @@ func (c *AccountsCustomAppsCreateCall) doRequest(alt string) (*http.Response, er reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "{account}/customApps") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -298,20 +274,10 @@ func (c *AccountsCustomAppsCreateCall) Do(opts ...googleapi.CallOption) (*Custom if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() diff --git a/vendor/google.golang.org/api/playmoviespartner/v1/playmoviespartner-api.json b/vendor/google.golang.org/api/playmoviespartner/v1/playmoviespartner-api.json index 0db3b0f19..07bfebf2d 100644 --- a/vendor/google.golang.org/api/playmoviespartner/v1/playmoviespartner-api.json +++ b/vendor/google.golang.org/api/playmoviespartner/v1/playmoviespartner-api.json @@ -1,19 +1,250 @@ { + "servicePath": "", + "description": "Gets the delivery status of titles for Google Play Movies Partners.", + "kind": "discovery#restDescription", + "rootUrl": "https://playmoviespartner.googleapis.com/", + "basePath": "", "ownerDomain": "google.com", "name": "playmoviespartner", "batchPath": "batch", - "revision": "20170801", + "revision": "20170906", "documentationLink": "https://developers.google.com/playmoviespartner/", "id": "playmoviespartner:v1", "title": "Google Play Movies Partner API", - "ownerName": "Google", "discoveryVersion": "v1", + "ownerName": "Google", "resources": { "accounts": { "resources": { + "orders": { + "methods": { + "list": { + "flatPath": "v1/accounts/{accountId}/orders", + "id": "playmoviespartner.accounts.orders.list", + "path": "v1/accounts/{accountId}/orders", + "description": "List Orders owned or managed by the partner.\n\nSee _Authentication and Authorization rules_ and\n_List methods rules_ for more information about this method.", + "response": { + "$ref": "ListOrdersResponse" + }, + "parameterOrder": [ + "accountId" + ], + "httpMethod": "GET", + "parameters": { + "accountId": { + "description": "REQUIRED. See _General rules_ for more information about this field.", + "type": "string", + "required": true, + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "See _List methods rules_ for info about this field.", + "type": "string" + }, + "customId": { + "description": "Filter Orders that match a case-insensitive, partner-specific custom id.", + "type": "string", + "location": "query" + }, + "videoIds": { + "description": "Filter Orders that match any of the given `video_id`s.", + "type": "string", + "repeated": true, + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "See _List methods rules_ for info about this field.", + "type": "integer" + }, + "pphNames": { + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "repeated": true, + "location": "query" + }, + "status": { + "description": "Filter Orders that match one of the given status.", + "type": "string", + "repeated": true, + "location": "query", + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_APPROVED", + "STATUS_FAILED", + "STATUS_PROCESSING", + "STATUS_UNFULFILLED", + "STATUS_NOT_AVAILABLE" + ] + }, + "studioNames": { + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "repeated": true, + "location": "query" + }, + "name": { + "location": "query", + "description": "Filter that matches Orders with a `name`, `show`, `season` or `episode`\nthat contains the given case-insensitive name.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/playmovies_partner.readonly" + ] + }, + "get": { + "flatPath": "v1/accounts/{accountId}/orders/{orderId}", + "id": "playmoviespartner.accounts.orders.get", + "path": "v1/accounts/{accountId}/orders/{orderId}", + "description": "Get an Order given its id.\n\nSee _Authentication and Authorization rules_ and\n_Get methods rules_ for more information about this method.", + "response": { + "$ref": "Order" + }, + "parameterOrder": [ + "accountId", + "orderId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/playmovies_partner.readonly" + ], + "parameters": { + "orderId": { + "location": "path", + "description": "REQUIRED. Order ID.", + "type": "string", + "required": true + }, + "accountId": { + "location": "path", + "description": "REQUIRED. See _General rules_ for more information about this field.", + "type": "string", + "required": true + } + } + } + } + }, + "avails": { + "methods": { + "list": { + "response": { + "$ref": "ListAvailsResponse" + }, + "parameterOrder": [ + "accountId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/playmovies_partner.readonly" + ], + "parameters": { + "title": { + "location": "query", + "description": "Filter that matches Avails with a `title_internal_alias`,\n`series_title_internal_alias`, `season_title_internal_alias`,\nor `episode_title_internal_alias` that contains the given\ncase-insensitive title.", + "type": "string" + }, + "videoIds": { + "description": "Filter Avails that match any of the given `video_id`s.", + "type": "string", + "repeated": true, + "location": "query" + }, + "pageToken": { + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "See _List methods rules_ for info about this field.", + "type": "integer" + }, + "altIds": { + "location": "query", + "description": "Filter Avails that match (case-insensitive) any of the given partner-specific custom ids.", + "type": "string", + "repeated": true + }, + "pphNames": { + "location": "query", + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "repeated": true + }, + "altId": { + "location": "query", + "description": "Filter Avails that match a case-insensitive, partner-specific custom id.\nNOTE: this field is deprecated and will be removed on V2; `alt_ids`\nshould be used instead.", + "type": "string" + }, + "studioNames": { + "location": "query", + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "repeated": true + }, + "accountId": { + "description": "REQUIRED. See _General rules_ for more information about this field.", + "type": "string", + "required": true, + "location": "path" + }, + "territories": { + "location": "query", + "description": "Filter Avails that match (case-insensitive) any of the given country codes,\nusing the \"ISO 3166-1 alpha-2\" format (examples: \"US\", \"us\", \"Us\").", + "type": "string", + "repeated": true + } + }, + "flatPath": "v1/accounts/{accountId}/avails", + "id": "playmoviespartner.accounts.avails.list", + "path": "v1/accounts/{accountId}/avails", + "description": "List Avails owned or managed by the partner.\n\nSee _Authentication and Authorization rules_ and\n_List methods rules_ for more information about this method." + }, + "get": { + "response": { + "$ref": "Avail" + }, + "parameterOrder": [ + "accountId", + "availId" + ], + "httpMethod": "GET", + "parameters": { + "accountId": { + "location": "path", + "description": "REQUIRED. See _General rules_ for more information about this field.", + "type": "string", + "required": true + }, + "availId": { + "location": "path", + "description": "REQUIRED. Avail ID.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/playmovies_partner.readonly" + ], + "flatPath": "v1/accounts/{accountId}/avails/{availId}", + "id": "playmoviespartner.accounts.avails.get", + "path": "v1/accounts/{accountId}/avails/{availId}", + "description": "Get an Avail given its avail group id and avail id." + } + } + }, "storeInfos": { "methods": { "list": { + "flatPath": "v1/accounts/{accountId}/storeInfos", + "id": "playmoviespartner.accounts.storeInfos.list", + "path": "v1/accounts/{accountId}/storeInfos", + "description": "List StoreInfos owned or managed by the partner.\n\nSee _Authentication and Authorization rules_ and\n_List methods rules_ for more information about this method.", "response": { "$ref": "ListStoreInfosResponse" }, @@ -25,46 +256,11 @@ "https://www.googleapis.com/auth/playmovies_partner.readonly" ], "parameters": { - "mids": { - "description": "Filter StoreInfos that match any of the given `mid`s.", - "type": "string", - "repeated": true, - "location": "query" - }, - "pphNames": { - "repeated": true, - "location": "query", - "description": "See _List methods rules_ for info about this field.", - "type": "string" - }, - "countries": { - "description": "Filter StoreInfos that match (case-insensitive) any of the given country\ncodes, using the \"ISO 3166-1 alpha-2\" format (examples: \"US\", \"us\", \"Us\").", - "type": "string", - "repeated": true, - "location": "query" - }, - "studioNames": { - "repeated": true, - "location": "query", - "description": "See _List methods rules_ for info about this field.", - "type": "string" - }, - "name": { - "description": "Filter that matches StoreInfos with a `name` or `show_name`\nthat contains the given case-insensitive name.", - "type": "string", - "location": "query" - }, - "accountId": { - "description": "REQUIRED. See _General rules_ for more information about this field.", - "type": "string", - "required": true, - "location": "path" - }, "seasonIds": { - "repeated": true, "location": "query", "description": "Filter StoreInfos that match any of the given `season_id`s.", - "type": "string" + "type": "string", + "repeated": true }, "pageToken": { "description": "See _List methods rules_ for info about this field.", @@ -87,12 +283,43 @@ "format": "int32", "description": "See _List methods rules_ for info about this field.", "type": "integer" + }, + "mids": { + "description": "Filter StoreInfos that match any of the given `mid`s.", + "type": "string", + "repeated": true, + "location": "query" + }, + "pphNames": { + "location": "query", + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "repeated": true + }, + "countries": { + "description": "Filter StoreInfos that match (case-insensitive) any of the given country\ncodes, using the \"ISO 3166-1 alpha-2\" format (examples: \"US\", \"us\", \"Us\").", + "type": "string", + "repeated": true, + "location": "query" + }, + "name": { + "description": "Filter that matches StoreInfos with a `name` or `show_name`\nthat contains the given case-insensitive name.", + "type": "string", + "location": "query" + }, + "studioNames": { + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "repeated": true, + "location": "query" + }, + "accountId": { + "location": "path", + "description": "REQUIRED. See _General rules_ for more information about this field.", + "type": "string", + "required": true } - }, - "flatPath": "v1/accounts/{accountId}/storeInfos", - "id": "playmoviespartner.accounts.storeInfos.list", - "path": "v1/accounts/{accountId}/storeInfos", - "description": "List StoreInfos owned or managed by the partner.\n\nSee _Authentication and Authorization rules_ and\n_List methods rules_ for more information about this method." + } } }, "resources": { @@ -112,6 +339,12 @@ "https://www.googleapis.com/auth/playmovies_partner.readonly" ], "parameters": { + "accountId": { + "location": "path", + "description": "REQUIRED. See _General rules_ for more information about this field.", + "type": "string", + "required": true + }, "country": { "description": "REQUIRED. Edit country.", "type": "string", @@ -123,12 +356,6 @@ "type": "string", "required": true, "location": "path" - }, - "accountId": { - "location": "path", - "description": "REQUIRED. See _General rules_ for more information about this field.", - "type": "string", - "required": true } }, "flatPath": "v1/accounts/{accountId}/storeInfos/{videoId}/country/{country}", @@ -139,237 +366,15 @@ } } } - }, - "orders": { - "methods": { - "list": { - "id": "playmoviespartner.accounts.orders.list", - "path": "v1/accounts/{accountId}/orders", - "description": "List Orders owned or managed by the partner.\n\nSee _Authentication and Authorization rules_ and\n_List methods rules_ for more information about this method.", - "response": { - "$ref": "ListOrdersResponse" - }, - "parameterOrder": [ - "accountId" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "See _List methods rules_ for info about this field.", - "type": "string" - }, - "videoIds": { - "repeated": true, - "location": "query", - "description": "Filter Orders that match any of the given `video_id`s.", - "type": "string" - }, - "customId": { - "description": "Filter Orders that match a case-insensitive, partner-specific custom id.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "See _List methods rules_ for info about this field.", - "type": "integer" - }, - "pphNames": { - "repeated": true, - "location": "query", - "description": "See _List methods rules_ for info about this field.", - "type": "string" - }, - "status": { - "repeated": true, - "location": "query", - "enum": [ - "STATUS_UNSPECIFIED", - "STATUS_APPROVED", - "STATUS_FAILED", - "STATUS_PROCESSING", - "STATUS_UNFULFILLED", - "STATUS_NOT_AVAILABLE" - ], - "description": "Filter Orders that match one of the given status.", - "type": "string" - }, - "studioNames": { - "description": "See _List methods rules_ for info about this field.", - "type": "string", - "repeated": true, - "location": "query" - }, - "name": { - "description": "Filter that matches Orders with a `name`, `show`, `season` or `episode`\nthat contains the given case-insensitive name.", - "type": "string", - "location": "query" - }, - "accountId": { - "location": "path", - "description": "REQUIRED. See _General rules_ for more information about this field.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/playmovies_partner.readonly" - ], - "flatPath": "v1/accounts/{accountId}/orders" - }, - "get": { - "description": "Get an Order given its id.\n\nSee _Authentication and Authorization rules_ and\n_Get methods rules_ for more information about this method.", - "response": { - "$ref": "Order" - }, - "parameterOrder": [ - "accountId", - "orderId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/playmovies_partner.readonly" - ], - "parameters": { - "orderId": { - "location": "path", - "description": "REQUIRED. Order ID.", - "type": "string", - "required": true - }, - "accountId": { - "description": "REQUIRED. See _General rules_ for more information about this field.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/accounts/{accountId}/orders/{orderId}", - "id": "playmoviespartner.accounts.orders.get", - "path": "v1/accounts/{accountId}/orders/{orderId}" - } - } - }, - "avails": { - "methods": { - "list": { - "id": "playmoviespartner.accounts.avails.list", - "path": "v1/accounts/{accountId}/avails", - "description": "List Avails owned or managed by the partner.\n\nSee _Authentication and Authorization rules_ and\n_List methods rules_ for more information about this method.", - "response": { - "$ref": "ListAvailsResponse" - }, - "parameterOrder": [ - "accountId" - ], - "httpMethod": "GET", - "parameters": { - "title": { - "location": "query", - "description": "Filter that matches Avails with a `title_internal_alias`,\n`series_title_internal_alias`, `season_title_internal_alias`,\nor `episode_title_internal_alias` that contains the given\ncase-insensitive title.", - "type": "string" - }, - "videoIds": { - "repeated": true, - "location": "query", - "description": "Filter Avails that match any of the given `video_id`s.", - "type": "string" - }, - "pageToken": { - "location": "query", - "description": "See _List methods rules_ for info about this field.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "See _List methods rules_ for info about this field.", - "type": "integer" - }, - "altIds": { - "repeated": true, - "location": "query", - "description": "Filter Avails that match (case-insensitive) any of the given partner-specific custom ids.", - "type": "string" - }, - "pphNames": { - "description": "See _List methods rules_ for info about this field.", - "type": "string", - "repeated": true, - "location": "query" - }, - "altId": { - "description": "Filter Avails that match a case-insensitive, partner-specific custom id.\nNOTE: this field is deprecated and will be removed on V2; `alt_ids`\nshould be used instead.", - "type": "string", - "location": "query" - }, - "studioNames": { - "description": "See _List methods rules_ for info about this field.", - "type": "string", - "repeated": true, - "location": "query" - }, - "accountId": { - "description": "REQUIRED. See _General rules_ for more information about this field.", - "type": "string", - "required": true, - "location": "path" - }, - "territories": { - "description": "Filter Avails that match (case-insensitive) any of the given country codes,\nusing the \"ISO 3166-1 alpha-2\" format (examples: \"US\", \"us\", \"Us\").", - "type": "string", - "repeated": true, - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/playmovies_partner.readonly" - ], - "flatPath": "v1/accounts/{accountId}/avails" - }, - "get": { - "response": { - "$ref": "Avail" - }, - "parameterOrder": [ - "accountId", - "availId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/playmovies_partner.readonly" - ], - "parameters": { - "availId": { - "location": "path", - "description": "REQUIRED. Avail ID.", - "type": "string", - "required": true - }, - "accountId": { - "location": "path", - "description": "REQUIRED. See _General rules_ for more information about this field.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/accounts/{accountId}/avails/{availId}", - "id": "playmoviespartner.accounts.avails.get", - "path": "v1/accounts/{accountId}/avails/{availId}", - "description": "Get an Avail given its avail group id and avail id." - } - } } } } }, "parameters": { "upload_protocol": { + "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" }, "prettyPrint": { "description": "Returns response with indentations and line breaks.", @@ -378,31 +383,31 @@ "location": "query" }, "uploadType": { - "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" + "type": "string", + "location": "query" }, "fields": { "location": "query", "description": "Selector specifying which fields to include in a partial response.", "type": "string" }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", "enum": [ "1", "2" ], "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - }, - "callback": { - "location": "query", - "description": "JSONP", "type": "string" }, "alt": { @@ -427,226 +432,36 @@ "location": "query" }, "key": { + "location": "query", "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.", + "type": "string" + }, + "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.", "type": "string", "location": "query" }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, "pp": { - "location": "query", "description": "Pretty-print response.", "default": "true", - "type": "boolean" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", + "type": "boolean", "location": "query" }, "oauth_token": { + "location": "query", "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" } }, "schemas": { - "Order": { - "properties": { - "customId": { - "description": "ID that can be used to externally identify an Order.\nThis ID is provided by partners when submitting the Avails.\nExample: 'GOOGLER_2006'", - "type": "string" - }, - "approvedTime": { - "format": "google-datetime", - "description": "Timestamp when the Order was approved.", - "type": "string" - }, - "channelName": { - "description": "YouTube Channel Name that should be used to fulfill the Order.\nExample: \"Google_channel\".", - "type": "string" - }, - "showName": { - "description": "Default Show name,\nusually in the language of the country of origin.\nOnly available for TV Edits\nExample: \"Googlers, The\".", - "type": "string" - }, - "orderId": { - "description": "ID internally generated by Google to uniquely identify an Order.\nExample: 'abcde12_x'", - "type": "string" - }, - "normalizedPriority": { - "enum": [ - "NORMALIZED_PRIORITY_UNSPECIFIED", - "LOW_PRIORITY", - "HIGH_PRIORITY" - ], - "description": "A simpler representation of the priority.", - "type": "string", - "enumDescriptions": [ - "Value could not be determined, please contact technical support if\nit should.", - "A low-priority asset, typically from a library movie.", - "A high-priority asset, typically from a new release or box office hit." - ] - }, - "type": { - "enumDescriptions": [ - "Value could not be determined, please contact technical support if\nit should.", - "A movie picture.", - "A season of a TV show.", - "An episode of a TV show.", - "A collection of movies, i.e. \"Googlers 1 and Googlers, the return\"" - ], - "enum": [ - "TITLE_TYPE_UNSPECIFIED", - "MOVIE", - "SEASON", - "EPISODE", - "BUNDLE" - ], - "description": "Type of the Edit linked to the Order.", - "type": "string" - }, - "rejectionNote": { - "description": "Field explaining why an Order has been rejected.\nExample: \"Trailer audio is 2ch mono, please re-deliver in stereo\".", - "type": "string" - }, - "channelId": { - "description": "YouTube Channel ID that should be used to fulfill the Order.\nExample: \"UCRG64darCZhb\".", - "type": "string" - }, - "legacyPriority": { - "description": "Legacy Order priority, as defined by Google.\nExample: 'P0'", - "type": "string" - }, - "pphName": { - "description": "Name of the post-production house that manages the Edit ordered.", - "type": "string" - }, - "orderedTime": { - "format": "google-datetime", - "description": "Timestamp when the Order was created.", - "type": "string" - }, - "priority": { - "format": "double", - "description": "Order priority, as defined by Google.\nThe higher the value, the higher the priority.\nExample: 90", - "type": "number" - }, - "videoId": { - "description": "Google-generated ID identifying the video linked to this Order, once\ndelivered.\nExample: 'gtry456_xc'.", - "type": "string" - }, - "episodeName": { - "description": "Default Episode name,\nusually in the language of the country of origin.\nOnly available for TV Edits\nExample: \"Googlers, The - Pilot\".", - "type": "string" - }, - "countries": { - "description": "Countries where the Order is available,\nusing the \"ISO 3166-1 alpha-2\" format (example: \"US\").", - "items": { - "type": "string" - }, - "type": "array" - }, - "earliestAvailStartTime": { - "format": "google-datetime", - "description": "Timestamp of the earliest start date of the Avails\nlinked to this Order.", - "type": "string" - }, - "status": { - "enumDescriptions": [ - "Value could not be determined, please contact technical support if\nit should.", - "Approved by Google.", - "Waiting for partner to re-deliver the asset after a rejection by Google.", - "Waiting for Google to process the asset.", - "Waiting for partner to deliver the asset.", - "Used when Status is not available (i.e: Orders for TV Seasons)." - ], - "enum": [ - "STATUS_UNSPECIFIED", - "STATUS_APPROVED", - "STATUS_FAILED", - "STATUS_PROCESSING", - "STATUS_UNFULFILLED", - "STATUS_NOT_AVAILABLE" - ], - "description": "High-level status of the order.", - "type": "string" - }, - "statusDetail": { - "enumDescriptions": [ - "Value could not be determined, please contact technical support if\nit should.", - "Approved by Google's Quality Control team.", - "Rejected by Google's Quality Control team, pending partner redelivery.", - "Internal error while processing the Order.", - "Waiting for initial delivery from partner.", - "Used on Orders that do not have Status, like TV Seasons.", - "Waiting for re-delivery from partner.", - "Asset was delivered by partner, but is being reviewed by Google's\nQuality Control team.", - "Waiting for Google to process the asset." - ], - "enum": [ - "ORDER_STATUS_UNSPECIFIED", - "ORDER_STATUS_QC_APPROVED", - "ORDER_STATUS_QC_REJECTION", - "ORDER_STATUS_INTERNAL_FIX", - "ORDER_STATUS_OPEN_ORDER", - "ORDER_STATUS_NOT_AVAILABLE", - "ORDER_STATUS_AWAITING_REDELIVERY", - "ORDER_STATUS_READY_FOR_QC", - "ORDER_STATUS_FILE_PROCESSING" - ], - "description": "Detailed status of the order", - "type": "string" - }, - "name": { - "description": "Default Edit name,\nusually in the language of the country of origin.\nExample: \"Googlers, The\".", - "type": "string" - }, - "studioName": { - "description": "Name of the studio that owns the Edit ordered.", - "type": "string" - }, - "receivedTime": { - "format": "google-datetime", - "description": "Timestamp when the Order was fulfilled.", - "type": "string" - }, - "seasonName": { - "description": "Default Season name,\nusually in the language of the country of origin.\nOnly available for TV Edits\nExample: \"Googlers, The - A Brave New World\".", - "type": "string" - } - }, - "id": "Order", - "description": "An Order tracks the fulfillment of an Edit when delivered using the\nlegacy, non-component-based delivery.\n\nEach Order is uniquely identified by an `order_id`, which is generated\nby Google.\n\nExternally, Orders can also be identified by partners using its `custom_id`\n(when provided).", - "type": "object" - }, - "ListStoreInfosResponse": { - "properties": { - "nextPageToken": { - "description": "See 'List methods rules' for info about this field.", - "type": "string" - }, - "totalSize": { - "format": "int32", - "description": "See _List methods rules_ for more information about this field.", - "type": "integer" - }, - "storeInfos": { - "description": "List of StoreInfos that match the request criteria.", - "items": { - "$ref": "StoreInfo" - }, - "type": "array" - } - }, - "id": "ListStoreInfosResponse", - "description": "Response to the 'ListStoreInfos' method.", - "type": "object" - }, "ListAvailsResponse": { + "description": "Response to the 'ListAvails' method.", + "type": "object", "properties": { "avails": { "description": "List of Avails that match the request criteria.", @@ -665,65 +480,24 @@ "type": "integer" } }, - "id": "ListAvailsResponse", - "description": "Response to the 'ListAvails' method.", - "type": "object" - }, - "ListOrdersResponse": { - "description": "Response to the 'ListOrders' method.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "See _List methods rules_ for info about this field.", - "type": "string" - }, - "totalSize": { - "format": "int32", - "description": "See _List methods rules_ for more information about this field.", - "type": "integer" - }, - "orders": { - "description": "List of Orders that match the request criteria.", - "items": { - "$ref": "Order" - }, - "type": "array" - } - }, - "id": "ListOrdersResponse" + "id": "ListAvailsResponse" }, "StoreInfo": { "description": "Information about a playable sequence (video) associated with an Edit\nand available at the Google Play Store.\n\nInternally, each StoreInfo is uniquely identified by a `video_id`\nand `country`.\n\nExternally, Title-level EIDR or Edit-level EIDR, if provided,\ncan also be used to identify a specific title or edit in a country.", "type": "object", "properties": { - "name": { - "description": "Default Edit name, usually in the language of the country of\norigin.\nExample: \"Googlers, The\".", - "type": "string" - }, - "seasonId": { - "description": "Google-generated ID identifying the season linked to the Edit.\nOnly available for TV Edits.\nExample: 'ster23ex'", - "type": "string" - }, - "titleLevelEidr": { - "description": "Title-level EIDR ID.\nExample: \"10.5240/1489-49A2-3956-4B2D-FE16-5\".", - "type": "string" - }, - "seasonName": { - "description": "Default Season name, usually in the language of the country of\norigin.\nOnly available for TV Edits\nExample: \"Googlers, The - A Brave New World\".", - "type": "string" - }, "seasonNumber": { "description": "The number assigned to the season within a show.\nOnly available on TV Edits.\nExample: \"1\".", "type": "string" }, - "editLevelEidr": { - "description": "Edit-level EIDR ID.\nExample: \"10.5240/1489-49A2-3956-4B2D-FE16-6\".", - "type": "string" - }, "hasEstOffer": { "description": "Whether the Edit has a EST offer.", "type": "boolean" }, + "editLevelEidr": { + "description": "Edit-level EIDR ID.\nExample: \"10.5240/1489-49A2-3956-4B2D-FE16-6\".", + "type": "string" + }, "hasSdOffer": { "description": "Whether the Edit has a SD offer.", "type": "boolean" @@ -787,13 +561,6 @@ "type": "string" }, "type": { - "enum": [ - "TITLE_TYPE_UNSPECIFIED", - "MOVIE", - "SEASON", - "EPISODE", - "BUNDLE" - ], "description": "Edit type, like Movie, Episode or Season.", "type": "string", "enumDescriptions": [ @@ -802,6 +569,13 @@ "A season of a TV show.", "An episode of a TV show.", "A collection of movies, i.e. \"Googlers 1 and Googlers, the return\"" + ], + "enum": [ + "TITLE_TYPE_UNSPECIFIED", + "MOVIE", + "SEASON", + "EPISODE", + "BUNDLE" ] }, "trailerId": { @@ -819,12 +593,151 @@ "hasAudio51": { "description": "Whether the Edit has a 5.1 channel audio track.", "type": "boolean" + }, + "name": { + "description": "Default Edit name, usually in the language of the country of\norigin.\nExample: \"Googlers, The\".", + "type": "string" + }, + "seasonId": { + "description": "Google-generated ID identifying the season linked to the Edit.\nOnly available for TV Edits.\nExample: 'ster23ex'", + "type": "string" + }, + "titleLevelEidr": { + "description": "Title-level EIDR ID.\nExample: \"10.5240/1489-49A2-3956-4B2D-FE16-5\".", + "type": "string" + }, + "seasonName": { + "description": "Default Season name, usually in the language of the country of\norigin.\nOnly available for TV Edits\nExample: \"Googlers, The - A Brave New World\".", + "type": "string" } }, "id": "StoreInfo" }, "Avail": { + "description": "An Avail describes the Availability Window of a specific Edit in a given\ncountry, which means the period Google is allowed to sell or rent the Edit.\n\nAvails are exposed in EMA format Version 1.6b (available at\nhttp://www.movielabs.com/md/avails/)\n\nStudios can see the Avails for the Titles they own.\nPost-production houses cannot see any Avails.", + "type": "object", "properties": { + "start": { + "description": "Start of term in YYYY-MM-DD format in the timezone of the\ncountry of the Avail.\nExample: \"2013-05-14\".", + "type": "string" + }, + "pphNames": { + "description": "Name of the post-production houses that manage the Avail.\nNot part of EMA Specs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "ratingSystem": { + "description": "Rating system applied to the version of title within territory\nof Avail.\nRating systems should be formatted as per\n[EMA ratings spec](http://www.movielabs.com/md/ratings/)\nExample: \"MPAA\"", + "type": "string" + }, + "seriesAltId": { + "description": "Other identifier referring to the series, as defined by partner.\nOnly available on TV avails.\nExample: \"rs_googlers\".", + "type": "string" + }, + "altId": { + "description": "Other identifier referring to the Edit, as defined by partner.\nExample: \"GOOGLER_2006\"", + "type": "string" + }, + "episodeNumber": { + "description": "The number assigned to the episode within a season.\nOnly available on TV Avails.\nExample: \"3\".", + "type": "string" + }, + "seriesTitleInternalAlias": { + "description": "Title used by involved parties to refer to this series.\nOnly available on TV Avails.\nExample: \"Googlers, The\".", + "type": "string" + }, + "formatProfile": { + "enumDescriptions": [ + "Value could not be determined, please contact technical support if\nit should.", + "Standard-definition format.", + "High-definition format.", + "4K UHD." + ], + "enum": [ + "FORMAT_PROFILE_UNSPECIFIED", + "SD", + "HD", + "UHD" + ], + "description": "Indicates the format profile covered by the transaction.", + "type": "string" + }, + "contentId": { + "description": "Title Identifier. This should be the Title Level EIDR.\nExample: \"10.5240/1489-49A2-3956-4B2D-FE16-5\".", + "type": "string" + }, + "titleInternalAlias": { + "description": "Title used by involved parties to refer to this content.\nExample: \"Googlers, The\".\nOnly available on Movie Avails.", + "type": "string" + }, + "ratingValue": { + "description": "Value representing the rating.\nRatings should be formatted as per http://www.movielabs.com/md/ratings/\nExample: \"PG\"", + "type": "string" + }, + "storeLanguage": { + "description": "Spoken language of the intended audience.\nLanguage shall be encoded in accordance with RFC 5646.\nExample: \"fr\".", + "type": "string" + }, + "productId": { + "description": "Edit Identifier. This should be the Edit Level EIDR.\nExample: \"10.2340/1489-49A2-3956-4B2D-FE16-6\"", + "type": "string" + }, + "displayName": { + "description": "The name of the studio that owns the Edit referred in the Avail.\nThis is the equivalent of `studio_name` in other resources, but it follows\nthe EMA nomenclature.\nExample: \"Google Films\".", + "type": "string" + }, + "captionExemption": { + "description": "Communicating an exempt category as defined by FCC regulations.\nIt is not required for non-US Avails.\nExample: \"1\"", + "type": "string" + }, + "seasonTitleInternalAlias": { + "description": "Title used by involved parties to refer to this season.\nOnly available on TV Avails.\nExample: \"Googlers, The\".", + "type": "string" + }, + "episodeAltId": { + "description": "Other identifier referring to the episode, as defined by partner.\nOnly available on TV avails.\nExample: \"rs_googlers_s1_3\".", + "type": "string" + }, + "priceValue": { + "description": "Value to be applied to the pricing type.\nExample: \"4\" or \"2.99\"", + "type": "string" + }, + "territory": { + "description": "ISO 3166-1 alpha-2 country code for the country or territory\nof this Avail.\nFor Avails, we use Territory in lieu of Country to comply with\nEMA specifications.\nBut please note that Territory and Country identify the same thing.\nExample: \"US\".", + "type": "string" + }, + "workType": { + "description": "Work type as enumerated in EMA.", + "type": "string", + "enumDescriptions": [ + "Value could not be determined, please contact technical support if\nit should.", + "A movie picture.", + "A season of a TV show.", + "An episode of a TV show.", + "A collection of movies, i.e. \"Googlers 1 and Googlers, the return\"" + ], + "enum": [ + "TITLE_TYPE_UNSPECIFIED", + "MOVIE", + "SEASON", + "EPISODE", + "BUNDLE" + ] + }, + "availId": { + "description": "ID internally generated by Google to uniquely identify an Avail.\nNot part of EMA Specs.", + "type": "string" + }, + "ratingReason": { + "description": "Value representing the rating reason.\nRating reasons should be formatted as per\n[EMA ratings spec](http://www.movielabs.com/md/ratings/)\nand comma-separated for inclusion of multiple reasons.\nExample: \"L, S, V\"", + "type": "string" + }, + "episodeTitleInternalAlias": { + "description": "OPTIONAL.TV Only. Title used by involved parties to refer to this episode.\nOnly available on TV Avails.\nExample: \"Coding at Google\".", + "type": "string" + }, "suppressionLiftDate": { "description": "First date an Edit could be publically announced as becoming\navailable at a specific future date in territory of Avail.\n*Not* the Avail start date or pre-order start date.\nFormat is YYYY-MM-DD.\nOnly available for pre-orders.\nExample: \"2012-12-10\"", "type": "string" @@ -878,115 +791,57 @@ "videoId": { "description": "Google-generated ID identifying the video linked to this Avail, once\ndelivered.\nNot part of EMA Specs.\nExample: 'gtry456_xc'", "type": "string" - }, - "start": { - "description": "Start of term in YYYY-MM-DD format in the timezone of the\ncountry of the Avail.\nExample: \"2013-05-14\".", - "type": "string" - }, - "ratingSystem": { - "description": "Rating system applied to the version of title within territory\nof Avail.\nRating systems should be formatted as per\n[EMA ratings spec](http://www.movielabs.com/md/ratings/)\nExample: \"MPAA\"", - "type": "string" - }, - "pphNames": { - "description": "Name of the post-production houses that manage the Avail.\nNot part of EMA Specs.", + } + }, + "id": "Avail" + }, + "ListOrdersResponse": { + "description": "Response to the 'ListOrders' method.", + "type": "object", + "properties": { + "orders": { + "description": "List of Orders that match the request criteria.", "items": { - "type": "string" + "$ref": "Order" }, "type": "array" }, - "seriesAltId": { - "description": "Other identifier referring to the series, as defined by partner.\nOnly available on TV avails.\nExample: \"rs_googlers\".", + "nextPageToken": { + "description": "See _List methods rules_ for info about this field.", "type": "string" }, - "altId": { - "description": "Other identifier referring to the Edit, as defined by partner.\nExample: \"GOOGLER_2006\"", - "type": "string" - }, - "episodeNumber": { - "description": "The number assigned to the episode within a season.\nOnly available on TV Avails.\nExample: \"3\".", - "type": "string" - }, - "seriesTitleInternalAlias": { - "description": "Title used by involved parties to refer to this series.\nOnly available on TV Avails.\nExample: \"Googlers, The\".", - "type": "string" - }, - "formatProfile": { + "totalSize": { + "format": "int32", + "description": "See _List methods rules_ for more information about this field.", + "type": "integer" + } + }, + "id": "ListOrdersResponse" + }, + "Order": { + "description": "An Order tracks the fulfillment of an Edit when delivered using the\nlegacy, non-component-based delivery.\n\nEach Order is uniquely identified by an `order_id`, which is generated\nby Google.\n\nExternally, Orders can also be identified by partners using its `custom_id`\n(when provided).", + "type": "object", + "properties": { + "normalizedPriority": { "enumDescriptions": [ "Value could not be determined, please contact technical support if\nit should.", - "Standard-definition format.", - "High-definition format.", - "4K UHD." + "A low-priority asset, typically from a library movie.", + "A high-priority asset, typically from a new release or box office hit." ], "enum": [ - "FORMAT_PROFILE_UNSPECIFIED", - "SD", - "HD", - "UHD" + "NORMALIZED_PRIORITY_UNSPECIFIED", + "LOW_PRIORITY", + "HIGH_PRIORITY" ], - "description": "Indicates the format profile covered by the transaction.", + "description": "A simpler representation of the priority.", "type": "string" }, - "ratingValue": { - "description": "Value representing the rating.\nRatings should be formatted as per http://www.movielabs.com/md/ratings/\nExample: \"PG\"", + "orderId": { + "description": "ID internally generated by Google to uniquely identify an Order.\nExample: 'abcde12_x'", "type": "string" }, - "titleInternalAlias": { - "description": "Title used by involved parties to refer to this content.\nExample: \"Googlers, The\".\nOnly available on Movie Avails.", - "type": "string" - }, - "contentId": { - "description": "Title Identifier. This should be the Title Level EIDR.\nExample: \"10.5240/1489-49A2-3956-4B2D-FE16-5\".", - "type": "string" - }, - "storeLanguage": { - "description": "Spoken language of the intended audience.\nLanguage shall be encoded in accordance with RFC 5646.\nExample: \"fr\".", - "type": "string" - }, - "displayName": { - "description": "The name of the studio that owns the Edit referred in the Avail.\nThis is the equivalent of `studio_name` in other resources, but it follows\nthe EMA nomenclature.\nExample: \"Google Films\".", - "type": "string" - }, - "captionExemption": { - "description": "Communicating an exempt category as defined by FCC regulations.\nIt is not required for non-US Avails.\nExample: \"1\"", - "type": "string" - }, - "productId": { - "description": "Edit Identifier. This should be the Edit Level EIDR.\nExample: \"10.2340/1489-49A2-3956-4B2D-FE16-6\"", - "type": "string" - }, - "seasonTitleInternalAlias": { - "description": "Title used by involved parties to refer to this season.\nOnly available on TV Avails.\nExample: \"Googlers, The\".", - "type": "string" - }, - "priceValue": { - "description": "Value to be applied to the pricing type.\nExample: \"4\" or \"2.99\"", - "type": "string" - }, - "episodeAltId": { - "description": "Other identifier referring to the episode, as defined by partner.\nOnly available on TV avails.\nExample: \"rs_googlers_s1_3\".", - "type": "string" - }, - "territory": { - "description": "ISO 3166-1 alpha-2 country code for the country or territory\nof this Avail.\nFor Avails, we use Territory in lieu of Country to comply with\nEMA specifications.\nBut please note that Territory and Country identify the same thing.\nExample: \"US\".", - "type": "string" - }, - "ratingReason": { - "description": "Value representing the rating reason.\nRating reasons should be formatted as per\n[EMA ratings spec](http://www.movielabs.com/md/ratings/)\nand comma-separated for inclusion of multiple reasons.\nExample: \"L, S, V\"", - "type": "string" - }, - "availId": { - "description": "ID internally generated by Google to uniquely identify an Avail.\nNot part of EMA Specs.", - "type": "string" - }, - "workType": { - "enum": [ - "TITLE_TYPE_UNSPECIFIED", - "MOVIE", - "SEASON", - "EPISODE", - "BUNDLE" - ], - "description": "Work type as enumerated in EMA.", + "type": { + "description": "Type of the Edit linked to the Order.", "type": "string", "enumDescriptions": [ "Value could not be determined, please contact technical support if\nit should.", @@ -994,23 +849,173 @@ "A season of a TV show.", "An episode of a TV show.", "A collection of movies, i.e. \"Googlers 1 and Googlers, the return\"" + ], + "enum": [ + "TITLE_TYPE_UNSPECIFIED", + "MOVIE", + "SEASON", + "EPISODE", + "BUNDLE" ] }, - "episodeTitleInternalAlias": { - "description": "OPTIONAL.TV Only. Title used by involved parties to refer to this episode.\nOnly available on TV Avails.\nExample: \"Coding at Google\".", + "rejectionNote": { + "description": "Field explaining why an Order has been rejected.\nExample: \"Trailer audio is 2ch mono, please re-deliver in stereo\".", + "type": "string" + }, + "channelId": { + "description": "YouTube Channel ID that should be used to fulfill the Order.\nExample: \"UCRG64darCZhb\".", + "type": "string" + }, + "pphName": { + "description": "Name of the post-production house that manages the Edit ordered.", + "type": "string" + }, + "legacyPriority": { + "description": "Legacy Order priority, as defined by Google.\nExample: 'P0'", + "type": "string" + }, + "priority": { + "format": "double", + "description": "Order priority, as defined by Google.\nThe higher the value, the higher the priority.\nExample: 90", + "type": "number" + }, + "orderedTime": { + "format": "google-datetime", + "description": "Timestamp when the Order was created.", + "type": "string" + }, + "videoId": { + "description": "Google-generated ID identifying the video linked to this Order, once\ndelivered.\nExample: 'gtry456_xc'.", + "type": "string" + }, + "episodeName": { + "description": "Default Episode name,\nusually in the language of the country of origin.\nOnly available for TV Edits\nExample: \"Googlers, The - Pilot\".", + "type": "string" + }, + "countries": { + "description": "Countries where the Order is available,\nusing the \"ISO 3166-1 alpha-2\" format (example: \"US\").", + "items": { + "type": "string" + }, + "type": "array" + }, + "statusDetail": { + "enumDescriptions": [ + "Value could not be determined, please contact technical support if\nit should.", + "Approved by Google's Quality Control team.", + "Rejected by Google's Quality Control team, pending partner redelivery.", + "Internal error while processing the Order.", + "Waiting for initial delivery from partner.", + "Used on Orders that do not have Status, like TV Seasons.", + "Waiting for re-delivery from partner.", + "Asset was delivered by partner, but is being reviewed by Google's\nQuality Control team.", + "Waiting for Google to process the asset." + ], + "enum": [ + "ORDER_STATUS_UNSPECIFIED", + "ORDER_STATUS_QC_APPROVED", + "ORDER_STATUS_QC_REJECTION", + "ORDER_STATUS_INTERNAL_FIX", + "ORDER_STATUS_OPEN_ORDER", + "ORDER_STATUS_NOT_AVAILABLE", + "ORDER_STATUS_AWAITING_REDELIVERY", + "ORDER_STATUS_READY_FOR_QC", + "ORDER_STATUS_FILE_PROCESSING" + ], + "description": "Detailed status of the order", + "type": "string" + }, + "status": { + "enumDescriptions": [ + "Value could not be determined, please contact technical support if\nit should.", + "Approved by Google.", + "Waiting for partner to re-deliver the asset after a rejection by Google.", + "Waiting for Google to process the asset.", + "Waiting for partner to deliver the asset.", + "Used when Status is not available (i.e: Orders for TV Seasons)." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_APPROVED", + "STATUS_FAILED", + "STATUS_PROCESSING", + "STATUS_UNFULFILLED", + "STATUS_NOT_AVAILABLE" + ], + "description": "High-level status of the order.", + "type": "string" + }, + "earliestAvailStartTime": { + "format": "google-datetime", + "description": "Timestamp of the earliest start date of the Avails\nlinked to this Order.", + "type": "string" + }, + "name": { + "description": "Default Edit name,\nusually in the language of the country of origin.\nExample: \"Googlers, The\".", + "type": "string" + }, + "studioName": { + "description": "Name of the studio that owns the Edit ordered.", + "type": "string" + }, + "receivedTime": { + "format": "google-datetime", + "description": "Timestamp when the Order was fulfilled.", + "type": "string" + }, + "seasonName": { + "description": "Default Season name,\nusually in the language of the country of origin.\nOnly available for TV Edits\nExample: \"Googlers, The - A Brave New World\".", + "type": "string" + }, + "customId": { + "description": "ID that can be used to externally identify an Order.\nThis ID is provided by partners when submitting the Avails.\nExample: 'GOOGLER_2006'", + "type": "string" + }, + "channelName": { + "description": "YouTube Channel Name that should be used to fulfill the Order.\nExample: \"Google_channel\".", + "type": "string" + }, + "approvedTime": { + "format": "google-datetime", + "description": "Timestamp when the Order was approved.", + "type": "string" + }, + "showName": { + "description": "Default Show name,\nusually in the language of the country of origin.\nOnly available for TV Edits\nExample: \"Googlers, The\".", "type": "string" } }, - "id": "Avail", - "description": "An Avail describes the Availability Window of a specific Edit in a given\ncountry, which means the period Google is allowed to sell or rent the Edit.\n\nAvails are exposed in EMA format Version 1.6b (available at\nhttp://www.movielabs.com/md/avails/)\n\nStudios can see the Avails for the Titles they own.\nPost-production houses cannot see any Avails.", - "type": "object" + "id": "Order" + }, + "ListStoreInfosResponse": { + "description": "Response to the 'ListStoreInfos' method.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "See 'List methods rules' for info about this field.", + "type": "string" + }, + "totalSize": { + "format": "int32", + "description": "See _List methods rules_ for more information about this field.", + "type": "integer" + }, + "storeInfos": { + "description": "List of StoreInfos that match the request criteria.", + "items": { + "$ref": "StoreInfo" + }, + "type": "array" + } + }, + "id": "ListStoreInfosResponse" } }, - "protocol": "rest", "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, + "protocol": "rest", "version": "v1", "baseUrl": "https://playmoviespartner.googleapis.com/", "canonicalName": "Play Movies", @@ -1022,10 +1027,5 @@ } } } - }, - "servicePath": "", - "description": "Gets the delivery status of titles for Google Play Movies Partners.", - "kind": "discovery#restDescription", - "rootUrl": "https://playmoviespartner.googleapis.com/", - "basePath": "" + } } diff --git a/vendor/google.golang.org/api/plus/v1/plus-api.json b/vendor/google.golang.org/api/plus/v1/plus-api.json index 397a0fa72..13f4eb82c 100644 --- a/vendor/google.golang.org/api/plus/v1/plus-api.json +++ b/vendor/google.golang.org/api/plus/v1/plus-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/BcJfQYzk5aMJfb5o2fF830xH640\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/e5EzALeRN0V4G9pDZ9NMnYZoVEo\"", "discoveryVersion": "v1", "id": "plus:v1", "name": "plus", "version": "v1", - "revision": "20170606", + "revision": "20170828", "title": "Google+ API", "description": "Builds on top of the Google+ platform.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/plusdomains/v1/plusdomains-api.json b/vendor/google.golang.org/api/plusdomains/v1/plusdomains-api.json index 6f54d405b..2ff097a31 100644 --- a/vendor/google.golang.org/api/plusdomains/v1/plusdomains-api.json +++ b/vendor/google.golang.org/api/plusdomains/v1/plusdomains-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/bQpmmybsFBVMFpZ1o8MoBD7ast8\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/mgTNhRz8BUIUTZvlG4NGzgfWt2o\"", "discoveryVersion": "v1", "id": "plusDomains:v1", "name": "plusDomains", "version": "v1", - "revision": "20170606", + "revision": "20170828", "title": "Google+ Domains API", "description": "Builds on top of the Google+ platform for Google Apps Domains.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/plusdomains/v1/plusdomains-gen.go b/vendor/google.golang.org/api/plusdomains/v1/plusdomains-gen.go index 74cc39ae0..c660b8943 100644 --- a/vendor/google.golang.org/api/plusdomains/v1/plusdomains-gen.go +++ b/vendor/google.golang.org/api/plusdomains/v1/plusdomains-gen.go @@ -5047,18 +5047,14 @@ func (c *CommentsListCall) Pages(ctx context.Context, f func(*CommentFeed) error // method id "plusDomains.media.insert": type MediaInsertCall struct { - s *Service - userId string - collection string - media *Media - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + userId string + collection string + media *Media + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Insert: Add a new media item to an album. The current upload size @@ -5082,12 +5078,7 @@ func (r *MediaService) Insert(userId string, collection string, media *Media) *M // supplied. // At most one of Media and ResumableMedia may be set. func (c *MediaInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaInsertCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -5102,11 +5093,7 @@ func (c *MediaInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) * // supersede any context previously provided to the Context method. func (c *MediaInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaInsertCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -5115,7 +5102,7 @@ func (c *MediaInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, siz // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *MediaInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaInsertCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -5160,27 +5147,16 @@ func (c *MediaInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/media/{collection}") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -5217,20 +5193,10 @@ func (c *MediaInsertCall) Do(opts ...googleapi.CallOption) (*Media, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() diff --git a/vendor/google.golang.org/api/proximitybeacon/v1beta1/proximitybeacon-api.json b/vendor/google.golang.org/api/proximitybeacon/v1beta1/proximitybeacon-api.json index 4ea196883..652ac0ea8 100644 --- a/vendor/google.golang.org/api/proximitybeacon/v1beta1/proximitybeacon-api.json +++ b/vendor/google.golang.org/api/proximitybeacon/v1beta1/proximitybeacon-api.json @@ -1,30 +1,253 @@ { + "ownerDomain": "google.com", + "name": "proximitybeacon", + "batchPath": "batch", + "revision": "20170823", + "documentationLink": "https://developers.google.com/beacons/proximity/", + "id": "proximitybeacon:v1beta1", + "title": "Google Proximity Beacon API", "discoveryVersion": "v1", "ownerName": "Google", - "version_module": "True", + "version_module": true, "resources": { "v1beta1": { "methods": { "getEidparams": { - "httpMethod": "GET", + "description": "Gets the Proximity Beacon API's current public key and associated\nparameters used to initiate the Diffie-Hellman key exchange required to\nregister a beacon that broadcasts the Eddystone-EID format. This key\nchanges periodically; clients may cache it and re-use the same public key\nto provision and register multiple beacons. However, clients should be\nprepared to refresh this key when they encounter an error registering an\nEddystone-EID beacon.", "response": { "$ref": "EphemeralIdRegistrationParams" }, "parameterOrder": [], + "httpMethod": "GET", + "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/userlocation.beacon.registry" ], - "parameters": {}, "flatPath": "v1beta1/eidparams", - "path": "v1beta1/eidparams", "id": "proximitybeacon.getEidparams", - "description": "Gets the Proximity Beacon API's current public key and associated\nparameters used to initiate the Diffie-Hellman key exchange required to\nregister a beacon that broadcasts the Eddystone-EID format. This key\nchanges periodically; clients may cache it and re-use the same public key\nto provision and register multiple beacons. However, clients should be\nprepared to refresh this key when they encounter an error registering an\nEddystone-EID beacon." + "path": "v1beta1/eidparams" } } }, "beacons": { "methods": { + "deactivate": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "beaconName" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "parameters": { + "beaconName": { + "pattern": "^beacons/[^/]+$", + "location": "path", + "description": "Beacon that should be deactivated. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", + "type": "string", + "required": true + }, + "projectId": { + "location": "query", + "description": "The project id of the beacon to deactivate. If the project id is not\nspecified then the project making the request is used. The project id must\nmatch the project that owns the beacon.\nOptional.", + "type": "string" + } + }, + "flatPath": "v1beta1/beacons/{beaconsId}:deactivate", + "id": "proximitybeacon.beacons.deactivate", + "path": "v1beta1/{+beaconName}:deactivate", + "description": "Deactivates a beacon. Once deactivated, the API will not return\ninformation nor attachment data for the beacon when queried via\n`beaconinfo.getforobserved`. Calling this method on an already inactive\nbeacon will do nothing (but will return a successful response code).\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project." + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "beaconName" + ], + "httpMethod": "DELETE", + "parameters": { + "beaconName": { + "pattern": "^beacons/[^/]+$", + "location": "path", + "description": "Beacon that should be deleted. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", + "type": "string", + "required": true + }, + "projectId": { + "location": "query", + "description": "The project id of the beacon to delete. If not provided, the project\nthat is making the request is used.\nOptional.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "flatPath": "v1beta1/beacons/{beaconsId}", + "id": "proximitybeacon.beacons.delete", + "path": "v1beta1/{+beaconName}", + "description": "Deletes the specified beacon including all diagnostics data for the beacon\nas well as any attachments on the beacon (including those belonging to\nother projects). This operation cannot be undone.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project." + }, + "register": { + "id": "proximitybeacon.beacons.register", + "path": "v1beta1/beacons:register", + "request": { + "$ref": "Beacon" + }, + "description": "Registers a previously unregistered beacon given its `advertisedId`.\nThese IDs are unique within the system. An ID can be registered only once.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", + "response": { + "$ref": "Beacon" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "parameters": { + "projectId": { + "description": "The project id of the project the beacon will be registered to. If\nthe project id is not specified then the project making the request\nis used.\nOptional.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1beta1/beacons:register" + }, + "list": { + "response": { + "$ref": "ListBeaconsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "A pagination token obtained from a previous request to list beacons.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "The maximum number of records to return for this request, up to a\nserver-defined upper limit.", + "type": "integer", + "location": "query" + }, + "q": { + "description": "Filter query string that supports the following field filters:\n\n* **description:`\"\u003cstring\u003e\"`**\n For example: **description:\"Room 3\"**\n Returns beacons whose description matches tokens in the string \"Room 3\"\n (not necessarily that exact string).\n The string must be double-quoted.\n* **status:`\u003cenum\u003e`**\n For example: **status:active**\n Returns beacons whose status matches the given value. Values must be\n one of the Beacon.Status enum values (case insensitive). Accepts\n multiple filters which will be combined with OR logic.\n* **stability:`\u003cenum\u003e`**\n For example: **stability:mobile**\n Returns beacons whose expected stability matches the given value.\n Values must be one of the Beacon.Stability enum values (case\n insensitive). Accepts multiple filters which will be combined with\n OR logic.\n* **place\\_id:`\"\u003cstring\u003e\"`**\n For example: **place\\_id:\"ChIJVSZzVR8FdkgRXGmmm6SslKw=\"**\n Returns beacons explicitly registered at the given place, expressed as\n a Place ID obtained from [Google Places API](/places/place-id). Does not\n match places inside the given place. Does not consider the beacon's\n actual location (which may be different from its registered place).\n Accepts multiple filters that will be combined with OR logic. The place\n ID must be double-quoted.\n* **registration\\_time`[\u003c|\u003e|\u003c=|\u003e=]\u003cinteger\u003e`**\n For example: **registration\\_time\u003e=1433116800**\n Returns beacons whose registration time matches the given filter.\n Supports the operators: \u003c, \u003e, \u003c=, and \u003e=. Timestamp must be expressed as\n an integer number of seconds since midnight January 1, 1970 UTC. Accepts\n at most two filters that will be combined with AND logic, to support\n \"between\" semantics. If more than two are supplied, the latter ones are\n ignored.\n* **lat:`\u003cdouble\u003e lng:\u003cdouble\u003e radius:\u003cinteger\u003e`**\n For example: **lat:51.1232343 lng:-1.093852 radius:1000**\n Returns beacons whose registered location is within the given circle.\n When any of these fields are given, all are required. Latitude and\n longitude must be decimal degrees between -90.0 and 90.0 and between\n -180.0 and 180.0 respectively. Radius must be an integer number of\n meters between 10 and 1,000,000 (1000 km).\n* **property:`\"\u003cstring\u003e=\u003cstring\u003e\"`**\n For example: **property:\"battery-type=CR2032\"**\n Returns beacons which have a property of the given name and value.\n Supports multiple filters which will be combined with OR logic.\n The entire name=value string must be double-quoted as one string.\n* **attachment\\_type:`\"\u003cstring\u003e\"`**\n For example: **attachment_type:\"my-namespace/my-type\"**\n Returns beacons having at least one attachment of the given namespaced\n type. Supports \"any within this namespace\" via the partial wildcard\n syntax: \"my-namespace/*\". Supports multiple filters which will be\n combined with OR logic. The string must be double-quoted.\n* **indoor\\_level:`\"\u003cstring\u003e\"`**\n For example: **indoor\\_level:\"1\"**\n Returns beacons which are located on the given indoor level. Accepts\n multiple filters that will be combined with OR logic.\n\nMultiple filters on the same field are combined with OR logic (except\nregistration_time which is combined with AND logic).\nMultiple filters on different fields are combined with AND logic.\nFilters should be separated by spaces.\n\nAs with any HTTP query string parameter, the whole filter expression must\nbe URL-encoded.\n\nExample REST request:\n`GET /v1beta1/beacons?q=status:active%20lat:51.123%20lng:-1.095%20radius:1000`", + "type": "string", + "location": "query" + }, + "projectId": { + "location": "query", + "description": "The project id to list beacons under. If not present then the project\ncredential that made the request is used as the project.\nOptional.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "flatPath": "v1beta1/beacons", + "id": "proximitybeacon.beacons.list", + "path": "v1beta1/beacons", + "description": "Searches the beacon registry for beacons that match the given search\ncriteria. Only those beacons that the client has permission to list\nwill be returned.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **viewer**, **Is owner** or **Can edit**\npermissions in the Google Developers Console project." + }, + "activate": { + "description": "Activates a beacon. A beacon that is active will return information\nand attachment data when queried via `beaconinfo.getforobserved`.\nCalling this method on an already active beacon will do nothing (but\nwill return a successful response code).\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", + "httpMethod": "POST", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "beaconName" + ], + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "parameters": { + "beaconName": { + "description": "Beacon that should be activated. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", + "type": "string", + "required": true, + "pattern": "^beacons/[^/]+$", + "location": "path" + }, + "projectId": { + "description": "The project id of the beacon to activate. If the project id is not\nspecified then the project making the request is used. The project id\nmust match the project that owns the beacon.\nOptional.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1beta1/beacons/{beaconsId}:activate", + "path": "v1beta1/{+beaconName}:activate", + "id": "proximitybeacon.beacons.activate" + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "Beacon" + }, + "parameterOrder": [ + "beaconName" + ], + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "parameters": { + "beaconName": { + "description": "Resource name of this beacon. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", + "type": "string", + "required": true, + "pattern": "^beacons/[^/]+$", + "location": "path" + }, + "projectId": { + "location": "query", + "description": "The project id of the beacon to request. If the project id is not specified\nthen the project making the request is used. The project id must match the\nproject that owns the beacon.\nOptional.", + "type": "string" + } + }, + "flatPath": "v1beta1/beacons/{beaconsId}", + "path": "v1beta1/{+beaconName}", + "id": "proximitybeacon.beacons.get", + "description": "Returns detailed information about the specified beacon.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **viewer**, **Is owner** or **Can edit**\npermissions in the Google Developers Console project.\n\nRequests may supply an Eddystone-EID beacon name in the form:\n`beacons/4!beaconId` where the `beaconId` is the base16 ephemeral ID\nbroadcast by the beacon. The returned `Beacon` object will contain the\nbeacon's stable Eddystone-UID. Clients not authorized to resolve the\nbeacon's ephemeral Eddystone-EID broadcast will receive an error." + }, + "update": { + "description": "Updates the information about the specified beacon. **Any field that you do\nnot populate in the submitted beacon will be permanently erased**, so you\nshould follow the \"read, modify, write\" pattern to avoid inadvertently\ndestroying data.\n\nChanges to the beacon status via this method will be silently ignored.\nTo update beacon status, use the separate methods on this API for\nactivation, deactivation, and decommissioning.\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", + "request": { + "$ref": "Beacon" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "beaconName" + ], + "response": { + "$ref": "Beacon" + }, + "parameters": { + "beaconName": { + "pattern": "^beacons/[^/]+$", + "location": "path", + "description": "Resource name of this beacon. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon.\n\nThis field must be left empty when registering. After reading a beacon,\nclients can use the name for future operations.", + "type": "string", + "required": true + }, + "projectId": { + "description": "The project id of the beacon to update. If the project id is not\nspecified then the project making the request is used. The project id\nmust match the project that owns the beacon.\nOptional.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "flatPath": "v1beta1/beacons/{beaconsId}", + "path": "v1beta1/{+beaconName}", + "id": "proximitybeacon.beacons.update" + }, "decommission": { + "id": "proximitybeacon.beacons.decommission", + "path": "v1beta1/{+beaconName}:decommission", "description": "Decommissions the specified beacon in the service. This beacon will no\nlonger be returned from `beaconinfo.getforobserved`. This operation is\npermanent -- you will not be able to re-register a beacon with this ID\nagain.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", "response": { "$ref": "Empty" @@ -33,256 +256,40 @@ "beaconName" ], "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ], "parameters": { "beaconName": { + "description": "Beacon that should be decommissioned. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID of the beacon's \"stable\" UID.\nRequired.", "type": "string", "required": true, "pattern": "^beacons/[^/]+$", - "location": "path", - "description": "Beacon that should be decommissioned. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID of the beacon's \"stable\" UID.\nRequired." - }, - "projectId": { - "type": "string", - "location": "query", - "description": "The project id of the beacon to decommission. If the project id is not\nspecified then the project making the request is used. The project id\nmust match the project that owns the beacon.\nOptional." - } - }, - "flatPath": "v1beta1/beacons/{beaconsId}:decommission", - "id": "proximitybeacon.beacons.decommission", - "path": "v1beta1/{+beaconName}:decommission" - }, - "deactivate": { - "description": "Deactivates a beacon. Once deactivated, the API will not return\ninformation nor attachment data for the beacon when queried via\n`beaconinfo.getforobserved`. Calling this method on an already inactive\nbeacon will do nothing (but will return a successful response code).\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", - "httpMethod": "POST", - "parameterOrder": [ - "beaconName" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "projectId": { - "type": "string", - "location": "query", - "description": "The project id of the beacon to deactivate. If the project id is not\nspecified then the project making the request is used. The project id must\nmatch the project that owns the beacon.\nOptional." - }, - "beaconName": { - "location": "path", - "description": "Beacon that should be deactivated. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", - "type": "string", - "required": true, - "pattern": "^beacons/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ], - "flatPath": "v1beta1/beacons/{beaconsId}:deactivate", - "path": "v1beta1/{+beaconName}:deactivate", - "id": "proximitybeacon.beacons.deactivate" - }, - "delete": { - "flatPath": "v1beta1/beacons/{beaconsId}", - "path": "v1beta1/{+beaconName}", - "id": "proximitybeacon.beacons.delete", - "description": "Deletes the specified beacon including all diagnostics data for the beacon\nas well as any attachments on the beacon (including those belonging to\nother projects). This operation cannot be undone.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "beaconName" - ], - "parameters": { - "projectId": { - "description": "The project id of the beacon to delete. If not provided, the project\nthat is making the request is used.\nOptional.", - "type": "string", - "location": "query" - }, - "beaconName": { - "type": "string", - "required": true, - "pattern": "^beacons/[^/]+$", - "location": "path", - "description": "Beacon that should be deleted. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] - }, - "list": { - "flatPath": "v1beta1/beacons", - "id": "proximitybeacon.beacons.list", - "path": "v1beta1/beacons", - "description": "Searches the beacon registry for beacons that match the given search\ncriteria. Only those beacons that the client has permission to list\nwill be returned.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **viewer**, **Is owner** or **Can edit**\npermissions in the Google Developers Console project.", - "response": { - "$ref": "ListBeaconsResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "The maximum number of records to return for this request, up to a\nserver-defined upper limit.", - "type": "integer" - }, - "q": { - "type": "string", - "location": "query", - "description": "Filter query string that supports the following field filters:\n\n* **description:`\"\u003cstring\u003e\"`**\n For example: **description:\"Room 3\"**\n Returns beacons whose description matches tokens in the string \"Room 3\"\n (not necessarily that exact string).\n The string must be double-quoted.\n* **status:`\u003cenum\u003e`**\n For example: **status:active**\n Returns beacons whose status matches the given value. Values must be\n one of the Beacon.Status enum values (case insensitive). Accepts\n multiple filters which will be combined with OR logic.\n* **stability:`\u003cenum\u003e`**\n For example: **stability:mobile**\n Returns beacons whose expected stability matches the given value.\n Values must be one of the Beacon.Stability enum values (case\n insensitive). Accepts multiple filters which will be combined with\n OR logic.\n* **place\\_id:`\"\u003cstring\u003e\"`**\n For example: **place\\_id:\"ChIJVSZzVR8FdkgRXGmmm6SslKw=\"**\n Returns beacons explicitly registered at the given place, expressed as\n a Place ID obtained from [Google Places API](/places/place-id). Does not\n match places inside the given place. Does not consider the beacon's\n actual location (which may be different from its registered place).\n Accepts multiple filters that will be combined with OR logic. The place\n ID must be double-quoted.\n* **registration\\_time`[\u003c|\u003e|\u003c=|\u003e=]\u003cinteger\u003e`**\n For example: **registration\\_time\u003e=1433116800**\n Returns beacons whose registration time matches the given filter.\n Supports the operators: \u003c, \u003e, \u003c=, and \u003e=. Timestamp must be expressed as\n an integer number of seconds since midnight January 1, 1970 UTC. Accepts\n at most two filters that will be combined with AND logic, to support\n \"between\" semantics. If more than two are supplied, the latter ones are\n ignored.\n* **lat:`\u003cdouble\u003e lng:\u003cdouble\u003e radius:\u003cinteger\u003e`**\n For example: **lat:51.1232343 lng:-1.093852 radius:1000**\n Returns beacons whose registered location is within the given circle.\n When any of these fields are given, all are required. Latitude and\n longitude must be decimal degrees between -90.0 and 90.0 and between\n -180.0 and 180.0 respectively. Radius must be an integer number of\n meters between 10 and 1,000,000 (1000 km).\n* **property:`\"\u003cstring\u003e=\u003cstring\u003e\"`**\n For example: **property:\"battery-type=CR2032\"**\n Returns beacons which have a property of the given name and value.\n Supports multiple filters which will be combined with OR logic.\n The entire name=value string must be double-quoted as one string.\n* **attachment\\_type:`\"\u003cstring\u003e\"`**\n For example: **attachment_type:\"my-namespace/my-type\"**\n Returns beacons having at least one attachment of the given namespaced\n type. Supports \"any within this namespace\" via the partial wildcard\n syntax: \"my-namespace/*\". Supports multiple filters which will be\n combined with OR logic. The string must be double-quoted.\n* **indoor\\_level:`\"\u003cstring\u003e\"`**\n For example: **indoor\\_level:\"1\"**\n Returns beacons which are located on the given indoor level. Accepts\n multiple filters that will be combined with OR logic.\n\nMultiple filters on the same field are combined with OR logic (except\nregistration_time which is combined with AND logic).\nMultiple filters on different fields are combined with AND logic.\nFilters should be separated by spaces.\n\nAs with any HTTP query string parameter, the whole filter expression must\nbe URL-encoded.\n\nExample REST request:\n`GET /v1beta1/beacons?q=status:active%20lat:51.123%20lng:-1.095%20radius:1000`" - }, - "projectId": { - "description": "The project id to list beacons under. If not present then the project\ncredential that made the request is used as the project.\nOptional.", - "type": "string", - "location": "query" - }, - "pageToken": { - "location": "query", - "description": "A pagination token obtained from a previous request to list beacons.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] - }, - "register": { - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "Beacon" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ], - "parameters": { - "projectId": { - "location": "query", - "description": "The project id of the project the beacon will be registered to. If\nthe project id is not specified then the project making the request\nis used.\nOptional.", - "type": "string" - } - }, - "flatPath": "v1beta1/beacons:register", - "path": "v1beta1/beacons:register", - "id": "proximitybeacon.beacons.register", - "request": { - "$ref": "Beacon" - }, - "description": "Registers a previously unregistered beacon given its `advertisedId`.\nThese IDs are unique within the system. An ID can be registered only once.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project." - }, - "activate": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "beaconName" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ], - "parameters": { - "projectId": { - "description": "The project id of the beacon to activate. If the project id is not\nspecified then the project making the request is used. The project id\nmust match the project that owns the beacon.\nOptional.", - "type": "string", - "location": "query" - }, - "beaconName": { - "pattern": "^beacons/[^/]+$", - "location": "path", - "description": "Beacon that should be activated. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta1/beacons/{beaconsId}:activate", - "id": "proximitybeacon.beacons.activate", - "path": "v1beta1/{+beaconName}:activate", - "description": "Activates a beacon. A beacon that is active will return information\nand attachment data when queried via `beaconinfo.getforobserved`.\nCalling this method on an already active beacon will do nothing (but\nwill return a successful response code).\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project." - }, - "get": { - "description": "Returns detailed information about the specified beacon.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **viewer**, **Is owner** or **Can edit**\npermissions in the Google Developers Console project.\n\nRequests may supply an Eddystone-EID beacon name in the form:\n`beacons/4!beaconId` where the `beaconId` is the base16 ephemeral ID\nbroadcast by the beacon. The returned `Beacon` object will contain the\nbeacon's stable Eddystone-UID. Clients not authorized to resolve the\nbeacon's ephemeral Eddystone-EID broadcast will receive an error.", - "httpMethod": "GET", - "parameterOrder": [ - "beaconName" - ], - "response": { - "$ref": "Beacon" - }, - "parameters": { - "beaconName": { - "location": "path", - "description": "Resource name of this beacon. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", - "type": "string", - "required": true, - "pattern": "^beacons/[^/]+$" + "location": "path" }, "projectId": { "location": "query", - "description": "The project id of the beacon to request. If the project id is not specified\nthen the project making the request is used. The project id must match the\nproject that owns the beacon.\nOptional.", + "description": "The project id of the beacon to decommission. If the project id is not\nspecified then the project making the request is used. The project id\nmust match the project that owns the beacon.\nOptional.", "type": "string" } }, "scopes": [ "https://www.googleapis.com/auth/userlocation.beacon.registry" ], - "flatPath": "v1beta1/beacons/{beaconsId}", - "path": "v1beta1/{+beaconName}", - "id": "proximitybeacon.beacons.get" - }, - "update": { - "response": { - "$ref": "Beacon" - }, - "parameterOrder": [ - "beaconName" - ], - "httpMethod": "PUT", - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ], - "parameters": { - "projectId": { - "location": "query", - "description": "The project id of the beacon to update. If the project id is not\nspecified then the project making the request is used. The project id\nmust match the project that owns the beacon.\nOptional.", - "type": "string" - }, - "beaconName": { - "pattern": "^beacons/[^/]+$", - "location": "path", - "description": "Resource name of this beacon. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon.\n\nThis field must be left empty when registering. After reading a beacon,\nclients can use the name for future operations.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta1/beacons/{beaconsId}", - "id": "proximitybeacon.beacons.update", - "path": "v1beta1/{+beaconName}", - "request": { - "$ref": "Beacon" - }, - "description": "Updates the information about the specified beacon. **Any field that you do\nnot populate in the submitted beacon will be permanently erased**, so you\nshould follow the \"read, modify, write\" pattern to avoid inadvertently\ndestroying data.\n\nChanges to the beacon status via this method will be silently ignored.\nTo update beacon status, use the separate methods on this API for\nactivation, deactivation, and decommissioning.\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project." + "flatPath": "v1beta1/beacons/{beaconsId}:decommission" } }, "resources": { "attachments": { "methods": { "batchDelete": { - "id": "proximitybeacon.beacons.attachments.batchDelete", "path": "v1beta1/{+beaconName}/attachments:batchDelete", + "id": "proximitybeacon.beacons.attachments.batchDelete", "description": "Deletes multiple attachments on a given beacon. This operation is\npermanent and cannot be undone.\n\nYou can optionally specify `namespacedType` to choose which attachments\nshould be deleted. If you do not specify `namespacedType`, all your\nattachments on the given beacon will be deleted. You also may explicitly\nspecify `*/*` to delete all.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", + "httpMethod": "POST", "parameterOrder": [ "beaconName" ], "response": { "$ref": "DeleteAttachmentsResponse" }, - "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/userlocation.beacon.registry" ], @@ -293,11 +300,11 @@ "location": "query" }, "beaconName": { - "pattern": "^beacons/[^/]+$", - "location": "path", "description": "The beacon whose attachments should be deleted. A beacon name has the\nformat \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast\nby the beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", "type": "string", - "required": true + "required": true, + "pattern": "^beacons/[^/]+$", + "location": "path" }, "projectId": { "location": "query", @@ -308,157 +315,157 @@ "flatPath": "v1beta1/beacons/{beaconsId}/attachments:batchDelete" }, "create": { - "response": { + "path": "v1beta1/{+beaconName}/attachments", + "id": "proximitybeacon.beacons.attachments.create", + "request": { "$ref": "BeaconAttachment" }, + "description": "Associates the given data with the specified beacon. Attachment data must\ncontain two parts:\n\u003cul\u003e\n\u003cli\u003eA namespaced type.\u003c/li\u003e\n\u003cli\u003eThe actual attachment data itself.\u003c/li\u003e\n\u003c/ul\u003e\nThe namespaced type consists of two parts, the namespace and the type.\nThe namespace must be one of the values returned by the `namespaces`\nendpoint, while the type can be a string of any characters except for the\nforward slash (`/`) up to 100 characters in length.\n\nAttachment data can be up to 1024 bytes long.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", + "httpMethod": "POST", "parameterOrder": [ "beaconName" ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "location": "query", - "description": "The project id of the project the attachment will belong to. If\nthe project id is not specified then the project making the request\nis used.\nOptional.", - "type": "string" - }, - "beaconName": { - "location": "path", - "description": "Beacon on which the attachment should be created. A beacon name has the\nformat \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast\nby the beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", - "type": "string", - "required": true, - "pattern": "^beacons/[^/]+$" - } + "response": { + "$ref": "BeaconAttachment" }, "scopes": [ "https://www.googleapis.com/auth/userlocation.beacon.registry" ], - "flatPath": "v1beta1/beacons/{beaconsId}/attachments", - "id": "proximitybeacon.beacons.attachments.create", - "path": "v1beta1/{+beaconName}/attachments", - "description": "Associates the given data with the specified beacon. Attachment data must\ncontain two parts:\n\u003cul\u003e\n\u003cli\u003eA namespaced type.\u003c/li\u003e\n\u003cli\u003eThe actual attachment data itself.\u003c/li\u003e\n\u003c/ul\u003e\nThe namespaced type consists of two parts, the namespace and the type.\nThe namespace must be one of the values returned by the `namespaces`\nendpoint, while the type can be a string of any characters except for the\nforward slash (`/`) up to 100 characters in length.\n\nAttachment data can be up to 1024 bytes long.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", - "request": { - "$ref": "BeaconAttachment" - } + "parameters": { + "beaconName": { + "description": "Beacon on which the attachment should be created. A beacon name has the\nformat \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast\nby the beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", + "type": "string", + "required": true, + "pattern": "^beacons/[^/]+$", + "location": "path" + }, + "projectId": { + "location": "query", + "description": "The project id of the project the attachment will belong to. If\nthe project id is not specified then the project making the request\nis used.\nOptional.", + "type": "string" + } + }, + "flatPath": "v1beta1/beacons/{beaconsId}/attachments" }, "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "attachmentName" + ], + "httpMethod": "DELETE", "parameters": { - "projectId": { - "type": "string", - "location": "query", - "description": "The project id of the attachment to delete. If not provided, the project\nthat is making the request is used.\nOptional." - }, "attachmentName": { + "pattern": "^beacons/[^/]+/attachments/[^/]+$", "location": "path", "description": "The attachment name (`attachmentName`) of\nthe attachment to remove. For example:\n`beacons/3!893737abc9/attachments/c5e937-af0-494-959-ec49d12738`. For\nEddystone-EID beacons, the beacon ID portion (`3!893737abc9`) may be the\nbeacon's current EID, or its \"stable\" Eddystone-UID.\nRequired.", "type": "string", - "required": true, - "pattern": "^beacons/[^/]+/attachments/[^/]+$" + "required": true + }, + "projectId": { + "location": "query", + "description": "The project id of the attachment to delete. If not provided, the project\nthat is making the request is used.\nOptional.", + "type": "string" } }, "scopes": [ "https://www.googleapis.com/auth/userlocation.beacon.registry" ], "flatPath": "v1beta1/beacons/{beaconsId}/attachments/{attachmentsId}", - "path": "v1beta1/{+attachmentName}", "id": "proximitybeacon.beacons.attachments.delete", - "description": "Deletes the specified attachment for the given beacon. Each attachment has\na unique attachment name (`attachmentName`) which is returned when you\nfetch the attachment data via this API. You specify this with the delete\nrequest to control which attachment is removed. This operation cannot be\nundone.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", - "httpMethod": "DELETE", - "parameterOrder": [ - "attachmentName" - ], - "response": { - "$ref": "Empty" - } + "path": "v1beta1/{+attachmentName}", + "description": "Deletes the specified attachment for the given beacon. Each attachment has\na unique attachment name (`attachmentName`) which is returned when you\nfetch the attachment data via this API. You specify this with the delete\nrequest to control which attachment is removed. This operation cannot be\nundone.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project." }, "list": { - "flatPath": "v1beta1/beacons/{beaconsId}/attachments", - "path": "v1beta1/{+beaconName}/attachments", - "id": "proximitybeacon.beacons.attachments.list", - "description": "Returns the attachments for the specified beacon that match the specified\nnamespaced-type pattern.\n\nTo control which namespaced types are returned, you add the\n`namespacedType` query parameter to the request. You must either use\n`*/*`, to return all attachments, or the namespace must be one of\nthe ones returned from the `namespaces` endpoint.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **viewer**, **Is owner** or **Can edit**\npermissions in the Google Developers Console project.", "httpMethod": "GET", - "parameterOrder": [ - "beaconName" - ], "response": { "$ref": "ListBeaconAttachmentsResponse" }, + "parameterOrder": [ + "beaconName" + ], "parameters": { - "beaconName": { - "location": "path", - "description": "Beacon whose attachments should be fetched. A beacon name has the\nformat \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast\nby the beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", - "type": "string", - "required": true, - "pattern": "^beacons/[^/]+$" - }, - "projectId": { - "description": "The project id to list beacon attachments under. This field can be\nused when \"*\" is specified to mean all attachment namespaces. Projects\nmay have multiple attachments with multiple namespaces. If \"*\" is\nspecified and the projectId string is empty, then the project\nmaking the request is used.\nOptional.", + "namespacedType": { + "description": "Specifies the namespace and type of attachment to include in response in\n\u003cvar\u003enamespace/type\u003c/var\u003e format. Accepts `*/*` to specify\n\"all types in all namespaces\".", "type": "string", "location": "query" }, - "namespacedType": { + "beaconName": { + "description": "Beacon whose attachments should be fetched. A beacon name has the\nformat \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast\nby the beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", + "type": "string", + "required": true, + "pattern": "^beacons/[^/]+$", + "location": "path" + }, + "projectId": { "location": "query", - "description": "Specifies the namespace and type of attachment to include in response in\n\u003cvar\u003enamespace/type\u003c/var\u003e format. Accepts `*/*` to specify\n\"all types in all namespaces\".", + "description": "The project id to list beacon attachments under. This field can be\nused when \"*\" is specified to mean all attachment namespaces. Projects\nmay have multiple attachments with multiple namespaces. If \"*\" is\nspecified and the projectId string is empty, then the project\nmaking the request is used.\nOptional.", "type": "string" } }, "scopes": [ "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] + ], + "flatPath": "v1beta1/beacons/{beaconsId}/attachments", + "path": "v1beta1/{+beaconName}/attachments", + "id": "proximitybeacon.beacons.attachments.list", + "description": "Returns the attachments for the specified beacon that match the specified\nnamespaced-type pattern.\n\nTo control which namespaced types are returned, you add the\n`namespacedType` query parameter to the request. You must either use\n`*/*`, to return all attachments, or the namespace must be one of\nthe ones returned from the `namespaces` endpoint.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **viewer**, **Is owner** or **Can edit**\npermissions in the Google Developers Console project." } } }, "diagnostics": { "methods": { "list": { - "httpMethod": "GET", + "description": "List the diagnostics for a single beacon. You can also list diagnostics for\nall the beacons owned by your Google Developers Console project by using\nthe beacon name `beacons/-`.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **viewer**, **Is owner** or **Can edit**\npermissions in the Google Developers Console project.", "response": { "$ref": "ListDiagnosticsResponse" }, + "httpMethod": "GET", "parameterOrder": [ "beaconName" ], + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], "parameters": { - "projectId": { - "location": "query", - "description": "Requests only diagnostic records for the given project id. If not set,\nthen the project making the request will be used for looking up\ndiagnostic records. Optional.", - "type": "string" - }, "beaconName": { - "location": "path", "description": "Beacon that the diagnostics are for.", "type": "string", "required": true, - "pattern": "^beacons/[^/]+$" + "pattern": "^beacons/[^/]+$", + "location": "path" }, "pageToken": { - "location": "query", "description": "Requests results that occur after the `page_token`, obtained from the\nresponse to a previous request. Optional.", - "type": "string" + "type": "string", + "location": "query" }, "alertFilter": { - "description": "Requests only beacons that have the given alert. For example, to find\nbeacons that have low batteries use `alert_filter=LOW_BATTERY`.", - "type": "string", - "location": "query", "enum": [ "ALERT_UNSPECIFIED", "WRONG_LOCATION", "LOW_BATTERY" - ] + ], + "description": "Requests only beacons that have the given alert. For example, to find\nbeacons that have low batteries use `alert_filter=LOW_BATTERY`.", + "type": "string", + "location": "query" }, "pageSize": { + "location": "query", "format": "int32", "description": "Specifies the maximum number of results to return. Defaults to\n10. Maximum 1000. Optional.", - "type": "integer", - "location": "query" + "type": "integer" + }, + "projectId": { + "location": "query", + "description": "Requests only diagnostic records for the given project id. If not set,\nthen the project making the request will be used for looking up\ndiagnostic records. Optional.", + "type": "string" } }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ], "flatPath": "v1beta1/beacons/{beaconsId}/diagnostics", - "path": "v1beta1/{+beaconName}/diagnostics", "id": "proximitybeacon.beacons.diagnostics.list", - "description": "List the diagnostics for a single beacon. You can also list diagnostics for\nall the beacons owned by your Google Developers Console project by using\nthe beacon name `beacons/-`.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **viewer**, **Is owner** or **Can edit**\npermissions in the Google Developers Console project." + "path": "v1beta1/{+beaconName}/diagnostics" } } } @@ -467,44 +474,44 @@ "beaconinfo": { "methods": { "getforobserved": { - "description": "Given one or more beacon observations, returns any beacon information\nand attachments accessible to your application. Authorize by using the\n[API key](https://developers.google.com/beacons/proximity/get-started#request_a_browser_api_key)\nfor the application.", - "request": { - "$ref": "GetInfoForObservedBeaconsRequest" - }, - "httpMethod": "POST", - "parameterOrder": [], "response": { "$ref": "GetInfoForObservedBeaconsResponse" }, + "parameterOrder": [], + "httpMethod": "POST", "parameters": {}, "flatPath": "v1beta1/beaconinfo:getforobserved", + "id": "proximitybeacon.beaconinfo.getforobserved", "path": "v1beta1/beaconinfo:getforobserved", - "id": "proximitybeacon.beaconinfo.getforobserved" + "request": { + "$ref": "GetInfoForObservedBeaconsRequest" + }, + "description": "Given one or more beacon observations, returns any beacon information\nand attachments accessible to your application. Authorize by using the\n[API key](https://developers.google.com/beacons/proximity/get-started#request_a_browser_api_key)\nfor the application." } } }, "namespaces": { "methods": { "list": { - "httpMethod": "GET", + "id": "proximitybeacon.namespaces.list", + "path": "v1beta1/namespaces", + "description": "Lists all attachment namespaces owned by your Google Developers Console\nproject. Attachment data associated with a beacon must include a\nnamespaced type, and the namespace must be owned by your project.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **viewer**, **Is owner** or **Can edit**\npermissions in the Google Developers Console project.", "response": { "$ref": "ListNamespacesResponse" }, + "httpMethod": "GET", "parameterOrder": [], - "parameters": { - "projectId": { - "description": "The project id to list namespaces under.\nOptional.", - "type": "string", - "location": "query" - } - }, "scopes": [ "https://www.googleapis.com/auth/userlocation.beacon.registry" ], - "flatPath": "v1beta1/namespaces", - "path": "v1beta1/namespaces", - "id": "proximitybeacon.namespaces.list", - "description": "Lists all attachment namespaces owned by your Google Developers Console\nproject. Attachment data associated with a beacon must include a\nnamespaced type, and the namespace must be owned by your project.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **viewer**, **Is owner** or **Can edit**\npermissions in the Google Developers Console project." + "parameters": { + "projectId": { + "location": "query", + "description": "The project id to list namespaces under.\nOptional.", + "type": "string" + } + }, + "flatPath": "v1beta1/namespaces" }, "update": { "id": "proximitybeacon.namespaces.update", @@ -525,16 +532,16 @@ ], "parameters": { "namespaceName": { + "pattern": "^namespaces/[^/]+$", + "location": "path", "description": "Resource name of this namespace. Namespaces names have the format:\n\u003ccode\u003enamespaces/\u003cvar\u003enamespace\u003c/var\u003e\u003c/code\u003e.", "type": "string", - "required": true, - "pattern": "^namespaces/[^/]+$", - "location": "path" + "required": true }, "projectId": { + "location": "query", "description": "The project id of the namespace to update. If the project id is not\nspecified then the project making the request is used. The project id\nmust match the project that owns the beacon.\nOptional.", - "type": "string", - "location": "query" + "type": "string" } }, "flatPath": "v1beta1/namespaces/{namespacesId}" @@ -543,60 +550,44 @@ } }, "parameters": { - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, "upload_protocol": { "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" }, "prettyPrint": { - "location": "query", "description": "Returns response with indentations and line breaks.", "default": "true", - "type": "boolean" + "type": "boolean", + "location": "query" }, "fields": { + "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" + "type": "string" }, "uploadType": { "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", "location": "query" }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, "$.xgafv": { + "enum": [ + "1", + "2" + ], "description": "V1 error format.", "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" ], - "location": "query", - "enum": [ - "1", - "2" - ] - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" + "location": "query" }, "alt": { "enum": [ @@ -614,24 +605,348 @@ "description": "Data format for response.", "default": "json" }, - "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.", - "type": "string", - "location": "query" - }, "access_token": { "location": "query", "description": "OAuth access token.", "type": "string" }, + "key": { + "location": "query", + "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.", + "type": "string" + }, "quotaUser": { "location": "query", "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.", "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" } }, "schemas": { + "DeleteAttachmentsResponse": { + "description": "Response for a request to delete attachments.", + "type": "object", + "properties": { + "numDeleted": { + "format": "int32", + "description": "The number of attachments that were deleted.", + "type": "integer" + } + }, + "id": "DeleteAttachmentsResponse" + }, + "EphemeralIdRegistrationParams": { + "properties": { + "serviceEcdhPublicKey": { + "format": "byte", + "description": "The beacon service's public key for use by a beacon to derive its\nIdentity Key using Elliptic Curve Diffie-Hellman key exchange.", + "type": "string" + }, + "maxRotationPeriodExponent": { + "format": "uint32", + "description": "Indicates the maximum rotation period supported by the service.\nSee EddystoneEidRegistration.rotation_period_exponent", + "type": "integer" + }, + "minRotationPeriodExponent": { + "format": "uint32", + "description": "Indicates the minimum rotation period supported by the service.\nSee EddystoneEidRegistration.rotation_period_exponent", + "type": "integer" + } + }, + "id": "EphemeralIdRegistrationParams", + "description": "Information a client needs to provision and register beacons that\nbroadcast Eddystone-EID format beacon IDs, using Elliptic curve\nDiffie-Hellman key exchange. See\n[the Eddystone specification](https://github.com/google/eddystone/tree/master/eddystone-eid) at GitHub.", + "type": "object" + }, + "Observation": { + "description": "Represents one beacon observed once.", + "type": "object", + "properties": { + "telemetry": { + "format": "byte", + "description": "The array of telemetry bytes received from the beacon. The server is\nresponsible for parsing it. This field may frequently be empty, as\nwith a beacon that transmits telemetry only occasionally.", + "type": "string" + }, + "timestampMs": { + "format": "google-datetime", + "description": "Time when the beacon was observed.", + "type": "string" + }, + "advertisedId": { + "$ref": "AdvertisedId", + "description": "The ID advertised by the beacon the client has encountered.\n\nIf the submitted `advertised_id` type is Eddystone-EID, then the client\nmust be authorized to resolve the given beacon. Otherwise no data will be\nreturned for that beacon.\nRequired." + } + }, + "id": "Observation" + }, + "ListDiagnosticsResponse": { + "description": "Response that contains the requested diagnostics.", + "type": "object", + "properties": { + "diagnostics": { + "description": "The diagnostics matching the given request.", + "items": { + "$ref": "Diagnostics" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token that can be used for pagination. Returned only if the\nrequest matches more beacons than can be returned in this response.", + "type": "string" + } + }, + "id": "ListDiagnosticsResponse" + }, + "GetInfoForObservedBeaconsResponse": { + "properties": { + "beacons": { + "description": "Public information about beacons.\nMay be empty if the request matched no beacons.", + "items": { + "$ref": "BeaconInfo" + }, + "type": "array" + } + }, + "id": "GetInfoForObservedBeaconsResponse", + "description": "Information about the requested beacons, optionally including attachment\ndata.", + "type": "object" + }, + "Beacon": { + "description": "Details of a beacon device.", + "type": "object", + "properties": { + "provisioningKey": { + "format": "byte", + "description": "Some beacons may require a user to provide an authorization key before\nchanging any of its configuration (e.g. broadcast frames, transmit power).\nThis field provides a place to store and control access to that key.\nThis field is populated in responses to `GET /v1beta1/beacons/3!beaconId`\nfrom users with write access to the given beacon. That is to say: If the\nuser is authorized to write the beacon's confidential data in the service,\nthe service considers them authorized to configure the beacon. Note\nthat this key grants nothing on the service, only on the beacon itself.", + "type": "string" + }, + "ephemeralIdRegistration": { + "description": "Write-only registration parameters for beacons using Eddystone-EID\n(remotely resolved ephemeral ID) format. This information will not be\npopulated in API responses. When submitting this data, the `advertised_id`\nfield must contain an ID of type Eddystone-UID. Any other ID type will\nresult in an error.", + "$ref": "EphemeralIdRegistration" + }, + "latLng": { + "description": "The location of the beacon, expressed as a latitude and longitude pair.\nThis location is given when the beacon is registered or updated. It does\nnot necessarily indicate the actual current location of the beacon.\nOptional.", + "$ref": "LatLng" + }, + "description": { + "description": "Free text used to identify and describe the beacon. Maximum length 140\ncharacters.\nOptional.", + "type": "string" + }, + "placeId": { + "description": "The [Google Places API](/places/place-id) Place ID of the place where\nthe beacon is deployed. This is given when the beacon is registered or\nupdated, not automatically detected in any way.\nOptional.", + "type": "string" + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Properties of the beacon device, for example battery type or firmware\nversion.\nOptional.", + "type": "object" + }, + "indoorLevel": { + "description": "The indoor level information for this beacon, if known. As returned by the\nGoogle Maps API.\nOptional.", + "$ref": "IndoorLevel" + }, + "status": { + "enumDescriptions": [ + "Do not use this value.", + "The \"normal\" in-use state of a beacon.", + "Beacon should no longer be used for any purpose. This is irreversible.", + "The beacon should not be visible to mobile devices. This is reversible." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "ACTIVE", + "DECOMMISSIONED", + "INACTIVE" + ], + "description": "Current status of the beacon.\nRequired.", + "type": "string" + }, + "beaconName": { + "description": "Resource name of this beacon. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon.\n\nThis field must be left empty when registering. After reading a beacon,\nclients can use the name for future operations.", + "type": "string" + }, + "expectedStability": { + "enumDescriptions": [ + "Do not use this value.", + "Not expected to move, for example a store's front door.", + "Usually stable but may move rarely, usually within a single place,\nfor example a store display.", + "Moves frequently, for example a personal item or food truck.", + "Moves continuously in service, for example a bus or train." + ], + "enum": [ + "STABILITY_UNSPECIFIED", + "STABLE", + "PORTABLE", + "MOBILE", + "ROVING" + ], + "description": "Expected location stability. This is set when the beacon is registered or\nupdated, not automatically detected in any way.\nOptional.", + "type": "string" + }, + "advertisedId": { + "$ref": "AdvertisedId", + "description": "The identifier of a beacon as advertised by it. This field must be\npopulated when registering. It may be empty when updating a beacon\nrecord because it is ignored in updates.\n\nWhen registering a beacon that broadcasts Eddystone-EID, this field\nshould contain a \"stable\" Eddystone-UID that identifies the beacon and\nlinks it to its attachments. The stable Eddystone-UID is only used for\nadministering the beacon." + } + }, + "id": "Beacon" + }, + "AdvertisedId": { + "description": "Defines a unique identifier of a beacon as broadcast by the device.", + "type": "object", + "properties": { + "type": { + "enumDescriptions": [ + "Do not use this value.", + "Eddystone, an open beacon format that supports Android and iOS devices\nhttps://github.com/google/eddystone/wiki/Beacon-Specification", + "Apple iBeacon compatible beacon", + "See http://altbeacon.org and/or https://github.com/AltBeacon/spec.", + "Eddystone Ephemeral ID" + ], + "enum": [ + "TYPE_UNSPECIFIED", + "EDDYSTONE", + "IBEACON", + "ALTBEACON", + "EDDYSTONE_EID" + ], + "description": "Specifies the identifier type.\nRequired.", + "type": "string" + }, + "id": { + "format": "byte", + "description": "The actual beacon identifier, as broadcast by the beacon hardware. Must be\n[base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP\nrequests, and will be so encoded (with padding) in responses. The base64\nencoding should be of the binary byte-stream and not any textual (such as\nhex) representation thereof.\nRequired.", + "type": "string" + } + }, + "id": "AdvertisedId" + }, + "Date": { + "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", + "type": "object", + "properties": { + "day": { + "format": "int32", + "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", + "type": "integer" + }, + "year": { + "format": "int32", + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "type": "integer" + }, + "month": { + "format": "int32", + "description": "Month of year. Must be from 1 to 12.", + "type": "integer" + } + }, + "id": "Date" + }, + "IndoorLevel": { + "description": "Indoor level, a human-readable string as returned by Google Maps APIs,\nuseful to indicate which floor of a building a beacon is located on.", + "type": "object", + "properties": { + "name": { + "description": "The name of this level.", + "type": "string" + } + }, + "id": "IndoorLevel" + }, + "ListNamespacesResponse": { + "properties": { + "namespaces": { + "description": "The attachments that corresponded to the request params.", + "items": { + "$ref": "Namespace" + }, + "type": "array" + } + }, + "id": "ListNamespacesResponse", + "description": "Response to ListNamespacesRequest that contains all the project's namespaces.", + "type": "object" + }, + "ListBeaconsResponse": { + "description": "Response that contains list beacon results and pagination help.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "An opaque pagination token that the client may provide in their next\nrequest to retrieve the next page of results.", + "type": "string" + }, + "totalCount": { + "format": "int64", + "description": "Estimate of the total number of beacons matched by the query. Higher\nvalues may be less accurate.", + "type": "string" + }, + "beacons": { + "description": "The beacons that matched the search criteria.", + "items": { + "$ref": "Beacon" + }, + "type": "array" + } + }, + "id": "ListBeaconsResponse" + }, + "Diagnostics": { + "description": "Diagnostics for a single beacon.", + "type": "object", + "properties": { + "beaconName": { + "description": "Resource name of the beacon. For Eddystone-EID beacons, this may\nbe the beacon's current EID, or the beacon's \"stable\" Eddystone-UID.", + "type": "string" + }, + "alerts": { + "enumDescriptions": [ + "Invalid value. Should never appear.", + "The beacon has been reported in a location different than its registered\nlocation. This may indicate that the beacon has been moved. This signal\nis not 100% accurate, but indicates that further investigation is worth\nwhile.", + "The battery level for the beacon is low enough that, given the beacon's\ncurrent use, its battery will run out with in the next 60 days. This\nindicates that the battery should be replaced soon." + ], + "description": "An unordered list of Alerts that the beacon has.", + "items": { + "enum": [ + "ALERT_UNSPECIFIED", + "WRONG_LOCATION", + "LOW_BATTERY" + ], + "type": "string" + }, + "type": "array" + }, + "estimatedLowBatteryDate": { + "description": "The date when the battery is expected to be low. If the value is missing\nthen there is no estimate for when the battery will be low.\nThis value is only an estimate, not an exact date.", + "$ref": "Date" + } + }, + "id": "Diagnostics" + }, + "Empty": { + "properties": {}, + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object" + }, "GetInfoForObservedBeaconsRequest": { + "description": "Request for beacon and attachment information about beacons that\na mobile client has encountered \"in the wild\".", + "type": "object", "properties": { "observations": { "description": "The beacons that the client has encountered.\nAt least one must be given.", @@ -648,20 +963,20 @@ "type": "array" } }, - "id": "GetInfoForObservedBeaconsRequest", - "description": "Request for beacon and attachment information about beacons that\na mobile client has encountered \"in the wild\".", - "type": "object" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" + "id": "GetInfoForObservedBeaconsRequest" }, "BeaconAttachment": { - "description": "Project-specific data associated with a beacon.", - "type": "object", "properties": { + "data": { + "format": "byte", + "description": "An opaque data container for client-provided data. Must be\n[base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP\nrequests, and will be so encoded (with padding) in responses.\nRequired.", + "type": "string" + }, + "creationTimeMs": { + "format": "google-datetime", + "description": "The UTC time when this attachment was created, in milliseconds since the\nUNIX epoch.", + "type": "string" + }, "attachmentName": { "description": "Resource name of this attachment. Attachment names have the format:\n\u003ccode\u003ebeacons/\u003cvar\u003ebeacon_id\u003c/var\u003e/attachments/\u003cvar\u003eattachment_id\u003c/var\u003e\u003c/code\u003e.\nLeave this empty on creation.", "type": "string" @@ -669,19 +984,11 @@ "namespacedType": { "description": "Specifies what kind of attachment this is. Tells a client how to\ninterpret the `data` field. Format is \u003cvar\u003enamespace/type\u003c/var\u003e. Namespace\nprovides type separation between clients. Type describes the type of\n`data`, for use by the client when parsing the `data` field.\nRequired.", "type": "string" - }, - "data": { - "format": "byte", - "description": "An opaque data container for client-provided data. Must be\n[base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP\nrequests, and will be so encoded (with padding) in responses.\nRequired.", - "type": "string" - }, - "creationTimeMs": { - "type": "string", - "format": "google-datetime", - "description": "The UTC time when this attachment was created, in milliseconds since the\nUNIX epoch." } }, - "id": "BeaconAttachment" + "id": "BeaconAttachment", + "description": "Project-specific data associated with a beacon.", + "type": "object" }, "EphemeralIdRegistration": { "description": "Write-only registration parameters for beacons using Eddystone-EID format.\nTwo ways of securely registering an Eddystone-EID beacon with the service\nare supported:\n\n1. Perform an ECDH key exchange via this API, including a previous call\n to `GET /v1beta1/eidparams`. In this case the fields\n `beacon_ecdh_public_key` and `service_ecdh_public_key` should be\n populated and `beacon_identity_key` should not be populated. This\n method ensures that only the two parties in the ECDH key exchange can\n compute the identity key, which becomes a secret between them.\n2. Derive or obtain the beacon's identity key via other secure means\n (perhaps an ECDH key exchange between the beacon and a mobile device\n or any other secure method), and then submit the resulting identity key\n to the service. In this case `beacon_identity_key` field should be\n populated, and neither of `beacon_ecdh_public_key` nor\n `service_ecdh_public_key` fields should be. The security of this method\n depends on how securely the parties involved (in particular the\n bluetooth client) handle the identity key, and obviously on how\n securely the identity key was generated.\n\nSee [the Eddystone specification](https://github.com/google/eddystone/tree/master/eddystone-eid) at GitHub.", @@ -721,25 +1028,23 @@ "id": "EphemeralIdRegistration" }, "LatLng": { - "id": "LatLng", - "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", - "type": "object", "properties": { - "longitude": { - "format": "double", - "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", - "type": "number" - }, "latitude": { "format": "double", "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", "type": "number" + }, + "longitude": { + "format": "double", + "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", + "type": "number" } - } + }, + "id": "LatLng", + "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", + "type": "object" }, "ListBeaconAttachmentsResponse": { - "description": "Response to `ListBeaconAttachments` that contains the requested attachments.", - "type": "object", "properties": { "attachments": { "description": "The attachments that corresponded to the request params.", @@ -749,16 +1054,12 @@ "type": "array" } }, - "id": "ListBeaconAttachmentsResponse" + "id": "ListBeaconAttachmentsResponse", + "description": "Response to `ListBeaconAttachments` that contains the requested attachments.", + "type": "object" }, "Namespace": { - "description": "An attachment namespace defines read and write access for all the attachments\ncreated under it. Each namespace is globally unique, and owned by one\nproject which is the only project that can create attachments under it.", - "type": "object", "properties": { - "namespaceName": { - "description": "Resource name of this namespace. Namespaces names have the format:\n\u003ccode\u003enamespaces/\u003cvar\u003enamespace\u003c/var\u003e\u003c/code\u003e.", - "type": "string" - }, "servingVisibility": { "enumDescriptions": [ "Do not use this value.", @@ -772,354 +1073,60 @@ ], "description": "Specifies what clients may receive attachments under this namespace\nvia `beaconinfo.getforobserved`.", "type": "string" + }, + "namespaceName": { + "description": "Resource name of this namespace. Namespaces names have the format:\n\u003ccode\u003enamespaces/\u003cvar\u003enamespace\u003c/var\u003e\u003c/code\u003e.", + "type": "string" } }, - "id": "Namespace" + "id": "Namespace", + "description": "An attachment namespace defines read and write access for all the attachments\ncreated under it. Each namespace is globally unique, and owned by one\nproject which is the only project that can create attachments under it.", + "type": "object" }, "BeaconInfo": { + "description": "A subset of beacon information served via the `beaconinfo.getforobserved`\nmethod, which you call when users of your app encounter your beacons.", + "type": "object", "properties": { "beaconName": { - "type": "string", - "description": "The name under which the beacon is registered." + "description": "The name under which the beacon is registered.", + "type": "string" }, "attachments": { + "description": "Attachments matching the type(s) requested.\nMay be empty if no attachment types were requested.", "items": { "$ref": "AttachmentInfo" }, - "type": "array", - "description": "Attachments matching the type(s) requested.\nMay be empty if no attachment types were requested." + "type": "array" }, "advertisedId": { - "description": "The ID advertised by the beacon.", - "$ref": "AdvertisedId" + "$ref": "AdvertisedId", + "description": "The ID advertised by the beacon." } }, - "id": "BeaconInfo", - "description": "A subset of beacon information served via the `beaconinfo.getforobserved`\nmethod, which you call when users of your app encounter your beacons.", - "type": "object" + "id": "BeaconInfo" }, "AttachmentInfo": { - "description": "A subset of attachment information served via the\n`beaconinfo.getforobserved` method, used when your users encounter your\nbeacons.", - "type": "object", "properties": { - "namespacedType": { - "description": "Specifies what kind of attachment this is. Tells a client how to\ninterpret the `data` field. Format is \u003cvar\u003enamespace/type\u003c/var\u003e, for\nexample \u003ccode\u003escrupulous-wombat-12345/welcome-message\u003c/code\u003e", - "type": "string" - }, "data": { "format": "byte", "description": "An opaque data container for client-provided data.", "type": "string" - } - }, - "id": "AttachmentInfo" - }, - "DeleteAttachmentsResponse": { - "type": "object", - "properties": { - "numDeleted": { - "type": "integer", - "format": "int32", - "description": "The number of attachments that were deleted." - } - }, - "id": "DeleteAttachmentsResponse", - "description": "Response for a request to delete attachments." - }, - "EphemeralIdRegistrationParams": { - "id": "EphemeralIdRegistrationParams", - "description": "Information a client needs to provision and register beacons that\nbroadcast Eddystone-EID format beacon IDs, using Elliptic curve\nDiffie-Hellman key exchange. See\n[the Eddystone specification](https://github.com/google/eddystone/tree/master/eddystone-eid) at GitHub.", - "type": "object", - "properties": { - "maxRotationPeriodExponent": { - "format": "uint32", - "description": "Indicates the maximum rotation period supported by the service.\nSee EddystoneEidRegistration.rotation_period_exponent", - "type": "integer" }, - "minRotationPeriodExponent": { - "format": "uint32", - "description": "Indicates the minimum rotation period supported by the service.\nSee EddystoneEidRegistration.rotation_period_exponent", - "type": "integer" - }, - "serviceEcdhPublicKey": { - "type": "string", - "format": "byte", - "description": "The beacon service's public key for use by a beacon to derive its\nIdentity Key using Elliptic Curve Diffie-Hellman key exchange." - } - } - }, - "Observation": { - "description": "Represents one beacon observed once.", - "type": "object", - "properties": { - "telemetry": { - "format": "byte", - "description": "The array of telemetry bytes received from the beacon. The server is\nresponsible for parsing it. This field may frequently be empty, as\nwith a beacon that transmits telemetry only occasionally.", - "type": "string" - }, - "timestampMs": { - "format": "google-datetime", - "description": "Time when the beacon was observed.", - "type": "string" - }, - "advertisedId": { - "$ref": "AdvertisedId", - "description": "The ID advertised by the beacon the client has encountered.\n\nIf the submitted `advertised_id` type is Eddystone-EID, then the client\nmust be authorized to resolve the given beacon. Otherwise no data will be\nreturned for that beacon.\nRequired." - } - }, - "id": "Observation" - }, - "ListDiagnosticsResponse": { - "description": "Response that contains the requested diagnostics.", - "type": "object", - "properties": { - "nextPageToken": { - "type": "string", - "description": "Token that can be used for pagination. Returned only if the\nrequest matches more beacons than can be returned in this response." - }, - "diagnostics": { - "description": "The diagnostics matching the given request.", - "items": { - "$ref": "Diagnostics" - }, - "type": "array" - } - }, - "id": "ListDiagnosticsResponse" - }, - "GetInfoForObservedBeaconsResponse": { - "description": "Information about the requested beacons, optionally including attachment\ndata.", - "type": "object", - "properties": { - "beacons": { - "description": "Public information about beacons.\nMay be empty if the request matched no beacons.", - "items": { - "$ref": "BeaconInfo" - }, - "type": "array" - } - }, - "id": "GetInfoForObservedBeaconsResponse" - }, - "Beacon": { - "description": "Details of a beacon device.", - "type": "object", - "properties": { - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Properties of the beacon device, for example battery type or firmware\nversion.\nOptional.", - "type": "object" - }, - "indoorLevel": { - "$ref": "IndoorLevel", - "description": "The indoor level information for this beacon, if known. As returned by the\nGoogle Maps API.\nOptional." - }, - "status": { - "enum": [ - "STATUS_UNSPECIFIED", - "ACTIVE", - "DECOMMISSIONED", - "INACTIVE" - ], - "description": "Current status of the beacon.\nRequired.", - "type": "string", - "enumDescriptions": [ - "Do not use this value.", - "The \"normal\" in-use state of a beacon.", - "Beacon should no longer be used for any purpose. This is irreversible.", - "The beacon should not be visible to mobile devices. This is reversible." - ] - }, - "beaconName": { - "type": "string", - "description": "Resource name of this beacon. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon.\n\nThis field must be left empty when registering. After reading a beacon,\nclients can use the name for future operations." - }, - "expectedStability": { - "description": "Expected location stability. This is set when the beacon is registered or\nupdated, not automatically detected in any way.\nOptional.", - "type": "string", - "enumDescriptions": [ - "Do not use this value.", - "Not expected to move, for example a store's front door.", - "Usually stable but may move rarely, usually within a single place,\nfor example a store display.", - "Moves frequently, for example a personal item or food truck.", - "Moves continuously in service, for example a bus or train." - ], - "enum": [ - "STABILITY_UNSPECIFIED", - "STABLE", - "PORTABLE", - "MOBILE", - "ROVING" - ] - }, - "advertisedId": { - "$ref": "AdvertisedId", - "description": "The identifier of a beacon as advertised by it. This field must be\npopulated when registering. It may be empty when updating a beacon\nrecord because it is ignored in updates.\n\nWhen registering a beacon that broadcasts Eddystone-EID, this field\nshould contain a \"stable\" Eddystone-UID that identifies the beacon and\nlinks it to its attachments. The stable Eddystone-UID is only used for\nadministering the beacon." - }, - "ephemeralIdRegistration": { - "$ref": "EphemeralIdRegistration", - "description": "Write-only registration parameters for beacons using Eddystone-EID\n(remotely resolved ephemeral ID) format. This information will not be\npopulated in API responses. When submitting this data, the `advertised_id`\nfield must contain an ID of type Eddystone-UID. Any other ID type will\nresult in an error." - }, - "provisioningKey": { - "type": "string", - "format": "byte", - "description": "Some beacons may require a user to provide an authorization key before\nchanging any of its configuration (e.g. broadcast frames, transmit power).\nThis field provides a place to store and control access to that key.\nThis field is populated in responses to `GET /v1beta1/beacons/3!beaconId`\nfrom users with write access to the given beacon. That is to say: If the\nuser is authorized to write the beacon's confidential data in the service,\nthe service considers them authorized to configure the beacon. Note\nthat this key grants nothing on the service, only on the beacon itself." - }, - "latLng": { - "$ref": "LatLng", - "description": "The location of the beacon, expressed as a latitude and longitude pair.\nThis location is given when the beacon is registered or updated. It does\nnot necessarily indicate the actual current location of the beacon.\nOptional." - }, - "placeId": { - "description": "The [Google Places API](/places/place-id) Place ID of the place where\nthe beacon is deployed. This is given when the beacon is registered or\nupdated, not automatically detected in any way.\nOptional.", - "type": "string" - }, - "description": { - "description": "Free text used to identify and describe the beacon. Maximum length 140\ncharacters.\nOptional.", + "namespacedType": { + "description": "Specifies what kind of attachment this is. Tells a client how to\ninterpret the `data` field. Format is \u003cvar\u003enamespace/type\u003c/var\u003e, for\nexample \u003ccode\u003escrupulous-wombat-12345/welcome-message\u003c/code\u003e", "type": "string" } }, - "id": "Beacon" - }, - "AdvertisedId": { - "description": "Defines a unique identifier of a beacon as broadcast by the device.", - "type": "object", - "properties": { - "id": { - "format": "byte", - "description": "The actual beacon identifier, as broadcast by the beacon hardware. Must be\n[base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP\nrequests, and will be so encoded (with padding) in responses. The base64\nencoding should be of the binary byte-stream and not any textual (such as\nhex) representation thereof.\nRequired.", - "type": "string" - }, - "type": { - "type": "string", - "enumDescriptions": [ - "Do not use this value.", - "Eddystone, an open beacon format that supports Android and iOS devices\nhttps://github.com/google/eddystone/wiki/Beacon-Specification", - "Apple iBeacon compatible beacon", - "See http://altbeacon.org and/or https://github.com/AltBeacon/spec.", - "Eddystone Ephemeral ID" - ], - "enum": [ - "TYPE_UNSPECIFIED", - "EDDYSTONE", - "IBEACON", - "ALTBEACON", - "EDDYSTONE_EID" - ], - "description": "Specifies the identifier type.\nRequired." - } - }, - "id": "AdvertisedId" - }, - "Date": { - "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", - "type": "object", - "properties": { - "day": { - "type": "integer", - "format": "int32", - "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant." - }, - "year": { - "format": "int32", - "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", - "type": "integer" - }, - "month": { - "format": "int32", - "description": "Month of year. Must be from 1 to 12.", - "type": "integer" - } - }, - "id": "Date" - }, - "IndoorLevel": { - "properties": { - "name": { - "description": "The name of this level.", - "type": "string" - } - }, - "id": "IndoorLevel", - "description": "Indoor level, a human-readable string as returned by Google Maps APIs,\nuseful to indicate which floor of a building a beacon is located on.", + "id": "AttachmentInfo", + "description": "A subset of attachment information served via the\n`beaconinfo.getforobserved` method, used when your users encounter your\nbeacons.", "type": "object" - }, - "ListNamespacesResponse": { - "type": "object", - "properties": { - "namespaces": { - "description": "The attachments that corresponded to the request params.", - "items": { - "$ref": "Namespace" - }, - "type": "array" - } - }, - "id": "ListNamespacesResponse", - "description": "Response to ListNamespacesRequest that contains all the project's namespaces." - }, - "Diagnostics": { - "description": "Diagnostics for a single beacon.", - "type": "object", - "properties": { - "estimatedLowBatteryDate": { - "$ref": "Date", - "description": "The date when the battery is expected to be low. If the value is missing\nthen there is no estimate for when the battery will be low.\nThis value is only an estimate, not an exact date." - }, - "beaconName": { - "description": "Resource name of the beacon. For Eddystone-EID beacons, this may\nbe the beacon's current EID, or the beacon's \"stable\" Eddystone-UID.", - "type": "string" - }, - "alerts": { - "description": "An unordered list of Alerts that the beacon has.", - "items": { - "enum": [ - "ALERT_UNSPECIFIED", - "WRONG_LOCATION", - "LOW_BATTERY" - ], - "type": "string" - }, - "type": "array", - "enumDescriptions": [ - "Invalid value. Should never appear.", - "The beacon has been reported in a location different than its registered\nlocation. This may indicate that the beacon has been moved. This signal\nis not 100% accurate, but indicates that further investigation is worth\nwhile.", - "The battery level for the beacon is low enough that, given the beacon's\ncurrent use, its battery will run out with in the next 60 days. This\nindicates that the battery should be replaced soon." - ] - } - }, - "id": "Diagnostics" - }, - "ListBeaconsResponse": { - "description": "Response that contains list beacon results and pagination help.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "An opaque pagination token that the client may provide in their next\nrequest to retrieve the next page of results.", - "type": "string" - }, - "totalCount": { - "format": "int64", - "description": "Estimate of the total number of beacons matched by the query. Higher\nvalues may be less accurate.", - "type": "string" - }, - "beacons": { - "description": "The beacons that matched the search criteria.", - "items": { - "$ref": "Beacon" - }, - "type": "array" - } - }, - "id": "ListBeaconsResponse" } }, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, "version": "v1beta1", "baseUrl": "https://proximitybeacon.googleapis.com/", "auth": { @@ -1131,16 +1138,9 @@ } } }, - "servicePath": "", "description": "Registers, manages, indexes, and searches beacons.", "kind": "discovery#restDescription", + "servicePath": "", "rootUrl": "https://proximitybeacon.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "proximitybeacon", - "batchPath": "batch", - "revision": "20170717", - "documentationLink": "https://developers.google.com/beacons/proximity/", - "id": "proximitybeacon:v1beta1", - "title": "Google Proximity Beacon API" + "basePath": "" } 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 740d94400..b3ce1f737 100644 --- a/vendor/google.golang.org/api/pubsub/v1/pubsub-api.json +++ b/vendor/google.golang.org/api/pubsub/v1/pubsub-api.json @@ -1,327 +1,45 @@ { - "title": "Google Cloud Pub/Sub API", "ownerName": "Google", "discoveryVersion": "v1", "resources": { "projects": { "resources": { - "topics": { - "methods": { - "create": { - "httpMethod": "PUT", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Topic" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "description": "The name of the topic. It must have the format\n`\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter,\nand contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),\nunderscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent\nsigns (`%`). It must be between 3 and 255 characters in length, and it\nmust not start with `\"goog\"`.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectsId}/topics/{topicsId}", - "path": "v1/{+name}", - "id": "pubsub.projects.topics.create", - "request": { - "$ref": "Topic" - }, - "description": "Creates the given topic with the given name." - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1/projects/{projectsId}/topics/{topicsId}:setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "id": "pubsub.projects.topics.setIamPolicy" - }, - "getIamPolicy": { - "flatPath": "v1/projects/{projectsId}/topics/{topicsId}:getIamPolicy", - "path": "v1/{+resource}:getIamPolicy", - "id": "pubsub.projects.topics.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.", - "httpMethod": "GET", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "get": { - "response": { - "$ref": "Topic" - }, - "parameterOrder": [ - "topic" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "topic": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "description": "The name of the topic to get.\nFormat is `projects/{project}/topics/{topic}`." - } - }, - "flatPath": "v1/projects/{projectsId}/topics/{topicsId}", - "id": "pubsub.projects.topics.get", - "path": "v1/{+topic}", - "description": "Gets the configuration of a topic." - }, - "publish": { - "flatPath": "v1/projects/{projectsId}/topics/{topicsId}:publish", - "path": "v1/{+topic}:publish", - "id": "pubsub.projects.topics.publish", - "request": { - "$ref": "PublishRequest" - }, - "description": "Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic\ndoes not exist. The message payload must not be empty; it must contain\n either a non-empty data field, or at least one attribute.", - "httpMethod": "POST", - "parameterOrder": [ - "topic" - ], - "response": { - "$ref": "PublishResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "topic": { - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "description": "The messages in the request will be published on this topic.\nFormat is `projects/{project}/topics/{topic}`.", - "type": "string", - "required": true - } - } - }, - "testIamPermissions": { - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/topics/{topicsId}:testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "id": "pubsub.projects.topics.testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "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." - }, - "delete": { - "description": "Deletes the topic with the given name. Returns `NOT_FOUND` if the topic\ndoes not exist. After a topic is deleted, a new topic may be created with\nthe same name; this is an entirely new topic with none of the old\nconfiguration or subscriptions. Existing subscriptions to this topic are\nnot deleted, but their `topic` field is set to `_deleted-topic_`.", - "httpMethod": "DELETE", - "parameterOrder": [ - "topic" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "topic": { - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "description": "Name of the topic to delete.\nFormat is `projects/{project}/topics/{topic}`.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectsId}/topics/{topicsId}", - "path": "v1/{+topic}", - "id": "pubsub.projects.topics.delete" - }, - "list": { - "httpMethod": "GET", - "response": { - "$ref": "ListTopicsResponse" - }, - "parameterOrder": [ - "project" - ], - "parameters": { - "pageToken": { - "description": "The value returned by the last `ListTopicsResponse`; indicates that this is\na continuation of a prior `ListTopics` call, and that the system should\nreturn the next page of data.", - "type": "string", - "location": "query" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Maximum number of topics to return." - }, - "project": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "The name of the cloud project that topics belong to.\nFormat is `projects/{project}`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1/projects/{projectsId}/topics", - "path": "v1/{+project}/topics", - "id": "pubsub.projects.topics.list", - "description": "Lists matching topics." - } - }, - "resources": { - "subscriptions": { - "methods": { - "list": { - "id": "pubsub.projects.topics.subscriptions.list", - "path": "v1/{+topic}/subscriptions", - "description": "Lists the name of the subscriptions for this topic.", - "response": { - "$ref": "ListTopicSubscriptionsResponse" - }, - "parameterOrder": [ - "topic" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "pageToken": { - "type": "string", - "location": "query", - "description": "The value returned by the last `ListTopicSubscriptionsResponse`; indicates\nthat this is a continuation of a prior `ListTopicSubscriptions` call, and\nthat the system should return the next page of data." - }, - "pageSize": { - "format": "int32", - "description": "Maximum number of subscription names to return.", - "type": "integer", - "location": "query" - }, - "topic": { - "location": "path", - "description": "The name of the topic that subscriptions are attached to.\nFormat is `projects/{project}/topics/{topic}`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/topics/{topicsId}/subscriptions" - } - } - } - } - }, "snapshots": { "methods": { "setIamPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub" ], "parameters": { "resource": { + "pattern": "^projects/[^/]+/snapshots/[^/]+$", "location": "path", "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", "type": "string", - "required": true, - "pattern": "^projects/[^/]+/snapshots/[^/]+$" + "required": true } }, "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}:setIamPolicy", - "id": "pubsub.projects.snapshots.setIamPolicy", "path": "v1/{+resource}:setIamPolicy", + "id": "pubsub.projects.snapshots.setIamPolicy", "request": { "$ref": "SetIamPolicyRequest" }, - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST" + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy." }, "testIamPermissions": { - "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}:testIamPermissions", - "id": "pubsub.projects.snapshots.testIamPermissions", - "path": "v1/{+resource}: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.", "request": { "$ref": "TestIamPermissionsRequest" }, - "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.", "response": { "$ref": "TestIamPermissionsResponse" }, @@ -329,24 +47,24 @@ "resource" ], "httpMethod": "POST", + "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.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/snapshots/[^/]+$", + "location": "path" + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub" ], - "parameters": { - "resource": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/snapshots/[^/]+$", - "location": "path", - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field." - } - } + "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}:testIamPermissions", + "id": "pubsub.projects.snapshots.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions" }, "getIamPolicy": { - "id": "pubsub.projects.snapshots.getIamPolicy", - "path": "v1/{+resource}: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.", "response": { "$ref": "Policy" }, @@ -354,26 +72,55 @@ "resource" ], "httpMethod": "GET", + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/snapshots/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub" ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/snapshots/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}:getIamPolicy" + "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}:getIamPolicy", + "id": "pubsub.projects.snapshots.getIamPolicy", + "path": "v1/{+resource}: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." } } }, "subscriptions": { "methods": { - "modifyPushConfig": { + "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.", + "httpMethod": "GET", + "response": { + "$ref": "Policy" + }, + "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.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "id": "pubsub.projects.subscriptions.getIamPolicy" + }, + "modifyAckDeadline": { "response": { "$ref": "Empty" }, @@ -381,6 +128,10 @@ "subscription" ], "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], "parameters": { "subscription": { "description": "The name of the subscription.\nFormat is `projects/{project}/subscriptions/{sub}`.", @@ -390,169 +141,17 @@ "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyPushConfig", - "id": "pubsub.projects.subscriptions.modifyPushConfig", - "path": "v1/{+subscription}:modifyPushConfig", - "description": "Modifies the `PushConfig` for a specified subscription.\n\nThis may be used to change a push subscription to a pull one (signified by\nan empty `PushConfig`) or vice versa, or change the endpoint URL and other\nattributes of a push subscription. Messages will accumulate for delivery\ncontinuously through the call regardless of changes to the `PushConfig`.", + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyAckDeadline", + "id": "pubsub.projects.subscriptions.modifyAckDeadline", + "path": "v1/{+subscription}:modifyAckDeadline", "request": { - "$ref": "ModifyPushConfigRequest" - } - }, - "pull": { - "response": { - "$ref": "PullResponse" + "$ref": "ModifyAckDeadlineRequest" }, - "parameterOrder": [ - "subscription" - ], - "httpMethod": "POST", - "parameters": { - "subscription": { - "description": "The subscription from which messages should be pulled.\nFormat is `projects/{project}/subscriptions/{sub}`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:pull", - "id": "pubsub.projects.subscriptions.pull", - "path": "v1/{+subscription}:pull", - "description": "Pulls messages from the server. Returns an empty list if there are no\nmessages available in the backlog. The server may return `UNAVAILABLE` if\nthere are too many concurrent pull requests pending for the given\nsubscription.", - "request": { - "$ref": "PullRequest" - } - }, - "delete": { - "description": "Deletes an existing subscription. All messages retained in the subscription\nare immediately dropped. Calls to `Pull` after deletion will return\n`NOT_FOUND`. After a subscription is deleted, a new one may be created with\nthe same name, but the new one has no association with the old\nsubscription or its topic unless the same topic is specified.", - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "subscription" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "subscription": { - "location": "path", - "description": "The subscription to delete.\nFormat is `projects/{project}/subscriptions/{sub}`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", - "path": "v1/{+subscription}", - "id": "pubsub.projects.subscriptions.delete" - }, - "list": { - "response": { - "$ref": "ListSubscriptionsResponse" - }, - "parameterOrder": [ - "project" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "The value returned by the last `ListSubscriptionsResponse`; indicates that\nthis is a continuation of a prior `ListSubscriptions` call, and that the\nsystem should return the next page of data.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum number of subscriptions to return.", - "type": "integer" - }, - "project": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "The name of the cloud project that subscriptions belong to.\nFormat is `projects/{project}`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1/projects/{projectsId}/subscriptions", - "id": "pubsub.projects.subscriptions.list", - "path": "v1/{+project}/subscriptions", - "description": "Lists matching subscriptions." - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "id": "pubsub.projects.subscriptions.setIamPolicy" - }, - "create": { - "path": "v1/{+name}", - "id": "pubsub.projects.subscriptions.create", - "request": { - "$ref": "Subscription" - }, - "description": "Creates a subscription to a given topic.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic, conforming\nto the\n[resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated name is populated in the returned Subscription object.\nNote that for REST API requests, you must specify a name in the request.", - "httpMethod": "PUT", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Subscription" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "description": "The name of the subscription. It must have the format\n`\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must\nstart with a letter, and contain only letters (`[A-Za-z]`), numbers\n(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),\nplus (`+`) or percent signs (`%`). It must be between 3 and 255 characters\nin length, and it must not start with `\"goog\"`." - } - }, - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}" + "description": "Modifies the ack deadline for a specific message. This method is useful\nto indicate that more time is needed to process a message by the\nsubscriber, or to make the message available for redelivery if the\nprocessing was interrupted. Note that this does not modify the\nsubscription-level `ackDeadlineSeconds` used for subsequent messages." }, "acknowledge": { + "path": "v1/{+subscription}:acknowledge", + "id": "pubsub.projects.subscriptions.acknowledge", "request": { "$ref": "AcknowledgeRequest" }, @@ -570,73 +169,23 @@ ], "parameters": { "subscription": { - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", "description": "The subscription whose message is being acknowledged.\nFormat is `projects/{project}/subscriptions/{sub}`.", "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:acknowledge", - "path": "v1/{+subscription}:acknowledge", - "id": "pubsub.projects.subscriptions.acknowledge" - }, - "modifyAckDeadline": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "subscription" - ], - "httpMethod": "POST", - "parameters": { - "subscription": { - "location": "path", - "description": "The name of the subscription.\nFormat is `projects/{project}/subscriptions/{sub}`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyAckDeadline", - "id": "pubsub.projects.subscriptions.modifyAckDeadline", - "path": "v1/{+subscription}:modifyAckDeadline", - "description": "Modifies the ack deadline for a specific message. This method is useful\nto indicate that more time is needed to process a message by the\nsubscriber, or to make the message available for redelivery if the\nprocessing was interrupted. Note that this does not modify the\nsubscription-level `ackDeadlineSeconds` used for subsequent messages.", - "request": { - "$ref": "ModifyAckDeadlineRequest" - } - }, - "getIamPolicy": { - "parameterOrder": [ - "resource" - ], - "httpMethod": "GET", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", "required": true, "pattern": "^projects/[^/]+/subscriptions/[^/]+$", "location": "path" } }, - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:getIamPolicy", - "id": "pubsub.projects.subscriptions.getIamPolicy", - "path": "v1/{+resource}: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}/subscriptions/{subscriptionsId}:acknowledge" }, "get": { + "httpMethod": "GET", + "response": { + "$ref": "Subscription" + }, + "parameterOrder": [ + "subscription" + ], "parameters": { "subscription": { "pattern": "^projects/[^/]+/subscriptions/[^/]+$", @@ -653,19 +202,304 @@ "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", "path": "v1/{+subscription}", "id": "pubsub.projects.subscriptions.get", - "description": "Gets the configuration details of a subscription.", - "httpMethod": "GET", + "description": "Gets the configuration details of a subscription." + }, + "testIamPermissions": { + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "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.", "response": { - "$ref": "Subscription" + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "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.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:testIamPermissions", + "id": "pubsub.projects.subscriptions.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions" + }, + "modifyPushConfig": { + "description": "Modifies the `PushConfig` for a specified subscription.\n\nThis may be used to change a push subscription to a pull one (signified by\nan empty `PushConfig`) or vice versa, or change the endpoint URL and other\nattributes of a push subscription. Messages will accumulate for delivery\ncontinuously through the call regardless of changes to the `PushConfig`.", + "request": { + "$ref": "ModifyPushConfigRequest" + }, + "response": { + "$ref": "Empty" }, "parameterOrder": [ "subscription" - ] + ], + "httpMethod": "POST", + "parameters": { + "subscription": { + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path", + "description": "The name of the subscription.\nFormat is `projects/{project}/subscriptions/{sub}`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyPushConfig", + "id": "pubsub.projects.subscriptions.modifyPushConfig", + "path": "v1/{+subscription}:modifyPushConfig" + }, + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "subscription" + ], + "parameters": { + "subscription": { + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path", + "description": "The subscription to delete.\nFormat is `projects/{project}/subscriptions/{sub}`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", + "path": "v1/{+subscription}", + "id": "pubsub.projects.subscriptions.delete", + "description": "Deletes an existing subscription. All messages retained in the subscription\nare immediately dropped. Calls to `Pull` after deletion will return\n`NOT_FOUND`. After a subscription is deleted, a new one may be created with\nthe same name, but the new one has no association with the old\nsubscription or its topic unless the same topic is specified." + }, + "pull": { + "httpMethod": "POST", + "parameterOrder": [ + "subscription" + ], + "response": { + "$ref": "PullResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "subscription": { + "description": "The subscription from which messages should be pulled.\nFormat is `projects/{project}/subscriptions/{sub}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:pull", + "path": "v1/{+subscription}:pull", + "id": "pubsub.projects.subscriptions.pull", + "request": { + "$ref": "PullRequest" + }, + "description": "Pulls messages from the server. Returns an empty list if there are no\nmessages available in the backlog. The server may return `UNAVAILABLE` if\nthere are too many concurrent pull requests pending for the given\nsubscription." + }, + "list": { + "description": "Lists matching subscriptions.", + "httpMethod": "GET", + "response": { + "$ref": "ListSubscriptionsResponse" + }, + "parameterOrder": [ + "project" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "pageToken": { + "description": "The value returned by the last `ListSubscriptionsResponse`; indicates that\nthis is a continuation of a prior `ListSubscriptions` call, and that the\nsystem should return the next page of data.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Maximum number of subscriptions to return.", + "type": "integer", + "location": "query" + }, + "project": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "The name of the cloud project that subscriptions belong to.\nFormat is `projects/{project}`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/subscriptions", + "path": "v1/{+project}/subscriptions", + "id": "pubsub.projects.subscriptions.list" + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:setIamPolicy", + "id": "pubsub.projects.subscriptions.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy" + }, + "create": { + "httpMethod": "PUT", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Subscription" + }, + "parameters": { + "name": { + "description": "The name of the subscription. It must have the format\n`\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must\nstart with a letter, and contain only letters (`[A-Za-z]`), numbers\n(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),\nplus (`+`) or percent signs (`%`). It must be between 3 and 255 characters\nin length, and it must not start with `\"goog\"`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", + "path": "v1/{+name}", + "id": "pubsub.projects.subscriptions.create", + "description": "Creates a subscription to a given topic.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic, conforming\nto the\n[resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated name is populated in the returned Subscription object.\nNote that for REST API requests, you must specify a name in the request.", + "request": { + "$ref": "Subscription" + } + } + } + }, + "topics": { + "methods": { + "getIamPolicy": { + "httpMethod": "GET", + "response": { + "$ref": "Policy" + }, + "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.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/topics/{topicsId}:getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "id": "pubsub.projects.topics.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." + }, + "get": { + "response": { + "$ref": "Topic" + }, + "parameterOrder": [ + "topic" + ], + "httpMethod": "GET", + "parameters": { + "topic": { + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path", + "description": "The name of the topic to get.\nFormat is `projects/{project}/topics/{topic}`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/topics/{topicsId}", + "id": "pubsub.projects.topics.get", + "path": "v1/{+topic}", + "description": "Gets the configuration of a topic." + }, + "publish": { + "response": { + "$ref": "PublishResponse" + }, + "parameterOrder": [ + "topic" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "topic": { + "description": "The messages in the request will be published on this topic.\nFormat is `projects/{project}/topics/{topic}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/topics/{topicsId}:publish", + "id": "pubsub.projects.topics.publish", + "path": "v1/{+topic}:publish", + "request": { + "$ref": "PublishRequest" + }, + "description": "Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic\ndoes not exist. The message payload must not be empty; it must contain\n either a non-empty data field, or at least one attribute." }, "testIamPermissions": { - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:testIamPermissions", "path": "v1/{+resource}:testIamPermissions", - "id": "pubsub.projects.subscriptions.testIamPermissions", + "id": "pubsub.projects.topics.testIamPermissions", "request": { "$ref": "TestIamPermissionsRequest" }, @@ -683,11 +517,176 @@ ], "parameters": { "resource": { - "location": "path", "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", "type": "string", "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/topics/{topicsId}:testIamPermissions" + }, + "delete": { + "id": "pubsub.projects.topics.delete", + "path": "v1/{+topic}", + "description": "Deletes the topic with the given name. Returns `NOT_FOUND` if the topic\ndoes not exist. After a topic is deleted, a new topic may be created with\nthe same name; this is an entirely new topic with none of the old\nconfiguration or subscriptions. Existing subscriptions to this topic are\nnot deleted, but their `topic` field is set to `_deleted-topic_`.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "topic" + ], + "httpMethod": "DELETE", + "parameters": { + "topic": { + "description": "Name of the topic to delete.\nFormat is `projects/{project}/topics/{topic}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/topics/{topicsId}" + }, + "list": { + "response": { + "$ref": "ListTopicsResponse" + }, + "parameterOrder": [ + "project" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "pageToken": { + "description": "The value returned by the last `ListTopicsResponse`; indicates that this is\na continuation of a prior `ListTopics` call, and that the system should\nreturn the next page of data.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Maximum number of topics to return.", + "type": "integer", + "location": "query" + }, + "project": { + "description": "The name of the cloud project that topics belong to.\nFormat is `projects/{project}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/topics", + "id": "pubsub.projects.topics.list", + "path": "v1/{+project}/topics", + "description": "Lists matching topics." + }, + "setIamPolicy": { + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/topics/{topicsId}:setIamPolicy", + "id": "pubsub.projects.topics.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "SetIamPolicyRequest" + } + }, + "create": { + "response": { + "$ref": "Topic" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path", + "description": "The name of the topic. It must have the format\n`\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter,\nand contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),\nunderscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent\nsigns (`%`). It must be between 3 and 255 characters in length, and it\nmust not start with `\"goog\"`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/topics/{topicsId}", + "id": "pubsub.projects.topics.create", + "path": "v1/{+name}", + "description": "Creates the given topic with the given name.", + "request": { + "$ref": "Topic" + } + } + }, + "resources": { + "subscriptions": { + "methods": { + "list": { + "response": { + "$ref": "ListTopicSubscriptionsResponse" + }, + "parameterOrder": [ + "topic" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "The value returned by the last `ListTopicSubscriptionsResponse`; indicates\nthat this is a continuation of a prior `ListTopicSubscriptions` call, and\nthat the system should return the next page of data.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Maximum number of subscription names to return.", + "type": "integer", + "location": "query" + }, + "topic": { + "description": "The name of the topic that subscriptions are attached to.\nFormat is `projects/{project}/topics/{topic}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/topics/{topicsId}/subscriptions", + "id": "pubsub.projects.topics.subscriptions.list", + "path": "v1/{+topic}/subscriptions", + "description": "Lists the name of the subscriptions for this topic." } } } @@ -697,26 +696,16 @@ } }, "parameters": { - "key": { - "location": "query", - "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.", - "type": "string" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, "quotaUser": { - "location": "query", "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.", - "type": "string" + "type": "string", + "location": "query" }, "pp": { - "location": "query", "description": "Pretty-print response.", "default": "true", - "type": "boolean" + "type": "boolean", + "location": "query" }, "bearer_token": { "description": "OAuth bearer token.", @@ -729,15 +718,15 @@ "type": "string" }, "upload_protocol": { - "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" + "type": "string", + "location": "query" }, "prettyPrint": { + "location": "query", "description": "Returns response with indentations and line breaks.", "default": "true", - "type": "boolean", - "location": "query" + "type": "boolean" }, "fields": { "description": "Selector specifying which fields to include in a partial response.", @@ -745,9 +734,9 @@ "location": "query" }, "uploadType": { - "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" + "type": "string", + "location": "query" }, "$.xgafv": { "enumDescriptions": [ @@ -768,6 +757,8 @@ "type": "string" }, "alt": { + "description": "Data format for response.", + "default": "json", "enum": [ "json", "media", @@ -779,31 +770,87 @@ "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], + "location": "query" + }, + "access_token": { "location": "query", - "description": "Data format for response.", - "default": "json" + "description": "OAuth access token.", + "type": "string" + }, + "key": { + "location": "query", + "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.", + "type": "string" } }, "schemas": { - "AcknowledgeRequest": { - "description": "Request for the Acknowledge method.", + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", "type": "object", "properties": { - "ackIds": { - "description": "The acknowledgment ID for the messages being acknowledged that was returned\nby the Pub/Sub system in the `Pull` response. Must not be empty.", + "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." + } + }, + "id": "SetIamPolicyRequest" + }, + "PubsubMessage": { + "properties": { + "messageId": { + "description": "ID of this message, assigned by the server when the message is published.\nGuaranteed to be unique within the topic. This value may be read by a\nsubscriber that receives a `PubsubMessage` via a `Pull` call or a push\ndelivery. It must not be populated by the publisher in a `Publish` call.", + "type": "string" + }, + "attributes": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional attributes for this message.", + "type": "object" + }, + "publishTime": { + "format": "google-datetime", + "description": "The time at which the message was published, populated by the server when\nit receives the `Publish` call. It must not be populated by the\npublisher in a `Publish` call.", + "type": "string" + }, + "data": { + "format": "byte", + "description": "The message payload.", + "type": "string" + } + }, + "id": "PubsubMessage", + "description": "A message data and its attributes. The message payload must not be empty;\nit must contain either a non-empty data field, or at least one attribute.", + "type": "object" + }, + "ModifyPushConfigRequest": { + "properties": { + "pushConfig": { + "$ref": "PushConfig", + "description": "The push configuration for future deliveries.\n\nAn empty `pushConfig` indicates that the Pub/Sub system should\nstop pushing messages from the given subscription and allow\nmessages to be pulled and acknowledged - effectively pausing\nthe subscription if `Pull` is not called." + } + }, + "id": "ModifyPushConfigRequest", + "description": "Request for the ModifyPushConfig method.", + "type": "object" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "type": "object", + "properties": { + "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` or `joe@example.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`.\nRequired", + "type": "string" } }, - "id": "AcknowledgeRequest" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" + "id": "Binding" }, "ListTopicsResponse": { "description": "Response for the `ListTopics` method.", @@ -823,26 +870,45 @@ }, "id": "ListTopicsResponse" }, - "ListTopicSubscriptionsResponse": { - "description": "Response for the `ListTopicSubscriptions` method.", + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "type": "object", + "properties": {}, + "id": "Empty" + }, + "AcknowledgeRequest": { + "properties": { + "ackIds": { + "description": "The acknowledgment ID for the messages being acknowledged that was returned\nby the Pub/Sub system in the `Pull` response. Must not be empty.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "AcknowledgeRequest", + "description": "Request for the Acknowledge method.", + "type": "object" + }, + "ListTopicSubscriptionsResponse": { "properties": { "nextPageToken": { "description": "If not empty, indicates that there may be more subscriptions that match\nthe request; this value should be passed in a new\n`ListTopicSubscriptionsRequest` to get more subscriptions.", "type": "string" }, "subscriptions": { + "description": "The names of the subscriptions that match the request.", "items": { "type": "string" }, - "type": "array", - "description": "The names of the subscriptions that match the request." + "type": "array" } }, - "id": "ListTopicSubscriptionsResponse" + "id": "ListTopicSubscriptionsResponse", + "description": "Response for the `ListTopicSubscriptions` method.", + "type": "object" }, "PullResponse": { - "type": "object", "properties": { "receivedMessages": { "description": "Received Pub/Sub messages. The Pub/Sub system will return zero messages if\nthere are no more available in the backlog. The Pub/Sub system may return\nfewer than the `maxMessages` requested even if there are more messages\navailable in the backlog.", @@ -853,19 +919,20 @@ } }, "id": "PullResponse", - "description": "Response for the `Pull` method." + "description": "Response for the `Pull` method.", + "type": "object" }, "ReceivedMessage": { "description": "A message and its corresponding acknowledgment ID.", "type": "object", "properties": { + "message": { + "$ref": "PubsubMessage", + "description": "The message." + }, "ackId": { "description": "This ID can be used to acknowledge the received message.", "type": "string" - }, - "message": { - "description": "The message.", - "$ref": "PubsubMessage" } }, "id": "ReceivedMessage" @@ -875,11 +942,11 @@ "type": "object", "properties": { "attributes": { - "description": "Endpoint configuration attributes.\n\nEvery endpoint has a set of API supported attributes that can be used to\ncontrol different aspects of the message delivery.\n\nThe currently supported attribute is `x-goog-version`, which you can\nuse to change the format of the pushed message. This attribute\nindicates the version of the data expected by the endpoint. This\ncontrols the shape of the pushed message (i.e., its fields and metadata).\nThe endpoint version is based on the version of the Pub/Sub API.\n\nIf not present during the `CreateSubscription` call, it will default to\nthe version of the API used to make such call. If not present during a\n`ModifyPushConfig` call, its value will not be changed. `GetSubscription`\ncalls will always return a valid version, even if the subscription was\ncreated without this attribute.\n\nThe possible values for this attribute are:\n\n* `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.\n* `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.", - "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "Endpoint configuration attributes.\n\nEvery endpoint has a set of API supported attributes that can be used to\ncontrol different aspects of the message delivery.\n\nThe currently supported attribute is `x-goog-version`, which you can\nuse to change the format of the pushed message. This attribute\nindicates the version of the data expected by the endpoint. This\ncontrols the shape of the pushed message (i.e., its fields and metadata).\nThe endpoint version is based on the version of the Pub/Sub API.\n\nIf not present during the `CreateSubscription` call, it will default to\nthe version of the API used to make such call. If not present during a\n`ModifyPushConfig` call, its value will not be changed. `GetSubscription`\ncalls will always return a valid version, even if the subscription was\ncreated without this attribute.\n\nThe possible values for this attribute are:\n\n* `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.\n* `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.", + "type": "object" }, "pushEndpoint": { "description": "A URL locating the endpoint to which messages should be pushed.\nFor example, a Webhook endpoint might use \"https://example.com/push\".", @@ -906,22 +973,19 @@ "description": "Request for the `Pull` method.", "type": "object", "properties": { + "returnImmediately": { + "description": "If this field set to true, the system will respond immediately even if\nit there are no messages available to return in the `Pull` response.\nOtherwise, the system may wait (for a bounded amount of time) until at\nleast one message is available, rather than returning no messages. The\nclient may cancel the request if it does not wish to wait any longer for\nthe response.", + "type": "boolean" + }, "maxMessages": { "format": "int32", "description": "The maximum number of messages returned for this request. The Pub/Sub\nsystem may return fewer than the number specified.", "type": "integer" - }, - "returnImmediately": { - "description": "If this field set to true, the system will respond immediately even if\nit there are no messages available to return in the `Pull` response.\nOtherwise, the system may wait (for a bounded amount of time) until at\nleast one message is available, rather than returning no messages. The\nclient may cancel the request if it does not wish to wait any longer for\nthe response.", - "type": "boolean" } }, "id": "PullRequest" }, "ListSubscriptionsResponse": { - "id": "ListSubscriptionsResponse", - "description": "Response for the `ListSubscriptions` method.", - "type": "object", "properties": { "nextPageToken": { "description": "If not empty, indicates that there may be more subscriptions that match\nthe request; this value should be passed in a new\n`ListSubscriptionsRequest` to get more subscriptions.", @@ -934,11 +998,12 @@ }, "type": "array" } - } + }, + "id": "ListSubscriptionsResponse", + "description": "Response for the `ListSubscriptions` method.", + "type": "object" }, "PublishRequest": { - "description": "Request for the Publish method.", - "type": "object", "properties": { "messages": { "description": "The messages to publish.", @@ -948,11 +1013,11 @@ "type": "array" } }, - "id": "PublishRequest" + "id": "PublishRequest", + "description": "Request for the Publish method.", + "type": "object" }, "PublishResponse": { - "description": "Response for the `Publish` method.", - "type": "object", "properties": { "messageIds": { "description": "The server-assigned ID of each published message, in the same order as\nthe messages in the request. IDs are guaranteed to be unique within\nthe topic.", @@ -962,10 +1027,11 @@ "type": "array" } }, - "id": "PublishResponse" + "id": "PublishResponse", + "description": "Response for the `Publish` method.", + "type": "object" }, "Subscription": { - "type": "object", "properties": { "pushConfig": { "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.", @@ -986,10 +1052,10 @@ } }, "id": "Subscription", - "description": "A subscription resource." + "description": "A subscription resource.", + "type": "object" }, "TestIamPermissionsRequest": { - "type": "object", "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).", @@ -1000,31 +1066,8 @@ } }, "id": "TestIamPermissionsRequest", - "description": "Request message for `TestIamPermissions` method." - }, - "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "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": { - "format": "byte", - "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.", - "type": "string" - }, - "version": { - "format": "int32", - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer" - } - }, - "id": "Policy" + "description": "Request message for `TestIamPermissions` method.", + "type": "object" }, "Topic": { "description": "A topic resource.", @@ -1037,9 +1080,31 @@ }, "id": "Topic" }, + "Policy": { + "properties": { + "etag": { + "format": "byte", + "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.", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" + }, + "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" + } + }, + "id": "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object" + }, "ModifyAckDeadlineRequest": { - "description": "Request for the ModifyAckDeadline method.", - "type": "object", "properties": { "ackDeadlineSeconds": { "format": "int32", @@ -1054,82 +1119,16 @@ "type": "array" } }, - "id": "ModifyAckDeadlineRequest" - }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "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." - } - }, - "id": "SetIamPolicyRequest" - }, - "ModifyPushConfigRequest": { - "description": "Request for the ModifyPushConfig method.", - "type": "object", - "properties": { - "pushConfig": { - "description": "The push configuration for future deliveries.\n\nAn empty `pushConfig` indicates that the Pub/Sub system should\nstop pushing messages from the given subscription and allow\nmessages to be pulled and acknowledged - effectively pausing\nthe subscription if `Pull` is not called.", - "$ref": "PushConfig" - } - }, - "id": "ModifyPushConfigRequest" - }, - "PubsubMessage": { - "description": "A message data and its attributes. The message payload must not be empty;\nit must contain either a non-empty data field, or at least one attribute.", - "type": "object", - "properties": { - "messageId": { - "description": "ID of this message, assigned by the server when the message is published.\nGuaranteed to be unique within the topic. This value may be read by a\nsubscriber that receives a `PubsubMessage` via a `Pull` call or a push\ndelivery. It must not be populated by the publisher in a `Publish` call.", - "type": "string" - }, - "attributes": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional attributes for this message.", - "type": "object" - }, - "publishTime": { - "format": "google-datetime", - "description": "The time at which the message was published, populated by the server when\nit receives the `Publish` call. It must not be populated by the\npublisher in a `Publish` call.", - "type": "string" - }, - "data": { - "format": "byte", - "description": "The message payload.", - "type": "string" - } - }, - "id": "PubsubMessage" - }, - "Binding": { - "properties": { - "role": { - "type": "string", - "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired" - }, - "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` or `joe@example.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" - } - }, - "id": "Binding", - "description": "Associates `members` with a `role`.", + "id": "ModifyAckDeadlineRequest", + "description": "Request for the ModifyAckDeadline method.", "type": "object" } }, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, "version": "v1", "baseUrl": "https://pubsub.googleapis.com/", "canonicalName": "Pubsub", @@ -1145,9 +1144,9 @@ } } }, - "kind": "discovery#restDescription", - "description": "Provides reliable, many-to-many, asynchronous messaging between applications.\n", "servicePath": "", + "description": "Provides reliable, many-to-many, asynchronous messaging between applications.\n", + "kind": "discovery#restDescription", "rootUrl": "https://pubsub.googleapis.com/", "basePath": "", "ownerDomain": "google.com", @@ -1155,5 +1154,6 @@ "batchPath": "batch", "id": "pubsub:v1", "documentationLink": "https://cloud.google.com/pubsub/docs", - "revision": "20170630" + "revision": "20170829", + "title": "Google Cloud Pub/Sub API" } diff --git a/vendor/google.golang.org/api/pubsub/v1beta1a/pubsub-api.json b/vendor/google.golang.org/api/pubsub/v1beta1a/pubsub-api.json index e1dae3ce0..e22f3dec0 100644 --- a/vendor/google.golang.org/api/pubsub/v1beta1a/pubsub-api.json +++ b/vendor/google.golang.org/api/pubsub/v1beta1a/pubsub-api.json @@ -1,15 +1,179 @@ { + "baseUrl": "https://pubsub.googleapis.com/", + "canonicalName": "Pubsub", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/pubsub": { + "description": "View and manage Pub/Sub topics and subscriptions" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "servicePath": "", + "kind": "discovery#restDescription", + "description": "Provides reliable, many-to-many, asynchronous messaging between applications.\n", + "rootUrl": "https://pubsub.googleapis.com/", "basePath": "", "ownerDomain": "google.com", "name": "pubsub", "batchPath": "batch", - "id": "pubsub:v1beta1a", + "revision": "20170829", "documentationLink": "https://cloud.google.com/pubsub/docs", - "revision": "20170630", + "id": "pubsub:v1beta1a", "title": "Google Cloud Pub/Sub API", - "ownerName": "Google", "discoveryVersion": "v1", + "ownerName": "Google", "resources": { + "topics": { + "methods": { + "delete": { + "flatPath": "v1beta1a/topics/{topicsId}", + "id": "pubsub.topics.delete", + "path": "v1beta1a/topics/{+topic}", + "description": "Deletes the topic with the given name. Returns NOT_FOUND if the topic does\nnot exist. After a topic is deleted, a new topic may be created with the\nsame name.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "topic" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "topic": { + "location": "path", + "description": "Name of the topic to delete.", + "type": "string", + "required": true, + "pattern": "^.+$" + } + } + }, + "publishBatch": { + "description": "Adds one or more messages to the topic. Returns NOT_FOUND if the topic does\nnot exist.", + "request": { + "$ref": "PublishBatchRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "PublishBatchResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta1a/topics/publishBatch", + "path": "v1beta1a/topics/publishBatch", + "id": "pubsub.topics.publishBatch" + }, + "list": { + "response": { + "$ref": "ListTopicsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "The value obtained in the last \u003ccode\u003eListTopicsResponse\u003c/code\u003e\nfor continuation.", + "type": "string" + }, + "maxResults": { + "location": "query", + "format": "int32", + "description": "Maximum number of topics to return.", + "type": "integer" + }, + "query": { + "description": "A valid label query expression.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta1a/topics", + "id": "pubsub.topics.list", + "path": "v1beta1a/topics", + "description": "Lists matching topics." + }, + "create": { + "description": "Creates the given topic with the given name.", + "request": { + "$ref": "Topic" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Topic" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta1a/topics", + "path": "v1beta1a/topics", + "id": "pubsub.topics.create" + }, + "get": { + "description": "Gets the configuration of a topic. Since the topic only has the name\nattribute, this method is only useful to check the existence of a topic.\nIf other attributes are added in the future, they will be returned here.", + "httpMethod": "GET", + "parameterOrder": [ + "topic" + ], + "response": { + "$ref": "Topic" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "topic": { + "location": "path", + "description": "The name of the topic to get.", + "type": "string", + "required": true, + "pattern": "^.+$" + } + }, + "flatPath": "v1beta1a/topics/{topicsId}", + "path": "v1beta1a/topics/{+topic}", + "id": "pubsub.topics.get" + }, + "publish": { + "description": "Adds a message to the topic. Returns NOT_FOUND if the topic does not\nexist.", + "request": { + "$ref": "PublishRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Empty" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta1a/topics/publish", + "path": "v1beta1a/topics/publish", + "id": "pubsub.topics.publish" + } + } + }, "subscriptions": { "methods": { "get": { @@ -30,15 +194,22 @@ ], "parameters": { "subscription": { + "location": "path", + "description": "The name of the subscription to get.", "type": "string", "required": true, - "pattern": "^.+$", - "location": "path", - "description": "The name of the subscription to get." + "pattern": "^.+$" } } }, "pullBatch": { + "flatPath": "v1beta1a/subscriptions/pullBatch", + "id": "pubsub.subscriptions.pullBatch", + "path": "v1beta1a/subscriptions/pullBatch", + "description": "Pulls messages from the server. Returns an empty list if there are no\nmessages available in the backlog. The system is free to return UNAVAILABLE\nif there are too many pull requests outstanding for the given subscription.", + "request": { + "$ref": "PullBatchRequest" + }, "response": { "$ref": "PullBatchResponse" }, @@ -48,254 +219,37 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1beta1a/subscriptions/pullBatch", - "id": "pubsub.subscriptions.pullBatch", - "path": "v1beta1a/subscriptions/pullBatch", - "description": "Pulls messages from the server. Returns an empty list if there are no\nmessages available in the backlog. The system is free to return UNAVAILABLE\nif there are too many pull requests outstanding for the given subscription.", - "request": { - "$ref": "PullBatchRequest" - } + ] }, "modifyPushConfig": { - "id": "pubsub.subscriptions.modifyPushConfig", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": {}, + "flatPath": "v1beta1a/subscriptions/modifyPushConfig", "path": "v1beta1a/subscriptions/modifyPushConfig", - "description": "Modifies the \u003ccode\u003ePushConfig\u003c/code\u003e for a specified subscription.\nThis method can be used to suspend the flow of messages to an endpoint\nby clearing the \u003ccode\u003ePushConfig\u003c/code\u003e field in the request. Messages\nwill be accumulated for delivery even if no push configuration is\ndefined or while the configuration is modified.", + "id": "pubsub.subscriptions.modifyPushConfig", "request": { "$ref": "ModifyPushConfigRequest" }, - "response": { - "$ref": "Empty" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1beta1a/subscriptions/modifyPushConfig" + "description": "Modifies the \u003ccode\u003ePushConfig\u003c/code\u003e for a specified subscription.\nThis method can be used to suspend the flow of messages to an endpoint\nby clearing the \u003ccode\u003ePushConfig\u003c/code\u003e field in the request. Messages\nwill be accumulated for delivery even if no push configuration is\ndefined or while the configuration is modified." }, "pull": { - "response": { - "$ref": "PullResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], "flatPath": "v1beta1a/subscriptions/pull", "id": "pubsub.subscriptions.pull", "path": "v1beta1a/subscriptions/pull", - "description": "Pulls a single message from the server.\nIf return_immediately is true, and no messages are available in the\nsubscription, this method returns FAILED_PRECONDITION. The system is free\nto return an UNAVAILABLE error if no messages are available in a\nreasonable amount of time (to reduce system load).", "request": { "$ref": "PullRequest" - } - }, - "delete": { - "flatPath": "v1beta1a/subscriptions/{subscriptionsId}", - "id": "pubsub.subscriptions.delete", - "path": "v1beta1a/subscriptions/{+subscription}", - "description": "Deletes an existing subscription. All pending messages in the subscription\nare immediately dropped. Calls to Pull after deletion will return\nNOT_FOUND.", + }, + "description": "Pulls a single message from the server.\nIf return_immediately is true, and no messages are available in the\nsubscription, this method returns FAILED_PRECONDITION. The system is free\nto return an UNAVAILABLE error if no messages are available in a\nreasonable amount of time (to reduce system load).", "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "subscription" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "subscription": { - "location": "path", - "description": "The subscription to delete.", - "type": "string", - "required": true, - "pattern": "^.+$" - } - } - }, - "list": { - "description": "Lists matching subscriptions.", - "httpMethod": "GET", - "response": { - "$ref": "ListSubscriptionsResponse" - }, - "parameterOrder": [], - "parameters": { - "pageToken": { - "location": "query", - "description": "The value obtained in the last \u003ccode\u003eListSubscriptionsResponse\u003c/code\u003e\nfor continuation.", - "type": "string" - }, - "maxResults": { - "location": "query", - "format": "int32", - "description": "Maximum number of subscriptions to return.", - "type": "integer" - }, - "query": { - "location": "query", - "description": "A valid label query expression.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1beta1a/subscriptions", - "path": "v1beta1a/subscriptions", - "id": "pubsub.subscriptions.list" - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "Subscription" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": {}, - "flatPath": "v1beta1a/subscriptions", - "path": "v1beta1a/subscriptions", - "id": "pubsub.subscriptions.create", - "request": { - "$ref": "Subscription" - }, - "description": "Creates a subscription on a given topic for a given subscriber.\nIf the subscription already exists, returns ALREADY_EXISTS.\nIf the corresponding topic doesn't exist, returns NOT_FOUND.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic." - }, - "acknowledge": { - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "Empty" - }, - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1beta1a/subscriptions/acknowledge", - "path": "v1beta1a/subscriptions/acknowledge", - "id": "pubsub.subscriptions.acknowledge", - "description": "Acknowledges a particular received message: the Pub/Sub system can remove\nthe given message from the subscription. Acknowledging a message whose\nAck deadline has expired may succeed, but the message could have been\nalready redelivered. Acknowledging a message more than once will not\nresult in an error. This is only used for messages received via pull.", - "request": { - "$ref": "AcknowledgeRequest" - } - }, - "modifyAckDeadline": { - "request": { - "$ref": "ModifyAckDeadlineRequest" - }, - "description": "Modifies the Ack deadline for a message received from a pull request.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": {}, - "flatPath": "v1beta1a/subscriptions/modifyAckDeadline", - "id": "pubsub.subscriptions.modifyAckDeadline", - "path": "v1beta1a/subscriptions/modifyAckDeadline" - } - } - }, - "topics": { - "methods": { - "get": { - "description": "Gets the configuration of a topic. Since the topic only has the name\nattribute, this method is only useful to check the existence of a topic.\nIf other attributes are added in the future, they will be returned here.", - "response": { - "$ref": "Topic" - }, - "parameterOrder": [ - "topic" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "topic": { - "location": "path", - "description": "The name of the topic to get.", - "type": "string", - "required": true, - "pattern": "^.+$" - } - }, - "flatPath": "v1beta1a/topics/{topicsId}", - "id": "pubsub.topics.get", - "path": "v1beta1a/topics/{+topic}" - }, - "publish": { - "id": "pubsub.topics.publish", - "path": "v1beta1a/topics/publish", - "request": { - "$ref": "PublishRequest" - }, - "description": "Adds a message to the topic. Returns NOT_FOUND if the topic does not\nexist.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": {}, - "flatPath": "v1beta1a/topics/publish" - }, - "delete": { - "description": "Deletes the topic with the given name. Returns NOT_FOUND if the topic does\nnot exist. After a topic is deleted, a new topic may be created with the\nsame name.", - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "topic" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "topic": { - "location": "path", - "description": "Name of the topic to delete.", - "type": "string", - "required": true, - "pattern": "^.+$" - } - }, - "flatPath": "v1beta1a/topics/{topicsId}", - "path": "v1beta1a/topics/{+topic}", - "id": "pubsub.topics.delete" - }, - "publishBatch": { - "flatPath": "v1beta1a/topics/publishBatch", - "id": "pubsub.topics.publishBatch", - "path": "v1beta1a/topics/publishBatch", - "request": { - "$ref": "PublishBatchRequest" - }, - "description": "Adds one or more messages to the topic. Returns NOT_FOUND if the topic does\nnot exist.", - "response": { - "$ref": "PublishBatchResponse" + "$ref": "PullResponse" }, "parameterOrder": [], "httpMethod": "POST", @@ -305,103 +259,136 @@ ], "parameters": {} }, - "list": { + "delete": { + "description": "Deletes an existing subscription. All pending messages in the subscription\nare immediately dropped. Calls to Pull after deletion will return\nNOT_FOUND.", + "httpMethod": "DELETE", + "parameterOrder": [ + "subscription" + ], "response": { - "$ref": "ListTopicsResponse" + "$ref": "Empty" }, - "parameterOrder": [], - "httpMethod": "GET", "parameters": { - "maxResults": { - "location": "query", - "format": "int32", - "description": "Maximum number of topics to return.", - "type": "integer" - }, - "query": { - "location": "query", - "description": "A valid label query expression.", - "type": "string" - }, - "pageToken": { - "location": "query", - "description": "The value obtained in the last \u003ccode\u003eListTopicsResponse\u003c/code\u003e\nfor continuation.", - "type": "string" + "subscription": { + "location": "path", + "description": "The subscription to delete.", + "type": "string", + "required": true, + "pattern": "^.+$" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub" ], - "flatPath": "v1beta1a/topics", - "id": "pubsub.topics.list", - "path": "v1beta1a/topics", - "description": "Lists matching topics." + "flatPath": "v1beta1a/subscriptions/{subscriptionsId}", + "path": "v1beta1a/subscriptions/{+subscription}", + "id": "pubsub.subscriptions.delete" + }, + "list": { + "response": { + "$ref": "ListSubscriptionsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "maxResults": { + "format": "int32", + "description": "Maximum number of subscriptions to return.", + "type": "integer", + "location": "query" + }, + "query": { + "description": "A valid label query expression.", + "type": "string", + "location": "query" + }, + "pageToken": { + "description": "The value obtained in the last \u003ccode\u003eListSubscriptionsResponse\u003c/code\u003e\nfor continuation.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1beta1a/subscriptions", + "id": "pubsub.subscriptions.list", + "path": "v1beta1a/subscriptions", + "description": "Lists matching subscriptions." }, "create": { - "description": "Creates the given topic with the given name.", "request": { - "$ref": "Topic" + "$ref": "Subscription" + }, + "description": "Creates a subscription on a given topic for a given subscriber.\nIf the subscription already exists, returns ALREADY_EXISTS.\nIf the corresponding topic doesn't exist, returns NOT_FOUND.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic.", + "response": { + "$ref": "Subscription" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": {}, + "flatPath": "v1beta1a/subscriptions", + "id": "pubsub.subscriptions.create", + "path": "v1beta1a/subscriptions" + }, + "acknowledge": { + "flatPath": "v1beta1a/subscriptions/acknowledge", + "id": "pubsub.subscriptions.acknowledge", + "path": "v1beta1a/subscriptions/acknowledge", + "description": "Acknowledges a particular received message: the Pub/Sub system can remove\nthe given message from the subscription. Acknowledging a message whose\nAck deadline has expired may succeed, but the message could have been\nalready redelivered. Acknowledging a message more than once will not\nresult in an error. This is only used for messages received via pull.", + "request": { + "$ref": "AcknowledgeRequest" }, "response": { - "$ref": "Topic" + "$ref": "Empty" }, "parameterOrder": [], "httpMethod": "POST", "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ] + }, + "modifyAckDeadline": { + "request": { + "$ref": "ModifyAckDeadlineRequest" + }, + "description": "Modifies the Ack deadline for a message received from a pull request.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Empty" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub" ], - "flatPath": "v1beta1a/topics", - "id": "pubsub.topics.create", - "path": "v1beta1a/topics" + "parameters": {}, + "flatPath": "v1beta1a/subscriptions/modifyAckDeadline", + "path": "v1beta1a/subscriptions/modifyAckDeadline", + "id": "pubsub.subscriptions.modifyAckDeadline" } } } }, "parameters": { - "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.", - "type": "string", - "location": "query" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { - "type": "string", - "location": "query", - "description": "OAuth 2.0 token for the current user." - }, "upload_protocol": { - "type": "string", "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" }, "prettyPrint": { + "location": "query", "description": "Returns response with indentations and line breaks.", "default": "true", - "type": "boolean", - "location": "query" + "type": "boolean" }, "fields": { "location": "query", @@ -414,17 +401,17 @@ "type": "string" }, "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", "enum": [ "1", "2" ], "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" + "type": "string" }, "callback": { "location": "query", @@ -432,6 +419,12 @@ "type": "string" }, "alt": { + "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", "description": "Data format for response.", "default": "json", "enum": [ @@ -439,91 +432,53 @@ "media", "proto" ], + "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.", + "type": "string", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", "type": "string", - "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" } }, "schemas": { - "PullRequest": { - "description": "Request for the Pull method.", - "type": "object", - "properties": { - "subscription": { - "description": "The subscription from which a message should be pulled.", - "type": "string" - }, - "returnImmediately": { - "description": "If this is specified as true the system will respond immediately even if\nit is not able to return a message in the Pull response. Otherwise the\nsystem is allowed to wait until at least one message is available rather\nthan returning FAILED_PRECONDITION. The client may cancel the request if\nit does not wish to wait any longer for the response.", - "type": "boolean" - } - }, - "id": "PullRequest" - }, - "PubsubEvent": { - "properties": { - "subscription": { - "type": "string", - "description": "The subscription that received the event." - }, - "deleted": { - "description": "Indicates that this subscription has been deleted. (Note that pull\nsubscribers will always receive NOT_FOUND in response in their pull\nrequest on the subscription, rather than seeing this boolean.)", - "type": "boolean" - }, - "truncated": { - "description": "Indicates that this subscription has been truncated.", - "type": "boolean" - }, - "message": { - "$ref": "PubsubMessage", - "description": "A received message." - } - }, - "id": "PubsubEvent", - "description": "An event indicating a received message or truncation event.", - "type": "object" - }, - "ListSubscriptionsResponse": { - "id": "ListSubscriptionsResponse", - "description": "Response for the ListSubscriptions method.", - "type": "object", - "properties": { - "subscription": { - "items": { - "$ref": "Subscription" - }, - "type": "array", - "description": "The subscriptions that match the request." - }, - "nextPageToken": { - "description": "If not empty, indicates that there are more subscriptions that match the\nrequest and this value should be passed to the next\n\u003ccode\u003eListSubscriptionsRequest\u003c/code\u003e to continue.", - "type": "string" - } - } - }, - "PublishRequest": { - "id": "PublishRequest", - "description": "Request for the Publish method.", - "type": "object", - "properties": { - "topic": { - "description": "The message in the request will be published on this topic.", - "type": "string" - }, - "message": { - "$ref": "PubsubMessage", - "description": "The message to publish." - } - } - }, "Subscription": { "description": "A subscription resource.", "type": "object", "properties": { + "topic": { + "description": "The name of the topic from which this subscription is receiving messages.", + "type": "string" + }, + "pushConfig": { + "description": "If push delivery is used with this subscription, this field is\nused to configure it.", + "$ref": "PushConfig" + }, "ackDeadlineSeconds": { "format": "int32", "description": "For either push or pull delivery, the value is the maximum time after a\nsubscriber receives a message before the subscriber should acknowledge or\nNack the message. If the Ack deadline for a message passes without an\nAck or a Nack, the Pub/Sub system will eventually redeliver the message.\nIf a subscriber acknowledges after the deadline, the Pub/Sub system may\naccept the Ack, but it is possible that the message has been already\ndelivered again. Multiple Acks to the message are allowed and will\nsucceed.\n\nFor push delivery, this value is used to set the request timeout for\nthe call to the push endpoint.\n\nFor pull delivery, this value is used as the initial value for the Ack\ndeadline. It may be overridden for each message using its corresponding\nack_id with \u003ccode\u003eModifyAckDeadline\u003c/code\u003e.\nWhile a message is outstanding (i.e. it has been delivered to a pull\nsubscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub\nsystem will not deliver that message to another pull subscriber\n(on a best-effort basis).", @@ -532,20 +487,11 @@ "name": { "description": "Name of the subscription.", "type": "string" - }, - "topic": { - "description": "The name of the topic from which this subscription is receiving messages.", - "type": "string" - }, - "pushConfig": { - "$ref": "PushConfig", - "description": "If push delivery is used with this subscription, this field is\nused to configure it." } }, "id": "Subscription" }, "PublishBatchResponse": { - "id": "PublishBatchResponse", "description": "Response for the PublishBatch method.", "type": "object", "properties": { @@ -556,18 +502,19 @@ }, "type": "array" } - } + }, + "id": "PublishBatchResponse" }, "Topic": { + "description": "A topic resource.", + "type": "object", "properties": { "name": { "description": "Name of the topic.", "type": "string" } }, - "id": "Topic", - "description": "A topic resource.", - "type": "object" + "id": "Topic" }, "Label": { "description": "A key-value pair applied to a given object.", @@ -620,6 +567,11 @@ "description": "Request for the PullBatch method.", "type": "object", "properties": { + "maxEvents": { + "format": "int32", + "description": "The maximum number of PubsubEvents returned for this request. The Pub/Sub\nsystem may return fewer than the number of events specified.", + "type": "integer" + }, "subscription": { "description": "The subscription from which messages should be pulled.", "type": "string" @@ -627,23 +579,33 @@ "returnImmediately": { "description": "If this is specified as true the system will respond immediately even if\nit is not able to return a message in the Pull response. Otherwise the\nsystem is allowed to wait until at least one message is available rather\nthan returning no messages. The client may cancel the request if it does\nnot wish to wait any longer for the response.", "type": "boolean" - }, - "maxEvents": { - "type": "integer", - "format": "int32", - "description": "The maximum number of PubsubEvents returned for this request. The Pub/Sub\nsystem may return fewer than the number of events specified." } }, "id": "PullBatchRequest" }, + "ModifyPushConfigRequest": { + "description": "Request for the ModifyPushConfig method.", + "type": "object", + "properties": { + "pushConfig": { + "$ref": "PushConfig", + "description": "An empty \u003ccode\u003epush_config\u003c/code\u003e indicates that the Pub/Sub system should\npause pushing messages from the given subscription." + }, + "subscription": { + "description": "The name of the subscription.", + "type": "string" + } + }, + "id": "ModifyPushConfigRequest" + }, "PubsubMessage": { "description": "A message data and its labels.", "type": "object", "properties": { "data": { - "type": "string", "format": "byte", - "description": "The message payload." + "description": "The message payload.", + "type": "string" }, "messageId": { "description": "ID of this message assigned by the server at publication time. Guaranteed\nto be unique within the topic. This value may be read by a subscriber\nthat receives a PubsubMessage via a Pull call or a push delivery. It must\nnot be populated by a publisher in a Publish call.", @@ -664,21 +626,6 @@ }, "id": "PubsubMessage" }, - "ModifyPushConfigRequest": { - "description": "Request for the ModifyPushConfig method.", - "type": "object", - "properties": { - "pushConfig": { - "description": "An empty \u003ccode\u003epush_config\u003c/code\u003e indicates that the Pub/Sub system should\npause pushing messages from the given subscription.", - "$ref": "PushConfig" - }, - "subscription": { - "description": "The name of the subscription.", - "type": "string" - } - }, - "id": "ModifyPushConfigRequest" - }, "AcknowledgeRequest": { "description": "Request for the Acknowledge method.", "type": "object", @@ -702,32 +649,20 @@ "type": "object", "properties": { "pullResponses": { + "description": "Received Pub/Sub messages or status events. The Pub/Sub system will return\nzero messages if there are no more messages available in the backlog. The\nPub/Sub system may return fewer than the max_events requested even if\nthere are more messages available in the backlog.", "items": { "$ref": "PullResponse" }, - "type": "array", - "description": "Received Pub/Sub messages or status events. The Pub/Sub system will return\nzero messages if there are no more messages available in the backlog. The\nPub/Sub system may return fewer than the max_events requested even if\nthere are more messages available in the backlog." + "type": "array" } }, "id": "PullBatchResponse" }, - "ListTopicsResponse": { - "properties": { - "topic": { - "description": "The resulting topics.", - "items": { - "$ref": "Topic" - }, - "type": "array" - }, - "nextPageToken": { - "description": "If not empty, indicates that there are more topics that match the request,\nand this value should be passed to the next \u003ccode\u003eListTopicsRequest\u003c/code\u003e\nto continue.", - "type": "string" - } - }, - "id": "ListTopicsResponse", - "description": "Response for the ListTopics method.", - "type": "object" + "Empty": { + "description": "An empty message that you can re-use to avoid defining duplicated empty\nmessages in your project. A typical example is to use it as argument or the\nreturn value of a service API. For instance:\n\n service Foo {\n rpc Bar (proto2.Empty) returns (proto2.Empty) { };\n };\n\nBEGIN GOOGLE-INTERNAL\nThe difference between this one and net/rpc/empty-message.proto is that\n1) The generated message here is in proto2 C++ API.\n2) The proto2.Empty has minimum dependencies\n (no message_set or net/rpc dependencies)\nEND GOOGLE-INTERNAL", + "type": "object", + "properties": {}, + "id": "Empty" }, "PublishBatchRequest": { "description": "Request for the PublishBatch method.", @@ -747,11 +682,23 @@ }, "id": "PublishBatchRequest" }, - "Empty": { - "description": "An empty message that you can re-use to avoid defining duplicated empty\nmessages in your project. A typical example is to use it as argument or the\nreturn value of a service API. For instance:\n\n service Foo {\n rpc Bar (proto2.Empty) returns (proto2.Empty) { };\n };\n\nBEGIN GOOGLE-INTERNAL\nThe difference between this one and net/rpc/empty-message.proto is that\n1) The generated message here is in proto2 C++ API.\n2) The proto2.Empty has minimum dependencies\n (no message_set or net/rpc dependencies)\nEND GOOGLE-INTERNAL", + "ListTopicsResponse": { + "description": "Response for the ListTopics method.", "type": "object", - "properties": {}, - "id": "Empty" + "properties": { + "topic": { + "description": "The resulting topics.", + "items": { + "$ref": "Topic" + }, + "type": "array" + }, + "nextPageToken": { + "description": "If not empty, indicates that there are more topics that match the request,\nand this value should be passed to the next \u003ccode\u003eListTopicsRequest\u003c/code\u003e\nto continue.", + "type": "string" + } + }, + "id": "ListTopicsResponse" }, "PullResponse": { "description": "Either a \u003ccode\u003ePubsubMessage\u003c/code\u003e or a truncation event. One of these two\nmust be populated.", @@ -762,8 +709,8 @@ "type": "string" }, "pubsubEvent": { - "$ref": "PubsubEvent", - "description": "A pubsub message or truncation event." + "description": "A pubsub message or truncation event.", + "$ref": "PubsubEvent" } }, "id": "PullResponse" @@ -778,6 +725,77 @@ } }, "id": "PushConfig" + }, + "PullRequest": { + "description": "Request for the Pull method.", + "type": "object", + "properties": { + "subscription": { + "description": "The subscription from which a message should be pulled.", + "type": "string" + }, + "returnImmediately": { + "description": "If this is specified as true the system will respond immediately even if\nit is not able to return a message in the Pull response. Otherwise the\nsystem is allowed to wait until at least one message is available rather\nthan returning FAILED_PRECONDITION. The client may cancel the request if\nit does not wish to wait any longer for the response.", + "type": "boolean" + } + }, + "id": "PullRequest" + }, + "ListSubscriptionsResponse": { + "description": "Response for the ListSubscriptions method.", + "type": "object", + "properties": { + "subscription": { + "description": "The subscriptions that match the request.", + "items": { + "$ref": "Subscription" + }, + "type": "array" + }, + "nextPageToken": { + "description": "If not empty, indicates that there are more subscriptions that match the\nrequest and this value should be passed to the next\n\u003ccode\u003eListSubscriptionsRequest\u003c/code\u003e to continue.", + "type": "string" + } + }, + "id": "ListSubscriptionsResponse" + }, + "PubsubEvent": { + "description": "An event indicating a received message or truncation event.", + "type": "object", + "properties": { + "deleted": { + "description": "Indicates that this subscription has been deleted. (Note that pull\nsubscribers will always receive NOT_FOUND in response in their pull\nrequest on the subscription, rather than seeing this boolean.)", + "type": "boolean" + }, + "truncated": { + "description": "Indicates that this subscription has been truncated.", + "type": "boolean" + }, + "message": { + "description": "A received message.", + "$ref": "PubsubMessage" + }, + "subscription": { + "description": "The subscription that received the event.", + "type": "string" + } + }, + "id": "PubsubEvent" + }, + "PublishRequest": { + "description": "Request for the Publish method.", + "type": "object", + "properties": { + "topic": { + "description": "The message in the request will be published on this topic.", + "type": "string" + }, + "message": { + "description": "The message to publish.", + "$ref": "PubsubMessage" + } + }, + "id": "PublishRequest" } }, "protocol": "rest", @@ -785,23 +803,5 @@ "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "version": "v1beta1a", - "baseUrl": "https://pubsub.googleapis.com/", - "canonicalName": "Pubsub", - "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/pubsub": { - "description": "View and manage Pub/Sub topics and subscriptions" - } - } - } - }, - "description": "Provides reliable, many-to-many, asynchronous messaging between applications.\n", - "kind": "discovery#restDescription", - "servicePath": "", - "rootUrl": "https://pubsub.googleapis.com/" + "version": "v1beta1a" } diff --git a/vendor/google.golang.org/api/pubsub/v1beta2/pubsub-api.json b/vendor/google.golang.org/api/pubsub/v1beta2/pubsub-api.json index 59a399ed7..676251801 100644 --- a/vendor/google.golang.org/api/pubsub/v1beta2/pubsub-api.json +++ b/vendor/google.golang.org/api/pubsub/v1beta2/pubsub-api.json @@ -1,1050 +1,4 @@ { - "resources": { - "projects": { - "resources": { - "topics": { - "methods": { - "getIamPolicy": { - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:getIamPolicy", - "path": "v1beta2/{+resource}:getIamPolicy", - "id": "pubsub.projects.topics.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.", - "httpMethod": "GET", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$" - } - } - }, - "get": { - "description": "Gets the configuration of a topic.", - "httpMethod": "GET", - "response": { - "$ref": "Topic" - }, - "parameterOrder": [ - "topic" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "topic": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "description": "The name of the topic to get." - } - }, - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}", - "path": "v1beta2/{+topic}", - "id": "pubsub.projects.topics.get" - }, - "publish": { - "httpMethod": "POST", - "parameterOrder": [ - "topic" - ], - "response": { - "$ref": "PublishResponse" - }, - "parameters": { - "topic": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "description": "The messages in the request will be published on this topic." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:publish", - "path": "v1beta2/{+topic}:publish", - "id": "pubsub.projects.topics.publish", - "description": "Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic\ndoes not exist. The message payload must not be empty; it must contain\n either a non-empty data field, or at least one attribute.", - "request": { - "$ref": "PublishRequest" - } - }, - "testIamPermissions": { - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:testIamPermissions", - "id": "pubsub.projects.topics.testIamPermissions", - "path": "v1beta2/{+resource}: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.", - "request": { - "$ref": "TestIamPermissionsRequest" - } - }, - "delete": { - "description": "Deletes the topic with the given name. Returns `NOT_FOUND` if the topic\ndoes not exist. After a topic is deleted, a new topic may be created with\nthe same name; this is an entirely new topic with none of the old\nconfiguration or subscriptions. Existing subscriptions to this topic are\nnot deleted, but their `topic` field is set to `_deleted-topic_`.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "topic" - ], - "httpMethod": "DELETE", - "parameters": { - "topic": { - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "description": "Name of the topic to delete.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}", - "id": "pubsub.projects.topics.delete", - "path": "v1beta2/{+topic}" - }, - "list": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "The value returned by the last `ListTopicsResponse`; indicates that this is\na continuation of a prior `ListTopics` call, and that the system should\nreturn the next page of data.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Maximum number of topics to return." - }, - "project": { - "location": "path", - "description": "The name of the cloud project that topics belong to.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - } - }, - "flatPath": "v1beta2/projects/{projectsId}/topics", - "path": "v1beta2/{+project}/topics", - "id": "pubsub.projects.topics.list", - "description": "Lists matching topics.", - "httpMethod": "GET", - "response": { - "$ref": "ListTopicsResponse" - }, - "parameterOrder": [ - "project" - ] - }, - "create": { - "request": { - "$ref": "Topic" - }, - "description": "Creates the given topic with the given name.", - "response": { - "$ref": "Topic" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PUT", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "name": { - "location": "path", - "description": "The name of the topic. It must have the format\n`\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter,\nand contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),\nunderscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent\nsigns (`%`). It must be between 3 and 255 characters in length, and it\nmust not start with `\"goog\"`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$" - } - }, - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}", - "id": "pubsub.projects.topics.create", - "path": "v1beta2/{+name}" - }, - "setIamPolicy": { - "id": "pubsub.projects.topics.setIamPolicy", - "path": "v1beta2/{+resource}:setIamPolicy", - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:setIamPolicy" - } - }, - "resources": { - "subscriptions": { - "methods": { - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "topic" - ], - "response": { - "$ref": "ListTopicSubscriptionsResponse" - }, - "parameters": { - "pageToken": { - "location": "query", - "description": "The value returned by the last `ListTopicSubscriptionsResponse`; indicates\nthat this is a continuation of a prior `ListTopicSubscriptions` call, and\nthat the system should return the next page of data.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Maximum number of subscription names to return.", - "type": "integer", - "location": "query" - }, - "topic": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "description": "The name of the topic that subscriptions are attached to." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}/subscriptions", - "path": "v1beta2/{+topic}/subscriptions", - "id": "pubsub.projects.topics.subscriptions.list", - "description": "Lists the name of the subscriptions for this topic." - } - } - } - } - }, - "subscriptions": { - "methods": { - "setIamPolicy": { - "parameters": { - "resource": { - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:setIamPolicy", - "id": "pubsub.projects.subscriptions.setIamPolicy", - "path": "v1beta2/{+resource}:setIamPolicy", - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST" - }, - "create": { - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}", - "id": "pubsub.projects.subscriptions.create", - "path": "v1beta2/{+name}", - "request": { - "$ref": "Subscription" - }, - "description": "Creates a subscription to a given topic.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic. Note that\nfor REST API requests, you must specify a name.", - "response": { - "$ref": "Subscription" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PUT", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "description": "The name of the subscription. It must have the format\n`\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must\nstart with a letter, and contain only letters (`[A-Za-z]`), numbers\n(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),\nplus (`+`) or percent signs (`%`). It must be between 3 and 255 characters\nin length, and it must not start with `\"goog\"`.", - "type": "string", - "required": true - } - } - }, - "getIamPolicy": { - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:getIamPolicy", - "path": "v1beta2/{+resource}:getIamPolicy", - "id": "pubsub.projects.subscriptions.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.", - "httpMethod": "GET", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path" - } - } - }, - "modifyAckDeadline": { - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyAckDeadline", - "path": "v1beta2/{+subscription}:modifyAckDeadline", - "id": "pubsub.projects.subscriptions.modifyAckDeadline", - "description": "Modifies the ack deadline for a specific message. This method is useful\nto indicate that more time is needed to process a message by the\nsubscriber, or to make the message available for redelivery if the\nprocessing was interrupted. Note that this does not modify the\nsubscription-level `ackDeadlineSeconds` used for subsequent messages.", - "request": { - "$ref": "ModifyAckDeadlineRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "subscription" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "subscription": { - "description": "The name of the subscription.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "acknowledge": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "subscription" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "subscription": { - "description": "The subscription whose message is being acknowledged.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:acknowledge", - "id": "pubsub.projects.subscriptions.acknowledge", - "path": "v1beta2/{+subscription}:acknowledge", - "request": { - "$ref": "AcknowledgeRequest" - }, - "description": "Acknowledges the messages associated with the `ack_ids` in the\n`AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages\nfrom the subscription.\n\nAcknowledging a message whose ack deadline has expired may succeed,\nbut such a message may be redelivered later. Acknowledging a message more\nthan once will not result in an error." - }, - "get": { - "httpMethod": "GET", - "response": { - "$ref": "Subscription" - }, - "parameterOrder": [ - "subscription" - ], - "parameters": { - "subscription": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "description": "The name of the subscription to get." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}", - "path": "v1beta2/{+subscription}", - "id": "pubsub.projects.subscriptions.get", - "description": "Gets the configuration details of a subscription." - }, - "testIamPermissions": { - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "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.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:testIamPermissions", - "path": "v1beta2/{+resource}:testIamPermissions", - "id": "pubsub.projects.subscriptions.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.", - "request": { - "$ref": "TestIamPermissionsRequest" - } - }, - "modifyPushConfig": { - "path": "v1beta2/{+subscription}:modifyPushConfig", - "id": "pubsub.projects.subscriptions.modifyPushConfig", - "description": "Modifies the `PushConfig` for a specified subscription.\n\nThis may be used to change a push subscription to a pull one (signified by\nan empty `PushConfig`) or vice versa, or change the endpoint URL and other\nattributes of a push subscription. Messages will accumulate for delivery\ncontinuously through the call regardless of changes to the `PushConfig`.", - "request": { - "$ref": "ModifyPushConfigRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "subscription" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "subscription": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "description": "The name of the subscription." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyPushConfig" - }, - "delete": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "subscription" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "parameters": { - "subscription": { - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "description": "The subscription to delete.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}", - "id": "pubsub.projects.subscriptions.delete", - "path": "v1beta2/{+subscription}", - "description": "Deletes an existing subscription. All pending messages in the subscription\nare immediately dropped. Calls to `Pull` after deletion will return\n`NOT_FOUND`. After a subscription is deleted, a new one may be created with\nthe same name, but the new one has no association with the old\nsubscription, or its topic unless the same topic is specified." - }, - "pull": { - "response": { - "$ref": "PullResponse" - }, - "parameterOrder": [ - "subscription" - ], - "httpMethod": "POST", - "parameters": { - "subscription": { - "location": "path", - "description": "The subscription from which messages should be pulled.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:pull", - "id": "pubsub.projects.subscriptions.pull", - "path": "v1beta2/{+subscription}:pull", - "description": "Pulls messages from the server. Returns an empty list if there are no\nmessages available in the backlog. The server may return `UNAVAILABLE` if\nthere are too many concurrent pull requests pending for the given\nsubscription.", - "request": { - "$ref": "PullRequest" - } - }, - "list": { - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ListSubscriptionsResponse" - }, - "httpMethod": "GET", - "parameters": { - "project": { - "description": "The name of the cloud project that subscriptions belong to.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - }, - "pageToken": { - "description": "The value returned by the last `ListSubscriptionsResponse`; indicates that\nthis is a continuation of a prior `ListSubscriptions` call, and that the\nsystem should return the next page of data.", - "type": "string", - "location": "query" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Maximum number of subscriptions to return." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ], - "flatPath": "v1beta2/projects/{projectsId}/subscriptions", - "id": "pubsub.projects.subscriptions.list", - "path": "v1beta2/{+project}/subscriptions", - "description": "Lists matching subscriptions." - } - } - } - } - } - }, - "parameters": { - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "type": "boolean", - "location": "query", - "description": "Returns response with indentations and line breaks." - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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", - "description": "Data format for response.", - "default": "json" - }, - "key": { - "location": "query", - "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.", - "type": "string" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - } - }, - "schemas": { - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "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." - } - }, - "id": "SetIamPolicyRequest" - }, - "ModifyPushConfigRequest": { - "description": "Request for the ModifyPushConfig method.", - "type": "object", - "properties": { - "pushConfig": { - "$ref": "PushConfig", - "description": "The push configuration for future deliveries.\n\nAn empty `pushConfig` indicates that the Pub/Sub system should\nstop pushing messages from the given subscription and allow\nmessages to be pulled and acknowledged - effectively pausing\nthe subscription if `Pull` is not called." - } - }, - "id": "ModifyPushConfigRequest" - }, - "PubsubMessage": { - "id": "PubsubMessage", - "description": "A message data and its attributes. The message payload must not be empty;\nit must contain either a non-empty data field, or at least one attribute.", - "type": "object", - "properties": { - "messageId": { - "description": "ID of this message, assigned by the server when the message is published.\nGuaranteed to be unique within the topic. This value may be read by a\nsubscriber that receives a `PubsubMessage` via a `Pull` call or a push\ndelivery. It must not be populated by the publisher in a `Publish` call.", - "type": "string" - }, - "attributes": { - "description": "Optional attributes for this message.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "publishTime": { - "format": "google-datetime", - "description": "The time at which the message was published, populated by the server when\nit receives the `Publish` call. It must not be populated by the\npublisher in a `Publish` call.", - "type": "string" - }, - "data": { - "format": "byte", - "description": "The message payload. For JSON requests, the value of this field must be\n[base64-encoded](https://tools.ietf.org/html/rfc4648).", - "type": "string" - } - } - }, - "Binding": { - "properties": { - "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` or `joe@example.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`.\nRequired", - "type": "string" - } - }, - "id": "Binding", - "description": "Associates `members` with a `role`.", - "type": "object" - }, - "AcknowledgeRequest": { - "description": "Request for the Acknowledge method.", - "type": "object", - "properties": { - "ackIds": { - "description": "The acknowledgment ID for the messages being acknowledged that was returned\nby the Pub/Sub system in the `Pull` response. Must not be empty.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "AcknowledgeRequest" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "ListTopicsResponse": { - "properties": { - "topics": { - "description": "The resulting topics.", - "items": { - "$ref": "Topic" - }, - "type": "array" - }, - "nextPageToken": { - "description": "If not empty, indicates that there may be more topics that match the\nrequest; this value should be passed in a new `ListTopicsRequest`.", - "type": "string" - } - }, - "id": "ListTopicsResponse", - "description": "Response for the `ListTopics` method.", - "type": "object" - }, - "ListTopicSubscriptionsResponse": { - "type": "object", - "properties": { - "nextPageToken": { - "description": "If not empty, indicates that there may be more subscriptions that match\nthe request; this value should be passed in a new\n`ListTopicSubscriptionsRequest` to get more subscriptions.", - "type": "string" - }, - "subscriptions": { - "description": "The names of the subscriptions that match the request.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "ListTopicSubscriptionsResponse", - "description": "Response for the `ListTopicSubscriptions` method." - }, - "PullResponse": { - "description": "Response for the `Pull` method.", - "type": "object", - "properties": { - "receivedMessages": { - "description": "Received Pub/Sub messages. The Pub/Sub system will return zero messages if\nthere are no more available in the backlog. The Pub/Sub system may return\nfewer than the `maxMessages` requested even if there are more messages\navailable in the backlog.", - "items": { - "$ref": "ReceivedMessage" - }, - "type": "array" - } - }, - "id": "PullResponse" - }, - "ReceivedMessage": { - "type": "object", - "properties": { - "message": { - "description": "The message.", - "$ref": "PubsubMessage" - }, - "ackId": { - "description": "This ID can be used to acknowledge the received message.", - "type": "string" - } - }, - "id": "ReceivedMessage", - "description": "A message and its corresponding acknowledgment ID." - }, - "PushConfig": { - "description": "Configuration for a push delivery endpoint.", - "type": "object", - "properties": { - "attributes": { - "additionalProperties": { - "type": "string" - }, - "description": "Endpoint configuration attributes.\n\nEvery endpoint has a set of API supported attributes that can be used to\ncontrol different aspects of the message delivery.\n\nThe currently supported attribute is `x-goog-version`, which you can\nuse to change the format of the push message. This attribute\nindicates the version of the data expected by the endpoint. This\ncontrols the shape of the envelope (i.e. its fields and metadata).\nThe endpoint version is based on the version of the Pub/Sub\nAPI.\n\nIf not present during the `CreateSubscription` call, it will default to\nthe version of the API used to make such call. If not present during a\n`ModifyPushConfig` call, its value will not be changed. `GetSubscription`\ncalls will always return a valid version, even if the subscription was\ncreated without this attribute.\n\nThe possible values for this attribute are:\n\n* `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.\n* `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.", - "type": "object" - }, - "pushEndpoint": { - "description": "A URL locating the endpoint to which messages should be pushed.\nFor example, a Webhook endpoint might use \"https://example.com/push\".", - "type": "string" - } - }, - "id": "PushConfig" - }, - "TestIamPermissionsResponse": { - "id": "TestIamPermissionsResponse", - "description": "Response message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", - "items": { - "type": "string" - }, - "type": "array" - } - } - }, - "PullRequest": { - "description": "Request for the `Pull` method.", - "type": "object", - "properties": { - "returnImmediately": { - "description": "If this is specified as true the system will respond immediately even if\nit is not able to return a message in the `Pull` response. Otherwise the\nsystem is allowed to wait until at least one message is available rather\nthan returning no messages. The client may cancel the request if it does\nnot wish to wait any longer for the response.", - "type": "boolean" - }, - "maxMessages": { - "format": "int32", - "description": "The maximum number of messages returned for this request. The Pub/Sub\nsystem may return fewer than the number specified.", - "type": "integer" - } - }, - "id": "PullRequest" - }, - "ListSubscriptionsResponse": { - "description": "Response for the `ListSubscriptions` method.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "If not empty, indicates that there may be more subscriptions that match\nthe request; this value should be passed in a new\n`ListSubscriptionsRequest` to get more subscriptions.", - "type": "string" - }, - "subscriptions": { - "description": "The subscriptions that match the request.", - "items": { - "$ref": "Subscription" - }, - "type": "array" - } - }, - "id": "ListSubscriptionsResponse" - }, - "PublishRequest": { - "id": "PublishRequest", - "description": "Request for the Publish method.", - "type": "object", - "properties": { - "messages": { - "items": { - "$ref": "PubsubMessage" - }, - "type": "array", - "description": "The messages to publish." - } - } - }, - "PublishResponse": { - "type": "object", - "properties": { - "messageIds": { - "description": "The server-assigned ID of each published message, in the same order as\nthe messages in the request. IDs are guaranteed to be unique within\nthe topic.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "PublishResponse", - "description": "Response for the `Publish` method." - }, - "Subscription": { - "description": "A subscription resource.", - "type": "object", - "properties": { - "topic": { - "description": "The name of the topic from which this subscription is receiving messages.\nThe value of this field will be `_deleted-topic_` if the topic has been\ndeleted.", - "type": "string" - }, - "pushConfig": { - "$ref": "PushConfig", - "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." - }, - "ackDeadlineSeconds": { - "format": "int32", - "description": "This value is the maximum time after a subscriber receives a message\nbefore the subscriber should acknowledge the message. After message\ndelivery but before the ack deadline expires and before the message is\nacknowledged, it is an outstanding message and will not be delivered\nagain during that time (on a best-effort basis).\n\nFor pull subscriptions, this value is used as the initial value for the ack\ndeadline. To override this value for a given message, call\n`ModifyAckDeadline` with the corresponding `ack_id` if using pull.\nThe maximum custom deadline you can specify is 600 seconds (10 minutes).\n\nFor push delivery, this value is also used to set the request timeout for\nthe call to the push endpoint.\n\nIf the subscriber never acknowledges the message, the Pub/Sub\nsystem will eventually redeliver the message.\n\nIf this parameter is 0, a default value of 10 seconds is used.", - "type": "integer" - }, - "name": { - "description": "The name of the subscription. It must have the format\n`\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must\nstart with a letter, and contain only letters (`[A-Za-z]`), numbers\n(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),\nplus (`+`) or percent signs (`%`). It must be between 3 and 255 characters\nin length, and it must not start with `\"goog\"`.", - "type": "string" - } - }, - "id": "Subscription" - }, - "TestIamPermissionsRequest": { - "id": "TestIamPermissionsRequest", - "description": "Request message for `TestIamPermissions` method.", - "type": "object", - "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" - } - } - }, - "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "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": { - "format": "byte", - "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.", - "type": "string" - }, - "version": { - "format": "int32", - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer" - } - }, - "id": "Policy" - }, - "Topic": { - "description": "A topic resource.", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the topic. It must have the format\n`\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter,\nand contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),\nunderscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent\nsigns (`%`). It must be between 3 and 255 characters in length, and it\nmust not start with `\"goog\"`." - } - }, - "id": "Topic" - }, - "ModifyAckDeadlineRequest": { - "description": "Request for the ModifyAckDeadline method.", - "type": "object", - "properties": { - "ackId": { - "description": "The acknowledgment ID. Either this or ack_ids must be populated, but not\nboth.", - "type": "string" - }, - "ackDeadlineSeconds": { - "type": "integer", - "format": "int32", - "description": "The new ack deadline with respect to the time this request was sent to\nthe Pub/Sub system. Must be \u003e= 0. For example, if the value is 10, the new\nack deadline will expire 10 seconds after the `ModifyAckDeadline` call\nwas made. Specifying zero may immediately make the message available for\nanother pull request." - }, - "ackIds": { - "description": "List of acknowledgment IDs.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "ModifyAckDeadlineRequest" - } - }, - "protocol": "rest", - "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, - "version": "v1beta2", - "baseUrl": "https://pubsub.googleapis.com/", "canonicalName": "Pubsub", "auth": { "oauth2": { @@ -1066,10 +20,1056 @@ "ownerDomain": "google.com", "name": "pubsub", "batchPath": "batch", + "revision": "20170829", "id": "pubsub:v1beta2", "documentationLink": "https://cloud.google.com/pubsub/docs", - "revision": "20170630", "title": "Google Cloud Pub/Sub API", + "discoveryVersion": "v1", "ownerName": "Google", - "discoveryVersion": "v1" + "resources": { + "projects": { + "resources": { + "topics": { + "methods": { + "list": { + "response": { + "$ref": "ListTopicsResponse" + }, + "parameterOrder": [ + "project" + ], + "httpMethod": "GET", + "parameters": { + "project": { + "location": "path", + "description": "The name of the cloud project that topics belong to.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$" + }, + "pageToken": { + "type": "string", + "location": "query", + "description": "The value returned by the last `ListTopicsResponse`; indicates that this is\na continuation of a prior `ListTopics` call, and that the system should\nreturn the next page of data." + }, + "pageSize": { + "type": "integer", + "location": "query", + "format": "int32", + "description": "Maximum number of topics to return." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta2/projects/{projectsId}/topics", + "id": "pubsub.projects.topics.list", + "path": "v1beta2/{+project}/topics", + "description": "Lists matching topics." + }, + "setIamPolicy": { + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/topics/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:setIamPolicy", + "id": "pubsub.projects.topics.setIamPolicy", + "path": "v1beta2/{+resource}:setIamPolicy", + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "SetIamPolicyRequest" + } + }, + "create": { + "response": { + "$ref": "Topic" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "parameters": { + "name": { + "location": "path", + "description": "The name of the topic. It must have the format\n`\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter,\nand contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),\nunderscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent\nsigns (`%`). It must be between 3 and 255 characters in length, and it\nmust not start with `\"goog\"`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/topics/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}", + "id": "pubsub.projects.topics.create", + "path": "v1beta2/{+name}", + "description": "Creates the given topic with the given name.", + "request": { + "$ref": "Topic" + } + }, + "getIamPolicy": { + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:getIamPolicy", + "id": "pubsub.projects.topics.getIamPolicy", + "path": "v1beta2/{+resource}: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.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "resource": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field." + } + } + }, + "get": { + "response": { + "$ref": "Topic" + }, + "parameterOrder": [ + "topic" + ], + "httpMethod": "GET", + "parameters": { + "topic": { + "location": "path", + "description": "The name of the topic to get.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/topics/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}", + "id": "pubsub.projects.topics.get", + "path": "v1beta2/{+topic}", + "description": "Gets the configuration of a topic." + }, + "publish": { + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:publish", + "path": "v1beta2/{+topic}:publish", + "id": "pubsub.projects.topics.publish", + "request": { + "$ref": "PublishRequest" + }, + "description": "Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic\ndoes not exist. The message payload must not be empty; it must contain\n either a non-empty data field, or at least one attribute.", + "httpMethod": "POST", + "parameterOrder": [ + "topic" + ], + "response": { + "$ref": "PublishResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "topic": { + "location": "path", + "description": "The messages in the request will be published on this topic.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/topics/[^/]+$" + } + } + }, + "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.", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameters": { + "resource": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:testIamPermissions", + "path": "v1beta2/{+resource}:testIamPermissions", + "id": "pubsub.projects.topics.testIamPermissions" + }, + "delete": { + "description": "Deletes the topic with the given name. Returns `NOT_FOUND` if the topic\ndoes not exist. After a topic is deleted, a new topic may be created with\nthe same name; this is an entirely new topic with none of the old\nconfiguration or subscriptions. Existing subscriptions to this topic are\nnot deleted, but their `topic` field is set to `_deleted-topic_`.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "topic" + ], + "httpMethod": "DELETE", + "parameters": { + "topic": { + "location": "path", + "description": "Name of the topic to delete.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/topics/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}", + "id": "pubsub.projects.topics.delete", + "path": "v1beta2/{+topic}" + } + }, + "resources": { + "subscriptions": { + "methods": { + "list": { + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}/subscriptions", + "path": "v1beta2/{+topic}/subscriptions", + "id": "pubsub.projects.topics.subscriptions.list", + "description": "Lists the name of the subscriptions for this topic.", + "httpMethod": "GET", + "parameterOrder": [ + "topic" + ], + "response": { + "$ref": "ListTopicSubscriptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "topic": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path", + "description": "The name of the topic that subscriptions are attached to." + }, + "pageToken": { + "location": "query", + "description": "The value returned by the last `ListTopicSubscriptionsResponse`; indicates\nthat this is a continuation of a prior `ListTopicSubscriptions` call, and\nthat the system should return the next page of data.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum number of subscription names to return.", + "type": "integer" + } + } + } + } + } + } + }, + "subscriptions": { + "methods": { + "acknowledge": { + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:acknowledge", + "id": "pubsub.projects.subscriptions.acknowledge", + "path": "v1beta2/{+subscription}:acknowledge", + "description": "Acknowledges the messages associated with the `ack_ids` in the\n`AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages\nfrom the subscription.\n\nAcknowledging a message whose ack deadline has expired may succeed,\nbut such a message may be redelivered later. Acknowledging a message more\nthan once will not result in an error.", + "request": { + "$ref": "AcknowledgeRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "subscription" + ], + "httpMethod": "POST", + "parameters": { + "subscription": { + "location": "path", + "description": "The subscription whose message is being acknowledged.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ] + }, + "modifyAckDeadline": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "subscription" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "subscription": { + "location": "path", + "description": "The name of the subscription.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyAckDeadline", + "id": "pubsub.projects.subscriptions.modifyAckDeadline", + "path": "v1beta2/{+subscription}:modifyAckDeadline", + "request": { + "$ref": "ModifyAckDeadlineRequest" + }, + "description": "Modifies the ack deadline for a specific message. This method is useful\nto indicate that more time is needed to process a message by the\nsubscriber, or to make the message available for redelivery if the\nprocessing was interrupted. Note that this does not modify the\nsubscription-level `ackDeadlineSeconds` used for subsequent messages." + }, + "getIamPolicy": { + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "resource": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field." + } + }, + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:getIamPolicy", + "id": "pubsub.projects.subscriptions.getIamPolicy", + "path": "v1beta2/{+resource}: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." + }, + "get": { + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}", + "id": "pubsub.projects.subscriptions.get", + "path": "v1beta2/{+subscription}", + "description": "Gets the configuration details of a subscription.", + "response": { + "$ref": "Subscription" + }, + "parameterOrder": [ + "subscription" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "subscription": { + "location": "path", + "description": "The name of the subscription to get.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + } + }, + "testIamPermissions": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:testIamPermissions", + "path": "v1beta2/{+resource}:testIamPermissions", + "id": "pubsub.projects.subscriptions.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.", + "request": { + "$ref": "TestIamPermissionsRequest" + } + }, + "modifyPushConfig": { + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyPushConfig", + "id": "pubsub.projects.subscriptions.modifyPushConfig", + "path": "v1beta2/{+subscription}:modifyPushConfig", + "request": { + "$ref": "ModifyPushConfigRequest" + }, + "description": "Modifies the `PushConfig` for a specified subscription.\n\nThis may be used to change a push subscription to a pull one (signified by\nan empty `PushConfig`) or vice versa, or change the endpoint URL and other\nattributes of a push subscription. Messages will accumulate for delivery\ncontinuously through the call regardless of changes to the `PushConfig`.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "subscription" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "subscription": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path", + "description": "The name of the subscription." + } + } + }, + "pull": { + "request": { + "$ref": "PullRequest" + }, + "description": "Pulls messages from the server. Returns an empty list if there are no\nmessages available in the backlog. The server may return `UNAVAILABLE` if\nthere are too many concurrent pull requests pending for the given\nsubscription.", + "response": { + "$ref": "PullResponse" + }, + "parameterOrder": [ + "subscription" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "subscription": { + "location": "path", + "description": "The subscription from which messages should be pulled.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:pull", + "id": "pubsub.projects.subscriptions.pull", + "path": "v1beta2/{+subscription}:pull" + }, + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "subscription" + ], + "parameters": { + "subscription": { + "location": "path", + "description": "The subscription to delete.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}", + "path": "v1beta2/{+subscription}", + "id": "pubsub.projects.subscriptions.delete", + "description": "Deletes an existing subscription. All pending messages in the subscription\nare immediately dropped. Calls to `Pull` after deletion will return\n`NOT_FOUND`. After a subscription is deleted, a new one may be created with\nthe same name, but the new one has no association with the old\nsubscription, or its topic unless the same topic is specified." + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "ListSubscriptionsResponse" + }, + "parameters": { + "project": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "The name of the cloud project that subscriptions belong to." + }, + "pageToken": { + "location": "query", + "description": "The value returned by the last `ListSubscriptionsResponse`; indicates that\nthis is a continuation of a prior `ListSubscriptions` call, and that the\nsystem should return the next page of data.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum number of subscriptions to return.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta2/projects/{projectsId}/subscriptions", + "path": "v1beta2/{+project}/subscriptions", + "id": "pubsub.projects.subscriptions.list", + "description": "Lists matching subscriptions." + }, + "setIamPolicy": { + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:setIamPolicy", + "id": "pubsub.projects.subscriptions.setIamPolicy", + "path": "v1beta2/{+resource}:setIamPolicy" + }, + "create": { + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}", + "path": "v1beta2/{+name}", + "id": "pubsub.projects.subscriptions.create", + "description": "Creates a subscription to a given topic.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic. Note that\nfor REST API requests, you must specify a name.", + "request": { + "$ref": "Subscription" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Subscription" + }, + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path", + "description": "The name of the subscription. It must have the format\n`\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must\nstart with a letter, and contain only letters (`[A-Za-z]`), numbers\n(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),\nplus (`+`) or percent signs (`%`). It must be between 3 and 255 characters\nin length, and it must not start with `\"goog\"`." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ] + } + } + } + } + } + }, + "parameters": { + "key": { + "type": "string", + "location": "query", + "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." + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "type": "string", + "location": "query", + "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." + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "type": "string", + "location": "query", + "description": "OAuth 2.0 token for the current user." + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "type": "string", + "location": "query", + "description": "Selector specifying which fields to include in a partial response." + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "$.xgafv": { + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ] + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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", + "description": "Data format for response.", + "default": "json" + } + }, + "schemas": { + "ListSubscriptionsResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "If not empty, indicates that there may be more subscriptions that match\nthe request; this value should be passed in a new\n`ListSubscriptionsRequest` to get more subscriptions." + }, + "subscriptions": { + "items": { + "$ref": "Subscription" + }, + "type": "array", + "description": "The subscriptions that match the request." + } + }, + "id": "ListSubscriptionsResponse", + "description": "Response for the `ListSubscriptions` method." + }, + "PublishRequest": { + "description": "Request for the Publish method.", + "type": "object", + "properties": { + "messages": { + "items": { + "$ref": "PubsubMessage" + }, + "type": "array", + "description": "The messages to publish." + } + }, + "id": "PublishRequest" + }, + "PublishResponse": { + "type": "object", + "properties": { + "messageIds": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The server-assigned ID of each published message, in the same order as\nthe messages in the request. IDs are guaranteed to be unique within\nthe topic." + } + }, + "id": "PublishResponse", + "description": "Response for the `Publish` method." + }, + "Subscription": { + "type": "object", + "properties": { + "ackDeadlineSeconds": { + "type": "integer", + "format": "int32", + "description": "This value is the maximum time after a subscriber receives a message\nbefore the subscriber should acknowledge the message. After message\ndelivery but before the ack deadline expires and before the message is\nacknowledged, it is an outstanding message and will not be delivered\nagain during that time (on a best-effort basis).\n\nFor pull subscriptions, this value is used as the initial value for the ack\ndeadline. To override this value for a given message, call\n`ModifyAckDeadline` with the corresponding `ack_id` if using pull.\nThe maximum custom deadline you can specify is 600 seconds (10 minutes).\n\nFor push delivery, this value is also used to set the request timeout for\nthe call to the push endpoint.\n\nIf the subscriber never acknowledges the message, the Pub/Sub\nsystem will eventually redeliver the message.\n\nIf this parameter is 0, a default value of 10 seconds is used." + }, + "name": { + "type": "string", + "description": "The name of the subscription. It must have the format\n`\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must\nstart with a letter, and contain only letters (`[A-Za-z]`), numbers\n(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),\nplus (`+`) or percent signs (`%`). It must be between 3 and 255 characters\nin length, and it must not start with `\"goog\"`." + }, + "topic": { + "description": "The name of the topic from which this subscription is receiving messages.\nThe value of this field will be `_deleted-topic_` if the topic has been\ndeleted.", + "type": "string" + }, + "pushConfig": { + "$ref": "PushConfig", + "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." + } + }, + "id": "Subscription", + "description": "A subscription resource." + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "items": { + "type": "string" + }, + "type": "array", + "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)." + } + }, + "id": "TestIamPermissionsRequest" + }, + "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", + "properties": { + "etag": { + "type": "string", + "format": "byte", + "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." + }, + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" + }, + "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" + } + }, + "id": "Policy" + }, + "Topic": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the topic. It must have the format\n`\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter,\nand contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),\nunderscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent\nsigns (`%`). It must be between 3 and 255 characters in length, and it\nmust not start with `\"goog\"`." + } + }, + "id": "Topic", + "description": "A topic resource." + }, + "ModifyAckDeadlineRequest": { + "description": "Request for the ModifyAckDeadline method.", + "type": "object", + "properties": { + "ackId": { + "type": "string", + "description": "The acknowledgment ID. Either this or ack_ids must be populated, but not\nboth." + }, + "ackDeadlineSeconds": { + "format": "int32", + "description": "The new ack deadline with respect to the time this request was sent to\nthe Pub/Sub system. Must be \u003e= 0. For example, if the value is 10, the new\nack deadline will expire 10 seconds after the `ModifyAckDeadline` call\nwas made. Specifying zero may immediately make the message available for\nanother pull request.", + "type": "integer" + }, + "ackIds": { + "items": { + "type": "string" + }, + "type": "array", + "description": "List of acknowledgment IDs." + } + }, + "id": "ModifyAckDeadlineRequest" + }, + "SetIamPolicyRequest": { + "type": "object", + "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." + } + }, + "id": "SetIamPolicyRequest", + "description": "Request message for `SetIamPolicy` method." + }, + "PubsubMessage": { + "type": "object", + "properties": { + "data": { + "format": "byte", + "description": "The message payload. For JSON requests, the value of this field must be\n[base64-encoded](https://tools.ietf.org/html/rfc4648).", + "type": "string" + }, + "messageId": { + "description": "ID of this message, assigned by the server when the message is published.\nGuaranteed to be unique within the topic. This value may be read by a\nsubscriber that receives a `PubsubMessage` via a `Pull` call or a push\ndelivery. It must not be populated by the publisher in a `Publish` call.", + "type": "string" + }, + "attributes": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional attributes for this message.", + "type": "object" + }, + "publishTime": { + "format": "google-datetime", + "description": "The time at which the message was published, populated by the server when\nit receives the `Publish` call. It must not be populated by the\npublisher in a `Publish` call.", + "type": "string" + } + }, + "id": "PubsubMessage", + "description": "A message data and its attributes. The message payload must not be empty;\nit must contain either a non-empty data field, or at least one attribute." + }, + "ModifyPushConfigRequest": { + "description": "Request for the ModifyPushConfig method.", + "type": "object", + "properties": { + "pushConfig": { + "$ref": "PushConfig", + "description": "The push configuration for future deliveries.\n\nAn empty `pushConfig` indicates that the Pub/Sub system should\nstop pushing messages from the given subscription and allow\nmessages to be pulled and acknowledged - effectively pausing\nthe subscription if `Pull` is not called." + } + }, + "id": "ModifyPushConfigRequest" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "type": "object", + "properties": { + "members": { + "items": { + "type": "string" + }, + "type": "array", + "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` or `joe@example.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" + }, + "role": { + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", + "type": "string" + } + }, + "id": "Binding" + }, + "Empty": { + "type": "object", + "properties": {}, + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`." + }, + "AcknowledgeRequest": { + "description": "Request for the Acknowledge method.", + "type": "object", + "properties": { + "ackIds": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The acknowledgment ID for the messages being acknowledged that was returned\nby the Pub/Sub system in the `Pull` response. Must not be empty." + } + }, + "id": "AcknowledgeRequest" + }, + "ListTopicsResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "description": "If not empty, indicates that there may be more topics that match the\nrequest; this value should be passed in a new `ListTopicsRequest`.", + "type": "string" + }, + "topics": { + "items": { + "$ref": "Topic" + }, + "type": "array", + "description": "The resulting topics." + } + }, + "id": "ListTopicsResponse", + "description": "Response for the `ListTopics` method." + }, + "ListTopicSubscriptionsResponse": { + "description": "Response for the `ListTopicSubscriptions` method.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "If not empty, indicates that there may be more subscriptions that match\nthe request; this value should be passed in a new\n`ListTopicSubscriptionsRequest` to get more subscriptions.", + "type": "string" + }, + "subscriptions": { + "description": "The names of the subscriptions that match the request.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "ListTopicSubscriptionsResponse" + }, + "PullResponse": { + "description": "Response for the `Pull` method.", + "type": "object", + "properties": { + "receivedMessages": { + "description": "Received Pub/Sub messages. The Pub/Sub system will return zero messages if\nthere are no more available in the backlog. The Pub/Sub system may return\nfewer than the `maxMessages` requested even if there are more messages\navailable in the backlog.", + "items": { + "$ref": "ReceivedMessage" + }, + "type": "array" + } + }, + "id": "PullResponse" + }, + "ReceivedMessage": { + "description": "A message and its corresponding acknowledgment ID.", + "type": "object", + "properties": { + "message": { + "$ref": "PubsubMessage", + "description": "The message." + }, + "ackId": { + "type": "string", + "description": "This ID can be used to acknowledge the received message." + } + }, + "id": "ReceivedMessage" + }, + "PushConfig": { + "type": "object", + "properties": { + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Endpoint configuration attributes.\n\nEvery endpoint has a set of API supported attributes that can be used to\ncontrol different aspects of the message delivery.\n\nThe currently supported attribute is `x-goog-version`, which you can\nuse to change the format of the push message. This attribute\nindicates the version of the data expected by the endpoint. This\ncontrols the shape of the envelope (i.e. its fields and metadata).\nThe endpoint version is based on the version of the Pub/Sub\nAPI.\n\nIf not present during the `CreateSubscription` call, it will default to\nthe version of the API used to make such call. If not present during a\n`ModifyPushConfig` call, its value will not be changed. `GetSubscription`\ncalls will always return a valid version, even if the subscription was\ncreated without this attribute.\n\nThe possible values for this attribute are:\n\n* `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.\n* `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API." + }, + "pushEndpoint": { + "type": "string", + "description": "A URL locating the endpoint to which messages should be pushed.\nFor example, a Webhook endpoint might use \"https://example.com/push\"." + } + }, + "id": "PushConfig", + "description": "Configuration for a push delivery endpoint." + }, + "TestIamPermissionsResponse": { + "type": "object", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestIamPermissionsResponse", + "description": "Response message for `TestIamPermissions` method." + }, + "PullRequest": { + "type": "object", + "properties": { + "returnImmediately": { + "type": "boolean", + "description": "If this is specified as true the system will respond immediately even if\nit is not able to return a message in the `Pull` response. Otherwise the\nsystem is allowed to wait until at least one message is available rather\nthan returning no messages. The client may cancel the request if it does\nnot wish to wait any longer for the response." + }, + "maxMessages": { + "type": "integer", + "format": "int32", + "description": "The maximum number of messages returned for this request. The Pub/Sub\nsystem may return fewer than the number specified." + } + }, + "id": "PullRequest", + "description": "Request for the `Pull` method." + } + }, + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "protocol": "rest", + "version": "v1beta2", + "baseUrl": "https://pubsub.googleapis.com/" } diff --git a/vendor/google.golang.org/api/runtimeconfig/v1/runtimeconfig-api.json b/vendor/google.golang.org/api/runtimeconfig/v1/runtimeconfig-api.json index 540ab586a..1259e8872 100644 --- a/vendor/google.golang.org/api/runtimeconfig/v1/runtimeconfig-api.json +++ b/vendor/google.golang.org/api/runtimeconfig/v1/runtimeconfig-api.json @@ -1,21 +1,115 @@ { + "parameters": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format." + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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", + "description": "Data format for response.", + "default": "json" + }, + "key": { + "location": "query", + "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.", + "type": "string" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "type": "string", + "location": "query", + "description": "OAuth 2.0 token for the current user." + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + } + }, "version": "v1", "baseUrl": "https://runtimeconfig.googleapis.com/", "kind": "discovery#restDescription", - "description": "The Runtime Configurator allows you to dynamically configure and expose variables through Google Cloud Platform. In addition, you can also set Watchers and Waiters that will watch for changes to your data and return based on certain conditions.", "servicePath": "", + "description": "The Runtime Configurator allows you to dynamically configure and expose variables through Google Cloud Platform. In addition, you can also set Watchers and Waiters that will watch for changes to your data and return based on certain conditions.", "basePath": "", "id": "runtimeconfig:v1", "documentationLink": "https://cloud.google.com/deployment-manager/runtime-configurator/", - "revision": "20170620", + "revision": "20170829", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { - "CancelOperationRequest": { + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "type": "object", "properties": {}, - "id": "CancelOperationRequest", - "description": "The request message for Operations.CancelOperation." + "id": "Empty" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "type": "object", + "properties": {}, + "id": "CancelOperationRequest" }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", @@ -31,13 +125,13 @@ "type": "string" }, "details": { - "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { + "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - }, - "type": "object" + } }, "type": "array" } @@ -45,12 +139,9 @@ "id": "Status" }, "Operation": { - "id": "Operation", - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", "properties": { "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", "type": "boolean" }, "response": { @@ -62,24 +153,29 @@ "type": "object" }, "name": { - "type": "string", - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`." + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" }, "error": { "$ref": "Status", "description": "The error result of the operation in case of failure or cancellation." }, "metadata": { + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "type": "object" + } } - } + }, + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object" }, "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", "properties": { "operations": { "description": "A list of operations that matches the specified filter in the request.", @@ -93,20 +189,12 @@ "type": "string" } }, - "id": "ListOperationsResponse", - "description": "The response message for Operations.ListOperations.", - "type": "object" - }, - "Empty": { - "type": "object", - "properties": {}, - "id": "Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`." + "id": "ListOperationsResponse" } }, "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, "protocol": "rest", "canonicalName": "Cloud RuntimeConfig", @@ -126,36 +214,84 @@ "ownerDomain": "google.com", "name": "runtimeconfig", "batchPath": "batch", + "fullyEncodeReservedExpansion": true, "title": "Google Cloud Runtime Configuration API", "ownerName": "Google", "resources": { "operations": { "methods": { - "list": { - "id": "runtimeconfig.operations.list", - "path": "v1/{+name}", - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + "cancel": { + "flatPath": "v1/operations/{operationsId}:cancel", + "path": "v1/{+name}:cancel", + "id": "runtimeconfig.operations.cancel", + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + "request": { + "$ref": "CancelOperationRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], "response": { - "$ref": "ListOperationsResponse" + "$ref": "Empty" + }, + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "type": "string", + "required": true, + "pattern": "^operations/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ] + }, + "delete": { + "response": { + "$ref": "Empty" }, "parameterOrder": [ "name" ], + "httpMethod": "DELETE", + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "type": "string", + "required": true, + "pattern": "^operations/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1/operations/{operationsId}", + "id": "runtimeconfig.operations.delete", + "path": "v1/{+name}", + "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`." + }, + "list": { "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ListOperationsResponse" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloudruntimeconfig" ], "parameters": { - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" - }, "pageToken": { - "description": "The standard list page token.", "type": "string", - "location": "query" + "location": "query", + "description": "The standard list page token." }, "name": { "description": "The name of the operation's parent resource.", @@ -169,154 +305,19 @@ "format": "int32", "description": "The standard list page size.", "type": "integer" + }, + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" } }, - "flatPath": "v1/operations" - }, - "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", - "request": { - "$ref": "CancelOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "type": "string", - "required": true, - "pattern": "^operations/.+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "flatPath": "v1/operations/{operationsId}:cancel", - "id": "runtimeconfig.operations.cancel", - "path": "v1/{+name}:cancel" - }, - "delete": { - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^operations/.+$", - "location": "path", - "description": "The name of the operation resource to be deleted." - } - }, - "flatPath": "v1/operations/{operationsId}", + "flatPath": "v1/operations", "path": "v1/{+name}", - "id": "runtimeconfig.operations.delete", - "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`." + "id": "runtimeconfig.operations.list", + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id." } } } - }, - "parameters": { - "upload_protocol": { - "type": "string", - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "$.xgafv": { - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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", - "description": "Data format for response.", - "default": "json" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "key": { - "location": "query", - "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.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - } } } diff --git a/vendor/google.golang.org/api/runtimeconfig/v1/runtimeconfig-gen.go b/vendor/google.golang.org/api/runtimeconfig/v1/runtimeconfig-gen.go index 2b66cb6a7..66028c9c4 100644 --- a/vendor/google.golang.org/api/runtimeconfig/v1/runtimeconfig-gen.go +++ b/vendor/google.golang.org/api/runtimeconfig/v1/runtimeconfig-gen.go @@ -153,8 +153,8 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { type Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` @@ -302,9 +302,9 @@ type Status struct { // google.rpc.Code. Code int64 `json:"code,omitempty"` - // Details: A list of messages that carry the error details. There will - // be a - // common set of message types for APIs to use. + // 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 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 1dbd39e68..9c316a160 100644 --- a/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-api.json +++ b/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-api.json @@ -3,11 +3,11 @@ "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/cloudruntimeconfig": { "description": "Manage your Google Cloud Platform services' runtime configuration" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" } } } @@ -16,471 +16,114 @@ "ownerDomain": "google.com", "name": "runtimeconfig", "batchPath": "batch", + "fullyEncodeReservedExpansion": true, "title": "Google Cloud Runtime Configuration API", "ownerName": "Google", "resources": { "projects": { "resources": { "configs": { - "resources": { - "variables": { - "methods": { - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "Variable" - }, - "parameters": { - "requestId": { - "description": "An optional but recommended unique `request_id`. If the server\nreceives two `create()` requests with the same\n`request_id`, then the second request will be ignored and the\nfirst resource created and stored in the backend is returned.\nEmpty `request_id` fields are ignored.\n\nIt is responsibility of the client to ensure uniqueness of the\n`request_id` strings.\n\n`request_id` strings are limited to 64 characters.", - "type": "string", - "location": "query" - }, - "parent": { - "description": "The path to the RutimeConfig resource that this variable should belong to.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables", - "path": "v1beta1/{+parent}/variables", - "id": "runtimeconfig.projects.configs.variables.create", - "description": "Creates a variable within the given configuration. You cannot create\na variable with a name that is a prefix of an existing variable name, or a\nname that has an existing variable name as a prefix.\n\nTo learn more about creating a variable, read the\n[Setting and Getting Data](/deployment-manager/runtime-configurator/set-and-get-variables)\ndocumentation.", - "request": { - "$ref": "Variable" - } - }, - "watch": { - "response": { - "$ref": "Variable" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$", - "location": "path", - "description": "The name of the variable to watch, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}:watch", - "id": "runtimeconfig.projects.configs.variables.watch", - "path": "v1beta1/{+name}:watch", - "request": { - "$ref": "WatchVariableRequest" - }, - "description": "Watches a specific variable and waits for a change in the variable's value.\nWhen there is a change, this method returns the new value or times out.\n\nIf a variable is deleted while being watched, the `variableState` state is\nset to `DELETED` and the method returns the last known variable `value`.\n\nIf you set the deadline for watching to a larger value than internal timeout\n(60 seconds), the current variable value is returned and the `variableState`\nwill be `VARIABLE_STATE_UNSPECIFIED`.\n\nTo learn more about creating a watcher, read the\n[Watching a Variable for Changes](/deployment-manager/runtime-configurator/watching-a-variable)\ndocumentation." - }, - "get": { - "response": { - "$ref": "Variable" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$", - "location": "path", - "description": "The name of the variable to return, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIBLE_NAME]`", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}", - "id": "runtimeconfig.projects.configs.variables.get", - "path": "v1beta1/{+name}", - "description": "Gets information about a single variable." - }, - "update": { - "description": "Updates an existing variable with a new value.", - "request": { - "$ref": "Variable" - }, - "httpMethod": "PUT", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Variable" - }, - "parameters": { - "name": { - "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$", - "location": "path", - "description": "The name of the variable to update, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]`", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}", - "path": "v1beta1/{+name}", - "id": "runtimeconfig.projects.configs.variables.update" - }, - "testIamPermissions": { - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "parameters": { - "resource": { - "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$", - "location": "path", - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}:testIamPermissions", - "path": "v1beta1/{+resource}:testIamPermissions", - "id": "runtimeconfig.projects.configs.variables.testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "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." - }, - "delete": { - "id": "runtimeconfig.projects.configs.variables.delete", - "path": "v1beta1/{+name}", - "description": "Deletes a variable or multiple variables.\n\nIf you specify a variable name, then that variable is deleted. If you\nspecify a prefix and `recursive` is true, then all variables with that\nprefix are deleted. You must set a `recursive` to true if you delete\nvariables by prefix.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "parameters": { - "recursive": { - "description": "Set to `true` to recursively delete multiple variables with the same\nprefix.", - "type": "boolean", - "location": "query" - }, - "name": { - "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$", - "location": "path", - "description": "The name of the variable to delete, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]`", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}" - }, - "list": { - "id": "runtimeconfig.projects.configs.variables.list", - "path": "v1beta1/{+parent}/variables", - "description": "Lists variables within given a configuration, matching any provided filters.\nThis only lists variable names, not the values, unless `return_values` is\ntrue, in which case only variables that user has IAM permission to GetVariable\nwill be returned.", - "response": { - "$ref": "ListVariablesResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "parameters": { - "returnValues": { - "description": "The flag indicates whether the user wants to return values of variables.\nIf true, then only those variables that user has IAM GetVariable permission\nwill be returned along with their values.", - "type": "boolean", - "location": "query" - }, - "pageToken": { - "location": "query", - "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.", - "type": "integer", - "location": "query" - }, - "parent": { - "description": "The path to the RuntimeConfig resource for which you want to list variables.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path" - }, - "filter": { - "location": "query", - "description": "Filters variables by matching the specified filter. For example:\n\n`projects/example-project/config/[CONFIG_NAME]/variables/example-variable`.", - "type": "string" - } - }, - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables" - } - } - }, - "waiters": { - "methods": { - "delete": { - "id": "runtimeconfig.projects.configs.waiters.delete", - "path": "v1beta1/{+name}", - "description": "Deletes the waiter with the specified name.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "parameters": { - "name": { - "description": "The Waiter resource to delete, in the format:\n\n `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+/waiters/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters/{waitersId}" - }, - "get": { - "httpMethod": "GET", - "response": { - "$ref": "Waiter" - }, - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/configs/[^/]+/waiters/[^/]+$", - "location": "path", - "description": "The fully-qualified name of the Waiter resource object to retrieve, in the\nformat:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]`", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters/{waitersId}", - "path": "v1beta1/{+name}", - "id": "runtimeconfig.projects.configs.waiters.get", - "description": "Gets information about a single waiter." - }, - "list": { - "path": "v1beta1/{+parent}/waiters", - "id": "runtimeconfig.projects.configs.waiters.list", - "description": "List waiters within the given configuration.", - "httpMethod": "GET", - "response": { - "$ref": "ListWaitersResponse" - }, - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path", - "description": "The path to the configuration for which you want to get a list of waiters.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", - "type": "string", - "required": true - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.", - "type": "integer" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters" - }, - "create": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "parameters": { - "requestId": { - "location": "query", - "description": "An optional but recommended unique `request_id`. If the server\nreceives two `create()` requests with the same\n`request_id`, then the second request will be ignored and the\nfirst resource created and stored in the backend is returned.\nEmpty `request_id` fields are ignored.\n\nIt is responsibility of the client to ensure uniqueness of the\n`request_id` strings.\n\n`request_id` strings are limited to 64 characters.", - "type": "string" - }, - "parent": { - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path", - "description": "The path to the configuration that will own the waiter.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters", - "id": "runtimeconfig.projects.configs.waiters.create", - "path": "v1beta1/{+parent}/waiters", - "description": "Creates a Waiter resource. This operation returns a long-running Operation\nresource which can be polled for completion. However, a waiter with the\ngiven name will exist (and can be retrieved) prior to the operation\ncompleting. If the operation fails, the failed Waiter resource will\nstill exist and must be deleted prior to subsequent creation attempts.", - "request": { - "$ref": "Waiter" - } - }, - "testIamPermissions": { - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "pattern": "^projects/[^/]+/configs/[^/]+/waiters/[^/]+$", - "location": "path", - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters/{waitersId}:testIamPermissions", - "id": "runtimeconfig.projects.configs.waiters.testIamPermissions", - "path": "v1beta1/{+resource}: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.", - "request": { - "$ref": "TestIamPermissionsRequest" - } - } - } - }, - "operations": { - "methods": { - "testIamPermissions": { - "path": "v1beta1/{+resource}:testIamPermissions", - "id": "runtimeconfig.projects.configs.operations.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.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameters": { - "resource": { - "pattern": "^projects/[^/]+/configs/[^/]+/operations/.+$", - "location": "path", - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/operations/{operationsId}:testIamPermissions" - }, - "get": { - "httpMethod": "GET", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/configs/[^/]+/operations/.+$", - "location": "path", - "description": "The name of the operation resource.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/operations/{operationsId}", - "path": "v1beta1/{+name}", - "id": "runtimeconfig.projects.configs.operations.get", - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." - } - } - } - }, "methods": { - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "testIamPermissions": { + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}:testIamPermissions", + "path": "v1beta1/{+resource}:testIamPermissions", + "id": "runtimeconfig.projects.configs.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.", "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" + "$ref": "TestIamPermissionsRequest" }, + "httpMethod": "POST", "parameterOrder": [ "resource" ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameters": { + "resource": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/configs/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ] + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "name": { + "location": "path", + "description": "The RuntimeConfig resource to delete, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/configs/[^/]+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}", + "path": "v1beta1/{+name}", + "id": "runtimeconfig.projects.configs.delete", + "description": "Deletes a RuntimeConfig resource." + }, + "list": { + "response": { + "$ref": "ListConfigsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "parent": { + "description": "The [project ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848)\nfor this request, in the format `projects/[PROJECT_ID]`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs", + "id": "runtimeconfig.projects.configs.list", + "path": "v1beta1/{+parent}/configs", + "description": "Lists all the RuntimeConfig resources within project." + }, + "setIamPolicy": { "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, "parameters": { "resource": { "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", @@ -495,16 +138,18 @@ "https://www.googleapis.com/auth/cloudruntimeconfig" ], "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}:setIamPolicy", + "path": "v1beta1/{+resource}:setIamPolicy", "id": "runtimeconfig.projects.configs.setIamPolicy", - "path": "v1beta1/{+resource}:setIamPolicy" + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "SetIamPolicyRequest" + } }, "create": { - "id": "runtimeconfig.projects.configs.create", - "path": "v1beta1/{+parent}/configs", + "description": "Creates a new RuntimeConfig resource. The configuration name must be\nunique within project.", "request": { "$ref": "RuntimeConfig" }, - "description": "Creates a new RuntimeConfig resource. The configuration name must be\nunique within project.", "response": { "$ref": "RuntimeConfig" }, @@ -512,25 +157,27 @@ "parent" ], "httpMethod": "POST", + "parameters": { + "requestId": { + "type": "string", + "location": "query", + "description": "An optional but recommended unique `request_id`. If the server\nreceives two `create()` requests with the same\n`request_id`, then the second request will be ignored and the\nfirst resource created and stored in the backend is returned.\nEmpty `request_id` fields are ignored.\n\nIt is responsibility of the client to ensure uniqueness of the\n`request_id` strings.\n\n`request_id` strings are limited to 64 characters." + }, + "parent": { + "location": "path", + "description": "The [project ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848)\nfor this request, in the format `projects/[PROJECT_ID]`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$" + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloudruntimeconfig" ], - "parameters": { - "requestId": { - "location": "query", - "description": "An optional but recommended unique `request_id`. If the server\nreceives two `create()` requests with the same\n`request_id`, then the second request will be ignored and the\nfirst resource created and stored in the backend is returned.\nEmpty `request_id` fields are ignored.\n\nIt is responsibility of the client to ensure uniqueness of the\n`request_id` strings.\n\n`request_id` strings are limited to 64 characters.", - "type": "string" - }, - "parent": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "The [project ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848)\nfor this request, in the format `projects/[PROJECT_ID]`.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta1/projects/{projectsId}/configs" + "flatPath": "v1beta1/projects/{projectsId}/configs", + "id": "runtimeconfig.projects.configs.create", + "path": "v1beta1/{+parent}/configs" }, "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.", @@ -541,10 +188,6 @@ "resource" ], "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], "parameters": { "resource": { "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", @@ -554,11 +197,18 @@ "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}:getIamPolicy", "id": "runtimeconfig.projects.configs.getIamPolicy", "path": "v1beta1/{+resource}:getIamPolicy" }, "get": { + "id": "runtimeconfig.projects.configs.get", + "path": "v1beta1/{+name}", + "description": "Gets information about a RuntimeConfig resource.", "response": { "$ref": "RuntimeConfig" }, @@ -566,23 +216,20 @@ "name" ], "httpMethod": "GET", - "parameters": { - "name": { - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path", - "description": "The name of the RuntimeConfig resource to retrieve, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", - "type": "string", - "required": true - } - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloudruntimeconfig" ], - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}", - "id": "runtimeconfig.projects.configs.get", - "path": "v1beta1/{+name}", - "description": "Gets information about a RuntimeConfig resource." + "parameters": { + "name": { + "description": "The name of the RuntimeConfig resource to retrieve, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/configs/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}" }, "update": { "httpMethod": "PUT", @@ -612,98 +259,452 @@ "request": { "$ref": "RuntimeConfig" } - }, - "testIamPermissions": { - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "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.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}:testIamPermissions", - "id": "runtimeconfig.projects.configs.testIamPermissions", - "path": "v1beta1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "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." - }, - "delete": { - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The RuntimeConfig resource to delete, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}", - "path": "v1beta1/{+name}", - "id": "runtimeconfig.projects.configs.delete", - "description": "Deletes a RuntimeConfig resource." - }, - "list": { - "response": { - "$ref": "ListConfigsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.", - "type": "string" + } + }, + "resources": { + "waiters": { + "methods": { + "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.", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/configs/[^/]+/waiters/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters/{waitersId}:testIamPermissions", + "path": "v1beta1/{+resource}:testIamPermissions", + "id": "runtimeconfig.projects.configs.waiters.testIamPermissions" }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.", - "type": "integer" + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The Waiter resource to delete, in the format:\n\n `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/configs/[^/]+/waiters/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters/{waitersId}", + "path": "v1beta1/{+name}", + "id": "runtimeconfig.projects.configs.waiters.delete", + "description": "Deletes the waiter with the specified name." }, - "parent": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "The [project ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848)\nfor this request, in the format `projects/[PROJECT_ID]`.", - "type": "string", - "required": true + "get": { + "description": "Gets information about a single waiter.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Waiter" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "name": { + "description": "The fully-qualified name of the Waiter resource object to retrieve, in the\nformat:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/configs/[^/]+/waiters/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters/{waitersId}", + "path": "v1beta1/{+name}", + "id": "runtimeconfig.projects.configs.waiters.get" + }, + "list": { + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters", + "path": "v1beta1/{+parent}/waiters", + "id": "runtimeconfig.projects.configs.waiters.list", + "description": "List waiters within the given configuration.", + "httpMethod": "GET", + "response": { + "$ref": "ListWaitersResponse" + }, + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageToken": { + "type": "string", + "location": "query", + "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results." + }, + "pageSize": { + "type": "integer", + "location": "query", + "format": "int32", + "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements." + }, + "parent": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/configs/[^/]+$", + "location": "path", + "description": "The path to the configuration for which you want to get a list of waiters.\nThe configuration must exist beforehand; the path must be in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ] + }, + "create": { + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters", + "id": "runtimeconfig.projects.configs.waiters.create", + "path": "v1beta1/{+parent}/waiters", + "request": { + "$ref": "Waiter" + }, + "description": "Creates a Waiter resource. This operation returns a long-running Operation\nresource which can be polled for completion. However, a waiter with the\ngiven name will exist (and can be retrieved) prior to the operation\ncompleting. If the operation fails, the failed Waiter resource will\nstill exist and must be deleted prior to subsequent creation attempts.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "parent": { + "description": "The path to the configuration that will own the waiter.\nThe configuration must exist beforehand; the path must be in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/configs/[^/]+$", + "location": "path" + }, + "requestId": { + "description": "An optional but recommended unique `request_id`. If the server\nreceives two `create()` requests with the same\n`request_id`, then the second request will be ignored and the\nfirst resource created and stored in the backend is returned.\nEmpty `request_id` fields are ignored.\n\nIt is responsibility of the client to ensure uniqueness of the\n`request_id` strings.\n\n`request_id` strings are limited to 64 characters.", + "type": "string", + "location": "query" + } + } } - }, - "flatPath": "v1beta1/projects/{projectsId}/configs", - "id": "runtimeconfig.projects.configs.list", - "path": "v1beta1/{+parent}/configs", - "description": "Lists all the RuntimeConfig resources within project." + } + }, + "operations": { + "methods": { + "get": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/configs/[^/]+/operations/.+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/operations/{operationsId}", + "id": "runtimeconfig.projects.configs.operations.get", + "path": "v1beta1/{+name}", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." + }, + "testIamPermissions": { + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/operations/{operationsId}:testIamPermissions", + "id": "runtimeconfig.projects.configs.operations.testIamPermissions", + "path": "v1beta1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "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.", + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/configs/[^/]+/operations/.+$" + } + } + } + } + }, + "variables": { + "methods": { + "testIamPermissions": { + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}:testIamPermissions", + "path": "v1beta1/{+resource}:testIamPermissions", + "id": "runtimeconfig.projects.configs.variables.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.", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + } + }, + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "recursive": { + "description": "Set to `true` to recursively delete multiple variables with the same\nprefix.", + "type": "boolean", + "location": "query" + }, + "name": { + "location": "path", + "description": "The name of the variable to delete, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}", + "path": "v1beta1/{+name}", + "id": "runtimeconfig.projects.configs.variables.delete", + "description": "Deletes a variable or multiple variables.\n\nIf you specify a variable name, then that variable is deleted. If you\nspecify a prefix and `recursive` is true, then all variables with that\nprefix are deleted. You must set a `recursive` to true if you delete\nvariables by prefix." + }, + "list": { + "response": { + "$ref": "ListVariablesResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "filter": { + "description": "Filters variables by matching the specified filter. For example:\n\n`projects/example-project/config/[CONFIG_NAME]/variables/example-variable`.", + "type": "string", + "location": "query" + }, + "returnValues": { + "type": "boolean", + "location": "query", + "description": "The flag indicates whether the user wants to return values of variables.\nIf true, then only those variables that user has IAM GetVariable permission\nwill be returned along with their values." + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.", + "type": "integer" + }, + "parent": { + "location": "path", + "description": "The path to the RuntimeConfig resource for which you want to list variables.\nThe configuration must exist beforehand; the path must be in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/configs/[^/]+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables", + "id": "runtimeconfig.projects.configs.variables.list", + "path": "v1beta1/{+parent}/variables", + "description": "Lists variables within given a configuration, matching any provided filters.\nThis only lists variable names, not the values, unless `return_values` is\ntrue, in which case only variables that user has IAM permission to GetVariable\nwill be returned." + }, + "create": { + "id": "runtimeconfig.projects.configs.variables.create", + "path": "v1beta1/{+parent}/variables", + "description": "Creates a variable within the given configuration. You cannot create\na variable with a name that is a prefix of an existing variable name, or a\nname that has an existing variable name as a prefix.\n\nTo learn more about creating a variable, read the\n[Setting and Getting Data](/deployment-manager/runtime-configurator/set-and-get-variables)\ndocumentation.", + "request": { + "$ref": "Variable" + }, + "response": { + "$ref": "Variable" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "requestId": { + "location": "query", + "description": "An optional but recommended unique `request_id`. If the server\nreceives two `create()` requests with the same\n`request_id`, then the second request will be ignored and the\nfirst resource created and stored in the backend is returned.\nEmpty `request_id` fields are ignored.\n\nIt is responsibility of the client to ensure uniqueness of the\n`request_id` strings.\n\n`request_id` strings are limited to 64 characters.", + "type": "string" + }, + "parent": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/configs/[^/]+$", + "location": "path", + "description": "The path to the RutimeConfig resource that this variable should belong to.\nThe configuration must exist beforehand; the path must be in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables" + }, + "watch": { + "parameters": { + "name": { + "description": "The name of the variable to watch, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}:watch", + "path": "v1beta1/{+name}:watch", + "id": "runtimeconfig.projects.configs.variables.watch", + "description": "Watches a specific variable and waits for a change in the variable's value.\nWhen there is a change, this method returns the new value or times out.\n\nIf a variable is deleted while being watched, the `variableState` state is\nset to `DELETED` and the method returns the last known variable `value`.\n\nIf you set the deadline for watching to a larger value than internal timeout\n(60 seconds), the current variable value is returned and the `variableState`\nwill be `VARIABLE_STATE_UNSPECIFIED`.\n\nTo learn more about creating a watcher, read the\n[Watching a Variable for Changes](/deployment-manager/runtime-configurator/watching-a-variable)\ndocumentation.", + "request": { + "$ref": "WatchVariableRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Variable" + } + }, + "get": { + "path": "v1beta1/{+name}", + "id": "runtimeconfig.projects.configs.variables.get", + "description": "Gets information about a single variable.", + "httpMethod": "GET", + "response": { + "$ref": "Variable" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the variable to return, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIBLE_NAME]`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}" + }, + "update": { + "response": { + "$ref": "Variable" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the variable to update, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}", + "id": "runtimeconfig.projects.configs.variables.update", + "path": "v1beta1/{+name}", + "request": { + "$ref": "Variable" + }, + "description": "Updates an existing variable with a new value." + } + } } } } @@ -711,26 +712,15 @@ } }, "parameters": { - "upload_protocol": { + "fields": { + "type": "string", "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" + "description": "Selector specifying which fields to include in a partial response." }, "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", - "location": "query" - }, - "fields": { "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." }, "$.xgafv": { "enumDescriptions": [ @@ -788,167 +778,46 @@ "type": "boolean" }, "bearer_token": { + "location": "query", "description": "OAuth bearer token.", - "type": "string", - "location": "query" + "type": "string" }, "oauth_token": { "location": "query", "description": "OAuth 2.0 token for the current user.", "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" } }, "version": "v1beta1", "baseUrl": "https://runtimeconfig.googleapis.com/", "kind": "discovery#restDescription", - "servicePath": "", "description": "The Runtime Configurator allows you to dynamically configure and expose variables through Google Cloud Platform. In addition, you can also set Watchers and Waiters that will watch for changes to your data and return based on certain conditions.", + "servicePath": "", "basePath": "", - "revision": "20170620", - "documentationLink": "https://cloud.google.com/deployment-manager/runtime-configurator/", "id": "runtimeconfig:v1beta1", + "documentationLink": "https://cloud.google.com/deployment-manager/runtime-configurator/", + "revision": "20170829", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { - "ListWaitersResponse": { - "properties": { - "nextPageToken": { - "description": "This token allows you to get the next page of results for list requests.\nIf the number of results is larger than `pageSize`, use the `nextPageToken`\nas a value for the query parameter `pageToken` in the next list request.\nSubsequent list requests will have their own `nextPageToken` to continue\npaging through the results", - "type": "string" - }, - "waiters": { - "description": "Found waiters in the project.", - "items": { - "$ref": "Waiter" - }, - "type": "array" - } - }, - "id": "ListWaitersResponse", - "description": "Response for the `ListWaiters()` method.\nOrder of returned waiter objects is arbitrary.", - "type": "object" - }, - "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "type": "object", - "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" - } - }, - "id": "TestIamPermissionsRequest" - }, - "Waiter": { - "description": "A Waiter resource waits for some end condition within a RuntimeConfig resource\nto be met before it returns. For example, assume you have a distributed\nsystem where each node writes to a Variable resource indidicating the node's\nreadiness as part of the startup process.\n\nYou then configure a Waiter resource with the success condition set to wait\nuntil some number of nodes have checked in. Afterwards, your application\nruns some arbitrary code after the condition has been met and the waiter\nreturns successfully.\n\nOnce created, a Waiter resource is immutable.\n\nTo learn more about using waiters, read the\n[Creating a Waiter](/deployment-manager/runtime-configurator/creating-a-waiter)\ndocumentation.", - "type": "object", - "properties": { - "error": { - "$ref": "Status", - "description": "[Output Only] If the waiter ended due to a failure or timeout, this value\nwill be set." - }, - "failure": { - "$ref": "EndCondition", - "description": "[Optional] The failure condition of this waiter. If this condition is met,\n`done` will be set to `true` and the `error` code will be set to `ABORTED`.\nThe failure condition takes precedence over the success condition. If both\nconditions are met, a failure will be indicated. This value is optional; if\nno failure condition is set, the only failure scenario will be a timeout." - }, - "success": { - "description": "[Required] The success condition. If this condition is met, `done` will be\nset to `true` and the `error` value will remain unset. The failure condition\ntakes precedence over the success condition. If both conditions are met, a\nfailure will be indicated.", - "$ref": "EndCondition" - }, - "createTime": { - "format": "google-datetime", - "description": "[Output Only] The instant at which this Waiter resource was created. Adding\nthe value of `timeout` to this instant yields the timeout deadline for the\nwaiter.", - "type": "string" - }, - "done": { - "description": "[Output Only] If the value is `false`, it means the waiter is still waiting\nfor one of its conditions to be met.\n\nIf true, the waiter has finished. If the waiter finished due to a timeout\nor failure, `error` will be set.", - "type": "boolean" - }, - "timeout": { - "format": "google-duration", - "description": "[Required] Specifies the timeout of the waiter in seconds, beginning from\nthe instant that `waiters().create` method is called. If this time elapses\nbefore the success or failure conditions are met, the waiter fails and sets\nthe `error` code to `DEADLINE_EXCEEDED`.", - "type": "string" - }, - "name": { - "description": "The name of the Waiter resource, in the format:\n\n projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]\n\nThe `[PROJECT_ID]` must be a valid Google Cloud project ID,\nthe `[CONFIG_NAME]` must be a valid RuntimeConfig resource, the\n`[WAITER_NAME]` must match RFC 1035 segment specification, and the length\nof `[WAITER_NAME]` must be less than 64 bytes.\n\nAfter you create a Waiter resource, you cannot change the resource name.", - "type": "string" - } - }, - "id": "Waiter" - }, - "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "etag": { - "format": "byte", - "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.", - "type": "string" - }, - "version": { - "format": "int32", - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer" - }, - "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" - } - }, - "id": "Policy" - }, - "Variable": { - "properties": { - "state": { - "enum": [ - "VARIABLE_STATE_UNSPECIFIED", - "UPDATED", - "DELETED" - ], - "description": "[Ouput only] The current state of the variable. The variable state indicates\nthe outcome of the `variables().watch` call and is visible through the\n`get` and `list` calls.", - "type": "string", - "enumDescriptions": [ - "Default variable state.", - "The variable was updated, while `variables().watch` was executing.", - "The variable was deleted, while `variables().watch` was executing." - ] - }, - "updateTime": { - "format": "google-datetime", - "description": "[Output Only] The time of the last variable update.", - "type": "string" - }, - "name": { - "description": "The name of the variable resource, in the format:\n\n projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]\n\nThe `[PROJECT_ID]` must be a valid project ID, `[CONFIG_NAME]` must be a\nvalid RuntimeConfig reource and `[VARIABLE_NAME]` follows Unix file system\nfile path naming.\n\nThe `[VARIABLE_NAME]` can contain ASCII letters, numbers, slashes and\ndashes. Slashes are used as path element separators and are not part of the\n`[VARIABLE_NAME]` itself, so `[VARIABLE_NAME]` must contain at least one\nnon-slash character. Multiple slashes are coalesced into single slash\ncharacter. Each path segment should follow RFC 1035 segment specification.\nThe length of a `[VARIABLE_NAME]` must be less than 256 bytes.\n\nOnce you create a variable, you cannot change the variable name.", - "type": "string" - }, - "text": { - "description": "The string value of the variable. The length of the value must be less\nthan 4096 bytes. Empty values are also accepted. For example,\n`text: \"my text value\"`. The string must be valid UTF-8.", - "type": "string" - }, - "value": { - "format": "byte", - "description": "The binary value of the variable. The length of the value must be less\nthan 4096 bytes. Empty values are also accepted. The value must be\nbase64 encoded. Only one of `value` or `text` can be set.", - "type": "string" - } - }, - "id": "Variable", - "description": "Describes a single variable within a RuntimeConfig resource.\nThe name denotes the hierarchical variable name. For example,\n`ports/serving_port` is a valid variable name. The variable value is an\nopaque string and only leaf variables can have values (that is, variables\nthat do not have any child variables).", - "type": "object" - }, "Operation": { "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" + "type": "boolean", + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable." }, "response": { "additionalProperties": { @@ -959,8 +828,8 @@ "type": "object" }, "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" + "type": "string", + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`." }, "error": { "$ref": "Status", @@ -968,8 +837,8 @@ }, "metadata": { "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." }, "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", "type": "object" @@ -978,31 +847,20 @@ "id": "Operation" }, "SetIamPolicyRequest": { + "id": "SetIamPolicyRequest", "description": "Request message for `SetIamPolicy` method.", "type": "object", "properties": { "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.", - "$ref": "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." } - }, - "id": "SetIamPolicyRequest" + } }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { - "details": { - "description": "A list of messages that carry the error details. There will be a\ncommon 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" - }, "code": { "format": "int32", "description": "The status code, which should be an enum value of google.rpc.Code.", @@ -1011,29 +869,43 @@ "message": { "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "type": "array" } }, "id": "Status" }, "Binding": { - "description": "Associates `members` with a `role`.", - "type": "object", "properties": { "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` or `joe@example.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" + "type": "array", + "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` or `joe@example.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" }, "role": { "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", "type": "string" } }, - "id": "Binding" + "id": "Binding", + "description": "Associates `members` with a `role`.", + "type": "object" }, "Cardinality": { + "id": "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 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.", + "type": "object", "properties": { "number": { "format": "int32", @@ -1044,34 +916,31 @@ "description": "The root of the variable subtree to monitor. For example, `/foo`.", "type": "string" } - }, - "id": "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 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.", - "type": "object" + } }, "Empty": { - "properties": {}, "id": "Empty", "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object" + "type": "object", + "properties": {} }, "ListConfigsResponse": { - "description": "`ListConfigs()` returns the following response. The order of returned\nobjects is arbitrary; that is, it is not ordered in any particular way.", - "type": "object", "properties": { + "nextPageToken": { + "description": "This token allows you to get the next page of results for list requests.\nIf the number of results is larger than `pageSize`, use the `nextPageToken`\nas a value for the query parameter `pageToken` in the next list request.\nSubsequent list requests will have their own `nextPageToken` to continue\npaging through the results", + "type": "string" + }, "configs": { "description": "A list of the configurations in the project. The order of returned\nobjects is arbitrary; that is, it is not ordered in any particular way.", "items": { "$ref": "RuntimeConfig" }, "type": "array" - }, - "nextPageToken": { - "description": "This token allows you to get the next page of results for list requests.\nIf the number of results is larger than `pageSize`, use the `nextPageToken`\nas a value for the query parameter `pageToken` in the next list request.\nSubsequent list requests will have their own `nextPageToken` to continue\npaging through the results", - "type": "string" } }, - "id": "ListConfigsResponse" + "id": "ListConfigsResponse", + "description": "`ListConfigs()` returns the following response. The order of returned\nobjects is arbitrary; that is, it is not ordered in any particular way.", + "type": "object" }, "EndCondition": { "description": "The condition that a Waiter resource is waiting for.", @@ -1085,6 +954,8 @@ "id": "EndCondition" }, "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "type": "object", "properties": { "permissions": { "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", @@ -1094,9 +965,7 @@ "type": "array" } }, - "id": "TestIamPermissionsResponse", - "description": "Response message for `TestIamPermissions` method.", - "type": "object" + "id": "TestIamPermissionsResponse" }, "ListVariablesResponse": { "properties": { @@ -1142,6 +1011,138 @@ } }, "id": "WatchVariableRequest" + }, + "ListWaitersResponse": { + "description": "Response for the `ListWaiters()` method.\nOrder of returned waiter objects is arbitrary.", + "type": "object", + "properties": { + "waiters": { + "description": "Found waiters in the project.", + "items": { + "$ref": "Waiter" + }, + "type": "array" + }, + "nextPageToken": { + "description": "This token allows you to get the next page of results for list requests.\nIf the number of results is larger than `pageSize`, use the `nextPageToken`\nas a value for the query parameter `pageToken` in the next list request.\nSubsequent list requests will have their own `nextPageToken` to continue\npaging through the results", + "type": "string" + } + }, + "id": "ListWaitersResponse" + }, + "Waiter": { + "description": "A Waiter resource waits for some end condition within a RuntimeConfig resource\nto be met before it returns. For example, assume you have a distributed\nsystem where each node writes to a Variable resource indidicating the node's\nreadiness as part of the startup process.\n\nYou then configure a Waiter resource with the success condition set to wait\nuntil some number of nodes have checked in. Afterwards, your application\nruns some arbitrary code after the condition has been met and the waiter\nreturns successfully.\n\nOnce created, a Waiter resource is immutable.\n\nTo learn more about using waiters, read the\n[Creating a Waiter](/deployment-manager/runtime-configurator/creating-a-waiter)\ndocumentation.", + "type": "object", + "properties": { + "error": { + "$ref": "Status", + "description": "[Output Only] If the waiter ended due to a failure or timeout, this value\nwill be set." + }, + "failure": { + "description": "[Optional] The failure condition of this waiter. If this condition is met,\n`done` will be set to `true` and the `error` code will be set to `ABORTED`.\nThe failure condition takes precedence over the success condition. If both\nconditions are met, a failure will be indicated. This value is optional; if\nno failure condition is set, the only failure scenario will be a timeout.", + "$ref": "EndCondition" + }, + "success": { + "$ref": "EndCondition", + "description": "[Required] The success condition. If this condition is met, `done` will be\nset to `true` and the `error` value will remain unset. The failure condition\ntakes precedence over the success condition. If both conditions are met, a\nfailure will be indicated." + }, + "done": { + "type": "boolean", + "description": "[Output Only] If the value is `false`, it means the waiter is still waiting\nfor one of its conditions to be met.\n\nIf true, the waiter has finished. If the waiter finished due to a timeout\nor failure, `error` will be set." + }, + "createTime": { + "format": "google-datetime", + "description": "[Output Only] The instant at which this Waiter resource was created. Adding\nthe value of `timeout` to this instant yields the timeout deadline for the\nwaiter.", + "type": "string" + }, + "timeout": { + "type": "string", + "format": "google-duration", + "description": "[Required] Specifies the timeout of the waiter in seconds, beginning from\nthe instant that `waiters().create` method is called. If this time elapses\nbefore the success or failure conditions are met, the waiter fails and sets\nthe `error` code to `DEADLINE_EXCEEDED`." + }, + "name": { + "description": "The name of the Waiter resource, in the format:\n\n projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]\n\nThe `[PROJECT_ID]` must be a valid Google Cloud project ID,\nthe `[CONFIG_NAME]` must be a valid RuntimeConfig resource, the\n`[WAITER_NAME]` must match RFC 1035 segment specification, and the length\nof `[WAITER_NAME]` must be less than 64 bytes.\n\nAfter you create a Waiter resource, you cannot change the resource name.", + "type": "string" + } + }, + "id": "Waiter" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "type": "object", + "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" + } + }, + "id": "TestIamPermissionsRequest" + }, + "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", + "properties": { + "etag": { + "format": "byte", + "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.", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" + }, + "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" + } + }, + "id": "Policy" + }, + "Variable": { + "description": "Describes a single variable within a RuntimeConfig resource.\nThe name denotes the hierarchical variable name. For example,\n`ports/serving_port` is a valid variable name. The variable value is an\nopaque string and only leaf variables can have values (that is, variables\nthat do not have any child variables).", + "type": "object", + "properties": { + "state": { + "type": "string", + "enumDescriptions": [ + "Default variable state.", + "The variable was updated, while `variables().watch` was executing.", + "The variable was deleted, while `variables().watch` was executing." + ], + "enum": [ + "VARIABLE_STATE_UNSPECIFIED", + "UPDATED", + "DELETED" + ], + "description": "[Ouput only] The current state of the variable. The variable state indicates\nthe outcome of the `variables().watch` call and is visible through the\n`get` and `list` calls." + }, + "updateTime": { + "format": "google-datetime", + "description": "[Output Only] The time of the last variable update.", + "type": "string" + }, + "name": { + "type": "string", + "description": "The name of the variable resource, in the format:\n\n projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]\n\nThe `[PROJECT_ID]` must be a valid project ID, `[CONFIG_NAME]` must be a\nvalid RuntimeConfig reource and `[VARIABLE_NAME]` follows Unix file system\nfile path naming.\n\nThe `[VARIABLE_NAME]` can contain ASCII letters, numbers, slashes and\ndashes. Slashes are used as path element separators and are not part of the\n`[VARIABLE_NAME]` itself, so `[VARIABLE_NAME]` must contain at least one\nnon-slash character. Multiple slashes are coalesced into single slash\ncharacter. Each path segment should follow RFC 1035 segment specification.\nThe length of a `[VARIABLE_NAME]` must be less than 256 bytes.\n\nOnce you create a variable, you cannot change the variable name." + }, + "text": { + "description": "The string value of the variable. The length of the value must be less\nthan 4096 bytes. Empty values are also accepted. For example,\n`text: \"my text value\"`. The string must be valid UTF-8.", + "type": "string" + }, + "value": { + "format": "byte", + "description": "The binary value of the variable. The length of the value must be less\nthan 4096 bytes. Empty values are also accepted. The value must be\nbase64 encoded. Only one of `value` or `text` can be set.", + "type": "string" + } + }, + "id": "Variable" } }, "protocol": "rest", 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 fc28d316b..960feb81f 100644 --- a/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-gen.go +++ b/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-gen.go @@ -446,8 +446,8 @@ func (s *ListWaitersResponse) MarshalJSON() ([]byte, error) { type Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` @@ -777,9 +777,9 @@ type Status struct { // google.rpc.Code. Code int64 `json:"code,omitempty"` - // Details: A list of messages that carry the error details. There will - // be a - // common set of message types for APIs to use. + // 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 @@ -2740,7 +2740,7 @@ func (c *ProjectsConfigsVariablesCreateCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "parent": { - // "description": "The path to the RutimeConfig resource that this variable should belong to.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", + // "description": "The path to the RutimeConfig resource that this variable should belong to.\nThe configuration must exist beforehand; the path must be in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", // "location": "path", // "pattern": "^projects/[^/]+/configs/[^/]+$", // "required": true, @@ -3234,7 +3234,7 @@ func (c *ProjectsConfigsVariablesListCall) Do(opts ...googleapi.CallOption) (*Li // "type": "string" // }, // "parent": { - // "description": "The path to the RuntimeConfig resource for which you want to list variables.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", + // "description": "The path to the RuntimeConfig resource for which you want to list variables.\nThe configuration must exist beforehand; the path must be in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", // "location": "path", // "pattern": "^projects/[^/]+/configs/[^/]+$", // "required": true, @@ -3857,7 +3857,7 @@ func (c *ProjectsConfigsWaitersCreateCall) Do(opts ...googleapi.CallOption) (*Op // ], // "parameters": { // "parent": { - // "description": "The path to the configuration that will own the waiter.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`.", + // "description": "The path to the configuration that will own the waiter.\nThe configuration must exist beforehand; the path must be in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`.", // "location": "path", // "pattern": "^projects/[^/]+/configs/[^/]+$", // "required": true, @@ -4298,7 +4298,7 @@ func (c *ProjectsConfigsWaitersListCall) Do(opts ...googleapi.CallOption) (*List // "type": "string" // }, // "parent": { - // "description": "The path to the configuration for which you want to get a list of waiters.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", + // "description": "The path to the configuration for which you want to get a list of waiters.\nThe configuration must exist beforehand; the path must be in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", // "location": "path", // "pattern": "^projects/[^/]+/configs/[^/]+$", // "required": true, diff --git a/vendor/google.golang.org/api/safebrowsing/v4/safebrowsing-api.json b/vendor/google.golang.org/api/safebrowsing/v4/safebrowsing-api.json index ee89f429b..6957187ce 100644 --- a/vendor/google.golang.org/api/safebrowsing/v4/safebrowsing-api.json +++ b/vendor/google.golang.org/api/safebrowsing/v4/safebrowsing-api.json @@ -1,27 +1,37 @@ { + "revision": "20170911", + "documentationLink": "https://developers.google.com/safe-browsing/", + "id": "safebrowsing:v4", + "title": "Google Safe Browsing API", + "discoveryVersion": "v1", + "ownerName": "Google", "resources": { "threatListUpdates": { "methods": { "fetch": { - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "FetchThreatListUpdatesResponse" - }, - "parameters": {}, - "flatPath": "v4/threatListUpdates:fetch", - "path": "v4/threatListUpdates:fetch", - "id": "safebrowsing.threatListUpdates.fetch", "request": { "$ref": "FetchThreatListUpdatesRequest" }, - "description": "Fetches the most recent threat list updates. A client can request updates\nfor multiple lists at once." + "description": "Fetches the most recent threat list updates. A client can request updates\nfor multiple lists at once.", + "response": { + "$ref": "FetchThreatListUpdatesResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "flatPath": "v4/threatListUpdates:fetch", + "id": "safebrowsing.threatListUpdates.fetch", + "path": "v4/threatListUpdates:fetch" } } }, "encodedFullHashes": { "methods": { "get": { + "flatPath": "v4/encodedFullHashes/{encodedRequest}", + "path": "v4/encodedFullHashes/{encodedRequest}", + "id": "safebrowsing.encodedFullHashes.get", + "description": "", "httpMethod": "GET", "response": { "$ref": "FindFullHashesResponse" @@ -36,48 +46,44 @@ "type": "string" }, "clientVersion": { - "location": "query", "description": "The version of the client implementation.", - "type": "string" + "type": "string", + "location": "query" }, "encodedRequest": { - "format": "byte", - "description": "A serialized FindFullHashesRequest proto.", "type": "string", "required": true, - "location": "path" + "location": "path", + "format": "byte", + "description": "A serialized FindFullHashesRequest proto." } - }, - "flatPath": "v4/encodedFullHashes/{encodedRequest}", - "path": "v4/encodedFullHashes/{encodedRequest}", - "id": "safebrowsing.encodedFullHashes.get", - "description": "" + } } } }, "threatLists": { "methods": { "list": { - "description": "Lists the Safe Browsing threat lists available for download.", - "httpMethod": "GET", - "parameterOrder": [], "response": { "$ref": "ListThreatListsResponse" }, + "parameterOrder": [], + "httpMethod": "GET", "parameters": {}, "flatPath": "v4/threatLists", + "id": "safebrowsing.threatLists.list", "path": "v4/threatLists", - "id": "safebrowsing.threatLists.list" + "description": "Lists the Safe Browsing threat lists available for download." } } }, "threatMatches": { "methods": { "find": { - "description": "Finds the threat entries that match the Safe Browsing lists.", "request": { "$ref": "FindThreatMatchesRequest" }, + "description": "Finds the threat entries that match the Safe Browsing lists.", "response": { "$ref": "FindThreatMatchesResponse" }, @@ -94,17 +100,17 @@ "methods": { "find": { "flatPath": "v4/fullHashes:find", - "id": "safebrowsing.fullHashes.find", "path": "v4/fullHashes:find", - "description": "Finds the full hashes that match the requested hash prefixes.", + "id": "safebrowsing.fullHashes.find", "request": { "$ref": "FindFullHashesRequest" }, + "description": "Finds the full hashes that match the requested hash prefixes.", + "httpMethod": "POST", + "parameterOrder": [], "response": { "$ref": "FindFullHashesResponse" }, - "parameterOrder": [], - "httpMethod": "POST", "parameters": {} } } @@ -122,9 +128,9 @@ "httpMethod": "GET", "parameters": { "clientId": { + "location": "query", "description": "A client ID that uniquely identifies the client implementation of the Safe\nBrowsing API.", - "type": "string", - "location": "query" + "type": "string" }, "clientVersion": { "description": "The version of the client implementation.", @@ -132,11 +138,11 @@ "location": "query" }, "encodedRequest": { - "type": "string", - "required": true, "location": "path", "format": "byte", - "description": "A serialized FetchThreatListUpdatesRequest proto." + "description": "A serialized FetchThreatListUpdatesRequest proto.", + "type": "string", + "required": true } }, "flatPath": "v4/encodedUpdates/{encodedRequest}", @@ -147,16 +153,37 @@ } }, "parameters": { + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, "upload_protocol": { "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string" }, "prettyPrint": { - "location": "query", "description": "Returns response with indentations and line breaks.", "default": "true", - "type": "boolean" + "type": "boolean", + "location": "query" }, "uploadType": { "location": "query", @@ -164,30 +191,29 @@ "type": "string" }, "fields": { - "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string" + "type": "string", + "location": "query" }, "$.xgafv": { - "location": "query", - "enum": [ - "1", - "2" - ], "description": "V1 error format.", "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" ] }, "callback": { + "location": "query", "description": "JSONP", - "type": "string", - "location": "query" + "type": "string" }, "alt": { - "description": "Data format for response.", "default": "json", "enum": [ "json", @@ -200,116 +226,21 @@ "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], - "location": "query" + "location": "query", + "description": "Data format for response." }, "access_token": { - "location": "query", "description": "OAuth access token.", - "type": "string" + "type": "string", + "location": "query" }, "key": { + "location": "query", "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.", - "type": "string", - "location": "query" - }, - "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.", - "type": "string", - "location": "query" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", "type": "string" - }, - "oauth_token": { - "type": "string", - "location": "query", - "description": "OAuth 2.0 token for the current user." } }, "schemas": { - "ThreatListDescriptor": { - "properties": { - "threatType": { - "enumDescriptions": [ - "Unknown.", - "Malware threat type.", - "Social engineering threat type.", - "Unwanted software threat type.", - "Potentially harmful application threat type.", - "Malicious binary threat type." - ], - "enum": [ - "THREAT_TYPE_UNSPECIFIED", - "MALWARE", - "SOCIAL_ENGINEERING", - "UNWANTED_SOFTWARE", - "POTENTIALLY_HARMFUL_APPLICATION", - "MALICIOUS_BINARY" - ], - "description": "The threat type posed by the list's entries.", - "type": "string" - }, - "threatEntryType": { - "description": "The entry types contained in the list.", - "type": "string", - "enumDescriptions": [ - "Unspecified.", - "A URL.", - "An executable program.", - "An IP range.", - "Chrome extension.", - "Filename.", - "CERT" - ], - "enum": [ - "THREAT_ENTRY_TYPE_UNSPECIFIED", - "URL", - "EXECUTABLE", - "IP_RANGE", - "CHROME_EXTENSION", - "FILENAME", - "CERT" - ] - }, - "platformType": { - "enum": [ - "PLATFORM_TYPE_UNSPECIFIED", - "WINDOWS", - "LINUX", - "ANDROID", - "OSX", - "IOS", - "ANY_PLATFORM", - "ALL_PLATFORMS", - "CHROME" - ], - "description": "The platform type targeted by the list's entries.", - "type": "string", - "enumDescriptions": [ - "Unknown platform.", - "Threat posed to Windows.", - "Threat posed to Linux.", - "Threat posed to Android.", - "Threat posed to OS X.", - "Threat posed to iOS.", - "Threat posed to at least one of the defined platforms.", - "Threat posed to all defined platforms.", - "Threat posed to Chrome." - ] - } - }, - "id": "ThreatListDescriptor", - "description": "Describes an individual threat list. A list is defined by three parameters:\nthe type of threat posed, the type of platform targeted by the threat, and\nthe type of entries in the list.", - "type": "object" - }, "MetadataEntry": { "description": "A single metadata entry.", "type": "object", @@ -343,13 +274,10 @@ "id": "ClientInfo" }, "ThreatInfo": { - "description": "The information regarding one or more threats that a client submits when\nchecking for matches in threat lists.", "type": "object", "properties": { "threatEntryTypes": { - "description": "The entry types to be checked.", "items": { - "type": "string", "enum": [ "THREAT_ENTRY_TYPE_UNSPECIFIED", "URL", @@ -358,7 +286,8 @@ "CHROME_EXTENSION", "FILENAME", "CERT" - ] + ], + "type": "string" }, "type": "array", "enumDescriptions": [ @@ -369,17 +298,10 @@ "Chrome extension.", "Filename.", "CERT" - ] + ], + "description": "The entry types to be checked." }, "threatTypes": { - "enumDescriptions": [ - "Unknown.", - "Malware threat type.", - "Social engineering threat type.", - "Unwanted software threat type.", - "Potentially harmful application threat type.", - "Malicious binary threat type." - ], "description": "The threat types to be checked.", "items": { "enum": [ @@ -388,13 +310,38 @@ "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE", "POTENTIALLY_HARMFUL_APPLICATION", - "MALICIOUS_BINARY" + "SOCIAL_ENGINEERING_INTERNAL", + "API_ABUSE", + "MALICIOUS_BINARY", + "CSD_WHITELIST", + "CSD_DOWNLOAD_WHITELIST", + "CLIENT_INCIDENT", + "CLIENT_INCIDENT_WHITELIST", + "APK_MALWARE_OFFLINE", + "SUBRESOURCE_FILTER" ], "type": "string" }, - "type": "array" + "type": "array", + "enumDescriptions": [ + "Unknown.", + "Malware threat type.", + "Social engineering threat type.", + "Unwanted software threat type.", + "Potentially harmful application threat type.", + "Social engineering threat type for internal use.", + "API abuse threat type.", + "Malicious binary threat type.", + "Client side detection whitelist threat type.", + "Client side download detection whitelist threat type.", + "Client incident threat type.", + "Whitelist used when detecting client incident threats.\nThis enum was never launched and should be re-used for the next list.", + "List used for offline APK checks in PAM.", + "Patterns to be used for activating the subresource filter. Interstitial\nwill not be shown for patterns from this list." + ] }, "platformTypes": { + "description": "The platform types to be checked.", "items": { "type": "string", "enum": [ @@ -420,8 +367,7 @@ "Threat posed to at least one of the defined platforms.", "Threat posed to all defined platforms.", "Threat posed to Chrome." - ], - "description": "The platform types to be checked." + ] }, "threatEntries": { "description": "The threat entries to be checked.", @@ -431,9 +377,12 @@ "type": "array" } }, - "id": "ThreatInfo" + "id": "ThreatInfo", + "description": "The information regarding one or more threats that a client submits when\nchecking for matches in threat lists." }, "FindThreatMatchesRequest": { + "description": "Request to check entries against lists.", + "type": "object", "properties": { "client": { "description": "The client metadata.", @@ -444,11 +393,10 @@ "description": "The lists and entries to be checked for matches." } }, - "id": "FindThreatMatchesRequest", - "description": "Request to check entries against lists.", - "type": "object" + "id": "FindThreatMatchesRequest" }, "ThreatEntryMetadata": { + "description": "The metadata associated with a specific threat entry. The client is expected\nto know the metadata key/value pairs associated with each threat type.", "type": "object", "properties": { "entries": { @@ -459,25 +407,25 @@ "type": "array" } }, - "id": "ThreatEntryMetadata", - "description": "The metadata associated with a specific threat entry. The client is expected\nto know the metadata key/value pairs associated with each threat type." + "id": "ThreatEntryMetadata" }, "RawIndices": { - "id": "RawIndices", "description": "A set of raw indices to remove from a local list.", "type": "object", "properties": { "indices": { - "description": "The indices to remove from a lexicographically-sorted local list.", "items": { "format": "int32", "type": "integer" }, - "type": "array" + "type": "array", + "description": "The indices to remove from a lexicographically-sorted local list." } - } + }, + "id": "RawIndices" }, "RawHashes": { + "description": "The uncompressed threat entries in hash format of a particular prefix length.\nHashes can be anywhere from 4 to 32 bytes in size. A large majority are 4\nbytes, but some hashes are lengthened if they collide with the hash of a\npopular URL.\n\nUsed for sending ThreatEntrySet to clients that do not support compression,\nor when sending non-4-byte hashes to clients that do support compression.", "type": "object", "properties": { "prefixSize": { @@ -491,46 +439,45 @@ "type": "string" } }, - "id": "RawHashes", - "description": "The uncompressed threat entries in hash format of a particular prefix length.\nHashes can be anywhere from 4 to 32 bytes in size. A large majority are 4\nbytes, but some hashes are lengthened if they collide with the hash of a\npopular URL.\n\nUsed for sending ThreatEntrySet to clients that do not support compression,\nor when sending non-4-byte hashes to clients that do support compression." + "id": "RawHashes" }, "FetchThreatListUpdatesResponse": { "type": "object", "properties": { "minimumWaitDuration": { + "type": "string", "format": "google-duration", - "description": "The minimum duration the client must wait before issuing any update\nrequest. If this field is not set clients may update as soon as they want.", - "type": "string" + "description": "The minimum duration the client must wait before issuing any update\nrequest. If this field is not set clients may update as soon as they want." }, "listUpdateResponses": { + "description": "The list updates requested by the clients.", "items": { "$ref": "ListUpdateResponse" }, - "type": "array", - "description": "The list updates requested by the clients." + "type": "array" } }, "id": "FetchThreatListUpdatesResponse" }, "Checksum": { - "id": "Checksum", "description": "The expected state of a client's local database.", "type": "object", "properties": { "sha256": { + "type": "string", "format": "byte", - "description": "The SHA256 hash of the client state; that is, of the sorted list of all\nhashes present in the database.", - "type": "string" + "description": "The SHA256 hash of the client state; that is, of the sorted list of all\nhashes present in the database." } - } + }, + "id": "Checksum" }, "FindFullHashesResponse": { "type": "object", "properties": { "minimumWaitDuration": { - "type": "string", "format": "google-duration", - "description": "The minimum duration the client must wait before issuing any find hashes\nrequest. If this field is not set, clients can issue a request as soon as\nthey want." + "description": "The minimum duration the client must wait before issuing any find hashes\nrequest. If this field is not set, clients can issue a request as soon as\nthey want.", + "type": "string" }, "matches": { "description": "The full hashes that matched the requested prefixes.", @@ -540,9 +487,9 @@ "type": "array" }, "negativeCacheDuration": { - "type": "string", "format": "google-duration", - "description": "For requested entities that did not match the threat list, how long to\ncache the response." + "description": "For requested entities that did not match the threat list, how long to\ncache the response.", + "type": "string" } }, "id": "FindFullHashesResponse" @@ -551,10 +498,6 @@ "description": "A set of threats that should be added or removed from a client's local\ndatabase.", "type": "object", "properties": { - "rawHashes": { - "description": "The raw SHA256-formatted entries.", - "$ref": "RawHashes" - }, "riceHashes": { "$ref": "RiceDeltaEncoding", "description": "The encoded 4-byte prefixes of SHA256-formatted entries, using a\nGolomb-Rice encoding. The hashes are converted to uint32, sorted in\nascending order, then delta encoded and stored as encoded_data." @@ -564,8 +507,6 @@ "description": "The encoded local, lexicographically-sorted list indices, using a\nGolomb-Rice encoding. Used for sending compressed removal indices. The\nremoval indices (uint32) are sorted in ascending order, then delta encoded\nand stored as encoded_data." }, "compressionType": { - "description": "The compression type for the entries in this set.", - "type": "string", "enumDescriptions": [ "Unknown.", "Raw, uncompressed data.", @@ -575,11 +516,17 @@ "COMPRESSION_TYPE_UNSPECIFIED", "RAW", "RICE" - ] + ], + "description": "The compression type for the entries in this set.", + "type": "string" }, "rawIndices": { "description": "The raw removal indices for a local list.", "$ref": "RawIndices" + }, + "rawHashes": { + "$ref": "RawHashes", + "description": "The raw SHA256-formatted entries." } }, "id": "ThreatEntrySet" @@ -588,32 +535,30 @@ "description": "Request to return full hashes matched by the provided hash prefixes.", "type": "object", "properties": { - "apiClient": { - "$ref": "ClientInfo", - "description": "Client metadata associated with callers of higher-level APIs built on top\nof the client's implementation." - }, "clientStates": { + "description": "The current client states for each of the client's local threat lists.", "items": { "format": "byte", "type": "string" }, - "type": "array", - "description": "The current client states for each of the client's local threat lists." + "type": "array" }, "client": { - "description": "The client metadata.", - "$ref": "ClientInfo" + "$ref": "ClientInfo", + "description": "The client metadata." }, "threatInfo": { "$ref": "ThreatInfo", "description": "The lists and hashes to be checked." + }, + "apiClient": { + "description": "Client metadata associated with callers of higher-level APIs built on top\nof the client's implementation.", + "$ref": "ClientInfo" } }, "id": "FindFullHashesRequest" }, "ListUpdateRequest": { - "description": "A single list update request.", - "type": "object", "properties": { "state": { "format": "byte", @@ -647,17 +592,27 @@ ] }, "constraints": { - "description": "The constraints associated with this request.", - "$ref": "Constraints" + "$ref": "Constraints", + "description": "The constraints associated with this request." }, "threatType": { + "description": "The type of threat posed by entries present in the list.", + "type": "string", "enumDescriptions": [ "Unknown.", "Malware threat type.", "Social engineering threat type.", "Unwanted software threat type.", "Potentially harmful application threat type.", - "Malicious binary threat type." + "Social engineering threat type for internal use.", + "API abuse threat type.", + "Malicious binary threat type.", + "Client side detection whitelist threat type.", + "Client side download detection whitelist threat type.", + "Client incident threat type.", + "Whitelist used when detecting client incident threats.\nThis enum was never launched and should be re-used for the next list.", + "List used for offline APK checks in PAM.", + "Patterns to be used for activating the subresource filter. Interstitial\nwill not be shown for patterns from this list." ], "enum": [ "THREAT_TYPE_UNSPECIFIED", @@ -665,21 +620,18 @@ "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE", "POTENTIALLY_HARMFUL_APPLICATION", - "MALICIOUS_BINARY" - ], - "description": "The type of threat posed by entries present in the list.", - "type": "string" + "SOCIAL_ENGINEERING_INTERNAL", + "API_ABUSE", + "MALICIOUS_BINARY", + "CSD_WHITELIST", + "CSD_DOWNLOAD_WHITELIST", + "CLIENT_INCIDENT", + "CLIENT_INCIDENT_WHITELIST", + "APK_MALWARE_OFFLINE", + "SUBRESOURCE_FILTER" + ] }, "threatEntryType": { - "enumDescriptions": [ - "Unspecified.", - "A URL.", - "An executable program.", - "An IP range.", - "Chrome extension.", - "Filename.", - "CERT" - ], "enum": [ "THREAT_ENTRY_TYPE_UNSPECIFIED", "URL", @@ -690,13 +642,23 @@ "CERT" ], "description": "The types of entries present in the list.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Unspecified.", + "A URL.", + "An executable program.", + "An IP range.", + "Chrome extension.", + "Filename.", + "CERT" + ] } }, - "id": "ListUpdateRequest" + "id": "ListUpdateRequest", + "description": "A single list update request.", + "type": "object" }, "FetchThreatListUpdatesRequest": { - "description": "Describes a Safe Browsing API update request. Clients can request updates for\nmultiple lists in a single request.\nNOTE: Field index 2 is unused.\nNEXT: 5", "type": "object", "properties": { "listUpdateRequests": { @@ -711,13 +673,25 @@ "description": "The client metadata." } }, - "id": "FetchThreatListUpdatesRequest" + "id": "FetchThreatListUpdatesRequest", + "description": "Describes a Safe Browsing API update request. Clients can request updates for\nmultiple lists in a single request.\nNOTE: Field index 2 is unused.\nNEXT: 5" }, "ListUpdateResponse": { "description": "An update to an individual list.", "type": "object", "properties": { "platformType": { + "enum": [ + "PLATFORM_TYPE_UNSPECIFIED", + "WINDOWS", + "LINUX", + "ANDROID", + "OSX", + "IOS", + "ANY_PLATFORM", + "ALL_PLATFORMS", + "CHROME" + ], "description": "The platform type for which data is returned.", "type": "string", "enumDescriptions": [ @@ -730,22 +704,9 @@ "Threat posed to at least one of the defined platforms.", "Threat posed to all defined platforms.", "Threat posed to Chrome." - ], - "enum": [ - "PLATFORM_TYPE_UNSPECIFIED", - "WINDOWS", - "LINUX", - "ANDROID", - "OSX", - "IOS", - "ANY_PLATFORM", - "ALL_PLATFORMS", - "CHROME" ] }, "threatEntryType": { - "description": "The format of the threats.", - "type": "string", "enumDescriptions": [ "Unspecified.", "A URL.", @@ -763,7 +724,9 @@ "CHROME_EXTENSION", "FILENAME", "CERT" - ] + ], + "description": "The format of the threats.", + "type": "string" }, "additions": { "description": "A set of entries to add to a local threat type's list. Repeated to allow\nfor a combination of compressed and raw data to be sent in a single\nresponse.", @@ -772,13 +735,7 @@ }, "type": "array" }, - "checksum": { - "$ref": "Checksum", - "description": "The expected SHA256 hash of the client state; that is, of the sorted list\nof all hashes present in the database after applying the provided update.\nIf the client state doesn't match the expected state, the client must\ndisregard this update and retry later." - }, "responseType": { - "description": "The type of response. This may indicate that an action is required by the\nclient when the response is received.", - "type": "string", "enumDescriptions": [ "Unknown.", "Partial updates are applied to the client's existing local database.", @@ -788,9 +745,31 @@ "RESPONSE_TYPE_UNSPECIFIED", "PARTIAL_UPDATE", "FULL_UPDATE" - ] + ], + "description": "The type of response. This may indicate that an action is required by the\nclient when the response is received.", + "type": "string" + }, + "checksum": { + "description": "The expected SHA256 hash of the client state; that is, of the sorted list\nof all hashes present in the database after applying the provided update.\nIf the client state doesn't match the expected state, the client must\ndisregard this update and retry later.", + "$ref": "Checksum" }, "threatType": { + "enum": [ + "THREAT_TYPE_UNSPECIFIED", + "MALWARE", + "SOCIAL_ENGINEERING", + "UNWANTED_SOFTWARE", + "POTENTIALLY_HARMFUL_APPLICATION", + "SOCIAL_ENGINEERING_INTERNAL", + "API_ABUSE", + "MALICIOUS_BINARY", + "CSD_WHITELIST", + "CSD_DOWNLOAD_WHITELIST", + "CLIENT_INCIDENT", + "CLIENT_INCIDENT_WHITELIST", + "APK_MALWARE_OFFLINE", + "SUBRESOURCE_FILTER" + ], "description": "The threat type for which data is returned.", "type": "string", "enumDescriptions": [ @@ -799,28 +778,28 @@ "Social engineering threat type.", "Unwanted software threat type.", "Potentially harmful application threat type.", - "Malicious binary threat type." - ], - "enum": [ - "THREAT_TYPE_UNSPECIFIED", - "MALWARE", - "SOCIAL_ENGINEERING", - "UNWANTED_SOFTWARE", - "POTENTIALLY_HARMFUL_APPLICATION", - "MALICIOUS_BINARY" + "Social engineering threat type for internal use.", + "API abuse threat type.", + "Malicious binary threat type.", + "Client side detection whitelist threat type.", + "Client side download detection whitelist threat type.", + "Client incident threat type.", + "Whitelist used when detecting client incident threats.\nThis enum was never launched and should be re-used for the next list.", + "List used for offline APK checks in PAM.", + "Patterns to be used for activating the subresource filter. Interstitial\nwill not be shown for patterns from this list." ] }, - "newClientState": { - "format": "byte", - "description": "The new client state, in encrypted format. Opaque to clients.", - "type": "string" - }, "removals": { "description": "A set of entries to remove from a local threat type's list. In practice,\nthis field is empty or contains exactly one ThreatEntrySet.", "items": { "$ref": "ThreatEntrySet" }, "type": "array" + }, + "newClientState": { + "format": "byte", + "description": "The new client state, in encrypted format. Opaque to clients.", + "type": "string" } }, "id": "ListUpdateResponse" @@ -829,16 +808,12 @@ "description": "The constraints for this update.", "type": "object", "properties": { - "region": { - "description": "Requests the list for a specific geographic location. If not set the\nserver may pick that value based on the user's IP address. Expects ISO\n3166-1 alpha-2 format.", - "type": "string" - }, - "maxDatabaseEntries": { - "format": "int32", - "description": "Sets the maximum number of entries that the client is willing to have\nin the local database. This should be a power of 2 between 2**10 and\n2**20. If zero, no database size limit is set.", - "type": "integer" - }, "supportedCompressions": { + "enumDescriptions": [ + "Unknown.", + "Raw, uncompressed data.", + "Rice-Golomb encoded data." + ], "description": "The compression types supported by the client.", "items": { "type": "string", @@ -848,28 +823,33 @@ "RICE" ] }, - "type": "array", - "enumDescriptions": [ - "Unknown.", - "Raw, uncompressed data.", - "Rice-Golomb encoded data." - ] + "type": "array" }, "maxUpdateEntries": { "format": "int32", "description": "The maximum size in number of entries. The update will not contain more\nentries than this value. This should be a power of 2 between 2**10 and\n2**20. If zero, no update size limit is set.", "type": "integer" + }, + "region": { + "description": "Requests the list for a specific geographic location. If not set the\nserver may pick that value based on the user's IP address. Expects ISO\n3166-1 alpha-2 format.", + "type": "string" + }, + "maxDatabaseEntries": { + "format": "int32", + "description": "Sets the maximum number of entries that the client is willing to have\nin the local database. This should be a power of 2 between 2**10 and\n2**20. If zero, no database size limit is set.", + "type": "integer" } }, "id": "Constraints" }, "ThreatMatch": { - "id": "ThreatMatch", - "description": "A match when checking a threat entry in the Safe Browsing threat lists.", "type": "object", "properties": { + "threat": { + "$ref": "ThreatEntry", + "description": "The threat matching this threat." + }, "platformType": { - "type": "string", "enumDescriptions": [ "Unknown platform.", "Threat posed to Windows.", @@ -892,7 +872,8 @@ "ALL_PLATFORMS", "CHROME" ], - "description": "The platform type matching this threat." + "description": "The platform type matching this threat.", + "type": "string" }, "threatEntryType": { "enumDescriptions": [ @@ -930,7 +911,15 @@ "Social engineering threat type.", "Unwanted software threat type.", "Potentially harmful application threat type.", - "Malicious binary threat type." + "Social engineering threat type for internal use.", + "API abuse threat type.", + "Malicious binary threat type.", + "Client side detection whitelist threat type.", + "Client side download detection whitelist threat type.", + "Client incident threat type.", + "Whitelist used when detecting client incident threats.\nThis enum was never launched and should be re-used for the next list.", + "List used for offline APK checks in PAM.", + "Patterns to be used for activating the subresource filter. Interstitial\nwill not be shown for patterns from this list." ], "enum": [ "THREAT_TYPE_UNSPECIFIED", @@ -938,38 +927,33 @@ "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE", "POTENTIALLY_HARMFUL_APPLICATION", - "MALICIOUS_BINARY" + "SOCIAL_ENGINEERING_INTERNAL", + "API_ABUSE", + "MALICIOUS_BINARY", + "CSD_WHITELIST", + "CSD_DOWNLOAD_WHITELIST", + "CLIENT_INCIDENT", + "CLIENT_INCIDENT_WHITELIST", + "APK_MALWARE_OFFLINE", + "SUBRESOURCE_FILTER" ] }, "threatEntryMetadata": { - "description": "Optional metadata associated with this threat.", - "$ref": "ThreatEntryMetadata" - }, - "threat": { - "$ref": "ThreatEntry", - "description": "The threat matching this threat." - } - } - }, - "ListThreatListsResponse": { - "type": "object", - "properties": { - "threatLists": { - "description": "The lists available for download by the client.", - "items": { - "$ref": "ThreatListDescriptor" - }, - "type": "array" + "$ref": "ThreatEntryMetadata", + "description": "Optional metadata associated with this threat." } }, - "id": "ListThreatListsResponse" + "id": "ThreatMatch", + "description": "A match when checking a threat entry in the Safe Browsing threat lists." }, "RiceDeltaEncoding": { + "description": "The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or\ncompressed removal indices.", + "type": "object", "properties": { "encodedData": { + "type": "string", "format": "byte", - "description": "The encoded deltas that are encoded using the Golomb-Rice coder.", - "type": "string" + "description": "The encoded deltas that are encoded using the Golomb-Rice coder." }, "firstValue": { "format": "int64", @@ -987,30 +971,41 @@ "type": "integer" } }, - "id": "RiceDeltaEncoding", - "description": "The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or\ncompressed removal indices.", - "type": "object" + "id": "RiceDeltaEncoding" }, - "ThreatEntry": { + "ListThreatListsResponse": { "type": "object", "properties": { - "url": { - "description": "A URL.", - "type": "string" - }, - "digest": { - "format": "byte", - "description": "The digest of an executable in SHA256 format. The API supports both\nbinary and hex digests. For JSON requests, digests are base64-encoded.", - "type": "string" - }, - "hash": { - "type": "string", - "format": "byte", - "description": "A hash prefix, consisting of the most significant 4-32 bytes of a SHA256\nhash. This field is in binary format. For JSON requests, hashes are\nbase64-encoded." + "threatLists": { + "description": "The lists available for download by the client.", + "items": { + "$ref": "ThreatListDescriptor" + }, + "type": "array" } }, + "id": "ListThreatListsResponse" + }, + "ThreatEntry": { "id": "ThreatEntry", - "description": "An individual threat; for example, a malicious URL or its hash\nrepresentation. Only one of these fields should be set." + "description": "An individual threat; for example, a malicious URL or its hash\nrepresentation. Only one of these fields should be set.", + "type": "object", + "properties": { + "digest": { + "type": "string", + "format": "byte", + "description": "The digest of an executable in SHA256 format. The API supports both\nbinary and hex digests. For JSON requests, digests are base64-encoded." + }, + "hash": { + "format": "byte", + "description": "A hash prefix, consisting of the most significant 4-32 bytes of a SHA256\nhash. This field is in binary format. For JSON requests, hashes are\nbase64-encoded.", + "type": "string" + }, + "url": { + "type": "string", + "description": "A URL." + } + } }, "FindThreatMatchesResponse": { "type": "object", @@ -1024,27 +1019,112 @@ } }, "id": "FindThreatMatchesResponse" + }, + "ThreatListDescriptor": { + "type": "object", + "properties": { + "threatType": { + "enum": [ + "THREAT_TYPE_UNSPECIFIED", + "MALWARE", + "SOCIAL_ENGINEERING", + "UNWANTED_SOFTWARE", + "POTENTIALLY_HARMFUL_APPLICATION", + "SOCIAL_ENGINEERING_INTERNAL", + "API_ABUSE", + "MALICIOUS_BINARY", + "CSD_WHITELIST", + "CSD_DOWNLOAD_WHITELIST", + "CLIENT_INCIDENT", + "CLIENT_INCIDENT_WHITELIST", + "APK_MALWARE_OFFLINE", + "SUBRESOURCE_FILTER" + ], + "description": "The threat type posed by the list's entries.", + "type": "string", + "enumDescriptions": [ + "Unknown.", + "Malware threat type.", + "Social engineering threat type.", + "Unwanted software threat type.", + "Potentially harmful application threat type.", + "Social engineering threat type for internal use.", + "API abuse threat type.", + "Malicious binary threat type.", + "Client side detection whitelist threat type.", + "Client side download detection whitelist threat type.", + "Client incident threat type.", + "Whitelist used when detecting client incident threats.\nThis enum was never launched and should be re-used for the next list.", + "List used for offline APK checks in PAM.", + "Patterns to be used for activating the subresource filter. Interstitial\nwill not be shown for patterns from this list." + ] + }, + "threatEntryType": { + "enumDescriptions": [ + "Unspecified.", + "A URL.", + "An executable program.", + "An IP range.", + "Chrome extension.", + "Filename.", + "CERT" + ], + "enum": [ + "THREAT_ENTRY_TYPE_UNSPECIFIED", + "URL", + "EXECUTABLE", + "IP_RANGE", + "CHROME_EXTENSION", + "FILENAME", + "CERT" + ], + "description": "The entry types contained in the list.", + "type": "string" + }, + "platformType": { + "enumDescriptions": [ + "Unknown platform.", + "Threat posed to Windows.", + "Threat posed to Linux.", + "Threat posed to Android.", + "Threat posed to OS X.", + "Threat posed to iOS.", + "Threat posed to at least one of the defined platforms.", + "Threat posed to all defined platforms.", + "Threat posed to Chrome." + ], + "enum": [ + "PLATFORM_TYPE_UNSPECIFIED", + "WINDOWS", + "LINUX", + "ANDROID", + "OSX", + "IOS", + "ANY_PLATFORM", + "ALL_PLATFORMS", + "CHROME" + ], + "description": "The platform type targeted by the list's entries.", + "type": "string" + } + }, + "id": "ThreatListDescriptor", + "description": "Describes an individual threat list. A list is defined by three parameters:\nthe type of threat posed, the type of platform targeted by the threat, and\nthe type of entries in the list." } }, "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, "protocol": "rest", "version": "v4", "baseUrl": "https://safebrowsing.googleapis.com/", - "servicePath": "", - "description": "The Safe Browsing API is an experimental API that allows client applications to check URLs against Google's constantly-updated blacklists of suspected phishing and malware pages. Your client application can use the API to download an encrypted table for local, client-side lookups of URLs.", "kind": "discovery#restDescription", + "description": "Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources.", + "servicePath": "", "rootUrl": "https://safebrowsing.googleapis.com/", "basePath": "", "ownerDomain": "google.com", "name": "safebrowsing", - "batchPath": "batch", - "revision": "20170801", - "documentationLink": "https://developers.google.com/safe-browsing/", - "id": "safebrowsing:v4", - "title": "Google Safe Browsing API", - "ownerName": "Google", - "discoveryVersion": "v1" + "batchPath": "batch" } diff --git a/vendor/google.golang.org/api/safebrowsing/v4/safebrowsing-gen.go b/vendor/google.golang.org/api/safebrowsing/v4/safebrowsing-gen.go index a34a69bcd..51c6c502a 100644 --- a/vendor/google.golang.org/api/safebrowsing/v4/safebrowsing-gen.go +++ b/vendor/google.golang.org/api/safebrowsing/v4/safebrowsing-gen.go @@ -554,7 +554,21 @@ type ListUpdateRequest struct { // "UNWANTED_SOFTWARE" - Unwanted software threat type. // "POTENTIALLY_HARMFUL_APPLICATION" - Potentially harmful application // threat type. + // "SOCIAL_ENGINEERING_INTERNAL" - Social engineering threat type for + // internal use. + // "API_ABUSE" - API abuse threat type. // "MALICIOUS_BINARY" - Malicious binary threat type. + // "CSD_WHITELIST" - Client side detection whitelist threat type. + // "CSD_DOWNLOAD_WHITELIST" - Client side download detection whitelist + // threat type. + // "CLIENT_INCIDENT" - Client incident threat type. + // "CLIENT_INCIDENT_WHITELIST" - Whitelist used when detecting client + // incident threats. + // This enum was never launched and should be re-used for the next list. + // "APK_MALWARE_OFFLINE" - List used for offline APK checks in PAM. + // "SUBRESOURCE_FILTER" - Patterns to be used for activating the + // subresource filter. Interstitial + // will not be shown for patterns from this list. ThreatType string `json:"threatType,omitempty"` // ForceSendFields is a list of field names (e.g. "Constraints") to @@ -658,7 +672,21 @@ type ListUpdateResponse struct { // "UNWANTED_SOFTWARE" - Unwanted software threat type. // "POTENTIALLY_HARMFUL_APPLICATION" - Potentially harmful application // threat type. + // "SOCIAL_ENGINEERING_INTERNAL" - Social engineering threat type for + // internal use. + // "API_ABUSE" - API abuse threat type. // "MALICIOUS_BINARY" - Malicious binary threat type. + // "CSD_WHITELIST" - Client side detection whitelist threat type. + // "CSD_DOWNLOAD_WHITELIST" - Client side download detection whitelist + // threat type. + // "CLIENT_INCIDENT" - Client incident threat type. + // "CLIENT_INCIDENT_WHITELIST" - Whitelist used when detecting client + // incident threats. + // This enum was never launched and should be re-used for the next list. + // "APK_MALWARE_OFFLINE" - List used for offline APK checks in PAM. + // "SUBRESOURCE_FILTER" - Patterns to be used for activating the + // subresource filter. Interstitial + // will not be shown for patterns from this list. ThreatType string `json:"threatType,omitempty"` // ForceSendFields is a list of field names (e.g. "Additions") to @@ -1017,7 +1045,21 @@ type ThreatInfo struct { // "UNWANTED_SOFTWARE" - Unwanted software threat type. // "POTENTIALLY_HARMFUL_APPLICATION" - Potentially harmful application // threat type. + // "SOCIAL_ENGINEERING_INTERNAL" - Social engineering threat type for + // internal use. + // "API_ABUSE" - API abuse threat type. // "MALICIOUS_BINARY" - Malicious binary threat type. + // "CSD_WHITELIST" - Client side detection whitelist threat type. + // "CSD_DOWNLOAD_WHITELIST" - Client side download detection whitelist + // threat type. + // "CLIENT_INCIDENT" - Client incident threat type. + // "CLIENT_INCIDENT_WHITELIST" - Whitelist used when detecting client + // incident threats. + // This enum was never launched and should be re-used for the next list. + // "APK_MALWARE_OFFLINE" - List used for offline APK checks in PAM. + // "SUBRESOURCE_FILTER" - Patterns to be used for activating the + // subresource filter. Interstitial + // will not be shown for patterns from this list. ThreatTypes []string `json:"threatTypes,omitempty"` // ForceSendFields is a list of field names (e.g. "PlatformTypes") to @@ -1085,7 +1127,21 @@ type ThreatListDescriptor struct { // "UNWANTED_SOFTWARE" - Unwanted software threat type. // "POTENTIALLY_HARMFUL_APPLICATION" - Potentially harmful application // threat type. + // "SOCIAL_ENGINEERING_INTERNAL" - Social engineering threat type for + // internal use. + // "API_ABUSE" - API abuse threat type. // "MALICIOUS_BINARY" - Malicious binary threat type. + // "CSD_WHITELIST" - Client side detection whitelist threat type. + // "CSD_DOWNLOAD_WHITELIST" - Client side download detection whitelist + // threat type. + // "CLIENT_INCIDENT" - Client incident threat type. + // "CLIENT_INCIDENT_WHITELIST" - Whitelist used when detecting client + // incident threats. + // This enum was never launched and should be re-used for the next list. + // "APK_MALWARE_OFFLINE" - List used for offline APK checks in PAM. + // "SUBRESOURCE_FILTER" - Patterns to be used for activating the + // subresource filter. Interstitial + // will not be shown for patterns from this list. ThreatType string `json:"threatType,omitempty"` // ForceSendFields is a list of field names (e.g. "PlatformType") to @@ -1161,7 +1217,21 @@ type ThreatMatch struct { // "UNWANTED_SOFTWARE" - Unwanted software threat type. // "POTENTIALLY_HARMFUL_APPLICATION" - Potentially harmful application // threat type. + // "SOCIAL_ENGINEERING_INTERNAL" - Social engineering threat type for + // internal use. + // "API_ABUSE" - API abuse threat type. // "MALICIOUS_BINARY" - Malicious binary threat type. + // "CSD_WHITELIST" - Client side detection whitelist threat type. + // "CSD_DOWNLOAD_WHITELIST" - Client side download detection whitelist + // threat type. + // "CLIENT_INCIDENT" - Client incident threat type. + // "CLIENT_INCIDENT_WHITELIST" - Whitelist used when detecting client + // incident threats. + // This enum was never launched and should be re-used for the next list. + // "APK_MALWARE_OFFLINE" - List used for offline APK checks in PAM. + // "SUBRESOURCE_FILTER" - Patterns to be used for activating the + // subresource filter. Interstitial + // will not be shown for patterns from this list. ThreatType string `json:"threatType,omitempty"` // ForceSendFields is a list of field names (e.g. "CacheDuration") to diff --git a/vendor/google.golang.org/api/script/v1/script-api.json b/vendor/google.golang.org/api/script/v1/script-api.json index 942dd1e3c..23bf974a9 100644 --- a/vendor/google.golang.org/api/script/v1/script-api.json +++ b/vendor/google.golang.org/api/script/v1/script-api.json @@ -1,326 +1,4 @@ { - "name": "script", - "batchPath": "batch", - "revision": "20170726", - "documentationLink": "https://developers.google.com/apps-script/execution/rest/v1/scripts/run", - "id": "script:v1", - "title": "Google Apps Script Execution API", - "discoveryVersion": "v1", - "ownerName": "Google", - "resources": { - "scripts": { - "methods": { - "run": { - "httpMethod": "POST", - "parameterOrder": [ - "scriptId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "scriptId": { - "description": "The project key of the script to be executed. To find the project key, open\nthe project in the script editor and select **File \u003e Project properties**.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://mail.google.com/", - "https://www.google.com/calendar/feeds", - "https://www.google.com/m8/feeds", - "https://www.googleapis.com/auth/admin.directory.group", - "https://www.googleapis.com/auth/admin.directory.user", - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/forms", - "https://www.googleapis.com/auth/forms.currentonly", - "https://www.googleapis.com/auth/groups", - "https://www.googleapis.com/auth/spreadsheets", - "https://www.googleapis.com/auth/userinfo.email" - ], - "flatPath": "v1/scripts/{scriptId}:run", - "path": "v1/scripts/{scriptId}:run", - "id": "script.scripts.run", - "description": "Runs a function in an Apps Script project. The project must be deployed\nfor use with the Apps Script Execution API.\n\nThis method requires authorization with an OAuth 2.0 token that includes at\nleast one of the scopes listed in the [Authorization](#authorization)\nsection; script projects that do not require authorization cannot be\nexecuted through this API. To find the correct scopes to include in the\nauthentication token, open the project in the script editor, then select\n**File \u003e Project properties** and click the **Scopes** tab.", - "request": { - "$ref": "ExecutionRequest" - } - } - } - } - }, - "parameters": { - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "$.xgafv": { - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - }, - "alt": { - "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", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "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.", - "type": "string", - "location": "query" - }, - "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.", - "type": "string", - "location": "query" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - } - }, - "schemas": { - "ExecutionResponse": { - "description": "An object that provides the return value of a function executed through the\nApps Script Execution API. If a\n`run` call succeeds and the\nscript function returns successfully, the response body's\n`response` field contains this\n`ExecutionResponse` object.", - "type": "object", - "properties": { - "result": { - "type": "any", - "description": "The return value of the script function. The type matches the object type\nreturned in Apps Script. Functions called through the Execution API cannot\nreturn Apps Script-specific objects (such as a `Document` or a `Calendar`);\nthey can only return primitive types such as a `string`, `number`, `array`,\n`object`, or `boolean`." - } - }, - "id": "ExecutionResponse" - }, - "JoinAsyncResponse": { - "description": "An object that provides the return value for the JoinAsync method.", - "type": "object", - "properties": { - "results": { - "additionalProperties": { - "$ref": "Operation" - }, - "description": "The return values for each script function, in a map of operation resource\nnames to the Operation containing the result of the process. The response\nwill contain either an error or the result of the script function.", - "type": "object" - } - }, - "id": "JoinAsyncResponse" - }, - "Operation": { - "id": "Operation", - "description": "The response will not arrive until the function finishes executing. The maximum runtime is listed in the guide to [limitations in Apps Script](https://developers.google.com/apps-script/guides/services/quotas#current_limitations).\n\u003cp\u003eIf the script function returns successfully, the `response` field will contain an `ExecutionResponse` object with the function's return value in the object's `result` field.\u003c/p\u003e\n\u003cp\u003eIf the script function (or Apps Script itself) throws an exception, the `error` field will contain a `Status` object. The `Status` object's `details` field will contain an array with a single `ExecutionError` object that provides information about the nature of the error.\u003c/p\u003e\n\u003cp\u003eIf the `run` call itself fails (for example, because of a malformed request or an authorization error), the method will return an HTTP response code in the 4XX range with a different format for the response body. Client libraries will automatically convert a 4XX response into an exception class.\u003c/p\u003e", - "type": "object", - "properties": { - "response": { - "description": "If the script function returns successfully, this field will contain an `ExecutionResponse` object with the function's return value as the object's `result` field.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "name": { - "description": "This field is not used.", - "type": "string" - }, - "error": { - "$ref": "Status", - "description": "If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, this field will contain a `Status` object. The `Status` object's `details` field will contain an array with a single `ExecutionError` object that provides information about the nature of the error." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "This field is not used.", - "type": "object" - }, - "done": { - "description": "This field is not used.", - "type": "boolean" - } - } - }, - "ScriptStackTraceElement": { - "properties": { - "function": { - "description": "The name of the function that failed.", - "type": "string" - }, - "lineNumber": { - "format": "int32", - "description": "The line number where the script failed.", - "type": "integer" - } - }, - "id": "ScriptStackTraceElement", - "description": "A stack trace through the script that shows where the execution failed.", - "type": "object" - }, - "ExecutionError": { - "type": "object", - "properties": { - "errorType": { - "description": "The error type, for example `TypeError` or `ReferenceError`. If the error\ntype is unavailable, this field is not included.", - "type": "string" - }, - "errorMessage": { - "description": "The error message thrown by Apps Script, usually localized into the user's\nlanguage.", - "type": "string" - }, - "scriptStackTraceElements": { - "description": "An array of objects that provide a stack trace through the script to show\nwhere the execution failed, with the deepest call first.", - "items": { - "$ref": "ScriptStackTraceElement" - }, - "type": "array" - } - }, - "id": "ExecutionError", - "description": "An object that provides information about the nature of an error in the Apps\nScript Execution API. If an\n`run` call succeeds but the\nscript function (or Apps Script itself) throws an exception, the response\nbody's `error` field contains a\n`Status` object. The `Status` object's `details` field\ncontains an array with a single one of these `ExecutionError` objects." - }, - "Status": { - "properties": { - "details": { - "description": "An array that contains a single `ExecutionError` object that provides information about the nature of the error.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - }, - "code": { - "format": "int32", - "description": "The status code. For this API, this value will always be 3, corresponding to an INVALID_ARGUMENT error.", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which is in English. Any user-facing error message is localized and sent in the [`google.rpc.Status.details`](google.rpc.Status.details) field, or localized by the client.", - "type": "string" - } - }, - "id": "Status", - "description": "If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, the response body's `error` field will contain this `Status` object.", - "type": "object" - }, - "ExecutionRequest": { - "description": "A request to run the function in a script. The script is identified by the\nspecified `script_id`. Executing a function on a script returns results\nbased on the implementation of the script.", - "type": "object", - "properties": { - "devMode": { - "description": "If `true` and the user is an owner of the script, the script runs at the\nmost recently saved version rather than the version deployed for use with\nthe Execution API. Optional; default is `false`.", - "type": "boolean" - }, - "function": { - "description": "The name of the function to execute in the given script. The name does not\ninclude parentheses or parameters.", - "type": "string" - }, - "parameters": { - "description": "The parameters to be passed to the function being executed. The object type\nfor each parameter should match the expected type in Apps Script.\nParameters cannot be Apps Script-specific object types (such as a\n`Document` or a `Calendar`); they can only be primitive types such as\n`string`, `number`, `array`, `object`, or `boolean`. Optional.", - "items": { - "type": "any" - }, - "type": "array" - }, - "sessionState": { - "description": "For Android add-ons only. An ID that represents the user's current session\nin the Android app for Google Docs or Sheets, included as extra data in the\n[`Intent`](https://developer.android.com/guide/components/intents-filters.html)\nthat launches the add-on. When an Android add-on is run with a session\nstate, it gains the privileges of a\n[bound](https://developers.google.com/apps-script/guides/bound) script —\nthat is, it can access information like the user's current cursor position\n(in Docs) or selected cell (in Sheets). To retrieve the state, call\n`Intent.getStringExtra(\"com.google.android.apps.docs.addons.SessionState\")`.\nOptional.", - "type": "string" - } - }, - "id": "ExecutionRequest" - }, - "JoinAsyncRequest": { - "description": "A request to retrieve the results from a collection of requests,\nspecified by the operation resource names.", - "type": "object", - "properties": { - "scriptId": { - "description": "The script id which specifies the script which all processes in the names\nfield must be from.", - "type": "string" - }, - "names": { - "items": { - "type": "string" - }, - "type": "array", - "description": "List of operation resource names that we want to join,\nas returned from a call to RunAsync." - }, - "timeout": { - "format": "google-duration", - "description": "Timeout for information retrieval in milliseconds.", - "type": "string" - } - }, - "id": "JoinAsyncRequest" - } - }, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "protocol": "rest", - "version": "v1", - "baseUrl": "https://script.googleapis.com/", "auth": { "oauth2": { "scopes": { @@ -336,14 +14,14 @@ "https://www.googleapis.com/auth/spreadsheets": { "description": "View and manage your spreadsheets in Google Drive" }, - "https://mail.google.com/": { - "description": "Read, send, delete, and manage your email" + "https://www.googleapis.com/auth/admin.directory.user": { + "description": "View and manage the provisioning of users on your domain" }, "https://www.googleapis.com/auth/admin.directory.group": { "description": "View and manage the provisioning of groups on your domain" }, - "https://www.googleapis.com/auth/admin.directory.user": { - "description": "View and manage the provisioning of users on your domain" + "https://mail.google.com/": { + "description": "Read, send, delete, and manage your email" }, "https://www.googleapis.com/auth/forms": { "description": "View and manage your forms in Google Drive" @@ -360,10 +38,291 @@ } } }, - "servicePath": "", - "description": "Executes Google Apps Script projects.", + "description": "Executes functions in Google Apps Script projects.", "kind": "discovery#restDescription", + "servicePath": "", "rootUrl": "https://script.googleapis.com/", "basePath": "", - "ownerDomain": "google.com" + "ownerDomain": "google.com", + "name": "script", + "batchPath": "batch", + "documentationLink": "https://developers.google.com/apps-script/execution/rest/v1/scripts/run", + "id": "script:v1", + "revision": "20170829", + "title": "Google Apps Script Execution API", + "ownerName": "Google", + "discoveryVersion": "v1", + "resources": { + "scripts": { + "methods": { + "run": { + "path": "v1/scripts/{scriptId}:run", + "id": "script.scripts.run", + "description": "Runs a function in an Apps Script project. The project must be deployed\nfor use with the Apps Script Execution API.\n\nThis method requires authorization with an OAuth 2.0 token that includes at\nleast one of the scopes listed in the [Authorization](#authorization)\nsection; script projects that do not require authorization cannot be\nexecuted through this API. To find the correct scopes to include in the\nauthentication token, open the project in the script editor, then select\n**File \u003e Project properties** and click the **Scopes** tab.", + "request": { + "$ref": "ExecutionRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "scriptId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "scriptId": { + "location": "path", + "description": "The script ID of the script to be executed. To find the script ID, open\nthe project in the script editor and select **File \u003e Project properties**.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://mail.google.com/", + "https://www.google.com/calendar/feeds", + "https://www.google.com/m8/feeds", + "https://www.googleapis.com/auth/admin.directory.group", + "https://www.googleapis.com/auth/admin.directory.user", + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/forms", + "https://www.googleapis.com/auth/forms.currentonly", + "https://www.googleapis.com/auth/groups", + "https://www.googleapis.com/auth/spreadsheets", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1/scripts/{scriptId}:run" + } + } + } + }, + "parameters": { + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format." + }, + "alt": { + "type": "string", + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "key": { + "type": "string", + "location": "query", + "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." + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "type": "string", + "location": "query", + "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." + }, + "pp": { + "default": "true", + "type": "boolean", + "location": "query", + "description": "Pretty-print response." + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + } + }, + "schemas": { + "ExecutionRequest": { + "description": "A request to run the function in a script. The script is identified by the\nspecified `script_id`. Executing a function on a script returns results\nbased on the implementation of the script.", + "type": "object", + "properties": { + "sessionState": { + "description": "For Android add-ons only. An ID that represents the user's current session\nin the Android app for Google Docs or Sheets, included as extra data in the\n[`Intent`](https://developer.android.com/guide/components/intents-filters.html)\nthat launches the add-on. When an Android add-on is run with a session\nstate, it gains the privileges of a\n[bound](https://developers.google.com/apps-script/guides/bound) script —\nthat is, it can access information like the user's current cursor position\n(in Docs) or selected cell (in Sheets). To retrieve the state, call\n`Intent.getStringExtra(\"com.google.android.apps.docs.addons.SessionState\")`.\nOptional.", + "type": "string" + }, + "devMode": { + "description": "If `true` and the user is an owner of the script, the script runs at the\nmost recently saved version rather than the version deployed for use with\nthe Execution API. Optional; default is `false`.", + "type": "boolean" + }, + "function": { + "description": "The name of the function to execute in the given script. The name does not\ninclude parentheses or parameters.", + "type": "string" + }, + "parameters": { + "description": "The parameters to be passed to the function being executed. The object type\nfor each parameter should match the expected type in Apps Script.\nParameters cannot be Apps Script-specific object types (such as a\n`Document` or a `Calendar`); they can only be primitive types such as\n`string`, `number`, `array`, `object`, or `boolean`. Optional.", + "items": { + "type": "any" + }, + "type": "array" + } + }, + "id": "ExecutionRequest" + }, + "ExecutionResponse": { + "description": "An object that provides the return value of a function executed through the\nApps Script Execution API. If a\n`run` call succeeds and the\nscript function returns successfully, the response body's\n`response` field contains this\n`ExecutionResponse` object.", + "type": "object", + "properties": { + "result": { + "description": "The return value of the script function. The type matches the object type\nreturned in Apps Script. Functions called through the Execution API cannot\nreturn Apps Script-specific objects (such as a `Document` or a `Calendar`);\nthey can only return primitive types such as a `string`, `number`, `array`,\n`object`, or `boolean`.", + "type": "any" + } + }, + "id": "ExecutionResponse" + }, + "Operation": { + "properties": { + "done": { + "description": "This field is only used with asynchronous executions and indicates whether or not the script execution has completed. A completed execution has a populated response field containing the `ExecutionResponse` from function that was executed.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "If the script function returns successfully, this field will contain an `ExecutionResponse` object with the function's return value as the object's `result` field.", + "type": "object" + }, + "error": { + "$ref": "Status", + "description": "If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, this field will contain a `Status` object. The `Status` object's `details` field will contain an array with a single `ExecutionError` object that provides information about the nature of the error." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "This field is not used." + } + }, + "id": "Operation", + "description": "The response will not arrive until the function finishes executing. The maximum runtime is listed in the guide to [limitations in Apps Script](https://developers.google.com/apps-script/guides/services/quotas#current_limitations).\n\u003cp\u003eIf the script function returns successfully, the `response` field will contain an `ExecutionResponse` object with the function's return value in the object's `result` field.\u003c/p\u003e\n\u003cp\u003eIf the script function (or Apps Script itself) throws an exception, the `error` field will contain a `Status` object. The `Status` object's `details` field will contain an array with a single `ExecutionError` object that provides information about the nature of the error.\u003c/p\u003e\n\u003cp\u003eIf the `run` call itself fails (for example, because of a malformed request or an authorization error), the method will return an HTTP response code in the 4XX range with a different format for the response body. Client libraries will automatically convert a 4XX response into an exception class.\u003c/p\u003e", + "type": "object" + }, + "ScriptStackTraceElement": { + "id": "ScriptStackTraceElement", + "description": "A stack trace through the script that shows where the execution failed.", + "type": "object", + "properties": { + "function": { + "description": "The name of the function that failed.", + "type": "string" + }, + "lineNumber": { + "format": "int32", + "description": "The line number where the script failed.", + "type": "integer" + } + } + }, + "ExecutionError": { + "id": "ExecutionError", + "description": "An object that provides information about the nature of an error in the Apps\nScript Execution API. If an\n`run` call succeeds but the\nscript function (or Apps Script itself) throws an exception, the response\nbody's `error` field contains a\n`Status` object. The `Status` object's `details` field\ncontains an array with a single one of these `ExecutionError` objects.", + "type": "object", + "properties": { + "errorMessage": { + "description": "The error message thrown by Apps Script, usually localized into the user's\nlanguage.", + "type": "string" + }, + "scriptStackTraceElements": { + "description": "An array of objects that provide a stack trace through the script to show\nwhere the execution failed, with the deepest call first.", + "items": { + "$ref": "ScriptStackTraceElement" + }, + "type": "array" + }, + "errorType": { + "description": "The error type, for example `TypeError` or `ReferenceError`. If the error\ntype is unavailable, this field is not included.", + "type": "string" + } + } + }, + "Status": { + "description": "If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, the response body's `error` field will contain this `Status` object.", + "type": "object", + "properties": { + "code": { + "format": "int32", + "description": "The status code. For this API, this value will always be 3, corresponding to an \u003ccode\u003eINVALID_ARGUMENT\u003c/code\u003e error.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which is in English. Any user-facing error message is localized and sent in the [`google.rpc.Status.details`](google.rpc.Status.details) field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "An array that contains a single `ExecutionError` object that provides information about the nature of the error.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + } + }, + "id": "Status" + } + }, + "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "version": "v1", + "baseUrl": "https://script.googleapis.com/" } diff --git a/vendor/google.golang.org/api/script/v1/script-gen.go b/vendor/google.golang.org/api/script/v1/script-gen.go index ccd1f2775..cdbfdf92c 100644 --- a/vendor/google.golang.org/api/script/v1/script-gen.go +++ b/vendor/google.golang.org/api/script/v1/script-gen.go @@ -279,78 +279,6 @@ func (s *ExecutionResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// JoinAsyncRequest: A request to retrieve the results from a collection -// of requests, -// specified by the operation resource names. -type JoinAsyncRequest struct { - // Names: List of operation resource names that we want to join, - // as returned from a call to RunAsync. - Names []string `json:"names,omitempty"` - - // ScriptId: The script id which specifies the script which all - // processes in the names - // field must be from. - ScriptId string `json:"scriptId,omitempty"` - - // Timeout: Timeout for information retrieval in milliseconds. - Timeout string `json:"timeout,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Names") 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. "Names") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *JoinAsyncRequest) MarshalJSON() ([]byte, error) { - type noMethod JoinAsyncRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// JoinAsyncResponse: An object that provides the return value for the -// JoinAsync method. -type JoinAsyncResponse struct { - // Results: The return values for each script function, in a map of - // operation resource - // names to the Operation containing the result of the process. The - // response - // will contain either an error or the result of the script function. - Results map[string]Operation `json:"results,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Results") 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. "Results") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *JoinAsyncResponse) MarshalJSON() ([]byte, error) { - type noMethod JoinAsyncResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Operation: The response will not arrive until the function finishes // executing. The maximum runtime is listed in the guide to [limitations // in Apps @@ -370,7 +298,10 @@ func (s *JoinAsyncResponse) MarshalJSON() ([]byte, error) { // the response body. Client libraries will automatically convert a 4XX // response into an exception class.

    type Operation struct { - // Done: This field is not used. + // Done: This field is only used with asynchronous executions and + // indicates whether or not the script execution has completed. A + // completed execution has a populated response field containing the + // `ExecutionResponse` from function that was executed. Done bool `json:"done,omitempty"` // Error: If a `run` call succeeds but the script function (or Apps @@ -383,9 +314,6 @@ type Operation struct { // Metadata: This field is not used. Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: This field is not used. - Name string `json:"name,omitempty"` - // Response: If the script function returns successfully, this field // will contain an `ExecutionResponse` object with the function's return // value as the object's `result` field. @@ -455,7 +383,7 @@ func (s *ScriptStackTraceElement) MarshalJSON() ([]byte, error) { // will contain this `Status` object. type Status struct { // Code: The status code. For this API, this value will always be 3, - // corresponding to an INVALID_ARGUMENT error. + // corresponding to an INVALID_ARGUMENT error. Code int64 `json:"code,omitempty"` // Details: An array that contains a single `ExecutionError` object that @@ -619,7 +547,7 @@ func (c *ScriptsRunCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // ], // "parameters": { // "scriptId": { - // "description": "The project key of the script to be executed. To find the project key, open\nthe project in the script editor and select **File \u003e Project properties**.", + // "description": "The script ID of the script to be executed. To find the script ID, open\nthe project in the script editor and select **File \u003e Project properties**.", // "location": "path", // "required": true, // "type": "string" diff --git a/vendor/google.golang.org/api/searchconsole/v1/searchconsole-api.json b/vendor/google.golang.org/api/searchconsole/v1/searchconsole-api.json index 9a333e536..2ecd9a45d 100644 --- a/vendor/google.golang.org/api/searchconsole/v1/searchconsole-api.json +++ b/vendor/google.golang.org/api/searchconsole/v1/searchconsole-api.json @@ -1,40 +1,26 @@ { - "baseUrl": "https://searchconsole.googleapis.com/", - "canonicalName": "Search Console", - "servicePath": "", - "description": "Provides tools for running validation tests against single URLs", - "kind": "discovery#restDescription", - "rootUrl": "https://searchconsole.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "searchconsole", - "batchPath": "batch", - "id": "searchconsole:v1", - "documentationLink": "https://developers.google.com/webmaster-tools/search-console-api/", - "revision": "20170802", - "title": "Google Search Console URL Testing Tools API", "ownerName": "Google", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "resources": { "urlTestingTools": { "resources": { "mobileFriendlyTest": { "methods": { "run": { - "flatPath": "v1/urlTestingTools/mobileFriendlyTest:run", - "path": "v1/urlTestingTools/mobileFriendlyTest:run", - "id": "searchconsole.urlTestingTools.mobileFriendlyTest.run", "request": { "$ref": "RunMobileFriendlyTestRequest" }, "description": "Runs Mobile-Friendly Test for a given URL.", - "httpMethod": "POST", - "parameterOrder": [], "response": { "$ref": "RunMobileFriendlyTestResponse" }, - "parameters": {} + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "flatPath": "v1/urlTestingTools/mobileFriendlyTest:run", + "path": "v1/urlTestingTools/mobileFriendlyTest:run", + "id": "searchconsole.urlTestingTools.mobileFriendlyTest.run" } } } @@ -42,37 +28,47 @@ } }, "parameters": { + "key": { + "type": "string", + "location": "query", + "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." + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, "quotaUser": { "location": "query", "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.", "type": "string" }, "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "oauth_token": { "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" }, "bearer_token": { "location": "query", "description": "OAuth bearer token.", "type": "string" }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, "upload_protocol": { "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" }, "prettyPrint": { + "location": "query", "description": "Returns response with indentations and line breaks.", - "default": "true", "type": "boolean", - "location": "query" + "default": "true" }, "uploadType": { "location": "query", @@ -80,17 +76,16 @@ "type": "string" }, "fields": { - "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string" + "type": "string", + "location": "query" }, "callback": { - "location": "query", "description": "JSONP", - "type": "string" + "type": "string", + "location": "query" }, "$.xgafv": { - "description": "V1 error format.", "type": "string", "enumDescriptions": [ "v1 error format", @@ -100,11 +95,10 @@ "enum": [ "1", "2" - ] + ], + "description": "V1 error format." }, "alt": { - "description": "Data format for response.", - "default": "json", "enum": [ "json", "media", @@ -116,17 +110,9 @@ "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], - "location": "query" - }, - "access_token": { "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "key": { - "location": "query", - "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.", - "type": "string" + "description": "Data format for response.", + "default": "json" } }, "schemas": { @@ -139,8 +125,8 @@ "type": "string" }, "data": { - "format": "byte", "description": "Image data in format determined by the mime type. Currently, the format\nwill always be \"image/png\", but this might change in the future.", + "format": "byte", "type": "string" } }, @@ -210,25 +196,25 @@ }, "mobileFriendlyIssues": { "description": "List of mobile-usability issues.", + "type": "array", "items": { "$ref": "MobileFriendlyIssue" - }, - "type": "array" + } }, "screenshot": { - "description": "Screenshot of the requested URL.", - "$ref": "Image" + "$ref": "Image", + "description": "Screenshot of the requested URL." + }, + "testStatus": { + "description": "Final state of the test, can be either complete or an error.", + "$ref": "TestStatus" }, "resourceIssues": { "description": "Information about embedded resources issues.", + "type": "array", "items": { "$ref": "ResourceIssue" - }, - "type": "array" - }, - "testStatus": { - "$ref": "TestStatus", - "description": "Final state of the test, can be either complete or an error." + } } }, "id": "RunMobileFriendlyTestResponse" @@ -245,23 +231,25 @@ "id": "ResourceIssue" }, "BlockedResource": { - "description": "Blocked resource.", - "type": "object", "properties": { "url": { "description": "URL of the blocked resource.", "type": "string" } }, - "id": "BlockedResource" + "id": "BlockedResource", + "description": "Blocked resource.", + "type": "object" }, "TestStatus": { "description": "Final state of the test, including error details if necessary.", "type": "object", "properties": { + "details": { + "description": "Error details if applicable.", + "type": "string" + }, "status": { - "description": "Status of the test.", - "type": "string", "enumDescriptions": [ "Internal error when running this test. Please try running the test again.", "Inspection has completed without errors.", @@ -273,20 +261,32 @@ "COMPLETE", "INTERNAL_ERROR", "PAGE_UNREACHABLE" - ] - }, - "details": { - "description": "Error details if applicable.", + ], + "description": "Status of the test.", "type": "string" } }, "id": "TestStatus" } }, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, "protocol": "rest", - "version": "v1" + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "version": "v1", + "baseUrl": "https://searchconsole.googleapis.com/", + "canonicalName": "Search Console", + "kind": "discovery#restDescription", + "description": "Provides tools for running validation tests against single URLs", + "servicePath": "", + "rootUrl": "https://searchconsole.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "searchconsole", + "batchPath": "batch", + "id": "searchconsole:v1", + "documentationLink": "https://developers.google.com/webmaster-tools/search-console-api/", + "revision": "20170909", + "title": "Google Search Console URL Testing Tools API" } diff --git a/vendor/google.golang.org/api/servicecontrol/v1/servicecontrol-api.json b/vendor/google.golang.org/api/servicecontrol/v1/servicecontrol-api.json index a6afafdda..19e9cdae0 100644 --- a/vendor/google.golang.org/api/servicecontrol/v1/servicecontrol-api.json +++ b/vendor/google.golang.org/api/servicecontrol/v1/servicecontrol-api.json @@ -1,16 +1,1059 @@ { + "rootUrl": "https://servicecontrol.googleapis.com/", + "ownerDomain": "google.com", + "name": "servicecontrol", + "batchPath": "batch", + "fullyEncodeReservedExpansion": true, + "title": "Google Service Control API", + "ownerName": "Google", + "resources": { + "services": { + "methods": { + "startReconciliation": { + "httpMethod": "POST", + "parameterOrder": [ + "serviceName" + ], + "response": { + "$ref": "StartReconciliationResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/servicecontrol" + ], + "parameters": { + "serviceName": { + "location": "path", + "description": "Name of the service as specified in the service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/services/{serviceName}:startReconciliation", + "path": "v1/services/{serviceName}:startReconciliation", + "id": "servicecontrol.services.startReconciliation", + "request": { + "$ref": "StartReconciliationRequest" + }, + "description": "Unlike rate quota, allocation quota does not get refilled periodically.\nSo, it is possible that the quota usage as seen by the service differs from\nwhat the One Platform considers the usage is. This is expected to happen\nonly rarely, but over time this can accumulate. Services can invoke\nStartReconciliation and EndReconciliation to correct this usage drift, as\ndescribed below:\n1. Service sends StartReconciliation with a timestamp in future for each\n metric that needs to be reconciled. The timestamp being in future allows\n to account for in-flight AllocateQuota and ReleaseQuota requests for the\n same metric.\n2. One Platform records this timestamp and starts tracking subsequent\n AllocateQuota and ReleaseQuota requests until EndReconciliation is\n called.\n3. At or after the time specified in the StartReconciliation, service\n sends EndReconciliation with the usage that needs to be reconciled to.\n4. One Platform adjusts its own record of usage for that metric to the\n value specified in EndReconciliation by taking in to account any\n allocation or release between StartReconciliation and EndReconciliation.\n\nSignals the quota controller that the service wants to perform a usage\nreconciliation as specified in the request.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam)." + }, + "check": { + "path": "v1/services/{serviceName}:check", + "id": "servicecontrol.services.check", + "description": "Checks an operation with Google Service Control to decide whether\nthe given operation should proceed. It should be called before the\noperation is executed.\n\nIf feasible, the client should cache the check results and reuse them for\n60 seconds. In case of server errors, the client can rely on the cached\nresults for longer time.\n\nNOTE: the CheckRequest has the size limit of 64KB.\n\nThis method requires the `servicemanagement.services.check` permission\non the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).", + "request": { + "$ref": "CheckRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "serviceName" + ], + "response": { + "$ref": "CheckResponse" + }, + "parameters": { + "serviceName": { + "description": "The service name as specified in its service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee\n[google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)\nfor the definition of a service name.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/servicecontrol" + ], + "flatPath": "v1/services/{serviceName}:check" + }, + "releaseQuota": { + "response": { + "$ref": "ReleaseQuotaResponse" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST", + "parameters": { + "serviceName": { + "location": "path", + "description": "Name of the service as specified in the service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/servicecontrol" + ], + "flatPath": "v1/services/{serviceName}:releaseQuota", + "id": "servicecontrol.services.releaseQuota", + "path": "v1/services/{serviceName}:releaseQuota", + "description": "Releases previously allocated quota done through AllocateQuota method.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).\n\n**NOTE:** the client code **must** fail-open if the server returns one\nof the following quota errors:\n- `PROJECT_STATUS_UNAVAILABLE`\n- `SERVICE_STATUS_UNAVAILABLE`\n- `BILLING_STATUS_UNAVAILABLE`\n- `QUOTA_SYSTEM_UNAVAILABLE`\n\nThe server may inject above errors to prohibit any hard dependency\non the quota system.", + "request": { + "$ref": "ReleaseQuotaRequest" + } + }, + "endReconciliation": { + "request": { + "$ref": "EndReconciliationRequest" + }, + "description": "Signals the quota controller that service ends the ongoing usage\nreconciliation.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).", + "response": { + "$ref": "EndReconciliationResponse" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/servicecontrol" + ], + "parameters": { + "serviceName": { + "location": "path", + "description": "Name of the service as specified in the service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/services/{serviceName}:endReconciliation", + "id": "servicecontrol.services.endReconciliation", + "path": "v1/services/{serviceName}:endReconciliation" + }, + "report": { + "request": { + "$ref": "ReportRequest" + }, + "description": "Reports operation results to Google Service Control, such as logs and\nmetrics. It should be called after an operation is completed.\n\nIf feasible, the client should aggregate reporting data for up to 5\nseconds to reduce API traffic. Limiting aggregation to 5 seconds is to\nreduce data loss during client crashes. Clients should carefully choose\nthe aggregation time window to avoid data loss risk more than 0.01%\nfor business and compliance reasons.\n\nNOTE: the ReportRequest has the size limit of 1MB.\n\nThis method requires the `servicemanagement.services.report` permission\non the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).", + "response": { + "$ref": "ReportResponse" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/servicecontrol" + ], + "parameters": { + "serviceName": { + "location": "path", + "description": "The service name as specified in its service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee\n[google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)\nfor the definition of a service name.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/services/{serviceName}:report", + "id": "servicecontrol.services.report", + "path": "v1/services/{serviceName}:report" + }, + "allocateQuota": { + "path": "v1/services/{serviceName}:allocateQuota", + "id": "servicecontrol.services.allocateQuota", + "request": { + "$ref": "AllocateQuotaRequest" + }, + "description": "Attempts to allocate quota for the specified consumer. It should be called\nbefore the operation is executed.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).\n\n**NOTE:** the client code **must** fail-open if the server returns one\nof the following quota errors:\n- `PROJECT_STATUS_UNAVAILABLE`\n- `SERVICE_STATUS_UNAVAILABLE`\n- `BILLING_STATUS_UNAVAILABLE`\n- `QUOTA_SYSTEM_UNAVAILABLE`\n\nThe server may inject above errors to prohibit any hard dependency\non the quota system.", + "httpMethod": "POST", + "parameterOrder": [ + "serviceName" + ], + "response": { + "$ref": "AllocateQuotaResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/servicecontrol" + ], + "parameters": { + "serviceName": { + "location": "path", + "description": "Name of the service as specified in the service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/services/{serviceName}:allocateQuota" + } + } + } + }, + "parameters": { + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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", + "description": "Data format for response.", + "default": "json" + }, + "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.", + "type": "string", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + } + }, + "version": "v1", + "baseUrl": "https://servicecontrol.googleapis.com/", + "kind": "discovery#restDescription", + "description": "Google Service Control provides control plane functionality to managed services, such as logging, monitoring, and status checks.", + "servicePath": "", + "basePath": "", + "revision": "20170904", + "documentationLink": "https://cloud.google.com/service-control/", + "id": "servicecontrol:v1", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { - "StartReconciliationResponse": { + "CheckError": { + "description": "Defines the errors to be returned in\ngoogle.api.servicecontrol.v1.CheckResponse.check_errors.", + "type": "object", "properties": { + "detail": { + "description": "Free-form text providing details on the error cause of the error.", + "type": "string" + }, + "code": { + "enum": [ + "ERROR_CODE_UNSPECIFIED", + "NOT_FOUND", + "PERMISSION_DENIED", + "RESOURCE_EXHAUSTED", + "BUDGET_EXCEEDED", + "DENIAL_OF_SERVICE_DETECTED", + "LOAD_SHEDDING", + "ABUSER_DETECTED", + "SERVICE_NOT_ACTIVATED", + "VISIBILITY_DENIED", + "BILLING_DISABLED", + "PROJECT_DELETED", + "PROJECT_INVALID", + "IP_ADDRESS_BLOCKED", + "REFERER_BLOCKED", + "CLIENT_APP_BLOCKED", + "API_TARGET_BLOCKED", + "API_KEY_INVALID", + "API_KEY_EXPIRED", + "API_KEY_NOT_FOUND", + "SPATULA_HEADER_INVALID", + "LOAS_ROLE_INVALID", + "NO_LOAS_PROJECT", + "LOAS_PROJECT_DISABLED", + "SECURITY_POLICY_VIOLATED", + "NAMESPACE_LOOKUP_UNAVAILABLE", + "SERVICE_STATUS_UNAVAILABLE", + "BILLING_STATUS_UNAVAILABLE", + "QUOTA_CHECK_UNAVAILABLE", + "LOAS_PROJECT_LOOKUP_UNAVAILABLE", + "CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE", + "SECURITY_POLICY_BACKEND_UNAVAILABLE" + ], + "description": "The error code.", + "type": "string", + "enumDescriptions": [ + "This is never used in `CheckResponse`.", + "The consumer's project id was not found.\nSame as google.rpc.Code.NOT_FOUND.", + "The consumer doesn't have access to the specified resource.\nSame as google.rpc.Code.PERMISSION_DENIED.", + "Quota check failed. Same as google.rpc.Code.RESOURCE_EXHAUSTED.", + "Budget check failed.", + "The consumer's request has been flagged as a DoS attack.", + "The consumer's request should be rejected in order to protect the service\nfrom being overloaded.", + "The consumer has been flagged as an abuser.", + "The consumer hasn't activated the service.", + "The consumer cannot access the service due to visibility configuration.", + "The consumer cannot access the service because billing is disabled.", + "The consumer's project has been marked as deleted (soft deletion).", + "The consumer's project number or id does not represent a valid project.", + "The IP address of the consumer is invalid for the specific consumer\nproject.", + "The referer address of the consumer request is invalid for the specific\nconsumer project.", + "The client application of the consumer request is invalid for the\nspecific consumer project.", + "The API targeted by this request is invalid for the specified consumer\nproject.", + "The consumer's API key is invalid.", + "The consumer's API Key has expired.", + "The consumer's API Key was not found in config record.", + "The consumer's spatula header is invalid.", + "The consumer's LOAS role is invalid.", + "The consumer's LOAS role has no associated project.", + "The consumer's LOAS project is not `ACTIVE` in LoquatV2.", + "Request is not allowed as per security policies defined in Org Policy.", + "The backend server for looking up project id/number is unavailable.", + "The backend server for checking service status is unavailable.", + "The backend server for checking billing status is unavailable.", + "The backend server for checking quota limits is unavailable.", + "The Spanner for looking up LOAS project is unavailable.", + "Cloud Resource Manager backend server is unavailable.", + "Backend server for evaluating security policy is unavailable." + ] + } + }, + "id": "CheckError" + }, + "StartReconciliationRequest": { + "properties": { + "reconciliationOperation": { + "$ref": "QuotaOperation", + "description": "Operation that describes the quota reconciliation." + }, + "serviceConfigId": { + "description": "Specifies which version of service configuration should be used to process\nthe request. If unspecified or no matching version can be found, the latest\none will be used.", + "type": "string" + } + }, + "id": "StartReconciliationRequest", + "type": "object" + }, + "QuotaInfo": { + "description": "Contains the quota information for a quota check response.", + "type": "object", + "properties": { + "limitExceeded": { + "description": "Quota Metrics that have exceeded quota limits.\nFor QuotaGroup-based quota, this is QuotaGroup.name\nFor QuotaLimit-based quota, this is QuotaLimit.name\nSee: google.api.Quota\nDeprecated: Use quota_metrics to get per quota group limit exceeded status.", + "items": { + "type": "string" + }, + "type": "array" + }, + "quotaConsumed": { + "additionalProperties": { + "format": "int32", + "type": "integer" + }, + "description": "Map of quota group name to the actual number of tokens consumed. If the\nquota check was not successful, then this will not be populated due to no\nquota consumption.\n\nWe are not merging this field with 'quota_metrics' field because of the\ncomplexity of scaling in Chemist client code base. For simplicity, we will\nkeep this field for Castor (that scales quota usage) and 'quota_metrics'\nfor SuperQuota (that doesn't scale quota usage).\n", + "type": "object" + }, "quotaMetrics": { - "description": "Metric values as tracked by One Platform before the start of\nreconciliation. The following metrics will be included:\n\n1. Per quota metric total usage will be specified using the following gauge\nmetric:\n \"serviceruntime.googleapis.com/allocation/consumer/quota_used_count\"\n\n2. Value for each quota limit associated with the metrics will be specified\nusing the following gauge metric:\n \"serviceruntime.googleapis.com/quota/limit\"", + "description": "Quota metrics to indicate the usage. Depending on the check request, one or\nmore of the following metrics will be included:\n\n1. For rate quota, per quota group or per quota metric incremental usage\nwill be specified using the following delta metric:\n \"serviceruntime.googleapis.com/api/consumer/quota_used_count\"\n\n2. For allocation quota, per quota metric total usage will be specified\nusing the following gauge metric:\n \"serviceruntime.googleapis.com/allocation/consumer/quota_used_count\"\n\n3. For both rate quota and allocation quota, the quota limit reached\ncondition will be specified using the following boolean metric:\n \"serviceruntime.googleapis.com/quota/exceeded\"", + "items": { + "$ref": "MetricValueSet" + }, + "type": "array" + } + }, + "id": "QuotaInfo" + }, + "ConsumerInfo": { + "description": "`ConsumerInfo` provides information about the consumer project.", + "type": "object", + "properties": { + "projectNumber": { + "format": "int64", + "description": "The Google cloud project number, e.g. 1234567890. A value of 0 indicates\nno project number is found.", + "type": "string" + } + }, + "id": "ConsumerInfo" + }, + "CheckRequest": { + "description": "Request message for the Check method.", + "type": "object", + "properties": { + "skipActivationCheck": { + "description": "Indicates if service activation check should be skipped for this request.\nDefault behavior is to perform the check and apply relevant quota.", + "type": "boolean" + }, + "requestProjectSettings": { + "description": "Requests the project settings to be returned as part of the check response.", + "type": "boolean" + }, + "operation": { + "description": "The operation to be checked.", + "$ref": "Operation" + }, + "serviceConfigId": { + "description": "Specifies which version of service configuration should be used to process\nthe request.\n\nIf unspecified or no matching version can be found, the\nlatest one will be used.", + "type": "string" + } + }, + "id": "CheckRequest" + }, + "QuotaOperation": { + "properties": { + "consumerId": { + "description": "Identity of the consumer for whom this quota operation is being performed.\n\nThis can be in one of the following formats:\n project:\u003cproject_id\u003e,\n project_number:\u003cproject_number\u003e,\n api_key:\u003capi_key\u003e.", + "type": "string" + }, + "operationId": { + "description": "Identity of the operation. This is expected to be unique within the scope\nof the service that generated the operation, and guarantees idempotency in\ncase of retries.\n\nUUID version 4 is recommended, though not required. In scenarios where an\noperation is computed from existing information and an idempotent id is\ndesirable for deduplication purpose, UUID version 5 is recommended. See\nRFC 4122 for details.", + "type": "string" + }, + "quotaMode": { + "enumDescriptions": [ + "", + "For AllocateQuota request, allocates quota for the amount specified in\nthe service configuration or specified using the quota metrics. If the\namount is higher than the available quota, allocation error will be\nreturned and no quota will be allocated.\nFor ReleaseQuota request, this mode is supported only for precise quota\nlimits. In this case, this operation releases quota for the amount\nspecified in the service configuration or specified using the quota\nmetrics. If the release can make used quota negative, release error\nwill be returned and no quota will be released.", + "For AllocateQuota request, this mode is supported only for imprecise\nquota limits. In this case, the operation allocates quota for the amount\nspecified in the service configuration or specified using the quota\nmetrics. If the amount is higher than the available quota, request does\nnot fail but all available quota will be allocated.\nFor ReleaseQuota request, this mode is supported for both precise quota\nlimits and imprecise quota limits. In this case, this operation releases\nquota for the amount specified in the service configuration or specified\nusing the quota metrics. If the release can make used quota\nnegative, request does not fail but only the used quota will be\nreleased. After the ReleaseQuota request completes, the used quota\nwill be 0, and never goes to negative.", + "For AllocateQuota request, only checks if there is enough quota\navailable and does not change the available quota. No lock is placed on\nthe available quota either. Not supported for ReleaseQuota request." + ], + "enum": [ + "UNSPECIFIED", + "NORMAL", + "BEST_EFFORT", + "CHECK_ONLY" + ], + "description": "Quota mode for this operation.", + "type": "string" + }, + "methodName": { + "description": "Fully qualified name of the API method for which this quota operation is\nrequested. This name is used for matching quota rules or metric rules and\nbilling status rules defined in service configuration. This field is not\nrequired if the quota operation is performed on non-API resources.\n\nExample of an RPC method name:\n google.example.library.v1.LibraryService.CreateShelf", + "type": "string" + }, + "quotaMetrics": { + "description": "Represents information about this operation. Each MetricValueSet\ncorresponds to a metric defined in the service configuration.\nThe data type used in the MetricValueSet must agree with\nthe data type specified in the metric definition.\n\nWithin a single operation, it is not allowed to have more than one\nMetricValue instances that have the same metric names and identical\nlabel value combinations. If a request has such duplicated MetricValue\ninstances, the entire request is rejected with\nan invalid argument error.", "items": { "$ref": "MetricValueSet" }, "type": "array" }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels describing the operation.", + "type": "object" + } + }, + "id": "QuotaOperation", + "description": "Represents information regarding a quota operation.", + "type": "object" + }, + "EndReconciliationRequest": { + "properties": { + "reconciliationOperation": { + "description": "Operation that describes the quota reconciliation.", + "$ref": "QuotaOperation" + }, + "serviceConfigId": { + "description": "Specifies which version of service configuration should be used to process\nthe request. If unspecified or no matching version can be found, the latest\none will be used.", + "type": "string" + } + }, + "id": "EndReconciliationRequest", + "type": "object" + }, + "ReportInfo": { + "type": "object", + "properties": { + "operationId": { + "description": "The Operation.operation_id value from the request.", + "type": "string" + }, + "quotaInfo": { + "description": "Quota usage info when processing the `Operation`.", + "$ref": "QuotaInfo" + } + }, + "id": "ReportInfo" + }, + "Operation": { + "description": "Represents information regarding an operation.", + "type": "object", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels describing the operation. Only the following labels are allowed:\n\n- Labels describing monitored resources as defined in\n the service configuration.\n- Default labels of metric values. When specified, labels defined in the\n metric value override these default.\n- The following labels defined by Google Cloud Platform:\n - `cloud.googleapis.com/location` describing the location where the\n operation happened,\n - `servicecontrol.googleapis.com/user_agent` describing the user agent\n of the API request,\n - `servicecontrol.googleapis.com/service_agent` describing the service\n used to handle the API request (e.g. ESP),\n - `servicecontrol.googleapis.com/platform` describing the platform\n where the API is served (e.g. GAE, GCE, GKE).", + "type": "object" + }, + "logEntries": { + "description": "Represents information to be logged.", + "items": { + "$ref": "LogEntry" + }, + "type": "array" + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "User defined labels for the resource that this operation is associated\nwith.", + "type": "object" + }, + "metricValueSets": { + "description": "Represents information about this operation. Each MetricValueSet\ncorresponds to a metric defined in the service configuration.\nThe data type used in the MetricValueSet must agree with\nthe data type specified in the metric definition.\n\nWithin a single operation, it is not allowed to have more than one\nMetricValue instances that have the same metric names and identical\nlabel value combinations. If a request has such duplicated MetricValue\ninstances, the entire request is rejected with\nan invalid argument error.", + "items": { + "$ref": "MetricValueSet" + }, + "type": "array" + }, + "quotaProperties": { + "description": "Represents the properties needed for quota check. Applicable only if this\noperation is for a quota check request.", + "$ref": "QuotaProperties" + }, + "consumerId": { + "description": "Identity of the consumer who is using the service.\nThis field should be filled in for the operations initiated by a\nconsumer, but not for service-initiated operations that are\nnot related to a specific consumer.\n\nThis can be in one of the following formats:\n project:\u003cproject_id\u003e,\n project_number:\u003cproject_number\u003e,\n api_key:\u003capi_key\u003e.", + "type": "string" + }, + "operationId": { + "description": "Identity of the operation. This must be unique within the scope of the\nservice that generated the operation. If the service calls\nCheck() and Report() on the same operation, the two calls should carry\nthe same id.\n\nUUID version 4 is recommended, though not required.\nIn scenarios where an operation is computed from existing information\nand an idempotent id is desirable for deduplication purpose, UUID version 5\nis recommended. See RFC 4122 for details.", + "type": "string" + }, + "operationName": { + "description": "Fully qualified name of the operation. Reserved for future use.", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "End time of the operation.\nRequired when the operation is used in ServiceController.Report,\nbut optional when the operation is used in ServiceController.Check.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "Required. Start time of the operation.", + "type": "string" + }, + "resourceContainers": { + "description": "DO NOT USE.\nThis field is not ready for use yet.", + "items": { + "type": "string" + }, + "type": "array" + }, + "importance": { + "enum": [ + "LOW", + "HIGH", + "DEBUG" + ], + "description": "DO NOT USE. This is an experimental field.", + "type": "string", + "enumDescriptions": [ + "The API implementation may cache and aggregate the data.\nThe data may be lost when rare and unexpected system failures occur.", + "The API implementation doesn't cache and aggregate the data.\nIf the method returns successfully, it's guaranteed that the data has\nbeen persisted in durable storage.", + "In addition to the behavior described in HIGH, DEBUG enables\nadditional validation logic that is only useful during the onboarding\nprocess. This is only available to Google internal services and\nthe service must be whitelisted by chemist-dev@google.com in order\nto use this level." + ] + }, + "resourceContainer": { + "description": "The resource name of the parent of a resource in the resource hierarchy.\n\nThis can be in one of the following formats:\n - “projects/\u003cproject-id or project-number\u003e”\n - “folders/\u003cfolder-id\u003e”\n - “organizations/\u003corganization-id\u003e”", + "type": "string" + } + }, + "id": "Operation" + }, + "ReportResponse": { + "description": "Response message for the Report method.", + "type": "object", + "properties": { + "reportInfos": { + "description": "Quota usage for each quota release `Operation` request.\n\nFully or partially failed quota release request may or may not be present\nin `report_quota_info`. For example, a failed quota release request will\nhave the current quota usage info when precise quota library returns the\ninfo. A deadline exceeded quota request will not have quota usage info.\n\nIf there is no quota release request, report_quota_info will be empty.\n", + "items": { + "$ref": "ReportInfo" + }, + "type": "array" + }, + "serviceConfigId": { + "description": "The actual config id used to process the request.", + "type": "string" + }, + "reportErrors": { + "description": "Partial failures, one for each `Operation` in the request that failed\nprocessing. There are three possible combinations of the RPC status:\n\n1. The combination of a successful RPC status and an empty `report_errors`\n list indicates a complete success where all `Operations` in the\n request are processed successfully.\n2. The combination of a successful RPC status and a non-empty\n `report_errors` list indicates a partial success where some\n `Operations` in the request succeeded. Each\n `Operation` that failed processing has a corresponding item\n in this list.\n3. A failed RPC status indicates a general non-deterministic failure.\n When this happens, it's impossible to know which of the\n 'Operations' in the request succeeded or failed.", + "items": { + "$ref": "ReportError" + }, + "type": "array" + } + }, + "id": "ReportResponse" + }, + "CheckResponse": { + "properties": { + "checkInfo": { + "$ref": "CheckInfo", + "description": "Feedback data returned from the server during processing a Check request." + }, + "checkErrors": { + "description": "Indicate the decision of the check.\n\nIf no check errors are present, the service should process the operation.\nOtherwise the service should use the list of errors to determine the\nappropriate action.", + "items": { + "$ref": "CheckError" + }, + "type": "array" + }, + "operationId": { + "description": "The same operation_id value used in the CheckRequest.\nUsed for logging and diagnostics purposes.", + "type": "string" + }, + "serviceConfigId": { + "description": "The actual config id used to process the request.", + "type": "string" + }, + "quotaInfo": { + "$ref": "QuotaInfo", + "description": "Quota information for the check request associated with this response.\n" + } + }, + "id": "CheckResponse", + "description": "Response message for the Check method.", + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + } + }, + "id": "Status" + }, + "ReportRequest": { + "description": "Request message for the Report method.", + "type": "object", + "properties": { + "serviceConfigId": { + "description": "Specifies which version of service config should be used to process the\nrequest.\n\nIf unspecified or no matching version can be found, the\nlatest one will be used.", + "type": "string" + }, + "operations": { + "description": "Operations to be reported.\n\nTypically the service should report one operation per request.\nPutting multiple operations into a single request is allowed, but should\nbe used only when multiple operations are natually available at the time\nof the report.\n\nIf multiple operations are in a single request, the total request size\nshould be no larger than 1MB. See ReportResponse.report_errors for\npartial failure behavior.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "id": "ReportRequest" + }, + "AuditLog": { + "properties": { + "response": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The operation response. This may not include all response elements,\nsuch as those that are too large, privacy-sensitive, or duplicated\nelsewhere in the log record.\nIt should never include user-generated data, such as file contents.\nWhen the JSON object represented here has a proto equivalent, the proto\nname will be indicated in the `@type` property.", + "type": "object" + }, + "serviceName": { + "description": "The name of the API service performing the operation. For example,\n`\"datastore.googleapis.com\"`.", + "type": "string" + }, + "methodName": { + "description": "The name of the service method or operation.\nFor API calls, this should be the name of the API method.\nFor example,\n\n \"google.datastore.v1.Datastore.RunQuery\"\n \"google.logging.v1.LoggingService.DeleteLog\"", + "type": "string" + }, + "authorizationInfo": { + "description": "Authorization information. If there are multiple\nresources or permissions involved, then there is\none AuthorizationInfo element for each {resource, permission} tuple.", + "items": { + "$ref": "AuthorizationInfo" + }, + "type": "array" + }, + "resourceName": { + "description": "The resource or collection that is the target of the operation.\nThe name is a scheme-less URI, not including the API service name.\nFor example:\n\n \"shelves/SHELF_ID/books\"\n \"shelves/SHELF_ID/books/BOOK_ID\"", + "type": "string" + }, + "request": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The operation request. This may not include all request parameters,\nsuch as those that are too large, privacy-sensitive, or duplicated\nelsewhere in the log record.\nIt should never include user-generated data, such as file contents.\nWhen the JSON object represented here has a proto equivalent, the proto\nname will be indicated in the `@type` property.", + "type": "object" + }, + "serviceData": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Other service-specific data about the request, response, and other\nactivities.", + "type": "object" + }, + "requestMetadata": { + "description": "Metadata about the operation.", + "$ref": "RequestMetadata" + }, + "numResponseItems": { + "format": "int64", + "description": "The number of items returned from a List or Query API method,\nif applicable.", + "type": "string" + }, + "authenticationInfo": { + "description": "Authentication information.", + "$ref": "AuthenticationInfo" + }, + "status": { + "description": "The status of the overall operation.", + "$ref": "Status" + } + }, + "id": "AuditLog", + "description": "Common audit log format for Google Cloud Platform API operations.\n\n", + "type": "object" + }, + "LogEntry": { + "description": "An individual log entry.", + "type": "object", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "A set of user-defined (key, value) data that provides additional\ninformation about the log entry.", + "type": "object" + }, + "severity": { + "enumDescriptions": [ + "(0) The log entry has no assigned severity level.", + "(100) Debug or trace information.", + "(200) Routine information, such as ongoing status or performance.", + "(300) Normal but significant events, such as start up, shut down, or\na configuration change.", + "(400) Warning events might cause problems.", + "(500) Error events are likely to cause problems.", + "(600) Critical events cause more severe problems or outages.", + "(700) A person must take an action immediately.", + "(800) One or more systems are unusable." + ], + "enum": [ + "DEFAULT", + "DEBUG", + "INFO", + "NOTICE", + "WARNING", + "ERROR", + "CRITICAL", + "ALERT", + "EMERGENCY" + ], + "description": "The severity of the log entry. The default value is\n`LogSeverity.DEFAULT`.", + "type": "string" + }, + "name": { + "description": "Required. The log to which this log entry belongs. Examples: `\"syslog\"`,\n`\"book_log\"`.", + "type": "string" + }, + "insertId": { + "description": "A unique ID for the log entry used for deduplication. If omitted,\nthe implementation will generate one based on operation_id.", + "type": "string" + }, + "structPayload": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The log entry payload, represented as a structure that\nis expressed as a JSON object.", + "type": "object" + }, + "textPayload": { + "description": "The log entry payload, represented as a Unicode string (UTF-8).", + "type": "string" + }, + "protoPayload": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The log entry payload, represented as a protocol buffer that is\nexpressed as a JSON object. The only accepted type currently is\nAuditLog.", + "type": "object" + }, + "timestamp": { + "format": "google-datetime", + "description": "The time the event described by the log entry occurred. If\nomitted, defaults to operation start time.", + "type": "string" + } + }, + "id": "LogEntry" + }, + "MetricValue": { + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "The labels describing the metric value.\nSee comments on google.api.servicecontrol.v1.Operation.labels for\nthe overriding relationship.", + "type": "object" + }, + "stringValue": { + "description": "A text string value.", + "type": "string" + }, + "doubleValue": { + "format": "double", + "description": "A double precision floating point value.", + "type": "number" + }, + "int64Value": { + "format": "int64", + "description": "A signed 64-bit integer value.", + "type": "string" + }, + "distributionValue": { + "description": "A distribution value.", + "$ref": "Distribution" + }, + "boolValue": { + "description": "A boolean value.", + "type": "boolean" + }, + "endTime": { + "format": "google-datetime", + "description": "The end of the time period over which this metric value's measurement\napplies.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "The start of the time period over which this metric value's measurement\napplies. The time period has different semantics for different metric\ntypes (cumulative, delta, and gauge). See the metric definition\ndocumentation in the service configuration for details.", + "type": "string" + }, + "moneyValue": { + "$ref": "Money", + "description": "A money value." + } + }, + "id": "MetricValue", + "description": "Represents a single metric value.", + "type": "object" + }, + "EndReconciliationResponse": { + "type": "object", + "properties": { + "quotaMetrics": { + "description": "Metric values as tracked by One Platform before the adjustment was made.\nThe following metrics will be included:\n\n1. Per quota metric total usage will be specified using the following gauge\nmetric:\n \"serviceruntime.googleapis.com/allocation/consumer/quota_used_count\"\n\n2. Value for each quota limit associated with the metrics will be specified\nusing the following gauge metric:\n \"serviceruntime.googleapis.com/quota/limit\"\n\n3. Delta value of the usage after the reconciliation for limits associated\nwith the metrics will be specified using the following metric:\n \"serviceruntime.googleapis.com/allocation/reconciliation_delta\"\nThe delta value is defined as:\n new_usage_from_client - existing_value_in_spanner.\nThis metric is not defined in serviceruntime.yaml or in Cloud Monarch.\nThis metric is meant for callers' use only. Since this metric is not\ndefined in the monitoring backend, reporting on this metric will result in\nan error.", + "items": { + "$ref": "MetricValueSet" + }, + "type": "array" + }, + "reconciliationErrors": { + "description": "Indicates the decision of the reconciliation end.", + "items": { + "$ref": "QuotaError" + }, + "type": "array" + }, + "operationId": { + "description": "The same operation_id value used in the EndReconciliationRequest. Used for\nlogging and diagnostics purposes.", + "type": "string" + }, + "serviceConfigId": { + "description": "ID of the actual config used to process the request.", + "type": "string" + } + }, + "id": "EndReconciliationResponse" + }, + "Money": { + "properties": { + "currencyCode": { + "description": "The 3-letter currency code defined in ISO 4217.", + "type": "string" + }, + "nanos": { + "format": "int32", + "description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", + "type": "integer" + }, + "units": { + "format": "int64", + "description": "The whole units of the amount.\nFor example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", + "type": "string" + } + }, + "id": "Money", + "description": "Represents an amount of money with its currency type.", + "type": "object" + }, + "Distribution": { + "properties": { + "count": { + "format": "int64", + "description": "The total number of samples in the distribution. Must be \u003e= 0.", + "type": "string" + }, + "mean": { + "format": "double", + "description": "The arithmetic mean of the samples in the distribution. If `count` is\nzero then this field must be zero.", + "type": "number" + }, + "bucketCounts": { + "description": "The number of samples in each histogram bucket. `bucket_counts` are\noptional. If present, they must sum to the `count` value.\n\nThe buckets are defined below in `bucket_option`. There are N buckets.\n`bucket_counts[0]` is the number of samples in the underflow bucket.\n`bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples\nin each of the finite buckets. And `bucket_counts[N] is the number\nof samples in the overflow bucket. See the comments of `bucket_option`\nbelow for more details.\n\nAny suffix of trailing zeros may be omitted.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "explicitBuckets": { + "description": "Buckets with arbitrary user-provided width.", + "$ref": "ExplicitBuckets" + }, + "maximum": { + "format": "double", + "description": "The maximum of the population of values. Ignored if `count` is zero.", + "type": "number" + }, + "sumOfSquaredDeviation": { + "format": "double", + "description": "The sum of squared deviations from the mean:\n Sum[i=1..count]((x_i - mean)^2)\nwhere each x_i is a sample values. If `count` is zero then this field\nmust be zero, otherwise validation of the request fails.", + "type": "number" + }, + "exponentialBuckets": { + "description": "Buckets with exponentially growing width.", + "$ref": "ExponentialBuckets" + }, + "linearBuckets": { + "description": "Buckets with constant width.", + "$ref": "LinearBuckets" + }, + "minimum": { + "format": "double", + "description": "The minimum of the population of values. Ignored if `count` is zero.", + "type": "number" + } + }, + "id": "Distribution", + "description": "Distribution represents a frequency distribution of double-valued sample\npoints. It contains the size of the population of sample points plus\nadditional optional information:\n\n - the arithmetic mean of the samples\n - the minimum and maximum of the samples\n - the sum-squared-deviation of the samples, used to compute variance\n - a histogram of the values of the sample points", + "type": "object" + }, + "ExplicitBuckets": { + "properties": { + "bounds": { + "description": "'bound' is a list of strictly increasing boundaries between\nbuckets. Note that a list of length N-1 defines N buckets because\nof fenceposting. See comments on `bucket_options` for details.\n\nThe i'th finite bucket covers the interval\n [bound[i-1], bound[i])\nwhere i ranges from 1 to bound_size() - 1. Note that there are no\nfinite buckets at all if 'bound' only contains a single element; in\nthat special case the single bound defines the boundary between the\nunderflow and overflow buckets.\n\nbucket number lower bound upper bound\n i == 0 (underflow) -inf bound[i]\n 0 \u003c i \u003c bound_size() bound[i-1] bound[i]\n i == bound_size() (overflow) bound[i-1] +inf", + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + } + }, + "id": "ExplicitBuckets", + "description": "Describing buckets with arbitrary user-provided width.", + "type": "object" + }, + "ExponentialBuckets": { + "properties": { + "growthFactor": { + "format": "double", + "description": "The i'th exponential bucket covers the interval\n [scale * growth_factor^(i-1), scale * growth_factor^i)\nwhere i ranges from 1 to num_finite_buckets inclusive.\nMust be larger than 1.0.", + "type": "number" + }, + "scale": { + "format": "double", + "description": "The i'th exponential bucket covers the interval\n [scale * growth_factor^(i-1), scale * growth_factor^i)\nwhere i ranges from 1 to num_finite_buckets inclusive.\nMust be \u003e 0.", + "type": "number" + }, + "numFiniteBuckets": { + "format": "int32", + "description": "The number of finite buckets. With the underflow and overflow buckets,\nthe total number of buckets is `num_finite_buckets` + 2.\nSee comments on `bucket_options` for details.", + "type": "integer" + } + }, + "id": "ExponentialBuckets", + "description": "Describing buckets with exponentially growing width.", + "type": "object" + }, + "AuthorizationInfo": { + "properties": { + "granted": { + "description": "Whether or not authorization for `resource` and `permission`\nwas granted.", + "type": "boolean" + }, + "permission": { + "description": "The required IAM permission.", + "type": "string" + }, + "resource": { + "description": "The resource being accessed, as a REST-style string. For example:\n\n bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID", + "type": "string" + } + }, + "id": "AuthorizationInfo", + "description": "Authorization information for the operation.", + "type": "object" + }, + "StartReconciliationResponse": { + "type": "object", + "properties": { "reconciliationErrors": { "description": "Indicates the decision of the reconciliation start.", "items": { @@ -25,29 +1068,20 @@ "serviceConfigId": { "description": "ID of the actual config used to process the request.", "type": "string" + }, + "quotaMetrics": { + "description": "Metric values as tracked by One Platform before the start of\nreconciliation. The following metrics will be included:\n\n1. Per quota metric total usage will be specified using the following gauge\nmetric:\n \"serviceruntime.googleapis.com/allocation/consumer/quota_used_count\"\n\n2. Value for each quota limit associated with the metrics will be specified\nusing the following gauge metric:\n \"serviceruntime.googleapis.com/quota/limit\"", + "items": { + "$ref": "MetricValueSet" + }, + "type": "array" } }, - "id": "StartReconciliationResponse", - "type": "object" + "id": "StartReconciliationResponse" }, "QuotaProperties": { - "description": "Represents the properties needed for quota operations.", - "type": "object", "properties": { - "limitByIds": { - "additionalProperties": { - "type": "string" - }, - "description": "LimitType IDs that should be used for checking quota. Key in this map\nshould be a valid LimitType string, and the value is the ID to be used. For\nexample, an entry \u003cUSER, 123\u003e will cause all user quota limits to use 123\nas the user ID. See google/api/quota.proto for the definition of LimitType.\nCLIENT_PROJECT: Not supported.\nUSER: Value of this entry will be used for enforcing user-level quota\n limits. If none specified, caller IP passed in the\n servicecontrol.googleapis.com/caller_ip label will be used instead.\n If the server cannot resolve a value for this LimitType, an error\n will be thrown. No validation will be performed on this ID.\nDeprecated: use servicecontrol.googleapis.com/user label to send user ID.", - "type": "object" - }, "quotaMode": { - "enumDescriptions": [ - "Decreases available quota by the cost specified for the operation.\nIf cost is higher than available quota, operation fails and returns\nerror.", - "Decreases available quota by the cost specified for the operation.\nIf cost is higher than available quota, operation does not fail and\navailable quota goes down to zero but it returns error.", - "Does not change any available quota. Only checks if there is enough\nquota.\nNo lock is placed on the checked tokens neither.", - "Increases available quota by the operation cost specified for the\noperation." - ], "enum": [ "ACQUIRE", "ACQUIRE_BEST_EFFORT", @@ -55,14 +1089,27 @@ "RELEASE" ], "description": "Quota mode for this operation.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Decreases available quota by the cost specified for the operation.\nIf cost is higher than available quota, operation fails and returns\nerror.", + "Decreases available quota by the cost specified for the operation.\nIf cost is higher than available quota, operation does not fail and\navailable quota goes down to zero but it returns error.", + "Does not change any available quota. Only checks if there is enough\nquota.\nNo lock is placed on the checked tokens neither.", + "Increases available quota by the operation cost specified for the\noperation." + ] + }, + "limitByIds": { + "additionalProperties": { + "type": "string" + }, + "description": "LimitType IDs that should be used for checking quota. Key in this map\nshould be a valid LimitType string, and the value is the ID to be used. For\nexample, an entry \u003cUSER, 123\u003e will cause all user quota limits to use 123\nas the user ID. See google/api/quota.proto for the definition of LimitType.\nCLIENT_PROJECT: Not supported.\nUSER: Value of this entry will be used for enforcing user-level quota\n limits. If none specified, caller IP passed in the\n servicecontrol.googleapis.com/caller_ip label will be used instead.\n If the server cannot resolve a value for this LimitType, an error\n will be thrown. No validation will be performed on this ID.\nDeprecated: use servicecontrol.googleapis.com/user label to send user ID.", + "type": "object" } }, - "id": "QuotaProperties" + "id": "QuotaProperties", + "description": "Represents the properties needed for quota operations.", + "type": "object" }, "LinearBuckets": { - "description": "Describing buckets with constant width.", - "type": "object", "properties": { "numFiniteBuckets": { "format": "int32", @@ -80,27 +1127,44 @@ "type": "number" } }, - "id": "LinearBuckets" + "id": "LinearBuckets", + "description": "Describing buckets with constant width.", + "type": "object" }, "AuthenticationInfo": { - "description": "Authentication information for the operation.", - "type": "object", "properties": { "principalEmail": { - "description": "The email address of the authenticated user making the request.", + "description": "The email address of the authenticated user (or service account on behalf\nof third party principal) making the request. For privacy reasons, the\nprincipal email address is redacted for all read-only operations that fail\nwith a \"permission denied\" error.", "type": "string" }, "authoritySelector": { "description": "The authority selector specified by the requestor, if any.\nIt is not guaranteed that the principal was allowed to use this authority.", "type": "string" + }, + "thirdPartyPrincipal": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The third party identification (if any) of the authenticated user making\nthe request.\nWhen the JSON object represented here has a proto equivalent, the proto\nname will be indicated in the `@type` property.", + "type": "object" } }, - "id": "AuthenticationInfo" + "id": "AuthenticationInfo", + "description": "Authentication information for the operation.", + "type": "object" }, "AllocateQuotaResponse": { "description": "Response message for the AllocateQuota method.", "type": "object", "properties": { + "allocateErrors": { + "description": "Indicates the decision of the allocate.", + "items": { + "$ref": "QuotaError" + }, + "type": "array" + }, "quotaMetrics": { "description": "Quota metrics to indicate the result of allocation. Depending on the\nrequest, one or more of the following metrics will be included:\n\n1. For rate quota, per quota group or per quota metric incremental usage\nwill be specified using the following delta metric:\n \"serviceruntime.googleapis.com/api/consumer/quota_used_count\"\n\n2. For allocation quota, per quota metric total usage will be specified\nusing the following gauge metric:\n \"serviceruntime.googleapis.com/allocation/consumer/quota_used_count\"\n\n3. For both rate quota and allocation quota, the quota limit reached\ncondition will be specified using the following boolean metric:\n \"serviceruntime.googleapis.com/quota/exceeded\"\n\n4. For allocation quota, value for each quota limit associated with\nthe metrics will be specified using the following gauge metric:\n \"serviceruntime.googleapis.com/quota/limit\"", "items": { @@ -115,20 +1179,11 @@ "serviceConfigId": { "description": "ID of the actual config used to process the request.", "type": "string" - }, - "allocateErrors": { - "items": { - "$ref": "QuotaError" - }, - "type": "array", - "description": "Indicates the decision of the allocate." } }, "id": "AllocateQuotaResponse" }, "ReleaseQuotaRequest": { - "description": "Request message for the ReleaseQuota method.", - "type": "object", "properties": { "serviceConfigId": { "description": "Specifies which version of service configuration should be used to process\nthe request. If unspecified or no matching version can be found, the latest\none will be used.", @@ -139,25 +1194,11 @@ "description": "Operation that describes the quota release." } }, - "id": "ReleaseQuotaRequest" - }, - "RequestMetadata": { - "id": "RequestMetadata", - "description": "Metadata about the request.", - "type": "object", - "properties": { - "callerIp": { - "type": "string", - "description": "The IP address of the caller.\nFor caller from internet, this will be public IPv4 or IPv6 address.\nFor caller from GCE VM with external IP address, this will be the VM's\nexternal IP address. For caller from GCE VM without external IP address, if\nthe VM is in the same GCP organization (or project) as the accessed\nresource, `caller_ip` will be the GCE VM's internal IPv4 address, otherwise\nit will be redacted to \"gce-internal-ip\".\nSee https://cloud.google.com/compute/docs/vpc/ for more information." - }, - "callerSuppliedUserAgent": { - "description": "The user agent of the caller.\nThis information is not authenticated and should be treated accordingly.\nFor example:\n\n+ `google-api-python-client/1.4.0`:\n The request was made by the Google API client for Python.\n+ `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:\n The request was made by the Google Cloud SDK CLI (gcloud).\n+ `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project`:\n The request was made from the `my-project` App Engine app.\nNOLINT", - "type": "string" - } - } + "id": "ReleaseQuotaRequest", + "description": "Request message for the ReleaseQuota method.", + "type": "object" }, "QuotaError": { - "type": "object", "properties": { "description": { "description": "Free-form text that provides details on the cause of the error.", @@ -204,56 +1245,47 @@ ] } }, - "id": "QuotaError" + "id": "QuotaError", + "type": "object" }, - "CheckInfo": { + "RequestMetadata": { + "description": "Metadata about the request.", "type": "object", "properties": { + "callerIp": { + "description": "The IP address of the caller.\nFor caller from internet, this will be public IPv4 or IPv6 address.\nFor caller from GCE VM with external IP address, this will be the VM's\nexternal IP address. For caller from GCE VM without external IP address, if\nthe VM is in the same GCP organization (or project) as the accessed\nresource, `caller_ip` will be the GCE VM's internal IPv4 address, otherwise\nit will be redacted to \"gce-internal-ip\".\nSee https://cloud.google.com/compute/docs/vpc/ for more information.", + "type": "string" + }, + "callerSuppliedUserAgent": { + "description": "The user agent of the caller.\nThis information is not authenticated and should be treated accordingly.\nFor example:\n\n+ `google-api-python-client/1.4.0`:\n The request was made by the Google API client for Python.\n+ `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:\n The request was made by the Google Cloud SDK CLI (gcloud).\n+ `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project`:\n The request was made from the `my-project` App Engine app.\nNOLINT", + "type": "string" + } + }, + "id": "RequestMetadata" + }, + "CheckInfo": { + "properties": { + "consumerInfo": { + "$ref": "ConsumerInfo", + "description": "Consumer info of this check." + }, "unusedArguments": { "description": "A list of fields and label keys that are ignored by the server.\nThe client doesn't need to send them for following requests to improve\nperformance and allow better aggregation.", "items": { "type": "string" }, "type": "array" - }, - "consumerInfo": { - "$ref": "ConsumerInfo", - "description": "Consumer info of this check." } }, - "id": "CheckInfo" - }, - "ReleaseQuotaResponse": { - "description": "Response message for the ReleaseQuota method.", - "type": "object", - "properties": { - "quotaMetrics": { - "description": "Quota metrics to indicate the result of release. Depending on the\nrequest, one or more of the following metrics will be included:\n\n1. For rate quota, per quota group or per quota metric released amount\nwill be specified using the following delta metric:\n \"serviceruntime.googleapis.com/api/consumer/quota_refund_count\"\n\n2. For allocation quota, per quota metric total usage will be specified\nusing the following gauge metric:\n \"serviceruntime.googleapis.com/allocation/consumer/quota_used_count\"\n\n3. For allocation quota, value for each quota limit associated with\nthe metrics will be specified using the following gauge metric:\n \"serviceruntime.googleapis.com/quota/limit\"", - "items": { - "$ref": "MetricValueSet" - }, - "type": "array" - }, - "operationId": { - "type": "string", - "description": "The same operation_id value used in the ReleaseQuotaRequest. Used for\nlogging and diagnostics purposes." - }, - "serviceConfigId": { - "description": "ID of the actual config used to process the request.", - "type": "string" - }, - "releaseErrors": { - "description": "Indicates the decision of the release.", - "items": { - "$ref": "QuotaError" - }, - "type": "array" - } - }, - "id": "ReleaseQuotaResponse" + "id": "CheckInfo", + "type": "object" }, "AllocateQuotaRequest": { "properties": { + "allocateOperation": { + "description": "Operation that describes the quota allocation.", + "$ref": "QuotaOperation" + }, "allocationMode": { "enumDescriptions": [ "", @@ -273,819 +1305,80 @@ "serviceConfigId": { "description": "Specifies which version of service configuration should be used to process\nthe request. If unspecified or no matching version can be found, the latest\none will be used.", "type": "string" - }, - "allocateOperation": { - "$ref": "QuotaOperation", - "description": "Operation that describes the quota allocation." } }, "id": "AllocateQuotaRequest", "description": "Request message for the AllocateQuota method.", "type": "object" }, + "ReleaseQuotaResponse": { + "description": "Response message for the ReleaseQuota method.", + "type": "object", + "properties": { + "operationId": { + "description": "The same operation_id value used in the ReleaseQuotaRequest. Used for\nlogging and diagnostics purposes.", + "type": "string" + }, + "serviceConfigId": { + "description": "ID of the actual config used to process the request.", + "type": "string" + }, + "releaseErrors": { + "description": "Indicates the decision of the release.", + "items": { + "$ref": "QuotaError" + }, + "type": "array" + }, + "quotaMetrics": { + "description": "Quota metrics to indicate the result of release. Depending on the\nrequest, one or more of the following metrics will be included:\n\n1. For rate quota, per quota group or per quota metric released amount\nwill be specified using the following delta metric:\n \"serviceruntime.googleapis.com/api/consumer/quota_refund_count\"\n\n2. For allocation quota, per quota metric total usage will be specified\nusing the following gauge metric:\n \"serviceruntime.googleapis.com/allocation/consumer/quota_used_count\"\n\n3. For allocation quota, value for each quota limit associated with\nthe metrics will be specified using the following gauge metric:\n \"serviceruntime.googleapis.com/quota/limit\"", + "items": { + "$ref": "MetricValueSet" + }, + "type": "array" + } + }, + "id": "ReleaseQuotaResponse" + }, "MetricValueSet": { "description": "Represents a set of metric values in the same metric.\nEach metric value in the set should have a unique combination of start time,\nend time, and label values.", "type": "object", "properties": { + "metricName": { + "description": "The metric name defined in the service configuration.", + "type": "string" + }, "metricValues": { "description": "The values in this metric.", "items": { "$ref": "MetricValue" }, "type": "array" - }, - "metricName": { - "description": "The metric name defined in the service configuration.", - "type": "string" } }, "id": "MetricValueSet" }, "ReportError": { - "id": "ReportError", - "description": "Represents the processing error of one `Operation` in the request.", - "type": "object", "properties": { "status": { - "description": "Details of the error when processing the `Operation`.", + "description": "Details of the error when processing the Operation.", "$ref": "Status" }, "operationId": { "description": "The Operation.operation_id value from the request.", "type": "string" } - } - }, - "CheckError": { - "description": "Defines the errors to be returned in\ngoogle.api.servicecontrol.v1.CheckResponse.check_errors.", - "type": "object", - "properties": { - "detail": { - "description": "Free-form text providing details on the error cause of the error.", - "type": "string" - }, - "code": { - "description": "The error code.", - "type": "string", - "enumDescriptions": [ - "This is never used in `CheckResponse`.", - "The consumer's project id was not found.\nSame as google.rpc.Code.NOT_FOUND.", - "The consumer doesn't have access to the specified resource.\nSame as google.rpc.Code.PERMISSION_DENIED.", - "Quota check failed. Same as google.rpc.Code.RESOURCE_EXHAUSTED.", - "Budget check failed.", - "The consumer's request has been flagged as a DoS attack.", - "The consumer's request should be rejected in order to protect the service\nfrom being overloaded.", - "The consumer has been flagged as an abuser.", - "The consumer hasn't activated the service.", - "The consumer cannot access the service due to visibility configuration.", - "The consumer cannot access the service because billing is disabled.", - "The consumer's project has been marked as deleted (soft deletion).", - "The consumer's project number or id does not represent a valid project.", - "The IP address of the consumer is invalid for the specific consumer\nproject.", - "The referer address of the consumer request is invalid for the specific\nconsumer project.", - "The client application of the consumer request is invalid for the\nspecific consumer project.", - "The API targeted by this request is invalid for the specified consumer\nproject.", - "The consumer's API key is invalid.", - "The consumer's API Key has expired.", - "The consumer's API Key was not found in config record.", - "The consumer's spatula header is invalid.", - "The consumer's LOAS role is invalid.", - "The consumer's LOAS role has no associated project.", - "The consumer's LOAS project is not `ACTIVE` in LoquatV2.", - "Request is not allowed as per security policies defined in Org Policy.", - "The backend server for looking up project id/number is unavailable.", - "The backend server for checking service status is unavailable.", - "The backend server for checking billing status is unavailable.", - "The backend server for checking quota limits is unavailable.", - "The Spanner for looking up LOAS project is unavailable.", - "Cloud Resource Manager backend server is unavailable.", - "Backend server for evaluating security policy is unavailable." - ], - "enum": [ - "ERROR_CODE_UNSPECIFIED", - "NOT_FOUND", - "PERMISSION_DENIED", - "RESOURCE_EXHAUSTED", - "BUDGET_EXCEEDED", - "DENIAL_OF_SERVICE_DETECTED", - "LOAD_SHEDDING", - "ABUSER_DETECTED", - "SERVICE_NOT_ACTIVATED", - "VISIBILITY_DENIED", - "BILLING_DISABLED", - "PROJECT_DELETED", - "PROJECT_INVALID", - "IP_ADDRESS_BLOCKED", - "REFERER_BLOCKED", - "CLIENT_APP_BLOCKED", - "API_TARGET_BLOCKED", - "API_KEY_INVALID", - "API_KEY_EXPIRED", - "API_KEY_NOT_FOUND", - "SPATULA_HEADER_INVALID", - "LOAS_ROLE_INVALID", - "NO_LOAS_PROJECT", - "LOAS_PROJECT_DISABLED", - "SECURITY_POLICY_VIOLATED", - "NAMESPACE_LOOKUP_UNAVAILABLE", - "SERVICE_STATUS_UNAVAILABLE", - "BILLING_STATUS_UNAVAILABLE", - "QUOTA_CHECK_UNAVAILABLE", - "LOAS_PROJECT_LOOKUP_UNAVAILABLE", - "CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE", - "SECURITY_POLICY_BACKEND_UNAVAILABLE" - ] - } }, - "id": "CheckError" - }, - "StartReconciliationRequest": { - "type": "object", - "properties": { - "reconciliationOperation": { - "$ref": "QuotaOperation", - "description": "Operation that describes the quota reconciliation." - }, - "serviceConfigId": { - "description": "Specifies which version of service configuration should be used to process\nthe request. If unspecified or no matching version can be found, the latest\none will be used.", - "type": "string" - } - }, - "id": "StartReconciliationRequest" - }, - "QuotaInfo": { - "properties": { - "quotaMetrics": { - "description": "Quota metrics to indicate the usage. Depending on the check request, one or\nmore of the following metrics will be included:\n\n1. For rate quota, per quota group or per quota metric incremental usage\nwill be specified using the following delta metric:\n \"serviceruntime.googleapis.com/api/consumer/quota_used_count\"\n\n2. For allocation quota, per quota metric total usage will be specified\nusing the following gauge metric:\n \"serviceruntime.googleapis.com/allocation/consumer/quota_used_count\"\n\n3. For both rate quota and allocation quota, the quota limit reached\ncondition will be specified using the following boolean metric:\n \"serviceruntime.googleapis.com/quota/exceeded\"", - "items": { - "$ref": "MetricValueSet" - }, - "type": "array" - }, - "limitExceeded": { - "description": "Quota Metrics that have exceeded quota limits.\nFor QuotaGroup-based quota, this is QuotaGroup.name\nFor QuotaLimit-based quota, this is QuotaLimit.name\nSee: google.api.Quota\nDeprecated: Use quota_metrics to get per quota group limit exceeded status.", - "items": { - "type": "string" - }, - "type": "array" - }, - "quotaConsumed": { - "additionalProperties": { - "format": "int32", - "type": "integer" - }, - "description": "Map of quota group name to the actual number of tokens consumed. If the\nquota check was not successful, then this will not be populated due to no\nquota consumption.\nDeprecated: Use quota_metrics to get per quota group usage.", - "type": "object" - } - }, - "id": "QuotaInfo", - "description": "Contains the quota information for a quota check response.", + "id": "ReportError", + "description": "Represents the processing error of one Operation in the request.", "type": "object" - }, - "ConsumerInfo": { - "type": "object", - "properties": { - "projectNumber": { - "format": "int64", - "description": "The Google cloud project number, e.g. 1234567890. A value of 0 indicates\nno project number is found.", - "type": "string" - } - }, - "id": "ConsumerInfo", - "description": "`ConsumerInfo` provides information about the consumer project." - }, - "CheckRequest": { - "type": "object", - "properties": { - "serviceConfigId": { - "description": "Specifies which version of service configuration should be used to process\nthe request.\n\nIf unspecified or no matching version can be found, the\nlatest one will be used.", - "type": "string" - }, - "skipActivationCheck": { - "description": "Indicates if service activation check should be skipped for this request.\nDefault behavior is to perform the check and apply relevant quota.", - "type": "boolean" - }, - "requestProjectSettings": { - "description": "Requests the project settings to be returned as part of the check response.", - "type": "boolean" - }, - "operation": { - "description": "The operation to be checked.", - "$ref": "Operation" - } - }, - "id": "CheckRequest", - "description": "Request message for the Check method." - }, - "QuotaOperation": { - "properties": { - "quotaMetrics": { - "description": "Represents information about this operation. Each MetricValueSet\ncorresponds to a metric defined in the service configuration.\nThe data type used in the MetricValueSet must agree with\nthe data type specified in the metric definition.\n\nWithin a single operation, it is not allowed to have more than one\nMetricValue instances that have the same metric names and identical\nlabel value combinations. If a request has such duplicated MetricValue\ninstances, the entire request is rejected with\nan invalid argument error.", - "items": { - "$ref": "MetricValueSet" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels describing the operation.", - "type": "object" - }, - "consumerId": { - "description": "Identity of the consumer for whom this quota operation is being performed.\n\nThis can be in one of the following formats:\n project:\u003cproject_id\u003e,\n project_number:\u003cproject_number\u003e,\n api_key:\u003capi_key\u003e.", - "type": "string" - }, - "operationId": { - "description": "Identity of the operation. This is expected to be unique within the scope\nof the service that generated the operation, and guarantees idempotency in\ncase of retries.\n\nUUID version 4 is recommended, though not required. In scenarios where an\noperation is computed from existing information and an idempotent id is\ndesirable for deduplication purpose, UUID version 5 is recommended. See\nRFC 4122 for details.", - "type": "string" - }, - "quotaMode": { - "enumDescriptions": [ - "", - "For AllocateQuota request, allocates quota for the amount specified in\nthe service configuration or specified using the quota metrics. If the\namount is higher than the available quota, allocation error will be\nreturned and no quota will be allocated.\nFor ReleaseQuota request, this mode is supported only for precise quota\nlimits. In this case, this operation releases quota for the amount\nspecified in the service configuration or specified using the quota\nmetrics. If the release can make used quota negative, release error\nwill be returned and no quota will be released.", - "For AllocateQuota request, this mode is supported only for imprecise\nquota limits. In this case, the operation allocates quota for the amount\nspecified in the service configuration or specified using the quota\nmetrics. If the amount is higher than the available quota, request does\nnot fail but all available quota will be allocated.\nFor ReleaseQuota request, this mode is supported for both precise quota\nlimits and imprecise quota limits. In this case, this operation releases\nquota for the amount specified in the service configuration or specified\nusing the quota metrics. If the release can make used quota\nnegative, request does not fail but only the used quota will be\nreleased. After the ReleaseQuota request completes, the used quota\nwill be 0, and never goes to negative.", - "For AllocateQuota request, only checks if there is enough quota\navailable and does not change the available quota. No lock is placed on\nthe available quota either. Not supported for ReleaseQuota request." - ], - "enum": [ - "UNSPECIFIED", - "NORMAL", - "BEST_EFFORT", - "CHECK_ONLY" - ], - "description": "Quota mode for this operation.", - "type": "string" - }, - "methodName": { - "description": "Fully qualified name of the API method for which this quota operation is\nrequested. This name is used for matching quota rules or metric rules and\nbilling status rules defined in service configuration. This field is not\nrequired if the quota operation is performed on non-API resources.\n\nExample of an RPC method name:\n google.example.library.v1.LibraryService.CreateShelf", - "type": "string" - } - }, - "id": "QuotaOperation", - "description": "Represents information regarding a quota operation.", - "type": "object" - }, - "EndReconciliationRequest": { - "id": "EndReconciliationRequest", - "type": "object", - "properties": { - "reconciliationOperation": { - "$ref": "QuotaOperation", - "description": "Operation that describes the quota reconciliation." - }, - "serviceConfigId": { - "type": "string", - "description": "Specifies which version of service configuration should be used to process\nthe request. If unspecified or no matching version can be found, the latest\none will be used." - } - } - }, - "ReportInfo": { - "id": "ReportInfo", - "type": "object", - "properties": { - "operationId": { - "description": "The Operation.operation_id value from the request.", - "type": "string" - }, - "quotaInfo": { - "$ref": "QuotaInfo", - "description": "Quota usage info when processing the `Operation`." - } - } - }, - "ReportResponse": { - "description": "Response message for the Report method.", - "type": "object", - "properties": { - "reportInfos": { - "description": "Quota usage for each quota release `Operation` request.\n\nFully or partially failed quota release request may or may not be present\nin `report_quota_info`. For example, a failed quota release request will\nhave the current quota usage info when precise quota library returns the\ninfo. A deadline exceeded quota request will not have quota usage info.\n\nIf there is no quota release request, report_quota_info will be empty.\n", - "items": { - "$ref": "ReportInfo" - }, - "type": "array" - }, - "serviceConfigId": { - "type": "string", - "description": "The actual config id used to process the request." - }, - "reportErrors": { - "description": "Partial failures, one for each `Operation` in the request that failed\nprocessing. There are three possible combinations of the RPC status:\n\n1. The combination of a successful RPC status and an empty `report_errors`\n list indicates a complete success where all `Operations` in the\n request are processed successfully.\n2. The combination of a successful RPC status and a non-empty\n `report_errors` list indicates a partial success where some\n `Operations` in the request succeeded. Each\n `Operation` that failed processing has a corresponding item\n in this list.\n3. A failed RPC status indicates a general non-deterministic failure.\n When this happens, it's impossible to know which of the\n 'Operations' in the request succeeded or failed.", - "items": { - "$ref": "ReportError" - }, - "type": "array" - } - }, - "id": "ReportResponse" - }, - "Operation": { - "properties": { - "userLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "User defined labels for the resource that this operation is associated\nwith.", - "type": "object" - }, - "metricValueSets": { - "description": "Represents information about this operation. Each MetricValueSet\ncorresponds to a metric defined in the service configuration.\nThe data type used in the MetricValueSet must agree with\nthe data type specified in the metric definition.\n\nWithin a single operation, it is not allowed to have more than one\nMetricValue instances that have the same metric names and identical\nlabel value combinations. If a request has such duplicated MetricValue\ninstances, the entire request is rejected with\nan invalid argument error.", - "items": { - "$ref": "MetricValueSet" - }, - "type": "array" - }, - "quotaProperties": { - "$ref": "QuotaProperties", - "description": "Represents the properties needed for quota check. Applicable only if this\noperation is for a quota check request." - }, - "consumerId": { - "description": "Identity of the consumer who is using the service.\nThis field should be filled in for the operations initiated by a\nconsumer, but not for service-initiated operations that are\nnot related to a specific consumer.\n\nThis can be in one of the following formats:\n project:\u003cproject_id\u003e,\n project_number:\u003cproject_number\u003e,\n api_key:\u003capi_key\u003e.", - "type": "string" - }, - "operationId": { - "type": "string", - "description": "Identity of the operation. This must be unique within the scope of the\nservice that generated the operation. If the service calls\nCheck() and Report() on the same operation, the two calls should carry\nthe same id.\n\nUUID version 4 is recommended, though not required.\nIn scenarios where an operation is computed from existing information\nand an idempotent id is desirable for deduplication purpose, UUID version 5\nis recommended. See RFC 4122 for details." - }, - "operationName": { - "description": "Fully qualified name of the operation. Reserved for future use.", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "End time of the operation.\nRequired when the operation is used in ServiceController.Report,\nbut optional when the operation is used in ServiceController.Check.", - "type": "string" - }, - "startTime": { - "type": "string", - "format": "google-datetime", - "description": "Required. Start time of the operation." - }, - "importance": { - "enum": [ - "LOW", - "HIGH", - "DEBUG" - ], - "description": "DO NOT USE. This is an experimental field.", - "type": "string", - "enumDescriptions": [ - "The API implementation may cache and aggregate the data.\nThe data may be lost when rare and unexpected system failures occur.", - "The API implementation doesn't cache and aggregate the data.\nIf the method returns successfully, it's guaranteed that the data has\nbeen persisted in durable storage.", - "In addition to the behavior described in HIGH, DEBUG enables\nadditional validation logic that is only useful during the onboarding\nprocess. This is only available to Google internal services and\nthe service must be whitelisted by chemist-dev@google.com in order\nto use this level." - ] - }, - "resourceContainer": { - "description": "The resource name of the parent of a resource in the resource hierarchy.\n\nThis can be in one of the following formats:\n - “projects/\u003cproject-id or project-number\u003e”\n - “folders/\u003cfolder-id\u003e”\n - “organizations/\u003corganization-id\u003e”", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels describing the operation. Only the following labels are allowed:\n\n- Labels describing monitored resources as defined in\n the service configuration.\n- Default labels of metric values. When specified, labels defined in the\n metric value override these default.\n- The following labels defined by Google Cloud Platform:\n - `cloud.googleapis.com/location` describing the location where the\n operation happened,\n - `servicecontrol.googleapis.com/user_agent` describing the user agent\n of the API request,\n - `servicecontrol.googleapis.com/service_agent` describing the service\n used to handle the API request (e.g. ESP),\n - `servicecontrol.googleapis.com/platform` describing the platform\n where the API is served (e.g. GAE, GCE, GKE).", - "type": "object" - }, - "logEntries": { - "items": { - "$ref": "LogEntry" - }, - "type": "array", - "description": "Represents information to be logged." - } - }, - "id": "Operation", - "description": "Represents information regarding an operation.", - "type": "object" - }, - "CheckResponse": { - "description": "Response message for the Check method.", - "type": "object", - "properties": { - "checkInfo": { - "description": "Feedback data returned from the server during processing a Check request.", - "$ref": "CheckInfo" - }, - "checkErrors": { - "description": "Indicate the decision of the check.\n\nIf no check errors are present, the service should process the operation.\nOtherwise the service should use the list of errors to determine the\nappropriate action.", - "items": { - "$ref": "CheckError" - }, - "type": "array" - }, - "operationId": { - "description": "The same operation_id value used in the CheckRequest.\nUsed for logging and diagnostics purposes.", - "type": "string" - }, - "serviceConfigId": { - "description": "The actual config id used to process the request.", - "type": "string" - }, - "quotaInfo": { - "$ref": "QuotaInfo", - "description": "Quota information for the check request associated with this response.\n" - } - }, - "id": "CheckResponse" - }, - "ReportRequest": { - "type": "object", - "properties": { - "serviceConfigId": { - "description": "Specifies which version of service config should be used to process the\nrequest.\n\nIf unspecified or no matching version can be found, the\nlatest one will be used.", - "type": "string" - }, - "operations": { - "description": "Operations to be reported.\n\nTypically the service should report one operation per request.\nPutting multiple operations into a single request is allowed, but should\nbe used only when multiple operations are natually available at the time\nof the report.\n\nIf multiple operations are in a single request, the total request size\nshould be no larger than 1MB. See ReportResponse.report_errors for\npartial failure behavior.", - "items": { - "$ref": "Operation" - }, - "type": "array" - } - }, - "id": "ReportRequest", - "description": "Request message for the Report method." - }, - "Status": { - "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - } - }, - "LogEntry": { - "type": "object", - "properties": { - "severity": { - "description": "The severity of the log entry. The default value is\n`LogSeverity.DEFAULT`.", - "type": "string", - "enumDescriptions": [ - "(0) The log entry has no assigned severity level.", - "(100) Debug or trace information.", - "(200) Routine information, such as ongoing status or performance.", - "(300) Normal but significant events, such as start up, shut down, or\na configuration change.", - "(400) Warning events might cause problems.", - "(500) Error events are likely to cause problems.", - "(600) Critical events cause more severe problems or outages.", - "(700) A person must take an action immediately.", - "(800) One or more systems are unusable." - ], - "enum": [ - "DEFAULT", - "DEBUG", - "INFO", - "NOTICE", - "WARNING", - "ERROR", - "CRITICAL", - "ALERT", - "EMERGENCY" - ] - }, - "name": { - "description": "Required. The log to which this log entry belongs. Examples: `\"syslog\"`,\n`\"book_log\"`.", - "type": "string" - }, - "insertId": { - "description": "A unique ID for the log entry used for deduplication. If omitted,\nthe implementation will generate one based on operation_id.", - "type": "string" - }, - "structPayload": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The log entry payload, represented as a structure that\nis expressed as a JSON object.", - "type": "object" - }, - "textPayload": { - "description": "The log entry payload, represented as a Unicode string (UTF-8).", - "type": "string" - }, - "protoPayload": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The log entry payload, represented as a protocol buffer that is\nexpressed as a JSON object. You can only pass `protoPayload`\nvalues that belong to a set of approved types." - }, - "timestamp": { - "format": "google-datetime", - "description": "The time the event described by the log entry occurred. If\nomitted, defaults to operation start time.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "A set of user-defined (key, value) data that provides additional\ninformation about the log entry.", - "type": "object" - } - }, - "id": "LogEntry", - "description": "An individual log entry." - }, - "AuditLog": { - "description": "Common audit log format for Google Cloud Platform API operations.\n\n", - "type": "object", - "properties": { - "status": { - "$ref": "Status", - "description": "The status of the overall operation." - }, - "authenticationInfo": { - "$ref": "AuthenticationInfo", - "description": "Authentication information." - }, - "serviceName": { - "description": "The name of the API service performing the operation. For example,\n`\"datastore.googleapis.com\"`.", - "type": "string" - }, - "response": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The operation response. This may not include all response elements,\nsuch as those that are too large, privacy-sensitive, or duplicated\nelsewhere in the log record.\nIt should never include user-generated data, such as file contents.\nWhen the JSON object represented here has a proto equivalent, the proto\nname will be indicated in the `@type` property.", - "type": "object" - }, - "methodName": { - "type": "string", - "description": "The name of the service method or operation.\nFor API calls, this should be the name of the API method.\nFor example,\n\n \"google.datastore.v1.Datastore.RunQuery\"\n \"google.logging.v1.LoggingService.DeleteLog\"" - }, - "resourceName": { - "description": "The resource or collection that is the target of the operation.\nThe name is a scheme-less URI, not including the API service name.\nFor example:\n\n \"shelves/SHELF_ID/books\"\n \"shelves/SHELF_ID/books/BOOK_ID\"", - "type": "string" - }, - "authorizationInfo": { - "description": "Authorization information. If there are multiple\nresources or permissions involved, then there is\none AuthorizationInfo element for each {resource, permission} tuple.", - "items": { - "$ref": "AuthorizationInfo" - }, - "type": "array" - }, - "request": { - "description": "The operation request. This may not include all request parameters,\nsuch as those that are too large, privacy-sensitive, or duplicated\nelsewhere in the log record.\nIt should never include user-generated data, such as file contents.\nWhen the JSON object represented here has a proto equivalent, the proto\nname will be indicated in the `@type` property.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - } - }, - "serviceData": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Other service-specific data about the request, response, and other\nactivities.", - "type": "object" - }, - "requestMetadata": { - "$ref": "RequestMetadata", - "description": "Metadata about the operation." - }, - "numResponseItems": { - "type": "string", - "format": "int64", - "description": "The number of items returned from a List or Query API method,\nif applicable." - } - }, - "id": "AuditLog" - }, - "MetricValue": { - "description": "Represents a single metric value.", - "type": "object", - "properties": { - "doubleValue": { - "format": "double", - "description": "A double precision floating point value.", - "type": "number" - }, - "int64Value": { - "format": "int64", - "description": "A signed 64-bit integer value.", - "type": "string" - }, - "distributionValue": { - "$ref": "Distribution", - "description": "A distribution value." - }, - "boolValue": { - "description": "A boolean value.", - "type": "boolean" - }, - "endTime": { - "format": "google-datetime", - "description": "The end of the time period over which this metric value's measurement\napplies.", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "The start of the time period over which this metric value's measurement\napplies. The time period has different semantics for different metric\ntypes (cumulative, delta, and gauge). See the metric definition\ndocumentation in the service configuration for details.", - "type": "string" - }, - "moneyValue": { - "$ref": "Money", - "description": "A money value." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels describing the metric value.\nSee comments on google.api.servicecontrol.v1.Operation.labels for\nthe overriding relationship.", - "type": "object" - }, - "stringValue": { - "description": "A text string value.", - "type": "string" - } - }, - "id": "MetricValue" - }, - "EndReconciliationResponse": { - "type": "object", - "properties": { - "reconciliationErrors": { - "description": "Indicates the decision of the reconciliation end.", - "items": { - "$ref": "QuotaError" - }, - "type": "array" - }, - "operationId": { - "description": "The same operation_id value used in the EndReconciliationRequest. Used for\nlogging and diagnostics purposes.", - "type": "string" - }, - "serviceConfigId": { - "type": "string", - "description": "ID of the actual config used to process the request." - }, - "quotaMetrics": { - "description": "Metric values as tracked by One Platform before the adjustment was made.\nThe following metrics will be included:\n\n1. Per quota metric total usage will be specified using the following gauge\nmetric:\n \"serviceruntime.googleapis.com/allocation/consumer/quota_used_count\"\n\n2. Value for each quota limit associated with the metrics will be specified\nusing the following gauge metric:\n \"serviceruntime.googleapis.com/quota/limit\"\n\n3. Delta value of the usage after the reconciliation for limits associated\nwith the metrics will be specified using the following metric:\n \"serviceruntime.googleapis.com/allocation/reconciliation_delta\"\nThe delta value is defined as:\n new_usage_from_client - existing_value_in_spanner.\nThis metric is not defined in serviceruntime.yaml or in Cloud Monarch.\nThis metric is meant for callers' use only. Since this metric is not\ndefined in the monitoring backend, reporting on this metric will result in\nan error.", - "items": { - "$ref": "MetricValueSet" - }, - "type": "array" - } - }, - "id": "EndReconciliationResponse" - }, - "Money": { - "description": "Represents an amount of money with its currency type.", - "type": "object", - "properties": { - "nanos": { - "format": "int32", - "description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", - "type": "integer" - }, - "units": { - "format": "int64", - "description": "The whole units of the amount.\nFor example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", - "type": "string" - }, - "currencyCode": { - "description": "The 3-letter currency code defined in ISO 4217.", - "type": "string" - } - }, - "id": "Money" - }, - "ExplicitBuckets": { - "description": "Describing buckets with arbitrary user-provided width.", - "type": "object", - "properties": { - "bounds": { - "description": "'bound' is a list of strictly increasing boundaries between\nbuckets. Note that a list of length N-1 defines N buckets because\nof fenceposting. See comments on `bucket_options` for details.\n\nThe i'th finite bucket covers the interval\n [bound[i-1], bound[i])\nwhere i ranges from 1 to bound_size() - 1. Note that there are no\nfinite buckets at all if 'bound' only contains a single element; in\nthat special case the single bound defines the boundary between the\nunderflow and overflow buckets.\n\nbucket number lower bound upper bound\n i == 0 (underflow) -inf bound[i]\n 0 \u003c i \u003c bound_size() bound[i-1] bound[i]\n i == bound_size() (overflow) bound[i-1] +inf", - "items": { - "format": "double", - "type": "number" - }, - "type": "array" - } - }, - "id": "ExplicitBuckets" - }, - "Distribution": { - "type": "object", - "properties": { - "explicitBuckets": { - "$ref": "ExplicitBuckets", - "description": "Buckets with arbitrary user-provided width." - }, - "maximum": { - "format": "double", - "description": "The maximum of the population of values. Ignored if `count` is zero.", - "type": "number" - }, - "sumOfSquaredDeviation": { - "format": "double", - "description": "The sum of squared deviations from the mean:\n Sum[i=1..count]((x_i - mean)^2)\nwhere each x_i is a sample values. If `count` is zero then this field\nmust be zero, otherwise validation of the request fails.", - "type": "number" - }, - "exponentialBuckets": { - "$ref": "ExponentialBuckets", - "description": "Buckets with exponentially growing width." - }, - "minimum": { - "format": "double", - "description": "The minimum of the population of values. Ignored if `count` is zero.", - "type": "number" - }, - "linearBuckets": { - "$ref": "LinearBuckets", - "description": "Buckets with constant width." - }, - "count": { - "format": "int64", - "description": "The total number of samples in the distribution. Must be \u003e= 0.", - "type": "string" - }, - "mean": { - "format": "double", - "description": "The arithmetic mean of the samples in the distribution. If `count` is\nzero then this field must be zero.", - "type": "number" - }, - "bucketCounts": { - "items": { - "format": "int64", - "type": "string" - }, - "type": "array", - "description": "The number of samples in each histogram bucket. `bucket_counts` are\noptional. If present, they must sum to the `count` value.\n\nThe buckets are defined below in `bucket_option`. There are N buckets.\n`bucket_counts[0]` is the number of samples in the underflow bucket.\n`bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples\nin each of the finite buckets. And `bucket_counts[N] is the number\nof samples in the overflow bucket. See the comments of `bucket_option`\nbelow for more details.\n\nAny suffix of trailing zeros may be omitted." - } - }, - "id": "Distribution", - "description": "Distribution represents a frequency distribution of double-valued sample\npoints. It contains the size of the population of sample points plus\nadditional optional information:\n\n - the arithmetic mean of the samples\n - the minimum and maximum of the samples\n - the sum-squared-deviation of the samples, used to compute variance\n - a histogram of the values of the sample points" - }, - "ExponentialBuckets": { - "properties": { - "growthFactor": { - "format": "double", - "description": "The i'th exponential bucket covers the interval\n [scale * growth_factor^(i-1), scale * growth_factor^i)\nwhere i ranges from 1 to num_finite_buckets inclusive.\nMust be larger than 1.0.", - "type": "number" - }, - "scale": { - "format": "double", - "description": "The i'th exponential bucket covers the interval\n [scale * growth_factor^(i-1), scale * growth_factor^i)\nwhere i ranges from 1 to num_finite_buckets inclusive.\nMust be \u003e 0.", - "type": "number" - }, - "numFiniteBuckets": { - "format": "int32", - "description": "The number of finite buckets. With the underflow and overflow buckets,\nthe total number of buckets is `num_finite_buckets` + 2.\nSee comments on `bucket_options` for details.", - "type": "integer" - } - }, - "id": "ExponentialBuckets", - "description": "Describing buckets with exponentially growing width.", - "type": "object" - }, - "AuthorizationInfo": { - "type": "object", - "properties": { - "granted": { - "description": "Whether or not authorization for `resource` and `permission`\nwas granted.", - "type": "boolean" - }, - "permission": { - "description": "The required IAM permission.", - "type": "string" - }, - "resource": { - "description": "The resource being accessed, as a REST-style string. For example:\n\n bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID", - "type": "string" - } - }, - "id": "AuthorizationInfo", - "description": "Authorization information for the operation." } }, - "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, + "protocol": "rest", "canonicalName": "Service Control", "auth": { "oauth2": { @@ -1098,283 +1391,5 @@ } } } - }, - "rootUrl": "https://servicecontrol.googleapis.com/", - "ownerDomain": "google.com", - "name": "servicecontrol", - "batchPath": "batch", - "fullyEncodeReservedExpansion": true, - "title": "Google Service Control API", - "ownerName": "Google", - "resources": { - "services": { - "methods": { - "report": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/servicecontrol" - ], - "parameters": { - "serviceName": { - "type": "string", - "required": true, - "location": "path", - "description": "The service name as specified in its service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name." - } - }, - "flatPath": "v1/services/{serviceName}:report", - "path": "v1/services/{serviceName}:report", - "id": "servicecontrol.services.report", - "request": { - "$ref": "ReportRequest" - }, - "description": "Reports operation results to Google Service Control, such as logs and\nmetrics. It should be called after an operation is completed.\n\nIf feasible, the client should aggregate reporting data for up to 5\nseconds to reduce API traffic. Limiting aggregation to 5 seconds is to\nreduce data loss during client crashes. Clients should carefully choose\nthe aggregation time window to avoid data loss risk more than 0.01%\nfor business and compliance reasons.\n\nNOTE: the `ReportRequest` has the size limit of 1MB.\n\nThis method requires the `servicemanagement.services.report` permission\non the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).", - "httpMethod": "POST", - "parameterOrder": [ - "serviceName" - ], - "response": { - "$ref": "ReportResponse" - } - }, - "allocateQuota": { - "httpMethod": "POST", - "parameterOrder": [ - "serviceName" - ], - "response": { - "$ref": "AllocateQuotaResponse" - }, - "parameters": { - "serviceName": { - "location": "path", - "description": "Name of the service as specified in the service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/servicecontrol" - ], - "flatPath": "v1/services/{serviceName}:allocateQuota", - "path": "v1/services/{serviceName}:allocateQuota", - "id": "servicecontrol.services.allocateQuota", - "description": "Attempts to allocate quota for the specified consumer. It should be called\nbefore the operation is executed.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).\n\n**NOTE:** the client code **must** fail-open if the server returns one\nof the following quota errors:\n- `PROJECT_STATUS_UNAVAILABLE`\n- `SERVICE_STATUS_UNAVAILABLE`\n- `BILLING_STATUS_UNAVAILABLE`\n- `QUOTA_SYSTEM_UNAVAILABLE`\n\nThe server may inject above errors to prohibit any hard dependency\non the quota system.", - "request": { - "$ref": "AllocateQuotaRequest" - } - }, - "startReconciliation": { - "description": "Unlike rate quota, allocation quota does not get refilled periodically.\nSo, it is possible that the quota usage as seen by the service differs from\nwhat the One Platform considers the usage is. This is expected to happen\nonly rarely, but over time this can accumulate. Services can invoke\nStartReconciliation and EndReconciliation to correct this usage drift, as\ndescribed below:\n1. Service sends StartReconciliation with a timestamp in future for each\n metric that needs to be reconciled. The timestamp being in future allows\n to account for in-flight AllocateQuota and ReleaseQuota requests for the\n same metric.\n2. One Platform records this timestamp and starts tracking subsequent\n AllocateQuota and ReleaseQuota requests until EndReconciliation is\n called.\n3. At or after the time specified in the StartReconciliation, service\n sends EndReconciliation with the usage that needs to be reconciled to.\n4. One Platform adjusts its own record of usage for that metric to the\n value specified in EndReconciliation by taking in to account any\n allocation or release between StartReconciliation and EndReconciliation.\n\nSignals the quota controller that the service wants to perform a usage\nreconciliation as specified in the request.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).", - "request": { - "$ref": "StartReconciliationRequest" - }, - "response": { - "$ref": "StartReconciliationResponse" - }, - "parameterOrder": [ - "serviceName" - ], - "httpMethod": "POST", - "parameters": { - "serviceName": { - "description": "Name of the service as specified in the service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/servicecontrol" - ], - "flatPath": "v1/services/{serviceName}:startReconciliation", - "id": "servicecontrol.services.startReconciliation", - "path": "v1/services/{serviceName}:startReconciliation" - }, - "check": { - "httpMethod": "POST", - "parameterOrder": [ - "serviceName" - ], - "response": { - "$ref": "CheckResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/servicecontrol" - ], - "parameters": { - "serviceName": { - "description": "The service name as specified in its service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/services/{serviceName}:check", - "path": "v1/services/{serviceName}:check", - "id": "servicecontrol.services.check", - "request": { - "$ref": "CheckRequest" - }, - "description": "Checks an operation with Google Service Control to decide whether\nthe given operation should proceed. It should be called before the\noperation is executed.\n\nIf feasible, the client should cache the check results and reuse them for\n60 seconds. In case of server errors, the client can rely on the cached\nresults for longer time.\n\nNOTE: the `CheckRequest` has the size limit of 64KB.\n\nThis method requires the `servicemanagement.services.check` permission\non the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam)." - }, - "releaseQuota": { - "response": { - "$ref": "ReleaseQuotaResponse" - }, - "parameterOrder": [ - "serviceName" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/servicecontrol" - ], - "parameters": { - "serviceName": { - "description": "Name of the service as specified in the service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/services/{serviceName}:releaseQuota", - "id": "servicecontrol.services.releaseQuota", - "path": "v1/services/{serviceName}:releaseQuota", - "request": { - "$ref": "ReleaseQuotaRequest" - }, - "description": "Releases previously allocated quota done through AllocateQuota method.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).\n\n**NOTE:** the client code **must** fail-open if the server returns one\nof the following quota errors:\n- `PROJECT_STATUS_UNAVAILABLE`\n- `SERVICE_STATUS_UNAVAILABLE`\n- `BILLING_STATUS_UNAVAILABLE`\n- `QUOTA_SYSTEM_UNAVAILABLE`\n\nThe server may inject above errors to prohibit any hard dependency\non the quota system." - }, - "endReconciliation": { - "id": "servicecontrol.services.endReconciliation", - "path": "v1/services/{serviceName}:endReconciliation", - "request": { - "$ref": "EndReconciliationRequest" - }, - "description": "Signals the quota controller that service ends the ongoing usage\nreconciliation.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).", - "response": { - "$ref": "EndReconciliationResponse" - }, - "parameterOrder": [ - "serviceName" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/servicecontrol" - ], - "parameters": { - "serviceName": { - "location": "path", - "description": "Name of the service as specified in the service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/services/{serviceName}:endReconciliation" - } - } - } - }, - "parameters": { - "upload_protocol": { - "type": "string", - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ] - }, - "alt": { - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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" - }, - "key": { - "location": "query", - "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.", - "type": "string" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "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.", - "type": "string", - "location": "query" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - } - }, - "version": "v1", - "baseUrl": "https://servicecontrol.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Google Service Control provides control plane functionality to managed services, such as logging, monitoring, and status checks.", - "servicePath": "", - "basePath": "", - "id": "servicecontrol:v1", - "documentationLink": "https://cloud.google.com/service-control/", - "revision": "20170729" + } } diff --git a/vendor/google.golang.org/api/servicecontrol/v1/servicecontrol-gen.go b/vendor/google.golang.org/api/servicecontrol/v1/servicecontrol-gen.go index 88355bc84..50d230c53 100644 --- a/vendor/google.golang.org/api/servicecontrol/v1/servicecontrol-gen.go +++ b/vendor/google.golang.org/api/servicecontrol/v1/servicecontrol-gen.go @@ -324,10 +324,23 @@ type AuthenticationInfo struct { // authority. AuthoritySelector string `json:"authoritySelector,omitempty"` - // PrincipalEmail: The email address of the authenticated user making - // the request. + // PrincipalEmail: The email address of the authenticated user (or + // service account on behalf + // of third party principal) making the request. For privacy reasons, + // the + // principal email address is redacted for all read-only operations that + // fail + // with a "permission denied" error. PrincipalEmail string `json:"principalEmail,omitempty"` + // ThirdPartyPrincipal: The third party identification (if any) of the + // authenticated user making + // the request. + // When the JSON object represented here has a proto equivalent, the + // proto + // name will be indicated in the `@type` property. + ThirdPartyPrincipal googleapi.RawMessage `json:"thirdPartyPrincipal,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuthoritySelector") // to unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -1054,8 +1067,9 @@ type LogEntry struct { // ProtoPayload: The log entry payload, represented as a protocol buffer // that is - // expressed as a JSON object. You can only pass `protoPayload` - // values that belong to a set of approved types. + // expressed as a JSON object. The only accepted type currently + // is + // AuditLog. ProtoPayload googleapi.RawMessage `json:"protoPayload,omitempty"` // Severity: The severity of the log entry. The default value @@ -1384,6 +1398,10 @@ type Operation struct { // - “organizations/” ResourceContainer string `json:"resourceContainer,omitempty"` + // ResourceContainers: DO NOT USE. + // This field is not ready for use yet. + ResourceContainers []string `json:"resourceContainers,omitempty"` + // StartTime: Required. Start time of the operation. StartTime string `json:"startTime,omitempty"` @@ -1503,7 +1521,15 @@ type QuotaInfo struct { // quota check was not successful, then this will not be populated due // to no // quota consumption. - // Deprecated: Use quota_metrics to get per quota group usage. + // + // We are not merging this field with 'quota_metrics' field because of + // the + // complexity of scaling in Chemist client code base. For simplicity, we + // will + // keep this field for Castor (that scales quota usage) and + // 'quota_metrics' + // for SuperQuota (that doesn't scale quota usage). + // QuotaConsumed map[string]int64 `json:"quotaConsumed,omitempty"` // QuotaMetrics: Quota metrics to indicate the usage. Depending on the @@ -1578,13 +1604,11 @@ type QuotaOperation struct { // google.example.library.v1.LibraryService.CreateShelf MethodName string `json:"methodName,omitempty"` - // OperationId: Identity of the operation. This must be unique within - // the scope of the - // service that generated the operation. If the service calls - // AllocateQuota - // and ReleaseQuota on the same operation, the two calls should carry - // the - // same ID. + // OperationId: Identity of the operation. This is expected to be unique + // within the scope + // of the service that generated the operation, and guarantees + // idempotency in + // case of retries. // // UUID version 4 is recommended, though not required. In scenarios // where an @@ -1850,13 +1874,13 @@ func (s *ReleaseQuotaResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ReportError: Represents the processing error of one `Operation` in -// the request. +// ReportError: Represents the processing error of one Operation in the +// request. type ReportError struct { // OperationId: The Operation.operation_id value from the request. OperationId string `json:"operationId,omitempty"` - // Status: Details of the error when processing the `Operation`. + // Status: Details of the error when processing the Operation. Status *Status `json:"status,omitempty"` // ForceSendFields is a list of field names (e.g. "OperationId") to @@ -2476,7 +2500,7 @@ type ServicesCheckCall struct { // cached // results for longer time. // -// NOTE: the `CheckRequest` has the size limit of 64KB. +// NOTE: the CheckRequest has the size limit of 64KB. // // This method requires the `servicemanagement.services.check` // permission @@ -2575,7 +2599,7 @@ func (c *ServicesCheckCall) Do(opts ...googleapi.CallOption) (*CheckResponse, er } return ret, nil // { - // "description": "Checks an operation with Google Service Control to decide whether\nthe given operation should proceed. It should be called before the\noperation is executed.\n\nIf feasible, the client should cache the check results and reuse them for\n60 seconds. In case of server errors, the client can rely on the cached\nresults for longer time.\n\nNOTE: the `CheckRequest` has the size limit of 64KB.\n\nThis method requires the `servicemanagement.services.check` permission\non the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).", + // "description": "Checks an operation with Google Service Control to decide whether\nthe given operation should proceed. It should be called before the\noperation is executed.\n\nIf feasible, the client should cache the check results and reuse them for\n60 seconds. In case of server errors, the client can rely on the cached\nresults for longer time.\n\nNOTE: the CheckRequest has the size limit of 64KB.\n\nThis method requires the `servicemanagement.services.check` permission\non the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).", // "flatPath": "v1/services/{serviceName}:check", // "httpMethod": "POST", // "id": "servicecontrol.services.check", @@ -2584,7 +2608,7 @@ func (c *ServicesCheckCall) Do(opts ...googleapi.CallOption) (*CheckResponse, er // ], // "parameters": { // "serviceName": { - // "description": "The service name as specified in its service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", + // "description": "The service name as specified in its service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee\n[google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)\nfor the definition of a service name.", // "location": "path", // "required": true, // "type": "string" @@ -2926,7 +2950,7 @@ type ServicesReportCall struct { // 0.01% // for business and compliance reasons. // -// NOTE: the `ReportRequest` has the size limit of 1MB. +// NOTE: the ReportRequest has the size limit of 1MB. // // This method requires the `servicemanagement.services.report` // permission @@ -3025,7 +3049,7 @@ func (c *ServicesReportCall) Do(opts ...googleapi.CallOption) (*ReportResponse, } return ret, nil // { - // "description": "Reports operation results to Google Service Control, such as logs and\nmetrics. It should be called after an operation is completed.\n\nIf feasible, the client should aggregate reporting data for up to 5\nseconds to reduce API traffic. Limiting aggregation to 5 seconds is to\nreduce data loss during client crashes. Clients should carefully choose\nthe aggregation time window to avoid data loss risk more than 0.01%\nfor business and compliance reasons.\n\nNOTE: the `ReportRequest` has the size limit of 1MB.\n\nThis method requires the `servicemanagement.services.report` permission\non the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).", + // "description": "Reports operation results to Google Service Control, such as logs and\nmetrics. It should be called after an operation is completed.\n\nIf feasible, the client should aggregate reporting data for up to 5\nseconds to reduce API traffic. Limiting aggregation to 5 seconds is to\nreduce data loss during client crashes. Clients should carefully choose\nthe aggregation time window to avoid data loss risk more than 0.01%\nfor business and compliance reasons.\n\nNOTE: the ReportRequest has the size limit of 1MB.\n\nThis method requires the `servicemanagement.services.report` permission\non the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).", // "flatPath": "v1/services/{serviceName}:report", // "httpMethod": "POST", // "id": "servicecontrol.services.report", @@ -3034,7 +3058,7 @@ func (c *ServicesReportCall) Do(opts ...googleapi.CallOption) (*ReportResponse, // ], // "parameters": { // "serviceName": { - // "description": "The service name as specified in its service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", + // "description": "The service name as specified in its service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee\n[google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)\nfor the definition of a service name.", // "location": "path", // "required": true, // "type": "string" 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 6166665df..11560016d 100644 --- a/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-api.json +++ b/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-api.json @@ -1,185 +1,17 @@ { - "id": "servicemanagement:v1", + "basePath": "", + "revision": "20170901", "documentationLink": "https://cloud.google.com/service-management/", - "revision": "20170728", + "id": "servicemanagement:v1", "discoveryVersion": "v1", "schemas": { - "CloudAuditOptions": { - "id": "CloudAuditOptions", - "description": "Write a Cloud Audit log", - "type": "object", - "properties": { - "logName": { - "description": "The log_name to populate in the Cloud Audit Record.", - "type": "string", - "enumDescriptions": [ - "Default. Should not be used.", - "Corresponds to \"cloudaudit.googleapis.com/activity\"", - "Corresponds to \"cloudaudit.googleapis.com/data_access\"" - ], - "enum": [ - "UNSPECIFIED_LOG_NAME", - "ADMIN_ACTIVITY", - "DATA_ACCESS" - ] - } - } - }, - "ContextRule": { - "description": "A context rule provides information about the context for an individual API\nelement.", - "type": "object", - "properties": { - "selector": { - "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" - }, - "provided": { - "description": "A list of full type names of provided contexts.", - "items": { - "type": "string" - }, - "type": "array" - }, - "requested": { - "description": "A list of full type names of requested contexts.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "ContextRule" - }, - "MetricDescriptor": { - "description": "Defines a metric type and its schema. Once a metric descriptor is created,\ndeleting or altering it stops data collection and makes the metric type's\nexisting data unusable.", - "type": "object", - "properties": { - "metricKind": { - "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\nmeasurements in a time series should have the same start time\nand increasing end times, until an event resets the cumulative\nvalue to zero and sets a new start time for the following\npoints." - ], - "enum": [ - "METRIC_KIND_UNSPECIFIED", - "GAUGE", - "DELTA", - "CUMULATIVE" - ], - "description": "Whether the metric records instantaneous values, changes to a value, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", - "type": "string" - }, - "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.\nUse sentence case without an ending period, for example \"Request count\".", - "type": "string" - }, - "unit": { - "description": "The unit in which the metric value is reported. It is only applicable\nif the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The\nsupported units are a subset of [The Unified Code for Units of\nMeasure](http://unitsofmeasure.org/ucum.html) standard:\n\n**Basic units (UNIT)**\n\n* `bit` bit\n* `By` byte\n* `s` second\n* `min` minute\n* `h` hour\n* `d` day\n\n**Prefixes (PREFIX)**\n\n* `k` kilo (10**3)\n* `M` mega (10**6)\n* `G` giga (10**9)\n* `T` tera (10**12)\n* `P` peta (10**15)\n* `E` exa (10**18)\n* `Z` zetta (10**21)\n* `Y` yotta (10**24)\n* `m` milli (10**-3)\n* `u` micro (10**-6)\n* `n` nano (10**-9)\n* `p` pico (10**-12)\n* `f` femto (10**-15)\n* `a` atto (10**-18)\n* `z` zepto (10**-21)\n* `y` yocto (10**-24)\n* `Ki` kibi (2**10)\n* `Mi` mebi (2**20)\n* `Gi` gibi (2**30)\n* `Ti` tebi (2**40)\n\n**Grammar**\n\nThe grammar includes the dimensionless unit `1`, such as `1/s`.\n\nThe grammar also includes these connectors:\n\n* `/` division (as an infix operator, e.g. `1/s`).\n* `.` multiplication (as an infix operator, e.g. `GBy.d`)\n\nThe grammar for a unit is as follows:\n\n Expression = Component { \".\" Component } { \"/\" Component } ;\n\n Component = [ PREFIX ] UNIT [ Annotation ]\n | Annotation\n | \"1\"\n ;\n\n Annotation = \"{\" NAME \"}\" ;\n\nNotes:\n\n* `Annotation` is just a comment if it follows a `UNIT` and is\n equivalent to `1` if it is used alone. For examples,\n `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.\n* `NAME` is a sequence of non-blank printable ASCII characters not\n containing '{' or '}'.", - "type": "string" - }, - "labels": { - "description": "The set of labels that can be used to describe a specific\ninstance of this metric type. For example, the\n`appengine.googleapis.com/http/server/response_latencies` metric\ntype has a label for the HTTP response code, `response_code`, so\nyou can look at latencies for successful responses or just\nfor responses that failed.", - "items": { - "$ref": "LabelDescriptor" - }, - "type": "array" - }, - "name": { - "description": "The resource name of the metric descriptor. Depending on the\nimplementation, the name typically includes: (1) the parent resource name\nthat defines the scope of the metric type or of its data; and (2) the\nmetric's URL-encoded type, which also appears in the `type` field of this\ndescriptor. For example, following is the resource name of a custom\nmetric within the GCP project `my-project-id`:\n\n \"projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount\"", - "type": "string" - }, - "type": { - "description": "The metric type, including its DNS name prefix. The type is not\nURL-encoded. All user-defined custom metric types have the DNS name\n`custom.googleapis.com`. Metric types should use a natural hierarchical\ngrouping. For example:\n\n \"custom.googleapis.com/invoice/paid/amount\"\n \"appengine.googleapis.com/http/server/response_latencies\"", - "type": "string" - }, - "valueType": { - "enum": [ - "VALUE_TYPE_UNSPECIFIED", - "BOOL", - "INT64", - "DOUBLE", - "STRING", - "DISTRIBUTION", - "MONEY" - ], - "description": "Whether the measurement is an integer, a floating-point number, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", - "type": "string", - "enumDescriptions": [ - "Do not use this default value.", - "The value is a boolean.\nThis 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.\nThis value type can be used only if the metric kind is `GAUGE`.", - "The value is a `Distribution`.", - "The value is money." - ] - } - }, - "id": "MetricDescriptor" - }, - "SourceContext": { - "description": "`SourceContext` represents information about the source of a\nprotobuf element, like the file in which it is defined.", - "type": "object", - "properties": { - "fileName": { - "description": "The path-qualified name of the .proto file that contained the associated\nprotobuf element. For example: `\"google/protobuf/source_context.proto\"`.", - "type": "string" - } - }, - "id": "SourceContext" - }, - "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\"", - "type": "object", - "properties": { - "description": { - "type": "string", - "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." - }, - "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" - } - }, - "id": "Expr" - }, - "ListServicesResponse": { - "description": "Response message for `ListServices` method.", - "type": "object", - "properties": { - "nextPageToken": { - "type": "string", - "description": "Token that can be passed to `ListServices` to resume a paginated query." - }, - "services": { - "description": "The returned services will only have the name field set.", - "items": { - "$ref": "ManagedService" - }, - "type": "array" - } - }, - "id": "ListServicesResponse" - }, "Endpoint": { + "id": "Endpoint", "description": "`Endpoint` describes a network endpoint that serves a set of APIs.\nA service may expose any number of endpoints, and all endpoints share the\nsame service configuration, such as quota configuration and monitoring\nconfiguration.\n\nExample service configuration:\n\n name: library-example.googleapis.com\n endpoints:\n # Below entry makes 'google.example.library.v1.Library'\n # API be served from endpoint address library-example.googleapis.com.\n # It also allows HTTP OPTIONS calls to be passed to the backend, for\n # it to decide whether the subsequent cross-origin request is\n # allowed to proceed.\n - name: library-example.googleapis.com\n allow_cors: true", "type": "object", "properties": { - "apis": { - "description": "The list of APIs served by this endpoint.\n\nIf no APIs are specified this translates to \"all APIs\" exported by the\nservice, as defined in the top-level service configuration.", + "aliases": { + "description": "DEPRECATED: This field is no longer supported. Instead of using aliases,\nplease specify multiple google.api.Endpoint for each of the intented\nalias.\n\nAdditional names that this endpoint will be hosted on.", "items": { "type": "string" }, @@ -189,16 +21,9 @@ "description": "Allowing\n[CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka\ncross-domain traffic, would allow the backends served from this endpoint to\nreceive and respond to HTTP OPTIONS requests. The response will be used by\nthe browser to determine whether the subsequent cross-origin request is\nallowed to proceed.", "type": "boolean" }, - "aliases": { - "description": "DEPRECATED: This field is no longer supported. Instead of using aliases,\nplease specify multiple google.api.Endpoint for each of the intented\nalias.\n\nAdditional names that this endpoint will be hosted on.", - "items": { - "type": "string" - }, - "type": "array" - }, "name": { - "description": "The canonical name of this endpoint.", - "type": "string" + "type": "string", + "description": "The canonical name of this endpoint." }, "target": { "description": "The specification of an Internet routable address of API frontend that will\nhandle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).\nIt should be either a valid IPv4 address or a fully-qualified domain name.\nFor example, \"8.8.8.8\" or \"myservice.appspot.com\".", @@ -210,25 +35,58 @@ "type": "string" }, "type": "array" + }, + "apis": { + "description": "The list of APIs served by this endpoint.\n\nIf no APIs are specified this translates to \"all APIs\" exported by the\nservice, as defined in the top-level service configuration.", + "items": { + "type": "string" + }, + "type": "array" } - }, - "id": "Endpoint" + } }, "OAuthRequirements": { + "description": "OAuth scopes are a way to define data and permissions on data. For example,\nthere are scopes defined for \"Read-only access to Google Calendar\" and\n\"Access to Cloud Platform\". Users can consent to a scope for an application,\ngiving it permission to access that data on their behalf.\n\nOAuth scope specifications should be fairly coarse grained; a user will need\nto see and understand the text description of what your scope means.\n\nIn most cases: use one or at most two OAuth scopes for an entire family of\nproducts. If your product has multiple APIs, you should probably be sharing\nthe OAuth scope across all of those APIs.\n\nWhen you need finer grained OAuth consent screens: talk with your product\nmanagement about how developers will use them in practice.\n\nPlease note that even though each of the canonical scopes is enough for a\nrequest to be accepted and passed to the backend, a request can still fail\ndue to the backend requiring additional scopes or permissions.", + "type": "object", "properties": { "canonicalScopes": { "description": "The list of publicly documented OAuth scopes that are allowed access. An\nOAuth token containing any of these scopes will be accepted.\n\nExample:\n\n canonical_scopes: https://www.googleapis.com/auth/calendar,\n https://www.googleapis.com/auth/calendar.read", "type": "string" } }, - "id": "OAuthRequirements", - "description": "OAuth scopes are a way to define data and permissions on data. For example,\nthere are scopes defined for \"Read-only access to Google Calendar\" and\n\"Access to Cloud Platform\". Users can consent to a scope for an application,\ngiving it permission to access that data on their behalf.\n\nOAuth scope specifications should be fairly coarse grained; a user will need\nto see and understand the text description of what your scope means.\n\nIn most cases: use one or at most two OAuth scopes for an entire family of\nproducts. If your product has multiple APIs, you should probably be sharing\nthe OAuth scope across all of those APIs.\n\nWhen you need finer grained OAuth consent screens: talk with your product\nmanagement about how developers will use them in practice.\n\nPlease note that even though each of the canonical scopes is enough for a\nrequest to be accepted and passed to the backend, a request can still fail\ndue to the backend requiring additional scopes or permissions.", - "type": "object" + "id": "OAuthRequirements" + }, + "GetIamPolicyRequest": { + "description": "Request message for `GetIamPolicy` method.", + "type": "object", + "properties": {}, + "id": "GetIamPolicyRequest" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestIamPermissionsResponse" }, "Usage": { "description": "Configuration controlling usage of a service.", "type": "object", "properties": { + "requirements": { + "description": "Requirements that must be satisfied before a consumer project can use the\nservice. Each requirement is of the form \u003cservice.name\u003e/\u003crequirement-id\u003e;\nfor example 'serviceusage.googleapis.com/billing-enabled'.", + "items": { + "type": "string" + }, + "type": "array" + }, "producerNotificationChannel": { "description": "The full resource name of a channel used for sending notifications to the\nservice producer.\n\nGoogle Service Management currently only supports\n[Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification\nchannel. To use Google Cloud Pub/Sub as the channel, this must be the name\nof a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format\ndocumented in https://cloud.google.com/pubsub/docs/overview.", "type": "string" @@ -239,39 +97,11 @@ "$ref": "UsageRule" }, "type": "array" - }, - "requirements": { - "description": "Requirements that must be satisfied before a consumer project can use the\nservice. Each requirement is of the form \u003cservice.name\u003e/\u003crequirement-id\u003e;\nfor example 'serviceusage.googleapis.com/billing-enabled'.", - "items": { - "type": "string" - }, - "type": "array" } }, "id": "Usage" }, - "GetIamPolicyRequest": { - "description": "Request message for `GetIamPolicy` method.", - "type": "object", - "properties": {}, - "id": "GetIamPolicyRequest" - }, - "TestIamPermissionsResponse": { - "properties": { - "permissions": { - "items": { - "type": "string" - }, - "type": "array", - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed." - } - }, - "id": "TestIamPermissionsResponse", - "description": "Response message for `TestIamPermissions` method.", - "type": "object" - }, "Context": { - "description": "`Context` defines which contexts an API requests.\n\nExample:\n\n context:\n rules:\n - selector: \"*\"\n requested:\n - google.rpc.context.ProjectContext\n - google.rpc.context.OriginContext\n\nThe above specifies that all methods in the API request\n`google.rpc.context.ProjectContext` and\n`google.rpc.context.OriginContext`.\n\nAvailable context types are defined in package\n`google.rpc.context`.", "type": "object", "properties": { "rules": { @@ -282,92 +112,8 @@ "type": "array" } }, - "id": "Context" - }, - "Rule": { - "description": "A rule to be applied in a Policy.", - "type": "object", - "properties": { - "notIn": { - "description": "If one or more 'not_in' clauses are specified, the rule matches\nif the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.\nThe format for in and not_in entries is the same as for members in a\nBinding (see google/iam/v1/policy.proto).", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "Human-readable description of the rule.", - "type": "string" - }, - "conditions": { - "description": "Additional restrictions that must be met", - "items": { - "$ref": "Condition" - }, - "type": "array" - }, - "logConfig": { - "items": { - "$ref": "LogConfig" - }, - "type": "array", - "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries\nthat match the LOG action." - }, - "in": { - "description": "If one or more 'in' clauses are specified, the rule matches if\nthe PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.", - "items": { - "type": "string" - }, - "type": "array" - }, - "permissions": { - "description": "A permission is a string of form '\u003cservice\u003e.\u003cresource type\u003e.\u003cverb\u003e'\n(e.g., 'storage.buckets.list'). A value of '*' matches all permissions,\nand a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "action": { - "enumDescriptions": [ - "Default no action.", - "Matching 'Entries' grant access.", - "Matching 'Entries' grant access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' deny access.", - "Matching 'Entries' deny access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' tell IAM.Check callers to generate logs." - ], - "enum": [ - "NO_ACTION", - "ALLOW", - "ALLOW_WITH_LOG", - "DENY", - "DENY_WITH_LOG", - "LOG" - ], - "description": "Required", - "type": "string" - } - }, - "id": "Rule" - }, - "LogConfig": { - "description": "Specifies what kind of log the caller must write", - "type": "object", - "properties": { - "dataAccess": { - "description": "Data access options.", - "$ref": "DataAccessOptions" - }, - "cloudAudit": { - "$ref": "CloudAuditOptions", - "description": "Cloud audit options." - }, - "counter": { - "$ref": "CounterOptions", - "description": "Counter options." - } - }, - "id": "LogConfig" + "id": "Context", + "description": "`Context` defines which contexts an API requests.\n\nExample:\n\n context:\n rules:\n - selector: \"*\"\n requested:\n - google.rpc.context.ProjectContext\n - google.rpc.context.OriginContext\n\nThe above specifies that all methods in the API request\n`google.rpc.context.ProjectContext` and\n`google.rpc.context.OriginContext`.\n\nAvailable context types are defined in package\n`google.rpc.context`." }, "LogDescriptor": { "description": "A description of a log type. Example in YAML format:\n\n - name: library.googleapis.com/activity_history\n description: The history of borrowing and returning library items.\n display_name: Activity\n labels:\n - key: /customer_id\n description: Identifier of a library customer", @@ -401,22 +147,24 @@ "type": "object", "properties": { "fileType": { - "enumDescriptions": [ - "Unknown file type.", - "YAML-specification of service.", - "OpenAPI specification, serialized in JSON.", - "OpenAPI specification, serialized in YAML.", - "FileDescriptorSet, generated by protoc.\n\nTo generate, use protoc with imports and source info included.\nFor an example test.proto file, the following command would put the value\nin a new file named out.pb.\n\n$protoc --include_imports --include_source_info test.proto -o out.pb" - ], "enum": [ "FILE_TYPE_UNSPECIFIED", "SERVICE_CONFIG_YAML", "OPEN_API_JSON", "OPEN_API_YAML", - "FILE_DESCRIPTOR_SET_PROTO" + "FILE_DESCRIPTOR_SET_PROTO", + "PROTO_FILE" ], "description": "The type of configuration file this represents.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Unknown file type.", + "YAML-specification of service.", + "OpenAPI specification, serialized in JSON.", + "OpenAPI specification, serialized in YAML.", + "FileDescriptorSet, generated by protoc.\n\nTo generate, use protoc with imports and source info included.\nFor an example test.proto file, the following command would put the value\nin a new file named out.pb.\n\n$protoc --include_imports --include_source_info test.proto -o out.pb", + "Uncompiled Proto file. Used for storage and display purposes only,\ncurrently server-side compilation is not supported. Should match the\ninputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A\nfile of this type can only be included if at least one file of type\nFILE_DESCRIPTOR_SET_PROTO is included." + ] }, "fileContents": { "format": "byte", @@ -429,6 +177,36 @@ } } }, + "MonitoredResourceDescriptor": { + "description": "An object that describes the schema of a MonitoredResource object using a\ntype name and a set of labels. For example, the monitored resource\ndescriptor for Google Compute Engine VM instances has a type of\n`\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and\n`\"zone\"` to identify particular VM instances.\n\nDifferent APIs can support different monitored resource types. APIs generally\nprovide a `list` method that returns the monitored resource descriptors used\nby the API.", + "type": "object", + "properties": { + "description": { + "description": "Optional. A detailed description of the monitored resource type that might\nbe used in documentation.", + "type": "string" + }, + "displayName": { + "description": "Optional. A concise name for the monitored resource type that might be\ndisplayed in user interfaces. It should be a Title Cased Noun Phrase,\nwithout any article or other determiners. For example,\n`\"Google Cloud SQL Database\"`.", + "type": "string" + }, + "type": { + "description": "Required. The monitored resource type. For example, the type\n`\"cloudsql_database\"` represents databases in Google Cloud SQL.\nThe maximum length of this value is 256 characters.", + "type": "string" + }, + "labels": { + "description": "Required. A set of labels used to describe instances of this monitored\nresource type. For example, an individual Google Cloud SQL database is\nidentified 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:\n`\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where\n{type} is the value of the `type` field in this object and\n{project_id} is a project ID that provides API-specific context for\naccessing the type. APIs that do not use project information can use the\nresource name format `\"monitoredResourceDescriptors/{type}\"`.", + "type": "string" + } + }, + "id": "MonitoredResourceDescriptor" + }, "CustomErrorRule": { "description": "A custom error rule.", "type": "object", @@ -444,51 +222,14 @@ }, "id": "CustomErrorRule" }, - "MonitoredResourceDescriptor": { - "type": "object", - "properties": { - "type": { - "description": "Required. The monitored resource type. For example, the type\n`\"cloudsql_database\"` represents databases in Google Cloud SQL.\nThe maximum length of this value is 256 characters.", - "type": "string" - }, - "labels": { - "description": "Required. A set of labels used to describe instances of this monitored\nresource type. For example, an individual Google Cloud SQL database is\nidentified 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:\n`\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where\n{type} is the value of the `type` field in this object and\n{project_id} is a project ID that provides API-specific context for\naccessing the type. APIs that do not use project information can use the\nresource name format `\"monitoredResourceDescriptors/{type}\"`.", - "type": "string" - }, - "description": { - "description": "Optional. A detailed description of the monitored resource type that might\nbe used in documentation.", - "type": "string" - }, - "displayName": { - "description": "Optional. A concise name for the monitored resource type that might be\ndisplayed in user interfaces. It should be a Title Cased Noun Phrase,\nwithout any article or other determiners. For example,\n`\"Google Cloud SQL Database\"`.", - "type": "string" - } - }, - "id": "MonitoredResourceDescriptor", - "description": "An object that describes the schema of a MonitoredResource object using a\ntype name and a set of labels. For example, the monitored resource\ndescriptor for Google Compute Engine VM instances has a type of\n`\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and\n`\"zone\"` to identify particular VM instances.\n\nDifferent APIs can support different monitored resource types. APIs generally\nprovide a `list` method that returns the monitored resource descriptors used\nby the API." - }, - "CustomAuthRequirements": { - "type": "object", - "properties": { - "provider": { - "description": "A configuration string containing connection information for the\nauthentication provider, typically formatted as a SmartService string\n(go/smartservice).", - "type": "string" - } - }, - "id": "CustomAuthRequirements", - "description": "Configuration for a custom authentication provider." - }, "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.", "type": "object", "properties": { + "useDirectDownload": { + "description": "A boolean that determines if direct download from ESF should be used for\ndownload of this media.", + "type": "boolean" + }, "enabled": { "description": "Whether download is enabled.", "type": "boolean" @@ -507,16 +248,23 @@ "type": "string" }, "dropzone": { - "type": "string", - "description": "Name of the Scotty dropzone to use for the current API." - }, - "useDirectDownload": { - "description": "A boolean that determines if direct download from ESF should be used for\ndownload of this media.", - "type": "boolean" + "description": "Name of the Scotty dropzone to use for the current API.", + "type": "string" } }, "id": "MediaDownload" }, + "CustomAuthRequirements": { + "type": "object", + "properties": { + "provider": { + "description": "A configuration string containing connection information for the\nauthentication provider, typically formatted as a SmartService string\n(go/smartservice).", + "type": "string" + } + }, + "id": "CustomAuthRequirements", + "description": "Configuration for a custom authentication provider." + }, "ChangeReport": { "description": "Change report associated with a particular service configuration.\n\nIt contains a list of ConfigChanges based on the comparison between\ntwo service configurations.", "type": "object", @@ -532,17 +280,18 @@ "id": "ChangeReport" }, "DisableServiceRequest": { + "description": "Request message for DisableService method.", + "type": "object", "properties": { "consumerId": { "description": "The identity of consumer resource which service disablement will be\napplied to.\n\nThe Google Service Management implementation accepts the following\nforms:\n- \"project:\u003cproject_id\u003e\"\n\nNote: this is made compatible with\ngoogle.api.servicecontrol.v1.Operation.consumer_id.", "type": "string" } }, - "id": "DisableServiceRequest", - "description": "Request message for DisableService method.", - "type": "object" + "id": "DisableServiceRequest" }, "SubmitConfigSourceResponse": { + "description": "Response message for SubmitConfigSource method.", "type": "object", "properties": { "serviceConfig": { @@ -550,25 +299,10 @@ "description": "The generated service configuration." } }, - "id": "SubmitConfigSourceResponse", - "description": "Response message for SubmitConfigSource method." + "id": "SubmitConfigSourceResponse" }, "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.", - "type": "object", "properties": { - "mimeTypes": { - "description": "An array of mimetype patterns. Esf will only accept uploads that match one\nof the given patterns.", - "items": { - "type": "string" - }, - "type": "array" - }, - "maxSize": { - "format": "int64", - "description": "Optional maximum acceptable size for an upload.\nThe size is specified in bytes.", - "type": "string" - }, "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" @@ -592,40 +326,51 @@ "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" + }, + "maxSize": { + "format": "int64", + "description": "Optional maximum acceptable size for an upload.\nThe size is specified in bytes.", + "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" } }, - "id": "MediaUpload" + "id": "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.", + "type": "object" }, "Advice": { "description": "Generated advice about this change, used for providing more\ninformation about how a change will affect the existing service.", "type": "object", "properties": { "description": { - "type": "string", - "description": "Useful description for why this advice was applied and what actions should\nbe taken to mitigate any implied risks." + "description": "Useful description for why this advice was applied and what actions should\nbe taken to mitigate any implied risks.", + "type": "string" } }, "id": "Advice" }, "ManagedService": { + "type": "object", "properties": { - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements.", - "type": "string" - }, "producerProjectId": { "description": "ID of the project that produces and owns this service.", "type": "string" + }, + "serviceName": { + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements.", + "type": "string" } }, "id": "ManagedService", - "description": "The full representation of a Service that is managed by\nGoogle Service Management.", - "type": "object" + "description": "The full representation of a Service that is managed by\nGoogle Service Management." }, "UsageRule": { - "id": "UsageRule", - "description": "Usage configuration rules for the service.\n\nNOTE: Under development.\n\n\nUse this rule to configure unregistered calls for the service. Unregistered\ncalls are calls that do not contain consumer project identity.\n(Example: calls that do not contain an API key).\nBy default, API methods do not allow unregistered calls, and each method call\nmust be identified by a consumer project identity. Use this rule to\nallow/disallow unregistered calls.\n\nExample of an API that wants to allow unregistered calls for entire service.\n\n usage:\n rules:\n - selector: \"*\"\n allow_unregistered_calls: true\n\nExample of a method that wants to allow unregistered calls.\n\n usage:\n rules:\n - selector: \"google.example.library.v1.LibraryService.CreateBook\"\n allow_unregistered_calls: true", - "type": "object", "properties": { "selector": { "description": "Selects the methods to which this rule applies. Use '*' to indicate all\nmethods in all APIs.\n\nRefer to selector for syntax details.", @@ -639,25 +384,27 @@ "description": "True, if the method allows unregistered calls; false otherwise.", "type": "boolean" } - } + }, + "id": "UsageRule", + "description": "Usage configuration rules for the service.\n\nNOTE: Under development.\n\n\nUse this rule to configure unregistered calls for the service. Unregistered\ncalls are calls that do not contain consumer project identity.\n(Example: calls that do not contain an API key).\nBy default, API methods do not allow unregistered calls, and each method call\nmust be identified by a consumer project identity. Use this rule to\nallow/disallow unregistered calls.\n\nExample of an API that wants to allow unregistered calls for entire service.\n\n usage:\n rules:\n - selector: \"*\"\n allow_unregistered_calls: true\n\nExample of a method that wants to allow unregistered calls.\n\n usage:\n rules:\n - selector: \"google.example.library.v1.LibraryService.CreateBook\"\n allow_unregistered_calls: true", + "type": "object" }, "TrafficPercentStrategy": { "description": "Strategy that specifies how clients of Google Service Controller want to\nsend traffic to use different config versions. This is generally\nused by API proxy to split traffic based on your configured precentage for\neach config version.\n\nOne example of how to gradually rollout a new service configuration using\nthis\nstrategy:\nDay 1\n\n Rollout {\n id: \"example.googleapis.com/rollout_20160206\"\n traffic_percent_strategy {\n percentages: {\n \"example.googleapis.com/20160201\": 70.00\n \"example.googleapis.com/20160206\": 30.00\n }\n }\n }\n\nDay 2\n\n Rollout {\n id: \"example.googleapis.com/rollout_20160207\"\n traffic_percent_strategy: {\n percentages: {\n \"example.googleapis.com/20160206\": 100.00\n }\n }\n }", "type": "object", "properties": { "percentages": { + "description": "Maps service configuration IDs to their corresponding traffic percentage.\nKey is the service configuration ID, Value is the traffic percentage\nwhich must be greater than 0.0 and the sum must equal to 100.0.", + "type": "object", "additionalProperties": { "format": "double", "type": "number" - }, - "description": "Maps service configuration IDs to their corresponding traffic percentage.\nKey is the service configuration ID, Value is the traffic percentage\nwhich must be greater than 0.0 and the sum must equal to 100.0.", - "type": "object" + } } }, "id": "TrafficPercentStrategy" }, "AuthRequirement": { - "description": "User-defined authentication requirements, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", "type": "object", "properties": { "audiences": { @@ -669,88 +416,20 @@ "type": "string" } }, - "id": "AuthRequirement" + "id": "AuthRequirement", + "description": "User-defined authentication requirements, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32)." }, - "Condition": { - "description": "A condition to be met.", + "Documentation": { + "description": "`Documentation` provides the information for describing a service.\n\nExample:\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: \u003e\n The Google Calendar API gives access\n to most calendar features.\n pages:\n - name: Overview\n content: (== include google/foo/overview.md ==)\n - name: Tutorial\n content: (== include google/foo/tutorial.md ==)\n subpages;\n - name: Java\n content: (== include google/foo/tutorial_java.md ==)\n rules:\n - selector: google.calendar.Calendar.Get\n description: \u003e\n ...\n - selector: google.calendar.Calendar.Put\n description: \u003e\n ...\n\u003c/code\u003e\u003c/pre\u003e\nDocumentation is provided in markdown syntax. In addition to\nstandard markdown features, definition lists, tables and fenced\ncode blocks are supported. Section headers can be provided and are\ninterpreted relative to the section nesting of the context where\na documentation fragment is embedded.\n\nDocumentation from the IDL is merged with documentation defined\nvia the config at normalization time, where documentation provided\nby config rules overrides IDL provided.\n\nA number of constructs specific to the API platform are supported\nin documentation text.\n\nIn order to reference a proto element, the following\nnotation can be used:\n\u003cpre\u003e\u003ccode\u003e[fully.qualified.proto.name][]\u003c/code\u003e\u003c/pre\u003e\nTo override the display text used for the link, this can be used:\n\u003cpre\u003e\u003ccode\u003e[display text][fully.qualified.proto.name]\u003c/code\u003e\u003c/pre\u003e\nText can be excluded from doc using the following notation:\n\u003cpre\u003e\u003ccode\u003e(-- internal comment --)\u003c/code\u003e\u003c/pre\u003e\nComments can be made conditional using a visibility label. The below\ntext will be only rendered if the `BETA` label is available:\n\u003cpre\u003e\u003ccode\u003e(--BETA: comment for BETA users --)\u003c/code\u003e\u003c/pre\u003e\nA few directives are available in documentation. Note that\ndirectives must appear on a single line to be properly\nidentified. The `include` directive includes a markdown file from\nan external source:\n\u003cpre\u003e\u003ccode\u003e(== include path/to/file ==)\u003c/code\u003e\u003c/pre\u003e\nThe `resource_for` directive marks a message to be the resource of\na collection in REST view. If it is not specified, tools attempt\nto infer the resource from the operations in a collection:\n\u003cpre\u003e\u003ccode\u003e(== resource_for v1.shelves.books ==)\u003c/code\u003e\u003c/pre\u003e\nThe directive `suppress_warning` does not directly affect documentation\nand is documented together with service config validation.", "type": "object", "properties": { - "sys": { - "description": "Trusted attributes supplied by any service that owns resources and uses\nthe IAM system for access control.", - "type": "string", - "enumDescriptions": [ - "Default non-attribute type", - "Region of the resource", - "Service name", - "Resource name", - "IP address of the caller" - ], - "enum": [ - "NO_ATTR", - "REGION", - "SERVICE", - "NAME", - "IP" - ] - }, - "value": { - "description": "DEPRECATED. Use 'values' instead.", - "type": "string" - }, - "values": { - "description": "The objects of the condition. This is mutually exclusive with 'value'.", + "pages": { + "description": "The top level pages for the documentation set.", "items": { - "type": "string" + "$ref": "Page" }, "type": "array" }, - "iam": { - "enumDescriptions": [ - "Default non-attribute.", - "Either principal or (if present) authority selector.", - "The principal (even if an authority selector is present), which\nmust only be used for attribution, not authorization.", - "An approver (distinct from the requester) that has authorized this\nrequest.\nWhen used with IN, the condition indicates that one of the approvers\nassociated with the request matches the specified principal, or is a\nmember of the specified group. Approvers can only grant additional\naccess, and are thus only used in a strictly positive context\n(e.g. ALLOW/IN or DENY/NOT_IN).", - "What types of justifications have been supplied with this request.\nString values should match enum names from tech.iam.JustificationType,\ne.g. \"MANUAL_STRING\". It is not permitted to grant access based on\nthe *absence* of a justification, so justification conditions can only\nbe used in a \"positive\" context (e.g., ALLOW/IN or DENY/NOT_IN).\n\nMultiple justifications, e.g., a Buganizer ID and a manually-entered\nreason, are normal and supported." - ], - "enum": [ - "NO_ATTR", - "AUTHORITY", - "ATTRIBUTION", - "APPROVER", - "JUSTIFICATION_TYPE" - ], - "description": "Trusted attributes supplied by the IAM system.", - "type": "string" - }, - "op": { - "description": "An operator to apply the subject with.", - "type": "string", - "enumDescriptions": [ - "Default no-op.", - "DEPRECATED. Use IN instead.", - "DEPRECATED. Use NOT_IN instead.", - "The condition is true if the subject (or any element of it if it is\na set) matches any of the supplied values.", - "The condition is true if the subject (or every element of it if it is\na set) matches none of the supplied values.", - "Subject is discharged" - ], - "enum": [ - "NO_OP", - "EQUALS", - "NOT_EQUALS", - "IN", - "NOT_IN", - "DISCHARGED" - ] - }, - "svc": { - "description": "Trusted attributes discharged by the service.", - "type": "string" - } - }, - "id": "Condition" - }, - "Documentation": { - "properties": { "summary": { "description": "A short summary of what the service does. Can only be provided by\nplain text.", "type": "string" @@ -769,31 +448,17 @@ "$ref": "DocumentationRule" }, "type": "array" - }, - "pages": { - "description": "The top level pages for the documentation set.", - "items": { - "$ref": "Page" - }, - "type": "array" } }, - "id": "Documentation", - "description": "`Documentation` provides the information for describing a service.\n\nExample:\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: \u003e\n The Google Calendar API gives access\n to most calendar features.\n pages:\n - name: Overview\n content: (== include google/foo/overview.md ==)\n - name: Tutorial\n content: (== include google/foo/tutorial.md ==)\n subpages;\n - name: Java\n content: (== include google/foo/tutorial_java.md ==)\n rules:\n - selector: google.calendar.Calendar.Get\n description: \u003e\n ...\n - selector: google.calendar.Calendar.Put\n description: \u003e\n ...\n\u003c/code\u003e\u003c/pre\u003e\nDocumentation is provided in markdown syntax. In addition to\nstandard markdown features, definition lists, tables and fenced\ncode blocks are supported. Section headers can be provided and are\ninterpreted relative to the section nesting of the context where\na documentation fragment is embedded.\n\nDocumentation from the IDL is merged with documentation defined\nvia the config at normalization time, where documentation provided\nby config rules overrides IDL provided.\n\nA number of constructs specific to the API platform are supported\nin documentation text.\n\nIn order to reference a proto element, the following\nnotation can be used:\n\u003cpre\u003e\u003ccode\u003e[fully.qualified.proto.name][]\u003c/code\u003e\u003c/pre\u003e\nTo override the display text used for the link, this can be used:\n\u003cpre\u003e\u003ccode\u003e[display text][fully.qualified.proto.name]\u003c/code\u003e\u003c/pre\u003e\nText can be excluded from doc using the following notation:\n\u003cpre\u003e\u003ccode\u003e(-- internal comment --)\u003c/code\u003e\u003c/pre\u003e\nComments can be made conditional using a visibility label. The below\ntext will be only rendered if the `BETA` label is available:\n\u003cpre\u003e\u003ccode\u003e(--BETA: comment for BETA users --)\u003c/code\u003e\u003c/pre\u003e\nA few directives are available in documentation. Note that\ndirectives must appear on a single line to be properly\nidentified. The `include` directive includes a markdown file from\nan external source:\n\u003cpre\u003e\u003ccode\u003e(== include path/to/file ==)\u003c/code\u003e\u003c/pre\u003e\nThe `resource_for` directive marks a message to be the resource of\na collection in REST view. If it is not specified, tools attempt\nto infer the resource from the operations in a collection:\n\u003cpre\u003e\u003ccode\u003e(== resource_for v1.shelves.books ==)\u003c/code\u003e\u003c/pre\u003e\nThe directive `suppress_warning` does not directly affect documentation\nand is documented together with service config validation.", - "type": "object" + "id": "Documentation" }, "AuditLogConfig": { + "id": "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.", "type": "object", "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": { + "type": "string", "enumDescriptions": [ "Default case. Should never be this.", "Admin reads. Example: CloudIAM getIamPolicy", @@ -806,15 +471,18 @@ "DATA_WRITE", "DATA_READ" ], - "description": "The log type that this config enables.", - "type": "string" + "description": "The log type that this config enables." + }, + "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" } - }, - "id": "AuditLogConfig" + } }, "ConfigSource": { - "description": "Represents a source file which is used to generate the service configuration\ndefined by `google.api.Service`.", - "type": "object", "properties": { "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.", @@ -828,17 +496,14 @@ "type": "array" } }, - "id": "ConfigSource" + "id": "ConfigSource", + "description": "Represents a source file which is used to generate the service configuration\ndefined by `google.api.Service`.", + "type": "object" }, "BackendRule": { "description": "A backend rule provides configuration for an individual API element.", "type": "object", "properties": { - "minDeadline": { - "format": "double", - "description": "Minimum deadline in seconds needed for this method. Calls having deadline\nvalue lower than this will be rejected.", - "type": "number" - }, "address": { "description": "The address of the API backend.", "type": "string" @@ -849,19 +514,25 @@ }, "deadline": { "format": "double", - "description": "The number of seconds to wait for a response from a request. The\ndefault depends on the deployment context.", + "description": "The number of seconds to wait for a response from a request. The default\ndeadline for gRPC and HTTP requests is 5 seconds.", + "type": "number" + }, + "minDeadline": { + "format": "double", + "description": "Minimum deadline in seconds needed for this method. Calls having deadline\nvalue lower than this will be rejected.", "type": "number" } }, "id": "BackendRule" }, "AuthenticationRule": { + "id": "AuthenticationRule", "description": "Authentication rules for the service.\n\nBy default, if a method has any authentication requirements, every request\nmust include a valid credential matching one of the requirements.\nIt's an error to include more than one kind of credential in a single\nrequest.\n\nIf a method doesn't have any auth requirements, request credentials will be\nignored.", "type": "object", "properties": { "allowWithoutCredential": { - "description": "Whether to allow requests without a credential. The credential can be\nan OAuth token, Google cookies (first-party auth) or EndUserCreds.\n\nFor requests without credentials, if the service control environment is\nspecified, each incoming request **must** be associated with a service\nconsumer. This can be done by passing an API key that belongs to a consumer\nproject.", - "type": "boolean" + "type": "boolean", + "description": "Whether to allow requests without a credential. The credential can be\nan OAuth token, Google cookies (first-party auth) or EndUserCreds.\n\nFor requests without credentials, if the service control environment is\nspecified, each incoming request **must** be associated with a service\nconsumer. This can be done by passing an API key that belongs to a consumer\nproject." }, "selector": { "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", @@ -876,14 +547,13 @@ "description": "The requirements for OAuth credentials." }, "requirements": { - "description": "Requirements for additional authentication providers.", "items": { "$ref": "AuthRequirement" }, - "type": "array" + "type": "array", + "description": "Requirements for additional authentication providers." } - }, - "id": "AuthenticationRule" + } }, "UndeleteServiceResponse": { "id": "UndeleteServiceResponse", @@ -891,8 +561,8 @@ "type": "object", "properties": { "service": { - "description": "Revived service resource.", - "$ref": "ManagedService" + "$ref": "ManagedService", + "description": "Revived service resource." } } }, @@ -900,11 +570,6 @@ "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", "type": "object", "properties": { - "version": { - "format": "int32", - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer" - }, "auditConfigs": { "description": "Specifies cloud audit logging configuration for this policy.", "items": { @@ -919,54 +584,26 @@ }, "type": "array" }, + "iamOwned": { + "type": "boolean" + }, "etag": { "format": "byte", "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.", "type": "string" }, - "iamOwned": { - "type": "boolean" - }, - "rules": { - "description": "If more than one rule is specified, the rules are applied in the following\nmanner:\n- All matching LOG rules are always applied.\n- If any DENY/DENY_WITH_LOG rule matches, permission is denied.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is\n granted.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if no rule applies, permission is denied.", - "items": { - "$ref": "Rule" - }, - "type": "array" + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" } }, "id": "Policy" }, "Api": { + "description": "Api is a light-weight descriptor for an API Interface.\n\nInterfaces are also described as \"protocol buffer services\" in some contexts,\nsuch as by the \"service\" keyword in a .proto file, but they are different\nfrom API Services, which represent a concrete implementation of an interface\nas opposed to simply a description of methods and bindings. They are also\nsometimes simply referred to as \"APIs\" in other contexts, such as the name of\nthis message itself. See https://cloud.google.com/apis/design/glossary for\ndetailed terminology.", "type": "object", "properties": { - "syntax": { - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`." - ], - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ], - "description": "The source syntax of the service.", - "type": "string" - }, - "sourceContext": { - "$ref": "SourceContext", - "description": "Source context for the protocol buffer service represented by this\nmessage." - }, - "version": { - "description": "A version string for this interface. If specified, must have the form\n`major-version.minor-version`, as in `1.10`. If the minor version is\nomitted, it defaults to zero. If the entire version field is empty, the\nmajor version is derived from the package name, as outlined below. If the\nfield is not empty, the version in the package name will be verified to be\nconsistent with what is provided here.\n\nThe versioning schema uses [semantic\nversioning](http://semver.org) where the major version number\nindicates a breaking change and the minor version an additive,\nnon-breaking change. Both version numbers are signals to users\nwhat to expect from different versions, and should be carefully\nchosen based on the product plan.\n\nThe major version is also reflected in the package name of the\ninterface, which must end in `v\u003cmajor-version\u003e`, as in\n`google.feature.v1`. For major versions 0 and 1, the suffix can\nbe omitted. Zero major versions must only be used for\nexperimental, non-GA interfaces.\n", - "type": "string" - }, - "mixins": { - "description": "Included interfaces. See Mixin.", - "items": { - "$ref": "Mixin" - }, - "type": "array" - }, "options": { "description": "Any metadata attached to the interface.", "items": { @@ -984,38 +621,46 @@ "name": { "description": "The fully qualified name of this interface, including package name\nfollowed by the interface's simple name.", "type": "string" - } - }, - "id": "Api", - "description": "Api is a light-weight descriptor for an API Interface.\n\nInterfaces are also described as \"protocol buffer services\" in some contexts,\nsuch as by the \"service\" keyword in a .proto file, but they are different\nfrom API Services, which represent a concrete implementation of an interface\nas opposed to simply a description of methods and bindings. They are also\nsometimes simply referred to as \"APIs\" in other contexts, such as the name of\nthis message itself. See https://cloud.google.com/apis/design/glossary for\ndetailed terminology." - }, - "DataAccessOptions": { - "description": "Write a Data Access (Gin) log", - "type": "object", - "properties": { - "logMode": { + }, + "syntax": { "type": "string", "enumDescriptions": [ - "Client is not required to write a partial Gin log immediately after\nthe authorization check. If client chooses to write one and it fails,\nclient may either fail open (allow the operation to continue) or\nfail closed (handle as a DENY outcome).", - "The application's operation in the context of which this authorization\ncheck is being made may only be performed if it is successfully logged\nto Gin. For instance, the authorization library may satisfy this\nobligation by emitting a partial log entry at authorization check time\nand only returning ALLOW to the application if it succeeds.\n\nIf a matching Rule has this directive, but the client has not indicated\nthat it will honor such requirements, then the IAM check will result in\nauthorization failure by setting CheckPolicyResponse.success=false." + "Syntax `proto2`.", + "Syntax `proto3`." ], "enum": [ - "LOG_MODE_UNSPECIFIED", - "LOG_FAIL_CLOSED" + "SYNTAX_PROTO2", + "SYNTAX_PROTO3" ], - "description": "Whether Gin logging should happen in a fail-closed manner at the caller.\nThis is relevant only in the LocalIAM implementation, for now." + "description": "The source syntax of the service." + }, + "sourceContext": { + "description": "Source context for the protocol buffer service represented by this\nmessage.", + "$ref": "SourceContext" + }, + "version": { + "description": "A version string for this interface. If specified, must have the form\n`major-version.minor-version`, as in `1.10`. If the minor version is\nomitted, it defaults to zero. If the entire version field is empty, the\nmajor version is derived from the package name, as outlined below. If the\nfield is not empty, the version in the package name will be verified to be\nconsistent with what is provided here.\n\nThe versioning schema uses [semantic\nversioning](http://semver.org) where the major version number\nindicates a breaking change and the minor version an additive,\nnon-breaking change. Both version numbers are signals to users\nwhat to expect from different versions, and should be carefully\nchosen based on the product plan.\n\nThe major version is also reflected in the package name of the\ninterface, which must end in `v\u003cmajor-version\u003e`, as in\n`google.feature.v1`. For major versions 0 and 1, the suffix can\nbe omitted. Zero major versions must only be used for\nexperimental, non-GA interfaces.\n", + "type": "string" + }, + "mixins": { + "description": "Included interfaces. See Mixin.", + "items": { + "$ref": "Mixin" + }, + "type": "array" } }, - "id": "DataAccessOptions" + "id": "Api" }, "MetricRule": { + "id": "MetricRule", "description": "Bind API methods to metrics. Binding a method to a metric causes that\nmetric's configured quota behaviors to apply to the method call.", "type": "object", "properties": { "metricCosts": { "additionalProperties": { - "type": "string", - "format": "int64" + "format": "int64", + "type": "string" }, "description": "Metrics to update when the selected methods are called, and the associated\ncost applied to each metric.\n\nThe key of the map is the metric name, and the values are the amount\nincreased for the metric against which the quota limits are defined.\nThe value must not be negative.", "type": "object" @@ -1024,24 +669,23 @@ "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", "type": "string" } - }, - "id": "MetricRule" + } }, "Authentication": { "properties": { - "providers": { - "items": { - "$ref": "AuthProvider" - }, - "type": "array", - "description": "Defines a set of authentication providers that a service supports." - }, "rules": { "description": "A list of authentication rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", "items": { "$ref": "AuthenticationRule" }, "type": "array" + }, + "providers": { + "description": "Defines a set of authentication providers that a service supports.", + "items": { + "$ref": "AuthProvider" + }, + "type": "array" } }, "id": "Authentication", @@ -1049,9 +693,24 @@ "type": "object" }, "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object" + }, + "name": { + "type": "string", + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`." + }, "error": { "$ref": "Status", "description": "The error result of the operation in case of failure or cancellation." @@ -1063,29 +722,19 @@ }, "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", "type": "object" - }, - "done": { - "type": "boolean", - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable." - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" } }, - "id": "Operation" + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call." }, "Page": { + "description": "Represents a documentation page. A page can contain subpages to represent\nnested documentation set structure.", "type": "object", "properties": { + "content": { + "description": "The Markdown content of the page. You can use \u003ccode\u003e(== include {path} ==)\u003c/code\u003e\nto include content from a Markdown file.", + "type": "string" + }, "subpages": { "description": "Subpages of this page. The order of subpages specified here will be\nhonored in the generated docset.", "items": { @@ -1096,27 +745,25 @@ "name": { "description": "The name of the page. It will be used as an identity of the page to\ngenerate URI of the page, text of the link to this page in navigation,\netc. The full page name (start from the root page name to this page\nconcatenated with `.`) can be used as reference to the page in your\ndocumentation. For example:\n\u003cpre\u003e\u003ccode\u003epages:\n- name: Tutorial\n content: (== include tutorial.md ==)\n subpages:\n - name: Java\n content: (== include tutorial_java.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nYou can reference `Java` page using Markdown reference link syntax:\n`Java`.", "type": "string" - }, - "content": { - "description": "The Markdown content of the page. You can use \u003ccode\u003e(== include {path} ==)\u003c/code\u003e\nto include content from a Markdown file.", - "type": "string" } }, - "id": "Page", - "description": "Represents a documentation page. A page can contain subpages to represent\nnested documentation set structure." + "id": "Page" }, "Status": { + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", "properties": { "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { + "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - }, - "type": "object" + } }, - "type": "array", - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." + "type": "array" }, "code": { "format": "int32", @@ -1127,17 +774,12 @@ "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", "type": "string" } - }, - "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object" + } }, "Binding": { + "description": "Associates `members` with a `role`.", + "type": "object", "properties": { - "role": { - "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", - "type": "string" - }, "condition": { "$ref": "Expr", "description": "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.\nThis field is GOOGLE_INTERNAL." @@ -1148,15 +790,15 @@ "type": "string" }, "type": "array" + }, + "role": { + "type": "string", + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired" } }, - "id": "Binding", - "description": "Associates `members` with a `role`.", - "type": "object" + "id": "Binding" }, "AuthProvider": { - "description": "Configuration for an anthentication provider, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", - "type": "object", "properties": { "audiences": { "description": "The list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com", @@ -1179,54 +821,28 @@ "type": "string" } }, - "id": "AuthProvider" + "id": "AuthProvider", + "description": "Configuration for an anthentication provider, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", + "type": "object" }, "Service": { + "description": "`Service` is the root object of Google service configuration schema. It\ndescribes basic information about a service, such as the name and the\ntitle, and delegates other aspects to sub-sections. Each sub-section is\neither a proto message or a repeated proto message that configures a\nspecific aspect, such as auth. See each proto message definition for details.\n\nExample:\n\n type: google.api.Service\n config_version: 3\n name: calendar.googleapis.com\n title: Google Calendar API\n apis:\n - name: google.calendar.v3.Calendar\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth", + "type": "object", "properties": { - "documentation": { - "$ref": "Documentation", - "description": "Additional API documentation." - }, - "logging": { - "$ref": "Logging", - "description": "Logging configuration." - }, - "monitoredResources": { - "description": "Defines the monitored resources used by this service. This is required\nby the Service.monitoring and Service.logging configurations.", - "items": { - "$ref": "MonitoredResourceDescriptor" - }, - "type": "array" - }, - "enums": { - "description": "A list of all enum types included in this API service. Enums\nreferenced directly or indirectly by the `apis` are automatically\nincluded. Enums which are not referenced but shall be included\nshould be listed here by name. Example:\n\n enums:\n - name: google.someapi.v1.SomeEnum", - "items": { - "$ref": "Enum" - }, - "type": "array" - }, - "context": { - "$ref": "Context", - "description": "Context 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.", - "type": "string" - }, "usage": { "$ref": "Usage", "description": "Configuration controlling usage of this service." }, "metrics": { + "description": "Defines the metrics used by this service.", "items": { "$ref": "MetricDescriptor" }, - "type": "array", - "description": "Defines the metrics used by this service." + "type": "array" }, "authentication": { - "description": "Auth configuration.", - "$ref": "Authentication" + "$ref": "Authentication", + "description": "Auth configuration." }, "experimental": { "$ref": "Experimental", @@ -1242,52 +858,45 @@ "type": "integer" }, "monitoring": { - "$ref": "Monitoring", - "description": "Monitoring configuration." + "description": "Monitoring configuration.", + "$ref": "Monitoring" + }, + "producerProjectId": { + "type": "string", + "description": "The Google project that owns this service." }, "systemTypes": { - "description": "A list of all proto message types included in this API service.\nIt serves similar purpose as [google.api.Service.types], except that\nthese types are not needed by user-defined APIs. Therefore, they will not\nshow up in the generated discovery doc. This field should only be used\nto define system APIs in ESF.", "items": { "$ref": "Type" }, - "type": "array" - }, - "producerProjectId": { - "description": "The Google project that owns this service.", - "type": "string" + "type": "array", + "description": "A list of all proto message types included in this API service.\nIt serves similar purpose as [google.api.Service.types], except that\nthese types are not needed by user-defined APIs. Therefore, they will not\nshow up in the generated discovery doc. This field should only be used\nto define system APIs in ESF." }, "visibility": { - "$ref": "Visibility", - "description": "API visibility configuration." + "description": "API visibility configuration.", + "$ref": "Visibility" }, "quota": { - "$ref": "Quota", - "description": "Quota configuration." + "description": "Quota configuration.", + "$ref": "Quota" }, "name": { "description": "The DNS address at which this service is available,\ne.g. `calendar.googleapis.com`.", "type": "string" }, "customError": { - "description": "Custom error configuration.", - "$ref": "CustomError" + "$ref": "CustomError", + "description": "Custom error configuration." }, "title": { "description": "The product title for this service.", "type": "string" }, "endpoints": { + "description": "Configuration for network endpoints. If this is empty, then an endpoint\nwith the same name as the service is automatically generated to service all\ndefined APIs.", "items": { "$ref": "Endpoint" }, - "type": "array", - "description": "Configuration for network endpoints. If this is empty, then an endpoint\nwith the same name as the service is automatically generated to service all\ndefined APIs." - }, - "apis": { - "description": "A list of API interfaces exported by this service. Only the `name` field\nof the google.protobuf.Api needs to be provided by the configuration\nauthor, as the remaining fields will be derived from the IDL during the\nnormalization process. It is an error to specify an API interface here\nwhich cannot be resolved against the associated IDL files.", - "items": { - "$ref": "Api" - }, "type": "array" }, "logs": { @@ -1297,6 +906,13 @@ }, "type": "array" }, + "apis": { + "description": "A list of API interfaces exported by this service. Only the `name` field\nof the google.protobuf.Api needs to be provided by the configuration\nauthor, as the remaining fields will be derived from the IDL during the\nnormalization process. It is an error to specify an API interface here\nwhich cannot be resolved against the associated IDL files.", + "items": { + "$ref": "Api" + }, + "type": "array" + }, "types": { "description": "A list of all proto message types included in this API service.\nTypes referenced directly or indirectly by the `apis` are\nautomatically included. Messages which are not referenced but\nshall be included, such as types used by the `google.protobuf.Any` type,\nshould be listed here by name. Example:\n\n types:\n - name: google.protobuf.Int32", "items": { @@ -1305,38 +921,62 @@ "type": "array" }, "sourceInfo": { - "$ref": "SourceInfo", - "description": "Output only. The source information for this configuration if available." + "description": "Output only. The source information for this configuration if available.", + "$ref": "SourceInfo" }, "http": { - "$ref": "Http", - "description": "HTTP configuration." + "description": "HTTP configuration.", + "$ref": "Http" + }, + "backend": { + "$ref": "Backend", + "description": "API backend configuration." }, "systemParameters": { "description": "System parameter configuration.", "$ref": "SystemParameters" }, - "backend": { - "$ref": "Backend", - "description": "API backend configuration." + "documentation": { + "$ref": "Documentation", + "description": "Additional API documentation." + }, + "monitoredResources": { + "items": { + "$ref": "MonitoredResourceDescriptor" + }, + "type": "array", + "description": "Defines the monitored resources used by this service. This is required\nby the Service.monitoring and Service.logging configurations." + }, + "logging": { + "$ref": "Logging", + "description": "Logging configuration." + }, + "enums": { + "description": "A list of all enum types included in this API service. Enums\nreferenced directly or indirectly by the `apis` are automatically\nincluded. Enums which are not referenced but shall be included\nshould be listed here by name. Example:\n\n enums:\n - name: google.someapi.v1.SomeEnum", + "items": { + "$ref": "Enum" + }, + "type": "array" + }, + "context": { + "$ref": "Context", + "description": "Context 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.", + "type": "string" } }, - "id": "Service", - "description": "`Service` is the root object of Google service configuration schema. It\ndescribes basic information about a service, such as the name and the\ntitle, and delegates other aspects to sub-sections. Each sub-section is\neither a proto message or a repeated proto message that configures a\nspecific aspect, such as auth. See each proto message definition for details.\n\nExample:\n\n type: google.api.Service\n config_version: 3\n name: calendar.googleapis.com\n title: Google Calendar API\n apis:\n - name: google.calendar.v3.Calendar\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth", - "type": "object" + "id": "Service" }, "EnumValue": { + "id": "EnumValue", "description": "Enum value definition.", "type": "object", "properties": { - "number": { - "format": "int32", - "description": "Enum value number.", - "type": "integer" - }, "name": { - "type": "string", - "description": "Enum value name." + "description": "Enum value name.", + "type": "string" }, "options": { "description": "Protocol buffer options.", @@ -1344,24 +984,28 @@ "$ref": "Option" }, "type": "array" + }, + "number": { + "format": "int32", + "description": "Enum value number.", + "type": "integer" } - }, - "id": "EnumValue" + } }, "ListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "type": "object", "properties": { - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, "nextPageToken": { "description": "The standard List next-page token.", "type": "string" + }, + "operations": { + "items": { + "$ref": "Operation" + }, + "type": "array", + "description": "A list of operations that matches the specified filter in the request." } }, "id": "ListOperationsResponse" @@ -1370,18 +1014,20 @@ "description": "A custom pattern is used for defining custom HTTP verb.", "type": "object", "properties": { - "path": { - "description": "The path matched by this custom verb.", - "type": "string" - }, "kind": { "description": "The name of this custom HTTP verb.", "type": "string" + }, + "path": { + "description": "The path matched by this custom verb.", + "type": "string" } }, "id": "CustomHttpPattern" }, "OperationMetadata": { + "description": "The metadata associated with a long running operation resource.", + "type": "object", "properties": { "startTime": { "format": "google-datetime", @@ -1408,11 +1054,11 @@ "type": "integer" } }, - "id": "OperationMetadata", - "description": "The metadata associated with a long running operation resource.", - "type": "object" + "id": "OperationMetadata" }, "SystemParameterRule": { + "description": "Define a system parameter rule mapping system parameter definitions to\nmethods.", + "type": "object", "properties": { "selector": { "description": "Selects the methods to which this rule applies. Use '*' to indicate all\nmethods in all APIs.\n\nRefer to selector for syntax details.", @@ -1426,30 +1072,12 @@ "type": "array" } }, - "id": "SystemParameterRule", - "description": "Define a system parameter rule mapping system parameter definitions to\nmethods.", - "type": "object" + "id": "SystemParameterRule" }, "HttpRule": { "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&sub.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¶m=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.", "type": "object", "properties": { - "delete": { - "description": "Used for deleting a resource.", - "type": "string" - }, - "body": { - "type": "string", - "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." - }, - "post": { - "description": "Used for creating a resource.", - "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." - }, "additionalBindings": { "items": { "$ref": "HttpRule" @@ -1470,20 +1098,36 @@ "type": "string" }, "custom": { - "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.", - "$ref": "CustomHttpPattern" + "$ref": "CustomHttpPattern", + "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." }, "patch": { - "type": "string", - "description": "Used for updating a resource." + "description": "Used for updating a resource.", + "type": "string" }, "get": { - "description": "Used for listing and getting information about resources.", - "type": "string" + "type": "string", + "description": "Used for listing and getting information about resources." }, "put": { "description": "Used for updating a resource.", "type": "string" + }, + "delete": { + "description": "Used for deleting a resource.", + "type": "string" + }, + "body": { + "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" + }, + "post": { + "description": "Used for creating a resource.", + "type": "string" + }, + "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.", + "$ref": "MediaDownload" } }, "id": "HttpRule" @@ -1497,33 +1141,31 @@ "type": "string" }, "selector": { - "type": "string", - "description": "Selects methods, messages, fields, enums, etc. to which this rule applies.\n\nRefer to selector for syntax details." + "description": "Selects methods, messages, fields, enums, etc. to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" } }, "id": "VisibilityRule" }, "MonitoringDestination": { - "id": "MonitoringDestination", "description": "Configuration of a specific monitoring destination (the producer project\nor the consumer project).", "type": "object", "properties": { + "monitoredResource": { + "description": "The monitored resource type. The type must be defined in\nService.monitored_resources section.", + "type": "string" + }, "metrics": { "description": "Names of the metrics to report to this monitoring destination.\nEach name must be defined in Service.metrics section.", "items": { "type": "string" }, "type": "array" - }, - "monitoredResource": { - "description": "The monitored resource type. The type must be defined in\nService.monitored_resources section.", - "type": "string" } - } + }, + "id": "MonitoringDestination" }, "Visibility": { - "description": "`Visibility` defines restrictions for the visibility of service\nelements. Restrictions are specified using visibility labels\n(e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.\n\nUsers and projects can have access to more than one visibility label. The\neffective visibility for multiple labels is the union of each label's\nelements, plus any unrestricted elements.\n\nIf an element and its parents have no restrictions, visibility is\nunconditionally granted.\n\nExample:\n\n visibility:\n rules:\n - selector: google.calendar.Calendar.EnhancedSearch\n restriction: TRUSTED_TESTER\n - selector: google.calendar.Calendar.Delegate\n restriction: GOOGLE_INTERNAL\n\nHere, all methods are publicly visible except for the restricted methods\nEnhancedSearch and Delegate.", - "type": "object", "properties": { "rules": { "description": "A list of visibility rules that apply to individual API elements.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", @@ -1533,9 +1175,13 @@ "type": "array" } }, - "id": "Visibility" + "id": "Visibility", + "description": "`Visibility` defines restrictions for the visibility of service\nelements. Restrictions are specified using visibility labels\n(e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.\n\nUsers and projects can have access to more than one visibility label. The\neffective visibility for multiple labels is the union of each label's\nelements, plus any unrestricted elements.\n\nIf an element and its parents have no restrictions, visibility is\nunconditionally granted.\n\nExample:\n\n visibility:\n rules:\n - selector: google.calendar.Calendar.EnhancedSearch\n restriction: TRUSTED_TESTER\n - selector: google.calendar.Calendar.Delegate\n restriction: GOOGLE_INTERNAL\n\nHere, all methods are publicly visible except for the restricted methods\nEnhancedSearch and Delegate.", + "type": "object" }, "SystemParameters": { + "description": "### System parameter configuration\n\nA system parameter is a special kind of parameter defined by the API\nsystem, not by an individual API. It is typically mapped to an HTTP header\nand/or a URL query parameter. This configuration specifies which methods\nchange the names of the system parameters.", + "type": "object", "properties": { "rules": { "description": "Define system parameters.\n\nThe parameters defined here will override the default parameters\nimplemented by the system. If this field is missing from the service\nconfig, default system parameters will be used. Default system parameters\nand names is implementation-dependent.\n\nExample: define api key for all methods\n\n system_parameters\n rules:\n - selector: \"*\"\n parameters:\n - name: api_key\n url_query_parameter: api_key\n\n\nExample: define 2 api key names for a specific method.\n\n system_parameters\n rules:\n - selector: \"/ListShelves\"\n parameters:\n - name: api_key\n http_header: Api-Key1\n - name: api_key\n http_header: Api-Key2\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", @@ -1545,32 +1191,13 @@ "type": "array" } }, - "id": "SystemParameters", - "description": "### System parameter configuration\n\nA system parameter is a special kind of parameter defined by the API\nsystem, not by an individual API. It is typically mapped to an HTTP header\nand/or a URL query parameter. This configuration specifies which methods\nchange the names of the system parameters.", - "type": "object" + "id": "SystemParameters" }, "ConfigChange": { - "description": "Output generated from semantically comparing two versions of a service\nconfiguration.\n\nIncludes detailed information about a field that have changed with\napplicable advice about potential consequences for the change, such as\nbackwards-incompatibility.", - "type": "object", "properties": { - "element": { - "description": "Object hierarchy path to the change, with levels separated by a '.'\ncharacter. For repeated fields, an applicable unique identifier field is\nused for the index (usually selector, name, or id). For maps, the term\n'key' is used. If the field has no unique identifier, the numeric index\nis used.\nExamples:\n- visibility.rules[selector==\"google.LibraryService.CreateBook\"].restriction\n- quota.metric_rules[selector==\"google\"].metric_costs[key==\"reads\"].value\n- logging.producer_destinations[0]", - "type": "string" - }, - "advices": { - "items": { - "$ref": "Advice" - }, - "type": "array", - "description": "Collection of advice provided for this change, useful for determining the\npossible impact of this change." - }, - "oldValue": { - "description": "Value of the changed object in the old Service configuration,\nin JSON format. This field will not be populated if ChangeType == ADDED.", - "type": "string" - }, "newValue": { - "description": "Value of the changed object in the new Service configuration,\nin JSON format. This field will not be populated if ChangeType == REMOVED.", - "type": "string" + "type": "string", + "description": "Value of the changed object in the new Service configuration,\nin JSON format. This field will not be populated if ChangeType == REMOVED." }, "changeType": { "description": "The type for this change, either ADDED, REMOVED, or MODIFIED.", @@ -1587,12 +1214,28 @@ "REMOVED", "MODIFIED" ] + }, + "element": { + "description": "Object hierarchy path to the change, with levels separated by a '.'\ncharacter. For repeated fields, an applicable unique identifier field is\nused for the index (usually selector, name, or id). For maps, the term\n'key' is used. If the field has no unique identifier, the numeric index\nis used.\nExamples:\n- visibility.rules[selector==\"google.LibraryService.CreateBook\"].restriction\n- quota.metric_rules[selector==\"google\"].metric_costs[key==\"reads\"].value\n- logging.producer_destinations[0]", + "type": "string" + }, + "advices": { + "description": "Collection of advice provided for this change, useful for determining the\npossible impact of this change.", + "items": { + "$ref": "Advice" + }, + "type": "array" + }, + "oldValue": { + "description": "Value of the changed object in the old Service configuration,\nin JSON format. This field will not be populated if ChangeType == ADDED.", + "type": "string" } }, - "id": "ConfigChange" + "id": "ConfigChange", + "description": "Output generated from semantically comparing two versions of a service\nconfiguration.\n\nIncludes detailed information about a field that have changed with\napplicable advice about potential consequences for the change, such as\nbackwards-incompatibility.", + "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\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", "type": "object", "properties": { "limits": { @@ -1603,19 +1246,36 @@ "type": "array" }, "metricRules": { + "description": "List of `MetricRule` definitions, each one mapping a selected method to one\nor more metrics.", "items": { "$ref": "MetricRule" }, - "type": "array", - "description": "List of `MetricRule` definitions, each one mapping a selected method to one\nor more metrics." + "type": "array" } }, - "id": "Quota" + "id": "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\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" }, "Rollout": { "description": "A rollout resource that defines how service configuration versions are pushed\nto control plane systems. Typically, you create a new version of the\nservice config, and then create a Rollout to push the service config.", "type": "object", "properties": { + "serviceName": { + "description": "The name of the service associated with this Rollout.", + "type": "string" + }, + "trafficPercentStrategy": { + "description": "Google Service Control selects service configurations based on\ntraffic percentage.", + "$ref": "TrafficPercentStrategy" + }, + "createdBy": { + "description": "The user who created the Rollout. Readonly.", + "type": "string" + }, + "rolloutId": { + "description": "Optional unique identifier of this Rollout. Only lower case letters, digits\n and '-' are allowed.\n\nIf not specified by client, the server will generate one. The generated id\nwill have the form of \u003cdate\u003e\u003crevision number\u003e, where \"date\" is the create\ndate in ISO 8601 format. \"revision number\" is a monotonically increasing\npositive number that is reset every day for each service.\nAn example of the generated rollout_id is '2016-02-16r1'", + "type": "string" + }, "deleteServiceStrategy": { "$ref": "DeleteServiceStrategy", "description": "The strategy associated with a rollout to delete a `ManagedService`.\nReadonly." @@ -1626,7 +1286,6 @@ "description": "Creation time of the rollout. Readonly." }, "status": { - "description": "The status of this rollout. Readonly. In case of a failed rollout,\nthe system will automatically rollback to the current Rollout\nversion. Readonly.", "type": "string", "enumDescriptions": [ "No status specified.", @@ -1645,23 +1304,8 @@ "FAILED", "PENDING", "FAILED_ROLLED_BACK" - ] - }, - "serviceName": { - "description": "The name of the service associated with this Rollout.", - "type": "string" - }, - "createdBy": { - "description": "The user who created the Rollout. Readonly.", - "type": "string" - }, - "trafficPercentStrategy": { - "$ref": "TrafficPercentStrategy", - "description": "Google Service Control selects service configurations based on\ntraffic percentage." - }, - "rolloutId": { - "type": "string", - "description": "Optional unique identifier of this Rollout. Only lower case letters, digits\n and '-' are allowed.\n\nIf not specified by client, the server will generate one. The generated id\nwill have the form of \u003cdate\u003e\u003crevision number\u003e, where \"date\" is the create\ndate in ISO 8601 format. \"revision number\" is a monotonically increasing\npositive number that is reset every day for each service.\nAn example of the generated rollout_id is '2016-02-16r1'" + ], + "description": "The status of this rollout. Readonly. In case of a failed rollout,\nthe system will automatically rollback to the current Rollout\nversion. Readonly." } }, "id": "Rollout" @@ -1682,8 +1326,8 @@ "description": "Service configuration for which we want to generate the report.\nFor this version of API, the supported types are\ngoogle.api.servicemanagement.v1.ConfigRef,\ngoogle.api.servicemanagement.v1.ConfigSource,\nand google.api.Service", "type": "object", "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" } } }, @@ -1699,21 +1343,18 @@ "type": "string" }, "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.", - "$ref": "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." } }, "id": "SetIamPolicyRequest" }, - "DeleteServiceStrategy": { - "properties": {}, - "id": "DeleteServiceStrategy", - "description": "Strategy used to delete a service. This strategy is a placeholder only\nused by the system generated rollout to delete a service.", - "type": "object" - }, "Step": { + "description": "Represents the status of one operation step.", + "type": "object", "properties": { "status": { + "type": "string", "enumDescriptions": [ "Unspecifed code.", "The operation or step has completed without errors.", @@ -1730,19 +1371,23 @@ "FAILED", "CANCELLED" ], - "description": "The status code.", - "type": "string" + "description": "The status code." }, "description": { "description": "The short description of the step.", "type": "string" } }, - "id": "Step", - "description": "Represents the status of one operation step.", - "type": "object" + "id": "Step" + }, + "DeleteServiceStrategy": { + "description": "Strategy used to delete a service. This strategy is a placeholder only\nused by the system generated rollout to delete a service.", + "type": "object", + "properties": {}, + "id": "DeleteServiceStrategy" }, "LoggingDestination": { + "description": "Configuration of a specific logging destination (the producer project\nor the consumer project).", "type": "object", "properties": { "logs": { @@ -1757,29 +1402,29 @@ "type": "string" } }, - "id": "LoggingDestination", - "description": "Configuration of a specific logging destination (the producer project\nor the consumer project)." + "id": "LoggingDestination" }, "Option": { + "id": "Option", "description": "A protocol buffer option, which can be attached to a message, field,\nenumeration, etc.", "type": "object", "properties": { - "name": { - "description": "The option's name. For protobuf built-in options (options defined in\ndescriptor.proto), this is the short name. For example, `\"map_entry\"`.\nFor custom options, it should be the fully-qualified name. For example,\n`\"google.api.http\"`.", - "type": "string" - }, "value": { + "type": "object", "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,\nthe corresponding wrapper type defined in google/protobuf/wrappers.proto\nshould be used. If the value is an enum, it should be stored as an int32\nvalue using the google.protobuf.Int32Value type.", - "type": "object" + "description": "The option's value packed in an Any message. If the value is a primitive,\nthe corresponding wrapper type defined in google/protobuf/wrappers.proto\nshould be used. If the value is an enum, it should be stored as an int32\nvalue using the google.protobuf.Int32Value type." + }, + "name": { + "description": "The option's name. For protobuf built-in options (options defined in\ndescriptor.proto), this is the short name. For example, `\"map_entry\"`.\nFor custom options, it should be the fully-qualified name. For example,\n`\"google.api.http\"`.", + "type": "string" } - }, - "id": "Option" + } }, "Logging": { + "type": "object", "properties": { "consumerDestinations": { "description": "Logging configurations for sending logs to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none consumer destination.", @@ -1789,72 +1434,18 @@ "type": "array" }, "producerDestinations": { - "description": "Logging configurations for sending logs to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none producer destination.", "items": { "$ref": "LoggingDestination" }, - "type": "array" + "type": "array", + "description": "Logging configurations for sending logs to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none producer destination." } }, "id": "Logging", - "description": "Logging configuration of the service.\n\nThe following example shows how to configure logs to be sent to the\nproducer and consumer projects. In the example, the `activity_history`\nlog is sent to both the producer and consumer projects, whereas the\n`purchase_history` log is only sent to the producer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n logs:\n - name: activity_history\n labels:\n - key: /customer_id\n - name: purchase_history\n logging:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history\n - purchase_history\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history", - "type": "object" - }, - "QuotaLimit": { - "properties": { - "duration": { - "description": "Duration of this limit in textual notation. Example: \"100s\", \"24h\", \"1d\".\nFor duration longer than a day, only multiple of days is supported. We\nsupport only \"100s\" and \"1d\" for now. Additional support will be added in\nthe future. \"0\" indicates indefinite duration.\n\nUsed by group-based quotas only.", - "type": "string" - }, - "freeTier": { - "format": "int64", - "description": "Free tier value displayed in the Developers Console for this limit.\nThe free tier is the number of tokens that will be subtracted from the\nbilled amount when billing is enabled.\nThis field can only be set on a limit with duration \"1d\", in a billable\ngroup; it is invalid on any other limit. If this field is not set, it\ndefaults to 0, indicating that there is no free tier for this service.\n\nUsed by group-based quotas only.", - "type": "string" - }, - "defaultLimit": { - "format": "int64", - "description": "Default number of tokens that can be consumed during the specified\nduration. This is the number of tokens assigned when a client\napplication developer activates the service for his/her project.\n\nSpecifying a value of 0 will block all requests. This can be used if you\nare provisioning quota to selected consumers and blocking others.\nSimilarly, a value of -1 will indicate an unlimited quota. No other\nnegative values are allowed.\n\nUsed by group-based quotas only.", - "type": "string" - }, - "metric": { - "description": "The name of the metric this quota limit applies to. The quota limits with\nthe same metric will be checked together during runtime. The metric must be\ndefined within the service config.\n\nUsed by metric-based quotas only.", - "type": "string" - }, - "displayName": { - "description": "User-visible display name for this limit.\nOptional. If not set, the UI will provide a default display name based on\nthe quota configuration. This field can be used to override the default\ndisplay name generated from the configuration.", - "type": "string" - }, - "description": { - "description": "Optional. User-visible, extended description for this quota limit.\nShould be used only when more context is needed to understand this limit\nthan provided by the limit's display name (see: `display_name`).", - "type": "string" - }, - "values": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "Tiered limit values, currently only STANDARD is supported.", - "type": "object" - }, - "unit": { - "description": "Specify the unit of the quota limit. It uses the same syntax as\nMetric.unit. The supported unit kinds are determined by the quota\nbackend system.\n\nThe [Google Service Control](https://cloud.google.com/service-control)\nsupports the following unit components:\n* One of the time intevals:\n * \"/min\" for quota every minute.\n * \"/d\" for quota every 24 hours, starting 00:00 US Pacific Time.\n * Otherwise the quota won't be reset by time, such as storage limit.\n* One and only one of the granted containers:\n * \"/{project}\" quota for a project\n\nHere are some examples:\n* \"1/min/{project}\" for quota per minute per project.\n\nNote: the order of unit components is insignificant.\nThe \"1\" at the beginning is required to follow the metric unit syntax.\n\nUsed by metric-based quotas only.", - "type": "string" - }, - "maxLimit": { - "format": "int64", - "description": "Maximum number of tokens that can be consumed during the specified\nduration. Client application developers can override the default limit up\nto this maximum. If specified, this value cannot be set to a value less\nthan the default limit. If not specified, it is set to the default limit.\n\nTo allow clients to apply overrides with no upper bound, set this to -1,\nindicating unlimited maximum quota.\n\nUsed by group-based quotas only.", - "type": "string" - }, - "name": { - "description": "Name of the quota limit. The name is used to refer to the limit when\noverriding the default limit on per-consumer basis.\n\nFor metric-based quota limits, the name must be provided, and it must be\nunique within the service. The name can only include alphanumeric\ncharacters as well as '-'.\n\nThe maximum length of the limit name is 64 characters.\n\nThe name of a limit is used as a unique identifier for this limit.\nTherefore, once a limit has been put into use, its name should be\nimmutable. You can use the display_name field to provide a user-friendly\nname for the limit. The display name can be evolved over time without\naffecting the identity of the limit.", - "type": "string" - } - }, - "id": "QuotaLimit", - "description": "`QuotaLimit` defines a specific limit that applies over a specified duration\nfor a limit type. There can be at most one limit for a duration and limit\ntype combination defined within a `QuotaGroup`.", - "type": "object" + "description": "Logging configuration of the service.\n\nThe following example shows how to configure logs to be sent to the\nproducer and consumer projects. In the example, the `activity_history`\nlog is sent to both the producer and consumer projects, whereas the\n`purchase_history` log is only sent to the producer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n logs:\n - name: activity_history\n labels:\n - key: /customer_id\n - name: purchase_history\n logging:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history\n - purchase_history\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history" }, "Method": { + "type": "object", "properties": { "responseTypeUrl": { "description": "The URL of the output message type.", @@ -1880,8 +1471,8 @@ "type": "string" }, "requestStreaming": { - "description": "If true, the request is streamed.", - "type": "boolean" + "type": "boolean", + "description": "If true, the request is streamed." }, "syntax": { "enumDescriptions": [ @@ -1897,8 +1488,61 @@ } }, "id": "Method", - "description": "Method represents a method of an API interface.", - "type": "object" + "description": "Method represents a method of an API interface." + }, + "QuotaLimit": { + "description": "`QuotaLimit` defines a specific limit that applies over a specified duration\nfor a limit type. There can be at most one limit for a duration and limit\ntype combination defined within a `QuotaGroup`.", + "type": "object", + "properties": { + "freeTier": { + "format": "int64", + "description": "Free tier value displayed in the Developers Console for this limit.\nThe free tier is the number of tokens that will be subtracted from the\nbilled amount when billing is enabled.\nThis field can only be set on a limit with duration \"1d\", in a billable\ngroup; it is invalid on any other limit. If this field is not set, it\ndefaults to 0, indicating that there is no free tier for this service.\n\nUsed by group-based quotas only.", + "type": "string" + }, + "duration": { + "description": "Duration of this limit in textual notation. Example: \"100s\", \"24h\", \"1d\".\nFor duration longer than a day, only multiple of days is supported. We\nsupport only \"100s\" and \"1d\" for now. Additional support will be added in\nthe future. \"0\" indicates indefinite duration.\n\nUsed by group-based quotas only.", + "type": "string" + }, + "defaultLimit": { + "format": "int64", + "description": "Default number of tokens that can be consumed during the specified\nduration. This is the number of tokens assigned when a client\napplication developer activates the service for his/her project.\n\nSpecifying a value of 0 will block all requests. This can be used if you\nare provisioning quota to selected consumers and blocking others.\nSimilarly, a value of -1 will indicate an unlimited quota. No other\nnegative values are allowed.\n\nUsed by group-based quotas only.", + "type": "string" + }, + "description": { + "description": "Optional. User-visible, extended description for this quota limit.\nShould be used only when more context is needed to understand this limit\nthan provided by the limit's display name (see: `display_name`).", + "type": "string" + }, + "metric": { + "description": "The name of the metric this quota limit applies to. The quota limits with\nthe same metric will be checked together during runtime. The metric must be\ndefined within the service config.\n\nUsed by metric-based quotas only.", + "type": "string" + }, + "displayName": { + "description": "User-visible display name for this limit.\nOptional. If not set, the UI will provide a default display name based on\nthe quota configuration. This field can be used to override the default\ndisplay name generated from the configuration.", + "type": "string" + }, + "values": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "Tiered limit values, currently only STANDARD is supported.", + "type": "object" + }, + "unit": { + "description": "Specify the unit of the quota limit. It uses the same syntax as\nMetric.unit. The supported unit kinds are determined by the quota\nbackend system.\n\nThe [Google Service Control](https://cloud.google.com/service-control)\nsupports the following unit components:\n* One of the time intevals:\n * \"/min\" for quota every minute.\n * \"/d\" for quota every 24 hours, starting 00:00 US Pacific Time.\n * Otherwise the quota won't be reset by time, such as storage limit.\n* One and only one of the granted containers:\n * \"/{project}\" quota for a project\n\nHere are some examples:\n* \"1/min/{project}\" for quota per minute per project.\n\nNote: the order of unit components is insignificant.\nThe \"1\" at the beginning is required to follow the metric unit syntax.\n\nUsed by metric-based quotas only.", + "type": "string" + }, + "maxLimit": { + "format": "int64", + "description": "Maximum number of tokens that can be consumed during the specified\nduration. Client application developers can override the default limit up\nto this maximum. If specified, this value cannot be set to a value less\nthan the default limit. If not specified, it is set to the default limit.\n\nTo allow clients to apply overrides with no upper bound, set this to -1,\nindicating unlimited maximum quota.\n\nUsed by group-based quotas only.", + "type": "string" + }, + "name": { + "description": "Name of the quota limit. The name is used to refer to the limit when\noverriding the default limit on per-consumer basis.\n\nFor metric-based quota limits, the name must be provided, and it must be\nunique within the service. The name can only include alphanumeric\ncharacters as well as '-'.\n\nThe maximum length of the limit name is 64 characters.\n\nThe name of a limit is used as a unique identifier for this limit.\nTherefore, once a limit has been put into use, its name should be\nimmutable. You can use the display_name field to provide a user-friendly\nname for the limit. The display name can be evolved over time without\naffecting the identity of the limit.", + "type": "string" + } + }, + "id": "QuotaLimit" }, "ConfigRef": { "description": "Represents a service configuration with its name and id.", @@ -1930,7 +1574,6 @@ "id": "ListServiceRolloutsResponse" }, "Mixin": { - "description": "Declares an API Interface to be included in this interface. The including\ninterface must redeclare all the methods from the included interface, but\ndocumentation and options are inherited as follows:\n\n- If after comment and whitespace stripping, the documentation\n string of the redeclared method is empty, it will be inherited\n from the original method.\n\n- Each annotation belonging to the service config (http,\n visibility) which is not set in the redeclared method will be\n inherited.\n\n- If an http annotation is inherited, the path pattern will be\n modified as follows. Any version prefix will be replaced by the\n version of the including interface plus the root path if\n specified.\n\nExample of a simple mixin:\n\n package google.acl.v1;\n service AccessControl {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v1/{resource=**}:getAcl\";\n }\n }\n\n package google.storage.v2;\n service Storage {\n // rpc GetAcl(GetAclRequest) returns (Acl);\n\n // Get a data record.\n rpc GetData(GetDataRequest) returns (Data) {\n option (google.api.http).get = \"/v2/{resource=**}\";\n }\n }\n\nExample of a mixin configuration:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n\nThe mixin construct implies that all methods in `AccessControl` are\nalso declared with same name and request/response types in\n`Storage`. A documentation generator or annotation processor will\nsee the effective `Storage.GetAcl` method after inherting\ndocumentation and annotations as follows:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/{resource=**}:getAcl\";\n }\n ...\n }\n\nNote how the version in the path pattern changed from `v1` to `v2`.\n\nIf the `root` field in the mixin is specified, it should be a\nrelative path under which inherited HTTP paths are placed. Example:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n root: acls\n\nThis implies the following inherited HTTP annotation:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\";\n }\n ...\n }", "type": "object", "properties": { "name": { @@ -1942,9 +1585,11 @@ "type": "string" } }, - "id": "Mixin" + "id": "Mixin", + "description": "Declares an API Interface to be included in this interface. The including\ninterface must redeclare all the methods from the included interface, but\ndocumentation and options are inherited as follows:\n\n- If after comment and whitespace stripping, the documentation\n string of the redeclared method is empty, it will be inherited\n from the original method.\n\n- Each annotation belonging to the service config (http,\n visibility) which is not set in the redeclared method will be\n inherited.\n\n- If an http annotation is inherited, the path pattern will be\n modified as follows. Any version prefix will be replaced by the\n version of the including interface plus the root path if\n specified.\n\nExample of a simple mixin:\n\n package google.acl.v1;\n service AccessControl {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v1/{resource=**}:getAcl\";\n }\n }\n\n package google.storage.v2;\n service Storage {\n // rpc GetAcl(GetAclRequest) returns (Acl);\n\n // Get a data record.\n rpc GetData(GetDataRequest) returns (Data) {\n option (google.api.http).get = \"/v2/{resource=**}\";\n }\n }\n\nExample of a mixin configuration:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n\nThe mixin construct implies that all methods in `AccessControl` are\nalso declared with same name and request/response types in\n`Storage`. A documentation generator or annotation processor will\nsee the effective `Storage.GetAcl` method after inherting\ndocumentation and annotations as follows:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/{resource=**}:getAcl\";\n }\n ...\n }\n\nNote how the version in the path pattern changed from `v1` to `v2`.\n\nIf the `root` field in the mixin is specified, it should be a\nrelative path under which inherited HTTP paths are placed. Example:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n root: acls\n\nThis implies the following inherited HTTP annotation:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\";\n }\n ...\n }" }, "FlowOperationMetadata": { + "type": "object", "properties": { "deadline": { "format": "google-datetime", @@ -1952,6 +1597,8 @@ "type": "string" }, "cancelState": { + "description": "The state of the operation with respect to cancellation.", + "type": "string", "enumDescriptions": [ "Default state, cancellable but not cancelled.", "The operation has proceeded past the point of no return and cannot\nbe cancelled.", @@ -1961,9 +1608,7 @@ "RUNNING", "UNCANCELLABLE", "CANCELLED" - ], - "description": "The state of the operation with respect to cancellation.", - "type": "string" + ] }, "startTime": { "format": "google-datetime", @@ -1978,71 +1623,59 @@ "type": "array" }, "flowName": { - "description": "The name of the top-level flow corresponding to this operation.\nMust be equal to the \"name\" field for a FlowName enum.", - "type": "string" + "type": "string", + "description": "The name of the top-level flow corresponding to this operation.\nMust be equal to the \"name\" field for a FlowName enum." } }, "id": "FlowOperationMetadata", - "description": "The metadata associated with a long running operation resource.", - "type": "object" + "description": "The metadata associated with a long running operation resource." }, "CustomError": { "description": "Customize service error responses. For example, list any service\nspecific protobuf types that can appear in error detail lists of\nerror responses.\n\nExample:\n\n custom_error:\n types:\n - google.foo.v1.CustomError\n - google.foo.v1.AnotherError", "type": "object", "properties": { - "types": { - "description": "The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.", - "items": { - "type": "string" - }, - "type": "array" - }, "rules": { "description": "The list of custom error rules that apply to individual API messages.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", "items": { "$ref": "CustomErrorRule" }, "type": "array" + }, + "types": { + "description": "The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.", + "items": { + "type": "string" + }, + "type": "array" } }, "id": "CustomError" }, - "CounterOptions": { - "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only,\nand end in \"_count\". Field names should not contain an initial slash.\nThe actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are\ntheir respective values.\n\nAt present the only supported field names are\n - \"iam_principal\", corresponding to IAMContext.principal;\n - \"\" (empty string), resulting in one aggretated counter with no field.\n\nExamples:\n counter { metric: \"/debug_access_count\" field: \"iam_principal\" }\n ==\u003e increment counter /iam/policy/backend_debug_access_count\n {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support:\n* multiple field names (though this may be supported in the future)\n* decrementing the counter\n* incrementing it by anything other than 1", + "Http": { + "description": "Defines the HTTP configuration for an API service. It contains a list of\nHttpRule, each specifying the mapping of an RPC method\nto one or more HTTP REST API methods.", "type": "object", "properties": { - "field": { - "description": "The field value to attribute.", - "type": "string" + "fullyDecodeReservedExpansion": { + "description": "When set to true, URL path parmeters will be fully URI-decoded except in\ncases of single segment matches in reserved expansion, where \"%2F\" will be\nleft encoded.\n\nThe default behavior is to not decode RFC 6570 reserved characters in multi\nsegment matches.", + "type": "boolean" }, - "metric": { - "description": "The metric to update.", - "type": "string" - } - }, - "id": "CounterOptions" - }, - "Http": { - "properties": { "rules": { "description": "A list of HTTP configuration rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", "items": { "$ref": "HttpRule" }, "type": "array" - }, - "fullyDecodeReservedExpansion": { - "description": "When set to true, URL path parmeters will be fully URI-decoded except in\ncases of single segment matches in reserved expansion, where \"%2F\" will be\nleft encoded.\n\nThe default behavior is to not decode RFC 6570 reserved characters in multi\nsegment matches.", - "type": "boolean" } }, - "id": "Http", - "description": "Defines the HTTP configuration for an API service. It contains a list of\nHttpRule, each specifying the mapping of an RPC method\nto one or more HTTP REST API methods.", - "type": "object" + "id": "Http" }, "SourceInfo": { + "id": "SourceInfo", + "description": "Source information used to create a Service Config", + "type": "object", "properties": { "sourceFiles": { + "description": "All files used during config generation.", "items": { "type": "object", "additionalProperties": { @@ -2050,13 +1683,9 @@ "type": "any" } }, - "type": "array", - "description": "All files used during config generation." + "type": "array" } - }, - "id": "SourceInfo", - "description": "Source information used to create a Service Config", - "type": "object" + } }, "Control": { "description": "Selects and configures the service controller used by the service. The\nservice controller handles features like abuse, quota, billing, logging,\nmonitoring, etc.", @@ -2082,70 +1711,16 @@ "type": "string" }, "name": { - "type": "string", - "description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive." + "description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive.", + "type": "string" } }, "id": "SystemParameter" }, - "Monitoring": { - "description": "Monitoring configuration of the service.\n\nThe example below shows how to configure monitored resources and metrics\nfor monitoring. In the example, a monitored resource and two metrics are\ndefined. The `library.googleapis.com/book/returned_count` metric is sent\nto both producer and consumer projects, whereas the\n`library.googleapis.com/book/overdue_count` metric is only sent to the\nconsumer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n metrics:\n - name: library.googleapis.com/book/returned_count\n metric_kind: DELTA\n value_type: INT64\n labels:\n - key: /customer_id\n - name: library.googleapis.com/book/overdue_count\n metric_kind: GAUGE\n value_type: INT64\n labels:\n - key: /customer_id\n monitoring:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n - library.googleapis.com/book/overdue_count", - "type": "object", - "properties": { - "consumerDestinations": { - "description": "Monitoring configurations for sending metrics to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none consumer destination.", - "items": { - "$ref": "MonitoringDestination" - }, - "type": "array" - }, - "producerDestinations": { - "description": "Monitoring configurations for sending metrics to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none producer destination.", - "items": { - "$ref": "MonitoringDestination" - }, - "type": "array" - } - }, - "id": "Monitoring" - }, "Field": { "description": "A single field of a message type.", "type": "object", "properties": { - "oneofIndex": { - "format": "int32", - "description": "The index of the field type in `Type.oneofs`, for message or enumeration\ntypes. The first type has index 1; zero means the type is not in the list.", - "type": "integer" - }, - "packed": { - "description": "Whether to use alternative packed wire representation.", - "type": "boolean" - }, - "cardinality": { - "enum": [ - "CARDINALITY_UNKNOWN", - "CARDINALITY_OPTIONAL", - "CARDINALITY_REQUIRED", - "CARDINALITY_REPEATED" - ], - "description": "The field cardinality.", - "type": "string", - "enumDescriptions": [ - "For fields with unknown cardinality.", - "For optional fields.", - "For required fields. Proto2 syntax only.", - "For repeated fields." - ] - }, - "defaultValue": { - "description": "The string value of the default value of this field. Proto2 syntax only.", - "type": "string" - }, - "name": { - "description": "The field name.", - "type": "string" - }, "typeUrl": { "description": "The field type URL, without the scheme, for message or enumeration\ntypes. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.", "type": "string" @@ -2160,7 +1735,6 @@ "type": "string" }, "kind": { - "description": "The field type.", "type": "string", "enumDescriptions": [ "Field type unknown.", @@ -2203,7 +1777,8 @@ "TYPE_SFIXED64", "TYPE_SINT32", "TYPE_SINT64" - ] + ], + "description": "The field type." }, "options": { "description": "The protocol buffer options.", @@ -2211,13 +1786,65 @@ "$ref": "Option" }, "type": "array" + }, + "oneofIndex": { + "format": "int32", + "description": "The index of the field type in `Type.oneofs`, for message or enumeration\ntypes. The first type has index 1; zero means the type is not in the list.", + "type": "integer" + }, + "packed": { + "description": "Whether to use alternative packed wire representation.", + "type": "boolean" + }, + "cardinality": { + "enum": [ + "CARDINALITY_UNKNOWN", + "CARDINALITY_OPTIONAL", + "CARDINALITY_REQUIRED", + "CARDINALITY_REPEATED" + ], + "description": "The field cardinality.", + "type": "string", + "enumDescriptions": [ + "For fields with unknown cardinality.", + "For optional fields.", + "For required fields. Proto2 syntax only.", + "For repeated fields." + ] + }, + "defaultValue": { + "description": "The string value of the default value of this field. Proto2 syntax only.", + "type": "string" + }, + "name": { + "type": "string", + "description": "The field name." } }, "id": "Field" }, - "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", + "Monitoring": { "type": "object", + "properties": { + "producerDestinations": { + "description": "Monitoring configurations for sending metrics to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none producer destination.", + "items": { + "$ref": "MonitoringDestination" + }, + "type": "array" + }, + "consumerDestinations": { + "description": "Monitoring configurations for sending metrics to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none consumer destination.", + "items": { + "$ref": "MonitoringDestination" + }, + "type": "array" + } + }, + "id": "Monitoring", + "description": "Monitoring configuration of the service.\n\nThe example below shows how to configure monitored resources and metrics\nfor monitoring. In the example, a monitored resource and two metrics are\ndefined. The `library.googleapis.com/book/returned_count` metric is sent\nto both producer and consumer projects, whereas the\n`library.googleapis.com/book/overdue_count` metric is only sent to the\nconsumer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n metrics:\n - name: library.googleapis.com/book/returned_count\n metric_kind: DELTA\n value_type: INT64\n labels:\n - key: /customer_id\n - name: library.googleapis.com/book/overdue_count\n metric_kind: GAUGE\n value_type: INT64\n labels:\n - key: /customer_id\n monitoring:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n - library.googleapis.com/book/overdue_count" + }, + "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).", @@ -2227,12 +1854,36 @@ "type": "array" } }, - "id": "TestIamPermissionsRequest" + "id": "TestIamPermissionsRequest", + "description": "Request message for `TestIamPermissions` method.", + "type": "object" }, "Enum": { - "description": "Enum type definition.", "type": "object", "properties": { + "options": { + "items": { + "$ref": "Option" + }, + "type": "array", + "description": "Protocol buffer options." + }, + "syntax": { + "type": "string", + "enumDescriptions": [ + "Syntax `proto2`.", + "Syntax `proto3`." + ], + "enum": [ + "SYNTAX_PROTO2", + "SYNTAX_PROTO3" + ], + "description": "The source syntax." + }, + "sourceContext": { + "$ref": "SourceContext", + "description": "The source context." + }, "enumvalue": { "description": "Enum value definitions.", "items": { @@ -2243,40 +1894,22 @@ "name": { "description": "Enum type name.", "type": "string" - }, - "options": { - "items": { - "$ref": "Option" - }, - "type": "array", - "description": "Protocol buffer options." - }, - "syntax": { - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`." - ], - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ], - "description": "The source syntax.", - "type": "string" - }, - "sourceContext": { - "$ref": "SourceContext", - "description": "The source context." } }, - "id": "Enum" + "id": "Enum", + "description": "Enum type definition." }, "LabelDescriptor": { - "description": "A description of a label.", - "type": "object", "properties": { + "key": { + "description": "The label key.", + "type": "string" + }, + "description": { + "description": "A human-readable description for the label.", + "type": "string" + }, "valueType": { - "description": "The type of data that can be assigned to the label.", - "type": "string", "enumDescriptions": [ "A variable-length string. This is the default.", "Boolean; true or false.", @@ -2286,18 +1919,14 @@ "STRING", "BOOL", "INT64" - ] - }, - "key": { - "description": "The label key.", - "type": "string" - }, - "description": { - "description": "A human-readable description for the label.", + ], + "description": "The type of data that can be assigned to the label.", "type": "string" } }, - "id": "LabelDescriptor" + "id": "LabelDescriptor", + "description": "A description of a label.", + "type": "object" }, "Diagnostic": { "description": "Represents a diagnostic message (error or warning)", @@ -2327,20 +1956,27 @@ "id": "Diagnostic" }, "EnableServiceRequest": { - "id": "EnableServiceRequest", "description": "Request message for EnableService method.", "type": "object", "properties": { "consumerId": { - "type": "string", - "description": "The identity of consumer resource which service enablement will be\napplied to.\n\nThe Google Service Management implementation accepts the following\nforms:\n- \"project:\u003cproject_id\u003e\"\n\nNote: this is made compatible with\ngoogle.api.servicecontrol.v1.Operation.consumer_id." + "description": "The identity of consumer resource which service enablement will be\napplied to.\n\nThe Google Service Management implementation accepts the following\nforms:\n- \"project:\u003cproject_id\u003e\"\n\nNote: this is made compatible with\ngoogle.api.servicecontrol.v1.Operation.consumer_id.", + "type": "string" } - } + }, + "id": "EnableServiceRequest" }, "Type": { "description": "A protocol buffer message type.", "type": "object", "properties": { + "options": { + "description": "The protocol buffer options.", + "items": { + "$ref": "Option" + }, + "type": "array" + }, "fields": { "description": "The list of fields.", "items": { @@ -2359,10 +1995,6 @@ }, "type": "array" }, - "sourceContext": { - "$ref": "SourceContext", - "description": "The source context." - }, "syntax": { "description": "The source syntax.", "type": "string", @@ -2375,12 +2007,9 @@ "SYNTAX_PROTO3" ] }, - "options": { - "description": "The protocol buffer options.", - "items": { - "$ref": "Option" - }, - "type": "array" + "sourceContext": { + "description": "The source context.", + "$ref": "SourceContext" } }, "id": "Type" @@ -2389,6 +2018,13 @@ "description": "Response message for GenerateConfigReport method.", "type": "object", "properties": { + "changeReports": { + "items": { + "$ref": "ChangeReport" + }, + "type": "array", + "description": "list of ChangeReport, each corresponding to comparison between two\nservice configurations." + }, "id": { "description": "ID of the service configuration this report belongs to.", "type": "string" @@ -2403,18 +2039,12 @@ "serviceName": { "description": "Name of the service this report belongs to.", "type": "string" - }, - "changeReports": { - "items": { - "$ref": "ChangeReport" - }, - "type": "array", - "description": "list of ChangeReport, each corresponding to comparison between two\nservice configurations." } }, "id": "GenerateConfigReportResponse" }, "ListServiceConfigsResponse": { + "description": "Response message for ListServiceConfigs method.", "type": "object", "properties": { "serviceConfigs": { @@ -2429,19 +2059,32 @@ "type": "string" } }, - "id": "ListServiceConfigsResponse", - "description": "Response message for ListServiceConfigs method." + "id": "ListServiceConfigsResponse" }, "Experimental": { + "description": "Experimental service configuration. These configuration options can\nonly be used by whitelisted users.", + "type": "object", "properties": { "authorization": { "$ref": "AuthorizationConfig", "description": "Authorization configuration." } }, - "id": "Experimental", - "description": "Experimental service configuration. These configuration options can\nonly be used by whitelisted users.", - "type": "object" + "id": "Experimental" + }, + "Backend": { + "description": "`Backend` defines the backend configuration for a service.", + "type": "object", + "properties": { + "rules": { + "description": "A list of API backend rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", + "items": { + "$ref": "BackendRule" + }, + "type": "array" + } + }, + "id": "Backend" }, "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\nAuditConfig 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.", @@ -2458,29 +2101,15 @@ "type": "string" }, "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.\nNext ID: 4", "items": { "$ref": "AuditLogConfig" }, - "type": "array" + "type": "array", + "description": "The configuration for logging of each type of permission.\nNext ID: 4" } }, "id": "AuditConfig" }, - "Backend": { - "properties": { - "rules": { - "description": "A list of API backend rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", - "items": { - "$ref": "BackendRule" - }, - "type": "array" - } - }, - "id": "Backend", - "description": "`Backend` defines the backend configuration for a service.", - "type": "object" - }, "SubmitConfigSourceRequest": { "description": "Request message for SubmitConfigSource method.", "type": "object", @@ -2490,31 +2119,15 @@ "$ref": "ConfigSource" }, "validateOnly": { - "type": "boolean", - "description": "Optional. If set, this will result in the generation of a\n`google.api.Service` configuration based on the `ConfigSource` provided,\nbut the generated config and the sources will NOT be persisted." + "description": "Optional. If set, this will result in the generation of a\n`google.api.Service` configuration based on the `ConfigSource` provided,\nbut the generated config and the sources will NOT be persisted.", + "type": "boolean" } }, "id": "SubmitConfigSourceRequest" }, - "AuthorizationConfig": { - "type": "object", - "properties": { - "provider": { - "description": "The name of the authorization provider, such as\nfirebaserules.googleapis.com.", - "type": "string" - } - }, - "id": "AuthorizationConfig", - "description": "Configuration of authorization.\n\nThis section determines the authorization provider, if unspecified, then no\nauthorization check will be done.\n\nExample:\n\n experimental:\n authorization:\n provider: firebaserules.googleapis.com" - }, "DocumentationRule": { - "description": "A documentation rule provides information about individual API elements.", "type": "object", "properties": { - "description": { - "description": "Description of the selected API(s).", - "type": "string" - }, "deprecationDescription": { "description": "Deprecation description of the selected element(s). It can be provided if an\nelement is marked as `deprecated`.", "type": "string" @@ -2522,20 +2135,188 @@ "selector": { "description": "The selector is a comma-separated list of patterns. Each pattern is a\nqualified name of the element which may end in \"*\", indicating a wildcard.\nWildcards are only allowed at the end and for a whole component of the\nqualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". To\nspecify a default for all applicable elements, the whole pattern \"*\"\nis used.", "type": "string" + }, + "description": { + "description": "Description of the selected API(s).", + "type": "string" } }, - "id": "DocumentationRule" + "id": "DocumentationRule", + "description": "A documentation rule provides information about individual API elements." + }, + "AuthorizationConfig": { + "id": "AuthorizationConfig", + "description": "Configuration of authorization.\n\nThis section determines the authorization provider, if unspecified, then no\nauthorization check will be done.\n\nExample:\n\n experimental:\n authorization:\n provider: firebaserules.googleapis.com", + "type": "object", + "properties": { + "provider": { + "description": "The name of the authorization provider, such as\nfirebaserules.googleapis.com.", + "type": "string" + } + } + }, + "ContextRule": { + "id": "ContextRule", + "description": "A context rule provides information about the context for an individual API\nelement.", + "type": "object", + "properties": { + "provided": { + "description": "A list of full type names of provided contexts.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requested": { + "description": "A list of full type names of requested contexts.", + "items": { + "type": "string" + }, + "type": "array" + }, + "selector": { + "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" + } + } + }, + "SourceContext": { + "properties": { + "fileName": { + "description": "The path-qualified name of the .proto file that contained the associated\nprotobuf element. For example: `\"google/protobuf/source_context.proto\"`.", + "type": "string" + } + }, + "id": "SourceContext", + "description": "`SourceContext` represents information about the source of a\nprotobuf element, like the file in which it is defined.", + "type": "object" + }, + "MetricDescriptor": { + "description": "Defines a metric type and its schema. Once a metric descriptor is created,\ndeleting or altering it stops data collection and makes the metric type's\nexisting data unusable.", + "type": "object", + "properties": { + "metricKind": { + "enum": [ + "METRIC_KIND_UNSPECIFIED", + "GAUGE", + "DELTA", + "CUMULATIVE" + ], + "description": "Whether the metric records instantaneous values, changes to a value, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", + "type": "string", + "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\nmeasurements in a time series should have the same start time\nand increasing end times, until an event resets the cumulative\nvalue to zero and sets a new start time for the following\npoints." + ] + }, + "displayName": { + "description": "A concise name for the metric, which can be displayed in user interfaces.\nUse sentence case without an ending period, for example \"Request count\".", + "type": "string" + }, + "description": { + "type": "string", + "description": "A detailed description of the metric, which can be used in documentation." + }, + "unit": { + "description": "The unit in which the metric value is reported. It is only applicable\nif the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The\nsupported units are a subset of [The Unified Code for Units of\nMeasure](http://unitsofmeasure.org/ucum.html) standard:\n\n**Basic units (UNIT)**\n\n* `bit` bit\n* `By` byte\n* `s` second\n* `min` minute\n* `h` hour\n* `d` day\n\n**Prefixes (PREFIX)**\n\n* `k` kilo (10**3)\n* `M` mega (10**6)\n* `G` giga (10**9)\n* `T` tera (10**12)\n* `P` peta (10**15)\n* `E` exa (10**18)\n* `Z` zetta (10**21)\n* `Y` yotta (10**24)\n* `m` milli (10**-3)\n* `u` micro (10**-6)\n* `n` nano (10**-9)\n* `p` pico (10**-12)\n* `f` femto (10**-15)\n* `a` atto (10**-18)\n* `z` zepto (10**-21)\n* `y` yocto (10**-24)\n* `Ki` kibi (2**10)\n* `Mi` mebi (2**20)\n* `Gi` gibi (2**30)\n* `Ti` tebi (2**40)\n\n**Grammar**\n\nThe grammar includes the dimensionless unit `1`, such as `1/s`.\n\nThe grammar also includes these connectors:\n\n* `/` division (as an infix operator, e.g. `1/s`).\n* `.` multiplication (as an infix operator, e.g. `GBy.d`)\n\nThe grammar for a unit is as follows:\n\n Expression = Component { \".\" Component } { \"/\" Component } ;\n\n Component = [ PREFIX ] UNIT [ Annotation ]\n | Annotation\n | \"1\"\n ;\n\n Annotation = \"{\" NAME \"}\" ;\n\nNotes:\n\n* `Annotation` is just a comment if it follows a `UNIT` and is\n equivalent to `1` if it is used alone. For examples,\n `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.\n* `NAME` is a sequence of non-blank printable ASCII characters not\n containing '{' or '}'.", + "type": "string" + }, + "labels": { + "items": { + "$ref": "LabelDescriptor" + }, + "type": "array", + "description": "The set of labels that can be used to describe a specific\ninstance of this metric type. For example, the\n`appengine.googleapis.com/http/server/response_latencies` metric\ntype has a label for the HTTP response code, `response_code`, so\nyou can look at latencies for successful responses or just\nfor responses that failed." + }, + "name": { + "description": "The resource name of the metric descriptor. Depending on the\nimplementation, the name typically includes: (1) the parent resource name\nthat defines the scope of the metric type or of its data; and (2) the\nmetric's URL-encoded type, which also appears in the `type` field of this\ndescriptor. For example, following is the resource name of a custom\nmetric within the GCP project `my-project-id`:\n\n \"projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount\"", + "type": "string" + }, + "type": { + "description": "The metric type, including its DNS name prefix. The type is not\nURL-encoded. All user-defined custom metric types have the DNS name\n`custom.googleapis.com`. Metric types should use a natural hierarchical\ngrouping. For example:\n\n \"custom.googleapis.com/invoice/paid/amount\"\n \"appengine.googleapis.com/http/server/response_latencies\"", + "type": "string" + }, + "valueType": { + "description": "Whether the measurement is an integer, a floating-point number, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", + "type": "string", + "enumDescriptions": [ + "Do not use this default value.", + "The value is a boolean.\nThis 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.\nThis value type can be used only if the metric kind is `GAUGE`.", + "The value is a `Distribution`.", + "The value is money." + ], + "enum": [ + "VALUE_TYPE_UNSPECIFIED", + "BOOL", + "INT64", + "DOUBLE", + "STRING", + "DISTRIBUTION", + "MONEY" + ] + } + }, + "id": "MetricDescriptor" + }, + "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\"", + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "An optional string indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file." + }, + "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": { + "type": "string", + "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." + }, + "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" + } + }, + "id": "Expr" + }, + "ListServicesResponse": { + "description": "Response message for `ListServices` method.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Token that can be passed to `ListServices` to resume a paginated query.", + "type": "string" + }, + "services": { + "description": "The returned services will only have the name field set.", + "items": { + "$ref": "ManagedService" + }, + "type": "array" + } + }, + "id": "ListServicesResponse" } }, + "protocol": "rest", "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "protocol": "rest", "canonicalName": "Service Management", "auth": { "oauth2": { "scopes": { + "https://www.googleapis.com/auth/service.management": { + "description": "Manage your Google API service configuration" + }, "https://www.googleapis.com/auth/service.management.readonly": { "description": "View your Google API service configuration" }, @@ -2544,9 +2325,6 @@ }, "https://www.googleapis.com/auth/cloud-platform": { "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/service.management": { - "description": "Manage your Google API service configuration" } } } @@ -2562,20 +2340,21 @@ "operations": { "methods": { "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", "httpMethod": "GET", - "response": { - "$ref": "Operation" - }, "parameterOrder": [ "name" ], + "response": { + "$ref": "Operation" + }, "parameters": { "name": { - "location": "path", - "description": "The name of the operation resource.", "type": "string", "required": true, - "pattern": "^operations/.+$" + "pattern": "^operations/.+$", + "location": "path", + "description": "The name of the operation resource." } }, "scopes": [ @@ -2584,31 +2363,14 @@ ], "flatPath": "v1/operations/{operationsId}", "path": "v1/{+name}", - "id": "servicemanagement.operations.get", - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." + "id": "servicemanagement.operations.get" }, "list": { - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/service.management" ], "parameters": { - "pageSize": { - "format": "int32", - "description": "The maximum number of operations to return. If unspecified, defaults to\n50. The maximum value is 100.", - "type": "integer", - "location": "query" - }, - "filter": { - "description": "A string for filtering Operations.\n The following filter fields are supported:\n\n * serviceName: Required. Only `=` operator is allowed.\n * startTime: The time this job was started, in ISO 8601 format.\n Allowed operators are `\u003e=`, `\u003e`, `\u003c=`, and `\u003c`.\n * status: Can be `done`, `in_progress`, or `failed`. Allowed\n operators are `=`, and `!=`.\n\n Filter expression supports conjunction (AND) and disjunction (OR)\n logical operators. However, the serviceName restriction must be at the\n top-level and can only be combined with other restrictions via the AND\n logical operator.\n\n Examples:\n\n * `serviceName={some-service}.googleapis.com`\n * `serviceName={some-service}.googleapis.com AND startTime\u003e=\"2017-02-01\"`\n * `serviceName={some-service}.googleapis.com AND status=done`\n * `serviceName={some-service}.googleapis.com AND (status=done OR startTime\u003e=\"2017-02-01\")`", - "type": "string", - "location": "query" - }, "pageToken": { "location": "query", "description": "The standard list page token.", @@ -2618,19 +2380,65 @@ "location": "query", "description": "Not used.", "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The maximum number of operations to return. If unspecified, defaults to\n50. The maximum value is 100.", + "type": "integer" + }, + "filter": { + "type": "string", + "location": "query", + "description": "A string for filtering Operations.\n The following filter fields are supported:\n\n * serviceName: Required. Only `=` operator is allowed.\n * startTime: The time this job was started, in ISO 8601 format.\n Allowed operators are `\u003e=`, `\u003e`, `\u003c=`, and `\u003c`.\n * status: Can be `done`, `in_progress`, or `failed`. Allowed\n operators are `=`, and `!=`.\n\n Filter expression supports conjunction (AND) and disjunction (OR)\n logical operators. However, the serviceName restriction must be at the\n top-level and can only be combined with other restrictions via the AND\n logical operator.\n\n Examples:\n\n * `serviceName={some-service}.googleapis.com`\n * `serviceName={some-service}.googleapis.com AND startTime\u003e=\"2017-02-01\"`\n * `serviceName={some-service}.googleapis.com AND status=done`\n * `serviceName={some-service}.googleapis.com AND (status=done OR startTime\u003e=\"2017-02-01\")`" } }, "flatPath": "v1/operations", "id": "servicemanagement.operations.list", "path": "v1/operations", - "description": "Lists service operations that match the specified filter in the request." + "description": "Lists service operations that match the specified filter in the request.", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET" } } }, "services": { "methods": { + "testIamPermissions": { + "id": "servicemanagement.services.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "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.", + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "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.", + "type": "string", + "required": true, + "pattern": "^services/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/services/{servicesId}:testIamPermissions" + }, "getConfig": { - "flatPath": "v1/services/{serviceName}/config", "id": "servicemanagement.services.getConfig", "path": "v1/services/{serviceName}/config", "description": "Gets a service configuration (version) for a managed service.", @@ -2641,12 +2449,6 @@ "serviceName" ], "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ], "parameters": { "serviceName": { "location": "path", @@ -2655,139 +2457,18 @@ "required": true }, "configId": { + "location": "query", "description": "The id of the service configuration resource.", - "type": "string", - "location": "query" + "type": "string" }, "view": { + "description": "Specifies which parts of the Service Config should be returned in the\nresponse.", + "type": "string", "location": "query", "enum": [ "BASIC", "FULL" - ], - "description": "Specifies which parts of the Service Config should be returned in the\nresponse.", - "type": "string" - } - } - }, - "enable": { - "id": "servicemanagement.services.enable", - "path": "v1/services/{serviceName}:enable", - "description": "Enables a service for a project, so it can be used\nfor the project. See\n[Cloud Auth Guide](https://cloud.google.com/docs/authentication) for\nmore information.\n\nOperation\u003cresponse: EnableServiceResponse\u003e", - "request": { - "$ref": "EnableServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "serviceName" - ], - "httpMethod": "POST", - "parameters": { - "serviceName": { - "location": "path", - "description": "Name of the service to enable. Specifying an unknown service name will\ncause the request to fail.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "flatPath": "v1/services/{serviceName}:enable" - }, - "delete": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "serviceName" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "parameters": { - "serviceName": { - "type": "string", - "required": true, - "location": "path", - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`." - } - }, - "flatPath": "v1/services/{serviceName}", - "id": "servicemanagement.services.delete", - "path": "v1/services/{serviceName}", - "description": "Deletes a managed service. This method will change the service to the\n`Soft-Delete` state for 30 days. Within this period, service producers may\ncall UndeleteService to restore the service.\nAfter 30 days, the service will be permanently deleted.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e" - }, - "setIamPolicy": { - "flatPath": "v1/services/{servicesId}:setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "id": "servicemanagement.services.setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^services/[^/]+$", - "location": "path" - } - } - }, - "disable": { - "flatPath": "v1/services/{serviceName}:disable", - "path": "v1/services/{serviceName}:disable", - "id": "servicemanagement.services.disable", - "description": "Disables a service for a project, so it can no longer be\nbe used for the project. It prevents accidental usage that may cause\nunexpected billing charges or security leaks.\n\nOperation\u003cresponse: DisableServiceResponse\u003e", - "request": { - "$ref": "DisableServiceRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "serviceName" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "serviceName": { - "description": "Name of the service to disable. Specifying an unknown service name\nwill cause the request to fail.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "getIamPolicy": { - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^services/[^/]+$" + ] } }, "scopes": [ @@ -2796,22 +2477,9 @@ "https://www.googleapis.com/auth/service.management", "https://www.googleapis.com/auth/service.management.readonly" ], - "flatPath": "v1/services/{servicesId}:getIamPolicy", - "path": "v1/{+resource}:getIamPolicy", - "id": "servicemanagement.services.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.", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - } + "flatPath": "v1/services/{serviceName}/config" }, - "undelete": { + "enable": { "httpMethod": "POST", "parameterOrder": [ "serviceName" @@ -2823,6 +2491,143 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/service.management" ], + "parameters": { + "serviceName": { + "location": "path", + "description": "Name of the service to enable. Specifying an unknown service name will\ncause the request to fail.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/services/{serviceName}:enable", + "path": "v1/services/{serviceName}:enable", + "id": "servicemanagement.services.enable", + "request": { + "$ref": "EnableServiceRequest" + }, + "description": "Enables a service for a project, so it can be used\nfor the project. See\n[Cloud Auth Guide](https://cloud.google.com/docs/authentication) for\nmore information.\n\nOperation\u003cresponse: EnableServiceResponse\u003e" + }, + "delete": { + "response": { + "$ref": "Operation" + }, + "httpMethod": "DELETE", + "parameterOrder": [ + "serviceName" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "parameters": { + "serviceName": { + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/services/{serviceName}", + "id": "servicemanagement.services.delete", + "path": "v1/services/{serviceName}", + "description": "Deletes a managed service. This method will change the service to the\n`Soft-Delete` state for 30 days. Within this period, service producers may\ncall UndeleteService to restore the service.\nAfter 30 days, the service will be permanently deleted.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e" + }, + "setIamPolicy": { + "id": "servicemanagement.services.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "type": "string", + "required": true, + "pattern": "^services/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "flatPath": "v1/services/{servicesId}:setIamPolicy" + }, + "disable": { + "id": "servicemanagement.services.disable", + "path": "v1/services/{serviceName}:disable", + "request": { + "$ref": "DisableServiceRequest" + }, + "description": "Disables a service for a project, so it can no longer be\nbe used for the project. It prevents accidental usage that may cause\nunexpected billing charges or security leaks.\n\nOperation\u003cresponse: DisableServiceResponse\u003e", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "parameters": { + "serviceName": { + "location": "path", + "description": "Name of the service to disable. Specifying an unknown service name\nwill cause the request to fail.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/services/{serviceName}:disable" + }, + "getIamPolicy": { + "request": { + "$ref": "GetIamPolicyRequest" + }, + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^services/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/services/{servicesId}:getIamPolicy", + "id": "servicemanagement.services.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy" + }, + "undelete": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST", "parameters": { "serviceName": { "location": "path", @@ -2831,13 +2636,16 @@ "required": true } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], "flatPath": "v1/services/{serviceName}:undelete", - "path": "v1/services/{serviceName}:undelete", "id": "servicemanagement.services.undelete", + "path": "v1/services/{serviceName}:undelete", "description": "Revives a previously deleted managed service. The method restores the\nservice using the configuration at the time the service was deleted.\nThe target service must exist and must have been deleted within the\nlast 30 days.\n\nOperation\u003cresponse: UndeleteServiceResponse\u003e" }, "list": { - "flatPath": "v1/services", "id": "servicemanagement.services.list", "path": "v1/services", "description": "Lists managed services.\n\nReturns all public services. For authenticated users, also returns all\nservices the calling user has \"servicemanagement.services.get\" permission\nfor.\n\n**BETA:** If the caller specifies the `consumer_id`, it returns only the\nservices enabled on the consumer. The `consumer_id` must have the format\nof \"project:{PROJECT-ID}\".", @@ -2853,10 +2661,15 @@ "https://www.googleapis.com/auth/service.management.readonly" ], "parameters": { - "pageToken": { + "consumerId": { + "type": "string", "location": "query", + "description": "Include services consumed by the specified consumer.\n\nThe Google Service Management implementation accepts the following\nforms:\n- project:\u003cproject_id\u003e" + }, + "pageToken": { "description": "Token identifying which result to start with; returned by a previous list\ncall.", - "type": "string" + "type": "string", + "location": "query" }, "pageSize": { "format": "int32", @@ -2865,18 +2678,18 @@ "location": "query" }, "producerProjectId": { - "description": "Include services produced by the specified project.", - "type": "string", - "location": "query" - }, - "consumerId": { "location": "query", - "description": "Include services consumed by the specified consumer.\n\nThe Google Service Management implementation accepts the following\nforms:\n- project:\u003cproject_id\u003e", + "description": "Include services produced by the specified project.", "type": "string" } - } + }, + "flatPath": "v1/services" }, "create": { + "request": { + "$ref": "ManagedService" + }, + "description": "Creates a new managed service.\nPlease note one producer project can own no more than 20 services.\n\nOperation\u003cresponse: ManagedService\u003e", "response": { "$ref": "Operation" }, @@ -2889,94 +2702,130 @@ "parameters": {}, "flatPath": "v1/services", "id": "servicemanagement.services.create", - "path": "v1/services", - "request": { - "$ref": "ManagedService" - }, - "description": "Creates a new managed service.\nPlease note one producer project can own no more than 20 services.\n\nOperation\u003cresponse: ManagedService\u003e" + "path": "v1/services" }, "generateConfigReport": { - "httpMethod": "POST", - "parameterOrder": [], + "description": "Generates and returns a report (errors, warnings and changes from\nexisting configurations) associated with\nGenerateConfigReportRequest.new_value\n\nIf GenerateConfigReportRequest.old_value is specified,\nGenerateConfigReportRequest will contain a single ChangeReport based on the\ncomparison between GenerateConfigReportRequest.new_value and\nGenerateConfigReportRequest.old_value.\nIf GenerateConfigReportRequest.old_value is not specified, this method\nwill compare GenerateConfigReportRequest.new_value with the last pushed\nservice configuration.", + "request": { + "$ref": "GenerateConfigReportRequest" + }, "response": { "$ref": "GenerateConfigReportResponse" }, + "parameterOrder": [], + "httpMethod": "POST", "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/service.management" ], "flatPath": "v1/services:generateConfigReport", - "path": "v1/services:generateConfigReport", "id": "servicemanagement.services.generateConfigReport", - "description": "Generates and returns a report (errors, warnings and changes from\nexisting configurations) associated with\nGenerateConfigReportRequest.new_value\n\nIf GenerateConfigReportRequest.old_value is specified,\nGenerateConfigReportRequest will contain a single ChangeReport based on the\ncomparison between GenerateConfigReportRequest.new_value and\nGenerateConfigReportRequest.old_value.\nIf GenerateConfigReportRequest.old_value is not specified, this method\nwill compare GenerateConfigReportRequest.new_value with the last pushed\nservice configuration.", - "request": { - "$ref": "GenerateConfigReportRequest" - } + "path": "v1/services:generateConfigReport" }, "get": { - "httpMethod": "GET", "parameterOrder": [ "serviceName" ], + "httpMethod": "GET", "response": { "$ref": "ManagedService" }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], "parameters": { "serviceName": { - "location": "path", "description": "The name of the service. See the `ServiceManager` overview for naming\nrequirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ], - "flatPath": "v1/services/{serviceName}", - "path": "v1/services/{serviceName}", - "id": "servicemanagement.services.get", - "description": "Gets a managed service. Authentication is required unless the service is\npublic." - }, - "testIamPermissions": { - "flatPath": "v1/services/{servicesId}:testIamPermissions", - "id": "servicemanagement.services.testIamPermissions", - "path": "v1/{+resource}: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.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { "type": "string", "required": true, - "pattern": "^services/[^/]+$", - "location": "path", - "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" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ] + "flatPath": "v1/services/{serviceName}", + "id": "servicemanagement.services.get", + "path": "v1/services/{serviceName}", + "description": "Gets a managed service. Authentication is required unless the service is\npublic." } }, "resources": { - "consumers": { + "configs": { "methods": { - "getIamPolicy": { + "submit": { + "request": { + "$ref": "SubmitConfigSourceRequest" + }, + "description": "Creates a new service configuration (version) for a managed service based\non\nuser-supplied configuration source files (for example: OpenAPI\nSpecification). This method stores the source configurations as well as the\ngenerated service configuration. To rollout the service configuration to\nother services,\nplease call CreateServiceRollout.\n\nOperation\u003cresponse: SubmitConfigSourceResponse\u003e", + "httpMethod": "POST", + "parameterOrder": [ + "serviceName" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "parameters": { + "serviceName": { + "location": "path", + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/services/{serviceName}/configs:submit", + "path": "v1/services/{serviceName}/configs:submit", + "id": "servicemanagement.services.configs.submit" + }, + "get": { + "response": { + "$ref": "Service" + }, + "parameterOrder": [ + "serviceName", + "configId" + ], + "httpMethod": "GET", + "parameters": { + "serviceName": { + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "type": "string", + "required": true, + "location": "path" + }, + "configId": { + "location": "path", + "description": "The id of the service configuration resource.", + "type": "string", + "required": true + }, + "view": { + "description": "Specifies which parts of the Service Config should be returned in the\nresponse.", + "type": "string", + "location": "query", + "enum": [ + "BASIC", + "FULL" + ] + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "flatPath": "v1/services/{serviceName}/configs/{configId}", + "id": "servicemanagement.services.configs.get", + "path": "v1/services/{serviceName}/configs/{configId}", + "description": "Gets a service configuration (version) for a managed service." + }, + "list": { "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", @@ -2984,30 +2833,72 @@ "https://www.googleapis.com/auth/service.management.readonly" ], "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "pageSize": { + "type": "integer", + "location": "query", + "format": "int32", + "description": "The max number of items to include in the response list." + }, + "serviceName": { + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", "type": "string", "required": true, - "pattern": "^services/[^/]+/consumers/[^/]+$", "location": "path" + }, + "pageToken": { + "location": "query", + "description": "The token of the page to retrieve.", + "type": "string" } }, - "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:getIamPolicy", - "path": "v1/{+resource}:getIamPolicy", - "id": "servicemanagement.services.consumers.getIamPolicy", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], + "flatPath": "v1/services/{serviceName}/configs", + "path": "v1/services/{serviceName}/configs", + "id": "servicemanagement.services.configs.list", + "description": "Lists the history of the service configuration for a managed service,\nfrom the newest to the oldest.", + "httpMethod": "GET", "response": { - "$ref": "Policy" - } + "$ref": "ListServiceConfigsResponse" + }, + "parameterOrder": [ + "serviceName" + ] }, + "create": { + "id": "servicemanagement.services.configs.create", + "path": "v1/services/{serviceName}/configs", + "request": { + "$ref": "Service" + }, + "description": "Creates a new service configuration (version) for a managed service.\nThis method only stores the service configuration. To roll out the service\nconfiguration to backend systems please call\nCreateServiceRollout.", + "response": { + "$ref": "Service" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "parameters": { + "serviceName": { + "location": "path", + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/services/{serviceName}/configs" + } + } + }, + "consumers": { + "methods": { "setIamPolicy": { + "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "id": "servicemanagement.services.consumers.setIamPolicy", "request": { "$ref": "SetIamPolicyRequest" }, @@ -3025,29 +2916,28 @@ ], "parameters": { "resource": { - "pattern": "^services/[^/]+/consumers/[^/]+$", "location": "path", "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", "type": "string", - "required": true + "required": true, + "pattern": "^services/[^/]+/consumers/[^/]+$" } - }, - "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "id": "servicemanagement.services.consumers.setIamPolicy" + } }, "testIamPermissions": { + "path": "v1/{+resource}:testIamPermissions", + "id": "servicemanagement.services.consumers.testIamPermissions", "request": { "$ref": "TestIamPermissionsRequest" }, "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.", - "response": { - "$ref": "TestIamPermissionsResponse" - }, + "httpMethod": "POST", "parameterOrder": [ "resource" ], - "httpMethod": "POST", + "response": { + "$ref": "TestIamPermissionsResponse" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", @@ -3056,29 +2946,72 @@ ], "parameters": { "resource": { - "pattern": "^services/[^/]+/consumers/[^/]+$", - "location": "path", "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", "type": "string", - "required": true + "required": true, + "pattern": "^services/[^/]+/consumers/[^/]+$", + "location": "path" } }, - "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:testIamPermissions", - "id": "servicemanagement.services.consumers.testIamPermissions", - "path": "v1/{+resource}:testIamPermissions" + "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:testIamPermissions" + }, + "getIamPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^services/[^/]+/consumers/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "id": "servicemanagement.services.consumers.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.", + "request": { + "$ref": "GetIamPolicyRequest" + } } } }, "rollouts": { "methods": { "get": { - "httpMethod": "GET", + "response": { + "$ref": "Rollout" + }, "parameterOrder": [ "serviceName", "rolloutId" ], - "response": { - "$ref": "Rollout" + "httpMethod": "GET", + "parameters": { + "serviceName": { + "location": "path", + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "type": "string", + "required": true + }, + "rolloutId": { + "location": "path", + "description": "The id of the rollout resource.", + "type": "string", + "required": true + } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -3086,223 +3019,66 @@ "https://www.googleapis.com/auth/service.management", "https://www.googleapis.com/auth/service.management.readonly" ], - "parameters": { - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true, - "location": "path" - }, - "rolloutId": { - "description": "The id of the rollout resource.", - "type": "string", - "required": true, - "location": "path" - } - }, "flatPath": "v1/services/{serviceName}/rollouts/{rolloutId}", - "path": "v1/services/{serviceName}/rollouts/{rolloutId}", "id": "servicemanagement.services.rollouts.get", + "path": "v1/services/{serviceName}/rollouts/{rolloutId}", "description": "Gets a service configuration rollout." }, "list": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" + "id": "servicemanagement.services.rollouts.list", + "path": "v1/services/{serviceName}/rollouts", + "description": "Lists the history of the service configuration rollouts for a managed\nservice, from the newest to the oldest.", + "parameterOrder": [ + "serviceName" ], + "response": { + "$ref": "ListServiceRolloutsResponse" + }, + "httpMethod": "GET", "parameters": { - "pageSize": { - "format": "int32", - "description": "The max number of items to include in the response list.", - "type": "integer", + "pageToken": { + "description": "The token of the page to retrieve.", + "type": "string", "location": "query" }, + "pageSize": { + "type": "integer", + "location": "query", + "format": "int32", + "description": "The max number of items to include in the response list." + }, "filter": { "description": "Use `filter` to return subset of rollouts.\nThe following filters are supported:\n -- To limit the results to only those in\n [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',\n use filter='status=SUCCESS'\n -- To limit the results to those in\n [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'\n or 'FAILED', use filter='status=CANCELLED OR status=FAILED'", "type": "string", "location": "query" }, "serviceName": { + "location": "path", "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", "type": "string", - "required": true, - "location": "path" - }, - "pageToken": { - "type": "string", - "location": "query", - "description": "The token of the page to retrieve." - } - }, - "flatPath": "v1/services/{serviceName}/rollouts", - "id": "servicemanagement.services.rollouts.list", - "path": "v1/services/{serviceName}/rollouts", - "description": "Lists the history of the service configuration rollouts for a managed\nservice, from the newest to the oldest.", - "response": { - "$ref": "ListServiceRolloutsResponse" - }, - "parameterOrder": [ - "serviceName" - ], - "httpMethod": "GET" - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "serviceName" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true, - "location": "path" + "required": true } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" ], - "flatPath": "v1/services/{serviceName}/rollouts", - "path": "v1/services/{serviceName}/rollouts", - "id": "servicemanagement.services.rollouts.create", + "flatPath": "v1/services/{serviceName}/rollouts" + }, + "create": { "description": "Creates a new service configuration rollout. Based on rollout, the\nGoogle Service Management will roll out the service configurations to\ndifferent backend services. For example, the logging configuration will be\npushed to Google Cloud Logging.\n\nPlease note that any previous pending and running Rollouts and associated\nOperations will be automatically cancelled so that the latest Rollout will\nnot be blocked by previous Rollouts.\n\nOperation\u003cresponse: Rollout\u003e", "request": { "$ref": "Rollout" - } - } - } - }, - "configs": { - "methods": { - "submit": { - "httpMethod": "POST", - "parameterOrder": [ - "serviceName" - ], + }, "response": { "$ref": "Operation" }, - "parameters": { - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "flatPath": "v1/services/{serviceName}/configs:submit", - "path": "v1/services/{serviceName}/configs:submit", - "id": "servicemanagement.services.configs.submit", - "description": "Creates a new service configuration (version) for a managed service based\non\nuser-supplied configuration source files (for example: OpenAPI\nSpecification). This method stores the source configurations as well as the\ngenerated service configuration. To rollout the service configuration to\nother services,\nplease call CreateServiceRollout.\n\nOperation\u003cresponse: SubmitConfigSourceResponse\u003e", - "request": { - "$ref": "SubmitConfigSourceRequest" - } - }, - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "serviceName", - "configId" - ], - "response": { - "$ref": "Service" - }, - "parameters": { - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true, - "location": "path" - }, - "configId": { - "location": "path", - "description": "The id of the service configuration resource.", - "type": "string", - "required": true - }, - "view": { - "type": "string", - "location": "query", - "enum": [ - "BASIC", - "FULL" - ], - "description": "Specifies which parts of the Service Config should be returned in the\nresponse." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ], - "flatPath": "v1/services/{serviceName}/configs/{configId}", - "path": "v1/services/{serviceName}/configs/{configId}", - "id": "servicemanagement.services.configs.get", - "description": "Gets a service configuration (version) for a managed service." - }, - "list": { - "httpMethod": "GET", - "response": { - "$ref": "ListServiceConfigsResponse" - }, "parameterOrder": [ "serviceName" ], - "parameters": { - "serviceName": { - "location": "path", - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true - }, - "pageToken": { - "type": "string", - "location": "query", - "description": "The token of the page to retrieve." - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The max number of items to include in the response list.", - "type": "integer" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ], - "flatPath": "v1/services/{serviceName}/configs", - "path": "v1/services/{serviceName}/configs", - "id": "servicemanagement.services.configs.list", - "description": "Lists the history of the service configuration for a managed service,\nfrom the newest to the oldest." - }, - "create": { - "path": "v1/services/{serviceName}/configs", - "id": "servicemanagement.services.configs.create", - "description": "Creates a new service configuration (version) for a managed service.\nThis method only stores the service configuration. To roll out the service\nconfiguration to backend systems please call\nCreateServiceRollout.", - "request": { - "$ref": "Service" - }, "httpMethod": "POST", - "parameterOrder": [ - "serviceName" - ], - "response": { - "$ref": "Service" - }, "parameters": { "serviceName": { "location": "path", @@ -3315,7 +3091,9 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/service.management" ], - "flatPath": "v1/services/{serviceName}/configs" + "flatPath": "v1/services/{serviceName}/rollouts", + "id": "servicemanagement.services.rollouts.create", + "path": "v1/services/{serviceName}/rollouts" } } } @@ -3334,16 +3112,16 @@ "default": "true", "type": "boolean" }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, "bearer_token": { "location": "query", "description": "OAuth bearer token.", "type": "string" }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, "upload_protocol": { "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", @@ -3355,37 +3133,35 @@ "default": "true", "type": "boolean" }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "callback": { "location": "query", - "description": "JSONP", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, + "fields": { + "type": "string", + "location": "query", + "description": "Selector specifying which fields to include in a partial response." + }, "$.xgafv": { + "location": "query", + "enum": [ + "1", + "2" + ], "description": "V1 error format.", "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" ] }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, "alt": { - "description": "Data format for response.", - "default": "json", "enum": [ "json", "media", @@ -3397,23 +3173,24 @@ "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", "location": "query" }, "key": { + "type": "string", "location": "query", - "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.", - "type": "string" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token." } }, "version": "v1", "baseUrl": "https://servicemanagement.googleapis.com/", "kind": "discovery#restDescription", "description": "Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers.", - "servicePath": "", - "basePath": "" + "servicePath": "" } 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 49c13e76c..425d9a36a 100644 --- a/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-gen.go +++ b/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-gen.go @@ -776,8 +776,8 @@ type BackendRule struct { Address string `json:"address,omitempty"` // Deadline: The number of seconds to wait for a response from a - // request. The - // default depends on the deployment context. + // request. The default + // deadline for gRPC and HTTP requests is 5 seconds. Deadline float64 `json:"deadline,omitempty"` // MinDeadline: Minimum deadline in seconds needed for this method. @@ -944,138 +944,6 @@ func (s *ChangeReport) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// CloudAuditOptions: Write a Cloud Audit log -type CloudAuditOptions struct { - // LogName: The log_name to populate in the Cloud Audit Record. - // - // Possible values: - // "UNSPECIFIED_LOG_NAME" - Default. Should not be used. - // "ADMIN_ACTIVITY" - Corresponds to - // "cloudaudit.googleapis.com/activity" - // "DATA_ACCESS" - Corresponds to - // "cloudaudit.googleapis.com/data_access" - LogName string `json:"logName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LogName") 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. "LogName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CloudAuditOptions) MarshalJSON() ([]byte, error) { - type noMethod CloudAuditOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Condition: A condition to be met. -type Condition struct { - // Iam: Trusted attributes supplied by the IAM system. - // - // Possible values: - // "NO_ATTR" - Default non-attribute. - // "AUTHORITY" - Either principal or (if present) authority selector. - // "ATTRIBUTION" - The principal (even if an authority selector is - // present), which - // must only be used for attribution, not authorization. - // "APPROVER" - An approver (distinct from the requester) that has - // authorized this - // request. - // When used with IN, the condition indicates that one of the - // approvers - // associated with the request matches the specified principal, or is - // a - // member of the specified group. Approvers can only grant - // additional - // access, and are thus only used in a strictly positive context - // (e.g. ALLOW/IN or DENY/NOT_IN). - // "JUSTIFICATION_TYPE" - What types of justifications have been - // supplied with this request. - // String values should match enum names from - // tech.iam.JustificationType, - // e.g. "MANUAL_STRING". It is not permitted to grant access based - // on - // the *absence* of a justification, so justification conditions can - // only - // be used in a "positive" context (e.g., ALLOW/IN or - // DENY/NOT_IN). - // - // Multiple justifications, e.g., a Buganizer ID and a - // manually-entered - // reason, are normal and supported. - Iam string `json:"iam,omitempty"` - - // Op: An operator to apply the subject with. - // - // Possible values: - // "NO_OP" - Default no-op. - // "EQUALS" - DEPRECATED. Use IN instead. - // "NOT_EQUALS" - DEPRECATED. Use NOT_IN instead. - // "IN" - The condition is true if the subject (or any element of it - // if it is - // a set) matches any of the supplied values. - // "NOT_IN" - The condition is true if the subject (or every element - // of it if it is - // a set) matches none of the supplied values. - // "DISCHARGED" - Subject is discharged - Op string `json:"op,omitempty"` - - // Svc: Trusted attributes discharged by the service. - Svc string `json:"svc,omitempty"` - - // Sys: Trusted attributes supplied by any service that owns resources - // and uses - // the IAM system for access control. - // - // Possible values: - // "NO_ATTR" - Default non-attribute type - // "REGION" - Region of the resource - // "SERVICE" - Service name - // "NAME" - Resource name - // "IP" - IP address of the caller - Sys string `json:"sys,omitempty"` - - // Value: DEPRECATED. Use 'values' instead. - Value string `json:"value,omitempty"` - - // Values: The objects of the condition. This is mutually exclusive with - // 'value'. - Values []string `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Iam") 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. "Iam") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field 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) -} - // ConfigChange: Output generated from semantically comparing two // versions of a service // configuration. @@ -1186,6 +1054,15 @@ type ConfigFile struct { // in a new file named out.pb. // // $protoc --include_imports --include_source_info test.proto -o out.pb + // "PROTO_FILE" - Uncompiled Proto file. Used for storage and display + // purposes only, + // currently server-side compilation is not supported. Should match + // the + // inputs to 'protoc' command used to generated + // FILE_DESCRIPTOR_SET_PROTO. A + // file of this type can only be included if at least one file of + // type + // FILE_DESCRIPTOR_SET_PROTO is included. FileType string `json:"fileType,omitempty"` // ForceSendFields is a list of field names (e.g. "FileContents") to @@ -1403,65 +1280,6 @@ func (s *Control) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// CounterOptions: Increment a streamz counter with the specified metric -// and field names. -// -// Metric 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. -// -// Field names correspond to IAM request parameters and field values -// are -// their respective values. -// -// 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) -// * decrementing the counter -// * incrementing it by anything other than 1 -type CounterOptions struct { - // Field: The field value to attribute. - Field string `json:"field,omitempty"` - - // Metric: The metric to update. - Metric string `json:"metric,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CounterOptions) MarshalJSON() ([]byte, error) { - type noMethod CounterOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // CustomAuthRequirements: Configuration for a custom authentication // provider. type CustomAuthRequirements struct { @@ -1610,59 +1428,6 @@ func (s *CustomHttpPattern) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DataAccessOptions: Write a Data Access (Gin) log -type DataAccessOptions struct { - // LogMode: Whether Gin logging should happen in a fail-closed manner at - // the caller. - // This is relevant only in the LocalIAM implementation, for now. - // - // Possible values: - // "LOG_MODE_UNSPECIFIED" - Client is not required to write a partial - // Gin log immediately after - // the authorization check. If client chooses to write one and it - // fails, - // client may either fail open (allow the operation to continue) or - // fail closed (handle as a DENY outcome). - // "LOG_FAIL_CLOSED" - The application's operation in the context of - // which this authorization - // check is being made may only be performed if it is successfully - // logged - // to Gin. For instance, the authorization library may satisfy - // this - // obligation by emitting a partial log entry at authorization check - // time - // and only returning ALLOW to the application if it succeeds. - // - // If a matching Rule has this directive, but the client has not - // indicated - // that it will honor such requirements, then the IAM check will result - // in - // authorization failure by setting CheckPolicyResponse.success=false. - LogMode string `json:"logMode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LogMode") 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. "LogMode") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DataAccessOptions) MarshalJSON() ([]byte, error) { - type noMethod DataAccessOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // DeleteServiceStrategy: Strategy used to delete a service. This // strategy is a placeholder only // used by the system generated rollout to delete a service. @@ -3063,40 +2828,6 @@ func (s *ListServicesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LogConfig: Specifies what kind of log the caller must write -type LogConfig struct { - // CloudAudit: Cloud audit options. - CloudAudit *CloudAuditOptions `json:"cloudAudit,omitempty"` - - // Counter: Counter options. - Counter *CounterOptions `json:"counter,omitempty"` - - // DataAccess: Data access options. - DataAccess *DataAccessOptions `json:"dataAccess,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CloudAudit") 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. "CloudAudit") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LogConfig) MarshalJSON() ([]byte, error) { - type noMethod LogConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // LogDescriptor: A description of a log type. Example in YAML format: // // - name: library.googleapis.com/activity_history @@ -4102,8 +3833,8 @@ func (s *OAuthRequirements) MarshalJSON() ([]byte, error) { type Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` @@ -4385,20 +4116,6 @@ type Policy struct { IamOwned bool `json:"iamOwned,omitempty"` - // Rules: If more than one rule is specified, the rules are applied in - // the following - // manner: - // - All matching LOG rules are always applied. - // - If any DENY/DENY_WITH_LOG rule matches, permission is denied. - // Logging will be applied if one or more matching rule requires - // logging. - // - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is - // granted. - // Logging will be applied if one or more matching rule requires - // logging. - // - Otherwise, if no rule applies, permission is denied. - Rules []*Rule `json:"rules,omitempty"` - // Version: Version of the `Policy`. The default version is 0. Version int64 `json:"version,omitempty"` @@ -4767,77 +4484,6 @@ func (s *Rollout) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Rule: A rule to be applied in a Policy. -type Rule struct { - // Action: Required - // - // Possible values: - // "NO_ACTION" - Default no action. - // "ALLOW" - Matching 'Entries' grant access. - // "ALLOW_WITH_LOG" - Matching 'Entries' grant access and the caller - // promises to log - // the request per the returned log_configs. - // "DENY" - Matching 'Entries' deny access. - // "DENY_WITH_LOG" - Matching 'Entries' deny access and the caller - // promises to log - // the request per the returned log_configs. - // "LOG" - Matching 'Entries' tell IAM.Check callers to generate logs. - Action string `json:"action,omitempty"` - - // Conditions: Additional restrictions that must be met - Conditions []*Condition `json:"conditions,omitempty"` - - // Description: Human-readable description of the rule. - Description string `json:"description,omitempty"` - - // In: If one or more 'in' clauses are specified, the rule matches - // if - // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. - In []string `json:"in,omitempty"` - - // LogConfig: The config returned to callers of tech.iam.IAM.CheckPolicy - // for any entries - // that match the LOG action. - LogConfig []*LogConfig `json:"logConfig,omitempty"` - - // NotIn: If one or more 'not_in' clauses are specified, the rule - // matches - // if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. - // The format for in and not_in entries is the same as for members in - // a - // Binding (see google/iam/v1/policy.proto). - NotIn []string `json:"notIn,omitempty"` - - // Permissions: A permission is a string of form '..' - // (e.g., 'storage.buckets.list'). A value of '*' matches all - // permissions, - // and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Rule) MarshalJSON() ([]byte, error) { - type noMethod Rule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Service: `Service` is the root object of Google service configuration // schema. It // describes basic information about a service, such as the name and diff --git a/vendor/google.golang.org/api/serviceuser/v1/serviceuser-api.json b/vendor/google.golang.org/api/serviceuser/v1/serviceuser-api.json index 2a2922f59..4c74666c1 100644 --- a/vendor/google.golang.org/api/serviceuser/v1/serviceuser-api.json +++ b/vendor/google.golang.org/api/serviceuser/v1/serviceuser-api.json @@ -1,30 +1,114 @@ { - "canonicalName": "Service User", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/service.management": { - "description": "Manage your Google API service configuration" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "resources": { + "projects": { + "resources": { + "services": { + "methods": { + "list": { + "flatPath": "v1/projects/{projectsId}/services", + "id": "serviceuser.projects.services.list", + "path": "v1/{+parent}/services", + "description": "List enabled services for the specified consumer.", + "response": { + "$ref": "ListEnabledServicesResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "parent": { + "location": "path", + "description": "List enabled services for the specified parent.\n\nAn example valid parent would be:\n- projects/my-project", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$" + }, + "pageToken": { + "location": "query", + "description": "Token identifying which result to start with; returned by a previous list\ncall.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested size of the next page of data.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "disable": { + "request": { + "$ref": "DisableServiceRequest" + }, + "description": "Disable a service so it can no longer be used with a\nproject. This prevents unintended usage that may cause unexpected billing\ncharges or security leaks.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e", + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/services/[^/]+$", + "location": "path", + "description": "Name of the consumer and the service to disable for that consumer.\n\nThe Service User implementation accepts the following forms for consumer:\n- \"project:\u003cproject_id\u003e\"\n\nA valid path would be:\n- /v1/projects/my-project/services/servicemanagement.googleapis.com:disable" + } + }, + "flatPath": "v1/projects/{projectsId}/services/{servicesId}:disable", + "path": "v1/{+name}:disable", + "id": "serviceuser.projects.services.disable" + }, + "enable": { + "flatPath": "v1/projects/{projectsId}/services/{servicesId}:enable", + "path": "v1/{+name}:enable", + "id": "serviceuser.projects.services.enable", + "description": "Enable a service so it can be used with a project.\nSee [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for\nmore information.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e", + "request": { + "$ref": "EnableServiceRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/services/[^/]+$", + "location": "path", + "description": "Name of the consumer and the service to enable for that consumer.\n\nA valid path would be:\n- /v1/projects/my-project/services/servicemanagement.googleapis.com:enable" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ] + } + } } } - } - }, - "rootUrl": "https://serviceuser.googleapis.com/", - "ownerDomain": "google.com", - "name": "serviceuser", - "batchPath": "batch", - "title": "Google Service User API", - "ownerName": "Google", - "resources": { + }, "services": { "methods": { "search": { + "flatPath": "v1/services:search", + "id": "serviceuser.services.search", + "path": "v1/services:search", "description": "Search available services.\n\nWhen no filter is specified, returns all accessible services. For\nauthenticated users, also returns all services the calling user has\n\"servicemanagement.services.bind\" permission for.", "response": { "$ref": "SearchServicesResponse" @@ -47,153 +131,16 @@ "description": "Requested size of the next page of data.", "type": "integer" } - }, - "flatPath": "v1/services:search", - "id": "serviceuser.services.search", - "path": "v1/services:search" - } - } - }, - "projects": { - "resources": { - "services": { - "methods": { - "list": { - "description": "List enabled services for the specified consumer.", - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "ListEnabledServicesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "parent": { - "location": "path", - "description": "List enabled services for the specified parent.\n\nAn example valid parent would be:\n- projects/my-project", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - }, - "pageToken": { - "description": "Token identifying which result to start with; returned by a previous list\ncall.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "Requested size of the next page of data.", - "type": "integer", - "location": "query" - } - }, - "flatPath": "v1/projects/{projectsId}/services", - "path": "v1/{+parent}/services", - "id": "serviceuser.projects.services.list" - }, - "disable": { - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/services/[^/]+$", - "location": "path", - "description": "Name of the consumer and the service to disable for that consumer.\n\nThe Service User implementation accepts the following forms for consumer:\n- \"project:\u003cproject_id\u003e\"\n\nA valid path would be:\n- /v1/projects/my-project/services/servicemanagement.googleapis.com:disable" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "flatPath": "v1/projects/{projectsId}/services/{servicesId}:disable", - "path": "v1/{+name}:disable", - "id": "serviceuser.projects.services.disable", - "description": "Disable a service so it can no longer be used with a\nproject. This prevents unintended usage that may cause unexpected billing\ncharges or security leaks.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e", - "request": { - "$ref": "DisableServiceRequest" - } - }, - "enable": { - "flatPath": "v1/projects/{projectsId}/services/{servicesId}:enable", - "path": "v1/{+name}:enable", - "id": "serviceuser.projects.services.enable", - "request": { - "$ref": "EnableServiceRequest" - }, - "description": "Enable a service so it can be used with a project.\nSee [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for\nmore information.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e", - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "parameters": { - "name": { - "location": "path", - "description": "Name of the consumer and the service to enable for that consumer.\n\nA valid path would be:\n- /v1/projects/my-project/services/servicemanagement.googleapis.com:enable", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/services/[^/]+$" - } - } - } } } } } }, "parameters": { - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "key": { - "location": "query", - "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.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, "upload_protocol": { + "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" }, "prettyPrint": { "location": "query", @@ -201,17 +148,18 @@ "default": "true", "type": "boolean" }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, "fields": { "location": "query", "description": "Selector specifying which fields to include in a partial response.", "type": "string" }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, "$.xgafv": { + "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -221,8 +169,7 @@ "1", "2" ], - "description": "V1 error format.", - "type": "string" + "description": "V1 error format." }, "callback": { "type": "string", @@ -230,6 +177,8 @@ "description": "JSONP" }, "alt": { + "location": "query", + "description": "Data format for response.", "default": "json", "enum": [ "json", @@ -241,36 +190,862 @@ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" - ], + ] + }, + "access_token": { "location": "query", - "description": "Data format for response." + "description": "OAuth access token.", + "type": "string" + }, + "key": { + "type": "string", + "location": "query", + "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." + }, + "quotaUser": { + "type": "string", + "location": "query", + "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." + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "bearer_token": { + "type": "string", + "location": "query", + "description": "OAuth bearer token." + }, + "oauth_token": { + "type": "string", + "location": "query", + "description": "OAuth 2.0 token for the current user." } }, "version": "v1", "baseUrl": "https://serviceuser.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use.", "servicePath": "", + "description": "Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use.", + "kind": "discovery#restDescription", "basePath": "", - "id": "serviceuser:v1", "documentationLink": "https://cloud.google.com/service-management/", - "revision": "20170728", + "id": "serviceuser:v1", + "revision": "20170901", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { - "OAuthRequirements": { - "description": "OAuth scopes are a way to define data and permissions on data. For example,\nthere are scopes defined for \"Read-only access to Google Calendar\" and\n\"Access to Cloud Platform\". Users can consent to a scope for an application,\ngiving it permission to access that data on their behalf.\n\nOAuth scope specifications should be fairly coarse grained; a user will need\nto see and understand the text description of what your scope means.\n\nIn most cases: use one or at most two OAuth scopes for an entire family of\nproducts. If your product has multiple APIs, you should probably be sharing\nthe OAuth scope across all of those APIs.\n\nWhen you need finer grained OAuth consent screens: talk with your product\nmanagement about how developers will use them in practice.\n\nPlease note that even though each of the canonical scopes is enough for a\nrequest to be accepted and passed to the backend, a request can still fail\ndue to the backend requiring additional scopes or permissions.", + "SystemParameters": { "type": "object", "properties": { - "canonicalScopes": { - "description": "The list of publicly documented OAuth scopes that are allowed access. An\nOAuth token containing any of these scopes will be accepted.\n\nExample:\n\n canonical_scopes: https://www.googleapis.com/auth/calendar,\n https://www.googleapis.com/auth/calendar.read", + "rules": { + "items": { + "$ref": "SystemParameterRule" + }, + "type": "array", + "description": "Define system parameters.\n\nThe parameters defined here will override the default parameters\nimplemented by the system. If this field is missing from the service\nconfig, default system parameters will be used. Default system parameters\nand names is implementation-dependent.\n\nExample: define api key for all methods\n\n system_parameters\n rules:\n - selector: \"*\"\n parameters:\n - name: api_key\n url_query_parameter: api_key\n\n\nExample: define 2 api key names for a specific method.\n\n system_parameters\n rules:\n - selector: \"/ListShelves\"\n parameters:\n - name: api_key\n http_header: Api-Key1\n - name: api_key\n http_header: Api-Key2\n\n**NOTE:** All service configuration rules follow \"last one wins\" order." + } + }, + "id": "SystemParameters", + "description": "### System parameter configuration\n\nA system parameter is a special kind of parameter defined by the API\nsystem, not by an individual API. It is typically mapped to an HTTP header\nand/or a URL query parameter. This configuration specifies which methods\nchange the names of the system parameters." + }, + "Quota": { + "type": "object", + "properties": { + "limits": { + "items": { + "$ref": "QuotaLimit" + }, + "type": "array", + "description": "List of `QuotaLimit` definitions for the service." + }, + "metricRules": { + "items": { + "$ref": "MetricRule" + }, + "type": "array", + "description": "List of `MetricRule` definitions, each one mapping a selected method to one\nor more metrics." + } + }, + "id": "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\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" + }, + "Step": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enumDescriptions": [ + "Unspecifed code.", + "The operation or step has completed without errors.", + "The operation or step has not started yet.", + "The operation or step is in progress.", + "The operation or step has completed with errors. If the operation is\nrollbackable, the rollback completed with errors too.", + "The operation or step has completed with cancellation." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "DONE", + "NOT_STARTED", + "IN_PROGRESS", + "FAILED", + "CANCELLED" + ], + "description": "The status code." + }, + "description": { + "type": "string", + "description": "The short description of the step." + } + }, + "id": "Step", + "description": "Represents the status of one operation step." + }, + "LoggingDestination": { + "description": "Configuration of a specific logging destination (the producer project\nor the consumer project).", + "type": "object", + "properties": { + "logs": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Names of the logs to be sent to this destination. Each name must\nbe defined in the Service.logs section. If the log name is\nnot a domain scoped name, it will be automatically prefixed with\nthe service name followed by \"/\"." + }, + "monitoredResource": { + "description": "The monitored resource type. The type must be defined in the\nService.monitored_resources section.", "type": "string" } }, - "id": "OAuthRequirements" + "id": "LoggingDestination" + }, + "Option": { + "description": "A protocol buffer option, which can be attached to a message, field,\nenumeration, etc.", + "type": "object", + "properties": { + "value": { + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + }, + "description": "The option's value packed in an Any message. If the value is a primitive,\nthe corresponding wrapper type defined in google/protobuf/wrappers.proto\nshould be used. If the value is an enum, it should be stored as an int32\nvalue using the google.protobuf.Int32Value type." + }, + "name": { + "type": "string", + "description": "The option's name. For protobuf built-in options (options defined in\ndescriptor.proto), this is the short name. For example, `\"map_entry\"`.\nFor custom options, it should be the fully-qualified name. For example,\n`\"google.api.http\"`." + } + }, + "id": "Option" + }, + "Logging": { + "type": "object", + "properties": { + "consumerDestinations": { + "description": "Logging configurations for sending logs to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none consumer destination.", + "items": { + "$ref": "LoggingDestination" + }, + "type": "array" + }, + "producerDestinations": { + "description": "Logging configurations for sending logs to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none producer destination.", + "items": { + "$ref": "LoggingDestination" + }, + "type": "array" + } + }, + "id": "Logging", + "description": "Logging configuration of the service.\n\nThe following example shows how to configure logs to be sent to the\nproducer and consumer projects. In the example, the `activity_history`\nlog is sent to both the producer and consumer projects, whereas the\n`purchase_history` log is only sent to the producer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n logs:\n - name: activity_history\n labels:\n - key: /customer_id\n - name: purchase_history\n logging:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history\n - purchase_history\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history" + }, + "Method": { + "description": "Method represents a method of an API interface.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The simple name of this method." + }, + "requestTypeUrl": { + "type": "string", + "description": "A URL of the input message type." + }, + "requestStreaming": { + "type": "boolean", + "description": "If true, the request is streamed." + }, + "syntax": { + "enum": [ + "SYNTAX_PROTO2", + "SYNTAX_PROTO3" + ], + "description": "The source syntax of this method.", + "type": "string", + "enumDescriptions": [ + "Syntax `proto2`.", + "Syntax `proto3`." + ] + }, + "responseTypeUrl": { + "description": "The URL of the output message type.", + "type": "string" + }, + "options": { + "description": "Any metadata attached to the method.", + "items": { + "$ref": "Option" + }, + "type": "array" + }, + "responseStreaming": { + "description": "If true, the response is streamed.", + "type": "boolean" + } + }, + "id": "Method" + }, + "QuotaLimit": { + "description": "`QuotaLimit` defines a specific limit that applies over a specified duration\nfor a limit type. There can be at most one limit for a duration and limit\ntype combination defined within a `QuotaGroup`.", + "type": "object", + "properties": { + "defaultLimit": { + "format": "int64", + "description": "Default number of tokens that can be consumed during the specified\nduration. This is the number of tokens assigned when a client\napplication developer activates the service for his/her project.\n\nSpecifying a value of 0 will block all requests. This can be used if you\nare provisioning quota to selected consumers and blocking others.\nSimilarly, a value of -1 will indicate an unlimited quota. No other\nnegative values are allowed.\n\nUsed by group-based quotas only.", + "type": "string" + }, + "displayName": { + "type": "string", + "description": "User-visible display name for this limit.\nOptional. If not set, the UI will provide a default display name based on\nthe quota configuration. This field can be used to override the default\ndisplay name generated from the configuration." + }, + "metric": { + "type": "string", + "description": "The name of the metric this quota limit applies to. The quota limits with\nthe same metric will be checked together during runtime. The metric must be\ndefined within the service config.\n\nUsed by metric-based quotas only." + }, + "description": { + "description": "Optional. User-visible, extended description for this quota limit.\nShould be used only when more context is needed to understand this limit\nthan provided by the limit's display name (see: `display_name`).", + "type": "string" + }, + "values": { + "type": "object", + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "Tiered limit values, currently only STANDARD is supported." + }, + "unit": { + "type": "string", + "description": "Specify the unit of the quota limit. It uses the same syntax as\nMetric.unit. The supported unit kinds are determined by the quota\nbackend system.\n\nThe [Google Service Control](https://cloud.google.com/service-control)\nsupports the following unit components:\n* One of the time intevals:\n * \"/min\" for quota every minute.\n * \"/d\" for quota every 24 hours, starting 00:00 US Pacific Time.\n * Otherwise the quota won't be reset by time, such as storage limit.\n* One and only one of the granted containers:\n * \"/{project}\" quota for a project\n\nHere are some examples:\n* \"1/min/{project}\" for quota per minute per project.\n\nNote: the order of unit components is insignificant.\nThe \"1\" at the beginning is required to follow the metric unit syntax.\n\nUsed by metric-based quotas only." + }, + "maxLimit": { + "format": "int64", + "description": "Maximum number of tokens that can be consumed during the specified\nduration. Client application developers can override the default limit up\nto this maximum. If specified, this value cannot be set to a value less\nthan the default limit. If not specified, it is set to the default limit.\n\nTo allow clients to apply overrides with no upper bound, set this to -1,\nindicating unlimited maximum quota.\n\nUsed by group-based quotas only.", + "type": "string" + }, + "name": { + "type": "string", + "description": "Name of the quota limit. The name is used to refer to the limit when\noverriding the default limit on per-consumer basis.\n\nFor metric-based quota limits, the name must be provided, and it must be\nunique within the service. The name can only include alphanumeric\ncharacters as well as '-'.\n\nThe maximum length of the limit name is 64 characters.\n\nThe name of a limit is used as a unique identifier for this limit.\nTherefore, once a limit has been put into use, its name should be\nimmutable. You can use the display_name field to provide a user-friendly\nname for the limit. The display name can be evolved over time without\naffecting the identity of the limit." + }, + "duration": { + "description": "Duration of this limit in textual notation. Example: \"100s\", \"24h\", \"1d\".\nFor duration longer than a day, only multiple of days is supported. We\nsupport only \"100s\" and \"1d\" for now. Additional support will be added in\nthe future. \"0\" indicates indefinite duration.\n\nUsed by group-based quotas only.", + "type": "string" + }, + "freeTier": { + "format": "int64", + "description": "Free tier value displayed in the Developers Console for this limit.\nThe free tier is the number of tokens that will be subtracted from the\nbilled amount when billing is enabled.\nThis field can only be set on a limit with duration \"1d\", in a billable\ngroup; it is invalid on any other limit. If this field is not set, it\ndefaults to 0, indicating that there is no free tier for this service.\n\nUsed by group-based quotas only.", + "type": "string" + } + }, + "id": "QuotaLimit" + }, + "Mixin": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The fully qualified name of the interface which is included." + }, + "root": { + "type": "string", + "description": "If non-empty specifies a path under which inherited HTTP paths\nare rooted." + } + }, + "id": "Mixin", + "description": "Declares an API Interface to be included in this interface. The including\ninterface must redeclare all the methods from the included interface, but\ndocumentation and options are inherited as follows:\n\n- If after comment and whitespace stripping, the documentation\n string of the redeclared method is empty, it will be inherited\n from the original method.\n\n- Each annotation belonging to the service config (http,\n visibility) which is not set in the redeclared method will be\n inherited.\n\n- If an http annotation is inherited, the path pattern will be\n modified as follows. Any version prefix will be replaced by the\n version of the including interface plus the root path if\n specified.\n\nExample of a simple mixin:\n\n package google.acl.v1;\n service AccessControl {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v1/{resource=**}:getAcl\";\n }\n }\n\n package google.storage.v2;\n service Storage {\n // rpc GetAcl(GetAclRequest) returns (Acl);\n\n // Get a data record.\n rpc GetData(GetDataRequest) returns (Data) {\n option (google.api.http).get = \"/v2/{resource=**}\";\n }\n }\n\nExample of a mixin configuration:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n\nThe mixin construct implies that all methods in `AccessControl` are\nalso declared with same name and request/response types in\n`Storage`. A documentation generator or annotation processor will\nsee the effective `Storage.GetAcl` method after inherting\ndocumentation and annotations as follows:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/{resource=**}:getAcl\";\n }\n ...\n }\n\nNote how the version in the path pattern changed from `v1` to `v2`.\n\nIf the `root` field in the mixin is specified, it should be a\nrelative path under which inherited HTTP paths are placed. Example:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n root: acls\n\nThis implies the following inherited HTTP annotation:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\";\n }\n ...\n }" + }, + "CustomError": { + "description": "Customize service error responses. For example, list any service\nspecific protobuf types that can appear in error detail lists of\nerror responses.\n\nExample:\n\n custom_error:\n types:\n - google.foo.v1.CustomError\n - google.foo.v1.AnotherError", + "type": "object", + "properties": { + "rules": { + "items": { + "$ref": "CustomErrorRule" + }, + "type": "array", + "description": "The list of custom error rules that apply to individual API messages.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order." + }, + "types": { + "description": "The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "CustomError" + }, + "Http": { + "type": "object", + "properties": { + "rules": { + "items": { + "$ref": "HttpRule" + }, + "type": "array", + "description": "A list of HTTP configuration rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order." + }, + "fullyDecodeReservedExpansion": { + "type": "boolean", + "description": "When set to true, URL path parmeters will be fully URI-decoded except in\ncases of single segment matches in reserved expansion, where \"%2F\" will be\nleft encoded.\n\nThe default behavior is to not decode RFC 6570 reserved characters in multi\nsegment matches." + } + }, + "id": "Http", + "description": "Defines the HTTP configuration for an API service. It contains a list of\nHttpRule, each specifying the mapping of an RPC method\nto one or more HTTP REST API methods." + }, + "SourceInfo": { + "type": "object", + "properties": { + "sourceFiles": { + "description": "All files used during config generation.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + } + }, + "id": "SourceInfo", + "description": "Source information used to create a Service Config" + }, + "Control": { + "type": "object", + "properties": { + "environment": { + "type": "string", + "description": "The service control environment to use. If empty, no control plane\nfeature (like quota and billing) will be enabled." + } + }, + "id": "Control", + "description": "Selects and configures the service controller used by the service. The\nservice controller handles features like abuse, quota, billing, logging,\nmonitoring, etc." + }, + "SystemParameter": { + "type": "object", + "properties": { + "httpHeader": { + "type": "string", + "description": "Define the HTTP header name to use for the parameter. It is case\ninsensitive." + }, + "name": { + "description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive.", + "type": "string" + }, + "urlQueryParameter": { + "type": "string", + "description": "Define the URL query parameter name to use for the parameter. It is case\nsensitive." + } + }, + "id": "SystemParameter", + "description": "Define a parameter's name and location. The parameter may be passed as either\nan HTTP header or a URL query parameter, and if both are passed the behavior\nis implementation-dependent." + }, + "Field": { + "description": "A single field of a message type.", + "type": "object", + "properties": { + "defaultValue": { + "type": "string", + "description": "The string value of the default value of this field. Proto2 syntax only." + }, + "name": { + "type": "string", + "description": "The field name." + }, + "typeUrl": { + "type": "string", + "description": "The field type URL, without the scheme, for message or enumeration\ntypes. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`." + }, + "number": { + "format": "int32", + "description": "The field number.", + "type": "integer" + }, + "kind": { + "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" + ], + "description": "The field type.", + "type": "string", + "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." + ] + }, + "jsonName": { + "type": "string", + "description": "The field JSON name." + }, + "options": { + "description": "The protocol buffer options.", + "items": { + "$ref": "Option" + }, + "type": "array" + }, + "oneofIndex": { + "format": "int32", + "description": "The index of the field type in `Type.oneofs`, for message or enumeration\ntypes. The first type has index 1; zero means the type is not in the list.", + "type": "integer" + }, + "packed": { + "description": "Whether to use alternative packed wire representation.", + "type": "boolean" + }, + "cardinality": { + "type": "string", + "enumDescriptions": [ + "For fields with unknown cardinality.", + "For optional fields.", + "For required fields. Proto2 syntax only.", + "For repeated fields." + ], + "enum": [ + "CARDINALITY_UNKNOWN", + "CARDINALITY_OPTIONAL", + "CARDINALITY_REQUIRED", + "CARDINALITY_REPEATED" + ], + "description": "The field cardinality." + } + }, + "id": "Field" + }, + "Monitoring": { + "type": "object", + "properties": { + "producerDestinations": { + "items": { + "$ref": "MonitoringDestination" + }, + "type": "array", + "description": "Monitoring configurations for sending metrics to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none producer destination." + }, + "consumerDestinations": { + "items": { + "$ref": "MonitoringDestination" + }, + "type": "array", + "description": "Monitoring configurations for sending metrics to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none consumer destination." + } + }, + "id": "Monitoring", + "description": "Monitoring configuration of the service.\n\nThe example below shows how to configure monitored resources and metrics\nfor monitoring. In the example, a monitored resource and two metrics are\ndefined. The `library.googleapis.com/book/returned_count` metric is sent\nto both producer and consumer projects, whereas the\n`library.googleapis.com/book/overdue_count` metric is only sent to the\nconsumer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n metrics:\n - name: library.googleapis.com/book/returned_count\n metric_kind: DELTA\n value_type: INT64\n labels:\n - key: /customer_id\n - name: library.googleapis.com/book/overdue_count\n metric_kind: GAUGE\n value_type: INT64\n labels:\n - key: /customer_id\n monitoring:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n - library.googleapis.com/book/overdue_count" + }, + "Enum": { + "description": "Enum type definition.", + "type": "object", + "properties": { + "options": { + "description": "Protocol buffer options.", + "items": { + "$ref": "Option" + }, + "type": "array" + }, + "syntax": { + "enum": [ + "SYNTAX_PROTO2", + "SYNTAX_PROTO3" + ], + "description": "The source syntax.", + "type": "string", + "enumDescriptions": [ + "Syntax `proto2`.", + "Syntax `proto3`." + ] + }, + "sourceContext": { + "$ref": "SourceContext", + "description": "The source context." + }, + "enumvalue": { + "items": { + "$ref": "EnumValue" + }, + "type": "array", + "description": "Enum value definitions." + }, + "name": { + "type": "string", + "description": "Enum type name." + } + }, + "id": "Enum" + }, + "EnableServiceRequest": { + "description": "Request message for EnableService method.", + "type": "object", + "properties": {}, + "id": "EnableServiceRequest" + }, + "LabelDescriptor": { + "type": "object", + "properties": { + "key": { + "description": "The label key.", + "type": "string" + }, + "description": { + "description": "A human-readable description for the label.", + "type": "string" + }, + "valueType": { + "type": "string", + "enumDescriptions": [ + "A variable-length string. This is the default.", + "Boolean; true or false.", + "A 64-bit signed integer." + ], + "enum": [ + "STRING", + "BOOL", + "INT64" + ], + "description": "The type of data that can be assigned to the label." + } + }, + "id": "LabelDescriptor", + "description": "A description of a label." + }, + "Type": { + "description": "A protocol buffer message type.", + "type": "object", + "properties": { + "options": { + "items": { + "$ref": "Option" + }, + "type": "array", + "description": "The protocol buffer options." + }, + "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" + }, + "sourceContext": { + "$ref": "SourceContext", + "description": "The source context." + }, + "syntax": { + "enum": [ + "SYNTAX_PROTO2", + "SYNTAX_PROTO3" + ], + "description": "The source syntax.", + "type": "string", + "enumDescriptions": [ + "Syntax `proto2`.", + "Syntax `proto3`." + ] + } + }, + "id": "Type" + }, + "Experimental": { + "description": "Experimental service configuration. These configuration options can\nonly be used by whitelisted users.", + "type": "object", + "properties": { + "authorization": { + "$ref": "AuthorizationConfig", + "description": "Authorization configuration." + } + }, + "id": "Experimental" + }, + "Backend": { + "description": "`Backend` defines the backend configuration for a service.", + "type": "object", + "properties": { + "rules": { + "items": { + "$ref": "BackendRule" + }, + "type": "array", + "description": "A list of API backend rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order." + } + }, + "id": "Backend" + }, + "AuthorizationConfig": { + "description": "Configuration of authorization.\n\nThis section determines the authorization provider, if unspecified, then no\nauthorization check will be done.\n\nExample:\n\n experimental:\n authorization:\n provider: firebaserules.googleapis.com", + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "The name of the authorization provider, such as\nfirebaserules.googleapis.com." + } + }, + "id": "AuthorizationConfig" + }, + "DocumentationRule": { + "type": "object", + "properties": { + "deprecationDescription": { + "type": "string", + "description": "Deprecation description of the selected element(s). It can be provided if an\nelement is marked as `deprecated`." + }, + "selector": { + "type": "string", + "description": "The selector is a comma-separated list of patterns. Each pattern is a\nqualified name of the element which may end in \"*\", indicating a wildcard.\nWildcards are only allowed at the end and for a whole component of the\nqualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". To\nspecify a default for all applicable elements, the whole pattern \"*\"\nis used." + }, + "description": { + "description": "Description of the selected API(s).", + "type": "string" + } + }, + "id": "DocumentationRule", + "description": "A documentation rule provides information about individual API elements." + }, + "ContextRule": { + "type": "object", + "properties": { + "selector": { + "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" + }, + "provided": { + "items": { + "type": "string" + }, + "type": "array", + "description": "A list of full type names of provided contexts." + }, + "requested": { + "description": "A list of full type names of requested contexts.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "ContextRule", + "description": "A context rule provides information about the context for an individual API\nelement." + }, + "SourceContext": { + "type": "object", + "properties": { + "fileName": { + "type": "string", + "description": "The path-qualified name of the .proto file that contained the associated\nprotobuf element. For example: `\"google/protobuf/source_context.proto\"`." + } + }, + "id": "SourceContext", + "description": "`SourceContext` represents information about the source of a\nprotobuf element, like the file in which it is defined." + }, + "MetricDescriptor": { + "type": "object", + "properties": { + "type": { + "description": "The metric type, including its DNS name prefix. The type is not\nURL-encoded. All user-defined custom metric types have the DNS name\n`custom.googleapis.com`. Metric types should use a natural hierarchical\ngrouping. For example:\n\n \"custom.googleapis.com/invoice/paid/amount\"\n \"appengine.googleapis.com/http/server/response_latencies\"", + "type": "string" + }, + "valueType": { + "enum": [ + "VALUE_TYPE_UNSPECIFIED", + "BOOL", + "INT64", + "DOUBLE", + "STRING", + "DISTRIBUTION", + "MONEY" + ], + "description": "Whether the measurement is an integer, a floating-point number, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", + "type": "string", + "enumDescriptions": [ + "Do not use this default value.", + "The value is a boolean.\nThis 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.\nThis value type can be used only if the metric kind is `GAUGE`.", + "The value is a `Distribution`.", + "The value is money." + ] + }, + "metricKind": { + "enum": [ + "METRIC_KIND_UNSPECIFIED", + "GAUGE", + "DELTA", + "CUMULATIVE" + ], + "description": "Whether the metric records instantaneous values, changes to a value, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", + "type": "string", + "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\nmeasurements in a time series should have the same start time\nand increasing end times, until an event resets the cumulative\nvalue to zero and sets a new start time for the following\npoints." + ] + }, + "description": { + "type": "string", + "description": "A detailed description of the metric, which can be used in documentation." + }, + "displayName": { + "type": "string", + "description": "A concise name for the metric, which can be displayed in user interfaces.\nUse sentence case without an ending period, for example \"Request count\"." + }, + "unit": { + "description": "The unit in which the metric value is reported. It is only applicable\nif the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The\nsupported units are a subset of [The Unified Code for Units of\nMeasure](http://unitsofmeasure.org/ucum.html) standard:\n\n**Basic units (UNIT)**\n\n* `bit` bit\n* `By` byte\n* `s` second\n* `min` minute\n* `h` hour\n* `d` day\n\n**Prefixes (PREFIX)**\n\n* `k` kilo (10**3)\n* `M` mega (10**6)\n* `G` giga (10**9)\n* `T` tera (10**12)\n* `P` peta (10**15)\n* `E` exa (10**18)\n* `Z` zetta (10**21)\n* `Y` yotta (10**24)\n* `m` milli (10**-3)\n* `u` micro (10**-6)\n* `n` nano (10**-9)\n* `p` pico (10**-12)\n* `f` femto (10**-15)\n* `a` atto (10**-18)\n* `z` zepto (10**-21)\n* `y` yocto (10**-24)\n* `Ki` kibi (2**10)\n* `Mi` mebi (2**20)\n* `Gi` gibi (2**30)\n* `Ti` tebi (2**40)\n\n**Grammar**\n\nThe grammar includes the dimensionless unit `1`, such as `1/s`.\n\nThe grammar also includes these connectors:\n\n* `/` division (as an infix operator, e.g. `1/s`).\n* `.` multiplication (as an infix operator, e.g. `GBy.d`)\n\nThe grammar for a unit is as follows:\n\n Expression = Component { \".\" Component } { \"/\" Component } ;\n\n Component = [ PREFIX ] UNIT [ Annotation ]\n | Annotation\n | \"1\"\n ;\n\n Annotation = \"{\" NAME \"}\" ;\n\nNotes:\n\n* `Annotation` is just a comment if it follows a `UNIT` and is\n equivalent to `1` if it is used alone. For examples,\n `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.\n* `NAME` is a sequence of non-blank printable ASCII characters not\n containing '{' or '}'.", + "type": "string" + }, + "labels": { + "items": { + "$ref": "LabelDescriptor" + }, + "type": "array", + "description": "The set of labels that can be used to describe a specific\ninstance of this metric type. For example, the\n`appengine.googleapis.com/http/server/response_latencies` metric\ntype has a label for the HTTP response code, `response_code`, so\nyou can look at latencies for successful responses or just\nfor responses that failed." + }, + "name": { + "type": "string", + "description": "The resource name of the metric descriptor. Depending on the\nimplementation, the name typically includes: (1) the parent resource name\nthat defines the scope of the metric type or of its data; and (2) the\nmetric's URL-encoded type, which also appears in the `type` field of this\ndescriptor. For example, following is the resource name of a custom\nmetric within the GCP project `my-project-id`:\n\n \"projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount\"" + } + }, + "id": "MetricDescriptor", + "description": "Defines a metric type and its schema. Once a metric descriptor is created,\ndeleting or altering it stops data collection and makes the metric type's\nexisting data unusable." + }, + "ListEnabledServicesResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "Token that can be passed to `ListEnabledServices` to resume a paginated\nquery." + }, + "services": { + "items": { + "$ref": "PublishedService" + }, + "type": "array", + "description": "Services enabled for the specified parent." + } + }, + "id": "ListEnabledServicesResponse", + "description": "Response message for `ListEnabledServices` method." + }, + "Endpoint": { + "description": "`Endpoint` describes a network endpoint that serves a set of APIs.\nA service may expose any number of endpoints, and all endpoints share the\nsame service configuration, such as quota configuration and monitoring\nconfiguration.\n\nExample service configuration:\n\n name: library-example.googleapis.com\n endpoints:\n # Below entry makes 'google.example.library.v1.Library'\n # API be served from endpoint address library-example.googleapis.com.\n # It also allows HTTP OPTIONS calls to be passed to the backend, for\n # it to decide whether the subsequent cross-origin request is\n # allowed to proceed.\n - name: library-example.googleapis.com\n allow_cors: true", + "type": "object", + "properties": { + "apis": { + "description": "The list of APIs served by this endpoint.\n\nIf no APIs are specified this translates to \"all APIs\" exported by the\nservice, as defined in the top-level service configuration.", + "items": { + "type": "string" + }, + "type": "array" + }, + "allowCors": { + "description": "Allowing\n[CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka\ncross-domain traffic, would allow the backends served from this endpoint to\nreceive and respond to HTTP OPTIONS requests. The response will be used by\nthe browser to determine whether the subsequent cross-origin request is\nallowed to proceed.", + "type": "boolean" + }, + "aliases": { + "description": "DEPRECATED: This field is no longer supported. Instead of using aliases,\nplease specify multiple google.api.Endpoint for each of the intented\nalias.\n\nAdditional names that this endpoint will be hosted on.", + "items": { + "type": "string" + }, + "type": "array" + }, + "target": { + "description": "The specification of an Internet routable address of API frontend that will\nhandle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).\nIt should be either a valid IPv4 address or a fully-qualified domain name.\nFor example, \"8.8.8.8\" or \"myservice.appspot.com\".", + "type": "string" + }, + "name": { + "description": "The canonical name of this endpoint.", + "type": "string" + }, + "features": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The list of features enabled on this endpoint." + } + }, + "id": "Endpoint" + }, + "OAuthRequirements": { + "type": "object", + "properties": { + "canonicalScopes": { + "type": "string", + "description": "The list of publicly documented OAuth scopes that are allowed access. An\nOAuth token containing any of these scopes will be accepted.\n\nExample:\n\n canonical_scopes: https://www.googleapis.com/auth/calendar,\n https://www.googleapis.com/auth/calendar.read" + } + }, + "id": "OAuthRequirements", + "description": "OAuth scopes are a way to define data and permissions on data. For example,\nthere are scopes defined for \"Read-only access to Google Calendar\" and\n\"Access to Cloud Platform\". Users can consent to a scope for an application,\ngiving it permission to access that data on their behalf.\n\nOAuth scope specifications should be fairly coarse grained; a user will need\nto see and understand the text description of what your scope means.\n\nIn most cases: use one or at most two OAuth scopes for an entire family of\nproducts. If your product has multiple APIs, you should probably be sharing\nthe OAuth scope across all of those APIs.\n\nWhen you need finer grained OAuth consent screens: talk with your product\nmanagement about how developers will use them in practice.\n\nPlease note that even though each of the canonical scopes is enough for a\nrequest to be accepted and passed to the backend, a request can still fail\ndue to the backend requiring additional scopes or permissions." }, "Usage": { - "description": "Configuration controlling usage of a service.", "type": "object", "properties": { "producerNotificationChannel": { @@ -292,10 +1067,10 @@ "type": "array" } }, - "id": "Usage" + "id": "Usage", + "description": "Configuration controlling usage of a service." }, "Context": { - "description": "`Context` defines which contexts an API requests.\n\nExample:\n\n context:\n rules:\n - selector: \"*\"\n requested:\n - google.rpc.context.ProjectContext\n - google.rpc.context.OriginContext\n\nThe above specifies that all methods in the API request\n`google.rpc.context.ProjectContext` and\n`google.rpc.context.OriginContext`.\n\nAvailable context types are defined in package\n`google.rpc.context`.", "type": "object", "properties": { "rules": { @@ -306,15 +1081,15 @@ "type": "array" } }, - "id": "Context" + "id": "Context", + "description": "`Context` defines which contexts an API requests.\n\nExample:\n\n context:\n rules:\n - selector: \"*\"\n requested:\n - google.rpc.context.ProjectContext\n - google.rpc.context.OriginContext\n\nThe above specifies that all methods in the API request\n`google.rpc.context.ProjectContext` and\n`google.rpc.context.OriginContext`.\n\nAvailable context types are defined in package\n`google.rpc.context`." }, "LogDescriptor": { - "description": "A description of a log type. Example in YAML format:\n\n - name: library.googleapis.com/activity_history\n description: The history of borrowing and returning library items.\n display_name: Activity\n labels:\n - key: /customer_id\n description: Identifier of a library customer", "type": "object", "properties": { "name": { - "description": "The name of the log. It must be less than 512 characters long and can\ninclude the following characters: upper- and lower-case alphanumeric\ncharacters [A-Za-z0-9], and punctuation characters including\nslash, underscore, hyphen, period [/_-.].", - "type": "string" + "type": "string", + "description": "The name of the log. It must be less than 512 characters long and can\ninclude the following characters: upper- and lower-case alphanumeric\ncharacters [A-Za-z0-9], and punctuation characters including\nslash, underscore, hyphen, period [/_-.]." }, "displayName": { "description": "The human-readable name for this log. This information appears on\nthe user interface and should be concise.", @@ -332,34 +1107,20 @@ "type": "array" } }, - "id": "LogDescriptor" - }, - "CustomErrorRule": { - "type": "object", - "properties": { - "isErrorType": { - "description": "Mark this message as possible payload in error response. Otherwise,\nobjects of this type will be filtered when they appear in error payload.", - "type": "boolean" - }, - "selector": { - "description": "Selects messages to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" - } - }, - "id": "CustomErrorRule", - "description": "A custom error rule." + "id": "LogDescriptor", + "description": "A description of a log type. Example in YAML format:\n\n - name: library.googleapis.com/activity_history\n description: The history of borrowing and returning library items.\n display_name: Activity\n labels:\n - key: /customer_id\n description: Identifier of a library customer" }, "MonitoredResourceDescriptor": { "description": "An object that describes the schema of a MonitoredResource object using a\ntype name and a set of labels. For example, the monitored resource\ndescriptor for Google Compute Engine VM instances has a type of\n`\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and\n`\"zone\"` to identify particular VM instances.\n\nDifferent APIs can support different monitored resource types. APIs generally\nprovide a `list` method that returns the monitored resource descriptors used\nby the API.", "type": "object", "properties": { "name": { - "type": "string", - "description": "Optional. The resource name of the monitored resource descriptor:\n`\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where\n{type} is the value of the `type` field in this object and\n{project_id} is a project ID that provides API-specific context for\naccessing the type. APIs that do not use project information can use the\nresource name format `\"monitoredResourceDescriptors/{type}\"`." + "description": "Optional. The resource name of the monitored resource descriptor:\n`\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where\n{type} is the value of the `type` field in this object and\n{project_id} is a project ID that provides API-specific context for\naccessing the type. APIs that do not use project information can use the\nresource name format `\"monitoredResourceDescriptors/{type}\"`.", + "type": "string" }, "description": { - "description": "Optional. A detailed description of the monitored resource type that might\nbe used in documentation.", - "type": "string" + "type": "string", + "description": "Optional. A detailed description of the monitored resource type that might\nbe used in documentation." }, "displayName": { "type": "string", @@ -370,41 +1131,40 @@ "type": "string" }, "labels": { - "description": "Required. A set of labels used to describe instances of this monitored\nresource type. For example, an individual Google Cloud SQL database is\nidentified by values for the labels `\"database_id\"` and `\"zone\"`.", "items": { "$ref": "LabelDescriptor" }, - "type": "array" + "type": "array", + "description": "Required. A set of labels used to describe instances of this monitored\nresource type. For example, an individual Google Cloud SQL database is\nidentified by values for the labels `\"database_id\"` and `\"zone\"`." } }, "id": "MonitoredResourceDescriptor" }, - "CustomAuthRequirements": { - "description": "Configuration for a custom authentication provider.", + "CustomErrorRule": { "type": "object", "properties": { - "provider": { - "description": "A configuration string containing connection information for the\nauthentication provider, typically formatted as a SmartService string\n(go/smartservice).", - "type": "string" - } - }, - "id": "CustomAuthRequirements" - }, - "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.", - "type": "object", - "properties": { - "useDirectDownload": { - "description": "A boolean that determines if direct download from ESF should be used for\ndownload of this media.", + "isErrorType": { + "description": "Mark this message as possible payload in error response. Otherwise,\nobjects of this type will be filtered when they appear in error payload.", "type": "boolean" }, + "selector": { + "type": "string", + "description": "Selects messages to which this rule applies.\n\nRefer to selector for syntax details." + } + }, + "id": "CustomErrorRule", + "description": "A custom error rule." + }, + "MediaDownload": { + "type": "object", + "properties": { "enabled": { "description": "Whether download is enabled.", "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" + "type": "string", + "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." }, "completeNotification": { "description": "A boolean that determines whether a notification for the completion of a\ndownload should be sent to the backend.", @@ -415,26 +1175,57 @@ "type": "string" }, "maxDirectDownloadSize": { + "type": "string", "format": "int64", - "description": "Optional maximum acceptable size for direct download.\nThe size is specified in bytes.", + "description": "Optional maximum acceptable size for direct download.\nThe size is specified in bytes." + }, + "useDirectDownload": { + "description": "A boolean that determines if direct download from ESF should be used for\ndownload of this media.", + "type": "boolean" + } + }, + "id": "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." + }, + "CustomAuthRequirements": { + "description": "Configuration for a custom authentication provider.", + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "A configuration string containing connection information for the\nauthentication provider, typically formatted as a SmartService string\n(go/smartservice)." + } + }, + "id": "CustomAuthRequirements" + }, + "DisableServiceRequest": { + "description": "Request message for DisableService method.", + "type": "object", + "properties": {}, + "id": "DisableServiceRequest" + }, + "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 }", + "type": "object", + "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" } }, - "id": "MediaDownload" - }, - "DisableServiceRequest": { - "properties": {}, - "id": "DisableServiceRequest", - "description": "Request message for DisableService method.", - "type": "object" + "id": "AuthorizationRule" }, "SearchServicesResponse": { "description": "Response message for SearchServices method.", "type": "object", "properties": { "nextPageToken": { - "description": "Token that can be passed to `ListAvailableServices` to resume a paginated\nquery.", - "type": "string" + "type": "string", + "description": "Token that can be passed to `ListAvailableServices` to resume a paginated\nquery." }, "services": { "description": "Services available publicly or available to the authenticated caller.", @@ -450,47 +1241,46 @@ "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.", "type": "object", "properties": { - "maxSize": { - "format": "int64", - "description": "Optional maximum acceptable size for an upload.\nThe size is specified in bytes.", + "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" }, + "maxSize": { + "type": "string", + "format": "int64", + "description": "Optional maximum acceptable size for an upload.\nThe size is specified in bytes." + }, "mimeTypes": { - "description": "An array of mimetype patterns. Esf will only accept uploads that match one\nof the given patterns.", "items": { "type": "string" }, - "type": "array" + "type": "array", + "description": "An array of mimetype patterns. Esf will only accept uploads that match one\nof the given patterns." }, - "enabled": { - "description": "Whether upload is enabled.", + "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" }, "progressNotification": { "description": "Whether to receive a notification for progress changes of media upload.", "type": "boolean" }, - "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.", + "enabled": { + "description": "Whether upload is enabled.", "type": "boolean" }, "dropzone": { - "description": "Name of the Scotty dropzone to use for the current API.", - "type": "string" + "type": "string", + "description": "Name of the Scotty dropzone to use for the current API." }, "startNotification": { - "description": "Whether to receive a notification on the start of media upload.", - "type": "boolean" - }, - "uploadService": { - "type": "string", - "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": "boolean", + "description": "Whether to receive a notification on the start of media upload." } }, "id": "MediaUpload" }, "UsageRule": { - "description": "Usage configuration rules for the service.\n\nNOTE: Under development.\n\n\nUse this rule to configure unregistered calls for the service. Unregistered\ncalls are calls that do not contain consumer project identity.\n(Example: calls that do not contain an API key).\nBy default, API methods do not allow unregistered calls, and each method call\nmust be identified by a consumer project identity. Use this rule to\nallow/disallow unregistered calls.\n\nExample of an API that wants to allow unregistered calls for entire service.\n\n usage:\n rules:\n - selector: \"*\"\n allow_unregistered_calls: true\n\nExample of a method that wants to allow unregistered calls.\n\n usage:\n rules:\n - selector: \"google.example.library.v1.LibraryService.CreateBook\"\n allow_unregistered_calls: true", "type": "object", "properties": { "allowUnregisteredCalls": { @@ -502,11 +1292,12 @@ "type": "string" }, "skipServiceControl": { - "description": "True, if the method should skip service control. If so, no control plane\nfeature (like quota and billing) will be enabled.", - "type": "boolean" + "type": "boolean", + "description": "True, if the method should skip service control. If so, no control plane\nfeature (like quota and billing) will be enabled." } }, - "id": "UsageRule" + "id": "UsageRule", + "description": "Usage configuration rules for the service.\n\nNOTE: Under development.\n\n\nUse this rule to configure unregistered calls for the service. Unregistered\ncalls are calls that do not contain consumer project identity.\n(Example: calls that do not contain an API key).\nBy default, API methods do not allow unregistered calls, and each method call\nmust be identified by a consumer project identity. Use this rule to\nallow/disallow unregistered calls.\n\nExample of an API that wants to allow unregistered calls for entire service.\n\n usage:\n rules:\n - selector: \"*\"\n allow_unregistered_calls: true\n\nExample of a method that wants to allow unregistered calls.\n\n usage:\n rules:\n - selector: \"google.example.library.v1.LibraryService.CreateBook\"\n allow_unregistered_calls: true" }, "AuthRequirement": { "description": "User-defined authentication requirements, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", @@ -517,30 +1308,33 @@ "type": "string" }, "providerId": { - "type": "string", - "description": "id from authentication provider.\n\nExample:\n\n provider_id: bookstore_auth" + "description": "id from authentication provider.\n\nExample:\n\n provider_id: bookstore_auth", + "type": "string" } }, "id": "AuthRequirement" }, "Documentation": { - "description": "`Documentation` provides the information for describing a service.\n\nExample:\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: \u003e\n The Google Calendar API gives access\n to most calendar features.\n pages:\n - name: Overview\n content: (== include google/foo/overview.md ==)\n - name: Tutorial\n content: (== include google/foo/tutorial.md ==)\n subpages;\n - name: Java\n content: (== include google/foo/tutorial_java.md ==)\n rules:\n - selector: google.calendar.Calendar.Get\n description: \u003e\n ...\n - selector: google.calendar.Calendar.Put\n description: \u003e\n ...\n\u003c/code\u003e\u003c/pre\u003e\nDocumentation is provided in markdown syntax. In addition to\nstandard markdown features, definition lists, tables and fenced\ncode blocks are supported. Section headers can be provided and are\ninterpreted relative to the section nesting of the context where\na documentation fragment is embedded.\n\nDocumentation from the IDL is merged with documentation defined\nvia the config at normalization time, where documentation provided\nby config rules overrides IDL provided.\n\nA number of constructs specific to the API platform are supported\nin documentation text.\n\nIn order to reference a proto element, the following\nnotation can be used:\n\u003cpre\u003e\u003ccode\u003e[fully.qualified.proto.name][]\u003c/code\u003e\u003c/pre\u003e\nTo override the display text used for the link, this can be used:\n\u003cpre\u003e\u003ccode\u003e[display text][fully.qualified.proto.name]\u003c/code\u003e\u003c/pre\u003e\nText can be excluded from doc using the following notation:\n\u003cpre\u003e\u003ccode\u003e(-- internal comment --)\u003c/code\u003e\u003c/pre\u003e\nComments can be made conditional using a visibility label. The below\ntext will be only rendered if the `BETA` label is available:\n\u003cpre\u003e\u003ccode\u003e(--BETA: comment for BETA users --)\u003c/code\u003e\u003c/pre\u003e\nA few directives are available in documentation. Note that\ndirectives must appear on a single line to be properly\nidentified. The `include` directive includes a markdown file from\nan external source:\n\u003cpre\u003e\u003ccode\u003e(== include path/to/file ==)\u003c/code\u003e\u003c/pre\u003e\nThe `resource_for` directive marks a message to be the resource of\na collection in REST view. If it is not specified, tools attempt\nto infer the resource from the operations in a collection:\n\u003cpre\u003e\u003ccode\u003e(== resource_for v1.shelves.books ==)\u003c/code\u003e\u003c/pre\u003e\nThe directive `suppress_warning` does not directly affect documentation\nand is documented together with service config validation.", "type": "object", "properties": { + "summary": { + "description": "A short summary of what the service does. Can only be provided by\nplain text.", + "type": "string" + }, "documentationRootUrl": { "description": "The URL to the root of documentation.", "type": "string" }, "overview": { - "description": "Declares a single overview page. For example:\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: ...\n overview: (== include overview.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nThis is a shortcut for the following declaration (using pages style):\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: ...\n pages:\n - name: Overview\n content: (== include overview.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nNote: you cannot specify both `overview` field and `pages` field.", - "type": "string" + "type": "string", + "description": "Declares a single overview page. For example:\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: ...\n overview: (== include overview.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nThis is a shortcut for the following declaration (using pages style):\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: ...\n pages:\n - name: Overview\n content: (== include overview.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nNote: you cannot specify both `overview` field and `pages` field." }, "rules": { - "description": "A list of documentation rules that apply to individual API elements.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", "items": { "$ref": "DocumentationRule" }, - "type": "array" + "type": "array", + "description": "A list of documentation rules that apply to individual API elements.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order." }, "pages": { "description": "The top level pages for the documentation set.", @@ -548,97 +1342,76 @@ "$ref": "Page" }, "type": "array" - }, - "summary": { - "description": "A short summary of what the service does. Can only be provided by\nplain text.", - "type": "string" } }, - "id": "Documentation" - }, - "AuthenticationRule": { - "description": "Authentication rules for the service.\n\nBy default, if a method has any authentication requirements, every request\nmust include a valid credential matching one of the requirements.\nIt's an error to include more than one kind of credential in a single\nrequest.\n\nIf a method doesn't have any auth requirements, request credentials will be\nignored.", - "type": "object", - "properties": { - "customAuth": { - "description": "Configuration for custom authentication.", - "$ref": "CustomAuthRequirements" - }, - "oauth": { - "$ref": "OAuthRequirements", - "description": "The requirements for OAuth credentials." - }, - "requirements": { - "items": { - "$ref": "AuthRequirement" - }, - "type": "array", - "description": "Requirements for additional authentication providers." - }, - "allowWithoutCredential": { - "description": "Whether to allow requests without a credential. The credential can be\nan OAuth token, Google cookies (first-party auth) or EndUserCreds.\n\nFor requests without credentials, if the service control environment is\nspecified, each incoming request **must** be associated with a service\nconsumer. This can be done by passing an API key that belongs to a consumer\nproject.", - "type": "boolean" - }, - "selector": { - "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" - } - }, - "id": "AuthenticationRule" + "id": "Documentation", + "description": "`Documentation` provides the information for describing a service.\n\nExample:\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: \u003e\n The Google Calendar API gives access\n to most calendar features.\n pages:\n - name: Overview\n content: (== include google/foo/overview.md ==)\n - name: Tutorial\n content: (== include google/foo/tutorial.md ==)\n subpages;\n - name: Java\n content: (== include google/foo/tutorial_java.md ==)\n rules:\n - selector: google.calendar.Calendar.Get\n description: \u003e\n ...\n - selector: google.calendar.Calendar.Put\n description: \u003e\n ...\n\u003c/code\u003e\u003c/pre\u003e\nDocumentation is provided in markdown syntax. In addition to\nstandard markdown features, definition lists, tables and fenced\ncode blocks are supported. Section headers can be provided and are\ninterpreted relative to the section nesting of the context where\na documentation fragment is embedded.\n\nDocumentation from the IDL is merged with documentation defined\nvia the config at normalization time, where documentation provided\nby config rules overrides IDL provided.\n\nA number of constructs specific to the API platform are supported\nin documentation text.\n\nIn order to reference a proto element, the following\nnotation can be used:\n\u003cpre\u003e\u003ccode\u003e[fully.qualified.proto.name][]\u003c/code\u003e\u003c/pre\u003e\nTo override the display text used for the link, this can be used:\n\u003cpre\u003e\u003ccode\u003e[display text][fully.qualified.proto.name]\u003c/code\u003e\u003c/pre\u003e\nText can be excluded from doc using the following notation:\n\u003cpre\u003e\u003ccode\u003e(-- internal comment --)\u003c/code\u003e\u003c/pre\u003e\nComments can be made conditional using a visibility label. The below\ntext will be only rendered if the `BETA` label is available:\n\u003cpre\u003e\u003ccode\u003e(--BETA: comment for BETA users --)\u003c/code\u003e\u003c/pre\u003e\nA few directives are available in documentation. Note that\ndirectives must appear on a single line to be properly\nidentified. The `include` directive includes a markdown file from\nan external source:\n\u003cpre\u003e\u003ccode\u003e(== include path/to/file ==)\u003c/code\u003e\u003c/pre\u003e\nThe `resource_for` directive marks a message to be the resource of\na collection in REST view. If it is not specified, tools attempt\nto infer the resource from the operations in a collection:\n\u003cpre\u003e\u003ccode\u003e(== resource_for v1.shelves.books ==)\u003c/code\u003e\u003c/pre\u003e\nThe directive `suppress_warning` does not directly affect documentation\nand is documented together with service config validation." }, "BackendRule": { "description": "A backend rule provides configuration for an individual API element.", "type": "object", "properties": { - "minDeadline": { - "type": "number", - "format": "double", - "description": "Minimum deadline in seconds needed for this method. Calls having deadline\nvalue lower than this will be rejected." - }, "address": { - "description": "The address of the API backend.", - "type": "string" + "type": "string", + "description": "The address of the API backend." }, "selector": { "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", "type": "string" }, "deadline": { + "type": "number", "format": "double", - "description": "The number of seconds to wait for a response from a request. The\ndefault depends on the deployment context.", + "description": "The number of seconds to wait for a response from a request. The default\ndeadline for gRPC and HTTP requests is 5 seconds." + }, + "minDeadline": { + "format": "double", + "description": "Minimum deadline in seconds needed for this method. Calls having deadline\nvalue lower than this will be rejected.", "type": "number" } }, "id": "BackendRule" }, - "Api": { + "AuthenticationRule": { + "type": "object", "properties": { - "syntax": { - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`." - ], - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ], - "description": "The source syntax of the service.", - "type": "string" + "customAuth": { + "$ref": "CustomAuthRequirements", + "description": "Configuration for custom authentication." }, - "sourceContext": { - "description": "Source context for the protocol buffer service represented by this\nmessage.", - "$ref": "SourceContext" + "oauth": { + "$ref": "OAuthRequirements", + "description": "The requirements for OAuth credentials." }, - "version": { - "description": "A version string for this interface. If specified, must have the form\n`major-version.minor-version`, as in `1.10`. If the minor version is\nomitted, it defaults to zero. If the entire version field is empty, the\nmajor version is derived from the package name, as outlined below. If the\nfield is not empty, the version in the package name will be verified to be\nconsistent with what is provided here.\n\nThe versioning schema uses [semantic\nversioning](http://semver.org) where the major version number\nindicates a breaking change and the minor version an additive,\nnon-breaking change. Both version numbers are signals to users\nwhat to expect from different versions, and should be carefully\nchosen based on the product plan.\n\nThe major version is also reflected in the package name of the\ninterface, which must end in `v\u003cmajor-version\u003e`, as in\n`google.feature.v1`. For major versions 0 and 1, the suffix can\nbe omitted. Zero major versions must only be used for\nexperimental, non-GA interfaces.\n", - "type": "string" + "requirements": { + "description": "Requirements for additional authentication providers.", + "items": { + "$ref": "AuthRequirement" + }, + "type": "array" }, + "allowWithoutCredential": { + "type": "boolean", + "description": "Whether to allow requests without a credential. The credential can be\nan OAuth token, Google cookies (first-party auth) or EndUserCreds.\n\nFor requests without credentials, if the service control environment is\nspecified, each incoming request **must** be associated with a service\nconsumer. This can be done by passing an API key that belongs to a consumer\nproject." + }, + "selector": { + "type": "string", + "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details." + } + }, + "id": "AuthenticationRule", + "description": "Authentication rules for the service.\n\nBy default, if a method has any authentication requirements, every request\nmust include a valid credential matching one of the requirements.\nIt's an error to include more than one kind of credential in a single\nrequest.\n\nIf a method doesn't have any auth requirements, request credentials will be\nignored." + }, + "Api": { + "description": "Api is a light-weight descriptor for an API Interface.\n\nInterfaces are also described as \"protocol buffer services\" in some contexts,\nsuch as by the \"service\" keyword in a .proto file, but they are different\nfrom API Services, which represent a concrete implementation of an interface\nas opposed to simply a description of methods and bindings. They are also\nsometimes simply referred to as \"APIs\" in other contexts, such as the name of\nthis message itself. See https://cloud.google.com/apis/design/glossary for\ndetailed terminology.", + "type": "object", + "properties": { "mixins": { - "description": "Included interfaces. See Mixin.", "items": { "$ref": "Mixin" }, - "type": "array" + "type": "array", + "description": "Included interfaces. See Mixin." }, "options": { "description": "Any metadata attached to the interface.", @@ -655,35 +1428,52 @@ "type": "array" }, "name": { - "description": "The fully qualified name of this interface, including package name\nfollowed by the interface's simple name.", + "type": "string", + "description": "The fully qualified name of this interface, including package name\nfollowed by the interface's simple name." + }, + "syntax": { + "enum": [ + "SYNTAX_PROTO2", + "SYNTAX_PROTO3" + ], + "description": "The source syntax of the service.", + "type": "string", + "enumDescriptions": [ + "Syntax `proto2`.", + "Syntax `proto3`." + ] + }, + "sourceContext": { + "$ref": "SourceContext", + "description": "Source context for the protocol buffer service represented by this\nmessage." + }, + "version": { + "description": "A version string for this interface. If specified, must have the form\n`major-version.minor-version`, as in `1.10`. If the minor version is\nomitted, it defaults to zero. If the entire version field is empty, the\nmajor version is derived from the package name, as outlined below. If the\nfield is not empty, the version in the package name will be verified to be\nconsistent with what is provided here.\n\nThe versioning schema uses [semantic\nversioning](http://semver.org) where the major version number\nindicates a breaking change and the minor version an additive,\nnon-breaking change. Both version numbers are signals to users\nwhat to expect from different versions, and should be carefully\nchosen based on the product plan.\n\nThe major version is also reflected in the package name of the\ninterface, which must end in `v\u003cmajor-version\u003e`, as in\n`google.feature.v1`. For major versions 0 and 1, the suffix can\nbe omitted. Zero major versions must only be used for\nexperimental, non-GA interfaces.\n", "type": "string" } }, - "id": "Api", - "description": "Api is a light-weight descriptor for an API Interface.\n\nInterfaces are also described as \"protocol buffer services\" in some contexts,\nsuch as by the \"service\" keyword in a .proto file, but they are different\nfrom API Services, which represent a concrete implementation of an interface\nas opposed to simply a description of methods and bindings. They are also\nsometimes simply referred to as \"APIs\" in other contexts, such as the name of\nthis message itself. See https://cloud.google.com/apis/design/glossary for\ndetailed terminology.", - "type": "object" + "id": "Api" }, "MetricRule": { "type": "object", "properties": { "metricCosts": { - "description": "Metrics to update when the selected methods are called, and the associated\ncost applied to each metric.\n\nThe key of the map is the metric name, and the values are the amount\nincreased for the metric against which the quota limits are defined.\nThe value must not be negative.", "type": "object", "additionalProperties": { "format": "int64", "type": "string" - } + }, + "description": "Metrics to update when the selected methods are called, and the associated\ncost applied to each metric.\n\nThe key of the map is the metric name, and the values are the amount\nincreased for the metric against which the quota limits are defined.\nThe value must not be negative." }, "selector": { - "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" + "type": "string", + "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details." } }, "id": "MetricRule", "description": "Bind API methods to metrics. Binding a method to a metric causes that\nmetric's configured quota behaviors to apply to the method call." }, "Authentication": { - "description": "`Authentication` defines the authentication configuration for an API.\n\nExample for an API targeted for external use:\n\n name: calendar.googleapis.com\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth", "type": "object", "properties": { "providers": { @@ -694,20 +1484,31 @@ "type": "array" }, "rules": { - "description": "A list of authentication rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", "items": { "$ref": "AuthenticationRule" }, - "type": "array" + "type": "array", + "description": "A list of authentication rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order." } }, - "id": "Authentication" + "id": "Authentication", + "description": "`Authentication` defines the authentication configuration for an API.\n\nExample for an API targeted for external use:\n\n name: calendar.googleapis.com\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth" }, "Operation": { - "id": "Operation", - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { + "response": { + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`." + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" + }, "error": { "$ref": "Status", "description": "The error result of the operation in case of failure or cancellation." @@ -721,28 +1522,19 @@ "type": "object" }, "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", "type": "boolean" - }, - "response": { - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - }, - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" } - } + }, + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call." }, "Page": { + "type": "object", "properties": { "content": { - "description": "The Markdown content of the page. You can use \u003ccode\u003e(== include {path} ==)\u003c/code\u003e\nto include content from a Markdown file.", - "type": "string" + "type": "string", + "description": "The Markdown content of the page. You can use \u003ccode\u003e(== include {path} ==)\u003c/code\u003e\nto include content from a Markdown file." }, "subpages": { "description": "Subpages of this page. The order of subpages specified here will be\nhonored in the generated docset.", @@ -752,50 +1544,55 @@ "type": "array" }, "name": { - "description": "The name of the page. It will be used as an identity of the page to\ngenerate URI of the page, text of the link to this page in navigation,\netc. The full page name (start from the root page name to this page\nconcatenated with `.`) can be used as reference to the page in your\ndocumentation. For example:\n\u003cpre\u003e\u003ccode\u003epages:\n- name: Tutorial\n content: (== include tutorial.md ==)\n subpages:\n - name: Java\n content: (== include tutorial_java.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nYou can reference `Java` page using Markdown reference link syntax:\n`Java`.", - "type": "string" + "type": "string", + "description": "The name of the page. It will be used as an identity of the page to\ngenerate URI of the page, text of the link to this page in navigation,\netc. The full page name (start from the root page name to this page\nconcatenated with `.`) can be used as reference to the page in your\ndocumentation. For example:\n\u003cpre\u003e\u003ccode\u003epages:\n- name: Tutorial\n content: (== include tutorial.md ==)\n subpages:\n - name: Java\n content: (== include tutorial_java.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nYou can reference `Java` page using Markdown reference link syntax:\n`Java`." } }, "id": "Page", - "description": "Represents a documentation page. A page can contain subpages to represent\nnested documentation set structure.", - "type": "object" + "description": "Represents a documentation page. A page can contain subpages to represent\nnested documentation set structure." }, "Status": { + "type": "object", "properties": { - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - }, - "type": "object" - }, - "type": "array" - }, "code": { "format": "int32", "description": "The status code, which should be an enum value of google.rpc.Code.", "type": "integer" + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client." + }, + "details": { + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array", + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." } }, "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object" + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons." }, "AuthProvider": { + "description": "Configuration for an anthentication provider, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", + "type": "object", "properties": { + "audiences": { + "description": "The list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com", + "type": "string" + }, "authorizationUrl": { - "type": "string", - "description": "Redirect URL if JWT token is required but no present or is expired.\nImplement authorizationUrl of securityDefinitions in OpenAPI spec." + "description": "Redirect URL if JWT token is required but no present or is expired.\nImplement authorizationUrl of securityDefinitions in OpenAPI spec.", + "type": "string" }, "issuer": { - "description": "Identifies the principal that issued the JWT. See\nhttps://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1\nUsually a URL or an email address.\n\nExample: https://securetoken.google.com\nExample: 1234567-compute@developer.gserviceaccount.com", - "type": "string" + "type": "string", + "description": "Identifies the principal that issued the JWT. See\nhttps://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1\nUsually a URL or an email address.\n\nExample: https://securetoken.google.com\nExample: 1234567-compute@developer.gserviceaccount.com" }, "id": { "description": "The unique identifier of the auth provider. It will be referred to by\n`AuthRequirement.provider_id`.\n\nExample: \"bookstore_auth\".", @@ -804,64 +1601,14 @@ "jwksUri": { "type": "string", "description": "URL of the provider's public key set to validate signature of the JWT. See\n[OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).\nOptional if the key set document:\n - can be retrieved from\n [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html\n of the issuer.\n - can be inferred from the email domain of the issuer (e.g. a Google service account).\n\nExample: https://www.googleapis.com/oauth2/v1/certs" - }, - "audiences": { - "description": "The list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com", - "type": "string" } }, - "id": "AuthProvider", - "description": "Configuration for an anthentication provider, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", - "type": "object" + "id": "AuthProvider" }, "Service": { "description": "`Service` is the root object of Google service configuration schema. It\ndescribes basic information about a service, such as the name and the\ntitle, and delegates other aspects to sub-sections. Each sub-section is\neither a proto message or a repeated proto message that configures a\nspecific aspect, such as auth. See each proto message definition for details.\n\nExample:\n\n type: google.api.Service\n config_version: 3\n name: calendar.googleapis.com\n title: Google Calendar API\n apis:\n - name: google.calendar.v3.Calendar\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth", "type": "object", "properties": { - "authentication": { - "$ref": "Authentication", - "description": "Auth configuration." - }, - "experimental": { - "$ref": "Experimental", - "description": "Experimental configuration." - }, - "control": { - "$ref": "Control", - "description": "Configuration for the service control plane." - }, - "configVersion": { - "format": "uint32", - "description": "The semantic version of the service configuration. The config version\naffects the interpretation of the service configuration. For example,\ncertain features are enabled by default for certain config versions.\nThe latest config version is `3`.", - "type": "integer" - }, - "monitoring": { - "$ref": "Monitoring", - "description": "Monitoring configuration." - }, - "systemTypes": { - "description": "A list of all proto message types included in this API service.\nIt serves similar purpose as [google.api.Service.types], except that\nthese types are not needed by user-defined APIs. Therefore, they will not\nshow up in the generated discovery doc. This field should only be used\nto define system APIs in ESF.", - "items": { - "$ref": "Type" - }, - "type": "array" - }, - "producerProjectId": { - "description": "The Google project that owns this service.", - "type": "string" - }, - "visibility": { - "$ref": "Visibility", - "description": "API visibility configuration." - }, - "quota": { - "description": "Quota configuration.", - "$ref": "Quota" - }, - "name": { - "type": "string", - "description": "The DNS address at which this service is available,\ne.g. `calendar.googleapis.com`." - }, "customError": { "$ref": "CustomError", "description": "Custom error configuration." @@ -871,75 +1618,75 @@ "type": "string" }, "endpoints": { - "description": "Configuration for network endpoints. If this is empty, then an endpoint\nwith the same name as the service is automatically generated to service all\ndefined APIs.", "items": { "$ref": "Endpoint" }, + "type": "array", + "description": "Configuration for network endpoints. If this is empty, then an endpoint\nwith the same name as the service is automatically generated to service all\ndefined APIs." + }, + "logs": { + "description": "Defines the logs used by this service.", + "items": { + "$ref": "LogDescriptor" + }, "type": "array" }, "apis": { - "description": "A list of API interfaces exported by this service. Only the `name` field\nof the google.protobuf.Api needs to be provided by the configuration\nauthor, as the remaining fields will be derived from the IDL during the\nnormalization process. It is an error to specify an API interface here\nwhich cannot be resolved against the associated IDL files.", "items": { "$ref": "Api" }, - "type": "array" - }, - "logs": { - "items": { - "$ref": "LogDescriptor" - }, "type": "array", - "description": "Defines the logs used by this service." + "description": "A list of API interfaces exported by this service. Only the `name` field\nof the google.protobuf.Api needs to be provided by the configuration\nauthor, as the remaining fields will be derived from the IDL during the\nnormalization process. It is an error to specify an API interface here\nwhich cannot be resolved against the associated IDL files." }, "types": { - "description": "A list of all proto message types included in this API service.\nTypes referenced directly or indirectly by the `apis` are\nautomatically included. Messages which are not referenced but\nshall be included, such as types used by the `google.protobuf.Any` type,\nshould be listed here by name. Example:\n\n types:\n - name: google.protobuf.Int32", "items": { "$ref": "Type" }, - "type": "array" + "type": "array", + "description": "A list of all proto message types included in this API service.\nTypes referenced directly or indirectly by the `apis` are\nautomatically included. Messages which are not referenced but\nshall be included, such as types used by the `google.protobuf.Any` type,\nshould be listed here by name. Example:\n\n types:\n - name: google.protobuf.Int32" }, "sourceInfo": { "$ref": "SourceInfo", "description": "Output only. The source information for this configuration if available." }, "http": { - "description": "HTTP configuration.", - "$ref": "Http" - }, - "backend": { - "description": "API backend configuration.", - "$ref": "Backend" + "$ref": "Http", + "description": "HTTP configuration." }, "systemParameters": { - "description": "System parameter configuration.", - "$ref": "SystemParameters" + "$ref": "SystemParameters", + "description": "System parameter configuration." + }, + "backend": { + "$ref": "Backend", + "description": "API backend configuration." }, "documentation": { - "description": "Additional API documentation.", - "$ref": "Documentation" + "$ref": "Documentation", + "description": "Additional API documentation." + }, + "monitoredResources": { + "items": { + "$ref": "MonitoredResourceDescriptor" + }, + "type": "array", + "description": "Defines the monitored resources used by this service. This is required\nby the Service.monitoring and Service.logging configurations." }, "logging": { "$ref": "Logging", "description": "Logging configuration." }, - "monitoredResources": { - "description": "Defines the monitored resources used by this service. This is required\nby the Service.monitoring and Service.logging configurations.", + "enums": { "items": { - "$ref": "MonitoredResourceDescriptor" + "$ref": "Enum" }, - "type": "array" + "type": "array", + "description": "A list of all enum types included in this API service. Enums\nreferenced directly or indirectly by the `apis` are automatically\nincluded. Enums which are not referenced but shall be included\nshould be listed here by name. Example:\n\n enums:\n - name: google.someapi.v1.SomeEnum" }, "context": { "$ref": "Context", "description": "Context configuration." }, - "enums": { - "description": "A list of all enum types included in this API service. Enums\nreferenced directly or indirectly by the `apis` are automatically\nincluded. Enums which are not referenced but shall be included\nshould be listed here by name. Example:\n\n enums:\n - name: google.someapi.v1.SomeEnum", - "items": { - "$ref": "Enum" - }, - "type": "array" - }, "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.", "type": "string" @@ -954,12 +1701,61 @@ "$ref": "MetricDescriptor" }, "type": "array" + }, + "authentication": { + "$ref": "Authentication", + "description": "Auth configuration." + }, + "experimental": { + "$ref": "Experimental", + "description": "Experimental configuration." + }, + "control": { + "$ref": "Control", + "description": "Configuration for the service control plane." + }, + "configVersion": { + "type": "integer", + "format": "uint32", + "description": "The semantic version of the service configuration. The config version\naffects the interpretation of the service configuration. For example,\ncertain features are enabled by default for certain config versions.\nThe latest config version is `3`." + }, + "monitoring": { + "$ref": "Monitoring", + "description": "Monitoring configuration." + }, + "producerProjectId": { + "description": "The Google project that owns this service.", + "type": "string" + }, + "systemTypes": { + "items": { + "$ref": "Type" + }, + "type": "array", + "description": "A list of all proto message types included in this API service.\nIt serves similar purpose as [google.api.Service.types], except that\nthese types are not needed by user-defined APIs. Therefore, they will not\nshow up in the generated discovery doc. This field should only be used\nto define system APIs in ESF." + }, + "visibility": { + "$ref": "Visibility", + "description": "API visibility configuration." + }, + "quota": { + "$ref": "Quota", + "description": "Quota configuration." + }, + "name": { + "type": "string", + "description": "The DNS address at which this service is available,\ne.g. `calendar.googleapis.com`." } }, "id": "Service" }, "EnumValue": { + "type": "object", "properties": { + "name": { + "type": "string", + "description": "Enum value name." + }, "options": { "description": "Protocol buffer options.", "items": { @@ -971,49 +1767,21 @@ "format": "int32", "description": "Enum value number.", "type": "integer" - }, - "name": { - "description": "Enum value name.", - "type": "string" } }, "id": "EnumValue", - "description": "Enum value definition.", - "type": "object" - }, - "CustomHttpPattern": { - "properties": { - "kind": { - "description": "The name of this custom HTTP verb.", - "type": "string" - }, - "path": { - "description": "The path matched by this custom verb.", - "type": "string" - } - }, - "id": "CustomHttpPattern", - "description": "A custom pattern is used for defining custom HTTP verb.", - "type": "object" + "description": "Enum value definition." }, "OperationMetadata": { + "description": "The metadata associated with a long running operation resource.", + "type": "object", "properties": { - "progressPercentage": { - "format": "int32", - "description": "Percentage of completion of this operation, ranging from 0 to 100.", - "type": "integer" - }, - "startTime": { - "format": "google-datetime", - "description": "The start time of the operation.", - "type": "string" - }, "steps": { - "description": "Detailed status information for each step. The order is undetermined.", "items": { "$ref": "Step" }, - "type": "array" + "type": "array", + "description": "Detailed status information for each step. The order is undetermined." }, "resourceNames": { "description": "The full name of the resources that this operation is directly\nassociated with.", @@ -1021,64 +1789,103 @@ "type": "string" }, "type": "array" + }, + "progressPercentage": { + "type": "integer", + "format": "int32", + "description": "Percentage of completion of this operation, ranging from 0 to 100." + }, + "startTime": { + "format": "google-datetime", + "description": "The start time of the operation.", + "type": "string" } }, - "id": "OperationMetadata", - "description": "The metadata associated with a long running operation resource.", - "type": "object" + "id": "OperationMetadata" }, - "PublishedService": { - "description": "The published version of a Service that is managed by\nGoogle Service Management.", + "CustomHttpPattern": { "type": "object", "properties": { - "name": { - "description": "The resource name of the service.\n\nA valid name would be:\n- services/serviceuser.googleapis.com", - "type": "string" + "path": { + "type": "string", + "description": "The path matched by this custom verb." }, - "service": { - "description": "The service's published configuration.", - "$ref": "Service" + "kind": { + "description": "The name of this custom HTTP verb.", + "type": "string" } }, - "id": "PublishedService" + "id": "CustomHttpPattern", + "description": "A custom pattern is used for defining custom HTTP verb." }, "SystemParameterRule": { - "description": "Define a system parameter rule mapping system parameter definitions to\nmethods.", "type": "object", "properties": { "parameters": { + "description": "Define parameters. Multiple names may be defined for a parameter.\nFor a given method call, only one of them should be used. If multiple\nnames are used the behavior is implementation-dependent.\nIf none of the specified names are present the behavior is\nparameter-dependent.", "items": { "$ref": "SystemParameter" }, - "type": "array", - "description": "Define parameters. Multiple names may be defined for a parameter.\nFor a given method call, only one of them should be used. If multiple\nnames are used the behavior is implementation-dependent.\nIf none of the specified names are present the behavior is\nparameter-dependent." + "type": "array" }, "selector": { "description": "Selects the methods to which this rule applies. Use '*' to indicate all\nmethods in all APIs.\n\nRefer to selector for syntax details.", "type": "string" } }, - "id": "SystemParameterRule" + "id": "SystemParameterRule", + "description": "Define a system parameter rule mapping system parameter definitions to\nmethods." }, - "VisibilityRule": { - "description": "A visibility rule provides visibility configuration for an individual API\nelement.", + "PublishedService": { "type": "object", "properties": { - "restriction": { - "description": "A comma-separated list of visibility labels that apply to the `selector`.\nAny of the listed labels can be used to grant the visibility.\n\nIf a rule has multiple labels, removing one of the labels but not all of\nthem can break clients.\n\nExample:\n\n visibility:\n rules:\n - selector: google.calendar.Calendar.EnhancedSearch\n restriction: GOOGLE_INTERNAL, TRUSTED_TESTER\n\nRemoving GOOGLE_INTERNAL from this restriction will break clients that\nrely on this method and only had access to it through GOOGLE_INTERNAL.", - "type": "string" + "service": { + "$ref": "Service", + "description": "The service's published configuration." }, - "selector": { - "description": "Selects methods, messages, fields, enums, etc. to which this rule applies.\n\nRefer to selector for syntax details.", + "name": { + "description": "The resource name of the service.\n\nA valid name would be:\n- services/serviceuser.googleapis.com", "type": "string" } }, - "id": "VisibilityRule" + "id": "PublishedService", + "description": "The published version of a Service that is managed by\nGoogle Service Management." }, "HttpRule": { "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&sub.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¶m=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.", "type": "object", "properties": { + "selector": { + "type": "string", + "description": "Selects methods to which this rule applies.\n\nRefer to selector for syntax details." + }, + "custom": { + "$ref": "CustomHttpPattern", + "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." + }, + "patch": { + "description": "Used for updating a resource.", + "type": "string" + }, + "get": { + "description": "Used for listing and getting information about resources.", + "type": "string" + }, + "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" + }, + "put": { + "type": "string", + "description": "Used for updating a resource." + }, + "delete": { + "type": "string", + "description": "Used for deleting a resource." + }, "body": { "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" @@ -1103,878 +1910,93 @@ "type": "array" }, "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" + "type": "string", + "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." }, "responseBody": { - "description": "The name of the response field whose value is mapped to the HTTP body of\nresponse. Other response fields are ignored. This field is optional. When\nnot set, the response message will be used as HTTP body of response.\nNOTE: the referred field must be not a repeated field and must be present\nat the top-level of response message type.", - "type": "string" + "type": "string", + "description": "The name of the response field whose value is mapped to the HTTP body of\nresponse. Other response fields are ignored. This field is optional. When\nnot set, the response message will be used as HTTP body of response.\nNOTE: the referred field must be not a repeated field and must be present\nat the top-level of response message type." }, "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.", - "$ref": "MediaUpload" - }, - "selector": { - "description": "Selects methods to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" - }, - "custom": { - "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.", - "$ref": "CustomHttpPattern" - }, - "patch": { - "description": "Used for updating a resource.", - "type": "string" - }, - "get": { - "description": "Used for listing and getting information about resources.", - "type": "string" - }, - "put": { - "type": "string", - "description": "Used for updating a resource." - }, - "delete": { - "description": "Used for deleting a resource.", - "type": "string" + "$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." } }, "id": "HttpRule" }, - "MonitoringDestination": { - "description": "Configuration of a specific monitoring destination (the producer project\nor the consumer project).", + "VisibilityRule": { + "description": "A visibility rule provides visibility configuration for an individual API\nelement.", "type": "object", "properties": { - "monitoredResource": { - "description": "The monitored resource type. The type must be defined in\nService.monitored_resources section.", + "restriction": { + "description": "A comma-separated list of visibility labels that apply to the `selector`.\nAny of the listed labels can be used to grant the visibility.\n\nIf a rule has multiple labels, removing one of the labels but not all of\nthem can break clients.\n\nExample:\n\n visibility:\n rules:\n - selector: google.calendar.Calendar.EnhancedSearch\n restriction: GOOGLE_INTERNAL, TRUSTED_TESTER\n\nRemoving GOOGLE_INTERNAL from this restriction will break clients that\nrely on this method and only had access to it through GOOGLE_INTERNAL.", "type": "string" }, + "selector": { + "type": "string", + "description": "Selects methods, messages, fields, enums, etc. to which this rule applies.\n\nRefer to selector for syntax details." + } + }, + "id": "VisibilityRule" + }, + "MonitoringDestination": { + "type": "object", + "properties": { "metrics": { "description": "Names of the metrics to report to this monitoring destination.\nEach name must be defined in Service.metrics section.", "items": { "type": "string" }, "type": "array" + }, + "monitoredResource": { + "type": "string", + "description": "The monitored resource type. The type must be defined in\nService.monitored_resources section." } }, - "id": "MonitoringDestination" + "id": "MonitoringDestination", + "description": "Configuration of a specific monitoring destination (the producer project\nor the consumer project)." }, "Visibility": { "description": "`Visibility` defines restrictions for the visibility of service\nelements. Restrictions are specified using visibility labels\n(e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.\n\nUsers and projects can have access to more than one visibility label. The\neffective visibility for multiple labels is the union of each label's\nelements, plus any unrestricted elements.\n\nIf an element and its parents have no restrictions, visibility is\nunconditionally granted.\n\nExample:\n\n visibility:\n rules:\n - selector: google.calendar.Calendar.EnhancedSearch\n restriction: TRUSTED_TESTER\n - selector: google.calendar.Calendar.Delegate\n restriction: GOOGLE_INTERNAL\n\nHere, all methods are publicly visible except for the restricted methods\nEnhancedSearch and Delegate.", "type": "object", "properties": { "rules": { - "description": "A list of visibility rules that apply to individual API elements.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", "items": { "$ref": "VisibilityRule" }, - "type": "array" + "type": "array", + "description": "A list of visibility rules that apply to individual API elements.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order." } }, "id": "Visibility" - }, - "SystemParameters": { - "type": "object", - "properties": { - "rules": { - "description": "Define system parameters.\n\nThe parameters defined here will override the default parameters\nimplemented by the system. If this field is missing from the service\nconfig, default system parameters will be used. Default system parameters\nand names is implementation-dependent.\n\nExample: define api key for all methods\n\n system_parameters\n rules:\n - selector: \"*\"\n parameters:\n - name: api_key\n url_query_parameter: api_key\n\n\nExample: define 2 api key names for a specific method.\n\n system_parameters\n rules:\n - selector: \"/ListShelves\"\n parameters:\n - name: api_key\n http_header: Api-Key1\n - name: api_key\n http_header: Api-Key2\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", - "items": { - "$ref": "SystemParameterRule" - }, - "type": "array" - } - }, - "id": "SystemParameters", - "description": "### System parameter configuration\n\nA system parameter is a special kind of parameter defined by the API\nsystem, not by an individual API. It is typically mapped to an HTTP header\nand/or a URL query parameter. This configuration specifies which methods\nchange the names of the system parameters." - }, - "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\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", - "type": "object", - "properties": { - "limits": { - "description": "List of `QuotaLimit` definitions for the service.", - "items": { - "$ref": "QuotaLimit" - }, - "type": "array" - }, - "metricRules": { - "items": { - "$ref": "MetricRule" - }, - "type": "array", - "description": "List of `MetricRule` definitions, each one mapping a selected method to one\nor more metrics." - } - }, - "id": "Quota" - }, - "Step": { - "description": "Represents the status of one operation step.", - "type": "object", - "properties": { - "description": { - "description": "The short description of the step.", - "type": "string" - }, - "status": { - "description": "The status code.", - "type": "string", - "enumDescriptions": [ - "Unspecifed code.", - "The operation or step has completed without errors.", - "The operation or step has not started yet.", - "The operation or step is in progress.", - "The operation or step has completed with errors. If the operation is\nrollbackable, the rollback completed with errors too.", - "The operation or step has completed with cancellation." - ], - "enum": [ - "STATUS_UNSPECIFIED", - "DONE", - "NOT_STARTED", - "IN_PROGRESS", - "FAILED", - "CANCELLED" - ] - } - }, - "id": "Step" - }, - "LoggingDestination": { - "description": "Configuration of a specific logging destination (the producer project\nor the consumer project).", - "type": "object", - "properties": { - "logs": { - "description": "Names of the logs to be sent to this destination. Each name must\nbe defined in the Service.logs section. If the log name is\nnot a domain scoped name, it will be automatically prefixed with\nthe service name followed by \"/\".", - "items": { - "type": "string" - }, - "type": "array" - }, - "monitoredResource": { - "description": "The monitored resource type. The type must be defined in the\nService.monitored_resources section.", - "type": "string" - } - }, - "id": "LoggingDestination" - }, - "Option": { - "description": "A protocol buffer option, which can be attached to a message, field,\nenumeration, etc.", - "type": "object", - "properties": { - "name": { - "description": "The option's name. For protobuf built-in options (options defined in\ndescriptor.proto), this is the short name. For example, `\"map_entry\"`.\nFor custom options, it should be the fully-qualified name. For example,\n`\"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,\nthe corresponding wrapper type defined in google/protobuf/wrappers.proto\nshould be used. If the value is an enum, it should be stored as an int32\nvalue using the google.protobuf.Int32Value type.", - "type": "object" - } - }, - "id": "Option" - }, - "Logging": { - "description": "Logging configuration of the service.\n\nThe following example shows how to configure logs to be sent to the\nproducer and consumer projects. In the example, the `activity_history`\nlog is sent to both the producer and consumer projects, whereas the\n`purchase_history` log is only sent to the producer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n logs:\n - name: activity_history\n labels:\n - key: /customer_id\n - name: purchase_history\n logging:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history\n - purchase_history\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history", - "type": "object", - "properties": { - "consumerDestinations": { - "description": "Logging configurations for sending logs to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none consumer destination.", - "items": { - "$ref": "LoggingDestination" - }, - "type": "array" - }, - "producerDestinations": { - "description": "Logging configurations for sending logs to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none producer destination.", - "items": { - "$ref": "LoggingDestination" - }, - "type": "array" - } - }, - "id": "Logging" - }, - "Method": { - "description": "Method represents a method of an API interface.", - "type": "object", - "properties": { - "responseTypeUrl": { - "description": "The URL of the output message type.", - "type": "string" - }, - "options": { - "description": "Any metadata attached to the method.", - "items": { - "$ref": "Option" - }, - "type": "array" - }, - "responseStreaming": { - "description": "If true, the response is streamed.", - "type": "boolean" - }, - "name": { - "description": "The simple name of this method.", - "type": "string" - }, - "requestTypeUrl": { - "description": "A URL of the input message type.", - "type": "string" - }, - "requestStreaming": { - "description": "If true, the request is streamed.", - "type": "boolean" - }, - "syntax": { - "description": "The source syntax of this method.", - "type": "string", - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`." - ], - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ] - } - }, - "id": "Method" - }, - "QuotaLimit": { - "description": "`QuotaLimit` defines a specific limit that applies over a specified duration\nfor a limit type. There can be at most one limit for a duration and limit\ntype combination defined within a `QuotaGroup`.", - "type": "object", - "properties": { - "maxLimit": { - "type": "string", - "format": "int64", - "description": "Maximum number of tokens that can be consumed during the specified\nduration. Client application developers can override the default limit up\nto this maximum. If specified, this value cannot be set to a value less\nthan the default limit. If not specified, it is set to the default limit.\n\nTo allow clients to apply overrides with no upper bound, set this to -1,\nindicating unlimited maximum quota.\n\nUsed by group-based quotas only." - }, - "name": { - "description": "Name of the quota limit. The name is used to refer to the limit when\noverriding the default limit on per-consumer basis.\n\nFor metric-based quota limits, the name must be provided, and it must be\nunique within the service. The name can only include alphanumeric\ncharacters as well as '-'.\n\nThe maximum length of the limit name is 64 characters.\n\nThe name of a limit is used as a unique identifier for this limit.\nTherefore, once a limit has been put into use, its name should be\nimmutable. You can use the display_name field to provide a user-friendly\nname for the limit. The display name can be evolved over time without\naffecting the identity of the limit.", - "type": "string" - }, - "duration": { - "description": "Duration of this limit in textual notation. Example: \"100s\", \"24h\", \"1d\".\nFor duration longer than a day, only multiple of days is supported. We\nsupport only \"100s\" and \"1d\" for now. Additional support will be added in\nthe future. \"0\" indicates indefinite duration.\n\nUsed by group-based quotas only.", - "type": "string" - }, - "freeTier": { - "format": "int64", - "description": "Free tier value displayed in the Developers Console for this limit.\nThe free tier is the number of tokens that will be subtracted from the\nbilled amount when billing is enabled.\nThis field can only be set on a limit with duration \"1d\", in a billable\ngroup; it is invalid on any other limit. If this field is not set, it\ndefaults to 0, indicating that there is no free tier for this service.\n\nUsed by group-based quotas only.", - "type": "string" - }, - "defaultLimit": { - "format": "int64", - "description": "Default number of tokens that can be consumed during the specified\nduration. This is the number of tokens assigned when a client\napplication developer activates the service for his/her project.\n\nSpecifying a value of 0 will block all requests. This can be used if you\nare provisioning quota to selected consumers and blocking others.\nSimilarly, a value of -1 will indicate an unlimited quota. No other\nnegative values are allowed.\n\nUsed by group-based quotas only.", - "type": "string" - }, - "displayName": { - "description": "User-visible display name for this limit.\nOptional. If not set, the UI will provide a default display name based on\nthe quota configuration. This field can be used to override the default\ndisplay name generated from the configuration.", - "type": "string" - }, - "metric": { - "description": "The name of the metric this quota limit applies to. The quota limits with\nthe same metric will be checked together during runtime. The metric must be\ndefined within the service config.\n\nUsed by metric-based quotas only.", - "type": "string" - }, - "description": { - "description": "Optional. User-visible, extended description for this quota limit.\nShould be used only when more context is needed to understand this limit\nthan provided by the limit's display name (see: `display_name`).", - "type": "string" - }, - "values": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "Tiered limit values, currently only STANDARD is supported.", - "type": "object" - }, - "unit": { - "description": "Specify the unit of the quota limit. It uses the same syntax as\nMetric.unit. The supported unit kinds are determined by the quota\nbackend system.\n\nThe [Google Service Control](https://cloud.google.com/service-control)\nsupports the following unit components:\n* One of the time intevals:\n * \"/min\" for quota every minute.\n * \"/d\" for quota every 24 hours, starting 00:00 US Pacific Time.\n * Otherwise the quota won't be reset by time, such as storage limit.\n* One and only one of the granted containers:\n * \"/{project}\" quota for a project\n\nHere are some examples:\n* \"1/min/{project}\" for quota per minute per project.\n\nNote: the order of unit components is insignificant.\nThe \"1\" at the beginning is required to follow the metric unit syntax.\n\nUsed by metric-based quotas only.", - "type": "string" - } - }, - "id": "QuotaLimit" - }, - "Mixin": { - "description": "Declares an API Interface to be included in this interface. The including\ninterface must redeclare all the methods from the included interface, but\ndocumentation and options are inherited as follows:\n\n- If after comment and whitespace stripping, the documentation\n string of the redeclared method is empty, it will be inherited\n from the original method.\n\n- Each annotation belonging to the service config (http,\n visibility) which is not set in the redeclared method will be\n inherited.\n\n- If an http annotation is inherited, the path pattern will be\n modified as follows. Any version prefix will be replaced by the\n version of the including interface plus the root path if\n specified.\n\nExample of a simple mixin:\n\n package google.acl.v1;\n service AccessControl {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v1/{resource=**}:getAcl\";\n }\n }\n\n package google.storage.v2;\n service Storage {\n // rpc GetAcl(GetAclRequest) returns (Acl);\n\n // Get a data record.\n rpc GetData(GetDataRequest) returns (Data) {\n option (google.api.http).get = \"/v2/{resource=**}\";\n }\n }\n\nExample of a mixin configuration:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n\nThe mixin construct implies that all methods in `AccessControl` are\nalso declared with same name and request/response types in\n`Storage`. A documentation generator or annotation processor will\nsee the effective `Storage.GetAcl` method after inherting\ndocumentation and annotations as follows:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/{resource=**}:getAcl\";\n }\n ...\n }\n\nNote how the version in the path pattern changed from `v1` to `v2`.\n\nIf the `root` field in the mixin is specified, it should be a\nrelative path under which inherited HTTP paths are placed. Example:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n root: acls\n\nThis implies the following inherited HTTP annotation:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\";\n }\n ...\n }", - "type": "object", - "properties": { - "name": { - "description": "The fully qualified name of the interface which is included.", - "type": "string" - }, - "root": { - "description": "If non-empty specifies a path under which inherited HTTP paths\nare rooted.", - "type": "string" - } - }, - "id": "Mixin" - }, - "CustomError": { - "description": "Customize service error responses. For example, list any service\nspecific protobuf types that can appear in error detail lists of\nerror responses.\n\nExample:\n\n custom_error:\n types:\n - google.foo.v1.CustomError\n - google.foo.v1.AnotherError", - "type": "object", - "properties": { - "rules": { - "description": "The list of custom error rules that apply to individual API messages.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", - "items": { - "$ref": "CustomErrorRule" - }, - "type": "array" - }, - "types": { - "description": "The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "CustomError" - }, - "Http": { - "description": "Defines the HTTP configuration for an API service. It contains a list of\nHttpRule, each specifying the mapping of an RPC method\nto one or more HTTP REST API methods.", - "type": "object", - "properties": { - "fullyDecodeReservedExpansion": { - "description": "When set to true, URL path parmeters will be fully URI-decoded except in\ncases of single segment matches in reserved expansion, where \"%2F\" will be\nleft encoded.\n\nThe default behavior is to not decode RFC 6570 reserved characters in multi\nsegment matches.", - "type": "boolean" - }, - "rules": { - "description": "A list of HTTP configuration rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", - "items": { - "$ref": "HttpRule" - }, - "type": "array" - } - }, - "id": "Http" - }, - "SourceInfo": { - "description": "Source information used to create a Service Config", - "type": "object", - "properties": { - "sourceFiles": { - "description": "All files used during config generation.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - } - }, - "id": "SourceInfo" - }, - "Control": { - "id": "Control", - "description": "Selects and configures the service controller used by the service. The\nservice controller handles features like abuse, quota, billing, logging,\nmonitoring, etc.", - "type": "object", - "properties": { - "environment": { - "description": "The service control environment to use. If empty, no control plane\nfeature (like quota and billing) will be enabled.", - "type": "string" - } - } - }, - "SystemParameter": { - "description": "Define a parameter's name and location. The parameter may be passed as either\nan HTTP header or a URL query parameter, and if both are passed the behavior\nis implementation-dependent.", - "type": "object", - "properties": { - "urlQueryParameter": { - "description": "Define the URL query parameter name to use for the parameter. It is case\nsensitive.", - "type": "string" - }, - "httpHeader": { - "type": "string", - "description": "Define the HTTP header name to use for the parameter. It is case\ninsensitive." - }, - "name": { - "description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive.", - "type": "string" - } - }, - "id": "SystemParameter" - }, - "Monitoring": { - "id": "Monitoring", - "description": "Monitoring configuration of the service.\n\nThe example below shows how to configure monitored resources and metrics\nfor monitoring. In the example, a monitored resource and two metrics are\ndefined. The `library.googleapis.com/book/returned_count` metric is sent\nto both producer and consumer projects, whereas the\n`library.googleapis.com/book/overdue_count` metric is only sent to the\nconsumer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n metrics:\n - name: library.googleapis.com/book/returned_count\n metric_kind: DELTA\n value_type: INT64\n labels:\n - key: /customer_id\n - name: library.googleapis.com/book/overdue_count\n metric_kind: GAUGE\n value_type: INT64\n labels:\n - key: /customer_id\n monitoring:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n - library.googleapis.com/book/overdue_count", - "type": "object", - "properties": { - "consumerDestinations": { - "description": "Monitoring configurations for sending metrics to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none consumer destination.", - "items": { - "$ref": "MonitoringDestination" - }, - "type": "array" - }, - "producerDestinations": { - "items": { - "$ref": "MonitoringDestination" - }, - "type": "array", - "description": "Monitoring configurations for sending metrics to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none producer destination." - } - } - }, - "Field": { - "description": "A single field of a message type.", - "type": "object", - "properties": { - "kind": { - "description": "The field type.", - "type": "string", - "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." - ], - "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" - ] - }, - "jsonName": { - "description": "The field JSON name.", - "type": "string" - }, - "options": { - "description": "The protocol buffer options.", - "items": { - "$ref": "Option" - }, - "type": "array" - }, - "oneofIndex": { - "format": "int32", - "description": "The index of the field type in `Type.oneofs`, for message or enumeration\ntypes. The first type has index 1; zero means the type is not in the list.", - "type": "integer" - }, - "packed": { - "description": "Whether to use alternative packed wire representation.", - "type": "boolean" - }, - "cardinality": { - "enumDescriptions": [ - "For fields with unknown cardinality.", - "For optional fields.", - "For required fields. Proto2 syntax only.", - "For repeated fields." - ], - "enum": [ - "CARDINALITY_UNKNOWN", - "CARDINALITY_OPTIONAL", - "CARDINALITY_REQUIRED", - "CARDINALITY_REPEATED" - ], - "description": "The field cardinality.", - "type": "string" - }, - "defaultValue": { - "description": "The string value of the default value of this field. Proto2 syntax only.", - "type": "string" - }, - "name": { - "description": "The field name.", - "type": "string" - }, - "typeUrl": { - "description": "The field type URL, without the scheme, for message or enumeration\ntypes. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.", - "type": "string" - }, - "number": { - "format": "int32", - "description": "The field number.", - "type": "integer" - } - }, - "id": "Field" - }, - "Enum": { - "description": "Enum type definition.", - "type": "object", - "properties": { - "enumvalue": { - "description": "Enum value definitions.", - "items": { - "$ref": "EnumValue" - }, - "type": "array" - }, - "name": { - "description": "Enum type name.", - "type": "string" - }, - "options": { - "description": "Protocol buffer options.", - "items": { - "$ref": "Option" - }, - "type": "array" - }, - "syntax": { - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ], - "description": "The source syntax.", - "type": "string", - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`." - ] - }, - "sourceContext": { - "description": "The source context.", - "$ref": "SourceContext" - } - }, - "id": "Enum" - }, - "EnableServiceRequest": { - "properties": {}, - "id": "EnableServiceRequest", - "description": "Request message for EnableService method.", - "type": "object" - }, - "LabelDescriptor": { - "id": "LabelDescriptor", - "description": "A description of a label.", - "type": "object", - "properties": { - "key": { - "description": "The label key.", - "type": "string" - }, - "description": { - "description": "A human-readable description for the label.", - "type": "string" - }, - "valueType": { - "enum": [ - "STRING", - "BOOL", - "INT64" - ], - "description": "The type of data that can be assigned to the label.", - "type": "string", - "enumDescriptions": [ - "A variable-length string. This is the default.", - "Boolean; true or false.", - "A 64-bit signed integer." - ] - } - } - }, - "Type": { - "description": "A protocol buffer message type.", - "type": "object", - "properties": { - "options": { - "description": "The protocol buffer options.", - "items": { - "$ref": "Option" - }, - "type": "array" - }, - "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" - }, - "syntax": { - "description": "The source syntax.", - "type": "string", - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`." - ], - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ] - }, - "sourceContext": { - "$ref": "SourceContext", - "description": "The source context." - } - }, - "id": "Type" - }, - "Experimental": { - "description": "Experimental service configuration. These configuration options can\nonly be used by whitelisted users.", - "type": "object", - "properties": { - "authorization": { - "$ref": "AuthorizationConfig", - "description": "Authorization configuration." - } - }, - "id": "Experimental" - }, - "Backend": { - "description": "`Backend` defines the backend configuration for a service.", - "type": "object", - "properties": { - "rules": { - "description": "A list of API backend rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", - "items": { - "$ref": "BackendRule" - }, - "type": "array" - } - }, - "id": "Backend" - }, - "DocumentationRule": { - "id": "DocumentationRule", - "description": "A documentation rule provides information about individual API elements.", - "type": "object", - "properties": { - "description": { - "description": "Description of the selected API(s).", - "type": "string" - }, - "deprecationDescription": { - "type": "string", - "description": "Deprecation description of the selected element(s). It can be provided if an\nelement is marked as `deprecated`." - }, - "selector": { - "description": "The selector is a comma-separated list of patterns. Each pattern is a\nqualified name of the element which may end in \"*\", indicating a wildcard.\nWildcards are only allowed at the end and for a whole component of the\nqualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". To\nspecify a default for all applicable elements, the whole pattern \"*\"\nis used.", - "type": "string" - } - } - }, - "AuthorizationConfig": { - "properties": { - "provider": { - "description": "The name of the authorization provider, such as\nfirebaserules.googleapis.com.", - "type": "string" - } - }, - "id": "AuthorizationConfig", - "description": "Configuration of authorization.\n\nThis section determines the authorization provider, if unspecified, then no\nauthorization check will be done.\n\nExample:\n\n experimental:\n authorization:\n provider: firebaserules.googleapis.com", - "type": "object" - }, - "ContextRule": { - "description": "A context rule provides information about the context for an individual API\nelement.", - "type": "object", - "properties": { - "requested": { - "description": "A list of full type names of requested contexts.", - "items": { - "type": "string" - }, - "type": "array" - }, - "selector": { - "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" - }, - "provided": { - "description": "A list of full type names of provided contexts.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "ContextRule" - }, - "MetricDescriptor": { - "description": "Defines a metric type and its schema. Once a metric descriptor is created,\ndeleting or altering it stops data collection and makes the metric type's\nexisting data unusable.", - "type": "object", - "properties": { - "metricKind": { - "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\nmeasurements in a time series should have the same start time\nand increasing end times, until an event resets the cumulative\nvalue to zero and sets a new start time for the following\npoints." - ], - "enum": [ - "METRIC_KIND_UNSPECIFIED", - "GAUGE", - "DELTA", - "CUMULATIVE" - ], - "description": "Whether the metric records instantaneous values, changes to a value, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", - "type": "string" - }, - "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.\nUse sentence case without an ending period, for example \"Request count\".", - "type": "string" - }, - "unit": { - "description": "The unit in which the metric value is reported. It is only applicable\nif the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The\nsupported units are a subset of [The Unified Code for Units of\nMeasure](http://unitsofmeasure.org/ucum.html) standard:\n\n**Basic units (UNIT)**\n\n* `bit` bit\n* `By` byte\n* `s` second\n* `min` minute\n* `h` hour\n* `d` day\n\n**Prefixes (PREFIX)**\n\n* `k` kilo (10**3)\n* `M` mega (10**6)\n* `G` giga (10**9)\n* `T` tera (10**12)\n* `P` peta (10**15)\n* `E` exa (10**18)\n* `Z` zetta (10**21)\n* `Y` yotta (10**24)\n* `m` milli (10**-3)\n* `u` micro (10**-6)\n* `n` nano (10**-9)\n* `p` pico (10**-12)\n* `f` femto (10**-15)\n* `a` atto (10**-18)\n* `z` zepto (10**-21)\n* `y` yocto (10**-24)\n* `Ki` kibi (2**10)\n* `Mi` mebi (2**20)\n* `Gi` gibi (2**30)\n* `Ti` tebi (2**40)\n\n**Grammar**\n\nThe grammar includes the dimensionless unit `1`, such as `1/s`.\n\nThe grammar also includes these connectors:\n\n* `/` division (as an infix operator, e.g. `1/s`).\n* `.` multiplication (as an infix operator, e.g. `GBy.d`)\n\nThe grammar for a unit is as follows:\n\n Expression = Component { \".\" Component } { \"/\" Component } ;\n\n Component = [ PREFIX ] UNIT [ Annotation ]\n | Annotation\n | \"1\"\n ;\n\n Annotation = \"{\" NAME \"}\" ;\n\nNotes:\n\n* `Annotation` is just a comment if it follows a `UNIT` and is\n equivalent to `1` if it is used alone. For examples,\n `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.\n* `NAME` is a sequence of non-blank printable ASCII characters not\n containing '{' or '}'.", - "type": "string" - }, - "labels": { - "description": "The set of labels that can be used to describe a specific\ninstance of this metric type. For example, the\n`appengine.googleapis.com/http/server/response_latencies` metric\ntype has a label for the HTTP response code, `response_code`, so\nyou can look at latencies for successful responses or just\nfor responses that failed.", - "items": { - "$ref": "LabelDescriptor" - }, - "type": "array" - }, - "name": { - "description": "The resource name of the metric descriptor. Depending on the\nimplementation, the name typically includes: (1) the parent resource name\nthat defines the scope of the metric type or of its data; and (2) the\nmetric's URL-encoded type, which also appears in the `type` field of this\ndescriptor. For example, following is the resource name of a custom\nmetric within the GCP project `my-project-id`:\n\n \"projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount\"", - "type": "string" - }, - "type": { - "type": "string", - "description": "The metric type, including its DNS name prefix. The type is not\nURL-encoded. All user-defined custom metric types have the DNS name\n`custom.googleapis.com`. Metric types should use a natural hierarchical\ngrouping. For example:\n\n \"custom.googleapis.com/invoice/paid/amount\"\n \"appengine.googleapis.com/http/server/response_latencies\"" - }, - "valueType": { - "description": "Whether the measurement is an integer, a floating-point number, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", - "type": "string", - "enumDescriptions": [ - "Do not use this default value.", - "The value is a boolean.\nThis 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.\nThis value type can be used only if the metric kind is `GAUGE`.", - "The value is a `Distribution`.", - "The value is money." - ], - "enum": [ - "VALUE_TYPE_UNSPECIFIED", - "BOOL", - "INT64", - "DOUBLE", - "STRING", - "DISTRIBUTION", - "MONEY" - ] - } - }, - "id": "MetricDescriptor" - }, - "SourceContext": { - "description": "`SourceContext` represents information about the source of a\nprotobuf element, like the file in which it is defined.", - "type": "object", - "properties": { - "fileName": { - "description": "The path-qualified name of the .proto file that contained the associated\nprotobuf element. For example: `\"google/protobuf/source_context.proto\"`.", - "type": "string" - } - }, - "id": "SourceContext" - }, - "Endpoint": { - "description": "`Endpoint` describes a network endpoint that serves a set of APIs.\nA service may expose any number of endpoints, and all endpoints share the\nsame service configuration, such as quota configuration and monitoring\nconfiguration.\n\nExample service configuration:\n\n name: library-example.googleapis.com\n endpoints:\n # Below entry makes 'google.example.library.v1.Library'\n # API be served from endpoint address library-example.googleapis.com.\n # It also allows HTTP OPTIONS calls to be passed to the backend, for\n # it to decide whether the subsequent cross-origin request is\n # allowed to proceed.\n - name: library-example.googleapis.com\n allow_cors: true", - "type": "object", - "properties": { - "apis": { - "description": "The list of APIs served by this endpoint.\n\nIf no APIs are specified this translates to \"all APIs\" exported by the\nservice, as defined in the top-level service configuration.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowCors": { - "description": "Allowing\n[CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka\ncross-domain traffic, would allow the backends served from this endpoint to\nreceive and respond to HTTP OPTIONS requests. The response will be used by\nthe browser to determine whether the subsequent cross-origin request is\nallowed to proceed.", - "type": "boolean" - }, - "aliases": { - "description": "DEPRECATED: This field is no longer supported. Instead of using aliases,\nplease specify multiple google.api.Endpoint for each of the intented\nalias.\n\nAdditional names that this endpoint will be hosted on.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "type": "string", - "description": "The canonical name of this endpoint." - }, - "target": { - "type": "string", - "description": "The specification of an Internet routable address of API frontend that will\nhandle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).\nIt should be either a valid IPv4 address or a fully-qualified domain name.\nFor example, \"8.8.8.8\" or \"myservice.appspot.com\"." - }, - "features": { - "description": "The list of features enabled on this endpoint.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "Endpoint" - }, - "ListEnabledServicesResponse": { - "description": "Response message for `ListEnabledServices` method.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Token that can be passed to `ListEnabledServices` to resume a paginated\nquery.", - "type": "string" - }, - "services": { - "description": "Services enabled for the specified parent.", - "items": { - "$ref": "PublishedService" - }, - "type": "array" - } - }, - "id": "ListEnabledServicesResponse" } }, - "protocol": "rest", "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - } + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "protocol": "rest", + "canonicalName": "Service User", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/service.management": { + "description": "Manage your Google API service configuration" + } + } + } + }, + "rootUrl": "https://serviceuser.googleapis.com/", + "ownerDomain": "google.com", + "name": "serviceuser", + "batchPath": "batch", + "title": "Google Service User API", + "ownerName": "Google" } diff --git a/vendor/google.golang.org/api/serviceuser/v1/serviceuser-gen.go b/vendor/google.golang.org/api/serviceuser/v1/serviceuser-gen.go index b1f0438e2..c4a753451 100644 --- a/vendor/google.golang.org/api/serviceuser/v1/serviceuser-gen.go +++ b/vendor/google.golang.org/api/serviceuser/v1/serviceuser-gen.go @@ -521,6 +521,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 @@ -560,8 +622,8 @@ type BackendRule struct { Address string `json:"address,omitempty"` // Deadline: The number of seconds to wait for a response from a - // request. The - // default depends on the deployment context. + // request. The default + // deadline for gRPC and HTTP requests is 5 seconds. Deadline float64 `json:"deadline,omitempty"` // MinDeadline: Minimum deadline in seconds needed for this method. @@ -1681,6 +1743,15 @@ 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 // body, or // `*` for mapping all fields not captured by the path pattern to the @@ -2857,8 +2928,8 @@ func (s *OAuthRequirements) MarshalJSON() ([]byte, error) { type Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` diff --git a/vendor/google.golang.org/api/sheets/v4/sheets-api.json b/vendor/google.golang.org/api/sheets/v4/sheets-api.json index 48927ccfe..976a20a60 100644 --- a/vendor/google.golang.org/api/sheets/v4/sheets-api.json +++ b/vendor/google.golang.org/api/sheets/v4/sheets-api.json @@ -1,5 +1,4 @@ { - "ownerDomain": "google.com", "name": "sheets", "batchPath": "batch", "title": "Google Sheets API", @@ -9,13 +8,13 @@ "methods": { "get": { "description": "Returns the spreadsheet at the given ID.\nThe caller must specify the spreadsheet ID.\n\nBy default, data within grids will not be returned.\nYou can include grid data one of two ways:\n\n* Specify a field mask listing your desired fields using the `fields` URL\nparameter in HTTP\n\n* Set the includeGridData\nURL parameter to true. If a field mask is set, the `includeGridData`\nparameter is ignored\n\nFor large spreadsheets, it is recommended to retrieve only the specific\nfields of the spreadsheet that you want.\n\nTo retrieve only subsets of the spreadsheet, use the\nranges URL parameter.\nMultiple ranges can be specified. Limiting the range will\nreturn only the portions of the spreadsheet that intersect the requested\nranges. Ranges are specified using A1 notation.", - "httpMethod": "GET", - "parameterOrder": [ - "spreadsheetId" - ], "response": { "$ref": "Spreadsheet" }, + "parameterOrder": [ + "spreadsheetId" + ], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", @@ -25,26 +24,26 @@ ], "parameters": { "includeGridData": { - "location": "query", "description": "True if grid data should be returned.\nThis parameter is ignored if a field mask was set in the request.", - "type": "boolean" + "type": "boolean", + "location": "query" }, "ranges": { - "location": "query", "description": "The ranges to retrieve from the spreadsheet.", "type": "string", - "repeated": true + "repeated": true, + "location": "query" }, "spreadsheetId": { + "location": "path", "description": "The spreadsheet to request.", "type": "string", - "required": true, - "location": "path" + "required": true } }, "flatPath": "v4/spreadsheets/{spreadsheetId}", - "path": "v4/spreadsheets/{spreadsheetId}", - "id": "sheets.spreadsheets.get" + "id": "sheets.spreadsheets.get", + "path": "v4/spreadsheets/{spreadsheetId}" }, "batchUpdate": { "request": { @@ -76,10 +75,6 @@ "path": "v4/spreadsheets/{spreadsheetId}:batchUpdate" }, "create": { - "request": { - "$ref": "Spreadsheet" - }, - "description": "Creates a spreadsheet, returning the newly created spreadsheet.", "httpMethod": "POST", "parameterOrder": [], "response": { @@ -93,354 +88,23 @@ "parameters": {}, "flatPath": "v4/spreadsheets", "path": "v4/spreadsheets", - "id": "sheets.spreadsheets.create" + "id": "sheets.spreadsheets.create", + "request": { + "$ref": "Spreadsheet" + }, + "description": "Creates a spreadsheet, returning the newly created spreadsheet." } }, "resources": { "values": { "methods": { - "get": { - "description": "Returns a range of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and a range.", - "httpMethod": "GET", - "parameterOrder": [ - "spreadsheetId", - "range" - ], - "response": { - "$ref": "ValueRange" - }, - "parameters": { - "majorDimension": { - "location": "query", - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], - "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.", - "type": "string" - }, - "spreadsheetId": { - "location": "path", - "description": "The ID of the spreadsheet to retrieve data from.", - "type": "string", - "required": true - }, - "range": { - "location": "path", - "description": "The A1 notation of the values to retrieve.", - "type": "string", - "required": true - }, - "dateTimeRenderOption": { - "location": "query", - "enum": [ - "SERIAL_NUMBER", - "FORMATTED_STRING" - ], - "description": "How dates, times, and durations should be represented in the output.\nThis is ignored if value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", - "type": "string" - }, - "valueRenderOption": { - "location": "query", - "enum": [ - "FORMATTED_VALUE", - "UNFORMATTED_VALUE", - "FORMULA" - ], - "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/drive.readonly", - "https://www.googleapis.com/auth/spreadsheets", - "https://www.googleapis.com/auth/spreadsheets.readonly" - ], - "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", - "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", - "id": "sheets.spreadsheets.values.get" - }, - "update": { - "response": { - "$ref": "UpdateValuesResponse" - }, - "parameterOrder": [ - "spreadsheetId", - "range" - ], - "httpMethod": "PUT", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/spreadsheets" - ], - "parameters": { - "range": { - "location": "path", - "description": "The A1 notation of the values to update.", - "type": "string", - "required": true - }, - "includeValuesInResponse": { - "description": "Determines if the update response should include the values\nof the cells that were updated. By default, responses\ndo not include the updated values.\nIf the range to write was larger than than the range actually written,\nthe response will include all values in the requested range (excluding\ntrailing empty rows and columns).", - "type": "boolean", - "location": "query" - }, - "spreadsheetId": { - "description": "The ID of the spreadsheet to update.", - "type": "string", - "required": true, - "location": "path" - }, - "responseValueRenderOption": { - "location": "query", - "enum": [ - "FORMATTED_VALUE", - "UNFORMATTED_VALUE", - "FORMULA" - ], - "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", - "type": "string" - }, - "valueInputOption": { - "location": "query", - "enum": [ - "INPUT_VALUE_OPTION_UNSPECIFIED", - "RAW", - "USER_ENTERED" - ], - "description": "How the input data should be interpreted.", - "type": "string" - }, - "responseDateTimeRenderOption": { - "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", - "type": "string", - "location": "query", - "enum": [ - "SERIAL_NUMBER", - "FORMATTED_STRING" - ] - } - }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", - "id": "sheets.spreadsheets.values.update", - "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", - "request": { - "$ref": "ValueRange" - }, - "description": "Sets values in a range of a spreadsheet.\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption." - }, - "batchUpdate": { - "response": { - "$ref": "BatchUpdateValuesResponse" - }, - "parameterOrder": [ - "spreadsheetId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/spreadsheets" - ], - "parameters": { - "spreadsheetId": { - "location": "path", - "description": "The ID of the spreadsheet to update.", - "type": "string", - "required": true - } - }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", - "id": "sheets.spreadsheets.values.batchUpdate", - "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", - "request": { - "$ref": "BatchUpdateValuesRequest" - }, - "description": "Sets values in one or more ranges of a spreadsheet.\nThe caller must specify the spreadsheet ID,\na valueInputOption, and one or more\nValueRanges." - }, - "batchGet": { - "response": { - "$ref": "BatchGetValuesResponse" - }, - "parameterOrder": [ - "spreadsheetId" - ], - "httpMethod": "GET", - "parameters": { - "dateTimeRenderOption": { - "description": "How dates, times, and durations should be represented in the output.\nThis is ignored if value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", - "type": "string", - "location": "query", - "enum": [ - "SERIAL_NUMBER", - "FORMATTED_STRING" - ] - }, - "valueRenderOption": { - "location": "query", - "enum": [ - "FORMATTED_VALUE", - "UNFORMATTED_VALUE", - "FORMULA" - ], - "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", - "type": "string" - }, - "majorDimension": { - "location": "query", - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], - "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.", - "type": "string" - }, - "ranges": { - "description": "The A1 notation of the values to retrieve.", - "type": "string", - "repeated": true, - "location": "query" - }, - "spreadsheetId": { - "description": "The ID of the spreadsheet to retrieve data from.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/drive.readonly", - "https://www.googleapis.com/auth/spreadsheets", - "https://www.googleapis.com/auth/spreadsheets.readonly" - ], - "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet", - "id": "sheets.spreadsheets.values.batchGet", - "path": "v4/spreadsheets/{spreadsheetId}/values:batchGet", - "description": "Returns one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges." - }, - "clear": { - "request": { - "$ref": "ClearValuesRequest" - }, - "description": "Clears values from a spreadsheet.\nThe caller must specify the spreadsheet ID and range.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept.", - "response": { - "$ref": "ClearValuesResponse" - }, - "parameterOrder": [ - "spreadsheetId", - "range" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/spreadsheets" - ], - "parameters": { - "spreadsheetId": { - "location": "path", - "description": "The ID of the spreadsheet to update.", - "type": "string", - "required": true - }, - "range": { - "description": "The A1 notation of the values to clear.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", - "id": "sheets.spreadsheets.values.clear", - "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear" - }, - "append": { - "request": { - "$ref": "ValueRange" - }, - "description": "Appends values to a spreadsheet. The input range is used to search for\nexisting data and find a \"table\" within that range. Values will be\nappended to the next row of the table, starting with the first column of\nthe table. See the\n[guide](/sheets/api/guides/values#appending_values)\nand\n[sample code](/sheets/api/samples/writing#append_values)\nfor specific details of how tables are detected and data is appended.\n\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption. The `valueInputOption` only\ncontrols how the input data will be added to the sheet (column-wise or\nrow-wise), it does not influence what cell the data starts being written\nto.", - "httpMethod": "POST", - "parameterOrder": [ - "spreadsheetId", - "range" - ], - "response": { - "$ref": "AppendValuesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/spreadsheets" - ], - "parameters": { - "includeValuesInResponse": { - "description": "Determines if the update response should include the values\nof the cells that were appended. By default, responses\ndo not include the updated values.", - "type": "boolean", - "location": "query" - }, - "range": { - "description": "The A1 notation of a range to search for a logical table of data.\nValues will be appended after the last row of the table.", - "type": "string", - "required": true, - "location": "path" - }, - "spreadsheetId": { - "location": "path", - "description": "The ID of the spreadsheet to update.", - "type": "string", - "required": true - }, - "responseValueRenderOption": { - "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", - "type": "string", - "location": "query", - "enum": [ - "FORMATTED_VALUE", - "UNFORMATTED_VALUE", - "FORMULA" - ] - }, - "insertDataOption": { - "description": "How the input data should be inserted.", - "type": "string", - "location": "query", - "enum": [ - "OVERWRITE", - "INSERT_ROWS" - ] - }, - "valueInputOption": { - "location": "query", - "enum": [ - "INPUT_VALUE_OPTION_UNSPECIFIED", - "RAW", - "USER_ENTERED" - ], - "description": "How the input data should be interpreted.", - "type": "string" - }, - "responseDateTimeRenderOption": { - "location": "query", - "enum": [ - "SERIAL_NUMBER", - "FORMATTED_STRING" - ], - "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", - "type": "string" - } - }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", - "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", - "id": "sheets.spreadsheets.values.append" - }, "batchClear": { + "id": "sheets.spreadsheets.values.batchClear", + "path": "v4/spreadsheets/{spreadsheetId}/values:batchClear", + "request": { + "$ref": "BatchClearValuesRequest" + }, + "description": "Clears one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept.", "response": { "$ref": "BatchClearValuesResponse" }, @@ -455,50 +119,163 @@ ], "parameters": { "spreadsheetId": { + "location": "path", "description": "The ID of the spreadsheet to update.", "type": "string", + "required": true + } + }, + "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClear" + }, + "get": { + "description": "Returns a range of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and a range.", + "response": { + "$ref": "ValueRange" + }, + "parameterOrder": [ + "spreadsheetId", + "range" + ], + "httpMethod": "GET", + "parameters": { + "majorDimension": { + "type": "string", + "location": "query", + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ], + "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`." + }, + "spreadsheetId": { + "description": "The ID of the spreadsheet to retrieve data from.", + "type": "string", + "required": true, + "location": "path" + }, + "range": { + "type": "string", + "required": true, + "location": "path", + "description": "The A1 notation of the values to retrieve." + }, + "dateTimeRenderOption": { + "description": "How dates, times, and durations should be represented in the output.\nThis is ignored if value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", + "type": "string", + "location": "query", + "enum": [ + "SERIAL_NUMBER", + "FORMATTED_STRING" + ] + }, + "valueRenderOption": { + "enum": [ + "FORMATTED_VALUE", + "UNFORMATTED_VALUE", + "FORMULA" + ], + "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/spreadsheets", + "https://www.googleapis.com/auth/spreadsheets.readonly" + ], + "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", + "id": "sheets.spreadsheets.values.get", + "path": "v4/spreadsheets/{spreadsheetId}/values/{range}" + }, + "update": { + "request": { + "$ref": "ValueRange" + }, + "description": "Sets values in a range of a spreadsheet.\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption.", + "httpMethod": "PUT", + "parameterOrder": [ + "spreadsheetId", + "range" + ], + "response": { + "$ref": "UpdateValuesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ], + "parameters": { + "spreadsheetId": { + "location": "path", + "description": "The ID of the spreadsheet to update.", + "type": "string", + "required": true + }, + "responseValueRenderOption": { + "type": "string", + "location": "query", + "enum": [ + "FORMATTED_VALUE", + "UNFORMATTED_VALUE", + "FORMULA" + ], + "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE." + }, + "valueInputOption": { + "location": "query", + "enum": [ + "INPUT_VALUE_OPTION_UNSPECIFIED", + "RAW", + "USER_ENTERED" + ], + "description": "How the input data should be interpreted.", + "type": "string" + }, + "responseDateTimeRenderOption": { + "enum": [ + "SERIAL_NUMBER", + "FORMATTED_STRING" + ], + "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", + "type": "string", + "location": "query" + }, + "includeValuesInResponse": { + "location": "query", + "description": "Determines if the update response should include the values\nof the cells that were updated. By default, responses\ndo not include the updated values.\nIf the range to write was larger than than the range actually written,\nthe response will include all values in the requested range (excluding\ntrailing empty rows and columns).", + "type": "boolean" + }, + "range": { + "description": "The A1 notation of the values to update.", + "type": "string", "required": true, "location": "path" } }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClear", - "id": "sheets.spreadsheets.values.batchClear", - "path": "v4/spreadsheets/{spreadsheetId}/values:batchClear", + "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", + "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", + "id": "sheets.spreadsheets.values.update" + }, + "batchUpdate": { + "description": "Sets values in one or more ranges of a spreadsheet.\nThe caller must specify the spreadsheet ID,\na valueInputOption, and one or more\nValueRanges.", "request": { - "$ref": "BatchClearValuesRequest" - }, - "description": "Clears one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept." - } - } - }, - "sheets": { - "methods": { - "copyTo": { - "flatPath": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", - "path": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", - "id": "sheets.spreadsheets.sheets.copyTo", - "description": "Copies a single sheet from a spreadsheet to another spreadsheet.\nReturns the properties of the newly created sheet.", - "request": { - "$ref": "CopySheetToAnotherSpreadsheetRequest" + "$ref": "BatchUpdateValuesRequest" }, "httpMethod": "POST", "parameterOrder": [ - "spreadsheetId", - "sheetId" + "spreadsheetId" ], "response": { - "$ref": "SheetProperties" + "$ref": "BatchUpdateValuesResponse" }, "parameters": { - "sheetId": { - "location": "path", - "format": "int32", - "description": "The ID of the sheet to copy.", - "type": "integer", - "required": true - }, "spreadsheetId": { - "description": "The ID of the spreadsheet containing the sheet to copy.", + "description": "The ID of the spreadsheet to update.", "type": "string", "required": true, "location": "path" @@ -508,7 +285,229 @@ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/spreadsheets" - ] + ], + "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", + "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", + "id": "sheets.spreadsheets.values.batchUpdate" + }, + "clear": { + "description": "Clears values from a spreadsheet.\nThe caller must specify the spreadsheet ID and range.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept.", + "request": { + "$ref": "ClearValuesRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "spreadsheetId", + "range" + ], + "response": { + "$ref": "ClearValuesResponse" + }, + "parameters": { + "spreadsheetId": { + "location": "path", + "description": "The ID of the spreadsheet to update.", + "type": "string", + "required": true + }, + "range": { + "location": "path", + "description": "The A1 notation of the values to clear.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ], + "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", + "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", + "id": "sheets.spreadsheets.values.clear" + }, + "batchGet": { + "response": { + "$ref": "BatchGetValuesResponse" + }, + "parameterOrder": [ + "spreadsheetId" + ], + "httpMethod": "GET", + "parameters": { + "majorDimension": { + "location": "query", + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ], + "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.", + "type": "string" + }, + "ranges": { + "location": "query", + "description": "The A1 notation of the values to retrieve.", + "type": "string", + "repeated": true + }, + "spreadsheetId": { + "location": "path", + "description": "The ID of the spreadsheet to retrieve data from.", + "type": "string", + "required": true + }, + "dateTimeRenderOption": { + "location": "query", + "enum": [ + "SERIAL_NUMBER", + "FORMATTED_STRING" + ], + "description": "How dates, times, and durations should be represented in the output.\nThis is ignored if value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", + "type": "string" + }, + "valueRenderOption": { + "location": "query", + "enum": [ + "FORMATTED_VALUE", + "UNFORMATTED_VALUE", + "FORMULA" + ], + "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/spreadsheets", + "https://www.googleapis.com/auth/spreadsheets.readonly" + ], + "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet", + "id": "sheets.spreadsheets.values.batchGet", + "path": "v4/spreadsheets/{spreadsheetId}/values:batchGet", + "description": "Returns one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges." + }, + "append": { + "httpMethod": "POST", + "parameterOrder": [ + "spreadsheetId", + "range" + ], + "response": { + "$ref": "AppendValuesResponse" + }, + "parameters": { + "responseValueRenderOption": { + "location": "query", + "enum": [ + "FORMATTED_VALUE", + "UNFORMATTED_VALUE", + "FORMULA" + ], + "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", + "type": "string" + }, + "insertDataOption": { + "location": "query", + "enum": [ + "OVERWRITE", + "INSERT_ROWS" + ], + "description": "How the input data should be inserted.", + "type": "string" + }, + "valueInputOption": { + "description": "How the input data should be interpreted.", + "type": "string", + "location": "query", + "enum": [ + "INPUT_VALUE_OPTION_UNSPECIFIED", + "RAW", + "USER_ENTERED" + ] + }, + "responseDateTimeRenderOption": { + "location": "query", + "enum": [ + "SERIAL_NUMBER", + "FORMATTED_STRING" + ], + "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", + "type": "string" + }, + "range": { + "location": "path", + "description": "The A1 notation of a range to search for a logical table of data.\nValues will be appended after the last row of the table.", + "type": "string", + "required": true + }, + "includeValuesInResponse": { + "type": "boolean", + "location": "query", + "description": "Determines if the update response should include the values\nof the cells that were appended. By default, responses\ndo not include the updated values." + }, + "spreadsheetId": { + "location": "path", + "description": "The ID of the spreadsheet to update.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ], + "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", + "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", + "id": "sheets.spreadsheets.values.append", + "description": "Appends values to a spreadsheet. The input range is used to search for\nexisting data and find a \"table\" within that range. Values will be\nappended to the next row of the table, starting with the first column of\nthe table. See the\n[guide](/sheets/api/guides/values#appending_values)\nand\n[sample code](/sheets/api/samples/writing#append_values)\nfor specific details of how tables are detected and data is appended.\n\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption. The `valueInputOption` only\ncontrols how the input data will be added to the sheet (column-wise or\nrow-wise), it does not influence what cell the data starts being written\nto.", + "request": { + "$ref": "ValueRange" + } + } + } + }, + "sheets": { + "methods": { + "copyTo": { + "httpMethod": "POST", + "parameterOrder": [ + "spreadsheetId", + "sheetId" + ], + "response": { + "$ref": "SheetProperties" + }, + "parameters": { + "spreadsheetId": { + "description": "The ID of the spreadsheet containing the sheet to copy.", + "type": "string", + "required": true, + "location": "path" + }, + "sheetId": { + "format": "int32", + "description": "The ID of the sheet to copy.", + "type": "integer", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ], + "flatPath": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", + "path": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", + "id": "sheets.spreadsheets.sheets.copyTo", + "description": "Copies a single sheet from a spreadsheet to another spreadsheet.\nReturns the properties of the newly created sheet.", + "request": { + "$ref": "CopySheetToAnotherSpreadsheetRequest" + } } } } @@ -516,6 +515,48 @@ } }, "parameters": { + "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.", + "type": "string", + "location": "query" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "type": "string", + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, "uploadType": { "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", @@ -526,9 +567,12 @@ "description": "Selector specifying which fields to include in a partial response.", "type": "string" }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, "$.xgafv": { - "description": "V1 error format.", - "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -537,11 +581,8 @@ "enum": [ "1", "2" - ] - }, - "callback": { - "location": "query", - "description": "JSONP", + ], + "description": "V1 error format.", "type": "string" }, "alt": { @@ -559,69 +600,2791 @@ "Responses with Content-Type of application/x-protobuf" ], "location": "query" - }, - "key": { - "location": "query", - "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.", - "type": "string" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "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.", - "type": "string", - "location": "query" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" } }, "version": "v4", "baseUrl": "https://sheets.googleapis.com/", + "servicePath": "", "kind": "discovery#restDescription", "description": "Reads and writes Google Sheets.", - "servicePath": "", "basePath": "", - "revision": "20170727", - "documentationLink": "https://developers.google.com/sheets/", "id": "sheets:v4", + "documentationLink": "https://developers.google.com/sheets/", + "revision": "20170907", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "GridCoordinate": { + "description": "A coordinate in a sheet.\nAll indexes are zero-based.", + "type": "object", + "properties": { + "columnIndex": { + "format": "int32", + "description": "The column index of the coordinate.", + "type": "integer" + }, + "rowIndex": { + "format": "int32", + "description": "The row index of the coordinate.", + "type": "integer" + }, + "sheetId": { + "format": "int32", + "description": "The sheet this coordinate is on.", + "type": "integer" + } + }, + "id": "GridCoordinate" + }, + "UpdateSheetPropertiesRequest": { + "description": "Updates properties of the sheet with the specified\nsheetId.", + "type": "object", + "properties": { + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated. At least one field must be specified.\nThe root `properties` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "type": "string" + }, + "properties": { + "description": "The properties to update.", + "$ref": "SheetProperties" + } + }, + "id": "UpdateSheetPropertiesRequest" + }, + "GridProperties": { + "description": "Properties of a grid.", + "type": "object", + "properties": { + "hideGridlines": { + "description": "True if the grid isn't showing gridlines in the UI.", + "type": "boolean" + }, + "frozenRowCount": { + "format": "int32", + "description": "The number of rows that are frozen in the grid.", + "type": "integer" + }, + "frozenColumnCount": { + "format": "int32", + "description": "The number of columns that are frozen in the grid.", + "type": "integer" + }, + "columnCount": { + "format": "int32", + "description": "The number of columns in the grid.", + "type": "integer" + }, + "rowCount": { + "format": "int32", + "description": "The number of rows in the grid.", + "type": "integer" + } + }, + "id": "GridProperties" + }, + "UnmergeCellsRequest": { + "id": "UnmergeCellsRequest", + "description": "Unmerges cells in the given range.", + "type": "object", + "properties": { + "range": { + "$ref": "GridRange", + "description": "The range within which all cells should be unmerged.\nIf the range spans multiple merges, all will be unmerged.\nThe range must not partially span any merge." + } + } + }, + "UpdateEmbeddedObjectPositionResponse": { + "description": "The result of updating an embedded object's position.", + "type": "object", + "properties": { + "position": { + "description": "The new position of the embedded object.", + "$ref": "EmbeddedObjectPosition" + } + }, + "id": "UpdateEmbeddedObjectPositionResponse" + }, + "SortSpec": { + "description": "A sort order associated with a specific column or row.", + "type": "object", + "properties": { + "dimensionIndex": { + "format": "int32", + "description": "The dimension the sort should be applied to.", + "type": "integer" + }, + "sortOrder": { + "description": "The order data should be sorted.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use this.", + "Sort ascending.", + "Sort descending." + ], + "enum": [ + "SORT_ORDER_UNSPECIFIED", + "ASCENDING", + "DESCENDING" + ] + } + }, + "id": "SortSpec" + }, + "Sheet": { + "description": "A sheet in a spreadsheet.", + "type": "object", + "properties": { + "protectedRanges": { + "description": "The protected ranges in this sheet.", + "items": { + "$ref": "ProtectedRange" + }, + "type": "array" + }, + "conditionalFormats": { + "description": "The conditional format rules in this sheet.", + "items": { + "$ref": "ConditionalFormatRule" + }, + "type": "array" + }, + "basicFilter": { + "description": "The filter on this sheet, if any.", + "$ref": "BasicFilter" + }, + "merges": { + "description": "The ranges that are merged together.", + "items": { + "$ref": "GridRange" + }, + "type": "array" + }, + "data": { + "description": "Data in the grid, if this is a grid sheet.\nThe number of GridData objects returned is dependent on the number of\nranges requested on this sheet. For example, if this is representing\n`Sheet1`, and the spreadsheet was requested with ranges\n`Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a\nstartRow/startColumn of `0`,\nwhile the second one will have `startRow 14` (zero-based row 15),\nand `startColumn 3` (zero-based column D).", + "items": { + "$ref": "GridData" + }, + "type": "array" + }, + "bandedRanges": { + "description": "The banded (i.e. alternating colors) ranges on this sheet.", + "items": { + "$ref": "BandedRange" + }, + "type": "array" + }, + "charts": { + "description": "The specifications of every chart on this sheet.", + "items": { + "$ref": "EmbeddedChart" + }, + "type": "array" + }, + "properties": { + "$ref": "SheetProperties", + "description": "The properties of the sheet." + }, + "filterViews": { + "description": "The filter views in this sheet.", + "items": { + "$ref": "FilterView" + }, + "type": "array" + } + }, + "id": "Sheet" + }, + "BooleanRule": { + "properties": { + "format": { + "$ref": "CellFormat", + "description": "The format to apply.\nConditional formatting can only apply a subset of formatting:\nbold, italic,\nstrikethrough,\nforeground color &\nbackground color." + }, + "condition": { + "$ref": "BooleanCondition", + "description": "The condition of the rule. If the condition evaluates to true,\nthe format will be applied." + } + }, + "id": "BooleanRule", + "description": "A rule that may or may not match, depending on the condition.", + "type": "object" + }, + "PivotGroupValueMetadata": { + "description": "Metadata about a value in a pivot grouping.", + "type": "object", + "properties": { + "value": { + "description": "The calculated value the metadata corresponds to.\n(Note that formulaValue is not valid,\n because the values will be calculated.)", + "$ref": "ExtendedValue" + }, + "collapsed": { + "type": "boolean", + "description": "True if the data corresponding to the value is collapsed." + } + }, + "id": "PivotGroupValueMetadata" + }, + "FilterCriteria": { + "description": "Criteria for showing/hiding rows in a filter or filter view.", + "type": "object", + "properties": { + "condition": { + "description": "A condition that must be true for values to be shown.\n(This does not override hiddenValues -- if a value is listed there,\n it will still be hidden.)", + "$ref": "BooleanCondition" + }, + "hiddenValues": { + "description": "Values that should be hidden.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "FilterCriteria" + }, + "Editors": { + "type": "object", + "properties": { + "users": { + "description": "The email addresses of users with edit access to the protected range.", + "items": { + "type": "string" + }, + "type": "array" + }, + "domainUsersCanEdit": { + "description": "True if anyone in the document's domain has edit access to the protected\nrange. Domain protection is only supported on documents within a domain.", + "type": "boolean" + }, + "groups": { + "description": "The email addresses of groups with edit access to the protected range.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "Editors", + "description": "The editors of a protected range." + }, + "UpdateConditionalFormatRuleRequest": { + "description": "Updates a conditional format rule at the given index,\nor moves a conditional format rule to another index.", + "type": "object", + "properties": { + "rule": { + "$ref": "ConditionalFormatRule", + "description": "The rule that should replace the rule at the given index." + }, + "index": { + "format": "int32", + "description": "The zero-based index of the rule that should be replaced or moved.", + "type": "integer" + }, + "sheetId": { + "format": "int32", + "description": "The sheet of the rule to move. Required if new_index is set,\nunused otherwise.", + "type": "integer" + }, + "newIndex": { + "format": "int32", + "description": "The zero-based new index the rule should end up at.", + "type": "integer" + } + }, + "id": "UpdateConditionalFormatRuleRequest" + }, + "DataValidationRule": { + "description": "A data validation rule.", + "type": "object", + "properties": { + "showCustomUi": { + "description": "True if the UI should be customized based on the kind of condition.\nIf true, \"List\" conditions will show a dropdown.", + "type": "boolean" + }, + "strict": { + "description": "True if invalid data should be rejected.", + "type": "boolean" + }, + "inputMessage": { + "description": "A message to show the user when adding data to the cell.", + "type": "string" + }, + "condition": { + "description": "The condition that data in the cell must match.", + "$ref": "BooleanCondition" + } + }, + "id": "DataValidationRule" + }, + "BasicChartDomain": { + "description": "The domain of a chart.\nFor example, if charting stock prices over time, this would be the date.", + "type": "object", + "properties": { + "reversed": { + "description": "True to reverse the order of the domain values (horizontal axis).", + "type": "boolean" + }, + "domain": { + "$ref": "ChartData", + "description": "The data of the domain. For example, if charting stock prices over time,\nthis is the data representing the dates." + } + }, + "id": "BasicChartDomain" + }, + "PasteDataRequest": { + "properties": { + "coordinate": { + "description": "The coordinate at which the data should start being inserted.", + "$ref": "GridCoordinate" + }, + "delimiter": { + "type": "string", + "description": "The delimiter in the data." + }, + "data": { + "description": "The data to insert.", + "type": "string" + }, + "type": { + "enumDescriptions": [ + "Paste values, formulas, formats, and merges.", + "Paste the values ONLY without formats, formulas, or merges.", + "Paste the format and data validation only.", + "Like PASTE_NORMAL but without borders.", + "Paste the formulas only.", + "Paste the data validation only.", + "Paste the conditional formatting rules only." + ], + "enum": [ + "PASTE_NORMAL", + "PASTE_VALUES", + "PASTE_FORMAT", + "PASTE_NO_BORDERS", + "PASTE_FORMULA", + "PASTE_DATA_VALIDATION", + "PASTE_CONDITIONAL_FORMATTING" + ], + "description": "How the data should be pasted.", + "type": "string" + }, + "html": { + "description": "True if the data is HTML.", + "type": "boolean" + } + }, + "id": "PasteDataRequest", + "description": "Inserts data into the spreadsheet starting at the specified coordinate.", + "type": "object" + }, + "AppendDimensionRequest": { + "description": "Appends rows or columns to the end of a sheet.", + "type": "object", + "properties": { + "sheetId": { + "format": "int32", + "description": "The sheet to append rows or columns to.", + "type": "integer" + }, + "dimension": { + "enumDescriptions": [ + "The default value, do not use.", + "Operates on the rows of a sheet.", + "Operates on the columns of a sheet." + ], + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ], + "description": "Whether rows or columns should be appended.", + "type": "string" + }, + "length": { + "format": "int32", + "description": "The number of rows or columns to append.", + "type": "integer" + } + }, + "id": "AppendDimensionRequest" + }, + "AddNamedRangeRequest": { + "description": "Adds a named range to the spreadsheet.", + "type": "object", + "properties": { + "namedRange": { + "$ref": "NamedRange", + "description": "The named range to add. The namedRangeId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a range that already exists.)" + } + }, + "id": "AddNamedRangeRequest" + }, + "UpdateEmbeddedObjectPositionRequest": { + "description": "Update an embedded object's position (such as a moving or resizing a\nchart or image).", + "type": "object", + "properties": { + "newPosition": { + "$ref": "EmbeddedObjectPosition", + "description": "An explicit position to move the embedded object to.\nIf newPosition.sheetId is set,\na new sheet with that ID will be created.\nIf newPosition.newSheet is set to true,\na new sheet will be created with an ID that will be chosen for you." + }, + "fields": { + "format": "google-fieldmask", + "description": "The fields of OverlayPosition\nthat should be updated when setting a new position. Used only if\nnewPosition.overlayPosition\nis set, in which case at least one field must\nbe specified. The root `newPosition.overlayPosition` is implied and\nshould not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "type": "string" + }, + "objectId": { + "format": "int32", + "description": "The ID of the object to moved.", + "type": "integer" + } + }, + "id": "UpdateEmbeddedObjectPositionRequest" + }, + "TextRotation": { + "description": "The rotation applied to text in a cell.", + "type": "object", + "properties": { + "angle": { + "format": "int32", + "description": "The angle between the standard orientation and the desired orientation.\nMeasured in degrees. Valid values are between -90 and 90. Positive\nangles are angled upwards, negative are angled downwards.\n\nNote: For LTR text direction positive angles are in the counterclockwise\ndirection, whereas for RTL they are in the clockwise direction", + "type": "integer" + }, + "vertical": { + "description": "If true, text reads top to bottom, but the orientation of individual\ncharacters is unchanged.\nFor example:\n\n | V |\n | e |\n | r |\n | t |\n | i |\n | c |\n | a |\n | l |", + "type": "boolean" + } + }, + "id": "TextRotation" + }, + "PieChartSpec": { + "description": "A \u003ca href=\"/chart/interactive/docs/gallery/piechart\"\u003epie chart\u003c/a\u003e.", + "type": "object", + "properties": { + "threeDimensional": { + "description": "True if the pie is three dimensional.", + "type": "boolean" + }, + "domain": { + "description": "The data that covers the domain of the pie chart.", + "$ref": "ChartData" + }, + "series": { + "description": "The data that covers the one and only series of the pie chart.", + "$ref": "ChartData" + }, + "pieHole": { + "format": "double", + "description": "The size of the hole in the pie chart.", + "type": "number" + }, + "legendPosition": { + "enumDescriptions": [ + "Default value, do not use.", + "The legend is rendered on the bottom of the chart.", + "The legend is rendered on the left of the chart.", + "The legend is rendered on the right of the chart.", + "The legend is rendered on the top of the chart.", + "No legend is rendered.", + "Each pie slice has a label attached to it." + ], + "enum": [ + "PIE_CHART_LEGEND_POSITION_UNSPECIFIED", + "BOTTOM_LEGEND", + "LEFT_LEGEND", + "RIGHT_LEGEND", + "TOP_LEGEND", + "NO_LEGEND", + "LABELED_LEGEND" + ], + "description": "Where the legend of the pie chart should be drawn.", + "type": "string" + } + }, + "id": "PieChartSpec" + }, + "UpdateFilterViewRequest": { + "description": "Updates properties of the filter view.", + "type": "object", + "properties": { + "filter": { + "$ref": "FilterView", + "description": "The new properties of the filter view." + }, + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated. At least one field must be specified.\nThe root `filter` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "type": "string" + } + }, + "id": "UpdateFilterViewRequest" + }, + "ConditionalFormatRule": { + "type": "object", + "properties": { + "gradientRule": { + "description": "The formatting will vary based on the gradients in the rule.", + "$ref": "GradientRule" + }, + "booleanRule": { + "$ref": "BooleanRule", + "description": "The formatting is either \"on\" or \"off\" according to the rule." + }, + "ranges": { + "description": "The ranges that will be formatted if the condition is true.\nAll the ranges must be on the same grid.", + "items": { + "$ref": "GridRange" + }, + "type": "array" + } + }, + "id": "ConditionalFormatRule", + "description": "A rule describing a conditional format." + }, + "CopyPasteRequest": { + "id": "CopyPasteRequest", + "description": "Copies data from the source to the destination.", + "type": "object", + "properties": { + "destination": { + "description": "The location to paste to. If the range covers a span that's\na multiple of the source's height or width, then the\ndata will be repeated to fill in the destination range.\nIf the range is smaller than the source range, the entire\nsource data will still be copied (beyond the end of the destination range).", + "$ref": "GridRange" + }, + "pasteOrientation": { + "enum": [ + "NORMAL", + "TRANSPOSE" + ], + "description": "How that data should be oriented when pasting.", + "type": "string", + "enumDescriptions": [ + "Paste normally.", + "Paste transposed, where all rows become columns and vice versa." + ] + }, + "pasteType": { + "enumDescriptions": [ + "Paste values, formulas, formats, and merges.", + "Paste the values ONLY without formats, formulas, or merges.", + "Paste the format and data validation only.", + "Like PASTE_NORMAL but without borders.", + "Paste the formulas only.", + "Paste the data validation only.", + "Paste the conditional formatting rules only." + ], + "enum": [ + "PASTE_NORMAL", + "PASTE_VALUES", + "PASTE_FORMAT", + "PASTE_NO_BORDERS", + "PASTE_FORMULA", + "PASTE_DATA_VALIDATION", + "PASTE_CONDITIONAL_FORMATTING" + ], + "description": "What kind of data to paste.", + "type": "string" + }, + "source": { + "description": "The source range to copy.", + "$ref": "GridRange" + } + } + }, + "BooleanCondition": { + "type": "object", + "properties": { + "values": { + "description": "The values of the condition. The number of supported values depends\non the condition type. Some support zero values,\nothers one or two values,\nand ConditionType.ONE_OF_LIST supports an arbitrary number of values.", + "items": { + "$ref": "ConditionValue" + }, + "type": "array" + }, + "type": { + "enumDescriptions": [ + "The default value, do not use.", + "The cell's value must be greater than the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", + "The cell's value must be greater than or equal to the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", + "The cell's value must be less than the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", + "The cell's value must be less than or equal to the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", + "The cell's value must be equal to the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", + "The cell's value must be not equal to the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", + "The cell's value must be between the two condition values.\nSupported by data validation, conditional formatting and filters.\nRequires exactly two ConditionValues.", + "The cell's value must not be between the two condition values.\nSupported by data validation, conditional formatting and filters.\nRequires exactly two ConditionValues.", + "The cell's value must contain the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", + "The cell's value must not contain the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", + "The cell's value must start with the condition's value.\nSupported by conditional formatting and filters.\nRequires a single ConditionValue.", + "The cell's value must end with the condition's value.\nSupported by conditional formatting and filters.\nRequires a single ConditionValue.", + "The cell's value must be exactly the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", + "The cell's value must be a valid email address.\nSupported by data validation.\nRequires no ConditionValues.", + "The cell's value must be a valid URL.\nSupported by data validation.\nRequires no ConditionValues.", + "The cell's value must be the same date as the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", + "The cell's value must be before the date of the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue\nthat may be a relative date.", + "The cell's value must be after the date of the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue\nthat may be a relative date.", + "The cell's value must be on or before the date of the condition's value.\nSupported by data validation.\nRequires a single ConditionValue\nthat may be a relative date.", + "The cell's value must be on or after the date of the condition's value.\nSupported by data validation.\nRequires a single ConditionValue\nthat may be a relative date.", + "The cell's value must be between the dates of the two condition values.\nSupported by data validation.\nRequires exactly two ConditionValues.", + "The cell's value must be outside the dates of the two condition values.\nSupported by data validation.\nRequires exactly two ConditionValues.", + "The cell's value must be a date.\nSupported by data validation.\nRequires no ConditionValues.", + "The cell's value must be listed in the grid in condition value's range.\nSupported by data validation.\nRequires a single ConditionValue,\nand the value must be a valid range in A1 notation.", + "The cell's value must in the list of condition values.\nSupported by data validation.\nSupports any number of condition values,\none per item in the list.\nFormulas are not supported in the values.", + "The cell's value must be empty.\nSupported by conditional formatting and filters.\nRequires no ConditionValues.", + "The cell's value must not be empty.\nSupported by conditional formatting and filters.\nRequires no ConditionValues.", + "The condition's formula must evaluate to true.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue." + ], + "enum": [ + "CONDITION_TYPE_UNSPECIFIED", + "NUMBER_GREATER", + "NUMBER_GREATER_THAN_EQ", + "NUMBER_LESS", + "NUMBER_LESS_THAN_EQ", + "NUMBER_EQ", + "NUMBER_NOT_EQ", + "NUMBER_BETWEEN", + "NUMBER_NOT_BETWEEN", + "TEXT_CONTAINS", + "TEXT_NOT_CONTAINS", + "TEXT_STARTS_WITH", + "TEXT_ENDS_WITH", + "TEXT_EQ", + "TEXT_IS_EMAIL", + "TEXT_IS_URL", + "DATE_EQ", + "DATE_BEFORE", + "DATE_AFTER", + "DATE_ON_OR_BEFORE", + "DATE_ON_OR_AFTER", + "DATE_BETWEEN", + "DATE_NOT_BETWEEN", + "DATE_IS_VALID", + "ONE_OF_RANGE", + "ONE_OF_LIST", + "BLANK", + "NOT_BLANK", + "CUSTOM_FORMULA" + ], + "description": "The type of condition.", + "type": "string" + } + }, + "id": "BooleanCondition", + "description": "A condition that can evaluate to true or false.\nBooleanConditions are used by conditional formatting,\ndata validation, and the criteria in filters." + }, + "Request": { + "description": "A single kind of update to apply to a spreadsheet.", + "type": "object", + "properties": { + "moveDimension": { + "$ref": "MoveDimensionRequest", + "description": "Moves rows or columns to another location in a sheet." + }, + "randomizeRange": { + "description": "Randomizes the order of the rows in a range.", + "$ref": "RandomizeRangeRequest" + }, + "updateBanding": { + "description": "Updates a banded range", + "$ref": "UpdateBandingRequest" + }, + "addProtectedRange": { + "$ref": "AddProtectedRangeRequest", + "description": "Adds a protected range." + }, + "deleteNamedRange": { + "description": "Deletes a named range.", + "$ref": "DeleteNamedRangeRequest" + }, + "duplicateSheet": { + "$ref": "DuplicateSheetRequest", + "description": "Duplicates a sheet." + }, + "deleteSheet": { + "$ref": "DeleteSheetRequest", + "description": "Deletes a sheet." + }, + "unmergeCells": { + "$ref": "UnmergeCellsRequest", + "description": "Unmerges merged cells." + }, + "updateEmbeddedObjectPosition": { + "$ref": "UpdateEmbeddedObjectPositionRequest", + "description": "Updates an embedded object's (e.g. chart, image) position." + }, + "updateDimensionProperties": { + "$ref": "UpdateDimensionPropertiesRequest", + "description": "Updates dimensions' properties." + }, + "pasteData": { + "$ref": "PasteDataRequest", + "description": "Pastes data (HTML or delimited) into a sheet." + }, + "setBasicFilter": { + "description": "Sets the basic filter on a sheet.", + "$ref": "SetBasicFilterRequest" + }, + "addConditionalFormatRule": { + "description": "Adds a new conditional format rule.", + "$ref": "AddConditionalFormatRuleRequest" + }, + "addNamedRange": { + "$ref": "AddNamedRangeRequest", + "description": "Adds a named range." + }, + "updateCells": { + "$ref": "UpdateCellsRequest", + "description": "Updates many cells at once." + }, + "updateSpreadsheetProperties": { + "$ref": "UpdateSpreadsheetPropertiesRequest", + "description": "Updates the spreadsheet's properties." + }, + "deleteEmbeddedObject": { + "description": "Deletes an embedded object (e.g, chart, image) in a sheet.", + "$ref": "DeleteEmbeddedObjectRequest" + }, + "updateFilterView": { + "$ref": "UpdateFilterViewRequest", + "description": "Updates the properties of a filter view." + }, + "addBanding": { + "$ref": "AddBandingRequest", + "description": "Adds a new banded range" + }, + "appendCells": { + "$ref": "AppendCellsRequest", + "description": "Appends cells after the last row with data in a sheet." + }, + "autoResizeDimensions": { + "$ref": "AutoResizeDimensionsRequest", + "description": "Automatically resizes one or more dimensions based on the contents\nof the cells in that dimension." + }, + "cutPaste": { + "$ref": "CutPasteRequest", + "description": "Cuts data from one area and pastes it to another." + }, + "mergeCells": { + "$ref": "MergeCellsRequest", + "description": "Merges cells together." + }, + "updateNamedRange": { + "description": "Updates a named range.", + "$ref": "UpdateNamedRangeRequest" + }, + "updateSheetProperties": { + "$ref": "UpdateSheetPropertiesRequest", + "description": "Updates a sheet's properties." + }, + "autoFill": { + "$ref": "AutoFillRequest", + "description": "Automatically fills in more data based on existing data." + }, + "deleteDimension": { + "description": "Deletes rows or columns in a sheet.", + "$ref": "DeleteDimensionRequest" + }, + "sortRange": { + "$ref": "SortRangeRequest", + "description": "Sorts data in a range." + }, + "deleteProtectedRange": { + "$ref": "DeleteProtectedRangeRequest", + "description": "Deletes a protected range." + }, + "duplicateFilterView": { + "description": "Duplicates a filter view.", + "$ref": "DuplicateFilterViewRequest" + }, + "addChart": { + "description": "Adds a chart.", + "$ref": "AddChartRequest" + }, + "findReplace": { + "description": "Finds and replaces occurrences of some text with other text.", + "$ref": "FindReplaceRequest" + }, + "updateChartSpec": { + "description": "Updates a chart's specifications.", + "$ref": "UpdateChartSpecRequest" + }, + "textToColumns": { + "description": "Converts a column of text into many columns of text.", + "$ref": "TextToColumnsRequest" + }, + "updateProtectedRange": { + "description": "Updates a protected range.", + "$ref": "UpdateProtectedRangeRequest" + }, + "addSheet": { + "$ref": "AddSheetRequest", + "description": "Adds a sheet." + }, + "deleteFilterView": { + "$ref": "DeleteFilterViewRequest", + "description": "Deletes a filter view from a sheet." + }, + "copyPaste": { + "description": "Copies data from one area and pastes it to another.", + "$ref": "CopyPasteRequest" + }, + "insertDimension": { + "$ref": "InsertDimensionRequest", + "description": "Inserts new rows or columns in a sheet." + }, + "deleteRange": { + "$ref": "DeleteRangeRequest", + "description": "Deletes a range of cells from a sheet, shifting the remaining cells." + }, + "deleteBanding": { + "$ref": "DeleteBandingRequest", + "description": "Removes a banded range" + }, + "addFilterView": { + "description": "Adds a filter view.", + "$ref": "AddFilterViewRequest" + }, + "setDataValidation": { + "$ref": "SetDataValidationRequest", + "description": "Sets data validation for one or more cells." + }, + "updateBorders": { + "description": "Updates the borders in a range of cells.", + "$ref": "UpdateBordersRequest" + }, + "deleteConditionalFormatRule": { + "$ref": "DeleteConditionalFormatRuleRequest", + "description": "Deletes an existing conditional format rule." + }, + "clearBasicFilter": { + "description": "Clears the basic filter on a sheet.", + "$ref": "ClearBasicFilterRequest" + }, + "repeatCell": { + "$ref": "RepeatCellRequest", + "description": "Repeats a single cell across a range." + }, + "appendDimension": { + "description": "Appends dimensions to the end of a sheet.", + "$ref": "AppendDimensionRequest" + }, + "updateConditionalFormatRule": { + "$ref": "UpdateConditionalFormatRuleRequest", + "description": "Updates an existing conditional format rule." + }, + "insertRange": { + "$ref": "InsertRangeRequest", + "description": "Inserts new cells in a sheet, shifting the existing cells." + } + }, + "id": "Request" + }, + "GridRange": { + "description": "A range on a sheet.\nAll indexes are zero-based.\nIndexes are half open, e.g the start index is inclusive\nand the end index is exclusive -- [start_index, end_index).\nMissing indexes indicate the range is unbounded on that side.\n\nFor example, if `\"Sheet1\"` is sheet ID 0, then:\n\n `Sheet1!A1:A1 == sheet_id: 0,\n start_row_index: 0, end_row_index: 1,\n start_column_index: 0, end_column_index: 1`\n\n `Sheet1!A3:B4 == sheet_id: 0,\n start_row_index: 2, end_row_index: 4,\n start_column_index: 0, end_column_index: 2`\n\n `Sheet1!A:B == sheet_id: 0,\n start_column_index: 0, end_column_index: 2`\n\n `Sheet1!A5:B == sheet_id: 0,\n start_row_index: 4,\n start_column_index: 0, end_column_index: 2`\n\n `Sheet1 == sheet_id:0`\n\nThe start index must always be less than or equal to the end index.\nIf the start index equals the end index, then the range is empty.\nEmpty ranges are typically not meaningful and are usually rendered in the\nUI as `#REF!`.", + "type": "object", + "properties": { + "startColumnIndex": { + "format": "int32", + "description": "The start column (inclusive) of the range, or not set if unbounded.", + "type": "integer" + }, + "sheetId": { + "format": "int32", + "description": "The sheet this range is on.", + "type": "integer" + }, + "endColumnIndex": { + "format": "int32", + "description": "The end column (exclusive) of the range, or not set if unbounded.", + "type": "integer" + }, + "endRowIndex": { + "format": "int32", + "description": "The end row (exclusive) of the range, or not set if unbounded.", + "type": "integer" + }, + "startRowIndex": { + "format": "int32", + "description": "The start row (inclusive) of the range, or not set if unbounded.", + "type": "integer" + } + }, + "id": "GridRange" + }, + "BasicChartSpec": { + "type": "object", + "properties": { + "series": { + "description": "The data this chart is visualizing.", + "items": { + "$ref": "BasicChartSeries" + }, + "type": "array" + }, + "legendPosition": { + "enum": [ + "BASIC_CHART_LEGEND_POSITION_UNSPECIFIED", + "BOTTOM_LEGEND", + "LEFT_LEGEND", + "RIGHT_LEGEND", + "TOP_LEGEND", + "NO_LEGEND" + ], + "description": "The position of the chart legend.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "The legend is rendered on the bottom of the chart.", + "The legend is rendered on the left of the chart.", + "The legend is rendered on the right of the chart.", + "The legend is rendered on the top of the chart.", + "No legend is rendered." + ] + }, + "domains": { + "description": "The domain of data this is charting.\nOnly a single domain is supported.", + "items": { + "$ref": "BasicChartDomain" + }, + "type": "array" + }, + "lineSmoothing": { + "description": "Gets whether all lines should be rendered smooth or straight by default.\nApplies to Line charts.", + "type": "boolean" + }, + "headerCount": { + "type": "integer", + "format": "int32", + "description": "The number of rows or columns in the data that are \"headers\".\nIf not set, Google Sheets will guess how many rows are headers based\non the data.\n\n(Note that BasicChartAxis.title may override the axis title\n inferred from the header values.)" + }, + "stackedType": { + "description": "The stacked type for charts that support vertical stacking.\nApplies to Area, Bar, Column, and Stepped Area charts.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "Series are not stacked.", + "Series values are stacked, each value is rendered vertically beginning\nfrom the top of the value below it.", + "Vertical stacks are stretched to reach the top of the chart, with\nvalues laid out as percentages of each other." + ], + "enum": [ + "BASIC_CHART_STACKED_TYPE_UNSPECIFIED", + "NOT_STACKED", + "STACKED", + "PERCENT_STACKED" + ] + }, + "axis": { + "description": "The axis on the chart.", + "items": { + "$ref": "BasicChartAxis" + }, + "type": "array" + }, + "threeDimensional": { + "description": "True to make the chart 3D.\nApplies to Bar and Column charts.", + "type": "boolean" + }, + "interpolateNulls": { + "description": "If some values in a series are missing, gaps may appear in the chart (e.g,\nsegments of lines in a line chart will be missing). To eliminate these\ngaps set this to true.\nApplies to Line, Area, and Combo charts.", + "type": "boolean" + }, + "chartType": { + "enum": [ + "BASIC_CHART_TYPE_UNSPECIFIED", + "BAR", + "LINE", + "AREA", + "COLUMN", + "SCATTER", + "COMBO", + "STEPPED_AREA" + ], + "description": "The type of the chart.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "A \u003ca href=\"/chart/interactive/docs/gallery/barchart\"\u003ebar chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/linechart\"\u003eline chart\u003c/a\u003e.", + "An \u003ca href=\"/chart/interactive/docs/gallery/areachart\"\u003earea chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/columnchart\"\u003ecolumn chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/scatterchart\"\u003escatter chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/combochart\"\u003ecombo chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/steppedareachart\"\u003estepped area chart\u003c/a\u003e." + ] + } + }, + "id": "BasicChartSpec", + "description": "The specification for a basic chart. See BasicChartType for the list\nof charts this supports." + }, + "BubbleChartSpec": { + "description": "A \u003ca href=\"/chart/interactive/docs/gallery/bubblechart\"\u003ebubble chart\u003c/a\u003e.", + "type": "object", + "properties": { + "legendPosition": { + "enumDescriptions": [ + "Default value, do not use.", + "The legend is rendered on the bottom of the chart.", + "The legend is rendered on the left of the chart.", + "The legend is rendered on the right of the chart.", + "The legend is rendered on the top of the chart.", + "No legend is rendered.", + "The legend is rendered inside the chart area." + ], + "enum": [ + "BUBBLE_CHART_LEGEND_POSITION_UNSPECIFIED", + "BOTTOM_LEGEND", + "LEFT_LEGEND", + "RIGHT_LEGEND", + "TOP_LEGEND", + "NO_LEGEND", + "INSIDE_LEGEND" + ], + "description": "Where the legend of the chart should be drawn.", + "type": "string" + }, + "domain": { + "description": "The data containing the bubble x-values. These values locate the bubbles\nin the chart horizontally.", + "$ref": "ChartData" + }, + "bubbleSizes": { + "$ref": "ChartData", + "description": "The data contianing the bubble sizes. Bubble sizes are used to draw\nthe bubbles at different sizes relative to each other.\nIf specified, group_ids must also be specified. This field is\noptional." + }, + "bubbleOpacity": { + "format": "float", + "description": "The opacity of the bubbles between 0 and 1.0.\n0 is fully transparent and 1 is fully opaque.", + "type": "number" + }, + "bubbleBorderColor": { + "$ref": "Color", + "description": "The bubble border color." + }, + "bubbleTextStyle": { + "$ref": "TextFormat", + "description": "The format of the text inside the bubbles.\nUnderline and Strikethrough are not supported." + }, + "groupIds": { + "description": "The data containing the bubble group IDs. All bubbles with the same group\nID will be drawn in the same color. If bubble_sizes is specified then\nthis field must also be specified but may contain blank values.\nThis field is optional.", + "$ref": "ChartData" + }, + "bubbleLabels": { + "$ref": "ChartData", + "description": "The data containing the bubble labels. These do not need to be unique." + }, + "bubbleMinRadiusSize": { + "format": "int32", + "description": "The minimum radius size of the bubbles, in pixels.\nIf specific, the field must be a positive value.", + "type": "integer" + }, + "bubbleMaxRadiusSize": { + "format": "int32", + "description": "The max radius size of the bubbles, in pixels.\nIf specified, the field must be a positive value.", + "type": "integer" + }, + "series": { + "$ref": "ChartData", + "description": "The data contianing the bubble y-values. These values locate the bubbles\nin the chart vertically." + } + }, + "id": "BubbleChartSpec" + }, + "SetDataValidationRequest": { + "description": "Sets a data validation rule to every cell in the range.\nTo clear validation in a range, call this with no rule specified.", + "type": "object", + "properties": { + "rule": { + "$ref": "DataValidationRule", + "description": "The data validation rule to set on each cell in the range,\nor empty to clear the data validation in the range." + }, + "range": { + "$ref": "GridRange", + "description": "The range the data validation rule should apply to." + } + }, + "id": "SetDataValidationRequest" + }, + "CellData": { + "properties": { + "formattedValue": { + "description": "The formatted value of the cell.\nThis is the value as it's shown to the user.\nThis field is read-only.", + "type": "string" + }, + "textFormatRuns": { + "description": "Runs of rich text applied to subsections of the cell. Runs are only valid\non user entered strings, not formulas, bools, or numbers.\nRuns start at specific indexes in the text and continue until the next\nrun. Properties of a run will continue unless explicitly changed\nin a subsequent run (and properties of the first run will continue\nthe properties of the cell unless explicitly changed).\n\nWhen writing, the new runs will overwrite any prior runs. When writing a\nnew user_entered_value, previous runs will be erased.", + "items": { + "$ref": "TextFormatRun" + }, + "type": "array" + }, + "hyperlink": { + "description": "A hyperlink this cell points to, if any.\nThis field is read-only. (To set it, use a `=HYPERLINK` formula\nin the userEnteredValue.formulaValue\nfield.)", + "type": "string" + }, + "pivotTable": { + "$ref": "PivotTable", + "description": "A pivot table anchored at this cell. The size of pivot table itself\nis computed dynamically based on its data, grouping, filters, values,\netc. Only the top-left cell of the pivot table contains the pivot table\ndefinition. The other cells will contain the calculated values of the\nresults of the pivot in their effective_value fields." + }, + "userEnteredFormat": { + "$ref": "CellFormat", + "description": "The format the user entered for the cell.\n\nWhen writing, the new format will be merged with the existing format." + }, + "effectiveFormat": { + "$ref": "CellFormat", + "description": "The effective format being used by the cell.\nThis includes the results of applying any conditional formatting and,\nif the cell contains a formula, the computed number format.\nIf the effective format is the default format, effective format will\nnot be written.\nThis field is read-only." + }, + "note": { + "description": "Any note on the cell.", + "type": "string" + }, + "userEnteredValue": { + "$ref": "ExtendedValue", + "description": "The value the user entered in the cell. e.g, `1234`, `'Hello'`, or `=NOW()`\nNote: Dates, Times and DateTimes are represented as doubles in\nserial number format." + }, + "dataValidation": { + "description": "A data validation rule on the cell, if any.\n\nWhen writing, the new data validation rule will overwrite any prior rule.", + "$ref": "DataValidationRule" + }, + "effectiveValue": { + "$ref": "ExtendedValue", + "description": "The effective value of the cell. For cells with formulas, this will be\nthe calculated value. For cells with literals, this will be\nthe same as the user_entered_value.\nThis field is read-only." + } + }, + "id": "CellData", + "description": "Data about a specific cell.", + "type": "object" + }, + "BatchUpdateSpreadsheetRequest": { + "id": "BatchUpdateSpreadsheetRequest", + "description": "The request for updating any aspect of a spreadsheet.", + "type": "object", + "properties": { + "responseIncludeGridData": { + "description": "True if grid data should be returned. Meaningful only if\nif include_spreadsheet_response is 'true'.\nThis parameter is ignored if a field mask was set in the request.", + "type": "boolean" + }, + "responseRanges": { + "description": "Limits the ranges included in the response spreadsheet.\nMeaningful only if include_spreadsheet_response is 'true'.", + "items": { + "type": "string" + }, + "type": "array" + }, + "includeSpreadsheetInResponse": { + "type": "boolean", + "description": "Determines if the update response should include the spreadsheet\nresource." + }, + "requests": { + "description": "A list of updates to apply to the spreadsheet.\nRequests will be applied in the order they are specified.\nIf any request is not valid, no requests will be applied.", + "items": { + "$ref": "Request" + }, + "type": "array" + } + } + }, + "BasicChartAxis": { + "description": "An axis of the chart.\nA chart may not have more than one axis per\naxis position.", + "type": "object", + "properties": { + "format": { + "$ref": "TextFormat", + "description": "The format of the title.\nOnly valid if the axis is not associated with the domain." + }, + "title": { + "description": "The title of this axis. If set, this overrides any title inferred\nfrom headers of the data.", + "type": "string" + }, + "position": { + "description": "The position of this axis.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "The axis rendered at the bottom of a chart.\nFor most charts, this is the standard major axis.\nFor bar charts, this is a minor axis.", + "The axis rendered at the left of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is the standard major axis.", + "The axis rendered at the right of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is an unusual major axis." + ], + "enum": [ + "BASIC_CHART_AXIS_POSITION_UNSPECIFIED", + "BOTTOM_AXIS", + "LEFT_AXIS", + "RIGHT_AXIS" + ] + } + }, + "id": "BasicChartAxis" + }, + "Padding": { + "description": "The amount of padding around the cell, in pixels.\nWhen updating padding, every field must be specified.", + "type": "object", + "properties": { + "top": { + "format": "int32", + "description": "The top padding of the cell.", + "type": "integer" + }, + "left": { + "format": "int32", + "description": "The left padding of the cell.", + "type": "integer" + }, + "right": { + "format": "int32", + "description": "The right padding of the cell.", + "type": "integer" + }, + "bottom": { + "format": "int32", + "description": "The bottom padding of the cell.", + "type": "integer" + } + }, + "id": "Padding" + }, + "DeleteDimensionRequest": { + "description": "Deletes the dimensions from the sheet.", + "type": "object", + "properties": { + "range": { + "$ref": "DimensionRange", + "description": "The dimensions to delete from the sheet." + } + }, + "id": "DeleteDimensionRequest" + }, + "UpdateChartSpecRequest": { + "properties": { + "spec": { + "description": "The specification to apply to the chart.", + "$ref": "ChartSpec" + }, + "chartId": { + "type": "integer", + "format": "int32", + "description": "The ID of the chart to update." + } + }, + "id": "UpdateChartSpecRequest", + "description": "Updates a chart's specifications.\n(This does not move or resize a chart. To move or resize a chart, use\n UpdateEmbeddedObjectPositionRequest.)", + "type": "object" + }, + "DeleteFilterViewRequest": { + "id": "DeleteFilterViewRequest", + "description": "Deletes a particular filter view.", + "type": "object", + "properties": { + "filterId": { + "type": "integer", + "format": "int32", + "description": "The ID of the filter to delete." + } + } + }, + "BatchUpdateValuesResponse": { + "id": "BatchUpdateValuesResponse", + "description": "The response when updating a range of values in a spreadsheet.", + "type": "object", + "properties": { + "totalUpdatedColumns": { + "format": "int32", + "description": "The total number of columns where at least one cell in the column was\nupdated.", + "type": "integer" + }, + "spreadsheetId": { + "description": "The spreadsheet the updates were applied to.", + "type": "string" + }, + "totalUpdatedRows": { + "format": "int32", + "description": "The total number of rows where at least one cell in the row was updated.", + "type": "integer" + }, + "responses": { + "description": "One UpdateValuesResponse per requested range, in the same order as\nthe requests appeared.", + "items": { + "$ref": "UpdateValuesResponse" + }, + "type": "array" + }, + "totalUpdatedSheets": { + "type": "integer", + "format": "int32", + "description": "The total number of sheets where at least one cell in the sheet was\nupdated." + }, + "totalUpdatedCells": { + "format": "int32", + "description": "The total number of cells updated.", + "type": "integer" + } + } + }, + "SortRangeRequest": { + "description": "Sorts data in rows based on a sort order per column.", + "type": "object", + "properties": { + "range": { + "$ref": "GridRange", + "description": "The range to sort." + }, + "sortSpecs": { + "description": "The sort order per column. Later specifications are used when values\nare equal in the earlier specifications.", + "items": { + "$ref": "SortSpec" + }, + "type": "array" + } + }, + "id": "SortRangeRequest" + }, + "MergeCellsRequest": { + "description": "Merges all cells in the range.", + "type": "object", + "properties": { + "mergeType": { + "description": "How the cells should be merged.", + "type": "string", + "enumDescriptions": [ + "Create a single merge from the range", + "Create a merge for each column in the range", + "Create a merge for each row in the range" + ], + "enum": [ + "MERGE_ALL", + "MERGE_COLUMNS", + "MERGE_ROWS" + ] + }, + "range": { + "$ref": "GridRange", + "description": "The range of cells to merge." + } + }, + "id": "MergeCellsRequest" + }, + "AddProtectedRangeRequest": { + "properties": { + "protectedRange": { + "description": "The protected range to be added. The\nprotectedRangeId field is optional; if\none is not set, an id will be randomly generated. (It is an error to\nspecify the ID of a range that already exists.)", + "$ref": "ProtectedRange" + } + }, + "id": "AddProtectedRangeRequest", + "description": "Adds a new protected range.", + "type": "object" + }, + "BatchClearValuesRequest": { + "type": "object", + "properties": { + "ranges": { + "description": "The ranges to clear, in A1 notation.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "BatchClearValuesRequest", + "description": "The request for clearing more than one range of values in a spreadsheet." + }, + "DuplicateFilterViewResponse": { + "description": "The result of a filter view being duplicated.", + "type": "object", + "properties": { + "filter": { + "$ref": "FilterView", + "description": "The newly created filter." + } + }, + "id": "DuplicateFilterViewResponse" + }, + "DuplicateSheetResponse": { + "description": "The result of duplicating a sheet.", + "type": "object", + "properties": { + "properties": { + "$ref": "SheetProperties", + "description": "The properties of the duplicate sheet." + } + }, + "id": "DuplicateSheetResponse" + }, + "TextToColumnsRequest": { + "description": "Splits a column of text into multiple columns,\nbased on a delimiter in each cell.", + "type": "object", + "properties": { + "delimiterType": { + "type": "string", + "enumDescriptions": [ + "Default value. This value must not be used.", + "\",\"", + "\";\"", + "\".\"", + "\" \"", + "A custom value as defined in delimiter." + ], + "enum": [ + "DELIMITER_TYPE_UNSPECIFIED", + "COMMA", + "SEMICOLON", + "PERIOD", + "SPACE", + "CUSTOM" + ], + "description": "The delimiter type to use." + }, + "source": { + "$ref": "GridRange", + "description": "The source data range. This must span exactly one column." + }, + "delimiter": { + "description": "The delimiter to use. Used only if delimiterType is\nCUSTOM.", + "type": "string" + } + }, + "id": "TextToColumnsRequest" + }, + "ClearBasicFilterRequest": { + "id": "ClearBasicFilterRequest", + "description": "Clears the basic filter, if any exists on the sheet.", + "type": "object", + "properties": { + "sheetId": { + "format": "int32", + "description": "The sheet ID on which the basic filter should be cleared.", + "type": "integer" + } + } + }, + "BatchUpdateSpreadsheetResponse": { + "description": "The reply for batch updating a spreadsheet.", + "type": "object", + "properties": { + "updatedSpreadsheet": { + "$ref": "Spreadsheet", + "description": "The spreadsheet after updates were applied. This is only set if\n[BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response] is `true`." + }, + "replies": { + "description": "The reply of the updates. This maps 1:1 with the updates, although\nreplies to some requests may be empty.", + "items": { + "$ref": "Response" + }, + "type": "array" + }, + "spreadsheetId": { + "description": "The spreadsheet the updates were applied to.", + "type": "string" + } + }, + "id": "BatchUpdateSpreadsheetResponse" + }, + "DeleteBandingRequest": { + "description": "Removes the banded range with the given ID from the spreadsheet.", + "type": "object", + "properties": { + "bandedRangeId": { + "format": "int32", + "description": "The ID of the banded range to delete.", + "type": "integer" + } + }, + "id": "DeleteBandingRequest" + }, + "AppendValuesResponse": { + "description": "The response when updating a range of values in a spreadsheet.", + "type": "object", + "properties": { + "updates": { + "$ref": "UpdateValuesResponse", + "description": "Information about the updates that were applied." + }, + "tableRange": { + "description": "The range (in A1 notation) of the table that values are being appended to\n(before the values were appended).\nEmpty if no table was found.", + "type": "string" + }, + "spreadsheetId": { + "description": "The spreadsheet the updates were applied to.", + "type": "string" + } + }, + "id": "AppendValuesResponse" + }, + "AddFilterViewRequest": { + "description": "Adds a filter view.", + "type": "object", + "properties": { + "filter": { + "$ref": "FilterView", + "description": "The filter to add. The filterViewId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a filter that already exists.)" + } + }, + "id": "AddFilterViewRequest" + }, + "MoveDimensionRequest": { + "description": "Moves one or more rows or columns.", + "type": "object", + "properties": { + "destinationIndex": { + "type": "integer", + "format": "int32", + "description": "The zero-based start index of where to move the source data to,\nbased on the coordinates *before* the source data is removed\nfrom the grid. Existing data will be shifted down or right\n(depending on the dimension) to make room for the moved dimensions.\nThe source dimensions are removed from the grid, so the\nthe data may end up in a different index than specified.\n\nFor example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move\n`\"1\"` and `\"2\"` to between `\"3\"` and `\"4\"`, the source would be\n`ROWS [1..3)`,and the destination index would be `\"4\"`\n(the zero-based index of row 5).\nThe end result would be `A1..A5` of `0, 3, 1, 2, 4`." + }, + "source": { + "description": "The source dimensions to move.", + "$ref": "DimensionRange" + } + }, + "id": "MoveDimensionRequest" + }, + "PivotFilterCriteria": { + "description": "Criteria for showing/hiding rows in a pivot table.", + "type": "object", + "properties": { + "visibleValues": { + "description": "Values that should be included. Values not listed here are excluded.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "PivotFilterCriteria" + }, + "AddConditionalFormatRuleRequest": { + "type": "object", + "properties": { + "rule": { + "$ref": "ConditionalFormatRule", + "description": "The rule to add." + }, + "index": { + "type": "integer", + "format": "int32", + "description": "The zero-based index where the rule should be inserted." + } + }, + "id": "AddConditionalFormatRuleRequest", + "description": "Adds a new conditional format rule at the given index.\nAll subsequent rules' indexes are incremented." + }, + "ChartSpec": { + "description": "The specifications of a chart.", + "type": "object", + "properties": { + "backgroundColor": { + "$ref": "Color", + "description": "The background color of the entire chart.\nNot applicable to Org charts." + }, + "basicChart": { + "$ref": "BasicChartSpec", + "description": "A basic chart specification, can be one of many kinds of charts.\nSee BasicChartType for the list of all\ncharts this supports." + }, + "orgChart": { + "description": "An org chart specification.", + "$ref": "OrgChartSpec" + }, + "pieChart": { + "$ref": "PieChartSpec", + "description": "A pie chart specification." + }, + "titleTextFormat": { + "$ref": "TextFormat", + "description": "The title text format.\nStrikethrough and underline are not supported." + }, + "title": { + "description": "The title of the chart.", + "type": "string" + }, + "altText": { + "description": "The alternative text that describes the chart. This is often used\nfor accessibility.", + "type": "string" + }, + "histogramChart": { + "$ref": "HistogramChartSpec", + "description": "A histogram chart specification." + }, + "candlestickChart": { + "description": "A candlestick chart specification.", + "$ref": "CandlestickChartSpec" + }, + "bubbleChart": { + "$ref": "BubbleChartSpec", + "description": "A bubble chart specification." + }, + "fontName": { + "type": "string", + "description": "The name of the font to use by default for all chart text (e.g. title,\naxis labels, legend). If a font is specified for a specific part of the\nchart it will override this font name." + }, + "maximized": { + "description": "True to make a chart fill the entire space in which it's rendered with\nminimum padding. False to use the default padding.\n(Not applicable to Geo and Org charts.)", + "type": "boolean" + }, + "hiddenDimensionStrategy": { + "description": "Determines how the charts will use hidden rows or columns.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "Charts will skip hidden rows and columns.", + "Charts will skip hidden rows only.", + "Charts will skip hidden columns only.", + "Charts will not skip any hidden rows or columns." + ], + "enum": [ + "CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED", + "SKIP_HIDDEN_ROWS_AND_COLUMNS", + "SKIP_HIDDEN_ROWS", + "SKIP_HIDDEN_COLUMNS", + "SHOW_ALL" + ] + } + }, + "id": "ChartSpec" + }, + "NumberFormat": { + "description": "The number format of a cell.", + "type": "object", + "properties": { + "type": { + "enum": [ + "NUMBER_FORMAT_TYPE_UNSPECIFIED", + "TEXT", + "NUMBER", + "PERCENT", + "CURRENCY", + "DATE", + "TIME", + "DATE_TIME", + "SCIENTIFIC" + ], + "description": "The type of the number format.\nWhen writing, this field must be set.", + "type": "string", + "enumDescriptions": [ + "The number format is not specified\nand is based on the contents of the cell.\nDo not explicitly use this.", + "Text formatting, e.g `1000.12`", + "Number formatting, e.g, `1,000.12`", + "Percent formatting, e.g `10.12%`", + "Currency formatting, e.g `$1,000.12`", + "Date formatting, e.g `9/26/2008`", + "Time formatting, e.g `3:59:00 PM`", + "Date+Time formatting, e.g `9/26/08 15:59:00`", + "Scientific number formatting, e.g `1.01E+03`" + ] + }, + "pattern": { + "type": "string", + "description": "Pattern string used for formatting. If not set, a default pattern based on\nthe user's locale will be used if necessary for the given type.\nSee the [Date and Number Formats guide](/sheets/api/guides/formats) for more\ninformation about the supported patterns." + } + }, + "id": "NumberFormat" + }, + "CandlestickDomain": { + "description": "The domain of a CandlestickChart.", + "type": "object", + "properties": { + "data": { + "description": "The data of the CandlestickDomain.", + "$ref": "ChartData" + }, + "reversed": { + "description": "True to reverse the order of the domain values (horizontal axis).", + "type": "boolean" + } + }, + "id": "CandlestickDomain" + }, + "SheetProperties": { + "type": "object", + "properties": { + "title": { + "description": "The name of the sheet.", + "type": "string" + }, + "index": { + "format": "int32", + "description": "The index of the sheet within the spreadsheet.\nWhen adding or updating sheet properties, if this field\nis excluded then the sheet will be added or moved to the end\nof the sheet list. When updating sheet indices or inserting\nsheets, movement is considered in \"before the move\" indexes.\nFor example, if there were 3 sheets (S1, S2, S3) in order to\nmove S1 ahead of S2 the index would have to be set to 2. A sheet\nindex update request will be ignored if the requested index is\nidentical to the sheets current index or if the requested new\nindex is equal to the current sheet index + 1.", + "type": "integer" + }, + "tabColor": { + "$ref": "Color", + "description": "The color of the tab in the UI." + }, + "sheetId": { + "format": "int32", + "description": "The ID of the sheet. Must be non-negative.\nThis field cannot be changed once set.", + "type": "integer" + }, + "rightToLeft": { + "description": "True if the sheet is an RTL sheet instead of an LTR sheet.", + "type": "boolean" + }, + "hidden": { + "description": "True if the sheet is hidden in the UI, false if it's visible.", + "type": "boolean" + }, + "gridProperties": { + "$ref": "GridProperties", + "description": "Additional properties of the sheet if this sheet is a grid.\n(If the sheet is an object sheet, containing a chart or image, then\nthis field will be absent.)\nWhen writing it is an error to set any grid properties on non-grid sheets." + }, + "sheetType": { + "description": "The type of sheet. Defaults to GRID.\nThis field cannot be changed once set.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "The sheet is a grid.", + "The sheet has no grid and instead has an object like a chart or image." + ], + "enum": [ + "SHEET_TYPE_UNSPECIFIED", + "GRID", + "OBJECT" + ] + } + }, + "id": "SheetProperties", + "description": "Properties of a sheet." + }, + "UpdateDimensionPropertiesRequest": { + "description": "Updates properties of dimensions within the specified range.", + "type": "object", + "properties": { + "range": { + "$ref": "DimensionRange", + "description": "The rows or columns to update." + }, + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated. At least one field must be specified.\nThe root `properties` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "type": "string" + }, + "properties": { + "$ref": "DimensionProperties", + "description": "Properties to update." + } + }, + "id": "UpdateDimensionPropertiesRequest" + }, + "SourceAndDestination": { + "description": "A combination of a source range and how to extend that source.", + "type": "object", + "properties": { + "dimension": { + "enumDescriptions": [ + "The default value, do not use.", + "Operates on the rows of a sheet.", + "Operates on the columns of a sheet." + ], + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ], + "description": "The dimension that data should be filled into.", + "type": "string" + }, + "fillLength": { + "format": "int32", + "description": "The number of rows or columns that data should be filled into.\nPositive numbers expand beyond the last row or last column\nof the source. Negative numbers expand before the first row\nor first column of the source.", + "type": "integer" + }, + "source": { + "$ref": "GridRange", + "description": "The location of the data to use as the source of the autofill." + } + }, + "id": "SourceAndDestination" + }, + "FilterView": { + "id": "FilterView", + "description": "A filter view.", + "type": "object", + "properties": { + "criteria": { + "additionalProperties": { + "$ref": "FilterCriteria" + }, + "description": "The criteria for showing/hiding values per column.\nThe map's key is the column index, and the value is the criteria for\nthat column.", + "type": "object" + }, + "title": { + "description": "The name of the filter view.", + "type": "string" + }, + "range": { + "$ref": "GridRange", + "description": "The range this filter view covers.\n\nWhen writing, only one of range or named_range_id\nmay be set." + }, + "sortSpecs": { + "description": "The sort order per column. Later specifications are used when values\nare equal in the earlier specifications.", + "items": { + "$ref": "SortSpec" + }, + "type": "array" + }, + "namedRangeId": { + "description": "The named range this filter view is backed by, if any.\n\nWhen writing, only one of range or named_range_id\nmay be set.", + "type": "string" + }, + "filterViewId": { + "format": "int32", + "description": "The ID of the filter view.", + "type": "integer" + } + } + }, + "OrgChartSpec": { + "description": "An \u003ca href=\"/chart/interactive/docs/gallery/orgchart\"\u003eorg chart\u003c/a\u003e.\nOrg charts require a unique set of labels in labels and may\noptionally include parent_labels and tooltips.\nparent_labels contain, for each node, the label identifying the parent\nnode. tooltips contain, for each node, an optional tooltip.\n\nFor example, to describe an OrgChart with Alice as the CEO, Bob as the\nPresident (reporting to Alice) and Cathy as VP of Sales (also reporting to\nAlice), have labels contain \"Alice\", \"Bob\", \"Cathy\",\nparent_labels contain \"\", \"Alice\", \"Alice\" and tooltips contain\n\"CEO\", \"President\", \"VP Sales\".", + "type": "object", + "properties": { + "tooltips": { + "description": "The data containing the tooltip for the corresponding node. A blank value\nresults in no tooltip being displayed for the node.\nThis field is optional.", + "$ref": "ChartData" + }, + "selectedNodeColor": { + "description": "The color of the selected org chart nodes.", + "$ref": "Color" + }, + "parentLabels": { + "description": "The data containing the label of the parent for the corresponding node.\nA blank value indicates that the node has no parent and is a top-level\nnode.\nThis field is optional.", + "$ref": "ChartData" + }, + "nodeSize": { + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "The small org chart node size.", + "The medium org chart node size.", + "The large org chart node size." + ], + "enum": [ + "ORG_CHART_LABEL_SIZE_UNSPECIFIED", + "SMALL", + "MEDIUM", + "LARGE" + ], + "description": "The size of the org chart nodes." + }, + "labels": { + "description": "The data containing the labels for all the nodes in the chart. Labels\nmust be unique.", + "$ref": "ChartData" + }, + "nodeColor": { + "$ref": "Color", + "description": "The color of the org chart nodes." + } + }, + "id": "OrgChartSpec" + }, + "BandingProperties": { + "description": "Properties referring a single dimension (either row or column). If both\nBandedRange.row_properties and BandedRange.column_properties are\nset, the fill colors are applied to cells according to the following rules:\n\n* header_color and footer_color take priority over band colors.\n* first_band_color takes priority over second_band_color.\n* row_properties takes priority over column_properties.\n\nFor example, the first row color takes priority over the first column\ncolor, but the first column color takes priority over the second row color.\nSimilarly, the row header takes priority over the column header in the\ntop left cell, but the column header takes priority over the first row\ncolor if the row header is not set.", + "type": "object", + "properties": { + "firstBandColor": { + "description": "The first color that is alternating. (Required)", + "$ref": "Color" + }, + "secondBandColor": { + "description": "The second color that is alternating. (Required)", + "$ref": "Color" + }, + "footerColor": { + "description": "The color of the last row or column. If this field is not set, the last\nrow or column will be filled with either first_band_color or\nsecond_band_color, depending on the color of the previous row or\ncolumn.", + "$ref": "Color" + }, + "headerColor": { + "description": "The color of the first row or column. If this field is set, the first\nrow or column will be filled with this color and the colors will\nalternate between first_band_color and second_band_color starting\nfrom the second row or column. Otherwise, the first row or column will be\nfilled with first_band_color and the colors will proceed to alternate\nas they normally would.", + "$ref": "Color" + } + }, + "id": "BandingProperties" + }, + "AddProtectedRangeResponse": { + "description": "The result of adding a new protected range.", + "type": "object", + "properties": { + "protectedRange": { + "description": "The newly added protected range.", + "$ref": "ProtectedRange" + } + }, + "id": "AddProtectedRangeResponse" + }, + "BasicFilter": { + "properties": { + "criteria": { + "description": "The criteria for showing/hiding values per column.\nThe map's key is the column index, and the value is the criteria for\nthat column.", + "type": "object", + "additionalProperties": { + "$ref": "FilterCriteria" + } + }, + "range": { + "$ref": "GridRange", + "description": "The range the filter covers." + }, + "sortSpecs": { + "description": "The sort order per column. Later specifications are used when values\nare equal in the earlier specifications.", + "items": { + "$ref": "SortSpec" + }, + "type": "array" + } + }, + "id": "BasicFilter", + "description": "The default filter associated with a sheet.", + "type": "object" + }, + "CandlestickSeries": { + "description": "The series of a CandlestickData.", + "type": "object", + "properties": { + "data": { + "$ref": "ChartData", + "description": "The data of the CandlestickSeries." + } + }, + "id": "CandlestickSeries" + }, + "HistogramChartSpec": { + "description": "A \u003ca href=\"/chart/interactive/docs/gallery/histogram\"\u003ehistogram chart\u003c/a\u003e.\nA histogram chart groups data items into bins, displaying each bin as a\ncolumn of stacked items. Histograms are used to display the distribution\nof a dataset. Each column of items represents a range into which those\nitems fall. The number of bins can be chosen automatically or specified\nexplicitly.", + "type": "object", + "properties": { + "bucketSize": { + "format": "double", + "description": "By default the bucket size (the range of values stacked in a single\ncolumn) is chosen automatically, but it may be overridden here.\nE.g., A bucket size of 1.5 results in buckets from 0 - 1.5, 1.5 - 3.0, etc.\nCannot be negative.\nThis field is optional.", + "type": "number" + }, + "outlierPercentile": { + "format": "double", + "description": "The outlier percentile is used to ensure that outliers do not adversely\naffect the calculation of bucket sizes. For example, setting an outlier\npercentile of 0.05 indicates that the top and bottom 5% of values when\ncalculating buckets. The values are still included in the chart, they will\nbe added to the first or last buckets instead of their own buckets.\nMust be between 0.0 and 0.5.", + "type": "number" + }, + "showItemDividers": { + "description": "Whether horizontal divider lines should be displayed between items in each\ncolumn.", + "type": "boolean" + }, + "series": { + "items": { + "$ref": "HistogramSeries" + }, + "type": "array", + "description": "The series for a histogram may be either a single series of values to be\nbucketed or multiple series, each of the same length, containing the name\nof the series followed by the values to be bucketed for that series." + }, + "legendPosition": { + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "The legend is rendered on the bottom of the chart.", + "The legend is rendered on the left of the chart.", + "The legend is rendered on the right of the chart.", + "The legend is rendered on the top of the chart.", + "No legend is rendered.", + "The legend is rendered inside the chart area." + ], + "enum": [ + "HISTOGRAM_CHART_LEGEND_POSITION_UNSPECIFIED", + "BOTTOM_LEGEND", + "LEFT_LEGEND", + "RIGHT_LEGEND", + "TOP_LEGEND", + "NO_LEGEND", + "INSIDE_LEGEND" + ], + "description": "The position of the chart legend." + } + }, + "id": "HistogramChartSpec" + }, + "UpdateValuesResponse": { + "description": "The response when updating a range of values in a spreadsheet.", + "type": "object", + "properties": { + "updatedData": { + "$ref": "ValueRange", + "description": "The values of the cells after updates were applied.\nThis is only included if the request's `includeValuesInResponse` field\nwas `true`." + }, + "updatedRows": { + "format": "int32", + "description": "The number of rows where at least one cell in the row was updated.", + "type": "integer" + }, + "updatedColumns": { + "type": "integer", + "format": "int32", + "description": "The number of columns where at least one cell in the column was updated." + }, + "spreadsheetId": { + "description": "The spreadsheet the updates were applied to.", + "type": "string" + }, + "updatedRange": { + "description": "The range (in A1 notation) that updates were applied to.", + "type": "string" + }, + "updatedCells": { + "format": "int32", + "description": "The number of cells updated.", + "type": "integer" + } + }, + "id": "UpdateValuesResponse" + }, + "PivotValue": { + "properties": { + "sourceColumnOffset": { + "format": "int32", + "description": "The column offset of the source range that this value reads from.\n\nFor example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`\nmeans this value refers to column `C`, whereas the offset `1` would\nrefer to column `D`.", + "type": "integer" + }, + "name": { + "description": "A name to use for the value. This is only used if formula was set.\nOtherwise, the column name is used.", + "type": "string" + }, + "formula": { + "description": "A custom formula to calculate the value. The formula must start\nwith an `=` character.", + "type": "string" + }, + "summarizeFunction": { + "type": "string", + "enumDescriptions": [ + "The default, do not use.", + "Corresponds to the `SUM` function.", + "Corresponds to the `COUNTA` function.", + "Corresponds to the `COUNT` function.", + "Corresponds to the `COUNTUNIQUE` function.", + "Corresponds to the `AVERAGE` function.", + "Corresponds to the `MAX` function.", + "Corresponds to the `MIN` function.", + "Corresponds to the `MEDIAN` function.", + "Corresponds to the `PRODUCT` function.", + "Corresponds to the `STDEV` function.", + "Corresponds to the `STDEVP` function.", + "Corresponds to the `VAR` function.", + "Corresponds to the `VARP` function.", + "Indicates the formula should be used as-is.\nOnly valid if PivotValue.formula was set." + ], + "enum": [ + "PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED", + "SUM", + "COUNTA", + "COUNT", + "COUNTUNIQUE", + "AVERAGE", + "MAX", + "MIN", + "MEDIAN", + "PRODUCT", + "STDEV", + "STDEVP", + "VAR", + "VARP", + "CUSTOM" + ], + "description": "A function to summarize the value.\nIf formula is set, the only supported values are\nSUM and\nCUSTOM.\nIf sourceColumnOffset is set, then `CUSTOM`\nis not supported." + } + }, + "id": "PivotValue", + "description": "The definition of how a value in a pivot table should be calculated.", + "type": "object" + }, + "ErrorValue": { + "type": "object", + "properties": { + "type": { + "enumDescriptions": [ + "The default error type, do not use this.", + "Corresponds to the `#ERROR!` error.", + "Corresponds to the `#NULL!` error.", + "Corresponds to the `#DIV/0` error.", + "Corresponds to the `#VALUE!` error.", + "Corresponds to the `#REF!` error.", + "Corresponds to the `#NAME?` error.", + "Corresponds to the `#NUM`! error.", + "Corresponds to the `#N/A` error.", + "Corresponds to the `Loading...` state." + ], + "enum": [ + "ERROR_TYPE_UNSPECIFIED", + "ERROR", + "NULL_VALUE", + "DIVIDE_BY_ZERO", + "VALUE", + "REF", + "NAME", + "NUM", + "N_A", + "LOADING" + ], + "description": "The type of error.", + "type": "string" + }, + "message": { + "description": "A message with more information about the error\n(in the spreadsheet's locale).", + "type": "string" + } + }, + "id": "ErrorValue", + "description": "An error in a cell." + }, + "CopySheetToAnotherSpreadsheetRequest": { + "type": "object", + "properties": { + "destinationSpreadsheetId": { + "type": "string", + "description": "The ID of the spreadsheet to copy the sheet to." + } + }, + "id": "CopySheetToAnotherSpreadsheetRequest", + "description": "The request to copy a sheet across spreadsheets." + }, + "PivotGroupSortValueBucket": { + "type": "object", + "properties": { + "valuesIndex": { + "format": "int32", + "description": "The offset in the PivotTable.values list which the values in this\ngrouping should be sorted by.", + "type": "integer" + }, + "buckets": { + "description": "Determines the bucket from which values are chosen to sort.\n\nFor example, in a pivot table with one row group & two column groups,\nthe row group can list up to two values. The first value corresponds\nto a value within the first column group, and the second value\ncorresponds to a value in the second column group. If no values\nare listed, this would indicate that the row should be sorted according\nto the \"Grand Total\" over the column groups. If a single value is listed,\nthis would correspond to using the \"Total\" of that bucket.", + "items": { + "$ref": "ExtendedValue" + }, + "type": "array" + } + }, + "id": "PivotGroupSortValueBucket", + "description": "Information about which values in a pivot group should be used for sorting." + }, + "CandlestickChartSpec": { + "id": "CandlestickChartSpec", + "description": "A \u003ca href=\"/chart/interactive/docs/gallery/candlestickchart\"\u003ecandlestick chart\u003c/a\u003e.", + "type": "object", + "properties": { + "data": { + "description": "The Candlestick chart data.\nOnly one CandlestickData is supported.", + "items": { + "$ref": "CandlestickData" + }, + "type": "array" + }, + "domain": { + "description": "The domain data (horizontal axis) for the candlestick chart. String data\nwill be treated as discrete labels, other data will be treated as\ncontinuous values.", + "$ref": "CandlestickDomain" + } + } + }, + "CandlestickData": { + "properties": { + "highSeries": { + "$ref": "CandlestickSeries", + "description": "The range data (vertical axis) for the high/maximum value for each\ncandle. This is the top of the candle's center line." + }, + "closeSeries": { + "$ref": "CandlestickSeries", + "description": "The range data (vertical axis) for the close/final value for each candle.\nThis is the top of the candle body. If greater than the open value the\ncandle will be filled. Otherwise the candle will be hollow." + }, + "lowSeries": { + "$ref": "CandlestickSeries", + "description": "The range data (vertical axis) for the low/minimum value for each candle.\nThis is the bottom of the candle's center line." + }, + "openSeries": { + "$ref": "CandlestickSeries", + "description": "The range data (vertical axis) for the open/initial value for each\ncandle. This is the bottom of the candle body. If less than the close\nvalue the candle will be filled. Otherwise the candle will be hollow." + } + }, + "id": "CandlestickData", + "description": "The Candlestick chart data, each containing the low, open, close, and high\nvalues for a series.", + "type": "object" + }, + "EmbeddedObjectPosition": { + "id": "EmbeddedObjectPosition", + "description": "The position of an embedded object such as a chart.", + "type": "object", + "properties": { + "newSheet": { + "description": "If true, the embedded object will be put on a new sheet whose ID\nis chosen for you. Used only when writing.", + "type": "boolean" + }, + "overlayPosition": { + "$ref": "OverlayPosition", + "description": "The position at which the object is overlaid on top of a grid." + }, + "sheetId": { + "format": "int32", + "description": "The sheet this is on. Set only if the embedded object\nis on its own sheet. Must be non-negative.", + "type": "integer" + } + } + }, + "DeleteProtectedRangeRequest": { + "properties": { + "protectedRangeId": { + "format": "int32", + "description": "The ID of the protected range to delete.", + "type": "integer" + } + }, + "id": "DeleteProtectedRangeRequest", + "description": "Deletes the protected range with the given ID.", + "type": "object" + }, + "AutoFillRequest": { + "description": "Fills in more data based on existing data.", + "type": "object", + "properties": { + "useAlternateSeries": { + "description": "True if we should generate data with the \"alternate\" series.\nThis differs based on the type and amount of source data.", + "type": "boolean" + }, + "sourceAndDestination": { + "$ref": "SourceAndDestination", + "description": "The source and destination areas to autofill.\nThis explicitly lists the source of the autofill and where to\nextend that data." + }, + "range": { + "$ref": "GridRange", + "description": "The range to autofill. This will examine the range and detect\nthe location that has data and automatically fill that data\nin to the rest of the range." + } + }, + "id": "AutoFillRequest" + }, + "GradientRule": { + "description": "A rule that applies a gradient color scale format, based on\nthe interpolation points listed. The format of a cell will vary\nbased on its contents as compared to the values of the interpolation\npoints.", + "type": "object", + "properties": { + "midpoint": { + "description": "An optional midway interpolation point.", + "$ref": "InterpolationPoint" + }, + "maxpoint": { + "$ref": "InterpolationPoint", + "description": "The final interpolation point." + }, + "minpoint": { + "description": "The starting interpolation point.", + "$ref": "InterpolationPoint" + } + }, + "id": "GradientRule" + }, + "SetBasicFilterRequest": { + "description": "Sets the basic filter associated with a sheet.", + "type": "object", + "properties": { + "filter": { + "$ref": "BasicFilter", + "description": "The filter to set." + } + }, + "id": "SetBasicFilterRequest" + }, + "ClearValuesRequest": { + "description": "The request for clearing a range of values in a spreadsheet.", + "type": "object", + "properties": {}, + "id": "ClearValuesRequest" + }, + "InterpolationPoint": { + "description": "A single interpolation point on a gradient conditional format.\nThese pin the gradient color scale according to the color,\ntype and value chosen.", + "type": "object", + "properties": { + "color": { + "description": "The color this interpolation point should use.", + "$ref": "Color" + }, + "type": { + "enum": [ + "INTERPOLATION_POINT_TYPE_UNSPECIFIED", + "MIN", + "MAX", + "NUMBER", + "PERCENT", + "PERCENTILE" + ], + "description": "How the value should be interpreted.", + "type": "string", + "enumDescriptions": [ + "The default value, do not use.", + "The interpolation point will use the minimum value in the\ncells over the range of the conditional format.", + "The interpolation point will use the maximum value in the\ncells over the range of the conditional format.", + "The interpolation point will use exactly the value in\nInterpolationPoint.value.", + "The interpolation point will be the given percentage over\nall the cells in the range of the conditional format.\nThis is equivalent to NUMBER if the value was:\n`=(MAX(FLATTEN(range)) * (value / 100))\n + (MIN(FLATTEN(range)) * (1 - (value / 100)))`\n(where errors in the range are ignored when flattening).", + "The interpolation point will be the given percentile\nover all the cells in the range of the conditional format.\nThis is equivalent to NUMBER if the value was:\n`=PERCENTILE(FLATTEN(range), value / 100)`\n(where errors in the range are ignored when flattening)." + ] + }, + "value": { + "description": "The value this interpolation point uses. May be a formula.\nUnused if type is MIN or\nMAX.", + "type": "string" + } + }, + "id": "InterpolationPoint" + }, + "FindReplaceResponse": { + "id": "FindReplaceResponse", + "description": "The result of the find/replace.", + "type": "object", + "properties": { + "sheetsChanged": { + "format": "int32", + "description": "The number of sheets changed.", + "type": "integer" + }, + "formulasChanged": { + "format": "int32", + "description": "The number of formula cells changed.", + "type": "integer" + }, + "valuesChanged": { + "format": "int32", + "description": "The number of non-formula cells changed.", + "type": "integer" + }, + "occurrencesChanged": { + "format": "int32", + "description": "The number of occurrences (possibly multiple within a cell) changed.\nFor example, if replacing `\"e\"` with `\"o\"` in `\"Google Sheets\"`, this would\nbe `\"3\"` because `\"Google Sheets\"` -\u003e `\"Googlo Shoots\"`.", + "type": "integer" + }, + "rowsChanged": { + "format": "int32", + "description": "The number of rows changed.", + "type": "integer" + } + } + }, + "DeleteEmbeddedObjectRequest": { + "description": "Deletes the embedded object with the given ID.", + "type": "object", + "properties": { + "objectId": { + "format": "int32", + "description": "The ID of the embedded object to delete.", + "type": "integer" + } + }, + "id": "DeleteEmbeddedObjectRequest" + }, + "DuplicateFilterViewRequest": { + "description": "Duplicates a particular filter view.", + "type": "object", + "properties": { + "filterId": { + "format": "int32", + "description": "The ID of the filter being duplicated.", + "type": "integer" + } + }, + "id": "DuplicateFilterViewRequest" + }, + "DeleteSheetRequest": { + "properties": { + "sheetId": { + "format": "int32", + "description": "The ID of the sheet to delete.", + "type": "integer" + } + }, + "id": "DeleteSheetRequest", + "description": "Deletes the requested sheet.", + "type": "object" + }, + "UpdateConditionalFormatRuleResponse": { + "description": "The result of updating a conditional format rule.", + "type": "object", + "properties": { + "newIndex": { + "type": "integer", + "format": "int32", + "description": "The index of the new rule." + }, + "newRule": { + "$ref": "ConditionalFormatRule", + "description": "The new rule that replaced the old rule (if replacing),\nor the rule that was moved (if moved)" + }, + "oldIndex": { + "format": "int32", + "description": "The old index of the rule. Not set if a rule was replaced\n(because it is the same as new_index).", + "type": "integer" + }, + "oldRule": { + "$ref": "ConditionalFormatRule", + "description": "The old (deleted) rule. Not set if a rule was moved\n(because it is the same as new_rule)." + } + }, + "id": "UpdateConditionalFormatRuleResponse" + }, + "DuplicateSheetRequest": { + "description": "Duplicates the contents of a sheet.", + "type": "object", + "properties": { + "newSheetName": { + "description": "The name of the new sheet. If empty, a new name is chosen for you.", + "type": "string" + }, + "sourceSheetId": { + "format": "int32", + "description": "The sheet to duplicate.", + "type": "integer" + }, + "newSheetId": { + "format": "int32", + "description": "If set, the ID of the new sheet. If not set, an ID is chosen.\nIf set, the ID must not conflict with any existing sheet ID.\nIf set, it must be non-negative.", + "type": "integer" + }, + "insertSheetIndex": { + "format": "int32", + "description": "The zero-based index where the new sheet should be inserted.\nThe index of all sheets after this are incremented.", + "type": "integer" + } + }, + "id": "DuplicateSheetRequest" + }, + "ConditionValue": { + "id": "ConditionValue", + "description": "The value of the condition.", + "type": "object", + "properties": { + "userEnteredValue": { + "description": "A value the condition is based on.\nThe value will be parsed as if the user typed into a cell.\nFormulas are supported (and must begin with an `=`).", + "type": "string" + }, + "relativeDate": { + "enumDescriptions": [ + "Default value, do not use.", + "The value is one year before today.", + "The value is one month before today.", + "The value is one week before today.", + "The value is yesterday.", + "The value is today.", + "The value is tomorrow." + ], + "enum": [ + "RELATIVE_DATE_UNSPECIFIED", + "PAST_YEAR", + "PAST_MONTH", + "PAST_WEEK", + "YESTERDAY", + "TODAY", + "TOMORROW" + ], + "description": "A relative date (based on the current date).\nValid only if the type is\nDATE_BEFORE,\nDATE_AFTER,\nDATE_ON_OR_BEFORE or\nDATE_ON_OR_AFTER.\n\nRelative dates are not supported in data validation.\nThey are supported only in conditional formatting and\nconditional filters.", + "type": "string" + } + } + }, + "ExtendedValue": { + "description": "The kinds of value that a cell in a spreadsheet can have.", + "type": "object", + "properties": { + "errorValue": { + "description": "Represents an error.\nThis field is read-only.", + "$ref": "ErrorValue" + }, + "formulaValue": { + "description": "Represents a formula.", + "type": "string" + }, + "boolValue": { + "description": "Represents a boolean value.", + "type": "boolean" + }, + "stringValue": { + "description": "Represents a string value.\nLeading single quotes are not included. For example, if the user typed\n`'123` into the UI, this would be represented as a `stringValue` of\n`\"123\"`.", + "type": "string" + }, + "numberValue": { + "format": "double", + "description": "Represents a double value.\nNote: Dates, Times and DateTimes are represented as doubles in\n\"serial number\" format.", + "type": "number" + } + }, + "id": "ExtendedValue" + }, + "AddChartRequest": { + "properties": { + "chart": { + "description": "The chart that should be added to the spreadsheet, including the position\nwhere it should be placed. The chartId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a chart that already exists.)", + "$ref": "EmbeddedChart" + } + }, + "id": "AddChartRequest", + "description": "Adds a chart to a sheet in the spreadsheet.", + "type": "object" + }, + "Spreadsheet": { + "description": "Resource that represents a spreadsheet.", + "type": "object", + "properties": { + "spreadsheetUrl": { + "description": "The url of the spreadsheet.\nThis field is read-only.", + "type": "string" + }, + "properties": { + "description": "Overall properties of a spreadsheet.", + "$ref": "SpreadsheetProperties" + }, + "namedRanges": { + "items": { + "$ref": "NamedRange" + }, + "type": "array", + "description": "The named ranges defined in a spreadsheet." + }, + "sheets": { + "description": "The sheets that are part of a spreadsheet.", + "items": { + "$ref": "Sheet" + }, + "type": "array" + }, + "spreadsheetId": { + "description": "The ID of the spreadsheet.\nThis field is read-only.", + "type": "string" + } + }, + "id": "Spreadsheet" + }, + "BatchClearValuesResponse": { + "description": "The response when clearing a range of values in a spreadsheet.", + "type": "object", + "properties": { + "spreadsheetId": { + "description": "The spreadsheet the updates were applied to.", + "type": "string" + }, + "clearedRanges": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The ranges that were cleared, in A1 notation.\n(If the requests were for an unbounded range or a ranger larger\n than the bounds of the sheet, this will be the actual ranges\n that were cleared, bounded to the sheet's limits.)" + } + }, + "id": "BatchClearValuesResponse" + }, + "HistogramSeries": { + "description": "A histogram series containing the series color and data.", + "type": "object", + "properties": { + "barColor": { + "description": "The color of the column representing this series in each bucket.\nThis field is optional.", + "$ref": "Color" + }, + "data": { + "description": "The data for this histogram series.", + "$ref": "ChartData" + } + }, + "id": "HistogramSeries" + }, + "BandedRange": { + "description": "A banded (alternating colors) range in a sheet.", + "type": "object", + "properties": { + "range": { + "$ref": "GridRange", + "description": "The range over which these properties are applied." + }, + "bandedRangeId": { + "format": "int32", + "description": "The id of the banded range.", + "type": "integer" + }, + "columnProperties": { + "description": "Properties for column bands. These properties will be applied on a column-\nby-column basis throughout all the columns in the range. At least one of\nrow_properties or column_properties must be specified.", + "$ref": "BandingProperties" + }, + "rowProperties": { + "description": "Properties for row bands. These properties will be applied on a row-by-row\nbasis throughout all the rows in the range. At least one of\nrow_properties or column_properties must be specified.", + "$ref": "BandingProperties" + } + }, + "id": "BandedRange" + }, + "UpdateProtectedRangeRequest": { + "id": "UpdateProtectedRangeRequest", + "description": "Updates an existing protected range with the specified\nprotectedRangeId.", + "type": "object", + "properties": { + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated. At least one field must be specified.\nThe root `protectedRange` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "type": "string" + }, + "protectedRange": { + "$ref": "ProtectedRange", + "description": "The protected range to update with the new properties." + } + } + }, + "TextFormat": { + "id": "TextFormat", + "description": "The format of a run of text in a cell.\nAbsent values indicate that the field isn't specified.", + "type": "object", + "properties": { + "underline": { + "description": "True if the text is underlined.", + "type": "boolean" + }, + "bold": { + "description": "True if the text is bold.", + "type": "boolean" + }, + "foregroundColor": { + "$ref": "Color", + "description": "The foreground color of the text." + }, + "fontFamily": { + "description": "The font family.", + "type": "string" + }, + "italic": { + "description": "True if the text is italicized.", + "type": "boolean" + }, + "strikethrough": { + "description": "True if the text has a strikethrough.", + "type": "boolean" + }, + "fontSize": { + "format": "int32", + "description": "The size of the font.", + "type": "integer" + } + } + }, + "AddSheetResponse": { + "description": "The result of adding a sheet.", + "type": "object", + "properties": { + "properties": { + "$ref": "SheetProperties", + "description": "The properties of the newly added sheet." + } + }, + "id": "AddSheetResponse" + }, + "AddFilterViewResponse": { + "description": "The result of adding a filter view.", + "type": "object", + "properties": { + "filter": { + "$ref": "FilterView", + "description": "The newly added filter view." + } + }, + "id": "AddFilterViewResponse" + }, + "IterativeCalculationSettings": { + "properties": { + "convergenceThreshold": { + "format": "double", + "description": "When iterative calculation is enabled and successive results differ by\nless than this threshold value, the calculation rounds stop.", + "type": "number" + }, + "maxIterations": { + "format": "int32", + "description": "When iterative calculation is enabled, the maximum number of calculation\nrounds to perform.", + "type": "integer" + } + }, + "id": "IterativeCalculationSettings", + "description": "Settings to control how circular dependencies are resolved with iterative\ncalculation.", + "type": "object" + }, + "SpreadsheetProperties": { + "description": "Properties of a spreadsheet.", + "type": "object", + "properties": { + "autoRecalc": { + "type": "string", + "enumDescriptions": [ + "Default value. This value must not be used.", + "Volatile functions are updated on every change.", + "Volatile functions are updated on every change and every minute.", + "Volatile functions are updated on every change and hourly." + ], + "enum": [ + "RECALCULATION_INTERVAL_UNSPECIFIED", + "ON_CHANGE", + "MINUTE", + "HOUR" + ], + "description": "The amount of time to wait before volatile functions are recalculated." + }, + "defaultFormat": { + "description": "The default format of all cells in the spreadsheet.\nCellData.effectiveFormat will not be set if the\ncell's format is equal to this default format.\nThis field is read-only.", + "$ref": "CellFormat" + }, + "title": { + "description": "The title of the spreadsheet.", + "type": "string" + }, + "timeZone": { + "description": "The time zone of the spreadsheet, in CLDR format such as\n`America/New_York`. If the time zone isn't recognized, this may\nbe a custom time zone such as `GMT-07:00`.", + "type": "string" + }, + "locale": { + "description": "The locale of the spreadsheet in one of the following formats:\n\n* an ISO 639-1 language code such as `en`\n\n* an ISO 639-2 language code such as `fil`, if no 639-1 code exists\n\n* a combination of the ISO language code and country code, such as `en_US`\n\nNote: when updating this field, not all locales/languages are supported.", + "type": "string" + }, + "iterativeCalculationSettings": { + "$ref": "IterativeCalculationSettings", + "description": "Determines whether and how circular references are resolved with iterative\ncalculation. Absence of this field means that circular references will\nresult in calculation errors." + } + }, + "id": "SpreadsheetProperties" + }, + "OverlayPosition": { + "description": "The location an object is overlaid on top of a grid.", + "type": "object", + "properties": { + "widthPixels": { + "format": "int32", + "description": "The width of the object, in pixels. Defaults to 600.", + "type": "integer" + }, + "offsetXPixels": { + "format": "int32", + "description": "The horizontal offset, in pixels, that the object is offset\nfrom the anchor cell.", + "type": "integer" + }, + "anchorCell": { + "description": "The cell the object is anchored to.", + "$ref": "GridCoordinate" + }, + "heightPixels": { + "type": "integer", + "format": "int32", + "description": "The height of the object, in pixels. Defaults to 371." + }, + "offsetYPixels": { + "format": "int32", + "description": "The vertical offset, in pixels, that the object is offset\nfrom the anchor cell.", + "type": "integer" + } + }, + "id": "OverlayPosition" + }, + "RepeatCellRequest": { + "properties": { + "cell": { + "$ref": "CellData", + "description": "The data to write." + }, + "range": { + "description": "The range to repeat the cell in.", + "$ref": "GridRange" + }, + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated. At least one field must be specified.\nThe root `cell` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "type": "string" + } + }, + "id": "RepeatCellRequest", + "description": "Updates all cells in the range to the values in the given Cell object.\nOnly the fields listed in the fields field are updated; others are\nunchanged.\n\nIf writing a cell with a formula, the formula's ranges will automatically\nincrement for each field in the range.\nFor example, if writing a cell with formula `=A1` into range B2:C4,\nB2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`,\nC2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`.\n\nTo keep the formula's ranges static, use the `$` indicator.\nFor example, use the formula `=$A$1` to prevent both the row and the\ncolumn from incrementing.", + "type": "object" + }, "AddChartResponse": { "description": "The result of adding a chart to a spreadsheet.", "type": "object", "properties": { "chart": { - "description": "The newly added chart.", - "$ref": "EmbeddedChart" + "$ref": "EmbeddedChart", + "description": "The newly added chart." } }, "id": "AddChartResponse" @@ -635,8 +3398,8 @@ "type": "boolean" }, "range": { - "description": "The dimensions to insert. Both the start and end indexes must be bounded.", - "$ref": "DimensionRange" + "$ref": "DimensionRange", + "description": "The dimensions to insert. Both the start and end indexes must be bounded." } }, "id": "InsertDimensionRequest" @@ -645,68 +3408,21 @@ "description": "Updates properties of a spreadsheet.", "type": "object", "properties": { - "properties": { - "description": "The properties to update.", - "$ref": "SpreadsheetProperties" - }, "fields": { "format": "google-fieldmask", "description": "The fields that should be updated. At least one field must be specified.\nThe root 'properties' is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", "type": "string" + }, + "properties": { + "$ref": "SpreadsheetProperties", + "description": "The properties to update." } }, "id": "UpdateSpreadsheetPropertiesRequest" }, - "ProtectedRange": { - "description": "A protected range.", - "type": "object", - "properties": { - "requestingUserCanEdit": { - "description": "True if the user who requested this protected range can edit the\nprotected area.\nThis field is read-only.", - "type": "boolean" - }, - "editors": { - "$ref": "Editors", - "description": "The users and groups with edit access to the protected range.\nThis field is only visible to users with edit access to the protected\nrange and the document.\nEditors are not supported with warning_only protection." - }, - "range": { - "description": "The range that is being protected.\nThe range may be fully unbounded, in which case this is considered\na protected sheet.\n\nWhen writing, only one of range or named_range_id\nmay be set.", - "$ref": "GridRange" - }, - "description": { - "description": "The description of this protected range.", - "type": "string" - }, - "unprotectedRanges": { - "description": "The list of unprotected ranges within a protected sheet.\nUnprotected ranges are only supported on protected sheets.", - "items": { - "$ref": "GridRange" - }, - "type": "array" - }, - "namedRangeId": { - "description": "The named range this protected range is backed by, if any.\n\nWhen writing, only one of range or named_range_id\nmay be set.", - "type": "string" - }, - "protectedRangeId": { - "format": "int32", - "description": "The ID of the protected range.\nThis field is read-only.", - "type": "integer" - }, - "warningOnly": { - "description": "True if this protected range will show a warning when editing.\nWarning-based protection means that every user can edit data in the\nprotected range, except editing will prompt a warning asking the user\nto confirm the edit.\n\nWhen writing: if this field is true, then editors is ignored.\nAdditionally, if this field is changed from true to false and the\n`editors` field is not set (nor included in the field mask), then\nthe editors will be set to all the editors in the document.", - "type": "boolean" - } - }, - "id": "ProtectedRange" - }, "BatchUpdateValuesRequest": { - "description": "The request for updating more than one range of values in a spreadsheet.", - "type": "object", "properties": { "responseValueRenderOption": { - "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", - "type": "string", "enumDescriptions": [ "Values will be calculated & formatted in the reply according to the\ncell's formatting. Formatting is based on the spreadsheet's locale,\nnot the requesting user's locale.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen `A2` would return `\"$1.23\"`.", "Values will be calculated, but not formatted in the reply.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen `A2` would return the number `1.23`.", @@ -716,11 +3432,13 @@ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" - ] + ], + "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", + "type": "string" }, "includeValuesInResponse": { - "description": "Determines if the update response should include the values\nof the cells that were updated. By default, responses\ndo not include the updated values. The `updatedData` field within\neach of the BatchUpdateValuesResponse.responses will contain\nthe updated values. If the range to write was larger than than the range\nactually written, the response will include all values in the requested\nrange (excluding trailing empty rows and columns).", - "type": "boolean" + "type": "boolean", + "description": "Determines if the update response should include the values\nof the cells that were updated. By default, responses\ndo not include the updated values. The `updatedData` field within\neach of the BatchUpdateValuesResponse.responses will contain\nthe updated values. If the range to write was larger than than the range\nactually written, the response will include all values in the requested\nrange (excluding trailing empty rows and columns)." }, "data": { "description": "The new values to apply to the spreadsheet.", @@ -756,7 +3474,52 @@ ] } }, - "id": "BatchUpdateValuesRequest" + "id": "BatchUpdateValuesRequest", + "description": "The request for updating more than one range of values in a spreadsheet.", + "type": "object" + }, + "ProtectedRange": { + "description": "A protected range.", + "type": "object", + "properties": { + "unprotectedRanges": { + "description": "The list of unprotected ranges within a protected sheet.\nUnprotected ranges are only supported on protected sheets.", + "items": { + "$ref": "GridRange" + }, + "type": "array" + }, + "namedRangeId": { + "description": "The named range this protected range is backed by, if any.\n\nWhen writing, only one of range or named_range_id\nmay be set.", + "type": "string" + }, + "protectedRangeId": { + "type": "integer", + "format": "int32", + "description": "The ID of the protected range.\nThis field is read-only." + }, + "warningOnly": { + "description": "True if this protected range will show a warning when editing.\nWarning-based protection means that every user can edit data in the\nprotected range, except editing will prompt a warning asking the user\nto confirm the edit.\n\nWhen writing: if this field is true, then editors is ignored.\nAdditionally, if this field is changed from true to false and the\n`editors` field is not set (nor included in the field mask), then\nthe editors will be set to all the editors in the document.", + "type": "boolean" + }, + "requestingUserCanEdit": { + "description": "True if the user who requested this protected range can edit the\nprotected area.\nThis field is read-only.", + "type": "boolean" + }, + "editors": { + "description": "The users and groups with edit access to the protected range.\nThis field is only visible to users with edit access to the protected\nrange and the document.\nEditors are not supported with warning_only protection.", + "$ref": "Editors" + }, + "range": { + "$ref": "GridRange", + "description": "The range that is being protected.\nThe range may be fully unbounded, in which case this is considered\na protected sheet.\n\nWhen writing, only one of range or named_range_id\nmay be set." + }, + "description": { + "type": "string", + "description": "The description of this protected range." + } + }, + "id": "ProtectedRange" }, "DimensionProperties": { "description": "Properties about a dimension.", @@ -768,8 +3531,8 @@ "type": "integer" }, "hiddenByUser": { - "description": "True if this dimension is explicitly hidden.", - "type": "boolean" + "type": "boolean", + "description": "True if this dimension is explicitly hidden." }, "hiddenByFilter": { "description": "True if this dimension is being filtered.\nThis field is read-only.", @@ -778,42 +3541,6 @@ }, "id": "DimensionProperties" }, - "DimensionRange": { - "description": "A range along a single dimension on a sheet.\nAll indexes are zero-based.\nIndexes are half open: the start index is inclusive\nand the end index is exclusive.\nMissing indexes indicate the range is unbounded on that side.", - "type": "object", - "properties": { - "dimension": { - "enumDescriptions": [ - "The default value, do not use.", - "Operates on the rows of a sheet.", - "Operates on the columns of a sheet." - ], - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], - "description": "The dimension of the span.", - "type": "string" - }, - "endIndex": { - "format": "int32", - "description": "The end (exclusive) of the span, or not set if unbounded.", - "type": "integer" - }, - "startIndex": { - "format": "int32", - "description": "The start (inclusive) of the span, or not set if unbounded.", - "type": "integer" - }, - "sheetId": { - "format": "int32", - "description": "The sheet this span is on.", - "type": "integer" - } - }, - "id": "DimensionRange" - }, "NamedRange": { "description": "A named range.", "type": "object", @@ -823,34 +3550,57 @@ "type": "string" }, "range": { - "description": "The range this represents.", - "$ref": "GridRange" + "$ref": "GridRange", + "description": "The range this represents." }, "name": { - "description": "The name of the named range.", - "type": "string" + "type": "string", + "description": "The name of the named range." } }, "id": "NamedRange" }, + "DimensionRange": { + "type": "object", + "properties": { + "endIndex": { + "format": "int32", + "description": "The end (exclusive) of the span, or not set if unbounded.", + "type": "integer" + }, + "startIndex": { + "type": "integer", + "format": "int32", + "description": "The start (inclusive) of the span, or not set if unbounded." + }, + "sheetId": { + "format": "int32", + "description": "The sheet this span is on.", + "type": "integer" + }, + "dimension": { + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ], + "description": "The dimension of the span.", + "type": "string", + "enumDescriptions": [ + "The default value, do not use.", + "Operates on the rows of a sheet.", + "Operates on the columns of a sheet." + ] + } + }, + "id": "DimensionRange", + "description": "A range along a single dimension on a sheet.\nAll indexes are zero-based.\nIndexes are half open: the start index is inclusive\nand the end index is exclusive.\nMissing indexes indicate the range is unbounded on that side." + }, "CutPasteRequest": { "description": "Moves data from the source to the destination.", "type": "object", "properties": { - "destination": { - "$ref": "GridCoordinate", - "description": "The top-left coordinate where the data should be pasted." - }, "pasteType": { - "enumDescriptions": [ - "Paste values, formulas, formats, and merges.", - "Paste the values ONLY without formats, formulas, or merges.", - "Paste the format and data validation only.", - "Like PASTE_NORMAL but without borders.", - "Paste the formulas only.", - "Paste the data validation only.", - "Paste the conditional formatting rules only." - ], "enum": [ "PASTE_NORMAL", "PASTE_VALUES", @@ -861,11 +3611,24 @@ "PASTE_CONDITIONAL_FORMATTING" ], "description": "What kind of data to paste. All the source data will be cut, regardless\nof what is pasted.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Paste values, formulas, formats, and merges.", + "Paste the values ONLY without formats, formulas, or merges.", + "Paste the format and data validation only.", + "Like PASTE_NORMAL but without borders.", + "Paste the formulas only.", + "Paste the data validation only.", + "Paste the conditional formatting rules only." + ] }, "source": { "$ref": "GridRange", "description": "The source data to cut." + }, + "destination": { + "$ref": "GridCoordinate", + "description": "The top-left coordinate where the data should be pasted." } }, "id": "CutPasteRequest" @@ -874,14 +3637,6 @@ "description": "The borders of the cell.", "type": "object", "properties": { - "right": { - "$ref": "Border", - "description": "The right border of the cell." - }, - "bottom": { - "$ref": "Border", - "description": "The bottom border of the cell." - }, "top": { "$ref": "Border", "description": "The top border of the cell." @@ -889,6 +3644,14 @@ "left": { "description": "The left border of the cell.", "$ref": "Border" + }, + "right": { + "$ref": "Border", + "description": "The right border of the cell." + }, + "bottom": { + "description": "The bottom border of the cell.", + "$ref": "Border" } }, "id": "Borders" @@ -897,9 +3660,23 @@ "description": "A single series of data in a chart.\nFor example, if charting stock prices over time, multiple series may exist,\none for the \"Open Price\", \"High Price\", \"Low Price\" and \"Close Price\".", "type": "object", "properties": { - "type": { - "description": "The type of this series. Valid only if the\nchartType is\nCOMBO.\nDifferent types will change the way the series is visualized.\nOnly LINE, AREA,\nand COLUMN are supported.", + "targetAxis": { + "enum": [ + "BASIC_CHART_AXIS_POSITION_UNSPECIFIED", + "BOTTOM_AXIS", + "LEFT_AXIS", + "RIGHT_AXIS" + ], + "description": "The minor axis that will specify the range of values for this series.\nFor example, if charting stocks over time, the \"Volume\" series\nmay want to be pinned to the right with the prices pinned to the left,\nbecause the scale of trading volume is different than the scale of\nprices.\nIt is an error to specify an axis that isn't a valid minor axis\nfor the chart's type.", "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "The axis rendered at the bottom of a chart.\nFor most charts, this is the standard major axis.\nFor bar charts, this is a minor axis.", + "The axis rendered at the left of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is the standard major axis.", + "The axis rendered at the right of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is an unusual major axis." + ] + }, + "type": { "enumDescriptions": [ "Default value, do not use.", "A \u003ca href=\"/chart/interactive/docs/gallery/barchart\"\u003ebar chart\u003c/a\u003e.", @@ -919,65 +3696,42 @@ "SCATTER", "COMBO", "STEPPED_AREA" - ] + ], + "description": "The type of this series. Valid only if the\nchartType is\nCOMBO.\nDifferent types will change the way the series is visualized.\nOnly LINE, AREA,\nand COLUMN are supported.", + "type": "string" }, "series": { - "$ref": "ChartData", - "description": "The data being visualized in this chart series." - }, - "targetAxis": { - "enumDescriptions": [ - "Default value, do not use.", - "The axis rendered at the bottom of a chart.\nFor most charts, this is the standard major axis.\nFor bar charts, this is a minor axis.", - "The axis rendered at the left of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is the standard major axis.", - "The axis rendered at the right of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is an unusual major axis." - ], - "enum": [ - "BASIC_CHART_AXIS_POSITION_UNSPECIFIED", - "BOTTOM_AXIS", - "LEFT_AXIS", - "RIGHT_AXIS" - ], - "description": "The minor axis that will specify the range of values for this series.\nFor example, if charting stocks over time, the \"Volume\" series\nmay want to be pinned to the right with the prices pinned to the left,\nbecause the scale of trading volume is different than the scale of\nprices.\nIt is an error to specify an axis that isn't a valid minor axis\nfor the chart's type.", - "type": "string" + "description": "The data being visualized in this chart series.", + "$ref": "ChartData" } }, "id": "BasicChartSeries" }, "AutoResizeDimensionsRequest": { + "id": "AutoResizeDimensionsRequest", "description": "Automatically resizes one or more dimensions based on the contents\nof the cells in that dimension.", "type": "object", "properties": { "dimensions": { - "$ref": "DimensionRange", - "description": "The dimensions to automatically resize.\nOnly COLUMNS are supported." + "description": "The dimensions to automatically resize.", + "$ref": "DimensionRange" } - }, - "id": "AutoResizeDimensionsRequest" + } }, "UpdateBordersRequest": { - "description": "Updates the borders of a range.\nIf a field is not set in the request, that means the border remains as-is.\nFor example, with two subsequent UpdateBordersRequest:\n\n 1. range: A1:A5 `{ top: RED, bottom: WHITE }`\n 2. range: A1:A5 `{ left: BLUE }`\n\nThat would result in A1:A5 having a borders of\n`{ top: RED, bottom: WHITE, left: BLUE }`.\nIf you want to clear a border, explicitly set the style to\nNONE.", "type": "object", "properties": { - "top": { - "$ref": "Border", - "description": "The border to put at the top of the range." - }, - "left": { - "description": "The border to put at the left of the range.", - "$ref": "Border" - }, "bottom": { - "$ref": "Border", - "description": "The border to put at the bottom of the range." + "description": "The border to put at the bottom of the range.", + "$ref": "Border" }, "innerVertical": { "$ref": "Border", "description": "The vertical border to put within the range." }, "right": { - "$ref": "Border", - "description": "The border to put at the right of the range." + "description": "The border to put at the right of the range.", + "$ref": "Border" }, "range": { "description": "The range whose borders should be updated.", @@ -986,63 +3740,24 @@ "innerHorizontal": { "$ref": "Border", "description": "The horizontal border to put within the range." + }, + "top": { + "$ref": "Border", + "description": "The border to put at the top of the range." + }, + "left": { + "$ref": "Border", + "description": "The border to put at the left of the range." } }, - "id": "UpdateBordersRequest" + "id": "UpdateBordersRequest", + "description": "Updates the borders of a range.\nIf a field is not set in the request, that means the border remains as-is.\nFor example, with two subsequent UpdateBordersRequest:\n\n 1. range: A1:A5 `{ top: RED, bottom: WHITE }`\n 2. range: A1:A5 `{ left: BLUE }`\n\nThat would result in A1:A5 having a borders of\n`{ top: RED, bottom: WHITE, left: BLUE }`.\nIf you want to clear a border, explicitly set the style to\nNONE." }, "CellFormat": { "description": "The format of a cell.", "type": "object", "properties": { - "numberFormat": { - "$ref": "NumberFormat", - "description": "A format describing how number values should be represented to the user." - }, - "hyperlinkDisplayType": { - "description": "How a hyperlink, if it exists, should be displayed in the cell.", - "type": "string", - "enumDescriptions": [ - "The default value: the hyperlink is rendered. Do not use this.", - "A hyperlink should be explicitly rendered.", - "A hyperlink should not be rendered." - ], - "enum": [ - "HYPERLINK_DISPLAY_TYPE_UNSPECIFIED", - "LINKED", - "PLAIN_TEXT" - ] - }, - "horizontalAlignment": { - "description": "The horizontal alignment of the value in the cell.", - "type": "string", - "enumDescriptions": [ - "The horizontal alignment is not specified. Do not use this.", - "The text is explicitly aligned to the left of the cell.", - "The text is explicitly aligned to the center of the cell.", - "The text is explicitly aligned to the right of the cell." - ], - "enum": [ - "HORIZONTAL_ALIGN_UNSPECIFIED", - "LEFT", - "CENTER", - "RIGHT" - ] - }, - "textFormat": { - "$ref": "TextFormat", - "description": "The format of the text in the cell (unless overridden by a format run)." - }, - "backgroundColor": { - "description": "The background color of the cell.", - "$ref": "Color" - }, "verticalAlignment": { - "enumDescriptions": [ - "The vertical alignment is not specified. Do not use this.", - "The text is explicitly aligned to the top of the cell.", - "The text is explicitly aligned to the middle of the cell.", - "The text is explicitly aligned to the bottom of the cell." - ], "enum": [ "VERTICAL_ALIGN_UNSPECIFIED", "TOP", @@ -1050,37 +3765,41 @@ "BOTTOM" ], "description": "The vertical alignment of the value in the cell.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "The vertical alignment is not specified. Do not use this.", + "The text is explicitly aligned to the top of the cell.", + "The text is explicitly aligned to the middle of the cell.", + "The text is explicitly aligned to the bottom of the cell." + ] }, "padding": { "description": "The padding of the cell.", "$ref": "Padding" }, "textDirection": { - "enumDescriptions": [ - "The text direction is not specified. Do not use this.", - "The text direction of left-to-right was set by the user.", - "The text direction of right-to-left was set by the user." - ], "enum": [ "TEXT_DIRECTION_UNSPECIFIED", "LEFT_TO_RIGHT", "RIGHT_TO_LEFT" ], "description": "The direction of the text in the cell.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "The text direction is not specified. Do not use this.", + "The text direction of left-to-right was set by the user.", + "The text direction of right-to-left was set by the user." + ] }, "borders": { - "description": "The borders of the cell.", - "$ref": "Borders" + "$ref": "Borders", + "description": "The borders of the cell." }, "textRotation": { "$ref": "TextRotation", "description": "The rotation applied to text in a cell" }, "wrapStrategy": { - "description": "The wrap strategy for the value in the cell.", - "type": "string", "enumDescriptions": [ "The default value, do not use.", "Lines that are longer than the cell width will be written in the next\ncell over, so long as that cell is empty. If the next cell over is\nnon-empty, this behaves the same as CLIP. The text will never wrap\nto the next line unless the user manually inserts a new line.\nExample:\n\n | First sentence. |\n | Manual newline that is very long. \u003c- Text continues into next cell\n | Next newline. |", @@ -1094,7 +3813,51 @@ "LEGACY_WRAP", "CLIP", "WRAP" + ], + "description": "The wrap strategy for the value in the cell.", + "type": "string" + }, + "numberFormat": { + "$ref": "NumberFormat", + "description": "A format describing how number values should be represented to the user." + }, + "hyperlinkDisplayType": { + "enum": [ + "HYPERLINK_DISPLAY_TYPE_UNSPECIFIED", + "LINKED", + "PLAIN_TEXT" + ], + "description": "How a hyperlink, if it exists, should be displayed in the cell.", + "type": "string", + "enumDescriptions": [ + "The default value: the hyperlink is rendered. Do not use this.", + "A hyperlink should be explicitly rendered.", + "A hyperlink should not be rendered." ] + }, + "horizontalAlignment": { + "enumDescriptions": [ + "The horizontal alignment is not specified. Do not use this.", + "The text is explicitly aligned to the left of the cell.", + "The text is explicitly aligned to the center of the cell.", + "The text is explicitly aligned to the right of the cell." + ], + "enum": [ + "HORIZONTAL_ALIGN_UNSPECIFIED", + "LEFT", + "CENTER", + "RIGHT" + ], + "description": "The horizontal alignment of the value in the cell.", + "type": "string" + }, + "textFormat": { + "$ref": "TextFormat", + "description": "The format of the text in the cell (unless overridden by a format run)." + }, + "backgroundColor": { + "description": "The background color of the cell.", + "$ref": "Color" } }, "id": "CellFormat" @@ -1165,7 +3928,6 @@ "id": "ChartData" }, "BatchGetValuesResponse": { - "description": "The response when retrieving more than one range of values in a spreadsheet.", "type": "object", "properties": { "valueRanges": { @@ -1180,23 +3942,24 @@ "type": "string" } }, - "id": "BatchGetValuesResponse" + "id": "BatchGetValuesResponse", + "description": "The response when retrieving more than one range of values in a spreadsheet." }, "UpdateBandingRequest": { - "description": "Updates properties of the supplied banded range.", - "type": "object", "properties": { + "bandedRange": { + "$ref": "BandedRange", + "description": "The banded range to update with the new properties." + }, "fields": { "format": "google-fieldmask", "description": "The fields that should be updated. At least one field must be specified.\nThe root `bandedRange` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", "type": "string" - }, - "bandedRange": { - "description": "The banded range to update with the new properties.", - "$ref": "BandedRange" } }, - "id": "UpdateBandingRequest" + "id": "UpdateBandingRequest", + "description": "Updates properties of the supplied banded range.", + "type": "object" }, "Color": { "description": "Represents a color in the RGBA color space. This representation is designed\nfor simplicity of conversion to/from color representations in various\nlanguages over compactness; for example, the fields of this representation\ncan be trivially provided to the constructor of \"java.awt.Color\" in Java; it\ncan also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\"\nmethod in iOS; and, with just a little work, it can be easily formatted into\na CSS \"rgba()\" string in JavaScript, as well. Here are some examples:\n\nExample (Java):\n\n import com.google.type.Color;\n\n // ...\n public static java.awt.Color fromProto(Color protocolor) {\n float alpha = protocolor.hasAlpha()\n ? protocolor.getAlpha().getValue()\n : 1.0;\n\n return new java.awt.Color(\n protocolor.getRed(),\n protocolor.getGreen(),\n protocolor.getBlue(),\n alpha);\n }\n\n public static Color toProto(java.awt.Color color) {\n float red = (float) color.getRed();\n float green = (float) color.getGreen();\n float blue = (float) color.getBlue();\n float denominator = 255.0;\n Color.Builder resultBuilder =\n Color\n .newBuilder()\n .setRed(red / denominator)\n .setGreen(green / denominator)\n .setBlue(blue / denominator);\n int alpha = color.getAlpha();\n if (alpha != 255) {\n result.setAlpha(\n FloatValue\n .newBuilder()\n .setValue(((float) alpha) / denominator)\n .build());\n }\n return resultBuilder.build();\n }\n // ...\n\nExample (iOS / Obj-C):\n\n // ...\n static UIColor* fromProto(Color* protocolor) {\n float red = [protocolor red];\n float green = [protocolor green];\n float blue = [protocolor blue];\n FloatValue* alpha_wrapper = [protocolor alpha];\n float alpha = 1.0;\n if (alpha_wrapper != nil) {\n alpha = [alpha_wrapper value];\n }\n return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];\n }\n\n static Color* toProto(UIColor* color) {\n CGFloat red, green, blue, alpha;\n if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {\n return nil;\n }\n Color* result = [Color alloc] init];\n [result setRed:red];\n [result setGreen:green];\n [result setBlue:blue];\n if (alpha \u003c= 0.9999) {\n [result setAlpha:floatWrapperWithValue(alpha)];\n }\n [result autorelease];\n return result;\n }\n // ...\n\n Example (JavaScript):\n\n // ...\n\n var protoToCssColor = function(rgb_color) {\n var redFrac = rgb_color.red || 0.0;\n var greenFrac = rgb_color.green || 0.0;\n var blueFrac = rgb_color.blue || 0.0;\n var red = Math.floor(redFrac * 255);\n var green = Math.floor(greenFrac * 255);\n var blue = Math.floor(blueFrac * 255);\n\n if (!('alpha' in rgb_color)) {\n return rgbToCssColor_(red, green, blue);\n }\n\n var alphaFrac = rgb_color.alpha.value || 0.0;\n var rgbParams = [red, green, blue].join(',');\n return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');\n };\n\n var rgbToCssColor_ = function(red, green, blue) {\n var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue);\n var hexString = rgbNumber.toString(16);\n var missingZeros = 6 - hexString.length;\n var resultBuilder = ['#'];\n for (var i = 0; i \u003c missingZeros; i++) {\n resultBuilder.push('0');\n }\n resultBuilder.push(hexString);\n return resultBuilder.join('');\n };\n\n // ...", @@ -1229,6 +3992,20 @@ "description": "A single grouping (either row or column) in a pivot table.", "type": "object", "properties": { + "sortOrder": { + "description": "The order the values in this group should be sorted.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use this.", + "Sort ascending.", + "Sort descending." + ], + "enum": [ + "SORT_ORDER_UNSPECIFIED", + "ASCENDING", + "DESCENDING" + ] + }, "valueBucket": { "$ref": "PivotGroupSortValueBucket", "description": "The bucket of the opposite pivot group to sort by.\nIf not specified, sorting is alphabetical by this group's values." @@ -1248,20 +4025,6 @@ "format": "int32", "description": "The column offset of the source range that this grouping is based on.\n\nFor example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`\nmeans this group refers to column `C`, whereas the offset `1` would refer\nto column `D`.", "type": "integer" - }, - "sortOrder": { - "enumDescriptions": [ - "Default value, do not use this.", - "Sort ascending.", - "Sort descending." - ], - "enum": [ - "SORT_ORDER_UNSPECIFIED", - "ASCENDING", - "DESCENDING" - ], - "description": "The order the values in this group should be sorted.", - "type": "string" } }, "id": "PivotGroup" @@ -1270,36 +4033,6 @@ "description": "A pivot table.", "type": "object", "properties": { - "valueLayout": { - "enumDescriptions": [ - "Values are laid out horizontally (as columns).", - "Values are laid out vertically (as rows)." - ], - "enum": [ - "HORIZONTAL", - "VERTICAL" - ], - "description": "Whether values should be listed horizontally (as columns)\nor vertically (as rows).", - "type": "string" - }, - "columns": { - "description": "Each column grouping in the pivot table.", - "items": { - "$ref": "PivotGroup" - }, - "type": "array" - }, - "values": { - "description": "A list of values to include in the pivot table.", - "items": { - "$ref": "PivotValue" - }, - "type": "array" - }, - "source": { - "description": "The range the pivot table is reading data from.", - "$ref": "GridRange" - }, "criteria": { "additionalProperties": { "$ref": "PivotFilterCriteria" @@ -1313,6 +4046,36 @@ "$ref": "PivotGroup" }, "type": "array" + }, + "valueLayout": { + "description": "Whether values should be listed horizontally (as columns)\nor vertically (as rows).", + "type": "string", + "enumDescriptions": [ + "Values are laid out horizontally (as columns).", + "Values are laid out vertically (as rows)." + ], + "enum": [ + "HORIZONTAL", + "VERTICAL" + ] + }, + "values": { + "description": "A list of values to include in the pivot table.", + "items": { + "$ref": "PivotValue" + }, + "type": "array" + }, + "source": { + "$ref": "GridRange", + "description": "The range the pivot table is reading data from." + }, + "columns": { + "description": "Each column grouping in the pivot table.", + "items": { + "$ref": "PivotGroup" + }, + "type": "array" } }, "id": "PivotTable" @@ -1335,10 +4098,15 @@ "description": "Adds new cells after the last row with data in a sheet,\ninserting new rows into the sheet if necessary.", "type": "object", "properties": { + "sheetId": { + "format": "int32", + "description": "The sheet ID to append the data to.", + "type": "integer" + }, "fields": { + "type": "string", "format": "google-fieldmask", - "description": "The fields of CellData that should be updated.\nAt least one field must be specified.\nThe root is the CellData; 'row.values.' should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string" + "description": "The fields of CellData that should be updated.\nAt least one field must be specified.\nThe root is the CellData; 'row.values.' should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field." }, "rows": { "description": "The data to append.", @@ -1346,18 +4114,11 @@ "$ref": "RowData" }, "type": "array" - }, - "sheetId": { - "format": "int32", - "description": "The sheet ID to append the data to.", - "type": "integer" } }, "id": "AppendCellsRequest" }, "ValueRange": { - "description": "Data within a range of the spreadsheet.", - "type": "object", "properties": { "range": { "description": "The range the values cover, in A1 notation.\nFor output, this range indicates the entire requested range,\neven though the values will exclude trailing rows and columns.\nWhen appending values, this field represents the range to search for a\ntable, after which values will be appended.", @@ -1374,21 +4135,23 @@ "type": "array" }, "majorDimension": { - "enumDescriptions": [ - "The default value, do not use.", - "Operates on the rows of a sheet.", - "Operates on the columns of a sheet." - ], "enum": [ "DIMENSION_UNSPECIFIED", "ROWS", "COLUMNS" ], "description": "The major dimension of the values.\n\nFor output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.\n\nFor input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`\nwill set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`\nthen `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.\n\nWhen writing, if this field is not set, it defaults to ROWS.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "The default value, do not use.", + "Operates on the rows of a sheet.", + "Operates on the columns of a sheet." + ] } }, - "id": "ValueRange" + "id": "ValueRange", + "description": "Data within a range of the spreadsheet.", + "type": "object" }, "AddBandingRequest": { "description": "Adds a new banded range to the spreadsheet.", @@ -1405,93 +4168,57 @@ "description": "A single response from an update.", "type": "object", "properties": { - "addFilterView": { - "description": "A reply from adding a filter view.", - "$ref": "AddFilterViewResponse" - }, - "addBanding": { - "$ref": "AddBandingResponse", - "description": "A reply from adding a banded range." - }, "addProtectedRange": { - "$ref": "AddProtectedRangeResponse", - "description": "A reply from adding a protected range." + "description": "A reply from adding a protected range.", + "$ref": "AddProtectedRangeResponse" }, "duplicateSheet": { - "description": "A reply from duplicating a sheet.", - "$ref": "DuplicateSheetResponse" - }, - "deleteConditionalFormatRule": { - "description": "A reply from deleting a conditional format rule.", - "$ref": "DeleteConditionalFormatRuleResponse" + "$ref": "DuplicateSheetResponse", + "description": "A reply from duplicating a sheet." }, "updateEmbeddedObjectPosition": { "description": "A reply from updating an embedded object's position.", "$ref": "UpdateEmbeddedObjectPositionResponse" }, + "deleteConditionalFormatRule": { + "$ref": "DeleteConditionalFormatRuleResponse", + "description": "A reply from deleting a conditional format rule." + }, "duplicateFilterView": { - "description": "A reply from duplicating a filter view.", - "$ref": "DuplicateFilterViewResponse" + "$ref": "DuplicateFilterViewResponse", + "description": "A reply from duplicating a filter view." }, "addChart": { "$ref": "AddChartResponse", "description": "A reply from adding a chart." }, "findReplace": { - "description": "A reply from doing a find/replace.", - "$ref": "FindReplaceResponse" + "$ref": "FindReplaceResponse", + "description": "A reply from doing a find/replace." }, "addSheet": { - "description": "A reply from adding a sheet.", - "$ref": "AddSheetResponse" + "$ref": "AddSheetResponse", + "description": "A reply from adding a sheet." }, "updateConditionalFormatRule": { "$ref": "UpdateConditionalFormatRuleResponse", "description": "A reply from updating a conditional format rule." }, "addNamedRange": { - "description": "A reply from adding a named range.", - "$ref": "AddNamedRangeResponse" + "$ref": "AddNamedRangeResponse", + "description": "A reply from adding a named range." + }, + "addFilterView": { + "$ref": "AddFilterViewResponse", + "description": "A reply from adding a filter view." + }, + "addBanding": { + "description": "A reply from adding a banded range.", + "$ref": "AddBandingResponse" } }, "id": "Response" }, - "EmbeddedChart": { - "description": "A chart embedded in a sheet.", - "type": "object", - "properties": { - "chartId": { - "format": "int32", - "description": "The ID of the chart.", - "type": "integer" - }, - "position": { - "description": "The position of the chart.", - "$ref": "EmbeddedObjectPosition" - }, - "spec": { - "description": "The specification of the chart.", - "$ref": "ChartSpec" - } - }, - "id": "EmbeddedChart" - }, - "TextFormatRun": { - "description": "A run of a text format. The format of this run continues until the start\nindex of the next run.\nWhen updating, all fields must be set.", - "type": "object", - "properties": { - "format": { - "$ref": "TextFormat", - "description": "The format of this run. Absent values inherit the cell's format." - }, - "startIndex": { - "format": "int32", - "description": "The character index where this run starts.", - "type": "integer" - } - }, - "id": "TextFormatRun" - }, "InsertRangeRequest": { "description": "Inserts cells into a range, shifting the existing cells over or down.", "type": "object", @@ -1511,22 +4238,58 @@ ] }, "range": { - "$ref": "GridRange", - "description": "The range to insert new cells into." + "description": "The range to insert new cells into.", + "$ref": "GridRange" } }, "id": "InsertRangeRequest" }, - "AddNamedRangeResponse": { - "description": "The result of adding a named range.", + "TextFormatRun": { + "id": "TextFormatRun", + "description": "A run of a text format. The format of this run continues until the start\nindex of the next run.\nWhen updating, all fields must be set.", "type": "object", "properties": { - "namedRange": { - "description": "The named range to add.", - "$ref": "NamedRange" + "startIndex": { + "format": "int32", + "description": "The character index where this run starts.", + "type": "integer" + }, + "format": { + "$ref": "TextFormat", + "description": "The format of this run. Absent values inherit the cell's format." + } + } + }, + "EmbeddedChart": { + "type": "object", + "properties": { + "chartId": { + "format": "int32", + "description": "The ID of the chart.", + "type": "integer" + }, + "position": { + "$ref": "EmbeddedObjectPosition", + "description": "The position of the chart." + }, + "spec": { + "$ref": "ChartSpec", + "description": "The specification of the chart." } }, - "id": "AddNamedRangeResponse" + "id": "EmbeddedChart", + "description": "A chart embedded in a sheet." + }, + "AddNamedRangeResponse": { + "properties": { + "namedRange": { + "$ref": "NamedRange", + "description": "The named range to add." + } + }, + "id": "AddNamedRangeResponse", + "description": "The result of adding a named range.", + "type": "object" }, "RowData": { "description": "Data about each cell in a row.", @@ -1546,17 +4309,12 @@ "description": "Data in the grid, as well as metadata about the dimensions.", "type": "object", "properties": { - "startRow": { - "format": "int32", - "description": "The first row this GridData refers to, zero-based.", - "type": "integer" - }, "columnMetadata": { - "description": "Metadata about the requested columns in the grid, starting with the column\nin start_column.", "items": { "$ref": "DimensionProperties" }, - "type": "array" + "type": "array", + "description": "Metadata about the requested columns in the grid, starting with the column\nin start_column." }, "startColumn": { "format": "int32", @@ -1576,20 +4334,31 @@ "$ref": "RowData" }, "type": "array" + }, + "startRow": { + "format": "int32", + "description": "The first row this GridData refers to, zero-based.", + "type": "integer" } }, "id": "GridData" }, "Border": { + "id": "Border", "description": "A border along a cell.", "type": "object", "properties": { + "color": { + "$ref": "Color", + "description": "The color of the border." + }, "width": { "format": "int32", "description": "The width of the border, in pixels.\nDeprecated; the width is determined by the \"style\" field.", "type": "integer" }, "style": { + "type": "string", "enumDescriptions": [ "The style is not specified. Do not use this.", "The border is dotted.", @@ -1610,20 +4379,18 @@ "NONE", "DOUBLE" ], - "description": "The style of the border.", - "type": "string" - }, - "color": { - "description": "The color of the border.", - "$ref": "Color" + "description": "The style of the border." } - }, - "id": "Border" + } }, "FindReplaceRequest": { "description": "Finds and replaces data in cells over a range, sheet, or all sheets.", "type": "object", "properties": { + "replacement": { + "description": "The value to use as the replacement.", + "type": "string" + }, "range": { "description": "The range to find/replace over.", "$ref": "GridRange" @@ -1633,14 +4400,14 @@ "description": "The sheet to find/replace over.", "type": "integer" }, - "matchCase": { - "description": "True if the search is case sensitive.", - "type": "boolean" - }, "allSheets": { "description": "True to find/replace over all sheets.", "type": "boolean" }, + "matchCase": { + "description": "True if the search is case sensitive.", + "type": "boolean" + }, "includeFormulas": { "description": "True if the search should include cells with formulas.\nFalse to skip cells with formulas.", "type": "boolean" @@ -1649,17 +4416,13 @@ "description": "True if the find value should match the entire cell.", "type": "boolean" }, - "searchByRegex": { - "description": "True if the find value is a regex.\nThe regular expression and replacement should follow Java regex rules\nat https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.\nThe replacement string is allowed to refer to capturing groups.\nFor example, if one cell has the contents `\"Google Sheets\"` and another\nhas `\"Google Docs\"`, then searching for `\"o.* (.*)\"` with a replacement of\n`\"$1 Rocks\"` would change the contents of the cells to\n`\"GSheets Rocks\"` and `\"GDocs Rocks\"` respectively.", - "type": "boolean" - }, "find": { "description": "The value to search.", "type": "string" }, - "replacement": { - "description": "The value to use as the replacement.", - "type": "string" + "searchByRegex": { + "description": "True if the find value is a regex.\nThe regular expression and replacement should follow Java regex rules\nat https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.\nThe replacement string is allowed to refer to capturing groups.\nFor example, if one cell has the contents `\"Google Sheets\"` and another\nhas `\"Google Docs\"`, then searching for `\"o.* (.*)\"` with a replacement of\n`\"$1 Rocks\"` would change the contents of the cells to\n`\"GSheets Rocks\"` and `\"GDocs Rocks\"` respectively.", + "type": "boolean" } }, "id": "FindReplaceRequest" @@ -1669,8 +4432,8 @@ "type": "object", "properties": { "namedRange": { - "description": "The named range to update with the new properties.", - "$ref": "NamedRange" + "$ref": "NamedRange", + "description": "The named range to update with the new properties." }, "fields": { "format": "google-fieldmask", @@ -1681,6 +4444,7 @@ "id": "UpdateNamedRangeRequest" }, "AddSheetRequest": { + "id": "AddSheetRequest", "description": "Adds a new sheet.\nWhen a sheet is added at a given index,\nall subsequent sheets' indexes are incremented.\nTo add an object sheet, use AddChartRequest instead and specify\nEmbeddedObjectPosition.sheetId or\nEmbeddedObjectPosition.newSheet.", "type": "object", "properties": { @@ -1688,8 +4452,7 @@ "$ref": "SheetProperties", "description": "The properties the new sheet should have.\nAll properties are optional.\nThe sheetId field is optional; if one is not\nset, an id will be randomly generated. (It is an error to specify the ID\nof a sheet that already exists.)" } - }, - "id": "AddSheetRequest" + } }, "UpdateCellsRequest": { "description": "Updates all cells in a range with new data.", @@ -1712,12 +4475,23 @@ "type": "array" }, "start": { - "$ref": "GridCoordinate", - "description": "The coordinate to start writing data at.\nAny number of rows and columns (including a different number of\ncolumns per row) may be written." + "description": "The coordinate to start writing data at.\nAny number of rows and columns (including a different number of\ncolumns per row) may be written.", + "$ref": "GridCoordinate" } }, "id": "UpdateCellsRequest" }, + "DeleteConditionalFormatRuleResponse": { + "id": "DeleteConditionalFormatRuleResponse", + "description": "The result of deleting a conditional format rule.", + "type": "object", + "properties": { + "rule": { + "$ref": "ConditionalFormatRule", + "description": "The rule that was deleted." + } + } + }, "RandomizeRangeRequest": { "description": "Randomizes the order of the rows in a range.", "type": "object", @@ -1729,33 +4503,22 @@ }, "id": "RandomizeRangeRequest" }, - "DeleteConditionalFormatRuleResponse": { - "description": "The result of deleting a conditional format rule.", - "type": "object", - "properties": { - "rule": { - "description": "The rule that was deleted.", - "$ref": "ConditionalFormatRule" - } - }, - "id": "DeleteConditionalFormatRuleResponse" - }, "DeleteRangeRequest": { "description": "Deletes a range of cells, shifting other cells into the deleted area.", "type": "object", "properties": { "shiftDimension": { + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ], "description": "The dimension from which deleted cells will be replaced with.\nIf ROWS, existing cells will be shifted upward to\nreplace the deleted cells. If COLUMNS, existing cells\nwill be shifted left to replace the deleted cells.", "type": "string", "enumDescriptions": [ "The default value, do not use.", "Operates on the rows of a sheet.", "Operates on the columns of a sheet." - ], - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" ] }, "range": { @@ -1764,2784 +4527,17 @@ } }, "id": "DeleteRangeRequest" - }, - "GridCoordinate": { - "description": "A coordinate in a sheet.\nAll indexes are zero-based.", - "type": "object", - "properties": { - "columnIndex": { - "format": "int32", - "description": "The column index of the coordinate.", - "type": "integer" - }, - "rowIndex": { - "format": "int32", - "description": "The row index of the coordinate.", - "type": "integer" - }, - "sheetId": { - "format": "int32", - "description": "The sheet this coordinate is on.", - "type": "integer" - } - }, - "id": "GridCoordinate" - }, - "UpdateSheetPropertiesRequest": { - "description": "Updates properties of the sheet with the specified\nsheetId.", - "type": "object", - "properties": { - "properties": { - "$ref": "SheetProperties", - "description": "The properties to update." - }, - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated. At least one field must be specified.\nThe root `properties` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string" - } - }, - "id": "UpdateSheetPropertiesRequest" - }, - "UnmergeCellsRequest": { - "description": "Unmerges cells in the given range.", - "type": "object", - "properties": { - "range": { - "description": "The range within which all cells should be unmerged.\nIf the range spans multiple merges, all will be unmerged.\nThe range must not partially span any merge.", - "$ref": "GridRange" - } - }, - "id": "UnmergeCellsRequest" - }, - "GridProperties": { - "description": "Properties of a grid.", - "type": "object", - "properties": { - "hideGridlines": { - "description": "True if the grid isn't showing gridlines in the UI.", - "type": "boolean" - }, - "frozenRowCount": { - "format": "int32", - "description": "The number of rows that are frozen in the grid.", - "type": "integer" - }, - "frozenColumnCount": { - "format": "int32", - "description": "The number of columns that are frozen in the grid.", - "type": "integer" - }, - "columnCount": { - "format": "int32", - "description": "The number of columns in the grid.", - "type": "integer" - }, - "rowCount": { - "format": "int32", - "description": "The number of rows in the grid.", - "type": "integer" - } - }, - "id": "GridProperties" - }, - "Sheet": { - "description": "A sheet in a spreadsheet.", - "type": "object", - "properties": { - "basicFilter": { - "description": "The filter on this sheet, if any.", - "$ref": "BasicFilter" - }, - "merges": { - "description": "The ranges that are merged together.", - "items": { - "$ref": "GridRange" - }, - "type": "array" - }, - "data": { - "description": "Data in the grid, if this is a grid sheet.\nThe number of GridData objects returned is dependent on the number of\nranges requested on this sheet. For example, if this is representing\n`Sheet1`, and the spreadsheet was requested with ranges\n`Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a\nstartRow/startColumn of `0`,\nwhile the second one will have `startRow 14` (zero-based row 15),\nand `startColumn 3` (zero-based column D).", - "items": { - "$ref": "GridData" - }, - "type": "array" - }, - "bandedRanges": { - "description": "The banded (i.e. alternating colors) ranges on this sheet.", - "items": { - "$ref": "BandedRange" - }, - "type": "array" - }, - "charts": { - "description": "The specifications of every chart on this sheet.", - "items": { - "$ref": "EmbeddedChart" - }, - "type": "array" - }, - "properties": { - "description": "The properties of the sheet.", - "$ref": "SheetProperties" - }, - "filterViews": { - "description": "The filter views in this sheet.", - "items": { - "$ref": "FilterView" - }, - "type": "array" - }, - "conditionalFormats": { - "description": "The conditional format rules in this sheet.", - "items": { - "$ref": "ConditionalFormatRule" - }, - "type": "array" - }, - "protectedRanges": { - "description": "The protected ranges in this sheet.", - "items": { - "$ref": "ProtectedRange" - }, - "type": "array" - } - }, - "id": "Sheet" - }, - "SortSpec": { - "description": "A sort order associated with a specific column or row.", - "type": "object", - "properties": { - "dimensionIndex": { - "format": "int32", - "description": "The dimension the sort should be applied to.", - "type": "integer" - }, - "sortOrder": { - "description": "The order data should be sorted.", - "type": "string", - "enumDescriptions": [ - "Default value, do not use this.", - "Sort ascending.", - "Sort descending." - ], - "enum": [ - "SORT_ORDER_UNSPECIFIED", - "ASCENDING", - "DESCENDING" - ] - } - }, - "id": "SortSpec" - }, - "UpdateEmbeddedObjectPositionResponse": { - "description": "The result of updating an embedded object's position.", - "type": "object", - "properties": { - "position": { - "description": "The new position of the embedded object.", - "$ref": "EmbeddedObjectPosition" - } - }, - "id": "UpdateEmbeddedObjectPositionResponse" - }, - "BooleanRule": { - "description": "A rule that may or may not match, depending on the condition.", - "type": "object", - "properties": { - "format": { - "description": "The format to apply.\nConditional formatting can only apply a subset of formatting:\nbold, italic,\nstrikethrough,\nforeground color &\nbackground color.", - "$ref": "CellFormat" - }, - "condition": { - "description": "The condition of the rule. If the condition evaluates to true,\nthe format will be applied.", - "$ref": "BooleanCondition" - } - }, - "id": "BooleanRule" - }, - "PivotGroupValueMetadata": { - "description": "Metadata about a value in a pivot grouping.", - "type": "object", - "properties": { - "value": { - "$ref": "ExtendedValue", - "description": "The calculated value the metadata corresponds to.\n(Note that formulaValue is not valid,\n because the values will be calculated.)" - }, - "collapsed": { - "description": "True if the data corresponding to the value is collapsed.", - "type": "boolean" - } - }, - "id": "PivotGroupValueMetadata" - }, - "FilterCriteria": { - "description": "Criteria for showing/hiding rows in a filter or filter view.", - "type": "object", - "properties": { - "condition": { - "$ref": "BooleanCondition", - "description": "A condition that must be true for values to be shown.\n(This does not override hiddenValues -- if a value is listed there,\n it will still be hidden.)" - }, - "hiddenValues": { - "description": "Values that should be hidden.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "FilterCriteria" - }, - "Editors": { - "description": "The editors of a protected range.", - "type": "object", - "properties": { - "users": { - "description": "The email addresses of users with edit access to the protected range.", - "items": { - "type": "string" - }, - "type": "array" - }, - "domainUsersCanEdit": { - "description": "True if anyone in the document's domain has edit access to the protected\nrange. Domain protection is only supported on documents within a domain.", - "type": "boolean" - }, - "groups": { - "description": "The email addresses of groups with edit access to the protected range.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "Editors" - }, - "UpdateConditionalFormatRuleRequest": { - "description": "Updates a conditional format rule at the given index,\nor moves a conditional format rule to another index.", - "type": "object", - "properties": { - "rule": { - "$ref": "ConditionalFormatRule", - "description": "The rule that should replace the rule at the given index." - }, - "index": { - "format": "int32", - "description": "The zero-based index of the rule that should be replaced or moved.", - "type": "integer" - }, - "sheetId": { - "format": "int32", - "description": "The sheet of the rule to move. Required if new_index is set,\nunused otherwise.", - "type": "integer" - }, - "newIndex": { - "format": "int32", - "description": "The zero-based new index the rule should end up at.", - "type": "integer" - } - }, - "id": "UpdateConditionalFormatRuleRequest" - }, - "DataValidationRule": { - "description": "A data validation rule.", - "type": "object", - "properties": { - "showCustomUi": { - "description": "True if the UI should be customized based on the kind of condition.\nIf true, \"List\" conditions will show a dropdown.", - "type": "boolean" - }, - "strict": { - "description": "True if invalid data should be rejected.", - "type": "boolean" - }, - "inputMessage": { - "description": "A message to show the user when adding data to the cell.", - "type": "string" - }, - "condition": { - "$ref": "BooleanCondition", - "description": "The condition that data in the cell must match." - } - }, - "id": "DataValidationRule" - }, - "BasicChartDomain": { - "description": "The domain of a chart.\nFor example, if charting stock prices over time, this would be the date.", - "type": "object", - "properties": { - "reversed": { - "description": "True to reverse the order of the domain values (horizontal axis).", - "type": "boolean" - }, - "domain": { - "$ref": "ChartData", - "description": "The data of the domain. For example, if charting stock prices over time,\nthis is the data representing the dates." - } - }, - "id": "BasicChartDomain" - }, - "PasteDataRequest": { - "description": "Inserts data into the spreadsheet starting at the specified coordinate.", - "type": "object", - "properties": { - "type": { - "enumDescriptions": [ - "Paste values, formulas, formats, and merges.", - "Paste the values ONLY without formats, formulas, or merges.", - "Paste the format and data validation only.", - "Like PASTE_NORMAL but without borders.", - "Paste the formulas only.", - "Paste the data validation only.", - "Paste the conditional formatting rules only." - ], - "enum": [ - "PASTE_NORMAL", - "PASTE_VALUES", - "PASTE_FORMAT", - "PASTE_NO_BORDERS", - "PASTE_FORMULA", - "PASTE_DATA_VALIDATION", - "PASTE_CONDITIONAL_FORMATTING" - ], - "description": "How the data should be pasted.", - "type": "string" - }, - "html": { - "description": "True if the data is HTML.", - "type": "boolean" - }, - "coordinate": { - "description": "The coordinate at which the data should start being inserted.", - "$ref": "GridCoordinate" - }, - "delimiter": { - "description": "The delimiter in the data.", - "type": "string" - }, - "data": { - "description": "The data to insert.", - "type": "string" - } - }, - "id": "PasteDataRequest" - }, - "AppendDimensionRequest": { - "description": "Appends rows or columns to the end of a sheet.", - "type": "object", - "properties": { - "length": { - "format": "int32", - "description": "The number of rows or columns to append.", - "type": "integer" - }, - "sheetId": { - "format": "int32", - "description": "The sheet to append rows or columns to.", - "type": "integer" - }, - "dimension": { - "enumDescriptions": [ - "The default value, do not use.", - "Operates on the rows of a sheet.", - "Operates on the columns of a sheet." - ], - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], - "description": "Whether rows or columns should be appended.", - "type": "string" - } - }, - "id": "AppendDimensionRequest" - }, - "AddNamedRangeRequest": { - "description": "Adds a named range to the spreadsheet.", - "type": "object", - "properties": { - "namedRange": { - "description": "The named range to add. The namedRangeId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a range that already exists.)", - "$ref": "NamedRange" - } - }, - "id": "AddNamedRangeRequest" - }, - "UpdateEmbeddedObjectPositionRequest": { - "description": "Update an embedded object's position (such as a moving or resizing a\nchart or image).", - "type": "object", - "properties": { - "objectId": { - "format": "int32", - "description": "The ID of the object to moved.", - "type": "integer" - }, - "newPosition": { - "description": "An explicit position to move the embedded object to.\nIf newPosition.sheetId is set,\na new sheet with that ID will be created.\nIf newPosition.newSheet is set to true,\na new sheet will be created with an ID that will be chosen for you.", - "$ref": "EmbeddedObjectPosition" - }, - "fields": { - "format": "google-fieldmask", - "description": "The fields of OverlayPosition\nthat should be updated when setting a new position. Used only if\nnewPosition.overlayPosition\nis set, in which case at least one field must\nbe specified. The root `newPosition.overlayPosition` is implied and\nshould not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string" - } - }, - "id": "UpdateEmbeddedObjectPositionRequest" - }, - "TextRotation": { - "description": "The rotation applied to text in a cell.", - "type": "object", - "properties": { - "angle": { - "format": "int32", - "description": "The angle between the standard orientation and the desired orientation.\nMeasured in degrees. Valid values are between -90 and 90. Positive\nangles are angled upwards, negative are angled downwards.\n\nNote: For LTR text direction positive angles are in the counterclockwise\ndirection, whereas for RTL they are in the clockwise direction", - "type": "integer" - }, - "vertical": { - "description": "If true, text reads top to bottom, but the orientation of individual\ncharacters is unchanged.\nFor example:\n\n | V |\n | e |\n | r |\n | t |\n | i |\n | c |\n | a |\n | l |", - "type": "boolean" - } - }, - "id": "TextRotation" - }, - "PieChartSpec": { - "description": "A \u003ca href=\"/chart/interactive/docs/gallery/piechart\"\u003epie chart\u003c/a\u003e.", - "type": "object", - "properties": { - "threeDimensional": { - "description": "True if the pie is three dimensional.", - "type": "boolean" - }, - "domain": { - "$ref": "ChartData", - "description": "The data that covers the domain of the pie chart." - }, - "series": { - "$ref": "ChartData", - "description": "The data that covers the one and only series of the pie chart." - }, - "pieHole": { - "format": "double", - "description": "The size of the hole in the pie chart.", - "type": "number" - }, - "legendPosition": { - "description": "Where the legend of the pie chart should be drawn.", - "type": "string", - "enumDescriptions": [ - "Default value, do not use.", - "The legend is rendered on the bottom of the chart.", - "The legend is rendered on the left of the chart.", - "The legend is rendered on the right of the chart.", - "The legend is rendered on the top of the chart.", - "No legend is rendered.", - "Each pie slice has a label attached to it." - ], - "enum": [ - "PIE_CHART_LEGEND_POSITION_UNSPECIFIED", - "BOTTOM_LEGEND", - "LEFT_LEGEND", - "RIGHT_LEGEND", - "TOP_LEGEND", - "NO_LEGEND", - "LABELED_LEGEND" - ] - } - }, - "id": "PieChartSpec" - }, - "UpdateFilterViewRequest": { - "description": "Updates properties of the filter view.", - "type": "object", - "properties": { - "filter": { - "description": "The new properties of the filter view.", - "$ref": "FilterView" - }, - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated. At least one field must be specified.\nThe root `filter` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string" - } - }, - "id": "UpdateFilterViewRequest" - }, - "ConditionalFormatRule": { - "description": "A rule describing a conditional format.", - "type": "object", - "properties": { - "booleanRule": { - "$ref": "BooleanRule", - "description": "The formatting is either \"on\" or \"off\" according to the rule." - }, - "ranges": { - "description": "The ranges that will be formatted if the condition is true.\nAll the ranges must be on the same grid.", - "items": { - "$ref": "GridRange" - }, - "type": "array" - }, - "gradientRule": { - "description": "The formatting will vary based on the gradients in the rule.", - "$ref": "GradientRule" - } - }, - "id": "ConditionalFormatRule" - }, - "CopyPasteRequest": { - "description": "Copies data from the source to the destination.", - "type": "object", - "properties": { - "destination": { - "description": "The location to paste to. If the range covers a span that's\na multiple of the source's height or width, then the\ndata will be repeated to fill in the destination range.\nIf the range is smaller than the source range, the entire\nsource data will still be copied (beyond the end of the destination range).", - "$ref": "GridRange" - }, - "pasteOrientation": { - "enumDescriptions": [ - "Paste normally.", - "Paste transposed, where all rows become columns and vice versa." - ], - "enum": [ - "NORMAL", - "TRANSPOSE" - ], - "description": "How that data should be oriented when pasting.", - "type": "string" - }, - "pasteType": { - "enumDescriptions": [ - "Paste values, formulas, formats, and merges.", - "Paste the values ONLY without formats, formulas, or merges.", - "Paste the format and data validation only.", - "Like PASTE_NORMAL but without borders.", - "Paste the formulas only.", - "Paste the data validation only.", - "Paste the conditional formatting rules only." - ], - "enum": [ - "PASTE_NORMAL", - "PASTE_VALUES", - "PASTE_FORMAT", - "PASTE_NO_BORDERS", - "PASTE_FORMULA", - "PASTE_DATA_VALIDATION", - "PASTE_CONDITIONAL_FORMATTING" - ], - "description": "What kind of data to paste.", - "type": "string" - }, - "source": { - "$ref": "GridRange", - "description": "The source range to copy." - } - }, - "id": "CopyPasteRequest" - }, - "BooleanCondition": { - "description": "A condition that can evaluate to true or false.\nBooleanConditions are used by conditional formatting,\ndata validation, and the criteria in filters.", - "type": "object", - "properties": { - "values": { - "description": "The values of the condition. The number of supported values depends\non the condition type. Some support zero values,\nothers one or two values,\nand ConditionType.ONE_OF_LIST supports an arbitrary number of values.", - "items": { - "$ref": "ConditionValue" - }, - "type": "array" - }, - "type": { - "description": "The type of condition.", - "type": "string", - "enumDescriptions": [ - "The default value, do not use.", - "The cell's value must be greater than the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", - "The cell's value must be greater than or equal to the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", - "The cell's value must be less than the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", - "The cell's value must be less than or equal to the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", - "The cell's value must be equal to the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", - "The cell's value must be not equal to the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", - "The cell's value must be between the two condition values.\nSupported by data validation, conditional formatting and filters.\nRequires exactly two ConditionValues.", - "The cell's value must not be between the two condition values.\nSupported by data validation, conditional formatting and filters.\nRequires exactly two ConditionValues.", - "The cell's value must contain the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", - "The cell's value must not contain the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", - "The cell's value must start with the condition's value.\nSupported by conditional formatting and filters.\nRequires a single ConditionValue.", - "The cell's value must end with the condition's value.\nSupported by conditional formatting and filters.\nRequires a single ConditionValue.", - "The cell's value must be exactly the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", - "The cell's value must be a valid email address.\nSupported by data validation.\nRequires no ConditionValues.", - "The cell's value must be a valid URL.\nSupported by data validation.\nRequires no ConditionValues.", - "The cell's value must be the same date as the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", - "The cell's value must be before the date of the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue\nthat may be a relative date.", - "The cell's value must be after the date of the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue\nthat may be a relative date.", - "The cell's value must be on or before the date of the condition's value.\nSupported by data validation.\nRequires a single ConditionValue\nthat may be a relative date.", - "The cell's value must be on or after the date of the condition's value.\nSupported by data validation.\nRequires a single ConditionValue\nthat may be a relative date.", - "The cell's value must be between the dates of the two condition values.\nSupported by data validation.\nRequires exactly two ConditionValues.", - "The cell's value must be outside the dates of the two condition values.\nSupported by data validation.\nRequires exactly two ConditionValues.", - "The cell's value must be a date.\nSupported by data validation.\nRequires no ConditionValues.", - "The cell's value must be listed in the grid in condition value's range.\nSupported by data validation.\nRequires a single ConditionValue,\nand the value must be a valid range in A1 notation.", - "The cell's value must in the list of condition values.\nSupported by data validation.\nSupports any number of condition values,\none per item in the list.\nFormulas are not supported in the values.", - "The cell's value must be empty.\nSupported by conditional formatting and filters.\nRequires no ConditionValues.", - "The cell's value must not be empty.\nSupported by conditional formatting and filters.\nRequires no ConditionValues.", - "The condition's formula must evaluate to true.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue." - ], - "enum": [ - "CONDITION_TYPE_UNSPECIFIED", - "NUMBER_GREATER", - "NUMBER_GREATER_THAN_EQ", - "NUMBER_LESS", - "NUMBER_LESS_THAN_EQ", - "NUMBER_EQ", - "NUMBER_NOT_EQ", - "NUMBER_BETWEEN", - "NUMBER_NOT_BETWEEN", - "TEXT_CONTAINS", - "TEXT_NOT_CONTAINS", - "TEXT_STARTS_WITH", - "TEXT_ENDS_WITH", - "TEXT_EQ", - "TEXT_IS_EMAIL", - "TEXT_IS_URL", - "DATE_EQ", - "DATE_BEFORE", - "DATE_AFTER", - "DATE_ON_OR_BEFORE", - "DATE_ON_OR_AFTER", - "DATE_BETWEEN", - "DATE_NOT_BETWEEN", - "DATE_IS_VALID", - "ONE_OF_RANGE", - "ONE_OF_LIST", - "BLANK", - "NOT_BLANK", - "CUSTOM_FORMULA" - ] - } - }, - "id": "BooleanCondition" - }, - "Request": { - "description": "A single kind of update to apply to a spreadsheet.", - "type": "object", - "properties": { - "updateNamedRange": { - "$ref": "UpdateNamedRangeRequest", - "description": "Updates a named range." - }, - "updateSheetProperties": { - "description": "Updates a sheet's properties.", - "$ref": "UpdateSheetPropertiesRequest" - }, - "deleteDimension": { - "$ref": "DeleteDimensionRequest", - "description": "Deletes rows or columns in a sheet." - }, - "autoFill": { - "description": "Automatically fills in more data based on existing data.", - "$ref": "AutoFillRequest" - }, - "sortRange": { - "$ref": "SortRangeRequest", - "description": "Sorts data in a range." - }, - "deleteProtectedRange": { - "description": "Deletes a protected range.", - "$ref": "DeleteProtectedRangeRequest" - }, - "duplicateFilterView": { - "description": "Duplicates a filter view.", - "$ref": "DuplicateFilterViewRequest" - }, - "addChart": { - "description": "Adds a chart.", - "$ref": "AddChartRequest" - }, - "findReplace": { - "description": "Finds and replaces occurrences of some text with other text.", - "$ref": "FindReplaceRequest" - }, - "updateChartSpec": { - "description": "Updates a chart's specifications.", - "$ref": "UpdateChartSpecRequest" - }, - "textToColumns": { - "description": "Converts a column of text into many columns of text.", - "$ref": "TextToColumnsRequest" - }, - "addSheet": { - "$ref": "AddSheetRequest", - "description": "Adds a sheet." - }, - "updateProtectedRange": { - "$ref": "UpdateProtectedRangeRequest", - "description": "Updates a protected range." - }, - "deleteFilterView": { - "description": "Deletes a filter view from a sheet.", - "$ref": "DeleteFilterViewRequest" - }, - "copyPaste": { - "description": "Copies data from one area and pastes it to another.", - "$ref": "CopyPasteRequest" - }, - "insertDimension": { - "description": "Inserts new rows or columns in a sheet.", - "$ref": "InsertDimensionRequest" - }, - "deleteRange": { - "description": "Deletes a range of cells from a sheet, shifting the remaining cells.", - "$ref": "DeleteRangeRequest" - }, - "deleteBanding": { - "$ref": "DeleteBandingRequest", - "description": "Removes a banded range" - }, - "addFilterView": { - "description": "Adds a filter view.", - "$ref": "AddFilterViewRequest" - }, - "setDataValidation": { - "description": "Sets data validation for one or more cells.", - "$ref": "SetDataValidationRequest" - }, - "updateBorders": { - "description": "Updates the borders in a range of cells.", - "$ref": "UpdateBordersRequest" - }, - "deleteConditionalFormatRule": { - "$ref": "DeleteConditionalFormatRuleRequest", - "description": "Deletes an existing conditional format rule." - }, - "repeatCell": { - "$ref": "RepeatCellRequest", - "description": "Repeats a single cell across a range." - }, - "clearBasicFilter": { - "$ref": "ClearBasicFilterRequest", - "description": "Clears the basic filter on a sheet." - }, - "appendDimension": { - "description": "Appends dimensions to the end of a sheet.", - "$ref": "AppendDimensionRequest" - }, - "updateConditionalFormatRule": { - "$ref": "UpdateConditionalFormatRuleRequest", - "description": "Updates an existing conditional format rule." - }, - "insertRange": { - "$ref": "InsertRangeRequest", - "description": "Inserts new cells in a sheet, shifting the existing cells." - }, - "moveDimension": { - "description": "Moves rows or columns to another location in a sheet.", - "$ref": "MoveDimensionRequest" - }, - "randomizeRange": { - "$ref": "RandomizeRangeRequest", - "description": "Randomizes the order of the rows in a range." - }, - "updateBanding": { - "$ref": "UpdateBandingRequest", - "description": "Updates a banded range" - }, - "addProtectedRange": { - "$ref": "AddProtectedRangeRequest", - "description": "Adds a protected range." - }, - "deleteNamedRange": { - "$ref": "DeleteNamedRangeRequest", - "description": "Deletes a named range." - }, - "duplicateSheet": { - "description": "Duplicates a sheet.", - "$ref": "DuplicateSheetRequest" - }, - "unmergeCells": { - "description": "Unmerges merged cells.", - "$ref": "UnmergeCellsRequest" - }, - "deleteSheet": { - "description": "Deletes a sheet.", - "$ref": "DeleteSheetRequest" - }, - "updateEmbeddedObjectPosition": { - "description": "Updates an embedded object's (e.g. chart, image) position.", - "$ref": "UpdateEmbeddedObjectPositionRequest" - }, - "updateDimensionProperties": { - "description": "Updates dimensions' properties.", - "$ref": "UpdateDimensionPropertiesRequest" - }, - "pasteData": { - "$ref": "PasteDataRequest", - "description": "Pastes data (HTML or delimited) into a sheet." - }, - "setBasicFilter": { - "$ref": "SetBasicFilterRequest", - "description": "Sets the basic filter on a sheet." - }, - "addConditionalFormatRule": { - "$ref": "AddConditionalFormatRuleRequest", - "description": "Adds a new conditional format rule." - }, - "addNamedRange": { - "$ref": "AddNamedRangeRequest", - "description": "Adds a named range." - }, - "updateCells": { - "$ref": "UpdateCellsRequest", - "description": "Updates many cells at once." - }, - "updateSpreadsheetProperties": { - "description": "Updates the spreadsheet's properties.", - "$ref": "UpdateSpreadsheetPropertiesRequest" - }, - "deleteEmbeddedObject": { - "$ref": "DeleteEmbeddedObjectRequest", - "description": "Deletes an embedded object (e.g, chart, image) in a sheet." - }, - "updateFilterView": { - "$ref": "UpdateFilterViewRequest", - "description": "Updates the properties of a filter view." - }, - "addBanding": { - "description": "Adds a new banded range", - "$ref": "AddBandingRequest" - }, - "autoResizeDimensions": { - "$ref": "AutoResizeDimensionsRequest", - "description": "Automatically resizes one or more dimensions based on the contents\nof the cells in that dimension." - }, - "appendCells": { - "description": "Appends cells after the last row with data in a sheet.", - "$ref": "AppendCellsRequest" - }, - "cutPaste": { - "description": "Cuts data from one area and pastes it to another.", - "$ref": "CutPasteRequest" - }, - "mergeCells": { - "description": "Merges cells together.", - "$ref": "MergeCellsRequest" - } - }, - "id": "Request" - }, - "GridRange": { - "description": "A range on a sheet.\nAll indexes are zero-based.\nIndexes are half open, e.g the start index is inclusive\nand the end index is exclusive -- [start_index, end_index).\nMissing indexes indicate the range is unbounded on that side.\n\nFor example, if `\"Sheet1\"` is sheet ID 0, then:\n\n `Sheet1!A1:A1 == sheet_id: 0,\n start_row_index: 0, end_row_index: 1,\n start_column_index: 0, end_column_index: 1`\n\n `Sheet1!A3:B4 == sheet_id: 0,\n start_row_index: 2, end_row_index: 4,\n start_column_index: 0, end_column_index: 2`\n\n `Sheet1!A:B == sheet_id: 0,\n start_column_index: 0, end_column_index: 2`\n\n `Sheet1!A5:B == sheet_id: 0,\n start_row_index: 4,\n start_column_index: 0, end_column_index: 2`\n\n `Sheet1 == sheet_id:0`\n\nThe start index must always be less than or equal to the end index.\nIf the start index equals the end index, then the range is empty.\nEmpty ranges are typically not meaningful and are usually rendered in the\nUI as `#REF!`.", - "type": "object", - "properties": { - "endColumnIndex": { - "format": "int32", - "description": "The end column (exclusive) of the range, or not set if unbounded.", - "type": "integer" - }, - "endRowIndex": { - "format": "int32", - "description": "The end row (exclusive) of the range, or not set if unbounded.", - "type": "integer" - }, - "startRowIndex": { - "format": "int32", - "description": "The start row (inclusive) of the range, or not set if unbounded.", - "type": "integer" - }, - "startColumnIndex": { - "format": "int32", - "description": "The start column (inclusive) of the range, or not set if unbounded.", - "type": "integer" - }, - "sheetId": { - "format": "int32", - "description": "The sheet this range is on.", - "type": "integer" - } - }, - "id": "GridRange" - }, - "BasicChartSpec": { - "description": "The specification for a basic chart. See BasicChartType for the list\nof charts this supports.", - "type": "object", - "properties": { - "domains": { - "description": "The domain of data this is charting.\nOnly a single domain is supported.", - "items": { - "$ref": "BasicChartDomain" - }, - "type": "array" - }, - "lineSmoothing": { - "description": "Gets whether all lines should be rendered smooth or straight by default.\nApplies to Line charts.", - "type": "boolean" - }, - "headerCount": { - "format": "int32", - "description": "The number of rows or columns in the data that are \"headers\".\nIf not set, Google Sheets will guess how many rows are headers based\non the data.\n\n(Note that BasicChartAxis.title may override the axis title\n inferred from the header values.)", - "type": "integer" - }, - "stackedType": { - "enumDescriptions": [ - "Default value, do not use.", - "Series are not stacked.", - "Series values are stacked, each value is rendered vertically beginning\nfrom the top of the value below it.", - "Vertical stacks are stretched to reach the top of the chart, with\nvalues laid out as percentages of each other." - ], - "enum": [ - "BASIC_CHART_STACKED_TYPE_UNSPECIFIED", - "NOT_STACKED", - "STACKED", - "PERCENT_STACKED" - ], - "description": "The stacked type for charts that support vertical stacking.\nApplies to Area, Bar, Column, and Stepped Area charts.", - "type": "string" - }, - "threeDimensional": { - "description": "True to make the chart 3D.\nApplies to Bar and Column charts.", - "type": "boolean" - }, - "axis": { - "description": "The axis on the chart.", - "items": { - "$ref": "BasicChartAxis" - }, - "type": "array" - }, - "interpolateNulls": { - "description": "If some values in a series are missing, gaps may appear in the chart (e.g,\nsegments of lines in a line chart will be missing). To eliminate these\ngaps set this to true.\nApplies to Line, Area, and Combo charts.", - "type": "boolean" - }, - "chartType": { - "description": "The type of the chart.", - "type": "string", - "enumDescriptions": [ - "Default value, do not use.", - "A \u003ca href=\"/chart/interactive/docs/gallery/barchart\"\u003ebar chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/linechart\"\u003eline chart\u003c/a\u003e.", - "An \u003ca href=\"/chart/interactive/docs/gallery/areachart\"\u003earea chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/columnchart\"\u003ecolumn chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/scatterchart\"\u003escatter chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/combochart\"\u003ecombo chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/steppedareachart\"\u003estepped area chart\u003c/a\u003e." - ], - "enum": [ - "BASIC_CHART_TYPE_UNSPECIFIED", - "BAR", - "LINE", - "AREA", - "COLUMN", - "SCATTER", - "COMBO", - "STEPPED_AREA" - ] - }, - "series": { - "description": "The data this chart is visualizing.", - "items": { - "$ref": "BasicChartSeries" - }, - "type": "array" - }, - "legendPosition": { - "description": "The position of the chart legend.", - "type": "string", - "enumDescriptions": [ - "Default value, do not use.", - "The legend is rendered on the bottom of the chart.", - "The legend is rendered on the left of the chart.", - "The legend is rendered on the right of the chart.", - "The legend is rendered on the top of the chart.", - "No legend is rendered." - ], - "enum": [ - "BASIC_CHART_LEGEND_POSITION_UNSPECIFIED", - "BOTTOM_LEGEND", - "LEFT_LEGEND", - "RIGHT_LEGEND", - "TOP_LEGEND", - "NO_LEGEND" - ] - } - }, - "id": "BasicChartSpec" - }, - "BubbleChartSpec": { - "description": "A \u003ca href=\"/chart/interactive/docs/gallery/bubblechart\"\u003ebubble chart\u003c/a\u003e.", - "type": "object", - "properties": { - "domain": { - "$ref": "ChartData", - "description": "The data containing the bubble x-values. These values locate the bubbles\nin the chart horizontally." - }, - "bubbleSizes": { - "$ref": "ChartData", - "description": "The data contianing the bubble sizes. Bubble sizes are used to draw\nthe bubbles at different sizes relative to each other.\nIf specified, group_ids must also be specified. This field is\noptional." - }, - "bubbleOpacity": { - "format": "float", - "description": "The opacity of the bubbles between 0 and 1.0.\n0 is fully transparent and 1 is fully opaque.", - "type": "number" - }, - "bubbleBorderColor": { - "description": "The bubble border color.", - "$ref": "Color" - }, - "bubbleTextStyle": { - "$ref": "TextFormat", - "description": "The format of the text inside the bubbles.\nUnderline and Strikethrough are not supported." - }, - "groupIds": { - "$ref": "ChartData", - "description": "The data containing the bubble group IDs. All bubbles with the same group\nID will be drawn in the same color. If bubble_sizes is specified then\nthis field must also be specified but may contain blank values.\nThis field is optional." - }, - "bubbleLabels": { - "$ref": "ChartData", - "description": "The data containing the bubble labels. These do not need to be unique." - }, - "bubbleMinRadiusSize": { - "format": "int32", - "description": "The minimum radius size of the bubbles, in pixels.\nIf specific, the field must be a positive value.", - "type": "integer" - }, - "bubbleMaxRadiusSize": { - "format": "int32", - "description": "The max radius size of the bubbles, in pixels.\nIf specified, the field must be a positive value.", - "type": "integer" - }, - "series": { - "$ref": "ChartData", - "description": "The data contianing the bubble y-values. These values locate the bubbles\nin the chart vertically." - }, - "legendPosition": { - "description": "Where the legend of the chart should be drawn.", - "type": "string", - "enumDescriptions": [ - "Default value, do not use.", - "The legend is rendered on the bottom of the chart.", - "The legend is rendered on the left of the chart.", - "The legend is rendered on the right of the chart.", - "The legend is rendered on the top of the chart.", - "No legend is rendered.", - "The legend is rendered inside the chart area." - ], - "enum": [ - "BUBBLE_CHART_LEGEND_POSITION_UNSPECIFIED", - "BOTTOM_LEGEND", - "LEFT_LEGEND", - "RIGHT_LEGEND", - "TOP_LEGEND", - "NO_LEGEND", - "INSIDE_LEGEND" - ] - } - }, - "id": "BubbleChartSpec" - }, - "SetDataValidationRequest": { - "description": "Sets a data validation rule to every cell in the range.\nTo clear validation in a range, call this with no rule specified.", - "type": "object", - "properties": { - "rule": { - "$ref": "DataValidationRule", - "description": "The data validation rule to set on each cell in the range,\nor empty to clear the data validation in the range." - }, - "range": { - "description": "The range the data validation rule should apply to.", - "$ref": "GridRange" - } - }, - "id": "SetDataValidationRequest" - }, - "CellData": { - "description": "Data about a specific cell.", - "type": "object", - "properties": { - "userEnteredValue": { - "$ref": "ExtendedValue", - "description": "The value the user entered in the cell. e.g, `1234`, `'Hello'`, or `=NOW()`\nNote: Dates, Times and DateTimes are represented as doubles in\nserial number format." - }, - "dataValidation": { - "description": "A data validation rule on the cell, if any.\n\nWhen writing, the new data validation rule will overwrite any prior rule.", - "$ref": "DataValidationRule" - }, - "effectiveValue": { - "description": "The effective value of the cell. For cells with formulas, this will be\nthe calculated value. For cells with literals, this will be\nthe same as the user_entered_value.\nThis field is read-only.", - "$ref": "ExtendedValue" - }, - "textFormatRuns": { - "description": "Runs of rich text applied to subsections of the cell. Runs are only valid\non user entered strings, not formulas, bools, or numbers.\nRuns start at specific indexes in the text and continue until the next\nrun. Properties of a run will continue unless explicitly changed\nin a subsequent run (and properties of the first run will continue\nthe properties of the cell unless explicitly changed).\n\nWhen writing, the new runs will overwrite any prior runs. When writing a\nnew user_entered_value, previous runs will be erased.", - "items": { - "$ref": "TextFormatRun" - }, - "type": "array" - }, - "formattedValue": { - "description": "The formatted value of the cell.\nThis is the value as it's shown to the user.\nThis field is read-only.", - "type": "string" - }, - "hyperlink": { - "description": "A hyperlink this cell points to, if any.\nThis field is read-only. (To set it, use a `=HYPERLINK` formula\nin the userEnteredValue.formulaValue\nfield.)", - "type": "string" - }, - "pivotTable": { - "$ref": "PivotTable", - "description": "A pivot table anchored at this cell. The size of pivot table itself\nis computed dynamically based on its data, grouping, filters, values,\netc. Only the top-left cell of the pivot table contains the pivot table\ndefinition. The other cells will contain the calculated values of the\nresults of the pivot in their effective_value fields." - }, - "userEnteredFormat": { - "description": "The format the user entered for the cell.\n\nWhen writing, the new format will be merged with the existing format.", - "$ref": "CellFormat" - }, - "note": { - "description": "Any note on the cell.", - "type": "string" - }, - "effectiveFormat": { - "$ref": "CellFormat", - "description": "The effective format being used by the cell.\nThis includes the results of applying any conditional formatting and,\nif the cell contains a formula, the computed number format.\nIf the effective format is the default format, effective format will\nnot be written.\nThis field is read-only." - } - }, - "id": "CellData" - }, - "BatchUpdateSpreadsheetRequest": { - "description": "The request for updating any aspect of a spreadsheet.", - "type": "object", - "properties": { - "requests": { - "description": "A list of updates to apply to the spreadsheet.\nRequests will be applied in the order they are specified.\nIf any request is not valid, no requests will be applied.", - "items": { - "$ref": "Request" - }, - "type": "array" - }, - "responseIncludeGridData": { - "description": "True if grid data should be returned. Meaningful only if\nif include_spreadsheet_response is 'true'.\nThis parameter is ignored if a field mask was set in the request.", - "type": "boolean" - }, - "responseRanges": { - "description": "Limits the ranges included in the response spreadsheet.\nMeaningful only if include_spreadsheet_response is 'true'.", - "items": { - "type": "string" - }, - "type": "array" - }, - "includeSpreadsheetInResponse": { - "description": "Determines if the update response should include the spreadsheet\nresource.", - "type": "boolean" - } - }, - "id": "BatchUpdateSpreadsheetRequest" - }, - "Padding": { - "description": "The amount of padding around the cell, in pixels.\nWhen updating padding, every field must be specified.", - "type": "object", - "properties": { - "top": { - "format": "int32", - "description": "The top padding of the cell.", - "type": "integer" - }, - "left": { - "format": "int32", - "description": "The left padding of the cell.", - "type": "integer" - }, - "right": { - "format": "int32", - "description": "The right padding of the cell.", - "type": "integer" - }, - "bottom": { - "format": "int32", - "description": "The bottom padding of the cell.", - "type": "integer" - } - }, - "id": "Padding" - }, - "BasicChartAxis": { - "description": "An axis of the chart.\nA chart may not have more than one axis per\naxis position.", - "type": "object", - "properties": { - "format": { - "description": "The format of the title.\nOnly valid if the axis is not associated with the domain.", - "$ref": "TextFormat" - }, - "title": { - "description": "The title of this axis. If set, this overrides any title inferred\nfrom headers of the data.", - "type": "string" - }, - "position": { - "enumDescriptions": [ - "Default value, do not use.", - "The axis rendered at the bottom of a chart.\nFor most charts, this is the standard major axis.\nFor bar charts, this is a minor axis.", - "The axis rendered at the left of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is the standard major axis.", - "The axis rendered at the right of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is an unusual major axis." - ], - "enum": [ - "BASIC_CHART_AXIS_POSITION_UNSPECIFIED", - "BOTTOM_AXIS", - "LEFT_AXIS", - "RIGHT_AXIS" - ], - "description": "The position of this axis.", - "type": "string" - } - }, - "id": "BasicChartAxis" - }, - "DeleteDimensionRequest": { - "description": "Deletes the dimensions from the sheet.", - "type": "object", - "properties": { - "range": { - "$ref": "DimensionRange", - "description": "The dimensions to delete from the sheet." - } - }, - "id": "DeleteDimensionRequest" - }, - "UpdateChartSpecRequest": { - "description": "Updates a chart's specifications.\n(This does not move or resize a chart. To move or resize a chart, use\n UpdateEmbeddedObjectPositionRequest.)", - "type": "object", - "properties": { - "chartId": { - "format": "int32", - "description": "The ID of the chart to update.", - "type": "integer" - }, - "spec": { - "description": "The specification to apply to the chart.", - "$ref": "ChartSpec" - } - }, - "id": "UpdateChartSpecRequest" - }, - "DeleteFilterViewRequest": { - "description": "Deletes a particular filter view.", - "type": "object", - "properties": { - "filterId": { - "format": "int32", - "description": "The ID of the filter to delete.", - "type": "integer" - } - }, - "id": "DeleteFilterViewRequest" - }, - "BatchUpdateValuesResponse": { - "description": "The response when updating a range of values in a spreadsheet.", - "type": "object", - "properties": { - "totalUpdatedRows": { - "format": "int32", - "description": "The total number of rows where at least one cell in the row was updated.", - "type": "integer" - }, - "responses": { - "description": "One UpdateValuesResponse per requested range, in the same order as\nthe requests appeared.", - "items": { - "$ref": "UpdateValuesResponse" - }, - "type": "array" - }, - "totalUpdatedSheets": { - "format": "int32", - "description": "The total number of sheets where at least one cell in the sheet was\nupdated.", - "type": "integer" - }, - "totalUpdatedCells": { - "format": "int32", - "description": "The total number of cells updated.", - "type": "integer" - }, - "totalUpdatedColumns": { - "format": "int32", - "description": "The total number of columns where at least one cell in the column was\nupdated.", - "type": "integer" - }, - "spreadsheetId": { - "description": "The spreadsheet the updates were applied to.", - "type": "string" - } - }, - "id": "BatchUpdateValuesResponse" - }, - "SortRangeRequest": { - "description": "Sorts data in rows based on a sort order per column.", - "type": "object", - "properties": { - "range": { - "$ref": "GridRange", - "description": "The range to sort." - }, - "sortSpecs": { - "description": "The sort order per column. Later specifications are used when values\nare equal in the earlier specifications.", - "items": { - "$ref": "SortSpec" - }, - "type": "array" - } - }, - "id": "SortRangeRequest" - }, - "MergeCellsRequest": { - "description": "Merges all cells in the range.", - "type": "object", - "properties": { - "mergeType": { - "description": "How the cells should be merged.", - "type": "string", - "enumDescriptions": [ - "Create a single merge from the range", - "Create a merge for each column in the range", - "Create a merge for each row in the range" - ], - "enum": [ - "MERGE_ALL", - "MERGE_COLUMNS", - "MERGE_ROWS" - ] - }, - "range": { - "$ref": "GridRange", - "description": "The range of cells to merge." - } - }, - "id": "MergeCellsRequest" - }, - "AddProtectedRangeRequest": { - "description": "Adds a new protected range.", - "type": "object", - "properties": { - "protectedRange": { - "$ref": "ProtectedRange", - "description": "The protected range to be added. The\nprotectedRangeId field is optional; if\none is not set, an id will be randomly generated. (It is an error to\nspecify the ID of a range that already exists.)" - } - }, - "id": "AddProtectedRangeRequest" - }, - "BatchClearValuesRequest": { - "description": "The request for clearing more than one range of values in a spreadsheet.", - "type": "object", - "properties": { - "ranges": { - "description": "The ranges to clear, in A1 notation.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "BatchClearValuesRequest" - }, - "DuplicateFilterViewResponse": { - "description": "The result of a filter view being duplicated.", - "type": "object", - "properties": { - "filter": { - "$ref": "FilterView", - "description": "The newly created filter." - } - }, - "id": "DuplicateFilterViewResponse" - }, - "DuplicateSheetResponse": { - "description": "The result of duplicating a sheet.", - "type": "object", - "properties": { - "properties": { - "description": "The properties of the duplicate sheet.", - "$ref": "SheetProperties" - } - }, - "id": "DuplicateSheetResponse" - }, - "ClearBasicFilterRequest": { - "description": "Clears the basic filter, if any exists on the sheet.", - "type": "object", - "properties": { - "sheetId": { - "format": "int32", - "description": "The sheet ID on which the basic filter should be cleared.", - "type": "integer" - } - }, - "id": "ClearBasicFilterRequest" - }, - "TextToColumnsRequest": { - "description": "Splits a column of text into multiple columns,\nbased on a delimiter in each cell.", - "type": "object", - "properties": { - "delimiterType": { - "description": "The delimiter type to use.", - "type": "string", - "enumDescriptions": [ - "Default value. This value must not be used.", - "\",\"", - "\";\"", - "\".\"", - "\" \"", - "A custom value as defined in delimiter." - ], - "enum": [ - "DELIMITER_TYPE_UNSPECIFIED", - "COMMA", - "SEMICOLON", - "PERIOD", - "SPACE", - "CUSTOM" - ] - }, - "source": { - "description": "The source data range. This must span exactly one column.", - "$ref": "GridRange" - }, - "delimiter": { - "description": "The delimiter to use. Used only if delimiterType is\nCUSTOM.", - "type": "string" - } - }, - "id": "TextToColumnsRequest" - }, - "DeleteBandingRequest": { - "description": "Removes the banded range with the given ID from the spreadsheet.", - "type": "object", - "properties": { - "bandedRangeId": { - "format": "int32", - "description": "The ID of the banded range to delete.", - "type": "integer" - } - }, - "id": "DeleteBandingRequest" - }, - "BatchUpdateSpreadsheetResponse": { - "description": "The reply for batch updating a spreadsheet.", - "type": "object", - "properties": { - "updatedSpreadsheet": { - "description": "The spreadsheet after updates were applied. This is only set if\n[BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response] is `true`.", - "$ref": "Spreadsheet" - }, - "replies": { - "description": "The reply of the updates. This maps 1:1 with the updates, although\nreplies to some requests may be empty.", - "items": { - "$ref": "Response" - }, - "type": "array" - }, - "spreadsheetId": { - "description": "The spreadsheet the updates were applied to.", - "type": "string" - } - }, - "id": "BatchUpdateSpreadsheetResponse" - }, - "AppendValuesResponse": { - "description": "The response when updating a range of values in a spreadsheet.", - "type": "object", - "properties": { - "updates": { - "$ref": "UpdateValuesResponse", - "description": "Information about the updates that were applied." - }, - "tableRange": { - "description": "The range (in A1 notation) of the table that values are being appended to\n(before the values were appended).\nEmpty if no table was found.", - "type": "string" - }, - "spreadsheetId": { - "description": "The spreadsheet the updates were applied to.", - "type": "string" - } - }, - "id": "AppendValuesResponse" - }, - "AddFilterViewRequest": { - "description": "Adds a filter view.", - "type": "object", - "properties": { - "filter": { - "description": "The filter to add. The filterViewId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a filter that already exists.)", - "$ref": "FilterView" - } - }, - "id": "AddFilterViewRequest" - }, - "PivotFilterCriteria": { - "description": "Criteria for showing/hiding rows in a pivot table.", - "type": "object", - "properties": { - "visibleValues": { - "description": "Values that should be included. Values not listed here are excluded.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "PivotFilterCriteria" - }, - "MoveDimensionRequest": { - "description": "Moves one or more rows or columns.", - "type": "object", - "properties": { - "destinationIndex": { - "format": "int32", - "description": "The zero-based start index of where to move the source data to,\nbased on the coordinates *before* the source data is removed\nfrom the grid. Existing data will be shifted down or right\n(depending on the dimension) to make room for the moved dimensions.\nThe source dimensions are removed from the grid, so the\nthe data may end up in a different index than specified.\n\nFor example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move\n`\"1\"` and `\"2\"` to between `\"3\"` and `\"4\"`, the source would be\n`ROWS [1..3)`,and the destination index would be `\"4\"`\n(the zero-based index of row 5).\nThe end result would be `A1..A5` of `0, 3, 1, 2, 4`.", - "type": "integer" - }, - "source": { - "$ref": "DimensionRange", - "description": "The source dimensions to move." - } - }, - "id": "MoveDimensionRequest" - }, - "AddConditionalFormatRuleRequest": { - "description": "Adds a new conditional format rule at the given index.\nAll subsequent rules' indexes are incremented.", - "type": "object", - "properties": { - "rule": { - "$ref": "ConditionalFormatRule", - "description": "The rule to add." - }, - "index": { - "format": "int32", - "description": "The zero-based index where the rule should be inserted.", - "type": "integer" - } - }, - "id": "AddConditionalFormatRuleRequest" - }, - "ChartSpec": { - "description": "The specifications of a chart.", - "type": "object", - "properties": { - "hiddenDimensionStrategy": { - "description": "Determines how the charts will use hidden rows or columns.", - "type": "string", - "enumDescriptions": [ - "Default value, do not use.", - "Charts will skip hidden rows and columns.", - "Charts will skip hidden rows only.", - "Charts will skip hidden columns only.", - "Charts will not skip any hidden rows or columns." - ], - "enum": [ - "CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED", - "SKIP_HIDDEN_ROWS_AND_COLUMNS", - "SKIP_HIDDEN_ROWS", - "SKIP_HIDDEN_COLUMNS", - "SHOW_ALL" - ] - }, - "backgroundColor": { - "description": "The background color of the entire chart.\nNot applicable to Org charts.", - "$ref": "Color" - }, - "basicChart": { - "$ref": "BasicChartSpec", - "description": "A basic chart specification, can be one of many kinds of charts.\nSee BasicChartType for the list of all\ncharts this supports." - }, - "orgChart": { - "$ref": "OrgChartSpec", - "description": "An org chart specification." - }, - "pieChart": { - "$ref": "PieChartSpec", - "description": "A pie chart specification." - }, - "titleTextFormat": { - "description": "The title text format.\nStrikethrough and underline are not supported.", - "$ref": "TextFormat" - }, - "title": { - "description": "The title of the chart.", - "type": "string" - }, - "altText": { - "description": "The alternative text that describes the chart. This is often used\nfor accessibility.", - "type": "string" - }, - "histogramChart": { - "description": "A histogram chart specification.", - "$ref": "HistogramChartSpec" - }, - "candlestickChart": { - "$ref": "CandlestickChartSpec", - "description": "A candlestick chart specification." - }, - "bubbleChart": { - "description": "A bubble chart specification.", - "$ref": "BubbleChartSpec" - }, - "fontName": { - "description": "The name of the font to use by default for all chart text (e.g. title,\naxis labels, legend). If a font is specified for a specific part of the\nchart it will override this font name.", - "type": "string" - }, - "maximized": { - "description": "True to make a chart fill the entire space in which it's rendered with\nminimum padding. False to use the default padding.\n(Not applicable to Geo and Org charts.)", - "type": "boolean" - } - }, - "id": "ChartSpec" - }, - "NumberFormat": { - "description": "The number format of a cell.", - "type": "object", - "properties": { - "type": { - "enumDescriptions": [ - "The number format is not specified\nand is based on the contents of the cell.\nDo not explicitly use this.", - "Text formatting, e.g `1000.12`", - "Number formatting, e.g, `1,000.12`", - "Percent formatting, e.g `10.12%`", - "Currency formatting, e.g `$1,000.12`", - "Date formatting, e.g `9/26/2008`", - "Time formatting, e.g `3:59:00 PM`", - "Date+Time formatting, e.g `9/26/08 15:59:00`", - "Scientific number formatting, e.g `1.01E+03`" - ], - "enum": [ - "NUMBER_FORMAT_TYPE_UNSPECIFIED", - "TEXT", - "NUMBER", - "PERCENT", - "CURRENCY", - "DATE", - "TIME", - "DATE_TIME", - "SCIENTIFIC" - ], - "description": "The type of the number format.\nWhen writing, this field must be set.", - "type": "string" - }, - "pattern": { - "description": "Pattern string used for formatting. If not set, a default pattern based on\nthe user's locale will be used if necessary for the given type.\nSee the [Date and Number Formats guide](/sheets/api/guides/formats) for more\ninformation about the supported patterns.", - "type": "string" - } - }, - "id": "NumberFormat" - }, - "CandlestickDomain": { - "description": "The domain of a CandlestickChart.", - "type": "object", - "properties": { - "data": { - "$ref": "ChartData", - "description": "The data of the CandlestickDomain." - }, - "reversed": { - "description": "True to reverse the order of the domain values (horizontal axis).", - "type": "boolean" - } - }, - "id": "CandlestickDomain" - }, - "SheetProperties": { - "description": "Properties of a sheet.", - "type": "object", - "properties": { - "title": { - "description": "The name of the sheet.", - "type": "string" - }, - "tabColor": { - "$ref": "Color", - "description": "The color of the tab in the UI." - }, - "index": { - "format": "int32", - "description": "The index of the sheet within the spreadsheet.\nWhen adding or updating sheet properties, if this field\nis excluded then the sheet will be added or moved to the end\nof the sheet list. When updating sheet indices or inserting\nsheets, movement is considered in \"before the move\" indexes.\nFor example, if there were 3 sheets (S1, S2, S3) in order to\nmove S1 ahead of S2 the index would have to be set to 2. A sheet\nindex update request will be ignored if the requested index is\nidentical to the sheets current index or if the requested new\nindex is equal to the current sheet index + 1.", - "type": "integer" - }, - "sheetId": { - "format": "int32", - "description": "The ID of the sheet. Must be non-negative.\nThis field cannot be changed once set.", - "type": "integer" - }, - "rightToLeft": { - "description": "True if the sheet is an RTL sheet instead of an LTR sheet.", - "type": "boolean" - }, - "hidden": { - "description": "True if the sheet is hidden in the UI, false if it's visible.", - "type": "boolean" - }, - "sheetType": { - "description": "The type of sheet. Defaults to GRID.\nThis field cannot be changed once set.", - "type": "string", - "enumDescriptions": [ - "Default value, do not use.", - "The sheet is a grid.", - "The sheet has no grid and instead has an object like a chart or image." - ], - "enum": [ - "SHEET_TYPE_UNSPECIFIED", - "GRID", - "OBJECT" - ] - }, - "gridProperties": { - "$ref": "GridProperties", - "description": "Additional properties of the sheet if this sheet is a grid.\n(If the sheet is an object sheet, containing a chart or image, then\nthis field will be absent.)\nWhen writing it is an error to set any grid properties on non-grid sheets." - } - }, - "id": "SheetProperties" - }, - "UpdateDimensionPropertiesRequest": { - "description": "Updates properties of dimensions within the specified range.", - "type": "object", - "properties": { - "range": { - "description": "The rows or columns to update.", - "$ref": "DimensionRange" - }, - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated. At least one field must be specified.\nThe root `properties` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string" - }, - "properties": { - "$ref": "DimensionProperties", - "description": "Properties to update." - } - }, - "id": "UpdateDimensionPropertiesRequest" - }, - "SourceAndDestination": { - "description": "A combination of a source range and how to extend that source.", - "type": "object", - "properties": { - "source": { - "description": "The location of the data to use as the source of the autofill.", - "$ref": "GridRange" - }, - "dimension": { - "enumDescriptions": [ - "The default value, do not use.", - "Operates on the rows of a sheet.", - "Operates on the columns of a sheet." - ], - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], - "description": "The dimension that data should be filled into.", - "type": "string" - }, - "fillLength": { - "format": "int32", - "description": "The number of rows or columns that data should be filled into.\nPositive numbers expand beyond the last row or last column\nof the source. Negative numbers expand before the first row\nor first column of the source.", - "type": "integer" - } - }, - "id": "SourceAndDestination" - }, - "OrgChartSpec": { - "description": "An \u003ca href=\"/chart/interactive/docs/gallery/orgchart\"\u003eorg chart\u003c/a\u003e.\nOrg charts require a unique set of labels in labels and may\noptionally include parent_labels and tooltips.\nparent_labels contain, for each node, the label identifying the parent\nnode. tooltips contain, for each node, an optional tooltip.\n\nFor example, to describe an OrgChart with Alice as the CEO, Bob as the\nPresident (reporting to Alice) and Cathy as VP of Sales (also reporting to\nAlice), have labels contain \"Alice\", \"Bob\", \"Cathy\",\nparent_labels contain \"\", \"Alice\", \"Alice\" and tooltips contain\n\"CEO\", \"President\", \"VP Sales\".", - "type": "object", - "properties": { - "selectedNodeColor": { - "description": "The color of the selected org chart nodes.", - "$ref": "Color" - }, - "parentLabels": { - "description": "The data containing the label of the parent for the corresponding node.\nA blank value indicates that the node has no parent and is a top-level\nnode.\nThis field is optional.", - "$ref": "ChartData" - }, - "nodeSize": { - "enumDescriptions": [ - "Default value, do not use.", - "The small org chart node size.", - "The medium org chart node size.", - "The large org chart node size." - ], - "enum": [ - "ORG_CHART_LABEL_SIZE_UNSPECIFIED", - "SMALL", - "MEDIUM", - "LARGE" - ], - "description": "The size of the org chart nodes.", - "type": "string" - }, - "labels": { - "description": "The data containing the labels for all the nodes in the chart. Labels\nmust be unique.", - "$ref": "ChartData" - }, - "nodeColor": { - "description": "The color of the org chart nodes.", - "$ref": "Color" - }, - "tooltips": { - "$ref": "ChartData", - "description": "The data containing the tooltip for the corresponding node. A blank value\nresults in no tooltip being displayed for the node.\nThis field is optional." - } - }, - "id": "OrgChartSpec" - }, - "FilterView": { - "description": "A filter view.", - "type": "object", - "properties": { - "namedRangeId": { - "description": "The named range this filter view is backed by, if any.\n\nWhen writing, only one of range or named_range_id\nmay be set.", - "type": "string" - }, - "filterViewId": { - "format": "int32", - "description": "The ID of the filter view.", - "type": "integer" - }, - "criteria": { - "description": "The criteria for showing/hiding values per column.\nThe map's key is the column index, and the value is the criteria for\nthat column.", - "type": "object", - "additionalProperties": { - "$ref": "FilterCriteria" - } - }, - "title": { - "description": "The name of the filter view.", - "type": "string" - }, - "range": { - "$ref": "GridRange", - "description": "The range this filter view covers.\n\nWhen writing, only one of range or named_range_id\nmay be set." - }, - "sortSpecs": { - "description": "The sort order per column. Later specifications are used when values\nare equal in the earlier specifications.", - "items": { - "$ref": "SortSpec" - }, - "type": "array" - } - }, - "id": "FilterView" - }, - "BandingProperties": { - "description": "Properties referring a single dimension (either row or column). If both\nBandedRange.row_properties and BandedRange.column_properties are\nset, the fill colors are applied to cells according to the following rules:\n\n* header_color and footer_color take priority over band colors.\n* first_band_color takes priority over second_band_color.\n* row_properties takes priority over column_properties.\n\nFor example, the first row color takes priority over the first column\ncolor, but the first column color takes priority over the second row color.\nSimilarly, the row header takes priority over the column header in the\ntop left cell, but the column header takes priority over the first row\ncolor if the row header is not set.", - "type": "object", - "properties": { - "footerColor": { - "description": "The color of the last row or column. If this field is not set, the last\nrow or column will be filled with either first_band_color or\nsecond_band_color, depending on the color of the previous row or\ncolumn.", - "$ref": "Color" - }, - "headerColor": { - "$ref": "Color", - "description": "The color of the first row or column. If this field is set, the first\nrow or column will be filled with this color and the colors will\nalternate between first_band_color and second_band_color starting\nfrom the second row or column. Otherwise, the first row or column will be\nfilled with first_band_color and the colors will proceed to alternate\nas they normally would." - }, - "firstBandColor": { - "description": "The first color that is alternating. (Required)", - "$ref": "Color" - }, - "secondBandColor": { - "description": "The second color that is alternating. (Required)", - "$ref": "Color" - } - }, - "id": "BandingProperties" - }, - "AddProtectedRangeResponse": { - "description": "The result of adding a new protected range.", - "type": "object", - "properties": { - "protectedRange": { - "$ref": "ProtectedRange", - "description": "The newly added protected range." - } - }, - "id": "AddProtectedRangeResponse" - }, - "BasicFilter": { - "description": "The default filter associated with a sheet.", - "type": "object", - "properties": { - "criteria": { - "additionalProperties": { - "$ref": "FilterCriteria" - }, - "description": "The criteria for showing/hiding values per column.\nThe map's key is the column index, and the value is the criteria for\nthat column.", - "type": "object" - }, - "range": { - "description": "The range the filter covers.", - "$ref": "GridRange" - }, - "sortSpecs": { - "description": "The sort order per column. Later specifications are used when values\nare equal in the earlier specifications.", - "items": { - "$ref": "SortSpec" - }, - "type": "array" - } - }, - "id": "BasicFilter" - }, - "CandlestickSeries": { - "description": "The series of a CandlestickData.", - "type": "object", - "properties": { - "data": { - "description": "The data of the CandlestickSeries.", - "$ref": "ChartData" - } - }, - "id": "CandlestickSeries" - }, - "HistogramChartSpec": { - "description": "A \u003ca href=\"/chart/interactive/docs/gallery/histogram\"\u003ehistogram chart\u003c/a\u003e.\nA histogram chart groups data items into bins, displaying each bin as a\ncolumn of stacked items. Histograms are used to display the distribution\nof a dataset. Each column of items represents a range into which those\nitems fall. The number of bins can be chosen automatically or specified\nexplicitly.", - "type": "object", - "properties": { - "showItemDividers": { - "description": "Whether horizontal divider lines should be displayed between items in each\ncolumn.", - "type": "boolean" - }, - "series": { - "description": "The series for a histogram may be either a single series of values to be\nbucketed or multiple series, each of the same length, containing the name\nof the series followed by the values to be bucketed for that series.", - "items": { - "$ref": "HistogramSeries" - }, - "type": "array" - }, - "legendPosition": { - "description": "The position of the chart legend.", - "type": "string", - "enumDescriptions": [ - "Default value, do not use.", - "The legend is rendered on the bottom of the chart.", - "The legend is rendered on the left of the chart.", - "The legend is rendered on the right of the chart.", - "The legend is rendered on the top of the chart.", - "No legend is rendered.", - "The legend is rendered inside the chart area." - ], - "enum": [ - "HISTOGRAM_CHART_LEGEND_POSITION_UNSPECIFIED", - "BOTTOM_LEGEND", - "LEFT_LEGEND", - "RIGHT_LEGEND", - "TOP_LEGEND", - "NO_LEGEND", - "INSIDE_LEGEND" - ] - }, - "bucketSize": { - "format": "double", - "description": "By default the bucket size (the range of values stacked in a single\ncolumn) is chosen automatically, but it may be overridden here.\nE.g., A bucket size of 1.5 results in buckets from 0 - 1.5, 1.5 - 3.0, etc.\nCannot be negative.\nThis field is optional.", - "type": "number" - }, - "outlierPercentile": { - "format": "double", - "description": "The outlier percentile is used to ensure that outliers do not adversely\naffect the calculation of bucket sizes. For example, setting an outlier\npercentile of 0.05 indicates that the top and bottom 5% of values when\ncalculating buckets. The values are still included in the chart, they will\nbe added to the first or last buckets instead of their own buckets.\nMust be between 0.0 and 0.5.", - "type": "number" - } - }, - "id": "HistogramChartSpec" - }, - "UpdateValuesResponse": { - "description": "The response when updating a range of values in a spreadsheet.", - "type": "object", - "properties": { - "updatedData": { - "$ref": "ValueRange", - "description": "The values of the cells after updates were applied.\nThis is only included if the request's `includeValuesInResponse` field\nwas `true`." - }, - "updatedRows": { - "format": "int32", - "description": "The number of rows where at least one cell in the row was updated.", - "type": "integer" - }, - "updatedColumns": { - "format": "int32", - "description": "The number of columns where at least one cell in the column was updated.", - "type": "integer" - }, - "spreadsheetId": { - "description": "The spreadsheet the updates were applied to.", - "type": "string" - }, - "updatedRange": { - "description": "The range (in A1 notation) that updates were applied to.", - "type": "string" - }, - "updatedCells": { - "format": "int32", - "description": "The number of cells updated.", - "type": "integer" - } - }, - "id": "UpdateValuesResponse" - }, - "PivotValue": { - "description": "The definition of how a value in a pivot table should be calculated.", - "type": "object", - "properties": { - "formula": { - "description": "A custom formula to calculate the value. The formula must start\nwith an `=` character.", - "type": "string" - }, - "summarizeFunction": { - "enumDescriptions": [ - "The default, do not use.", - "Corresponds to the `SUM` function.", - "Corresponds to the `COUNTA` function.", - "Corresponds to the `COUNT` function.", - "Corresponds to the `COUNTUNIQUE` function.", - "Corresponds to the `AVERAGE` function.", - "Corresponds to the `MAX` function.", - "Corresponds to the `MIN` function.", - "Corresponds to the `MEDIAN` function.", - "Corresponds to the `PRODUCT` function.", - "Corresponds to the `STDEV` function.", - "Corresponds to the `STDEVP` function.", - "Corresponds to the `VAR` function.", - "Corresponds to the `VARP` function.", - "Indicates the formula should be used as-is.\nOnly valid if PivotValue.formula was set." - ], - "enum": [ - "PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED", - "SUM", - "COUNTA", - "COUNT", - "COUNTUNIQUE", - "AVERAGE", - "MAX", - "MIN", - "MEDIAN", - "PRODUCT", - "STDEV", - "STDEVP", - "VAR", - "VARP", - "CUSTOM" - ], - "description": "A function to summarize the value.\nIf formula is set, the only supported values are\nSUM and\nCUSTOM.\nIf sourceColumnOffset is set, then `CUSTOM`\nis not supported.", - "type": "string" - }, - "sourceColumnOffset": { - "format": "int32", - "description": "The column offset of the source range that this value reads from.\n\nFor example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`\nmeans this value refers to column `C`, whereas the offset `1` would\nrefer to column `D`.", - "type": "integer" - }, - "name": { - "description": "A name to use for the value. This is only used if formula was set.\nOtherwise, the column name is used.", - "type": "string" - } - }, - "id": "PivotValue" - }, - "ErrorValue": { - "description": "An error in a cell.", - "type": "object", - "properties": { - "type": { - "enumDescriptions": [ - "The default error type, do not use this.", - "Corresponds to the `#ERROR!` error.", - "Corresponds to the `#NULL!` error.", - "Corresponds to the `#DIV/0` error.", - "Corresponds to the `#VALUE!` error.", - "Corresponds to the `#REF!` error.", - "Corresponds to the `#NAME?` error.", - "Corresponds to the `#NUM`! error.", - "Corresponds to the `#N/A` error.", - "Corresponds to the `Loading...` state." - ], - "enum": [ - "ERROR_TYPE_UNSPECIFIED", - "ERROR", - "NULL_VALUE", - "DIVIDE_BY_ZERO", - "VALUE", - "REF", - "NAME", - "NUM", - "N_A", - "LOADING" - ], - "description": "The type of error.", - "type": "string" - }, - "message": { - "description": "A message with more information about the error\n(in the spreadsheet's locale).", - "type": "string" - } - }, - "id": "ErrorValue" - }, - "CopySheetToAnotherSpreadsheetRequest": { - "description": "The request to copy a sheet across spreadsheets.", - "type": "object", - "properties": { - "destinationSpreadsheetId": { - "description": "The ID of the spreadsheet to copy the sheet to.", - "type": "string" - } - }, - "id": "CopySheetToAnotherSpreadsheetRequest" - }, - "PivotGroupSortValueBucket": { - "description": "Information about which values in a pivot group should be used for sorting.", - "type": "object", - "properties": { - "valuesIndex": { - "format": "int32", - "description": "The offset in the PivotTable.values list which the values in this\ngrouping should be sorted by.", - "type": "integer" - }, - "buckets": { - "description": "Determines the bucket from which values are chosen to sort.\n\nFor example, in a pivot table with one row group & two column groups,\nthe row group can list up to two values. The first value corresponds\nto a value within the first column group, and the second value\ncorresponds to a value in the second column group. If no values\nare listed, this would indicate that the row should be sorted according\nto the \"Grand Total\" over the column groups. If a single value is listed,\nthis would correspond to using the \"Total\" of that bucket.", - "items": { - "$ref": "ExtendedValue" - }, - "type": "array" - } - }, - "id": "PivotGroupSortValueBucket" - }, - "CandlestickChartSpec": { - "description": "A \u003ca href=\"/chart/interactive/docs/gallery/candlestickchart\"\u003ecandlestick chart\u003c/a\u003e.", - "type": "object", - "properties": { - "data": { - "description": "The Candlestick chart data.\nOnly one CandlestickData is supported.", - "items": { - "$ref": "CandlestickData" - }, - "type": "array" - }, - "domain": { - "description": "The domain data (horizontal axis) for the candlestick chart. String data\nwill be treated as discrete labels, other data will be treated as\ncontinuous values.", - "$ref": "CandlestickDomain" - } - }, - "id": "CandlestickChartSpec" - }, - "CandlestickData": { - "description": "The Candlestick chart data, each containing the low, open, close, and high\nvalues for a series.", - "type": "object", - "properties": { - "highSeries": { - "description": "The range data (vertical axis) for the high/maximum value for each\ncandle. This is the top of the candle's center line.", - "$ref": "CandlestickSeries" - }, - "closeSeries": { - "description": "The range data (vertical axis) for the close/final value for each candle.\nThis is the top of the candle body. If greater than the open value the\ncandle will be filled. Otherwise the candle will be hollow.", - "$ref": "CandlestickSeries" - }, - "lowSeries": { - "description": "The range data (vertical axis) for the low/minimum value for each candle.\nThis is the bottom of the candle's center line.", - "$ref": "CandlestickSeries" - }, - "openSeries": { - "description": "The range data (vertical axis) for the open/initial value for each\ncandle. This is the bottom of the candle body. If less than the close\nvalue the candle will be filled. Otherwise the candle will be hollow.", - "$ref": "CandlestickSeries" - } - }, - "id": "CandlestickData" - }, - "EmbeddedObjectPosition": { - "description": "The position of an embedded object such as a chart.", - "type": "object", - "properties": { - "newSheet": { - "description": "If true, the embedded object will be put on a new sheet whose ID\nis chosen for you. Used only when writing.", - "type": "boolean" - }, - "overlayPosition": { - "$ref": "OverlayPosition", - "description": "The position at which the object is overlaid on top of a grid." - }, - "sheetId": { - "format": "int32", - "description": "The sheet this is on. Set only if the embedded object\nis on its own sheet. Must be non-negative.", - "type": "integer" - } - }, - "id": "EmbeddedObjectPosition" - }, - "DeleteProtectedRangeRequest": { - "description": "Deletes the protected range with the given ID.", - "type": "object", - "properties": { - "protectedRangeId": { - "format": "int32", - "description": "The ID of the protected range to delete.", - "type": "integer" - } - }, - "id": "DeleteProtectedRangeRequest" - }, - "AutoFillRequest": { - "description": "Fills in more data based on existing data.", - "type": "object", - "properties": { - "useAlternateSeries": { - "description": "True if we should generate data with the \"alternate\" series.\nThis differs based on the type and amount of source data.", - "type": "boolean" - }, - "sourceAndDestination": { - "$ref": "SourceAndDestination", - "description": "The source and destination areas to autofill.\nThis explicitly lists the source of the autofill and where to\nextend that data." - }, - "range": { - "$ref": "GridRange", - "description": "The range to autofill. This will examine the range and detect\nthe location that has data and automatically fill that data\nin to the rest of the range." - } - }, - "id": "AutoFillRequest" - }, - "GradientRule": { - "description": "A rule that applies a gradient color scale format, based on\nthe interpolation points listed. The format of a cell will vary\nbased on its contents as compared to the values of the interpolation\npoints.", - "type": "object", - "properties": { - "midpoint": { - "$ref": "InterpolationPoint", - "description": "An optional midway interpolation point." - }, - "maxpoint": { - "$ref": "InterpolationPoint", - "description": "The final interpolation point." - }, - "minpoint": { - "$ref": "InterpolationPoint", - "description": "The starting interpolation point." - } - }, - "id": "GradientRule" - }, - "SetBasicFilterRequest": { - "description": "Sets the basic filter associated with a sheet.", - "type": "object", - "properties": { - "filter": { - "description": "The filter to set.", - "$ref": "BasicFilter" - } - }, - "id": "SetBasicFilterRequest" - }, - "ClearValuesRequest": { - "description": "The request for clearing a range of values in a spreadsheet.", - "type": "object", - "properties": {}, - "id": "ClearValuesRequest" - }, - "InterpolationPoint": { - "description": "A single interpolation point on a gradient conditional format.\nThese pin the gradient color scale according to the color,\ntype and value chosen.", - "type": "object", - "properties": { - "type": { - "description": "How the value should be interpreted.", - "type": "string", - "enumDescriptions": [ - "The default value, do not use.", - "The interpolation point will use the minimum value in the\ncells over the range of the conditional format.", - "The interpolation point will use the maximum value in the\ncells over the range of the conditional format.", - "The interpolation point will use exactly the value in\nInterpolationPoint.value.", - "The interpolation point will be the given percentage over\nall the cells in the range of the conditional format.\nThis is equivalent to NUMBER if the value was:\n`=(MAX(FLATTEN(range)) * (value / 100))\n + (MIN(FLATTEN(range)) * (1 - (value / 100)))`\n(where errors in the range are ignored when flattening).", - "The interpolation point will be the given percentile\nover all the cells in the range of the conditional format.\nThis is equivalent to NUMBER if the value was:\n`=PERCENTILE(FLATTEN(range), value / 100)`\n(where errors in the range are ignored when flattening)." - ], - "enum": [ - "INTERPOLATION_POINT_TYPE_UNSPECIFIED", - "MIN", - "MAX", - "NUMBER", - "PERCENT", - "PERCENTILE" - ] - }, - "value": { - "description": "The value this interpolation point uses. May be a formula.\nUnused if type is MIN or\nMAX.", - "type": "string" - }, - "color": { - "$ref": "Color", - "description": "The color this interpolation point should use." - } - }, - "id": "InterpolationPoint" - }, - "DeleteEmbeddedObjectRequest": { - "description": "Deletes the embedded object with the given ID.", - "type": "object", - "properties": { - "objectId": { - "format": "int32", - "description": "The ID of the embedded object to delete.", - "type": "integer" - } - }, - "id": "DeleteEmbeddedObjectRequest" - }, - "FindReplaceResponse": { - "description": "The result of the find/replace.", - "type": "object", - "properties": { - "formulasChanged": { - "format": "int32", - "description": "The number of formula cells changed.", - "type": "integer" - }, - "valuesChanged": { - "format": "int32", - "description": "The number of non-formula cells changed.", - "type": "integer" - }, - "occurrencesChanged": { - "format": "int32", - "description": "The number of occurrences (possibly multiple within a cell) changed.\nFor example, if replacing `\"e\"` with `\"o\"` in `\"Google Sheets\"`, this would\nbe `\"3\"` because `\"Google Sheets\"` -\u003e `\"Googlo Shoots\"`.", - "type": "integer" - }, - "rowsChanged": { - "format": "int32", - "description": "The number of rows changed.", - "type": "integer" - }, - "sheetsChanged": { - "format": "int32", - "description": "The number of sheets changed.", - "type": "integer" - } - }, - "id": "FindReplaceResponse" - }, - "DeleteSheetRequest": { - "description": "Deletes the requested sheet.", - "type": "object", - "properties": { - "sheetId": { - "format": "int32", - "description": "The ID of the sheet to delete.", - "type": "integer" - } - }, - "id": "DeleteSheetRequest" - }, - "DuplicateFilterViewRequest": { - "description": "Duplicates a particular filter view.", - "type": "object", - "properties": { - "filterId": { - "format": "int32", - "description": "The ID of the filter being duplicated.", - "type": "integer" - } - }, - "id": "DuplicateFilterViewRequest" - }, - "UpdateConditionalFormatRuleResponse": { - "description": "The result of updating a conditional format rule.", - "type": "object", - "properties": { - "newIndex": { - "format": "int32", - "description": "The index of the new rule.", - "type": "integer" - }, - "newRule": { - "description": "The new rule that replaced the old rule (if replacing),\nor the rule that was moved (if moved)", - "$ref": "ConditionalFormatRule" - }, - "oldIndex": { - "format": "int32", - "description": "The old index of the rule. Not set if a rule was replaced\n(because it is the same as new_index).", - "type": "integer" - }, - "oldRule": { - "description": "The old (deleted) rule. Not set if a rule was moved\n(because it is the same as new_rule).", - "$ref": "ConditionalFormatRule" - } - }, - "id": "UpdateConditionalFormatRuleResponse" - }, - "ConditionValue": { - "description": "The value of the condition.", - "type": "object", - "properties": { - "userEnteredValue": { - "description": "A value the condition is based on.\nThe value will be parsed as if the user typed into a cell.\nFormulas are supported (and must begin with an `=`).", - "type": "string" - }, - "relativeDate": { - "enumDescriptions": [ - "Default value, do not use.", - "The value is one year before today.", - "The value is one month before today.", - "The value is one week before today.", - "The value is yesterday.", - "The value is today.", - "The value is tomorrow." - ], - "enum": [ - "RELATIVE_DATE_UNSPECIFIED", - "PAST_YEAR", - "PAST_MONTH", - "PAST_WEEK", - "YESTERDAY", - "TODAY", - "TOMORROW" - ], - "description": "A relative date (based on the current date).\nValid only if the type is\nDATE_BEFORE,\nDATE_AFTER,\nDATE_ON_OR_BEFORE or\nDATE_ON_OR_AFTER.\n\nRelative dates are not supported in data validation.\nThey are supported only in conditional formatting and\nconditional filters.", - "type": "string" - } - }, - "id": "ConditionValue" - }, - "DuplicateSheetRequest": { - "description": "Duplicates the contents of a sheet.", - "type": "object", - "properties": { - "newSheetName": { - "description": "The name of the new sheet. If empty, a new name is chosen for you.", - "type": "string" - }, - "sourceSheetId": { - "format": "int32", - "description": "The sheet to duplicate.", - "type": "integer" - }, - "newSheetId": { - "format": "int32", - "description": "If set, the ID of the new sheet. If not set, an ID is chosen.\nIf set, the ID must not conflict with any existing sheet ID.\nIf set, it must be non-negative.", - "type": "integer" - }, - "insertSheetIndex": { - "format": "int32", - "description": "The zero-based index where the new sheet should be inserted.\nThe index of all sheets after this are incremented.", - "type": "integer" - } - }, - "id": "DuplicateSheetRequest" - }, - "ExtendedValue": { - "description": "The kinds of value that a cell in a spreadsheet can have.", - "type": "object", - "properties": { - "formulaValue": { - "description": "Represents a formula.", - "type": "string" - }, - "boolValue": { - "description": "Represents a boolean value.", - "type": "boolean" - }, - "stringValue": { - "description": "Represents a string value.\nLeading single quotes are not included. For example, if the user typed\n`'123` into the UI, this would be represented as a `stringValue` of\n`\"123\"`.", - "type": "string" - }, - "numberValue": { - "format": "double", - "description": "Represents a double value.\nNote: Dates, Times and DateTimes are represented as doubles in\n\"serial number\" format.", - "type": "number" - }, - "errorValue": { - "$ref": "ErrorValue", - "description": "Represents an error.\nThis field is read-only." - } - }, - "id": "ExtendedValue" - }, - "BandedRange": { - "description": "A banded (alternating colors) range in a sheet.", - "type": "object", - "properties": { - "columnProperties": { - "$ref": "BandingProperties", - "description": "Properties for column bands. These properties will be applied on a column-\nby-column basis throughout all the columns in the range. At least one of\nrow_properties or column_properties must be specified." - }, - "rowProperties": { - "$ref": "BandingProperties", - "description": "Properties for row bands. These properties will be applied on a row-by-row\nbasis throughout all the rows in the range. At least one of\nrow_properties or column_properties must be specified." - }, - "range": { - "$ref": "GridRange", - "description": "The range over which these properties are applied." - }, - "bandedRangeId": { - "format": "int32", - "description": "The id of the banded range.", - "type": "integer" - } - }, - "id": "BandedRange" - }, - "HistogramSeries": { - "description": "A histogram series containing the series color and data.", - "type": "object", - "properties": { - "barColor": { - "$ref": "Color", - "description": "The color of the column representing this series in each bucket.\nThis field is optional." - }, - "data": { - "$ref": "ChartData", - "description": "The data for this histogram series." - } - }, - "id": "HistogramSeries" - }, - "BatchClearValuesResponse": { - "description": "The response when clearing a range of values in a spreadsheet.", - "type": "object", - "properties": { - "spreadsheetId": { - "description": "The spreadsheet the updates were applied to.", - "type": "string" - }, - "clearedRanges": { - "description": "The ranges that were cleared, in A1 notation.\n(If the requests were for an unbounded range or a ranger larger\n than the bounds of the sheet, this will be the actual ranges\n that were cleared, bounded to the sheet's limits.)", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "BatchClearValuesResponse" - }, - "Spreadsheet": { - "description": "Resource that represents a spreadsheet.", - "type": "object", - "properties": { - "properties": { - "$ref": "SpreadsheetProperties", - "description": "Overall properties of a spreadsheet." - }, - "namedRanges": { - "description": "The named ranges defined in a spreadsheet.", - "items": { - "$ref": "NamedRange" - }, - "type": "array" - }, - "sheets": { - "description": "The sheets that are part of a spreadsheet.", - "items": { - "$ref": "Sheet" - }, - "type": "array" - }, - "spreadsheetId": { - "description": "The ID of the spreadsheet.\nThis field is read-only.", - "type": "string" - }, - "spreadsheetUrl": { - "description": "The url of the spreadsheet.\nThis field is read-only.", - "type": "string" - } - }, - "id": "Spreadsheet" - }, - "AddChartRequest": { - "description": "Adds a chart to a sheet in the spreadsheet.", - "type": "object", - "properties": { - "chart": { - "$ref": "EmbeddedChart", - "description": "The chart that should be added to the spreadsheet, including the position\nwhere it should be placed. The chartId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a chart that already exists.)" - } - }, - "id": "AddChartRequest" - }, - "UpdateProtectedRangeRequest": { - "description": "Updates an existing protected range with the specified\nprotectedRangeId.", - "type": "object", - "properties": { - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated. At least one field must be specified.\nThe root `protectedRange` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string" - }, - "protectedRange": { - "$ref": "ProtectedRange", - "description": "The protected range to update with the new properties." - } - }, - "id": "UpdateProtectedRangeRequest" - }, - "TextFormat": { - "description": "The format of a run of text in a cell.\nAbsent values indicate that the field isn't specified.", - "type": "object", - "properties": { - "bold": { - "description": "True if the text is bold.", - "type": "boolean" - }, - "foregroundColor": { - "description": "The foreground color of the text.", - "$ref": "Color" - }, - "fontFamily": { - "description": "The font family.", - "type": "string" - }, - "italic": { - "description": "True if the text is italicized.", - "type": "boolean" - }, - "strikethrough": { - "description": "True if the text has a strikethrough.", - "type": "boolean" - }, - "fontSize": { - "format": "int32", - "description": "The size of the font.", - "type": "integer" - }, - "underline": { - "description": "True if the text is underlined.", - "type": "boolean" - } - }, - "id": "TextFormat" - }, - "AddSheetResponse": { - "description": "The result of adding a sheet.", - "type": "object", - "properties": { - "properties": { - "description": "The properties of the newly added sheet.", - "$ref": "SheetProperties" - } - }, - "id": "AddSheetResponse" - }, - "AddFilterViewResponse": { - "description": "The result of adding a filter view.", - "type": "object", - "properties": { - "filter": { - "description": "The newly added filter view.", - "$ref": "FilterView" - } - }, - "id": "AddFilterViewResponse" - }, - "IterativeCalculationSettings": { - "description": "Settings to control how circular dependencies are resolved with iterative\ncalculation.", - "type": "object", - "properties": { - "convergenceThreshold": { - "format": "double", - "description": "When iterative calculation is enabled and successive results differ by\nless than this threshold value, the calculation rounds stop.", - "type": "number" - }, - "maxIterations": { - "format": "int32", - "description": "When iterative calculation is enabled, the maximum number of calculation\nrounds to perform.", - "type": "integer" - } - }, - "id": "IterativeCalculationSettings" - }, - "OverlayPosition": { - "description": "The location an object is overlaid on top of a grid.", - "type": "object", - "properties": { - "widthPixels": { - "format": "int32", - "description": "The width of the object, in pixels. Defaults to 600.", - "type": "integer" - }, - "offsetXPixels": { - "format": "int32", - "description": "The horizontal offset, in pixels, that the object is offset\nfrom the anchor cell.", - "type": "integer" - }, - "anchorCell": { - "description": "The cell the object is anchored to.", - "$ref": "GridCoordinate" - }, - "heightPixels": { - "format": "int32", - "description": "The height of the object, in pixels. Defaults to 371.", - "type": "integer" - }, - "offsetYPixels": { - "format": "int32", - "description": "The vertical offset, in pixels, that the object is offset\nfrom the anchor cell.", - "type": "integer" - } - }, - "id": "OverlayPosition" - }, - "SpreadsheetProperties": { - "description": "Properties of a spreadsheet.", - "type": "object", - "properties": { - "defaultFormat": { - "description": "The default format of all cells in the spreadsheet.\nCellData.effectiveFormat will not be set if the\ncell's format is equal to this default format.\nThis field is read-only.", - "$ref": "CellFormat" - }, - "autoRecalc": { - "description": "The amount of time to wait before volatile functions are recalculated.", - "type": "string", - "enumDescriptions": [ - "Default value. This value must not be used.", - "Volatile functions are updated on every change.", - "Volatile functions are updated on every change and every minute.", - "Volatile functions are updated on every change and hourly." - ], - "enum": [ - "RECALCULATION_INTERVAL_UNSPECIFIED", - "ON_CHANGE", - "MINUTE", - "HOUR" - ] - }, - "title": { - "description": "The title of the spreadsheet.", - "type": "string" - }, - "timeZone": { - "description": "The time zone of the spreadsheet, in CLDR format such as\n`America/New_York`. If the time zone isn't recognized, this may\nbe a custom time zone such as `GMT-07:00`.", - "type": "string" - }, - "locale": { - "description": "The locale of the spreadsheet in one of the following formats:\n\n* an ISO 639-1 language code such as `en`\n\n* an ISO 639-2 language code such as `fil`, if no 639-1 code exists\n\n* a combination of the ISO language code and country code, such as `en_US`\n\nNote: when updating this field, not all locales/languages are supported.", - "type": "string" - }, - "iterativeCalculationSettings": { - "description": "Determines whether and how circular references are resolved with iterative\ncalculation. Absence of this field means that circular references will\nresult in calculation errors.", - "$ref": "IterativeCalculationSettings" - } - }, - "id": "SpreadsheetProperties" - }, - "RepeatCellRequest": { - "description": "Updates all cells in the range to the values in the given Cell object.\nOnly the fields listed in the fields field are updated; others are\nunchanged.\n\nIf writing a cell with a formula, the formula's ranges will automatically\nincrement for each field in the range.\nFor example, if writing a cell with formula `=A1` into range B2:C4,\nB2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`,\nC2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`.\n\nTo keep the formula's ranges static, use the `$` indicator.\nFor example, use the formula `=$A$1` to prevent both the row and the\ncolumn from incrementing.", - "type": "object", - "properties": { - "range": { - "description": "The range to repeat the cell in.", - "$ref": "GridRange" - }, - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated. At least one field must be specified.\nThe root `cell` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string" - }, - "cell": { - "description": "The data to write.", - "$ref": "CellData" - } - }, - "id": "RepeatCellRequest" } }, + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "protocol": "rest", "canonicalName": "Sheets", "auth": { "oauth2": { "scopes": { - "https://www.googleapis.com/auth/spreadsheets": { - "description": "View and manage your spreadsheets in Google Drive" - }, "https://www.googleapis.com/auth/drive.file": { "description": "View and manage Google Drive files and folders that you have opened or created with this app" }, @@ -4553,9 +4549,13 @@ }, "https://www.googleapis.com/auth/drive": { "description": "View and manage the files in your Google Drive" + }, + "https://www.googleapis.com/auth/spreadsheets": { + "description": "View and manage your spreadsheets in Google Drive" } } } }, - "rootUrl": "https://sheets.googleapis.com/" + "rootUrl": "https://sheets.googleapis.com/", + "ownerDomain": "google.com" } diff --git a/vendor/google.golang.org/api/sheets/v4/sheets-gen.go b/vendor/google.golang.org/api/sheets/v4/sheets-gen.go index 70b1121e4..4c4dce108 100644 --- a/vendor/google.golang.org/api/sheets/v4/sheets-gen.go +++ b/vendor/google.golang.org/api/sheets/v4/sheets-gen.go @@ -690,7 +690,6 @@ func (s *AutoFillRequest) MarshalJSON() ([]byte, error) { // of the cells in that dimension. type AutoResizeDimensionsRequest struct { // Dimensions: The dimensions to automatically resize. - // Only COLUMNS are supported. Dimensions *DimensionRange `json:"dimensions,omitempty"` // ForceSendFields is a list of field names (e.g. "Dimensions") to diff --git a/vendor/google.golang.org/api/slides/v1/slides-api.json b/vendor/google.golang.org/api/slides/v1/slides-api.json index b0479082c..8d1762f32 100644 --- a/vendor/google.golang.org/api/slides/v1/slides-api.json +++ b/vendor/google.golang.org/api/slides/v1/slides-api.json @@ -1,78 +1,1244 @@ { - "servicePath": "", - "description": "An API for creating and editing Google Slides presentations.", - "kind": "discovery#restDescription", - "basePath": "", - "revision": "20170727", - "documentationLink": "https://developers.google.com/slides/", - "id": "slides:v1", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "InsertTableRowsRequest": { + "type": "object", + "properties": { + "number": { + "format": "int32", + "description": "The number of rows to be inserted. Maximum 20 per request.", + "type": "integer" + }, + "cellLocation": { + "$ref": "TableCellLocation", + "description": "The reference table cell location from which rows will be inserted.\n\nA new row will be inserted above (or below) the row where the reference\ncell is. If the reference cell is a merged cell, a new row will be\ninserted above (or below) the merged cell." + }, + "tableObjectId": { + "description": "The table to insert rows into.", + "type": "string" + }, + "insertBelow": { + "description": "Whether to insert new rows below the reference cell location.\n\n- `True`: insert below the cell.\n- `False`: insert above the cell.", + "type": "boolean" + } + }, + "id": "InsertTableRowsRequest", + "description": "Inserts rows into a table." + }, + "LayoutProperties": { + "description": "The properties of Page are only\nrelevant for pages with page_type LAYOUT.", + "type": "object", + "properties": { + "name": { + "description": "The name of the layout.", + "type": "string" + }, + "displayName": { + "description": "The human-readable name of the layout.", + "type": "string" + }, + "masterObjectId": { + "description": "The object ID of the master that this layout is based on.", + "type": "string" + } + }, + "id": "LayoutProperties" + }, + "LineProperties": { + "description": "The properties of the Line.\n\nWhen unset, these fields default to values that match the appearance of\nnew lines created in the Slides editor.", + "type": "object", + "properties": { + "weight": { + "description": "The thickness of the line.", + "$ref": "Dimension" + }, + "lineFill": { + "$ref": "LineFill", + "description": "The fill of the line. The default line fill matches the defaults for new\nlines created in the Slides editor." + }, + "link": { + "description": "The hyperlink destination of the line. If unset, there is no link.", + "$ref": "Link" + }, + "dashStyle": { + "type": "string", + "enumDescriptions": [ + "Unspecified dash style.", + "Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'.\nThis is the default dash style.", + "Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'.", + "Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'.", + "Alternating dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'dashDot'.", + "Line with large dashes. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'lgDash'.", + "Alternating large dashes and dots. Corresponds to ECMA-376\nST_PresetLineDashVal value 'lgDashDot'." + ], + "enum": [ + "DASH_STYLE_UNSPECIFIED", + "SOLID", + "DOT", + "DASH", + "DASH_DOT", + "LONG_DASH", + "LONG_DASH_DOT" + ], + "description": "The dash style of the line." + }, + "startArrow": { + "description": "The style of the arrow at the beginning of the line.", + "type": "string", + "enumDescriptions": [ + "An unspecified arrow style.", + "No arrow.", + "Arrow with notched back. Corresponds to ECMA-376 ST_LineEndType value\n'stealth'.", + "Filled arrow. Corresponds to ECMA-376 ST_LineEndType value 'triangle'.", + "Filled circle. Corresponds to ECMA-376 ST_LineEndType value 'oval'.", + "Filled square.", + "Filled diamond. Corresponds to ECMA-376 ST_LineEndType value 'diamond'.", + "Hollow arrow.", + "Hollow circle.", + "Hollow square.", + "Hollow diamond." + ], + "enum": [ + "ARROW_STYLE_UNSPECIFIED", + "NONE", + "STEALTH_ARROW", + "FILL_ARROW", + "FILL_CIRCLE", + "FILL_SQUARE", + "FILL_DIAMOND", + "OPEN_ARROW", + "OPEN_CIRCLE", + "OPEN_SQUARE", + "OPEN_DIAMOND" + ] + }, + "endArrow": { + "enumDescriptions": [ + "An unspecified arrow style.", + "No arrow.", + "Arrow with notched back. Corresponds to ECMA-376 ST_LineEndType value\n'stealth'.", + "Filled arrow. Corresponds to ECMA-376 ST_LineEndType value 'triangle'.", + "Filled circle. Corresponds to ECMA-376 ST_LineEndType value 'oval'.", + "Filled square.", + "Filled diamond. Corresponds to ECMA-376 ST_LineEndType value 'diamond'.", + "Hollow arrow.", + "Hollow circle.", + "Hollow square.", + "Hollow diamond." + ], + "enum": [ + "ARROW_STYLE_UNSPECIFIED", + "NONE", + "STEALTH_ARROW", + "FILL_ARROW", + "FILL_CIRCLE", + "FILL_SQUARE", + "FILL_DIAMOND", + "OPEN_ARROW", + "OPEN_CIRCLE", + "OPEN_SQUARE", + "OPEN_DIAMOND" + ], + "description": "The style of the arrow at the end of the line.", + "type": "string" + } + }, + "id": "LineProperties" + }, + "Presentation": { + "type": "object", + "properties": { + "notesMaster": { + "$ref": "Page", + "description": "The notes master in the presentation. It serves three purposes:\n\n- Placeholder shapes on a notes master contain the default text styles and\n shape properties of all placeholder shapes on notes pages. Specifically,\n a `SLIDE_IMAGE` placeholder shape contains the slide thumbnail, and a\n `BODY` placeholder shape contains the speaker notes.\n- The notes master page properties define the common page properties\n inherited by all notes pages.\n- Any other shapes on the notes master will appear on all notes pages.\n\nThe notes master is read-only." + }, + "layouts": { + "description": "The layouts in the presentation. A layout is a template that determines\nhow content is arranged and styled on the slides that inherit from that\nlayout.", + "items": { + "$ref": "Page" + }, + "type": "array" + }, + "title": { + "description": "The title of the presentation.", + "type": "string" + }, + "masters": { + "description": "The slide masters in the presentation. A slide master contains all common\npage elements and the common properties for a set of layouts. They serve\nthree purposes:\n\n- Placeholder shapes on a master contain the default text styles and shape\n properties of all placeholder shapes on pages that use that master.\n- The master page properties define the common page properties inherited by\n its layouts.\n- Any other shapes on the master slide will appear on all slides using that\n master, regardless of their layout.", + "items": { + "$ref": "Page" + }, + "type": "array" + }, + "locale": { + "type": "string", + "description": "The locale of the presentation, as an IETF BCP 47 language tag." + }, + "pageSize": { + "description": "The size of pages in the presentation.", + "$ref": "Size" + }, + "presentationId": { + "type": "string", + "description": "The ID of the presentation." + }, + "slides": { + "description": "The slides in the presentation.\nA slide inherits properties from a slide layout.", + "items": { + "$ref": "Page" + }, + "type": "array" + }, + "revisionId": { + "description": "The revision ID of the presentation. Can be used in update requests\nto assert that the presentation revision hasn't changed since the last\nread operation. Only populated if the user has edit access to the\npresentation.\n\nThe format of the revision ID may change over time, so it should be treated\nopaquely. A returned revision ID is only guaranteed to be valid for 24\nhours after it has been returned and cannot be shared across users. If the\nrevision ID is unchanged between calls, then the presentation has not\nchanged. Conversely, a changed ID (for the same presentation and user)\nusually means the presentation has been updated; however, a changed ID can\nalso be due to internal factors such as ID format changes.", + "type": "string" + } + }, + "id": "Presentation", + "description": "A Google Slides presentation." + }, + "OpaqueColor": { + "description": "A themeable solid color value.", + "type": "object", + "properties": { + "rgbColor": { + "$ref": "RgbColor", + "description": "An opaque RGB color." + }, + "themeColor": { + "enumDescriptions": [ + "Unspecified theme color. This value should not be used.", + "Represents the first dark color.", + "Represents the first light color.", + "Represents the second dark color.", + "Represents the second light color.", + "Represents the first accent color.", + "Represents the second accent color.", + "Represents the third accent color.", + "Represents the fourth accent color.", + "Represents the fifth accent color.", + "Represents the sixth accent color.", + "Represents the color to use for hyperlinks.", + "Represents the color to use for visited hyperlinks.", + "Represents the first text color.", + "Represents the first background color.", + "Represents the second text color.", + "Represents the second background color." + ], + "enum": [ + "THEME_COLOR_TYPE_UNSPECIFIED", + "DARK1", + "LIGHT1", + "DARK2", + "LIGHT2", + "ACCENT1", + "ACCENT2", + "ACCENT3", + "ACCENT4", + "ACCENT5", + "ACCENT6", + "HYPERLINK", + "FOLLOWED_HYPERLINK", + "TEXT1", + "BACKGROUND1", + "TEXT2", + "BACKGROUND2" + ], + "description": "An opaque theme color.", + "type": "string" + } + }, + "id": "OpaqueColor" + }, + "ImageProperties": { + "type": "object", + "properties": { + "shadow": { + "$ref": "Shadow", + "description": "The shadow of the image. If not set, the image has no shadow. This property\nis read-only." + }, + "link": { + "description": "The hyperlink destination of the image. If unset, there is no link.", + "$ref": "Link" + }, + "contrast": { + "format": "float", + "description": "The contrast effect of the image. The value should be in the interval\n[-1.0, 1.0], where 0 means no effect. This property is read-only.", + "type": "number" + }, + "recolor": { + "$ref": "Recolor", + "description": "The recolor effect of the image. If not set, the image is not recolored.\nThis property is read-only." + }, + "cropProperties": { + "description": "The crop properties of the image. If not set, the image is not cropped.\nThis property is read-only.", + "$ref": "CropProperties" + }, + "outline": { + "$ref": "Outline", + "description": "The outline of the image. If not set, the the image has no outline." + }, + "brightness": { + "format": "float", + "description": "The brightness effect of the image. The value should be in the interval\n[-1.0, 1.0], where 0 means no effect. This property is read-only.", + "type": "number" + }, + "transparency": { + "format": "float", + "description": "The transparency effect of the image. The value should be in the interval\n[0.0, 1.0], where 0 means no effect and 1 means completely transparent.\nThis property is read-only.", + "type": "number" + } + }, + "id": "ImageProperties", + "description": "The properties of the Image." + }, + "ReplaceAllShapesWithImageResponse": { + "description": "The result of replacing shapes with an image.", + "type": "object", + "properties": { + "occurrencesChanged": { + "format": "int32", + "description": "The number of shapes replaced with images.", + "type": "integer" + } + }, + "id": "ReplaceAllShapesWithImageResponse" + }, + "Line": { + "description": "A PageElement kind representing a\nline, curved connector, or bent connector.", + "type": "object", + "properties": { + "lineType": { + "enum": [ + "TYPE_UNSPECIFIED", + "STRAIGHT_CONNECTOR_1", + "BENT_CONNECTOR_2", + "BENT_CONNECTOR_3", + "BENT_CONNECTOR_4", + "BENT_CONNECTOR_5", + "CURVED_CONNECTOR_2", + "CURVED_CONNECTOR_3", + "CURVED_CONNECTOR_4", + "CURVED_CONNECTOR_5" + ], + "description": "The type of the line.", + "type": "string", + "enumDescriptions": [ + "An unspecified line type.", + "Straight connector 1 form. Corresponds to ECMA-376 ST_ShapeType\n'straightConnector1'.", + "Bent connector 2 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector2'.", + "Bent connector 3 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector3'.", + "Bent connector 4 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector4'.", + "Bent connector 5 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector5'.", + "Curved connector 2 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector2'.", + "Curved connector 3 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector3'.", + "Curved connector 4 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector4'.", + "Curved connector 5 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector5'." + ] + }, + "lineProperties": { + "$ref": "LineProperties", + "description": "The properties of the line." + } + }, + "id": "Line" + }, + "BatchUpdatePresentationResponse": { + "description": "Response message from a batch update.", + "type": "object", + "properties": { + "presentationId": { + "description": "The presentation the updates were applied to.", + "type": "string" + }, + "replies": { + "description": "The reply of the updates. This maps 1:1 with the updates, although\nreplies to some requests may be empty.", + "items": { + "$ref": "Response" + }, + "type": "array" + } + }, + "id": "BatchUpdatePresentationResponse" + }, + "CreateSheetsChartRequest": { + "description": "Creates an embedded Google Sheets chart.\n\nNOTE: Chart creation requires at least one of the spreadsheets.readonly,\nspreadsheets, drive.readonly, or drive OAuth scopes.", + "type": "object", + "properties": { + "objectId": { + "description": "A user-supplied object ID.\n\nIf specified, the ID must be unique among all pages and page elements in\nthe presentation. The ID should start with a word character [a-zA-Z0-9_]\nand then followed by any number of the following characters [a-zA-Z0-9_-:].\nThe length of the ID should not be less than 5 or greater than 50.\nIf empty, a unique identifier will be generated.", + "type": "string" + }, + "elementProperties": { + "description": "The element properties for the chart.\n\nWhen the aspect ratio of the provided size does not match the chart aspect\nratio, the chart is scaled and centered with respect to the size in order\nto maintain aspect ratio. The provided transform is applied after this\noperation.", + "$ref": "PageElementProperties" + }, + "linkingMode": { + "enum": [ + "NOT_LINKED_IMAGE", + "LINKED" + ], + "description": "The mode with which the chart is linked to the source spreadsheet. When\nnot specified, the chart will be an image that is not linked.", + "type": "string", + "enumDescriptions": [ + "The chart is not associated with the source spreadsheet and cannot be\nupdated. A chart that is not linked will be inserted as an image.", + "Linking the chart allows it to be updated, and other collaborators will\nsee a link to the spreadsheet." + ] + }, + "spreadsheetId": { + "description": "The ID of the Google Sheets spreadsheet that contains the chart.", + "type": "string" + }, + "chartId": { + "format": "int32", + "description": "The ID of the specific chart in the Google Sheets spreadsheet.", + "type": "integer" + } + }, + "id": "CreateSheetsChartRequest" + }, + "CreateImageResponse": { + "properties": { + "objectId": { + "description": "The object ID of the created image.", + "type": "string" + } + }, + "id": "CreateImageResponse", + "description": "The result of creating an image.", + "type": "object" + }, + "SlideProperties": { + "type": "object", + "properties": { + "masterObjectId": { + "description": "The object ID of the master that this slide is based on.", + "type": "string" + }, + "layoutObjectId": { + "description": "The object ID of the layout that this slide is based on.", + "type": "string" + }, + "notesPage": { + "$ref": "Page", + "description": "The notes page that this slide is associated with. It defines the visual\nappearance of a notes page when printing or exporting slides with speaker\nnotes. A notes page inherits properties from the\nnotes master.\nThe placeholder shape with type BODY on the notes page contains the speaker\nnotes for this slide. The ID of this shape is identified by the\nspeakerNotesObjectId field.\nThe notes page is read-only except for the text content and styles of the\nspeaker notes shape." + } + }, + "id": "SlideProperties", + "description": "The properties of Page that are only\nrelevant for pages with page_type SLIDE." + }, + "MasterProperties": { + "description": "The properties of Page that are only\nrelevant for pages with page_type MASTER.", + "type": "object", + "properties": { + "displayName": { + "description": "The human-readable name of the master.", + "type": "string" + } + }, + "id": "MasterProperties" + }, + "Response": { + "id": "Response", + "description": "A single response from an update.", + "type": "object", + "properties": { + "createTable": { + "description": "The result of creating a table.", + "$ref": "CreateTableResponse" + }, + "replaceAllText": { + "$ref": "ReplaceAllTextResponse", + "description": "The result of replacing text." + }, + "createSlide": { + "description": "The result of creating a slide.", + "$ref": "CreateSlideResponse" + }, + "duplicateObject": { + "$ref": "DuplicateObjectResponse", + "description": "The result of duplicating an object." + }, + "createShape": { + "description": "The result of creating a shape.", + "$ref": "CreateShapeResponse" + }, + "createLine": { + "description": "The result of creating a line.", + "$ref": "CreateLineResponse" + }, + "createImage": { + "$ref": "CreateImageResponse", + "description": "The result of creating an image." + }, + "createVideo": { + "$ref": "CreateVideoResponse", + "description": "The result of creating a video." + }, + "createSheetsChart": { + "$ref": "CreateSheetsChartResponse", + "description": "The result of creating a Google Sheets chart." + }, + "replaceAllShapesWithSheetsChart": { + "$ref": "ReplaceAllShapesWithSheetsChartResponse", + "description": "The result of replacing all shapes matching some criteria with a Google\nSheets chart." + }, + "replaceAllShapesWithImage": { + "$ref": "ReplaceAllShapesWithImageResponse", + "description": "The result of replacing all shapes matching some criteria with an\nimage." + } + } + }, + "SubstringMatchCriteria": { + "description": "A criteria that matches a specific string of text in a shape or table.", + "type": "object", + "properties": { + "text": { + "description": "The text to search for in the shape or table.", + "type": "string" + }, + "matchCase": { + "description": "Indicates whether the search should respect case:\n\n- `True`: the search is case sensitive.\n- `False`: the search is case insensitive.", + "type": "boolean" + } + }, + "id": "SubstringMatchCriteria" + }, + "LayoutReference": { + "description": "Slide layout reference. This may reference either:\n\n- A predefined layout\n- One of the layouts in the presentation.", + "type": "object", + "properties": { + "predefinedLayout": { + "enumDescriptions": [ + "Unspecified layout.", + "Blank layout, with no placeholders.", + "Layout with a caption at the bottom.", + "Layout with a title and a subtitle.", + "Layout with a title and body.", + "Layout with a title and two columns.", + "Layout with only a title.", + "Layout with a section title.", + "Layout with a title and subtitle on one side and description on the other.", + "Layout with one title and one body, arranged in a single column.", + "Layout with a main point.", + "Layout with a big number heading." + ], + "enum": [ + "PREDEFINED_LAYOUT_UNSPECIFIED", + "BLANK", + "CAPTION_ONLY", + "TITLE", + "TITLE_AND_BODY", + "TITLE_AND_TWO_COLUMNS", + "TITLE_ONLY", + "SECTION_HEADER", + "SECTION_TITLE_AND_DESCRIPTION", + "ONE_COLUMN_TEXT", + "MAIN_POINT", + "BIG_NUMBER" + ], + "description": "Predefined layout.", + "type": "string" + }, + "layoutId": { + "description": "Layout ID: the object ID of one of the layouts in the presentation.", + "type": "string" + } + }, + "id": "LayoutReference" + }, + "TextRun": { + "id": "TextRun", + "description": "A TextElement kind that represents a run of text that all has the same\nstyling.", + "type": "object", + "properties": { + "style": { + "$ref": "TextStyle", + "description": "The styling applied to this run." + }, + "content": { + "description": "The text of this run.", + "type": "string" + } + } + }, + "TableRange": { + "description": "A table range represents a reference to a subset of a table.\n\nIt's important to note that the cells specified by a table range do not\nnecessarily form a rectangle. For example, let's say we have a 3 x 3 table\nwhere all the cells of the last row are merged together. The table looks\nlike this:\n\n \n [ ]\n\nA table range with location = (0, 0), row span = 3 and column span = 2\nspecifies the following cells:\n\n x x \n [ x ]", + "type": "object", + "properties": { + "rowSpan": { + "format": "int32", + "description": "The row span of the table range.", + "type": "integer" + }, + "location": { + "$ref": "TableCellLocation", + "description": "The starting location of the table range." + }, + "columnSpan": { + "format": "int32", + "description": "The column span of the table range.", + "type": "integer" + } + }, + "id": "TableRange" + }, + "CreateTableRequest": { + "id": "CreateTableRequest", + "description": "Creates a new table.", + "type": "object", + "properties": { + "rows": { + "format": "int32", + "description": "Number of rows in the table.", + "type": "integer" + }, + "columns": { + "format": "int32", + "description": "Number of columns in the table.", + "type": "integer" + }, + "objectId": { + "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", + "type": "string" + }, + "elementProperties": { + "description": "The element properties for the table.\n\nThe table will be created at the provided size, subject to a minimum size.\nIf no size is provided, the table will be automatically sized.\n\nTable transforms must have a scale of 1 and no shear components. If no\ntransform is provided, the table will be centered on the page.", + "$ref": "PageElementProperties" + } + } + }, + "CreateTableResponse": { + "description": "The result of creating a table.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the created table.", + "type": "string" + } + }, + "id": "CreateTableResponse" + }, + "Table": { + "description": "A PageElement kind representing a\ntable.", + "type": "object", + "properties": { + "columns": { + "format": "int32", + "description": "Number of columns in the table.", + "type": "integer" + }, + "tableRows": { + "description": "Properties and contents of each row.\n\nCells that span multiple rows are contained in only one of these rows and\nhave a row_span greater\nthan 1.", + "items": { + "$ref": "TableRow" + }, + "type": "array" + }, + "rows": { + "format": "int32", + "description": "Number of rows in the table.", + "type": "integer" + }, + "tableColumns": { + "description": "Properties of each column.", + "items": { + "$ref": "TableColumnProperties" + }, + "type": "array" + } + }, + "id": "Table" + }, + "PageBackgroundFill": { + "description": "The page background fill.", + "type": "object", + "properties": { + "propertyState": { + "enumDescriptions": [ + "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", + "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", + "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." + ], + "enum": [ + "RENDERED", + "NOT_RENDERED", + "INHERIT" + ], + "description": "The background fill property state.\n\nUpdating the fill on a page will implicitly update this field to\n`RENDERED`, unless another value is specified in the same request. To\nhave no fill on a page, set this field to `NOT_RENDERED`. In this case,\nany other fill fields set in the same request will be ignored.", + "type": "string" + }, + "stretchedPictureFill": { + "$ref": "StretchedPictureFill", + "description": "Stretched picture fill." + }, + "solidFill": { + "description": "Solid color fill.", + "$ref": "SolidFill" + } + }, + "id": "PageBackgroundFill" + }, + "SheetsChart": { + "id": "SheetsChart", + "description": "A PageElement kind representing\na linked chart embedded from Google Sheets.", + "type": "object", + "properties": { + "contentUrl": { + "description": "The URL of an image of the embedded chart, with a default lifetime of 30\nminutes. This URL is tagged with the account of the requester. Anyone with\nthe URL effectively accesses the image as the original requester. Access to\nthe image may be lost if the presentation's sharing settings change.", + "type": "string" + }, + "spreadsheetId": { + "description": "The ID of the Google Sheets spreadsheet that contains the source chart.", + "type": "string" + }, + "chartId": { + "format": "int32", + "description": "The ID of the specific chart in the Google Sheets spreadsheet that is\nembedded.", + "type": "integer" + }, + "sheetsChartProperties": { + "$ref": "SheetsChartProperties", + "description": "The properties of the Sheets chart." + } + } + }, + "SolidFill": { + "description": "A solid color fill. The page or page element is filled entirely with the\nspecified color value.\n\nIf any field is unset, its value may be inherited from a parent placeholder\nif it exists.", + "type": "object", + "properties": { + "alpha": { + "format": "float", + "description": "The fraction of this `color` that should be applied to the pixel.\nThat is, the final pixel color is defined by the equation:\n\n pixel color = alpha * (color) + (1.0 - alpha) * (background color)\n\nThis means that a value of 1.0 corresponds to a solid color, whereas\na value of 0.0 corresponds to a completely transparent color.", + "type": "number" + }, + "color": { + "description": "The color value of the solid fill.", + "$ref": "OpaqueColor" + } + }, + "id": "SolidFill" + }, + "ThemeColorPair": { + "description": "A pair mapping a theme color type to the concrete color it represents.", + "type": "object", + "properties": { + "type": { + "description": "The type of the theme color.", + "type": "string", + "enumDescriptions": [ + "Unspecified theme color. This value should not be used.", + "Represents the first dark color.", + "Represents the first light color.", + "Represents the second dark color.", + "Represents the second light color.", + "Represents the first accent color.", + "Represents the second accent color.", + "Represents the third accent color.", + "Represents the fourth accent color.", + "Represents the fifth accent color.", + "Represents the sixth accent color.", + "Represents the color to use for hyperlinks.", + "Represents the color to use for visited hyperlinks.", + "Represents the first text color.", + "Represents the first background color.", + "Represents the second text color.", + "Represents the second background color." + ], + "enum": [ + "THEME_COLOR_TYPE_UNSPECIFIED", + "DARK1", + "LIGHT1", + "DARK2", + "LIGHT2", + "ACCENT1", + "ACCENT2", + "ACCENT3", + "ACCENT4", + "ACCENT5", + "ACCENT6", + "HYPERLINK", + "FOLLOWED_HYPERLINK", + "TEXT1", + "BACKGROUND1", + "TEXT2", + "BACKGROUND2" + ] + }, + "color": { + "description": "The concrete color corresponding to the theme color type above.", + "$ref": "RgbColor" + } + }, + "id": "ThemeColorPair" + }, + "OptionalColor": { + "properties": { + "opaqueColor": { + "description": "If set, this will be used as an opaque color. If unset, this represents\na transparent color.", + "$ref": "OpaqueColor" + } + }, + "id": "OptionalColor", + "description": "A color that can either be fully opaque or fully transparent.", + "type": "object" + }, + "PageElementProperties": { + "description": "Common properties for a page element.\n\nNote: When you initially create a\nPageElement, the API may modify\nthe values of both `size` and `transform`, but the\nvisual size will be unchanged.", + "type": "object", + "properties": { + "transform": { + "$ref": "AffineTransform", + "description": "The transform for the element." + }, + "pageObjectId": { + "description": "The object ID of the page where the element is located.", + "type": "string" + }, + "size": { + "description": "The size of the element.", + "$ref": "Size" + } + }, + "id": "PageElementProperties" + }, + "SheetsChartProperties": { + "description": "The properties of the SheetsChart.", + "type": "object", + "properties": { + "chartImageProperties": { + "description": "The properties of the embedded chart image.", + "$ref": "ImageProperties" + } + }, + "id": "SheetsChartProperties" + }, + "StretchedPictureFill": { + "description": "The stretched picture fill. The page or page element is filled entirely with\nthe specified picture. The picture is stretched to fit its container.", + "type": "object", + "properties": { + "contentUrl": { + "description": "Reading the content_url:\n\nAn URL to a picture with a default lifetime of 30 minutes.\nThis URL is tagged with the account of the requester. Anyone with the URL\neffectively accesses the picture as the original requester. Access to the\npicture may be lost if the presentation's sharing settings change.\n\nWriting the content_url:\n\nThe picture is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Pictures must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.\n\nThe provided URL can be at maximum 2K bytes large.", + "type": "string" + }, + "size": { + "$ref": "Size", + "description": "The original size of the picture fill. This field is read-only." + } + }, + "id": "StretchedPictureFill" + }, + "UpdateTextStyleRequest": { + "description": "Update the styling of text in a Shape or\nTable.", + "type": "object", + "properties": { + "style": { + "$ref": "TextStyle", + "description": "The style(s) to set on the text.\n\nIf the value for a particular style matches that of the parent, that style\nwill be set to inherit.\n\nCertain text style changes may cause other changes meant to mirror the\nbehavior of the Slides editor. See the documentation of\nTextStyle for more information." + }, + "cellLocation": { + "$ref": "TableCellLocation", + "description": "The location of the cell in the table containing the text to style. If\n`object_id` refers to a table, `cell_location` must have a value.\nOtherwise, it must not." + }, + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `style` is implied and\nshould not be specified. A single `\"*\"` can be used as short-hand for\nlisting every field.\n\nFor example, to update the text style to bold, set `fields` to `\"bold\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "type": "string" + }, + "textRange": { + "$ref": "Range", + "description": "The range of text to style.\n\nThe range may be extended to include adjacent newlines.\n\nIf the range fully contains a paragraph belonging to a list, the\nparagraph's bullet is also updated with the matching text style." + }, + "objectId": { + "description": "The object ID of the shape or table with the text to be styled.", + "type": "string" + } + }, + "id": "UpdateTextStyleRequest" + }, + "DeleteTableColumnRequest": { + "properties": { + "cellLocation": { + "$ref": "TableCellLocation", + "description": "The reference table cell location from which a column will be deleted.\n\nThe column this cell spans will be deleted. If this is a merged cell,\nmultiple columns will be deleted. If no columns remain in the table after\nthis deletion, the whole table is deleted." + }, + "tableObjectId": { + "description": "The table to delete columns from.", + "type": "string" + } + }, + "id": "DeleteTableColumnRequest", + "description": "Deletes a column from a table.", + "type": "object" + }, + "List": { + "description": "A List describes the look and feel of bullets belonging to paragraphs\nassociated with a list. A paragraph that is part of a list has an implicit\nreference to that list's ID.", + "type": "object", + "properties": { + "listId": { + "description": "The ID of the list.", + "type": "string" + }, + "nestingLevel": { + "description": "A map of nesting levels to the properties of bullets at the associated\nlevel. A list has at most nine levels of nesting, so the possible values\nfor the keys of this map are 0 through 8, inclusive.", + "type": "object", + "additionalProperties": { + "$ref": "NestingLevel" + } + } + }, + "id": "List" + }, + "WeightedFontFamily": { + "description": "Represents a font family and weight used to style a TextRun.", + "type": "object", + "properties": { + "weight": { + "format": "int32", + "description": "The rendered weight of the text. This field can have any value that is a\nmultiple of `100` between `100` and `900`, inclusive. This range\ncorresponds to the numerical values described in the CSS 2.1\nSpecification, [section 15.6](https://www.w3.org/TR/CSS21/fonts.html#font-boldness),\nwith non-numerical values disallowed. Weights greater than or equal to\n`700` are considered bold, and weights less than `700`are not bold. The\ndefault value is `400` (\"normal\").", + "type": "integer" + }, + "fontFamily": { + "description": "The font family of the text.\n\nThe font family can be any font from the Font menu in Slides or from\n[Google Fonts] (https://fonts.google.com/). If the font name is\nunrecognized, the text is rendered in `Arial`.", + "type": "string" + } + }, + "id": "WeightedFontFamily" + }, + "PageElement": { + "description": "A visual element rendered on a page.", + "type": "object", + "properties": { + "elementGroup": { + "description": "A collection of page elements joined as a single unit.", + "$ref": "Group" + }, + "image": { + "description": "An image page element.", + "$ref": "Image" + }, + "size": { + "$ref": "Size", + "description": "The size of the page element." + }, + "title": { + "type": "string", + "description": "The title of the page element. Combined with description to display alt\ntext." + }, + "sheetsChart": { + "$ref": "SheetsChart", + "description": "A linked chart embedded from Google Sheets. Unlinked charts are\nrepresented as images." + }, + "video": { + "description": "A video page element.", + "$ref": "Video" + }, + "wordArt": { + "description": "A word art page element.", + "$ref": "WordArt" + }, + "table": { + "$ref": "Table", + "description": "A table page element." + }, + "transform": { + "description": "The transform of the page element.\n\nThe visual appearance of the page element is determined by its absolute\ntransform. To compute the absolute transform, preconcatenate a page\nelement's transform with the transforms of all of its parent groups. If the\npage element is not in a group, its absolute transform is the same as the\nvalue in this field.\n\nThe initial transform for the newly created Group is always the identity transform.", + "$ref": "AffineTransform" + }, + "objectId": { + "description": "The object ID for this page element. Object IDs used by\ngoogle.apps.slides.v1.Page and\ngoogle.apps.slides.v1.PageElement share the same namespace.", + "type": "string" + }, + "shape": { + "$ref": "Shape", + "description": "A generic shape." + }, + "line": { + "description": "A line page element.", + "$ref": "Line" + }, + "description": { + "description": "The description of the page element. Combined with title to display alt\ntext.", + "type": "string" + } + }, + "id": "PageElement" + }, + "CreateImageRequest": { + "id": "CreateImageRequest", + "description": "Creates an image.", + "type": "object", + "properties": { + "objectId": { + "type": "string", + "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated." + }, + "elementProperties": { + "$ref": "PageElementProperties", + "description": "The element properties for the image.\n\nWhen the aspect ratio of the provided size does not match the image aspect\nratio, the image is scaled and centered with respect to the size in order\nto maintain aspect ratio. The provided transform is applied after this\noperation." + }, + "url": { + "description": "The image URL.\n\nThe image is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Images must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.\n\nThe provided URL can be at maximum 2K bytes large.", + "type": "string" + } + } + }, + "CreateParagraphBulletsRequest": { + "description": "Creates bullets for all of the paragraphs that overlap with the given\ntext index range.\n\nThe nesting level of each paragraph will be determined by counting leading\ntabs in front of each paragraph. To avoid excess space between the bullet and\nthe corresponding paragraph, these leading tabs are removed by this request.\nThis may change the indices of parts of the text.\n\nIf the paragraph immediately before paragraphs being updated is in a list\nwith a matching preset, the paragraphs being updated are added to that\npreceding list.", + "type": "object", + "properties": { + "bulletPreset": { + "enumDescriptions": [ + "A bulleted list with a `DISC`, `CIRCLE` and `SQUARE` bullet glyph for the\nfirst 3 list nesting levels.", + "A bulleted list with a `DIAMONDX`, `ARROW3D` and `SQUARE` bullet glyph for\nthe first 3 list nesting levels.", + "A bulleted list with `CHECKBOX` bullet glyphs for all list nesting levels.", + "A bulleted list with a `ARROW`, `DIAMOND` and `DISC` bullet glyph for\nthe first 3 list nesting levels.", + "A bulleted list with a `STAR`, `CIRCLE` and `SQUARE` bullet glyph for\nthe first 3 list nesting levels.", + "A bulleted list with a `ARROW3D`, `CIRCLE` and `SQUARE` bullet glyph for\nthe first 3 list nesting levels.", + "A bulleted list with a `LEFTTRIANGLE`, `DIAMOND` and `DISC` bullet glyph\nfor the first 3 list nesting levels.", + "A bulleted list with a `DIAMONDX`, `HOLLOWDIAMOND` and `SQUARE` bullet\nglyph for the first 3 list nesting levels.", + "A bulleted list with a `DIAMOND`, `CIRCLE` and `SQUARE` bullet glyph\nfor the first 3 list nesting levels.", + "A numbered list with `DIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods.", + "A numbered list with `DIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by parenthesis.", + "A numbered list with `DIGIT` numeric glyphs separated by periods, where\neach nesting level uses the previous nesting level's glyph as a prefix.\nFor example: '1.', '1.1.', '2.', '2.2.'.", + "A numbered list with `UPPERALPHA`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods.", + "A numbered list with `UPPERROMAN`, `UPPERALPHA` and `DIGIT` numeric glyphs\nfor the first 3 list nesting levels, followed by periods.", + "A numbered list with `ZERODIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods." + ], + "enum": [ + "BULLET_DISC_CIRCLE_SQUARE", + "BULLET_DIAMONDX_ARROW3D_SQUARE", + "BULLET_CHECKBOX", + "BULLET_ARROW_DIAMOND_DISC", + "BULLET_STAR_CIRCLE_SQUARE", + "BULLET_ARROW3D_CIRCLE_SQUARE", + "BULLET_LEFTTRIANGLE_DIAMOND_DISC", + "BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE", + "BULLET_DIAMOND_CIRCLE_SQUARE", + "NUMBERED_DIGIT_ALPHA_ROMAN", + "NUMBERED_DIGIT_ALPHA_ROMAN_PARENS", + "NUMBERED_DIGIT_NESTED", + "NUMBERED_UPPERALPHA_ALPHA_ROMAN", + "NUMBERED_UPPERROMAN_UPPERALPHA_DIGIT", + "NUMBERED_ZERODIGIT_ALPHA_ROMAN" + ], + "description": "The kinds of bullet glyphs to be used. Defaults to the\n`BULLET_DISC_CIRCLE_SQUARE` preset.", + "type": "string" + }, + "cellLocation": { + "description": "The optional table cell location if the text to be modified is in a table\ncell. If present, the object_id must refer to a table.", + "$ref": "TableCellLocation" + }, + "textRange": { + "$ref": "Range", + "description": "The range of text to apply the bullet presets to, based on TextElement indexes." + }, + "objectId": { + "description": "The object ID of the shape or table containing the text to add bullets to.", + "type": "string" + } + }, + "id": "CreateParagraphBulletsRequest" + }, + "Size": { + "description": "A width and height.", + "type": "object", + "properties": { + "height": { + "description": "The height of the object.", + "$ref": "Dimension" + }, + "width": { + "$ref": "Dimension", + "description": "The width of the object." + } + }, + "id": "Size" + }, + "TextStyle": { + "description": "Represents the styling that can be applied to a TextRun.\n\nIf this text is contained in a shape with a parent placeholder, then these text styles may be\ninherited from the parent. Which text styles are inherited depend on the\nnesting level of lists:\n\n* A text run in a paragraph that is not in a list will inherit its text style\n from the the newline character in the paragraph at the 0 nesting level of\n the list inside the parent placeholder.\n* A text run in a paragraph that is in a list will inherit its text style\n from the newline character in the paragraph at its corresponding nesting\n level of the list inside the parent placeholder.\n\nInherited text styles are represented as unset fields in this message. If\ntext is contained in a shape without a parent placeholder, unsetting these\nfields will revert the style to a value matching the defaults in the Slides\neditor.", + "type": "object", + "properties": { + "smallCaps": { + "description": "Whether or not the text is in small capital letters.", + "type": "boolean" + }, + "backgroundColor": { + "$ref": "OptionalColor", + "description": "The background color of the text. If set, the color is either opaque or\ntransparent, depending on if the `opaque_color` field in it is set." + }, + "underline": { + "description": "Whether or not the text is underlined.", + "type": "boolean" + }, + "link": { + "description": "The hyperlink destination of the text. If unset, there is no link. Links\nare not inherited from parent text.\n\nChanging the link in an update request causes some other changes to the\ntext style of the range:\n\n* When setting a link, the text foreground color will be set to\n ThemeColorType.HYPERLINK and the text will\n be underlined. If these fields are modified in the same\n request, those values will be used instead of the link defaults.\n* Setting a link on a text range that overlaps with an existing link will\n also update the existing link to point to the new URL.\n* Links are not settable on newline characters. As a result, setting a link\n on a text range that crosses a paragraph boundary, such as `\"ABC\\n123\"`,\n will separate the newline character(s) into their own text runs. The\n link will be applied separately to the runs before and after the newline.\n* Removing a link will update the text style of the range to match the\n style of the preceding text (or the default text styles if the preceding\n text is another link) unless different styles are being set in the same\n request.", + "$ref": "Link" + }, + "bold": { + "description": "Whether or not the text is rendered as bold.", + "type": "boolean" + }, + "foregroundColor": { + "description": "The color of the text itself. If set, the color is either opaque or\ntransparent, depending on if the `opaque_color` field in it is set.", + "$ref": "OptionalColor" + }, + "fontFamily": { + "description": "The font family of the text.\n\nThe font family can be any font from the Font menu in Slides or from\n[Google Fonts] (https://fonts.google.com/). If the font name is\nunrecognized, the text is rendered in `Arial`.\n\nSome fonts can affect the weight of the text. If an update request\nspecifies values for both `font_family` and `bold`, the explicitly-set\n`bold` value is used.", + "type": "string" + }, + "strikethrough": { + "description": "Whether or not the text is struck through.", + "type": "boolean" + }, + "italic": { + "description": "Whether or not the text is italicized.", + "type": "boolean" + }, + "fontSize": { + "$ref": "Dimension", + "description": "The size of the text's font. When read, the `font_size` will specified in\npoints." + }, + "baselineOffset": { + "enumDescriptions": [ + "The text's baseline offset is inherited from the parent.", + "The text is not vertically offset.", + "The text is vertically offset upwards (superscript).", + "The text is vertically offset downwards (subscript)." + ], + "enum": [ + "BASELINE_OFFSET_UNSPECIFIED", + "NONE", + "SUPERSCRIPT", + "SUBSCRIPT" + ], + "description": "The text's vertical offset from its normal position.\n\nText with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is automatically\nrendered in a smaller font size, computed based on the `font_size` field.\nThe `font_size` itself is not affected by changes in this field.", + "type": "string" + }, + "weightedFontFamily": { + "$ref": "WeightedFontFamily", + "description": "The font family and rendered weight of the text.\n\nThis field is an extension of `font_family` meant to support explicit font\nweights without breaking backwards compatibility. As such, when reading the\nstyle of a range of text, the value of `weighted_font_family#font_family`\nwill always be equal to that of `font_family`. However, when writing, if\nboth fields are included in the field mask (either explicitly or through\nthe wildcard `\"*\"`), their values are reconciled as follows:\n\n* If `font_family` is set and `weighted_font_family` is not, the value of\n `font_family` is applied with weight `400` (\"normal\").\n* If both fields are set, the value of `font_family` must match that of\n `weighted_font_family#font_family`. If so, the font family and weight of\n `weighted_font_family` is applied. Otherwise, a 400 bad request error is\n returned.\n* If `weighted_font_family` is set and `font_family` is not, the font\n family and weight of `weighted_font_family` is applied.\n* If neither field is set, the font family and weight of the text inherit\n from the parent. Note that these properties cannot inherit separately\n from each other.\n\nIf an update request specifies values for both `weighted_font_family` and\n`bold`, the `weighted_font_family` is applied first, then `bold`.\n\nIf `weighted_font_family#weight` is not set, it defaults to `400`.\n\nIf `weighted_font_family` is set, then `weighted_font_family#font_family`\nmust also be set with a non-empty value. Otherwise, a 400 bad request error\nis returned." + } + }, + "id": "TextStyle" + }, + "UpdateVideoPropertiesRequest": { + "description": "Update the properties of a Video.", + "type": "object", + "properties": { + "fields": { + "type": "string", + "format": "google-fieldmask", + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `videoProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the video outline color, set `fields` to\n`\"outline.outlineFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset." + }, + "objectId": { + "description": "The object ID of the video the updates are applied to.", + "type": "string" + }, + "videoProperties": { + "$ref": "VideoProperties", + "description": "The video properties to update." + } + }, + "id": "UpdateVideoPropertiesRequest" + }, "Request": { "description": "A single kind of update to apply to a presentation.", "type": "object", "properties": { + "replaceAllText": { + "$ref": "ReplaceAllTextRequest", + "description": "Replaces all instances of specified text." + }, + "updateImageProperties": { + "$ref": "UpdateImagePropertiesRequest", + "description": "Updates the properties of an Image." + }, + "createSlide": { + "description": "Creates a new slide.", + "$ref": "CreateSlideRequest" + }, + "insertTableRows": { + "$ref": "InsertTableRowsRequest", + "description": "Inserts rows into a table." + }, + "updateLineProperties": { + "$ref": "UpdateLinePropertiesRequest", + "description": "Updates the properties of a Line." + }, + "updateSlidesPosition": { + "description": "Updates the position of a set of slides in the presentation.", + "$ref": "UpdateSlidesPositionRequest" + }, + "deleteTableRow": { + "$ref": "DeleteTableRowRequest", + "description": "Deletes a row from a table." + }, + "updateShapeProperties": { + "description": "Updates the properties of a Shape.", + "$ref": "UpdateShapePropertiesRequest" + }, "insertText": { "$ref": "InsertTextRequest", "description": "Inserts text into a shape or table cell." }, "deleteText": { - "description": "Deletes text from a shape or a table cell.", - "$ref": "DeleteTextRequest" + "$ref": "DeleteTextRequest", + "description": "Deletes text from a shape or a table cell." }, "updatePageProperties": { "description": "Updates the properties of a Page.", "$ref": "UpdatePagePropertiesRequest" }, "createShape": { - "$ref": "CreateShapeRequest", - "description": "Creates a new shape." + "description": "Creates a new shape.", + "$ref": "CreateShapeRequest" }, "deleteParagraphBullets": { - "description": "Deletes bullets from paragraphs.", - "$ref": "DeleteParagraphBulletsRequest" + "$ref": "DeleteParagraphBulletsRequest", + "description": "Deletes bullets from paragraphs." }, "insertTableColumns": { "description": "Inserts columns into a table.", "$ref": "InsertTableColumnsRequest" }, "refreshSheetsChart": { - "$ref": "RefreshSheetsChartRequest", - "description": "Refreshes a Google Sheets chart." + "description": "Refreshes a Google Sheets chart.", + "$ref": "RefreshSheetsChartRequest" }, "createTable": { - "$ref": "CreateTableRequest", - "description": "Creates a new table." + "description": "Creates a new table.", + "$ref": "CreateTableRequest" }, "updateTableCellProperties": { "description": "Updates the properties of a TableCell.", "$ref": "UpdateTableCellPropertiesRequest" }, "deleteObject": { - "$ref": "DeleteObjectRequest", - "description": "Deletes a page or page element from the presentation." + "description": "Deletes a page or page element from the presentation.", + "$ref": "DeleteObjectRequest" }, "updateParagraphStyle": { - "$ref": "UpdateParagraphStyleRequest", - "description": "Updates the styling of paragraphs within a Shape or Table." + "description": "Updates the styling of paragraphs within a Shape or Table.", + "$ref": "UpdateParagraphStyleRequest" + }, + "deleteTableColumn": { + "$ref": "DeleteTableColumnRequest", + "description": "Deletes a column from a table." }, "duplicateObject": { "$ref": "DuplicateObjectRequest", "description": "Duplicates a slide or page element." }, - "deleteTableColumn": { - "description": "Deletes a column from a table.", - "$ref": "DeleteTableColumnRequest" - }, - "createLine": { - "description": "Creates a line.", - "$ref": "CreateLineRequest" - }, "updateVideoProperties": { "$ref": "UpdateVideoPropertiesRequest", "description": "Updates the properties of a Video." }, + "createLine": { + "$ref": "CreateLineRequest", + "description": "Creates a line." + }, "createImage": { "$ref": "CreateImageRequest", "description": "Creates an image." @@ -86,16 +1252,16 @@ "description": "Creates a video." }, "replaceAllShapesWithSheetsChart": { - "description": "Replaces all shapes matching some criteria with a Google Sheets chart.", - "$ref": "ReplaceAllShapesWithSheetsChartRequest" + "$ref": "ReplaceAllShapesWithSheetsChartRequest", + "description": "Replaces all shapes matching some criteria with a Google Sheets chart." }, "createSheetsChart": { - "$ref": "CreateSheetsChartRequest", - "description": "Creates an embedded Google Sheets chart." + "description": "Creates an embedded Google Sheets chart.", + "$ref": "CreateSheetsChartRequest" }, "updatePageElementTransform": { - "$ref": "UpdatePageElementTransformRequest", - "description": "Updates the transform of a page element." + "description": "Updates the transform of a page element.", + "$ref": "UpdatePageElementTransformRequest" }, "updateTextStyle": { "$ref": "UpdateTextStyleRequest", @@ -104,71 +1270,39 @@ "replaceAllShapesWithImage": { "description": "Replaces all shapes matching some criteria with an image.", "$ref": "ReplaceAllShapesWithImageRequest" - }, - "replaceAllText": { - "description": "Replaces all instances of specified text.", - "$ref": "ReplaceAllTextRequest" - }, - "updateImageProperties": { - "$ref": "UpdateImagePropertiesRequest", - "description": "Updates the properties of an Image." - }, - "insertTableRows": { - "$ref": "InsertTableRowsRequest", - "description": "Inserts rows into a table." - }, - "createSlide": { - "$ref": "CreateSlideRequest", - "description": "Creates a new slide." - }, - "updateLineProperties": { - "description": "Updates the properties of a Line.", - "$ref": "UpdateLinePropertiesRequest" - }, - "updateSlidesPosition": { - "description": "Updates the position of a set of slides in the presentation.", - "$ref": "UpdateSlidesPositionRequest" - }, - "deleteTableRow": { - "description": "Deletes a row from a table.", - "$ref": "DeleteTableRowRequest" - }, - "updateShapeProperties": { - "description": "Updates the properties of a Shape.", - "$ref": "UpdateShapePropertiesRequest" } }, "id": "Request" }, "UpdateImagePropertiesRequest": { - "id": "UpdateImagePropertiesRequest", "description": "Update the properties of an Image.", "type": "object", "properties": { - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `imageProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the image outline color, set `fields` to\n`\"outline.outlineFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", - "type": "string" - }, "imageProperties": { - "$ref": "ImageProperties", - "description": "The image properties to update." + "description": "The image properties to update.", + "$ref": "ImageProperties" }, "objectId": { "description": "The object ID of the image the updates are applied to.", "type": "string" + }, + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `imageProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the image outline color, set `fields` to\n`\"outline.outlineFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "type": "string" } - } + }, + "id": "UpdateImagePropertiesRequest" }, "ParagraphStyle": { - "description": "Styles that apply to a whole paragraph.\n\nIf this text is contained in a shape with a parent placeholder, then these paragraph styles may be\ninherited from the parent. Which paragraph styles are inherited depend on the\nnesting level of lists:\n\n* A paragraph not in a list will inherit its paragraph style from the\n paragraph at the 0 nesting level of the list inside the parent placeholder.\n* A paragraph in a list will inherit its paragraph style from the paragraph\n at its corresponding nesting level of the list inside the parent\n placeholder.\n\nInherited paragraph styles are represented as unset fields in this message.", "type": "object", "properties": { "spaceBelow": { - "description": "The amount of extra space above the paragraph. If unset, the value is\ninherited from the parent.", - "$ref": "Dimension" + "$ref": "Dimension", + "description": "The amount of extra space above the paragraph. If unset, the value is\ninherited from the parent." }, "direction": { + "type": "string", "enumDescriptions": [ "The text direction is inherited from the parent.", "The text goes from left to right.", @@ -179,8 +1313,7 @@ "LEFT_TO_RIGHT", "RIGHT_TO_LEFT" ], - "description": "The text direction of this paragraph. If unset, the value defaults to\nLEFT_TO_RIGHT since\ntext direction is not inherited.", - "type": "string" + "description": "The text direction of this paragraph. If unset, the value defaults to\nLEFT_TO_RIGHT since\ntext direction is not inherited." }, "spacingMode": { "enumDescriptions": [ @@ -205,8 +1338,8 @@ "description": "The amount indentation for the paragraph on the side that corresponds to\nthe start of the text, based on the current text direction. If unset, the\nvalue is inherited from the parent." }, "spaceAbove": { - "$ref": "Dimension", - "description": "The amount of extra space above the paragraph. If unset, the value is\ninherited from the parent." + "description": "The amount of extra space above the paragraph. If unset, the value is\ninherited from the parent.", + "$ref": "Dimension" }, "indentFirstLine": { "$ref": "Dimension", @@ -236,11 +1369,10 @@ "type": "string" } }, - "id": "ParagraphStyle" + "id": "ParagraphStyle", + "description": "Styles that apply to a whole paragraph.\n\nIf this text is contained in a shape with a parent placeholder, then these paragraph styles may be\ninherited from the parent. Which paragraph styles are inherited depend on the\nnesting level of lists:\n\n* A paragraph not in a list will inherit its paragraph style from the\n paragraph at the 0 nesting level of the list inside the parent placeholder.\n* A paragraph in a list will inherit its paragraph style from the paragraph\n at its corresponding nesting level of the list inside the parent\n placeholder.\n\nInherited paragraph styles are represented as unset fields in this message." }, "ReplaceAllShapesWithSheetsChartResponse": { - "id": "ReplaceAllShapesWithSheetsChartResponse", - "description": "The result of replacing shapes with a Google Sheets chart.", "type": "object", "properties": { "occurrencesChanged": { @@ -248,7 +1380,9 @@ "description": "The number of shapes replaced with charts.", "type": "integer" } - } + }, + "id": "ReplaceAllShapesWithSheetsChartResponse", + "description": "The result of replacing shapes with a Google Sheets chart." }, "TableCellProperties": { "description": "The properties of the TableCell.", @@ -261,24 +1395,13 @@ }, "id": "TableCellProperties" }, - "RefreshSheetsChartRequest": { - "type": "object", - "properties": { - "objectId": { - "type": "string", - "description": "The object ID of the chart to refresh." - } - }, - "id": "RefreshSheetsChartRequest", - "description": "Refreshes an embedded Google Sheets chart by replacing it with the latest\nversion of the chart from Google Sheets.\n\nNOTE: Refreshing charts requires at least one of the spreadsheets.readonly,\nspreadsheets, drive.readonly, or drive OAuth scopes." - }, "Outline": { "description": "The outline of a PageElement.\n\nIf these fields are unset, they may be inherited from a parent placeholder\nif it exists. If there is no parent, the fields will default to the value\nused for new page elements created in the Slides editor, which may depend on\nthe page element kind.", "type": "object", "properties": { "outlineFill": { - "description": "The fill of the outline.", - "$ref": "OutlineFill" + "$ref": "OutlineFill", + "description": "The fill of the outline." }, "weight": { "description": "The thickness of the outline.", @@ -323,25 +1446,35 @@ }, "id": "Outline" }, - "NotesProperties": { - "description": "The properties of Page that are only\nrelevant for pages with page_type NOTES.", - "type": "object", + "RefreshSheetsChartRequest": { "properties": { - "speakerNotesObjectId": { - "description": "The object ID of the shape on this notes page that contains the speaker\nnotes for the corresponding slide.\nThe actual shape may not always exist on the notes page. Inserting text\nusing this object ID will automatically create the shape. In this case, the\nactual shape may have different object ID. The `GetPresentation` or\n`GetPage` action will always return the latest object ID.", + "objectId": { + "description": "The object ID of the chart to refresh.", "type": "string" } }, - "id": "NotesProperties" + "id": "RefreshSheetsChartRequest", + "description": "Refreshes an embedded Google Sheets chart by replacing it with the latest\nversion of the chart from Google Sheets.\n\nNOTE: Refreshing charts requires at least one of the spreadsheets.readonly,\nspreadsheets, drive.readonly, or drive OAuth scopes.", + "type": "object" + }, + "TableColumnProperties": { + "description": "Properties of each column in a table.", + "type": "object", + "properties": { + "columnWidth": { + "$ref": "Dimension", + "description": "Width of a column." + } + }, + "id": "TableColumnProperties" }, "ShapeProperties": { - "id": "ShapeProperties", "description": "The properties of a Shape.\n\nIf the shape is a placeholder shape as determined by the\nplaceholder field, then these\nproperties may be inherited from a parent placeholder shape.\nDetermining the rendered value of the property depends on the corresponding\nproperty_state field value.", "type": "object", "properties": { "outline": { - "description": "The outline of the shape. If unset, the outline is inherited from a\nparent placeholder if it exists. If the shape has no parent, then the\ndefault outline depends on the shape type, matching the defaults for\nnew shapes created in the Slides editor.", - "$ref": "Outline" + "$ref": "Outline", + "description": "The outline of the shape. If unset, the outline is inherited from a\nparent placeholder if it exists. If the shape has no parent, then the\ndefault outline depends on the shape type, matching the defaults for\nnew shapes created in the Slides editor." }, "shadow": { "$ref": "Shadow", @@ -355,20 +1488,24 @@ "description": "The hyperlink destination of the shape. If unset, there is no link. Links\nare not inherited from parent placeholders.", "$ref": "Link" } - } + }, + "id": "ShapeProperties" }, - "TableColumnProperties": { - "description": "Properties of each column in a table.", + "NotesProperties": { + "description": "The properties of Page that are only\nrelevant for pages with page_type NOTES.", "type": "object", "properties": { - "columnWidth": { - "$ref": "Dimension", - "description": "Width of a column." + "speakerNotesObjectId": { + "description": "The object ID of the shape on this notes page that contains the speaker\nnotes for the corresponding slide.\nThe actual shape may not always exist on the notes page. Inserting text\nusing this object ID will automatically create the shape. In this case, the\nactual shape may have different object ID. The `GetPresentation` or\n`GetPage` action will always return the latest object ID.", + "type": "string" } }, - "id": "TableColumnProperties" + "id": "NotesProperties" }, "TableRow": { + "id": "TableRow", + "description": "Properties and contents of each row in a table.", + "type": "object", "properties": { "tableCells": { "description": "Properties and contents of each cell.\n\nCells that span multiple columns are represented only once with a\ncolumn_span greater\nthan 1. As a result, the length of this collection does not always match\nthe number of columns of the entire table.", @@ -381,48 +1518,40 @@ "$ref": "Dimension", "description": "Height of a row." } - }, - "id": "TableRow", - "description": "Properties and contents of each row in a table.", - "type": "object" + } }, "UpdateTableCellPropertiesRequest": { + "id": "UpdateTableCellPropertiesRequest", "description": "Update the properties of a TableCell.", "type": "object", "properties": { - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `tableCellProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the table cell background solid fill color, set\n`fields` to `\"tableCellBackgroundFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", - "type": "string" - }, "tableRange": { "$ref": "TableRange", "description": "The table range representing the subset of the table to which the updates\nare applied. If a table range is not specified, the updates will apply to\nthe entire table." }, "objectId": { - "description": "The object ID of the table.", - "type": "string" + "type": "string", + "description": "The object ID of the table." }, "tableCellProperties": { "$ref": "TableCellProperties", "description": "The table cell properties to update." + }, + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `tableCellProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the table cell background solid fill color, set\n`fields` to `\"tableCellBackgroundFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "type": "string" } - }, - "id": "UpdateTableCellPropertiesRequest" + } }, "CreateSlideRequest": { + "id": "CreateSlideRequest", + "description": "Creates a new slide.", "type": "object", "properties": { - "placeholderIdMappings": { - "description": "An optional list of object ID mappings from the placeholder(s) on the layout to the placeholder(s)\nthat will be created on the new slide from that specified layout. Can only\nbe used when `slide_layout_reference` is specified.", - "items": { - "$ref": "LayoutPlaceholderIdMapping" - }, - "type": "array" - }, "slideLayoutReference": { - "$ref": "LayoutReference", - "description": "Layout reference of the slide to be inserted, based on the *current\nmaster*, which is one of the following:\n\n- The master of the previous slide index.\n- The master of the first slide, if the insertion_index is zero.\n- The first master in the presentation, if there are no slides.\n\nIf the LayoutReference is not found in the current master, a 400 bad\nrequest error is returned.\n\nIf you don't specify a layout reference, then the new slide will use the\npredefined layout `BLANK`." + "description": "Layout reference of the slide to be inserted, based on the *current\nmaster*, which is one of the following:\n\n- The master of the previous slide index.\n- The master of the first slide, if the insertion_index is zero.\n- The first master in the presentation, if there are no slides.\n\nIf the LayoutReference is not found in the current master, a 400 bad\nrequest error is returned.\n\nIf you don't specify a layout reference, then the new slide will use the\npredefined layout `BLANK`.", + "$ref": "LayoutReference" }, "objectId": { "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", @@ -432,10 +1561,15 @@ "format": "int32", "description": "The optional zero-based index indicating where to insert the slides.\n\nIf you don't specify an index, the new slide is created at the end.", "type": "integer" + }, + "placeholderIdMappings": { + "items": { + "$ref": "LayoutPlaceholderIdMapping" + }, + "type": "array", + "description": "An optional list of object ID mappings from the placeholder(s) on the layout to the placeholder(s)\nthat will be created on the new slide from that specified layout. Can only\nbe used when `slide_layout_reference` is specified." } - }, - "id": "CreateSlideRequest", - "description": "Creates a new slide." + } }, "BatchUpdatePresentationRequest": { "description": "Request message for PresentationsService.BatchUpdatePresentation.", @@ -449,46 +1583,45 @@ "type": "array" }, "writeControl": { - "$ref": "WriteControl", - "description": "Provides control over how write requests are executed." + "description": "Provides control over how write requests are executed.", + "$ref": "WriteControl" } }, "id": "BatchUpdatePresentationRequest" }, "TextContent": { - "id": "TextContent", "description": "The general text content. The text must reside in a compatible shape (e.g.\ntext box or rectangle) or a table cell in a page.", "type": "object", "properties": { - "lists": { - "additionalProperties": { - "$ref": "List" - }, - "description": "The bulleted lists contained in this text, keyed by list ID.", - "type": "object" - }, "textElements": { "description": "The text contents broken down into its component parts, including styling\ninformation. This property is read-only.", "items": { "$ref": "TextElement" }, "type": "array" + }, + "lists": { + "description": "The bulleted lists contained in this text, keyed by list ID.", + "type": "object", + "additionalProperties": { + "$ref": "List" + } + } + }, + "id": "TextContent" + }, + "CreateSheetsChartResponse": { + "id": "CreateSheetsChartResponse", + "description": "The result of creating an embedded Google Sheets chart.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the created chart.", + "type": "string" } } }, - "CreateSheetsChartResponse": { - "properties": { - "objectId": { - "type": "string", - "description": "The object ID of the created chart." - } - }, - "id": "CreateSheetsChartResponse", - "description": "The result of creating an embedded Google Sheets chart.", - "type": "object" - }, "WriteControl": { - "description": "Provides control over how write requests are executed.", "type": "object", "properties": { "requiredRevisionId": { @@ -496,38 +1629,39 @@ "type": "string" } }, - "id": "WriteControl" + "id": "WriteControl", + "description": "Provides control over how write requests are executed." }, "DeleteParagraphBulletsRequest": { - "description": "Deletes bullets from all of the paragraphs that overlap with the given text\nindex range.\n\nThe nesting level of each paragraph will be visually preserved by adding\nindent to the start of the corresponding paragraph.", - "type": "object", "properties": { + "cellLocation": { + "description": "The optional table cell location if the text to be modified is in a table\ncell. If present, the object_id must refer to a table.", + "$ref": "TableCellLocation" + }, "textRange": { - "$ref": "Range", - "description": "The range of text to delete bullets from, based on TextElement indexes." + "description": "The range of text to delete bullets from, based on TextElement indexes.", + "$ref": "Range" }, "objectId": { "description": "The object ID of the shape or table containing the text to delete bullets\nfrom.", "type": "string" - }, - "cellLocation": { - "$ref": "TableCellLocation", - "description": "The optional table cell location if the text to be modified is in a table\ncell. If present, the object_id must refer to a table." } }, - "id": "DeleteParagraphBulletsRequest" + "id": "DeleteParagraphBulletsRequest", + "description": "Deletes bullets from all of the paragraphs that overlap with the given text\nindex range.\n\nThe nesting level of each paragraph will be visually preserved by adding\nindent to the start of the corresponding paragraph.", + "type": "object" }, "ParagraphMarker": { "description": "A TextElement kind that represents the beginning of a new paragraph.", "type": "object", "properties": { - "bullet": { - "description": "The bullet for this paragraph. If not present, the paragraph does not\nbelong to a list.", - "$ref": "Bullet" - }, "style": { - "description": "The paragraph's style", - "$ref": "ParagraphStyle" + "$ref": "ParagraphStyle", + "description": "The paragraph's style" + }, + "bullet": { + "$ref": "Bullet", + "description": "The bullet for this paragraph. If not present, the paragraph does not\nbelong to a list." } }, "id": "ParagraphMarker" @@ -537,17 +1671,17 @@ "type": "object", "properties": { "number": { - "type": "integer", "format": "int32", - "description": "The number of columns to be inserted. Maximum 20 per request." + "description": "The number of columns to be inserted. Maximum 20 per request.", + "type": "integer" }, "cellLocation": { - "$ref": "TableCellLocation", - "description": "The reference table cell location from which columns will be inserted.\n\nA new column will be inserted to the left (or right) of the column where\nthe reference cell is. If the reference cell is a merged cell, a new\ncolumn will be inserted to the left (or right) of the merged cell." + "description": "The reference table cell location from which columns will be inserted.\n\nA new column will be inserted to the left (or right) of the column where\nthe reference cell is. If the reference cell is a merged cell, a new\ncolumn will be inserted to the left (or right) of the merged cell.", + "$ref": "TableCellLocation" }, "insertRight": { - "type": "boolean", - "description": "Whether to insert new columns to the right of the reference cell location.\n\n- `True`: insert to the right.\n- `False`: insert to the left." + "description": "Whether to insert new columns to the right of the reference cell location.\n\n- `True`: insert to the right.\n- `False`: insert to the left.", + "type": "boolean" }, "tableObjectId": { "description": "The table to insert columns into.", @@ -557,9 +1691,15 @@ "id": "InsertTableColumnsRequest" }, "Thumbnail": { + "id": "Thumbnail", "description": "The thumbnail of a page.", "type": "object", "properties": { + "width": { + "format": "int32", + "description": "The positive width in pixels of the thumbnail image.", + "type": "integer" + }, "height": { "format": "int32", "description": "The positive height in pixels of the thumbnail image.", @@ -568,17 +1708,10 @@ "contentUrl": { "description": "The content URL of the thumbnail image.\n\nThe URL to the image has a default lifetime of 30 minutes.\nThis URL is tagged with the account of the requester. Anyone with the URL\neffectively accesses the image as the original requester. Access to the\nimage may be lost if the presentation's sharing settings change.\nThe mime type of the thumbnail image is the same as specified in the\n`GetPageThumbnailRequest`.", "type": "string" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "The positive width in pixels of the thumbnail image." } - }, - "id": "Thumbnail" + } }, "LayoutPlaceholderIdMapping": { - "description": "The user-specified ID mapping for a placeholder that will be created on a\nslide from a specified layout.", "type": "object", "properties": { "objectId": { @@ -594,10 +1727,10 @@ "type": "string" } }, - "id": "LayoutPlaceholderIdMapping" + "id": "LayoutPlaceholderIdMapping", + "description": "The user-specified ID mapping for a placeholder that will be created on a\nslide from a specified layout." }, "UpdateShapePropertiesRequest": { - "description": "Update the properties of a Shape.", "type": "object", "properties": { "fields": { @@ -610,13 +1743,15 @@ "type": "string" }, "shapeProperties": { - "description": "The shape properties to update.", - "$ref": "ShapeProperties" + "$ref": "ShapeProperties", + "description": "The shape properties to update." } }, - "id": "UpdateShapePropertiesRequest" + "id": "UpdateShapePropertiesRequest", + "description": "Update the properties of a Shape." }, "WordArt": { + "id": "WordArt", "description": "A PageElement kind representing\nword art.", "type": "object", "properties": { @@ -624,21 +1759,22 @@ "description": "The text rendered as word art.", "type": "string" } - }, - "id": "WordArt" + } }, "Recolor": { + "id": "Recolor", "description": "A recolor effect applied on an image.", "type": "object", "properties": { "recolorStops": { + "description": "The recolor effect is represented by a gradient, which is a list of color\nstops.\n\nThe colors in the gradient will replace the corresponding colors at\nthe same position in the color palette and apply to the image. This\nproperty is read-only.", "items": { "$ref": "ColorStop" }, - "type": "array", - "description": "The recolor effect is represented by a gradient, which is a list of color\nstops.\n\nThe colors in the gradient will replace the corresponding colors at\nthe same position in the color palette and apply to the image. This\nproperty is read-only." + "type": "array" }, "name": { + "type": "string", "enumDescriptions": [ "No recolor effect. The default value.", "A recolor effect that lightens the image using the page's first available\ncolor from its color scheme.", @@ -693,14 +1829,11 @@ "SEPIA", "CUSTOM" ], - "description": "The name of the recolor effect.\n\nThe name is determined from the `recolor_stops` by matching the gradient\nagainst the colors in the page's current color scheme. This property is\nread-only.", - "type": "string" + "description": "The name of the recolor effect.\n\nThe name is determined from the `recolor_stops` by matching the gradient\nagainst the colors in the page's current color scheme. This property is\nread-only." } - }, - "id": "Recolor" + } }, "Link": { - "description": "A hypertext link.", "type": "object", "properties": { "pageObjectId": { @@ -713,8 +1846,6 @@ "type": "integer" }, "relativeLink": { - "description": "If set, indicates this is a link to a slide in this presentation,\naddressed by its position.", - "type": "string", "enumDescriptions": [ "An unspecified relative slide link.", "A link to the next slide.", @@ -728,52 +1859,63 @@ "PREVIOUS_SLIDE", "FIRST_SLIDE", "LAST_SLIDE" - ] + ], + "description": "If set, indicates this is a link to a slide in this presentation,\naddressed by its position.", + "type": "string" }, "url": { "description": "If set, indicates this is a link to the external web page at this URL.", "type": "string" } }, - "id": "Link" - }, - "CreateShapeResponse": { - "properties": { - "objectId": { - "description": "The object ID of the created shape.", - "type": "string" - } - }, - "id": "CreateShapeResponse", - "description": "The result of creating a shape.", - "type": "object" + "id": "Link", + "description": "A hypertext link." }, "RgbColor": { - "id": "RgbColor", - "description": "An RGB color.", "type": "object", "properties": { "blue": { + "type": "number", "format": "float", - "description": "The blue component of the color, from 0.0 to 1.0.", - "type": "number" + "description": "The blue component of the color, from 0.0 to 1.0." }, "green": { + "type": "number", "format": "float", - "description": "The green component of the color, from 0.0 to 1.0.", - "type": "number" + "description": "The green component of the color, from 0.0 to 1.0." }, "red": { "format": "float", "description": "The red component of the color, from 0.0 to 1.0.", "type": "number" } - } + }, + "id": "RgbColor", + "description": "An RGB color." + }, + "CreateShapeResponse": { + "description": "The result of creating a shape.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the created shape.", + "type": "string" + } + }, + "id": "CreateShapeResponse" }, "CreateLineRequest": { "description": "Creates a line.", "type": "object", "properties": { + "objectId": { + "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", + "type": "string" + }, + "elementProperties": { + "$ref": "PageElementProperties", + "description": "The element properties for the line." + }, "lineCategory": { "enumDescriptions": [ "Straight connectors, including straight connector 1. The is the default\ncategory when one is not specified.", @@ -787,14 +1929,6 @@ ], "description": "The category of line to be created.", "type": "string" - }, - "objectId": { - "type": "string", - "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated." - }, - "elementProperties": { - "$ref": "PageElementProperties", - "description": "The element properties for the line." } }, "id": "CreateLineRequest" @@ -815,6 +1949,7 @@ "type": "object", "properties": { "shapeType": { + "type": "string", "enumDescriptions": [ "The shape type that is not predefined.", "Text box shape.", @@ -1105,8 +2240,7 @@ "CLOUD_CALLOUT", "CUSTOM" ], - "description": "The shape type.", - "type": "string" + "description": "The shape type." }, "objectId": { "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\nIf empty, a unique identifier will be generated.", @@ -1120,10 +2254,14 @@ "id": "CreateShapeRequest" }, "Video": { - "description": "A PageElement kind representing a\nvideo.", - "type": "object", "properties": { + "videoProperties": { + "$ref": "VideoProperties", + "description": "The properties of the video." + }, "source": { + "description": "The video source.", + "type": "string", "enumDescriptions": [ "The video source is unspecified.", "The video source is YouTube." @@ -1131,68 +2269,64 @@ "enum": [ "SOURCE_UNSPECIFIED", "YOUTUBE" - ], - "description": "The video source.", - "type": "string" + ] }, "id": { - "type": "string", - "description": "The video source's unique identifier for this video." + "description": "The video source's unique identifier for this video.", + "type": "string" }, "url": { "description": "An URL to a video. The URL is valid as long as the source video\nexists and sharing settings do not change.", "type": "string" - }, - "videoProperties": { - "$ref": "VideoProperties", - "description": "The properties of the video." } }, - "id": "Video" + "id": "Video", + "description": "A PageElement kind representing a\nvideo.", + "type": "object" }, "PageProperties": { "description": "The properties of the Page.\n\nThe page will inherit properties from the parent page. Depending on the page\ntype the hierarchy is defined in either\nSlideProperties or\nLayoutProperties.", "type": "object", "properties": { "colorScheme": { - "$ref": "ColorScheme", - "description": "The color scheme of the page. If unset, the color scheme is inherited from\na parent page. If the page has no parent, the color scheme uses a default\nSlides color scheme. This field is read-only." + "description": "The color scheme of the page. If unset, the color scheme is inherited from\na parent page. If the page has no parent, the color scheme uses a default\nSlides color scheme. This field is read-only.", + "$ref": "ColorScheme" }, "pageBackgroundFill": { - "description": "The background fill of the page. If unset, the background fill is inherited\nfrom a parent page if it exists. If the page has no parent, then the\nbackground fill defaults to the corresponding fill in the Slides editor.", - "$ref": "PageBackgroundFill" + "$ref": "PageBackgroundFill", + "description": "The background fill of the page. If unset, the background fill is inherited\nfrom a parent page if it exists. If the page has no parent, then the\nbackground fill defaults to the corresponding fill in the Slides editor." } }, "id": "PageProperties" }, "TableCell": { + "id": "TableCell", "description": "Properties and contents of each table cell.", "type": "object", "properties": { + "text": { + "description": "The text content of the cell.", + "$ref": "TextContent" + }, "tableCellProperties": { - "description": "The properties of the table cell.", - "$ref": "TableCellProperties" + "$ref": "TableCellProperties", + "description": "The properties of the table cell." }, "rowSpan": { + "type": "integer", "format": "int32", - "description": "Row span of the cell.", - "type": "integer" + "description": "Row span of the cell." }, "location": { "$ref": "TableCellLocation", "description": "The location of the cell within the table." }, "columnSpan": { - "type": "integer", "format": "int32", - "description": "Column span of the cell." - }, - "text": { - "$ref": "TextContent", - "description": "The text content of the cell." + "description": "Column span of the cell.", + "type": "integer" } - }, - "id": "TableCell" + } }, "NestingLevel": { "description": "Contains properties describing the look and feel of a list bullet at a given\nlevel of nesting.", @@ -1206,6 +2340,8 @@ "id": "NestingLevel" }, "UpdateLinePropertiesRequest": { + "description": "Updates the properties of a Line.", + "type": "object", "properties": { "lineProperties": { "$ref": "LineProperties", @@ -1221,14 +2357,35 @@ "type": "string" } }, - "id": "UpdateLinePropertiesRequest", - "description": "Updates the properties of a Line.", - "type": "object" + "id": "UpdateLinePropertiesRequest" + }, + "UpdateSlidesPositionRequest": { + "type": "object", + "properties": { + "insertionIndex": { + "format": "int32", + "description": "The index where the slides should be inserted, based on the slide\narrangement before the move takes place. Must be between zero and the\nnumber of slides in the presentation, inclusive.", + "type": "integer" + }, + "slideObjectIds": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The IDs of the slides in the presentation that should be moved.\nThe slides in this list must be in existing presentation order, without\nduplicates." + } + }, + "id": "UpdateSlidesPositionRequest", + "description": "Updates the position of slides in the presentation." }, "TableCellBackgroundFill": { "description": "The table cell background fill.", "type": "object", "properties": { + "solidFill": { + "$ref": "SolidFill", + "description": "Solid color fill." + }, "propertyState": { "description": "The background fill property state.\n\nUpdating the the fill on a table cell will implicitly update this field\nto `RENDERED`, unless another value is specified in the same request. To\nhave no fill on a table cell, set this field to `NOT_RENDERED`. In this\ncase, any other fill fields set in the same request will be ignored.", "type": "string", @@ -1242,54 +2399,33 @@ "NOT_RENDERED", "INHERIT" ] - }, - "solidFill": { - "description": "Solid color fill.", - "$ref": "SolidFill" } }, "id": "TableCellBackgroundFill" }, - "UpdateSlidesPositionRequest": { - "properties": { - "slideObjectIds": { - "description": "The IDs of the slides in the presentation that should be moved.\nThe slides in this list must be in existing presentation order, without\nduplicates.", - "items": { - "type": "string" - }, - "type": "array" - }, - "insertionIndex": { - "format": "int32", - "description": "The index where the slides should be inserted, based on the slide\narrangement before the move takes place. Must be between zero and the\nnumber of slides in the presentation, inclusive.", - "type": "integer" - } - }, - "id": "UpdateSlidesPositionRequest", - "description": "Updates the position of slides in the presentation.", - "type": "object" - }, "UpdatePagePropertiesRequest": { "description": "Updates the properties of a Page.", "type": "object", "properties": { - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `pageProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the page background solid fill color, set `fields`\nto `\"pageBackgroundFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", - "type": "string" - }, "pageProperties": { "$ref": "PageProperties", "description": "The page properties to update." }, "objectId": { - "type": "string", - "description": "The object ID of the page the update is applied to." + "description": "The object ID of the page the update is applied to.", + "type": "string" + }, + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `pageProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the page background solid fill color, set `fields`\nto `\"pageBackgroundFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "type": "string" } }, "id": "UpdatePagePropertiesRequest" }, "Group": { + "description": "A PageElement kind representing a\njoined collection of PageElements.", + "type": "object", "properties": { "children": { "description": "The collection of elements in the group. The minimum size of a group is 2.", @@ -1299,16 +2435,13 @@ "type": "array" } }, - "id": "Group", - "description": "A PageElement kind representing a\njoined collection of PageElements.", - "type": "object" + "id": "Group" }, "Placeholder": { "description": "The placeholder information that uniquely identifies a placeholder shape.", "type": "object", "properties": { "type": { - "type": "string", "enumDescriptions": [ "Default value, signifies it is not a placeholder.", "Body text.", @@ -1347,7 +2480,8 @@ "TITLE", "SLIDE_IMAGE" ], - "description": "The type of the placeholder." + "description": "The type of the placeholder.", + "type": "string" }, "parentObjectId": { "description": "The object ID of this shape's parent placeholder.\nIf unset, the parent placeholder shape does not exist, so the shape does\nnot inherit properties from any other shape.", @@ -1366,11 +2500,11 @@ "type": "object", "properties": { "objectIds": { - "description": "The object being duplicated may contain other objects, for example when\nduplicating a slide or a group page element. This map defines how the IDs\nof duplicated objects are generated: the keys are the IDs of the original\nobjects and its values are the IDs that will be assigned to the\ncorresponding duplicate object. The ID of the source object's duplicate\nmay be specified in this map as well, using the same value of the\n`object_id` field as a key and the newly desired ID as the value.\n\nAll keys must correspond to existing IDs in the presentation. All values\nmust be unique in the presentation and must start with an alphanumeric\ncharacter or an underscore (matches regex `[a-zA-Z0-9_]`); remaining\ncharacters may include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`). The length of the new ID must not be less than 5 or\ngreater than 50.\n\nIf any IDs of source objects are omitted from the map, a new random ID will\nbe assigned. If the map is empty or unset, all duplicate objects will\nreceive a new random ID.", "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "The object being duplicated may contain other objects, for example when\nduplicating a slide or a group page element. This map defines how the IDs\nof duplicated objects are generated: the keys are the IDs of the original\nobjects and its values are the IDs that will be assigned to the\ncorresponding duplicate object. The ID of the source object's duplicate\nmay be specified in this map as well, using the same value of the\n`object_id` field as a key and the newly desired ID as the value.\n\nAll keys must correspond to existing IDs in the presentation. All values\nmust be unique in the presentation and must start with an alphanumeric\ncharacter or an underscore (matches regex `[a-zA-Z0-9_]`); remaining\ncharacters may include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`). The length of the new ID must not be less than 5 or\ngreater than 50.\n\nIf any IDs of source objects are omitted from the map, a new random ID will\nbe assigned. If the map is empty or unset, all duplicate objects will\nreceive a new random ID." }, "objectId": { "description": "The ID of the object to duplicate.", @@ -1380,12 +2514,10 @@ "id": "DuplicateObjectRequest" }, "ReplaceAllTextRequest": { - "description": "Replaces all instances of text matching a criteria with replace text.", - "type": "object", "properties": { "containsText": { - "description": "Finds text in a shape matching this substring.", - "$ref": "SubstringMatchCriteria" + "$ref": "SubstringMatchCriteria", + "description": "Finds text in a shape matching this substring." }, "pageObjectIds": { "description": "If non-empty, limits the matches to page elements only on the given pages.\n\nReturns a 400 bad request error if given the page object ID of a\nnotes master,\nor if a page with that object ID doesn't exist in the presentation.", @@ -1399,29 +2531,33 @@ "type": "string" } }, - "id": "ReplaceAllTextRequest" + "id": "ReplaceAllTextRequest", + "description": "Replaces all instances of text matching a criteria with replace text.", + "type": "object" }, "Page": { "description": "A page in a presentation.", "type": "object", "properties": { - "masterProperties": { - "$ref": "MasterProperties", - "description": "Master specific properties. Only set if page_type = MASTER." - }, - "objectId": { - "description": "The object ID for this page. Object IDs used by\nPage and\nPageElement share the same namespace.", - "type": "string" - }, - "revisionId": { - "description": "The revision ID of the presentation containing this page. Can be used in\nupdate requests to assert that the presentation revision hasn't changed\nsince the last read operation. Only populated if the user has edit access\nto the presentation.\n\nThe format of the revision ID may change over time, so it should be treated\nopaquely. A returned revision ID is only guaranteed to be valid for 24\nhours after it has been returned and cannot be shared across users. If the\nrevision ID is unchanged between calls, then the presentation has not\nchanged. Conversely, a changed ID (for the same presentation and user)\nusually means the presentation has been updated; however, a changed ID can\nalso be due to internal factors such as ID format changes.", - "type": "string" - }, "layoutProperties": { - "$ref": "LayoutProperties", - "description": "Layout specific properties. Only set if page_type = LAYOUT." + "description": "Layout specific properties. Only set if page_type = LAYOUT.", + "$ref": "LayoutProperties" + }, + "pageElements": { + "description": "The page elements rendered on the page.", + "items": { + "$ref": "PageElement" + }, + "type": "array" }, "pageType": { + "enumDescriptions": [ + "A slide page.", + "A master slide page.", + "A layout page.", + "A notes page.", + "A notes master page." + ], "enum": [ "SLIDE", "MASTER", @@ -1430,21 +2566,7 @@ "NOTES_MASTER" ], "description": "The type of the page.", - "type": "string", - "enumDescriptions": [ - "A slide page.", - "A master slide page.", - "A layout page.", - "A notes page.", - "A notes master page." - ] - }, - "pageElements": { - "description": "The page elements rendered on the page.", - "items": { - "$ref": "PageElement" - }, - "type": "array" + "type": "string" }, "notesProperties": { "$ref": "NotesProperties", @@ -1457,39 +2579,55 @@ "slideProperties": { "$ref": "SlideProperties", "description": "Slide specific properties. Only set if page_type = SLIDE." + }, + "masterProperties": { + "$ref": "MasterProperties", + "description": "Master specific properties. Only set if page_type = MASTER." + }, + "objectId": { + "type": "string", + "description": "The object ID for this page. Object IDs used by\nPage and\nPageElement share the same namespace." + }, + "revisionId": { + "description": "The revision ID of the presentation containing this page. Can be used in\nupdate requests to assert that the presentation revision hasn't changed\nsince the last read operation. Only populated if the user has edit access\nto the presentation.\n\nThe format of the revision ID may change over time, so it should be treated\nopaquely. A returned revision ID is only guaranteed to be valid for 24\nhours after it has been returned and cannot be shared across users. If the\nrevision ID is unchanged between calls, then the presentation has not\nchanged. Conversely, a changed ID (for the same presentation and user)\nusually means the presentation has been updated; however, a changed ID can\nalso be due to internal factors such as ID format changes.", + "type": "string" } }, "id": "Page" }, "ShapeBackgroundFill": { - "id": "ShapeBackgroundFill", - "description": "The shape background fill.", - "type": "object", "properties": { "propertyState": { + "enum": [ + "RENDERED", + "NOT_RENDERED", + "INHERIT" + ], "description": "The background fill property state.\n\nUpdating the the fill on a shape will implicitly update this field to\n`RENDERED`, unless another value is specified in the same request. To\nhave no fill on a shape, set this field to `NOT_RENDERED`. In this case,\nany other fill fields set in the same request will be ignored.", "type": "string", "enumDescriptions": [ "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." - ], - "enum": [ - "RENDERED", - "NOT_RENDERED", - "INHERIT" ] }, "solidFill": { "$ref": "SolidFill", "description": "Solid color fill." } - } + }, + "id": "ShapeBackgroundFill", + "description": "The shape background fill.", + "type": "object" }, "CropProperties": { - "description": "The crop properties of an object enclosed in a container. For example, an\nImage.\n\nThe crop properties is represented by the offsets of four edges which define\na crop rectangle. The offsets are measured in percentage from the\ncorresponding edges of the object's original bounding rectangle towards\ninside, relative to the object's original dimensions.\n\n- If the offset is in the interval (0, 1), the corresponding edge of crop\nrectangle is positioned inside of the object's original bounding rectangle.\n- If the offset is negative or greater than 1, the corresponding edge of crop\nrectangle is positioned outside of the object's original bounding rectangle.\n- If the left edge of the crop rectangle is on the right side of its right\nedge, the object will be flipped horizontally.\n- If the top edge of the crop rectangle is below its bottom edge, the object\nwill be flipped vertically.\n- If all offsets and rotation angle is 0, the object is not cropped.\n\nAfter cropping, the content in the crop rectangle will be stretched to fit\nits container.", "type": "object", "properties": { + "angle": { + "format": "float", + "description": "The rotation angle of the crop window around its center, in radians.\nRotation angle is applied after the offset.", + "type": "number" + }, "topOffset": { "format": "float", "description": "The offset specifies the top edge of the crop rectangle that is located\nbelow the original bounding rectangle top edge, relative to the object's\noriginal height.", @@ -1506,44 +2644,41 @@ "type": "number" }, "bottomOffset": { + "type": "number", "format": "float", - "description": "The offset specifies the bottom edge of the crop rectangle that is located\nabove the original bounding rectangle bottom edge, relative to the object's\noriginal height.", - "type": "number" - }, - "angle": { - "format": "float", - "description": "The rotation angle of the crop window around its center, in radians.\nRotation angle is applied after the offset.", - "type": "number" + "description": "The offset specifies the bottom edge of the crop rectangle that is located\nabove the original bounding rectangle bottom edge, relative to the object's\noriginal height." } }, - "id": "CropProperties" + "id": "CropProperties", + "description": "The crop properties of an object enclosed in a container. For example, an\nImage.\n\nThe crop properties is represented by the offsets of four edges which define\na crop rectangle. The offsets are measured in percentage from the\ncorresponding edges of the object's original bounding rectangle towards\ninside, relative to the object's original dimensions.\n\n- If the offset is in the interval (0, 1), the corresponding edge of crop\nrectangle is positioned inside of the object's original bounding rectangle.\n- If the offset is negative or greater than 1, the corresponding edge of crop\nrectangle is positioned outside of the object's original bounding rectangle.\n- If the left edge of the crop rectangle is on the right side of its right\nedge, the object will be flipped horizontally.\n- If the top edge of the crop rectangle is below its bottom edge, the object\nwill be flipped vertically.\n- If all offsets and rotation angle is 0, the object is not cropped.\n\nAfter cropping, the content in the crop rectangle will be stretched to fit\nits container." }, "ReplaceAllShapesWithSheetsChartRequest": { + "id": "ReplaceAllShapesWithSheetsChartRequest", "description": "Replaces all shapes that match the given criteria with the provided Google\nSheets chart. The chart will be scaled and centered to fit within the bounds\nof the original shape.\n\nNOTE: Replacing shapes with a chart requires at least one of the\nspreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes.", "type": "object", "properties": { "linkingMode": { - "enumDescriptions": [ - "The chart is not associated with the source spreadsheet and cannot be\nupdated. A chart that is not linked will be inserted as an image.", - "Linking the chart allows it to be updated, and other collaborators will\nsee a link to the spreadsheet." - ], "enum": [ "NOT_LINKED_IMAGE", "LINKED" ], "description": "The mode with which the chart is linked to the source spreadsheet. When\nnot specified, the chart will be an image that is not linked.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "The chart is not associated with the source spreadsheet and cannot be\nupdated. A chart that is not linked will be inserted as an image.", + "Linking the chart allows it to be updated, and other collaborators will\nsee a link to the spreadsheet." + ] }, "spreadsheetId": { "description": "The ID of the Google Sheets spreadsheet that contains the chart.", "type": "string" }, "pageObjectIds": { - "description": "If non-empty, limits the matches to page elements only on the given pages.\n\nReturns a 400 bad request error if given the page object ID of a\nnotes page or a\nnotes master, or if a\npage with that object ID doesn't exist in the presentation.", "items": { "type": "string" }, - "type": "array" + "type": "array", + "description": "If non-empty, limits the matches to page elements only on the given pages.\n\nReturns a 400 bad request error if given the page object ID of a\nnotes page or a\nnotes master, or if a\npage with that object ID doesn't exist in the presentation." }, "chartId": { "format": "int32", @@ -1551,67 +2686,67 @@ "type": "integer" }, "containsText": { - "$ref": "SubstringMatchCriteria", - "description": "The criteria that the shapes must match in order to be replaced. The\nrequest will replace all of the shapes that contain the given text." + "description": "The criteria that the shapes must match in order to be replaced. The\nrequest will replace all of the shapes that contain the given text.", + "$ref": "SubstringMatchCriteria" } - }, - "id": "ReplaceAllShapesWithSheetsChartRequest" - }, - "ColorStop": { - "description": "A color and position in a gradient band.", - "type": "object", - "properties": { - "color": { - "description": "The color of the gradient stop.", - "$ref": "OpaqueColor" - }, - "position": { - "format": "float", - "description": "The relative position of the color stop in the gradient band measured\nin percentage. The value should be in the interval [0.0, 1.0].", - "type": "number" - }, - "alpha": { - "format": "float", - "description": "The alpha value of this color in the gradient band. Defaults to 1.0,\nfully opaque.", - "type": "number" - } - }, - "id": "ColorStop" + } }, "Range": { + "id": "Range", + "description": "Specifies a contiguous range of an indexed collection, such as characters in\ntext.", + "type": "object", "properties": { - "type": { - "type": "string", - "enumDescriptions": [ - "Unspecified range type. This value must not be used.", - "A fixed range. Both the `start_index` and\n`end_index` must be specified.", - "Starts the range at `start_index` and continues until the\nend of the collection. The `end_index` must not be specified.", - "Sets the range to be the whole length of the collection. Both the\n`start_index` and the `end_index` must not be\nspecified." - ], - "enum": [ - "RANGE_TYPE_UNSPECIFIED", - "FIXED_RANGE", - "FROM_START_INDEX", - "ALL" - ], - "description": "The type of range." - }, "endIndex": { "format": "int32", "description": "The optional zero-based index of the end of the collection.\nRequired for `FIXED_RANGE` ranges.", "type": "integer" }, "startIndex": { + "type": "integer", "format": "int32", - "description": "The optional zero-based index of the beginning of the collection.\nRequired for `FIXED_RANGE` and `FROM_START_INDEX` ranges.", - "type": "integer" + "description": "The optional zero-based index of the beginning of the collection.\nRequired for `FIXED_RANGE` and `FROM_START_INDEX` ranges." + }, + "type": { + "enum": [ + "RANGE_TYPE_UNSPECIFIED", + "FIXED_RANGE", + "FROM_START_INDEX", + "ALL" + ], + "description": "The type of range.", + "type": "string", + "enumDescriptions": [ + "Unspecified range type. This value must not be used.", + "A fixed range. Both the `start_index` and\n`end_index` must be specified.", + "Starts the range at `start_index` and continues until the\nend of the collection. The `end_index` must not be specified.", + "Sets the range to be the whole length of the collection. Both the\n`start_index` and the `end_index` must not be\nspecified." + ] + } + } + }, + "ColorStop": { + "description": "A color and position in a gradient band.", + "type": "object", + "properties": { + "position": { + "format": "float", + "description": "The relative position of the color stop in the gradient band measured\nin percentage. The value should be in the interval [0.0, 1.0].", + "type": "number" + }, + "alpha": { + "type": "number", + "format": "float", + "description": "The alpha value of this color in the gradient band. Defaults to 1.0,\nfully opaque." + }, + "color": { + "$ref": "OpaqueColor", + "description": "The color of the gradient stop." } }, - "id": "Range", - "description": "Specifies a contiguous range of an indexed collection, such as characters in\ntext.", - "type": "object" + "id": "ColorStop" }, "CreateVideoRequest": { + "description": "Creates a video.", "type": "object", "properties": { "source": { @@ -1635,28 +2770,43 @@ "description": "The element properties for the video." }, "id": { - "description": "The video source's unique identifier for this video.\n\ne.g. For YouTube video https://www.youtube.com/watch?v=7U3axjORYZ0,\nthe ID is 7U3axjORYZ0.", - "type": "string" + "type": "string", + "description": "The video source's unique identifier for this video.\n\ne.g. For YouTube video https://www.youtube.com/watch?v=7U3axjORYZ0,\nthe ID is 7U3axjORYZ0." } }, - "id": "CreateVideoRequest", - "description": "Creates a video." + "id": "CreateVideoRequest" }, "DuplicateObjectResponse": { + "description": "The response of duplicating an object.", "type": "object", "properties": { "objectId": { - "description": "The ID of the new duplicate object.", - "type": "string" + "type": "string", + "description": "The ID of the new duplicate object." } }, - "id": "DuplicateObjectResponse", - "description": "The response of duplicating an object." + "id": "DuplicateObjectResponse" }, "ReplaceAllShapesWithImageRequest": { "description": "Replaces all shapes that match the given criteria with the provided image.", "type": "object", "properties": { + "imageUrl": { + "type": "string", + "description": "The image URL.\n\nThe image is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Images must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.\n\nThe provided URL can be at maximum 2K bytes large." + }, + "replaceMethod": { + "enumDescriptions": [ + "Scales and centers the image to fit within the bounds of the original\nshape and maintains the image's aspect ratio. The rendered size of the\nimage may be smaller than the size of the shape. This is the default\nmethod when one is not specified.", + "Scales and centers the image to fill the bounds of the original shape.\nThe image may be cropped in order to fill the shape. The rendered size of\nthe image will be the same as that of the original shape." + ], + "enum": [ + "CENTER_INSIDE", + "CENTER_CROP" + ], + "description": "The replace method.", + "type": "string" + }, "pageObjectIds": { "description": "If non-empty, limits the matches to page elements only on the given pages.\n\nReturns a 400 bad request error if given the page object ID of a\nnotes page or a\nnotes master, or if a\npage with that object ID doesn't exist in the presentation.", "items": { @@ -1667,31 +2817,44 @@ "containsText": { "$ref": "SubstringMatchCriteria", "description": "If set, this request will replace all of the shapes that contain the\ngiven text." - }, - "imageUrl": { - "description": "The image URL.\n\nThe image is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Images must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.", - "type": "string" - }, - "replaceMethod": { - "description": "The replace method.", - "type": "string", - "enumDescriptions": [ - "Scales and centers the image to fit within the bounds of the original\nshape and maintains the image's aspect ratio. The rendered size of the\nimage may be smaller than the size of the shape. This is the default\nmethod when one is not specified.", - "Scales and centers the image to fill the bounds of the original shape.\nThe image may be cropped in order to fill the shape. The rendered size of\nthe image will be the same as that of the original shape." - ], - "enum": [ - "CENTER_INSIDE", - "CENTER_CROP" - ] } }, "id": "ReplaceAllShapesWithImageRequest" }, "Shadow": { + "id": "Shadow", "description": "The shadow properties of a page element.\n\nIf these fields are unset, they may be inherited from a parent placeholder\nif it exists. If there is no parent, the fields will default to the value\nused for new page elements created in the Slides editor, which may depend on\nthe page element kind.", "type": "object", "properties": { + "type": { + "description": "The type of the shadow.", + "type": "string", + "enumDescriptions": [ + "Unspecified shadow type.", + "Outer shadow." + ], + "enum": [ + "SHADOW_TYPE_UNSPECIFIED", + "OUTER" + ] + }, + "transform": { + "description": "Transform that encodes the translate, scale, and skew of the shadow,\nrelative to the alignment position.", + "$ref": "AffineTransform" + }, "alignment": { + "enum": [ + "RECTANGLE_POSITION_UNSPECIFIED", + "TOP_LEFT", + "TOP_CENTER", + "TOP_RIGHT", + "LEFT_CENTER", + "CENTER", + "RIGHT_CENTER", + "BOTTOM_LEFT", + "BOTTOM_CENTER", + "BOTTOM_RIGHT" + ], "description": "The alignment point of the shadow, that sets the origin for translate,\nscale and skew of the shadow.", "type": "string", "enumDescriptions": [ @@ -1705,87 +2868,57 @@ "Bottom left.", "Bottom center.", "Bottom right." - ], - "enum": [ - "RECTANGLE_POSITION_UNSPECIFIED", - "TOP_LEFT", - "TOP_CENTER", - "TOP_RIGHT", - "LEFT_CENTER", - "CENTER", - "RIGHT_CENTER", - "BOTTOM_LEFT", - "BOTTOM_CENTER", - "BOTTOM_RIGHT" ] }, "alpha": { - "type": "number", "format": "float", - "description": "The alpha of the shadow's color, from 0.0 to 1.0." + "description": "The alpha of the shadow's color, from 0.0 to 1.0.", + "type": "number" }, "color": { - "$ref": "OpaqueColor", - "description": "The shadow color value." + "description": "The shadow color value.", + "$ref": "OpaqueColor" }, "rotateWithShape": { "description": "Whether the shadow should rotate with the shape.", "type": "boolean" }, "propertyState": { + "enum": [ + "RENDERED", + "NOT_RENDERED", + "INHERIT" + ], "description": "The shadow property state.\n\nUpdating the the shadow on a page element will implicitly update this field\nto `RENDERED`, unless another value is specified in the same request. To\nhave no shadow on a page element, set this field to `NOT_RENDERED`. In this\ncase, any other shadow fields set in the same request will be ignored.", "type": "string", "enumDescriptions": [ "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." - ], - "enum": [ - "RENDERED", - "NOT_RENDERED", - "INHERIT" ] }, "blurRadius": { "$ref": "Dimension", "description": "The radius of the shadow blur. The larger the radius, the more diffuse the\nshadow becomes." - }, - "transform": { - "$ref": "AffineTransform", - "description": "Transform that encodes the translate, scale, and skew of the shadow,\nrelative to the alignment position." - }, - "type": { - "enumDescriptions": [ - "Unspecified shadow type.", - "Outer shadow." - ], - "enum": [ - "SHADOW_TYPE_UNSPECIFIED", - "OUTER" - ], - "description": "The type of the shadow.", - "type": "string" } - }, - "id": "Shadow" + } }, "DeleteTableRowRequest": { "description": "Deletes a row from a table.", "type": "object", "properties": { - "cellLocation": { - "$ref": "TableCellLocation", - "description": "The reference table cell location from which a row will be deleted.\n\nThe row this cell spans will be deleted. If this is a merged cell, multiple\nrows will be deleted. If no rows remain in the table after this deletion,\nthe whole table is deleted." - }, "tableObjectId": { "description": "The table to delete rows from.", "type": "string" + }, + "cellLocation": { + "$ref": "TableCellLocation", + "description": "The reference table cell location from which a row will be deleted.\n\nThe row this cell spans will be deleted. If this is a merged cell, multiple\nrows will be deleted. If no rows remain in the table after this deletion,\nthe whole table is deleted." } }, "id": "DeleteTableRowRequest" }, "Bullet": { - "type": "object", "properties": { "glyph": { "description": "The rendered bullet glyph for this paragraph.", @@ -1806,7 +2939,8 @@ } }, "id": "Bullet", - "description": "Describes the bullet of a paragraph." + "description": "Describes the bullet of a paragraph.", + "type": "object" }, "OutlineFill": { "description": "The fill of the outline.", @@ -1835,14 +2969,14 @@ "type": "object", "properties": { "columnIndex": { + "type": "integer", "format": "int32", - "description": "The 0-based column index.", - "type": "integer" + "description": "The 0-based column index." }, "rowIndex": { + "type": "integer", "format": "int32", - "description": "The 0-based row index.", - "type": "integer" + "description": "The 0-based row index." } }, "id": "TableCellLocation" @@ -1863,11 +2997,6 @@ "description": "Updates the styling for all of the paragraphs within a Shape or Table that\noverlap with the given text index range.", "type": "object", "properties": { - "fields": { - "type": "string", - "format": "google-fieldmask", - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `style` is implied and\nshould not be specified. A single `\"*\"` can be used as short-hand for\nlisting every field.\n\nFor example, to update the paragraph alignment, set `fields` to\n`\"alignment\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset." - }, "textRange": { "$ref": "Range", "description": "The range of text containing the paragraph(s) to style." @@ -1881,13 +3010,19 @@ "description": "The paragraph's style." }, "cellLocation": { - "$ref": "TableCellLocation", - "description": "The location of the cell in the table containing the paragraph(s) to\nstyle. If `object_id` refers to a table, `cell_location` must have a value.\nOtherwise, it must not." + "description": "The location of the cell in the table containing the paragraph(s) to\nstyle. If `object_id` refers to a table, `cell_location` must have a value.\nOtherwise, it must not.", + "$ref": "TableCellLocation" + }, + "fields": { + "type": "string", + "format": "google-fieldmask", + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `style` is implied and\nshould not be specified. A single `\"*\"` can be used as short-hand for\nlisting every field.\n\nFor example, to update the paragraph alignment, set `fields` to\n`\"alignment\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset." } }, "id": "UpdateParagraphStyleRequest" }, "ColorScheme": { + "description": "The palette of predefined colors for a page.", "type": "object", "properties": { "colors": { @@ -1898,19 +3033,18 @@ "type": "array" } }, - "id": "ColorScheme", - "description": "The palette of predefined colors for a page." + "id": "ColorScheme" }, "Shape": { "type": "object", "properties": { "placeholder": { - "description": "Placeholders are shapes that are inherit from corresponding placeholders on\nlayouts and masters.\n\nIf set, the shape is a placeholder shape and any inherited properties\ncan be resolved by looking at the parent placeholder identified by the\nPlaceholder.parent_object_id field.", - "$ref": "Placeholder" + "$ref": "Placeholder", + "description": "Placeholders are shapes that are inherit from corresponding placeholders on\nlayouts and masters.\n\nIf set, the shape is a placeholder shape and any inherited properties\ncan be resolved by looking at the parent placeholder identified by the\nPlaceholder.parent_object_id field." }, "text": { - "description": "The text content of the shape.", - "$ref": "TextContent" + "$ref": "TextContent", + "description": "The text content of the shape." }, "shapeType": { "enumDescriptions": [ @@ -2207,8 +3341,8 @@ "type": "string" }, "shapeProperties": { - "$ref": "ShapeProperties", - "description": "The properties of the shape." + "description": "The properties of the shape.", + "$ref": "ShapeProperties" } }, "id": "Shape", @@ -2230,17 +3364,37 @@ "id": "Image" }, "AffineTransform": { + "description": "AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ]\nto transform source coordinates (x,y) into destination coordinates (x', y')\naccording to:\n\n x' x = shear_y scale_y translate_y \n 1 [ 1 ]\n\nAfter transformation,\n\n x' = scale_x * x + shear_x * y + translate_x;\n y' = scale_y * y + shear_y * x + translate_y;\n\nThis message is therefore composed of these six matrix elements.", "type": "object", "properties": { + "unit": { + "enumDescriptions": [ + "The units are unknown.", + "An English Metric Unit (EMU) is defined as 1/360,000 of a centimeter\nand thus there are 914,400 EMUs per inch, and 12,700 EMUs per point.", + "A point, 1/72 of an inch." + ], + "enum": [ + "UNIT_UNSPECIFIED", + "EMU", + "PT" + ], + "description": "The units for translate elements.", + "type": "string" + }, + "scaleX": { + "format": "double", + "description": "The X coordinate scaling element.", + "type": "number" + }, "shearX": { "format": "double", "description": "The X coordinate shearing element.", "type": "number" }, "scaleY": { - "type": "number", "format": "double", - "description": "The Y coordinate scaling element." + "description": "The Y coordinate scaling element.", + "type": "number" }, "translateY": { "format": "double", @@ -2256,34 +3410,18 @@ "format": "double", "description": "The Y coordinate shearing element.", "type": "number" - }, - "unit": { - "description": "The units for translate elements.", - "type": "string", - "enumDescriptions": [ - "The units are unknown.", - "An English Metric Unit (EMU) is defined as 1/360,000 of a centimeter\nand thus there are 914,400 EMUs per inch, and 12,700 EMUs per point.", - "A point, 1/72 of an inch." - ], - "enum": [ - "UNIT_UNSPECIFIED", - "EMU", - "PT" - ] - }, - "scaleX": { - "format": "double", - "description": "The X coordinate scaling element.", - "type": "number" } }, - "id": "AffineTransform", - "description": "AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ]\nto transform source coordinates (x,y) into destination coordinates (x', y')\naccording to:\n\n x' x = shear_y scale_y translate_y \n 1 [ 1 ]\n\nAfter transformation,\n\n x' = scale_x * x + shear_x * y + translate_x;\n y' = scale_y * y + shear_y * x + translate_y;\n\nThis message is therefore composed of these six matrix elements." + "id": "AffineTransform" }, "InsertTextRequest": { "description": "Inserts text into a shape or a table cell.", "type": "object", "properties": { + "cellLocation": { + "$ref": "TableCellLocation", + "description": "The optional table cell location if the text is to be inserted into a table\ncell. If present, the object_id must refer to a table." + }, "text": { "description": "The text to be inserted.\n\nInserting a newline character will implicitly create a new\nParagraphMarker at that index.\nThe paragraph style of the new paragraph will be copied from the paragraph\nat the current insertion index, including lists and bullets.\n\nText styles for inserted text will be determined automatically, generally\npreserving the styling of neighboring text. In most cases, the text will be\nadded to the TextRun that exists at the\ninsertion index.\n\nSome control characters (U+0000-U+0008, U+000C-U+001F) and characters\nfrom the Unicode Basic Multilingual Plane Private Use Area (U+E000-U+F8FF)\nwill be stripped out of the inserted text.", "type": "string" @@ -2296,10 +3434,6 @@ "format": "int32", "description": "The index where the text will be inserted, in Unicode code units, based\non TextElement indexes.\n\nThe index is zero-based and is computed from the start of the string.\nThe index may be adjusted to prevent insertions inside Unicode grapheme\nclusters. In these cases, the text will be inserted immediately after the\ngrapheme cluster.", "type": "integer" - }, - "cellLocation": { - "description": "The optional table cell location if the text is to be inserted into a table\ncell. If present, the object_id must refer to a table.", - "$ref": "TableCellLocation" } }, "id": "InsertTextRequest" @@ -2317,15 +3451,15 @@ "type": "string" }, "type": { + "enum": [ + "TYPE_UNSPECIFIED", + "SLIDE_NUMBER" + ], "description": "The type of this auto text.", "type": "string", "enumDescriptions": [ "An unspecified autotext type.", "Type for autotext that represents the current slide number." - ], - "enum": [ - "TYPE_UNSPECIFIED", - "SLIDE_NUMBER" ] } }, @@ -2336,13 +3470,14 @@ "type": "object", "properties": { "objectId": { - "type": "string", - "description": "The object ID of the created video." + "description": "The object ID of the created video.", + "type": "string" } }, "id": "CreateVideoResponse" }, "UpdatePageElementTransformRequest": { + "description": "Updates the transform of a page element.\n\nUpdating the transform of a group will change the absolute transform of the\npage elements in that group, which can change their visual appearance. See\nthe documentation for PageElement.transform for more details.", "type": "object", "properties": { "transform": { @@ -2368,12 +3503,9 @@ "type": "string" } }, - "id": "UpdatePageElementTransformRequest", - "description": "Updates the transform of a page element." + "id": "UpdatePageElementTransformRequest" }, "DeleteTextRequest": { - "description": "Deletes text from a shape or a table cell.", - "type": "object", "properties": { "textRange": { "$ref": "Range", @@ -2388,7 +3520,9 @@ "description": "The optional table cell location if the text is to be deleted from a table\ncell. If present, the object_id must refer to a table." } }, - "id": "DeleteTextRequest" + "id": "DeleteTextRequest", + "description": "Deletes text from a shape or a table cell.", + "type": "object" }, "DeleteObjectRequest": { "description": "Deletes an object, either pages or\npage elements, from the\npresentation.", @@ -2406,16 +3540,16 @@ "type": "object", "properties": { "textRun": { - "$ref": "TextRun", - "description": "A TextElement representing a run of text where all of the characters\nin the run have the same TextStyle.\n\nThe `start_index` and `end_index` of TextRuns will always be fully\ncontained in the index range of a single `paragraph_marker` TextElement.\nIn other words, a TextRun will never span multiple paragraphs." + "description": "A TextElement representing a run of text where all of the characters\nin the run have the same TextStyle.\n\nThe `start_index` and `end_index` of TextRuns will always be fully\ncontained in the index range of a single `paragraph_marker` TextElement.\nIn other words, a TextRun will never span multiple paragraphs.", + "$ref": "TextRun" }, "autoText": { - "$ref": "AutoText", - "description": "A TextElement representing a spot in the text that is dynamically\nreplaced with content that can change over time." + "description": "A TextElement representing a spot in the text that is dynamically\nreplaced with content that can change over time.", + "$ref": "AutoText" }, "paragraphMarker": { - "$ref": "ParagraphMarker", - "description": "A marker representing the beginning of a new paragraph.\n\nThe `start_index` and `end_index` of this TextElement represent the\nrange of the paragraph. Other TextElements with an index range contained\ninside this paragraph's range are considered to be part of this\nparagraph. The range of indices of two separate paragraphs will never\noverlap." + "description": "A marker representing the beginning of a new paragraph.\n\nThe `start_index` and `end_index` of this TextElement represent the\nrange of the paragraph. Other TextElements with an index range contained\ninside this paragraph's range are considered to be part of this\nparagraph. The range of indices of two separate paragraphs will never\noverlap.", + "$ref": "ParagraphMarker" }, "endIndex": { "format": "int32", @@ -2435,7 +3569,6 @@ "type": "object", "properties": { "unit": { - "description": "The units for magnitude.", "type": "string", "enumDescriptions": [ "The units are unknown.", @@ -2446,7 +3579,8 @@ "UNIT_UNSPECIFIED", "EMU", "PT" - ] + ], + "description": "The units for magnitude." }, "magnitude": { "format": "double", @@ -2468,7 +3602,6 @@ "type": "object" }, "VideoProperties": { - "description": "The properties of the Video.", "type": "object", "properties": { "outline": { @@ -2476,1155 +3609,15 @@ "description": "The outline of the video. The default outline matches the defaults for new\nvideos created in the Slides editor." } }, - "id": "VideoProperties" - }, - "InsertTableRowsRequest": { - "description": "Inserts rows into a table.", - "type": "object", - "properties": { - "number": { - "format": "int32", - "description": "The number of rows to be inserted. Maximum 20 per request.", - "type": "integer" - }, - "cellLocation": { - "description": "The reference table cell location from which rows will be inserted.\n\nA new row will be inserted above (or below) the row where the reference\ncell is. If the reference cell is a merged cell, a new row will be\ninserted above (or below) the merged cell.", - "$ref": "TableCellLocation" - }, - "tableObjectId": { - "description": "The table to insert rows into.", - "type": "string" - }, - "insertBelow": { - "description": "Whether to insert new rows below the reference cell location.\n\n- `True`: insert below the cell.\n- `False`: insert above the cell.", - "type": "boolean" - } - }, - "id": "InsertTableRowsRequest" - }, - "LayoutProperties": { - "description": "The properties of Page are only\nrelevant for pages with page_type LAYOUT.", - "type": "object", - "properties": { - "name": { - "description": "The name of the layout.", - "type": "string" - }, - "displayName": { - "description": "The human-readable name of the layout.", - "type": "string" - }, - "masterObjectId": { - "description": "The object ID of the master that this layout is based on.", - "type": "string" - } - }, - "id": "LayoutProperties" - }, - "LineProperties": { - "id": "LineProperties", - "description": "The properties of the Line.\n\nWhen unset, these fields default to values that match the appearance of\nnew lines created in the Slides editor.", - "type": "object", - "properties": { - "weight": { - "$ref": "Dimension", - "description": "The thickness of the line." - }, - "lineFill": { - "description": "The fill of the line. The default line fill matches the defaults for new\nlines created in the Slides editor.", - "$ref": "LineFill" - }, - "link": { - "$ref": "Link", - "description": "The hyperlink destination of the line. If unset, there is no link." - }, - "dashStyle": { - "type": "string", - "enumDescriptions": [ - "Unspecified dash style.", - "Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'.\nThis is the default dash style.", - "Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'.", - "Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'.", - "Alternating dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'dashDot'.", - "Line with large dashes. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'lgDash'.", - "Alternating large dashes and dots. Corresponds to ECMA-376\nST_PresetLineDashVal value 'lgDashDot'." - ], - "enum": [ - "DASH_STYLE_UNSPECIFIED", - "SOLID", - "DOT", - "DASH", - "DASH_DOT", - "LONG_DASH", - "LONG_DASH_DOT" - ], - "description": "The dash style of the line." - }, - "startArrow": { - "enumDescriptions": [ - "An unspecified arrow style.", - "No arrow.", - "Arrow with notched back. Corresponds to ECMA-376 ST_LineEndType value\n'stealth'.", - "Filled arrow. Corresponds to ECMA-376 ST_LineEndType value 'triangle'.", - "Filled circle. Corresponds to ECMA-376 ST_LineEndType value 'oval'.", - "Filled square.", - "Filled diamond. Corresponds to ECMA-376 ST_LineEndType value 'diamond'.", - "Hollow arrow.", - "Hollow circle.", - "Hollow square.", - "Hollow diamond." - ], - "enum": [ - "ARROW_STYLE_UNSPECIFIED", - "NONE", - "STEALTH_ARROW", - "FILL_ARROW", - "FILL_CIRCLE", - "FILL_SQUARE", - "FILL_DIAMOND", - "OPEN_ARROW", - "OPEN_CIRCLE", - "OPEN_SQUARE", - "OPEN_DIAMOND" - ], - "description": "The style of the arrow at the beginning of the line.", - "type": "string" - }, - "endArrow": { - "description": "The style of the arrow at the end of the line.", - "type": "string", - "enumDescriptions": [ - "An unspecified arrow style.", - "No arrow.", - "Arrow with notched back. Corresponds to ECMA-376 ST_LineEndType value\n'stealth'.", - "Filled arrow. Corresponds to ECMA-376 ST_LineEndType value 'triangle'.", - "Filled circle. Corresponds to ECMA-376 ST_LineEndType value 'oval'.", - "Filled square.", - "Filled diamond. Corresponds to ECMA-376 ST_LineEndType value 'diamond'.", - "Hollow arrow.", - "Hollow circle.", - "Hollow square.", - "Hollow diamond." - ], - "enum": [ - "ARROW_STYLE_UNSPECIFIED", - "NONE", - "STEALTH_ARROW", - "FILL_ARROW", - "FILL_CIRCLE", - "FILL_SQUARE", - "FILL_DIAMOND", - "OPEN_ARROW", - "OPEN_CIRCLE", - "OPEN_SQUARE", - "OPEN_DIAMOND" - ] - } - } - }, - "Presentation": { - "type": "object", - "properties": { - "notesMaster": { - "description": "The notes master in the presentation. It serves three purposes:\n\n- Placeholder shapes on a notes master contain the default text styles and\n shape properties of all placeholder shapes on notes pages. Specifically,\n a `SLIDE_IMAGE` placeholder shape contains the slide thumbnail, and a\n `BODY` placeholder shape contains the speaker notes.\n- The notes master page properties define the common page properties\n inherited by all notes pages.\n- Any other shapes on the notes master will appear on all notes pages.\n\nThe notes master is read-only.", - "$ref": "Page" - }, - "layouts": { - "description": "The layouts in the presentation. A layout is a template that determines\nhow content is arranged and styled on the slides that inherit from that\nlayout.", - "items": { - "$ref": "Page" - }, - "type": "array" - }, - "title": { - "description": "The title of the presentation.", - "type": "string" - }, - "locale": { - "description": "The locale of the presentation, as an IETF BCP 47 language tag.", - "type": "string" - }, - "masters": { - "description": "The slide masters in the presentation. A slide master contains all common\npage elements and the common properties for a set of layouts. They serve\nthree purposes:\n\n- Placeholder shapes on a master contain the default text styles and shape\n properties of all placeholder shapes on pages that use that master.\n- The master page properties define the common page properties inherited by\n its layouts.\n- Any other shapes on the master slide will appear on all slides using that\n master, regardless of their layout.", - "items": { - "$ref": "Page" - }, - "type": "array" - }, - "pageSize": { - "description": "The size of pages in the presentation.", - "$ref": "Size" - }, - "presentationId": { - "description": "The ID of the presentation.", - "type": "string" - }, - "slides": { - "description": "The slides in the presentation.\nA slide inherits properties from a slide layout.", - "items": { - "$ref": "Page" - }, - "type": "array" - }, - "revisionId": { - "description": "The revision ID of the presentation. Can be used in update requests\nto assert that the presentation revision hasn't changed since the last\nread operation. Only populated if the user has edit access to the\npresentation.\n\nThe format of the revision ID may change over time, so it should be treated\nopaquely. A returned revision ID is only guaranteed to be valid for 24\nhours after it has been returned and cannot be shared across users. If the\nrevision ID is unchanged between calls, then the presentation has not\nchanged. Conversely, a changed ID (for the same presentation and user)\nusually means the presentation has been updated; however, a changed ID can\nalso be due to internal factors such as ID format changes.", - "type": "string" - } - }, - "id": "Presentation", - "description": "A Google Slides presentation." - }, - "OpaqueColor": { - "description": "A themeable solid color value.", - "type": "object", - "properties": { - "rgbColor": { - "description": "An opaque RGB color.", - "$ref": "RgbColor" - }, - "themeColor": { - "enumDescriptions": [ - "Unspecified theme color. This value should not be used.", - "Represents the first dark color.", - "Represents the first light color.", - "Represents the second dark color.", - "Represents the second light color.", - "Represents the first accent color.", - "Represents the second accent color.", - "Represents the third accent color.", - "Represents the fourth accent color.", - "Represents the fifth accent color.", - "Represents the sixth accent color.", - "Represents the color to use for hyperlinks.", - "Represents the color to use for visited hyperlinks.", - "Represents the first text color.", - "Represents the first background color.", - "Represents the second text color.", - "Represents the second background color." - ], - "enum": [ - "THEME_COLOR_TYPE_UNSPECIFIED", - "DARK1", - "LIGHT1", - "DARK2", - "LIGHT2", - "ACCENT1", - "ACCENT2", - "ACCENT3", - "ACCENT4", - "ACCENT5", - "ACCENT6", - "HYPERLINK", - "FOLLOWED_HYPERLINK", - "TEXT1", - "BACKGROUND1", - "TEXT2", - "BACKGROUND2" - ], - "description": "An opaque theme color.", - "type": "string" - } - }, - "id": "OpaqueColor" - }, - "ImageProperties": { - "id": "ImageProperties", - "description": "The properties of the Image.", - "type": "object", - "properties": { - "shadow": { - "description": "The shadow of the image. If not set, the image has no shadow. This property\nis read-only.", - "$ref": "Shadow" - }, - "contrast": { - "format": "float", - "description": "The contrast effect of the image. The value should be in the interval\n[-1.0, 1.0], where 0 means no effect. This property is read-only.", - "type": "number" - }, - "link": { - "$ref": "Link", - "description": "The hyperlink destination of the image. If unset, there is no link." - }, - "cropProperties": { - "$ref": "CropProperties", - "description": "The crop properties of the image. If not set, the image is not cropped.\nThis property is read-only." - }, - "recolor": { - "$ref": "Recolor", - "description": "The recolor effect of the image. If not set, the image is not recolored.\nThis property is read-only." - }, - "outline": { - "$ref": "Outline", - "description": "The outline of the image. If not set, the the image has no outline." - }, - "brightness": { - "format": "float", - "description": "The brightness effect of the image. The value should be in the interval\n[-1.0, 1.0], where 0 means no effect. This property is read-only.", - "type": "number" - }, - "transparency": { - "format": "float", - "description": "The transparency effect of the image. The value should be in the interval\n[0.0, 1.0], where 0 means no effect and 1 means completely transparent.\nThis property is read-only.", - "type": "number" - } - } - }, - "ReplaceAllShapesWithImageResponse": { - "description": "The result of replacing shapes with an image.", - "type": "object", - "properties": { - "occurrencesChanged": { - "format": "int32", - "description": "The number of shapes replaced with images.", - "type": "integer" - } - }, - "id": "ReplaceAllShapesWithImageResponse" - }, - "Line": { - "type": "object", - "properties": { - "lineType": { - "description": "The type of the line.", - "type": "string", - "enumDescriptions": [ - "An unspecified line type.", - "Straight connector 1 form. Corresponds to ECMA-376 ST_ShapeType\n'straightConnector1'.", - "Bent connector 2 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector2'.", - "Bent connector 3 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector3'.", - "Bent connector 4 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector4'.", - "Bent connector 5 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector5'.", - "Curved connector 2 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector2'.", - "Curved connector 3 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector3'.", - "Curved connector 4 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector4'.", - "Curved connector 5 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector5'." - ], - "enum": [ - "TYPE_UNSPECIFIED", - "STRAIGHT_CONNECTOR_1", - "BENT_CONNECTOR_2", - "BENT_CONNECTOR_3", - "BENT_CONNECTOR_4", - "BENT_CONNECTOR_5", - "CURVED_CONNECTOR_2", - "CURVED_CONNECTOR_3", - "CURVED_CONNECTOR_4", - "CURVED_CONNECTOR_5" - ] - }, - "lineProperties": { - "$ref": "LineProperties", - "description": "The properties of the line." - } - }, - "id": "Line", - "description": "A PageElement kind representing a\nline, curved connector, or bent connector." - }, - "BatchUpdatePresentationResponse": { - "description": "Response message from a batch update.", - "type": "object", - "properties": { - "replies": { - "description": "The reply of the updates. This maps 1:1 with the updates, although\nreplies to some requests may be empty.", - "items": { - "$ref": "Response" - }, - "type": "array" - }, - "presentationId": { - "description": "The presentation the updates were applied to.", - "type": "string" - } - }, - "id": "BatchUpdatePresentationResponse" - }, - "CreateSheetsChartRequest": { - "description": "Creates an embedded Google Sheets chart.\n\nNOTE: Chart creation requires at least one of the spreadsheets.readonly,\nspreadsheets, drive.readonly, or drive OAuth scopes.", - "type": "object", - "properties": { - "chartId": { - "format": "int32", - "description": "The ID of the specific chart in the Google Sheets spreadsheet.", - "type": "integer" - }, - "objectId": { - "description": "A user-supplied object ID.\n\nIf specified, the ID must be unique among all pages and page elements in\nthe presentation. The ID should start with a word character [a-zA-Z0-9_]\nand then followed by any number of the following characters [a-zA-Z0-9_-:].\nThe length of the ID should not be less than 5 or greater than 50.\nIf empty, a unique identifier will be generated.", - "type": "string" - }, - "elementProperties": { - "description": "The element properties for the chart.\n\nWhen the aspect ratio of the provided size does not match the chart aspect\nratio, the chart is scaled and centered with respect to the size in order\nto maintain aspect ratio. The provided transform is applied after this\noperation.", - "$ref": "PageElementProperties" - }, - "linkingMode": { - "enum": [ - "NOT_LINKED_IMAGE", - "LINKED" - ], - "description": "The mode with which the chart is linked to the source spreadsheet. When\nnot specified, the chart will be an image that is not linked.", - "type": "string", - "enumDescriptions": [ - "The chart is not associated with the source spreadsheet and cannot be\nupdated. A chart that is not linked will be inserted as an image.", - "Linking the chart allows it to be updated, and other collaborators will\nsee a link to the spreadsheet." - ] - }, - "spreadsheetId": { - "description": "The ID of the Google Sheets spreadsheet that contains the chart.", - "type": "string" - } - }, - "id": "CreateSheetsChartRequest" - }, - "CreateImageResponse": { - "description": "The result of creating an image.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the created image.", - "type": "string" - } - }, - "id": "CreateImageResponse" - }, - "SlideProperties": { - "description": "The properties of Page that are only\nrelevant for pages with page_type SLIDE.", - "type": "object", - "properties": { - "notesPage": { - "description": "The notes page that this slide is associated with. It defines the visual\nappearance of a notes page when printing or exporting slides with speaker\nnotes. A notes page inherits properties from the\nnotes master.\nThe placeholder shape with type BODY on the notes page contains the speaker\nnotes for this slide. The ID of this shape is identified by the\nspeakerNotesObjectId field.\nThe notes page is read-only except for the text content and styles of the\nspeaker notes shape.", - "$ref": "Page" - }, - "masterObjectId": { - "type": "string", - "description": "The object ID of the master that this slide is based on." - }, - "layoutObjectId": { - "description": "The object ID of the layout that this slide is based on.", - "type": "string" - } - }, - "id": "SlideProperties" - }, - "Response": { - "description": "A single response from an update.", - "type": "object", - "properties": { - "duplicateObject": { - "description": "The result of duplicating an object.", - "$ref": "DuplicateObjectResponse" - }, - "createShape": { - "$ref": "CreateShapeResponse", - "description": "The result of creating a shape." - }, - "createLine": { - "$ref": "CreateLineResponse", - "description": "The result of creating a line." - }, - "createImage": { - "description": "The result of creating an image.", - "$ref": "CreateImageResponse" - }, - "createVideo": { - "$ref": "CreateVideoResponse", - "description": "The result of creating a video." - }, - "replaceAllShapesWithSheetsChart": { - "$ref": "ReplaceAllShapesWithSheetsChartResponse", - "description": "The result of replacing all shapes matching some criteria with a Google\nSheets chart." - }, - "createSheetsChart": { - "description": "The result of creating a Google Sheets chart.", - "$ref": "CreateSheetsChartResponse" - }, - "replaceAllShapesWithImage": { - "description": "The result of replacing all shapes matching some criteria with an\nimage.", - "$ref": "ReplaceAllShapesWithImageResponse" - }, - "createTable": { - "$ref": "CreateTableResponse", - "description": "The result of creating a table." - }, - "replaceAllText": { - "$ref": "ReplaceAllTextResponse", - "description": "The result of replacing text." - }, - "createSlide": { - "$ref": "CreateSlideResponse", - "description": "The result of creating a slide." - } - }, - "id": "Response" - }, - "MasterProperties": { - "properties": { - "displayName": { - "description": "The human-readable name of the master.", - "type": "string" - } - }, - "id": "MasterProperties", - "description": "The properties of Page that are only\nrelevant for pages with page_type MASTER.", - "type": "object" - }, - "SubstringMatchCriteria": { - "description": "A criteria that matches a specific string of text in a shape or table.", - "type": "object", - "properties": { - "matchCase": { - "description": "Indicates whether the search should respect case:\n\n- `True`: the search is case sensitive.\n- `False`: the search is case insensitive.", - "type": "boolean" - }, - "text": { - "description": "The text to search for in the shape or table.", - "type": "string" - } - }, - "id": "SubstringMatchCriteria" - }, - "LayoutReference": { - "type": "object", - "properties": { - "layoutId": { - "description": "Layout ID: the object ID of one of the layouts in the presentation.", - "type": "string" - }, - "predefinedLayout": { - "enum": [ - "PREDEFINED_LAYOUT_UNSPECIFIED", - "BLANK", - "CAPTION_ONLY", - "TITLE", - "TITLE_AND_BODY", - "TITLE_AND_TWO_COLUMNS", - "TITLE_ONLY", - "SECTION_HEADER", - "SECTION_TITLE_AND_DESCRIPTION", - "ONE_COLUMN_TEXT", - "MAIN_POINT", - "BIG_NUMBER" - ], - "description": "Predefined layout.", - "type": "string", - "enumDescriptions": [ - "Unspecified layout.", - "Blank layout, with no placeholders.", - "Layout with a caption at the bottom.", - "Layout with a title and a subtitle.", - "Layout with a title and body.", - "Layout with a title and two columns.", - "Layout with only a title.", - "Layout with a section title.", - "Layout with a title and subtitle on one side and description on the other.", - "Layout with one title and one body, arranged in a single column.", - "Layout with a main point.", - "Layout with a big number heading." - ] - } - }, - "id": "LayoutReference", - "description": "Slide layout reference. This may reference either:\n\n- A predefined layout\n- One of the layouts in the presentation." - }, - "TextRun": { - "description": "A TextElement kind that represents a run of text that all has the same\nstyling.", - "type": "object", - "properties": { - "content": { - "description": "The text of this run.", - "type": "string" - }, - "style": { - "description": "The styling applied to this run.", - "$ref": "TextStyle" - } - }, - "id": "TextRun" - }, - "TableRange": { - "description": "A table range represents a reference to a subset of a table.\n\nIt's important to note that the cells specified by a table range do not\nnecessarily form a rectangle. For example, let's say we have a 3 x 3 table\nwhere all the cells of the last row are merged together. The table looks\nlike this:\n\n \n [ ]\n\nA table range with location = (0, 0), row span = 3 and column span = 2\nspecifies the following cells:\n\n x x \n [ x ]", - "type": "object", - "properties": { - "rowSpan": { - "format": "int32", - "description": "The row span of the table range.", - "type": "integer" - }, - "location": { - "description": "The starting location of the table range.", - "$ref": "TableCellLocation" - }, - "columnSpan": { - "format": "int32", - "description": "The column span of the table range.", - "type": "integer" - } - }, - "id": "TableRange" - }, - "CreateTableRequest": { - "description": "Creates a new table.", - "type": "object", - "properties": { - "columns": { - "format": "int32", - "description": "Number of columns in the table.", - "type": "integer" - }, - "objectId": { - "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", - "type": "string" - }, - "elementProperties": { - "$ref": "PageElementProperties", - "description": "The element properties for the table.\n\nThe table will be created at the provided size, subject to a minimum size.\nIf no size is provided, the table will be automatically sized.\n\nTable transforms must have a scale of 1 and no shear components. If no\ntransform is provided, the table will be centered on the page." - }, - "rows": { - "format": "int32", - "description": "Number of rows in the table.", - "type": "integer" - } - }, - "id": "CreateTableRequest" - }, - "CreateTableResponse": { - "properties": { - "objectId": { - "description": "The object ID of the created table.", - "type": "string" - } - }, - "id": "CreateTableResponse", - "description": "The result of creating a table.", - "type": "object" - }, - "Table": { - "description": "A PageElement kind representing a\ntable.", - "type": "object", - "properties": { - "columns": { - "format": "int32", - "description": "Number of columns in the table.", - "type": "integer" - }, - "tableRows": { - "description": "Properties and contents of each row.\n\nCells that span multiple rows are contained in only one of these rows and\nhave a row_span greater\nthan 1.", - "items": { - "$ref": "TableRow" - }, - "type": "array" - }, - "rows": { - "format": "int32", - "description": "Number of rows in the table.", - "type": "integer" - }, - "tableColumns": { - "description": "Properties of each column.", - "items": { - "$ref": "TableColumnProperties" - }, - "type": "array" - } - }, - "id": "Table" - }, - "PageBackgroundFill": { - "type": "object", - "properties": { - "propertyState": { - "enum": [ - "RENDERED", - "NOT_RENDERED", - "INHERIT" - ], - "description": "The background fill property state.\n\nUpdating the the fill on a page will implicitly update this field to\n`RENDERED`, unless another value is specified in the same request. To\nhave no fill on a page, set this field to `NOT_RENDERED`. In this case,\nany other fill fields set in the same request will be ignored.", - "type": "string", - "enumDescriptions": [ - "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", - "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", - "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." - ] - }, - "stretchedPictureFill": { - "description": "Stretched picture fill.", - "$ref": "StretchedPictureFill" - }, - "solidFill": { - "description": "Solid color fill.", - "$ref": "SolidFill" - } - }, - "id": "PageBackgroundFill", - "description": "The page background fill." - }, - "SheetsChart": { - "properties": { - "chartId": { - "type": "integer", - "format": "int32", - "description": "The ID of the specific chart in the Google Sheets spreadsheet that is\nembedded." - }, - "sheetsChartProperties": { - "$ref": "SheetsChartProperties", - "description": "The properties of the Sheets chart." - }, - "contentUrl": { - "description": "The URL of an image of the embedded chart, with a default lifetime of 30\nminutes. This URL is tagged with the account of the requester. Anyone with\nthe URL effectively accesses the image as the original requester. Access to\nthe image may be lost if the presentation's sharing settings change.", - "type": "string" - }, - "spreadsheetId": { - "description": "The ID of the Google Sheets spreadsheet that contains the source chart.", - "type": "string" - } - }, - "id": "SheetsChart", - "description": "A PageElement kind representing\na linked chart embedded from Google Sheets.", - "type": "object" - }, - "SolidFill": { - "type": "object", - "properties": { - "alpha": { - "format": "float", - "description": "The fraction of this `color` that should be applied to the pixel.\nThat is, the final pixel color is defined by the equation:\n\n pixel color = alpha * (color) + (1.0 - alpha) * (background color)\n\nThis means that a value of 1.0 corresponds to a solid color, whereas\na value of 0.0 corresponds to a completely transparent color.", - "type": "number" - }, - "color": { - "description": "The color value of the solid fill.", - "$ref": "OpaqueColor" - } - }, - "id": "SolidFill", - "description": "A solid color fill. The page or page element is filled entirely with the\nspecified color value.\n\nIf any field is unset, its value may be inherited from a parent placeholder\nif it exists." - }, - "ThemeColorPair": { - "description": "A pair mapping a theme color type to the concrete color it represents.", - "type": "object", - "properties": { - "color": { - "$ref": "RgbColor", - "description": "The concrete color corresponding to the theme color type above." - }, - "type": { - "type": "string", - "enumDescriptions": [ - "Unspecified theme color. This value should not be used.", - "Represents the first dark color.", - "Represents the first light color.", - "Represents the second dark color.", - "Represents the second light color.", - "Represents the first accent color.", - "Represents the second accent color.", - "Represents the third accent color.", - "Represents the fourth accent color.", - "Represents the fifth accent color.", - "Represents the sixth accent color.", - "Represents the color to use for hyperlinks.", - "Represents the color to use for visited hyperlinks.", - "Represents the first text color.", - "Represents the first background color.", - "Represents the second text color.", - "Represents the second background color." - ], - "enum": [ - "THEME_COLOR_TYPE_UNSPECIFIED", - "DARK1", - "LIGHT1", - "DARK2", - "LIGHT2", - "ACCENT1", - "ACCENT2", - "ACCENT3", - "ACCENT4", - "ACCENT5", - "ACCENT6", - "HYPERLINK", - "FOLLOWED_HYPERLINK", - "TEXT1", - "BACKGROUND1", - "TEXT2", - "BACKGROUND2" - ], - "description": "The type of the theme color." - } - }, - "id": "ThemeColorPair" - }, - "OptionalColor": { - "type": "object", - "properties": { - "opaqueColor": { - "$ref": "OpaqueColor", - "description": "If set, this will be used as an opaque color. If unset, this represents\na transparent color." - } - }, - "id": "OptionalColor", - "description": "A color that can either be fully opaque or fully transparent." - }, - "PageElementProperties": { - "properties": { - "transform": { - "$ref": "AffineTransform", - "description": "The transform for the element." - }, - "pageObjectId": { - "description": "The object ID of the page where the element is located.", - "type": "string" - }, - "size": { - "$ref": "Size", - "description": "The size of the element." - } - }, - "id": "PageElementProperties", - "description": "Common properties for a page element.\n\nNote: When you initially create a\nPageElement, the API may modify\nthe values of both `size` and `transform`, but the\nvisual size will be unchanged.", - "type": "object" - }, - "SheetsChartProperties": { - "description": "The properties of the SheetsChart.", - "type": "object", - "properties": { - "chartImageProperties": { - "$ref": "ImageProperties", - "description": "The properties of the embedded chart image." - } - }, - "id": "SheetsChartProperties" - }, - "StretchedPictureFill": { - "description": "The stretched picture fill. The page or page element is filled entirely with\nthe specified picture. The picture is stretched to fit its container.", - "type": "object", - "properties": { - "contentUrl": { - "description": "Reading the content_url:\n\nAn URL to a picture with a default lifetime of 30 minutes.\nThis URL is tagged with the account of the requester. Anyone with the URL\neffectively accesses the picture as the original requester. Access to the\npicture may be lost if the presentation's sharing settings change.\n\nWriting the content_url:\n\nThe picture is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Pictures must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.", - "type": "string" - }, - "size": { - "$ref": "Size", - "description": "The original size of the picture fill. This field is read-only." - } - }, - "id": "StretchedPictureFill" - }, - "DeleteTableColumnRequest": { - "type": "object", - "properties": { - "tableObjectId": { - "description": "The table to delete columns from.", - "type": "string" - }, - "cellLocation": { - "$ref": "TableCellLocation", - "description": "The reference table cell location from which a column will be deleted.\n\nThe column this cell spans will be deleted. If this is a merged cell,\nmultiple columns will be deleted. If no columns remain in the table after\nthis deletion, the whole table is deleted." - } - }, - "id": "DeleteTableColumnRequest", - "description": "Deletes a column from a table." - }, - "UpdateTextStyleRequest": { - "description": "Update the styling of text in a Shape or\nTable.", - "type": "object", - "properties": { - "textRange": { - "$ref": "Range", - "description": "The range of text to style.\n\nThe range may be extended to include adjacent newlines.\n\nIf the range fully contains a paragraph belonging to a list, the\nparagraph's bullet is also updated with the matching text style." - }, - "objectId": { - "description": "The object ID of the shape or table with the text to be styled.", - "type": "string" - }, - "style": { - "$ref": "TextStyle", - "description": "The style(s) to set on the text.\n\nIf the value for a particular style matches that of the parent, that style\nwill be set to inherit.\n\nCertain text style changes may cause other changes meant to mirror the\nbehavior of the Slides editor. See the documentation of\nTextStyle for more information." - }, - "cellLocation": { - "$ref": "TableCellLocation", - "description": "The location of the cell in the table containing the text to style. If\n`object_id` refers to a table, `cell_location` must have a value.\nOtherwise, it must not." - }, - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `style` is implied and\nshould not be specified. A single `\"*\"` can be used as short-hand for\nlisting every field.\n\nFor example, to update the text style to bold, set `fields` to `\"bold\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", - "type": "string" - } - }, - "id": "UpdateTextStyleRequest" - }, - "List": { - "description": "A List describes the look and feel of bullets belonging to paragraphs\nassociated with a list. A paragraph that is part of a list has an implicit\nreference to that list's ID.", - "type": "object", - "properties": { - "listId": { - "description": "The ID of the list.", - "type": "string" - }, - "nestingLevel": { - "additionalProperties": { - "$ref": "NestingLevel" - }, - "description": "A map of nesting levels to the properties of bullets at the associated\nlevel. A list has at most nine levels of nesting, so the possible values\nfor the keys of this map are 0 through 8, inclusive.", - "type": "object" - } - }, - "id": "List" - }, - "WeightedFontFamily": { - "description": "Represents a font family and weight used to style a TextRun.", - "type": "object", - "properties": { - "weight": { - "format": "int32", - "description": "The rendered weight of the text. This field can have any value that is a\nmultiple of `100` between `100` and `900`, inclusive. This range\ncorresponds to the numerical values described in the CSS 2.1\nSpecification, [section 15.6](https://www.w3.org/TR/CSS21/fonts.html#font-boldness),\nwith non-numerical values disallowed. Weights greater than or equal to\n`700` are considered bold, and weights less than `700`are not bold. The\ndefault value is `400` (\"normal\").", - "type": "integer" - }, - "fontFamily": { - "description": "The font family of the text.\n\nThe font family can be any font from the Font menu in Slides or from\n[Google Fonts] (https://fonts.google.com/). If the font name is\nunrecognized, the text is rendered in `Arial`.", - "type": "string" - } - }, - "id": "WeightedFontFamily" - }, - "PageElement": { - "type": "object", - "properties": { - "table": { - "$ref": "Table", - "description": "A table page element." - }, - "transform": { - "description": "The transform of the page element.", - "$ref": "AffineTransform" - }, - "objectId": { - "description": "The object ID for this page element. Object IDs used by\ngoogle.apps.slides.v1.Page and\ngoogle.apps.slides.v1.PageElement share the same namespace.", - "type": "string" - }, - "shape": { - "description": "A generic shape.", - "$ref": "Shape" - }, - "line": { - "description": "A line page element.", - "$ref": "Line" - }, - "description": { - "description": "The description of the page element. Combined with title to display alt\ntext.", - "type": "string" - }, - "elementGroup": { - "$ref": "Group", - "description": "A collection of page elements joined as a single unit." - }, - "image": { - "description": "An image page element.", - "$ref": "Image" - }, - "size": { - "$ref": "Size", - "description": "The size of the page element." - }, - "sheetsChart": { - "description": "A linked chart embedded from Google Sheets. Unlinked charts are\nrepresented as images.", - "$ref": "SheetsChart" - }, - "title": { - "description": "The title of the page element. Combined with description to display alt\ntext.", - "type": "string" - }, - "video": { - "$ref": "Video", - "description": "A video page element." - }, - "wordArt": { - "$ref": "WordArt", - "description": "A word art page element." - } - }, - "id": "PageElement", - "description": "A visual element rendered on a page." - }, - "CreateImageRequest": { - "id": "CreateImageRequest", - "description": "Creates an image.", - "type": "object", - "properties": { - "elementProperties": { - "$ref": "PageElementProperties", - "description": "The element properties for the image.\n\nWhen the aspect ratio of the provided size does not match the image aspect\nratio, the image is scaled and centered with respect to the size in order\nto maintain aspect ratio. The provided transform is applied after this\noperation." - }, - "url": { - "type": "string", - "description": "The image URL.\n\nThe image is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Images must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat." - }, - "objectId": { - "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", - "type": "string" - } - } - }, - "CreateParagraphBulletsRequest": { - "properties": { - "textRange": { - "description": "The range of text to apply the bullet presets to, based on TextElement indexes.", - "$ref": "Range" - }, - "objectId": { - "description": "The object ID of the shape or table containing the text to add bullets to.", - "type": "string" - }, - "bulletPreset": { - "enumDescriptions": [ - "A bulleted list with a `DISC`, `CIRCLE` and `SQUARE` bullet glyph for the\nfirst 3 list nesting levels.", - "A bulleted list with a `DIAMONDX`, `ARROW3D` and `SQUARE` bullet glyph for\nthe first 3 list nesting levels.", - "A bulleted list with `CHECKBOX` bullet glyphs for all list nesting levels.", - "A bulleted list with a `ARROW`, `DIAMOND` and `DISC` bullet glyph for\nthe first 3 list nesting levels.", - "A bulleted list with a `STAR`, `CIRCLE` and `DISC` bullet glyph for\nthe first 3 list nesting levels.", - "A bulleted list with a `ARROW3D`, `CIRCLE` and `SQUARE` bullet glyph for\nthe first 3 list nesting levels.", - "A bulleted list with a `LEFTTRIANGLE`, `DIAMOND` and `DISC` bullet glyph\nfor the first 3 list nesting levels.", - "A bulleted list with a `DIAMONDX`, `HOLLOWDIAMOND` and `SQUARE` bullet\nglyph for the first 3 list nesting levels.", - "A bulleted list with a `DIAMOND`, `CIRCLE` and `SQUARE` bullet glyph\nfor the first 3 list nesting levels.", - "A numbered list with `DIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods.", - "A numbered list with `DIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by parenthesis.", - "A numbered list with `DIGIT` numeric glyphs separated by periods, where\neach nesting level uses the previous nesting level's glyph as a prefix.\nFor example: '1.', '1.1.', '2.', '2.2.'.", - "A numbered list with `UPPERALPHA`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods.", - "A numbered list with `UPPERROMAN`, `UPPERALPHA` and `DIGIT` numeric glyphs\nfor the first 3 list nesting levels, followed by periods.", - "A numbered list with `ZERODIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods." - ], - "enum": [ - "BULLET_DISC_CIRCLE_SQUARE", - "BULLET_DIAMONDX_ARROW3D_SQUARE", - "BULLET_CHECKBOX", - "BULLET_ARROW_DIAMOND_DISC", - "BULLET_STAR_CIRCLE_SQUARE", - "BULLET_ARROW3D_CIRCLE_SQUARE", - "BULLET_LEFTTRIANGLE_DIAMOND_DISC", - "BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE", - "BULLET_DIAMOND_CIRCLE_SQUARE", - "NUMBERED_DIGIT_ALPHA_ROMAN", - "NUMBERED_DIGIT_ALPHA_ROMAN_PARENS", - "NUMBERED_DIGIT_NESTED", - "NUMBERED_UPPERALPHA_ALPHA_ROMAN", - "NUMBERED_UPPERROMAN_UPPERALPHA_DIGIT", - "NUMBERED_ZERODIGIT_ALPHA_ROMAN" - ], - "description": "The kinds of bullet glyphs to be used. Defaults to the\n`BULLET_DISC_CIRCLE_SQUARE` preset.", - "type": "string" - }, - "cellLocation": { - "description": "The optional table cell location if the text to be modified is in a table\ncell. If present, the object_id must refer to a table.", - "$ref": "TableCellLocation" - } - }, - "id": "CreateParagraphBulletsRequest", - "description": "Creates bullets for all of the paragraphs that overlap with the given\ntext index range.\n\nThe nesting level of each paragraph will be determined by counting leading\ntabs in front of each paragraph. To avoid excess space between the bullet and\nthe corresponding paragraph, these leading tabs are removed by this request.\nThis may change the indices of parts of the text.\n\nIf the paragraph immediately before paragraphs being updated is in a list\nwith a matching preset, the paragraphs being updated are added to that\npreceding list.", - "type": "object" - }, - "Size": { - "properties": { - "width": { - "$ref": "Dimension", - "description": "The width of the object." - }, - "height": { - "$ref": "Dimension", - "description": "The height of the object." - } - }, - "id": "Size", - "description": "A width and height.", - "type": "object" - }, - "TextStyle": { - "description": "Represents the styling that can be applied to a TextRun.\n\nIf this text is contained in a shape with a parent placeholder, then these text styles may be\ninherited from the parent. Which text styles are inherited depend on the\nnesting level of lists:\n\n* A text run in a paragraph that is not in a list will inherit its text style\n from the the newline character in the paragraph at the 0 nesting level of\n the list inside the parent placeholder.\n* A text run in a paragraph that is in a list will inherit its text style\n from the newline character in the paragraph at its corresponding nesting\n level of the list inside the parent placeholder.\n\nInherited text styles are represented as unset fields in this message. If\ntext is contained in a shape without a parent placeholder, unsetting these\nfields will revert the style to a value matching the defaults in the Slides\neditor.", - "type": "object", - "properties": { - "baselineOffset": { - "enumDescriptions": [ - "The text's baseline offset is inherited from the parent.", - "The text is not vertically offset.", - "The text is vertically offset upwards (superscript).", - "The text is vertically offset downwards (subscript)." - ], - "enum": [ - "BASELINE_OFFSET_UNSPECIFIED", - "NONE", - "SUPERSCRIPT", - "SUBSCRIPT" - ], - "description": "The text's vertical offset from its normal position.\n\nText with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is automatically\nrendered in a smaller font size, computed based on the `font_size` field.\nThe `font_size` itself is not affected by changes in this field.", - "type": "string" - }, - "weightedFontFamily": { - "$ref": "WeightedFontFamily", - "description": "The font family and rendered weight of the text.\n\nThis field is an extension of `font_family` meant to support explicit font\nweights without breaking backwards compatibility. As such, when reading the\nstyle of a range of text, the value of `weighted_font_family#font_family`\nwill always be equal to that of `font_family`. However, when writing, if\nboth fields are included in the field mask (either explicitly or through\nthe wildcard `\"*\"`), their values are reconciled as follows:\n\n* If `font_family` is set and `weighted_font_family` is not, the value of\n `font_family` is applied with weight `400` (\"normal\").\n* If both fields are set, the value of `font_family` must match that of\n `weighted_font_family#font_family`. If so, the font family and weight of\n `weighted_font_family` is applied. Otherwise, a 400 bad request error is\n returned.\n* If `weighted_font_family` is set and `font_family` is not, the font\n family and weight of `weighted_font_family` is applied.\n* If neither field is set, the font family and weight of the text inherit\n from the parent. Note that these properties cannot inherit separately\n from each other.\n\nIf an update request specifies values for both `weighted_font_family` and\n`bold`, the `weighted_font_family` is applied first, then `bold`.\n\nIf `weighted_font_family#weight` is not set, it defaults to `400`.\n\nIf `weighted_font_family` is set, then `weighted_font_family#font_family`\nmust also be set with a non-empty value. Otherwise, a 400 bad request error\nis returned." - }, - "smallCaps": { - "description": "Whether or not the text is in small capital letters.", - "type": "boolean" - }, - "backgroundColor": { - "description": "The background color of the text. If set, the color is either opaque or\ntransparent, depending on if the `opaque_color` field in it is set.", - "$ref": "OptionalColor" - }, - "link": { - "$ref": "Link", - "description": "The hyperlink destination of the text. If unset, there is no link. Links\nare not inherited from parent text.\n\nChanging the link in an update request causes some other changes to the\ntext style of the range:\n\n* When setting a link, the text foreground color will be set to\n ThemeColorType.HYPERLINK and the text will\n be underlined. If these fields are modified in the same\n request, those values will be used instead of the link defaults.\n* Setting a link on a text range that overlaps with an existing link will\n also update the existing link to point to the new URL.\n* Links are not settable on newline characters. As a result, setting a link\n on a text range that crosses a paragraph boundary, such as `\"ABC\\n123\"`,\n will separate the newline character(s) into their own text runs. The\n link will be applied separately to the runs before and after the newline.\n* Removing a link will update the text style of the range to match the\n style of the preceding text (or the default text styles if the preceding\n text is another link) unless different styles are being set in the same\n request." - }, - "underline": { - "description": "Whether or not the text is underlined.", - "type": "boolean" - }, - "foregroundColor": { - "$ref": "OptionalColor", - "description": "The color of the text itself. If set, the color is either opaque or\ntransparent, depending on if the `opaque_color` field in it is set." - }, - "bold": { - "description": "Whether or not the text is rendered as bold.", - "type": "boolean" - }, - "fontFamily": { - "description": "The font family of the text.\n\nThe font family can be any font from the Font menu in Slides or from\n[Google Fonts] (https://fonts.google.com/). If the font name is\nunrecognized, the text is rendered in `Arial`.\n\nSome fonts can affect the weight of the text. If an update request\nspecifies values for both `font_family` and `bold`, the explicitly-set\n`bold` value is used.", - "type": "string" - }, - "italic": { - "description": "Whether or not the text is italicized.", - "type": "boolean" - }, - "strikethrough": { - "description": "Whether or not the text is struck through.", - "type": "boolean" - }, - "fontSize": { - "description": "The size of the text's font. When read, the `font_size` will specified in\npoints.", - "$ref": "Dimension" - } - }, - "id": "TextStyle" - }, - "UpdateVideoPropertiesRequest": { - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the video the updates are applied to.", - "type": "string" - }, - "videoProperties": { - "description": "The video properties to update.", - "$ref": "VideoProperties" - }, - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `videoProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the video outline color, set `fields` to\n`\"outline.outlineFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", - "type": "string" - } - }, - "id": "UpdateVideoPropertiesRequest", - "description": "Update the properties of a Video." + "id": "VideoProperties", + "description": "The properties of the Video." } }, - "protocol": "rest", "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, + "protocol": "rest", "canonicalName": "Slides", "auth": { "oauth2": { @@ -3659,65 +3652,15 @@ "resources": { "presentations": { "methods": { - "batchUpdate": { - "httpMethod": "POST", - "parameterOrder": [ - "presentationId" - ], - "response": { - "$ref": "BatchUpdatePresentationResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.readonly", - "https://www.googleapis.com/auth/presentations", - "https://www.googleapis.com/auth/spreadsheets", - "https://www.googleapis.com/auth/spreadsheets.readonly" - ], - "parameters": { - "presentationId": { - "location": "path", - "description": "The presentation to apply the updates to.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/presentations/{presentationId}:batchUpdate", - "path": "v1/presentations/{presentationId}:batchUpdate", - "id": "slides.presentations.batchUpdate", - "request": { - "$ref": "BatchUpdatePresentationRequest" - }, - "description": "Applies one or more updates to the presentation.\n\nEach request is validated before\nbeing applied. If any request is not valid, then the entire request will\nfail and nothing will be applied.\n\nSome requests have replies to\ngive you some information about how they are applied. Other requests do\nnot need to return information; these each return an empty reply.\nThe order of replies matches that of the requests.\n\nFor example, suppose you call batchUpdate with four updates, and only the\nthird one returns information. The response would have two empty replies:\nthe reply to the third request, and another empty reply, in that order.\n\nBecause other users may be editing the presentation, the presentation\nmight not exactly reflect your changes: your changes may\nbe altered with respect to collaborator changes. If there are no\ncollaborators, the presentation should reflect your changes. In any case,\nthe updates in your request are guaranteed to be applied together\natomically." - }, - "create": { - "request": { - "$ref": "Presentation" - }, - "description": "Creates a new presentation using the title given in the request. Other\nfields in the request are ignored.\nReturns the created presentation.", - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "Presentation" - }, - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/presentations" - ], - "parameters": {}, - "flatPath": "v1/presentations", - "path": "v1/presentations", - "id": "slides.presentations.create" - }, "get": { "description": "Gets the latest version of the specified presentation.", "httpMethod": "GET", - "parameterOrder": [ - "presentationId" - ], "response": { "$ref": "Presentation" }, + "parameterOrder": [ + "presentationId" + ], "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.readonly", @@ -3726,56 +3669,73 @@ ], "parameters": { "presentationId": { + "pattern": "^[^/]+$", "location": "path", "description": "The ID of the presentation to retrieve.", "type": "string", - "required": true, - "pattern": "^[^/]+$" + "required": true } }, "flatPath": "v1/presentations/{presentationsId}", "path": "v1/presentations/{+presentationId}", "id": "slides.presentations.get" + }, + "batchUpdate": { + "response": { + "$ref": "BatchUpdatePresentationResponse" + }, + "parameterOrder": [ + "presentationId" + ], + "httpMethod": "POST", + "parameters": { + "presentationId": { + "location": "path", + "description": "The presentation to apply the updates to.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/presentations", + "https://www.googleapis.com/auth/spreadsheets", + "https://www.googleapis.com/auth/spreadsheets.readonly" + ], + "flatPath": "v1/presentations/{presentationId}:batchUpdate", + "id": "slides.presentations.batchUpdate", + "path": "v1/presentations/{presentationId}:batchUpdate", + "description": "Applies one or more updates to the presentation.\n\nEach request is validated before\nbeing applied. If any request is not valid, then the entire request will\nfail and nothing will be applied.\n\nSome requests have replies to\ngive you some information about how they are applied. Other requests do\nnot need to return information; these each return an empty reply.\nThe order of replies matches that of the requests.\n\nFor example, suppose you call batchUpdate with four updates, and only the\nthird one returns information. The response would have two empty replies:\nthe reply to the third request, and another empty reply, in that order.\n\nBecause other users may be editing the presentation, the presentation\nmight not exactly reflect your changes: your changes may\nbe altered with respect to collaborator changes. If there are no\ncollaborators, the presentation should reflect your changes. In any case,\nthe updates in your request are guaranteed to be applied together\natomically.", + "request": { + "$ref": "BatchUpdatePresentationRequest" + } + }, + "create": { + "response": { + "$ref": "Presentation" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/presentations" + ], + "parameters": {}, + "flatPath": "v1/presentations", + "id": "slides.presentations.create", + "path": "v1/presentations", + "request": { + "$ref": "Presentation" + }, + "description": "Creates a new presentation using the title given in the request. Other\nfields in the request are ignored.\nReturns the created presentation." } }, "resources": { "pages": { "methods": { - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "presentationId", - "pageObjectId" - ], - "response": { - "$ref": "Page" - }, - "parameters": { - "presentationId": { - "type": "string", - "required": true, - "location": "path", - "description": "The ID of the presentation to retrieve." - }, - "pageObjectId": { - "description": "The object ID of the page to retrieve.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.readonly", - "https://www.googleapis.com/auth/presentations", - "https://www.googleapis.com/auth/presentations.readonly" - ], - "flatPath": "v1/presentations/{presentationId}/pages/{pageObjectId}", - "path": "v1/presentations/{presentationId}/pages/{pageObjectId}", - "id": "slides.presentations.pages.get", - "description": "Gets the latest version of the specified page in the presentation." - }, "getThumbnail": { + "description": "Generates a thumbnail of the latest version of the specified page in the\npresentation and returns a URL to the thumbnail image.", "response": { "$ref": "Thumbnail" }, @@ -3791,6 +3751,12 @@ "https://www.googleapis.com/auth/presentations.readonly" ], "parameters": { + "pageObjectId": { + "location": "path", + "description": "The object ID of the page whose thumbnail to retrieve.", + "type": "string", + "required": true + }, "thumbnailProperties.thumbnailSize": { "location": "query", "enum": [ @@ -3801,30 +3767,57 @@ "type": "string" }, "thumbnailProperties.mimeType": { - "location": "query", "enum": [ "PNG" ], "description": "The optional mime type of the thumbnail image.\n\nIf you don't specify the mime type, the default mime type will be PNG.", - "type": "string" + "type": "string", + "location": "query" }, "presentationId": { + "location": "path", "description": "The ID of the presentation to retrieve.", "type": "string", - "required": true, - "location": "path" - }, - "pageObjectId": { - "description": "The object ID of the page whose thumbnail to retrieve.", - "type": "string", - "required": true, - "location": "path" + "required": true } }, "flatPath": "v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail", "id": "slides.presentations.pages.getThumbnail", - "path": "v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail", - "description": "Generates a thumbnail of the latest version of the specified page in the\npresentation and returns a URL to the thumbnail image." + "path": "v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail" + }, + "get": { + "description": "Gets the latest version of the specified page in the presentation.", + "response": { + "$ref": "Page" + }, + "parameterOrder": [ + "presentationId", + "pageObjectId" + ], + "httpMethod": "GET", + "parameters": { + "presentationId": { + "location": "path", + "description": "The ID of the presentation to retrieve.", + "type": "string", + "required": true + }, + "pageObjectId": { + "location": "path", + "description": "The object ID of the page to retrieve.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/presentations", + "https://www.googleapis.com/auth/presentations.readonly" + ], + "flatPath": "v1/presentations/{presentationId}/pages/{pageObjectId}", + "id": "slides.presentations.pages.get", + "path": "v1/presentations/{presentationId}/pages/{pageObjectId}" } } } @@ -3832,14 +3825,14 @@ } }, "parameters": { - "key": { - "type": "string", - "location": "query", - "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." - }, "access_token": { - "location": "query", "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "key": { + "location": "query", + "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.", "type": "string" }, "quotaUser": { @@ -3854,37 +3847,38 @@ "location": "query" }, "bearer_token": { - "location": "query", "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", "type": "string", "location": "query" }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, "upload_protocol": { "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string" }, "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", "default": "true", - "type": "boolean" - }, - "fields": { + "type": "boolean", "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" + "description": "Returns response with indentations and line breaks." }, "uploadType": { + "type": "string", "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." + }, + "fields": { + "type": "string", + "location": "query", + "description": "Selector specifying which fields to include in a partial response." }, "$.xgafv": { + "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -3894,13 +3888,12 @@ "1", "2" ], - "description": "V1 error format.", - "type": "string" + "description": "V1 error format." }, "callback": { + "location": "query", "description": "JSONP", - "type": "string", - "location": "query" + "type": "string" }, "alt": { "type": "string", @@ -3920,5 +3913,12 @@ } }, "version": "v1", - "baseUrl": "https://slides.googleapis.com/" + "baseUrl": "https://slides.googleapis.com/", + "description": "An API for creating and editing Google Slides presentations.", + "servicePath": "", + "kind": "discovery#restDescription", + "basePath": "", + "revision": "20170907", + "documentationLink": "https://developers.google.com/slides/", + "id": "slides:v1" } diff --git a/vendor/google.golang.org/api/slides/v1/slides-gen.go b/vendor/google.golang.org/api/slides/v1/slides-gen.go index 7a1e3f44f..c0287fa07 100644 --- a/vendor/google.golang.org/api/slides/v1/slides-gen.go +++ b/vendor/google.golang.org/api/slides/v1/slides-gen.go @@ -469,6 +469,8 @@ type CreateImageRequest struct { // cannot exceed 25 megapixels, and must be in either in PNG, JPEG, or // GIF // format. + // + // The provided URL can be at maximum 2K bytes large. Url string `json:"url,omitempty"` // ForceSendFields is a list of field names (e.g. "ElementProperties") @@ -640,7 +642,7 @@ type CreateParagraphBulletsRequest struct { // `DIAMOND` and `DISC` bullet glyph for // the first 3 list nesting levels. // "BULLET_STAR_CIRCLE_SQUARE" - A bulleted list with a `STAR`, - // `CIRCLE` and `DISC` bullet glyph for + // `CIRCLE` and `SQUARE` bullet glyph for // the first 3 list nesting levels. // "BULLET_ARROW3D_CIRCLE_SQUARE" - A bulleted list with a `ARROW3D`, // `CIRCLE` and `SQUARE` bullet glyph for @@ -3116,7 +3118,7 @@ func (s *Page) MarshalJSON() ([]byte, error) { type PageBackgroundFill struct { // PropertyState: The background fill property state. // - // Updating the the fill on a page will implicitly update this field + // Updating the fill on a page will implicitly update this field // to // `RENDERED`, unless another value is specified in the same request. // To @@ -3222,6 +3224,19 @@ type PageElement struct { Title string `json:"title,omitempty"` // Transform: The transform of the page element. + // + // The visual appearance of the page element is determined by its + // absolute + // transform. To compute the absolute transform, preconcatenate a + // page + // element's transform with the transforms of all of its parent groups. + // If the + // page element is not in a group, its absolute transform is the same as + // the + // value in this field. + // + // The initial transform for the newly created Group is always the + // identity transform. Transform *AffineTransform `json:"transform,omitempty"` // Video: A video page element. @@ -3894,6 +3909,8 @@ type ReplaceAllShapesWithImageRequest struct { // cannot exceed 25 megapixels, and must be in either in PNG, JPEG, or // GIF // format. + // + // The provided URL can be at maximum 2K bytes large. ImageUrl string `json:"imageUrl,omitempty"` // PageObjectIds: If non-empty, limits the matches to page elements only @@ -5255,6 +5272,8 @@ type StretchedPictureFill struct { // cannot exceed 25 megapixels, and must be in either in PNG, JPEG, or // GIF // format. + // + // The provided URL can be at maximum 2K bytes large. ContentUrl string `json:"contentUrl,omitempty"` // Size: The original size of the picture fill. This field is read-only. @@ -6177,6 +6196,12 @@ func (s *UpdateLinePropertiesRequest) MarshalJSON() ([]byte, error) { // UpdatePageElementTransformRequest: Updates the transform of a page // element. +// +// Updating the transform of a group will change the absolute transform +// of the +// page elements in that group, which can change their visual +// appearance. See +// the documentation for PageElement.transform for more details. type UpdatePageElementTransformRequest struct { // ApplyMode: The apply mode of the transform update. // diff --git a/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-api.json b/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-api.json index 18be1751c..221683e80 100644 --- a/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-api.json +++ b/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-api.json @@ -1,25 +1,500 @@ { + "canonicalName": "Cloud Source Repositories", + "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/source.read_only": { + "description": "View the contents of your source code repositories" + }, + "https://www.googleapis.com/auth/source.read_write": { + "description": "Manage the contents of your source code repositories" + } + } + } + }, + "rootUrl": "https://sourcerepo.googleapis.com/", + "ownerDomain": "google.com", + "name": "sourcerepo", + "batchPath": "batch", + "title": "Cloud Source Repositories API", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "repos": { + "methods": { + "testIamPermissions": { + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/source.read_only", + "https://www.googleapis.com/auth/source.read_write" + ], + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/repos/.+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/repos/{reposId}:testIamPermissions", + "id": "sourcerepo.projects.repos.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "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." + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/source.read_only", + "https://www.googleapis.com/auth/source.read_write" + ], + "parameters": { + "name": { + "description": "The name of the repo to delete. Values are of the form\n`projects/\u003cproject\u003e/repos/\u003crepo\u003e`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/repos/.+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/repos/{reposId}", + "id": "sourcerepo.projects.repos.delete", + "path": "v1/{+name}", + "description": "Deletes a repo." + }, + "list": { + "response": { + "$ref": "ListReposResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "Resume listing repositories where a prior ListReposResponse\nleft off. This is an opaque token that must be obtained from\na recent, prior ListReposResponse's next_page_token field.", + "type": "string" + }, + "name": { + "description": "The project ID whose repos should be listed. Values are of the form\n`projects/\u003cproject\u003e`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum number of repositories to return; between 1 and 500.\nIf not set or zero, defaults to 100 at the server.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/source.read_only", + "https://www.googleapis.com/auth/source.read_write" + ], + "flatPath": "v1/projects/{projectsId}/repos", + "id": "sourcerepo.projects.repos.list", + "path": "v1/{+name}/repos", + "description": "Returns all repos belonging to a project. The sizes of the repos are\nnot set by ListRepos. To get the size of a repo, use GetRepo." + }, + "setIamPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/repos/.+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/source.read_only", + "https://www.googleapis.com/auth/source.read_write" + ], + "flatPath": "v1/projects/{projectsId}/repos/{reposId}:setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "id": "sourcerepo.projects.repos.setIamPolicy", + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "SetIamPolicyRequest" + } + }, + "create": { + "response": { + "$ref": "Repo" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/source.read_only", + "https://www.googleapis.com/auth/source.read_write" + ], + "parameters": { + "parent": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "The project in which to create the repo. Values are of the form\n`projects/\u003cproject\u003e`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/repos", + "id": "sourcerepo.projects.repos.create", + "path": "v1/{+parent}/repos", + "request": { + "$ref": "Repo" + }, + "description": "Creates a repo in the given project with the given name.\n\nIf the named repository already exists, `CreateRepo` returns\n`ALREADY_EXISTS`." + }, + "getIamPolicy": { + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/source.read_only", + "https://www.googleapis.com/auth/source.read_write" + ], + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/repos/.+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/repos/{reposId}:getIamPolicy", + "id": "sourcerepo.projects.repos.getIamPolicy", + "path": "v1/{+resource}: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." + }, + "get": { + "description": "Returns information about a repo.", + "httpMethod": "GET", + "response": { + "$ref": "Repo" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/source.read_only", + "https://www.googleapis.com/auth/source.read_write" + ], + "parameters": { + "name": { + "description": "The name of the requested repository. Values are of the form\n`projects/\u003cproject\u003e/repos/\u003crepo\u003e`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/repos/.+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/repos/{reposId}", + "path": "v1/{+name}", + "id": "sourcerepo.projects.repos.get" + } + } + } + } + } + }, + "parameters": { + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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", + "description": "Data format for response.", + "default": "json" + }, + "key": { + "location": "query", + "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.", + "type": "string" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + } + }, + "version": "v1", "baseUrl": "https://sourcerepo.googleapis.com/", "kind": "discovery#restDescription", "description": "Access source code repositories hosted by Google.", "servicePath": "", "basePath": "", - "revision": "20170528", - "documentationLink": "https://cloud.google.com/source-repositories/docs/apis", "id": "sourcerepo:v1", + "documentationLink": "https://cloud.google.com/source-repositories/docs/apis", + "revision": "20170528", "discoveryVersion": "v1", "version_module": "True", "schemas": { - "Condition": { - "description": "A condition to be met.", - "type": "object", + "AuditConfig": { "properties": { - "values": { - "description": "The objects of the condition. This is mutually exclusive with 'value'.", + "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" + }, + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.\nNext ID: 4", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "exemptedMembers": { "items": { "type": "string" }, "type": "array" + } + }, + "id": "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\nAuditConfig 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.", + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "type": "object", + "properties": { + "updateMask": { + "format": "google-fieldmask", + "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.", + "type": "string" + }, + "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." + } + }, + "id": "SetIamPolicyRequest" + }, + "CloudAuditOptions": { + "properties": { + "logName": { + "enumDescriptions": [ + "Default. Should not be used.", + "Corresponds to \"cloudaudit.googleapis.com/activity\"", + "Corresponds to \"cloudaudit.googleapis.com/data_access\"" + ], + "enum": [ + "UNSPECIFIED_LOG_NAME", + "ADMIN_ACTIVITY", + "DATA_ACCESS" + ], + "description": "The log_name to populate in the Cloud Audit Record.", + "type": "string" + } + }, + "id": "CloudAuditOptions", + "description": "Write a Cloud Audit log", + "type": "object" + }, + "Binding": { + "properties": { + "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` or `joe@example.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`.\nRequired", + "type": "string" + } + }, + "id": "Binding", + "description": "Associates `members` with a `role`.", + "type": "object" + }, + "MirrorConfig": { + "properties": { + "url": { + "description": "URL of the main repository at the other hosting service.", + "type": "string" + }, + "webhookId": { + "description": "ID of the webhook listening to updates to trigger mirroring.\nRemoving this webook from the other hosting service will stop\nGoogle Cloud Source Repositories from receiving notifications,\nand thereby disabling mirroring.", + "type": "string" + }, + "deployKeyId": { + "description": "ID of the SSH deploy key at the other hosting service.\nRemoving this key from the other service would deauthorize\nGoogle Cloud Source Repositories from mirroring.", + "type": "string" + } + }, + "id": "MirrorConfig", + "description": "Configuration to automatically mirror a repository from another\nhosting service, for example GitHub or BitBucket.", + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "Repo": { + "description": "A repository (or repo) is a Git repository storing versioned source content.", + "type": "object", + "properties": { + "name": { + "description": "Resource name of the repository, of the form\n`projects/\u003cproject\u003e/repos/\u003crepo\u003e`. The repo name may contain slashes.\neg, `projects/myproject/repos/name/with/slash`", + "type": "string" + }, + "mirrorConfig": { + "description": "How this repository mirrors a repository managed by another service.", + "$ref": "MirrorConfig" + }, + "url": { + "description": "URL to clone the repository from Google Cloud Source Repositories.", + "type": "string" + }, + "size": { + "format": "int64", + "description": "The disk usage of the repo, in bytes.\nOnly returned by GetRepo.", + "type": "string" + } + }, + "id": "Repo" + }, + "Condition": { + "properties": { + "svc": { + "description": "Trusted attributes discharged by the service.", + "type": "string" + }, + "sys": { + "enumDescriptions": [ + "Default non-attribute type", + "Region of the resource", + "Service name", + "Resource name", + "IP address of the caller" + ], + "enum": [ + "NO_ATTR", + "REGION", + "SERVICE", + "NAME", + "IP" + ], + "description": "Trusted attributes supplied by any service that owns resources and uses\nthe IAM system for access control.", + "type": "string" + }, + "value": { + "description": "DEPRECATED. Use 'values' instead.", + "type": "string" }, "iam": { "enumDescriptions": [ @@ -39,15 +514,14 @@ "description": "Trusted attributes supplied by the IAM system.", "type": "string" }, + "values": { + "description": "The objects of the condition. This is mutually exclusive with 'value'.", + "items": { + "type": "string" + }, + "type": "array" + }, "op": { - "enumDescriptions": [ - "Default no-op.", - "DEPRECATED. Use IN instead.", - "DEPRECATED. Use NOT_IN instead.", - "The condition is true if the subject (or any element of it if it is\na set) matches any of the supplied values.", - "The condition is true if the subject (or every element of it if it is\na set) matches none of the supplied values.", - "Subject is discharged" - ], "enum": [ "NO_OP", "EQUALS", @@ -57,36 +531,20 @@ "DISCHARGED" ], "description": "An operator to apply the subject with.", - "type": "string" - }, - "svc": { - "description": "Trusted attributes discharged by the service.", - "type": "string" - }, - "sys": { - "description": "Trusted attributes supplied by any service that owns resources and uses\nthe IAM system for access control.", "type": "string", "enumDescriptions": [ - "Default non-attribute type", - "Region of the resource", - "Service name", - "Resource name", - "IP address of the caller" - ], - "enum": [ - "NO_ATTR", - "REGION", - "SERVICE", - "NAME", - "IP" + "Default no-op.", + "DEPRECATED. Use IN instead.", + "DEPRECATED. Use NOT_IN instead.", + "The condition is true if the subject (or any element of it if it is\na set) matches any of the supplied values.", + "The condition is true if the subject (or every element of it if it is\na set) matches none of the supplied values.", + "Subject is discharged" ] - }, - "value": { - "description": "DEPRECATED. Use 'values' instead.", - "type": "string" } }, - "id": "Condition" + "id": "Condition", + "description": "A condition to be met.", + "type": "object" }, "ListReposResponse": { "description": "Response for ListRepos. The size is not set in the returned repositories.", @@ -136,8 +594,6 @@ "id": "CounterOptions" }, "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.", - "type": "object", "properties": { "exemptedMembers": { "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", @@ -147,6 +603,12 @@ "type": "array" }, "logType": { + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], "description": "The log type that this config enables.", "type": "string", "enumDescriptions": [ @@ -154,39 +616,15 @@ "Admin reads. Example: CloudIAM getIamPolicy", "Data writes. Example: CloudSQL Users create", "Data reads. Example: CloudSQL Users list" - ], - "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" ] } }, - "id": "AuditLogConfig" + "id": "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.", + "type": "object" }, "Rule": { - "description": "A rule to be applied in a Policy.", - "type": "object", "properties": { - "notIn": { - "description": "If one or more 'not_in' clauses are specified, the rule matches\nif the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.\nThe format for in and not_in entries is the same as for members in a\nBinding (see google/iam/v1/policy.proto).", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "Human-readable description of the rule.", - "type": "string" - }, - "conditions": { - "description": "Additional restrictions that must be met", - "items": { - "$ref": "Condition" - }, - "type": "array" - }, "logConfig": { "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries\nthat match the LOG action.", "items": { @@ -209,14 +647,6 @@ "type": "array" }, "action": { - "enumDescriptions": [ - "Default no action.", - "Matching 'Entries' grant access.", - "Matching 'Entries' grant access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' deny access.", - "Matching 'Entries' deny access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' tell IAM.Check callers to generate logs." - ], "enum": [ "NO_ACTION", "ALLOW", @@ -226,18 +656,44 @@ "LOG" ], "description": "Required", + "type": "string", + "enumDescriptions": [ + "Default no action.", + "Matching 'Entries' grant access.", + "Matching 'Entries' grant access and the caller promises to log\nthe request per the returned log_configs.", + "Matching 'Entries' deny access.", + "Matching 'Entries' deny access and the caller promises to log\nthe request per the returned log_configs.", + "Matching 'Entries' tell IAM.Check callers to generate logs." + ] + }, + "notIn": { + "description": "If one or more 'not_in' clauses are specified, the rule matches\nif the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.\nThe format for in and not_in entries is the same as for members in a\nBinding (see google/iam/v1/policy.proto).", + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "Human-readable description of the rule.", "type": "string" + }, + "conditions": { + "description": "Additional restrictions that must be met", + "items": { + "$ref": "Condition" + }, + "type": "array" } }, - "id": "Rule" + "id": "Rule", + "description": "A rule to be applied in a Policy.", + "type": "object" }, "LogConfig": { - "description": "Specifies what kind of log the caller must write", - "type": "object", "properties": { "counter": { - "$ref": "CounterOptions", - "description": "Counter options." + "description": "Counter options.", + "$ref": "CounterOptions" }, "dataAccess": { "$ref": "DataAccessOptions", @@ -248,7 +704,9 @@ "$ref": "CloudAuditOptions" } }, - "id": "LogConfig" + "id": "LogConfig", + "description": "Specifies what kind of log the caller must write", + "type": "object" }, "TestIamPermissionsRequest": { "description": "Request message for `TestIamPermissions` method.", @@ -265,19 +723,7 @@ "id": "TestIamPermissionsRequest" }, "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", "properties": { - "iamOwned": { - "type": "boolean" - }, - "rules": { - "description": "If more than one rule is specified, the rules are applied in the following\nmanner:\n- All matching LOG rules are always applied.\n- If any DENY/DENY_WITH_LOG rule matches, permission is denied.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is\n granted.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if no rule applies, permission is denied.", - "items": { - "$ref": "Rule" - }, - "type": "array" - }, "version": { "format": "int32", "description": "Version of the `Policy`. The default version is 0.", @@ -301,478 +747,32 @@ "format": "byte", "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.", "type": "string" + }, + "iamOwned": { + "type": "boolean" + }, + "rules": { + "description": "If more than one rule is specified, the rules are applied in the following\nmanner:\n- All matching LOG rules are always applied.\n- If any DENY/DENY_WITH_LOG rule matches, permission is denied.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is\n granted.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if no rule applies, permission is denied.", + "items": { + "$ref": "Rule" + }, + "type": "array" } }, - "id": "Policy" + "id": "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object" }, "DataAccessOptions": { + "properties": {}, + "id": "DataAccessOptions", "description": "Write a Data Access (Gin) log", - "type": "object", - "properties": {}, - "id": "DataAccessOptions" - }, - "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\nAuditConfig 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.", - "type": "object", - "properties": { - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.\nNext ID: 4", - "items": { - "$ref": "AuditLogConfig" - }, - "type": "array" - }, - "exemptedMembers": { - "items": { - "type": "string" - }, - "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" - } - }, - "id": "AuditConfig" - }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "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": { - "format": "google-fieldmask", - "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.", - "type": "string" - } - }, - "id": "SetIamPolicyRequest" - }, - "CloudAuditOptions": { - "description": "Write a Cloud Audit log", - "type": "object", - "properties": { - "logName": { - "enumDescriptions": [ - "Default. Should not be used.", - "Corresponds to \"cloudaudit.googleapis.com/activity\"", - "Corresponds to \"cloudaudit.googleapis.com/data_access\"" - ], - "enum": [ - "UNSPECIFIED_LOG_NAME", - "ADMIN_ACTIVITY", - "DATA_ACCESS" - ], - "description": "The log_name to populate in the Cloud Audit Record.", - "type": "string" - } - }, - "id": "CloudAuditOptions" - }, - "Binding": { - "description": "Associates `members` with a `role`.", - "type": "object", - "properties": { - "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` or `joe@example.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`.\nRequired", - "type": "string" - } - }, - "id": "Binding" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "MirrorConfig": { - "description": "Configuration to automatically mirror a repository from another\nhosting service, for example GitHub or BitBucket.", - "type": "object", - "properties": { - "deployKeyId": { - "description": "ID of the SSH deploy key at the other hosting service.\nRemoving this key from the other service would deauthorize\nGoogle Cloud Source Repositories from mirroring.", - "type": "string" - }, - "url": { - "description": "URL of the main repository at the other hosting service.", - "type": "string" - }, - "webhookId": { - "description": "ID of the webhook listening to updates to trigger mirroring.\nRemoving this webook from the other hosting service will stop\nGoogle Cloud Source Repositories from receiving notifications,\nand thereby disabling mirroring.", - "type": "string" - } - }, - "id": "MirrorConfig" - }, - "Repo": { - "description": "A repository (or repo) is a Git repository storing versioned source content.", - "type": "object", - "properties": { - "mirrorConfig": { - "$ref": "MirrorConfig", - "description": "How this repository mirrors a repository managed by another service." - }, - "url": { - "description": "URL to clone the repository from Google Cloud Source Repositories.", - "type": "string" - }, - "size": { - "format": "int64", - "description": "The disk usage of the repo, in bytes.\nOnly returned by GetRepo.", - "type": "string" - }, - "name": { - "description": "Resource name of the repository, of the form\n`projects/\u003cproject\u003e/repos/\u003crepo\u003e`. The repo name may contain slashes.\neg, `projects/myproject/repos/name/with/slash`", - "type": "string" - } - }, - "id": "Repo" + "type": "object" } }, + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, - "protocol": "rest", - "canonicalName": "Cloud Source Repositories", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/source.read_write": { - "description": "Manage the contents of your source code repositories" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/source.read_only": { - "description": "View the contents of your source code repositories" - } - } - } - }, - "rootUrl": "https://sourcerepo.googleapis.com/", - "ownerDomain": "google.com", - "name": "sourcerepo", - "batchPath": "batch", - "title": "Cloud Source Repositories API", - "ownerName": "Google", - "resources": { - "projects": { - "resources": { - "repos": { - "methods": { - "testIamPermissions": { - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "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.", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/source.read_only", - "https://www.googleapis.com/auth/source.read_write" - ], - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/repos/.+$" - } - }, - "flatPath": "v1/projects/{projectsId}/repos/{reposId}:testIamPermissions", - "id": "sourcerepo.projects.repos.testIamPermissions", - "path": "v1/{+resource}:testIamPermissions" - }, - "delete": { - "description": "Deletes a repo.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/source.read_only", - "https://www.googleapis.com/auth/source.read_write" - ], - "parameters": { - "name": { - "description": "The name of the repo to delete. Values are of the form\n`projects/\u003cproject\u003e/repos/\u003crepo\u003e`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/repos/.+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/repos/{reposId}", - "id": "sourcerepo.projects.repos.delete", - "path": "v1/{+name}" - }, - "list": { - "description": "Returns all repos belonging to a project. The sizes of the repos are\nnot set by ListRepos. To get the size of a repo, use GetRepo.", - "response": { - "$ref": "ListReposResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/source.read_only", - "https://www.googleapis.com/auth/source.read_write" - ], - "parameters": { - "pageSize": { - "format": "int32", - "description": "Maximum number of repositories to return; between 1 and 500.\nIf not set or zero, defaults to 100 at the server.", - "type": "integer", - "location": "query" - }, - "pageToken": { - "description": "Resume listing repositories where a prior ListReposResponse\nleft off. This is an opaque token that must be obtained from\na recent, prior ListReposResponse's next_page_token field.", - "type": "string", - "location": "query" - }, - "name": { - "description": "The project ID whose repos should be listed. Values are of the form\n`projects/\u003cproject\u003e`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/repos", - "id": "sourcerepo.projects.repos.list", - "path": "v1/{+name}/repos" - }, - "setIamPolicy": { - "flatPath": "v1/projects/{projectsId}/repos/{reposId}:setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "id": "sourcerepo.projects.repos.setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/source.read_only", - "https://www.googleapis.com/auth/source.read_write" - ], - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/repos/.+$" - } - } - }, - "create": { - "description": "Creates a repo in the given project with the given name.\n\nIf the named repository already exists, `CreateRepo` returns\n`ALREADY_EXISTS`.", - "request": { - "$ref": "Repo" - }, - "response": { - "$ref": "Repo" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "parameters": { - "parent": { - "description": "The project in which to create the repo. Values are of the form\n`projects/\u003cproject\u003e`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/source.read_only", - "https://www.googleapis.com/auth/source.read_write" - ], - "flatPath": "v1/projects/{projectsId}/repos", - "id": "sourcerepo.projects.repos.create", - "path": "v1/{+parent}/repos" - }, - "getIamPolicy": { - "flatPath": "v1/projects/{projectsId}/repos/{reposId}:getIamPolicy", - "id": "sourcerepo.projects.repos.getIamPolicy", - "path": "v1/{+resource}: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.", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "GET", - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/repos/.+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/source.read_only", - "https://www.googleapis.com/auth/source.read_write" - ] - }, - "get": { - "response": { - "$ref": "Repo" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/source.read_only", - "https://www.googleapis.com/auth/source.read_write" - ], - "parameters": { - "name": { - "location": "path", - "description": "The name of the requested repository. Values are of the form\n`projects/\u003cproject\u003e/repos/\u003crepo\u003e`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/repos/.+$" - } - }, - "flatPath": "v1/projects/{projectsId}/repos/{reposId}", - "id": "sourcerepo.projects.repos.get", - "path": "v1/{+name}", - "description": "Returns information about a repo." - } - } - } - } - } - }, - "parameters": { - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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", - "description": "Data format for response.", - "default": "json" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "key": { - "location": "query", - "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.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "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.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - } - }, - "version": "v1" + } } 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 de327f065..13a60d44e 100644 --- a/vendor/google.golang.org/api/spanner/v1/spanner-api.json +++ b/vendor/google.golang.org/api/spanner/v1/spanner-api.json @@ -1,1237 +1,735 @@ { - "ownerDomain": "google.com", - "name": "spanner", - "batchPath": "batch", - "title": "Cloud Spanner API", - "ownerName": "Google", - "resources": { - "projects": { - "resources": { - "instanceConfigs": { - "methods": { - "get": { - "response": { - "$ref": "InstanceConfig" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "parameters": { - "name": { - "description": "Required. The name of the requested instance configuration. Values are of\nthe form `projects/\u003cproject\u003e/instanceConfigs/\u003cconfig\u003e`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instanceConfigs/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}", - "id": "spanner.projects.instanceConfigs.get", - "path": "v1/{+name}", - "description": "Gets information about a particular instance configuration." - }, - "list": { - "description": "Lists the supported instance configurations for a given project.", - "response": { - "$ref": "ListInstanceConfigsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "Number of instance configurations to be returned in the response. If 0 or\nless, defaults to the server's maximum allowed page size.", - "type": "integer" - }, - "parent": { - "location": "path", - "description": "Required. The name of the project for which a list of supported instance\nconfigurations is requested. Values are of the form\n`projects/\u003cproject\u003e`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - }, - "pageToken": { - "description": "If non-empty, `page_token` should contain a\nnext_page_token\nfrom a previous ListInstanceConfigsResponse.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1/projects/{projectsId}/instanceConfigs", - "id": "spanner.projects.instanceConfigs.list", - "path": "v1/{+parent}/instanceConfigs" - } - } - }, - "instances": { - "methods": { - "patch": { - "description": "Updates an instance, and begins allocating or releasing resources\nas requested. The returned long-running\noperation can be used to track the\nprogress of updating the instance. If the named instance does not\nexist, returns `NOT_FOUND`.\n\nImmediately upon completion of this request:\n\n * For resource types for which a decrease in the instance's allocation\n has been requested, billing is based on the newly-requested level.\n\nUntil completion of the returned operation:\n\n * Cancelling the operation sets its metadata's\n cancel_time, and begins\n restoring resources to their pre-request values. The operation\n is guaranteed to succeed at undoing all resource changes,\n after which point it terminates with a `CANCELLED` status.\n * All other attempts to modify the instance are rejected.\n * Reading the instance via the API continues to give the pre-request\n resource levels.\n\nUpon completion of the returned operation:\n\n * Billing begins for all successfully-allocated resources (some types\n may have lower than the requested levels).\n * All newly-reserved resources are available for serving the instance's\n tables.\n * The instance's new resource levels are readable via the API.\n\nThe returned long-running operation will\nhave a name of the format `\u003cinstance_name\u003e/operations/\u003coperation_id\u003e` and\ncan be used to track the instance modification. The\nmetadata field type is\nUpdateInstanceMetadata.\nThe response field type is\nInstance, if successful.\n\nAuthorization requires `spanner.instances.update` permission on\nresource name.", - "request": { - "$ref": "UpdateInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PATCH", - "parameters": { - "name": { - "description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 6 and 30 characters in length.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}", - "id": "spanner.projects.instances.patch", - "path": "v1/{+name}" - }, - "get": { - "description": "Gets information about a particular instance.", - "httpMethod": "GET", - "response": { - "$ref": "Instance" - }, - "parameterOrder": [ - "name" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "parameters": { - "name": { - "location": "path", - "description": "Required. The name of the requested instance. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}", - "path": "v1/{+name}", - "id": "spanner.projects.instances.get" - }, - "testIamPermissions": { - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}:testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "id": "spanner.projects.instances.testIamPermissions", - "description": "Returns permissions that the caller has on the specified instance resource.\n\nAttempting this RPC on a non-existent Cloud Spanner instance resource will\nresult in a NOT_FOUND error if the user has `spanner.instances.list`\npermission on the containing Google Cloud Project. Otherwise returns an\nempty set of permissions.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameters": { - "resource": { - "description": "REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ] - }, - "delete": { - "description": "Deletes an instance.\n\nImmediately upon completion of the request:\n\n * Billing ceases for all of the instance's reserved resources.\n\nSoon afterward:\n\n * The instance and *all of its databases* immediately and\n irrevocably disappear from the API. All data in the databases\n is permanently deleted.", - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "parameters": { - "name": { - "location": "path", - "description": "Required. The name of the instance to be deleted. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}", - "path": "v1/{+name}", - "id": "spanner.projects.instances.delete" - }, - "list": { - "response": { - "$ref": "ListInstancesResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "Number of instances to be returned in the response. If 0 or less, defaults\nto the server's maximum allowed page size.", - "type": "integer" - }, - "parent": { - "location": "path", - "description": "Required. The name of the project for which a list of instances is\nrequested. Values are of the form `projects/\u003cproject\u003e`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - }, - "filter": { - "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n * name\n * display_name\n * labels.key where key is the name of a label\n\nSome examples of using filters are:\n\n * name:* --\u003e The instance has a name.\n * name:Howl --\u003e The instance's name contains the string \"howl\".\n * name:HOWL --\u003e Equivalent to above.\n * NAME:howl --\u003e Equivalent to above.\n * labels.env:* --\u003e The instance has the label \"env\".\n * labels.env:dev --\u003e The instance has the label \"env\" and the value of\n the label contains the string \"dev\".\n * name:howl labels.env:dev --\u003e The instance's name contains \"howl\" and\n it has the label \"env\" with its value\n containing \"dev\".", - "type": "string", - "location": "query" - }, - "pageToken": { - "description": "If non-empty, `page_token` should contain a\nnext_page_token from a\nprevious ListInstancesResponse.", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances", - "id": "spanner.projects.instances.list", - "path": "v1/{+parent}/instances", - "description": "Lists all instances in the given project." - }, - "setIamPolicy": { - "request": { - "$ref": "SetIamPolicyRequest" - }, - "description": "Sets the access control policy on an instance resource. Replaces any\nexisting policy.\n\nAuthorization requires `spanner.instances.setIamPolicy` on\nresource.", - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for databases resources.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}:setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "id": "spanner.projects.instances.setIamPolicy" - }, - "create": { - "description": "Creates an instance and begins preparing it to begin serving. The\nreturned long-running operation\ncan be used to track the progress of preparing the new\ninstance. The instance name is assigned by the caller. If the\nnamed instance already exists, `CreateInstance` returns\n`ALREADY_EXISTS`.\n\nImmediately upon completion of this request:\n\n * The instance is readable via the API, with all requested attributes\n but no allocated resources. Its state is `CREATING`.\n\nUntil completion of the returned operation:\n\n * Cancelling the operation renders the instance immediately unreadable\n via the API.\n * The instance can be deleted.\n * All other attempts to modify the instance are rejected.\n\nUpon completion of the returned operation:\n\n * Billing for all successfully-allocated resources begins (some types\n may have lower than the requested levels).\n * Databases can be created in the instance.\n * The instance's allocated resource levels are readable via the API.\n * The instance's state becomes `READY`.\n\nThe returned long-running operation will\nhave a name of the format `\u003cinstance_name\u003e/operations/\u003coperation_id\u003e` and\ncan be used to track creation of the instance. The\nmetadata field type is\nCreateInstanceMetadata.\nThe response field type is\nInstance, if successful.", - "request": { - "$ref": "CreateInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "parameters": { - "parent": { - "location": "path", - "description": "Required. The name of the project in which to create the instance. Values\nare of the form `projects/\u003cproject\u003e`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances", - "id": "spanner.projects.instances.create", - "path": "v1/{+parent}/instances" - }, - "getIamPolicy": { - "request": { - "$ref": "GetIamPolicyRequest" - }, - "description": "Gets the access control policy for an instance resource. Returns an empty\npolicy if an instance exists but does not have a policy set.\n\nAuthorization requires `spanner.instances.getIamPolicy` on\nresource.", - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}:getIamPolicy", - "path": "v1/{+resource}:getIamPolicy", - "id": "spanner.projects.instances.getIamPolicy" - } - }, - "resources": { - "databases": { - "methods": { - "get": { - "description": "Gets the state of a Cloud Spanner database.", - "httpMethod": "GET", - "response": { - "$ref": "Database" - }, - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "location": "path", - "description": "Required. The name of the requested database. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}", - "path": "v1/{+name}", - "id": "spanner.projects.instances.databases.get" - }, - "dropDatabase": { - "description": "Drops (aka deletes) a Cloud Spanner database.", - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "database" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "parameters": { - "database": { - "description": "Required. The database to be dropped.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}", - "path": "v1/{+database}", - "id": "spanner.projects.instances.databases.dropDatabase" - }, - "updateDdl": { - "description": "Updates the schema of a Cloud Spanner database by\ncreating/altering/dropping tables, columns, indexes, etc. The returned\nlong-running operation will have a name of\nthe format `\u003cdatabase_name\u003e/operations/\u003coperation_id\u003e` and can be used to\ntrack execution of the schema change(s). The\nmetadata field type is\nUpdateDatabaseDdlMetadata. The operation has no response.", - "request": { - "$ref": "UpdateDatabaseDdlRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "database" - ], - "httpMethod": "PATCH", - "parameters": { - "database": { - "location": "path", - "description": "Required. The database to update.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/ddl", - "id": "spanner.projects.instances.databases.updateDdl", - "path": "v1/{+database}/ddl" - }, - "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 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.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:testIamPermissions", - "id": "spanner.projects.instances.databases.testIamPermissions", - "path": "v1/{+resource}:testIamPermissions" - }, - "getDdl": { - "description": "Returns the schema of a Cloud Spanner database as a list of formatted\nDDL statements. This method does not show pending schema updates, those may\nbe queried using the Operations API.", - "httpMethod": "GET", - "response": { - "$ref": "GetDatabaseDdlResponse" - }, - "parameterOrder": [ - "database" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "parameters": { - "database": { - "location": "path", - "description": "Required. The database whose schema we wish to get.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/ddl", - "path": "v1/{+database}/ddl", - "id": "spanner.projects.instances.databases.getDdl" - }, - "list": { - "response": { - "$ref": "ListDatabasesResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "parameters": { - "pageSize": { - "format": "int32", - "description": "Number of databases to be returned in the response. If 0 or less,\ndefaults to the server's maximum allowed page size.", - "type": "integer", - "location": "query" - }, - "parent": { - "description": "Required. The instance whose databases should be listed.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+$", - "location": "path" - }, - "pageToken": { - "location": "query", - "description": "If non-empty, `page_token` should contain a\nnext_page_token from a\nprevious ListDatabasesResponse.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases", - "id": "spanner.projects.instances.databases.list", - "path": "v1/{+parent}/databases", - "description": "Lists Cloud Spanner databases." - }, - "create": { - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases", - "id": "spanner.projects.instances.databases.create", - "path": "v1/{+parent}/databases", - "request": { - "$ref": "CreateDatabaseRequest" - }, - "description": "Creates a new Cloud Spanner database and starts to prepare it for serving.\nThe returned long-running operation will\nhave a name of the format `\u003cdatabase_name\u003e/operations/\u003coperation_id\u003e` and\ncan be used to track preparation of the database. The\nmetadata field type is\nCreateDatabaseMetadata. The\nresponse field type is\nDatabase, if successful.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "parameters": { - "parent": { - "description": "Required. The name of the instance that will serve the new database.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+$", - "location": "path" - } - } - }, - "setIamPolicy": { - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for databases resources.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "id": "spanner.projects.instances.databases.setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "description": "Sets the access control policy on a database resource. Replaces any\nexisting policy.\n\nAuthorization requires `spanner.databases.setIamPolicy` permission on\nresource." - }, - "getIamPolicy": { - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:getIamPolicy", - "id": "spanner.projects.instances.databases.getIamPolicy", - "path": "v1/{+resource}:getIamPolicy", - "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.", - "request": { - "$ref": "GetIamPolicyRequest" - } - } - }, - "resources": { - "sessions": { - "methods": { - "get": { - "description": "Gets a session. Returns `NOT_FOUND` if the session does not exist.\nThis is mainly useful for determining whether a session is still\nalive.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Session" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "parameters": { - "name": { - "description": "Required. The name of the session to retrieve.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}", - "path": "v1/{+name}", - "id": "spanner.projects.instances.databases.sessions.get" - }, - "executeStreamingSql": { - "response": { - "$ref": "PartialResultSet" - }, - "parameterOrder": [ - "session" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "parameters": { - "session": { - "description": "Required. The session in which the SQL query should be performed.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeStreamingSql", - "id": "spanner.projects.instances.databases.sessions.executeStreamingSql", - "path": "v1/{+session}:executeStreamingSql", - "request": { - "$ref": "ExecuteSqlRequest" - }, - "description": "Like ExecuteSql, except returns the result\nset as a stream. Unlike ExecuteSql, there\nis no limit on the size of the returned result set. However, no\nindividual row in the result set can exceed 100 MiB, and no\ncolumn value can exceed 10 MiB." - }, - "commit": { - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:commit", - "id": "spanner.projects.instances.databases.sessions.commit", - "path": "v1/{+session}:commit", - "description": "Commits a transaction. The request includes the mutations to be\napplied to rows in the database.\n\n`Commit` might return an `ABORTED` error. This can occur at any time;\ncommonly, the cause is conflicts with concurrent\ntransactions. However, it can also happen for a variety of other\nreasons. If `Commit` returns `ABORTED`, the caller should re-attempt\nthe transaction from the beginning, re-using the same session.", - "request": { - "$ref": "CommitRequest" - }, - "response": { - "$ref": "CommitResponse" - }, - "parameterOrder": [ - "session" - ], - "httpMethod": "POST", - "parameters": { - "session": { - "description": "Required. The session in which the transaction to be committed is running.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ] - }, - "beginTransaction": { - "request": { - "$ref": "BeginTransactionRequest" - }, - "description": "Begins a new transaction. This step can often be skipped:\nRead, ExecuteSql and\nCommit can begin a new transaction as a\nside-effect.", - "httpMethod": "POST", - "parameterOrder": [ - "session" - ], - "response": { - "$ref": "Transaction" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "parameters": { - "session": { - "description": "Required. The session in which the transaction runs.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:beginTransaction", - "path": "v1/{+session}:beginTransaction", - "id": "spanner.projects.instances.databases.sessions.beginTransaction" - }, - "delete": { - "description": "Ends a session, releasing server resources associated with it.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "parameters": { - "name": { - "description": "Required. The name of the session to delete.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}", - "id": "spanner.projects.instances.databases.sessions.delete", - "path": "v1/{+name}" - }, - "executeSql": { - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeSql", - "path": "v1/{+session}:executeSql", - "id": "spanner.projects.instances.databases.sessions.executeSql", - "description": "Executes an SQL query, returning all rows in a single reply. This\nmethod cannot be used to return a result set larger than 10 MiB;\nif the query yields more data than that, the query fails with\na `FAILED_PRECONDITION` error.\n\nQueries inside read-write transactions might return `ABORTED`. If\nthis occurs, the application should restart the transaction from\nthe beginning. See Transaction for more details.\n\nLarger result sets can be fetched in streaming fashion by calling\nExecuteStreamingSql instead.", - "request": { - "$ref": "ExecuteSqlRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "session" - ], - "response": { - "$ref": "ResultSet" - }, - "parameters": { - "session": { - "location": "path", - "description": "Required. The session in which the SQL query should be performed.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ] - }, - "rollback": { - "request": { - "$ref": "RollbackRequest" - }, - "description": "Rolls back a transaction, releasing any locks it holds. It is a good\nidea to call this for any transaction that includes one or more\nRead or ExecuteSql requests and\nultimately decides not to commit.\n\n`Rollback` returns `OK` if it successfully aborts the transaction, the\ntransaction was already aborted, or the transaction is not\nfound. `Rollback` never returns `ABORTED`.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "session" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "parameters": { - "session": { - "location": "path", - "description": "Required. The session in which the transaction to roll back is running.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:rollback", - "id": "spanner.projects.instances.databases.sessions.rollback", - "path": "v1/{+session}:rollback" - }, - "streamingRead": { - "httpMethod": "POST", - "parameterOrder": [ - "session" - ], - "response": { - "$ref": "PartialResultSet" - }, - "parameters": { - "session": { - "description": "Required. The session in which the read should be performed.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:streamingRead", - "path": "v1/{+session}:streamingRead", - "id": "spanner.projects.instances.databases.sessions.streamingRead", - "description": "Like Read, except returns the result set as a\nstream. Unlike Read, there is no limit on the\nsize of the returned result set. However, no individual row in\nthe result set can exceed 100 MiB, and no column value can exceed\n10 MiB.", - "request": { - "$ref": "ReadRequest" - } - }, - "create": { - "description": "Creates a new session. A session can be used to perform\ntransactions that read and/or modify data in a Cloud Spanner database.\nSessions are meant to be reused for many consecutive\ntransactions.\n\nSessions can only execute one transaction at a time. To execute\nmultiple concurrent read-write/write-only transactions, create\nmultiple sessions. Note that standalone reads and queries use a\ntransaction internally, and count toward the one transaction\nlimit.\n\nCloud Spanner limits the number of sessions that can exist at any given\ntime; thus, it is a good idea to delete idle and/or unneeded sessions.\nAside from explicit deletes, Cloud Spanner can delete sessions for which no\noperations are sent for more than an hour. If a session is deleted,\nrequests to it return `NOT_FOUND`.\n\nIdle sessions can be kept alive by sending a trivial SQL query\nperiodically, e.g., `\"SELECT 1\"`.", - "response": { - "$ref": "Session" - }, - "parameterOrder": [ - "database" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "parameters": { - "database": { - "description": "Required. The database in which the new session is created.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions", - "id": "spanner.projects.instances.databases.sessions.create", - "path": "v1/{+database}/sessions" - }, - "read": { - "request": { - "$ref": "ReadRequest" - }, - "description": "Reads rows from the database using key lookups and scans, as a\nsimple key/value style alternative to\nExecuteSql. This method cannot be used to\nreturn a result set larger than 10 MiB; if the read matches more\ndata than that, the read fails with a `FAILED_PRECONDITION`\nerror.\n\nReads inside read-write transactions might return `ABORTED`. If\nthis occurs, the application should restart the transaction from\nthe beginning. See Transaction for more details.\n\nLarger result sets can be yielded in streaming fashion by calling\nStreamingRead instead.", - "httpMethod": "POST", - "parameterOrder": [ - "session" - ], - "response": { - "$ref": "ResultSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "parameters": { - "session": { - "location": "path", - "description": "Required. The session in which the read should be performed.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:read", - "path": "v1/{+session}:read", - "id": "spanner.projects.instances.databases.sessions.read" - } - } - }, - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "location": "path", - "description": "The name of the operation resource.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}", - "id": "spanner.projects.instances.databases.operations.get", - "path": "v1/{+name}" - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - }, - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - }, - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "name": { - "description": "The name of the operation's parent resource.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations", - "id": "spanner.projects.instances.databases.operations.list", - "path": "v1/{+name}" - }, - "cancel": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}:cancel", - "id": "spanner.projects.instances.databases.operations.cancel", - "path": "v1/{+name}:cancel", - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`." - }, - "delete": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "parameters": { - "name": { - "location": "path", - "description": "The name of the operation resource to be deleted.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}", - "id": "spanner.projects.instances.databases.operations.delete", - "path": "v1/{+name}", - "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`." - } - } - } - } - }, - "operations": { - "methods": { - "cancel": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "parameters": { - "name": { - "location": "path", - "description": "The name of the operation resource to be cancelled.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}:cancel", - "id": "spanner.projects.instances.operations.cancel", - "path": "v1/{+name}:cancel", - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`." - }, - "delete": { - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}", - "id": "spanner.projects.instances.operations.delete", - "path": "v1/{+name}", - "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "parameters": { - "name": { - "location": "path", - "description": "The name of the operation resource to be deleted.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ] - }, - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "location": "path", - "description": "The name of the operation resource.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}", - "id": "spanner.projects.instances.operations.get", - "path": "v1/{+name}" - }, - "list": { - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations", - "id": "spanner.projects.instances.operations.list", - "path": "v1/{+name}", - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "pageSize": { - "format": "int32", - "description": "The standard list page size.", - "type": "integer", - "location": "query" - }, - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" - }, - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "name": { - "description": "The name of the operation's parent resource.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/instances/[^/]+/operations$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ] - } - } - } - } - } - } - } - }, - "parameters": { - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ] - }, - "alt": { - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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" - }, - "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.", - "type": "string", - "location": "query" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "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.", - "type": "string", - "location": "query" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - } - }, - "version": "v1", - "baseUrl": "https://spanner.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service.", - "servicePath": "", - "basePath": "", - "id": "spanner:v1", - "revision": "20170725", + "revision": "20170905", "documentationLink": "https://cloud.google.com/spanner/", + "id": "spanner:v1", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "TransactionOptions": { + "properties": { + "readOnly": { + "description": "Transaction will not write.\n\nAuthorization to begin a read-only transaction requires\n`spanner.databases.beginReadOnlyTransaction` permission\non the `session` resource.", + "$ref": "ReadOnly" + }, + "readWrite": { + "$ref": "ReadWrite", + "description": "Transaction may write.\n\nAuthorization to begin a read-write transaction requires\n`spanner.databases.beginOrRollbackReadWriteTransaction` permission\non the `session` resource." + } + }, + "id": "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 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\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`.", + "type": "object" + }, + "CreateDatabaseRequest": { + "description": "The request for CreateDatabase.", + "type": "object", + "properties": { + "extraStatements": { + "description": "An optional list of DDL statements to run inside the newly created\ndatabase. Statements can create tables, indexes, etc. These\nstatements execute atomically with the creation of the database:\nif there is an error in any statement, the database is not created.", + "items": { + "type": "string" + }, + "type": "array" + }, + "createStatement": { + "description": "Required. A `CREATE DATABASE` statement, which specifies the ID of the\nnew database. The database ID must conform to the regular expression\n`a-z*[a-z0-9]` and be between 2 and 30 characters in length.\nIf the database ID is a reserved word or if it contains a hyphen, the\ndatabase ID must be enclosed in backticks (`` ` ``).", + "type": "string" + } + }, + "id": "CreateDatabaseRequest" + }, + "CreateInstanceRequest": { + "description": "The request for CreateInstance.", + "type": "object", + "properties": { + "instance": { + "description": "Required. The instance to create. The name may be omitted, but if\nspecified must be `\u003cparent\u003e/instances/\u003cinstance_id\u003e`.", + "$ref": "Instance" + }, + "instanceId": { + "description": "Required. The ID of the instance to create. Valid identifiers are of the\nform `a-z*[a-z0-9]` and must be between 6 and 30 characters in\nlength.", + "type": "string" + } + }, + "id": "CreateInstanceRequest" + }, + "ReadOnly": { + "properties": { + "maxStaleness": { + "format": "google-duration", + "description": "Read data at a timestamp \u003e= `NOW - max_staleness`\nseconds. Guarantees that all writes that have committed more\nthan the specified number of seconds ago are visible. Because\nCloud Spanner chooses the exact timestamp, this mode works even if\nthe client's local clock is substantially skewed from Cloud Spanner\ncommit timestamps.\n\nUseful for reading the freshest data available at a nearby\nreplica, while bounding the possible staleness if the local\nreplica has fallen behind.\n\nNote that this option can only be used in single-use\ntransactions.", + "type": "string" + }, + "readTimestamp": { + "format": "google-datetime", + "description": "Executes all reads at the given timestamp. Unlike other modes,\nreads at a specific timestamp are repeatable; the same read at\nthe same timestamp always returns the same data. If the\ntimestamp is in the future, the read will block until the\nspecified timestamp, modulo the read's deadline.\n\nUseful for large scale consistent reads such as mapreduces, or\nfor coordinating many reads against a consistent snapshot of the\ndata.", + "type": "string" + }, + "returnReadTimestamp": { + "description": "If true, the Cloud Spanner-selected read timestamp is included in\nthe Transaction message that describes the transaction.", + "type": "boolean" + }, + "exactStaleness": { + "format": "google-duration", + "description": "Executes all reads at a timestamp that is `exact_staleness`\nold. The timestamp is chosen soon after the read is started.\n\nGuarantees that all writes that have committed more than the\nspecified number of seconds ago are visible. Because Cloud Spanner\nchooses the exact timestamp, this mode works even if the client's\nlocal clock is substantially skewed from Cloud Spanner commit\ntimestamps.\n\nUseful for reading at nearby replicas without the distributed\ntimestamp negotiation overhead of `max_staleness`.", + "type": "string" + }, + "strong": { + "description": "Read at a timestamp where all previously committed transactions\nare visible.", + "type": "boolean" + }, + "minReadTimestamp": { + "format": "google-datetime", + "description": "Executes all reads at a timestamp \u003e= `min_read_timestamp`.\n\nThis is useful for requesting fresher data than some previous\nread, or data that is fresh enough to observe the effects of some\npreviously committed transaction whose timestamp is known.\n\nNote that this option can only be used in single-use transactions.", + "type": "string" + } + }, + "id": "ReadOnly", + "description": "Message type to initiate a read-only transaction.", + "type": "object" + }, + "ExecuteSqlRequest": { + "description": "The request for ExecuteSql and\nExecuteStreamingSql.", + "type": "object", + "properties": { + "transaction": { + "$ref": "TransactionSelector", + "description": "The transaction to use. If none is provided, the default is a\ntemporary read-only transaction with strong concurrency." + }, + "resumeToken": { + "format": "byte", + "description": "If this request is resuming a previously interrupted SQL query\nexecution, `resume_token` should be copied from the last\nPartialResultSet yielded before the interruption. Doing this\nenables the new SQL query execution to resume where the last one left\noff. The rest of the request parameters must exactly match the\nrequest that yielded this token.", + "type": "string" + }, + "paramTypes": { + "additionalProperties": { + "$ref": "Type" + }, + "description": "It is not always possible for Cloud Spanner to infer the right SQL type\nfrom a JSON value. For example, values of type `BYTES` and values\nof type `STRING` both appear in params as JSON strings.\n\nIn these cases, `param_types` can be used to specify the exact\nSQL type for some or all of the SQL query parameters. See the\ndefinition of Type for more information\nabout SQL types.", + "type": "object" + }, + "sql": { + "description": "Required. The SQL query string.", + "type": "string" + }, + "params": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The SQL query string can contain parameter placeholders. A parameter\nplaceholder consists of `'@'` followed by the parameter\nname. Parameter names consist of any combination of letters,\nnumbers, and underscores.\n\nParameters can appear anywhere that a literal value is expected. The same\nparameter name can be used more than once, for example:\n `\"WHERE id \u003e @msg_id AND id \u003c @msg_id + 100\"`\n\nIt is an error to execute an SQL query with unbound parameters.\n\nParameter values are specified using `params`, which is a JSON\nobject whose keys are parameter names, and whose values are the\ncorresponding parameter values.", + "type": "object" + }, + "queryMode": { + "enum": [ + "NORMAL", + "PLAN", + "PROFILE" + ], + "description": "Used to control the amount of debugging information returned in\nResultSetStats.", + "type": "string", + "enumDescriptions": [ + "The default mode where only the query result, without any information\nabout the query plan is returned.", + "This mode returns only the query plan, without any result rows or\nexecution statistics information.", + "This mode returns both the query plan and the execution statistics along\nwith the result rows." + ] + } + }, + "id": "ExecuteSqlRequest" + }, + "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", + "properties": { + "etag": { + "format": "byte", + "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.", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" + }, + "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" + } + }, + "id": "Policy" + }, + "ReadRequest": { + "description": "The request for Read and\nStreamingRead.", + "type": "object", + "properties": { + "transaction": { + "$ref": "TransactionSelector", + "description": "The transaction to use. If none is provided, the default is a\ntemporary read-only transaction with strong concurrency." + }, + "resumeToken": { + "format": "byte", + "description": "If this request is resuming a previously interrupted read,\n`resume_token` should be copied from the last\nPartialResultSet yielded before the interruption. Doing this\nenables the new read to resume where the last read left off. The\nrest of the request parameters must exactly match the request\nthat yielded this token.", + "type": "string" + }, + "table": { + "description": "Required. The name of the table in the database to be read.", + "type": "string" + }, + "limit": { + "format": "int64", + "description": "If greater than zero, only the first `limit` rows are yielded. If `limit`\nis zero, the default is no limit.", + "type": "string" + }, + "index": { + "description": "If non-empty, the name of an index on table. This index is\nused instead of the table primary key when interpreting key_set\nand sorting result rows. See key_set for further information.", + "type": "string" + }, + "keySet": { + "$ref": "KeySet", + "description": "Required. `key_set` identifies the rows to be yielded. `key_set` names the\nprimary keys of the rows in table to be yielded, unless index\nis present. If index is present, then key_set instead names\nindex keys in index.\n\nRows are yielded in table primary key order (if index is empty)\nor index key order (if index is non-empty).\n\nIt is not an error for the `key_set` to name rows that do not\nexist in the database. Read yields nothing for nonexistent rows." + }, + "columns": { + "description": "The columns of table to be returned for each row matching\nthis request.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "ReadRequest" + }, + "Write": { + "description": "Arguments to insert, update, insert_or_update, and\nreplace operations.", + "type": "object", + "properties": { + "values": { + "description": "The values to be written. `values` can contain more than one\nlist of values. If it does, then multiple rows are written, one\nfor each entry in `values`. Each list in `values` must have\nexactly as many entries as there are entries in columns\nabove. Sending multiple lists is equivalent to sending multiple\n`Mutation`s, each containing one `values` entry and repeating\ntable and columns. Individual values in each list are\nencoded as described here.", + "items": { + "items": { + "type": "any" + }, + "type": "array" + }, + "type": "array" + }, + "columns": { + "description": "The names of the columns in table to be written.\n\nThe list of columns must contain enough columns to allow\nCloud Spanner to derive values for all primary key columns in the\nrow(s) to be modified.", + "items": { + "type": "string" + }, + "type": "array" + }, + "table": { + "description": "Required. The table whose rows will be written.", + "type": "string" + } + }, + "id": "Write" + }, + "ReadWrite": { + "description": "Message type to initiate a read-write transaction. Currently this\ntransaction type has no options.", + "type": "object", + "properties": {}, + "id": "ReadWrite" + }, + "Operation": { + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" + }, + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object" + } + }, + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status" + }, + "ResultSet": { + "description": "Results from Read or\nExecuteSql.", + "type": "object", + "properties": { + "rows": { + "description": "Each element in `rows` is a row whose format is defined by\nmetadata.row_type. The ith element\nin each row matches the ith field in\nmetadata.row_type. Elements are\nencoded based on type as described\nhere.", + "items": { + "items": { + "type": "any" + }, + "type": "array" + }, + "type": "array" + }, + "metadata": { + "$ref": "ResultSetMetadata", + "description": "Metadata about the result set, such as row type information." + }, + "stats": { + "$ref": "ResultSetStats", + "description": "Query plan and execution statistics for the query that produced this\nresult set. These can be requested by setting\nExecuteSqlRequest.query_mode." + } + }, + "id": "ResultSet" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "type": "object", + "properties": { + "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` or `joe@example.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`.\nRequired", + "type": "string" + } + }, + "id": "Binding" + }, + "UpdateDatabaseDdlRequest": { + "properties": { + "statements": { + "description": "DDL statements to be applied to the database.", + "items": { + "type": "string" + }, + "type": "array" + }, + "operationId": { + "description": "If empty, the new update request is assigned an\nautomatically-generated operation ID. Otherwise, `operation_id`\nis used to construct the name of the resulting\nOperation.\n\nSpecifying an explicit operation ID simplifies determining\nwhether the statements were executed in the event that the\nUpdateDatabaseDdl call is replayed,\nor the return value is otherwise lost: the database and\n`operation_id` fields can be combined to form the\nname of the resulting\nlongrunning.Operation: `\u003cdatabase\u003e/operations/\u003coperation_id\u003e`.\n\n`operation_id` should be unique within the database, and must be\na valid identifier: `a-z*`. Note that\nautomatically-generated operation IDs always begin with an\nunderscore. If the named operation already exists,\nUpdateDatabaseDdl returns\n`ALREADY_EXISTS`.", + "type": "string" + } + }, + "id": "UpdateDatabaseDdlRequest", + "description": "Enqueues the given DDL statements to be applied, in order but not\nnecessarily all at once, to the database schema at some point (or\npoints) in the future. The server checks that the statements\nare executable (syntactically valid, name tables that exist, etc.)\nbefore enqueueing them, but they may still fail upon\nlater execution (e.g., if a statement from another batch of\nstatements is applied first and it conflicts in some way, or if\nthere is some data-related problem like a `NULL` value in a column to\nwhich `NOT NULL` would be added). If a statement fails, all\nsubsequent statements in the batch are automatically cancelled.\n\nEach batch of statements is assigned a name which can be used with\nthe Operations API to monitor\nprogress. See the\noperation_id field for more\ndetails.", + "type": "object" + }, + "PartialResultSet": { + "description": "Partial results from a streaming read or SQL query. Streaming reads and\nSQL queries better tolerate large result sets, large rows, and large\nvalues, but are a little trickier to consume.", + "type": "object", + "properties": { + "resumeToken": { + "format": "byte", + "description": "Streaming calls might be interrupted for a variety of reasons, such\nas TCP connection loss. If this occurs, the stream of results can\nbe resumed by re-sending the original request and including\n`resume_token`. Note that executing any other transaction in the\nsame session invalidates the token.", + "type": "string" + }, + "stats": { + "$ref": "ResultSetStats", + "description": "Query plan and execution statistics for the query 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." + }, + "chunkedValue": { + "description": "If true, then the final value in values is chunked, and must\nbe combined with more values from subsequent `PartialResultSet`s\nto obtain a complete field value.", + "type": "boolean" + }, + "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\"`.", + "items": { + "type": "any" + }, + "type": "array" + }, + "metadata": { + "$ref": "ResultSetMetadata", + "description": "Metadata about the result set, such as row type information.\nOnly present in the first response." + } + }, + "id": "PartialResultSet" + }, + "ListOperationsResponse": { + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations.", + "type": "object" + }, + "UpdateInstanceMetadata": { + "description": "Metadata type for the operation returned by\nUpdateInstance.", + "type": "object", + "properties": { + "endTime": { + "format": "google-datetime", + "description": "The time at which this operation failed or was completed successfully.", + "type": "string" + }, + "cancelTime": { + "format": "google-datetime", + "description": "The time at which this operation was cancelled. If set, this operation is\nin the process of undoing itself (which is guaranteed to succeed) and\ncannot be cancelled again.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "The time at which UpdateInstance\nrequest was received.", + "type": "string" + }, + "instance": { + "$ref": "Instance", + "description": "The desired end state of the update." + } + }, + "id": "UpdateInstanceMetadata" + }, + "ResultSetMetadata": { + "description": "Metadata about a ResultSet or PartialResultSet.", + "type": "object", + "properties": { + "rowType": { + "description": "Indicates the field names and types for the rows in the result\nset. For example, a SQL query like `\"SELECT UserId, UserName FROM\nUsers\"` could return a `row_type` value like:\n\n \"fields\": [\n { \"name\": \"UserId\", \"type\": { \"code\": \"INT64\" } },\n { \"name\": \"UserName\", \"type\": { \"code\": \"STRING\" } },\n ]", + "$ref": "StructType" + }, + "transaction": { + "$ref": "Transaction", + "description": "If the read or SQL query began a transaction as a side-effect, the\ninformation about the new transaction is yielded here." + } + }, + "id": "ResultSetMetadata" + }, + "TransactionSelector": { + "description": "This message is used to select the transaction in which a\nRead or\nExecuteSql call runs.\n\nSee TransactionOptions for more information about transactions.", + "type": "object", + "properties": { + "singleUse": { + "$ref": "TransactionOptions", + "description": "Execute the read or SQL query in a temporary transaction.\nThis is the most efficient way to execute a transaction that\nconsists of a single SQL query." + }, + "begin": { + "$ref": "TransactionOptions", + "description": "Begin a new transaction and execute this read or SQL query in\nit. The transaction ID of the new transaction is returned in\nResultSetMetadata.transaction, which is a Transaction." + }, + "id": { + "format": "byte", + "description": "Execute the read or SQL query in a previously-started transaction.", + "type": "string" + } + }, + "id": "TransactionSelector" + }, + "KeySet": { + "properties": { + "ranges": { + "description": "A list of key ranges. See KeyRange for more information about\nkey range specifications.", + "items": { + "$ref": "KeyRange" + }, + "type": "array" + }, + "all": { + "description": "For convenience `all` can be set to `true` to indicate that this\n`KeySet` matches all keys in the table or index. Note that any keys\nspecified in `keys` or `ranges` are only yielded once.", + "type": "boolean" + }, + "keys": { + "description": "A list of specific keys. Entries in `keys` should have exactly as\nmany elements as there are columns in the primary or index key\nwith which this `KeySet` is used. Individual key values are\nencoded as described here.", + "items": { + "items": { + "type": "any" + }, + "type": "array" + }, + "type": "array" + } + }, + "id": "KeySet", + "description": "`KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All\nthe keys are expected to be in the same table or index. The keys need\nnot be sorted in any particular way.\n\nIf the same key is specified multiple times in the set (for example\nif two ranges, two keys, or a key and a range overlap), Cloud Spanner\nbehaves as if the key were only specified once.", + "type": "object" + }, + "Mutation": { + "description": "A modification to one or more Cloud Spanner rows. Mutations can be\napplied to a Cloud Spanner database by sending them in a\nCommit call.", + "type": "object", + "properties": { + "delete": { + "description": "Delete rows from a table. Succeeds whether or not the named\nrows were present.", + "$ref": "Delete" + }, + "insertOrUpdate": { + "description": "Like insert, except that if the row already exists, then\nits column values are overwritten with the ones provided. Any\ncolumn values not explicitly written are preserved.", + "$ref": "Write" + }, + "insert": { + "$ref": "Write", + "description": "Insert new rows in a table. If any of the rows already exist,\nthe write or transaction fails with error `ALREADY_EXISTS`." + }, + "update": { + "description": "Update existing rows in a table. If any of the rows does not\nalready exist, the transaction fails with error `NOT_FOUND`.", + "$ref": "Write" + }, + "replace": { + "$ref": "Write", + "description": "Like insert, except that if the row already exists, it is\ndeleted, and the column values provided are inserted\ninstead. Unlike insert_or_update, this means any values not\nexplicitly written become `NULL`." + } + }, + "id": "Mutation" + }, + "GetDatabaseDdlResponse": { + "description": "The response for GetDatabaseDdl.", + "type": "object", + "properties": { + "statements": { + "description": "A list of formatted DDL statements defining the schema of the database\nspecified in the request.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "GetDatabaseDdlResponse" + }, + "Database": { + "description": "A Cloud Spanner database.", + "type": "object", + "properties": { + "state": { + "enumDescriptions": [ + "Not specified.", + "The database is still being created. Operations on the database may fail\nwith `FAILED_PRECONDITION` in this state.", + "The database is fully created and ready for use." + ], + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY" + ], + "description": "Output only. The current database state.", + "type": "string" + }, + "name": { + "description": "Required. The name of the database. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e`,\nwhere `\u003cdatabase\u003e` is as specified in the `CREATE DATABASE`\nstatement. This name can be passed to other API methods to\nidentify the database.", + "type": "string" + } + }, + "id": "Database" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "type": "object", + "properties": { + "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.", + "$ref": "Policy" + } + }, + "id": "SetIamPolicyRequest" + }, + "ListDatabasesResponse": { + "description": "The response for ListDatabases.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "`next_page_token` can be sent in a subsequent\nListDatabases call to fetch more\nof the matching databases.", + "type": "string" + }, + "databases": { + "description": "Databases that matched the request.", + "items": { + "$ref": "Database" + }, + "type": "array" + } + }, + "id": "ListDatabasesResponse" + }, + "Instance": { + "properties": { + "displayName": { + "description": "Required. The descriptive name for this instance as it appears in UIs.\nMust be unique per project and between 4 and 30 characters in length.", + "type": "string" + }, + "nodeCount": { + "format": "int32", + "description": "Required. The number of nodes allocated to this instance. This may be zero\nin API responses for instances that are not yet in state `READY`.\n\nEach Spanner node can provide up to 10,000 QPS of reads or 2000 QPS of\nwrites (writing single rows at 1KB data per row), and 2 TiB storage.\n\nFor optimal performance, we recommend provisioning enough nodes to keep\noverall CPU utilization under 75%.\n\nA minimum of 3 nodes is recommended for production environments. This\nminimum is required for SLAs to apply to your instance.\n\nNote that Cloud Spanner performance is highly dependent on workload, schema\ndesign, and dataset characteristics. The performance numbers above are\nestimates, and assume [best practices](https://cloud.google.com/spanner/docs/bulk-loading)\nare followed.", + "type": "integer" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cloud Labels are a flexible and lightweight mechanism for organizing cloud\nresources into groups that reflect a customer's organizational needs and\ndeployment strategies. Cloud Labels can be used to filter collections of\nresources. They can be used to control how resource metrics are aggregated.\nAnd they can be used as arguments to policy management rules (e.g. route,\nfirewall, load balancing, etc.).\n\n * Label keys must be between 1 and 63 characters long and must conform to\n the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.\n * Label values must be between 0 and 63 characters long and must conform\n to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.\n * No more than 64 labels can be associated with a given resource.\n\nSee https://goo.gl/xmQnxf for more information on and examples of labels.\n\nIf you plan to use labels in your own code, please note that additional\ncharacters may be allowed in the future. And so you are advised to use an\ninternal label representation, such as JSON, which doesn't rely upon\nspecific characters being disallowed. For example, representing labels\nas the string: name + \"_\" + value would prove problematic if we were to\nallow \"_\" in a future release.", + "type": "object" + }, + "config": { + "description": "Required. The name of the instance's configuration. Values are of the form\n`projects/\u003cproject\u003e/instanceConfigs/\u003cconfiguration\u003e`. See\nalso InstanceConfig and\nListInstanceConfigs.", + "type": "string" + }, + "state": { + "enumDescriptions": [ + "Not specified.", + "The instance is still being created. Resources may not be\navailable yet, and operations such as database creation may not\nwork.", + "The instance is fully created and ready to do work such as\ncreating databases." + ], + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY" + ], + "description": "Output only. The current instance state. For\nCreateInstance, the state must be\neither omitted or set to `CREATING`. For\nUpdateInstance, the state must be\neither omitted or set to `READY`.", + "type": "string" + }, + "name": { + "description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 6 and 30 characters in length.", + "type": "string" + } + }, + "id": "Instance", + "description": "An isolated set of Cloud Spanner resources on which databases can be hosted.", + "type": "object" + }, + "RollbackRequest": { + "properties": { + "transactionId": { + "format": "byte", + "description": "Required. The transaction to roll back.", + "type": "string" + } + }, + "id": "RollbackRequest", + "description": "The request for Rollback.", + "type": "object" + }, + "Transaction": { + "description": "A transaction.", + "type": "object", + "properties": { + "id": { + "format": "byte", + "description": "`id` may be used to identify the transaction in subsequent\nRead,\nExecuteSql,\nCommit, or\nRollback calls.\n\nSingle-use read-only transactions do not have IDs, because\nsingle-use transactions do not support multiple requests.", + "type": "string" + }, + "readTimestamp": { + "format": "google-datetime", + "description": "For snapshot read-only transactions, the read timestamp chosen\nfor the transaction. Not returned by default: see\nTransactionOptions.ReadOnly.return_read_timestamp.", + "type": "string" + } + }, + "id": "Transaction" + }, + "UpdateDatabaseDdlMetadata": { + "description": "Metadata type for the operation returned by\nUpdateDatabaseDdl.", + "type": "object", + "properties": { + "database": { + "description": "The database being modified.", + "type": "string" + }, + "statements": { + "description": "For an update this list contains all the statements. For an\nindividual statement, this list contains only that statement.", + "items": { + "type": "string" + }, + "type": "array" + }, + "commitTimestamps": { + "description": "Reports the commit timestamps of all statements that have\nsucceeded so far, where `commit_timestamps[i]` is the commit\ntimestamp for the statement `statements[i]`.", + "items": { + "format": "google-datetime", + "type": "string" + }, + "type": "array" + } + }, + "id": "UpdateDatabaseDdlMetadata" + }, + "QueryPlan": { + "description": "Contains an ordered list of nodes appearing in the query plan.", + "type": "object", + "properties": { + "planNodes": { + "description": "The nodes in the query plan. Plan nodes are returned in pre-order starting\nwith the plan root. Each PlanNode's `id` corresponds to its index in\n`plan_nodes`.", + "items": { + "$ref": "PlanNode" + }, + "type": "array" + } + }, + "id": "QueryPlan" + }, + "StructType": { + "description": "`StructType` defines the fields of a STRUCT type.", + "type": "object", + "properties": { + "fields": { + "description": "The list of fields that make up this struct. Order is\nsignificant, because values of this struct type are represented as\nlists, where the order of field values matches the order of\nfields in the StructType. In turn, the order of fields\nmatches the order of columns in a read request, or the order of\nfields in the `SELECT` clause of a query.", + "items": { + "$ref": "Field" + }, + "type": "array" + } + }, + "id": "StructType" + }, "Field": { "description": "Message representing a single field of a struct.", "type": "object", "properties": { - "type": { - "description": "The type of the field.", - "$ref": "Type" - }, "name": { "description": "The name of the field. For reads, this is the column name. For\nSQL queries, it is the column alias (e.g., `\"Word\"` in the\nquery `\"SELECT 'hello' AS Word\"`), or the column name (e.g.,\n`\"ColName\"` in the query `\"SELECT ColName FROM Table\"`). Some\ncolumns might have an empty name (e.g., !\"SELECT\nUPPER(ColName)\"`). Note that a query result can contain\nmultiple fields with the same name.", "type": "string" + }, + "type": { + "description": "The type of the field.", + "$ref": "Type" } }, "id": "Field" @@ -1254,10 +752,6 @@ "description": "Additional statistics about a ResultSet or PartialResultSet.", "type": "object", "properties": { - "queryPlan": { - "description": "QueryPlan for the query associated with this result.", - "$ref": "QueryPlan" - }, "queryStats": { "additionalProperties": { "description": "Properties of the object.", @@ -1265,13 +759,15 @@ }, "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" + }, + "queryPlan": { + "$ref": "QueryPlan", + "description": "QueryPlan for the query associated with this result." } }, "id": "ResultSetStats" }, "CommitResponse": { - "description": "The response for Commit.", - "type": "object", "properties": { "commitTimestamp": { "format": "google-datetime", @@ -1279,15 +775,15 @@ "type": "string" } }, - "id": "CommitResponse" + "id": "CommitResponse", + "description": "The response for Commit.", + "type": "object" }, "Type": { - "description": "`Type` indicates the type of a Cloud Spanner value, as might be stored in a\ntable cell or returned from an SQL query.", - "type": "object", "properties": { "structType": { - "$ref": "StructType", - "description": "If code == STRUCT, then `struct_type`\nprovides type information for the struct's fields." + "description": "If code == STRUCT, then `struct_type`\nprovides type information for the struct's fields.", + "$ref": "StructType" }, "arrayElementType": { "$ref": "Type", @@ -1322,31 +818,38 @@ "type": "string" } }, - "id": "Type" + "id": "Type", + "description": "`Type` indicates the type of a Cloud Spanner value, as might be stored in a\ntable cell or returned from an SQL query.", + "type": "object" }, "PlanNode": { - "description": "Node information for nodes appearing in a QueryPlan.plan_nodes.", - "type": "object", "properties": { + "childLinks": { + "description": "List of child node `index`es and their relationship to this parent.", + "items": { + "$ref": "ChildLink" + }, + "type": "array" + }, "metadata": { - "description": "Attributes relevant to the node contained in a group of key-value pairs.\nFor example, a Parameter Reference node could have the following\ninformation in its metadata:\n\n {\n \"parameter_reference\": \"param1\",\n \"parameter_type\": \"array\"\n }", - "type": "object", "additionalProperties": { "description": "Properties of the object.", "type": "any" - } + }, + "description": "Attributes relevant to the node contained in a group of key-value pairs.\nFor example, a Parameter Reference node could have the following\ninformation in its metadata:\n\n {\n \"parameter_reference\": \"param1\",\n \"parameter_type\": \"array\"\n }", + "type": "object" }, "executionStats": { - "description": "The execution statistics associated with the node, contained in a group of\nkey-value pairs. Only present if the plan was returned as a result of a\nprofile query. For example, number of executions, number of rows/time per\nexecution etc.", - "type": "object", "additionalProperties": { "description": "Properties of the object.", "type": "any" - } + }, + "description": "The execution statistics associated with the node, contained in a group of\nkey-value pairs. Only present if the plan was returned as a result of a\nprofile query. For example, number of executions, number of rows/time per\nexecution etc.", + "type": "object" }, "shortRepresentation": { - "description": "Condensed representation for SCALAR nodes.", - "$ref": "ShortRepresentation" + "$ref": "ShortRepresentation", + "description": "Condensed representation for SCALAR nodes." }, "index": { "format": "int32", @@ -1354,37 +857,41 @@ "type": "integer" }, "kind": { + "enum": [ + "KIND_UNSPECIFIED", + "RELATIONAL", + "SCALAR" + ], "description": "Used to determine the type of node. May be needed for visualizing\ndifferent kinds of nodes differently. For example, If the node is a\nSCALAR node, it will have a condensed representation\nwhich can be used to directly embed a description of the node in its\nparent.", "type": "string", "enumDescriptions": [ "Not specified.", "Denotes a Relational operator node in the expression tree. Relational\noperators represent iterative processing of rows during query execution.\nFor example, a `TableScan` operation that reads rows from a table.", "Denotes a Scalar node in the expression tree. Scalar nodes represent\nnon-iterable entities in the query plan. For example, constants or\narithmetic operators appearing inside predicate expressions or references\nto column names." - ], - "enum": [ - "KIND_UNSPECIFIED", - "RELATIONAL", - "SCALAR" ] }, "displayName": { "description": "The display name for the node.", "type": "string" - }, - "childLinks": { - "description": "List of child node `index`es and their relationship to this parent.", - "items": { - "$ref": "ChildLink" - }, - "type": "array" } }, - "id": "PlanNode" + "id": "PlanNode", + "description": "Node information for nodes appearing in a QueryPlan.plan_nodes.", + "type": "object" }, "CreateInstanceMetadata": { "description": "Metadata type for the operation returned by\nCreateInstance.", "type": "object", "properties": { + "startTime": { + "format": "google-datetime", + "description": "The time at which the\nCreateInstance request was\nreceived.", + "type": "string" + }, + "instance": { + "$ref": "Instance", + "description": "The instance being created." + }, "endTime": { "format": "google-datetime", "description": "The time at which this operation failed or was completed successfully.", @@ -1394,46 +901,11 @@ "format": "google-datetime", "description": "The time at which this operation was cancelled. If set, this operation is\nin the process of undoing itself (which is guaranteed to succeed) and\ncannot be cancelled again.", "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "The time at which the\nCreateInstance request was\nreceived.", - "type": "string" - }, - "instance": { - "description": "The instance being created.", - "$ref": "Instance" } }, "id": "CreateInstanceMetadata" }, - "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\nAuditConfig 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.", - "type": "object", - "properties": { - "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" - }, - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.\nNext ID: 4", - "items": { - "$ref": "AuditLogConfig" - }, - "type": "array" - }, - "exemptedMembers": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "AuditConfig" - }, "ChildLink": { - "description": "Metadata associated with a parent-child relationship appearing in a\nPlanNode.", - "type": "object", "properties": { "type": { "description": "The type of the link. For example, in Hash Joins this could be used to\ndistinguish between the build child and the probe child, or in the case\nof the child being an output variable, to represent the tag associated\nwith the output variable.", @@ -1449,108 +921,26 @@ "type": "integer" } }, - "id": "ChildLink" - }, - "CloudAuditOptions": { - "description": "Write a Cloud Audit log", - "type": "object", - "properties": { - "logName": { - "enumDescriptions": [ - "Default. Should not be used.", - "Corresponds to \"cloudaudit.googleapis.com/activity\"", - "Corresponds to \"cloudaudit.googleapis.com/data_access\"" - ], - "enum": [ - "UNSPECIFIED_LOG_NAME", - "ADMIN_ACTIVITY", - "DATA_ACCESS" - ], - "description": "The log_name to populate in the Cloud Audit Record.", - "type": "string" - }, - "isReadPermissionType": { - "description": "True if the log is for a permission of type DATA_READ or ADMIN_READ.", - "type": "boolean" - } - }, - "id": "CloudAuditOptions" - }, - "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\"", - "type": "object", - "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" - } - }, - "id": "Expr" + "id": "ChildLink", + "description": "Metadata associated with a parent-child relationship appearing in a\nPlanNode.", + "type": "object" }, "Delete": { "description": "Arguments to delete operations.", "type": "object", "properties": { + "keySet": { + "$ref": "KeySet", + "description": "Required. The primary keys of the rows within table to delete." + }, "table": { "description": "Required. The table whose rows will be deleted.", "type": "string" - }, - "keySet": { - "description": "Required. The primary keys of the rows within table to delete.", - "$ref": "KeySet" } }, "id": "Delete" }, - "CommitRequest": { - "description": "The request for Commit.", - "type": "object", - "properties": { - "mutations": { - "description": "The mutations to be executed when this transaction commits. All\nmutations are applied atomically, in the order they appear in\nthis list.", - "items": { - "$ref": "Mutation" - }, - "type": "array" - }, - "singleUseTransaction": { - "description": "Execute mutations in a temporary transaction. Note that unlike\ncommit of a previously-started transaction, commit with a\ntemporary transaction is non-idempotent. That is, if the\n`CommitRequest` is sent to Cloud Spanner more than once (for\ninstance, due to retries in the application, or in the\ntransport library), it is possible that the mutations are\nexecuted more than once. If this is undesirable, use\nBeginTransaction and\nCommit instead.", - "$ref": "TransactionOptions" - }, - "transactionId": { - "format": "byte", - "description": "Commit a previously-started transaction.", - "type": "string" - } - }, - "id": "CommitRequest" - }, - "BeginTransactionRequest": { - "description": "The request for BeginTransaction.", - "type": "object", - "properties": { - "options": { - "description": "Required. Options for the new transaction.", - "$ref": "TransactionOptions" - } - }, - "id": "BeginTransactionRequest" - }, "ListInstanceConfigsResponse": { - "description": "The response for ListInstanceConfigs.", - "type": "object", "properties": { "nextPageToken": { "description": "`next_page_token` can be sent in a subsequent\nListInstanceConfigs call to\nfetch more of the matching instance configurations.", @@ -1564,17 +954,45 @@ "type": "array" } }, - "id": "ListInstanceConfigsResponse" + "id": "ListInstanceConfigsResponse", + "description": "The response for ListInstanceConfigs.", + "type": "object" }, - "GetIamPolicyRequest": { - "description": "Request message for `GetIamPolicy` method.", + "BeginTransactionRequest": { + "description": "The request for BeginTransaction.", "type": "object", - "properties": {}, - "id": "GetIamPolicyRequest" + "properties": { + "options": { + "$ref": "TransactionOptions", + "description": "Required. Options for the new transaction." + } + }, + "id": "BeginTransactionRequest" + }, + "CommitRequest": { + "description": "The request for Commit.", + "type": "object", + "properties": { + "mutations": { + "description": "The mutations to be executed when this transaction commits. All\nmutations are applied atomically, in the order they appear in\nthis list.", + "items": { + "$ref": "Mutation" + }, + "type": "array" + }, + "singleUseTransaction": { + "$ref": "TransactionOptions", + "description": "Execute mutations in a temporary transaction. Note that unlike\ncommit of a previously-started transaction, commit with a\ntemporary transaction is non-idempotent. That is, if the\n`CommitRequest` is sent to Cloud Spanner more than once (for\ninstance, due to retries in the application, or in the\ntransport library), it is possible that the mutations are\nexecuted more than once. If this is undesirable, use\nBeginTransaction and\nCommit instead." + }, + "transactionId": { + "format": "byte", + "description": "Commit a previously-started transaction.", + "type": "string" + } + }, + "id": "CommitRequest" }, "TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "type": "object", "properties": { "permissions": { "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", @@ -1584,103 +1002,26 @@ "type": "array" } }, - "id": "TestIamPermissionsResponse" + "id": "TestIamPermissionsResponse", + "description": "Response message for `TestIamPermissions` method.", + "type": "object" }, - "Rule": { - "description": "A rule to be applied in a Policy.", - "type": "object", - "properties": { - "notIn": { - "description": "If one or more 'not_in' clauses are specified, the rule matches\nif the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.\nThe format for in and not_in entries is the same as for members in a\nBinding (see google/iam/v1/policy.proto).", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "Human-readable description of the rule.", - "type": "string" - }, - "conditions": { - "description": "Additional restrictions that must be met", - "items": { - "$ref": "Condition" - }, - "type": "array" - }, - "logConfig": { - "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries\nthat match the LOG action.", - "items": { - "$ref": "LogConfig" - }, - "type": "array" - }, - "in": { - "description": "If one or more 'in' clauses are specified, the rule matches if\nthe PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.", - "items": { - "type": "string" - }, - "type": "array" - }, - "permissions": { - "description": "A permission is a string of form '\u003cservice\u003e.\u003cresource type\u003e.\u003cverb\u003e'\n(e.g., 'storage.buckets.list'). A value of '*' matches all permissions,\nand a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "action": { - "enumDescriptions": [ - "Default no action.", - "Matching 'Entries' grant access.", - "Matching 'Entries' grant access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' deny access.", - "Matching 'Entries' deny access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' tell IAM.Check callers to generate logs." - ], - "enum": [ - "NO_ACTION", - "ALLOW", - "ALLOW_WITH_LOG", - "DENY", - "DENY_WITH_LOG", - "LOG" - ], - "description": "Required", - "type": "string" - } - }, - "id": "Rule" + "GetIamPolicyRequest": { + "properties": {}, + "id": "GetIamPolicyRequest", + "description": "Request message for `GetIamPolicy` method.", + "type": "object" }, "CreateDatabaseMetadata": { - "description": "Metadata type for the operation returned by\nCreateDatabase.", - "type": "object", "properties": { "database": { "description": "The database being created.", "type": "string" } }, - "id": "CreateDatabaseMetadata" - }, - "LogConfig": { - "description": "Specifies what kind of log the caller must write\nIncrement a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only,\nand end in \"_count\". Field names should not contain an initial slash.\nThe actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are\ntheir respective values.\n\nAt present the only supported field names are\n - \"iam_principal\", corresponding to IAMContext.principal;\n - \"\" (empty string), resulting in one aggretated counter with no field.\n\nExamples:\n counter { metric: \"/debug_access_count\" field: \"iam_principal\" }\n ==\u003e increment counter /iam/policy/backend_debug_access_count\n {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support:\n* multiple field names (though this may be supported in the future)\n* decrementing the counter\n* incrementing it by anything other than 1", - "type": "object", - "properties": { - "counter": { - "description": "Counter options.", - "$ref": "CounterOptions" - }, - "dataAccess": { - "description": "Data access options.", - "$ref": "DataAccessOptions" - }, - "cloudAudit": { - "$ref": "CloudAuditOptions", - "description": "Cloud audit options." - } - }, - "id": "LogConfig" + "id": "CreateDatabaseMetadata", + "description": "Metadata type for the operation returned by\nCreateDatabase.", + "type": "object" }, "Session": { "description": "A session in the Cloud Spanner API.", @@ -1693,42 +1034,10 @@ }, "id": "Session" }, - "ListInstancesResponse": { - "description": "The response for ListInstances.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "`next_page_token` can be sent in a subsequent\nListInstances call to fetch more\nof the matching instances.", - "type": "string" - }, - "instances": { - "description": "The list of requested instances.", - "items": { - "$ref": "Instance" - }, - "type": "array" - } - }, - "id": "ListInstancesResponse" - }, "KeyRange": { "description": "KeyRange represents a range of rows in a table or index.\n\nA range has a start key and an end key. These keys can be open or\nclosed, indicating if the range includes rows with that key.\n\nKeys are represented by lists, where the ith value in the list\ncorresponds to the ith component of the table or index primary key.\nIndividual values are encoded as described here.\n\nFor example, consider the following table definition:\n\n CREATE TABLE UserEvents (\n UserName STRING(MAX),\n EventDate STRING(10)\n ) PRIMARY KEY(UserName, EventDate);\n\nThe following keys name rows in this table:\n\n \"Bob\", \"2014-09-23\"\n\nSince the `UserEvents` table's `PRIMARY KEY` clause names two\ncolumns, each `UserEvents` key has two elements; the first is the\n`UserName`, and the second is the `EventDate`.\n\nKey ranges with multiple components are interpreted\nlexicographically by component using the table or index key's declared\nsort order. For example, the following range returns all events for\nuser `\"Bob\"` that occurred in the year 2015:\n\n \"start_closed\": [\"Bob\", \"2015-01-01\"]\n \"end_closed\": [\"Bob\", \"2015-12-31\"]\n\nStart and end keys can omit trailing key components. This affects the\ninclusion and exclusion of rows that exactly match the provided key\ncomponents: if the key is closed, then rows that exactly match the\nprovided components are included; if the key is open, then rows\nthat exactly match are not included.\n\nFor example, the following range includes all events for `\"Bob\"` that\noccurred during and after the year 2000:\n\n \"start_closed\": [\"Bob\", \"2000-01-01\"]\n \"end_closed\": [\"Bob\"]\n\nThe next example retrieves all events for `\"Bob\"`:\n\n \"start_closed\": [\"Bob\"]\n \"end_closed\": [\"Bob\"]\n\nTo retrieve events before the year 2000:\n\n \"start_closed\": [\"Bob\"]\n \"end_open\": [\"Bob\", \"2000-01-01\"]\n\nThe following range includes all rows in the table:\n\n \"start_closed\": []\n \"end_closed\": []\n\nThis range returns all users whose `UserName` begins with any\ncharacter from A to C:\n\n \"start_closed\": [\"A\"]\n \"end_open\": [\"D\"]\n\nThis range returns all users whose `UserName` begins with B:\n\n \"start_closed\": [\"B\"]\n \"end_open\": [\"C\"]\n\nKey ranges honor column sort order. For example, suppose a table is\ndefined as follows:\n\n CREATE TABLE DescendingSortedTable {\n Key INT64,\n ...\n ) PRIMARY KEY(Key DESC);\n\nThe following range retrieves all rows with key values between 1\nand 100 inclusive:\n\n \"start_closed\": [\"100\"]\n \"end_closed\": [\"1\"]\n\nNote that 100 is passed as the start, and 1 is passed as the end,\nbecause `Key` is a descending column in the schema.", "type": "object", "properties": { - "endOpen": { - "description": "If the end is open, then the range excludes rows whose first\n`len(end_open)` key columns exactly match `end_open`.", - "items": { - "type": "any" - }, - "type": "array" - }, - "endClosed": { - "description": "If the end is closed, then the range includes all rows whose\nfirst `len(end_closed)` key columns exactly match `end_closed`.", - "items": { - "type": "any" - }, - "type": "array" - }, "startOpen": { "description": "If the start is open, then the range excludes rows whose first\n`len(start_open)` key columns exactly match `start_open`.", "items": { @@ -1742,13 +1051,43 @@ "type": "any" }, "type": "array" + }, + "endOpen": { + "description": "If the end is open, then the range excludes rows whose first\n`len(end_open)` key columns exactly match `end_open`.", + "items": { + "type": "any" + }, + "type": "array" + }, + "endClosed": { + "description": "If the end is closed, then the range includes all rows whose\nfirst `len(end_closed)` key columns exactly match `end_closed`.", + "items": { + "type": "any" + }, + "type": "array" } }, "id": "KeyRange" }, + "ListInstancesResponse": { + "properties": { + "nextPageToken": { + "description": "`next_page_token` can be sent in a subsequent\nListInstances call to fetch more\nof the matching instances.", + "type": "string" + }, + "instances": { + "description": "The list of requested instances.", + "items": { + "$ref": "Instance" + }, + "type": "array" + } + }, + "id": "ListInstancesResponse", + "description": "The response for ListInstances.", + "type": "object" + }, "ShortRepresentation": { - "description": "Condensed representation of a node and its subtree. Only present for\n`SCALAR` PlanNode(s).", - "type": "object", "properties": { "description": { "description": "A string representation of the expression subtree rooted at this node.", @@ -1763,26 +1102,26 @@ "type": "object" } }, - "id": "ShortRepresentation" + "id": "ShortRepresentation", + "description": "Condensed representation of a node and its subtree. Only present for\n`SCALAR` PlanNode(s).", + "type": "object" }, "InstanceConfig": { "description": "A possible configuration for a Cloud Spanner instance. Configurations\ndefine the geographic placement of nodes and their replication.", "type": "object", "properties": { - "displayName": { - "description": "The name of this instance configuration as it appears in UIs.", - "type": "string" - }, "name": { "description": "A unique identifier for the instance configuration. Values\nare of the form\n`projects/\u003cproject\u003e/instanceConfigs/a-z*`", "type": "string" + }, + "displayName": { + "description": "The name of this instance configuration as it appears in UIs.", + "type": "string" } }, "id": "InstanceConfig" }, "UpdateInstanceRequest": { - "description": "The request for UpdateInstance.", - "type": "object", "properties": { "fieldMask": { "format": "google-fieldmask", @@ -1794,891 +1133,22 @@ "$ref": "Instance" } }, - "id": "UpdateInstanceRequest" + "id": "UpdateInstanceRequest", + "description": "The request for UpdateInstance.", + "type": "object" }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "type": "object", "properties": {}, "id": "Empty" - }, - "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 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\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`.", - "type": "object", - "properties": { - "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." - }, - "readWrite": { - "$ref": "ReadWrite", - "description": "Transaction may write.\n\nAuthorization to begin a read-write transaction requires\n`spanner.databases.beginOrRollbackReadWriteTransaction` permission\non the `session` resource." - } - }, - "id": "TransactionOptions" - }, - "CreateDatabaseRequest": { - "description": "The request for CreateDatabase.", - "type": "object", - "properties": { - "extraStatements": { - "description": "An optional list of DDL statements to run inside the newly created\ndatabase. Statements can create tables, indexes, etc. These\nstatements execute atomically with the creation of the database:\nif there is an error in any statement, the database is not created.", - "items": { - "type": "string" - }, - "type": "array" - }, - "createStatement": { - "description": "Required. A `CREATE DATABASE` statement, which specifies the ID of the\nnew database. The database ID must conform to the regular expression\n`a-z*[a-z0-9]` and be between 2 and 30 characters in length.\nIf the database ID is a reserved word or if it contains a hyphen, the\ndatabase ID must be enclosed in backticks (`` ` ``).", - "type": "string" - } - }, - "id": "CreateDatabaseRequest" - }, - "CreateInstanceRequest": { - "description": "The request for CreateInstance.", - "type": "object", - "properties": { - "instanceId": { - "description": "Required. The ID of the instance to create. Valid identifiers are of the\nform `a-z*[a-z0-9]` and must be between 6 and 30 characters in\nlength.", - "type": "string" - }, - "instance": { - "description": "Required. The instance to create. The name may be omitted, but if\nspecified must be `\u003cparent\u003e/instances/\u003cinstance_id\u003e`.", - "$ref": "Instance" - } - }, - "id": "CreateInstanceRequest" - }, - "Condition": { - "description": "A condition to be met.", - "type": "object", - "properties": { - "values": { - "description": "The objects of the condition. This is mutually exclusive with 'value'.", - "items": { - "type": "string" - }, - "type": "array" - }, - "iam": { - "enumDescriptions": [ - "Default non-attribute.", - "Either principal or (if present) authority selector.", - "The principal (even if an authority selector is present), which\nmust only be used for attribution, not authorization.", - "Any of the security realms in the IAMContext (go/security-realms).\nWhen used with IN, the condition indicates \"any of the request's realms\nmatch one of the given values; with NOT_IN, \"none of the realms match\nany of the given values\". It is not permitted to grant access based on\nthe *absence* of a realm, so realm conditions can only be used in\na \"positive\" context (e.g., ALLOW/IN or DENY/NOT_IN).", - "An approver (distinct from the requester) that has authorized this\nrequest.\nWhen used with IN, the condition indicates that one of the approvers\nassociated with the request matches the specified principal, or is a\nmember of the specified group. Approvers can only grant additional\naccess, and are thus only used in a strictly positive context\n(e.g. ALLOW/IN or DENY/NOT_IN).", - "What types of justifications have been supplied with this request.\nString values should match enum names from tech.iam.JustificationType,\ne.g. \"MANUAL_STRING\". It is not permitted to grant access based on\nthe *absence* of a justification, so justification conditions can only\nbe used in a \"positive\" context (e.g., ALLOW/IN or DENY/NOT_IN).\n\nMultiple justifications, e.g., a Buganizer ID and a manually-entered\nreason, are normal and supported." - ], - "enum": [ - "NO_ATTR", - "AUTHORITY", - "ATTRIBUTION", - "SECURITY_REALM", - "APPROVER", - "JUSTIFICATION_TYPE" - ], - "description": "Trusted attributes supplied by the IAM system.", - "type": "string" - }, - "op": { - "enumDescriptions": [ - "Default no-op.", - "DEPRECATED. Use IN instead.", - "DEPRECATED. Use NOT_IN instead.", - "The condition is true if the subject (or any element of it if it is\na set) matches any of the supplied values.", - "The condition is true if the subject (or every element of it if it is\na set) matches none of the supplied values.", - "Subject is discharged" - ], - "enum": [ - "NO_OP", - "EQUALS", - "NOT_EQUALS", - "IN", - "NOT_IN", - "DISCHARGED" - ], - "description": "An operator to apply the subject with.", - "type": "string" - }, - "svc": { - "description": "Trusted attributes discharged by the service.", - "type": "string" - }, - "value": { - "description": "DEPRECATED. Use 'values' instead.", - "type": "string" - }, - "sys": { - "enumDescriptions": [ - "Default non-attribute type", - "Region of the resource", - "Service name", - "Resource name", - "IP address of the caller" - ], - "enum": [ - "NO_ATTR", - "REGION", - "SERVICE", - "NAME", - "IP" - ], - "description": "Trusted attributes supplied by any service that owns resources and uses\nthe IAM system for access control.", - "type": "string" - } - }, - "id": "Condition" - }, - "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.", - "type": "object", - "properties": { - "logType": { - "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" - ], - "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" - ], - "description": "The log type that this config enables.", - "type": "string" - }, - "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" - } - }, - "id": "AuditLogConfig" - }, - "ReadOnly": { - "description": "Message type to initiate a read-only transaction.", - "type": "object", - "properties": { - "strong": { - "description": "Read at a timestamp where all previously committed transactions\nare visible.", - "type": "boolean" - }, - "minReadTimestamp": { - "format": "google-datetime", - "description": "Executes all reads at a timestamp \u003e= `min_read_timestamp`.\n\nThis is useful for requesting fresher data than some previous\nread, or data that is fresh enough to observe the effects of some\npreviously committed transaction whose timestamp is known.\n\nNote that this option can only be used in single-use transactions.", - "type": "string" - }, - "maxStaleness": { - "format": "google-duration", - "description": "Read data at a timestamp \u003e= `NOW - max_staleness`\nseconds. Guarantees that all writes that have committed more\nthan the specified number of seconds ago are visible. Because\nCloud Spanner chooses the exact timestamp, this mode works even if\nthe client's local clock is substantially skewed from Cloud Spanner\ncommit timestamps.\n\nUseful for reading the freshest data available at a nearby\nreplica, while bounding the possible staleness if the local\nreplica has fallen behind.\n\nNote that this option can only be used in single-use\ntransactions.", - "type": "string" - }, - "readTimestamp": { - "format": "google-datetime", - "description": "Executes all reads at the given timestamp. Unlike other modes,\nreads at a specific timestamp are repeatable; the same read at\nthe same timestamp always returns the same data. If the\ntimestamp is in the future, the read will block until the\nspecified timestamp, modulo the read's deadline.\n\nUseful for large scale consistent reads such as mapreduces, or\nfor coordinating many reads against a consistent snapshot of the\ndata.", - "type": "string" - }, - "returnReadTimestamp": { - "description": "If true, the Cloud Spanner-selected read timestamp is included in\nthe Transaction message that describes the transaction.", - "type": "boolean" - }, - "exactStaleness": { - "format": "google-duration", - "description": "Executes all reads at a timestamp that is `exact_staleness`\nold. The timestamp is chosen soon after the read is started.\n\nGuarantees that all writes that have committed more than the\nspecified number of seconds ago are visible. Because Cloud Spanner\nchooses the exact timestamp, this mode works even if the client's\nlocal clock is substantially skewed from Cloud Spanner commit\ntimestamps.\n\nUseful for reading at nearby replicas without the distributed\ntimestamp negotiation overhead of `max_staleness`.", - "type": "string" - } - }, - "id": "ReadOnly" - }, - "ExecuteSqlRequest": { - "description": "The request for ExecuteSql and\nExecuteStreamingSql.", - "type": "object", - "properties": { - "queryMode": { - "enumDescriptions": [ - "The default mode where only the query result, without any information\nabout the query plan is returned.", - "This mode returns only the query plan, without any result rows or\nexecution statistics information.", - "This mode returns both the query plan and the execution statistics along\nwith the result rows." - ], - "enum": [ - "NORMAL", - "PLAN", - "PROFILE" - ], - "description": "Used to control the amount of debugging information returned in\nResultSetStats.", - "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." - }, - "resumeToken": { - "format": "byte", - "description": "If this request is resuming a previously interrupted SQL query\nexecution, `resume_token` should be copied from the last\nPartialResultSet yielded before the interruption. Doing this\nenables the new SQL query execution to resume where the last one left\noff. The rest of the request parameters must exactly match the\nrequest that yielded this token.", - "type": "string" - }, - "paramTypes": { - "description": "It is not always possible for Cloud Spanner to infer the right SQL type\nfrom a JSON value. For example, values of type `BYTES` and values\nof type `STRING` both appear in params as JSON strings.\n\nIn these cases, `param_types` can be used to specify the exact\nSQL type for some or all of the SQL query parameters. See the\ndefinition of Type for more information\nabout SQL types.", - "type": "object", - "additionalProperties": { - "$ref": "Type" - } - }, - "sql": { - "description": "Required. The SQL query string.", - "type": "string" - }, - "params": { - "description": "The SQL query string can contain parameter placeholders. A parameter\nplaceholder consists of `'@'` followed by the parameter\nname. Parameter names consist of any combination of letters,\nnumbers, and underscores.\n\nParameters can appear anywhere that a literal value is expected. The same\nparameter name can be used more than once, for example:\n `\"WHERE id \u003e @msg_id AND id \u003c @msg_id + 100\"`\n\nIt is an error to execute an SQL query with unbound parameters.\n\nParameter values are specified using `params`, which is a JSON\nobject whose keys are parameter names, and whose values are the\ncorresponding parameter values.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - } - } - }, - "id": "ExecuteSqlRequest" - }, - "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**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\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "version": { - "format": "int32", - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer" - }, - "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": { - "format": "byte", - "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.", - "type": "string" - }, - "iamOwned": { - "type": "boolean" - }, - "rules": { - "description": "If more than one rule is specified, the rules are applied in the following\nmanner:\n- All matching LOG rules are always applied.\n- If any DENY/DENY_WITH_LOG rule matches, permission is denied.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is\n granted.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if no rule applies, permission is denied.", - "items": { - "$ref": "Rule" - }, - "type": "array" - } - }, - "id": "Policy" - }, - "ReadRequest": { - "description": "The request for Read and\nStreamingRead.", - "type": "object", - "properties": { - "table": { - "description": "Required. The name of the table in the database to be read.", - "type": "string" - }, - "limit": { - "format": "int64", - "description": "If greater than zero, only the first `limit` rows are yielded. If `limit`\nis zero, the default is no limit.", - "type": "string" - }, - "index": { - "description": "If non-empty, the name of an index on table. This index is\nused instead of the table primary key when interpreting key_set\nand sorting result rows. See key_set for further information.", - "type": "string" - }, - "keySet": { - "$ref": "KeySet", - "description": "Required. `key_set` identifies the rows to be yielded. `key_set` names the\nprimary keys of the rows in table to be yielded, unless index\nis present. If index is present, then key_set instead names\nindex keys in index.\n\nRows are yielded in table primary key order (if index is empty)\nor index key order (if index is non-empty).\n\nIt is not an error for the `key_set` to name rows that do not\nexist in the database. Read yields nothing for nonexistent rows." - }, - "columns": { - "description": "The columns of table to be returned for each row matching\nthis request.", - "items": { - "type": "string" - }, - "type": "array" - }, - "transaction": { - "$ref": "TransactionSelector", - "description": "The transaction to use. If none is provided, the default is a\ntemporary read-only transaction with strong concurrency." - }, - "resumeToken": { - "format": "byte", - "description": "If this request is resuming a previously interrupted read,\n`resume_token` should be copied from the last\nPartialResultSet yielded before the interruption. Doing this\nenables the new read to resume where the last read left off. The\nrest of the request parameters must exactly match the request\nthat yielded this token.", - "type": "string" - } - }, - "id": "ReadRequest" - }, - "Write": { - "description": "Arguments to insert, update, insert_or_update, and\nreplace operations.", - "type": "object", - "properties": { - "table": { - "description": "Required. The table whose rows will be written.", - "type": "string" - }, - "values": { - "description": "The values to be written. `values` can contain more than one\nlist of values. If it does, then multiple rows are written, one\nfor each entry in `values`. Each list in `values` must have\nexactly as many entries as there are entries in columns\nabove. Sending multiple lists is equivalent to sending multiple\n`Mutation`s, each containing one `values` entry and repeating\ntable and columns. Individual values in each list are\nencoded as described here.", - "items": { - "items": { - "type": "any" - }, - "type": "array" - }, - "type": "array" - }, - "columns": { - "description": "The names of the columns in table to be written.\n\nThe list of columns must contain enough columns to allow\nCloud Spanner to derive values for all primary key columns in the\nrow(s) to be modified.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "Write" - }, - "ReadWrite": { - "description": "Message type to initiate a read-write transaction. Currently this\ntransaction type has no options.", - "type": "object", - "properties": {}, - "id": "ReadWrite" - }, - "DataAccessOptions": { - "description": "Write a Data Access (Gin) log", - "type": "object", - "properties": {}, - "id": "DataAccessOptions" - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", - "properties": { - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" - }, - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "type": "object" - } - }, - "id": "Operation" - }, - "ResultSet": { - "description": "Results from Read or\nExecuteSql.", - "type": "object", - "properties": { - "metadata": { - "description": "Metadata about the result set, such as row type information.", - "$ref": "ResultSetMetadata" - }, - "stats": { - "description": "Query plan and execution statistics for the query that produced this\nresult set. These can be requested by setting\nExecuteSqlRequest.query_mode.", - "$ref": "ResultSetStats" - }, - "rows": { - "description": "Each element in `rows` is a row whose format is defined by\nmetadata.row_type. The ith element\nin each row matches the ith field in\nmetadata.row_type. Elements are\nencoded based on type as described\nhere.", - "items": { - "items": { - "type": "any" - }, - "type": "array" - }, - "type": "array" - } - }, - "id": "ResultSet" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - } - }, - "id": "Status" - }, - "UpdateDatabaseDdlRequest": { - "description": "Enqueues the given DDL statements to be applied, in order but not\nnecessarily all at once, to the database schema at some point (or\npoints) in the future. The server checks that the statements\nare executable (syntactically valid, name tables that exist, etc.)\nbefore enqueueing them, but they may still fail upon\nlater execution (e.g., if a statement from another batch of\nstatements is applied first and it conflicts in some way, or if\nthere is some data-related problem like a `NULL` value in a column to\nwhich `NOT NULL` would be added). If a statement fails, all\nsubsequent statements in the batch are automatically cancelled.\n\nEach batch of statements is assigned a name which can be used with\nthe Operations API to monitor\nprogress. See the\noperation_id field for more\ndetails.", - "type": "object", - "properties": { - "statements": { - "description": "DDL statements to be applied to the database.", - "items": { - "type": "string" - }, - "type": "array" - }, - "operationId": { - "description": "If empty, the new update request is assigned an\nautomatically-generated operation ID. Otherwise, `operation_id`\nis used to construct the name of the resulting\nOperation.\n\nSpecifying an explicit operation ID simplifies determining\nwhether the statements were executed in the event that the\nUpdateDatabaseDdl call is replayed,\nor the return value is otherwise lost: the database and\n`operation_id` fields can be combined to form the\nname of the resulting\nlongrunning.Operation: `\u003cdatabase\u003e/operations/\u003coperation_id\u003e`.\n\n`operation_id` should be unique within the database, and must be\na valid identifier: `a-z*`. Note that\nautomatically-generated operation IDs always begin with an\nunderscore. If the named operation already exists,\nUpdateDatabaseDdl returns\n`ALREADY_EXISTS`.", - "type": "string" - } - }, - "id": "UpdateDatabaseDdlRequest" - }, - "Binding": { - "description": "Associates `members` with a `role`.", - "type": "object", - "properties": { - "condition": { - "$ref": "Expr", - "description": "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.\nThis field is GOOGLE_INTERNAL." - }, - "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` or `joe@example.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`.\nRequired", - "type": "string" - } - }, - "id": "Binding" - }, - "PartialResultSet": { - "description": "Partial results from a streaming read or SQL query. Streaming reads and\nSQL queries better tolerate large result sets, large rows, and large\nvalues, but are a little trickier to consume.", - "type": "object", - "properties": { - "stats": { - "description": "Query plan and execution statistics for the query 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.", - "$ref": "ResultSetStats" - }, - "chunkedValue": { - "description": "If true, then the final value in values is chunked, and must\nbe combined with more values from subsequent `PartialResultSet`s\nto obtain a complete field value.", - "type": "boolean" - }, - "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\"`.", - "items": { - "type": "any" - }, - "type": "array" - }, - "metadata": { - "description": "Metadata about the result set, such as row type information.\nOnly present in the first response.", - "$ref": "ResultSetMetadata" - }, - "resumeToken": { - "format": "byte", - "description": "Streaming calls might be interrupted for a variety of reasons, such\nas TCP connection loss. If this occurs, the stream of results can\nbe resumed by re-sending the original request and including\n`resume_token`. Note that executing any other transaction in the\nsame session invalidates the token.", - "type": "string" - } - }, - "id": "PartialResultSet" - }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - } - }, - "id": "ListOperationsResponse" - }, - "UpdateInstanceMetadata": { - "description": "Metadata type for the operation returned by\nUpdateInstance.", - "type": "object", - "properties": { - "endTime": { - "format": "google-datetime", - "description": "The time at which this operation failed or was completed successfully.", - "type": "string" - }, - "cancelTime": { - "format": "google-datetime", - "description": "The time at which this operation was cancelled. If set, this operation is\nin the process of undoing itself (which is guaranteed to succeed) and\ncannot be cancelled again.", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "The time at which UpdateInstance\nrequest was received.", - "type": "string" - }, - "instance": { - "description": "The desired end state of the update.", - "$ref": "Instance" - } - }, - "id": "UpdateInstanceMetadata" - }, - "ResultSetMetadata": { - "description": "Metadata about a ResultSet or PartialResultSet.", - "type": "object", - "properties": { - "rowType": { - "$ref": "StructType", - "description": "Indicates the field names and types for the rows in the result\nset. For example, a SQL query like `\"SELECT UserId, UserName FROM\nUsers\"` could return a `row_type` value like:\n\n \"fields\": [\n { \"name\": \"UserId\", \"type\": { \"code\": \"INT64\" } },\n { \"name\": \"UserName\", \"type\": { \"code\": \"STRING\" } },\n ]" - }, - "transaction": { - "description": "If the read or SQL query began a transaction as a side-effect, the\ninformation about the new transaction is yielded here.", - "$ref": "Transaction" - } - }, - "id": "ResultSetMetadata" - }, - "TransactionSelector": { - "description": "This message is used to select the transaction in which a\nRead or\nExecuteSql call runs.\n\nSee TransactionOptions for more information about transactions.", - "type": "object", - "properties": { - "singleUse": { - "$ref": "TransactionOptions", - "description": "Execute the read or SQL query in a temporary transaction.\nThis is the most efficient way to execute a transaction that\nconsists of a single SQL query." - }, - "begin": { - "description": "Begin a new transaction and execute this read or SQL query in\nit. The transaction ID of the new transaction is returned in\nResultSetMetadata.transaction, which is a Transaction.", - "$ref": "TransactionOptions" - }, - "id": { - "format": "byte", - "description": "Execute the read or SQL query in a previously-started transaction.", - "type": "string" - } - }, - "id": "TransactionSelector" - }, - "KeySet": { - "description": "`KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All\nthe keys are expected to be in the same table or index. The keys need\nnot be sorted in any particular way.\n\nIf the same key is specified multiple times in the set (for example\nif two ranges, two keys, or a key and a range overlap), Cloud Spanner\nbehaves as if the key were only specified once.", - "type": "object", - "properties": { - "ranges": { - "description": "A list of key ranges. See KeyRange for more information about\nkey range specifications.", - "items": { - "$ref": "KeyRange" - }, - "type": "array" - }, - "all": { - "description": "For convenience `all` can be set to `true` to indicate that this\n`KeySet` matches all keys in the table or index. Note that any keys\nspecified in `keys` or `ranges` are only yielded once.", - "type": "boolean" - }, - "keys": { - "description": "A list of specific keys. Entries in `keys` should have exactly as\nmany elements as there are columns in the primary or index key\nwith which this `KeySet` is used. Individual key values are\nencoded as described here.", - "items": { - "items": { - "type": "any" - }, - "type": "array" - }, - "type": "array" - } - }, - "id": "KeySet" - }, - "Mutation": { - "description": "A modification to one or more Cloud Spanner rows. Mutations can be\napplied to a Cloud Spanner database by sending them in a\nCommit call.", - "type": "object", - "properties": { - "delete": { - "$ref": "Delete", - "description": "Delete rows from a table. Succeeds whether or not the named\nrows were present." - }, - "insertOrUpdate": { - "$ref": "Write", - "description": "Like insert, except that if the row already exists, then\nits column values are overwritten with the ones provided. Any\ncolumn values not explicitly written are preserved." - }, - "insert": { - "$ref": "Write", - "description": "Insert new rows in a table. If any of the rows already exist,\nthe write or transaction fails with error `ALREADY_EXISTS`." - }, - "update": { - "$ref": "Write", - "description": "Update existing rows in a table. If any of the rows does not\nalready exist, the transaction fails with error `NOT_FOUND`." - }, - "replace": { - "$ref": "Write", - "description": "Like insert, except that if the row already exists, it is\ndeleted, and the column values provided are inserted\ninstead. Unlike insert_or_update, this means any values not\nexplicitly written become `NULL`." - } - }, - "id": "Mutation" - }, - "GetDatabaseDdlResponse": { - "description": "The response for GetDatabaseDdl.", - "type": "object", - "properties": { - "statements": { - "description": "A list of formatted DDL statements defining the schema of the database\nspecified in the request.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "GetDatabaseDdlResponse" - }, - "Database": { - "description": "A Cloud Spanner database.", - "type": "object", - "properties": { - "state": { - "description": "Output only. The current database state.", - "type": "string", - "enumDescriptions": [ - "Not specified.", - "The database is still being created. Operations on the database may fail\nwith `FAILED_PRECONDITION` in this state.", - "The database is fully created and ready for use." - ], - "enum": [ - "STATE_UNSPECIFIED", - "CREATING", - "READY" - ] - }, - "name": { - "description": "Required. The name of the database. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e`,\nwhere `\u003cdatabase\u003e` is as specified in the `CREATE DATABASE`\nstatement. This name can be passed to other API methods to\nidentify the database.", - "type": "string" - } - }, - "id": "Database" - }, - "ListDatabasesResponse": { - "description": "The response for ListDatabases.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "`next_page_token` can be sent in a subsequent\nListDatabases call to fetch more\nof the matching databases.", - "type": "string" - }, - "databases": { - "description": "Databases that matched the request.", - "items": { - "$ref": "Database" - }, - "type": "array" - } - }, - "id": "ListDatabasesResponse" - }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "properties": { - "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.", - "$ref": "Policy" - }, - "updateMask": { - "format": "google-fieldmask", - "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.", - "type": "string" - } - }, - "id": "SetIamPolicyRequest" - }, - "Instance": { - "description": "An isolated set of Cloud Spanner resources on which databases can be hosted.", - "type": "object", - "properties": { - "labels": { - "description": "Cloud Labels are a flexible and lightweight mechanism for organizing cloud\nresources into groups that reflect a customer's organizational needs and\ndeployment strategies. Cloud Labels can be used to filter collections of\nresources. They can be used to control how resource metrics are aggregated.\nAnd they can be used as arguments to policy management rules (e.g. route,\nfirewall, load balancing, etc.).\n\n * Label keys must be between 1 and 63 characters long and must conform to\n the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.\n * Label values must be between 0 and 63 characters long and must conform\n to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.\n * No more than 64 labels can be associated with a given resource.\n\nSee https://goo.gl/xmQnxf for more information on and examples of labels.\n\nIf you plan to use labels in your own code, please note that additional\ncharacters may be allowed in the future. And so you are advised to use an\ninternal label representation, such as JSON, which doesn't rely upon\nspecific characters being disallowed. For example, representing labels\nas the string: name + \"_\" + value would prove problematic if we were to\nallow \"_\" in a future release.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "config": { - "description": "Required. The name of the instance's configuration. Values are of the form\n`projects/\u003cproject\u003e/instanceConfigs/\u003cconfiguration\u003e`. See\nalso InstanceConfig and\nListInstanceConfigs.", - "type": "string" - }, - "state": { - "description": "Output only. The current instance state. For\nCreateInstance, the state must be\neither omitted or set to `CREATING`. For\nUpdateInstance, the state must be\neither omitted or set to `READY`.", - "type": "string", - "enumDescriptions": [ - "Not specified.", - "The instance is still being created. Resources may not be\navailable yet, and operations such as database creation may not\nwork.", - "The instance is fully created and ready to do work such as\ncreating databases." - ], - "enum": [ - "STATE_UNSPECIFIED", - "CREATING", - "READY" - ] - }, - "name": { - "description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 6 and 30 characters in length.", - "type": "string" - }, - "displayName": { - "description": "Required. The descriptive name for this instance as it appears in UIs.\nMust be unique per project and between 4 and 30 characters in length.", - "type": "string" - }, - "nodeCount": { - "format": "int32", - "description": "Required. The number of nodes allocated to this instance. This may be zero\nin API responses for instances that are not yet in state `READY`.\n\nEach Spanner node can provide up to 10,000 QPS of reads or 2000 QPS of\nwrites (writing single rows at 1KB data per row), and 2 TiB storage.\n\nFor optimal performance, we recommend provisioning enough nodes to keep\noverall CPU utilization under 75%.\n\nA minimum of 3 nodes is recommended for production environments. This\nminimum is required for SLAs to apply to your instance.\n\nNote that Cloud Spanner performance is highly dependent on workload, schema\ndesign, and dataset characteristics. The performance numbers above are\nestimates, and assume [best practices](https://cloud.google.com/spanner/docs/bulk-loading)\nare followed.", - "type": "integer" - } - }, - "id": "Instance" - }, - "RollbackRequest": { - "description": "The request for Rollback.", - "type": "object", - "properties": { - "transactionId": { - "format": "byte", - "description": "Required. The transaction to roll back.", - "type": "string" - } - }, - "id": "RollbackRequest" - }, - "Transaction": { - "description": "A transaction.", - "type": "object", - "properties": { - "readTimestamp": { - "format": "google-datetime", - "description": "For snapshot read-only transactions, the read timestamp chosen\nfor the transaction. Not returned by default: see\nTransactionOptions.ReadOnly.return_read_timestamp.", - "type": "string" - }, - "id": { - "format": "byte", - "description": "`id` may be used to identify the transaction in subsequent\nRead,\nExecuteSql,\nCommit, or\nRollback calls.\n\nSingle-use read-only transactions do not have IDs, because\nsingle-use transactions do not support multiple requests.", - "type": "string" - } - }, - "id": "Transaction" - }, - "UpdateDatabaseDdlMetadata": { - "description": "Metadata type for the operation returned by\nUpdateDatabaseDdl.", - "type": "object", - "properties": { - "statements": { - "description": "For an update this list contains all the statements. For an\nindividual statement, this list contains only that statement.", - "items": { - "type": "string" - }, - "type": "array" - }, - "commitTimestamps": { - "description": "Reports the commit timestamps of all statements that have\nsucceeded so far, where `commit_timestamps[i]` is the commit\ntimestamp for the statement `statements[i]`.", - "items": { - "format": "google-datetime", - "type": "string" - }, - "type": "array" - }, - "database": { - "description": "The database being modified.", - "type": "string" - } - }, - "id": "UpdateDatabaseDdlMetadata" - }, - "CounterOptions": { - "description": "Options for counters", - "type": "object", - "properties": { - "field": { - "description": "The field value to attribute.", - "type": "string" - }, - "metric": { - "description": "The metric to update.", - "type": "string" - } - }, - "id": "CounterOptions" - }, - "QueryPlan": { - "description": "Contains an ordered list of nodes appearing in the query plan.", - "type": "object", - "properties": { - "planNodes": { - "description": "The nodes in the query plan. Plan nodes are returned in pre-order starting\nwith the plan root. Each PlanNode's `id` corresponds to its index in\n`plan_nodes`.", - "items": { - "$ref": "PlanNode" - }, - "type": "array" - } - }, - "id": "QueryPlan" - }, - "StructType": { - "description": "`StructType` defines the fields of a STRUCT type.", - "type": "object", - "properties": { - "fields": { - "description": "The list of fields that make up this struct. Order is\nsignificant, because values of this struct type are represented as\nlists, where the order of field values matches the order of\nfields in the StructType. In turn, the order of fields\nmatches the order of columns in a read request, or the order of\nfields in the `SELECT` clause of a query.", - "items": { - "$ref": "Field" - }, - "type": "array" - } - }, - "id": "StructType" } }, - "protocol": "rest", "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, + "protocol": "rest", "canonicalName": "Spanner", "auth": { "oauth2": { @@ -2695,5 +1165,1221 @@ } } }, - "rootUrl": "https://spanner.googleapis.com/" + "rootUrl": "https://spanner.googleapis.com/", + "ownerDomain": "google.com", + "name": "spanner", + "batchPath": "batch", + "title": "Cloud Spanner API", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "instanceConfigs": { + "methods": { + "get": { + "path": "v1/{+name}", + "id": "spanner.projects.instanceConfigs.get", + "description": "Gets information about a particular instance configuration.", + "httpMethod": "GET", + "response": { + "$ref": "InstanceConfig" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "name": { + "description": "Required. The name of the requested instance configuration. Values are of\nthe form `projects/\u003cproject\u003e/instanceConfigs/\u003cconfig\u003e`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instanceConfigs/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}" + }, + "list": { + "description": "Lists the supported instance configurations for a given project.", + "httpMethod": "GET", + "response": { + "$ref": "ListInstanceConfigsResponse" + }, + "parameterOrder": [ + "parent" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "pageToken": { + "description": "If non-empty, `page_token` should contain a\nnext_page_token\nfrom a previous ListInstanceConfigsResponse.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Number of instance configurations to be returned in the response. If 0 or\nless, defaults to the server's maximum allowed page size.", + "type": "integer" + }, + "parent": { + "description": "Required. The name of the project for which a list of supported instance\nconfigurations is requested. Values are of the form\n`projects/\u003cproject\u003e`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/instanceConfigs", + "path": "v1/{+parent}/instanceConfigs", + "id": "spanner.projects.instanceConfigs.list" + } + } + }, + "instances": { + "methods": { + "testIamPermissions": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/instances/[^/]+$", + "location": "path", + "description": "REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}:testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "id": "spanner.projects.instances.testIamPermissions", + "description": "Returns permissions that the caller has on the specified instance resource.\n\nAttempting this RPC on a non-existent Cloud Spanner instance resource will\nresult in a NOT_FOUND error if the user has `spanner.instances.list`\npermission on the containing Google Cloud Project. Otherwise returns an\nempty set of permissions.", + "request": { + "$ref": "TestIamPermissionsRequest" + } + }, + "delete": { + "description": "Deletes an instance.\n\nImmediately upon completion of the request:\n\n * Billing ceases for all of the instance's reserved resources.\n\nSoon afterward:\n\n * The instance and *all of its databases* immediately and\n irrevocably disappear from the API. All data in the databases\n is permanently deleted.", + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/instances/[^/]+$", + "location": "path", + "description": "Required. The name of the instance to be deleted. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}", + "id": "spanner.projects.instances.delete", + "path": "v1/{+name}" + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListInstancesResponse" + }, + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The name of the project for which a list of instances is\nrequested. Values are of the form `projects/\u003cproject\u003e`.", + "type": "string", + "required": true + }, + "filter": { + "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n * name\n * display_name\n * labels.key where key is the name of a label\n\nSome examples of using filters are:\n\n * name:* --\u003e The instance has a name.\n * name:Howl --\u003e The instance's name contains the string \"howl\".\n * name:HOWL --\u003e Equivalent to above.\n * NAME:howl --\u003e Equivalent to above.\n * labels.env:* --\u003e The instance has the label \"env\".\n * labels.env:dev --\u003e The instance has the label \"env\" and the value of\n the label contains the string \"dev\".\n * name:howl labels.env:dev --\u003e The instance's name contains \"howl\" and\n it has the label \"env\" with its value\n containing \"dev\".", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "If non-empty, `page_token` should contain a\nnext_page_token from a\nprevious ListInstancesResponse.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Number of instances to be returned in the response. If 0 or less, defaults\nto the server's maximum allowed page size.", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances", + "path": "v1/{+parent}/instances", + "id": "spanner.projects.instances.list", + "description": "Lists all instances in the given project." + }, + "setIamPolicy": { + "description": "Sets the access control policy on an instance resource. Replaces any\nexisting policy.\n\nAuthorization requires `spanner.instances.setIamPolicy` on\nresource.", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/instances/[^/]+$", + "location": "path", + "description": "REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for databases resources.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}:setIamPolicy", + "id": "spanner.projects.instances.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy" + }, + "create": { + "path": "v1/{+parent}/instances", + "id": "spanner.projects.instances.create", + "description": "Creates an instance and begins preparing it to begin serving. The\nreturned long-running operation\ncan be used to track the progress of preparing the new\ninstance. The instance name is assigned by the caller. If the\nnamed instance already exists, `CreateInstance` returns\n`ALREADY_EXISTS`.\n\nImmediately upon completion of this request:\n\n * The instance is readable via the API, with all requested attributes\n but no allocated resources. Its state is `CREATING`.\n\nUntil completion of the returned operation:\n\n * Cancelling the operation renders the instance immediately unreadable\n via the API.\n * The instance can be deleted.\n * All other attempts to modify the instance are rejected.\n\nUpon completion of the returned operation:\n\n * Billing for all successfully-allocated resources begins (some types\n may have lower than the requested levels).\n * Databases can be created in the instance.\n * The instance's allocated resource levels are readable via the API.\n * The instance's state becomes `READY`.\n\nThe returned long-running operation will\nhave a name of the format `\u003cinstance_name\u003e/operations/\u003coperation_id\u003e` and\ncan be used to track creation of the instance. The\nmetadata field type is\nCreateInstanceMetadata.\nThe response field type is\nInstance, if successful.", + "request": { + "$ref": "CreateInstanceRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "parent": { + "description": "Required. The name of the project in which to create the instance. Values\nare of the form `projects/\u003cproject\u003e`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances" + }, + "getIamPolicy": { + "id": "spanner.projects.instances.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "description": "Gets the access control policy for an instance resource. Returns an empty\npolicy if an instance exists but does not have a policy set.\n\nAuthorization requires `spanner.instances.getIamPolicy` on\nresource.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instances/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}:getIamPolicy" + }, + "get": { + "id": "spanner.projects.instances.get", + "path": "v1/{+name}", + "description": "Gets information about a particular instance.", + "response": { + "$ref": "Instance" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/instances/[^/]+$", + "location": "path", + "description": "Required. The name of the requested instance. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}" + }, + "patch": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PATCH", + "parameters": { + "name": { + "description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 6 and 30 characters in length.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instances/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}", + "id": "spanner.projects.instances.patch", + "path": "v1/{+name}", + "description": "Updates an instance, and begins allocating or releasing resources\nas requested. The returned long-running\noperation can be used to track the\nprogress of updating the instance. If the named instance does not\nexist, returns `NOT_FOUND`.\n\nImmediately upon completion of this request:\n\n * For resource types for which a decrease in the instance's allocation\n has been requested, billing is based on the newly-requested level.\n\nUntil completion of the returned operation:\n\n * Cancelling the operation sets its metadata's\n cancel_time, and begins\n restoring resources to their pre-request values. The operation\n is guaranteed to succeed at undoing all resource changes,\n after which point it terminates with a `CANCELLED` status.\n * All other attempts to modify the instance are rejected.\n * Reading the instance via the API continues to give the pre-request\n resource levels.\n\nUpon completion of the returned operation:\n\n * Billing begins for all successfully-allocated resources (some types\n may have lower than the requested levels).\n * All newly-reserved resources are available for serving the instance's\n tables.\n * The instance's new resource levels are readable via the API.\n\nThe returned long-running operation will\nhave a name of the format `\u003cinstance_name\u003e/operations/\u003coperation_id\u003e` and\ncan be used to track the instance modification. The\nmetadata field type is\nUpdateInstanceMetadata.\nThe response field type is\nInstance, if successful.\n\nAuthorization requires `spanner.instances.update` permission on\nresource name.", + "request": { + "$ref": "UpdateInstanceRequest" + } + } + }, + "resources": { + "databases": { + "resources": { + "sessions": { + "methods": { + "read": { + "response": { + "$ref": "ResultSet" + }, + "parameterOrder": [ + "session" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "parameters": { + "session": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "location": "path", + "description": "Required. The session in which the read should be performed.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:read", + "id": "spanner.projects.instances.databases.sessions.read", + "path": "v1/{+session}:read", + "request": { + "$ref": "ReadRequest" + }, + "description": "Reads rows from the database using key lookups and scans, as a\nsimple key/value style alternative to\nExecuteSql. This method cannot be used to\nreturn a result set larger than 10 MiB; if the read matches more\ndata than that, the read fails with a `FAILED_PRECONDITION`\nerror.\n\nReads inside read-write transactions might return `ABORTED`. If\nthis occurs, the application should restart the transaction from\nthe beginning. See Transaction for more details.\n\nLarger result sets can be yielded in streaming fashion by calling\nStreamingRead instead." + }, + "get": { + "description": "Gets a session. Returns `NOT_FOUND` if the session does not exist.\nThis is mainly useful for determining whether a session is still\nalive.", + "response": { + "$ref": "Session" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "parameters": { + "name": { + "description": "Required. The name of the session to retrieve.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}", + "id": "spanner.projects.instances.databases.sessions.get", + "path": "v1/{+name}" + }, + "delete": { + "id": "spanner.projects.instances.databases.sessions.delete", + "path": "v1/{+name}", + "description": "Ends a session, releasing server resources associated with it.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "parameters": { + "name": { + "description": "Required. The name of the session to delete.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}" + }, + "executeStreamingSql": { + "id": "spanner.projects.instances.databases.sessions.executeStreamingSql", + "path": "v1/{+session}:executeStreamingSql", + "request": { + "$ref": "ExecuteSqlRequest" + }, + "description": "Like ExecuteSql, except returns the result\nset as a stream. Unlike ExecuteSql, there\nis no limit on the size of the returned result set. However, no\nindividual row in the result set can exceed 100 MiB, and no\ncolumn value can exceed 10 MiB.", + "response": { + "$ref": "PartialResultSet" + }, + "parameterOrder": [ + "session" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "parameters": { + "session": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "location": "path", + "description": "Required. The session in which the SQL query should be performed.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeStreamingSql" + }, + "commit": { + "request": { + "$ref": "CommitRequest" + }, + "description": "Commits a transaction. The request includes the mutations to be\napplied to rows in the database.\n\n`Commit` might return an `ABORTED` error. This can occur at any time;\ncommonly, the cause is conflicts with concurrent\ntransactions. However, it can also happen for a variety of other\nreasons. If `Commit` returns `ABORTED`, the caller should re-attempt\nthe transaction from the beginning, re-using the same session.", + "httpMethod": "POST", + "parameterOrder": [ + "session" + ], + "response": { + "$ref": "CommitResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "parameters": { + "session": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "location": "path", + "description": "Required. The session in which the transaction to be committed is running.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:commit", + "path": "v1/{+session}:commit", + "id": "spanner.projects.instances.databases.sessions.commit" + }, + "beginTransaction": { + "id": "spanner.projects.instances.databases.sessions.beginTransaction", + "path": "v1/{+session}:beginTransaction", + "request": { + "$ref": "BeginTransactionRequest" + }, + "description": "Begins a new transaction. This step can often be skipped:\nRead, ExecuteSql and\nCommit can begin a new transaction as a\nside-effect.", + "response": { + "$ref": "Transaction" + }, + "parameterOrder": [ + "session" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "parameters": { + "session": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "location": "path", + "description": "Required. The session in which the transaction runs.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:beginTransaction" + }, + "executeSql": { + "response": { + "$ref": "ResultSet" + }, + "parameterOrder": [ + "session" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "parameters": { + "session": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "location": "path", + "description": "Required. The session in which the SQL query should be performed.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeSql", + "id": "spanner.projects.instances.databases.sessions.executeSql", + "path": "v1/{+session}:executeSql", + "request": { + "$ref": "ExecuteSqlRequest" + }, + "description": "Executes an SQL query, returning all rows in a single reply. This\nmethod cannot be used to return a result set larger than 10 MiB;\nif the query yields more data than that, the query fails with\na `FAILED_PRECONDITION` error.\n\nQueries inside read-write transactions might return `ABORTED`. If\nthis occurs, the application should restart the transaction from\nthe beginning. See Transaction for more details.\n\nLarger result sets can be fetched in streaming fashion by calling\nExecuteStreamingSql instead." + }, + "rollback": { + "httpMethod": "POST", + "parameterOrder": [ + "session" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "session": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "location": "path", + "description": "Required. The session in which the transaction to roll back is running.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:rollback", + "path": "v1/{+session}:rollback", + "id": "spanner.projects.instances.databases.sessions.rollback", + "description": "Rolls back a transaction, releasing any locks it holds. It is a good\nidea to call this for any transaction that includes one or more\nRead or ExecuteSql requests and\nultimately decides not to commit.\n\n`Rollback` returns `OK` if it successfully aborts the transaction, the\ntransaction was already aborted, or the transaction is not\nfound. `Rollback` never returns `ABORTED`.", + "request": { + "$ref": "RollbackRequest" + } + }, + "streamingRead": { + "response": { + "$ref": "PartialResultSet" + }, + "parameterOrder": [ + "session" + ], + "httpMethod": "POST", + "parameters": { + "session": { + "description": "Required. The session in which the read should be performed.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:streamingRead", + "id": "spanner.projects.instances.databases.sessions.streamingRead", + "path": "v1/{+session}:streamingRead", + "description": "Like Read, except returns the result set as a\nstream. Unlike Read, there is no limit on the\nsize of the returned result set. However, no individual row in\nthe result set can exceed 100 MiB, and no column value can exceed\n10 MiB.", + "request": { + "$ref": "ReadRequest" + } + }, + "create": { + "description": "Creates a new session. A session can be used to perform\ntransactions that read and/or modify data in a Cloud Spanner database.\nSessions are meant to be reused for many consecutive\ntransactions.\n\nSessions can only execute one transaction at a time. To execute\nmultiple concurrent read-write/write-only transactions, create\nmultiple sessions. Note that standalone reads and queries use a\ntransaction internally, and count toward the one transaction\nlimit.\n\nCloud Spanner limits the number of sessions that can exist at any given\ntime; thus, it is a good idea to delete idle and/or unneeded sessions.\nAside from explicit deletes, Cloud Spanner can delete sessions for which no\noperations are sent for more than an hour. If a session is deleted,\nrequests to it return `NOT_FOUND`.\n\nIdle sessions can be kept alive by sending a trivial SQL query\nperiodically, e.g., `\"SELECT 1\"`.", + "httpMethod": "POST", + "response": { + "$ref": "Session" + }, + "parameterOrder": [ + "database" + ], + "parameters": { + "database": { + "description": "Required. The database in which the new session is created.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions", + "path": "v1/{+database}/sessions", + "id": "spanner.projects.instances.databases.sessions.create" + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + "httpMethod": "POST", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}:cancel", + "path": "v1/{+name}:cancel", + "id": "spanner.projects.instances.databases.operations.cancel" + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}", + "id": "spanner.projects.instances.databases.operations.delete", + "path": "v1/{+name}", + "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`." + }, + "get": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}", + "id": "spanner.projects.instances.databases.operations.get", + "path": "v1/{+name}", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "name": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations$", + "location": "path", + "description": "The name of the operation's parent resource.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + }, + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations", + "id": "spanner.projects.instances.databases.operations.list", + "path": "v1/{+name}" + } + } + } + }, + "methods": { + "dropDatabase": { + "description": "Drops (aka deletes) a Cloud Spanner database.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "database" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "database": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "location": "path", + "description": "Required. The database to be dropped.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}", + "id": "spanner.projects.instances.databases.dropDatabase", + "path": "v1/{+database}" + }, + "updateDdl": { + "id": "spanner.projects.instances.databases.updateDdl", + "path": "v1/{+database}/ddl", + "request": { + "$ref": "UpdateDatabaseDdlRequest" + }, + "description": "Updates the schema of a Cloud Spanner database by\ncreating/altering/dropping tables, columns, indexes, etc. The returned\nlong-running operation will have a name of\nthe format `\u003cdatabase_name\u003e/operations/\u003coperation_id\u003e` and can be used to\ntrack execution of the schema change(s). The\nmetadata field type is\nUpdateDatabaseDdlMetadata. The operation has no response.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "database" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "database": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "location": "path", + "description": "Required. The database to update.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/ddl" + }, + "testIamPermissions": { + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:testIamPermissions", + "id": "spanner.projects.instances.databases.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "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." + }, + "getDdl": { + "id": "spanner.projects.instances.databases.getDdl", + "path": "v1/{+database}/ddl", + "description": "Returns the schema of a Cloud Spanner database as a list of formatted\nDDL statements. This method does not show pending schema updates, those may\nbe queried using the Operations API.", + "response": { + "$ref": "GetDatabaseDdlResponse" + }, + "parameterOrder": [ + "database" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "database": { + "description": "Required. The database whose schema we wish to get.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/ddl" + }, + "list": { + "description": "Lists Cloud Spanner databases.", + "httpMethod": "GET", + "response": { + "$ref": "ListDatabasesResponse" + }, + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "If non-empty, `page_token` should contain a\nnext_page_token from a\nprevious ListDatabasesResponse.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Number of databases to be returned in the response. If 0 or less,\ndefaults to the server's maximum allowed page size.", + "type": "integer" + }, + "parent": { + "pattern": "^projects/[^/]+/instances/[^/]+$", + "location": "path", + "description": "Required. The instance whose databases should be listed.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases", + "path": "v1/{+parent}/databases", + "id": "spanner.projects.instances.databases.list" + }, + "create": { + "id": "spanner.projects.instances.databases.create", + "path": "v1/{+parent}/databases", + "description": "Creates a new Cloud Spanner database and starts to prepare it for serving.\nThe returned long-running operation will\nhave a name of the format `\u003cdatabase_name\u003e/operations/\u003coperation_id\u003e` and\ncan be used to track preparation of the database. The\nmetadata field type is\nCreateDatabaseMetadata. The\nresponse field type is\nDatabase, if successful.", + "request": { + "$ref": "CreateDatabaseRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "parent": { + "pattern": "^projects/[^/]+/instances/[^/]+$", + "location": "path", + "description": "Required. The name of the instance that will serve the new database.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases" + }, + "setIamPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for databases resources.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "id": "spanner.projects.instances.databases.setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the access control policy on a database resource. Replaces any\nexisting policy.\n\nAuthorization requires `spanner.databases.setIamPolicy` permission on\nresource." + }, + "getIamPolicy": { + "id": "spanner.projects.instances.databases.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "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.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "location": "path", + "description": "REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:getIamPolicy" + }, + "get": { + "response": { + "$ref": "Database" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "location": "path", + "description": "Required. The name of the requested database. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}", + "id": "spanner.projects.instances.databases.get", + "path": "v1/{+name}", + "description": "Gets the state of a Cloud Spanner database." + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}:cancel", + "id": "spanner.projects.instances.operations.cancel", + "path": "v1/{+name}:cancel" + }, + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}", + "path": "v1/{+name}", + "id": "spanner.projects.instances.operations.delete", + "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`." + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "httpMethod": "GET", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}", + "path": "v1/{+name}", + "id": "spanner.projects.instances.operations.get" + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "name": { + "pattern": "^projects/[^/]+/instances/[^/]+/operations$", + "location": "path", + "description": "The name of the operation's parent resource.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + }, + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations", + "path": "v1/{+name}", + "id": "spanner.projects.instances.operations.list", + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id." + } + } + } + } + } + } + } + }, + "parameters": { + "alt": { + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "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.", + "type": "string", + "location": "query" + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + } + }, + "version": "v1", + "baseUrl": "https://spanner.googleapis.com/", + "description": "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service.", + "kind": "discovery#restDescription", + "servicePath": "", + "basePath": "" } 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 a48ba4c45..84ef57777 100644 --- a/vendor/google.golang.org/api/spanner/v1/spanner-gen.go +++ b/vendor/google.golang.org/api/spanner/v1/spanner-gen.go @@ -162,163 +162,6 @@ type ProjectsInstancesOperationsService 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 -// AuditConfig 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. - // Next ID: 4 - AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` - - ExemptedMembers []string `json:"exemptedMembers,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) -} - // BeginTransactionRequest: The request for BeginTransaction. type BeginTransactionRequest struct { // Options: Required. Options for the new transaction. @@ -349,15 +192,6 @@ func (s *BeginTransactionRequest) MarshalJSON() ([]byte, error) { // Binding: Associates `members` with a `role`. type Binding struct { - // Condition: 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. - // This field is GOOGLE_INTERNAL. - Condition *Expr `json:"condition,omitempty"` - // Members: Specifies the identities requesting access for a Cloud // Platform resource. // `members` can have the following values: @@ -399,7 +233,7 @@ type Binding struct { // 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 @@ -407,7 +241,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 @@ -476,47 +310,6 @@ func (s *ChildLink) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// CloudAuditOptions: Write a Cloud Audit log -type CloudAuditOptions struct { - // IsReadPermissionType: True if the log is for a permission of type - // DATA_READ or ADMIN_READ. - IsReadPermissionType bool `json:"isReadPermissionType,omitempty"` - - // LogName: The log_name to populate in the Cloud Audit Record. - // - // Possible values: - // "UNSPECIFIED_LOG_NAME" - Default. Should not be used. - // "ADMIN_ACTIVITY" - Corresponds to - // "cloudaudit.googleapis.com/activity" - // "DATA_ACCESS" - Corresponds to - // "cloudaudit.googleapis.com/data_access" - LogName string `json:"logName,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "IsReadPermissionType") 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. "IsReadPermissionType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *CloudAuditOptions) MarshalJSON() ([]byte, error) { - type noMethod CloudAuditOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // CommitRequest: The request for Commit. type CommitRequest struct { // Mutations: The mutations to be executed when this transaction @@ -599,144 +392,6 @@ func (s *CommitResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Condition: A condition to be met. -type Condition struct { - // Iam: Trusted attributes supplied by the IAM system. - // - // Possible values: - // "NO_ATTR" - Default non-attribute. - // "AUTHORITY" - Either principal or (if present) authority selector. - // "ATTRIBUTION" - The principal (even if an authority selector is - // present), which - // must only be used for attribution, not authorization. - // "SECURITY_REALM" - Any of the security realms in the IAMContext - // (go/security-realms). - // When used with IN, the condition indicates "any of the request's - // realms - // match one of the given values; with NOT_IN, "none of the realms - // match - // any of the given values". It is not permitted to grant access based - // on - // the *absence* of a realm, so realm conditions can only be used in - // a "positive" context (e.g., ALLOW/IN or DENY/NOT_IN). - // "APPROVER" - An approver (distinct from the requester) that has - // authorized this - // request. - // When used with IN, the condition indicates that one of the - // approvers - // associated with the request matches the specified principal, or is - // a - // member of the specified group. Approvers can only grant - // additional - // access, and are thus only used in a strictly positive context - // (e.g. ALLOW/IN or DENY/NOT_IN). - // "JUSTIFICATION_TYPE" - What types of justifications have been - // supplied with this request. - // String values should match enum names from - // tech.iam.JustificationType, - // e.g. "MANUAL_STRING". It is not permitted to grant access based - // on - // the *absence* of a justification, so justification conditions can - // only - // be used in a "positive" context (e.g., ALLOW/IN or - // DENY/NOT_IN). - // - // Multiple justifications, e.g., a Buganizer ID and a - // manually-entered - // reason, are normal and supported. - Iam string `json:"iam,omitempty"` - - // Op: An operator to apply the subject with. - // - // Possible values: - // "NO_OP" - Default no-op. - // "EQUALS" - DEPRECATED. Use IN instead. - // "NOT_EQUALS" - DEPRECATED. Use NOT_IN instead. - // "IN" - The condition is true if the subject (or any element of it - // if it is - // a set) matches any of the supplied values. - // "NOT_IN" - The condition is true if the subject (or every element - // of it if it is - // a set) matches none of the supplied values. - // "DISCHARGED" - Subject is discharged - Op string `json:"op,omitempty"` - - // Svc: Trusted attributes discharged by the service. - Svc string `json:"svc,omitempty"` - - // Sys: Trusted attributes supplied by any service that owns resources - // and uses - // the IAM system for access control. - // - // Possible values: - // "NO_ATTR" - Default non-attribute type - // "REGION" - Region of the resource - // "SERVICE" - Service name - // "NAME" - Resource name - // "IP" - IP address of the caller - Sys string `json:"sys,omitempty"` - - // Value: DEPRECATED. Use 'values' instead. - Value string `json:"value,omitempty"` - - // Values: The objects of the condition. This is mutually exclusive with - // 'value'. - Values []string `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Iam") 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. "Iam") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field 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) -} - -// CounterOptions: Options for counters -type CounterOptions struct { - // Field: The field value to attribute. - Field string `json:"field,omitempty"` - - // Metric: The metric to update. - Metric string `json:"metric,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CounterOptions) MarshalJSON() ([]byte, error) { - type noMethod CounterOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // CreateDatabaseMetadata: Metadata type for the operation returned // by // CreateDatabase. @@ -894,10 +549,6 @@ func (s *CreateInstanceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DataAccessOptions: Write a Data Access (Gin) log -type DataAccessOptions struct { -} - // Database: A Cloud Spanner database. type Database struct { // Name: Required. The name of the database. Values are of the @@ -1091,60 +742,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. @@ -1743,69 +1340,6 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LogConfig: Specifies what kind of log the caller must write -// Increment a streamz counter with the specified metric and field -// names. -// -// Metric 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. -// -// Field names correspond to IAM request parameters and field values -// are -// their respective values. -// -// 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) -// * decrementing the counter -// * incrementing it by anything other than 1 -type LogConfig struct { - // CloudAudit: Cloud audit options. - CloudAudit *CloudAuditOptions `json:"cloudAudit,omitempty"` - - // Counter: Counter options. - Counter *CounterOptions `json:"counter,omitempty"` - - // DataAccess: Data access options. - DataAccess *DataAccessOptions `json:"dataAccess,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CloudAudit") 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. "CloudAudit") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LogConfig) MarshalJSON() ([]byte, error) { - type noMethod LogConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Mutation: A modification to one or more Cloud Spanner rows. // Mutations can be // applied to a Cloud Spanner database by sending them in a @@ -2207,10 +1741,6 @@ func (s *PlanNode) MarshalJSON() ([]byte, error) { // For a description of IAM and its features, see the // [IAM developer's guide](https://cloud.google.com/iam). 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"` @@ -2235,22 +1765,6 @@ type Policy struct { // policy is overwritten blindly. Etag string `json:"etag,omitempty"` - IamOwned bool `json:"iamOwned,omitempty"` - - // Rules: If more than one rule is specified, the rules are applied in - // the following - // manner: - // - All matching LOG rules are always applied. - // - If any DENY/DENY_WITH_LOG rule matches, permission is denied. - // Logging will be applied if one or more matching rule requires - // logging. - // - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is - // granted. - // Logging will be applied if one or more matching rule requires - // logging. - // - Otherwise, if no rule applies, permission is denied. - Rules []*Rule `json:"rules,omitempty"` - // Version: Version of the `Policy`. The default version is 0. Version int64 `json:"version,omitempty"` @@ -2258,7 +1772,7 @@ type Policy struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // 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 @@ -2266,10 +1780,10 @@ type Policy struct { // 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 + // 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:"-"` @@ -2652,77 +2166,6 @@ func (s *RollbackRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Rule: A rule to be applied in a Policy. -type Rule struct { - // Action: Required - // - // Possible values: - // "NO_ACTION" - Default no action. - // "ALLOW" - Matching 'Entries' grant access. - // "ALLOW_WITH_LOG" - Matching 'Entries' grant access and the caller - // promises to log - // the request per the returned log_configs. - // "DENY" - Matching 'Entries' deny access. - // "DENY_WITH_LOG" - Matching 'Entries' deny access and the caller - // promises to log - // the request per the returned log_configs. - // "LOG" - Matching 'Entries' tell IAM.Check callers to generate logs. - Action string `json:"action,omitempty"` - - // Conditions: Additional restrictions that must be met - Conditions []*Condition `json:"conditions,omitempty"` - - // Description: Human-readable description of the rule. - Description string `json:"description,omitempty"` - - // In: If one or more 'in' clauses are specified, the rule matches - // if - // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. - In []string `json:"in,omitempty"` - - // LogConfig: The config returned to callers of tech.iam.IAM.CheckPolicy - // for any entries - // that match the LOG action. - LogConfig []*LogConfig `json:"logConfig,omitempty"` - - // NotIn: If one or more 'not_in' clauses are specified, the rule - // matches - // if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. - // The format for in and not_in entries is the same as for members in - // a - // Binding (see google/iam/v1/policy.proto). - NotIn []string `json:"notIn,omitempty"` - - // Permissions: A permission is a string of form '..' - // (e.g., 'storage.buckets.list'). A value of '*' matches all - // permissions, - // and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") 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. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Rule) MarshalJSON() ([]byte, error) { - type noMethod Rule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Session: A session in the Cloud Spanner API. type Session struct { // Name: Required. The name of the session. @@ -2765,15 +2208,6 @@ type SetIamPolicyRequest struct { // 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, @@ -2923,9 +2357,9 @@ type Status struct { // google.rpc.Code. Code int64 `json:"code,omitempty"` - // Details: A list of messages that carry the error details. There will - // be a - // common set of message types for APIs to use. + // 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 diff --git a/vendor/google.golang.org/api/speech/v1/speech-api.json b/vendor/google.golang.org/api/speech/v1/speech-api.json index 38b004afa..48e43a8b3 100644 --- a/vendor/google.golang.org/api/speech/v1/speech-api.json +++ b/vendor/google.golang.org/api/speech/v1/speech-api.json @@ -1,10 +1,40 @@ { - "revision": "20170731", - "documentationLink": "https://cloud.google.com/speech/", + "basePath": "", "id": "speech:v1", + "documentationLink": "https://cloud.google.com/speech/", + "revision": "20170912", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "RecognizeRequest": { + "description": "The top-level message sent by the client for the `Recognize` method.", + "type": "object", + "properties": { + "audio": { + "description": "*Required* The audio data to be recognized.", + "$ref": "RecognitionAudio" + }, + "config": { + "$ref": "RecognitionConfig", + "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request." + } + }, + "id": "RecognizeRequest" + }, + "SpeechContext": { + "description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases\nin the results.", + "type": "object", + "properties": { + "phrases": { + "description": "*Optional* A list of strings containing words and phrases \"hints\" so that\nthe speech recognition is more likely to recognize them. This can be used\nto improve the accuracy for specific words and phrases, for example, if\nspecific commands are typically spoken by the user. This can also be used\nto add additional words to the vocabulary of the recognizer. See\n[usage limits](https://cloud.google.com/speech/limits#content).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "SpeechContext" + }, "SpeechRecognitionAlternative": { "description": "Alternative hypotheses (a.k.a. n-best list).", "type": "object", @@ -29,6 +59,8 @@ "id": "SpeechRecognitionAlternative" }, "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", "properties": { "nextPageToken": { "description": "The standard List next-page token.", @@ -42,23 +74,7 @@ "type": "array" } }, - "id": "ListOperationsResponse", - "description": "The response message for Operations.ListOperations.", - "type": "object" - }, - "SpeechContext": { - "description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases\nin the results.", - "type": "object", - "properties": { - "phrases": { - "description": "*Optional* A list of strings containing words and phrases \"hints\" so that\nthe speech recognition is more likely to recognize them. This can be used\nto improve the accuracy for specific words and phrases, for example, if\nspecific commands are typically spoken by the user. This can also be used\nto add additional words to the vocabulary of the recognizer. See\n[usage limits](https://cloud.google.com/speech/limits#content).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "SpeechContext" + "id": "ListOperationsResponse" }, "SpeechRecognitionResult": { "description": "A speech recognition result corresponding to a portion of the audio.", @@ -91,19 +107,19 @@ "id": "RecognitionAudio" }, "LongRunningRecognizeRequest": { - "description": "The top-level message sent by the client for the `LongRunningRecognize`\nmethod.", - "type": "object", "properties": { "audio": { - "$ref": "RecognitionAudio", - "description": "*Required* The audio data to be recognized." + "description": "*Required* The audio data to be recognized.", + "$ref": "RecognitionAudio" }, "config": { "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request.", "$ref": "RecognitionConfig" } }, - "id": "LongRunningRecognizeRequest" + "id": "LongRunningRecognizeRequest", + "description": "The top-level message sent by the client for the `LongRunningRecognize`\nmethod.", + "type": "object" }, "RecognizeResponse": { "description": "The only message returned to the client by the `Recognize` method. It\ncontains the result as zero or more sequential `SpeechRecognitionResult`\nmessages.", @@ -120,13 +136,29 @@ "id": "RecognizeResponse" }, "CancelOperationRequest": { - "properties": {}, - "id": "CancelOperationRequest", "description": "The request message for Operations.CancelOperation.", - "type": "object" + "type": "object", + "properties": {}, + "id": "CancelOperationRequest" }, "Operation": { "properties": { + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object" + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, "response": { "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", @@ -138,22 +170,6 @@ "name": { "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", "type": "string" - }, - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "type": "object" - }, - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" } }, "id": "Operation", @@ -164,6 +180,10 @@ "description": "Provides information to the recognizer that specifies how to process the\nrequest.", "type": "object", "properties": { + "enableWordTimeOffsets": { + "description": "*Optional* If `true`, the top result includes a list of words and\nthe start and end time offsets (timestamps) for those words. If\n`false`, no word-level time offset information is returned. The default is\n`false`.", + "type": "boolean" + }, "maxAlternatives": { "format": "int32", "description": "*Optional* Maximum number of recognition hypotheses to be returned.\nSpecifically, the maximum number of `SpeechRecognitionAlternative` messages\nwithin each `SpeechRecognitionResult`.\nThe server may return fewer than `max_alternatives`.\nValid values are `0`-`30`. A value of `0` or `1` will return a maximum of\none. If omitted, will return a maximum of one.", @@ -173,24 +193,11 @@ "description": "*Required* The language of the supplied audio as a\n[BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.\nExample: \"en-US\".\nSee [Language Support](https://cloud.google.com/speech/docs/languages)\nfor a list of the currently supported language codes.", "type": "string" }, - "speechContexts": { - "description": "*Optional* A means to provide context to assist the speech recognition.", - "items": { - "$ref": "SpeechContext" - }, - "type": "array" + "profanityFilter": { + "description": "*Optional* If set to `true`, the server will attempt to filter out\nprofanities, replacing all but the initial character in each filtered word\nwith asterisks, e.g. \"f***\". If set to `false` or omitted, profanities\nwon't be filtered out.", + "type": "boolean" }, "encoding": { - "enumDescriptions": [ - "Not specified. Will return result google.rpc.Code.INVALID_ARGUMENT.", - "Uncompressed 16-bit signed little-endian samples (Linear PCM).", - "[`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio\nCodec) is the recommended encoding because it is\nlossless--therefore recognition is not compromised--and\nrequires only about half the bandwidth of `LINEAR16`. `FLAC` stream\nencoding supports 16-bit and 24-bit samples, however, not all fields in\n`STREAMINFO` are supported.", - "8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.", - "Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.", - "Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.", - "Opus encoded audio frames in Ogg container\n([OggOpus](https://wiki.xiph.org/OggOpus)).\n`sample_rate_hertz` must be 16000.", - "Although the use of lossy encodings is not recommended, if a very low\nbitrate encoding is required, `OGG_OPUS` is highly preferred over\nSpeex encoding. The [Speex](https://speex.org/) encoding supported by\nCloud Speech API has a header byte in each block, as in MIME type\n`audio/x-speex-with-header-byte`.\nIt is a variant of the RTP Speex encoding defined in\n[RFC 5574](https://tools.ietf.org/html/rfc5574).\nThe stream is a sequence of blocks, one block per RTP packet. Each block\nstarts with a byte containing the length of the block, in bytes, followed\nby one or more frames of Speex data, padded to an integral number of\nbytes (octets) as specified in RFC 5574. In other words, each RTP header\nis replaced with a single byte containing the block length. Only Speex\nwideband is supported. `sample_rate_hertz` must be 16000." - ], "enum": [ "ENCODING_UNSPECIFIED", "LINEAR16", @@ -202,31 +209,37 @@ "SPEEX_WITH_HEADER_BYTE" ], "description": "*Required* Encoding of audio data sent in all `RecognitionAudio` messages.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Not specified. Will return result google.rpc.Code.INVALID_ARGUMENT.", + "Uncompressed 16-bit signed little-endian samples (Linear PCM).", + "[`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio\nCodec) is the recommended encoding because it is\nlossless--therefore recognition is not compromised--and\nrequires only about half the bandwidth of `LINEAR16`. `FLAC` stream\nencoding supports 16-bit and 24-bit samples, however, not all fields in\n`STREAMINFO` are supported.", + "8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.", + "Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.", + "Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.", + "Opus encoded audio frames in Ogg container\n([OggOpus](https://wiki.xiph.org/OggOpus)).\n`sample_rate_hertz` must be 16000.", + "Although the use of lossy encodings is not recommended, if a very low\nbitrate encoding is required, `OGG_OPUS` is highly preferred over\nSpeex encoding. The [Speex](https://speex.org/) encoding supported by\nCloud Speech API has a header byte in each block, as in MIME type\n`audio/x-speex-with-header-byte`.\nIt is a variant of the RTP Speex encoding defined in\n[RFC 5574](https://tools.ietf.org/html/rfc5574).\nThe stream is a sequence of blocks, one block per RTP packet. Each block\nstarts with a byte containing the length of the block, in bytes, followed\nby one or more frames of Speex data, padded to an integral number of\nbytes (octets) as specified in RFC 5574. In other words, each RTP header\nis replaced with a single byte containing the block length. Only Speex\nwideband is supported. `sample_rate_hertz` must be 16000." + ] }, - "profanityFilter": { - "description": "*Optional* If set to `true`, the server will attempt to filter out\nprofanities, replacing all but the initial character in each filtered word\nwith asterisks, e.g. \"f***\". If set to `false` or omitted, profanities\nwon't be filtered out.", - "type": "boolean" + "speechContexts": { + "description": "*Optional* A means to provide context to assist the speech recognition.", + "items": { + "$ref": "SpeechContext" + }, + "type": "array" }, "sampleRateHertz": { "format": "int32", "description": "*Required* Sample rate in Hertz of the audio data sent in all\n`RecognitionAudio` messages. Valid values are: 8000-48000.\n16000 is optimal. For best results, set the sampling rate of the audio\nsource to 16000 Hz. If that's not possible, use the native sample rate of\nthe audio source (instead of re-sampling).", "type": "integer" - }, - "enableWordTimeOffsets": { - "description": "*Optional* If `true`, the top result includes a list of words and\nthe start and end time offsets (timestamps) for those words. If\n`false`, no word-level time offset information is returned. The default is\n`false`.", - "type": "boolean" } }, "id": "RecognitionConfig" }, "WordInfo": { + "description": "Word-specific information for recognized words. Word information is only\nincluded in the response when certain request parameters are set, such\nas `enable_word_time_offsets`.", + "type": "object", "properties": { - "startTime": { - "format": "google-duration", - "description": "*Output-only* Time offset relative to the beginning of the audio,\nand corresponding to the start of the spoken word.\nThis field is only set if `enable_word_time_offsets=true` and only\nin the top hypothesis.\nThis is an experimental feature and the accuracy of the time offset can\nvary.", - "type": "string" - }, "word": { "description": "*Output-only* The word corresponding to this set of information.", "type": "string" @@ -235,13 +248,18 @@ "format": "google-duration", "description": "*Output-only* Time offset relative to the beginning of the audio,\nand corresponding to the end of the spoken word.\nThis field is only set if `enable_word_time_offsets=true` and only\nin the top hypothesis.\nThis is an experimental feature and the accuracy of the time offset can\nvary.", "type": "string" + }, + "startTime": { + "format": "google-duration", + "description": "*Output-only* Time offset relative to the beginning of the audio,\nand corresponding to the start of the spoken word.\nThis field is only set if `enable_word_time_offsets=true` and only\nin the top hypothesis.\nThis is an experimental feature and the accuracy of the time offset can\nvary.", + "type": "string" } }, - "id": "WordInfo", - "description": "Word-specific information for recognized words. Word information is only\nincluded in the response when certain request parameters are set, such\nas `enable_word_time_offsets`.", - "type": "object" + "id": "WordInfo" }, "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", "properties": { "message": { "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", @@ -264,30 +282,13 @@ "type": "integer" } }, - "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object" + "id": "Status" }, "Empty": { "properties": {}, "id": "Empty", "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "type": "object" - }, - "RecognizeRequest": { - "properties": { - "audio": { - "description": "*Required* The audio data to be recognized.", - "$ref": "RecognitionAudio" - }, - "config": { - "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request.", - "$ref": "RecognitionConfig" - } - }, - "id": "RecognizeRequest", - "description": "The top-level message sent by the client for the `Recognize` method.", - "type": "object" } }, "icons": { @@ -312,101 +313,8 @@ "title": "Google Cloud Speech API", "ownerName": "Google", "resources": { - "speech": { - "methods": { - "longrunningrecognize": { - "description": "Performs asynchronous speech recognition: receive results via the\ngoogle.longrunning.Operations interface. Returns either an\n`Operation.error` or an `Operation.response` which contains\na `LongRunningRecognizeResponse` message.", - "request": { - "$ref": "LongRunningRecognizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/speech:longrunningrecognize", - "id": "speech.speech.longrunningrecognize", - "path": "v1/speech:longrunningrecognize" - }, - "recognize": { - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "RecognizeResponse" - }, - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/speech:recognize", - "path": "v1/speech:recognize", - "id": "speech.speech.recognize", - "description": "Performs synchronous speech recognition: receive results after all audio\nhas been sent and processed.", - "request": { - "$ref": "RecognizeRequest" - } - } - } - }, "operations": { "methods": { - "cancel": { - "path": "v1/operations/{+name}:cancel", - "id": "speech.operations.cancel", - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", - "request": { - "$ref": "CancelOperationRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "type": "string", - "required": true, - "pattern": "^[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/operations/{operationsId}:cancel" - }, - "delete": { - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^[^/]+$", - "location": "path", - "description": "The name of the operation resource to be deleted.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/operations/{operationsId}", - "path": "v1/operations/{+name}", - "id": "speech.operations.delete", - "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`." - }, "get": { "response": { "$ref": "Operation" @@ -433,15 +341,24 @@ "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." }, "list": { - "id": "speech.operations.list", - "path": "v1/operations", "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + "httpMethod": "GET", + "parameterOrder": [], "response": { "$ref": "ListOperationsResponse" }, - "httpMethod": "GET", - "parameterOrder": [], "parameters": { + "pageSize": { + "format": "int32", + "description": "The standard list page size.", + "type": "integer", + "location": "query" + }, + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, "pageToken": { "location": "query", "description": "The standard list page token.", @@ -451,71 +368,141 @@ "location": "query", "description": "The name of the operation's parent resource.", "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - }, - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1/operations" + "flatPath": "v1/operations", + "path": "v1/operations", + "id": "speech.operations.list" + }, + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "pattern": "^[^/]+$", + "location": "path", + "description": "The name of the operation resource to be cancelled.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/operations/{operationsId}:cancel", + "id": "speech.operations.cancel", + "path": "v1/operations/{+name}:cancel" + }, + "delete": { + "flatPath": "v1/operations/{operationsId}", + "id": "speech.operations.delete", + "path": "v1/operations/{+name}", + "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "parameters": { + "name": { + "pattern": "^[^/]+$", + "location": "path", + "description": "The name of the operation resource to be deleted.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "speech": { + "methods": { + "longrunningrecognize": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1/speech:longrunningrecognize", + "path": "v1/speech:longrunningrecognize", + "id": "speech.speech.longrunningrecognize", + "request": { + "$ref": "LongRunningRecognizeRequest" + }, + "description": "Performs asynchronous speech recognition: receive results via the\ngoogle.longrunning.Operations interface. Returns either an\n`Operation.error` or an `Operation.response` which contains\na `LongRunningRecognizeResponse` message." + }, + "recognize": { + "description": "Performs synchronous speech recognition: receive results after all audio\nhas been sent and processed.", + "request": { + "$ref": "RecognizeRequest" + }, + "response": { + "$ref": "RecognizeResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/speech:recognize", + "id": "speech.speech.recognize", + "path": "v1/speech:recognize" } } } }, "parameters": { - "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.", + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" }, - "pp": { - "description": "Pretty-print response.", + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", "default": "true", "type": "boolean", "location": "query" }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, "fields": { + "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" + "type": "string" }, "uploadType": { "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, "$.xgafv": { + "description": "V1 error format.", + "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -524,22 +511,9 @@ "enum": [ "1", "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" + ] }, "alt": { - "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", "description": "Data format for response.", "default": "json", "enum": [ @@ -547,23 +521,49 @@ "media", "proto" ], - "type": "string" - }, - "access_token": { - "description": "OAuth access token.", "type": "string", + "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" }, "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.", "type": "string", "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" } }, "version": "v1", "baseUrl": "https://speech.googleapis.com/", - "servicePath": "", - "kind": "discovery#restDescription", "description": "Converts audio to text by applying powerful neural network models.", - "basePath": "" + "kind": "discovery#restDescription", + "servicePath": "" } diff --git a/vendor/google.golang.org/api/speech/v1/speech-gen.go b/vendor/google.golang.org/api/speech/v1/speech-gen.go index 9ec1c926b..aa15c73bc 100644 --- a/vendor/google.golang.org/api/speech/v1/speech-gen.go +++ b/vendor/google.golang.org/api/speech/v1/speech-gen.go @@ -197,8 +197,8 @@ func (s *LongRunningRecognizeRequest) MarshalJSON() ([]byte, error) { type Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` diff --git a/vendor/google.golang.org/api/speech/v1beta1/speech-api.json b/vendor/google.golang.org/api/speech/v1beta1/speech-api.json index 9f1f1aa0f..a570accd3 100644 --- a/vendor/google.golang.org/api/speech/v1beta1/speech-api.json +++ b/vendor/google.golang.org/api/speech/v1beta1/speech-api.json @@ -1,266 +1,27 @@ { - "resources": { - "operations": { - "methods": { - "cancel": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "type": "string", - "required": true, - "pattern": "^[^/]+$", - "location": "path" - } - }, - "flatPath": "v1beta1/operations/{operationsId}:cancel", - "id": "speech.operations.cancel", - "path": "v1beta1/operations/{+name}:cancel", - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`." - }, - "delete": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The name of the operation resource to be deleted.", - "type": "string", - "required": true, - "pattern": "^[^/]+$", - "location": "path" - } - }, - "flatPath": "v1beta1/operations/{operationsId}", - "id": "speech.operations.delete", - "path": "v1beta1/operations/{+name}", - "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`." - }, - "get": { - "id": "speech.operations.get", - "path": "v1beta1/operations/{+name}", - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The name of the operation resource.", - "type": "string", - "required": true, - "pattern": "^[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/operations/{operationsId}" - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", - "httpMethod": "GET", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [], - "parameters": { - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "name": { - "location": "query", - "description": "The name of the operation's parent resource.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "The standard list page size.", - "type": "integer", - "location": "query" - }, - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/operations", - "path": "v1beta1/operations", - "id": "speech.operations.list" - } - } - }, - "speech": { - "methods": { - "asyncrecognize": { - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {}, - "flatPath": "v1beta1/speech:asyncrecognize", - "path": "v1beta1/speech:asyncrecognize", - "id": "speech.speech.asyncrecognize", - "request": { - "$ref": "AsyncRecognizeRequest" - }, - "description": "Performs asynchronous speech recognition: receive results via the\n[google.longrunning.Operations]\n(/speech/reference/rest/v1beta1/operations#Operation)\ninterface. Returns either an\n`Operation.error` or an `Operation.response` which contains\nan `AsyncRecognizeResponse` message." - }, - "syncrecognize": { - "response": { - "$ref": "SyncRecognizeResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/speech:syncrecognize", - "id": "speech.speech.syncrecognize", - "path": "v1beta1/speech:syncrecognize", - "description": "Performs synchronous speech recognition: receive results after all audio\nhas been sent and processed.", - "request": { - "$ref": "SyncRecognizeRequest" - } - } - } - } - }, - "parameters": { - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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", - "description": "Data format for response.", - "default": "json" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "key": { - "location": "query", - "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.", - "type": "string" - }, - "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.", - "type": "string", - "location": "query" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - } - }, - "version": "v1beta1", - "baseUrl": "https://speech.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Converts audio to text by applying powerful neural network models.", - "servicePath": "", - "basePath": "", - "revision": "20170731", - "documentationLink": "https://cloud.google.com/speech/", - "id": "speech:v1beta1", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { "Operation": { "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, "response": { "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", @@ -272,27 +33,13 @@ "name": { "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", "type": "string" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "type": "object" - }, - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" } }, "id": "Operation" }, "RecognitionConfig": { + "description": "Provides information to the recognizer that specifies how to process the\nrequest.", + "type": "object", "properties": { "maxAlternatives": { "format": "int32", @@ -309,14 +56,6 @@ "type": "string" }, "encoding": { - "enum": [ - "ENCODING_UNSPECIFIED", - "LINEAR16", - "FLAC", - "MULAW", - "AMR", - "AMR_WB" - ], "description": "*Required* Encoding of audio data sent in all `RecognitionAudio` messages.", "type": "string", "enumDescriptions": [ @@ -326,6 +65,14 @@ "8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.", "Adaptive Multi-Rate Narrowband codec. `sample_rate` must be 8000 Hz.", "Adaptive Multi-Rate Wideband codec. `sample_rate` must be 16000 Hz." + ], + "enum": [ + "ENCODING_UNSPECIFIED", + "LINEAR16", + "FLAC", + "MULAW", + "AMR", + "AMR_WB" ] }, "profanityFilter": { @@ -337,49 +84,33 @@ "$ref": "SpeechContext" } }, - "id": "RecognitionConfig", - "description": "Provides information to the recognizer that specifies how to process the\nrequest.", - "type": "object" + "id": "RecognitionConfig" }, "SyncRecognizeRequest": { + "description": "The top-level message sent by the client for the `SyncRecognize` method.", + "type": "object", "properties": { "audio": { "description": "*Required* The audio data to be recognized.", "$ref": "RecognitionAudio" }, "config": { - "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request.", - "$ref": "RecognitionConfig" + "$ref": "RecognitionConfig", + "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request." } }, - "id": "SyncRecognizeRequest", - "description": "The top-level message sent by the client for the `SyncRecognize` method.", - "type": "object" - }, - "SyncRecognizeResponse": { - "properties": { - "results": { - "description": "*Output-only* Sequential list of transcription results corresponding to\nsequential portions of audio.", - "items": { - "$ref": "SpeechRecognitionResult" - }, - "type": "array" - } - }, - "id": "SyncRecognizeResponse", - "description": "The only message returned to the client by `SyncRecognize`. method. It\ncontains the result as zero or more sequential `SpeechRecognitionResult`\nmessages.", - "type": "object" + "id": "SyncRecognizeRequest" }, "Status": { "properties": { "details": { "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { + "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - }, - "type": "object" + } }, "type": "array" }, @@ -397,6 +128,20 @@ "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object" }, + "SyncRecognizeResponse": { + "description": "The only message returned to the client by `SyncRecognize`. method. It\ncontains the result as zero or more sequential `SpeechRecognitionResult`\nmessages.", + "type": "object", + "properties": { + "results": { + "description": "*Output-only* Sequential list of transcription results corresponding to\nsequential portions of audio.", + "items": { + "$ref": "SpeechRecognitionResult" + }, + "type": "array" + } + }, + "id": "SyncRecognizeResponse" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "type": "object", @@ -465,9 +210,22 @@ }, "id": "SpeechRecognitionResult" }, - "RecognitionAudio": { - "description": "Contains audio data in the encoding specified in the `RecognitionConfig`.\nEither `content` or `uri` must be supplied. Supplying both or neither\nreturns google.rpc.Code.INVALID_ARGUMENT. See\n[audio limits](https://cloud.google.com/speech/limits#content).", + "AsyncRecognizeRequest": { + "description": "The top-level message sent by the client for the `AsyncRecognize` method.", "type": "object", + "properties": { + "audio": { + "description": "*Required* The audio data to be recognized.", + "$ref": "RecognitionAudio" + }, + "config": { + "$ref": "RecognitionConfig", + "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request." + } + }, + "id": "AsyncRecognizeRequest" + }, + "RecognitionAudio": { "properties": { "content": { "format": "byte", @@ -479,29 +237,16 @@ "type": "string" } }, - "id": "RecognitionAudio" - }, - "AsyncRecognizeRequest": { - "properties": { - "audio": { - "description": "*Required* The audio data to be recognized.", - "$ref": "RecognitionAudio" - }, - "config": { - "$ref": "RecognitionConfig", - "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request." - } - }, - "id": "AsyncRecognizeRequest", - "description": "The top-level message sent by the client for the `AsyncRecognize` method.", + "id": "RecognitionAudio", + "description": "Contains audio data in the encoding specified in the `RecognitionConfig`.\nEither `content` or `uri` must be supplied. Supplying both or neither\nreturns google.rpc.Code.INVALID_ARGUMENT. See\n[audio limits](https://cloud.google.com/speech/limits#content).", "type": "object" } }, - "protocol": "rest", "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, + "protocol": "rest", "canonicalName": "Speech", "auth": { "oauth2": { @@ -517,5 +262,260 @@ "name": "speech", "batchPath": "batch", "title": "Google Cloud Speech API", - "ownerName": "Google" + "ownerName": "Google", + "resources": { + "operations": { + "methods": { + "get": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource.", + "type": "string", + "required": true, + "pattern": "^[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/operations/{operationsId}", + "id": "speech.operations.get", + "path": "v1beta1/operations/{+name}", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + "parameterOrder": [], + "response": { + "$ref": "ListOperationsResponse" + }, + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + } + }, + "flatPath": "v1beta1/operations", + "id": "speech.operations.list", + "path": "v1beta1/operations" + }, + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "type": "string", + "required": true, + "pattern": "^[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/operations/{operationsId}:cancel", + "id": "speech.operations.cancel", + "path": "v1beta1/operations/{+name}:cancel" + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "type": "string", + "required": true, + "pattern": "^[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/operations/{operationsId}", + "id": "speech.operations.delete", + "path": "v1beta1/operations/{+name}", + "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`." + } + } + }, + "speech": { + "methods": { + "syncrecognize": { + "description": "Performs synchronous speech recognition: receive results after all audio\nhas been sent and processed.", + "request": { + "$ref": "SyncRecognizeRequest" + }, + "response": { + "$ref": "SyncRecognizeResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/speech:syncrecognize", + "id": "speech.speech.syncrecognize", + "path": "v1beta1/speech:syncrecognize" + }, + "asyncrecognize": { + "request": { + "$ref": "AsyncRecognizeRequest" + }, + "description": "Performs asynchronous speech recognition: receive results via the\n[google.longrunning.Operations]\n(/speech/reference/rest/v1beta1/operations#Operation)\ninterface. Returns either an\n`Operation.error` or an `Operation.response` which contains\nan `AsyncRecognizeResponse` message.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1beta1/speech:asyncrecognize", + "path": "v1beta1/speech:asyncrecognize", + "id": "speech.speech.asyncrecognize" + } + } + } + }, + "parameters": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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", + "description": "Data format for response.", + "default": "json" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "key": { + "location": "query", + "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.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + } + }, + "version": "v1beta1", + "baseUrl": "https://speech.googleapis.com/", + "kind": "discovery#restDescription", + "description": "Converts audio to text by applying powerful neural network models.", + "servicePath": "", + "basePath": "", + "revision": "20170912", + "documentationLink": "https://cloud.google.com/speech/", + "id": "speech:v1beta1" } diff --git a/vendor/google.golang.org/api/speech/v1beta1/speech-gen.go b/vendor/google.golang.org/api/speech/v1beta1/speech-gen.go index 941f4373b..e5a30d144 100644 --- a/vendor/google.golang.org/api/speech/v1beta1/speech-gen.go +++ b/vendor/google.golang.org/api/speech/v1beta1/speech-gen.go @@ -191,8 +191,8 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { type Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` diff --git a/vendor/google.golang.org/api/sqladmin/v1beta3/sqladmin-api.json b/vendor/google.golang.org/api/sqladmin/v1beta3/sqladmin-api.json index 991738ed7..11473dad1 100644 --- a/vendor/google.golang.org/api/sqladmin/v1beta3/sqladmin-api.json +++ b/vendor/google.golang.org/api/sqladmin/v1beta3/sqladmin-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/49KRnzlsfCajyooOx9JRESIbzZg\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/lsRSA9rF-4KQu4xYN0id-kYxBtA\"", "discoveryVersion": "v1", "id": "sqladmin:v1beta3", "name": "sqladmin", "canonicalName": "SQL Admin", "version": "v1beta3", - "revision": "20170606", + "revision": "20170807", "title": "Cloud SQL Administration API", "description": "Creates and configures Cloud SQL instances, which provide fully-managed MySQL databases.", "ownerDomain": "google.com", @@ -783,7 +783,7 @@ }, "requireSsl": { "type": "boolean", - "description": "Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP." + "description": "Whether SSL connections over IP should be enforced or not." } } }, diff --git a/vendor/google.golang.org/api/sqladmin/v1beta3/sqladmin-gen.go b/vendor/google.golang.org/api/sqladmin/v1beta3/sqladmin-gen.go index 4c704dbfe..f54961b92 100644 --- a/vendor/google.golang.org/api/sqladmin/v1beta3/sqladmin-gen.go +++ b/vendor/google.golang.org/api/sqladmin/v1beta3/sqladmin-gen.go @@ -1341,8 +1341,8 @@ type IpConfiguration struct { // Kind: This is always sql#ipConfiguration. Kind string `json:"kind,omitempty"` - // RequireSsl: Whether the mysqld should default to 'REQUIRE X509' for - // users connecting over IP. + // RequireSsl: Whether SSL connections over IP should be enforced or + // not. RequireSsl bool `json:"requireSsl,omitempty"` // ForceSendFields is a list of field names (e.g. "AuthorizedNetworks") 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 b8fbc805e..fea9a5afd 100644 --- a/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-api.json +++ b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/XsY4JGYlYgyTyxbJioMS7bSip2s\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/odbYGRT1izLWfRhfVNwcTacV8sM\"", "discoveryVersion": "v1", "id": "sqladmin:v1beta4", "name": "sqladmin", "canonicalName": "SQL Admin", "version": "v1beta4", - "revision": "20170606", + "revision": "20170807", "title": "Cloud SQL Administration API", "description": "Creates and configures Cloud SQL instances, which provide fully-managed MySQL databases.", "ownerDomain": "google.com", @@ -344,7 +344,7 @@ }, "databaseVersion": { "type": "string", - "description": "The database engine type and version. The databaseVersion can not be changed after instance creation. Can be MYSQL_5_5, MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. MYSQL_5_7 is applicable only to Second Generation instances." + "description": "The database engine type and version. The databaseVersion field can not be changed after instance creation. MySQL Second Generation instances: MYSQL_5_7 (default) or MYSQL_5_6. PostgreSQL instances: POSTGRES_9_6 MySQL First Generation instances: MYSQL_5_6 (default) or MYSQL_5_5" }, "etag": { "type": "string", @@ -364,6 +364,10 @@ } } }, + "gceZone": { + "type": "string", + "description": "The GCE zone that the instance is serving from. In case when the instance is failed over to standby zone, this value may be different with what user specified in the settings." + }, "instanceType": { "type": "string", "description": "The instance type. This can be one of the following.\nCLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.\nON_PREMISES_INSTANCE: An instance running on the customer's premises.\nREAD_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica." @@ -649,7 +653,7 @@ }, "importUser": { "type": "string", - "description": "The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances." + "description": "The PostgreSQL user for this import operation. Defaults to cloudsqlsuperuser. Used only for PostgreSQL instances." }, "kind": { "type": "string", @@ -769,7 +773,7 @@ }, "requireSsl": { "type": "boolean", - "description": "Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP." + "description": "Whether SSL connections over IP should be enforced or not." } } }, 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 e41bfa268..248cae02a 100644 --- a/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go +++ b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go @@ -554,9 +554,10 @@ type DatabaseInstance struct { CurrentDiskSize int64 `json:"currentDiskSize,omitempty,string"` // DatabaseVersion: The database engine type and version. The - // databaseVersion can not be changed after instance creation. Can be - // MYSQL_5_5, MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. MYSQL_5_7 - // is applicable only to Second Generation instances. + // databaseVersion field can not be changed after instance creation. + // MySQL Second Generation instances: MYSQL_5_7 (default) or MYSQL_5_6. + // PostgreSQL instances: POSTGRES_9_6 MySQL First Generation instances: + // MYSQL_5_6 (default) or MYSQL_5_5 DatabaseVersion string `json:"databaseVersion,omitempty"` // Etag: HTTP 1.1 Entity tag for the resource. @@ -566,6 +567,11 @@ type DatabaseInstance struct { // property is applicable only to Second Generation instances. FailoverReplica *DatabaseInstanceFailoverReplica `json:"failoverReplica,omitempty"` + // GceZone: The GCE zone that the instance is serving from. In case when + // the instance is failed over to standby zone, this value may be + // different with what user specified in the settings. + GceZone string `json:"gceZone,omitempty"` + // InstanceType: The instance type. This can be one of the // following. // CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from @@ -1005,8 +1011,8 @@ type ImportContext struct { // CSV: The file contains CSV data. FileType string `json:"fileType,omitempty"` - // ImportUser: The PostgreSQL user to use for this import operation. - // Defaults to cloudsqlsuperuser. Does not apply to MySQL instances. + // ImportUser: The PostgreSQL user for this import operation. Defaults + // to cloudsqlsuperuser. Used only for PostgreSQL instances. ImportUser string `json:"importUser,omitempty"` // Kind: This is always sql#importContext. @@ -1299,8 +1305,8 @@ type IpConfiguration struct { // not. Ipv4Enabled bool `json:"ipv4Enabled,omitempty"` - // RequireSsl: Whether the mysqld should default to 'REQUIRE X509' for - // users connecting over IP. + // RequireSsl: Whether SSL connections over IP should be enforced or + // not. RequireSsl bool `json:"requireSsl,omitempty"` // ForceSendFields is a list of field names (e.g. "AuthorizedNetworks") 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 b025cc96b..e382532f1 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-api.json +++ b/vendor/google.golang.org/api/storage/v1/storage-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/-XlPsGE1eaKzlxWDtbwmuSaBoqc\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/dkoYxqfGO2jaG60VA5h0K8BOG4k\"", "discoveryVersion": "v1", "id": "storage:v1", "name": "storage", "version": "v1", - "revision": "20170607", + "revision": "20170824", "title": "Cloud Storage JSON API", "description": "Stores and retrieves potentially large, immutable data objects.", "ownerDomain": "google.com", @@ -687,7 +687,7 @@ }, "contentType": { "type": "string", - "description": "Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream." + "description": "Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream." }, "crc32c": { "type": "string", @@ -946,6 +946,9 @@ "items": { "type": "object", "properties": { + "condition": { + "type": "any" + }, "members": { "type": "array", "description": "A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: \n- allUsers — A special identifier that represents anyone on the internet; with or without a Google account. \n- allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account. \n- user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. \n- serviceAccount:emailid — An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . \n- group:emailid — An email address that represents a Google group. For example, group:admins@example.com. \n- domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. \n- projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project \n- projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project \n- projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project", @@ -990,7 +993,7 @@ }, "resourceId": { "type": "string", - "description": "The ID of the resource to which this policy belongs. Will be of the form buckets/bucket for buckets, and buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input." + "description": "The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, and projects/_/buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input." } } }, @@ -2176,7 +2179,7 @@ "parameters": { "bucket": { "type": "string", - "description": "Name of a GCS bucket.", + "description": "Name of a Google Cloud Storage bucket.", "required": true, "location": "path" }, @@ -2535,7 +2538,7 @@ }, "ifGenerationMatch": { "type": "string", - "description": "Makes the operation conditional on whether the object's current generation matches the given value.", + "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", "format": "int64", "location": "query" }, @@ -2615,13 +2618,13 @@ }, "ifGenerationMatch": { "type": "string", - "description": "Makes the operation conditional on whether the destination object's current generation matches the given value.", + "description": "Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", "format": "int64", "location": "query" }, "ifGenerationNotMatch": { "type": "string", - "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value.", + "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", "format": "int64", "location": "query" }, @@ -2639,13 +2642,13 @@ }, "ifSourceGenerationMatch": { "type": "string", - "description": "Makes the operation conditional on whether the source object's generation matches the given value.", + "description": "Makes the operation conditional on whether the source object's current generation matches the given value.", "format": "int64", "location": "query" }, "ifSourceGenerationNotMatch": { "type": "string", - "description": "Makes the operation conditional on whether the source object's generation does not match the given value.", + "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.", "format": "int64", "location": "query" }, @@ -2738,13 +2741,13 @@ }, "ifGenerationMatch": { "type": "string", - "description": "Makes the operation conditional on whether the object's current generation matches the given value.", + "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", "format": "int64", "location": "query" }, "ifGenerationNotMatch": { "type": "string", - "description": "Makes the operation conditional on whether the object's current generation does not match the given value.", + "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", "format": "int64", "location": "query" }, @@ -2802,13 +2805,13 @@ }, "ifGenerationMatch": { "type": "string", - "description": "Makes the operation conditional on whether the object's generation matches the given value.", + "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", "format": "int64", "location": "query" }, "ifGenerationNotMatch": { "type": "string", - "description": "Makes the operation conditional on whether the object's generation does not match the given value.", + "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", "format": "int64", "location": "query" }, @@ -2930,13 +2933,13 @@ }, "ifGenerationMatch": { "type": "string", - "description": "Makes the operation conditional on whether the object's current generation matches the given value.", + "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", "format": "int64", "location": "query" }, "ifGenerationNotMatch": { "type": "string", - "description": "Makes the operation conditional on whether the object's current generation does not match the given value.", + "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", "format": "int64", "location": "query" }, @@ -3113,7 +3116,7 @@ "id": "storage.objects.patch", "path": "b/{bucket}/o/{object}", "httpMethod": "PATCH", - "description": "Updates an object's metadata. This method supports patch semantics.", + "description": "Patches an object's metadata.", "parameters": { "bucket": { "type": "string", @@ -3129,13 +3132,13 @@ }, "ifGenerationMatch": { "type": "string", - "description": "Makes the operation conditional on whether the object's current generation matches the given value.", + "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", "format": "int64", "location": "query" }, "ifGenerationNotMatch": { "type": "string", - "description": "Makes the operation conditional on whether the object's current generation does not match the given value.", + "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", "format": "int64", "location": "query" }, @@ -3210,7 +3213,9 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" - ] + ], + "supportsMediaDownload": true, + "useMediaDownloadService": true }, "rewrite": { "id": "storage.objects.rewrite", @@ -3258,13 +3263,13 @@ }, "ifGenerationMatch": { "type": "string", - "description": "Makes the operation conditional on whether the destination object's current generation matches the given value.", + "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", "format": "int64", "location": "query" }, "ifGenerationNotMatch": { "type": "string", - "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value.", + "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", "format": "int64", "location": "query" }, @@ -3282,13 +3287,13 @@ }, "ifSourceGenerationMatch": { "type": "string", - "description": "Makes the operation conditional on whether the source object's generation matches the given value.", + "description": "Makes the operation conditional on whether the source object's current generation matches the given value.", "format": "int64", "location": "query" }, "ifSourceGenerationNotMatch": { "type": "string", - "description": "Makes the operation conditional on whether the source object's generation does not match the given value.", + "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.", "format": "int64", "location": "query" }, @@ -3489,13 +3494,13 @@ }, "ifGenerationMatch": { "type": "string", - "description": "Makes the operation conditional on whether the object's current generation matches the given value.", + "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", "format": "int64", "location": "query" }, "ifGenerationNotMatch": { "type": "string", - "description": "Makes the operation conditional on whether the object's current generation does not match the given value.", + "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", "format": "int64", "location": "query" }, @@ -3662,7 +3667,7 @@ "id": "storage.projects.serviceAccount.get", "path": "projects/{projectId}/serviceAccount", "httpMethod": "GET", - "description": "Get the email address of this project's GCS service account.", + "description": "Get the email address of this project's Google Cloud Storage service account.", "parameters": { "projectId": { "type": "string", 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 64860ab37..168f4edc2 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-gen.go +++ b/vendor/google.golang.org/api/storage/v1/storage-gen.go @@ -1168,9 +1168,8 @@ type Object struct { // ContentLanguage: Content-Language of the object data. ContentLanguage string `json:"contentLanguage,omitempty"` - // ContentType: Content-Type of the object data. If contentType is not - // specified, object downloads will be served as - // application/octet-stream. + // ContentType: Content-Type of the object data. If an object is stored + // without a Content-Type, it is served as application/octet-stream. ContentType string `json:"contentType,omitempty"` // Crc32c: CRC32c checksum, as described in RFC 4960, Appendix B; @@ -1556,10 +1555,11 @@ type Policy struct { Kind string `json:"kind,omitempty"` // ResourceId: The ID of the resource to which this policy belongs. Will - // be of the form buckets/bucket for buckets, and - // buckets/bucket/objects/object for objects. A specific generation may - // be specified by appending #generationNumber to the end of the object - // name, e.g. buckets/my-bucket/objects/data.txt#17. The current + // be of the form projects/_/buckets/bucket for buckets, and + // projects/_/buckets/bucket/objects/object for objects. A specific + // generation may be specified by appending #generationNumber to the end + // of the object name, e.g. + // projects/_/buckets/my-bucket/objects/data.txt#17. The current // generation can be denoted with #0. This field is ignored on input. ResourceId string `json:"resourceId,omitempty"` @@ -1591,6 +1591,8 @@ func (s *Policy) MarshalJSON() ([]byte, error) { } type PolicyBindings struct { + Condition interface{} `json:"condition,omitempty"` + // Members: A collection of identifiers for members who may assume the // provided role. Recognized identifiers are as follows: // - allUsers — A special identifier that represents anyone on the @@ -1648,7 +1650,7 @@ type PolicyBindings struct { // an ACL entry on a bucket with the OWNER role. Role string `json:"role,omitempty"` - // ForceSendFields is a list of field names (e.g. "Members") to + // 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 @@ -1656,7 +1658,7 @@ type PolicyBindings struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Members") to include in + // 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 @@ -6103,7 +6105,7 @@ func (c *NotificationsListCall) Do(opts ...googleapi.CallOption) (*Notifications // ], // "parameters": { // "bucket": { - // "description": "Name of a GCS bucket.", + // "description": "Name of a Google Cloud Storage bucket.", // "location": "path", // "required": true, // "type": "string" @@ -7207,7 +7209,8 @@ func (c *ObjectsComposeCall) DestinationPredefinedAcl(destinationPredefinedAcl s // IfGenerationMatch sets the optional parameter "ifGenerationMatch": // Makes the operation conditional on whether the object's current -// generation matches the given value. +// generation matches the given value. Setting to 0 makes the operation +// succeed only if there are no live versions of the object. func (c *ObjectsComposeCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsComposeCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c @@ -7383,7 +7386,7 @@ func (c *ObjectsComposeCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "type": "string" // }, // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current generation matches the given value.", + // "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", // "format": "int64", // "location": "query", // "type": "string" @@ -7472,7 +7475,8 @@ func (c *ObjectsCopyCall) DestinationPredefinedAcl(destinationPredefinedAcl stri // IfGenerationMatch sets the optional parameter "ifGenerationMatch": // Makes the operation conditional on whether the destination object's -// current generation matches the given value. +// current generation matches the given value. Setting to 0 makes the +// operation succeed only if there are no live versions of the object. func (c *ObjectsCopyCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsCopyCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c @@ -7481,7 +7485,9 @@ func (c *ObjectsCopyCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsCop // IfGenerationNotMatch sets the optional parameter // "ifGenerationNotMatch": Makes the operation conditional on whether // the destination object's current generation does not match the given -// value. +// value. If no live object exists, the precondition fails. Setting to 0 +// makes the operation succeed only if there is a live version of the +// object. func (c *ObjectsCopyCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsCopyCall { c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch)) return c @@ -7507,7 +7513,7 @@ func (c *ObjectsCopyCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int6 // IfSourceGenerationMatch sets the optional parameter // "ifSourceGenerationMatch": Makes the operation conditional on whether -// the source object's generation matches the given value. +// the source object's current generation matches the given value. func (c *ObjectsCopyCall) IfSourceGenerationMatch(ifSourceGenerationMatch int64) *ObjectsCopyCall { c.urlParams_.Set("ifSourceGenerationMatch", fmt.Sprint(ifSourceGenerationMatch)) return c @@ -7515,8 +7521,8 @@ func (c *ObjectsCopyCall) IfSourceGenerationMatch(ifSourceGenerationMatch int64) // IfSourceGenerationNotMatch sets the optional parameter // "ifSourceGenerationNotMatch": Makes the operation conditional on -// whether the source object's generation does not match the given -// value. +// whether the source object's current generation does not match the +// given value. func (c *ObjectsCopyCall) IfSourceGenerationNotMatch(ifSourceGenerationNotMatch int64) *ObjectsCopyCall { c.urlParams_.Set("ifSourceGenerationNotMatch", fmt.Sprint(ifSourceGenerationNotMatch)) return c @@ -7716,13 +7722,13 @@ func (c *ObjectsCopyCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "type": "string" // }, // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the destination object's current generation matches the given value.", + // "description": "Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", // "format": "int64", // "location": "query", // "type": "string" // }, // "ifGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value.", + // "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", // "format": "int64", // "location": "query", // "type": "string" @@ -7740,13 +7746,13 @@ func (c *ObjectsCopyCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "type": "string" // }, // "ifSourceGenerationMatch": { - // "description": "Makes the operation conditional on whether the source object's generation matches the given value.", + // "description": "Makes the operation conditional on whether the source object's current generation matches the given value.", // "format": "int64", // "location": "query", // "type": "string" // }, // "ifSourceGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the source object's generation does not match the given value.", + // "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.", // "format": "int64", // "location": "query", // "type": "string" @@ -7849,7 +7855,8 @@ func (c *ObjectsDeleteCall) Generation(generation int64) *ObjectsDeleteCall { // IfGenerationMatch sets the optional parameter "ifGenerationMatch": // Makes the operation conditional on whether the object's current -// generation matches the given value. +// generation matches the given value. Setting to 0 makes the operation +// succeed only if there are no live versions of the object. func (c *ObjectsDeleteCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsDeleteCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c @@ -7857,7 +7864,9 @@ func (c *ObjectsDeleteCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsD // IfGenerationNotMatch sets the optional parameter // "ifGenerationNotMatch": Makes the operation conditional on whether -// the object's current generation does not match the given value. +// the object's current generation does not match the given value. If no +// live object exists, the precondition fails. Setting to 0 makes the +// operation succeed only if there is a live version of the object. func (c *ObjectsDeleteCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsDeleteCall { c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch)) return c @@ -7965,13 +7974,13 @@ func (c *ObjectsDeleteCall) Do(opts ...googleapi.CallOption) error { // "type": "string" // }, // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current generation matches the given value.", + // "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", // "format": "int64", // "location": "query", // "type": "string" // }, // "ifGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's current generation does not match the given value.", + // "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", // "format": "int64", // "location": "query", // "type": "string" @@ -8039,8 +8048,9 @@ func (c *ObjectsGetCall) Generation(generation int64) *ObjectsGetCall { } // IfGenerationMatch sets the optional parameter "ifGenerationMatch": -// Makes the operation conditional on whether the object's generation -// matches the given value. +// Makes the operation conditional on whether the object's current +// generation matches the given value. Setting to 0 makes the operation +// succeed only if there are no live versions of the object. func (c *ObjectsGetCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsGetCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c @@ -8048,7 +8058,9 @@ func (c *ObjectsGetCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsGetC // IfGenerationNotMatch sets the optional parameter // "ifGenerationNotMatch": Makes the operation conditional on whether -// the object's generation does not match the given value. +// the object's current generation does not match the given value. If no +// live object exists, the precondition fails. Setting to 0 makes the +// operation succeed only if there is a live version of the object. func (c *ObjectsGetCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsGetCall { c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch)) return c @@ -8221,13 +8233,13 @@ func (c *ObjectsGetCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "type": "string" // }, // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the object's generation matches the given value.", + // "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", // "format": "int64", // "location": "query", // "type": "string" // }, // "ifGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's generation does not match the given value.", + // "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", // "format": "int64", // "location": "query", // "type": "string" @@ -8466,17 +8478,13 @@ func (c *ObjectsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, err // method id "storage.objects.insert": type ObjectsInsertCall struct { - s *Service - bucket string - object *Object - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + bucket string + object *Object + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Insert: Stores a new object and metadata. @@ -8500,7 +8508,8 @@ func (c *ObjectsInsertCall) ContentEncoding(contentEncoding string) *ObjectsInse // IfGenerationMatch sets the optional parameter "ifGenerationMatch": // Makes the operation conditional on whether the object's current -// generation matches the given value. +// generation matches the given value. Setting to 0 makes the operation +// succeed only if there are no live versions of the object. func (c *ObjectsInsertCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsInsertCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c @@ -8508,7 +8517,9 @@ func (c *ObjectsInsertCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsI // IfGenerationNotMatch sets the optional parameter // "ifGenerationNotMatch": Makes the operation conditional on whether -// the object's current generation does not match the given value. +// the object's current generation does not match the given value. If no +// live object exists, the precondition fails. Setting to 0 makes the +// operation succeed only if there is a live version of the object. func (c *ObjectsInsertCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsInsertCall { c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch)) return c @@ -8601,12 +8612,7 @@ func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) if ct := c.object.ContentType; ct != "" { options = append([]googleapi.MediaOption{googleapi.ContentType(ct)}, options...) } - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -8621,11 +8627,7 @@ func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) // supersede any context previously provided to the Context method. func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ObjectsInsertCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -8634,7 +8636,7 @@ func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, s // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *ObjectsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ObjectsInsertCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -8679,27 +8681,16 @@ func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -8735,20 +8726,10 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -8808,13 +8789,13 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "type": "string" // }, // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current generation matches the given value.", + // "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", // "format": "int64", // "location": "query", // "type": "string" // }, // "ifGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's current generation does not match the given value.", + // "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", // "format": "int64", // "location": "query", // "type": "string" @@ -9183,8 +9164,7 @@ type ObjectsPatchCall struct { header_ http.Header } -// Patch: Updates an object's metadata. This method supports patch -// semantics. +// Patch: Patches an object's metadata. func (r *ObjectsService) Patch(bucket string, object string, object2 *Object) *ObjectsPatchCall { c := &ObjectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.bucket = bucket @@ -9203,7 +9183,8 @@ func (c *ObjectsPatchCall) Generation(generation int64) *ObjectsPatchCall { // IfGenerationMatch sets the optional parameter "ifGenerationMatch": // Makes the operation conditional on whether the object's current -// generation matches the given value. +// generation matches the given value. Setting to 0 makes the operation +// succeed only if there are no live versions of the object. func (c *ObjectsPatchCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsPatchCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c @@ -9211,7 +9192,9 @@ func (c *ObjectsPatchCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsPa // IfGenerationNotMatch sets the optional parameter // "ifGenerationNotMatch": Makes the operation conditional on whether -// the object's current generation does not match the given value. +// the object's current generation does not match the given value. If no +// live object exists, the precondition fails. Setting to 0 makes the +// operation succeed only if there is a live version of the object. func (c *ObjectsPatchCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsPatchCall { c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch)) return c @@ -9280,9 +9263,9 @@ func (c *ObjectsPatchCall) Fields(s ...googleapi.Field) *ObjectsPatchCall { 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. +// Context sets the context to be used in this call's Do and Download +// methods. Any pending HTTP request will be aborted if the provided +// context is canceled. func (c *ObjectsPatchCall) Context(ctx context.Context) *ObjectsPatchCall { c.ctx_ = ctx return c @@ -9321,6 +9304,22 @@ func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } +// Download fetches the API endpoint's "media" value, instead of the normal +// API response value. If the returned error is nil, the Response is guaranteed to +// have a 2xx status code. Callers must close the Response.Body as usual. +func (c *ObjectsPatchCall) Download(opts ...googleapi.CallOption) (*http.Response, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("media") + if err != nil { + return nil, err + } + if err := googleapi.CheckMediaResponse(res); err != nil { + res.Body.Close() + return nil, err + } + return res, nil +} + // Do executes the "storage.objects.patch" call. // Exactly one of *Object or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either @@ -9359,7 +9358,7 @@ func (c *ObjectsPatchCall) Do(opts ...googleapi.CallOption) (*Object, error) { } return ret, nil // { - // "description": "Updates an object's metadata. This method supports patch semantics.", + // "description": "Patches an object's metadata.", // "httpMethod": "PATCH", // "id": "storage.objects.patch", // "parameterOrder": [ @@ -9380,13 +9379,13 @@ func (c *ObjectsPatchCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "type": "string" // }, // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current generation matches the given value.", + // "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", // "format": "int64", // "location": "query", // "type": "string" // }, // "ifGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's current generation does not match the given value.", + // "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", // "format": "int64", // "location": "query", // "type": "string" @@ -9459,7 +9458,9 @@ func (c *ObjectsPatchCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", // "https://www.googleapis.com/auth/devstorage.full_control" - // ] + // ], + // "supportsMediaDownload": true, + // "useMediaDownloadService": true // } } @@ -9523,8 +9524,9 @@ func (c *ObjectsRewriteCall) DestinationPredefinedAcl(destinationPredefinedAcl s } // IfGenerationMatch sets the optional parameter "ifGenerationMatch": -// Makes the operation conditional on whether the destination object's -// current generation matches the given value. +// Makes the operation conditional on whether the object's current +// generation matches the given value. Setting to 0 makes the operation +// succeed only if there are no live versions of the object. func (c *ObjectsRewriteCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsRewriteCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c @@ -9532,8 +9534,9 @@ func (c *ObjectsRewriteCall) IfGenerationMatch(ifGenerationMatch int64) *Objects // IfGenerationNotMatch sets the optional parameter // "ifGenerationNotMatch": Makes the operation conditional on whether -// the destination object's current generation does not match the given -// value. +// the object's current generation does not match the given value. If no +// live object exists, the precondition fails. Setting to 0 makes the +// operation succeed only if there is a live version of the object. func (c *ObjectsRewriteCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsRewriteCall { c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch)) return c @@ -9559,7 +9562,7 @@ func (c *ObjectsRewriteCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch i // IfSourceGenerationMatch sets the optional parameter // "ifSourceGenerationMatch": Makes the operation conditional on whether -// the source object's generation matches the given value. +// the source object's current generation matches the given value. func (c *ObjectsRewriteCall) IfSourceGenerationMatch(ifSourceGenerationMatch int64) *ObjectsRewriteCall { c.urlParams_.Set("ifSourceGenerationMatch", fmt.Sprint(ifSourceGenerationMatch)) return c @@ -9567,8 +9570,8 @@ func (c *ObjectsRewriteCall) IfSourceGenerationMatch(ifSourceGenerationMatch int // IfSourceGenerationNotMatch sets the optional parameter // "ifSourceGenerationNotMatch": Makes the operation conditional on -// whether the source object's generation does not match the given -// value. +// whether the source object's current generation does not match the +// given value. func (c *ObjectsRewriteCall) IfSourceGenerationNotMatch(ifSourceGenerationNotMatch int64) *ObjectsRewriteCall { c.urlParams_.Set("ifSourceGenerationNotMatch", fmt.Sprint(ifSourceGenerationNotMatch)) return c @@ -9782,13 +9785,13 @@ func (c *ObjectsRewriteCall) Do(opts ...googleapi.CallOption) (*RewriteResponse, // "type": "string" // }, // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the destination object's current generation matches the given value.", + // "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", // "format": "int64", // "location": "query", // "type": "string" // }, // "ifGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value.", + // "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", // "format": "int64", // "location": "query", // "type": "string" @@ -9806,13 +9809,13 @@ func (c *ObjectsRewriteCall) Do(opts ...googleapi.CallOption) (*RewriteResponse, // "type": "string" // }, // "ifSourceGenerationMatch": { - // "description": "Makes the operation conditional on whether the source object's generation matches the given value.", + // "description": "Makes the operation conditional on whether the source object's current generation matches the given value.", // "format": "int64", // "location": "query", // "type": "string" // }, // "ifSourceGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the source object's generation does not match the given value.", + // "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.", // "format": "int64", // "location": "query", // "type": "string" @@ -10282,7 +10285,8 @@ func (c *ObjectsUpdateCall) Generation(generation int64) *ObjectsUpdateCall { // IfGenerationMatch sets the optional parameter "ifGenerationMatch": // Makes the operation conditional on whether the object's current -// generation matches the given value. +// generation matches the given value. Setting to 0 makes the operation +// succeed only if there are no live versions of the object. func (c *ObjectsUpdateCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsUpdateCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c @@ -10290,7 +10294,9 @@ func (c *ObjectsUpdateCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsU // IfGenerationNotMatch sets the optional parameter // "ifGenerationNotMatch": Makes the operation conditional on whether -// the object's current generation does not match the given value. +// the object's current generation does not match the given value. If no +// live object exists, the precondition fails. Setting to 0 makes the +// operation succeed only if there is a live version of the object. func (c *ObjectsUpdateCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsUpdateCall { c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch)) return c @@ -10475,13 +10481,13 @@ func (c *ObjectsUpdateCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "type": "string" // }, // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current generation matches the given value.", + // "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", // "format": "int64", // "location": "query", // "type": "string" // }, // "ifGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's current generation does not match the given value.", + // "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", // "format": "int64", // "location": "query", // "type": "string" @@ -10819,7 +10825,8 @@ type ProjectsServiceAccountGetCall struct { header_ http.Header } -// Get: Get the email address of this project's GCS service account. +// Get: Get the email address of this project's Google Cloud Storage +// service account. func (r *ProjectsServiceAccountService) Get(projectId string) *ProjectsServiceAccountGetCall { c := &ProjectsServiceAccountGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -10920,7 +10927,7 @@ func (c *ProjectsServiceAccountGetCall) Do(opts ...googleapi.CallOption) (*Servi } return ret, nil // { - // "description": "Get the email address of this project's GCS service account.", + // "description": "Get the email address of this project's Google Cloud Storage service account.", // "httpMethod": "GET", // "id": "storage.projects.serviceAccount.get", // "parameterOrder": [ diff --git a/vendor/google.golang.org/api/storage/v1beta1/storage-api.json b/vendor/google.golang.org/api/storage/v1beta1/storage-api.json index 0e1f51e53..7adefa937 100644 --- a/vendor/google.golang.org/api/storage/v1beta1/storage-api.json +++ b/vendor/google.golang.org/api/storage/v1beta1/storage-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/wVmEVFf4wXjiNgtW0Pw6QJgdrGk\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/bcRJYHI3-5nsBo04628_tSK-f84\"", "discoveryVersion": "v1", "id": "storage:v1beta1", "name": "storage", "version": "v1beta1", - "revision": "20170510", + "revision": "20170830", "title": "Cloud Storage JSON API", "description": "Lets you store and retrieve potentially-large, immutable data objects.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/storage/v1beta1/storage-gen.go b/vendor/google.golang.org/api/storage/v1beta1/storage-gen.go index d5467f946..a00af8a58 100644 --- a/vendor/google.golang.org/api/storage/v1beta1/storage-gen.go +++ b/vendor/google.golang.org/api/storage/v1beta1/storage-gen.go @@ -3624,17 +3624,13 @@ func (c *ObjectsGetCall) Do(opts ...googleapi.CallOption) (*Object, error) { // method id "storage.objects.insert": type ObjectsInsertCall struct { - s *Service - bucket string - object *Object - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + bucket string + object *Object + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Insert: Stores new data blobs and associated metadata. @@ -3674,12 +3670,7 @@ func (c *ObjectsInsertCall) Projection(projection string) *ObjectsInsertCall { // supplied. // At most one of Media and ResumableMedia may be set. func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *ObjectsInsertCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -3694,11 +3685,7 @@ func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) // supersede any context previously provided to the Context method. func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ObjectsInsertCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -3707,7 +3694,7 @@ func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, s // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *ObjectsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ObjectsInsertCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -3752,27 +3739,16 @@ func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -3808,20 +3784,10 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() diff --git a/vendor/google.golang.org/api/storage/v1beta2/storage-api.json b/vendor/google.golang.org/api/storage/v1beta2/storage-api.json index 4970baa1b..756616bdd 100644 --- a/vendor/google.golang.org/api/storage/v1beta2/storage-api.json +++ b/vendor/google.golang.org/api/storage/v1beta2/storage-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/SKlmkaW_3NYm4HYEgVwULKXigs8\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/-kx4VTo0WtGqkEZqxSfkCE_3vyg\"", "discoveryVersion": "v1", "id": "storage:v1beta2", "name": "storage", "version": "v1beta2", - "revision": "20170510", + "revision": "20170830", "title": "Cloud Storage JSON API", "description": "Lets you store and retrieve potentially-large, immutable data objects.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/storage/v1beta2/storage-gen.go b/vendor/google.golang.org/api/storage/v1beta2/storage-gen.go index 320e681af..21cff32eb 100644 --- a/vendor/google.golang.org/api/storage/v1beta2/storage-gen.go +++ b/vendor/google.golang.org/api/storage/v1beta2/storage-gen.go @@ -5901,17 +5901,13 @@ func (c *ObjectsGetCall) Do(opts ...googleapi.CallOption) (*Object, error) { // method id "storage.objects.insert": type ObjectsInsertCall struct { - s *Service - bucket string - object *Object - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + bucket string + object *Object + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Insert: Stores new data blobs and associated metadata. @@ -5987,12 +5983,7 @@ func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) if ct := c.object.ContentType; ct != "" { options = append([]googleapi.MediaOption{googleapi.ContentType(ct)}, options...) } - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -6007,11 +5998,7 @@ func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) // supersede any context previously provided to the Context method. func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ObjectsInsertCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -6020,7 +6007,7 @@ func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, s // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *ObjectsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ObjectsInsertCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -6065,27 +6052,16 @@ func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -6121,20 +6097,10 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() diff --git a/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-api.json b/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-api.json index d6acaaf08..a4fd137e1 100644 --- a/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-api.json +++ b/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-api.json @@ -1,4 +1,11 @@ { + "basePath": "", + "ownerDomain": "google.com", + "name": "storagetransfer", + "batchPath": "batch", + "revision": "20170907", + "documentationLink": "https://cloud.google.com/storage/transfer", + "id": "storagetransfer:v1", "title": "Google Storage Transfer API", "discoveryVersion": "v1", "ownerName": "Google", @@ -7,160 +14,48 @@ "googleServiceAccounts": { "methods": { "get": { - "flatPath": "v1/googleServiceAccounts/{projectId}", - "path": "v1/googleServiceAccounts/{projectId}", - "id": "storagetransfer.googleServiceAccounts.get", - "description": "Returns the Google service account that is used by Storage Transfer\nService to access buckets in the project where transfers\nrun or in other projects. Each Google service account is associated\nwith one Google Cloud Platform Console project. Users\nshould add this service account to the Google Cloud Storage bucket\nACLs to grant access to Storage Transfer Service. This service\naccount is created and owned by Storage Transfer Service and can\nonly be used by Storage Transfer Service.", - "httpMethod": "GET", - "parameterOrder": [ - "projectId" - ], "response": { "$ref": "GoogleServiceAccount" }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "GET", "parameters": { "projectId": { + "location": "path", "description": "The ID of the Google Cloud Platform Console project that the Google service\naccount is associated with.\nRequired.", "type": "string", - "required": true, - "location": "path" + "required": true } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" - ] + ], + "flatPath": "v1/googleServiceAccounts/{projectId}", + "id": "storagetransfer.googleServiceAccounts.get", + "path": "v1/googleServiceAccounts/{projectId}", + "description": "Returns the Google service account that is used by Storage Transfer\nService to access buckets in the project where transfers\nrun or in other projects. Each Google service account is associated\nwith one Google Cloud Platform Console project. Users\nshould add this service account to the Google Cloud Storage bucket\nACLs to grant access to Storage Transfer Service. This service\naccount is created and owned by Storage Transfer Service and can\nonly be used by Storage Transfer Service." } } }, "transferOperations": { "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^transferOperations/.+$", - "location": "path", - "description": "The name of the operation resource." - } - }, - "flatPath": "v1/transferOperations/{transferOperationsId}", - "id": "storagetransfer.transferOperations.get", - "path": "v1/{+name}" - }, - "pause": { - "id": "storagetransfer.transferOperations.pause", - "path": "v1/{+name}:pause", - "description": "Pauses a transfer operation.", - "request": { - "$ref": "PauseTransferOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "pattern": "^transferOperations/.+$", - "location": "path", - "description": "The name of the transfer operation.\nRequired.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/transferOperations/{transferOperationsId}:pause" - }, - "delete": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^transferOperations/.+$", - "location": "path", - "description": "The name of the operation resource to be deleted.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/transferOperations/{transferOperationsId}", - "path": "v1/{+name}", - "id": "storagetransfer.transferOperations.delete", - "description": "This method is not supported and the server returns `UNIMPLEMENTED`.", - "httpMethod": "DELETE", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - } - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "pageToken": { - "description": "The list page token.", - "type": "string", - "location": "query" - }, - "name": { - "location": "path", - "description": "The value `transferOperations`.", - "type": "string", - "required": true, - "pattern": "^transferOperations$" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The list page size. The max allowed value is 256.", - "type": "integer" - }, - "filter": { - "description": "A list of query parameters specified as JSON text in the form of {\\\"project_id\\\" : \\\"my_project_id\\\", \\\"job_names\\\" : [\\\"jobid1\\\", \\\"jobid2\\\",...], \\\"operation_names\\\" : [\\\"opid1\\\", \\\"opid2\\\",...], \\\"transfer_statuses\\\":[\\\"status1\\\", \\\"status2\\\",...]}. Since `job_names`, `operation_names`, and `transfer_statuses` support multiple values, they must be specified with array notation. `job_names`, `operation_names`, and `transfer_statuses` are optional.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1/transferOperations", - "id": "storagetransfer.transferOperations.list", - "path": "v1/{+name}" - }, "resume": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, "parameters": { "name": { - "location": "path", "description": "The name of the transfer operation.\nRequired.", "type": "string", "required": true, - "pattern": "^transferOperations/.+$" + "pattern": "^transferOperations/.+$", + "location": "path" } }, "scopes": [ @@ -172,13 +67,6 @@ "description": "Resumes a transfer operation that is paused.", "request": { "$ref": "ResumeTransferOperationRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" } }, "cancel": { @@ -195,73 +83,186 @@ ], "parameters": { "name": { + "location": "path", "description": "The name of the operation resource to be cancelled.", "type": "string", "required": true, + "pattern": "^transferOperations/.+$" + } + }, + "flatPath": "v1/transferOperations/{transferOperationsId}:cancel", + "id": "storagetransfer.transferOperations.cancel", + "path": "v1/{+name}:cancel" + }, + "get": { + "flatPath": "v1/transferOperations/{transferOperationsId}", + "id": "storagetransfer.transferOperations.get", + "path": "v1/{+name}", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^transferOperations/.+$", + "location": "path", + "description": "The name of the operation resource.", + "type": "string", + "required": true + } + } + }, + "pause": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "description": "The name of the transfer operation.\nRequired.", + "type": "string", + "required": true, "pattern": "^transferOperations/.+$", "location": "path" } }, - "flatPath": "v1/transferOperations/{transferOperationsId}:cancel", - "id": "storagetransfer.transferOperations.cancel", - "path": "v1/{+name}:cancel" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/transferOperations/{transferOperationsId}:pause", + "id": "storagetransfer.transferOperations.pause", + "path": "v1/{+name}:pause", + "description": "Pauses a transfer operation.", + "request": { + "$ref": "PauseTransferOperationRequest" + } + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource to be deleted.", + "type": "string", + "required": true, + "pattern": "^transferOperations/.+$" + } + }, + "flatPath": "v1/transferOperations/{transferOperationsId}", + "id": "storagetransfer.transferOperations.delete", + "path": "v1/{+name}", + "description": "This method is not supported and the server returns `UNIMPLEMENTED`." + }, + "list": { + "parameters": { + "pageToken": { + "type": "string", + "location": "query", + "description": "The list page token." + }, + "name": { + "type": "string", + "required": true, + "pattern": "^transferOperations$", + "location": "path", + "description": "The value `transferOperations`." + }, + "pageSize": { + "format": "int32", + "description": "The list page size. The max allowed value is 256.", + "type": "integer", + "location": "query" + }, + "filter": { + "description": "A list of query parameters specified as JSON text in the form of {\\\"project_id\\\" : \\\"my_project_id\\\", \\\"job_names\\\" : [\\\"jobid1\\\", \\\"jobid2\\\",...], \\\"operation_names\\\" : [\\\"opid1\\\", \\\"opid2\\\",...], \\\"transfer_statuses\\\":[\\\"status1\\\", \\\"status2\\\",...]}. Since `job_names`, `operation_names`, and `transfer_statuses` support multiple values, they must be specified with array notation. `job_names`, `operation_names`, and `transfer_statuses` are optional.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/transferOperations", + "id": "storagetransfer.transferOperations.list", + "path": "v1/{+name}", + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET" } } }, "transferJobs": { "methods": { "list": { - "description": "Lists transfer jobs.", + "httpMethod": "GET", + "parameterOrder": [], "response": { "$ref": "ListTransferJobsResponse" }, - "parameterOrder": [], - "httpMethod": "GET", "parameters": { - "filter": { - "description": "A list of query parameters specified as JSON text in the form of\n{\"project_id\":\"my_project_id\",\n\"job_names\":[\"jobid1\",\"jobid2\",...],\n\"job_statuses\":[\"status1\",\"status2\",...]}.\nSince `job_names` and `job_statuses` support multiple values, their values\nmust be specified with array notation. `project_id` is required. `job_names`\nand `job_statuses` are optional. The valid values for `job_statuses` are\ncase-insensitive: `ENABLED`, `DISABLED`, and `DELETED`.", - "type": "string", - "location": "query" - }, "pageToken": { "location": "query", "description": "The list page token.", "type": "string" }, "pageSize": { - "type": "integer", "location": "query", "format": "int32", - "description": "The list page size. The max allowed value is 256." + "description": "The list page size. The max allowed value is 256.", + "type": "integer" + }, + "filter": { + "description": "A list of query parameters specified as JSON text in the form of\n{\"project_id\":\"my_project_id\",\n\"job_names\":[\"jobid1\",\"jobid2\",...],\n\"job_statuses\":[\"status1\",\"status2\",...]}.\nSince `job_names` and `job_statuses` support multiple values, their values\nmust be specified with array notation. `project_id` is required. `job_names`\nand `job_statuses` are optional. The valid values for `job_statuses` are\ncase-insensitive: `ENABLED`, `DISABLED`, and `DELETED`.", + "type": "string", + "location": "query" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1/transferJobs", + "path": "v1/transferJobs", "id": "storagetransfer.transferJobs.list", - "path": "v1/transferJobs" + "description": "Lists transfer jobs." }, "get": { - "flatPath": "v1/transferJobs/{transferJobsId}", - "id": "storagetransfer.transferJobs.get", - "path": "v1/{+jobName}", "description": "Gets a transfer job.", - "response": { - "$ref": "TransferJob" - }, + "httpMethod": "GET", "parameterOrder": [ "jobName" ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], + "response": { + "$ref": "TransferJob" + }, "parameters": { "projectId": { - "location": "query", "description": "The ID of the Google Cloud Platform Console project that owns the job.\nRequired.", - "type": "string" + "type": "string", + "location": "query" }, "jobName": { "description": "The job to get.\nRequired.", @@ -270,58 +271,129 @@ "pattern": "^transferJobs/.+$", "location": "path" } - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/transferJobs/{transferJobsId}", + "path": "v1/{+jobName}", + "id": "storagetransfer.transferJobs.get" }, "patch": { - "path": "v1/{+jobName}", - "id": "storagetransfer.transferJobs.patch", - "request": { - "$ref": "UpdateTransferJobRequest" - }, - "description": "Updates a transfer job. Updating a job's transfer spec does not affect\ntransfer operations that are running already. Updating the scheduling\nof a job is not allowed.", - "httpMethod": "PATCH", - "parameterOrder": [ - "jobName" - ], "response": { "$ref": "TransferJob" }, + "parameterOrder": [ + "jobName" + ], + "httpMethod": "PATCH", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "jobName": { + "description": "The name of job to update.\nRequired.", "type": "string", "required": true, "pattern": "^transferJobs/.+$", - "location": "path", - "description": "The name of job to update.\nRequired." + "location": "path" } }, - "flatPath": "v1/transferJobs/{transferJobsId}" + "flatPath": "v1/transferJobs/{transferJobsId}", + "id": "storagetransfer.transferJobs.patch", + "path": "v1/{+jobName}", + "request": { + "$ref": "UpdateTransferJobRequest" + }, + "description": "Updates a transfer job. Updating a job's transfer spec does not affect\ntransfer operations that are running already. Updating the scheduling\nof a job is not allowed." }, "create": { - "request": { - "$ref": "TransferJob" - }, - "description": "Creates a transfer job that runs periodically.", + "httpMethod": "POST", + "parameterOrder": [], "response": { "$ref": "TransferJob" }, - "parameterOrder": [], - "httpMethod": "POST", + "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "parameters": {}, "flatPath": "v1/transferJobs", + "path": "v1/transferJobs", "id": "storagetransfer.transferJobs.create", - "path": "v1/transferJobs" + "description": "Creates a transfer job that runs periodically.", + "request": { + "$ref": "TransferJob" + } } } } }, "parameters": { + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "type": "string", + "location": "query", + "description": "OAuth bearer token." + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "type": "boolean", + "location": "query", + "description": "Returns response with indentations and line breaks." + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "callback": { + "type": "string", + "location": "query", + "description": "JSONP" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, "access_token": { "location": "query", "description": "OAuth access token.", @@ -342,75 +414,158 @@ "default": "true", "type": "boolean", "location": "query" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - }, - "callback": { - "type": "string", - "location": "query", - "description": "JSONP" - }, - "alt": { - "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", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string" } }, "schemas": { + "Operation": { + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `transferOperations/some/unique/name`.", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "description": "Represents the transfer operation object.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + }, + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object" + }, + "TransferSpec": { + "properties": { + "httpDataSource": { + "$ref": "HttpData", + "description": "An HTTP URL data source." + }, + "objectConditions": { + "$ref": "ObjectConditions", + "description": "Only objects that satisfy these object conditions are included in the set\nof data source and data sink objects. Object conditions based on\nobjects' `lastModificationTime` do not exclude objects in a data sink." + }, + "gcsDataSink": { + "description": "A Google Cloud Storage data sink.", + "$ref": "GcsData" + }, + "gcsDataSource": { + "description": "A Google Cloud Storage data source.", + "$ref": "GcsData" + }, + "transferOptions": { + "description": "If the option `deleteObjectsUniqueInSink` is `true`, object conditions\nbased on objects' `lastModificationTime` are ignored and do not exclude\nobjects in a data source or a data sink.", + "$ref": "TransferOptions" + }, + "awsS3DataSource": { + "$ref": "AwsS3Data", + "description": "An AWS S3 data source." + } + }, + "id": "TransferSpec", + "description": "Configuration for running a transfer.", + "type": "object" + }, + "TransferOptions": { + "description": "TransferOptions uses three boolean parameters to define the actions\nto be performed on objects in a transfer.", + "type": "object", + "properties": { + "overwriteObjectsAlreadyExistingInSink": { + "description": "Whether overwriting objects that already exist in the sink is allowed.", + "type": "boolean" + }, + "deleteObjectsFromSourceAfterTransfer": { + "description": "Whether objects should be deleted from the source after they are\ntransferred to the sink. Note that this option and\n`deleteObjectsUniqueInSink` are mutually exclusive.", + "type": "boolean" + }, + "deleteObjectsUniqueInSink": { + "description": "Whether objects that exist only in the sink should be deleted. Note that\nthis option and `deleteObjectsFromSourceAfterTransfer` are mutually\nexclusive.", + "type": "boolean" + } + }, + "id": "TransferOptions" + }, + "ResumeTransferOperationRequest": { + "description": "Request passed to ResumeTransferOperation.", + "type": "object", + "properties": {}, + "id": "ResumeTransferOperationRequest" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status" + }, + "ListOperationsResponse": { + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations.", + "type": "object" + }, + "GoogleServiceAccount": { + "description": "Google service account", + "type": "object", + "properties": { + "accountEmail": { + "description": "Required.", + "type": "string" + } + }, + "id": "GoogleServiceAccount" + }, "TimeOfDay": { + "type": "object", "properties": { "hours": { "format": "int32", @@ -428,17 +583,15 @@ "type": "integer" }, "minutes": { + "type": "integer", "format": "int32", - "description": "Minutes of hour of day. Must be from 0 to 59.", - "type": "integer" + "description": "Minutes of hour of day. Must be from 0 to 59." } }, "id": "TimeOfDay", - "description": "Represents a time of day. The date and time zone are either not significant\nor are specified elsewhere. An API may choose to allow leap seconds. Related\ntypes are google.type.Date and `google.protobuf.Timestamp`.", - "type": "object" + "description": "Represents a time of day. The date and time zone are either not significant\nor are specified elsewhere. An API may choose to allow leap seconds. Related\ntypes are google.type.Date and `google.protobuf.Timestamp`." }, "ErrorLogEntry": { - "id": "ErrorLogEntry", "description": "An entry describing an error that has occurred.", "type": "object", "properties": { @@ -453,26 +606,20 @@ "description": "A URL that refers to the target (a data source, a data sink,\nor an object) with which the error is associated.\nRequired.", "type": "string" } - } + }, + "id": "ErrorLogEntry" }, "TransferJob": { "description": "This resource represents the configuration of a transfer job that runs\nperiodically.", "type": "object", "properties": { - "description": { - "description": "A description provided by the user for the job. Its max length is 1024\nbytes when Unicode-encoded.", - "type": "string" - }, - "transferSpec": { - "$ref": "TransferSpec", - "description": "Transfer specification.\nRequired." - }, - "creationTime": { - "type": "string", - "format": "google-datetime", - "description": "This field cannot be changed by user requests." - }, "status": { + "enum": [ + "STATUS_UNSPECIFIED", + "ENABLED", + "DISABLED", + "DELETED" + ], "description": "Status of the job. This value MUST be specified for\n`CreateTransferJobRequests`.\n\nNOTE: The effect of the new job status takes place during a subsequent job\nrun. For example, if you change the job status from `ENABLED` to\n`DISABLED`, and an operation spawned by the transfer is running, the status\nchange would not affect the current operation.", "type": "string", "enumDescriptions": [ @@ -480,23 +627,22 @@ "New transfers will be performed based on the schedule.", "New transfers will not be scheduled.", "This is a soft delete state. After a transfer job is set to this\nstate, the job and all the transfer executions are subject to\ngarbage collection." - ], - "enum": [ - "STATUS_UNSPECIFIED", - "ENABLED", - "DISABLED", - "DELETED" ] }, "schedule": { "$ref": "Schedule", "description": "Schedule specification.\nRequired." }, + "deletionTime": { + "format": "google-datetime", + "description": "This field cannot be changed by user requests.", + "type": "string" + }, "name": { "description": "A globally unique name assigned by Storage Transfer Service when the\njob is created. This field should be left empty in requests to create a new\ntransfer job; otherwise, the requests result in an `INVALID_ARGUMENT`\nerror.", "type": "string" }, - "deletionTime": { + "lastModificationTime": { "format": "google-datetime", "description": "This field cannot be changed by user requests.", "type": "string" @@ -505,76 +651,76 @@ "description": "The ID of the Google Cloud Platform Console project that owns the job.\nRequired.", "type": "string" }, - "lastModificationTime": { + "description": { + "type": "string", + "description": "A description provided by the user for the job. Its max length is 1024\nbytes when Unicode-encoded." + }, + "creationTime": { "format": "google-datetime", "description": "This field cannot be changed by user requests.", "type": "string" + }, + "transferSpec": { + "$ref": "TransferSpec", + "description": "Transfer specification.\nRequired." } }, "id": "TransferJob" }, "Schedule": { - "id": "Schedule", "description": "Transfers can be scheduled to recur or to run just once.", "type": "object", "properties": { - "scheduleEndDate": { - "$ref": "Date", - "description": "The last day the recurring transfer will be run. If `scheduleEndDate`\nis the same as `scheduleStartDate`, the transfer will be executed only\nonce." - }, "startTimeOfDay": { "$ref": "TimeOfDay", "description": "The time in UTC at which the transfer will be scheduled to start in a day.\nTransfers may start later than this time. If not specified, recurring and\none-time transfers that are scheduled to run today will run immediately;\nrecurring transfers that are scheduled to run on a future date will start\nat approximately midnight UTC on that date. Note that when configuring a\ntransfer with the Cloud Platform Console, the transfer's start time in a\nday is specified in your local timezone." }, "scheduleStartDate": { - "$ref": "Date", - "description": "The first day the recurring transfer is scheduled to run. If\n`scheduleStartDate` is in the past, the transfer will run for the first\ntime on the following day.\nRequired." + "description": "The first day the recurring transfer is scheduled to run. If\n`scheduleStartDate` is in the past, the transfer will run for the first\ntime on the following day.\nRequired.", + "$ref": "Date" + }, + "scheduleEndDate": { + "description": "The last day the recurring transfer will be run. If `scheduleEndDate`\nis the same as `scheduleStartDate`, the transfer will be executed only\nonce.", + "$ref": "Date" } - } + }, + "id": "Schedule" }, "Date": { - "id": "Date", "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", "type": "object", "properties": { - "month": { - "type": "integer", - "format": "int32", - "description": "Month of year. Must be from 1 to 12." - }, "day": { "format": "int32", "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", "type": "integer" }, "year": { + "type": "integer", "format": "int32", - "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year." + }, + "month": { + "format": "int32", + "description": "Month of year. Must be from 1 to 12.", "type": "integer" } - } + }, + "id": "Date" }, "TransferOperation": { "description": "A description of the execution of a transfer.", "type": "object", "properties": { - "name": { - "description": "A globally unique ID assigned by the system.", - "type": "string" - }, - "projectId": { - "description": "The ID of the Google Cloud Platform Console project that owns the operation.\nRequired.", - "type": "string" - }, "endTime": { - "format": "google-datetime", - "description": "End time of this transfer execution.", - "type": "string" - }, - "startTime": { "type": "string", "format": "google-datetime", - "description": "Start time of this transfer execution." + "description": "End time of this transfer execution." + }, + "startTime": { + "format": "google-datetime", + "description": "Start time of this transfer execution.", + "type": "string" }, "transferJobName": { "description": "The name of the transfer job that triggers this transfer operation.", @@ -585,6 +731,7 @@ "description": "Transfer specification.\nRequired." }, "status": { + "description": "Status of the transfer operation.", "type": "string", "enumDescriptions": [ "Zero is an illegal value.", @@ -601,8 +748,7 @@ "SUCCESS", "FAILED", "ABORTED" - ], - "description": "Status of the transfer operation." + ] }, "counters": { "$ref": "TransferCounters", @@ -614,11 +760,21 @@ "$ref": "ErrorSummary" }, "type": "array" + }, + "name": { + "type": "string", + "description": "A globally unique ID assigned by the system." + }, + "projectId": { + "description": "The ID of the Google Cloud Platform Console project that owns the operation.\nRequired.", + "type": "string" } }, "id": "TransferOperation" }, "AwsS3Data": { + "id": "AwsS3Data", + "description": "An AwsS3Data can be a data source, but not a data sink.\nIn an AwsS3Data, an object's name is the S3 object's key name.", "type": "object", "properties": { "bucketName": { @@ -629,24 +785,7 @@ "$ref": "AwsAccessKey", "description": "AWS access key used to sign the API requests to the AWS S3 bucket.\nPermissions on the bucket must be granted to the access ID of the\nAWS access key.\nRequired." } - }, - "id": "AwsS3Data", - "description": "An AwsS3Data can be a data source, but not a data sink.\nIn an AwsS3Data, an object's name is the S3 object's key name." - }, - "AwsAccessKey": { - "description": "AWS access key (see\n[AWS Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)).", - "type": "object", - "properties": { - "secretAccessKey": { - "description": "AWS secret access key. This field is not returned in RPC responses.\nRequired.", - "type": "string" - }, - "accessKeyId": { - "description": "AWS access key ID.\nRequired.", - "type": "string" - } - }, - "id": "AwsAccessKey" + } }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", @@ -654,6 +793,21 @@ "properties": {}, "id": "Empty" }, + "AwsAccessKey": { + "description": "AWS access key (see\n[AWS Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)).", + "type": "object", + "properties": { + "accessKeyId": { + "description": "AWS access key ID.\nRequired.", + "type": "string" + }, + "secretAccessKey": { + "description": "AWS secret access key. This field is not returned in RPC responses.\nRequired.", + "type": "string" + } + }, + "id": "AwsAccessKey" + }, "PauseTransferOperationRequest": { "description": "Request passed to PauseTransferOperation.", "type": "object", @@ -664,6 +818,56 @@ "description": "A collection of counters that report the progress of a transfer operation.", "type": "object", "properties": { + "bytesDeletedFromSink": { + "format": "int64", + "description": "Bytes that are deleted from the data sink.", + "type": "string" + }, + "bytesFailedToDeleteFromSink": { + "format": "int64", + "description": "Bytes that failed to be deleted from the data sink.", + "type": "string" + }, + "bytesFromSourceFailed": { + "format": "int64", + "description": "Bytes in the data source that failed during the transfer.", + "type": "string" + }, + "objectsFromSourceFailed": { + "format": "int64", + "description": "Objects in the data source that failed during the transfer.", + "type": "string" + }, + "objectsCopiedToSink": { + "format": "int64", + "description": "Objects that are copied to the data sink.", + "type": "string" + }, + "bytesFoundOnlyFromSink": { + "format": "int64", + "description": "Bytes found only in the data sink that are scheduled to be deleted.", + "type": "string" + }, + "objectsDeletedFromSource": { + "format": "int64", + "description": "Objects that are deleted from the data source.", + "type": "string" + }, + "bytesCopiedToSink": { + "format": "int64", + "description": "Bytes that are copied to the data sink.", + "type": "string" + }, + "bytesFoundFromSource": { + "format": "int64", + "description": "Bytes found in the data source that are scheduled to be transferred,\nwhich will be copied, excluded based on conditions, or skipped due to\nfailures.", + "type": "string" + }, + "objectsFromSourceSkippedBySync": { + "format": "int64", + "description": "Objects in the data source that are not transferred because they already\nexist in the data sink.", + "type": "string" + }, "objectsFoundFromSource": { "format": "int64", "description": "Objects found in the data source that are scheduled to be transferred,\nwhich will be copied, excluded based on conditions, or skipped due to\nfailures.", @@ -693,56 +897,6 @@ "format": "int64", "description": "Bytes in the data source that are not transferred because they already\nexist in the data sink.", "type": "string" - }, - "bytesFailedToDeleteFromSink": { - "format": "int64", - "description": "Bytes that failed to be deleted from the data sink.", - "type": "string" - }, - "bytesDeletedFromSink": { - "format": "int64", - "description": "Bytes that are deleted from the data sink.", - "type": "string" - }, - "bytesFromSourceFailed": { - "format": "int64", - "description": "Bytes in the data source that failed during the transfer.", - "type": "string" - }, - "objectsCopiedToSink": { - "format": "int64", - "description": "Objects that are copied to the data sink.", - "type": "string" - }, - "objectsFromSourceFailed": { - "format": "int64", - "description": "Objects in the data source that failed during the transfer.", - "type": "string" - }, - "bytesFoundOnlyFromSink": { - "format": "int64", - "description": "Bytes found only in the data sink that are scheduled to be deleted.", - "type": "string" - }, - "objectsDeletedFromSource": { - "format": "int64", - "description": "Objects that are deleted from the data source.", - "type": "string" - }, - "bytesCopiedToSink": { - "format": "int64", - "description": "Bytes that are copied to the data sink.", - "type": "string" - }, - "objectsFromSourceSkippedBySync": { - "format": "int64", - "description": "Objects in the data source that are not transferred because they already\nexist in the data sink.", - "type": "string" - }, - "bytesFoundFromSource": { - "format": "int64", - "description": "Bytes found in the data source that are scheduled to be transferred,\nwhich will be copied, excluded based on conditions, or skipped due to\nfailures.", - "type": "string" } }, "id": "TransferCounters" @@ -751,7 +905,20 @@ "description": "A summary of errors by error code, plus a count and sample error log\nentries.", "type": "object", "properties": { + "errorCount": { + "format": "int64", + "description": "Count of this type of error.\nRequired.", + "type": "string" + }, + "errorLogEntries": { + "description": "Error samples.", + "items": { + "$ref": "ErrorLogEntry" + }, + "type": "array" + }, "errorCode": { + "type": "string", "enumDescriptions": [ "Not an error; returned on success\n\nHTTP Mapping: 200 OK", "The operation was cancelled, typically by the caller.\n\nHTTP Mapping: 499 Client Closed Request", @@ -790,32 +957,19 @@ "UNAVAILABLE", "DATA_LOSS" ], - "description": "Required.", - "type": "string" - }, - "errorCount": { - "format": "int64", - "description": "Count of this type of error.\nRequired.", - "type": "string" - }, - "errorLogEntries": { - "items": { - "$ref": "ErrorLogEntry" - }, - "type": "array", - "description": "Error samples." + "description": "Required." } }, "id": "ErrorSummary" }, "HttpData": { "id": "HttpData", - "description": "An HttpData specifies a list of objects on the web to be transferred over\nHTTP. The information of the objects to be transferred is contained in a\nfile referenced by a URL. The first line in the file must be\n\"TsvHttpData-1.0\", which specifies the format of the file. Subsequent lines\nspecify the information of the list of objects, one object per list entry.\nEach entry has the following tab-delimited fields:\n\n* HTTP URL - The location of the object.\n\n* Length - The size of the object in bytes.\n\n* MD5 - The base64-encoded MD5 hash of the object.\n\nFor an example of a valid TSV file, see\n[Transferring data from URLs](https://cloud.google.com/storage/transfer/#urls)\n\nWhen transferring data based on a URL list, keep the following in mind:\n\n* When an object located at `http(s)://hostname:port/\u003cURL-path\u003e` is transferred\nto a data sink, the name of the object at the data sink is\n`\u003chostname\u003e/\u003cURL-path\u003e`.\n\n* If the specified size of an object does not match the actual size of the\nobject fetched, the object will not be transferred.\n\n* If the specified MD5 does not match the MD5 computed from the transferred\nbytes, the object transfer will fail. For more information, see\n[Generating MD5 hashes](https://cloud.google.com/storage/transfer/#md5)\n\n* Ensure that each URL you specify is publicly accessible. For\nexample, in Google Cloud Storage you can\n[share an object publicly]\n(https://cloud.google.com/storage/docs/cloud-console#_sharingdata) and get\na link to it.\n\n* Storage Transfer Service obeys `robots.txt` rules and requires the source\nHTTP server to support `Range` requests and to return a `Content-Length`\nheader in each response.\n\n* [ObjectConditions](#ObjectConditions) have no effect when filtering objects\nto transfer.", + "description": "An HttpData specifies a list of objects on the web to be transferred over\nHTTP. The information of the objects to be transferred is contained in a\nfile referenced by a URL. The first line in the file must be\n\"TsvHttpData-1.0\", which specifies the format of the file. Subsequent lines\nspecify the information of the list of objects, one object per list entry.\nEach entry has the following tab-delimited fields:\n\n* HTTP URL - The location of the object.\n\n* Length - The size of the object in bytes.\n\n* MD5 - The base64-encoded MD5 hash of the object.\n\nFor an example of a valid TSV file, see\n[Transferring data from URLs](https://cloud.google.com/storage/transfer/create-url-list).\n\nWhen transferring data based on a URL list, keep the following in mind:\n\n* When an object located at `http(s)://hostname:port/\u003cURL-path\u003e` is transferred\nto a data sink, the name of the object at the data sink is\n`\u003chostname\u003e/\u003cURL-path\u003e`.\n\n* If the specified size of an object does not match the actual size of the\nobject fetched, the object will not be transferred.\n\n* If the specified MD5 does not match the MD5 computed from the transferred\nbytes, the object transfer will fail. For more information, see\n[Generating MD5 hashes](https://cloud.google.com/storage/transfer/#md5)\n\n* Ensure that each URL you specify is publicly accessible. For\nexample, in Google Cloud Storage you can\n[share an object publicly]\n(https://cloud.google.com/storage/docs/cloud-console#_sharingdata) and get\na link to it.\n\n* Storage Transfer Service obeys `robots.txt` rules and requires the source\nHTTP server to support `Range` requests and to return a `Content-Length`\nheader in each response.\n\n* [ObjectConditions](#ObjectConditions) have no effect when filtering objects\nto transfer.", "type": "object", "properties": { "listUrl": { - "description": "The URL that points to the file that stores the object list entries.\nThis file must allow public access. Currently, only URLs with HTTP and\nHTTPS schemes are supported.\nRequired.", - "type": "string" + "type": "string", + "description": "The URL that points to the file that stores the object list entries.\nThis file must allow public access. Currently, only URLs with HTTP and\nHTTPS schemes are supported.\nRequired." } } }, @@ -852,18 +1006,18 @@ "description": "Request passed to UpdateTransferJob.", "type": "object", "properties": { + "transferJob": { + "description": "The job to update. `transferJob` is expected to specify only three fields:\n`description`, `transferSpec`, and `status`. An UpdateTransferJobRequest\nthat specifies other fields will be rejected with an error\n`INVALID_ARGUMENT`.\nRequired.", + "$ref": "TransferJob" + }, "projectId": { "description": "The ID of the Google Cloud Platform Console project that owns the job.\nRequired.", "type": "string" }, "updateTransferJobFieldMask": { - "type": "string", "format": "google-fieldmask", - "description": "The field mask of the fields in `transferJob` that are to be updated in\nthis request. Fields in `transferJob` that can be updated are:\n`description`, `transferSpec`, and `status`. To update the `transferSpec`\nof the job, a complete transfer specification has to be provided. An\nincomplete specification which misses any required fields will be rejected\nwith the error `INVALID_ARGUMENT`." - }, - "transferJob": { - "$ref": "TransferJob", - "description": "The job to update.\nRequired." + "description": "The field mask of the fields in `transferJob` that are to be updated in\nthis request. Fields in `transferJob` that can be updated are:\n`description`, `transferSpec`, and `status`. To update the `transferSpec`\nof the job, a complete transfer specification has to be provided. An\nincomplete specification which misses any required fields will be rejected\nwith the error `INVALID_ARGUMENT`.", + "type": "string" } }, "id": "UpdateTransferJobRequest" @@ -898,160 +1052,13 @@ } }, "id": "ObjectConditions" - }, - "Operation": { - "properties": { - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `transferOperations/some/unique/name`.", - "type": "string" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Represents the transfer operation object.", - "type": "object" - } - }, - "id": "Operation", - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object" - }, - "TransferOptions": { - "description": "TransferOptions uses three boolean parameters to define the actions\nto be performed on objects in a transfer.", - "type": "object", - "properties": { - "deleteObjectsUniqueInSink": { - "description": "Whether objects that exist only in the sink should be deleted. Note that\nthis option and `deleteObjectsFromSourceAfterTransfer` are mutually\nexclusive.", - "type": "boolean" - }, - "overwriteObjectsAlreadyExistingInSink": { - "description": "Whether overwriting objects that already exist in the sink is allowed.", - "type": "boolean" - }, - "deleteObjectsFromSourceAfterTransfer": { - "description": "Whether objects should be deleted from the source after they are\ntransferred to the sink. Note that this option and\n`deleteObjectsUniqueInSink` are mutually exclusive.", - "type": "boolean" - } - }, - "id": "TransferOptions" - }, - "TransferSpec": { - "id": "TransferSpec", - "description": "Configuration for running a transfer.", - "type": "object", - "properties": { - "awsS3DataSource": { - "$ref": "AwsS3Data", - "description": "An AWS S3 data source." - }, - "httpDataSource": { - "$ref": "HttpData", - "description": "An HTTP URL data source." - }, - "objectConditions": { - "$ref": "ObjectConditions", - "description": "Only objects that satisfy these object conditions are included in the set\nof data source and data sink objects. Object conditions based on\nobjects' `lastModificationTime` do not exclude objects in a data sink." - }, - "gcsDataSink": { - "$ref": "GcsData", - "description": "A Google Cloud Storage data sink." - }, - "gcsDataSource": { - "$ref": "GcsData", - "description": "A Google Cloud Storage data source." - }, - "transferOptions": { - "description": "If the option `deleteObjectsUniqueInSink` is `true`, object conditions\nbased on objects' `lastModificationTime` are ignored and do not exclude\nobjects in a data source or a data sink.", - "$ref": "TransferOptions" - } - } - }, - "ResumeTransferOperationRequest": { - "properties": {}, - "id": "ResumeTransferOperationRequest", - "description": "Request passed to ResumeTransferOperation.", - "type": "object" - }, - "Status": { - "properties": { - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - } - }, - "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object" - }, - "ListOperationsResponse": { - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - } - }, - "id": "ListOperationsResponse", - "description": "The response message for Operations.ListOperations." - }, - "GoogleServiceAccount": { - "description": "Google service account", - "type": "object", - "properties": { - "accountEmail": { - "description": "Required.", - "type": "string" - } - }, - "id": "GoogleServiceAccount" } }, - "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, + "protocol": "rest", "version": "v1", "baseUrl": "https://storagetransfer.googleapis.com/", "auth": { @@ -1063,15 +1070,8 @@ } } }, - "kind": "discovery#restDescription", "servicePath": "", "description": "Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets.", - "rootUrl": "https://storagetransfer.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "storagetransfer", - "batchPath": "batch", - "revision": "20170720", - "documentationLink": "https://cloud.google.com/storage/transfer", - "id": "storagetransfer:v1" + "kind": "discovery#restDescription", + "rootUrl": "https://storagetransfer.googleapis.com/" } diff --git a/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-gen.go b/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-gen.go index 4a3c5a374..64ec0dcb2 100644 --- a/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-gen.go +++ b/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-gen.go @@ -566,9 +566,10 @@ func (s *GoogleServiceAccount) MarshalJSON() ([]byte, error) { // // For an example of a valid TSV file, see // [Transferring data from -// URLs](https://cloud.google.com/storage/transfer/#urls) +// URLs](https://cloud.google.com/storage/transfer/create-url-list). // -// When transferring data based on a URL list, keep the following in +// Whe +// n transferring data based on a URL list, keep the following in // mind: // // * When an object located at `http(s)://hostname:port/` is @@ -819,8 +820,8 @@ func (s *ObjectConditions) MarshalJSON() ([]byte, error) { type Operation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` @@ -1468,7 +1469,13 @@ type UpdateTransferJobRequest struct { // Required. ProjectId string `json:"projectId,omitempty"` - // TransferJob: The job to update. + // TransferJob: The job to update. `transferJob` is expected to specify + // only three fields: + // `description`, `transferSpec`, and `status`. An + // UpdateTransferJobRequest + // that specifies other fields will be rejected with an + // error + // `INVALID_ARGUMENT`. // Required. TransferJob *TransferJob `json:"transferJob,omitempty"` diff --git a/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-api.json b/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-api.json index b4458786e..a2856c8cc 100644 --- a/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-api.json +++ b/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-api.json @@ -1,33 +1,295 @@ { - "version": "v1", - "baseUrl": "https://streetviewpublish.googleapis.com/", + "kind": "discovery#restDescription", "description": "Publishes 360 photos to Google Maps, along with position, orientation, and connectivity metadata. Apps can offer an interface for positioning, connecting, and uploading user-generated Street View images.\n", "servicePath": "", - "kind": "discovery#restDescription", "basePath": "", - "revision": "20170722", - "documentationLink": "https://developers.google.com/streetview/publish/", + "revision": "20170909", "id": "streetviewpublish:v1", + "documentationLink": "https://developers.google.com/streetview/publish/", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "PhotoResponse": { + "description": "Response payload for a single\nPhoto\nin batch operations including\nBatchGetPhotos\nand\nBatchUpdatePhotos.", + "type": "object", + "properties": { + "status": { + "$ref": "Status", + "description": "The status for the operation to get or update a single photo in the batch\nrequest." + }, + "photo": { + "$ref": "Photo", + "description": "The Photo resource, if the request\nwas successful." + } + }, + "id": "PhotoResponse" + }, + "Connection": { + "description": "A connection is the link from a source photo to a destination photo.", + "type": "object", + "properties": { + "target": { + "$ref": "PhotoId", + "description": "Required. The destination of the connection from the containing photo to\nanother photo." + } + }, + "id": "Connection" + }, + "BatchUpdatePhotosResponse": { + "description": "Response to batch update of metadata of one or more\nPhotos.", + "type": "object", + "properties": { + "results": { + "description": "List of results for each individual\nPhoto updated, in the same order as\nthe request.", + "type": "array", + "items": { + "$ref": "PhotoResponse" + } + } + }, + "id": "BatchUpdatePhotosResponse" + }, + "Status": { + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client." + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "type": "array", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + } + } + } + }, + "BatchDeletePhotosResponse": { + "type": "object", + "properties": { + "status": { + "description": "The status for the operation to delete a single\nPhoto in the batch request.", + "type": "array", + "items": { + "$ref": "Status" + } + } + }, + "id": "BatchDeletePhotosResponse", + "description": "Response to batch delete of one or more\nPhotos." + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "Level": { + "id": "Level", + "description": "Level information containing level number and its corresponding name.", + "type": "object", + "properties": { + "name": { + "description": "Required. A name assigned to this Level, restricted to 3 characters.\nConsider how the elevator buttons would be labeled for this level if there\nwas an elevator.", + "type": "string" + }, + "number": { + "description": "Floor number, used for ordering. 0 indicates the ground level, 1 indicates\nthe first level above ground level, -1 indicates the first level under\nground level. Non-integer values are OK.", + "format": "double", + "type": "number" + } + } + }, + "UploadRef": { + "description": "Upload reference for media files.", + "type": "object", + "properties": { + "uploadUrl": { + "description": "Required. An upload reference should be unique for each user. It follows\nthe form:\n\"https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{upload_reference}\"", + "type": "string" + } + }, + "id": "UploadRef" + }, + "Place": { + "description": "Place metadata for an entity.", + "type": "object", + "properties": { + "placeId": { + "description": "Required. Place identifier, as described in\nhttps://developers.google.com/places/place-id.", + "type": "string" + } + }, + "id": "Place" + }, + "BatchGetPhotosResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "PhotoResponse" + }, + "description": "List of results for each individual\nPhoto requested, in the same order as\nthe requests in\nBatchGetPhotos." + } + }, + "id": "BatchGetPhotosResponse", + "description": "Response to batch get of Photos." + }, + "LatLng": { + "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", + "type": "object", + "properties": { + "latitude": { + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", + "format": "double", + "type": "number" + }, + "longitude": { + "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", + "format": "double", + "type": "number" + } + }, + "id": "LatLng" + }, + "BatchDeletePhotosRequest": { + "description": "Request to delete multiple Photos.", + "type": "object", + "properties": { + "photoIds": { + "description": "Required. IDs of the Photos. For HTTP\nGET requests, the URL query parameter should be\n`photoIds=\u003cid1\u003e&photoIds=\u003cid2\u003e&...`.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "BatchDeletePhotosRequest" + }, + "UpdatePhotoRequest": { + "description": "Request to update the metadata of a\nPhoto. Updating the pixels of a photo\nis not supported.", + "type": "object", + "properties": { + "updateMask": { + "description": "Mask that identifies fields on the photo metadata to update.\nIf not present, the old Photo metadata will be entirely replaced with the\nnew Photo metadata in this request. The update fails if invalid fields are\nspecified. Multiple fields can be specified in a comma-delimited list.\n\nThe following fields are valid:\n\n* `pose.heading`\n* `pose.latLngPair`\n* `pose.pitch`\n* `pose.roll`\n* `pose.level`\n* `pose.altitude`\n* `connections`\n* `places`\n\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e Repeated fields in\nupdateMask\nmean the entire set of repeated values will be replaced with the new\ncontents. For example, if\nupdateMask\ncontains `connections` and `UpdatePhotoRequest.photo.connections` is empty,\nall connections will be removed.\u003c/aside\u003e", + "format": "google-fieldmask", + "type": "string" + }, + "photo": { + "$ref": "Photo", + "description": "Required. Photo object containing the\nnew metadata." + } + }, + "id": "UpdatePhotoRequest" + }, + "PhotoId": { + "description": "Identifier for a Photo.", + "type": "object", + "properties": { + "id": { + "description": "Required. A unique identifier for a photo.", + "type": "string" + } + }, + "id": "PhotoId" + }, + "Pose": { + "description": "Raw pose measurement for an entity.", + "type": "object", + "properties": { + "latLngPair": { + "description": "Latitude and longitude pair of the pose, as explained here:\nhttps://cloud.google.com/datastore/docs/reference/rest/Shared.Types/LatLng\nWhen creating a Photo, if the\nlatitude and longitude pair are not provided here, the geolocation from the\nexif header will be used. If the latitude and longitude pair is not\nprovided and cannot be found in the exif header, the create photo process\nwill fail.", + "$ref": "LatLng" + }, + "roll": { + "description": "Roll, measured in degrees. Value must be \u003e= 0 and \u003c360. A value of 0\nmeans level with the horizon.\nNaN indicates an unmeasured quantity.", + "format": "double", + "type": "number" + }, + "level": { + "description": "Level (the floor in a building) used to configure vertical navigation.", + "$ref": "Level" + }, + "heading": { + "description": "Compass heading, measured at the center of the photo in degrees clockwise\nfrom North. Value must be \u003e=0 and \u003c360.\nNaN indicates an unmeasured quantity.", + "format": "double", + "type": "number" + }, + "altitude": { + "description": "Altitude of the pose in meters above ground level (as defined by WGS84).\nNaN indicates an unmeasured quantity.", + "format": "double", + "type": "number" + }, + "pitch": { + "description": "Pitch, measured at the center of the photo in degrees. Value must be \u003e=-90\nand \u003c= 90. A value of -90 means looking directly down, and a value of 90\nmeans looking directly up.\nNaN indicates an unmeasured quantity.", + "format": "double", + "type": "number" + } + }, + "id": "Pose" + }, + "BatchUpdatePhotosRequest": { + "type": "object", + "properties": { + "updatePhotoRequests": { + "description": "Required. List of\nUpdatePhotoRequests.", + "type": "array", + "items": { + "$ref": "UpdatePhotoRequest" + } + } + }, + "id": "BatchUpdatePhotosRequest", + "description": "Request to update the metadata of photos.\nUpdating the pixels of photos is not supported." + }, + "ListPhotosResponse": { + "description": "Response to list all photos that belong to a user.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more\nresults in the list.", + "type": "string" + }, + "photos": { + "description": "List of photos. The maximum number of items returned is based on the\npageSize field\nin the request.", + "type": "array", + "items": { + "$ref": "Photo" + } + } + }, + "id": "ListPhotosResponse" + }, "Photo": { "description": "Photo is used to store 360 photos along with photo metadata.", "type": "object", "properties": { + "connections": { + "description": "Connections to other photos. A connection represents the link from this\nphoto to another photo.", + "type": "array", + "items": { + "$ref": "Connection" + } + }, "places": { - "description": "Places where this photo belongs.", + "type": "array", "items": { "$ref": "Place" }, - "type": "array" - }, - "connections": { - "description": "Connections to other photos. A connection represents the link from this\nphoto to another photo.", - "items": { - "$ref": "Connection" - }, - "type": "array" + "description": "Places where this photo belongs." }, "uploadReference": { "$ref": "UploadRef", @@ -45,18 +307,18 @@ "description": "Output only. The share link for the photo.", "type": "string" }, + "captureTime": { + "description": "Absolute time when the photo was captured.\nWhen the photo has no exif timestamp, this is used to set a timestamp in\nthe photo metadata.", + "format": "google-datetime", + "type": "string" + }, "thumbnailUrl": { "description": "Output only. The thumbnail URL for showing a preview of the given photo.", "type": "string" }, - "captureTime": { - "type": "string", - "format": "google-datetime", - "description": "Absolute time when the photo was captured.\nWhen the photo has no exif timestamp, this is used to set a timestamp in\nthe photo metadata." - }, "viewCount": { - "format": "int64", "description": "Output only. View count of the photo.", + "format": "int64", "type": "string" }, "downloadUrl": { @@ -65,277 +327,13 @@ } }, "id": "Photo" - }, - "PhotoResponse": { - "type": "object", - "properties": { - "photo": { - "description": "The Photo resource, if the request\nwas successful.", - "$ref": "Photo" - }, - "status": { - "$ref": "Status", - "description": "The status for the operation to get or update a single photo in the batch\nrequest." - } - }, - "id": "PhotoResponse", - "description": "Response payload for a single\nPhoto\nin batch operations including\nBatchGetPhotos\nand\nBatchUpdatePhotos." - }, - "Connection": { - "id": "Connection", - "description": "A connection is the link from a source photo to a destination photo.", - "type": "object", - "properties": { - "target": { - "description": "Required. The destination of the connection from the containing photo to\nanother photo.", - "$ref": "PhotoId" - } - } - }, - "BatchUpdatePhotosResponse": { - "description": "Response to batch update of metadata of one or more\nPhotos.", - "type": "object", - "properties": { - "results": { - "description": "List of results for each individual\nPhoto updated, in the same order as\nthe request.", - "items": { - "$ref": "PhotoResponse" - }, - "type": "array" - } - }, - "id": "BatchUpdatePhotosResponse" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - }, - "code": { - "type": "integer", - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code." - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "id": "Status" - }, - "BatchDeletePhotosResponse": { - "description": "Response to batch delete of one or more\nPhotos.", - "type": "object", - "properties": { - "status": { - "description": "The status for the operation to delete a single\nPhoto in the batch request.", - "items": { - "$ref": "Status" - }, - "type": "array" - } - }, - "id": "BatchDeletePhotosResponse" - }, - "Level": { - "description": "Level information containing level number and its corresponding name.", - "type": "object", - "properties": { - "name": { - "description": "Required. A name assigned to this Level, restricted to 3 characters.\nConsider how the elevator buttons would be labeled for this level if there\nwas an elevator.", - "type": "string" - }, - "number": { - "format": "double", - "description": "Floor number, used for ordering. 0 indicates the ground level, 1 indicates\nthe first level above ground level, -1 indicates the first level under\nground level. Non-integer values are OK.", - "type": "number" - } - }, - "id": "Level" - }, - "Empty": { - "properties": {}, - "id": "Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object" - }, - "BatchGetPhotosResponse": { - "id": "BatchGetPhotosResponse", - "description": "Response to batch get of Photos.", - "type": "object", - "properties": { - "results": { - "description": "List of results for each individual\nPhoto requested, in the same order as\nthe requests in\nBatchGetPhotos.", - "items": { - "$ref": "PhotoResponse" - }, - "type": "array" - } - } - }, - "Place": { - "type": "object", - "properties": { - "placeId": { - "description": "Required. Place identifier, as described in\nhttps://developers.google.com/places/place-id.", - "type": "string" - } - }, - "id": "Place", - "description": "Place metadata for an entity." - }, - "UploadRef": { - "properties": { - "uploadUrl": { - "type": "string", - "description": "Required. An upload reference should be unique for each user. It follows\nthe form:\n\"https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{upload_reference}\"" - } - }, - "id": "UploadRef", - "description": "Upload reference for media files.", - "type": "object" - }, - "BatchDeletePhotosRequest": { - "description": "Request to delete multiple Photos.", - "type": "object", - "properties": { - "photoIds": { - "description": "Required. IDs of the Photos. For HTTP\nGET requests, the URL query parameter should be\n`photoIds=\u003cid1\u003e&photoIds=\u003cid2\u003e&...`.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "BatchDeletePhotosRequest" - }, - "LatLng": { - "id": "LatLng", - "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", - "type": "object", - "properties": { - "latitude": { - "format": "double", - "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", - "type": "number" - }, - "longitude": { - "format": "double", - "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", - "type": "number" - } - } - }, - "UpdatePhotoRequest": { - "type": "object", - "properties": { - "updateMask": { - "format": "google-fieldmask", - "description": "Mask that identifies fields on the photo metadata to update.\nIf not present, the old Photo metadata will be entirely replaced with the\nnew Photo metadata in this request. The update fails if invalid fields are\nspecified. Multiple fields can be specified in a comma-delimited list.\n\nThe following fields are valid:\n\n* `pose.heading`\n* `pose.latlngpair`\n* `pose.pitch`\n* `pose.roll`\n* `pose.level`\n* `pose.altitude`\n* `connections`\n* `places`\n\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e Repeated fields in\nupdateMask\nmean the entire set of repeated values will be replaced with the new\ncontents. For example, if\nupdateMask\ncontains `connections` and\ngoogle.streetview.publish.v1.UpdatePhotoRequest.photo.connections is\nempty, all connections will be removed.\u003c/aside\u003e", - "type": "string" - }, - "photo": { - "$ref": "Photo", - "description": "Required. Photo object containing the\nnew metadata. Only the fields specified in\nupdateMask\nfield are used. If `updateMask` is not present, the update applies to all\nfields. \u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e To update\nPose.altitude,\nPose.latLngPair has to be\nfilled as well. Otherwise, the request will fail." - } - }, - "id": "UpdatePhotoRequest", - "description": "Request to update the metadata of a\nPhoto. Updating the pixels of a photo\nis not supported." - }, - "Pose": { - "id": "Pose", - "description": "Raw pose measurement for an entity.", - "type": "object", - "properties": { - "roll": { - "format": "double", - "description": "Roll, measured in degrees. Value must be \u003e= 0 and \u003c360. A value of 0\nmeans level with the horizon.\nNaN indicates an unmeasured quantity.", - "type": "number" - }, - "level": { - "$ref": "Level", - "description": "Level (the floor in a building) used to configure vertical navigation." - }, - "heading": { - "format": "double", - "description": "Compass heading, measured at the center of the photo in degrees clockwise\nfrom North. Value must be \u003e=0 and \u003c360.\nNaN indicates an unmeasured quantity.", - "type": "number" - }, - "altitude": { - "format": "double", - "description": "Altitude of the pose in meters above ground level (as defined by WGS84).\nNaN indicates an unmeasured quantity.", - "type": "number" - }, - "pitch": { - "format": "double", - "description": "Pitch, measured at the center of the photo in degrees. Value must be \u003e=-90\nand \u003c= 90. A value of -90 means looking directly down, and a value of 90\nmeans looking directly up.\nNaN indicates an unmeasured quantity.", - "type": "number" - }, - "latLngPair": { - "$ref": "LatLng", - "description": "Latitude and longitude pair of the pose, as explained here:\nhttps://cloud.google.com/datastore/docs/reference/rest/Shared.Types/LatLng\nWhen creating a Photo, if the\nlatitude and longitude pair are not provided here, the geolocation from the\nexif header will be used. If the latitude and longitude pair is not\nprovided and cannot be found in the exif header, the create photo process\nwill fail." - } - } - }, - "PhotoId": { - "description": "Identifier for a Photo.", - "type": "object", - "properties": { - "id": { - "description": "Required. A base64 encoded identifier.", - "type": "string" - } - }, - "id": "PhotoId" - }, - "BatchUpdatePhotosRequest": { - "description": "Request to update the metadata of photos.\nUpdating the pixels of photos is not supported.", - "type": "object", - "properties": { - "updatePhotoRequests": { - "description": "Required. List of\nUpdatePhotoRequests.", - "items": { - "$ref": "UpdatePhotoRequest" - }, - "type": "array" - } - }, - "id": "BatchUpdatePhotosRequest" - }, - "ListPhotosResponse": { - "description": "Response to list all photos that belong to a user.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Token to retrieve the next page of results, or empty if there are no more\nresults in the list.", - "type": "string" - }, - "photos": { - "description": "List of photos. The maximum number of items returned is based on the\npageSize field\nin the request.", - "items": { - "$ref": "Photo" - }, - "type": "array" - } - }, - "id": "ListPhotosResponse" } }, + "protocol": "rest", "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "protocol": "rest", "canonicalName": "Street View Publish", "auth": { "oauth2": { @@ -357,142 +355,154 @@ "photo": { "methods": { "delete": { + "description": "Deletes a Photo and its metadata.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.PERMISSION_DENIED if the requesting user did not\ncreate the requested photo.\n* google.rpc.Code.NOT_FOUND if the photo ID does not exist.", + "response": { + "$ref": "Empty" + }, "parameterOrder": [ "photoId" ], "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, "scopes": [ "https://www.googleapis.com/auth/streetviewpublish" ], "parameters": { "photoId": { - "location": "path", "description": "Required. ID of the Photo.", + "required": true, "type": "string", - "required": true + "location": "path" } }, "flatPath": "v1/photo/{photoId}", - "id": "streetviewpublish.photo.delete", "path": "v1/photo/{photoId}", - "description": "Deletes a Photo and its metadata.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.PERMISSION_DENIED if the requesting user did not\ncreate the requested photo.\n* google.rpc.Code.NOT_FOUND if the photo ID does not exist." + "id": "streetviewpublish.photo.delete" }, "get": { - "id": "streetviewpublish.photo.get", - "path": "v1/photo/{photoId}", - "description": "Gets the metadata of the specified\nPhoto.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.PERMISSION_DENIED if the requesting user did not\ncreate the requested Photo.\n* google.rpc.Code.NOT_FOUND if the requested\nPhoto does not exist.", + "httpMethod": "GET", "response": { "$ref": "Photo" }, "parameterOrder": [ "photoId" ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/streetviewpublish" - ], "parameters": { + "photoId": { + "location": "path", + "description": "Required. ID of the Photo.", + "required": true, + "type": "string" + }, "view": { - "type": "string", "location": "query", "enum": [ "BASIC", "INCLUDE_DOWNLOAD_URL" ], - "description": "Specifies if a download URL for the photo bytes should be returned in the\nPhoto response." - }, - "photoId": { - "description": "Required. ID of the Photo.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/photo/{photoId}" - }, - "update": { - "httpMethod": "PUT", - "parameterOrder": [ - "id" - ], - "response": { - "$ref": "Photo" - }, - "parameters": { - "id": { - "location": "path", - "description": "Required. A base64 encoded identifier.", - "type": "string", - "required": true - }, - "updateMask": { - "type": "string", - "location": "query", - "format": "google-fieldmask", - "description": "Mask that identifies fields on the photo metadata to update.\nIf not present, the old Photo metadata will be entirely replaced with the\nnew Photo metadata in this request. The update fails if invalid fields are\nspecified. Multiple fields can be specified in a comma-delimited list.\n\nThe following fields are valid:\n\n* `pose.heading`\n* `pose.latlngpair`\n* `pose.pitch`\n* `pose.roll`\n* `pose.level`\n* `pose.altitude`\n* `connections`\n* `places`\n\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e Repeated fields in\nupdateMask\nmean the entire set of repeated values will be replaced with the new\ncontents. For example, if\nupdateMask\ncontains `connections` and\ngoogle.streetview.publish.v1.UpdatePhotoRequest.photo.connections is\nempty, all connections will be removed.\u003c/aside\u003e" + "description": "Specifies if a download URL for the photo bytes should be returned in the\nPhoto response.", + "type": "string" } }, "scopes": [ "https://www.googleapis.com/auth/streetviewpublish" ], - "flatPath": "v1/photo/{id}", - "path": "v1/photo/{id}", - "id": "streetviewpublish.photo.update", - "description": "Updates the metadata of a Photo, such\nas pose, place association, connections, etc. Changing the pixels of a\nphoto is not supported.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.PERMISSION_DENIED if the requesting user did not\ncreate the requested photo.\n* google.rpc.Code.INVALID_ARGUMENT if the request is malformed.\n* google.rpc.Code.NOT_FOUND if the requested photo does not exist.", - "request": { - "$ref": "Photo" - } + "flatPath": "v1/photo/{photoId}", + "id": "streetviewpublish.photo.get", + "path": "v1/photo/{photoId}", + "description": "Gets the metadata of the specified\nPhoto.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.PERMISSION_DENIED if the requesting user did not\ncreate the requested Photo.\n* google.rpc.Code.NOT_FOUND if the requested\nPhoto does not exist." }, - "create": { + "update": { + "description": "Updates the metadata of a Photo, such\nas pose, place association, connections, etc. Changing the pixels of a\nphoto is not supported.\n\nOnly the fields specified in\nupdateMask\nfield are used. If `updateMask` is not present, the update applies to all\nfields.\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e To update\nPose.altitude,\nPose.latLngPair has to be\nfilled as well. Otherwise, the request will fail.\u003c/aside\u003e\n\nThis method returns the following error codes:\n\n* google.rpc.Code.PERMISSION_DENIED if the requesting user did not\ncreate the requested photo.\n* google.rpc.Code.INVALID_ARGUMENT if the request is malformed.\n* google.rpc.Code.NOT_FOUND if the requested photo does not exist.", "request": { "$ref": "Photo" }, - "description": "After the client finishes uploading the photo with the returned\nUploadRef,\nCreatePhoto\npublishes the uploaded Photo to\nStreet View on Google Maps.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.INVALID_ARGUMENT if the request is malformed.\n* google.rpc.Code.NOT_FOUND if the upload reference does not exist.\n* google.rpc.Code.RESOURCE_EXHAUSTED if the account has reached the\nstorage limit.", - "httpMethod": "POST", - "parameterOrder": [], "response": { "$ref": "Photo" }, + "parameterOrder": [ + "id" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/streetviewpublish" + ], + "parameters": { + "id": { + "location": "path", + "description": "Required. A unique identifier for a photo.", + "required": true, + "type": "string" + }, + "updateMask": { + "location": "query", + "description": "Mask that identifies fields on the photo metadata to update.\nIf not present, the old Photo metadata will be entirely replaced with the\nnew Photo metadata in this request. The update fails if invalid fields are\nspecified. Multiple fields can be specified in a comma-delimited list.\n\nThe following fields are valid:\n\n* `pose.heading`\n* `pose.latLngPair`\n* `pose.pitch`\n* `pose.roll`\n* `pose.level`\n* `pose.altitude`\n* `connections`\n* `places`\n\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e Repeated fields in\nupdateMask\nmean the entire set of repeated values will be replaced with the new\ncontents. For example, if\nupdateMask\ncontains `connections` and `UpdatePhotoRequest.photo.connections` is empty,\nall connections will be removed.\u003c/aside\u003e", + "format": "google-fieldmask", + "type": "string" + } + }, + "flatPath": "v1/photo/{id}", + "path": "v1/photo/{id}", + "id": "streetviewpublish.photo.update" + }, + "create": { + "response": { + "$ref": "Photo" + }, + "parameterOrder": [], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/streetviewpublish" ], "parameters": {}, "flatPath": "v1/photo", "path": "v1/photo", - "id": "streetviewpublish.photo.create" + "id": "streetviewpublish.photo.create", + "description": "After the client finishes uploading the photo with the returned\nUploadRef,\nCreatePhoto\npublishes the uploaded Photo to\nStreet View on Google Maps.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.INVALID_ARGUMENT if the request is malformed.\n* google.rpc.Code.NOT_FOUND if the upload reference does not exist.\n* google.rpc.Code.RESOURCE_EXHAUSTED if the account has reached the\nstorage limit.", + "request": { + "$ref": "Photo" + } }, "startUpload": { + "flatPath": "v1/photo:startUpload", + "id": "streetviewpublish.photo.startUpload", + "path": "v1/photo:startUpload", + "request": { + "$ref": "Empty" + }, + "description": "Creates an upload session to start uploading photo bytes. The upload URL of\nthe returned UploadRef is used to\nupload the bytes for the Photo.\n\nIn addition to the photo requirements shown in\nhttps://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604,\nthe photo must also meet the following requirements:\n\n* Photo Sphere XMP metadata must be included in the photo medadata. See\nhttps://developers.google.com/streetview/spherical-metadata for the\nrequired fields.\n* The pixel size of the photo must meet the size requirements listed in\nhttps://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604, and\nthe photo must be a full 360 horizontally.\n\nAfter the upload is complete, the\nUploadRef is used with\nCreatePhoto\nto create the Photo object entry.", "httpMethod": "POST", "parameterOrder": [], "response": { "$ref": "UploadRef" }, + "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/streetviewpublish" - ], - "parameters": {}, - "flatPath": "v1/photo:startUpload", - "path": "v1/photo:startUpload", - "id": "streetviewpublish.photo.startUpload", - "request": { - "$ref": "Empty" - }, - "description": "Creates an upload session to start uploading photo bytes. The upload URL of\nthe returned UploadRef is used to\nupload the bytes for the Photo.\n\nIn addition to the photo requirements shown in\nhttps://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604,\nthe photo must also meet the following requirements:\n\n* Photo Sphere XMP metadata must be included in the photo medadata. See\nhttps://developers.google.com/streetview/spherical-metadata for the\nrequired fields.\n* The pixel size of the photo must meet the size requirements listed in\nhttps://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604, and\nthe photo must be a full 360 horizontally.\n\nAfter the upload is complete, the\nUploadRef is used with\nCreatePhoto\nto create the Photo object entry." + ] } } }, "photos": { "methods": { - "batchDelete": { - "id": "streetviewpublish.photos.batchDelete", - "path": "v1/photos:batchDelete", - "request": { - "$ref": "BatchDeletePhotosRequest" + "batchUpdate": { + "response": { + "$ref": "BatchUpdatePhotosResponse" }, - "description": "Deletes a list of Photos and their metadata.\n\nNote that if\nBatchDeletePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchDeletePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchDeletePhotosResponse.results.\nSee\nDeletePhoto\nfor specific failures that can occur per photo.", + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/streetviewpublish" + ], + "flatPath": "v1/photos:batchUpdate", + "path": "v1/photos:batchUpdate", + "id": "streetviewpublish.photos.batchUpdate", + "request": { + "$ref": "BatchUpdatePhotosRequest" + }, + "description": "Updates the metadata of Photos, such\nas pose, place association, connections, etc. Changing the pixels of photos\nis not supported.\n\nNote that if\nBatchUpdatePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchUpdatePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchUpdatePhotosResponse.results.\nSee\nUpdatePhoto\nfor specific failures that can occur per photo.\n\nOnly the fields specified in\nupdateMask\nfield are used. If `updateMask` is not present, the update applies to all\nfields.\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e To update\nPose.altitude,\nPose.latLngPair has to be\nfilled as well. Otherwise, the request will fail.\u003c/aside\u003e" + }, + "batchDelete": { "response": { "$ref": "BatchDeletePhotosResponse" }, @@ -502,37 +512,27 @@ "https://www.googleapis.com/auth/streetviewpublish" ], "parameters": {}, - "flatPath": "v1/photos:batchDelete" - }, - "batchUpdate": { - "flatPath": "v1/photos:batchUpdate", - "id": "streetviewpublish.photos.batchUpdate", - "path": "v1/photos:batchUpdate", - "description": "Updates the metadata of Photos, such\nas pose, place association, connections, etc. Changing the pixels of photos\nis not supported.\n\nNote that if\nBatchUpdatePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchUpdatePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchUpdatePhotosResponse.results.\nSee\nUpdatePhoto\nfor specific failures that can occur per photo.", + "flatPath": "v1/photos:batchDelete", + "path": "v1/photos:batchDelete", + "id": "streetviewpublish.photos.batchDelete", + "description": "Deletes a list of Photos and their\nmetadata.\n\nNote that if\nBatchDeletePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchDeletePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchDeletePhotosResponse.results.\nSee\nDeletePhoto\nfor specific failures that can occur per photo.", "request": { - "$ref": "BatchUpdatePhotosRequest" - }, - "response": { - "$ref": "BatchUpdatePhotosResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/streetviewpublish" - ] + "$ref": "BatchDeletePhotosRequest" + } }, "batchGet": { - "description": "Gets the metadata of the specified\nPhoto batch.\n\nNote that if\nBatchGetPhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchGetPhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchGetPhotosResponse.results.\nSee\nGetPhoto\nfor specific failures that can occur per photo.", - "parameterOrder": [], "httpMethod": "GET", "response": { "$ref": "BatchGetPhotosResponse" }, - "scopes": [ - "https://www.googleapis.com/auth/streetviewpublish" - ], + "parameterOrder": [], "parameters": { + "photoIds": { + "repeated": true, + "location": "query", + "description": "Required. IDs of the Photos. For HTTP\nGET requests, the URL query parameter should be\n`photoIds=\u003cid1\u003e&photoIds=\u003cid2\u003e&...`.", + "type": "string" + }, "view": { "description": "Specifies if a download URL for the photo bytes should be returned in the\nPhoto response.", "type": "string", @@ -541,30 +541,33 @@ "BASIC", "INCLUDE_DOWNLOAD_URL" ] - }, - "photoIds": { - "repeated": true, - "location": "query", - "description": "Required. IDs of the Photos. For HTTP\nGET requests, the URL query parameter should be\n`photoIds=\u003cid1\u003e&photoIds=\u003cid2\u003e&...`.", - "type": "string" } }, + "scopes": [ + "https://www.googleapis.com/auth/streetviewpublish" + ], "flatPath": "v1/photos:batchGet", "id": "streetviewpublish.photos.batchGet", - "path": "v1/photos:batchGet" + "path": "v1/photos:batchGet", + "description": "Gets the metadata of the specified\nPhoto batch.\n\nNote that if\nBatchGetPhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchGetPhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchGetPhotosResponse.results.\nSee\nGetPhoto\nfor specific failures that can occur per photo." }, "list": { + "httpMethod": "GET", + "parameterOrder": [], "response": { "$ref": "ListPhotosResponse" }, - "parameterOrder": [], - "httpMethod": "GET", "parameters": { + "pageToken": { + "location": "query", + "description": "The\nnextPageToken\nvalue returned from a previous\nListPhotos\nrequest, if any.", + "type": "string" + }, "pageSize": { - "format": "int32", + "location": "query", "description": "The maximum number of photos to return.\n`pageSize` must be non-negative. If `pageSize` is zero or is not provided,\nthe default page size of 100 will be used.\nThe number of photos returned in the response may be less than `pageSize`\nif the number of photos that belong to the user is less than `pageSize`.", - "type": "integer", - "location": "query" + "format": "int32", + "type": "integer" }, "view": { "location": "query", @@ -576,14 +579,9 @@ "type": "string" }, "filter": { - "description": "The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`.", "type": "string", - "location": "query" - }, - "pageToken": { "location": "query", - "description": "The\nnextPageToken\nvalue returned from a previous\nListPhotos\nrequest, if any.", - "type": "string" + "description": "The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`." } }, "scopes": [ @@ -592,62 +590,60 @@ "flatPath": "v1/photos", "id": "streetviewpublish.photos.list", "path": "v1/photos", - "description": "Lists all the Photos that belong to the user." + "description": "Lists all the Photos that belong to\nthe user." } } } }, "parameters": { "quotaUser": { - "type": "string", "location": "query", - "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." + "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.", + "type": "string" }, "pp": { + "location": "query", "description": "Pretty-print response.", - "default": "true", "type": "boolean", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" + "default": "true" }, "bearer_token": { "location": "query", "description": "OAuth bearer token.", "type": "string" }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, "upload_protocol": { "type": "string", "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." }, "prettyPrint": { + "location": "query", "description": "Returns response with indentations and line breaks.", - "default": "true", "type": "boolean", - "location": "query" + "default": "true" }, "fields": { - "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query", + "description": "Selector specifying which fields to include in a partial response." + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", "location": "query" }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, "callback": { - "location": "query", "description": "JSONP", - "type": "string" + "type": "string", + "location": "query" }, "$.xgafv": { - "description": "V1 error format.", - "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -656,33 +652,37 @@ "enum": [ "1", "2" - ] + ], + "description": "V1 error format.", + "type": "string" }, "alt": { - "type": "string", - "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", "description": "Data format for response.", "default": "json", "enum": [ "json", "media", "proto" - ] - }, - "key": { + ], "type": "string", - "location": "query", - "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." + "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" }, "access_token": { - "location": "query", "description": "OAuth access token.", - "type": "string" + "type": "string", + "location": "query" + }, + "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.", + "type": "string", + "location": "query" } - } + }, + "version": "v1", + "baseUrl": "https://streetviewpublish.googleapis.com/" } diff --git a/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-gen.go b/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-gen.go index 75758e4a5..a3908857e 100644 --- a/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-gen.go +++ b/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-gen.go @@ -577,7 +577,7 @@ func (s *Photo) MarshalJSON() ([]byte, error) { // PhotoId: Identifier for a Photo. type PhotoId struct { - // Id: Required. A base64 encoded identifier. + // Id: Required. A unique identifier for a photo. Id string `json:"id,omitempty"` // ForceSendFields is a list of field names (e.g. "Id") to @@ -884,15 +884,7 @@ func (s *Status) MarshalJSON() ([]byte, error) { // is not supported. type UpdatePhotoRequest struct { // Photo: Required. Photo object containing the - // new metadata. Only the fields specified in - // updateMask - // field are used. If `updateMask` is not present, the update applies to - // all - // fields. + // contains `connections` and `UpdatePhotoRequest.photo.connections` is + // empty, + // all connections will be removed. UpdateMask string `json:"updateMask,omitempty"` // ForceSendFields is a list of field names (e.g. "Photo") to @@ -1582,6 +1572,18 @@ type PhotoUpdateCall struct { // a // photo is not supported. // +// Only the fields specified in +// updateMask +// field are used. If `updateMask` is not present, the update applies to +// all +// fields. +// +// +// // This method returns the following error codes: // // * google.rpc.Code.PERMISSION_DENIED if the requesting user did @@ -1608,7 +1610,7 @@ func (r *PhotoService) Update(id string, photo *Photo) *PhotoUpdateCall { // The following fields are valid: // // * `pose.heading` -// * `pose.latlngpair` +// * `pose.latLngPair` // * `pose.pitch` // * `pose.roll` // * `pose.level` @@ -1623,11 +1625,9 @@ func (r *PhotoService) Update(id string, photo *Photo) *PhotoUpdateCall { // new // contents. For example, if // updateMask -// contains `connections` -// and -// google.streetview.publish.v1.UpdatePhotoRequest.photo.connections -// is -// empty, all connections will be removed. +// contains `connections` and `UpdatePhotoRequest.photo.connections` is +// empty, +// all connections will be removed. func (c *PhotoUpdateCall) UpdateMask(updateMask string) *PhotoUpdateCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -1719,7 +1719,7 @@ func (c *PhotoUpdateCall) Do(opts ...googleapi.CallOption) (*Photo, error) { } return ret, nil // { - // "description": "Updates the metadata of a Photo, such\nas pose, place association, connections, etc. Changing the pixels of a\nphoto is not supported.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.PERMISSION_DENIED if the requesting user did not\ncreate the requested photo.\n* google.rpc.Code.INVALID_ARGUMENT if the request is malformed.\n* google.rpc.Code.NOT_FOUND if the requested photo does not exist.", + // "description": "Updates the metadata of a Photo, such\nas pose, place association, connections, etc. Changing the pixels of a\nphoto is not supported.\n\nOnly the fields specified in\nupdateMask\nfield are used. If `updateMask` is not present, the update applies to all\nfields.\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e To update\nPose.altitude,\nPose.latLngPair has to be\nfilled as well. Otherwise, the request will fail.\u003c/aside\u003e\n\nThis method returns the following error codes:\n\n* google.rpc.Code.PERMISSION_DENIED if the requesting user did not\ncreate the requested photo.\n* google.rpc.Code.INVALID_ARGUMENT if the request is malformed.\n* google.rpc.Code.NOT_FOUND if the requested photo does not exist.", // "flatPath": "v1/photo/{id}", // "httpMethod": "PUT", // "id": "streetviewpublish.photo.update", @@ -1728,13 +1728,13 @@ func (c *PhotoUpdateCall) Do(opts ...googleapi.CallOption) (*Photo, error) { // ], // "parameters": { // "id": { - // "description": "Required. A base64 encoded identifier.", + // "description": "Required. A unique identifier for a photo.", // "location": "path", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "Mask that identifies fields on the photo metadata to update.\nIf not present, the old Photo metadata will be entirely replaced with the\nnew Photo metadata in this request. The update fails if invalid fields are\nspecified. Multiple fields can be specified in a comma-delimited list.\n\nThe following fields are valid:\n\n* `pose.heading`\n* `pose.latlngpair`\n* `pose.pitch`\n* `pose.roll`\n* `pose.level`\n* `pose.altitude`\n* `connections`\n* `places`\n\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e Repeated fields in\nupdateMask\nmean the entire set of repeated values will be replaced with the new\ncontents. For example, if\nupdateMask\ncontains `connections` and\ngoogle.streetview.publish.v1.UpdatePhotoRequest.photo.connections is\nempty, all connections will be removed.\u003c/aside\u003e", + // "description": "Mask that identifies fields on the photo metadata to update.\nIf not present, the old Photo metadata will be entirely replaced with the\nnew Photo metadata in this request. The update fails if invalid fields are\nspecified. Multiple fields can be specified in a comma-delimited list.\n\nThe following fields are valid:\n\n* `pose.heading`\n* `pose.latLngPair`\n* `pose.pitch`\n* `pose.roll`\n* `pose.level`\n* `pose.altitude`\n* `connections`\n* `places`\n\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e Repeated fields in\nupdateMask\nmean the entire set of repeated values will be replaced with the new\ncontents. For example, if\nupdateMask\ncontains `connections` and `UpdatePhotoRequest.photo.connections` is empty,\nall connections will be removed.\u003c/aside\u003e", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -1764,7 +1764,8 @@ type PhotosBatchDeleteCall struct { header_ http.Header } -// BatchDelete: Deletes a list of Photos and their metadata. +// BatchDelete: Deletes a list of Photos and their +// metadata. // // Note that if // BatchDeletePhotos @@ -1872,7 +1873,7 @@ func (c *PhotosBatchDeleteCall) Do(opts ...googleapi.CallOption) (*BatchDeletePh } return ret, nil // { - // "description": "Deletes a list of Photos and their metadata.\n\nNote that if\nBatchDeletePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchDeletePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchDeletePhotosResponse.results.\nSee\nDeletePhoto\nfor specific failures that can occur per photo.", + // "description": "Deletes a list of Photos and their\nmetadata.\n\nNote that if\nBatchDeletePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchDeletePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchDeletePhotosResponse.results.\nSee\nDeletePhoto\nfor specific failures that can occur per photo.", // "flatPath": "v1/photos:batchDelete", // "httpMethod": "POST", // "id": "streetviewpublish.photos.batchDelete", @@ -2105,6 +2106,18 @@ type PhotosBatchUpdateCall struct { // Up // datePhoto // for specific failures that can occur per photo. +// +// Only the fields specified in +// updateMask +// field are used. If `updateMask` is not present, the update applies to +// all +// fields. +// +// func (r *PhotosService) BatchUpdate(batchupdatephotosrequest *BatchUpdatePhotosRequest) *PhotosBatchUpdateCall { c := &PhotosBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.batchupdatephotosrequest = batchupdatephotosrequest @@ -2194,7 +2207,7 @@ func (c *PhotosBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdatePh } return ret, nil // { - // "description": "Updates the metadata of Photos, such\nas pose, place association, connections, etc. Changing the pixels of photos\nis not supported.\n\nNote that if\nBatchUpdatePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchUpdatePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchUpdatePhotosResponse.results.\nSee\nUpdatePhoto\nfor specific failures that can occur per photo.", + // "description": "Updates the metadata of Photos, such\nas pose, place association, connections, etc. Changing the pixels of photos\nis not supported.\n\nNote that if\nBatchUpdatePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchUpdatePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchUpdatePhotosResponse.results.\nSee\nUpdatePhoto\nfor specific failures that can occur per photo.\n\nOnly the fields specified in\nupdateMask\nfield are used. If `updateMask` is not present, the update applies to all\nfields.\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e To update\nPose.altitude,\nPose.latLngPair has to be\nfilled as well. Otherwise, the request will fail.\u003c/aside\u003e", // "flatPath": "v1/photos:batchUpdate", // "httpMethod": "POST", // "id": "streetviewpublish.photos.batchUpdate", @@ -2224,7 +2237,8 @@ type PhotosListCall struct { header_ http.Header } -// List: Lists all the Photos that belong to the user. +// List: Lists all the Photos that belong to +// the user. func (r *PhotosService) List() *PhotosListCall { c := &PhotosListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -2365,7 +2379,7 @@ func (c *PhotosListCall) Do(opts ...googleapi.CallOption) (*ListPhotosResponse, } return ret, nil // { - // "description": "Lists all the Photos that belong to the user.", + // "description": "Lists all the Photos that belong to\nthe user.", // "flatPath": "v1/photos", // "httpMethod": "GET", // "id": "streetviewpublish.photos.list", diff --git a/vendor/google.golang.org/api/testing/v1/testing-api.json b/vendor/google.golang.org/api/testing/v1/testing-api.json new file mode 100644 index 000000000..5eb6b51f5 --- /dev/null +++ b/vendor/google.golang.org/api/testing/v1/testing-api.json @@ -0,0 +1,1347 @@ +{ + "version": "v1", + "baseUrl": "https://testing.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "servicePath": "", + "description": "Allows developers to run automated tests for their mobile applications on Google infrastructure.", + "kind": "discovery#restDescription", + "rootUrl": "https://testing.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "testing", + "batchPath": "batch", + "id": "testing:v1", + "documentationLink": "https://developers.google.com/cloud-test-lab/", + "revision": "20170911", + "title": "Google Cloud Testing API", + "discoveryVersion": "v1", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "testMatrices": { + "methods": { + "get": { + "flatPath": "v1/projects/{projectId}/testMatrices/{testMatrixId}", + "id": "testing.projects.testMatrices.get", + "path": "v1/projects/{projectId}/testMatrices/{testMatrixId}", + "description": "Check the status of a test matrix.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project\n- INVALID_ARGUMENT - if the request is malformed\n- NOT_FOUND - if the Test Matrix does not exist", + "response": { + "$ref": "TestMatrix" + }, + "parameterOrder": [ + "projectId", + "testMatrixId" + ], + "httpMethod": "GET", + "parameters": { + "projectId": { + "location": "path", + "description": "Cloud project that owns the test matrix.", + "type": "string", + "required": true + }, + "testMatrixId": { + "description": "Unique test matrix id which was assigned by the service.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "create": { + "description": "Request to run a matrix of tests according to the given specifications.\nUnsupported environments will be returned in the state UNSUPPORTED.\nMatrices are limited to at most 200 supported executions.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project\n- INVALID_ARGUMENT - if the request is malformed or if the matrix expands\n to more than 200 supported executions", + "request": { + "$ref": "TestMatrix" + }, + "response": { + "$ref": "TestMatrix" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "parameters": { + "requestId": { + "location": "query", + "description": "A string id used to detect duplicated requests.\nIds are automatically scoped to a project, so\nusers should ensure the ID is unique per-project.\nA UUID is recommended.\n\nOptional, but strongly recommended.", + "type": "string" + }, + "projectId": { + "description": "The GCE project under which this job will run.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/testMatrices", + "id": "testing.projects.testMatrices.create", + "path": "v1/projects/{projectId}/testMatrices" + }, + "cancel": { + "description": "Cancels unfinished test executions in a test matrix.\nThis call returns immediately and cancellation proceeds asychronously.\nIf the matrix is already final, this operation will have no effect.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project\n- INVALID_ARGUMENT - if the request is malformed\n- NOT_FOUND - if the Test Matrix does not exist", + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "testMatrixId" + ], + "response": { + "$ref": "CancelTestMatrixResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "Cloud project that owns the test.", + "type": "string", + "required": true, + "location": "path" + }, + "testMatrixId": { + "location": "path", + "description": "Test matrix that will be canceled.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel", + "path": "v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel", + "id": "testing.projects.testMatrices.cancel" + } + } + } + } + }, + "testEnvironmentCatalog": { + "methods": { + "get": { + "description": "Get the catalog of supported test environments.\n\nMay return any of the following canonical error codes:\n\n- INVALID_ARGUMENT - if the request is malformed\n- NOT_FOUND - if the environment type does not exist\n- INTERNAL - if an internal error occurred", + "response": { + "$ref": "TestEnvironmentCatalog" + }, + "parameterOrder": [ + "environmentType" + ], + "httpMethod": "GET", + "parameters": { + "projectId": { + "location": "query", + "description": "For authorization, the cloud project requesting the TestEnvironmentCatalog.\nOptional", + "type": "string" + }, + "environmentType": { + "location": "path", + "enum": [ + "ENVIRONMENT_TYPE_UNSPECIFIED", + "ANDROID", + "NETWORK_CONFIGURATION" + ], + "description": "The type of environment that should be listed.\nRequired", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/testEnvironmentCatalog/{environmentType}", + "id": "testing.testEnvironmentCatalog.get", + "path": "v1/testEnvironmentCatalog/{environmentType}" + } + } + } + }, + "parameters": { + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "type": "string", + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "key": { + "type": "string", + "location": "query", + "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." + } + }, + "schemas": { + "EnvironmentMatrix": { + "description": "The matrix of environments in which the test is to be executed.", + "type": "object", + "properties": { + "androidDeviceList": { + "$ref": "AndroidDeviceList", + "description": "A list of Android devices; the test will be run only on the specified\ndevices." + }, + "androidMatrix": { + "description": "A matrix of Android devices.", + "$ref": "AndroidMatrix" + } + }, + "id": "EnvironmentMatrix" + }, + "CancelTestMatrixResponse": { + "description": "Response containing the current state of the specified test matrix.", + "type": "object", + "properties": { + "testState": { + "enumDescriptions": [ + "Do not use. For proto versioning only.", + "The execution or matrix is being validated.", + "The execution or matrix is waiting for resources to become available.", + "The execution is currently being processed.\n\nCan only be set on an execution.", + "The execution or matrix has terminated normally.\n\nOn a matrix this means that the matrix level processing completed normally,\nbut individual executions may be in an ERROR state.", + "The execution or matrix has stopped because it encountered an\ninfrastructure failure.", + "The execution was not run because it corresponds to a unsupported\nenvironment.\n\nCan only be set on an execution.", + "The execution was not run because the provided inputs are incompatible with\nthe requested environment.\n\nExample: requested AndroidVersion is lower than APK's minSdkVersion\n\nCan only be set on an execution.", + "The execution was not run because the provided inputs are incompatible with\nthe requested architecture.\n\nExample: requested device does not support running the native code in\nthe supplied APK\n\nCan only be set on an execution.", + "The user cancelled the execution.\n\nCan only be set on an execution.", + "The execution or matrix was not run because the provided inputs are not\nvalid.\n\nExamples: input file is not of the expected type, is malformed/corrupt, or\nwas flagged as malware" + ], + "enum": [ + "TEST_STATE_UNSPECIFIED", + "VALIDATING", + "PENDING", + "RUNNING", + "FINISHED", + "ERROR", + "UNSUPPORTED_ENVIRONMENT", + "INCOMPATIBLE_ENVIRONMENT", + "INCOMPATIBLE_ARCHITECTURE", + "CANCELLED", + "INVALID" + ], + "description": "The current rolled-up state of the test matrix.\nIf this state is already final, then the cancelation request will\nhave no effect.", + "type": "string" + } + }, + "id": "CancelTestMatrixResponse" + }, + "Date": { + "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", + "type": "object", + "properties": { + "month": { + "format": "int32", + "description": "Month of year. Must be from 1 to 12.", + "type": "integer" + }, + "day": { + "type": "integer", + "format": "int32", + "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant." + }, + "year": { + "format": "int32", + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "type": "integer" + } + }, + "id": "Date" + }, + "Locale": { + "description": "A location/region designation for language.", + "type": "object", + "properties": { + "name": { + "description": "A human-friendly name for this language/locale.\nExample: \"English\"\n@OutputOnly", + "type": "string" + }, + "tags": { + "description": "Tags for this dimension.\nExamples: \"default\"", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "The id for this locale.\nExample: \"en_US\"\n@OutputOnly", + "type": "string" + }, + "region": { + "description": "A human-friendy string representing the region for this locale.\nExample: \"United States\"\nNot present for every locale.\n@OutputOnly", + "type": "string" + } + }, + "id": "Locale" + }, + "TestEnvironmentCatalog": { + "type": "object", + "properties": { + "androidDeviceCatalog": { + "description": "Android devices suitable for running Android Instrumentation Tests.", + "$ref": "AndroidDeviceCatalog" + }, + "networkConfigurationCatalog": { + "$ref": "NetworkConfigurationCatalog", + "description": "Supported network configurations" + } + }, + "id": "TestEnvironmentCatalog", + "description": "A description of a test environment." + }, + "Account": { + "description": "Identifies an account and how to log into it", + "type": "object", + "properties": { + "googleAuto": { + "$ref": "GoogleAuto", + "description": "An automatic google login account" + } + }, + "id": "Account" + }, + "ObbFile": { + "id": "ObbFile", + "description": "An opaque binary blob file to install on the device before the test starts", + "type": "object", + "properties": { + "obb": { + "description": "Opaque Binary Blob (OBB) file(s) to install on the device\nRequired", + "$ref": "FileReference" + }, + "obbFileName": { + "description": "OBB file name which must conform to the format as specified by\nAndroid\ne.g. [main|patch].0300110.com.example.android.obb\nwhich will be installed into\n \u003cshared-storage\u003e/Android/obb/\u003cpackage-name\u003e/\non the device\nRequired", + "type": "string" + } + } + }, + "AndroidRuntimeConfiguration": { + "properties": { + "orientations": { + "items": { + "$ref": "Orientation" + }, + "type": "array", + "description": "The set of available orientations.\n@OutputOnly" + }, + "locales": { + "description": "The set of available locales.\n@OutputOnly", + "items": { + "$ref": "Locale" + }, + "type": "array" + } + }, + "id": "AndroidRuntimeConfiguration", + "description": "Configuration that can be selected at the time a test is run.", + "type": "object" + }, + "AndroidDevice": { + "type": "object", + "properties": { + "locale": { + "description": "The locale the test device used for testing.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", + "type": "string" + }, + "androidVersionId": { + "description": "The id of the Android OS version to be used.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", + "type": "string" + }, + "androidModelId": { + "description": "The id of the Android device to be used.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", + "type": "string" + }, + "orientation": { + "type": "string", + "description": "How the device is oriented during the test.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired" + } + }, + "id": "AndroidDevice", + "description": "A single Android device." + }, + "NetworkConfiguration": { + "type": "object", + "properties": { + "upRule": { + "$ref": "TrafficRule", + "description": "The emulation rule applying to the upload traffic" + }, + "downRule": { + "$ref": "TrafficRule", + "description": "The emulation rule applying to the download traffic" + }, + "id": { + "description": "The unique opaque id for this network traffic configuration\n@OutputOnly", + "type": "string" + } + }, + "id": "NetworkConfiguration" + }, + "ToolResultsStep": { + "description": "Represents a tool results step resource.\n\nThis has the results of a TestExecution.", + "type": "object", + "properties": { + "stepId": { + "description": "A tool results step ID.\n@OutputOnly", + "type": "string" + }, + "historyId": { + "description": "A tool results history ID.\n@OutputOnly", + "type": "string" + }, + "projectId": { + "type": "string", + "description": "The cloud project that owns the tool results step.\n@OutputOnly" + }, + "executionId": { + "description": "A tool results execution ID.\n@OutputOnly", + "type": "string" + } + }, + "id": "ToolResultsStep" + }, + "TrafficRule": { + "description": "Network emulation parameters", + "type": "object", + "properties": { + "packetLossRatio": { + "format": "float", + "description": "Packet loss ratio (0.0 - 1.0)", + "type": "number" + }, + "burst": { + "format": "float", + "description": "Burst size in kbits", + "type": "number" + }, + "bandwidth": { + "type": "number", + "format": "float", + "description": "Bandwidth in kbits/second" + }, + "packetDuplicationRatio": { + "format": "float", + "description": "Packet duplication ratio (0.0 - 1.0)", + "type": "number" + }, + "delay": { + "type": "string", + "format": "google-duration", + "description": "Packet delay, must be \u003e= 0" + } + }, + "id": "TrafficRule" + }, + "AndroidInstrumentationTest": { + "properties": { + "orchestratorOption": { + "type": "string", + "enumDescriptions": [ + "This means that the server should choose the mode. And test will be run\nwithout orchestrator.\nUsing orchestrator is highly encouraged because of all the benefits it\noffers. And in the future, all instrumentation tests will be run with\norchestrator by default if preference unspecified.", + "Run test using orchestrator.\n** Only compatible with AndroidJUnitRunner version 1.0 or higher! **\nRecommended.", + "Run test without using orchestrator." + ], + "enum": [ + "ORCHESTRATOR_OPTION_UNSPECIFIED", + "USE_ORCHESTRATOR", + "DO_NOT_USE_ORCHESTRATOR" + ], + "description": "The option of whether running each test within its own invocation of\ninstrumentation with Android Test Orchestrator or not.\n** Orchestrator is only compatible with AndroidJUnitRunner version 1.0 or\nhigher! **\nOrchestrator offers the following benefits:\n - No shared state\n - Crashes are isolated\n - Logs are scoped per test\n\nSee\n\u003chttps://developer.android.com/training/testing/junit-runner.html#using-android-test-orchestrator\u003e\nfor more information about Android Test Orchestrator.\n\nOptional, if empty, test will be run without orchestrator." + }, + "testTargets": { + "description": "Each target must be fully qualified with the package name or class name,\nin one of these formats:\n - \"package package_name\"\n - \"class package_name.class_name\"\n - \"class package_name.class_name#method_name\"\n\nOptional, if empty, all targets in the module will be run.", + "items": { + "type": "string" + }, + "type": "array" + }, + "testApk": { + "$ref": "FileReference", + "description": "The APK containing the test code to be executed.\nRequired" + }, + "testRunnerClass": { + "description": "The InstrumentationTestRunner class.\nOptional, default is determined by examining the application's manifest.", + "type": "string" + }, + "testPackageId": { + "description": "The java package for the test to be executed.\nOptional, default is determined by examining the application's manifest.", + "type": "string" + }, + "appPackageId": { + "description": "The java package for the application under test.\nOptional, default is determined by examining the application's manifest.", + "type": "string" + }, + "appApk": { + "$ref": "FileReference", + "description": "The APK for the application under test.\nRequired" + } + }, + "id": "AndroidInstrumentationTest", + "description": "A test of an Android application that can control an Android component\nindependently of its normal lifecycle.\nAndroid instrumentation tests run an application APK and test APK inside the\nsame process on a virtual or physical AndroidDevice. They also specify\na test runner class, such as com.google.GoogleTestRunner, which can vary\non the specific instrumentation framework chosen.\n\nSee \u003chttp://developer.android.com/tools/testing/testing_android.html\u003e for\nmore information on types of Android tests.", + "type": "object" + }, + "DeviceFile": { + "description": "A single device file description.", + "type": "object", + "properties": { + "obbFile": { + "description": "A reference to an opaque binary blob file", + "$ref": "ObbFile" + } + }, + "id": "DeviceFile" + }, + "ClientInfoDetail": { + "description": "Key-value pair of detailed information about the client which invoked the\ntest. For example {'Version', '1.0'}, {'Release Track', 'BETA'}", + "type": "object", + "properties": { + "value": { + "description": "The value of detailed client information.\nRequired", + "type": "string" + }, + "key": { + "description": "The key of detailed client information.\nRequired", + "type": "string" + } + }, + "id": "ClientInfoDetail" + }, + "EnvironmentVariable": { + "type": "object", + "properties": { + "key": { + "description": "Key for the environment variable", + "type": "string" + }, + "value": { + "description": "Value for the environment variable", + "type": "string" + } + }, + "id": "EnvironmentVariable", + "description": "A key-value pair passed as an environment variable to the test" + }, + "Environment": { + "description": "The environment in which the test is run.", + "type": "object", + "properties": { + "androidDevice": { + "description": "An Android device which must be used with an Android test.", + "$ref": "AndroidDevice" + } + }, + "id": "Environment" + }, + "TestExecution": { + "description": "Specifies a single test to be executed in a single environment.", + "type": "object", + "properties": { + "testDetails": { + "$ref": "TestDetails", + "description": "Additional details about the running test.\n@OutputOnly" + }, + "matrixId": { + "description": "Id of the containing TestMatrix.\n@OutputOnly", + "type": "string" + }, + "environment": { + "$ref": "Environment", + "description": "How the host machine(s) are configured.\n@OutputOnly" + }, + "state": { + "type": "string", + "enumDescriptions": [ + "Do not use. For proto versioning only.", + "The execution or matrix is being validated.", + "The execution or matrix is waiting for resources to become available.", + "The execution is currently being processed.\n\nCan only be set on an execution.", + "The execution or matrix has terminated normally.\n\nOn a matrix this means that the matrix level processing completed normally,\nbut individual executions may be in an ERROR state.", + "The execution or matrix has stopped because it encountered an\ninfrastructure failure.", + "The execution was not run because it corresponds to a unsupported\nenvironment.\n\nCan only be set on an execution.", + "The execution was not run because the provided inputs are incompatible with\nthe requested environment.\n\nExample: requested AndroidVersion is lower than APK's minSdkVersion\n\nCan only be set on an execution.", + "The execution was not run because the provided inputs are incompatible with\nthe requested architecture.\n\nExample: requested device does not support running the native code in\nthe supplied APK\n\nCan only be set on an execution.", + "The user cancelled the execution.\n\nCan only be set on an execution.", + "The execution or matrix was not run because the provided inputs are not\nvalid.\n\nExamples: input file is not of the expected type, is malformed/corrupt, or\nwas flagged as malware" + ], + "enum": [ + "TEST_STATE_UNSPECIFIED", + "VALIDATING", + "PENDING", + "RUNNING", + "FINISHED", + "ERROR", + "UNSUPPORTED_ENVIRONMENT", + "INCOMPATIBLE_ENVIRONMENT", + "INCOMPATIBLE_ARCHITECTURE", + "CANCELLED", + "INVALID" + ], + "description": "Indicates the current progress of the test execution (e.g., FINISHED).\n@OutputOnly" + }, + "toolResultsStep": { + "$ref": "ToolResultsStep", + "description": "Where the results for this execution are written.\n@OutputOnly" + }, + "projectId": { + "description": "The cloud project that owns the test execution.\n@OutputOnly", + "type": "string" + }, + "testSpecification": { + "$ref": "TestSpecification", + "description": "How to run the test.\n@OutputOnly" + }, + "id": { + "description": "Unique id set by the backend.\n@OutputOnly", + "type": "string" + }, + "timestamp": { + "format": "google-datetime", + "description": "The time this test execution was initially created.\n@OutputOnly", + "type": "string" + } + }, + "id": "TestExecution" + }, + "GoogleCloudStorage": { + "description": "A storage location within Google cloud storage (GCS).", + "type": "object", + "properties": { + "gcsPath": { + "description": "The path to a directory in GCS that will\neventually contain the results for this test.\nThe requesting user must have write access on the bucket in the supplied\npath.\nRequired", + "type": "string" + } + }, + "id": "GoogleCloudStorage" + }, + "RoboDirective": { + "properties": { + "inputText": { + "description": "The text that Robo is directed to set. If left empty, the directive will be\ntreated as a CLICK on the element matching the resource_name.\nOptional", + "type": "string" + }, + "resourceName": { + "description": "The android resource name of the target UI element\nFor example,\n in Java: R.string.foo\n in xml: @string/foo\nOnly the “foo” part is needed.\nReference doc:\nhttps://developer.android.com/guide/topics/resources/accessing-resources.html\nRequired", + "type": "string" + }, + "actionType": { + "description": "The type of action that Robo should perform on the specified element.\nRequired.", + "type": "string", + "enumDescriptions": [ + "DO NOT USE. For proto versioning only.", + "Direct Robo to click on the specified element. No-op if specified element\nis not clickable.", + "Direct Robo to enter text on the specified element. No-op if specified\nelement is not enabled or does not allow text entry." + ], + "enum": [ + "ACTION_TYPE_UNSPECIFIED", + "SINGLE_CLICK", + "ENTER_TEXT" + ] + } + }, + "id": "RoboDirective", + "description": "Directs Robo to interact with a specific UI element if it is encountered\nduring the crawl. Currently, Robo can perform text entry or element click.", + "type": "object" + }, + "AndroidMatrix": { + "description": "A set of Android device configuration permutations is defined by the\nthe cross-product of the given axes. Internally, the given AndroidMatrix\nwill be expanded into a set of AndroidDevices.\n\nOnly supported permutations will be instantiated. Invalid permutations\n(e.g., incompatible models/versions) are ignored.", + "type": "object", + "properties": { + "androidModelIds": { + "description": "The ids of the set of Android device to be used.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", + "items": { + "type": "string" + }, + "type": "array" + }, + "orientations": { + "description": "The set of orientations to test with.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", + "items": { + "type": "string" + }, + "type": "array" + }, + "locales": { + "description": "The set of locales the test device will enable for testing.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", + "items": { + "type": "string" + }, + "type": "array" + }, + "androidVersionIds": { + "description": "The ids of the set of Android OS version to be used.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "AndroidMatrix" + }, + "AndroidModel": { + "type": "object", + "properties": { + "id": { + "description": "The unique opaque id for this model.\nUse this for invoking the TestExecutionService.\n@OutputOnly", + "type": "string" + }, + "tags": { + "description": "Tags for this dimension.\nExamples: \"default\", \"preview\", \"deprecated\"", + "items": { + "type": "string" + }, + "type": "array" + }, + "manufacturer": { + "description": "The manufacturer of this device.\n@OutputOnly", + "type": "string" + }, + "brand": { + "description": "The company that this device is branded with.\nExample: \"Google\", \"Samsung\"\n@OutputOnly", + "type": "string" + }, + "screenX": { + "format": "int32", + "description": "Screen size in the horizontal (X) dimension measured in pixels.\n@OutputOnly", + "type": "integer" + }, + "codename": { + "description": "The name of the industrial design.\nThis corresponds to android.os.Build.DEVICE\n@OutputOnly", + "type": "string" + }, + "screenY": { + "type": "integer", + "format": "int32", + "description": "Screen size in the vertical (Y) dimension measured in pixels.\n@OutputOnly" + }, + "form": { + "enum": [ + "DEVICE_FORM_UNSPECIFIED", + "VIRTUAL", + "PHYSICAL" + ], + "description": "Whether this device is virtual or physical.\n@OutputOnly", + "type": "string", + "enumDescriptions": [ + "Do not use. For proto versioning only.", + "A software stack that simulates the device", + "Actual hardware" + ] + }, + "screenDensity": { + "format": "int32", + "description": "Screen density in DPI.\nThis corresponds to ro.sf.lcd_density\n@OutputOnly", + "type": "integer" + }, + "supportedVersionIds": { + "description": "The set of Android versions this device supports.\n@OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "supportedAbis": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The list of supported ABIs for this device.\nThis corresponds to either android.os.Build.SUPPORTED_ABIS (for API level\n21 and above) or android.os.Build.CPU_ABI/CPU_ABI2.\nThe most preferred ABI is the first element in the list.\n\nElements are optionally prefixed by \"version_id:\" (where version_id is\nthe id of an AndroidVersion), denoting an ABI that is supported only on\na particular version.\n@OutputOnly" + }, + "name": { + "description": "The human-readable marketing name for this device model.\nExamples: \"Nexus 5\", \"Galaxy S5\"\n@OutputOnly", + "type": "string" + } + }, + "id": "AndroidModel", + "description": "A description of an Android device tests may be run on." + }, + "TestSetup": { + "description": "A description of how to set up the device prior to running the test", + "type": "object", + "properties": { + "filesToPush": { + "description": "Optional", + "items": { + "$ref": "DeviceFile" + }, + "type": "array" + }, + "networkProfile": { + "description": "The network traffic profile used for running the test.\nOptional", + "type": "string" + }, + "environmentVariables": { + "items": { + "$ref": "EnvironmentVariable" + }, + "type": "array", + "description": "Environment variables to set for the test (only applicable for\ninstrumentation tests)." + }, + "account": { + "$ref": "Account", + "description": "The device will be logged in on this account for the duration of the test.\nOptional" + }, + "directoriesToPull": { + "description": "The directories on the device to upload to GCS at the end of the test;\nthey must be absolute, whitelisted paths.\nRefer to RegularFile for whitelisted paths.\nOptional", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestSetup" + }, + "TestSpecification": { + "properties": { + "testSetup": { + "$ref": "TestSetup", + "description": "Test setup requirements e.g. files to install, bootstrap scripts\nOptional" + }, + "androidRoboTest": { + "description": "An Android robo test.", + "$ref": "AndroidRoboTest" + }, + "androidTestLoop": { + "description": "An Android Application with a Test Loop", + "$ref": "AndroidTestLoop" + }, + "androidInstrumentationTest": { + "$ref": "AndroidInstrumentationTest", + "description": "An Android instrumentation test." + }, + "disablePerformanceMetrics": { + "description": "Disables performance metrics recording; may reduce test latency.", + "type": "boolean" + }, + "disableVideoRecording": { + "description": "Disables video recording; may reduce test latency.", + "type": "boolean" + }, + "testTimeout": { + "format": "google-duration", + "description": "Max time a test execution is allowed to run before it is\nautomatically cancelled.\nOptional, default is 5 min.", + "type": "string" + }, + "autoGoogleLogin": { + "description": "Enables automatic Google account login.\nIf set, the service will automatically generate a Google test account and\nadd it to the device, before executing the test. Note that test accounts\nmight be reused.\nMany applications show their full set of functionalities when an account is\npresent on the device. Logging into the device with these generated\naccounts allows testing more functionalities.\nDefault is false.\nOptional", + "type": "boolean" + } + }, + "id": "TestSpecification", + "description": "A description of how to run the test.", + "type": "object" + }, + "TestMatrix": { + "type": "object", + "properties": { + "timestamp": { + "format": "google-datetime", + "description": "The time this test matrix was initially created.\n@OutputOnly", + "type": "string" + }, + "environmentMatrix": { + "$ref": "EnvironmentMatrix", + "description": "How the host machine(s) are configured.\nRequired" + }, + "testMatrixId": { + "description": "Unique id set by the service.\n@OutputOnly", + "type": "string" + }, + "resultStorage": { + "description": "Where the results for the matrix are written.\nRequired", + "$ref": "ResultStorage" + }, + "invalidMatrixDetails": { + "description": "Describes why the matrix is considered invalid.\nOnly useful for matrices in the INVALID state.\n@OutputOnly", + "type": "string", + "enumDescriptions": [ + "Do not use. For proto versioning only.", + "The matrix is INVALID, but there are no further details available.", + "The input app APK could not be parsed.", + "The input test APK could not be parsed.", + "The AndroidManifest.xml could not be found.", + "The APK manifest does not declare a package name.", + "The test package and app package are the same.", + "The test apk does not declare an instrumentation.", + "The input app apk does not have a signature.", + "The test runner class specified by user or in the test APK's manifest file\nis not compatible with Android Test Orchestrator.\nOrchestrator is only compatible with AndroidJUnitRunner version 1.0 or\nhigher.\nOrchestrator can be disabled by using DO_NOT_USE_ORCHESTRATOR\nOrchestratorOption.", + "The test APK does not contain the test runner class specified by user or in\nthe manifest file.\nThis can be caused by either of the following reasons:\n- the user provided a runner class name that's incorrect, or\n- the test runner isn't built into the test APK (might be in the app APK\ninstead).", + "A main launcher activity could not be found.", + "The app declares one or more permissions that are not allowed.", + "There is a conflict in the provided robo_directives.", + "There there is no test loop intent filter, or the one that is given is\nnot formatted correctly.", + "The request contains a scenario label that was not declared in the\nmanifest.", + "There was an error when parsing a label's value.", + "The request contains a scenario number that was not declared in the\nmanifest.", + "Device administrator applications are not allowed.", + "The APK is marked as \"testOnly\"." + ], + "enum": [ + "INVALID_MATRIX_DETAILS_UNSPECIFIED", + "DETAILS_UNAVAILABLE", + "MALFORMED_APK", + "MALFORMED_TEST_APK", + "NO_MANIFEST", + "NO_PACKAGE_NAME", + "TEST_SAME_AS_APP", + "NO_INSTRUMENTATION", + "NO_SIGNATURE", + "INSTRUMENTATION_ORCHESTRATOR_INCOMPATIBLE", + "NO_TEST_RUNNER_CLASS", + "NO_LAUNCHER_ACTIVITY", + "FORBIDDEN_PERMISSIONS", + "INVALID_ROBO_DIRECTIVES", + "TEST_LOOP_INTENT_FILTER_NOT_FOUND", + "SCENARIO_LABEL_NOT_DECLARED", + "SCENARIO_LABEL_MALFORMED", + "SCENARIO_NOT_DECLARED", + "DEVICE_ADMIN_RECEIVER", + "TEST_ONLY_APK" + ] + }, + "state": { + "type": "string", + "enumDescriptions": [ + "Do not use. For proto versioning only.", + "The execution or matrix is being validated.", + "The execution or matrix is waiting for resources to become available.", + "The execution is currently being processed.\n\nCan only be set on an execution.", + "The execution or matrix has terminated normally.\n\nOn a matrix this means that the matrix level processing completed normally,\nbut individual executions may be in an ERROR state.", + "The execution or matrix has stopped because it encountered an\ninfrastructure failure.", + "The execution was not run because it corresponds to a unsupported\nenvironment.\n\nCan only be set on an execution.", + "The execution was not run because the provided inputs are incompatible with\nthe requested environment.\n\nExample: requested AndroidVersion is lower than APK's minSdkVersion\n\nCan only be set on an execution.", + "The execution was not run because the provided inputs are incompatible with\nthe requested architecture.\n\nExample: requested device does not support running the native code in\nthe supplied APK\n\nCan only be set on an execution.", + "The user cancelled the execution.\n\nCan only be set on an execution.", + "The execution or matrix was not run because the provided inputs are not\nvalid.\n\nExamples: input file is not of the expected type, is malformed/corrupt, or\nwas flagged as malware" + ], + "enum": [ + "TEST_STATE_UNSPECIFIED", + "VALIDATING", + "PENDING", + "RUNNING", + "FINISHED", + "ERROR", + "UNSUPPORTED_ENVIRONMENT", + "INCOMPATIBLE_ENVIRONMENT", + "INCOMPATIBLE_ARCHITECTURE", + "CANCELLED", + "INVALID" + ], + "description": "Indicates the current progress of the test matrix (e.g., FINISHED)\n@OutputOnly" + }, + "projectId": { + "description": "The cloud project that owns the test matrix.\n@OutputOnly", + "type": "string" + }, + "testSpecification": { + "$ref": "TestSpecification", + "description": "How to run the test.\nRequired" + }, + "clientInfo": { + "description": "Information about the client which invoked the test.\nOptional", + "$ref": "ClientInfo" + }, + "testExecutions": { + "description": "The list of test executions that the service creates for this matrix.\n@OutputOnly", + "items": { + "$ref": "TestExecution" + }, + "type": "array" + } + }, + "id": "TestMatrix", + "description": "A group of one or more TestExecutions, built by taking a\nproduct of values over a pre-defined set of axes." + }, + "ResultStorage": { + "description": "Locations where the results of running the test are stored.", + "type": "object", + "properties": { + "googleCloudStorage": { + "$ref": "GoogleCloudStorage", + "description": "Required." + }, + "toolResultsExecution": { + "description": "The tool results execution that results are written to.\n@OutputOnly", + "$ref": "ToolResultsExecution" + }, + "toolResultsHistory": { + "description": "The tool results history that contains the tool results execution that\nresults are written to.\n\nOptional, if not provided the service will choose an appropriate value.", + "$ref": "ToolResultsHistory" + } + }, + "id": "ResultStorage" + }, + "AndroidVersion": { + "description": "A version of the Android OS", + "type": "object", + "properties": { + "apiLevel": { + "format": "int32", + "description": "The API level for this Android version.\nExamples: 18, 19\n@OutputOnly", + "type": "integer" + }, + "distribution": { + "description": "Market share for this version.\n@OutputOnly", + "$ref": "Distribution" + }, + "tags": { + "description": "Tags for this dimension.\nExamples: \"default\", \"preview\", \"deprecated\"", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "An opaque id for this Android version.\nUse this id to invoke the TestExecutionService.\n@OutputOnly", + "type": "string" + }, + "releaseDate": { + "$ref": "Date", + "description": "The date this Android version became available in the market.\n@OutputOnly" + }, + "versionString": { + "description": "A string representing this version of the Android OS.\nExamples: \"4.3\", \"4.4\"\n@OutputOnly", + "type": "string" + }, + "codeName": { + "description": "The code name for this Android version.\nExamples: \"JellyBean\", \"KitKat\"\n@OutputOnly", + "type": "string" + } + }, + "id": "AndroidVersion" + }, + "FileReference": { + "description": "A reference to a file, used for user inputs.", + "type": "object", + "properties": { + "gcsPath": { + "description": "A path to a file in Google Cloud Storage.\nExample: gs://build-app-1414623860166/app-debug-unaligned.apk", + "type": "string" + } + }, + "id": "FileReference" + }, + "TestDetails": { + "description": "Additional details about the progress of the running test.", + "type": "object", + "properties": { + "errorMessage": { + "description": "If the TestState is ERROR, then this string will contain human-readable\ndetails about the error.\n@OutputOnly", + "type": "string" + }, + "progressMessages": { + "description": "Human-readable, detailed descriptions of the test's progress.\nFor example: \"Provisioning a device\", \"Starting Test\".\n\nDuring the course of execution new data may be appended\nto the end of progress_messages.\n@OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestDetails" + }, + "ToolResultsExecution": { + "properties": { + "historyId": { + "description": "A tool results history ID.\n@OutputOnly", + "type": "string" + }, + "projectId": { + "description": "The cloud project that owns the tool results execution.\n@OutputOnly", + "type": "string" + }, + "executionId": { + "description": "A tool results execution ID.\n@OutputOnly", + "type": "string" + } + }, + "id": "ToolResultsExecution", + "description": "Represents a tool results execution resource.\n\nThis has the results of a TestMatrix.", + "type": "object" + }, + "ToolResultsHistory": { + "properties": { + "historyId": { + "description": "A tool results history ID.\nRequired", + "type": "string" + }, + "projectId": { + "description": "The cloud project that owns the tool results history.\nRequired", + "type": "string" + } + }, + "id": "ToolResultsHistory", + "description": "Represents a tool results history resource.", + "type": "object" + }, + "AndroidRoboTest": { + "description": "A test of an android application that explores the application on a virtual\nor physical Android Device, finding culprits and crashes as it goes.", + "type": "object", + "properties": { + "maxDepth": { + "format": "int32", + "description": "The max depth of the traversal stack Robo can explore. Needs to be at least\n2 to make Robo explore the app beyond the first activity.\nDefault is 50.\nOptional", + "type": "integer" + }, + "appApk": { + "$ref": "FileReference", + "description": "The APK for the application under test.\nRequired" + }, + "appPackageId": { + "description": "The java package for the application under test.\nOptional, default is determined by examining the application's manifest.", + "type": "string" + }, + "maxSteps": { + "format": "int32", + "description": "The max number of steps Robo can execute.\nDefault is no limit.\nOptional", + "type": "integer" + }, + "appInitialActivity": { + "description": "The initial activity that should be used to start the app.\nOptional", + "type": "string" + }, + "roboDirectives": { + "description": "A set of directives Robo should apply during the crawl.\nThis allows users to customize the crawl. For example, the username and\npassword for a test account can be provided.\nOptional", + "items": { + "$ref": "RoboDirective" + }, + "type": "array" + } + }, + "id": "AndroidRoboTest" + }, + "Distribution": { + "description": "Data about the relative number of devices running a\ngiven configuration of the Android platform.", + "type": "object", + "properties": { + "marketShare": { + "format": "double", + "description": "The estimated fraction (0-1) of the total market with this configuration.\n@OutputOnly", + "type": "number" + }, + "measurementTime": { + "format": "google-datetime", + "description": "The time this distribution was measured.\n@OutputOnly", + "type": "string" + } + }, + "id": "Distribution" + }, + "Orientation": { + "id": "Orientation", + "description": "Screen orientation of the device.", + "type": "object", + "properties": { + "tags": { + "description": "Tags for this dimension.\nExamples: \"default\"", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "The id for this orientation.\nExample: \"portrait\"\n@OutputOnly", + "type": "string" + }, + "name": { + "description": "A human-friendly name for this orientation.\nExample: \"portrait\"\n@OutputOnly", + "type": "string" + } + } + }, + "NetworkConfigurationCatalog": { + "type": "object", + "properties": { + "configurations": { + "items": { + "$ref": "NetworkConfiguration" + }, + "type": "array" + } + }, + "id": "NetworkConfigurationCatalog" + }, + "AndroidTestLoop": { + "description": "A test of an Android Application with a Test Loop.\nThe intent \u003cintent-name\u003e will be implicitly added, since Games is the only\nuser of this api, for the time being.", + "type": "object", + "properties": { + "scenarioLabels": { + "description": "The list of scenario labels that should be run during the test.\nThe scenario labels should map to labels defined in the application's\nmanifest. For example, player_experience and\ncom.google.test.loops.player_experience add all of the loops labeled in the\nmanifest with the com.google.test.loops.player_experience name to the\nexecution.\nOptional. Scenarios can also be specified in the scenarios field.", + "items": { + "type": "string" + }, + "type": "array" + }, + "scenarios": { + "description": "The list of scenarios that should be run during the test.\nOptional, default is all test loops, derived from the application's\nmanifest.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "appPackageId": { + "description": "The java package for the application under test.\nOptional, default is determined by examining the application's manifest.", + "type": "string" + }, + "appApk": { + "description": "The APK for the application under test.\nRequired", + "$ref": "FileReference" + } + }, + "id": "AndroidTestLoop" + }, + "GoogleAuto": { + "id": "GoogleAuto", + "description": "Enables automatic Google account login.\nIf set, the service will automatically generate a Google test account and add\nit to the device, before executing the test. Note that test accounts might be\nreused.\nMany applications show their full set of functionalities when an account is\npresent on the device. Logging into the device with these generated accounts\nallows testing more functionalities.", + "type": "object", + "properties": {} + }, + "AndroidDeviceCatalog": { + "description": "The currently supported Android devices.", + "type": "object", + "properties": { + "runtimeConfiguration": { + "$ref": "AndroidRuntimeConfiguration", + "description": "The set of supported runtime configurations.\n@OutputOnly" + }, + "versions": { + "description": "The set of supported Android OS versions.\n@OutputOnly", + "items": { + "$ref": "AndroidVersion" + }, + "type": "array" + }, + "models": { + "items": { + "$ref": "AndroidModel" + }, + "type": "array", + "description": "The set of supported Android device models.\n@OutputOnly" + } + }, + "id": "AndroidDeviceCatalog" + }, + "AndroidDeviceList": { + "type": "object", + "properties": { + "androidDevices": { + "items": { + "$ref": "AndroidDevice" + }, + "type": "array", + "description": "A list of Android devices\nRequired" + } + }, + "id": "AndroidDeviceList", + "description": "A list of Android device configurations in which the test is to be executed." + }, + "ClientInfo": { + "description": "Information about the client which invoked the test.", + "type": "object", + "properties": { + "clientInfoDetails": { + "description": "The list of detailed information about client.", + "items": { + "$ref": "ClientInfoDetail" + }, + "type": "array" + }, + "name": { + "description": "Client name, such as gcloud.\nRequired", + "type": "string" + } + }, + "id": "ClientInfo" + } + }, + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "protocol": "rest" +} diff --git a/vendor/google.golang.org/api/testing/v1/testing-gen.go b/vendor/google.golang.org/api/testing/v1/testing-gen.go new file mode 100644 index 000000000..60a6a2388 --- /dev/null +++ b/vendor/google.golang.org/api/testing/v1/testing-gen.go @@ -0,0 +1,2782 @@ +// Package testing provides access to the Google Cloud Testing API. +// +// See https://developers.google.com/cloud-test-lab/ +// +// Usage example: +// +// import "google.golang.org/api/testing/v1" +// ... +// testingService, err := testing.New(oauthHttpClient) +package testing // import "google.golang.org/api/testing/v1" + +import ( + "bytes" + "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" +) + +// 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 = "testing:v1" +const apiName = "testing" +const apiVersion = "v1" +const basePath = "https://testing.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 your data across Google Cloud Platform services + CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" +) + +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + s.TestEnvironmentCatalog = NewTestEnvironmentCatalogService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService + + TestEnvironmentCatalog *TestEnvironmentCatalogService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.TestMatrices = NewProjectsTestMatricesService(s) + return rs +} + +type ProjectsService struct { + s *Service + + TestMatrices *ProjectsTestMatricesService +} + +func NewProjectsTestMatricesService(s *Service) *ProjectsTestMatricesService { + rs := &ProjectsTestMatricesService{s: s} + return rs +} + +type ProjectsTestMatricesService struct { + s *Service +} + +func NewTestEnvironmentCatalogService(s *Service) *TestEnvironmentCatalogService { + rs := &TestEnvironmentCatalogService{s: s} + return rs +} + +type TestEnvironmentCatalogService struct { + s *Service +} + +// Account: Identifies an account and how to log into it +type Account struct { + // GoogleAuto: An automatic google login account + GoogleAuto *GoogleAuto `json:"googleAuto,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GoogleAuto") 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. "GoogleAuto") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Account) MarshalJSON() ([]byte, error) { + type noMethod Account + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AndroidDevice: A single Android device. +type AndroidDevice struct { + // AndroidModelId: The id of the Android device to be used. + // Use the EnvironmentDiscoveryService to get supported + // options. + // Required + AndroidModelId string `json:"androidModelId,omitempty"` + + // AndroidVersionId: The id of the Android OS version to be used. + // Use the EnvironmentDiscoveryService to get supported + // options. + // Required + AndroidVersionId string `json:"androidVersionId,omitempty"` + + // Locale: The locale the test device used for testing. + // Use the EnvironmentDiscoveryService to get supported + // options. + // Required + Locale string `json:"locale,omitempty"` + + // Orientation: How the device is oriented during the test. + // Use the EnvironmentDiscoveryService to get supported + // options. + // Required + Orientation string `json:"orientation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AndroidModelId") 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. "AndroidModelId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AndroidDevice) MarshalJSON() ([]byte, error) { + type noMethod AndroidDevice + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AndroidDeviceCatalog: The currently supported Android devices. +type AndroidDeviceCatalog struct { + // Models: The set of supported Android device models. + // @OutputOnly + Models []*AndroidModel `json:"models,omitempty"` + + // RuntimeConfiguration: The set of supported runtime + // configurations. + // @OutputOnly + RuntimeConfiguration *AndroidRuntimeConfiguration `json:"runtimeConfiguration,omitempty"` + + // Versions: The set of supported Android OS versions. + // @OutputOnly + Versions []*AndroidVersion `json:"versions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Models") 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. "Models") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AndroidDeviceCatalog) MarshalJSON() ([]byte, error) { + type noMethod AndroidDeviceCatalog + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AndroidDeviceList: A list of Android device configurations in which +// the test is to be executed. +type AndroidDeviceList struct { + // AndroidDevices: A list of Android devices + // Required + AndroidDevices []*AndroidDevice `json:"androidDevices,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AndroidDevices") 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. "AndroidDevices") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AndroidDeviceList) MarshalJSON() ([]byte, error) { + type noMethod AndroidDeviceList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AndroidInstrumentationTest: A test of an Android application that can +// control an Android component +// independently of its normal lifecycle. +// Android instrumentation tests run an application APK and test APK +// inside the +// same process on a virtual or physical AndroidDevice. They also +// specify +// a test runner class, such as com.google.GoogleTestRunner, which can +// vary +// on the specific instrumentation framework chosen. +// +// See +// for +// more information on types of Android tests. +type AndroidInstrumentationTest struct { + // AppApk: The APK for the application under test. + // Required + AppApk *FileReference `json:"appApk,omitempty"` + + // AppPackageId: The java package for the application under + // test. + // Optional, default is determined by examining the application's + // manifest. + AppPackageId string `json:"appPackageId,omitempty"` + + // OrchestratorOption: The option of whether running each test within + // its own invocation of + // instrumentation with Android Test Orchestrator or not. + // ** Orchestrator is only compatible with AndroidJUnitRunner version + // 1.0 or + // higher! ** + // Orchestrator offers the following benefits: + // - No shared state + // - Crashes are isolated + // - Logs are scoped per + // test + // + // See + // + // for more information about Android Test Orchestrator. + // + // Optional, if empty, test will be run without orchestrator. + // + // Possible values: + // "ORCHESTRATOR_OPTION_UNSPECIFIED" - This means that the server + // should choose the mode. And test will be run + // without orchestrator. + // Using orchestrator is highly encouraged because of all the benefits + // it + // offers. And in the future, all instrumentation tests will be run + // with + // orchestrator by default if preference unspecified. + // "USE_ORCHESTRATOR" - Run test using orchestrator. + // ** Only compatible with AndroidJUnitRunner version 1.0 or higher! + // ** + // Recommended. + // "DO_NOT_USE_ORCHESTRATOR" - Run test without using orchestrator. + OrchestratorOption string `json:"orchestratorOption,omitempty"` + + // TestApk: The APK containing the test code to be executed. + // Required + TestApk *FileReference `json:"testApk,omitempty"` + + // TestPackageId: The java package for the test to be + // executed. + // Optional, default is determined by examining the application's + // manifest. + TestPackageId string `json:"testPackageId,omitempty"` + + // TestRunnerClass: The InstrumentationTestRunner class. + // Optional, default is determined by examining the application's + // manifest. + TestRunnerClass string `json:"testRunnerClass,omitempty"` + + // TestTargets: Each target must be fully qualified with the package + // name or class name, + // in one of these formats: + // - "package package_name" + // - "class package_name.class_name" + // - "class package_name.class_name#method_name" + // + // Optional, if empty, all targets in the module will be run. + TestTargets []string `json:"testTargets,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AppApk") 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. "AppApk") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AndroidInstrumentationTest) MarshalJSON() ([]byte, error) { + type noMethod AndroidInstrumentationTest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AndroidMatrix: A set of Android device configuration permutations is +// defined by the +// the cross-product of the given axes. Internally, the given +// AndroidMatrix +// will be expanded into a set of AndroidDevices. +// +// Only supported permutations will be instantiated. Invalid +// permutations +// (e.g., incompatible models/versions) are ignored. +type AndroidMatrix struct { + // AndroidModelIds: The ids of the set of Android device to be used. + // Use the EnvironmentDiscoveryService to get supported + // options. + // Required + AndroidModelIds []string `json:"androidModelIds,omitempty"` + + // AndroidVersionIds: The ids of the set of Android OS version to be + // used. + // Use the EnvironmentDiscoveryService to get supported + // options. + // Required + AndroidVersionIds []string `json:"androidVersionIds,omitempty"` + + // Locales: The set of locales the test device will enable for + // testing. + // Use the EnvironmentDiscoveryService to get supported + // options. + // Required + Locales []string `json:"locales,omitempty"` + + // Orientations: The set of orientations to test with. + // Use the EnvironmentDiscoveryService to get supported + // options. + // Required + Orientations []string `json:"orientations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AndroidModelIds") 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. "AndroidModelIds") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AndroidMatrix) MarshalJSON() ([]byte, error) { + type noMethod AndroidMatrix + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AndroidModel: A description of an Android device tests may be run on. +type AndroidModel struct { + // Brand: The company that this device is branded with. + // Example: "Google", "Samsung" + // @OutputOnly + Brand string `json:"brand,omitempty"` + + // Codename: The name of the industrial design. + // This corresponds to android.os.Build.DEVICE + // @OutputOnly + Codename string `json:"codename,omitempty"` + + // Form: Whether this device is virtual or physical. + // @OutputOnly + // + // Possible values: + // "DEVICE_FORM_UNSPECIFIED" - Do not use. For proto versioning only. + // "VIRTUAL" - A software stack that simulates the device + // "PHYSICAL" - Actual hardware + Form string `json:"form,omitempty"` + + // Id: The unique opaque id for this model. + // Use this for invoking the TestExecutionService. + // @OutputOnly + Id string `json:"id,omitempty"` + + // Manufacturer: The manufacturer of this device. + // @OutputOnly + Manufacturer string `json:"manufacturer,omitempty"` + + // Name: The human-readable marketing name for this device + // model. + // Examples: "Nexus 5", "Galaxy S5" + // @OutputOnly + Name string `json:"name,omitempty"` + + // ScreenDensity: Screen density in DPI. + // This corresponds to ro.sf.lcd_density + // @OutputOnly + ScreenDensity int64 `json:"screenDensity,omitempty"` + + // ScreenX: Screen size in the horizontal (X) dimension measured in + // pixels. + // @OutputOnly + ScreenX int64 `json:"screenX,omitempty"` + + // ScreenY: Screen size in the vertical (Y) dimension measured in + // pixels. + // @OutputOnly + ScreenY int64 `json:"screenY,omitempty"` + + // SupportedAbis: The list of supported ABIs for this device. + // This corresponds to either android.os.Build.SUPPORTED_ABIS (for API + // level + // 21 and above) or android.os.Build.CPU_ABI/CPU_ABI2. + // The most preferred ABI is the first element in the list. + // + // Elements are optionally prefixed by "version_id:" (where version_id + // is + // the id of an AndroidVersion), denoting an ABI that is supported only + // on + // a particular version. + // @OutputOnly + SupportedAbis []string `json:"supportedAbis,omitempty"` + + // SupportedVersionIds: The set of Android versions this device + // supports. + // @OutputOnly + SupportedVersionIds []string `json:"supportedVersionIds,omitempty"` + + // Tags: Tags for this dimension. + // Examples: "default", "preview", "deprecated" + Tags []string `json:"tags,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Brand") 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. "Brand") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AndroidModel) MarshalJSON() ([]byte, error) { + type noMethod AndroidModel + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AndroidRoboTest: A test of an android application that explores the +// application on a virtual +// or physical Android Device, finding culprits and crashes as it goes. +type AndroidRoboTest struct { + // AppApk: The APK for the application under test. + // Required + AppApk *FileReference `json:"appApk,omitempty"` + + // AppInitialActivity: The initial activity that should be used to start + // the app. + // Optional + AppInitialActivity string `json:"appInitialActivity,omitempty"` + + // AppPackageId: The java package for the application under + // test. + // Optional, default is determined by examining the application's + // manifest. + AppPackageId string `json:"appPackageId,omitempty"` + + // MaxDepth: The max depth of the traversal stack Robo can explore. + // Needs to be at least + // 2 to make Robo explore the app beyond the first activity. + // Default is 50. + // Optional + MaxDepth int64 `json:"maxDepth,omitempty"` + + // MaxSteps: The max number of steps Robo can execute. + // Default is no limit. + // Optional + MaxSteps int64 `json:"maxSteps,omitempty"` + + // RoboDirectives: A set of directives Robo should apply during the + // crawl. + // This allows users to customize the crawl. For example, the username + // and + // password for a test account can be provided. + // Optional + RoboDirectives []*RoboDirective `json:"roboDirectives,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AppApk") 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. "AppApk") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AndroidRoboTest) MarshalJSON() ([]byte, error) { + type noMethod AndroidRoboTest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AndroidRuntimeConfiguration: Configuration that can be selected at +// the time a test is run. +type AndroidRuntimeConfiguration struct { + // Locales: The set of available locales. + // @OutputOnly + Locales []*Locale `json:"locales,omitempty"` + + // Orientations: The set of available orientations. + // @OutputOnly + Orientations []*Orientation `json:"orientations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Locales") 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. "Locales") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AndroidRuntimeConfiguration) MarshalJSON() ([]byte, error) { + type noMethod AndroidRuntimeConfiguration + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AndroidTestLoop: A test of an Android Application with a Test +// Loop. +// The intent will be implicitly added, since Games is the +// only +// user of this api, for the time being. +type AndroidTestLoop struct { + // AppApk: The APK for the application under test. + // Required + AppApk *FileReference `json:"appApk,omitempty"` + + // AppPackageId: The java package for the application under + // test. + // Optional, default is determined by examining the application's + // manifest. + AppPackageId string `json:"appPackageId,omitempty"` + + // ScenarioLabels: The list of scenario labels that should be run during + // the test. + // The scenario labels should map to labels defined in the + // application's + // manifest. For example, player_experience + // and + // com.google.test.loops.player_experience add all of the loops labeled + // in the + // manifest with the com.google.test.loops.player_experience name to + // the + // execution. + // Optional. Scenarios can also be specified in the scenarios field. + ScenarioLabels []string `json:"scenarioLabels,omitempty"` + + // Scenarios: The list of scenarios that should be run during the + // test. + // Optional, default is all test loops, derived from the + // application's + // manifest. + Scenarios []int64 `json:"scenarios,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AppApk") 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. "AppApk") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AndroidTestLoop) MarshalJSON() ([]byte, error) { + type noMethod AndroidTestLoop + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AndroidVersion: A version of the Android OS +type AndroidVersion struct { + // ApiLevel: The API level for this Android version. + // Examples: 18, 19 + // @OutputOnly + ApiLevel int64 `json:"apiLevel,omitempty"` + + // CodeName: The code name for this Android version. + // Examples: "JellyBean", "KitKat" + // @OutputOnly + CodeName string `json:"codeName,omitempty"` + + // Distribution: Market share for this version. + // @OutputOnly + Distribution *Distribution `json:"distribution,omitempty"` + + // Id: An opaque id for this Android version. + // Use this id to invoke the TestExecutionService. + // @OutputOnly + Id string `json:"id,omitempty"` + + // ReleaseDate: The date this Android version became available in the + // market. + // @OutputOnly + ReleaseDate *Date `json:"releaseDate,omitempty"` + + // Tags: Tags for this dimension. + // Examples: "default", "preview", "deprecated" + Tags []string `json:"tags,omitempty"` + + // VersionString: A string representing this version of the Android + // OS. + // Examples: "4.3", "4.4" + // @OutputOnly + VersionString string `json:"versionString,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiLevel") 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. "ApiLevel") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AndroidVersion) MarshalJSON() ([]byte, error) { + type noMethod AndroidVersion + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CancelTestMatrixResponse: Response containing the current state of +// the specified test matrix. +type CancelTestMatrixResponse struct { + // TestState: The current rolled-up state of the test matrix. + // If this state is already final, then the cancelation request + // will + // have no effect. + // + // Possible values: + // "TEST_STATE_UNSPECIFIED" - Do not use. For proto versioning only. + // "VALIDATING" - The execution or matrix is being validated. + // "PENDING" - The execution or matrix is waiting for resources to + // become available. + // "RUNNING" - The execution is currently being processed. + // + // Can only be set on an execution. + // "FINISHED" - The execution or matrix has terminated normally. + // + // On a matrix this means that the matrix level processing completed + // normally, + // but individual executions may be in an ERROR state. + // "ERROR" - The execution or matrix has stopped because it + // encountered an + // infrastructure failure. + // "UNSUPPORTED_ENVIRONMENT" - The execution was not run because it + // corresponds to a unsupported + // environment. + // + // Can only be set on an execution. + // "INCOMPATIBLE_ENVIRONMENT" - The execution was not run because the + // provided inputs are incompatible with + // the requested environment. + // + // Example: requested AndroidVersion is lower than APK's + // minSdkVersion + // + // Can only be set on an execution. + // "INCOMPATIBLE_ARCHITECTURE" - The execution was not run because the + // provided inputs are incompatible with + // the requested architecture. + // + // Example: requested device does not support running the native code + // in + // the supplied APK + // + // Can only be set on an execution. + // "CANCELLED" - The user cancelled the execution. + // + // Can only be set on an execution. + // "INVALID" - The execution or matrix was not run because the + // provided inputs are not + // valid. + // + // Examples: input file is not of the expected type, is + // malformed/corrupt, or + // was flagged as malware + TestState string `json:"testState,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "TestState") 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. "TestState") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CancelTestMatrixResponse) MarshalJSON() ([]byte, error) { + type noMethod CancelTestMatrixResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ClientInfo: Information about the client which invoked the test. +type ClientInfo struct { + // ClientInfoDetails: The list of detailed information about client. + ClientInfoDetails []*ClientInfoDetail `json:"clientInfoDetails,omitempty"` + + // Name: Client name, such as gcloud. + // Required + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClientInfoDetails") + // 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. "ClientInfoDetails") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ClientInfo) MarshalJSON() ([]byte, error) { + type noMethod ClientInfo + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ClientInfoDetail: Key-value pair of detailed information about the +// client which invoked the +// test. For example {'Version', '1.0'}, {'Release Track', 'BETA'} +type ClientInfoDetail struct { + // Key: The key of detailed client information. + // Required + Key string `json:"key,omitempty"` + + // Value: The value of detailed client information. + // Required + 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 *ClientInfoDetail) MarshalJSON() ([]byte, error) { + type noMethod ClientInfoDetail + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Date: Represents a whole calendar date, e.g. date of birth. The time +// of day and +// time zone are either specified elsewhere or are not significant. The +// date +// is relative to the Proleptic Gregorian Calendar. The day may be 0 +// to +// represent a year and month where the day is not significant, e.g. +// credit card +// expiration date. The year may be 0 to represent a month and day +// independent +// of year, e.g. anniversary date. Related types are +// google.type.TimeOfDay +// and `google.protobuf.Timestamp`. +type Date struct { + // Day: Day of month. Must be from 1 to 31 and valid for the year and + // month, or 0 + // if specifying a year/month where the day is not significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of year. Must be from 1 to 12. + Month int64 `json:"month,omitempty"` + + // Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date + // without + // a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") 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. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Date) MarshalJSON() ([]byte, error) { + type noMethod Date + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeviceFile: A single device file description. +type DeviceFile struct { + // ObbFile: A reference to an opaque binary blob file + ObbFile *ObbFile `json:"obbFile,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ObbFile") 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. "ObbFile") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeviceFile) MarshalJSON() ([]byte, error) { + type noMethod DeviceFile + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Distribution: Data about the relative number of devices running +// a +// given configuration of the Android platform. +type Distribution struct { + // MarketShare: The estimated fraction (0-1) of the total market with + // this configuration. + // @OutputOnly + MarketShare float64 `json:"marketShare,omitempty"` + + // MeasurementTime: The time this distribution was measured. + // @OutputOnly + MeasurementTime string `json:"measurementTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MarketShare") 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. "MarketShare") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field 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 { + MarketShare gensupport.JSONFloat64 `json:"marketShare"` + *noMethod + } + s1.noMethod = (*noMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MarketShare = float64(s1.MarketShare) + return nil +} + +// Environment: The environment in which the test is run. +type Environment struct { + // AndroidDevice: An Android device which must be used with an Android + // test. + AndroidDevice *AndroidDevice `json:"androidDevice,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AndroidDevice") 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. "AndroidDevice") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Environment) MarshalJSON() ([]byte, error) { + type noMethod Environment + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// EnvironmentMatrix: The matrix of environments in which the test is to +// be executed. +type EnvironmentMatrix struct { + // AndroidDeviceList: A list of Android devices; the test will be run + // only on the specified + // devices. + AndroidDeviceList *AndroidDeviceList `json:"androidDeviceList,omitempty"` + + // AndroidMatrix: A matrix of Android devices. + AndroidMatrix *AndroidMatrix `json:"androidMatrix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AndroidDeviceList") + // 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. "AndroidDeviceList") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *EnvironmentMatrix) MarshalJSON() ([]byte, error) { + type noMethod EnvironmentMatrix + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// EnvironmentVariable: A key-value pair passed as an environment +// variable to the test +type EnvironmentVariable struct { + // Key: Key for the environment variable + Key string `json:"key,omitempty"` + + // Value: Value for the environment variable + 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 *EnvironmentVariable) MarshalJSON() ([]byte, error) { + type noMethod EnvironmentVariable + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FileReference: A reference to a file, used for user inputs. +type FileReference struct { + // GcsPath: A path to a file in Google Cloud Storage. + // Example: gs://build-app-1414623860166/app-debug-unaligned.apk + GcsPath string `json:"gcsPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcsPath") 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. "GcsPath") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FileReference) MarshalJSON() ([]byte, error) { + type noMethod FileReference + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAuto: Enables automatic Google account login. +// If set, the service will automatically generate a Google test account +// and add +// it to the device, before executing the test. Note that test accounts +// might be +// reused. +// Many applications show their full set of functionalities when an +// account is +// present on the device. Logging into the device with these generated +// accounts +// allows testing more functionalities. +type GoogleAuto struct { +} + +// GoogleCloudStorage: A storage location within Google cloud storage +// (GCS). +type GoogleCloudStorage struct { + // GcsPath: The path to a directory in GCS that will + // eventually contain the results for this test. + // The requesting user must have write access on the bucket in the + // supplied + // path. + // Required + GcsPath string `json:"gcsPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcsPath") 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. "GcsPath") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudStorage) MarshalJSON() ([]byte, error) { + type noMethod GoogleCloudStorage + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Locale: A location/region designation for language. +type Locale struct { + // Id: The id for this locale. + // Example: "en_US" + // @OutputOnly + Id string `json:"id,omitempty"` + + // Name: A human-friendly name for this language/locale. + // Example: "English" + // @OutputOnly + Name string `json:"name,omitempty"` + + // Region: A human-friendy string representing the region for this + // locale. + // Example: "United States" + // Not present for every locale. + // @OutputOnly + Region string `json:"region,omitempty"` + + // Tags: Tags for this dimension. + // Examples: "default" + Tags []string `json:"tags,omitempty"` + + // 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 *Locale) MarshalJSON() ([]byte, error) { + type noMethod Locale + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkConfiguration struct { + // DownRule: The emulation rule applying to the download traffic + DownRule *TrafficRule `json:"downRule,omitempty"` + + // Id: The unique opaque id for this network traffic + // configuration + // @OutputOnly + Id string `json:"id,omitempty"` + + // UpRule: The emulation rule applying to the upload traffic + UpRule *TrafficRule `json:"upRule,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DownRule") 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. "DownRule") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkConfiguration) MarshalJSON() ([]byte, error) { + type noMethod NetworkConfiguration + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkConfigurationCatalog struct { + Configurations []*NetworkConfiguration `json:"configurations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Configurations") 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. "Configurations") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkConfigurationCatalog) MarshalJSON() ([]byte, error) { + type noMethod NetworkConfigurationCatalog + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ObbFile: An opaque binary blob file to install on the device before +// the test starts +type ObbFile struct { + // Obb: Opaque Binary Blob (OBB) file(s) to install on the + // device + // Required + Obb *FileReference `json:"obb,omitempty"` + + // ObbFileName: OBB file name which must conform to the format as + // specified by + // Android + // e.g. [main|patch].0300110.com.example.android.obb + // which will be installed into + // /Android/obb// + // on the device + // Required + ObbFileName string `json:"obbFileName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Obb") 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. "Obb") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ObbFile) MarshalJSON() ([]byte, error) { + type noMethod ObbFile + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Orientation: Screen orientation of the device. +type Orientation struct { + // Id: The id for this orientation. + // Example: "portrait" + // @OutputOnly + Id string `json:"id,omitempty"` + + // Name: A human-friendly name for this orientation. + // Example: "portrait" + // @OutputOnly + Name string `json:"name,omitempty"` + + // Tags: Tags for this dimension. + // Examples: "default" + Tags []string `json:"tags,omitempty"` + + // 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 *Orientation) MarshalJSON() ([]byte, error) { + type noMethod Orientation + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResultStorage: Locations where the results of running the test are +// stored. +type ResultStorage struct { + // GoogleCloudStorage: Required. + GoogleCloudStorage *GoogleCloudStorage `json:"googleCloudStorage,omitempty"` + + // ToolResultsExecution: The tool results execution that results are + // written to. + // @OutputOnly + ToolResultsExecution *ToolResultsExecution `json:"toolResultsExecution,omitempty"` + + // ToolResultsHistory: The tool results history that contains the tool + // results execution that + // results are written to. + // + // Optional, if not provided the service will choose an appropriate + // value. + ToolResultsHistory *ToolResultsHistory `json:"toolResultsHistory,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GoogleCloudStorage") + // 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. "GoogleCloudStorage") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ResultStorage) MarshalJSON() ([]byte, error) { + type noMethod ResultStorage + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RoboDirective: Directs Robo to interact with a specific UI element if +// it is encountered +// during the crawl. Currently, Robo can perform text entry or element +// click. +type RoboDirective struct { + // ActionType: The type of action that Robo should perform on the + // specified element. + // Required. + // + // Possible values: + // "ACTION_TYPE_UNSPECIFIED" - DO NOT USE. For proto versioning only. + // "SINGLE_CLICK" - Direct Robo to click on the specified element. + // No-op if specified element + // is not clickable. + // "ENTER_TEXT" - Direct Robo to enter text on the specified element. + // No-op if specified + // element is not enabled or does not allow text entry. + ActionType string `json:"actionType,omitempty"` + + // InputText: The text that Robo is directed to set. If left empty, the + // directive will be + // treated as a CLICK on the element matching the + // resource_name. + // Optional + InputText string `json:"inputText,omitempty"` + + // ResourceName: The android resource name of the target UI element + // For example, + // in Java: R.string.foo + // in xml: @string/foo + // Only the “foo” part is needed. + // Reference + // doc: + // https://developer.android.com/guide/topics/resources/accessing-re + // sources.html + // Required + ResourceName string `json:"resourceName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActionType") 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. "ActionType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RoboDirective) MarshalJSON() ([]byte, error) { + type noMethod RoboDirective + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestDetails: Additional details about the progress of the running +// test. +type TestDetails struct { + // ErrorMessage: If the TestState is ERROR, then this string will + // contain human-readable + // details about the error. + // @OutputOnly + ErrorMessage string `json:"errorMessage,omitempty"` + + // ProgressMessages: Human-readable, detailed descriptions of the test's + // progress. + // For example: "Provisioning a device", "Starting Test". + // + // During the course of execution new data may be appended + // to the end of progress_messages. + // @OutputOnly + ProgressMessages []string `json:"progressMessages,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorMessage") 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. "ErrorMessage") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestDetails) MarshalJSON() ([]byte, error) { + type noMethod TestDetails + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestEnvironmentCatalog: A description of a test environment. +type TestEnvironmentCatalog struct { + // AndroidDeviceCatalog: Android devices suitable for running Android + // Instrumentation Tests. + AndroidDeviceCatalog *AndroidDeviceCatalog `json:"androidDeviceCatalog,omitempty"` + + // NetworkConfigurationCatalog: Supported network configurations + NetworkConfigurationCatalog *NetworkConfigurationCatalog `json:"networkConfigurationCatalog,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AndroidDeviceCatalog") 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. "AndroidDeviceCatalog") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TestEnvironmentCatalog) MarshalJSON() ([]byte, error) { + type noMethod TestEnvironmentCatalog + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestExecution: Specifies a single test to be executed in a single +// environment. +type TestExecution struct { + // Environment: How the host machine(s) are configured. + // @OutputOnly + Environment *Environment `json:"environment,omitempty"` + + // Id: Unique id set by the backend. + // @OutputOnly + Id string `json:"id,omitempty"` + + // MatrixId: Id of the containing TestMatrix. + // @OutputOnly + MatrixId string `json:"matrixId,omitempty"` + + // ProjectId: The cloud project that owns the test + // execution. + // @OutputOnly + ProjectId string `json:"projectId,omitempty"` + + // State: Indicates the current progress of the test execution (e.g., + // FINISHED). + // @OutputOnly + // + // Possible values: + // "TEST_STATE_UNSPECIFIED" - Do not use. For proto versioning only. + // "VALIDATING" - The execution or matrix is being validated. + // "PENDING" - The execution or matrix is waiting for resources to + // become available. + // "RUNNING" - The execution is currently being processed. + // + // Can only be set on an execution. + // "FINISHED" - The execution or matrix has terminated normally. + // + // On a matrix this means that the matrix level processing completed + // normally, + // but individual executions may be in an ERROR state. + // "ERROR" - The execution or matrix has stopped because it + // encountered an + // infrastructure failure. + // "UNSUPPORTED_ENVIRONMENT" - The execution was not run because it + // corresponds to a unsupported + // environment. + // + // Can only be set on an execution. + // "INCOMPATIBLE_ENVIRONMENT" - The execution was not run because the + // provided inputs are incompatible with + // the requested environment. + // + // Example: requested AndroidVersion is lower than APK's + // minSdkVersion + // + // Can only be set on an execution. + // "INCOMPATIBLE_ARCHITECTURE" - The execution was not run because the + // provided inputs are incompatible with + // the requested architecture. + // + // Example: requested device does not support running the native code + // in + // the supplied APK + // + // Can only be set on an execution. + // "CANCELLED" - The user cancelled the execution. + // + // Can only be set on an execution. + // "INVALID" - The execution or matrix was not run because the + // provided inputs are not + // valid. + // + // Examples: input file is not of the expected type, is + // malformed/corrupt, or + // was flagged as malware + State string `json:"state,omitempty"` + + // TestDetails: Additional details about the running test. + // @OutputOnly + TestDetails *TestDetails `json:"testDetails,omitempty"` + + // TestSpecification: How to run the test. + // @OutputOnly + TestSpecification *TestSpecification `json:"testSpecification,omitempty"` + + // Timestamp: The time this test execution was initially + // created. + // @OutputOnly + Timestamp string `json:"timestamp,omitempty"` + + // ToolResultsStep: Where the results for this execution are + // written. + // @OutputOnly + ToolResultsStep *ToolResultsStep `json:"toolResultsStep,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Environment") 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. "Environment") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestExecution) MarshalJSON() ([]byte, error) { + type noMethod TestExecution + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestMatrix: A group of one or more TestExecutions, built by taking +// a +// product of values over a pre-defined set of axes. +type TestMatrix struct { + // ClientInfo: Information about the client which invoked the + // test. + // Optional + ClientInfo *ClientInfo `json:"clientInfo,omitempty"` + + // EnvironmentMatrix: How the host machine(s) are configured. + // Required + EnvironmentMatrix *EnvironmentMatrix `json:"environmentMatrix,omitempty"` + + // InvalidMatrixDetails: Describes why the matrix is considered + // invalid. + // Only useful for matrices in the INVALID state. + // @OutputOnly + // + // Possible values: + // "INVALID_MATRIX_DETAILS_UNSPECIFIED" - Do not use. For proto + // versioning only. + // "DETAILS_UNAVAILABLE" - The matrix is INVALID, but there are no + // further details available. + // "MALFORMED_APK" - The input app APK could not be parsed. + // "MALFORMED_TEST_APK" - The input test APK could not be parsed. + // "NO_MANIFEST" - The AndroidManifest.xml could not be found. + // "NO_PACKAGE_NAME" - The APK manifest does not declare a package + // name. + // "TEST_SAME_AS_APP" - The test package and app package are the same. + // "NO_INSTRUMENTATION" - The test apk does not declare an + // instrumentation. + // "NO_SIGNATURE" - The input app apk does not have a signature. + // "INSTRUMENTATION_ORCHESTRATOR_INCOMPATIBLE" - The test runner class + // specified by user or in the test APK's manifest file + // is not compatible with Android Test Orchestrator. + // Orchestrator is only compatible with AndroidJUnitRunner version 1.0 + // or + // higher. + // Orchestrator can be disabled by using + // DO_NOT_USE_ORCHESTRATOR + // OrchestratorOption. + // "NO_TEST_RUNNER_CLASS" - The test APK does not contain the test + // runner class specified by user or in + // the manifest file. + // This can be caused by either of the following reasons: + // - the user provided a runner class name that's incorrect, or + // - the test runner isn't built into the test APK (might be in the app + // APK + // instead). + // "NO_LAUNCHER_ACTIVITY" - A main launcher activity could not be + // found. + // "FORBIDDEN_PERMISSIONS" - The app declares one or more permissions + // that are not allowed. + // "INVALID_ROBO_DIRECTIVES" - There is a conflict in the provided + // robo_directives. + // "TEST_LOOP_INTENT_FILTER_NOT_FOUND" - There there is no test loop + // intent filter, or the one that is given is + // not formatted correctly. + // "SCENARIO_LABEL_NOT_DECLARED" - The request contains a scenario + // label that was not declared in the + // manifest. + // "SCENARIO_LABEL_MALFORMED" - There was an error when parsing a + // label's value. + // "SCENARIO_NOT_DECLARED" - The request contains a scenario number + // that was not declared in the + // manifest. + // "DEVICE_ADMIN_RECEIVER" - Device administrator applications are not + // allowed. + // "TEST_ONLY_APK" - The APK is marked as "testOnly". + InvalidMatrixDetails string `json:"invalidMatrixDetails,omitempty"` + + // ProjectId: The cloud project that owns the test matrix. + // @OutputOnly + ProjectId string `json:"projectId,omitempty"` + + // ResultStorage: Where the results for the matrix are written. + // Required + ResultStorage *ResultStorage `json:"resultStorage,omitempty"` + + // State: Indicates the current progress of the test matrix (e.g., + // FINISHED) + // @OutputOnly + // + // Possible values: + // "TEST_STATE_UNSPECIFIED" - Do not use. For proto versioning only. + // "VALIDATING" - The execution or matrix is being validated. + // "PENDING" - The execution or matrix is waiting for resources to + // become available. + // "RUNNING" - The execution is currently being processed. + // + // Can only be set on an execution. + // "FINISHED" - The execution or matrix has terminated normally. + // + // On a matrix this means that the matrix level processing completed + // normally, + // but individual executions may be in an ERROR state. + // "ERROR" - The execution or matrix has stopped because it + // encountered an + // infrastructure failure. + // "UNSUPPORTED_ENVIRONMENT" - The execution was not run because it + // corresponds to a unsupported + // environment. + // + // Can only be set on an execution. + // "INCOMPATIBLE_ENVIRONMENT" - The execution was not run because the + // provided inputs are incompatible with + // the requested environment. + // + // Example: requested AndroidVersion is lower than APK's + // minSdkVersion + // + // Can only be set on an execution. + // "INCOMPATIBLE_ARCHITECTURE" - The execution was not run because the + // provided inputs are incompatible with + // the requested architecture. + // + // Example: requested device does not support running the native code + // in + // the supplied APK + // + // Can only be set on an execution. + // "CANCELLED" - The user cancelled the execution. + // + // Can only be set on an execution. + // "INVALID" - The execution or matrix was not run because the + // provided inputs are not + // valid. + // + // Examples: input file is not of the expected type, is + // malformed/corrupt, or + // was flagged as malware + State string `json:"state,omitempty"` + + // TestExecutions: The list of test executions that the service creates + // for this matrix. + // @OutputOnly + TestExecutions []*TestExecution `json:"testExecutions,omitempty"` + + // TestMatrixId: Unique id set by the service. + // @OutputOnly + TestMatrixId string `json:"testMatrixId,omitempty"` + + // TestSpecification: How to run the test. + // Required + TestSpecification *TestSpecification `json:"testSpecification,omitempty"` + + // Timestamp: The time this test matrix was initially + // created. + // @OutputOnly + Timestamp string `json:"timestamp,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ClientInfo") 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. "ClientInfo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestMatrix) MarshalJSON() ([]byte, error) { + type noMethod TestMatrix + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestSetup: A description of how to set up the device prior to running +// the test +type TestSetup struct { + // Account: The device will be logged in on this account for the + // duration of the test. + // Optional + Account *Account `json:"account,omitempty"` + + // DirectoriesToPull: The directories on the device to upload to GCS at + // the end of the test; + // they must be absolute, whitelisted paths. + // Refer to RegularFile for whitelisted paths. + // Optional + DirectoriesToPull []string `json:"directoriesToPull,omitempty"` + + // EnvironmentVariables: Environment variables to set for the test (only + // applicable for + // instrumentation tests). + EnvironmentVariables []*EnvironmentVariable `json:"environmentVariables,omitempty"` + + // FilesToPush: Optional + FilesToPush []*DeviceFile `json:"filesToPush,omitempty"` + + // NetworkProfile: The network traffic profile used for running the + // test. + // Optional + NetworkProfile string `json:"networkProfile,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Account") 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. "Account") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestSetup) MarshalJSON() ([]byte, error) { + type noMethod TestSetup + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestSpecification: A description of how to run the test. +type TestSpecification struct { + // AndroidInstrumentationTest: An Android instrumentation test. + AndroidInstrumentationTest *AndroidInstrumentationTest `json:"androidInstrumentationTest,omitempty"` + + // AndroidRoboTest: An Android robo test. + AndroidRoboTest *AndroidRoboTest `json:"androidRoboTest,omitempty"` + + // AndroidTestLoop: An Android Application with a Test Loop + AndroidTestLoop *AndroidTestLoop `json:"androidTestLoop,omitempty"` + + // AutoGoogleLogin: Enables automatic Google account login. + // If set, the service will automatically generate a Google test account + // and + // add it to the device, before executing the test. Note that test + // accounts + // might be reused. + // Many applications show their full set of functionalities when an + // account is + // present on the device. Logging into the device with these + // generated + // accounts allows testing more functionalities. + // Default is false. + // Optional + AutoGoogleLogin bool `json:"autoGoogleLogin,omitempty"` + + // DisablePerformanceMetrics: Disables performance metrics recording; + // may reduce test latency. + DisablePerformanceMetrics bool `json:"disablePerformanceMetrics,omitempty"` + + // DisableVideoRecording: Disables video recording; may reduce test + // latency. + DisableVideoRecording bool `json:"disableVideoRecording,omitempty"` + + // TestSetup: Test setup requirements e.g. files to install, bootstrap + // scripts + // Optional + TestSetup *TestSetup `json:"testSetup,omitempty"` + + // TestTimeout: Max time a test execution is allowed to run before it + // is + // automatically cancelled. + // Optional, default is 5 min. + TestTimeout string `json:"testTimeout,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AndroidInstrumentationTest") 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. + // "AndroidInstrumentationTest") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestSpecification) MarshalJSON() ([]byte, error) { + type noMethod TestSpecification + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ToolResultsExecution: Represents a tool results execution +// resource. +// +// This has the results of a TestMatrix. +type ToolResultsExecution struct { + // ExecutionId: A tool results execution ID. + // @OutputOnly + ExecutionId string `json:"executionId,omitempty"` + + // HistoryId: A tool results history ID. + // @OutputOnly + HistoryId string `json:"historyId,omitempty"` + + // ProjectId: The cloud project that owns the tool results + // execution. + // @OutputOnly + ProjectId string `json:"projectId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExecutionId") 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. "ExecutionId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ToolResultsExecution) MarshalJSON() ([]byte, error) { + type noMethod ToolResultsExecution + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ToolResultsHistory: Represents a tool results history resource. +type ToolResultsHistory struct { + // HistoryId: A tool results history ID. + // Required + HistoryId string `json:"historyId,omitempty"` + + // ProjectId: The cloud project that owns the tool results + // history. + // Required + ProjectId string `json:"projectId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HistoryId") 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. "HistoryId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ToolResultsHistory) MarshalJSON() ([]byte, error) { + type noMethod ToolResultsHistory + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ToolResultsStep: Represents a tool results step resource. +// +// This has the results of a TestExecution. +type ToolResultsStep struct { + // ExecutionId: A tool results execution ID. + // @OutputOnly + ExecutionId string `json:"executionId,omitempty"` + + // HistoryId: A tool results history ID. + // @OutputOnly + HistoryId string `json:"historyId,omitempty"` + + // ProjectId: The cloud project that owns the tool results + // step. + // @OutputOnly + ProjectId string `json:"projectId,omitempty"` + + // StepId: A tool results step ID. + // @OutputOnly + StepId string `json:"stepId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExecutionId") 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. "ExecutionId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ToolResultsStep) MarshalJSON() ([]byte, error) { + type noMethod ToolResultsStep + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TrafficRule: Network emulation parameters +type TrafficRule struct { + // Bandwidth: Bandwidth in kbits/second + Bandwidth float64 `json:"bandwidth,omitempty"` + + // Burst: Burst size in kbits + Burst float64 `json:"burst,omitempty"` + + // Delay: Packet delay, must be >= 0 + Delay string `json:"delay,omitempty"` + + // PacketDuplicationRatio: Packet duplication ratio (0.0 - 1.0) + PacketDuplicationRatio float64 `json:"packetDuplicationRatio,omitempty"` + + // PacketLossRatio: Packet loss ratio (0.0 - 1.0) + PacketLossRatio float64 `json:"packetLossRatio,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Bandwidth") 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. "Bandwidth") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TrafficRule) MarshalJSON() ([]byte, error) { + type noMethod TrafficRule + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *TrafficRule) UnmarshalJSON(data []byte) error { + type noMethod TrafficRule + var s1 struct { + Bandwidth gensupport.JSONFloat64 `json:"bandwidth"` + Burst gensupport.JSONFloat64 `json:"burst"` + PacketDuplicationRatio gensupport.JSONFloat64 `json:"packetDuplicationRatio"` + PacketLossRatio gensupport.JSONFloat64 `json:"packetLossRatio"` + *noMethod + } + s1.noMethod = (*noMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Bandwidth = float64(s1.Bandwidth) + s.Burst = float64(s1.Burst) + s.PacketDuplicationRatio = float64(s1.PacketDuplicationRatio) + s.PacketLossRatio = float64(s1.PacketLossRatio) + return nil +} + +// method id "testing.projects.testMatrices.cancel": + +type ProjectsTestMatricesCancelCall struct { + s *Service + projectId string + testMatrixId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Cancels unfinished test executions in a test matrix. +// This call returns immediately and cancellation proceeds +// asychronously. +// If the matrix is already final, this operation will have no +// effect. +// +// May return any of the following canonical error codes: +// +// - PERMISSION_DENIED - if the user is not authorized to read project +// - INVALID_ARGUMENT - if the request is malformed +// - NOT_FOUND - if the Test Matrix does not exist +func (r *ProjectsTestMatricesService) Cancel(projectId string, testMatrixId string) *ProjectsTestMatricesCancelCall { + c := &ProjectsTestMatricesCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.testMatrixId = testMatrixId + 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 *ProjectsTestMatricesCancelCall) Fields(s ...googleapi.Field) *ProjectsTestMatricesCancelCall { + 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 *ProjectsTestMatricesCancelCall) Context(ctx context.Context) *ProjectsTestMatricesCancelCall { + 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 *ProjectsTestMatricesCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsTestMatricesCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "testMatrixId": c.testMatrixId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "testing.projects.testMatrices.cancel" call. +// Exactly one of *CancelTestMatrixResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *CancelTestMatrixResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsTestMatricesCancelCall) Do(opts ...googleapi.CallOption) (*CancelTestMatrixResponse, 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 := &CancelTestMatrixResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Cancels unfinished test executions in a test matrix.\nThis call returns immediately and cancellation proceeds asychronously.\nIf the matrix is already final, this operation will have no effect.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project\n- INVALID_ARGUMENT - if the request is malformed\n- NOT_FOUND - if the Test Matrix does not exist", + // "flatPath": "v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel", + // "httpMethod": "POST", + // "id": "testing.projects.testMatrices.cancel", + // "parameterOrder": [ + // "projectId", + // "testMatrixId" + // ], + // "parameters": { + // "projectId": { + // "description": "Cloud project that owns the test.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "testMatrixId": { + // "description": "Test matrix that will be canceled.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel", + // "response": { + // "$ref": "CancelTestMatrixResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "testing.projects.testMatrices.create": + +type ProjectsTestMatricesCreateCall struct { + s *Service + projectId string + testmatrix *TestMatrix + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Request to run a matrix of tests according to the given +// specifications. +// Unsupported environments will be returned in the state +// UNSUPPORTED. +// Matrices are limited to at most 200 supported executions. +// +// May return any of the following canonical error codes: +// +// - PERMISSION_DENIED - if the user is not authorized to write to +// project +// - INVALID_ARGUMENT - if the request is malformed or if the matrix +// expands +// to more than 200 supported executions +func (r *ProjectsTestMatricesService) Create(projectId string, testmatrix *TestMatrix) *ProjectsTestMatricesCreateCall { + c := &ProjectsTestMatricesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.testmatrix = testmatrix + return c +} + +// RequestId sets the optional parameter "requestId": A string id used +// to detect duplicated requests. +// Ids are automatically scoped to a project, so +// users should ensure the ID is unique per-project. +// A UUID is recommended. +// +// Optional, but strongly recommended. +func (c *ProjectsTestMatricesCreateCall) RequestId(requestId string) *ProjectsTestMatricesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsTestMatricesCreateCall) Fields(s ...googleapi.Field) *ProjectsTestMatricesCreateCall { + 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 *ProjectsTestMatricesCreateCall) Context(ctx context.Context) *ProjectsTestMatricesCreateCall { + 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 *ProjectsTestMatricesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsTestMatricesCreateCall) 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.testmatrix) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/testMatrices") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "testing.projects.testMatrices.create" call. +// Exactly one of *TestMatrix or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *TestMatrix.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsTestMatricesCreateCall) Do(opts ...googleapi.CallOption) (*TestMatrix, 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 := &TestMatrix{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Request to run a matrix of tests according to the given specifications.\nUnsupported environments will be returned in the state UNSUPPORTED.\nMatrices are limited to at most 200 supported executions.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project\n- INVALID_ARGUMENT - if the request is malformed or if the matrix expands\n to more than 200 supported executions", + // "flatPath": "v1/projects/{projectId}/testMatrices", + // "httpMethod": "POST", + // "id": "testing.projects.testMatrices.create", + // "parameterOrder": [ + // "projectId" + // ], + // "parameters": { + // "projectId": { + // "description": "The GCE project under which this job will run.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "A string id used to detect duplicated requests.\nIds are automatically scoped to a project, so\nusers should ensure the ID is unique per-project.\nA UUID is recommended.\n\nOptional, but strongly recommended.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/projects/{projectId}/testMatrices", + // "request": { + // "$ref": "TestMatrix" + // }, + // "response": { + // "$ref": "TestMatrix" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "testing.projects.testMatrices.get": + +type ProjectsTestMatricesGetCall struct { + s *Service + projectId string + testMatrixId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Check the status of a test matrix. +// +// May return any of the following canonical error codes: +// +// - PERMISSION_DENIED - if the user is not authorized to read project +// - INVALID_ARGUMENT - if the request is malformed +// - NOT_FOUND - if the Test Matrix does not exist +func (r *ProjectsTestMatricesService) Get(projectId string, testMatrixId string) *ProjectsTestMatricesGetCall { + c := &ProjectsTestMatricesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.testMatrixId = testMatrixId + 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 *ProjectsTestMatricesGetCall) Fields(s ...googleapi.Field) *ProjectsTestMatricesGetCall { + 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 *ProjectsTestMatricesGetCall) IfNoneMatch(entityTag string) *ProjectsTestMatricesGetCall { + 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 *ProjectsTestMatricesGetCall) Context(ctx context.Context) *ProjectsTestMatricesGetCall { + 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 *ProjectsTestMatricesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsTestMatricesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/testMatrices/{testMatrixId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "testMatrixId": c.testMatrixId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "testing.projects.testMatrices.get" call. +// Exactly one of *TestMatrix or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *TestMatrix.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsTestMatricesGetCall) Do(opts ...googleapi.CallOption) (*TestMatrix, 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 := &TestMatrix{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Check the status of a test matrix.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project\n- INVALID_ARGUMENT - if the request is malformed\n- NOT_FOUND - if the Test Matrix does not exist", + // "flatPath": "v1/projects/{projectId}/testMatrices/{testMatrixId}", + // "httpMethod": "GET", + // "id": "testing.projects.testMatrices.get", + // "parameterOrder": [ + // "projectId", + // "testMatrixId" + // ], + // "parameters": { + // "projectId": { + // "description": "Cloud project that owns the test matrix.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "testMatrixId": { + // "description": "Unique test matrix id which was assigned by the service.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/projects/{projectId}/testMatrices/{testMatrixId}", + // "response": { + // "$ref": "TestMatrix" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// method id "testing.testEnvironmentCatalog.get": + +type TestEnvironmentCatalogGetCall struct { + s *Service + environmentType string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get the catalog of supported test environments. +// +// May return any of the following canonical error codes: +// +// - INVALID_ARGUMENT - if the request is malformed +// - NOT_FOUND - if the environment type does not exist +// - INTERNAL - if an internal error occurred +func (r *TestEnvironmentCatalogService) Get(environmentType string) *TestEnvironmentCatalogGetCall { + c := &TestEnvironmentCatalogGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.environmentType = environmentType + return c +} + +// ProjectId sets the optional parameter "projectId": For authorization, +// the cloud project requesting the TestEnvironmentCatalog. +// Optional +func (c *TestEnvironmentCatalogGetCall) ProjectId(projectId string) *TestEnvironmentCatalogGetCall { + c.urlParams_.Set("projectId", projectId) + 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 *TestEnvironmentCatalogGetCall) Fields(s ...googleapi.Field) *TestEnvironmentCatalogGetCall { + 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 *TestEnvironmentCatalogGetCall) IfNoneMatch(entityTag string) *TestEnvironmentCatalogGetCall { + 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 *TestEnvironmentCatalogGetCall) Context(ctx context.Context) *TestEnvironmentCatalogGetCall { + 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 *TestEnvironmentCatalogGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *TestEnvironmentCatalogGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/testEnvironmentCatalog/{environmentType}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "environmentType": c.environmentType, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "testing.testEnvironmentCatalog.get" call. +// Exactly one of *TestEnvironmentCatalog or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestEnvironmentCatalog.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *TestEnvironmentCatalogGetCall) Do(opts ...googleapi.CallOption) (*TestEnvironmentCatalog, 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 := &TestEnvironmentCatalog{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get the catalog of supported test environments.\n\nMay return any of the following canonical error codes:\n\n- INVALID_ARGUMENT - if the request is malformed\n- NOT_FOUND - if the environment type does not exist\n- INTERNAL - if an internal error occurred", + // "flatPath": "v1/testEnvironmentCatalog/{environmentType}", + // "httpMethod": "GET", + // "id": "testing.testEnvironmentCatalog.get", + // "parameterOrder": [ + // "environmentType" + // ], + // "parameters": { + // "environmentType": { + // "description": "The type of environment that should be listed.\nRequired", + // "enum": [ + // "ENVIRONMENT_TYPE_UNSPECIFIED", + // "ANDROID", + // "NETWORK_CONFIGURATION" + // ], + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "For authorization, the cloud project requesting the TestEnvironmentCatalog.\nOptional", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/testEnvironmentCatalog/{environmentType}", + // "response": { + // "$ref": "TestEnvironmentCatalog" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} diff --git a/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-api.json b/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-api.json index 617d7e20c..dca8235f3 100644 --- a/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-api.json +++ b/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/8gXIUZZwesYgPe_2keJ1iBogMwA\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/4h54qFWOFfVHTQktXfEjdZt9aFk\"", "discoveryVersion": "v1", "id": "toolresults:v1beta3", "name": "toolresults", "canonicalName": "Tool Results", "version": "v1beta3", - "revision": "20170803", + "revision": "20170911", "title": "Cloud Tool Results API", "description": "Reads and publishes results from Firebase Test Lab.", "ownerDomain": "google.com", @@ -551,6 +551,19 @@ } } }, + "ListScreenshotClustersResponse": { + "id": "ListScreenshotClustersResponse", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "description": "The set of clustres associated with an execution Always set", + "items": { + "$ref": "ScreenshotCluster" + } + } + } + }, "ListStepThumbnailsResponse": { "id": "ListStepThumbnailsResponse", "type": "object", @@ -786,6 +799,53 @@ } } }, + "Screen": { + "id": "Screen", + "type": "object", + "properties": { + "fileReference": { + "type": "string", + "description": "File reference of the png file. Required." + }, + "locale": { + "type": "string", + "description": "Locale of the device that the screenshot was taken on. Required." + }, + "model": { + "type": "string", + "description": "Model of the device that the screenshot was taken on. Required." + }, + "version": { + "type": "string", + "description": "OS version of the device that the screenshot was taken on. Required." + } + } + }, + "ScreenshotCluster": { + "id": "ScreenshotCluster", + "type": "object", + "properties": { + "activity": { + "type": "string", + "description": "A string that describes the activity of every screen in the cluster." + }, + "clusterId": { + "type": "string", + "description": "A unique identifier for the cluster." + }, + "keyScreen": { + "$ref": "Screen", + "description": "A singular screen that represents the cluster as a whole. This screen will act as the \"cover\" of the entire cluster. When users look at the clusters, only the key screen from each cluster will be shown. Which screen is the key screen is determined by the ClusteringAlgorithm" + }, + "screens": { + "type": "array", + "description": "Full list of screens.", + "items": { + "$ref": "Screen" + } + } + } + }, "SkippedDetail": { "id": "SkippedDetail", "type": "object", @@ -1023,15 +1083,51 @@ "TestIssue": { "id": "TestIssue", "type": "object", - "description": "An abnormal event observed during the test execution.", + "description": "An issue detected occurring during a test execution.", "properties": { "errorMessage": { "type": "string", - "description": "A brief human-readable message describing the abnormal event.\n\nRequired." + "description": "A brief human-readable message describing the issue. Required." + }, + "severity": { + "type": "string", + "description": "Severity of issue. Required.", + "enum": [ + "info", + "severe", + "unspecifiedSeverity", + "warning" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ] }, "stackTrace": { "$ref": "StackTrace", - "description": "Optional." + "description": "Deprecated in favor of stack trace fields inside specific warnings." + }, + "type": { + "type": "string", + "description": "Type of issue. Required.", + "enum": [ + "anr", + "fatalException", + "nativeCrash", + "unspecifiedType" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ] + }, + "warning": { + "$ref": "Any", + "description": "Warning message with additional details of the issue. Should always be a message from com.google.devtools.toolresults.v1.warnings Required." } } }, @@ -1519,6 +1615,85 @@ } }, "resources": { + "clusters": { + "methods": { + "get": { + "id": "toolresults.projects.histories.executions.clusters.get", + "path": "{projectId}/histories/{historyId}/executions/{executionId}/clusters/{clusterId}", + "httpMethod": "GET", + "description": "Retrieves a single screenshot cluster by its ID", + "parameters": { + "clusterId": { + "type": "string", + "description": "A Cluster id\n\nRequired.", + "required": true, + "location": "path" + }, + "executionId": { + "type": "string", + "description": "An Execution id.\n\nRequired.", + "required": true, + "location": "path" + }, + "historyId": { + "type": "string", + "description": "A History id.\n\nRequired.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "A Project id.\n\nRequired.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "historyId", + "executionId", + "clusterId" + ], + "response": { + "$ref": "ScreenshotCluster" + } + }, + "list": { + "id": "toolresults.projects.histories.executions.clusters.list", + "path": "{projectId}/histories/{historyId}/executions/{executionId}/clusters", + "httpMethod": "GET", + "description": "Lists Screenshot Clusters\n\nReturns the list of screenshot clusters corresponding to an execution. Screenshot clusters are created after the execution is finished. Clusters are created from a set of screenshots. Between any two screenshots, a matching score is calculated based off their metadata that determines how similar they are. Screenshots are placed in the cluster that has screens which have the highest matching scores.", + "parameters": { + "executionId": { + "type": "string", + "description": "An Execution id.\n\nRequired.", + "required": true, + "location": "path" + }, + "historyId": { + "type": "string", + "description": "A History id.\n\nRequired.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "A Project id.\n\nRequired.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "historyId", + "executionId" + ], + "response": { + "$ref": "ListScreenshotClustersResponse" + } + } + } + }, "steps": { "methods": { "create": { @@ -1809,7 +1984,7 @@ "id": "toolresults.projects.histories.executions.steps.perfMetricsSummary.create", "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary", "httpMethod": "POST", - "description": "Creates a PerfMetricsSummary resource.\n\nMay return any of the following error code(s): - ALREADY_EXISTS - A PerfMetricSummary already exists for the given Step - NOT_FOUND - The containing Step does not exist", + "description": "Creates a PerfMetricsSummary resource. Returns the existing one if it has already been created.\n\nMay return any of the following error code(s): - NOT_FOUND - The containing Step does not exist", "parameters": { "executionId": { "type": "string", diff --git a/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-gen.go b/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-gen.go index 21e1f6554..d7b4ac50d 100644 --- a/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-gen.go +++ b/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-gen.go @@ -101,6 +101,7 @@ type ProjectsHistoriesService struct { func NewProjectsHistoriesExecutionsService(s *Service) *ProjectsHistoriesExecutionsService { rs := &ProjectsHistoriesExecutionsService{s: s} + rs.Clusters = NewProjectsHistoriesExecutionsClustersService(s) rs.Steps = NewProjectsHistoriesExecutionsStepsService(s) return rs } @@ -108,9 +109,20 @@ func NewProjectsHistoriesExecutionsService(s *Service) *ProjectsHistoriesExecuti type ProjectsHistoriesExecutionsService struct { s *Service + Clusters *ProjectsHistoriesExecutionsClustersService + Steps *ProjectsHistoriesExecutionsStepsService } +func NewProjectsHistoriesExecutionsClustersService(s *Service) *ProjectsHistoriesExecutionsClustersService { + rs := &ProjectsHistoriesExecutionsClustersService{s: s} + return rs +} + +type ProjectsHistoriesExecutionsClustersService struct { + s *Service +} + func NewProjectsHistoriesExecutionsStepsService(s *Service) *ProjectsHistoriesExecutionsStepsService { rs := &ProjectsHistoriesExecutionsStepsService{s: s} rs.PerfMetricsSummary = NewProjectsHistoriesExecutionsStepsPerfMetricsSummaryService(s) @@ -1216,6 +1228,37 @@ func (s *ListPerfSamplesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ListScreenshotClustersResponse struct { + // Clusters: The set of clustres associated with an execution Always set + Clusters []*ScreenshotCluster `json:"clusters,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Clusters") 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. "Clusters") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListScreenshotClustersResponse) MarshalJSON() ([]byte, error) { + type noMethod ListScreenshotClustersResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListStepThumbnailsResponse: A response containing the thumbnails in a // step. type ListStepThumbnailsResponse struct { @@ -1669,6 +1712,90 @@ func (s *PublishXunitXmlFilesRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type Screen struct { + // FileReference: File reference of the png file. Required. + FileReference string `json:"fileReference,omitempty"` + + // Locale: Locale of the device that the screenshot was taken on. + // Required. + Locale string `json:"locale,omitempty"` + + // Model: Model of the device that the screenshot was taken on. + // Required. + Model string `json:"model,omitempty"` + + // Version: OS version of the device that the screenshot was taken on. + // Required. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FileReference") 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. "FileReference") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Screen) MarshalJSON() ([]byte, error) { + type noMethod Screen + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ScreenshotCluster struct { + // Activity: A string that describes the activity of every screen in the + // cluster. + Activity string `json:"activity,omitempty"` + + // ClusterId: A unique identifier for the cluster. + ClusterId string `json:"clusterId,omitempty"` + + // KeyScreen: A singular screen that represents the cluster as a whole. + // This screen will act as the "cover" of the entire cluster. When users + // look at the clusters, only the key screen from each cluster will be + // shown. Which screen is the key screen is determined by the + // ClusteringAlgorithm + KeyScreen *Screen `json:"keyScreen,omitempty"` + + // Screens: Full list of screens. + Screens []*Screen `json:"screens,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Activity") 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. "Activity") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ScreenshotCluster) MarshalJSON() ([]byte, error) { + type noMethod ScreenshotCluster + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type SkippedDetail struct { // IncompatibleAppVersion: If the App doesn't support the specific API // level. @@ -2271,17 +2398,39 @@ func (s *TestExecutionStep) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TestIssue: An abnormal event observed during the test execution. +// TestIssue: An issue detected occurring during a test execution. type TestIssue struct { - // ErrorMessage: A brief human-readable message describing the abnormal - // event. - // + // ErrorMessage: A brief human-readable message describing the issue. // Required. ErrorMessage string `json:"errorMessage,omitempty"` - // StackTrace: Optional. + // Severity: Severity of issue. Required. + // + // Possible values: + // "info" + // "severe" + // "unspecifiedSeverity" + // "warning" + Severity string `json:"severity,omitempty"` + + // StackTrace: Deprecated in favor of stack trace fields inside specific + // warnings. StackTrace *StackTrace `json:"stackTrace,omitempty"` + // Type: Type of issue. Required. + // + // Possible values: + // "anr" + // "fatalException" + // "nativeCrash" + // "unspecifiedType" + Type string `json:"type,omitempty"` + + // Warning: Warning message with additional details of the issue. Should + // always be a message from com.google.devtools.toolresults.v1.warnings + // Required. + Warning *Any `json:"warning,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorMessage") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -4265,6 +4414,332 @@ func (c *ProjectsHistoriesExecutionsPatchCall) Do(opts ...googleapi.CallOption) } +// method id "toolresults.projects.histories.executions.clusters.get": + +type ProjectsHistoriesExecutionsClustersGetCall struct { + s *Service + projectId string + historyId string + executionId string + clusterId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a single screenshot cluster by its ID +func (r *ProjectsHistoriesExecutionsClustersService) Get(projectId string, historyId string, executionId string, clusterId string) *ProjectsHistoriesExecutionsClustersGetCall { + c := &ProjectsHistoriesExecutionsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.historyId = historyId + c.executionId = executionId + c.clusterId = clusterId + 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 *ProjectsHistoriesExecutionsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsClustersGetCall { + 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 *ProjectsHistoriesExecutionsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsClustersGetCall { + 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 *ProjectsHistoriesExecutionsClustersGetCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsClustersGetCall { + 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 *ProjectsHistoriesExecutionsClustersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsHistoriesExecutionsClustersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/clusters/{clusterId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "historyId": c.historyId, + "executionId": c.executionId, + "clusterId": c.clusterId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "toolresults.projects.histories.executions.clusters.get" call. +// Exactly one of *ScreenshotCluster or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ScreenshotCluster.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsHistoriesExecutionsClustersGetCall) Do(opts ...googleapi.CallOption) (*ScreenshotCluster, 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 := &ScreenshotCluster{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a single screenshot cluster by its ID", + // "httpMethod": "GET", + // "id": "toolresults.projects.histories.executions.clusters.get", + // "parameterOrder": [ + // "projectId", + // "historyId", + // "executionId", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "A Cluster id\n\nRequired.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "executionId": { + // "description": "An Execution id.\n\nRequired.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "historyId": { + // "description": "A History id.\n\nRequired.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "A Project id.\n\nRequired.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/histories/{historyId}/executions/{executionId}/clusters/{clusterId}", + // "response": { + // "$ref": "ScreenshotCluster" + // } + // } + +} + +// method id "toolresults.projects.histories.executions.clusters.list": + +type ProjectsHistoriesExecutionsClustersListCall struct { + s *Service + projectId string + historyId string + executionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Screenshot Clusters +// +// Returns the list of screenshot clusters corresponding to an +// execution. Screenshot clusters are created after the execution is +// finished. Clusters are created from a set of screenshots. Between any +// two screenshots, a matching score is calculated based off their +// metadata that determines how similar they are. Screenshots are placed +// in the cluster that has screens which have the highest matching +// scores. +func (r *ProjectsHistoriesExecutionsClustersService) List(projectId string, historyId string, executionId string) *ProjectsHistoriesExecutionsClustersListCall { + c := &ProjectsHistoriesExecutionsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.historyId = historyId + c.executionId = executionId + 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 *ProjectsHistoriesExecutionsClustersListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsClustersListCall { + 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 *ProjectsHistoriesExecutionsClustersListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsClustersListCall { + 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 *ProjectsHistoriesExecutionsClustersListCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsClustersListCall { + 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 *ProjectsHistoriesExecutionsClustersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsHistoriesExecutionsClustersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/clusters") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "historyId": c.historyId, + "executionId": c.executionId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "toolresults.projects.histories.executions.clusters.list" call. +// Exactly one of *ListScreenshotClustersResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListScreenshotClustersResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsHistoriesExecutionsClustersListCall) Do(opts ...googleapi.CallOption) (*ListScreenshotClustersResponse, 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 := &ListScreenshotClustersResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists Screenshot Clusters\n\nReturns the list of screenshot clusters corresponding to an execution. Screenshot clusters are created after the execution is finished. Clusters are created from a set of screenshots. Between any two screenshots, a matching score is calculated based off their metadata that determines how similar they are. Screenshots are placed in the cluster that has screens which have the highest matching scores.", + // "httpMethod": "GET", + // "id": "toolresults.projects.histories.executions.clusters.list", + // "parameterOrder": [ + // "projectId", + // "historyId", + // "executionId" + // ], + // "parameters": { + // "executionId": { + // "description": "An Execution id.\n\nRequired.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "historyId": { + // "description": "A History id.\n\nRequired.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "A Project id.\n\nRequired.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/histories/{historyId}/executions/{executionId}/clusters", + // "response": { + // "$ref": "ListScreenshotClustersResponse" + // } + // } + +} + // method id "toolresults.projects.histories.executions.steps.create": type ProjectsHistoriesExecutionsStepsCreateCall struct { @@ -5376,10 +5851,10 @@ type ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall struct { header_ http.Header } -// Create: Creates a PerfMetricsSummary resource. +// Create: Creates a PerfMetricsSummary resource. Returns the existing +// one if it has already been created. // -// May return any of the following error code(s): - ALREADY_EXISTS - A -// PerfMetricSummary already exists for the given Step - NOT_FOUND - The +// May return any of the following error code(s): - NOT_FOUND - The // containing Step does not exist func (r *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryService) Create(projectId string, historyId string, executionId string, stepId string, perfmetricssummary *PerfMetricsSummary) *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall { c := &ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -5480,7 +5955,7 @@ func (c *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall) Do(opts . } return ret, nil // { - // "description": "Creates a PerfMetricsSummary resource.\n\nMay return any of the following error code(s): - ALREADY_EXISTS - A PerfMetricSummary already exists for the given Step - NOT_FOUND - The containing Step does not exist", + // "description": "Creates a PerfMetricsSummary resource. Returns the existing one if it has already been created.\n\nMay return any of the following error code(s): - NOT_FOUND - The containing Step does not exist", // "httpMethod": "POST", // "id": "toolresults.projects.histories.executions.steps.perfMetricsSummary.create", // "parameterOrder": [ diff --git a/vendor/google.golang.org/api/toolresults/v1beta3firstparty/toolresults-api.json b/vendor/google.golang.org/api/toolresults/v1beta3firstparty/toolresults-api.json index b36a5f470..43cb38041 100644 --- a/vendor/google.golang.org/api/toolresults/v1beta3firstparty/toolresults-api.json +++ b/vendor/google.golang.org/api/toolresults/v1beta3firstparty/toolresults-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/KVWstiyukW4qKD4UlqZ-vWrz9IA\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/oRWw5OqIvzBrnyAI_p6qB5VpgEM\"", "discoveryVersion": "v1", "id": "toolresults:v1beta3firstparty", "name": "toolresults", "canonicalName": "Tool Results", "version": "v1beta3firstparty", - "revision": "20170803", + "revision": "20170911", "title": "Cloud Tool Results firstparty API", "description": "Reads and publishes results from Firebase Test Lab.", "ownerDomain": "google.com", @@ -542,6 +542,19 @@ } } }, + "ListScreenshotClustersResponse": { + "id": "ListScreenshotClustersResponse", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "description": "The set of clustres associated with an execution Always set", + "items": { + "$ref": "ScreenshotCluster" + } + } + } + }, "ListStepThumbnailsResponse": { "id": "ListStepThumbnailsResponse", "type": "object", @@ -777,6 +790,53 @@ } } }, + "Screen": { + "id": "Screen", + "type": "object", + "properties": { + "fileReference": { + "type": "string", + "description": "File reference of the png file. Required." + }, + "locale": { + "type": "string", + "description": "Locale of the device that the screenshot was taken on. Required." + }, + "model": { + "type": "string", + "description": "Model of the device that the screenshot was taken on. Required." + }, + "version": { + "type": "string", + "description": "OS version of the device that the screenshot was taken on. Required." + } + } + }, + "ScreenshotCluster": { + "id": "ScreenshotCluster", + "type": "object", + "properties": { + "activity": { + "type": "string", + "description": "A string that describes the activity of every screen in the cluster." + }, + "clusterId": { + "type": "string", + "description": "A unique identifier for the cluster." + }, + "keyScreen": { + "$ref": "Screen", + "description": "A singular screen that represents the cluster as a whole. This screen will act as the \"cover\" of the entire cluster. When users look at the clusters, only the key screen from each cluster will be shown. Which screen is the key screen is determined by the ClusteringAlgorithm" + }, + "screens": { + "type": "array", + "description": "Full list of screens.", + "items": { + "$ref": "Screen" + } + } + } + }, "SkippedDetail": { "id": "SkippedDetail", "type": "object", @@ -1014,15 +1074,51 @@ "TestIssue": { "id": "TestIssue", "type": "object", - "description": "An abnormal event observed during the test execution.", + "description": "An issue detected occurring during a test execution.", "properties": { "errorMessage": { "type": "string", - "description": "A brief human-readable message describing the abnormal event.\n\nRequired." + "description": "A brief human-readable message describing the issue. Required." + }, + "severity": { + "type": "string", + "description": "Severity of issue. Required.", + "enum": [ + "info", + "severe", + "unspecifiedSeverity", + "warning" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ] }, "stackTrace": { "$ref": "StackTrace", - "description": "Optional." + "description": "Deprecated in favor of stack trace fields inside specific warnings." + }, + "type": { + "type": "string", + "description": "Type of issue. Required.", + "enum": [ + "anr", + "fatalException", + "nativeCrash", + "unspecifiedType" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ] + }, + "warning": { + "$ref": "Any", + "description": "Warning message with additional details of the issue. Should always be a message from com.google.devtools.toolresults.v1.warnings Required." } } }, @@ -1483,6 +1579,85 @@ } }, "resources": { + "clusters": { + "methods": { + "get": { + "id": "toolresults.projects.histories.executions.clusters.get", + "path": "{projectId}/histories/{historyId}/executions/{executionId}/clusters/{clusterId}", + "httpMethod": "GET", + "description": "Retrieves a single screenshot cluster by its ID", + "parameters": { + "clusterId": { + "type": "string", + "description": "A Cluster id\n\nRequired.", + "required": true, + "location": "path" + }, + "executionId": { + "type": "string", + "description": "An Execution id.\n\nRequired.", + "required": true, + "location": "path" + }, + "historyId": { + "type": "string", + "description": "A History id.\n\nRequired.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "A Project id.\n\nRequired.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "historyId", + "executionId", + "clusterId" + ], + "response": { + "$ref": "ScreenshotCluster" + } + }, + "list": { + "id": "toolresults.projects.histories.executions.clusters.list", + "path": "{projectId}/histories/{historyId}/executions/{executionId}/clusters", + "httpMethod": "GET", + "description": "Lists Screenshot Clusters\n\nReturns the list of screenshot clusters corresponding to an execution. Screenshot clusters are created after the execution is finished. Clusters are created from a set of screenshots. Between any two screenshots, a matching score is calculated based off their metadata that determines how similar they are. Screenshots are placed in the cluster that has screens which have the highest matching scores.", + "parameters": { + "executionId": { + "type": "string", + "description": "An Execution id.\n\nRequired.", + "required": true, + "location": "path" + }, + "historyId": { + "type": "string", + "description": "A History id.\n\nRequired.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "A Project id.\n\nRequired.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "historyId", + "executionId" + ], + "response": { + "$ref": "ListScreenshotClustersResponse" + } + } + } + }, "steps": { "methods": { "create": { @@ -1755,7 +1930,7 @@ "id": "toolresults.projects.histories.executions.steps.perfMetricsSummary.create", "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary", "httpMethod": "POST", - "description": "Creates a PerfMetricsSummary resource.\n\nMay return any of the following error code(s): - ALREADY_EXISTS - A PerfMetricSummary already exists for the given Step - NOT_FOUND - The containing Step does not exist", + "description": "Creates a PerfMetricsSummary resource. Returns the existing one if it has already been created.\n\nMay return any of the following error code(s): - NOT_FOUND - The containing Step does not exist", "parameters": { "executionId": { "type": "string", diff --git a/vendor/google.golang.org/api/toolresults/v1beta3firstparty/toolresults-gen.go b/vendor/google.golang.org/api/toolresults/v1beta3firstparty/toolresults-gen.go index 0f1a39dd0..ae8d2e542 100644 --- a/vendor/google.golang.org/api/toolresults/v1beta3firstparty/toolresults-gen.go +++ b/vendor/google.golang.org/api/toolresults/v1beta3firstparty/toolresults-gen.go @@ -95,6 +95,7 @@ type ProjectsHistoriesService struct { func NewProjectsHistoriesExecutionsService(s *Service) *ProjectsHistoriesExecutionsService { rs := &ProjectsHistoriesExecutionsService{s: s} + rs.Clusters = NewProjectsHistoriesExecutionsClustersService(s) rs.Steps = NewProjectsHistoriesExecutionsStepsService(s) return rs } @@ -102,9 +103,20 @@ func NewProjectsHistoriesExecutionsService(s *Service) *ProjectsHistoriesExecuti type ProjectsHistoriesExecutionsService struct { s *Service + Clusters *ProjectsHistoriesExecutionsClustersService + Steps *ProjectsHistoriesExecutionsStepsService } +func NewProjectsHistoriesExecutionsClustersService(s *Service) *ProjectsHistoriesExecutionsClustersService { + rs := &ProjectsHistoriesExecutionsClustersService{s: s} + return rs +} + +type ProjectsHistoriesExecutionsClustersService struct { + s *Service +} + func NewProjectsHistoriesExecutionsStepsService(s *Service) *ProjectsHistoriesExecutionsStepsService { rs := &ProjectsHistoriesExecutionsStepsService{s: s} rs.PerfMetricsSummary = NewProjectsHistoriesExecutionsStepsPerfMetricsSummaryService(s) @@ -1210,6 +1222,37 @@ func (s *ListPerfSamplesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ListScreenshotClustersResponse struct { + // Clusters: The set of clustres associated with an execution Always set + Clusters []*ScreenshotCluster `json:"clusters,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Clusters") 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. "Clusters") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListScreenshotClustersResponse) MarshalJSON() ([]byte, error) { + type noMethod ListScreenshotClustersResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListStepThumbnailsResponse: A response containing the thumbnails in a // step. type ListStepThumbnailsResponse struct { @@ -1663,6 +1706,90 @@ func (s *PublishXunitXmlFilesRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type Screen struct { + // FileReference: File reference of the png file. Required. + FileReference string `json:"fileReference,omitempty"` + + // Locale: Locale of the device that the screenshot was taken on. + // Required. + Locale string `json:"locale,omitempty"` + + // Model: Model of the device that the screenshot was taken on. + // Required. + Model string `json:"model,omitempty"` + + // Version: OS version of the device that the screenshot was taken on. + // Required. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FileReference") 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. "FileReference") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Screen) MarshalJSON() ([]byte, error) { + type noMethod Screen + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ScreenshotCluster struct { + // Activity: A string that describes the activity of every screen in the + // cluster. + Activity string `json:"activity,omitempty"` + + // ClusterId: A unique identifier for the cluster. + ClusterId string `json:"clusterId,omitempty"` + + // KeyScreen: A singular screen that represents the cluster as a whole. + // This screen will act as the "cover" of the entire cluster. When users + // look at the clusters, only the key screen from each cluster will be + // shown. Which screen is the key screen is determined by the + // ClusteringAlgorithm + KeyScreen *Screen `json:"keyScreen,omitempty"` + + // Screens: Full list of screens. + Screens []*Screen `json:"screens,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Activity") 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. "Activity") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ScreenshotCluster) MarshalJSON() ([]byte, error) { + type noMethod ScreenshotCluster + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type SkippedDetail struct { // IncompatibleAppVersion: If the App doesn't support the specific API // level. @@ -2265,17 +2392,39 @@ func (s *TestExecutionStep) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TestIssue: An abnormal event observed during the test execution. +// TestIssue: An issue detected occurring during a test execution. type TestIssue struct { - // ErrorMessage: A brief human-readable message describing the abnormal - // event. - // + // ErrorMessage: A brief human-readable message describing the issue. // Required. ErrorMessage string `json:"errorMessage,omitempty"` - // StackTrace: Optional. + // Severity: Severity of issue. Required. + // + // Possible values: + // "info" + // "severe" + // "unspecifiedSeverity" + // "warning" + Severity string `json:"severity,omitempty"` + + // StackTrace: Deprecated in favor of stack trace fields inside specific + // warnings. StackTrace *StackTrace `json:"stackTrace,omitempty"` + // Type: Type of issue. Required. + // + // Possible values: + // "anr" + // "fatalException" + // "nativeCrash" + // "unspecifiedType" + Type string `json:"type,omitempty"` + + // Warning: Warning message with additional details of the issue. Should + // always be a message from com.google.devtools.toolresults.v1.warnings + // Required. + Warning *Any `json:"warning,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorMessage") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -4232,6 +4381,332 @@ func (c *ProjectsHistoriesExecutionsPatchCall) Do(opts ...googleapi.CallOption) } +// method id "toolresults.projects.histories.executions.clusters.get": + +type ProjectsHistoriesExecutionsClustersGetCall struct { + s *Service + projectId string + historyId string + executionId string + clusterId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a single screenshot cluster by its ID +func (r *ProjectsHistoriesExecutionsClustersService) Get(projectId string, historyId string, executionId string, clusterId string) *ProjectsHistoriesExecutionsClustersGetCall { + c := &ProjectsHistoriesExecutionsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.historyId = historyId + c.executionId = executionId + c.clusterId = clusterId + 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 *ProjectsHistoriesExecutionsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsClustersGetCall { + 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 *ProjectsHistoriesExecutionsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsClustersGetCall { + 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 *ProjectsHistoriesExecutionsClustersGetCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsClustersGetCall { + 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 *ProjectsHistoriesExecutionsClustersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsHistoriesExecutionsClustersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/clusters/{clusterId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "historyId": c.historyId, + "executionId": c.executionId, + "clusterId": c.clusterId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "toolresults.projects.histories.executions.clusters.get" call. +// Exactly one of *ScreenshotCluster or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ScreenshotCluster.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsHistoriesExecutionsClustersGetCall) Do(opts ...googleapi.CallOption) (*ScreenshotCluster, 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 := &ScreenshotCluster{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a single screenshot cluster by its ID", + // "httpMethod": "GET", + // "id": "toolresults.projects.histories.executions.clusters.get", + // "parameterOrder": [ + // "projectId", + // "historyId", + // "executionId", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "A Cluster id\n\nRequired.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "executionId": { + // "description": "An Execution id.\n\nRequired.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "historyId": { + // "description": "A History id.\n\nRequired.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "A Project id.\n\nRequired.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/histories/{historyId}/executions/{executionId}/clusters/{clusterId}", + // "response": { + // "$ref": "ScreenshotCluster" + // } + // } + +} + +// method id "toolresults.projects.histories.executions.clusters.list": + +type ProjectsHistoriesExecutionsClustersListCall struct { + s *Service + projectId string + historyId string + executionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Screenshot Clusters +// +// Returns the list of screenshot clusters corresponding to an +// execution. Screenshot clusters are created after the execution is +// finished. Clusters are created from a set of screenshots. Between any +// two screenshots, a matching score is calculated based off their +// metadata that determines how similar they are. Screenshots are placed +// in the cluster that has screens which have the highest matching +// scores. +func (r *ProjectsHistoriesExecutionsClustersService) List(projectId string, historyId string, executionId string) *ProjectsHistoriesExecutionsClustersListCall { + c := &ProjectsHistoriesExecutionsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.historyId = historyId + c.executionId = executionId + 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 *ProjectsHistoriesExecutionsClustersListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsClustersListCall { + 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 *ProjectsHistoriesExecutionsClustersListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsClustersListCall { + 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 *ProjectsHistoriesExecutionsClustersListCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsClustersListCall { + 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 *ProjectsHistoriesExecutionsClustersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsHistoriesExecutionsClustersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/clusters") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "historyId": c.historyId, + "executionId": c.executionId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "toolresults.projects.histories.executions.clusters.list" call. +// Exactly one of *ListScreenshotClustersResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListScreenshotClustersResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsHistoriesExecutionsClustersListCall) Do(opts ...googleapi.CallOption) (*ListScreenshotClustersResponse, 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 := &ListScreenshotClustersResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists Screenshot Clusters\n\nReturns the list of screenshot clusters corresponding to an execution. Screenshot clusters are created after the execution is finished. Clusters are created from a set of screenshots. Between any two screenshots, a matching score is calculated based off their metadata that determines how similar they are. Screenshots are placed in the cluster that has screens which have the highest matching scores.", + // "httpMethod": "GET", + // "id": "toolresults.projects.histories.executions.clusters.list", + // "parameterOrder": [ + // "projectId", + // "historyId", + // "executionId" + // ], + // "parameters": { + // "executionId": { + // "description": "An Execution id.\n\nRequired.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "historyId": { + // "description": "A History id.\n\nRequired.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "A Project id.\n\nRequired.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/histories/{historyId}/executions/{executionId}/clusters", + // "response": { + // "$ref": "ListScreenshotClustersResponse" + // } + // } + +} + // method id "toolresults.projects.histories.executions.steps.create": type ProjectsHistoriesExecutionsStepsCreateCall struct { @@ -5325,10 +5800,10 @@ type ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall struct { header_ http.Header } -// Create: Creates a PerfMetricsSummary resource. +// Create: Creates a PerfMetricsSummary resource. Returns the existing +// one if it has already been created. // -// May return any of the following error code(s): - ALREADY_EXISTS - A -// PerfMetricSummary already exists for the given Step - NOT_FOUND - The +// May return any of the following error code(s): - NOT_FOUND - The // containing Step does not exist func (r *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryService) Create(projectId string, historyId string, executionId string, stepId string, perfmetricssummary *PerfMetricsSummary) *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall { c := &ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -5429,7 +5904,7 @@ func (c *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall) Do(opts . } return ret, nil // { - // "description": "Creates a PerfMetricsSummary resource.\n\nMay return any of the following error code(s): - ALREADY_EXISTS - A PerfMetricSummary already exists for the given Step - NOT_FOUND - The containing Step does not exist", + // "description": "Creates a PerfMetricsSummary resource. Returns the existing one if it has already been created.\n\nMay return any of the following error code(s): - NOT_FOUND - The containing Step does not exist", // "httpMethod": "POST", // "id": "toolresults.projects.histories.executions.steps.perfMetricsSummary.create", // "parameterOrder": [ diff --git a/vendor/google.golang.org/api/translate/v2/translate-api.json b/vendor/google.golang.org/api/translate/v2/translate-api.json index e589d1923..48162fd01 100644 --- a/vendor/google.golang.org/api/translate/v2/translate-api.json +++ b/vendor/google.golang.org/api/translate/v2/translate-api.json @@ -1,13 +1,57 @@ { - "ownerDomain": "google.com", - "name": "translate", - "batchPath": "batch/translate", + "title": "Google Cloud Translation API", "features": [ "dataWrapper" ], - "title": "Google Cloud Translation API", "ownerName": "Google", "resources": { + "detections": { + "methods": { + "detect": { + "path": "v2/detect", + "id": "language.detections.detect", + "request": { + "$ref": "DetectLanguageRequest" + }, + "description": "Detects the language of text within a request.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "DetectionsListResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-translation", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "DetectionsListResponse" + }, + "parameterOrder": [ + "q" + ], + "parameters": { + "q": { + "location": "query", + "description": "The input text upon which to perform language detection. Repeat this\nparameter to perform language detection on multiple text inputs.", + "required": true, + "type": "string", + "repeated": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-translation", + "https://www.googleapis.com/auth/cloud-platform" + ], + "path": "v2/detect", + "id": "language.detections.list", + "description": "Detects the language of text within a request." + } + } + }, "languages": { "methods": { "list": { @@ -17,9 +61,9 @@ "httpMethod": "GET", "parameters": { "target": { - "location": "query", "description": "The language to use to return localized, human readable names of supported\nlanguages.", - "type": "string" + "type": "string", + "location": "query" }, "model": { "type": "string", @@ -39,46 +83,49 @@ }, "translations": { "methods": { + "translate": { + "description": "Translates input text, returning translated text.", + "request": { + "$ref": "TranslateTextRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "TranslationsListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-translation", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "path": "v2", + "id": "language.translations.translate" + }, "list": { + "id": "language.translations.list", + "path": "v2", + "description": "Translates input text, returning translated text.", + "response": { + "$ref": "TranslationsListResponse" + }, "parameterOrder": [ "q", "target" ], "httpMethod": "GET", - "response": { - "$ref": "TranslationsListResponse" - }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-translation", + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { - "model": { - "location": "query", - "description": "The `model` type requested for this translation. Valid values are\nlisted in public documentation.", - "type": "string" - }, - "q": { - "required": true, - "type": "string", - "repeated": true, - "location": "query", - "description": "The input text to translate. Repeat this parameter to perform translation\noperations on multiple text inputs." - }, - "source": { - "location": "query", - "description": "The language of the source text, set to one of the language codes listed in\nLanguage Support. If the source language is not specified, the API will\nattempt to identify the source language automatically and return it within\nthe response.", - "type": "string" - }, - "cid": { - "description": "The customization id for translate", - "type": "string", - "repeated": true, - "location": "query" - }, "target": { - "description": "The language to use for translation of the input text, set to one of the\nlanguage codes listed in Language Support.", "required": true, "type": "string", - "location": "query" + "location": "query", + "description": "The language to use for translation of the input text, set to one of the\nlanguage codes listed in Language Support." }, "format": { + "type": "string", "enumDescriptions": [ "Specifies the input is in HTML", "Specifies the input is in plain textual format" @@ -88,96 +135,101 @@ "html", "text" ], - "description": "The format of the source text, in either HTML (default) or plain-text. A\nvalue of \"html\" indicates HTML and a value of \"text\" indicates plain-text.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-translation", - "https://www.googleapis.com/auth/cloud-platform" - ], - "id": "language.translations.list", - "path": "v2", - "description": "Translates input text, returning translated text." - }, - "translate": { - "response": { - "$ref": "TranslationsListResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-translation", - "https://www.googleapis.com/auth/cloud-platform" - ], - "id": "language.translations.translate", - "path": "v2", - "request": { - "$ref": "TranslateTextRequest" - }, - "description": "Translates input text, returning translated text." - } - } - }, - "detections": { - "methods": { - "detect": { - "description": "Detects the language of text within a request.", - "request": { - "$ref": "DetectLanguageRequest" - }, - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "DetectionsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-translation", - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {}, - "path": "v2/detect", - "id": "language.detections.detect" - }, - "list": { - "path": "v2/detect", - "id": "language.detections.list", - "description": "Detects the language of text within a request.", - "httpMethod": "GET", - "response": { - "$ref": "DetectionsListResponse" - }, - "parameterOrder": [ - "q" - ], - "parameters": { + "description": "The format of the source text, in either HTML (default) or plain-text. A\nvalue of \"html\" indicates HTML and a value of \"text\" indicates plain-text." + }, + "model": { + "description": "The `model` type requested for this translation. Valid values are\nlisted in public documentation.", + "type": "string", + "location": "query" + }, "q": { - "description": "The input text upon which to perform language detection. Repeat this\nparameter to perform language detection on multiple text inputs.", + "description": "The input text to translate. Repeat this parameter to perform translation\noperations on multiple text inputs.", "required": true, "type": "string", "repeated": true, "location": "query" + }, + "source": { + "description": "The language of the source text, set to one of the language codes listed in\nLanguage Support. If the source language is not specified, the API will\nattempt to identify the source language automatically and return it within\nthe response.", + "type": "string", + "location": "query" + }, + "cid": { + "description": "The customization id for translate", + "type": "string", + "repeated": true, + "location": "query" } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-translation", - "https://www.googleapis.com/auth/cloud-platform" - ] + } } } } }, "parameters": { - "access_token": { - "type": "string", + "upload_protocol": { "location": "query", - "description": "OAuth access token." + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" }, "key": { - "location": "query", "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.", - "type": "string" + "type": "string", + "location": "query" }, "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. Overrides userIp if both are provided.", @@ -199,74 +251,104 @@ "location": "query", "description": "OAuth 2.0 token for the current user.", "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ] - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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", - "description": "Data format for response.", - "default": "json" } }, "version": "v2", "baseUrl": "https://translation.googleapis.com/language/translate/", - "kind": "discovery#restDescription", - "description": "The Google Cloud Translation API lets websites and programs integrate with\n Google Translate programmatically.", "servicePath": "language/translate/", + "description": "The Google Cloud Translation API lets websites and programs integrate with\n Google Translate programmatically.", + "kind": "discovery#restDescription", "basePath": "/language/translate/", "revision": "20170525", "documentationLink": "https://code.google.com/apis/language/translate/v2/getting_started.html", "id": "translate:v2", "discoveryVersion": "v1", "schemas": { + "TranslationsResource": { + "type": "object", + "properties": { + "detectedSourceLanguage": { + "description": "The source language of the initial request, detected automatically, if\nno source language was passed within the initial request. If the\nsource language was passed, auto-detection of the language will not\noccur and this field will be empty.", + "type": "string" + }, + "model": { + "description": "The `model` type used for this translation. Valid values are\nlisted in public documentation. Can be different from requested `model`.\nPresent only if specific model type was explicitly requested.", + "type": "string" + }, + "translatedText": { + "description": "Text translated into the target language.", + "type": "string" + } + }, + "id": "TranslationsResource" + }, + "DetectionsResource": { + "description": "An array of languages which we detect for the given text The most likely language list first.", + "items": { + "type": "object", + "properties": { + "confidence": { + "format": "float", + "description": "The confidence of the detection result of this language.", + "type": "number" + }, + "language": { + "description": "The language we detected.", + "type": "string" + }, + "isReliable": { + "description": "A boolean to indicate is the language detection result reliable.", + "type": "boolean" + } + } + }, + "type": "array", + "id": "DetectionsResource" + }, + "TranslationsListResponse": { + "properties": { + "translations": { + "description": "Translations contains list of translation results of given text", + "items": { + "$ref": "TranslationsResource" + }, + "type": "array" + } + }, + "id": "TranslationsListResponse", + "description": "The main language translation response message.", + "type": "object" + }, + "TranslateTextRequest": { + "description": "The main translation request message for the Cloud Translation API.", + "type": "object", + "properties": { + "format": { + "description": "The format of the source text, in either HTML (default) or plain-text. A\nvalue of \"html\" indicates HTML and a value of \"text\" indicates plain-text.", + "type": "string" + }, + "q": { + "description": "The input text to translate. Repeat this parameter to perform translation\noperations on multiple text inputs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "source": { + "type": "string", + "description": "The language of the source text, set to one of the language codes listed in\nLanguage Support. If the source language is not specified, the API will\nattempt to identify the source language automatically and return it within\nthe response." + }, + "model": { + "description": "The `model` type requested for this translation. Valid values are\nlisted in public documentation.", + "type": "string" + }, + "target": { + "description": "The language to use for translation of the input text, set to one of the\nlanguage codes listed in Language Support.", + "type": "string" + } + }, + "id": "TranslateTextRequest" + }, "DetectLanguageRequest": { "description": "The request message for language detection.", "type": "object", @@ -282,18 +364,18 @@ "id": "DetectLanguageRequest" }, "LanguagesResource": { - "type": "object", "properties": { "name": { "description": "Human readable name of the language localized to the target language.", "type": "string" }, "language": { - "type": "string", - "description": "Supported language code, generally consisting of its ISO 639-1\nidentifier. (E.g. 'en', 'ja'). In certain cases, BCP-47 codes including\nlanguage + region identifiers are returned (e.g. 'zh-TW' and 'zh-CH')" + "description": "Supported language code, generally consisting of its ISO 639-1\nidentifier. (E.g. 'en', 'ja'). In certain cases, BCP-47 codes including\nlanguage + region identifiers are returned (e.g. 'zh-TW' and 'zh-CH')", + "type": "string" } }, - "id": "LanguagesResource" + "id": "LanguagesResource", + "type": "object" }, "DetectionsListResponse": { "type": "object", @@ -331,91 +413,6 @@ } }, "id": "LanguagesListResponse" - }, - "DetectionsResource": { - "description": "An array of languages which we detect for the given text The most likely language list first.", - "items": { - "type": "object", - "properties": { - "confidence": { - "format": "float", - "description": "The confidence of the detection result of this language.", - "type": "number" - }, - "language": { - "description": "The language we detected.", - "type": "string" - }, - "isReliable": { - "description": "A boolean to indicate is the language detection result reliable.", - "type": "boolean" - } - } - }, - "type": "array", - "id": "DetectionsResource" - }, - "TranslationsResource": { - "type": "object", - "properties": { - "translatedText": { - "description": "Text translated into the target language.", - "type": "string" - }, - "detectedSourceLanguage": { - "description": "The source language of the initial request, detected automatically, if\nno source language was passed within the initial request. If the\nsource language was passed, auto-detection of the language will not\noccur and this field will be empty.", - "type": "string" - }, - "model": { - "description": "The `model` type used for this translation. Valid values are\nlisted in public documentation. Can be different from requested `model`.\nPresent only if specific model type was explicitly requested.", - "type": "string" - } - }, - "id": "TranslationsResource" - }, - "TranslationsListResponse": { - "description": "The main language translation response message.", - "type": "object", - "properties": { - "translations": { - "description": "Translations contains list of translation results of given text", - "items": { - "$ref": "TranslationsResource" - }, - "type": "array" - } - }, - "id": "TranslationsListResponse" - }, - "TranslateTextRequest": { - "description": "The main translation request message for the Cloud Translation API.", - "type": "object", - "properties": { - "target": { - "type": "string", - "description": "The language to use for translation of the input text, set to one of the\nlanguage codes listed in Language Support." - }, - "format": { - "type": "string", - "description": "The format of the source text, in either HTML (default) or plain-text. A\nvalue of \"html\" indicates HTML and a value of \"text\" indicates plain-text." - }, - "q": { - "description": "The input text to translate. Repeat this parameter to perform translation\noperations on multiple text inputs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "source": { - "description": "The language of the source text, set to one of the language codes listed in\nLanguage Support. If the source language is not specified, the API will\nattempt to identify the source language automatically and return it within\nthe response.", - "type": "string" - }, - "model": { - "description": "The `model` type requested for this translation. Valid values are\nlisted in public documentation.", - "type": "string" - } - }, - "id": "TranslateTextRequest" } }, "protocol": "rest", @@ -427,14 +424,17 @@ "auth": { "oauth2": { "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, "https://www.googleapis.com/auth/cloud-translation": { "description": "Translate text from one language to another using Google Translate" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" } } } }, - "rootUrl": "https://translation.googleapis.com/" + "rootUrl": "https://translation.googleapis.com/", + "ownerDomain": "google.com", + "name": "translate", + "batchPath": "batch/translate" } diff --git a/vendor/google.golang.org/api/transport/grpc/dial.go b/vendor/google.golang.org/api/transport/grpc/dial.go index ec9f1c099..8a23bd384 100644 --- a/vendor/google.golang.org/api/transport/grpc/dial.go +++ b/vendor/google.golang.org/api/transport/grpc/dial.go @@ -15,7 +15,7 @@ // Package transport/grpc supports network connections to GRPC servers. // This package is not intended for use by end developers. Use the // google.golang.org/api/option package to configure API clients. -package transport +package grpc import ( "errors" diff --git a/vendor/google.golang.org/api/transport/grpc/dial_appengine.go b/vendor/google.golang.org/api/transport/grpc/dial_appengine.go index 201244d24..a40cef250 100644 --- a/vendor/google.golang.org/api/transport/grpc/dial_appengine.go +++ b/vendor/google.golang.org/api/transport/grpc/dial_appengine.go @@ -14,18 +14,25 @@ // +build appengine -package transport +package grpc import ( "net" "time" "golang.org/x/net/context" + "google.golang.org/appengine" "google.golang.org/appengine/socket" "google.golang.org/grpc" ) func init() { + // NOTE: dev_appserver doesn't currently support SSL. + // When it does, this code can be removed. + if appengine.IsDevAppServer() { + return + } + appengineDialerHook = func(ctx context.Context) grpc.DialOption { return grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) { return socket.DialTimeout(ctx, "tcp", addr, timeout) diff --git a/vendor/google.golang.org/api/transport/grpc/dial_test.go b/vendor/google.golang.org/api/transport/grpc/dial_test.go index 5c1dbf7ca..66d34d88c 100644 --- a/vendor/google.golang.org/api/transport/grpc/dial_test.go +++ b/vendor/google.golang.org/api/transport/grpc/dial_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package transport +package grpc import ( "errors" diff --git a/vendor/google.golang.org/api/transport/http/dial.go b/vendor/google.golang.org/api/transport/http/dial.go index 71d4eb2a7..a04956d98 100644 --- a/vendor/google.golang.org/api/transport/http/dial.go +++ b/vendor/google.golang.org/api/transport/http/dial.go @@ -15,7 +15,7 @@ // Package transport/http supports network connections to HTTP servers. // This package is not intended for use by end developers. Use the // google.golang.org/api/option package to configure API clients. -package transport +package http import ( "errors" @@ -23,7 +23,7 @@ import ( "golang.org/x/net/context" "golang.org/x/oauth2" - gtransport "google.golang.org/api/googleapi/transport" + "google.golang.org/api/googleapi/transport" "google.golang.org/api/internal" "google.golang.org/api/option" ) @@ -45,7 +45,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*http.Client, } if o.APIKey != "" { hc := &http.Client{ - Transport: >ransport.APIKey{ + Transport: &transport.APIKey{ Key: o.APIKey, Transport: userAgentTransport{ base: baseTransport(ctx), diff --git a/vendor/google.golang.org/api/transport/http/dial_appengine.go b/vendor/google.golang.org/api/transport/http/dial_appengine.go index c7451b2d0..0cdef74ac 100644 --- a/vendor/google.golang.org/api/transport/http/dial_appengine.go +++ b/vendor/google.golang.org/api/transport/http/dial_appengine.go @@ -14,7 +14,7 @@ // +build appengine -package transport +package http import ( "net/http" diff --git a/vendor/google.golang.org/api/vault/v1/vault-api.json b/vendor/google.golang.org/api/vault/v1/vault-api.json index 6aec764f1..a1ab8c85f 100644 --- a/vendor/google.golang.org/api/vault/v1/vault-api.json +++ b/vendor/google.golang.org/api/vault/v1/vault-api.json @@ -1,602 +1,23 @@ { - "name": "vault", - "batchPath": "batch", - "revision": "20170720", - "id": "vault:v1", - "documentationLink": "https://apps.google.com/products/vault/", - "title": "Google Vault API", - "ownerName": "Google", - "discoveryVersion": "v1", - "version_module": "True", - "resources": { - "matters": { - "methods": { - "create": { - "request": { + "schemas": { + "ListMattersResponse": { + "description": "Provides the list of matters.", + "type": "object", + "properties": { + "matters": { + "description": "List of matters.", + "items": { "$ref": "Matter" }, - "description": "Creates a new matter. Returns created matter with default view.", - "response": { - "$ref": "Matter" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "flatPath": "v1/matters", - "id": "vault.matters.create", - "path": "v1/matters" + "type": "array" }, - "reopen": { - "request": { - "$ref": "ReopenMatterRequest" - }, - "description": "Reopens the specified matter. Returns matter with updated state.", - "httpMethod": "POST", - "parameterOrder": [ - "matterId" - ], - "response": { - "$ref": "ReopenMatterResponse" - }, - "parameters": { - "matterId": { - "description": "The matter ID.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/matters/{matterId}:reopen", - "path": "v1/matters/{matterId}:reopen", - "id": "vault.matters.reopen" - }, - "removePermissions": { - "flatPath": "v1/matters/{matterId}:removePermissions", - "id": "vault.matters.removePermissions", - "path": "v1/matters/{matterId}:removePermissions", - "request": { - "$ref": "RemoveMatterPermissionsRequest" - }, - "description": "Removes an account as a matter collaborator.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "matterId" - ], - "httpMethod": "POST", - "parameters": { - "matterId": { - "location": "path", - "description": "The matter ID.", - "type": "string", - "required": true - } - } - }, - "undelete": { - "httpMethod": "POST", - "parameterOrder": [ - "matterId" - ], - "response": { - "$ref": "Matter" - }, - "parameters": { - "matterId": { - "location": "path", - "description": "The matter ID.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/matters/{matterId}:undelete", - "path": "v1/matters/{matterId}:undelete", - "id": "vault.matters.undelete", - "description": "Undeletes the specified matter. Returns matter with updated state.", - "request": { - "$ref": "UndeleteMatterRequest" - } - }, - "get": { - "description": "Gets the specified matter.", - "httpMethod": "GET", - "response": { - "$ref": "Matter" - }, - "parameterOrder": [ - "matterId" - ], - "parameters": { - "view": { - "location": "query", - "enum": [ - "VIEW_UNSPECIFIED", - "BASIC", - "FULL" - ], - "description": "Specifies which parts of the Matter to return in the response.", - "type": "string" - }, - "matterId": { - "type": "string", - "required": true, - "location": "path", - "description": "The matter ID." - } - }, - "flatPath": "v1/matters/{matterId}", - "path": "v1/matters/{matterId}", - "id": "vault.matters.get" - }, - "close": { - "flatPath": "v1/matters/{matterId}:close", - "id": "vault.matters.close", - "path": "v1/matters/{matterId}:close", - "request": { - "$ref": "CloseMatterRequest" - }, - "description": "Closes the specified matter. Returns matter with updated state.", - "response": { - "$ref": "CloseMatterResponse" - }, - "parameterOrder": [ - "matterId" - ], - "httpMethod": "POST", - "parameters": { - "matterId": { - "location": "path", - "description": "The matter ID.", - "type": "string", - "required": true - } - } - }, - "update": { - "response": { - "$ref": "Matter" - }, - "parameterOrder": [ - "matterId" - ], - "httpMethod": "PUT", - "parameters": { - "matterId": { - "description": "The matter ID.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/matters/{matterId}", - "id": "vault.matters.update", - "path": "v1/matters/{matterId}", - "description": "Updates the specified matter.\nThis updates only the name and description of the matter, identified by\nmatter id. Changes to any other fields are ignored.\nReturns the default view of the matter.", - "request": { - "$ref": "Matter" - } - }, - "delete": { - "parameters": { - "matterId": { - "description": "The matter ID", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/matters/{matterId}", - "id": "vault.matters.delete", - "path": "v1/matters/{matterId}", - "description": "Deletes the specified matter. Returns matter with updated state.", - "response": { - "$ref": "Matter" - }, - "parameterOrder": [ - "matterId" - ], - "httpMethod": "DELETE" - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [], - "response": { - "$ref": "ListMattersResponse" - }, - "parameters": { - "pageToken": { - "location": "query", - "description": "The pagination token as returned in the response.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The number of matters to return in the response.\nDefault and maximum are 100.", - "type": "integer" - }, - "view": { - "description": "Specifies which parts of the matter to return in response.", - "type": "string", - "location": "query", - "enum": [ - "VIEW_UNSPECIFIED", - "BASIC", - "FULL" - ] - } - }, - "flatPath": "v1/matters", - "path": "v1/matters", - "id": "vault.matters.list", - "description": "Lists matters the user has access to." - }, - "addPermissions": { - "request": { - "$ref": "AddMatterPermissionsRequest" - }, - "description": "Adds an account as a matter collaborator.", - "httpMethod": "POST", - "parameterOrder": [ - "matterId" - ], - "response": { - "$ref": "MatterPermission" - }, - "parameters": { - "matterId": { - "description": "The matter ID.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/matters/{matterId}:addPermissions", - "path": "v1/matters/{matterId}:addPermissions", - "id": "vault.matters.addPermissions" + "nextPageToken": { + "description": "Page token to retrieve the next page of results in the list.", + "type": "string" } }, - "resources": { - "holds": { - "methods": { - "delete": { - "description": "Removes a hold by ID. This will release any HeldAccounts on this Hold.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "matterId", - "holdId" - ], - "httpMethod": "DELETE", - "parameters": { - "matterId": { - "type": "string", - "required": true, - "location": "path", - "description": "The matter ID." - }, - "holdId": { - "type": "string", - "required": true, - "location": "path", - "description": "The hold ID." - } - }, - "flatPath": "v1/matters/{matterId}/holds/{holdId}", - "id": "vault.matters.holds.delete", - "path": "v1/matters/{matterId}/holds/{holdId}" - }, - "list": { - "id": "vault.matters.holds.list", - "path": "v1/matters/{matterId}/holds", - "description": "Lists holds within a matter. An empty page token in ListHoldsResponse\ndenotes no more holds to list.", - "response": { - "$ref": "ListHoldsResponse" - }, - "parameterOrder": [ - "matterId" - ], - "httpMethod": "GET", - "parameters": { - "matterId": { - "description": "The matter ID.", - "type": "string", - "required": true, - "location": "path" - }, - "pageToken": { - "description": "The pagination token as returned in the response.\nAn empty token means start from the beginning.", - "type": "string", - "location": "query" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "The number of holds to return in the response, between 0 and 100 inclusive.\nLeaving this empty, or as 0, is the same as page_size = 100." - } - }, - "flatPath": "v1/matters/{matterId}/holds" - }, - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "matterId", - "holdId" - ], - "response": { - "$ref": "Hold" - }, - "parameters": { - "matterId": { - "location": "path", - "description": "The matter ID.", - "type": "string", - "required": true - }, - "holdId": { - "location": "path", - "description": "The hold ID.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/matters/{matterId}/holds/{holdId}", - "path": "v1/matters/{matterId}/holds/{holdId}", - "id": "vault.matters.holds.get", - "description": "Gets a hold by ID." - }, - "update": { - "request": { - "$ref": "Hold" - }, - "description": "Updates the OU and/or query parameters of a hold. You cannot add accounts\nto a hold that covers an OU, nor can you add OUs to a hold that covers\nindividual accounts. Accounts listed in the hold will be ignored.", - "response": { - "$ref": "Hold" - }, - "parameterOrder": [ - "matterId", - "holdId" - ], - "httpMethod": "PUT", - "parameters": { - "holdId": { - "location": "path", - "description": "The ID of the hold.", - "type": "string", - "required": true - }, - "matterId": { - "location": "path", - "description": "The matter ID.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/matters/{matterId}/holds/{holdId}", - "id": "vault.matters.holds.update", - "path": "v1/matters/{matterId}/holds/{holdId}" - }, - "create": { - "request": { - "$ref": "Hold" - }, - "description": "Creates a hold in the given matter.", - "response": { - "$ref": "Hold" - }, - "parameterOrder": [ - "matterId" - ], - "httpMethod": "POST", - "parameters": { - "matterId": { - "description": "The matter ID.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/matters/{matterId}/holds", - "id": "vault.matters.holds.create", - "path": "v1/matters/{matterId}/holds" - } - }, - "resources": { - "accounts": { - "methods": { - "delete": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "matterId", - "holdId", - "accountId" - ], - "httpMethod": "DELETE", - "parameters": { - "accountId": { - "location": "path", - "description": "The ID of the account to remove from the hold.", - "type": "string", - "required": true - }, - "matterId": { - "location": "path", - "description": "The matter ID.", - "type": "string", - "required": true - }, - "holdId": { - "description": "The hold ID.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}", - "id": "vault.matters.holds.accounts.delete", - "path": "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}", - "description": "Removes a HeldAccount from a hold. If this request leaves the hold with\nno held accounts, the hold will not apply to any accounts." - }, - "list": { - "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts", - "id": "vault.matters.holds.accounts.list", - "path": "v1/matters/{matterId}/holds/{holdId}/accounts", - "description": "Lists HeldAccounts for a hold. This will only list individually specified\nheld accounts. If the hold is on an OU, then use the \u003cahref=\"https://developers.google.com/admin-sdk/\"\u003eAdmin SDK\u003c/a\u003e\nto enumerate its members.", - "response": { - "$ref": "ListHeldAccountsResponse" - }, - "parameterOrder": [ - "matterId", - "holdId" - ], - "httpMethod": "GET", - "parameters": { - "holdId": { - "location": "path", - "description": "The hold ID.", - "type": "string", - "required": true - }, - "matterId": { - "description": "The matter ID.", - "type": "string", - "required": true, - "location": "path" - } - } - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "matterId", - "holdId" - ], - "response": { - "$ref": "HeldAccount" - }, - "parameters": { - "matterId": { - "location": "path", - "description": "The matter ID.", - "type": "string", - "required": true - }, - "holdId": { - "type": "string", - "required": true, - "location": "path", - "description": "The hold ID." - } - }, - "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts", - "path": "v1/matters/{matterId}/holds/{holdId}/accounts", - "id": "vault.matters.holds.accounts.create", - "description": "Adds a HeldAccount to a hold. Accounts can only be added to a hold that\nhas no held_org_unit set. Attempting to add an account to an OU-based\nhold will result in an error.", - "request": { - "$ref": "HeldAccount" - } - } - } - } - } - } - } - } - }, - "parameters": { - "access_token": { - "type": "string", - "location": "query", - "description": "OAuth access token." + "id": "ListMattersResponse" }, - "key": { - "type": "string", - "location": "query", - "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." - }, - "quotaUser": { - "type": "string", - "location": "query", - "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." - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format." - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "alt": { - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "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", - "description": "Data format for response." - } - }, - "schemas": { "HeldMailQuery": { "description": "Query options for mail holds.", "type": "object", @@ -629,17 +50,6 @@ }, "id": "CloseMatterResponse" }, - "HeldDriveQuery": { - "id": "HeldDriveQuery", - "description": "Query options for drive holds.", - "type": "object", - "properties": { - "includeTeamDriveFiles": { - "description": "If true, include files in Team Drives in the hold.", - "type": "boolean" - } - } - }, "HeldGroupsQuery": { "description": "Query options for group holds.", "type": "object", @@ -655,24 +65,35 @@ "type": "string" }, "terms": { - "description": "The search terms for the hold.", - "type": "string" + "type": "string", + "description": "The search terms for the hold." } }, "id": "HeldGroupsQuery" }, + "HeldDriveQuery": { + "description": "Query options for drive holds.", + "type": "object", + "properties": { + "includeTeamDriveFiles": { + "description": "If true, include files in Team Drives in the hold.", + "type": "boolean" + } + }, + "id": "HeldDriveQuery" + }, "HeldOrgUnit": { "description": "A organizational unit being held in a particular hold.\nThis structure is immutable.", "type": "object", "properties": { + "orgUnitId": { + "description": "The org unit's immutable ID as provided by the admin SDK.", + "type": "string" + }, "holdTime": { "format": "google-datetime", "description": "When the org unit was put on hold. This property is immutable.", "type": "string" - }, - "orgUnitId": { - "type": "string", - "description": "The org unit's immutable ID as provided by the admin SDK." } }, "id": "HeldOrgUnit" @@ -697,9 +118,18 @@ "id": "AddMatterPermissionsRequest" }, "Matter": { + "id": "Matter", "description": "Represents a matter.", "type": "object", "properties": { + "description": { + "description": "The description of the matter.", + "type": "string" + }, + "matterId": { + "description": "The matter ID which is generated by the server.\nShould be blank when creating a new matter.", + "type": "string" + }, "state": { "enumDescriptions": [ "The matter has no specified state.", @@ -726,33 +156,24 @@ "name": { "description": "The name of the matter.", "type": "string" - }, - "description": { - "description": "The description of the matter.", - "type": "string" - }, - "matterId": { - "description": "The matter ID which is generated by the server.\nShould be blank when creating a new matter.", - "type": "string" } - }, - "id": "Matter" + } }, "HeldAccount": { + "id": "HeldAccount", + "description": "An account being held in a particular hold. This structure is immutable.\nThis can be either a single user or a google group, depending on the corpus.", "type": "object", "properties": { + "accountId": { + "description": "The account's ID as provided by the\n\u003ca href=\"https://developers.google.com/admin-sdk/\"\u003eAdmin SDK\u003c/a\u003e.", + "type": "string" + }, "holdTime": { "format": "google-datetime", "description": "When the account was put on hold.", "type": "string" - }, - "accountId": { - "description": "The account's ID as provided by the \u003ca\nhref=\"https://developers.google.com/admin-sdk/\"\u003eAdmin SDK\u003c/a\u003e.", - "type": "string" } - }, - "id": "HeldAccount", - "description": "An account being held in a particular hold. This structure is immutable.\nThis can be either a single user or a google group, depending on the corpus." + } }, "ReopenMatterResponse": { "description": "Response to a ReopenMatterRequest.", @@ -770,23 +191,32 @@ "type": "object", "properties": { "groupsQuery": { - "$ref": "HeldGroupsQuery", - "description": "Details pertaining to Groups holds. If set, corpus must be Groups." + "description": "Details pertaining to Groups holds. If set, corpus must be Groups.", + "$ref": "HeldGroupsQuery" }, "mailQuery": { "description": "Details pertaining to mail holds. If set, corpus must be mail.", "$ref": "HeldMailQuery" }, "driveQuery": { - "description": "Details pertaining to Drive holds. If set, corpus must be Drive.", - "$ref": "HeldDriveQuery" + "$ref": "HeldDriveQuery", + "description": "Details pertaining to Drive holds. If set, corpus must be Drive." } }, "id": "CorpusQuery" }, "Hold": { + "description": "Represents a hold within Vault. A hold restricts purging of\nartifacts based on the combination of the query and accounts restrictions.\nA hold can be configured to either apply to an explicitly configured set\nof accounts, or can be applied to all members of an organizational unit.", "type": "object", "properties": { + "name": { + "description": "The name of the hold.", + "type": "string" + }, + "holdId": { + "description": "The unique immutable ID of the hold. Assigned during creation.", + "type": "string" + }, "accounts": { "description": "If set, the hold applies to the enumerated accounts and org_unit must be\nempty.", "items": { @@ -795,14 +225,15 @@ "type": "array" }, "orgUnit": { - "$ref": "HeldOrgUnit", - "description": "If set, the hold applies to all members of the organizational unit and\naccounts must be empty. This property is mutable. For groups holds,\nset the accounts field." + "description": "If set, the hold applies to all members of the organizational unit and\naccounts must be empty. This property is mutable. For groups holds,\nset the accounts field.", + "$ref": "HeldOrgUnit" }, "query": { - "description": "The corpus-specific query. If set, the corpusQuery must match corpus\ntype.", - "$ref": "CorpusQuery" + "$ref": "CorpusQuery", + "description": "The corpus-specific query. If set, the corpusQuery must match corpus\ntype." }, "corpus": { + "description": "The corpus to be searched.", "type": "string", "enumDescriptions": [ "No corpus specified.", @@ -815,25 +246,15 @@ "DRIVE", "MAIL", "GROUPS" - ], - "description": "The corpus to be searched." + ] }, "updateTime": { "format": "google-datetime", "description": "The last time this hold was modified.", "type": "string" - }, - "name": { - "description": "The name of the hold.", - "type": "string" - }, - "holdId": { - "description": "The unique immutable ID of the hold. Assigned during creation.", - "type": "string" } }, - "id": "Hold", - "description": "Represents a hold within Vault. A hold restricts purging of\nartifacts based on the combination of the query and accounts restrictions.\nA hold can be configured to either apply to an explicitly configured set\nof accounts, or can be applied to all members of an organizational unit." + "id": "Hold" }, "ListHoldsResponse": { "description": "The holds for a matter.", @@ -854,24 +275,24 @@ "id": "ListHoldsResponse" }, "ListHeldAccountsResponse": { - "type": "object", "properties": { "accounts": { + "description": "The held accounts on a hold.", "items": { "$ref": "HeldAccount" }, - "type": "array", - "description": "The held accounts on a hold." + "type": "array" } }, "id": "ListHeldAccountsResponse", - "description": "Returns a list of held accounts for a hold." + "description": "Returns a list of held accounts for a hold.", + "type": "object" }, "UndeleteMatterRequest": { - "id": "UndeleteMatterRequest", - "description": "Undelete a matter by ID.", "type": "object", - "properties": {} + "properties": {}, + "id": "UndeleteMatterRequest", + "description": "Undelete a matter by ID." }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", @@ -879,33 +300,36 @@ "properties": {}, "id": "Empty" }, + "ReopenMatterRequest": { + "id": "ReopenMatterRequest", + "description": "Reopen a matter by ID.", + "type": "object", + "properties": {} + }, "CloseMatterRequest": { "description": "Close a matter by ID.", "type": "object", "properties": {}, "id": "CloseMatterRequest" }, - "ReopenMatterRequest": { - "type": "object", - "properties": {}, - "id": "ReopenMatterRequest", - "description": "Reopen a matter by ID." - }, "RemoveMatterPermissionsRequest": { + "description": "Remove an account as a matter collaborator.", + "type": "object", "properties": { "accountId": { "description": "The account ID.", "type": "string" } }, - "id": "RemoveMatterPermissionsRequest", - "description": "Remove an account as a matter collaborator.", - "type": "object" + "id": "RemoveMatterPermissionsRequest" }, "MatterPermission": { - "description": "Currently each matter only has one owner, and all others are collaborators.\nWhen an account is purged, its corresponding MatterPermission resources\ncease to exist.", "type": "object", "properties": { + "accountId": { + "description": "The account id, as provided by \u003ca href=\"https://developers.google.com/admin-sdk/\"\u003eAdmin SDK\u003c/a\u003e.", + "type": "string" + }, "role": { "enumDescriptions": [ "No role assigned.", @@ -919,45 +343,622 @@ ], "description": "The user's role in this matter.", "type": "string" - }, - "accountId": { - "description": "The account id, as provided by \u003ca href=\"https://developers.google.com/admin-sdk/\"\u003eAdmin SDK\u003c/a\u003e.", - "type": "string" } }, - "id": "MatterPermission" - }, - "ListMattersResponse": { - "properties": { - "nextPageToken": { - "description": "Page token to retrieve the next page of results in the list.", - "type": "string" - }, - "matters": { - "description": "List of matters.", - "items": { - "$ref": "Matter" - }, - "type": "array" - } - }, - "id": "ListMattersResponse", - "description": "Provides the list of matters.", - "type": "object" + "id": "MatterPermission", + "description": "Currently each matter only has one owner, and all others are collaborators.\nWhen an account is purged, its corresponding MatterPermission resources\ncease to exist." } }, + "protocol": "rest", "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "protocol": "rest", + "canonicalName": "Vault", + "rootUrl": "https://vault.googleapis.com/", + "ownerDomain": "google.com", + "name": "vault", + "batchPath": "batch", + "fullyEncodeReservedExpansion": true, + "title": "Google Vault API", + "ownerName": "Google", + "resources": { + "matters": { + "methods": { + "update": { + "httpMethod": "PUT", + "parameterOrder": [ + "matterId" + ], + "response": { + "$ref": "Matter" + }, + "parameters": { + "matterId": { + "location": "path", + "description": "The matter ID.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/matters/{matterId}", + "path": "v1/matters/{matterId}", + "id": "vault.matters.update", + "description": "Updates the specified matter.\nThis updates only the name and description of the matter, identified by\nmatter id. Changes to any other fields are ignored.\nReturns the default view of the matter.", + "request": { + "$ref": "Matter" + } + }, + "delete": { + "flatPath": "v1/matters/{matterId}", + "id": "vault.matters.delete", + "path": "v1/matters/{matterId}", + "description": "Deletes the specified matter. Returns matter with updated state.", + "response": { + "$ref": "Matter" + }, + "parameterOrder": [ + "matterId" + ], + "httpMethod": "DELETE", + "parameters": { + "matterId": { + "location": "path", + "description": "The matter ID", + "type": "string", + "required": true + } + } + }, + "list": { + "description": "Lists matters the user has access to.", + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ListMattersResponse" + }, + "parameters": { + "pageToken": { + "location": "query", + "description": "The pagination token as returned in the response.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The number of matters to return in the response.\nDefault and maximum are 100.", + "type": "integer" + }, + "view": { + "location": "query", + "enum": [ + "VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "description": "Specifies which parts of the matter to return in response.", + "type": "string" + } + }, + "flatPath": "v1/matters", + "path": "v1/matters", + "id": "vault.matters.list" + }, + "addPermissions": { + "request": { + "$ref": "AddMatterPermissionsRequest" + }, + "description": "Adds an account as a matter collaborator.", + "httpMethod": "POST", + "parameterOrder": [ + "matterId" + ], + "response": { + "$ref": "MatterPermission" + }, + "parameters": { + "matterId": { + "location": "path", + "description": "The matter ID.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/matters/{matterId}:addPermissions", + "path": "v1/matters/{matterId}:addPermissions", + "id": "vault.matters.addPermissions" + }, + "create": { + "response": { + "$ref": "Matter" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "flatPath": "v1/matters", + "id": "vault.matters.create", + "path": "v1/matters", + "description": "Creates a new matter. Returns created matter with default view.", + "request": { + "$ref": "Matter" + } + }, + "removePermissions": { + "flatPath": "v1/matters/{matterId}:removePermissions", + "path": "v1/matters/{matterId}:removePermissions", + "id": "vault.matters.removePermissions", + "description": "Removes an account as a matter collaborator.", + "request": { + "$ref": "RemoveMatterPermissionsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "matterId" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "matterId": { + "location": "path", + "description": "The matter ID.", + "type": "string", + "required": true + } + } + }, + "reopen": { + "flatPath": "v1/matters/{matterId}:reopen", + "id": "vault.matters.reopen", + "path": "v1/matters/{matterId}:reopen", + "description": "Reopens the specified matter. Returns matter with updated state.", + "request": { + "$ref": "ReopenMatterRequest" + }, + "response": { + "$ref": "ReopenMatterResponse" + }, + "parameterOrder": [ + "matterId" + ], + "httpMethod": "POST", + "parameters": { + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + } + } + }, + "close": { + "description": "Closes the specified matter. Returns matter with updated state.", + "request": { + "$ref": "CloseMatterRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "matterId" + ], + "response": { + "$ref": "CloseMatterResponse" + }, + "parameters": { + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/matters/{matterId}:close", + "path": "v1/matters/{matterId}:close", + "id": "vault.matters.close" + }, + "undelete": { + "response": { + "$ref": "Matter" + }, + "parameterOrder": [ + "matterId" + ], + "httpMethod": "POST", + "parameters": { + "matterId": { + "location": "path", + "description": "The matter ID.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/matters/{matterId}:undelete", + "id": "vault.matters.undelete", + "path": "v1/matters/{matterId}:undelete", + "description": "Undeletes the specified matter. Returns matter with updated state.", + "request": { + "$ref": "UndeleteMatterRequest" + } + }, + "get": { + "description": "Gets the specified matter.", + "httpMethod": "GET", + "parameterOrder": [ + "matterId" + ], + "response": { + "$ref": "Matter" + }, + "parameters": { + "matterId": { + "location": "path", + "description": "The matter ID.", + "type": "string", + "required": true + }, + "view": { + "location": "query", + "enum": [ + "VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "description": "Specifies which parts of the Matter to return in the response.", + "type": "string" + } + }, + "flatPath": "v1/matters/{matterId}", + "path": "v1/matters/{matterId}", + "id": "vault.matters.get" + } + }, + "resources": { + "holds": { + "methods": { + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "matterId" + ], + "response": { + "$ref": "Hold" + }, + "parameters": { + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/matters/{matterId}/holds", + "path": "v1/matters/{matterId}/holds", + "id": "vault.matters.holds.create", + "request": { + "$ref": "Hold" + }, + "description": "Creates a hold in the given matter." + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "matterId", + "holdId" + ], + "httpMethod": "DELETE", + "parameters": { + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + }, + "holdId": { + "location": "path", + "description": "The hold ID.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/matters/{matterId}/holds/{holdId}", + "id": "vault.matters.holds.delete", + "path": "v1/matters/{matterId}/holds/{holdId}", + "description": "Removes a hold by ID. This will release any HeldAccounts on this Hold." + }, + "list": { + "response": { + "$ref": "ListHoldsResponse" + }, + "parameterOrder": [ + "matterId" + ], + "httpMethod": "GET", + "parameters": { + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + }, + "pageToken": { + "description": "The pagination token as returned in the response.\nAn empty token means start from the beginning.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The number of holds to return in the response, between 0 and 100 inclusive.\nLeaving this empty, or as 0, is the same as page_size = 100.", + "type": "integer" + } + }, + "flatPath": "v1/matters/{matterId}/holds", + "id": "vault.matters.holds.list", + "path": "v1/matters/{matterId}/holds", + "description": "Lists holds within a matter. An empty page token in ListHoldsResponse\ndenotes no more holds to list." + }, + "get": { + "description": "Gets a hold by ID.", + "response": { + "$ref": "Hold" + }, + "parameterOrder": [ + "matterId", + "holdId" + ], + "httpMethod": "GET", + "parameters": { + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + }, + "holdId": { + "location": "path", + "description": "The hold ID.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/matters/{matterId}/holds/{holdId}", + "id": "vault.matters.holds.get", + "path": "v1/matters/{matterId}/holds/{holdId}" + }, + "update": { + "flatPath": "v1/matters/{matterId}/holds/{holdId}", + "id": "vault.matters.holds.update", + "path": "v1/matters/{matterId}/holds/{holdId}", + "request": { + "$ref": "Hold" + }, + "description": "Updates the OU and/or query parameters of a hold. You cannot add accounts\nto a hold that covers an OU, nor can you add OUs to a hold that covers\nindividual accounts. Accounts listed in the hold will be ignored.", + "response": { + "$ref": "Hold" + }, + "parameterOrder": [ + "matterId", + "holdId" + ], + "httpMethod": "PUT", + "parameters": { + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + }, + "holdId": { + "description": "The ID of the hold.", + "type": "string", + "required": true, + "location": "path" + } + } + } + }, + "resources": { + "accounts": { + "methods": { + "delete": { + "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}", + "path": "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}", + "id": "vault.matters.holds.accounts.delete", + "description": "Removes a HeldAccount from a hold. If this request leaves the hold with\nno held accounts, the hold will not apply to any accounts.", + "httpMethod": "DELETE", + "parameterOrder": [ + "matterId", + "holdId", + "accountId" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "accountId": { + "description": "The ID of the account to remove from the hold.", + "type": "string", + "required": true, + "location": "path" + }, + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + }, + "holdId": { + "location": "path", + "description": "The hold ID.", + "type": "string", + "required": true + } + } + }, + "list": { + "description": "Lists HeldAccounts for a hold. This will only list individually specified\nheld accounts. If the hold is on an OU, then use\n\u003ca href=\"https://developers.google.com/admin-sdk/\"\u003eAdmin SDK\u003c/a\u003e\nto enumerate its members.", + "response": { + "$ref": "ListHeldAccountsResponse" + }, + "parameterOrder": [ + "matterId", + "holdId" + ], + "httpMethod": "GET", + "parameters": { + "matterId": { + "location": "path", + "description": "The matter ID.", + "type": "string", + "required": true + }, + "holdId": { + "location": "path", + "description": "The hold ID.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts", + "id": "vault.matters.holds.accounts.list", + "path": "v1/matters/{matterId}/holds/{holdId}/accounts" + }, + "create": { + "request": { + "$ref": "HeldAccount" + }, + "description": "Adds a HeldAccount to a hold. Accounts can only be added to a hold that\nhas no held_org_unit set. Attempting to add an account to an OU-based\nhold will result in an error.", + "httpMethod": "POST", + "parameterOrder": [ + "matterId", + "holdId" + ], + "response": { + "$ref": "HeldAccount" + }, + "parameters": { + "matterId": { + "location": "path", + "description": "The matter ID.", + "type": "string", + "required": true + }, + "holdId": { + "description": "The hold ID.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts", + "path": "v1/matters/{matterId}/holds/{holdId}/accounts", + "id": "vault.matters.holds.accounts.create" + } + } + } + } + } + } + } + }, + "parameters": { + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "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", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, + "key": { + "location": "query", + "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.", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "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.", + "type": "string", + "location": "query" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + } + }, "version": "v1", "baseUrl": "https://vault.googleapis.com/", - "canonicalName": "Vault", "servicePath": "", "description": "", "kind": "discovery#restDescription", - "rootUrl": "https://vault.googleapis.com/", "basePath": "", - "ownerDomain": "google.com" + "revision": "20170828", + "documentationLink": "https://apps.google.com/products/vault/", + "id": "vault:v1", + "discoveryVersion": "v1", + "version_module": "True" } diff --git a/vendor/google.golang.org/api/vault/v1/vault-gen.go b/vendor/google.golang.org/api/vault/v1/vault-gen.go index 8d3430f1c..947a65469 100644 --- a/vendor/google.golang.org/api/vault/v1/vault-gen.go +++ b/vendor/google.golang.org/api/vault/v1/vault-gen.go @@ -241,8 +241,7 @@ type Empty struct { // corpus. type HeldAccount struct { // AccountId: The account's ID as provided by the - // Admin SDK. + // Admin SDK. AccountId string `json:"accountId,omitempty"` // HoldTime: When the account was put on hold. @@ -3181,8 +3180,8 @@ type MattersHoldsAccountsListCall struct { // List: Lists HeldAccounts for a hold. This will only list individually // specified -// held accounts. If the hold is on an OU, then use the -// Admin SDK +// held accounts. If the hold is on an OU, then use +// Admin SDK // to enumerate its members. func (r *MattersHoldsAccountsService) List(matterId string, holdId string) *MattersHoldsAccountsListCall { c := &MattersHoldsAccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -3286,7 +3285,7 @@ func (c *MattersHoldsAccountsListCall) Do(opts ...googleapi.CallOption) (*ListHe } return ret, nil // { - // "description": "Lists HeldAccounts for a hold. This will only list individually specified\nheld accounts. If the hold is on an OU, then use the \u003cahref=\"https://developers.google.com/admin-sdk/\"\u003eAdmin SDK\u003c/a\u003e\nto enumerate its members.", + // "description": "Lists HeldAccounts for a hold. This will only list individually specified\nheld accounts. If the hold is on an OU, then use\n\u003ca href=\"https://developers.google.com/admin-sdk/\"\u003eAdmin SDK\u003c/a\u003e\nto enumerate its members.", // "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts", // "httpMethod": "GET", // "id": "vault.matters.holds.accounts.list", diff --git a/vendor/google.golang.org/api/videointelligence/v1beta1/videointelligence-api.json b/vendor/google.golang.org/api/videointelligence/v1beta1/videointelligence-api.json index efec80354..d0418dca0 100644 --- a/vendor/google.golang.org/api/videointelligence/v1beta1/videointelligence-api.json +++ b/vendor/google.golang.org/api/videointelligence/v1beta1/videointelligence-api.json @@ -1,27 +1,350 @@ { - "servicePath": "", "description": "Google Cloud Video Intelligence API.", + "servicePath": "", "kind": "discovery#restDescription", "basePath": "", - "revision": "20170718", - "documentationLink": "https://cloud.google.com/video-intelligence/docs/", "id": "videointelligence:v1beta1", + "documentationLink": "https://cloud.google.com/video-intelligence/docs/", + "revision": "20170908", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { - "GoogleCloudVideointelligenceV1_AnnotateVideoProgress": { + "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame": { + "description": "Video frame level annotation results for explicit content.", + "type": "object", "properties": { - "annotationProgress": { - "description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", + "pornographyLikelihood": { + "description": "Likelihood of the pornography content..", + "type": "string", + "enumDescriptions": [ + "Unspecified likelihood.", + "Very unlikely.", + "Unlikely.", + "Possible.", + "Likely.", + "Very likely." + ], + "enum": [ + "LIKELIHOOD_UNSPECIFIED", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ] + }, + "timeOffset": { + "format": "google-duration", + "description": "Time-offset, relative to the beginning of the video, corresponding to the\nvideo frame for this location.", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame" + }, + "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest": { + "description": "Video annotation request.", + "type": "object", + "properties": { + "inputContent": { + "description": "The video data bytes. Encoding: base64. If unset, the input video(s)\nshould be specified via `input_uri`. If set, `input_uri` should be unset.", + "type": "string" + }, + "features": { + "description": "Requested video annotation features.", "items": { - "$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress" + "type": "string", + "enum": [ + "FEATURE_UNSPECIFIED", + "LABEL_DETECTION", + "SHOT_CHANGE_DETECTION", + "SAFE_SEARCH_DETECTION" + ] + }, + "type": "array", + "enumDescriptions": [ + "Unspecified.", + "Label detection. Detect objects, such as dog or flower.", + "Shot change detection.", + "Safe search detection." + ] + }, + "outputUri": { + "description": "Optional location where the output (in JSON format) should be stored.\nCurrently, only [Google Cloud Storage](https://cloud.google.com/storage/)\nURIs are supported, which must be specified in the following format:\n`gs://bucket-id/object-id` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](/storage/docs/reference-uris).", + "type": "string" + }, + "videoContext": { + "$ref": "GoogleCloudVideointelligenceV1beta1_VideoContext", + "description": "Additional video context and/or feature-specific parameters." + }, + "locationId": { + "description": "Optional cloud region where annotation should take place. Supported cloud\nregions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region\nis specified, a region will be determined based on video file location.", + "type": "string" + }, + "inputUri": { + "description": "Input video location. Currently, only\n[Google Cloud Storage](https://cloud.google.com/storage/) URIs are\nsupported, which must be specified in the following format:\n`gs://bucket-id/object-id` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](/storage/docs/reference-uris).\nA video URI may include wildcards in `object-id`, and thus identify\nmultiple videos. Supported wildcards: '*' to match 0 or more characters;\n'?' to match 1 character. If unset, the input video should be embedded\nin the request as `input_content`. If set, `input_content` should be unset.", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest" + }, + "GoogleCloudVideointelligenceV1beta1_VideoSegment": { + "description": "Video segment.", + "type": "object", + "properties": { + "endTimeOffset": { + "format": "int64", + "description": "End offset in microseconds (inclusive). Unset means 0.", + "type": "string" + }, + "startTimeOffset": { + "format": "int64", + "description": "Start offset in microseconds (inclusive). Unset means 0.", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1beta1_VideoSegment" + }, + "GoogleCloudVideointelligenceV1beta2_LabelSegment": { + "description": "Video segment level annotation results for label detection.", + "type": "object", + "properties": { + "confidence": { + "format": "float", + "description": "Confidence that the label is accurate. Range: [0, 1].", + "type": "number" + }, + "segment": { + "description": "Video segment where a label was detected.", + "$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" + } + }, + "id": "GoogleCloudVideointelligenceV1beta2_LabelSegment" + }, + "GoogleCloudVideointelligenceV1_SafeSearchAnnotation": { + "description": "Safe search annotation (based on per-frame visual signals only).\nIf no unsafe content has been detected in a frame, no annotations\nare present for that frame.", + "type": "object", + "properties": { + "time": { + "format": "google-duration", + "description": "Time-offset, relative to the beginning of the video,\ncorresponding to the video frame for this annotation.", + "type": "string" + }, + "adult": { + "enumDescriptions": [ + "Unknown likelihood.", + "Very unlikely.", + "Unlikely.", + "Possible.", + "Likely.", + "Very likely." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Likelihood of adult content.", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1_SafeSearchAnnotation" + }, + "GoogleCloudVideointelligenceV1beta2_LabelAnnotation": { + "description": "Label annotation.", + "type": "object", + "properties": { + "entity": { + "$ref": "GoogleCloudVideointelligenceV1beta2_Entity", + "description": "Detected entity." + }, + "frames": { + "description": "All video frames where a label was detected.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta2_LabelFrame" + }, + "type": "array" + }, + "segments": { + "description": "All video segments where a label was detected.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta2_LabelSegment" + }, + "type": "array" + }, + "categoryEntities": { + "description": "Common categories for the detected entity.\nE.g. when the label is `Terrier` the category is likely `dog`. And in some\ncases there might be more than one categories e.g. `Terrier` could also be\na `pet`.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta2_Entity" }, "type": "array" } }, - "id": "GoogleCloudVideointelligenceV1_AnnotateVideoProgress", + "id": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" + }, + "GoogleCloudVideointelligenceV1beta1_SafeSearchAnnotation": { + "description": "Safe search annotation (based on per-frame visual signals only).\nIf no unsafe content has been detected in a frame, no annotations\nare present for that frame. If only some types of unsafe content\nhave been detected in a frame, the likelihood is set to `UNKNOWN`\nfor all other types of unsafe content.", + "type": "object", + "properties": { + "adult": { + "description": "Likelihood of adult content.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "Very unlikely.", + "Unlikely.", + "Possible.", + "Likely.", + "Very likely." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ] + }, + "racy": { + "description": "Likelihood of racy content.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "Very unlikely.", + "Unlikely.", + "Possible.", + "Likely.", + "Very likely." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ] + }, + "timeOffset": { + "format": "int64", + "description": "Video time offset in microseconds.", + "type": "string" + }, + "violent": { + "enumDescriptions": [ + "Unknown likelihood.", + "Very unlikely.", + "Unlikely.", + "Possible.", + "Likely.", + "Very likely." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Likelihood of violent content.", + "type": "string" + }, + "spoof": { + "enumDescriptions": [ + "Unknown likelihood.", + "Very unlikely.", + "Unlikely.", + "Possible.", + "Likely.", + "Very likely." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Likelihood that an obvious modification was made to the original\nversion to make it appear funny or offensive.", + "type": "string" + }, + "medical": { + "enumDescriptions": [ + "Unknown likelihood.", + "Very unlikely.", + "Unlikely.", + "Possible.", + "Likely.", + "Very likely." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Likelihood of medical content.", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1beta1_SafeSearchAnnotation" + }, + "GoogleCloudVideointelligenceV1beta1_AnnotateVideoProgress": { "description": "Video annotation progress. Included in the `metadata`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", - "type": "object" + "type": "object", + "properties": { + "annotationProgress": { + "description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationProgress" + }, + "type": "array" + } + }, + "id": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoProgress" + }, + "GoogleCloudVideointelligenceV1beta2_Entity": { + "description": "Detected entity from video analysis.", + "type": "object", + "properties": { + "description": { + "description": "Textual description, e.g. `Fixed-gear bicycle`.", + "type": "string" + }, + "languageCode": { + "description": "Language code for `description` in BCP-47 format.", + "type": "string" + }, + "entityId": { + "description": "Opaque entity ID. Some IDs may be available in\n[Google Knowledge Graph Search\nAPI](https://developers.google.com/knowledge-graph/).", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1beta2_Entity" + }, + "GoogleCloudVideointelligenceV1beta2_VideoSegment": { + "description": "Video segment.", + "type": "object", + "properties": { + "endTimeOffset": { + "format": "google-duration", + "description": "Time-offset, relative to the beginning of the video,\ncorresponding to the end of the segment (inclusive).", + "type": "string" + }, + "startTimeOffset": { + "format": "google-duration", + "description": "Time-offset, relative to the beginning of the video,\ncorresponding to the start of the segment (inclusive).", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1beta2_VideoSegment" }, "GoogleCloudVideointelligenceV1_LabelLocation": { "description": "Label location.", @@ -51,14 +374,27 @@ "type": "number" }, "segment": { - "$ref": "GoogleCloudVideointelligenceV1_VideoSegment", - "description": "Video segment. Unset for video-level labels.\nSet to a frame timestamp for frame-level labels.\nOtherwise, corresponds to one of `AnnotateSpec.segments`\n(if specified) or to shot boundaries (if requested)." + "description": "Video segment. Unset for video-level labels.\nSet to a frame timestamp for frame-level labels.\nOtherwise, corresponds to one of `AnnotateSpec.segments`\n(if specified) or to shot boundaries (if requested).", + "$ref": "GoogleCloudVideointelligenceV1_VideoSegment" } }, "id": "GoogleCloudVideointelligenceV1_LabelLocation" }, "GoogleCloudVideointelligenceV1_VideoAnnotationResults": { + "description": "Annotation results for a single video.", + "type": "object", "properties": { + "error": { + "$ref": "GoogleRpc_Status", + "description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest`\nsome videos may succeed and some may fail." + }, + "shotAnnotations": { + "description": "Shot annotations. Each shot is represented as a video segment.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1_VideoSegment" + }, + "type": "array" + }, "safeSearchAnnotations": { "description": "Safe search annotations.", "items": { @@ -76,112 +412,32 @@ "$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" }, "type": "array" - }, - "error": { - "$ref": "GoogleRpc_Status", - "description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest`\nsome videos may succeed and some may fail." - }, - "shotAnnotations": { - "description": "Shot annotations. Each shot is represented as a video segment.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1_VideoSegment" - }, - "type": "array" } }, - "id": "GoogleCloudVideointelligenceV1_VideoAnnotationResults", - "description": "Annotation results for a single video.", - "type": "object" + "id": "GoogleCloudVideointelligenceV1_VideoAnnotationResults" }, - "GoogleLongrunning_Operation": { - "properties": { - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "response": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`." - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" - }, - "error": { - "$ref": "GoogleRpc_Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - }, - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "type": "object" - } - }, - "id": "GoogleLongrunning_Operation", - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object" - }, - "GoogleCloudVideointelligenceV1beta1_VideoAnnotationResults": { - "type": "object", - "properties": { - "error": { - "$ref": "GoogleRpc_Status", - "description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest`\nsome videos may succeed and some may fail." - }, - "shotAnnotations": { - "description": "Shot annotations. Each shot is represented as a video segment.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoSegment" - }, - "type": "array" - }, - "safeSearchAnnotations": { - "description": "Safe search annotations.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_SafeSearchAnnotation" - }, - "type": "array" - }, - "inputUri": { - "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", - "type": "string" - }, - "labelAnnotations": { - "description": "Label annotations. There is exactly one element for each unique label.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_LabelAnnotation" - }, - "type": "array" - } - }, - "id": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationResults", - "description": "Annotation results for a single video." - }, - "GoogleCloudVideointelligenceV1_AnnotateVideoResponse": { + "GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse": { "description": "Video annotation response. Included in the `response`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", "type": "object", "properties": { "annotationResults": { "description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", "items": { - "$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationResults" + "$ref": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults" }, "type": "array" } }, - "id": "GoogleCloudVideointelligenceV1_AnnotateVideoResponse" + "id": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse" }, "GoogleCloudVideointelligenceV1beta1_LabelAnnotation": { "description": "Label annotation.", "type": "object", "properties": { + "languageCode": { + "description": "Language code for `description` in BCP-47 format.", + "type": "string" + }, "description": { "description": "Textual description, e.g. `Fixed-gear bicycle`.", "type": "string" @@ -192,53 +448,45 @@ "$ref": "GoogleCloudVideointelligenceV1beta1_LabelLocation" }, "type": "array" + } + }, + "id": "GoogleCloudVideointelligenceV1beta1_LabelAnnotation" + }, + "GoogleCloudVideointelligenceV1_LabelAnnotation": { + "description": "Label annotation.", + "type": "object", + "properties": { + "description": { + "description": "Textual description, e.g. `Fixed-gear bicycle`.", + "type": "string" + }, + "locations": { + "description": "Where the label was detected and with what confidence.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1_LabelLocation" + }, + "type": "array" }, "languageCode": { "description": "Language code for `description` in BCP-47 format.", "type": "string" } }, - "id": "GoogleCloudVideointelligenceV1beta1_LabelAnnotation" - }, - "GoogleCloudVideointelligenceV1beta1_AnnotateVideoResponse": { - "description": "Video annotation response. Included in the `response`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", - "type": "object", - "properties": { - "annotationResults": { - "description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationResults" - }, - "type": "array" - } - }, - "id": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoResponse" + "id": "GoogleCloudVideointelligenceV1_LabelAnnotation" }, "GoogleCloudVideointelligenceV1beta1_VideoContext": { "description": "Video context and/or feature-specific parameters.", "type": "object", "properties": { - "safeSearchDetectionModel": { - "description": "Model to use for safe search detection.\nSupported values: \"latest\" and \"stable\" (the default).", - "type": "string" - }, - "segments": { - "description": "Video segments to annotate. The segments may overlap and are not required\nto be contiguous or span the whole video. If unspecified, each video\nis treated as a single segment.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoSegment" - }, - "type": "array" - }, - "labelDetectionModel": { - "type": "string", - "description": "Model to use for label detection.\nSupported values: \"latest\" and \"stable\" (the default)." - }, "shotChangeDetectionModel": { "description": "Model to use for shot change detection.\nSupported values: \"latest\" and \"stable\" (the default).", "type": "string" }, + "stationaryCamera": { + "description": "Whether the video has been shot from a stationary (i.e. non-moving) camera.\nWhen set to true, might improve detection accuracy for moving objects.", + "type": "boolean" + }, "labelDetectionMode": { - "type": "string", "enumDescriptions": [ "Unspecified.", "Detect shot-level labels.", @@ -251,67 +499,40 @@ "FRAME_MODE", "SHOT_AND_FRAME_MODE" ], - "description": "If label detection has been requested, what labels should be detected\nin addition to video-level labels or segment-level labels. If unspecified,\ndefaults to `SHOT_MODE`." + "description": "If label detection has been requested, what labels should be detected\nin addition to video-level labels or segment-level labels. If unspecified,\ndefaults to `SHOT_MODE`.", + "type": "string" }, - "stationaryCamera": { - "description": "Whether the video has been shot from a stationary (i.e. non-moving) camera.\nWhen set to true, might improve detection accuracy for moving objects.", - "type": "boolean" + "safeSearchDetectionModel": { + "description": "Model to use for safe search detection.\nSupported values: \"latest\" and \"stable\" (the default).", + "type": "string" + }, + "segments": { + "description": "Video segments to annotate. The segments may overlap and are not required\nto be contiguous or span the whole video. If unspecified, each video\nis treated as a single segment.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta1_VideoSegment" + }, + "type": "array" + }, + "labelDetectionModel": { + "description": "Model to use for label detection.\nSupported values: \"latest\" and \"stable\" (the default).", + "type": "string" } }, "id": "GoogleCloudVideointelligenceV1beta1_VideoContext" }, - "GoogleCloudVideointelligenceV1_LabelAnnotation": { - "description": "Label annotation.", - "type": "object", - "properties": { - "languageCode": { - "description": "Language code for `description` in BCP-47 format.", - "type": "string" - }, - "description": { - "description": "Textual description, e.g. `Fixed-gear bicycle`.", - "type": "string" - }, - "locations": { - "description": "Where the label was detected and with what confidence.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1_LabelLocation" - }, - "type": "array" - } - }, - "id": "GoogleCloudVideointelligenceV1_LabelAnnotation" - }, - "GoogleCloudVideointelligenceV1beta1_VideoAnnotationProgress": { - "properties": { - "startTime": { - "format": "google-datetime", - "description": "Time when the request was received.", - "type": "string" - }, - "inputUri": { - "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", - "type": "string" - }, - "progressPercent": { - "format": "int32", - "description": "Approximate percentage processed thus far.\nGuaranteed to be 100 when fully processed.", - "type": "integer" - }, - "updateTime": { - "format": "google-datetime", - "description": "Time of the most recent update.", - "type": "string" - } - }, - "id": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationProgress", - "description": "Annotation progress for a single video.", - "type": "object" - }, "GoogleRpc_Status": { "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, "details": { "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { @@ -322,15 +543,6 @@ } }, "type": "array" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" } }, "id": "GoogleRpc_Status" @@ -352,73 +564,62 @@ }, "id": "GoogleCloudVideointelligenceV1_VideoSegment" }, - "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest": { - "description": "Video annotation request.", + "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults": { + "description": "Annotation results for a single video.", "type": "object", "properties": { - "inputContent": { - "description": "The video data bytes. Encoding: base64. If unset, the input video(s)\nshould be specified via `input_uri`. If set, `input_uri` should be unset.", - "type": "string" - }, - "features": { - "enumDescriptions": [ - "Unspecified.", - "Label detection. Detect objects, such as dog or flower.", - "Shot change detection.", - "Safe search detection." - ], - "description": "Requested video annotation features.", + "shotLabelAnnotations": { + "description": "Label annotations on shot level.\nThere is exactly one element for each unique label.", "items": { - "enum": [ - "FEATURE_UNSPECIFIED", - "LABEL_DETECTION", - "SHOT_CHANGE_DETECTION", - "SAFE_SEARCH_DETECTION" - ], - "type": "string" + "$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" }, "type": "array" }, - "outputUri": { - "description": "Optional location where the output (in JSON format) should be stored.\nCurrently, only [Google Cloud Storage](https://cloud.google.com/storage/)\nURIs are supported, which must be specified in the following format:\n`gs://bucket-id/object-id` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](/storage/docs/reference-uris).", - "type": "string" + "error": { + "description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest`\nsome videos may succeed and some may fail.", + "$ref": "GoogleRpc_Status" }, - "videoContext": { - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoContext", - "description": "Additional video context and/or feature-specific parameters." - }, - "locationId": { - "type": "string", - "description": "Optional cloud region where annotation should take place. Supported cloud\nregions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region\nis specified, a region will be determined based on video file location." + "frameLabelAnnotations": { + "description": "Label annotations on frame level.\nThere is exactly one element for each unique label.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" + }, + "type": "array" }, "inputUri": { - "type": "string", - "description": "Input video location. Currently, only\n[Google Cloud Storage](https://cloud.google.com/storage/) URIs are\nsupported, which must be specified in the following format:\n`gs://bucket-id/object-id` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](/storage/docs/reference-uris).\nA video URI may include wildcards in `object-id`, and thus identify\nmultiple videos. Supported wildcards: '*' to match 0 or more characters;\n'?' to match 1 character. If unset, the input video should be embedded\nin the request as `input_content`. If set, `input_content` should be unset." + "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", + "type": "string" + }, + "explicitAnnotation": { + "description": "Explicit content annotation.", + "$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation" + }, + "segmentLabelAnnotations": { + "description": "Label annotations on video level or user specified segment level.\nThere is exactly one element for each unique label.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" + }, + "type": "array" + }, + "shotAnnotations": { + "description": "Shot annotations. Each shot is represented as a video segment.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" + }, + "type": "array" } }, - "id": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest" + "id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults" }, "GoogleCloudVideointelligenceV1beta1_LabelLocation": { "description": "Label location.", "type": "object", "properties": { - "confidence": { - "format": "float", - "description": "Confidence that the label is accurate. Range: [0, 1].", - "type": "number" - }, "segment": { - "description": "Video segment. Set to [-1, -1] for video-level labels.\nSet to [timestamp, timestamp] for frame-level labels.\nOtherwise, corresponds to one of `AnnotateSpec.segments`\n(if specified) or to shot boundaries (if requested).", - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoSegment" + "$ref": "GoogleCloudVideointelligenceV1beta1_VideoSegment", + "description": "Video segment. Set to [-1, -1] for video-level labels.\nSet to [timestamp, timestamp] for frame-level labels.\nOtherwise, corresponds to one of `AnnotateSpec.segments`\n(if specified) or to shot boundaries (if requested)." }, "level": { - "enum": [ - "LABEL_LEVEL_UNSPECIFIED", - "VIDEO_LEVEL", - "SEGMENT_LEVEL", - "SHOT_LEVEL", - "FRAME_LEVEL" - ], "description": "Label level.", "type": "string", "enumDescriptions": [ @@ -427,176 +628,77 @@ "Segment-level. Corresponds to one of `AnnotateSpec.segments`.", "Shot-level. Corresponds to a single shot (i.e. a series of frames\nwithout a major camera position or background change).", "Frame-level. Corresponds to a single video frame." + ], + "enum": [ + "LABEL_LEVEL_UNSPECIFIED", + "VIDEO_LEVEL", + "SEGMENT_LEVEL", + "SHOT_LEVEL", + "FRAME_LEVEL" ] + }, + "confidence": { + "format": "float", + "description": "Confidence that the label is accurate. Range: [0, 1].", + "type": "number" } }, "id": "GoogleCloudVideointelligenceV1beta1_LabelLocation" }, - "GoogleCloudVideointelligenceV1beta1_VideoSegment": { - "properties": { - "endTimeOffset": { - "type": "string", - "format": "int64", - "description": "End offset in microseconds (inclusive). Unset means 0." - }, - "startTimeOffset": { - "format": "int64", - "description": "Start offset in microseconds (inclusive). Unset means 0.", - "type": "string" - } - }, - "id": "GoogleCloudVideointelligenceV1beta1_VideoSegment", - "description": "Video segment.", - "type": "object" - }, - "GoogleCloudVideointelligenceV1_SafeSearchAnnotation": { + "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation": { + "description": "Explicit content annotation (based on per-frame visual signals only).\nIf no explicit content has been detected in a frame, no annotations are\npresent for that frame.", "type": "object", "properties": { - "time": { - "format": "google-duration", - "description": "Time-offset, relative to the beginning of the video,\ncorresponding to the video frame for this annotation.", - "type": "string" - }, - "adult": { - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Likelihood of adult content.", - "type": "string" + "frames": { + "description": "All video frames where explicit content was detected.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame" + }, + "type": "array" } }, - "id": "GoogleCloudVideointelligenceV1_SafeSearchAnnotation", - "description": "Safe search annotation (based on per-frame visual signals only).\nIf no unsafe content has been detected in a frame, no annotations\nare present for that frame." + "id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation" }, - "GoogleCloudVideointelligenceV1beta1_SafeSearchAnnotation": { - "description": "Safe search annotation (based on per-frame visual signals only).\nIf no unsafe content has been detected in a frame, no annotations\nare present for that frame. If only some types of unsafe content\nhave been detected in a frame, the likelihood is set to `UNKNOWN`\nfor all other types of unsafe content.", + "GoogleCloudVideointelligenceV1beta2_LabelFrame": { + "description": "Video frame level annotation results for label detection.", "type": "object", "properties": { - "medical": { - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Likelihood of medical content." - }, - "adult": { - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Likelihood of adult content.", - "type": "string" - }, - "racy": { - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Likelihood of racy content.", - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ] + "confidence": { + "format": "float", + "description": "Confidence that the label is accurate. Range: [0, 1].", + "type": "number" }, "timeOffset": { - "format": "int64", - "description": "Video time offset in microseconds.", + "format": "google-duration", + "description": "Time-offset, relative to the beginning of the video, corresponding to the\nvideo frame for this location.", "type": "string" - }, - "violent": { - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Likelihood of violent content.", - "type": "string" - }, - "spoof": { - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Likelihood that an obvious modification was made to the original\nversion to make it appear funny or offensive.", - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ] } }, - "id": "GoogleCloudVideointelligenceV1beta1_SafeSearchAnnotation" + "id": "GoogleCloudVideointelligenceV1beta2_LabelFrame" + }, + "GoogleCloudVideointelligenceV1beta2_AnnotateVideoProgress": { + "description": "Video annotation progress. Included in the `metadata`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", + "type": "object", + "properties": { + "annotationProgress": { + "description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress" + }, + "type": "array" + } + }, + "id": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoProgress" }, "GoogleCloudVideointelligenceV1_VideoAnnotationProgress": { "description": "Annotation progress for a single video.", "type": "object", "properties": { + "progressPercent": { + "format": "int32", + "description": "Approximate percentage processed thus far.\nGuaranteed to be 100 when fully processed.", + "type": "integer" + }, "updateTime": { "format": "google-datetime", "description": "Time of the most recent update.", @@ -610,28 +712,174 @@ "inputUri": { "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", "type": "string" - }, - "progressPercent": { - "format": "int32", - "description": "Approximate percentage processed thus far.\nGuaranteed to be 100 when fully processed.", - "type": "integer" } }, "id": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress" }, - "GoogleCloudVideointelligenceV1beta1_AnnotateVideoProgress": { + "GoogleCloudVideointelligenceV1_AnnotateVideoProgress": { "description": "Video annotation progress. Included in the `metadata`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", "type": "object", "properties": { "annotationProgress": { "description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationProgress" + "$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress" }, "type": "array" } }, - "id": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoProgress" + "id": "GoogleCloudVideointelligenceV1_AnnotateVideoProgress" + }, + "GoogleLongrunning_Operation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "properties": { + "error": { + "$ref": "GoogleRpc_Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object" + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" + } + }, + "id": "GoogleLongrunning_Operation" + }, + "GoogleCloudVideointelligenceV1beta1_VideoAnnotationResults": { + "description": "Annotation results for a single video.", + "type": "object", + "properties": { + "labelAnnotations": { + "description": "Label annotations. There is exactly one element for each unique label.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta1_LabelAnnotation" + }, + "type": "array" + }, + "error": { + "description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest`\nsome videos may succeed and some may fail.", + "$ref": "GoogleRpc_Status" + }, + "shotAnnotations": { + "description": "Shot annotations. Each shot is represented as a video segment.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta1_VideoSegment" + }, + "type": "array" + }, + "safeSearchAnnotations": { + "description": "Safe search annotations.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta1_SafeSearchAnnotation" + }, + "type": "array" + }, + "inputUri": { + "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationResults" + }, + "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress": { + "description": "Annotation progress for a single video.", + "type": "object", + "properties": { + "inputUri": { + "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", + "type": "string" + }, + "progressPercent": { + "format": "int32", + "description": "Approximate percentage processed thus far.\nGuaranteed to be 100 when fully processed.", + "type": "integer" + }, + "updateTime": { + "format": "google-datetime", + "description": "Time of the most recent update.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "Time when the request was received.", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress" + }, + "GoogleCloudVideointelligenceV1_AnnotateVideoResponse": { + "description": "Video annotation response. Included in the `response`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", + "type": "object", + "properties": { + "annotationResults": { + "description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationResults" + }, + "type": "array" + } + }, + "id": "GoogleCloudVideointelligenceV1_AnnotateVideoResponse" + }, + "GoogleCloudVideointelligenceV1beta1_AnnotateVideoResponse": { + "description": "Video annotation response. Included in the `response`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", + "type": "object", + "properties": { + "annotationResults": { + "description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationResults" + }, + "type": "array" + } + }, + "id": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoResponse" + }, + "GoogleCloudVideointelligenceV1beta1_VideoAnnotationProgress": { + "description": "Annotation progress for a single video.", + "type": "object", + "properties": { + "progressPercent": { + "format": "int32", + "description": "Approximate percentage processed thus far.\nGuaranteed to be 100 when fully processed.", + "type": "integer" + }, + "updateTime": { + "format": "google-datetime", + "description": "Time of the most recent update.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "Time when the request was received.", + "type": "string" + }, + "inputUri": { + "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationProgress" } }, "icons": { @@ -659,6 +907,13 @@ "videos": { "methods": { "annotate": { + "flatPath": "v1beta1/videos:annotate", + "id": "videointelligence.videos.annotate", + "path": "v1beta1/videos:annotate", + "description": "Performs asynchronous video annotation. Progress and results can be\nretrieved through the `google.longrunning.Operations` interface.\n`Operation.metadata` contains `AnnotateVideoProgress` (progress).\n`Operation.response` contains `AnnotateVideoResponse` (results).", + "request": { + "$ref": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest" + }, "response": { "$ref": "GoogleLongrunning_Operation" }, @@ -667,39 +922,42 @@ "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/videos:annotate", - "id": "videointelligence.videos.annotate", - "path": "v1beta1/videos:annotate", - "description": "Performs asynchronous video annotation. Progress and results can be\nretrieved through the `google.longrunning.Operations` interface.\n`Operation.metadata` contains `AnnotateVideoProgress` (progress).\n`Operation.response` contains `AnnotateVideoResponse` (results).", - "request": { - "$ref": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest" - } + ] } } } }, "parameters": { + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, "upload_protocol": { "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" }, "prettyPrint": { + "description": "Returns response with indentations and line breaks.", "default": "true", "type": "boolean", - "location": "query", - "description": "Returns response with indentations and line breaks." + "location": "query" }, "fields": { - "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string" + "type": "string", + "location": "query" }, "uploadType": { - "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" + "type": "string", + "location": "query" }, "callback": { "description": "JSONP", @@ -707,6 +965,8 @@ "location": "query" }, "$.xgafv": { + "description": "V1 error format.", + "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -715,12 +975,9 @@ "enum": [ "1", "2" - ], - "description": "V1 error format.", - "type": "string" + ] }, "alt": { - "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", @@ -733,7 +990,8 @@ "json", "media", "proto" - ] + ], + "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.", @@ -746,25 +1004,15 @@ "location": "query" }, "quotaUser": { + "location": "query", "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.", - "type": "string", - "location": "query" + "type": "string" }, "pp": { - "default": "true", - "type": "boolean", "location": "query", - "description": "Pretty-print response." - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" } }, "version": "v1beta1", diff --git a/vendor/google.golang.org/api/videointelligence/v1beta1/videointelligence-gen.go b/vendor/google.golang.org/api/videointelligence/v1beta1/videointelligence-gen.go index c859de956..5f7c44efa 100644 --- a/vendor/google.golang.org/api/videointelligence/v1beta1/videointelligence-gen.go +++ b/vendor/google.golang.org/api/videointelligence/v1beta1/videointelligence-gen.go @@ -934,14 +934,463 @@ func (s *GoogleCloudVideointelligenceV1beta1VideoSegment) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress: Video +// annotation progress. Included in the `metadata` +// field of the `Operation` returned by the `GetOperation` +// call of the `google::longrunning::Operations` service. +type GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress struct { + // AnnotationProgress: Progress metadata for all videos specified in + // `AnnotateVideoRequest`. + AnnotationProgress []*GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress `json:"annotationProgress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnnotationProgress") + // 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. "AnnotationProgress") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress) MarshalJSON() ([]byte, error) { + type noMethod GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse: Video +// annotation response. Included in the `response` +// field of the `Operation` returned by the `GetOperation` +// call of the `google::longrunning::Operations` service. +type GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse struct { + // AnnotationResults: Annotation results for all videos specified in + // `AnnotateVideoRequest`. + AnnotationResults []*GoogleCloudVideointelligenceV1beta2VideoAnnotationResults `json:"annotationResults,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnnotationResults") + // 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. "AnnotationResults") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse) MarshalJSON() ([]byte, error) { + type noMethod GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudVideointelligenceV1beta2Entity: Detected entity from video +// analysis. +type GoogleCloudVideointelligenceV1beta2Entity struct { + // Description: Textual description, e.g. `Fixed-gear bicycle`. + Description string `json:"description,omitempty"` + + // EntityId: Opaque entity ID. Some IDs may be available in + // [Google Knowledge Graph + // Search + // API](https://developers.google.com/knowledge-graph/). + EntityId string `json:"entityId,omitempty"` + + // LanguageCode: Language code for `description` in BCP-47 format. + LanguageCode string `json:"languageCode,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 *GoogleCloudVideointelligenceV1beta2Entity) MarshalJSON() ([]byte, error) { + type noMethod GoogleCloudVideointelligenceV1beta2Entity + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation: +// Explicit content annotation (based on per-frame visual signals +// only). +// If no explicit content has been detected in a frame, no annotations +// are +// present for that frame. +type GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation struct { + // Frames: All video frames where explicit content was detected. + Frames []*GoogleCloudVideointelligenceV1beta2ExplicitContentFrame `json:"frames,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Frames") 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. "Frames") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation) MarshalJSON() ([]byte, error) { + type noMethod GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudVideointelligenceV1beta2ExplicitContentFrame: Video frame +// level annotation results for explicit content. +type GoogleCloudVideointelligenceV1beta2ExplicitContentFrame struct { + // PornographyLikelihood: Likelihood of the pornography content.. + // + // Possible values: + // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood. + // "VERY_UNLIKELY" - Very unlikely. + // "UNLIKELY" - Unlikely. + // "POSSIBLE" - Possible. + // "LIKELY" - Likely. + // "VERY_LIKELY" - Very likely. + PornographyLikelihood string `json:"pornographyLikelihood,omitempty"` + + // TimeOffset: Time-offset, relative to the beginning of the video, + // corresponding to the + // video frame for this location. + TimeOffset string `json:"timeOffset,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "PornographyLikelihood") 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. "PornographyLikelihood") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudVideointelligenceV1beta2ExplicitContentFrame) MarshalJSON() ([]byte, error) { + type noMethod GoogleCloudVideointelligenceV1beta2ExplicitContentFrame + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudVideointelligenceV1beta2LabelAnnotation: Label annotation. +type GoogleCloudVideointelligenceV1beta2LabelAnnotation struct { + // CategoryEntities: Common categories for the detected entity. + // E.g. when the label is `Terrier` the category is likely `dog`. And in + // some + // cases there might be more than one categories e.g. `Terrier` could + // also be + // a `pet`. + CategoryEntities []*GoogleCloudVideointelligenceV1beta2Entity `json:"categoryEntities,omitempty"` + + // Entity: Detected entity. + Entity *GoogleCloudVideointelligenceV1beta2Entity `json:"entity,omitempty"` + + // Frames: All video frames where a label was detected. + Frames []*GoogleCloudVideointelligenceV1beta2LabelFrame `json:"frames,omitempty"` + + // Segments: All video segments where a label was detected. + Segments []*GoogleCloudVideointelligenceV1beta2LabelSegment `json:"segments,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CategoryEntities") 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. "CategoryEntities") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudVideointelligenceV1beta2LabelAnnotation) MarshalJSON() ([]byte, error) { + type noMethod GoogleCloudVideointelligenceV1beta2LabelAnnotation + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudVideointelligenceV1beta2LabelFrame: Video frame level +// annotation results for label detection. +type GoogleCloudVideointelligenceV1beta2LabelFrame struct { + // Confidence: Confidence that the label is accurate. Range: [0, 1]. + Confidence float64 `json:"confidence,omitempty"` + + // TimeOffset: Time-offset, relative to the beginning of the video, + // corresponding to the + // video frame for this location. + TimeOffset string `json:"timeOffset,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Confidence") 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. "Confidence") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudVideointelligenceV1beta2LabelFrame) MarshalJSON() ([]byte, error) { + type noMethod GoogleCloudVideointelligenceV1beta2LabelFrame + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudVideointelligenceV1beta2LabelFrame) UnmarshalJSON(data []byte) error { + type noMethod GoogleCloudVideointelligenceV1beta2LabelFrame + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *noMethod + } + s1.noMethod = (*noMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + +// GoogleCloudVideointelligenceV1beta2LabelSegment: Video segment level +// annotation results for label detection. +type GoogleCloudVideointelligenceV1beta2LabelSegment struct { + // Confidence: Confidence that the label is accurate. Range: [0, 1]. + Confidence float64 `json:"confidence,omitempty"` + + // Segment: Video segment where a label was detected. + Segment *GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segment,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Confidence") 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. "Confidence") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudVideointelligenceV1beta2LabelSegment) MarshalJSON() ([]byte, error) { + type noMethod GoogleCloudVideointelligenceV1beta2LabelSegment + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudVideointelligenceV1beta2LabelSegment) UnmarshalJSON(data []byte) error { + type noMethod GoogleCloudVideointelligenceV1beta2LabelSegment + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *noMethod + } + s1.noMethod = (*noMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + +// GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress: +// Annotation progress for a single video. +type GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress struct { + // InputUri: Video file location in + // [Google Cloud Storage](https://cloud.google.com/storage/). + InputUri string `json:"inputUri,omitempty"` + + // ProgressPercent: Approximate percentage processed thus + // far. + // Guaranteed to be 100 when fully processed. + ProgressPercent int64 `json:"progressPercent,omitempty"` + + // StartTime: Time when the request was received. + StartTime string `json:"startTime,omitempty"` + + // UpdateTime: Time of the most recent update. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InputUri") 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. "InputUri") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress) MarshalJSON() ([]byte, error) { + type noMethod GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudVideointelligenceV1beta2VideoAnnotationResults: Annotation +// results for a single video. +type GoogleCloudVideointelligenceV1beta2VideoAnnotationResults struct { + // Error: If set, indicates an error. Note that for a single + // `AnnotateVideoRequest` + // some videos may succeed and some may fail. + Error *GoogleRpcStatus `json:"error,omitempty"` + + // ExplicitAnnotation: Explicit content annotation. + ExplicitAnnotation *GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"` + + // FrameLabelAnnotations: Label annotations on frame level. + // There is exactly one element for each unique label. + FrameLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"frameLabelAnnotations,omitempty"` + + // InputUri: Video file location in + // [Google Cloud Storage](https://cloud.google.com/storage/). + InputUri string `json:"inputUri,omitempty"` + + // SegmentLabelAnnotations: Label annotations on video level or user + // specified segment level. + // There is exactly one element for each unique label. + SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"segmentLabelAnnotations,omitempty"` + + // ShotAnnotations: Shot annotations. Each shot is represented as a + // video segment. + ShotAnnotations []*GoogleCloudVideointelligenceV1beta2VideoSegment `json:"shotAnnotations,omitempty"` + + // ShotLabelAnnotations: Label annotations on shot level. + // There is exactly one element for each unique label. + ShotLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"shotLabelAnnotations,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 *GoogleCloudVideointelligenceV1beta2VideoAnnotationResults) MarshalJSON() ([]byte, error) { + type noMethod GoogleCloudVideointelligenceV1beta2VideoAnnotationResults + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudVideointelligenceV1beta2VideoSegment: Video segment. +type GoogleCloudVideointelligenceV1beta2VideoSegment struct { + // EndTimeOffset: Time-offset, relative to the beginning of the + // video, + // corresponding to the end of the segment (inclusive). + EndTimeOffset string `json:"endTimeOffset,omitempty"` + + // StartTimeOffset: Time-offset, relative to the beginning of the + // video, + // corresponding to the start of the segment (inclusive). + StartTimeOffset string `json:"startTimeOffset,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTimeOffset") 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. "EndTimeOffset") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudVideointelligenceV1beta2VideoSegment) MarshalJSON() ([]byte, error) { + type noMethod GoogleCloudVideointelligenceV1beta2VideoSegment + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleLongrunningOperation: This resource represents a long-running // operation that is the result of a // network API call. type GoogleLongrunningOperation struct { // Done: If the value is `false`, it means the operation is still in // progress. - // If true, the operation is completed, and either `error` or `response` - // is + // If `true`, the operation is completed, and either `error` or + // `response` is // available. Done bool `json:"done,omitempty"` diff --git a/vendor/google.golang.org/api/vision/v1/vision-api.json b/vendor/google.golang.org/api/vision/v1/vision-api.json index ddfd9b64d..9301f8db1 100644 --- a/vendor/google.golang.org/api/vision/v1/vision-api.json +++ b/vendor/google.golang.org/api/vision/v1/vision-api.json @@ -1,130 +1,410 @@ { - "ownerName": "Google", - "resources": { - "images": { - "methods": { - "annotate": { - "response": { - "$ref": "BatchAnnotateImagesResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-vision" - ], - "flatPath": "v1/images:annotate", - "id": "vision.images.annotate", - "path": "v1/images:annotate", - "description": "Run image detection and annotation for a batch of images.", - "request": { - "$ref": "BatchAnnotateImagesRequest" - } - } - } - } - }, - "parameters": { - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "alt": { - "type": "string", - "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", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ] - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "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.", - "type": "string", - "location": "query" - }, - "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.", - "type": "string", - "location": "query" - } - }, - "version": "v1", - "baseUrl": "https://vision.googleapis.com/", - "servicePath": "", - "kind": "discovery#restDescription", - "description": "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.", - "basePath": "", - "revision": "20170725", - "documentationLink": "https://cloud.google.com/vision/", - "id": "vision:v1", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "Paragraph": { + "description": "Structural unit of text representing a number of words in certain order.", + "type": "object", + "properties": { + "property": { + "description": "Additional information detected for the paragraph.", + "$ref": "TextProperty" + }, + "boundingBox": { + "description": "The bounding box for the paragraph.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3).", + "$ref": "BoundingPoly" + }, + "words": { + "description": "List of words in this paragraph.", + "items": { + "$ref": "Word" + }, + "type": "array" + } + }, + "id": "Paragraph" + }, + "Image": { + "description": "Client image to perform Google Cloud Vision API tasks over.", + "type": "object", + "properties": { + "source": { + "$ref": "ImageSource", + "description": "Google Cloud Storage image location. If both `content` and `source`\nare provided for an image, `content` takes precedence and is\nused to perform the image annotation request." + }, + "content": { + "format": "byte", + "description": "Image content, represented as a stream of bytes.\nNote: as with all `bytes` fields, protobuffers use a pure binary\nrepresentation, whereas JSON representations use base64.", + "type": "string" + } + }, + "id": "Image" + }, + "FaceAnnotation": { + "properties": { + "sorrowLikelihood": { + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Sorrow likelihood.", + "type": "string" + }, + "tiltAngle": { + "format": "float", + "description": "Pitch angle, which indicates the upwards/downwards angle that the face is\npointing relative to the image's horizontal plane. Range [-180,180].", + "type": "number" + }, + "fdBoundingPoly": { + "description": "The `fd_bounding_poly` bounding polygon is tighter than the\n`boundingPoly`, and encloses only the skin part of the face. Typically, it\nis used to eliminate the face from any image analysis that detects the\n\"amount of skin\" visible in an image. It is not based on the\nlandmarker results, only on the initial face detection, hence\nthe \u003ccode\u003efd\u003c/code\u003e (face detection) prefix.", + "$ref": "BoundingPoly" + }, + "angerLikelihood": { + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Anger likelihood.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ] + }, + "landmarks": { + "description": "Detected face landmarks.", + "items": { + "$ref": "Landmark" + }, + "type": "array" + }, + "surpriseLikelihood": { + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Surprise likelihood.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ] + }, + "joyLikelihood": { + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Joy likelihood.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ] + }, + "landmarkingConfidence": { + "format": "float", + "description": "Face landmarking confidence. Range [0, 1].", + "type": "number" + }, + "underExposedLikelihood": { + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Under-exposed likelihood.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ] + }, + "panAngle": { + "format": "float", + "description": "Yaw angle, which indicates the leftward/rightward angle that the face is\npointing relative to the vertical plane perpendicular to the image. Range\n[-180,180].", + "type": "number" + }, + "detectionConfidence": { + "format": "float", + "description": "Detection confidence. Range [0, 1].", + "type": "number" + }, + "blurredLikelihood": { + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Blurred likelihood.", + "type": "string" + }, + "headwearLikelihood": { + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Headwear likelihood.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ] + }, + "boundingPoly": { + "description": "The bounding polygon around the face. The coordinates of the bounding box\nare in the original image's scale, as returned in `ImageParams`.\nThe bounding box is computed to \"frame\" the face in accordance with human\nexpectations. It is based on the landmarker results.\nNote that one or more x and/or y coordinates may not be generated in the\n`BoundingPoly` (the polygon will be unbounded) if only a partial face\nappears in the image to be annotated.", + "$ref": "BoundingPoly" + }, + "rollAngle": { + "format": "float", + "description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation\nof the face relative to the image vertical about the axis perpendicular to\nthe face. Range [-180,180].", + "type": "number" + } + }, + "id": "FaceAnnotation", + "description": "A face annotation object contains the results of face detection.", + "type": "object" + }, + "BatchAnnotateImagesRequest": { + "description": "Multiple image annotation requests are batched into a single service call.", + "type": "object", + "properties": { + "requests": { + "description": "Individual image annotation requests for this batch.", + "items": { + "$ref": "AnnotateImageRequest" + }, + "type": "array" + } + }, + "id": "BatchAnnotateImagesRequest" + }, + "DetectedBreak": { + "properties": { + "isPrefix": { + "description": "True if break prepends the element.", + "type": "boolean" + }, + "type": { + "enum": [ + "UNKNOWN", + "SPACE", + "SURE_SPACE", + "EOL_SURE_SPACE", + "HYPHEN", + "LINE_BREAK" + ], + "description": "Detected break type.", + "type": "string", + "enumDescriptions": [ + "Unknown break label type.", + "Regular space.", + "Sure space (very wide).", + "Line-wrapping break.", + "End-line hyphen that is not present in text; does not co-occur with\n`SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", + "Line break that ends a paragraph." + ] + } + }, + "id": "DetectedBreak", + "description": "Detected start or end of a structural component.", + "type": "object" + }, + "ImageContext": { + "description": "Image context and/or feature-specific parameters.", + "type": "object", + "properties": { + "latLongRect": { + "description": "lat/long rectangle that specifies the location of the image.", + "$ref": "LatLongRect" + }, + "cropHintsParams": { + "description": "Parameters for crop hints annotation request.", + "$ref": "CropHintsParams" + }, + "languageHints": { + "description": "List of languages to use for TEXT_DETECTION. In most cases, an empty value\nyields the best results since it enables automatic language detection. For\nlanguages based on the Latin alphabet, setting `language_hints` is not\nneeded. In rare cases, when the language of the text in the image is known,\nsetting a hint will help get better results (although it will be a\nsignificant hindrance if the hint is wrong). Text detection returns an\nerror if one or more of the specified languages is not one of the\n[supported languages](/vision/docs/languages).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "ImageContext" + }, + "Page": { + "description": "Detected page from OCR.", + "type": "object", + "properties": { + "width": { + "format": "int32", + "description": "Page width in pixels.", + "type": "integer" + }, + "blocks": { + "description": "List of blocks of text, images etc on this page.", + "items": { + "$ref": "Block" + }, + "type": "array" + }, + "property": { + "description": "Additional information detected on the page.", + "$ref": "TextProperty" + }, + "height": { + "format": "int32", + "description": "Page height in pixels.", + "type": "integer" + } + }, + "id": "Page" + }, + "AnnotateImageRequest": { + "description": "Request for performing Google Cloud Vision API tasks over a user-provided\nimage, with user-requested features.", + "type": "object", + "properties": { + "imageContext": { + "description": "Additional context that may accompany the image.", + "$ref": "ImageContext" + }, + "features": { + "description": "Requested features.", + "items": { + "$ref": "Feature" + }, + "type": "array" + }, + "image": { + "description": "The image to be processed.", + "$ref": "Image" + } + }, + "id": "AnnotateImageRequest" + }, + "Status": { + "properties": { + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + } + }, + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object" + }, + "LatLongRect": { + "properties": { + "minLatLng": { + "description": "Min lat/long pair.", + "$ref": "LatLng" + }, + "maxLatLng": { + "description": "Max lat/long pair.", + "$ref": "LatLng" + } + }, + "id": "LatLongRect", + "description": "Rectangle determined by min and max `LatLng` pairs.", + "type": "object" + }, + "Symbol": { + "properties": { + "boundingBox": { + "$ref": "BoundingPoly", + "description": "The bounding box for the symbol.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3)." + }, + "text": { + "description": "The actual UTF-8 representation of the symbol.", + "type": "string" + }, + "property": { + "$ref": "TextProperty", + "description": "Additional information detected for the symbol." + } + }, + "id": "Symbol", + "description": "A single symbol representation.", + "type": "object" + }, "CropHintsAnnotation": { "description": "Set of crop hints that are used to generate new crops when serving images.", "type": "object", @@ -140,26 +420,31 @@ "id": "CropHintsAnnotation" }, "LatLng": { - "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", - "type": "object", "properties": { - "latitude": { - "format": "double", - "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", - "type": "number" - }, "longitude": { "format": "double", "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", "type": "number" + }, + "latitude": { + "format": "double", + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", + "type": "number" } }, - "id": "LatLng" + "id": "LatLng", + "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", + "type": "object" }, "Color": { "description": "Represents a color in the RGBA color space. This representation is designed\nfor simplicity of conversion to/from color representations in various\nlanguages over compactness; for example, the fields of this representation\ncan be trivially provided to the constructor of \"java.awt.Color\" in Java; it\ncan also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\"\nmethod in iOS; and, with just a little work, it can be easily formatted into\na CSS \"rgba()\" string in JavaScript, as well. Here are some examples:\n\nExample (Java):\n\n import com.google.type.Color;\n\n // ...\n public static java.awt.Color fromProto(Color protocolor) {\n float alpha = protocolor.hasAlpha()\n ? protocolor.getAlpha().getValue()\n : 1.0;\n\n return new java.awt.Color(\n protocolor.getRed(),\n protocolor.getGreen(),\n protocolor.getBlue(),\n alpha);\n }\n\n public static Color toProto(java.awt.Color color) {\n float red = (float) color.getRed();\n float green = (float) color.getGreen();\n float blue = (float) color.getBlue();\n float denominator = 255.0;\n Color.Builder resultBuilder =\n Color\n .newBuilder()\n .setRed(red / denominator)\n .setGreen(green / denominator)\n .setBlue(blue / denominator);\n int alpha = color.getAlpha();\n if (alpha != 255) {\n result.setAlpha(\n FloatValue\n .newBuilder()\n .setValue(((float) alpha) / denominator)\n .build());\n }\n return resultBuilder.build();\n }\n // ...\n\nExample (iOS / Obj-C):\n\n // ...\n static UIColor* fromProto(Color* protocolor) {\n float red = [protocolor red];\n float green = [protocolor green];\n float blue = [protocolor blue];\n FloatValue* alpha_wrapper = [protocolor alpha];\n float alpha = 1.0;\n if (alpha_wrapper != nil) {\n alpha = [alpha_wrapper value];\n }\n return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];\n }\n\n static Color* toProto(UIColor* color) {\n CGFloat red, green, blue, alpha;\n if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {\n return nil;\n }\n Color* result = [Color alloc] init];\n [result setRed:red];\n [result setGreen:green];\n [result setBlue:blue];\n if (alpha \u003c= 0.9999) {\n [result setAlpha:floatWrapperWithValue(alpha)];\n }\n [result autorelease];\n return result;\n }\n // ...\n\n Example (JavaScript):\n\n // ...\n\n var protoToCssColor = function(rgb_color) {\n var redFrac = rgb_color.red || 0.0;\n var greenFrac = rgb_color.green || 0.0;\n var blueFrac = rgb_color.blue || 0.0;\n var red = Math.floor(redFrac * 255);\n var green = Math.floor(greenFrac * 255);\n var blue = Math.floor(blueFrac * 255);\n\n if (!('alpha' in rgb_color)) {\n return rgbToCssColor_(red, green, blue);\n }\n\n var alphaFrac = rgb_color.alpha.value || 0.0;\n var rgbParams = [red, green, blue].join(',');\n return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');\n };\n\n var rgbToCssColor_ = function(red, green, blue) {\n var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue);\n var hexString = rgbNumber.toString(16);\n var missingZeros = 6 - hexString.length;\n var resultBuilder = ['#'];\n for (var i = 0; i \u003c missingZeros; i++) {\n resultBuilder.push('0');\n }\n resultBuilder.push(hexString);\n return resultBuilder.join('');\n };\n\n // ...", "type": "object", "properties": { + "red": { + "format": "float", + "description": "The amount of red in the color as a value in the interval [0, 1].", + "type": "number" + }, "alpha": { "format": "float", "description": "The fraction of this color that should be applied to the pixel. That is,\nthe final pixel color is defined by the equation:\n\n pixel color = alpha * (this color) + (1.0 - alpha) * (background color)\n\nThis means that a value of 1.0 corresponds to a solid color, whereas\na value of 0.0 corresponds to a completely transparent color. This\nuses a wrapper message rather than a simple float scalar so that it is\npossible to distinguish between a default value and the value being unset.\nIf omitted, this color object is to be rendered as a solid color\n(as if the alpha value had been explicitly given with a value of 1.0).", @@ -174,18 +459,22 @@ "format": "float", "description": "The amount of green in the color as a value in the interval [0, 1].", "type": "number" - }, - "red": { - "format": "float", - "description": "The amount of red in the color as a value in the interval [0, 1].", - "type": "number" } }, "id": "Color" }, + "ImageProperties": { + "properties": { + "dominantColors": { + "$ref": "DominantColorsAnnotation", + "description": "If present, dominant colors completed successfully." + } + }, + "id": "ImageProperties", + "description": "Stores image properties, such as dominant colors.", + "type": "object" + }, "Feature": { - "description": "Users describe the type of Google Cloud Vision API tasks to perform over\nimages by using *Feature*s. Each Feature indicates a type of image\ndetection task to perform. Features encode the Cloud Vision API\nvertical to operate on and the number of top-scoring results to return.", - "type": "object", "properties": { "maxResults": { "format": "int32", @@ -193,8 +482,6 @@ "type": "integer" }, "type": { - "description": "The feature type.", - "type": "string", "enumDescriptions": [ "Unspecified feature type.", "Run face detection.", @@ -220,86 +507,17 @@ "IMAGE_PROPERTIES", "CROP_HINTS", "WEB_DETECTION" - ] + ], + "description": "The feature type.", + "type": "string" } }, - "id": "Feature" - }, - "ImageProperties": { - "description": "Stores image properties, such as dominant colors.", - "type": "object", - "properties": { - "dominantColors": { - "$ref": "DominantColorsAnnotation", - "description": "If present, dominant colors completed successfully." - } - }, - "id": "ImageProperties" + "id": "Feature", + "description": "Users describe the type of Google Cloud Vision API tasks to perform over\nimages by using *Feature*s. Each Feature indicates a type of image\ndetection task to perform. Features encode the Cloud Vision API\nvertical to operate on and the number of top-scoring results to return.", + "type": "object" }, "SafeSearchAnnotation": { - "description": "Set of features pertaining to the image, computed by computer vision\nmethods over safe-search verticals (for example, adult, spoof, medical,\nviolence).", - "type": "object", "properties": { - "adult": { - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Represents the adult content likelihood for the image.", - "type": "string" - }, - "spoof": { - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Spoof likelihood. The likelihood that an modification\nwas made to the image's canonical version to make it appear\nfunny or offensive.", - "type": "string" - }, - "medical": { - "description": "Likelihood that this is a medical image.", - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ] - }, "violence": { "enumDescriptions": [ "Unknown likelihood.", @@ -319,9 +537,71 @@ ], "description": "Violence likelihood.", "type": "string" + }, + "adult": { + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Represents the adult content likelihood for the image.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ] + }, + "spoof": { + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Spoof likelihood. The likelihood that an modification\nwas made to the image's canonical version to make it appear\nfunny or offensive.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ] + }, + "medical": { + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Likelihood that this is a medical image.", + "type": "string" } }, - "id": "SafeSearchAnnotation" + "id": "SafeSearchAnnotation", + "description": "Set of features pertaining to the image, computed by computer vision\nmethods over safe-search verticals (for example, adult, spoof, medical,\nviolence).", + "type": "object" }, "DominantColorsAnnotation": { "description": "Set of dominant colors and their corresponding scores.", @@ -338,8 +618,6 @@ "id": "DominantColorsAnnotation" }, "TextAnnotation": { - "description": "TextAnnotation contains a structured representation of OCR extracted text.\nThe hierarchy of an OCR extracted text structure is like this:\n TextAnnotation -\u003e Page -\u003e Block -\u003e Paragraph -\u003e Word -\u003e Symbol\nEach structural component, starting from Page, may further have their own\nproperties. Properties describe detected languages, breaks etc.. Please\nrefer to the google.cloud.vision.v1.TextAnnotation.TextProperty message\ndefinition below for more detail.", - "type": "object", "properties": { "pages": { "description": "List of pages detected by OCR.", @@ -353,11 +631,11 @@ "type": "string" } }, - "id": "TextAnnotation" + "id": "TextAnnotation", + "description": "TextAnnotation contains a structured representation of OCR extracted text.\nThe hierarchy of an OCR extracted text structure is like this:\n TextAnnotation -\u003e Page -\u003e Block -\u003e Paragraph -\u003e Word -\u003e Symbol\nEach structural component, starting from Page, may further have their own\nproperties. Properties describe detected languages, breaks etc.. Please\nrefer to the google.cloud.vision.v1.TextAnnotation.TextProperty message\ndefinition below for more detail.", + "type": "object" }, "Vertex": { - "description": "A vertex represents a 2D point in the image.\nNOTE: the vertex coordinates are in the same scale as the original image.", - "type": "object", "properties": { "y": { "format": "int32", @@ -370,7 +648,9 @@ "type": "integer" } }, - "id": "Vertex" + "id": "Vertex", + "description": "A vertex represents a 2D point in the image.\nNOTE: the vertex coordinates are in the same scale as the original image.", + "type": "object" }, "DetectedLanguage": { "description": "Detected language for a structural component.", @@ -389,8 +669,6 @@ "id": "DetectedLanguage" }, "WebEntity": { - "description": "Entity deduced from similar images on the Internet.", - "type": "object", "properties": { "entityId": { "description": "Opaque entity ID.", @@ -406,7 +684,9 @@ "type": "number" } }, - "id": "WebEntity" + "id": "WebEntity", + "description": "Entity deduced from similar images on the Internet.", + "type": "object" }, "BoundingPoly": { "description": "A bounding polygon for the detected image annotation.", @@ -423,8 +703,6 @@ "id": "BoundingPoly" }, "TextProperty": { - "description": "Additional information detected on the structural component.", - "type": "object", "properties": { "detectedLanguages": { "description": "A list of detected languages together with confidence.", @@ -434,19 +712,47 @@ "type": "array" }, "detectedBreak": { - "$ref": "DetectedBreak", - "description": "Detected start or end of a text segment." + "description": "Detected start or end of a text segment.", + "$ref": "DetectedBreak" } }, - "id": "TextProperty" + "id": "TextProperty", + "description": "Additional information detected on the structural component.", + "type": "object" }, "AnnotateImageResponse": { "description": "Response to an image annotation request.", "type": "object", "properties": { + "logoAnnotations": { + "description": "If present, logo detection has completed successfully.", + "items": { + "$ref": "EntityAnnotation" + }, + "type": "array" + }, + "cropHintsAnnotation": { + "description": "If present, crop hints have completed successfully.", + "$ref": "CropHintsAnnotation" + }, + "webDetection": { + "$ref": "WebDetection", + "description": "If present, web detection has completed successfully." + }, + "labelAnnotations": { + "description": "If present, label detection has completed successfully.", + "items": { + "$ref": "EntityAnnotation" + }, + "type": "array" + }, + "safeSearchAnnotation": { + "$ref": "SafeSearchAnnotation", + "description": "If present, safe-search annotation has completed successfully." + }, "error": { - "description": "If set, represents the error message for the operation.\nNote that filled-in image annotations are guaranteed to be\ncorrect, even when `error` is set.", - "$ref": "Status" + "$ref": "Status", + "description": "If set, represents the error message for the operation.\nNote that filled-in image annotations are guaranteed to be\ncorrect, even when `error` is set." }, "fullTextAnnotation": { "$ref": "TextAnnotation", @@ -474,34 +780,8 @@ "type": "array" }, "imagePropertiesAnnotation": { - "description": "If present, image properties were extracted successfully.", - "$ref": "ImageProperties" - }, - "logoAnnotations": { - "description": "If present, logo detection has completed successfully.", - "items": { - "$ref": "EntityAnnotation" - }, - "type": "array" - }, - "cropHintsAnnotation": { - "$ref": "CropHintsAnnotation", - "description": "If present, crop hints have completed successfully." - }, - "webDetection": { - "$ref": "WebDetection", - "description": "If present, web detection has completed successfully." - }, - "labelAnnotations": { - "description": "If present, label detection has completed successfully.", - "items": { - "$ref": "EntityAnnotation" - }, - "type": "array" - }, - "safeSearchAnnotation": { - "$ref": "SafeSearchAnnotation", - "description": "If present, safe-search annotation has completed successfully." + "$ref": "ImageProperties", + "description": "If present, image properties were extracted successfully." } }, "id": "AnnotateImageResponse" @@ -522,22 +802,12 @@ "id": "CropHintsParams" }, "Block": { - "description": "Logical element on the page.", - "type": "object", "properties": { "property": { "$ref": "TextProperty", "description": "Additional information detected for the block." }, "blockType": { - "enumDescriptions": [ - "Unknown block type.", - "Regular text block.", - "Table block.", - "Image block.", - "Horizontal/vertical line box.", - "Barcode block." - ], "enum": [ "UNKNOWN", "TEXT", @@ -547,7 +817,15 @@ "BARCODE" ], "description": "Detected block type (text, image etc) for this block.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Unknown block type.", + "Regular text block.", + "Table block.", + "Image block.", + "Horizontal/vertical line box.", + "Barcode block." + ] }, "boundingBox": { "description": "The bounding box for the block.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3).", @@ -561,12 +839,16 @@ "type": "array" } }, - "id": "Block" + "id": "Block", + "description": "Logical element on the page.", + "type": "object" }, "Property": { - "description": "A `Property` consists of a user-supplied name/value pair.", - "type": "object", "properties": { + "value": { + "description": "Value of the property.", + "type": "string" + }, "uint64Value": { "format": "uint64", "description": "Value of numeric properties.", @@ -575,28 +857,24 @@ "name": { "description": "Name of the property.", "type": "string" - }, - "value": { - "description": "Value of the property.", - "type": "string" } }, - "id": "Property" + "id": "Property", + "description": "A `Property` consists of a user-supplied name/value pair.", + "type": "object" }, "LocationInfo": { - "description": "Detected entity location information.", - "type": "object", "properties": { "latLng": { - "$ref": "LatLng", - "description": "lat/long location coordinates." + "description": "lat/long location coordinates.", + "$ref": "LatLng" } }, - "id": "LocationInfo" + "id": "LocationInfo", + "description": "Detected entity location information.", + "type": "object" }, "ImageSource": { - "description": "External image source (Google Cloud Storage image location).", - "type": "object", "properties": { "gcsImageUri": { "description": "NOTE: For new code `image_uri` below is preferred.\nGoogle Cloud Storage image URI, which must be in the following form:\n`gs://bucket_name/object_name` (for details, see\n[Google Cloud Storage Request\nURIs](https://cloud.google.com/storage/docs/reference-uris)).\nNOTE: Cloud Storage object versioning is not supported.", @@ -607,11 +885,11 @@ "type": "string" } }, - "id": "ImageSource" + "id": "ImageSource", + "description": "External image source (Google Cloud Storage image location).", + "type": "object" }, "BatchAnnotateImagesResponse": { - "description": "Response to a batch image annotation request.", - "type": "object", "properties": { "responses": { "description": "Individual responses to image annotation requests within the batch.", @@ -621,11 +899,11 @@ "type": "array" } }, - "id": "BatchAnnotateImagesResponse" + "id": "BatchAnnotateImagesResponse", + "description": "Response to a batch image annotation request.", + "type": "object" }, "WebDetection": { - "description": "Relevant information for the image from the Internet.", - "type": "object", "properties": { "fullMatchingImages": { "description": "Fully matching images from the Internet.\nCan include resized copies of the query image.", @@ -663,7 +941,9 @@ "type": "array" } }, - "id": "WebDetection" + "id": "WebDetection", + "description": "Relevant information for the image from the Internet.", + "type": "object" }, "Position": { "description": "A 3D position in the image, used primarily for Face detection landmarks.\nA valid Position must have both x and y coordinates.\nThe position coordinates are in the same scale as the original image.", @@ -688,33 +968,31 @@ "id": "Position" }, "ColorInfo": { - "description": "Color information consists of RGB channels, score, and the fraction of\nthe image that the color occupies in the image.", - "type": "object", "properties": { - "score": { - "format": "float", - "description": "Image-specific score for this color. Value in range [0, 1].", - "type": "number" - }, "pixelFraction": { "format": "float", "description": "The fraction of pixels the color occupies in the image.\nValue in range [0, 1].", "type": "number" }, "color": { - "description": "RGB components of the color.", - "$ref": "Color" + "$ref": "Color", + "description": "RGB components of the color." + }, + "score": { + "format": "float", + "description": "Image-specific score for this color. Value in range [0, 1].", + "type": "number" } }, - "id": "ColorInfo" + "id": "ColorInfo", + "description": "Color information consists of RGB channels, score, and the fraction of\nthe image that the color occupies in the image.", + "type": "object" }, "WebPage": { - "description": "Metadata for web pages.", - "type": "object", "properties": { "score": { "format": "float", - "description": "Overall relevancy score for the web page.\nNot normalized and not comparable across different image queries.", + "description": "(Deprecated) Overall relevancy score for the web page.", "type": "number" }, "url": { @@ -722,29 +1000,25 @@ "type": "string" } }, - "id": "WebPage" + "id": "WebPage", + "description": "Metadata for web pages.", + "type": "object" }, "EntityAnnotation": { - "description": "Set of detected entity features.", - "type": "object", "properties": { - "mid": { - "description": "Opaque entity ID. Some IDs may be available in\n[Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", - "type": "string" - }, "confidence": { "format": "float", "description": "The accuracy of the entity detection in an image.\nFor example, for an image in which the \"Eiffel Tower\" entity is detected,\nthis field represents the confidence that there is a tower in the query\nimage. Range [0, 1].", "type": "number" }, + "boundingPoly": { + "$ref": "BoundingPoly", + "description": "Image region to which this entity belongs. Not produced\nfor `LABEL_DETECTION` features." + }, "locale": { "description": "The language code for the locale in which the entity textual\n`description` is expressed.", "type": "string" }, - "boundingPoly": { - "description": "Image region to which this entity belongs. Not produced\nfor `LABEL_DETECTION` features.", - "$ref": "BoundingPoly" - }, "description": { "description": "Entity textual description, expressed in its `locale` language.", "type": "string" @@ -772,13 +1046,17 @@ "$ref": "LocationInfo" }, "type": "array" + }, + "mid": { + "description": "Opaque entity ID. Some IDs may be available in\n[Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", + "type": "string" } }, - "id": "EntityAnnotation" + "id": "EntityAnnotation", + "description": "Set of detected entity features.", + "type": "object" }, "CropHint": { - "description": "Single crop hint that is used to generate a new crop when serving an image.", - "type": "object", "properties": { "importanceFraction": { "format": "float", @@ -795,11 +1073,11 @@ "$ref": "BoundingPoly" } }, - "id": "CropHint" + "id": "CropHint", + "description": "Single crop hint that is used to generate a new crop when serving an image.", + "type": "object" }, "Landmark": { - "description": "A face-specific landmark (for example, a face feature).\nLandmark positions may fall outside the bounds of the image\nif the face is near one or more edges of the image.\nTherefore it is NOT guaranteed that `0 \u003c= x \u003c width` or\n`0 \u003c= y \u003c height`.", - "type": "object", "properties": { "position": { "$ref": "Position", @@ -884,15 +1162,15 @@ "type": "string" } }, - "id": "Landmark" + "id": "Landmark", + "description": "A face-specific landmark (for example, a face feature).\nLandmark positions may fall outside the bounds of the image\nif the face is near one or more edges of the image.\nTherefore it is NOT guaranteed that `0 \u003c= x \u003c width` or\n`0 \u003c= y \u003c height`.", + "type": "object" }, "WebImage": { - "description": "Metadata for online images.", - "type": "object", "properties": { "score": { "format": "float", - "description": "Overall relevancy score for the image.\nNot normalized and not comparable across different image queries.", + "description": "(Deprecated) Overall relevancy score for the image.", "type": "number" }, "url": { @@ -900,439 +1178,38 @@ "type": "string" } }, - "id": "WebImage" + "id": "WebImage", + "description": "Metadata for online images.", + "type": "object" }, "Word": { "description": "A word representation.", "type": "object", "properties": { + "property": { + "$ref": "TextProperty", + "description": "Additional information detected for the word." + }, + "boundingBox": { + "$ref": "BoundingPoly", + "description": "The bounding box for the word.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3)." + }, "symbols": { "description": "List of symbols in the word.\nThe order of the symbols follows the natural reading order.", "items": { "$ref": "Symbol" }, "type": "array" - }, - "property": { - "description": "Additional information detected for the word.", - "$ref": "TextProperty" - }, - "boundingBox": { - "description": "The bounding box for the word.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3).", - "$ref": "BoundingPoly" } }, "id": "Word" - }, - "Image": { - "description": "Client image to perform Google Cloud Vision API tasks over.", - "type": "object", - "properties": { - "source": { - "$ref": "ImageSource", - "description": "Google Cloud Storage image location. If both `content` and `source`\nare provided for an image, `content` takes precedence and is\nused to perform the image annotation request." - }, - "content": { - "format": "byte", - "description": "Image content, represented as a stream of bytes.\nNote: as with all `bytes` fields, protobuffers use a pure binary\nrepresentation, whereas JSON representations use base64.", - "type": "string" - } - }, - "id": "Image" - }, - "Paragraph": { - "description": "Structural unit of text representing a number of words in certain order.", - "type": "object", - "properties": { - "property": { - "description": "Additional information detected for the paragraph.", - "$ref": "TextProperty" - }, - "boundingBox": { - "$ref": "BoundingPoly", - "description": "The bounding box for the paragraph.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3)." - }, - "words": { - "description": "List of words in this paragraph.", - "items": { - "$ref": "Word" - }, - "type": "array" - } - }, - "id": "Paragraph" - }, - "FaceAnnotation": { - "description": "A face annotation object contains the results of face detection.", - "type": "object", - "properties": { - "rollAngle": { - "format": "float", - "description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation\nof the face relative to the image vertical about the axis perpendicular to\nthe face. Range [-180,180].", - "type": "number" - }, - "sorrowLikelihood": { - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Sorrow likelihood.", - "type": "string" - }, - "tiltAngle": { - "format": "float", - "description": "Pitch angle, which indicates the upwards/downwards angle that the face is\npointing relative to the image's horizontal plane. Range [-180,180].", - "type": "number" - }, - "fdBoundingPoly": { - "$ref": "BoundingPoly", - "description": "The `fd_bounding_poly` bounding polygon is tighter than the\n`boundingPoly`, and encloses only the skin part of the face. Typically, it\nis used to eliminate the face from any image analysis that detects the\n\"amount of skin\" visible in an image. It is not based on the\nlandmarker results, only on the initial face detection, hence\nthe \u003ccode\u003efd\u003c/code\u003e (face detection) prefix." - }, - "surpriseLikelihood": { - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Surprise likelihood.", - "type": "string" - }, - "landmarks": { - "description": "Detected face landmarks.", - "items": { - "$ref": "Landmark" - }, - "type": "array" - }, - "angerLikelihood": { - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Anger likelihood.", - "type": "string" - }, - "landmarkingConfidence": { - "format": "float", - "description": "Face landmarking confidence. Range [0, 1].", - "type": "number" - }, - "joyLikelihood": { - "description": "Joy likelihood.", - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ] - }, - "underExposedLikelihood": { - "description": "Under-exposed likelihood.", - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ] - }, - "panAngle": { - "format": "float", - "description": "Yaw angle, which indicates the leftward/rightward angle that the face is\npointing relative to the vertical plane perpendicular to the image. Range\n[-180,180].", - "type": "number" - }, - "detectionConfidence": { - "format": "float", - "description": "Detection confidence. Range [0, 1].", - "type": "number" - }, - "blurredLikelihood": { - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Blurred likelihood.", - "type": "string" - }, - "headwearLikelihood": { - "description": "Headwear likelihood.", - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ] - }, - "boundingPoly": { - "description": "The bounding polygon around the face. The coordinates of the bounding box\nare in the original image's scale, as returned in `ImageParams`.\nThe bounding box is computed to \"frame\" the face in accordance with human\nexpectations. It is based on the landmarker results.\nNote that one or more x and/or y coordinates may not be generated in the\n`BoundingPoly` (the polygon will be unbounded) if only a partial face\nappears in the image to be annotated.", - "$ref": "BoundingPoly" - } - }, - "id": "FaceAnnotation" - }, - "BatchAnnotateImagesRequest": { - "description": "Multiple image annotation requests are batched into a single service call.", - "type": "object", - "properties": { - "requests": { - "description": "Individual image annotation requests for this batch.", - "items": { - "$ref": "AnnotateImageRequest" - }, - "type": "array" - } - }, - "id": "BatchAnnotateImagesRequest" - }, - "DetectedBreak": { - "description": "Detected start or end of a structural component.", - "type": "object", - "properties": { - "type": { - "enumDescriptions": [ - "Unknown break label type.", - "Regular space.", - "Sure space (very wide).", - "Line-wrapping break.", - "End-line hyphen that is not present in text; does not co-occur with\n`SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", - "Line break that ends a paragraph." - ], - "enum": [ - "UNKNOWN", - "SPACE", - "SURE_SPACE", - "EOL_SURE_SPACE", - "HYPHEN", - "LINE_BREAK" - ], - "description": "Detected break type.", - "type": "string" - }, - "isPrefix": { - "description": "True if break prepends the element.", - "type": "boolean" - } - }, - "id": "DetectedBreak" - }, - "ImageContext": { - "description": "Image context and/or feature-specific parameters.", - "type": "object", - "properties": { - "languageHints": { - "description": "List of languages to use for TEXT_DETECTION. In most cases, an empty value\nyields the best results since it enables automatic language detection. For\nlanguages based on the Latin alphabet, setting `language_hints` is not\nneeded. In rare cases, when the language of the text in the image is known,\nsetting a hint will help get better results (although it will be a\nsignificant hindrance if the hint is wrong). Text detection returns an\nerror if one or more of the specified languages is not one of the\n[supported languages](/vision/docs/languages).", - "items": { - "type": "string" - }, - "type": "array" - }, - "latLongRect": { - "$ref": "LatLongRect", - "description": "lat/long rectangle that specifies the location of the image." - }, - "cropHintsParams": { - "description": "Parameters for crop hints annotation request.", - "$ref": "CropHintsParams" - } - }, - "id": "ImageContext" - }, - "Page": { - "description": "Detected page from OCR.", - "type": "object", - "properties": { - "property": { - "description": "Additional information detected on the page.", - "$ref": "TextProperty" - }, - "height": { - "format": "int32", - "description": "Page height in pixels.", - "type": "integer" - }, - "width": { - "format": "int32", - "description": "Page width in pixels.", - "type": "integer" - }, - "blocks": { - "description": "List of blocks of text, images etc on this page.", - "items": { - "$ref": "Block" - }, - "type": "array" - } - }, - "id": "Page" - }, - "AnnotateImageRequest": { - "description": "Request for performing Google Cloud Vision API tasks over a user-provided\nimage, with user-requested features.", - "type": "object", - "properties": { - "features": { - "description": "Requested features.", - "items": { - "$ref": "Feature" - }, - "type": "array" - }, - "image": { - "description": "The image to be processed.", - "$ref": "Image" - }, - "imageContext": { - "$ref": "ImageContext", - "description": "Additional context that may accompany the image." - } - }, - "id": "AnnotateImageRequest" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "id": "Status" - }, - "Symbol": { - "description": "A single symbol representation.", - "type": "object", - "properties": { - "text": { - "description": "The actual UTF-8 representation of the symbol.", - "type": "string" - }, - "property": { - "$ref": "TextProperty", - "description": "Additional information detected for the symbol." - }, - "boundingBox": { - "$ref": "BoundingPoly", - "description": "The bounding box for the symbol.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3)." - } - }, - "id": "Symbol" - }, - "LatLongRect": { - "description": "Rectangle determined by min and max `LatLng` pairs.", - "type": "object", - "properties": { - "minLatLng": { - "description": "Min lat/long pair.", - "$ref": "LatLng" - }, - "maxLatLng": { - "$ref": "LatLng", - "description": "Max lat/long pair." - } - }, - "id": "LatLongRect" } }, + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "protocol": "rest", "canonicalName": "Vision", "auth": { "oauth2": { @@ -1350,5 +1227,128 @@ "ownerDomain": "google.com", "name": "vision", "batchPath": "batch", - "title": "Google Cloud Vision API" + "title": "Google Cloud Vision API", + "ownerName": "Google", + "resources": { + "images": { + "methods": { + "annotate": { + "request": { + "$ref": "BatchAnnotateImagesRequest" + }, + "description": "Run image detection and annotation for a batch of images.", + "response": { + "$ref": "BatchAnnotateImagesResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-vision" + ], + "parameters": {}, + "flatPath": "v1/images:annotate", + "id": "vision.images.annotate", + "path": "v1/images:annotate" + } + } + } + }, + "parameters": { + "quotaUser": { + "location": "query", + "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.", + "type": "string" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "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", + "description": "Data format for response.", + "default": "json" + }, + "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.", + "type": "string", + "location": "query" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + } + }, + "version": "v1", + "baseUrl": "https://vision.googleapis.com/", + "description": "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.", + "kind": "discovery#restDescription", + "servicePath": "", + "basePath": "", + "documentationLink": "https://cloud.google.com/vision/", + "revision": "20170905", + "id": "vision:v1" } diff --git a/vendor/google.golang.org/api/vision/v1/vision-gen.go b/vendor/google.golang.org/api/vision/v1/vision-gen.go index 3edbe9853..d85c0218b 100644 --- a/vendor/google.golang.org/api/vision/v1/vision-gen.go +++ b/vendor/google.golang.org/api/vision/v1/vision-gen.go @@ -2262,8 +2262,7 @@ func (s *WebEntity) UnmarshalJSON(data []byte) error { // WebImage: Metadata for online images. type WebImage struct { - // Score: Overall relevancy score for the image. - // Not normalized and not comparable across different image queries. + // Score: (Deprecated) Overall relevancy score for the image. Score float64 `json:"score,omitempty"` // Url: The result image URL. @@ -2308,8 +2307,7 @@ func (s *WebImage) UnmarshalJSON(data []byte) error { // WebPage: Metadata for web pages. type WebPage struct { - // Score: Overall relevancy score for the web page. - // Not normalized and not comparable across different image queries. + // Score: (Deprecated) Overall relevancy score for the web page. Score float64 `json:"score,omitempty"` // Url: The result web page URL. diff --git a/vendor/google.golang.org/api/youtube/v3/youtube-gen.go b/vendor/google.golang.org/api/youtube/v3/youtube-gen.go index 525ce860d..4147fd34a 100644 --- a/vendor/google.golang.org/api/youtube/v3/youtube-gen.go +++ b/vendor/google.golang.org/api/youtube/v3/youtube-gen.go @@ -10536,16 +10536,12 @@ func (c *CaptionsDownloadCall) Do(opts ...googleapi.CallOption) error { // method id "youtube.captions.insert": type CaptionsInsertCall struct { - s *Service - caption *Caption - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + caption *Caption + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Insert: Uploads a caption track. @@ -10605,12 +10601,7 @@ func (c *CaptionsInsertCall) Sync(sync bool) *CaptionsInsertCall { // supplied. // At most one of Media and ResumableMedia may be set. func (c *CaptionsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CaptionsInsertCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -10625,11 +10616,7 @@ func (c *CaptionsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption // supersede any context previously provided to the Context method. func (c *CaptionsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CaptionsInsertCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -10638,7 +10625,7 @@ func (c *CaptionsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *CaptionsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CaptionsInsertCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -10683,27 +10670,16 @@ func (c *CaptionsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "captions") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -10736,20 +10712,10 @@ func (c *CaptionsInsertCall) Do(opts ...googleapi.CallOption) (*Caption, error) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -11036,16 +11002,12 @@ func (c *CaptionsListCall) Do(opts ...googleapi.CallOption) (*CaptionListRespons // method id "youtube.captions.update": type CaptionsUpdateCall struct { - s *Service - caption *Caption - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + caption *Caption + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Update: Updates a caption track. When updating a caption track, you @@ -11106,12 +11068,7 @@ func (c *CaptionsUpdateCall) Sync(sync bool) *CaptionsUpdateCall { // supplied. // At most one of Media and ResumableMedia may be set. func (c *CaptionsUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *CaptionsUpdateCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -11126,11 +11083,7 @@ func (c *CaptionsUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption // supersede any context previously provided to the Context method. func (c *CaptionsUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CaptionsUpdateCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -11139,7 +11092,7 @@ func (c *CaptionsUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *CaptionsUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CaptionsUpdateCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -11184,27 +11137,16 @@ func (c *CaptionsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "captions") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders @@ -11237,20 +11179,10 @@ func (c *CaptionsUpdateCall) Do(opts ...googleapi.CallOption) (*Caption, error) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -11345,11 +11277,7 @@ type ChannelBannersInsertCall struct { s *Service channelbannerresource *ChannelBannerResource urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater + mediaInfo_ *gensupport.MediaInfo ctx_ context.Context header_ http.Header } @@ -11399,12 +11327,7 @@ func (c *ChannelBannersInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner // supplied. // At most one of Media and ResumableMedia may be set. func (c *ChannelBannersInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *ChannelBannersInsertCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -11419,11 +11342,7 @@ func (c *ChannelBannersInsertCall) Media(r io.Reader, options ...googleapi.Media // supersede any context previously provided to the Context method. func (c *ChannelBannersInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ChannelBannersInsertCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -11432,7 +11351,7 @@ func (c *ChannelBannersInsertCall) ResumableMedia(ctx context.Context, r io.Read // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *ChannelBannersInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ChannelBannersInsertCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -11477,27 +11396,16 @@ func (c *ChannelBannersInsertCall) doRequest(alt string) (*http.Response, error) reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "channelBanners/insert") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -11530,20 +11438,10 @@ func (c *ChannelBannersInsertCall) Do(opts ...googleapi.CallOption) (*ChannelBan if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -21519,15 +21417,11 @@ func (c *SuperChatEventsListCall) Pages(ctx context.Context, f func(*SuperChatEv // method id "youtube.thumbnails.set": type ThumbnailsSetCall struct { - s *Service - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Set: Uploads a custom video thumbnail to YouTube and sets it for a @@ -21566,12 +21460,7 @@ func (c *ThumbnailsSetCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string // supplied. // At most one of Media and ResumableMedia may be set. func (c *ThumbnailsSetCall) Media(r io.Reader, options ...googleapi.MediaOption) *ThumbnailsSetCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -21586,11 +21475,7 @@ func (c *ThumbnailsSetCall) Media(r io.Reader, options ...googleapi.MediaOption) // supersede any context previously provided to the Context method. func (c *ThumbnailsSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ThumbnailsSetCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -21599,7 +21484,7 @@ func (c *ThumbnailsSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, s // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *ThumbnailsSetCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ThumbnailsSetCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -21639,27 +21524,16 @@ func (c *ThumbnailsSetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "thumbnails/set") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -21692,20 +21566,10 @@ func (c *ThumbnailsSetCall) Do(opts ...googleapi.CallOption) (*ThumbnailSetRespo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -22389,16 +22253,12 @@ func (c *VideosGetRatingCall) Do(opts ...googleapi.CallOption) (*VideoGetRatingR // method id "youtube.videos.insert": type VideosInsertCall struct { - s *Service - video *Video - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + video *Video + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Insert: Uploads a video to YouTube and optionally sets the video's @@ -22492,12 +22352,7 @@ func (c *VideosInsertCall) Stabilize(stabilize bool) *VideosInsertCall { // supplied. // At most one of Media and ResumableMedia may be set. func (c *VideosInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *VideosInsertCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -22512,11 +22367,7 @@ func (c *VideosInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) // supersede any context previously provided to the Context method. func (c *VideosInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *VideosInsertCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -22525,7 +22376,7 @@ func (c *VideosInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, si // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *VideosInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *VideosInsertCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -22570,27 +22421,16 @@ func (c *VideosInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "videos") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -22623,20 +22463,10 @@ func (c *VideosInsertCall) Do(opts ...googleapi.CallOption) (*Video, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() @@ -23500,16 +23330,12 @@ func (c *VideosUpdateCall) Do(opts ...googleapi.CallOption) (*Video, error) { // method id "youtube.watermarks.set": type WatermarksSetCall struct { - s *Service - invideobranding *InvideoBranding - urlParams_ gensupport.URLParams - media_ io.Reader - mediaBuffer_ *gensupport.MediaBuffer - mediaType_ string - mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater_ googleapi.ProgressUpdater - ctx_ context.Context - header_ http.Header + s *Service + invideobranding *InvideoBranding + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } // Set: Uploads a watermark image to YouTube and sets it for a channel. @@ -23547,12 +23373,7 @@ func (c *WatermarksSetCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string // supplied. // At most one of Media and ResumableMedia may be set. func (c *WatermarksSetCall) Media(r io.Reader, options ...googleapi.MediaOption) *WatermarksSetCall { - opts := googleapi.ProcessMediaOptions(options) - chunkSize := opts.ChunkSize - if !opts.ForceEmptyContentType { - r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType) - } - c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize) + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) return c } @@ -23567,11 +23388,7 @@ func (c *WatermarksSetCall) Media(r io.Reader, options ...googleapi.MediaOption) // supersede any context previously provided to the Context method. func (c *WatermarksSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *WatermarksSetCall { c.ctx_ = ctx - rdr := gensupport.ReaderAtToReader(r, size) - rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType) - c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize) - c.media_ = nil - c.mediaSize_ = size + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } @@ -23580,7 +23397,7 @@ func (c *WatermarksSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, s // not slow down the upload operation. This should only be called when // using ResumableMedia (as opposed to Media). func (c *WatermarksSetCall) ProgressUpdater(pu googleapi.ProgressUpdater) *WatermarksSetCall { - c.progressUpdater_ = pu + c.mediaInfo_.SetProgressUpdater(pu) return c } @@ -23625,27 +23442,16 @@ func (c *WatermarksSetCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "watermarks/set") - if c.media_ != nil || c.mediaBuffer_ != nil { + if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) - protocol := "multipart" - if c.mediaBuffer_ != nil { - protocol = "resumable" - } - c.urlParams_.Set("uploadType", protocol) + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) } if body == nil { body = new(bytes.Buffer) reqHeaders.Set("Content-Type", "application/json") } - if c.media_ != nil { - combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_) - defer combined.Close() - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if c.mediaBuffer_ != nil && c.mediaType_ != "" { - reqHeaders.Set("X-Upload-Content-Type", c.mediaType_) - } + body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders @@ -23663,20 +23469,10 @@ func (c *WatermarksSetCall) Do(opts ...googleapi.CallOption) error { if err := googleapi.CheckResponse(res); err != nil { return err } - if c.mediaBuffer_ != nil { - loc := res.Header.Get("Location") - rx := &gensupport.ResumableUpload{ - Client: c.s.client, - UserAgent: c.s.userAgent(), - URI: loc, - Media: c.mediaBuffer_, - MediaType: c.mediaType_, - Callback: func(curr int64) { - if c.progressUpdater_ != nil { - c.progressUpdater_(curr, c.mediaSize_) - } - }, - } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() ctx := c.ctx_ if ctx == nil { ctx = context.TODO() diff --git a/vendor/google.golang.org/api/youtubeanalytics/v1/youtubeanalytics-api.json b/vendor/google.golang.org/api/youtubeanalytics/v1/youtubeanalytics-api.json index a220c1252..eac047c17 100644 --- a/vendor/google.golang.org/api/youtubeanalytics/v1/youtubeanalytics-api.json +++ b/vendor/google.golang.org/api/youtubeanalytics/v1/youtubeanalytics-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/m291rBnypSdt_kqCjfud8vwlZL0\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/IbHq-QKai24UvHVJZ2P4kCU7c1w\"", "discoveryVersion": "v1", "id": "youtubeAnalytics:v1", "name": "youtubeAnalytics", "canonicalName": "YouTube Analytics", "version": "v1", - "revision": "20170604", + "revision": "20170911", "title": "YouTube Analytics API", "description": "Retrieves your YouTube Analytics data.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/youtubeanalytics/v1beta1/youtubeanalytics-api.json b/vendor/google.golang.org/api/youtubeanalytics/v1beta1/youtubeanalytics-api.json index a69e6cc7b..39e2f291c 100644 --- a/vendor/google.golang.org/api/youtubeanalytics/v1beta1/youtubeanalytics-api.json +++ b/vendor/google.golang.org/api/youtubeanalytics/v1beta1/youtubeanalytics-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/JUMbdVC6DhXRHvBUzk6DkwfoKao\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/ecwgZTz0I_T5k7lprMywhkKVSMw\"", "discoveryVersion": "v1", "id": "youtubeAnalytics:v1beta1", "name": "youtubeAnalytics", "canonicalName": "YouTube Analytics", "version": "v1beta1", - "revision": "20170604", + "revision": "20170911", "title": "YouTube Analytics API", "description": "Retrieves your YouTube Analytics data.", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/youtubereporting/v1/youtubereporting-api.json b/vendor/google.golang.org/api/youtubereporting/v1/youtubereporting-api.json index 66cec0a55..93c06ab9e 100644 --- a/vendor/google.golang.org/api/youtubereporting/v1/youtubereporting-api.json +++ b/vendor/google.golang.org/api/youtubereporting/v1/youtubereporting-api.json @@ -5,7 +5,7 @@ "batchPath": "batch", "id": "youtubereporting:v1", "documentationLink": "https://developers.google.com/youtube/reporting/v1/reports/", - "revision": "20170803", + "revision": "20170911", "title": "YouTube Reporting API", "ownerName": "Google", "discoveryVersion": "v1", @@ -13,25 +13,22 @@ "reportTypes": { "methods": { "list": { - "flatPath": "v1/reportTypes", - "id": "youtubereporting.reportTypes.list", - "path": "v1/reportTypes", "description": "Lists report types.", + "httpMethod": "GET", + "parameterOrder": [], "response": { "$ref": "ListReportTypesResponse" }, - "parameterOrder": [], - "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", "https://www.googleapis.com/auth/yt-analytics.readonly" ], "parameters": { "pageSize": { - "location": "query", "format": "int32", "description": "Requested page size. Server may return fewer report types than requested.\nIf unspecified, server will pick an appropriate default.", - "type": "integer" + "type": "integer", + "location": "query" }, "onBehalfOfContentOwner": { "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", @@ -39,16 +36,19 @@ "location": "query" }, "includeSystemManaged": { + "location": "query", "description": "If set to true, also system-managed report types will be returned;\notherwise only the report types that can be used to create new reporting\njobs will be returned.", - "type": "boolean", - "location": "query" + "type": "boolean" }, "pageToken": { - "location": "query", "description": "A token identifying a page of results the server should return. Typically,\nthis is the value of\nListReportTypesResponse.next_page_token\nreturned in response to the previous call to the `ListReportTypes` method.", - "type": "string" + "type": "string", + "location": "query" } - } + }, + "flatPath": "v1/reportTypes", + "path": "v1/reportTypes", + "id": "youtubereporting.reportTypes.list" } } }, @@ -57,13 +57,13 @@ "download": { "description": "Method for media download. Download is supported\non the URI `/v1/media/{+name}?alt=media`.", "supportsMediaDownload": true, - "response": { - "$ref": "Media" - }, + "httpMethod": "GET", "parameterOrder": [ "resourceName" ], - "httpMethod": "GET", + "response": { + "$ref": "Media" + }, "scopes": [ "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", "https://www.googleapis.com/auth/yt-analytics.readonly" @@ -78,55 +78,64 @@ } }, "flatPath": "v1/media/{mediaId}", - "id": "youtubereporting.media.download", - "path": "v1/media/{+resourceName}" + "path": "v1/media/{+resourceName}", + "id": "youtubereporting.media.download" } } }, "jobs": { "methods": { "get": { + "flatPath": "v1/jobs/{jobId}", + "id": "youtubereporting.jobs.get", + "path": "v1/jobs/{jobId}", "description": "Gets a job.", - "httpMethod": "GET", "response": { "$ref": "Job" }, "parameterOrder": [ "jobId" ], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", "https://www.googleapis.com/auth/yt-analytics.readonly" ], "parameters": { "jobId": { + "location": "path", "description": "The ID of the job to retrieve.", "type": "string", - "required": true, - "location": "path" + "required": true }, "onBehalfOfContentOwner": { + "location": "query", "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", - "type": "string", - "location": "query" + "type": "string" } - }, - "flatPath": "v1/jobs/{jobId}", - "path": "v1/jobs/{jobId}", - "id": "youtubereporting.jobs.get" + } }, "list": { - "description": "Lists jobs.", - "httpMethod": "GET", "response": { "$ref": "ListJobsResponse" }, "parameterOrder": [], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", "https://www.googleapis.com/auth/yt-analytics.readonly" ], "parameters": { + "includeSystemManaged": { + "location": "query", + "description": "If set to true, also system-managed jobs will be returned; otherwise only\nuser-created jobs will be returned. System-managed jobs can neither be\nmodified nor deleted.", + "type": "boolean" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically,\nthis is the value of\nListReportTypesResponse.next_page_token\nreturned in response to the previous call to the `ListJobs` method.", + "type": "string", + "location": "query" + }, "pageSize": { "location": "query", "format": "int32", @@ -134,69 +143,60 @@ "type": "integer" }, "onBehalfOfContentOwner": { + "location": "query", "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", - "type": "string", - "location": "query" - }, - "includeSystemManaged": { - "description": "If set to true, also system-managed jobs will be returned; otherwise only\nuser-created jobs will be returned. System-managed jobs can neither be\nmodified nor deleted.", - "type": "boolean", - "location": "query" - }, - "pageToken": { - "description": "A token identifying a page of results the server should return. Typically,\nthis is the value of\nListReportTypesResponse.next_page_token\nreturned in response to the previous call to the `ListJobs` method.", - "type": "string", - "location": "query" + "type": "string" } }, "flatPath": "v1/jobs", + "id": "youtubereporting.jobs.list", "path": "v1/jobs", - "id": "youtubereporting.jobs.list" + "description": "Lists jobs." }, "create": { - "description": "Creates a job and returns it.", + "flatPath": "v1/jobs", + "id": "youtubereporting.jobs.create", + "path": "v1/jobs", "request": { "$ref": "Job" }, - "httpMethod": "POST", - "parameterOrder": [], + "description": "Creates a job and returns it.", "response": { "$ref": "Job" }, - "parameters": { - "onBehalfOfContentOwner": { - "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", - "type": "string", - "location": "query" - } - }, + "parameterOrder": [], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", "https://www.googleapis.com/auth/yt-analytics.readonly" ], - "flatPath": "v1/jobs", - "path": "v1/jobs", - "id": "youtubereporting.jobs.create" + "parameters": { + "onBehalfOfContentOwner": { + "location": "query", + "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", + "type": "string" + } + } }, "delete": { "description": "Deletes a job.", "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, "parameterOrder": [ "jobId" ], + "response": { + "$ref": "Empty" + }, "scopes": [ "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", "https://www.googleapis.com/auth/yt-analytics.readonly" ], "parameters": { "jobId": { + "location": "path", "description": "The ID of the job to delete.", "type": "string", - "required": true, - "location": "path" + "required": true }, "onBehalfOfContentOwner": { "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", @@ -213,8 +213,10 @@ "reports": { "methods": { "get": { + "flatPath": "v1/jobs/{jobId}/reports/{reportId}", + "id": "youtubereporting.jobs.reports.get", + "path": "v1/jobs/{jobId}/reports/{reportId}", "description": "Gets the metadata of a specific report.", - "httpMethod": "GET", "response": { "$ref": "Report" }, @@ -222,16 +224,50 @@ "jobId", "reportId" ], + "httpMethod": "GET", + "parameters": { + "jobId": { + "location": "path", + "description": "The ID of the job.", + "type": "string", + "required": true + }, + "onBehalfOfContentOwner": { + "location": "query", + "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", + "type": "string" + }, + "reportId": { + "location": "path", + "description": "The ID of the report to retrieve.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", + "https://www.googleapis.com/auth/yt-analytics.readonly" + ] + }, + "list": { + "description": "Lists reports created by a specific job.\nReturns NOT_FOUND if the job does not exist.", + "httpMethod": "GET", + "parameterOrder": [ + "jobId" + ], + "response": { + "$ref": "ListReportsResponse" + }, "scopes": [ "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", "https://www.googleapis.com/auth/yt-analytics.readonly" ], "parameters": { - "reportId": { - "description": "The ID of the report to retrieve.", - "type": "string", - "required": true, - "location": "path" + "startTimeBefore": { + "location": "query", + "format": "google-datetime", + "description": "If set, only reports whose start time is smaller than the specified\ndate/time are returned.", + "type": "string" }, "jobId": { "description": "The ID of the job.", @@ -239,43 +275,20 @@ "required": true, "location": "path" }, - "onBehalfOfContentOwner": { - "location": "query", - "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", - "type": "string" - } - }, - "flatPath": "v1/jobs/{jobId}/reports/{reportId}", - "path": "v1/jobs/{jobId}/reports/{reportId}", - "id": "youtubereporting.jobs.reports.get" - }, - "list": { - "flatPath": "v1/jobs/{jobId}/reports", - "id": "youtubereporting.jobs.reports.list", - "path": "v1/jobs/{jobId}/reports", - "description": "Lists reports created by a specific job.\nReturns NOT_FOUND if the job does not exist.", - "response": { - "$ref": "ListReportsResponse" - }, - "parameterOrder": [ - "jobId" - ], - "httpMethod": "GET", - "parameters": { "createdAfter": { "format": "google-datetime", "description": "If set, only reports created after the specified date/time are returned.", "type": "string", "location": "query" }, - "pageToken": { - "description": "A token identifying a page of results the server should return. Typically,\nthis is the value of\nListReportsResponse.next_page_token\nreturned in response to the previous call to the `ListReports` method.", - "type": "string", - "location": "query" - }, "startTimeAtOrAfter": { + "location": "query", "format": "google-datetime", "description": "If set, only reports whose start time is greater than or equal the\nspecified date/time are returned.", + "type": "string" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically,\nthis is the value of\nListReportsResponse.next_page_token\nreturned in response to the previous call to the `ListReports` method.", "type": "string", "location": "query" }, @@ -289,24 +302,11 @@ "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", "type": "string", "location": "query" - }, - "startTimeBefore": { - "format": "google-datetime", - "description": "If set, only reports whose start time is smaller than the specified\ndate/time are returned.", - "type": "string", - "location": "query" - }, - "jobId": { - "description": "The ID of the job.", - "type": "string", - "required": true, - "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", - "https://www.googleapis.com/auth/yt-analytics.readonly" - ] + "flatPath": "v1/jobs/{jobId}/reports", + "path": "v1/jobs/{jobId}/reports", + "id": "youtubereporting.jobs.reports.list" } } } @@ -314,37 +314,21 @@ } }, "parameters": { - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, "fields": { + "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" + "type": "string" }, "uploadType": { "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", "location": "query" }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, "$.xgafv": { "description": "V1 error format.", "type": "string", @@ -358,11 +342,6 @@ "2" ] }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, "alt": { "enumDescriptions": [ "Responses with Content-Type of application/json", @@ -380,9 +359,9 @@ "type": "string" }, "key": { - "location": "query", "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.", - "type": "string" + "type": "string", + "location": "query" }, "access_token": { "description": "OAuth access token.", @@ -390,18 +369,144 @@ "location": "query" }, "quotaUser": { - "location": "query", "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.", - "type": "string" + "type": "string", + "location": "query" }, "pp": { "description": "Pretty-print response.", "default": "true", "type": "boolean", "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" } }, "schemas": { + "ReportType": { + "description": "A report type.", + "type": "object", + "properties": { + "deprecateTime": { + "format": "google-datetime", + "description": "The date/time when this report type was/will be deprecated.", + "type": "string" + }, + "name": { + "description": "The name of the report type (max. 100 characters).", + "type": "string" + }, + "systemManaged": { + "description": "True if this a system-managed report type; otherwise false. Reporting jobs\nfor system-managed report types are created automatically and can thus not\nbe used in the `CreateJob` method.", + "type": "boolean" + }, + "id": { + "description": "The ID of the report type (max. 100 characters).", + "type": "string" + } + }, + "id": "ReportType" + }, + "ListReportTypesResponse": { + "description": "Response message for ReportingService.ListReportTypes.", + "type": "object", + "properties": { + "reportTypes": { + "description": "The list of report types.", + "items": { + "$ref": "ReportType" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve next page of results.\nPass this value in the\nListReportTypesRequest.page_token\nfield in the subsequent call to `ListReportTypes` method to retrieve the next\npage of results.", + "type": "string" + } + }, + "id": "ListReportTypesResponse" + }, + "Report": { + "description": "A report's metadata including the URL from which the report itself can be\ndownloaded.", + "type": "object", + "properties": { + "createTime": { + "format": "google-datetime", + "description": "The date/time when this report was created.", + "type": "string" + }, + "jobId": { + "description": "The ID of the job that created this report.", + "type": "string" + }, + "id": { + "description": "The server-generated ID of the report.", + "type": "string" + }, + "jobExpireTime": { + "format": "google-datetime", + "description": "The date/time when the job this report belongs to will expire/expired.", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "The end of the time period that the report instance covers. The value is\nexclusive.", + "type": "string" + }, + "downloadUrl": { + "description": "The URL from which the report can be downloaded (max. 1000 characters).", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "The start of the time period that the report instance covers. The value is\ninclusive.", + "type": "string" + } + }, + "id": "Report" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "ListJobsResponse": { + "description": "Response message for ReportingService.ListJobs.", + "type": "object", + "properties": { + "jobs": { + "description": "The list of jobs.", + "items": { + "$ref": "Job" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve next page of results.\nPass this value in the\nListJobsRequest.page_token\nfield in the subsequent call to `ListJobs` method to retrieve the next\npage of results.", + "type": "string" + } + }, + "id": "ListJobsResponse" + }, "Job": { "description": "A job creating reports of a specific type.", "type": "object", @@ -439,16 +544,16 @@ "description": "Response message for ReportingService.ListReports.", "type": "object", "properties": { + "nextPageToken": { + "description": "A token to retrieve next page of results.\nPass this value in the\nListReportsRequest.page_token\nfield in the subsequent call to `ListReports` method to retrieve the next\npage of results.", + "type": "string" + }, "reports": { "description": "The list of report types.", "items": { "$ref": "Report" }, "type": "array" - }, - "nextPageToken": { - "description": "A token to retrieve next page of results.\nPass this value in the\nListReportsRequest.page_token\nfield in the subsequent call to `ListReports` method to retrieve the next\npage of results.", - "type": "string" } }, "id": "ListReportsResponse" @@ -463,111 +568,6 @@ } }, "id": "Media" - }, - "Report": { - "description": "A report's metadata including the URL from which the report itself can be\ndownloaded.", - "type": "object", - "properties": { - "createTime": { - "format": "google-datetime", - "description": "The date/time when this report was created.", - "type": "string" - }, - "jobId": { - "description": "The ID of the job that created this report.", - "type": "string" - }, - "id": { - "description": "The server-generated ID of the report.", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "The end of the time period that the report instance covers. The value is\nexclusive.", - "type": "string" - }, - "jobExpireTime": { - "format": "google-datetime", - "description": "The date/time when the job this report belongs to will expire/expired.", - "type": "string" - }, - "downloadUrl": { - "description": "The URL from which the report can be downloaded (max. 1000 characters).", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "The start of the time period that the report instance covers. The value is\ninclusive.", - "type": "string" - } - }, - "id": "Report" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "ListReportTypesResponse": { - "description": "Response message for ReportingService.ListReportTypes.", - "type": "object", - "properties": { - "reportTypes": { - "description": "The list of report types.", - "items": { - "$ref": "ReportType" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A token to retrieve next page of results.\nPass this value in the\nListReportTypesRequest.page_token\nfield in the subsequent call to `ListReportTypes` method to retrieve the next\npage of results.", - "type": "string" - } - }, - "id": "ListReportTypesResponse" - }, - "ReportType": { - "description": "A report type.", - "type": "object", - "properties": { - "systemManaged": { - "description": "True if this a system-managed report type; otherwise false. Reporting jobs\nfor system-managed report types are created automatically and can thus not\nbe used in the `CreateJob` method.", - "type": "boolean" - }, - "id": { - "description": "The ID of the report type (max. 100 characters).", - "type": "string" - }, - "deprecateTime": { - "format": "google-datetime", - "description": "The date/time when this report type was/will be deprecated.", - "type": "string" - }, - "name": { - "description": "The name of the report type (max. 100 characters).", - "type": "string" - } - }, - "id": "ReportType" - }, - "ListJobsResponse": { - "description": "Response message for ReportingService.ListJobs.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "A token to retrieve next page of results.\nPass this value in the\nListJobsRequest.page_token\nfield in the subsequent call to `ListJobs` method to retrieve the next\npage of results.", - "type": "string" - }, - "jobs": { - "description": "The list of jobs.", - "items": { - "$ref": "Job" - }, - "type": "array" - } - }, - "id": "ListJobsResponse" } }, "icons": { @@ -590,8 +590,8 @@ } } }, + "servicePath": "", "kind": "discovery#restDescription", "description": "Schedules reporting jobs containing your YouTube Analytics data and downloads the resulting bulk data reports in the form of CSV files.", - "servicePath": "", "rootUrl": "https://youtubereporting.googleapis.com/" } diff --git a/vendor/gopkg.in/yaml.v2/LICENSE b/vendor/gopkg.in/yaml.v2/LICENSE index 866d74a7a..8dada3eda 100644 --- a/vendor/gopkg.in/yaml.v2/LICENSE +++ b/vendor/gopkg.in/yaml.v2/LICENSE @@ -1,13 +1,201 @@ -Copyright 2011-2016 Canonical Ltd. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -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 + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - http://www.apache.org/licenses/LICENSE-2.0 + 1. Definitions. -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. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + 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.